
;  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:
	.data
	.align	2
mode:
	.word	1
	.code
	.align	1
crctable_entry:
;	.frame	%sp,4,$31		# vars= 0, regs= 1/0, args= 0, extra= 0
;	.mask	0x80000000,-4
;	.fmask	0x00000000,0
	ld.w	%r11,0x8	; 	xld.w	%r11,0x00000008		; 8
	ext	0x1db7		; 	xld.w	%r13,-306674912			; 0xedb88320
	ext	0x20c
	ld.w	%r13,0x20
__LX71:				; __L71:
	ld.w	%r10,%r12
	and	%r10,0x1	; 	xand	%r10,%r10,0x00000001
	jreq	__LX74		; 	xjreq	__L74
	ld.w	%r10,%r12
	srl	%r10,0x1	; 	xsrl	%r10,1
	ld.w	%r12,%r10
	xor	%r12,%r13
	jp	__LX73		; 	xjp	__L73
__LX74:				; __L74:
	srl	%r12,0x1	; 	xsrl	%r12,1
__LX73:				; __L73:
	sub	%r11,0x1	; 	xsub	%r11,%r11,1
	jrne	__LX71		; 	xjrne	__L71
	ld.w	%r10,%r12
	ret
	.code
	.align	2
__LC0:
	.ascii	"clipir.$(%d)\000"
	.code
	.align	1
	.global	ir_mode
ir_mode:
;	.frame	%sp,16,$31		# vars= 0, regs= 2/0, args= 8, extra= 0
;	.mask	0x80010000,-4
;	.fmask	0x00000000,0
	pushn	%r0
	sub	%sp,0x2		; 	xsub	%sp,%sp,8
	ld.w	%r0,%r12
	call	ir_stat		; 	xcall	ir_stat
	cmp	%r10,0x0
	jreq	__LX78		; 	xjreq	__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	0x1		; 	xld.w	%r10,0x0000006c		; 108
	ld.w	%r10,0x2c
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX78:				; __L78:
	ext	mode+0x0@ah	; 	xld.w	[mode],%r0
	ext	mode+0x0@al
	ld.w	[%r8],%r0
	add	%sp,0x2		; 	xadd	%sp,%sp,8
	popn	%r0
	ret
	.align	1
	.global	ir_stop
ir_stop:
;	.frame	%sp,8,$31		# vars= 4, regs= 1/0, args= 0, extra= 0
;	.mask	0x80000000,-4
;	.fmask	0x00000000,0
	sub	%sp,0x1		; 	xsub	%sp,%sp,4
	ld.w	%r12,%sp
	ext	pceSyncEnterCriticalSection@rm	; 	xcall	pceSyncEnterCriticalSection
	call	pceSyncEnterCriticalSection@rl
	ext	_ir+0x0@h	; 	xld.w	%r12,_ir
	ext	_ir+0x0@m
	ld.w	%r12,_ir+0x0@l
	ld.w	%r13,0x0
	ext	0x0		; 	xld.w	%r14,0x00000020		; 32
	ld.w	%r14,0x20
	ext	memset@rm	; 	xcall	memset
	call	memset@rl
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262874]
	ext	0x2da
	ld.ub	%r10,[%r8]
	;.set	novolatile
	ext	0x2		; 	xld.w	%r11,0x00000080		; 128
	ld.w	%r11,0x0
	or	%r10,%r11
	;.set	volatile
	ext	0x20		; 	xld.b	[262874],%r10
	ext	0x2da
	ld.b	[%r8],%r10
	;.set	novolatile
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262873]
	ext	0x2d9
	ld.ub	%r10,[%r8]
	;.set	novolatile
	or	%r10,%r11
	;.set	volatile
	ext	0x20		; 	xld.b	[262873],%r10
	ext	0x2d9
	ld.b	[%r8],%r10
	;.set	novolatile
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262872]
	ext	0x2d8
	ld.ub	%r10,[%r8]
	;.set	novolatile
	ext	0x1		; 	xld.w	%r12,0x0000007f		; 127
	ld.w	%r12,0x3f
	and	%r10,%r12
	;.set	volatile
	ext	0x20		; 	xld.b	[262872],%r10
	ext	0x2d8
	ld.b	[%r8],%r10
	;.set	novolatile
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262876]
	ext	0x2dc
	ld.ub	%r10,[%r8]
	;.set	novolatile
	ext	0x3		; 	xld.w	%r11,0x000000ef		; 239
	ld.w	%r11,0x2f
	and	%r10,%r11
	;.set	volatile
	ext	0x20		; 	xld.b	[262876],%r10
	ext	0x2dc
	ld.b	[%r8],%r10
	;.set	novolatile
	ext	0x20		; 	xbset	[262878],0x4
	ext	0x2de
	bset	[%r8],0x4
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262877]
	ext	0x2dd
	ld.ub	%r10,[%r8]
	;.set	novolatile
	and	%r10,%r11
	;.set	volatile
	ext	0x20		; 	xld.b	[262877],%r10
	ext	0x2dd
	ld.b	[%r8],%r10
	;.set	novolatile
	ext	0x20		; 	xbclr	[262476],0x3
	ext	0x14c
	bclr	[%r8],0x3
	ld.w	%r15,0x0
	;.set	volatile
	ext	0x24		; 	xld.b	[295342],%r15
	ext	0x1ae
	ld.b	[%r8],%r15
	;.set	novolatile
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262772]
	ext	0x274
	ld.ub	%r10,[%r8]
	;.set	novolatile
	and	%r10,%r12
	;.set	volatile
	ext	0x20		; 	xld.b	[262772],%r10
	ext	0x274
	ld.b	[%r8],%r10
	;.set	novolatile
	ext	0x20		; 	xbclr	[262768],0x2
	ext	0x270
	bclr	[%r8],0x2
	ld.w	%r12,%sp
	ext	pceSyncLeaveCriticalSection@rm	; 	xcall	pceSyncLeaveCriticalSection
	call	pceSyncLeaveCriticalSection@rl
	add	%sp,0x1		; 	xadd	%sp,%sp,4
	ret
	.align	1
	.global	ir_stat
ir_stat:
;	.frame	%sp,4,$31		# vars= 0, regs= 1/0, args= 0, extra= 0
;	.mask	0x80000000,-4
;	.fmask	0x00000000,0
	ext	_ir+0x0@ah	; 	xld.w	%r10,[_ir]
	ext	_ir+0x0@al
	ld.w	%r10,[%r8]
	ret
	.align	1
	.global	ir_send
ir_send:
;	.frame	%sp,28,$31		# vars= 4, regs= 4/0, args= 8, extra= 0
;	.mask	0x80070000,-4
;	.fmask	0x00000000,0
	pushn	%r2
	sub	%sp,0x3		; 	xsub	%sp,%sp,12
	ld.w	%r2,%r12
	ld.w	%r0,%r13
	ld.w	%r1,%r14
	cmp	%r0,0x0
	jrgt	__LX86		; 	xjrgt	__L86
	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	0x2		; 	xld.w	%r10,0x000000bf		; 191
	ld.w	%r10,0x3f
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX86:				; __L86:
	ld.w	%r12,%sp	; 	xadd	%r12,%sp,8
	add	%r12,0x8
	ext	pceSyncEnterCriticalSection@rm	; 	xcall	pceSyncEnterCriticalSection
	call	pceSyncEnterCriticalSection@rl
	call	ir_stop		; 	xcall	ir_stop
	ext	_ir+0x0@h	; 	xld.w	%r11,_ir
	ext	_ir+0x0@m
	ld.w	%r11,_ir+0x0@l
	ld.w	%r12,0x1	; 	xld.w	%r12,0x00000001		; 1
	ld.w	[%r11],%r12	; 	xld.w	[%r11],%r12
	ext	0x1c		; 	xld.w	[%r11+28],%r1
	ld.w	[%r11],%r1
	ext	0x4		; 	xld.w	[%r11+4],%r2
	ld.w	[%r11],%r2
	ext	0x8		; 	xld.w	[%r11+8],%r0
	ld.w	[%r11],%r0
	ld.w	%r10,0x3f	; 	xld.w	%r10,-1			; 0xffffffff
	ext	0xc		; 	xld.w	[%r11+12],%r10
	ld.w	[%r11],%r10
	ext	0x10		; 	xld.w	[%r11+16],%r12
	ld.w	[%r11],%r12
	ext	0x20		; 	xbclr	[262872],0x7
	ext	0x2d8
	bclr	[%r8],0x7
	ext	0x20		; 	xbtst	[262865],0x7
	ext	0x2d1
	btst	[%r8],0x7
	jreq	__LX90		; 	xjreq	__L90
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262476]
	ext	0x14c
	ld.ub	%r10,[%r8]
	;.set	novolatile
	ext	0x3		; 	xand	%r10,%r10,0x000000f8
	and	%r10,0x38
	jp	__LX93		; 	xjp	__L93
__LX90:				; __L90:
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262476]
	ext	0x14c
	ld.ub	%r10,[%r8]
	;.set	novolatile
	ext	0x3		; 	xand	%r10,%r10,0x000000f8
	and	%r10,0x38
	or	%r10,0x1	; 	xoor	%r10,%r10,0x00000001
__LX93:				; __L93:
	;.set	volatile
	ext	0x20		; 	xld.b	[262476],%r10
	ext	0x14c
	ld.b	[%r8],%r10
	;.set	novolatile
	ext	0x20		; 	xbset	[262476],0x3
	ext	0x14c
	bset	[%r8],0x3
	ext	0x4		; 	xld.w	%r10,0x0000013b		; 315
	ld.w	%r10,0x3b
	;.set	volatile
	ext	0x24		; 	xld.h	[295336],%r10
	ext	0x1a8
	ld.h	[%r8],%r10
	;.set	novolatile
	ext	0x9		; 	xld.w	%r10,0x00000278		; 632
	ld.w	%r10,0x38
	;.set	volatile
	ext	0x24		; 	xld.h	[295338],%r10
	ext	0x1aa
	ld.h	[%r8],%r10
	;.set	novolatile
	ld.w	%r10,0x7	; 	xld.w	%r10,0x00000007		; 7
	;.set	volatile
	ext	0x24		; 	xld.b	[295342],%r10
	ext	0x1ae
	ld.b	[%r8],%r10
	;.set	novolatile
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262760]
	ext	0x268
	ld.ub	%r10,[%r8]
	;.set	novolatile
	ext	0x1		; 	xoor	%r10,%r10,0x00000070
	or	%r10,0x30
	;.set	volatile
	ext	0x20		; 	xld.b	[262760],%r10
	ext	0x268
	ld.b	[%r8],%r10
	;.set	novolatile
	ext	0x20		; 	xbset	[262772],0x7
	ext	0x274
	bset	[%r8],0x7
	ext	0x0		; 	xld.w	%r12,0x00000033		; 51
	ld.w	%r12,0x33
	ext	irt_isr+0x0@h	; 	xld.w	%r13,irt_isr
	ext	irt_isr+0x0@m
	ld.w	%r13,irt_isr+0x0@l
	ext	pceVectorSetTrap@rm	; 	xcall	pceVectorSetTrap
	call	pceVectorSetTrap@rl
	ld.w	%r12,%sp	; 	xadd	%r12,%sp,8
	add	%r12,0x8
	ext	pceSyncLeaveCriticalSection@rm	; 	xcall	pceSyncLeaveCriticalSection
	call	pceSyncLeaveCriticalSection@rl
	add	%sp,0x3		; 	xadd	%sp,%sp,12
	popn	%r2
	ret
; APP
	
	.code
	.align	1
irt_isr:
	pushn	%r15
	ld.w	%r0, %alr
	ld.w	%r1, %ahr
	pushn	%r1
	call	_irt_isr
	popn	%r1
	ld.w	%ahr, %r1
	ld.w	%alr, %r0
	popn	%r15
	reti

; NO_APP
	.align	1
_irt_isr:
;	.frame	%sp,12,$31		# vars= 4, regs= 2/0, args= 0, extra= 0
;	.mask	0x80010000,-4
;	.fmask	0x00000000,0
	pushn	%r0
	sub	%sp,0x1		; 	xsub	%sp,%sp,4
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262788]
	ext	0x284
	ld.ub	%r10,[%r8]
	;.set	novolatile
	ext	0x1		; 	xld.w	%r12,0x0000007f		; 127
	ld.w	%r12,0x3f
	and	%r10,%r12
	;.set	volatile
	ext	0x20		; 	xld.b	[262788],%r10
	ext	0x284
	ld.b	[%r8],%r10
	;.set	novolatile
	ext	_ir+0x10@h	; 	xld.w	%r0,_ir+16
	ext	_ir+0x10@m
	ld.w	%r0,_ir+0x10@l
	ld.w	%r10,[%r0]	; 	xld.w	%r10,[%r0]
	sub	%r10,0x1	; 	xsub	%r10,%r10,1
	ld.w	[%r0],%r10	; 	xld.w	[%r0],%r10
	jrne	__LX95		; 	xjrne	__L95
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262872]
	ext	0x2d8
	ld.ub	%r10,[%r8]
	;.set	novolatile
	ext	0x2		; 	xld.w	%r11,0x00000080		; 128
	ld.w	%r11,0x0
	ext	0x2		; 	xand	%r10,%r10,0x00000080
	and	%r10,0x0
	jreq	__LX96		; 	xjreq	__L96
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262872]
	ext	0x2d8
	ld.ub	%r10,[%r8]
	;.set	novolatile
	and	%r10,%r12
	;.set	volatile
	ext	0x20		; 	xld.b	[262872],%r10
	ext	0x2d8
	ld.b	[%r8],%r10
	;.set	novolatile
	call	TxBit		; 	xcall	TxBit
	jp	__LX98		; 	xjp	__L98
__LX96:				; __L96:
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262872]
	ext	0x2d8
	ld.ub	%r10,[%r8]
	;.set	novolatile
	or	%r10,%r11
	;.set	volatile
	ext	0x20		; 	xld.b	[262872],%r10
	ext	0x2d8
	ld.b	[%r8],%r10
	;.set	novolatile
	ld.w	%r10,0xc	; 	xld.w	%r10,0x0000000c		; 12
__LX98:				; __L98:
	ld.w	[%r0],%r10	; 	xld.w	[%r0],%r10
__LX95:				; __L95:
	add	%sp,0x1		; 	xadd	%sp,%sp,4
	popn	%r0
	ret
	.align	1
TxBit:
;	.frame	%sp,8,$31		# vars= 0, regs= 2/0, args= 0, extra= 0
;	.mask	0x80010000,-4
;	.fmask	0x00000000,0
	pushn	%r0
	ext	_ir+0x14@h	; 	xld.w	%r10,_ir+20
	ext	_ir+0x14@m
	ld.w	%r10,_ir+0x14@l
	ld.w	%r11,[%r10]	; 	xld.w	%r11,[%r10]
	add	%r11,0x1	; 	xadd	%r11,%r11,1
	ld.w	[%r10],%r11	; 	xld.w	[%r10],%r11
	ext	0x8		; 	xsub	%r12,%r10,8
	sub	%r12,%r10
	ld.w	%r10,[%r12]	; 	xld.w	%r10,[%r12]
	cmp	%r10,0x0
	jrge	__LX100		; 	xjrge	__L100
	cmp	%r11,0xf	; 	xcmp	%r11,15
	jrgt	__LX101		; 	xjrgt	__L101
__LX112:				; __L112:
	ext	0x0		; 	xld.w	%r10,0x0000002c		; 44
	ld.w	%r10,0x2c
	jp	__LX110		; 	xjp	__L110
__LX101:				; __L101:
	ld.w	%r14,0x0
	ld.w	[%r12],%r14	; 	xld.w	[%r12],%r14
__LX100:				; __L100:
	ext	_ir+0x14@h	; 	xld.w	%r0,_ir+20
	ext	_ir+0x14@m
	ld.w	%r0,_ir+0x14@l
	ld.w	%r11,[%r0]	; 	xld.w	%r11,[%r0]
	cmp	%r11,0x3	; 	xcmp	%r11,3
	jrle	__LX102		; 	xjrle	__L102
	ext	0x8		; 	xsub	%r13,%r0,8
	sub	%r13,%r0
	ext	0xc		; 	xsub	%r10,%r0,12
	sub	%r10,%r0
	ld.w	%r12,[%r13]	; 	xld.w	%r12,[%r13]
	ld.w	%r10,[%r10]	; 	xld.w	%r10,[%r10]
	cmp	%r12,%r10
	jrge	__LX103		; 	xjrge	__L103
	add	%r12,0x1	; 	xadd	%r12,%r12,1
	ld.w	[%r13],%r12	; 	xld.w	[%r13],%r12
	ext	mode+0x0@ah	; 	xld.w	%r10,[mode]
	ext	mode+0x0@al
	ld.w	%r10,[%r8]
	cmp	%r10,0x0
	jreq	__LX104		; 	xjreq	__L104
	ext	crctable_entry@rm	; 	xcall	crctable_entry
	call	crctable_entry@rl
	ext	0x10		; 	xsub	%r12,%r0,16
	sub	%r12,%r0
	ld.w	%r13,[%r12]	; 	xld.w	%r13,[%r12]
	ext	0x1		; 	xadd	%r11,%r13,1
	add	%r11,%r13
	ld.w	[%r12],%r11	; 	xld.w	[%r12],%r11
	ld.ub	%r13,[%r13]	; 	xld.ub	%r13,[%r13]
	xor	%r13,%r10
	ld.w	%r10,%r13
	ld.ub	%r10,%r10
	jp	__LX111		; 	xjp	__L111
__LX104:				; __L104:
	ext	0x10		; 	xsub	%r11,%r0,16
	sub	%r11,%r0
	ld.w	%r12,[%r11]	; 	xld.w	%r12,[%r11]
	ext	0x1		; 	xadd	%r10,%r12,1
	add	%r10,%r12
	ld.w	[%r11],%r10	; 	xld.w	[%r11],%r10
	ld.ub	%r10,[%r12]	; 	xld.ub	%r10,[%r12]
__LX111:				; __L111:
	ext	0x4		; 	xld.w	[%r0+4],%r10
	ld.w	[%r0],%r10
	ld.w	%r14,0x0
	ext	_ir+0x14@ah	; 	xld.w	[_ir+20],%r14
	ext	_ir+0x14@al
	ld.w	[%r8],%r14
	jp	__LX102		; 	xjp	__L102
__LX103:				; __L103:
	ext	mode+0x0@ah	; 	xld.w	%r10,[mode]
	ext	mode+0x0@al
	ld.w	%r10,[%r8]
	cmp	%r10,0x0
	jreq	__LX108		; 	xjreq	__L108
	cmp	%r11,0xb	; 	xcmp	%r11,11
	jrle	__LX112		; 	xjrle	__L112
__LX108:				; __L108:
	ext	0x8		; 	xld.w	%r0,[%r0+8]
	ld.w	%r0,[%r0]
	ext	ir_stop@rm	; 	xcall	ir_stop
	call	ir_stop@rl
	cmp	%r0,0x0
	jreq	__LX109		; 	xjreq	__L109
	call	%r0
__LX109:				; __L109:
	ld.w	%r10,0x0
	jp	__LX110		; 	xjp	__L110
__LX102:				; __L102:
	ext	_ir+0x18@h	; 	xld.w	%r11,_ir+24
	ext	_ir+0x18@m
	ld.w	%r11,_ir+0x18@l
	ld.w	%r12,[%r11]	; 	xld.w	%r12,[%r11]
	ld.w	%r10,%r12
	and	%r10,0x3	; 	xand	%r10,%r10,0x00000003
	sll	%r10,0x3	; 	xsll	%r10,3
	sra	%r12,0x2	; 	xsra	%r12,2
	ld.w	[%r11],%r12	; 	xld.w	[%r11],%r12
	add	%r10,0xc	; 	xadd	%r10,%r10,12
__LX110:				; __L110:
	popn	%r0
	ret
	.align	1
	.global	ir_recv
ir_recv:
;	.frame	%sp,28,$31		# vars= 4, regs= 4/0, args= 8, extra= 0
;	.mask	0x80070000,-4
;	.fmask	0x00000000,0
	pushn	%r2
	sub	%sp,0x3		; 	xsub	%sp,%sp,12
	ld.w	%r2,%r12
	ld.w	%r0,%r13
	ld.w	%r1,%r14
	cmp	%r0,0x0
	jrgt	__LX114		; 	xjrgt	__L114
	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	0x7		; 	xld.w	%r10,0x000001e4		; 484
	ld.w	%r10,0x24
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX114:				; __L114:
	ld.w	%r12,%sp	; 	xadd	%r12,%sp,8
	add	%r12,0x8
	ext	pceSyncEnterCriticalSection@rm	; 	xcall	pceSyncEnterCriticalSection
	call	pceSyncEnterCriticalSection@rl
	ext	ir_stop@rm	; 	xcall	ir_stop
	call	ir_stop@rl
	ext	_ir+0x0@h	; 	xld.w	%r11,_ir
	ext	_ir+0x0@m
	ld.w	%r11,_ir+0x0@l
	ld.w	%r10,0x1	; 	xld.w	%r10,0x00000001		; 1
	ld.w	[%r11],%r10	; 	xld.w	[%r11],%r10
	ext	0x1c		; 	xld.w	[%r11+28],%r1
	ld.w	[%r11],%r1
	ext	0x4		; 	xld.w	[%r11+4],%r2
	ld.w	[%r11],%r2
	ext	0x8		; 	xld.w	[%r11+8],%r0
	ld.w	[%r11],%r0
	ld.w	%r10,0x3f	; 	xld.w	%r10,-1			; 0xffffffff
	ext	0xc		; 	xld.w	[%r11+12],%r10
	ld.w	[%r11],%r10
	ld.w	%r15,0x0
	ext	0x10		; 	xld.w	[%r11+16],%r15
	ld.w	[%r11],%r15
	ext	0x20		; 	xbset	[262877],0x4
	ext	0x2dd
	bset	[%r8],0x4
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262476]
	ext	0x14c
	ld.ub	%r10,[%r8]
	;.set	novolatile
	ext	0x3		; 	xand	%r10,%r10,0x000000f8
	and	%r10,0x38
	or	%r10,0x3	; 	xoor	%r10,%r10,0x00000003
	;.set	volatile
	ext	0x20		; 	xld.b	[262476],%r10
	ext	0x14c
	ld.b	[%r8],%r10
	;.set	novolatile
	ext	0x20		; 	xbset	[262476],0x3
	ext	0x14c
	bset	[%r8],0x3
	ext	0x3ff		; 	xld.w	%r10,0x0000ffff		; 65535
	ld.w	%r10,0x3f
	;.set	volatile
	ext	0x24		; 	xld.h	[295336],%r10
	ext	0x1a8
	ld.h	[%r8],%r10
	;.set	novolatile
	;.set	volatile
	ext	0x24		; 	xld.h	[295338],%r10
	ext	0x1aa
	ld.h	[%r8],%r10
	;.set	novolatile
	ld.w	%r10,0x3	; 	xld.w	%r10,0x00000003		; 3
	;.set	volatile
	ext	0x24		; 	xld.b	[295342],%r10
	ext	0x1ae
	ld.b	[%r8],%r10
	;.set	novolatile
	ext	0x20		; 	xbclr	[262848],0x2
	ext	0x2c0
	bclr	[%r8],0x2
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262854]
	ext	0x2c6
	ld.ub	%r10,[%r8]
	;.set	novolatile
	ext	0x3		; 	xand	%r10,%r10,0x000000cf
	and	%r10,0xf
	or	%r10,0x10	; 	xoor	%r10,%r10,0x00000010
	;.set	volatile
	ext	0x20		; 	xld.b	[262854],%r10
	ext	0x2c6
	ld.b	[%r8],%r10
	;.set	novolatile
	ext	0x20		; 	xbset	[262856],0x2
	ext	0x2c8
	bset	[%r8],0x2
	ext	0x20		; 	xbset	[262857],0x2
	ext	0x2c9
	bset	[%r8],0x2
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262753]
	ext	0x261
	ld.ub	%r10,[%r8]
	;.set	novolatile
	or	%r10,0x7	; 	xoor	%r10,%r10,0x00000007
	;.set	volatile
	ext	0x20		; 	xld.b	[262753],%r10
	ext	0x261
	ld.b	[%r8],%r10
	;.set	novolatile
	ext	0x20		; 	xbset	[262768],0x2
	ext	0x270
	bset	[%r8],0x2
	ld.w	%r12,0x12	; 	xld.w	%r12,0x00000012		; 18
	ext	irr_isr+0x0@h	; 	xld.w	%r13,irr_isr
	ext	irr_isr+0x0@m
	ld.w	%r13,irr_isr+0x0@l
	ext	pceVectorSetTrap@rm	; 	xcall	pceVectorSetTrap
	call	pceVectorSetTrap@rl
	ld.w	%r12,%sp	; 	xadd	%r12,%sp,8
	add	%r12,0x8
	ext	pceSyncLeaveCriticalSection@rm	; 	xcall	pceSyncLeaveCriticalSection
	call	pceSyncLeaveCriticalSection@rl
	add	%sp,0x3		; 	xadd	%sp,%sp,12
	popn	%r2
	ret
; APP
	
	.code
	.align	1
irr_isr:
	pushn	%r15
	ld.w	%r0, %alr
	ld.w	%r1, %ahr
	pushn	%r1
	call	_irr_isr
	popn	%r1
	ld.w	%ahr, %r1
	ld.w	%alr, %r0
	popn	%r15
	reti

; NO_APP
	.align	1
_irr_isr:
;	.frame	%sp,4,$31		# vars= 0, regs= 1/0, args= 0, extra= 0
;	.mask	0x80000000,-4
;	.fmask	0x00000000,0
	ext	0x20		; 	xbclr	[262784],0x2
	ext	0x280
	bclr	[%r8],0x2
	;.set	volatile
	ext	0x24		; 	xld.uh	%r10,[295340]
	ext	0x1ac
	ld.uh	%r10,[%r8]
	;.set	novolatile
	ld.uh	%r11,%r10
	ext	_ir+0x10@h	; 	xld.w	%r13,_ir+16
	ext	_ir+0x10@m
	ld.w	%r13,_ir+0x10@l
	ld.w	%r10,%r11
	ld.uh	%r14,[%r13]	; 	xld.uh	%r14,[%r13]
	sub	%r10,%r14
	ld.uh	%r12,%r10
	ext	0x20		; 	xbtst	[262865],0x7
	ext	0x2d1
	btst	[%r8],0x7
	jrne	__LX120		; 	xjrne	__L120
	sra	%r12,0x1	; 	xsra	%r12,1
__LX120:				; __L120:
	ld.w	[%r13],%r11	; 	xld.w	[%r13],%r11
	call	RxBit		; 	xcall	RxBit
	ret
	.align	1
RxBit:
;	.frame	%sp,8,$31		# vars= 0, regs= 2/0, args= 0, extra= 0
;	.mask	0x80010000,-4
;	.fmask	0x00000000,0
	pushn	%r0
	ext	0xc		; 	xsub	%r12,%r12,791
	sub	%r12,0x17
	ext	0x4		; 	xld.w	%r13,0x0000013c		; 316
	ld.w	%r13,0x3c
	ext	__udivsi3@rm	; 	xcall	__udivsi3
	call	__udivsi3@rl
	ld.w	%r13,%r10
	ld.w	%r12,%r13
	ext	_ir+0x18@h	; 	xld.w	%r0,_ir+24
	ext	_ir+0x18@m
	ld.w	%r0,_ir+0x18@l
	ld.w	%r10,[%r0]	; 	xld.w	%r10,[%r0]
	sra	%r10,0x2	; 	xsra	%r10,2
	ld.w	%r11,%r13
	and	%r11,0x3	; 	xand	%r11,%r11,0x00000003
	sll	%r11,0x6	; 	xsll	%r11,6
	ld.w	%r4,%r10
	or	%r4,%r11
	ld.w	[%r0],%r4	; 	xld.w	[%r0],%r4
	ext	0x4		; 	xsub	%r14,%r0,4
	sub	%r14,%r0
	ld.w	%r10,[%r14]	; 	xld.w	%r10,[%r14]
	add	%r10,0x1	; 	xadd	%r10,%r10,1
	ld.w	[%r14],%r10	; 	xld.w	[%r14],%r10
	ext	0xc		; 	xsub	%r15,%r0,12
	sub	%r15,%r0
	ld.w	%r11,[%r15]	; 	xld.w	%r11,[%r15]
	cmp	%r11,0x0
	jrge	__LX122		; 	xjrge	__L122
	cmp	%r13,0x4	; 	xcmp	%r13,4
	jreq	__LX121		; 	xjreq	__L121
	cmp	%r13,0x3	; 	xcmp	%r13,3
	jrugt	__LX124		; 	xjrugt	__L124
	cmp	%r10,0x7	; 	xcmp	%r10,7
	jrle	__LX124		; 	xjrle	__L124
	ld.w	%r5,0x0
	ld.w	[%r15],%r5	; 	xld.w	[%r15],%r5
	ld.w	%r10,0x1	; 	xld.w	%r10,0x00000001		; 1
	ld.w	[%r14],%r10	; 	xld.w	[%r14],%r10
	jp	__LX121		; 	xjp	__L121
__LX124:				; __L124:
	ld.w	%r5,0x0
	ext	_ir+0x14@ah	; 	xld.w	[_ir+20],%r5
	ext	_ir+0x14@al
	ld.w	[%r8],%r5
	jp	__LX121		; 	xjp	__L121
__LX122:				; __L122:
	cmp	%r12,0x3	; 	xcmp	%r12,3
	jrule	__LX126		; 	xjrule	__L126
	ext	0x4		; 	xld.w	%r0,[%r0+4]
	ld.w	%r0,[%r0]
	jp	__LX133		; 	xjp	__L133
__LX126:				; __L126:
	cmp	%r10,0x3	; 	xcmp	%r10,3
	jrle	__LX121		; 	xjrle	__L121
	ext	0x1		; 	xadd	%r12,%r11,1
	add	%r12,%r11
	ld.w	[%r15],%r12	; 	xld.w	[%r15],%r12
	ext	mode+0x0@ah	; 	xld.w	%r10,[mode]
	ext	mode+0x0@al
	ld.w	%r10,[%r8]
	cmp	%r10,0x0
	jreq	__LX129		; 	xjreq	__L129
	ext	crctable_entry@rm	; 	xcall	crctable_entry
	call	crctable_entry@rl
	ext	0x14		; 	xsub	%r12,%r0,20
	sub	%r12,%r0
	ld.w	%r13,[%r12]	; 	xld.w	%r13,[%r12]
	ext	0x1		; 	xadd	%r11,%r13,1
	add	%r11,%r13
	ld.w	[%r12],%r11	; 	xld.w	[%r12],%r11
	ld.ub	%r0,[%r0]	; 	xld.ub	%r0,[%r0]
	xor	%r0,%r10
	ld.w	%r10,%r0
	ld.b	[%r13],%r10	; 	xld.b	[%r13],%r10
	jp	__LX130		; 	xjp	__L130
__LX129:				; __L129:
	ext	0x14		; 	xsub	%r10,%r0,20
	sub	%r10,%r0
	ld.w	%r12,[%r10]	; 	xld.w	%r12,[%r10]
	ext	0x1		; 	xadd	%r11,%r12,1
	add	%r11,%r12
	ld.w	[%r10],%r11	; 	xld.w	[%r10],%r11
	ld.b	[%r12],%r4	; 	xld.b	[%r12],%r4
__LX130:				; __L130:
	ext	_ir+0x14@h	; 	xld.w	%r13,_ir+20
	ext	_ir+0x14@m
	ld.w	%r13,_ir+0x14@l
	ld.w	%r5,0x0
	ld.w	[%r13],%r5	; 	xld.w	[%r13],%r5
	ext	0x8		; 	xsub	%r10,%r13,8
	sub	%r10,%r13
	ext	0xc		; 	xsub	%r11,%r13,12
	sub	%r11,%r13
	ld.w	%r12,[%r10]	; 	xld.w	%r12,[%r10]
	ld.w	%r10,[%r11]	; 	xld.w	%r10,[%r11]
	cmp	%r12,%r10
	jrlt	__LX121		; 	xjrlt	__L121
	ext	0x8		; 	xld.w	%r0,[%r13+8]
	ld.w	%r0,[%r13]
__LX133:				; __L133:
	ext	ir_stop@rm	; 	xcall	ir_stop
	call	ir_stop@rl
	cmp	%r0,0x0
	jreq	__LX121		; 	xjreq	__L121
	call	%r0
__LX121:				; __L121:
	popn	%r0
	ret

	.lcomm	_ir 32
