	.386
	.model use32 small
	public _strrchr
	.code
_strrchr:
	push	ebp
	mov	ebp,esp
	push	edi
	mov	edi,[ebp+8]
	mov	ecx,-1
	sub	al,al
	cld
	repne	scasb
	not	ecx
	dec	edi
	mov	al,[ebp+12]
	std
	repne	scasb
	cld
	je	short okexit
	sub	eax,eax
	jmp	short done
okexit:
	add	ecx,[ebp+8]
	mov	eax,ecx
done:
	pop	edi
	pop	ebp
	ret
	end