	SECTION _TEXT CLASS=CODE USE32
	SECTION _DATA CLASS=DATA USE32
	SECTION _BSS  CLASS=BSS USE32
	SECTION _CONST  CLASS=CONST USE32
	SECTION _STRING  CLASS=STRING USE32
	SECTION cstartup CLASS=INITDATA USE32
	SECTION crundown CLASS=EXITDATA USE32
	SECTION cppinit  CLASS=CPPINIT USE32
	SECTION cppexit  CLASS=CPPEXIT USE32
	GROUP DGROUP _DATA _BSS _CONST _STRING

SECTION _TEXT
[GLOBAL	_fputs]
;
; Line 6:	{
;
_fputs:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
;
; Line 7:		int l = strlen(string),i;
;
	PUSH	EDI
	MOV	EDI,ESI
	CLD
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	NOT	ECX
	DEC	ECX
	MOV	EAX,ECX
	POP	EDI
	MOV	EDI,EAX
	MOV	EBX,00H
	JMP	L_3
L_1:
;
; Line 9:			if (putc(string[i],stream) == (-1)             )
;
	PUSH	DWORD [EBP+0CH]
	MOVSX	EAX,BYTE [ESI+EBX+00H]
	PUSH	EAX
	CALL	_putc
	ADD	ESP,BYTE 08H
	CMP	EAX,BYTE 0FFFFFFFFH
	JNE	SHORT	L_5
;
; Line 10:				return (-1)             ;
;
	MOV	EAX,0FFFFFFFFH
	JMP	L_7
L_5:
;
; Line 8:		for (i=0; i < l; i++) 
;
L_2:
	INC	EBX
L_3:
	CMP	EBX,EDI
	JL	NEAR	L_1
L_4:
;
; Line 11:		return 1;
;
	MOV	EAX,01H
L_7:
	POP	EDI
	POP	ESI
	POP	EBX
	POP	EBP
	RET


SECTION _TEXT
[EXTERN	_putc]
