 	.386
	.model	use32 small

public __ftol
	.code
__ftol:
	push	ebp
	mov	ebp,esp
	sub	esp,12
	fnstcw	[ebp-4]
	mov	ax,[ebp-4]
	or	ah,0ch
	mov	[ebp-2],ax
	fldcw	[ebp-2]
	fistp	qword ptr [ebp-12]
	fldcw	[ebp-4]
	mov	eax,[ebp-12]
	mov	esp,ebp
	pop	ebp
	ret
	end