	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=CPPDATA USE32
	GROUP DGROUP _DATA _BSS _CONST _STRING

SECTION _TEXT
[GLOBAL	_access]
;
; Line 4:	{
;
_access:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	MOV	ESI,DWORD [EBP+08H]
;
; Line 6:		switch(__level) {
;
	MOV	EAX,DWORD [EBP+0CH]
	CMP	EAX,DWORD 00H
	JE	SHORT	L_5
	CMP	EAX,DWORD 02H
	JE	NEAR	L_7
	CMP	EAX,DWORD 04H
	JE	SHORT	L_6
	CMP	EAX,DWORD 06H
	JE	SHORT	L_8
	JMP	L_3
L_5:
L_6:
;
; Line 9:				file = fopen(__file,"rb") ;
;
	PUSH	DWORD L_1
	PUSH	ESI
	CALL	_fopen
	ADD	ESP,BYTE 08H
	MOV	EBX,EAX
;
; Line 10:				break ;
;
	JMP	L_4
L_7:
L_8:
;
; Line 13:				file = fopen(__file,"r+") ;
;
	PUSH	DWORD L_2
	PUSH	ESI
	CALL	_fopen
	ADD	ESP,BYTE 08H
	MOV	EBX,EAX
;
; Line 14:				break ;
;
	JMP	L_4
L_3:
;
; Line 16:				return -1 ;
;
	MOV	EAX,0FFFFFFFFH
	JMP	L_10
L_4:
;
; Line 18:		if (file)
;
	TEST	EBX,EBX
	JE	SHORT	L_11
;
; Line 19:			fclose(file) ;
;
	PUSH	EBX
	CALL	_fclose
	POP	ECX
L_11:
;
; Line 20:		return file ? 0 : -1 ;
;
	TEST	EBX,EBX
	JE	SHORT	L_13
	MOV	EAX,00H
	JMP	L_14
L_13:
	MOV	EAX,0FFFFFFFFH
L_14:
L_10:
	POP	ESI
	POP	EBX
	POP	EBP
	RET
[GLOBAL	_main]
;
; Line 23:	{
;
_main:
;
; Line 24:		printf("%d\n",access("q",0)) ;
;
	PUSH	BYTE 00H
	PUSH	DWORD L_16
	CALL	_access
	ADD	ESP,BYTE 08H
	PUSH	EAX
	PUSH	DWORD L_15
	CALL	_printf
	ADD	ESP,BYTE 08H
;
; Line 25:		printf("%d\n",access("q",2)) ;
;
	PUSH	BYTE 02H
	PUSH	DWORD L_16
	CALL	_access
	ADD	ESP,BYTE 08H
	PUSH	EAX
	PUSH	DWORD L_15
	CALL	_printf
	ADD	ESP,BYTE 08H
;
; Line 26:		printf("%d\n",access("q",4)) ;
;
	PUSH	BYTE 04H
	PUSH	DWORD L_16
	CALL	_access
	ADD	ESP,BYTE 08H
	PUSH	EAX
	PUSH	DWORD L_15
	CALL	_printf
	ADD	ESP,BYTE 08H
;
; Line 27:		printf("%d\n",access("q",6)) ;
;
	PUSH	BYTE 06H
	PUSH	DWORD L_16
	CALL	_access
	ADD	ESP,BYTE 08H
	PUSH	EAX
	PUSH	DWORD L_15
	CALL	_printf
	ADD	ESP,BYTE 08H
;
; Line 28:		printf("%d\n",access("r",0)) ;
;
	PUSH	BYTE 00H
	PUSH	DWORD L_17
	CALL	_access
	ADD	ESP,BYTE 08H
	PUSH	EAX
	PUSH	DWORD L_15
	CALL	_printf
	ADD	ESP,BYTE 08H
;
; Line 29:		printf("%d\n",access("r",2)) ;
;
	PUSH	BYTE 02H
	PUSH	DWORD L_17
	CALL	_access
	ADD	ESP,BYTE 08H
	PUSH	EAX
	PUSH	DWORD L_15
	CALL	_printf
	ADD	ESP,BYTE 08H
;
; Line 30:		printf("%d\n",access("r",4)) ;
;
	PUSH	BYTE 04H
	PUSH	DWORD L_17
	CALL	_access
	ADD	ESP,BYTE 08H
	PUSH	EAX
	PUSH	DWORD L_15
	CALL	_printf
	ADD	ESP,BYTE 08H
;
; Line 31:		printf("%d\n",access("r",6)) ;
;
	PUSH	BYTE 06H
	PUSH	DWORD L_17
	CALL	_access
	ADD	ESP,BYTE 08H
	PUSH	EAX
	PUSH	DWORD L_15
	CALL	_printf
	ADD	ESP,BYTE 08H
;
; Line 32:	}
;
	RET

SECTION _STRING
L_17:
	DB	072H,00H
L_16:
	DB	071H,00H
L_15:
	DB	025H,064H,0AH,00H
L_2:
	DB	072H,02BH,00H
L_1:
	DB	072H,062H,00H

SECTION _TEXT
[EXTERN	_fopen]
[EXTERN	_fclose]
[EXTERN	_printf]
