
;  GNU C 2.7.2 [AL 1.1, MM 40] RISC NEWS-OS compiled by CC

;  Cc1 defaults:
;  -mmemcpy

;  Cc1 arguments (-G value = 0, Cpu = 3000, ISA = 1):
;  -quiet -dumpbase -O2 -Wall -o

gcc2_compiled.:
__gnu_compiled_c:
	.code
	.align	2
__LC0:
	.ascii	"clipmmio.$(%d)\000"
	.align	2
__LC1:
	.ascii	"rb\000"
	.code
	.align	1
	.global	mmioOpen
mmioOpen:
;	.frame	%sp,12,$31		# vars= 0, regs= 1/0, args= 8, extra= 0
;	.mask	0x80000000,-4
;	.fmask	0x00000000,0
	sub	%sp,0x2		; 	xsub	%sp,%sp,8
	cmp	%r13,0x0
	jrne	__LX72		; 	xjrne	__L72
	cmp	%r14,0x0
	jreq	__LX71		; 	xjreq	__L71
__LX72:				; __L72:
	ext	__LC0+0x0@h	; 	xld.w	%r10,__LC0
	ext	__LC0+0x0@m
	ld.w	%r10,__LC0+0x0@l
	ld.w	[%sp+0x0],%r10	; 	xld.w	[%sp],%r10
	ld.w	%r10,0x15	; 	xld.w	%r10,0x00000015		; 21
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX71:				; __L71:
	ext	__LC1+0x0@h	; 	xld.w	%r13,__LC1
	ext	__LC1+0x0@m
	ld.w	%r13,__LC1+0x0@l
	ext	fopen@rm	; 	xcall	fopen
	call	fopen@rl
	add	%sp,0x2		; 	xadd	%sp,%sp,8
	ret
	.align	1
	.global	mmioClose
mmioClose:
;	.frame	%sp,12,$31		# vars= 0, regs= 1/0, args= 8, extra= 0
;	.mask	0x80000000,-4
;	.fmask	0x00000000,0
	sub	%sp,0x2		; 	xsub	%sp,%sp,8
	cmp	%r13,0x0
	jreq	__LX74		; 	xjreq	__L74
	ext	__LC0+0x0@h	; 	xld.w	%r10,__LC0
	ext	__LC0+0x0@m
	ld.w	%r10,__LC0+0x0@l
	ld.w	[%sp+0x0],%r10	; 	xld.w	[%sp],%r10
	ld.w	%r10,0x1c	; 	xld.w	%r10,0x0000001c		; 28
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX74:				; __L74:
	ext	fclose@rm	; 	xcall	fclose
	call	fclose@rl
	add	%sp,0x2		; 	xadd	%sp,%sp,8
	ret
	.align	1
	.global	mmioDescend
mmioDescend:
;	.frame	%sp,48,$31		# vars= 20, regs= 5/0, args= 8, extra= 0
;	.mask	0x800f0000,-4
;	.fmask	0x00000000,0
	pushn	%r3
	sub	%sp,0x7		; 	xsub	%sp,%sp,28
	ld.w	%r0,%r12
	ld.w	%r3,%r13
	ld.w	%r1,%r14
	ld.w	%r13,%r15
	cmp	%r13,0x10	; 	xcmp	%r13,16
	jreq	__LX87		; 	xjreq	__L87
	jrgt	__LX109		; 	xjrgt	__L109
	cmp	%r13,0x0
	jreq	__LX77		; 	xjreq	__L77
	ext	__LX76@rm	; 	xjp	__L76
	jp	__LX76@rl
__LX109:				; __L109:
	ext	0x0		; 	xcmp	%r13,32
	cmp	%r13,0x20
	jreq	__LX94		; 	xjreq	__L94
	ext	0x1		; 	xcmp	%r13,64
	cmp	%r13,0x0
	ext	__LX101@rm	; 	xjreq	__L101
	jreq	__LX101@rl
	ext	__LX76@rm	; 	xjp	__L76
	jp	__LX76@rl
__LX77:				; __L77:
	ld.w	%r12,%sp	; 	xadd	%r12,%sp,8
	add	%r12,0x8
	ld.w	%r14,0x14	; 	xld.w	%r14,0x00000014		; 20
	ext	memset@rm	; 	xcall	memset
	call	memset@rl
	ld.w	%r12,%r0
	ext	ftell@rm	; 	xcall	ftell
	call	ftell@rl
	ld.w	%r2,%r10
	cmp	%r2,0x0
	jrge	__LX78		; 	xjrge	__L78
	ext	__LC0+0x0@h	; 	xld.w	%r10,__LC0
	ext	__LC0+0x0@m
	ld.w	%r10,__LC0+0x0@l
	ld.w	[%sp+0x0],%r10	; 	xld.w	[%sp],%r10
	ext	0x0		; 	xld.w	%r10,0x0000002c		; 44
	ld.w	%r10,0x2c
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX78:				; __L78:
	cmp	%r1,0x0
	jreq	__LX79		; 	xjreq	__L79
	ext	0xc		; 	xld.w	%r10,[%r1+12]
	ld.w	%r10,[%r1]
	ext	0x4		; 	xld.w	%r11,[%r1+4]
	ld.w	%r11,[%r1]
	add	%r10,%r11
	cmp	%r2,%r10
	jrge	__LX114		; 	xjrge	__L114
__LX79:				; __L79:
	ld.w	%r12,%r0
	ld.w	%r13,%sp	; 	xadd	%r13,%sp,8
	add	%r13,0x8
	ld.w	%r14,0x8	; 	xld.w	%r14,0x00000008		; 8
	ext	mmioRead@rm	; 	xcall	mmioRead
	call	mmioRead@rl
	cmp	%r10,0x0
	jrne	__LX81		; 	xjrne	__L81
__LX114:				; __L114:
	ld.w	%r10,0x3f	; 	xld.w	%r10,-1			; 0xffffffff
	ext	__LX110@rm	; 	xjp	__L110
	jp	__LX110@rl
__LX81:				; __L81:
	cmp	%r10,0x8	; 	xcmp	%r10,8
	jreq	__LX82		; 	xjreq	__L82
	ext	__LC0+0x0@h	; 	xld.w	%r10,__LC0
	ext	__LC0+0x0@m
	ld.w	%r10,__LC0+0x0@l
	ld.w	[%sp+0x0],%r10	; 	xld.w	[%sp],%r10
	ext	0x0		; 	xld.w	%r10,0x00000034		; 52
	ld.w	%r10,0x34
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX82:				; __L82:
	ld.w	%r10,[%sp+0x2]	; 	xld.w	%r10,[%sp+8]
	ext	0x8c8		; 	xcmp	%r10,1179011410
	ext	0x1925
	cmp	%r10,0x12
	jreq	__LX84		; 	xjreq	__L84
	ext	0xa8a		; 	xcmp	%r10,1414744396
	ext	0xd25
	cmp	%r10,0xc
	jrne	__LX83		; 	xjrne	__L83
__LX84:				; __L84:
	ld.w	%r12,%r0
	ld.w	%r13,%sp	; 	xadd	%r13,%sp,16
	add	%r13,0x10
	ld.w	%r14,0x4	; 	xld.w	%r14,0x00000004		; 4
	ext	mmioRead@rm	; 	xcall	mmioRead
	call	mmioRead@rl
	cmp	%r10,0x4	; 	xcmp	%r10,4
	jreq	__LX83		; 	xjreq	__L83
	ext	__LC0+0x0@h	; 	xld.w	%r10,__LC0
	ext	__LC0+0x0@m
	ld.w	%r10,__LC0+0x0@l
	ld.w	[%sp+0x0],%r10	; 	xld.w	[%sp],%r10
	ext	0x0		; 	xld.w	%r10,0x00000038		; 56
	ld.w	%r10,0x38
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX83:				; __L83:
	ext	0x8		; 	xadd	%r10,%r2,8
	add	%r10,%r2
	ld.w	[%sp+0x5],%r10	; 	xld.w	[%sp+20],%r10
	jp	__LX102		; 	xjp	__L102
__LX87:				; __L87:
	ld.w	%r12,%r0
	ld.w	%r13,%sp	; 	xadd	%r13,%sp,8
	add	%r13,0x8
	ld.w	%r14,%r1
	ld.w	%r15,0x0
	call	mmioDescend	; 	xcall	mmioDescend
	ld.w	%r14,%r10
	cmp	%r14,0x0
	jrne	__LX111		; 	xjrne	__L111
	ld.w	%r11,[%sp+0x2]	; 	xld.w	%r11,[%sp+8]
	ld.w	%r10,[%r3]	; 	xld.w	%r10,[%r3]
	cmp	%r11,%r10
	jreq	__LX102		; 	xjreq	__L102
	ld.w	%r12,%r0
	ld.w	%r13,%sp	; 	xadd	%r13,%sp,8
	add	%r13,0x8
	call	mmioAscend	; 	xcall	mmioAscend
	cmp	%r10,0x0
	jreq	__LX87		; 	xjreq	__L87
	ext	__LC0+0x0@h	; 	xld.w	%r10,__LC0
	ext	__LC0+0x0@m
	ld.w	%r10,__LC0+0x0@l
	ld.w	[%sp+0x0],%r10	; 	xld.w	[%sp],%r10
	ext	0x1		; 	xld.w	%r10,0x00000043		; 67
	ld.w	%r10,0x3
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX94:				; __L94:
	ld.w	%r12,%r0
	ld.w	%r13,%sp	; 	xadd	%r13,%sp,8
	add	%r13,0x8
	ld.w	%r14,%r1
	ld.w	%r15,0x0
	ext	mmioDescend@rm	; 	xcall	mmioDescend
	call	mmioDescend@rl
	ld.w	%r14,%r10
	cmp	%r14,0x0
	jrne	__LX111		; 	xjrne	__L111
	ld.w	%r10,[%sp+0x2]	; 	xld.w	%r10,[%sp+8]
	ext	0x8c8		; 	xcmp	%r10,1179011410
	ext	0x1925
	cmp	%r10,0x12
	jreq	__LX102		; 	xjreq	__L102
	ld.w	%r12,%r0
	ld.w	%r13,%sp	; 	xadd	%r13,%sp,8
	add	%r13,0x8
	call	mmioAscend	; 	xcall	mmioAscend
	cmp	%r10,0x0
	jreq	__LX94		; 	xjreq	__L94
	ext	__LC0+0x0@h	; 	xld.w	%r10,__LC0
	ext	__LC0+0x0@m
	ld.w	%r10,__LC0+0x0@l
	ld.w	[%sp+0x0],%r10	; 	xld.w	[%sp],%r10
	ext	0x1		; 	xld.w	%r10,0x0000004e		; 78
	ld.w	%r10,0xe
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX101:				; __L101:
	ld.w	%r12,%r0
	ld.w	%r13,%sp	; 	xadd	%r13,%sp,8
	add	%r13,0x8
	ld.w	%r14,%r1
	ld.w	%r15,0x0
	ext	mmioDescend@rm	; 	xcall	mmioDescend
	call	mmioDescend@rl
	ld.w	%r14,%r10
	cmp	%r14,0x0
	jrne	__LX113		; 	xjrne	__L113
	ld.w	%r10,[%sp+0x2]	; 	xld.w	%r10,[%sp+8]
	ext	0xa8a		; 	xcmp	%r10,1414744396
	ext	0xd25
	cmp	%r10,0xc
	jreq	__LX102		; 	xjreq	__L102
	ld.w	%r12,%r0
	ld.w	%r13,%sp	; 	xadd	%r13,%sp,8
	add	%r13,0x8
	call	mmioAscend	; 	xcall	mmioAscend
	cmp	%r10,0x0
	jreq	__LX101		; 	xjreq	__L101
	ext	__LC0+0x0@h	; 	xld.w	%r10,__LC0
	ext	__LC0+0x0@m
	ld.w	%r10,__LC0+0x0@l
	ld.w	[%sp+0x0],%r10	; 	xld.w	[%sp],%r10
	ext	0x1		; 	xld.w	%r10,0x00000059		; 89
	ld.w	%r10,0x19
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX102:				; __L102:
	ld.w	%r12,%r3
	ld.w	%r13,%sp	; 	xadd	%r13,%sp,8
	add	%r13,0x8
	ld.w	%r14,0x14	; 	xld.w	%r14,0x00000014		; 20
	ext	memcpy@rm	; 	xcall	memcpy
	call	memcpy@rl
	ld.w	%r10,0x0
	jp	__LX110		; 	xjp	__L110
__LX76:				; __L76:
	ext	__LC0+0x0@h	; 	xld.w	%r10,__LC0
	ext	__LC0+0x0@m
	ld.w	%r10,__LC0+0x0@l
	ld.w	[%sp+0x0],%r10	; 	xld.w	[%sp],%r10
	ext	0x1		; 	xld.w	%r10,0x0000005e		; 94
	ld.w	%r10,0x1e
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX113:				; __L113:
__LX111:				; __L111:
	ld.w	%r10,%r14
__LX110:				; __L110:
	add	%sp,0x7		; 	xadd	%sp,%sp,28
	popn	%r3
	ret
	.align	1
	.global	mmioAscend
mmioAscend:
;	.frame	%sp,12,$31		# vars= 0, regs= 1/0, args= 8, extra= 0
;	.mask	0x80000000,-4
;	.fmask	0x00000000,0
	sub	%sp,0x2		; 	xsub	%sp,%sp,8
	ld.w	%r10,%r13
	cmp	%r14,0x0
	jreq	__LX116		; 	xjreq	__L116
	ext	__LC0+0x0@h	; 	xld.w	%r10,__LC0
	ext	__LC0+0x0@m
	ld.w	%r10,__LC0+0x0@l
	ld.w	[%sp+0x0],%r10	; 	xld.w	[%sp],%r10
	ext	0x1		; 	xld.w	%r10,0x00000064		; 100
	ld.w	%r10,0x24
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX116:				; __L116:
	ext	0x4		; 	xld.w	%r13,[%r10+4]
	ld.w	%r13,[%r10]
	add	%r13,0x1	; 	xadd	%r13,%r13,1
	and	%r13,0x3e	; 	xand	%r13,%r13,0xfffffffe
	ext	0xc		; 	xld.w	%r10,[%r10+12]
	ld.w	%r10,[%r10]
	add	%r10,%r13
	ld.w	%r13,%r10
	ext	fseek@rm	; 	xcall	fseek
	call	fseek@rl
	add	%sp,0x2		; 	xadd	%sp,%sp,8
	ret
	.align	1
	.global	mmioRead
mmioRead:
;	.frame	%sp,4,$31		# vars= 0, regs= 1/0, args= 0, extra= 0
;	.mask	0x80000000,-4
;	.fmask	0x00000000,0
	ld.w	%r15,%r12
	ld.w	%r12,%r13
	ld.w	%r13,0x1	; 	xld.w	%r13,0x00000001		; 1
	ext	fread@rm	; 	xcall	fread
	call	fread@rl
	ret
	.align	1
	.global	mmioSeek
mmioSeek:
;	.frame	%sp,8,$31		# vars= 0, regs= 2/0, args= 0, extra= 0
;	.mask	0x80010000,-4
;	.fmask	0x00000000,0
	pushn	%r0
	ld.w	%r0,%r12
	ext	fseek@rm	; 	xcall	fseek
	call	fseek@rl
	cmp	%r10,0x0
	jrne	__LX119		; 	xjrne	__L119
	ld.w	%r12,%r0
	ext	ftell@rm	; 	xcall	ftell
	call	ftell@rl
	jp	__LX120		; 	xjp	__L120
__LX119:				; __L119:
	ld.w	%r10,0x3f	; 	xld.w	%r10,-1			; 0xffffffff
__LX120:				; __L120:
	popn	%r0
	ret
