	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	_puts]
;
; Line 4:	{
;
_puts:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	MOV	ESI,DWORD __pstreams
;
; Line 5:		int rv = fputs(string,(_pstreams[1]));
;
	PUSH	DWORD [ESI+04H]
	PUSH	DWORD [EBP+08H]
	CALL	_fputs
	ADD	ESP,BYTE 08H
	MOV	EBX,EAX
;
; Line 6:		if (rv == (-1)             )
;
	CMP	EBX,BYTE 0FFFFFFFFH
	JNE	SHORT	L_1
;
; Line 7:			return (-1)             ;
;
	MOV	EAX,0FFFFFFFFH
	JMP	L_3
L_1:
;
; Line 8:		return ((++(((_pstreams[1]))->level) < 0) ? (unsigned char)(*((_pstreams[1]))->curp++=('\n')) :     _fputc (('\n'),(_pstreams[1])));
;
	MOV	EAX,DWORD [ESI+04H]
	INC	DWORD [EAX+00H]
	CMP	DWORD [EAX+00H],BYTE 00H
	JGE	SHORT	L_4
	MOV	EAX,DWORD [ESI+04H]
	PUSH	DWORD [EAX+015H]
	INC	DWORD [EAX+015H]
	POP	EAX
	MOV	BYTE [EAX+00H],0AH
	MOV	EAX,0AH
	JMP	L_5
L_4:
	PUSH	DWORD [ESI+04H]
	PUSH	BYTE 0AH
	CALL	__fputc
	ADD	ESP,BYTE 08H
L_5:
L_3:
	POP	ESI
	POP	EBX
	POP	EBP
	RET


SECTION _TEXT
[EXTERN	__fputc]
[EXTERN	_fputs]

SECTION _DATA
[EXTERN	__pstreams]
