	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	_fputc]
;
; Line 8:	{
;
_fputc:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 08H
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+0CH]
	MOV	EDI,DWORD _errno
;
; Line 10:		if (stream->token != 0x444c)
;
	MOVSX	EAX,WORD [ESI+01DH]
	CMP	EAX,0444CH
	JE	SHORT	L_2
;
; Line 11:			return (-1)             ;
;
	MOV	EAX,0FFFFFFFFH
	JMP	L_4
L_2:
;
; Line 12:		if (!(stream->flags & 0x0002                   )) {
;
	MOV	EAX,DWORD [ESI+04H]
	AND	EAX,BYTE 02H
	JNE	SHORT	L_5
;
; Line 13:			stream->flags |= 0x0010                   ;
;
	BTS	DWORD [ESI+04H],04H
;
; Line 14:			errno = 14       ;
;
	MOV	DWORD [EDI+00H],0EH
;
; Line 15:			return (-1)             ;
;
	MOV	EAX,0FFFFFFFFH
	JMP	L_4
L_5:
;
; Line 17:		if ((stream->flags & 0x0080                   ) || 
;
	MOV	EAX,DWORD [ESI+04H]
	AND	EAX,080H
	JNE	SHORT	L_9
	CMP	DWORD [ESI+011H],BYTE 00H
	JE	NEAR	L_7
	MOV	EAX,DWORD [ESI+04H]
	AND	EAX,0100H
	JE	NEAR	L_7
	CMP	DWORD [ESI+00H],BYTE 00H
	JL	SHORT	L_7
L_9:
;
; Line 20:			if (fflush(stream))
;
	PUSH	ESI
	CALL	_fflush
	POP	ECX
	TEST	EAX,EAX
	JE	SHORT	L_10
;
; Line 21:				return (-1)             ;
;
	MOV	EAX,0FFFFFFFFH
	JMP	L_4
L_10:
;
; Line 22:			goto join;
;
	JMP	L_1
L_7:
;
; Line 25:			if (!(stream->flags & 0x0100                   )) {
;
	MOV	EAX,DWORD [ESI+04H]
	AND	EAX,0100H
	JNE	SHORT	L_12
L_1:
;
; Line 27:				stream->flags &= ~0x0080                   ;
;
	BTR	DWORD [ESI+04H],07H
;
; Line 28:				stream->flags |= 0x0100                   ;
;
	BTS	DWORD [ESI+04H],08H
;
; Line 29:				stream->level = -stream->bsize;
;
	MOV	EAX,DWORD [ESI+0DH]
	NEG	EAX
	MOV	DWORD [ESI+00H],EAX
;
; Line 30:				stream->curp = stream->buffer;
;
	MOV	EAX,DWORD [ESI+011H]
	MOV	DWORD [ESI+015H],EAX
;
; Line 31:			}
;
L_12:
;
; Line 32:		}
;
L_8:
;
; Line 33:		if (stream->buffer) {
;
	CMP	DWORD [ESI+011H],BYTE 00H
	JE	NEAR	L_14
;
; Line 34:			++stream->level;
;
	INC	DWORD [ESI+00H]
;
; Line 35:			*stream->curp++ = (unsigned char)c;
;
	MOV	EAX,DWORD [EBP+08H]
	MOV	ECX,DWORD [ESI+015H]
	INC	DWORD [ESI+015H]
	MOV	BYTE [ECX+00H],AL
;
; Line 36:			if (c == '\n' && (stream->flags & 0x0008                   ))
;
	CMP	DWORD [EBP+08H],BYTE 0AH
	JNE	SHORT	L_16
	MOV	EAX,DWORD [ESI+04H]
	AND	EAX,BYTE 08H
	JE	SHORT	L_16
;
; Line 37:				fflush(stream);
;
	PUSH	ESI
	CALL	_fflush
	POP	ECX
L_16:
;
; Line 38:		}		
;
	JMP	L_15
L_14:
;
; Line 40:			if (!(stream->flags & 0x0040                   ) && c == '\n') {
;
	MOV	EAX,DWORD [ESI+04H]
	AND	EAX,BYTE 040H
	JNE	NEAR	L_18
	CMP	DWORD [EBP+08H],BYTE 0AH
	JNE	NEAR	L_18
;
; Line 41:				int c1 = 13;
;
	MOV	DWORD [EBP+0FFFFFFF8H],0DH
;
; Line 42:				if (_ll_write(stream->fd,&c1,1) < 0) {
;
	PUSH	BYTE 01H
	LEA	EAX,[EBP+0FFFFFFF8H]
	PUSH	EAX
	PUSH	DWORD [ESI+08H]
	CALL	__ll_write
	ADD	ESP,BYTE 0CH
	TEST	EAX,EAX
	JGE	SHORT	L_20
;
; Line 43:					stream->flags |= 0x0010                   ;
;
	BTS	DWORD [ESI+04H],04H
;
; Line 44:					errno = 40       ;
;
	MOV	DWORD [EDI+00H],028H
;
; Line 45:					return (-1)             ;
;
	MOV	EAX,0FFFFFFFFH
	JMP	L_4
L_20:
;
; Line 47:			}
;
L_18:
;
; Line 48:			if (_ll_write(stream->fd,&c,1) < 0) {
;
	PUSH	BYTE 01H
	LEA	EAX,[EBP+08H]
	PUSH	EAX
	PUSH	DWORD [ESI+08H]
	CALL	__ll_write
	ADD	ESP,BYTE 0CH
	TEST	EAX,EAX
	JGE	SHORT	L_22
;
; Line 49:				stream->flags |= 0x0010                   ;
;
	BTS	DWORD [ESI+04H],04H
;
; Line 50:				errno = 40       ;
;
	MOV	DWORD [EDI+00H],028H
;
; Line 51:				return (-1)             ;
;
	MOV	EAX,0FFFFFFFFH
	JMP	L_4
L_22:
;
; Line 53:		}
;
L_15:
;
; Line 54:		return 0;
;
	MOV	EAX,00H
L_4:
	POP	EDI
	POP	ESI
	MOV	ESP,EBP
	POP	EBP
	RET
[GLOBAL	__fputc]
;
; Line 57:	{
;
__fputc:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	ESI
	MOV	ESI,DWORD [EBP+0CH]
;
; Line 58:		stream->level--;
;
	DEC	DWORD [ESI+00H]
;
; Line 59:		return fputc(c,stream);
;
	PUSH	ESI
	PUSH	DWORD [EBP+08H]
	CALL	_fputc
	ADD	ESP,BYTE 08H
L_24:
	POP	ESI
	POP	EBP
	RET
[GLOBAL	_putc]
;
; Line 64:	{
;
_putc:
	PUSH	EBP
	MOV	EBP,ESP
;
; Line 65:		return fputc(c,stream);
;
	PUSH	DWORD [EBP+0CH]
	PUSH	DWORD [EBP+08H]
	CALL	_fputc
	ADD	ESP,BYTE 08H
L_25:
	POP	EBP
	RET
[GLOBAL	_putchar]
;
; Line 68:	{
;
_putchar:
	PUSH	EBP
	MOV	EBP,ESP
;
; Line 69:		return fputc(c,(_pstreams[1]));
;
	PUSH	DWORD [04H+__pstreams]
	PUSH	DWORD [EBP+08H]
	CALL	_fputc
	ADD	ESP,BYTE 08H
L_26:
	POP	EBP
	RET


SECTION _TEXT
[EXTERN	__ll_write]
[EXTERN	_fflush]

SECTION _DATA
[EXTERN	__pstreams]
[EXTERN	_errno]
