
;  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	"clipcom.$(%d)\000"
	.code
	.align	1
	.global	com_open
com_open:
;	.frame	%sp,72,$31		# vars= 44, regs= 5/0, args= 8, extra= 0
;	.mask	0x800f0000,-4
;	.fmask	0x00000000,0
	pushn	%r3
	sub	%sp,0xd		; 	xsub	%sp,%sp,52
	ld.w	[%sp+0x3],%r12	; 	xld.w	[%sp+12],%r12
	ld.w	[%sp+0x4],%r13	; 	xld.w	[%sp+16],%r13
	ld.w	[%sp+0x5],%r14	; 	xld.w	[%sp+20],%r14
	ld.w	[%sp+0x6],%r15	; 	xld.w	[%sp+24],%r15
	ld.w	%r0,[%sp+0x12]	; 	xld.w	%r0,[%sp+72]
	ld.w	%r1,[%sp+0x14]	; 	xld.w	%r1,[%sp+80]
	ld.w	%r2,[%sp+0x15]	; 	xld.w	%r2,[%sp+84]
	ext	com_close@rm	; 	xcall	com_close
	call	com_close@rl
	ext	com+0x0@h	; 	xld.w	%r3,com
	ext	com+0x0@m
	ld.w	%r3,com+0x0@l
	ld.w	%r12,%r3
	ld.w	%r13,0x0
	ext	0x0		; 	xld.w	%r14,0x00000030		; 48
	ld.w	%r14,0x30
	ext	memset@rm	; 	xcall	memset
	call	memset@rl
	ld.w	%r4,0x1		; 	xld.w	%r4,0x00000001		; 1
	ld.w	[%r3],%r4	; 	xld.w	[%r3],%r4
	ext	0x4		; 	xld.w	[%r3+4],%r1
	ld.w	[%r3],%r1
	ext	0x8		; 	xld.w	[%r3+8],%r2
	ld.w	[%r3],%r2
	ext	0x10		; 	xadd	%r1,%r3,16
	add	%r1,%r3
	ld.w	[%r1],%r0	; 	xld.w	[%r1],%r0
	cmp	%r0,0x0
	jrne	__LX71		; 	xjrne	__L71
	ext	0x2		; 	xld.w	%r10,0x00000080		; 128
	ld.w	%r10,0x0
	ld.w	[%r1],%r10	; 	xld.w	[%r1],%r10
__LX71:				; __L71:
	ld.w	%r12,0x1	; 	xld.w	%r12,0x00000001		; 1
	ld.w	%r13,[%r1]	; 	xld.w	%r13,[%r1]
	ext	calloc@rm	; 	xcall	calloc
	call	calloc@rl
	ext	0x1c		; 	xld.w	[%r3+28],%r10
	ld.w	[%r3],%r10
	ext	0x10		; 	xadd	%r13,%r1,16
	add	%r13,%r1
	ld.w	%r5,[%sp+0x13]	; 	xld.w	%r5,[%sp+76]
	ld.w	[%r13],%r5	; 	xld.w	[%r13],%r5
	cmp	%r5,0x0
	jrne	__LX72		; 	xjrne	__L72
	ext	0x2		; 	xld.w	%r10,0x00000080		; 128
	ld.w	%r10,0x0
	ld.w	[%r13],%r10	; 	xld.w	[%r13],%r10
__LX72:				; __L72:
	ld.w	%r12,0x1	; 	xld.w	%r12,0x00000001		; 1
	ld.w	%r13,[%r13]	; 	xld.w	%r13,[%r13]
	ext	calloc@rm	; 	xcall	calloc
	call	calloc@rl
	ext	0x1c		; 	xld.w	[%r1+28],%r10
	ld.w	[%r1],%r10
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262865]
	ext	0x2d1
	ld.ub	%r10,[%r8]
	;.set	novolatile
	ext	0x2		; 	xand	%r10,%r10,0x00000080
	and	%r10,0x0
	ext	0x5b		; 	xld.w	%r4,0x02dc6c00		; 48000000
	ext	0x11b0
	ld.w	%r4,0x0
	ld.w	[%sp+0x7],%r4	; 	xld.w	[%sp+28],%r4
	cmp	%r10,0x0
	jreq	__LX73		; 	xjreq	__L73
	ext	0x2d		; 	xld.w	%r5,0x016e3600		; 24000000
	ext	0x18d8
	ld.w	%r5,0x0
	ld.w	[%sp+0x7],%r5	; 	xld.w	[%sp+28],%r5
__LX73:				; __L73:
	ld.w	%r4,0x0
	ld.w	[%sp+0x9],%r4	; 	xld.w	[%sp+36],%r4
	ld.w	%r5,[%sp+0x9]	; 	xld.w	%r5,[%sp+36]
	ld.w	[%sp+0x8],%r5	; 	xld.w	[%sp+32],%r5
	ld.w	%r4,[%sp+0x9]	; 	xld.w	%r4,[%sp+36]
	ld.w	[%sp+0xa],%r4	; 	xld.w	[%sp+40],%r4
	ld.w	%r5,[%sp+0x9]	; 	xld.w	%r5,[%sp+36]
	ld.w	[%sp+0xb],%r5	; 	xld.w	[%sp+44],%r5
	ld.w	%r3,0x3f	; 	xld.w	%r3,-1			; 0xffffffff
__LX78:				; __L78:
	ext	0x1		; 	xadd	%r11,%r3,1
	add	%r11,%r3
	ld.w	%r10,0x2	; 	xld.w	%r10,0x00000002		; 2
	ld.w	%r1,0x0
	ld.w	%r9,%r11	; 	xsll	%r10,%r11
	and	%r9,0x1f
	cmp	%r9,0x8
	jrle	4
	sll	%r10,0x8
	jp.d	-3
	sub	%r9,0x8
	sll	%r10,%r9
	ld.w	[%sp+0xc],%r10	; 	xld.w	[%sp+48],%r10
__LX82:				; __L82:
	ld.w	%r10,0x10	; 	xld.w	%r10,0x00000010		; 16
	ld.w	%r0,%r10
	ld.w	%r9,%r1		; 	xsra	%r0,%r1
	and	%r9,0x1f
	cmp	%r9,0x8
	jrle	4
	sra	%r0,0x8
	jp.d	-3
	sub	%r9,0x8
	sra	%r0,%r9
	ld.w	%r4,[%sp+0x3]	; 	xld.w	%r4,[%sp+12]
	ld.w	%r5,[%sp+0xc]	; 	xld.w	%r5,[%sp+48]
	mlt.w	%r4,%r5
	ld.w	%r11,%alr
	ld.w	%r12,[%sp+0x7]	; 	xld.w	%r12,[%sp+28]
	mlt.w	%r11,%r0
	ld.w	%r13,%alr
	ext	__divsi3@rm	; 	xcall	__divsi3
	call	__divsi3@rl
	ext	0x1		; 	xsub	%r2,%r10,1
	sub	%r2,%r10
	ext	0x3		; 	xcmp	%r2,255
	cmp	%r2,0x3f
	jrugt	__LX81		; 	xjrugt	__L81
	ld.w	%r4,[%sp+0xc]	; 	xld.w	%r4,[%sp+48]
	mlt.w	%r10,%r4
	ld.w	%r11,%alr
	ld.w	%r12,[%sp+0x7]	; 	xld.w	%r12,[%sp+28]
	mlt.w	%r11,%r0
	ld.w	%r13,%alr
	ext	__divsi3@rm	; 	xcall	__divsi3
	call	__divsi3@rl
	ld.w	%r12,[%sp+0x3]	; 	xld.w	%r12,[%sp+12]
	sub	%r12,%r10
	jrge	__LX85		; 	xjrge	__L85
	not	%r12,%r12
	add	%r12,1
__LX85:				; __L85:
	ld.w	%r11,[%sp+0x3]	; 	xld.w	%r11,[%sp+12]
	ld.w	%r4,[%sp+0xb]	; 	xld.w	%r4,[%sp+44]
	sub	%r11,%r4
	jrge	__LX86		; 	xjrge	__L86
	not	%r11,%r11
	add	%r11,1
__LX86:				; __L86:
	cmp	%r12,%r11
	jrge	__LX81		; 	xjrge	__L81
	ld.w	[%sp+0x8],%r3	; 	xld.w	[%sp+32],%r3
	ld.w	[%sp+0x9],%r1	; 	xld.w	[%sp+36],%r1
	ld.w	[%sp+0xa],%r2	; 	xld.w	[%sp+40],%r2
	ld.w	[%sp+0xb],%r10	; 	xld.w	[%sp+44],%r10
__LX81:				; __L81:
	add	%r1,0x1		; 	xadd	%r1,%r1,1
	cmp	%r1,0x1		; 	xcmp	%r1,1
	jrle	__LX82		; 	xjrle	__L82
	add	%r3,0x1		; 	xadd	%r3,%r3,1
	cmp	%r3,0x7		; 	xcmp	%r3,7
	jrle	__LX78		; 	xjrle	__L78
	ld.w	%r5,[%sp+0xb]	; 	xld.w	%r5,[%sp+44]
	cmp	%r5,0x0
	jrne	__LX89		; 	xjrne	__L89
	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,0x00000088		; 136
	ld.w	%r10,0x8
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX89:				; __L89:
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262632]
	ext	0x1e8
	ld.ub	%r10,[%r8]
	;.set	novolatile
	ext	0x1		; 	xld.w	%r11,0x0000007f		; 127
	ld.w	%r11,0x3f
	and	%r10,%r11
	;.set	volatile
	ext	0x20		; 	xld.b	[262632],%r10
	ext	0x1e8
	ld.b	[%r8],%r10
	;.set	novolatile
	ext	0x20		; 	xbclr	[262632],0x6
	ext	0x1e8
	bclr	[%r8],0x6
	ld.w	%r4,0x0
	;.set	volatile
	ext	0x20		; 	xld.b	[262508],%r4
	ext	0x16c
	ld.b	[%r8],%r4
	;.set	novolatile
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262478]
	ext	0x14e
	ld.ub	%r10,[%r8]
	;.set	novolatile
	and	%r10,%r11
	;.set	volatile
	ext	0x20		; 	xld.b	[262478],%r10
	ext	0x14e
	ld.b	[%r8],%r10
	;.set	novolatile
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262879]
	ext	0x2df
	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	[262879],%r10
	ext	0x2df
	ld.b	[%r8],%r10
	;.set	novolatile
	ext	0x20		; 	xbset	[262864],0x4
	ext	0x2d0
	bset	[%r8],0x4
	ext	0x20		; 	xbclr	[262879],0x5
	ext	0x2df
	bclr	[%r8],0x5
	ext	0x20		; 	xbset	[262864],0x5
	ext	0x2d0
	bset	[%r8],0x5
	ext	0x20		; 	xbclr	[262879],0x0
	ext	0x2df
	bclr	[%r8],0x0
	ext	0x20		; 	xbclr	[262868],0x2
	ext	0x2d4
	bclr	[%r8],0x2
	ext	0x20		; 	xbset	[262870],0x2
	ext	0x2d6
	bset	[%r8],0x2
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262868]
	ext	0x2d4
	ld.ub	%r10,[%r8]
	;.set	novolatile
	and	%r10,%r11
	;.set	volatile
	ext	0x20		; 	xld.b	[262868],%r10
	ext	0x2d4
	ld.b	[%r8],%r10
	;.set	novolatile
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262870]
	ext	0x2d6
	ld.ub	%r10,[%r8]
	;.set	novolatile
	and	%r10,%r11
	;.set	volatile
	ext	0x20		; 	xld.b	[262870],%r10
	ext	0x2d6
	ld.b	[%r8],%r10
	;.set	novolatile
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262633]
	ext	0x1e9
	ld.ub	%r10,[%r8]
	;.set	novolatile
	ext	0x3		; 	xld.w	%r11,0x000000fc		; 252
	ld.w	%r11,0x3c
	and	%r10,%r11
	;.set	volatile
	ext	0x20		; 	xld.b	[262633],%r10
	ext	0x1e9
	ld.b	[%r8],%r10
	;.set	novolatile
	ld.w	%r5,[%sp+0x5]	; 	xld.w	%r5,[%sp+20]
	cmp	%r5,0x7		; 	xcmp	%r5,7
	jreq	__LX91		; 	xjreq	__L91
	cmp	%r5,0x8		; 	xcmp	%r5,8
	jreq	__LX92		; 	xjreq	__L92
	jp	__LX93		; 	xjp	__L93
__LX91:				; __L91:
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262632]
	ext	0x1e8
	ld.ub	%r10,[%r8]
	;.set	novolatile
	and	%r10,%r11
	or	%r10,0x2	; 	xoor	%r10,%r10,0x00000002
	;.set	volatile
	ext	0x20		; 	xld.b	[262632],%r10
	ext	0x1e8
	ld.b	[%r8],%r10
	;.set	novolatile
	jp	__LX90		; 	xjp	__L90
__LX92:				; __L92:
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262632]
	ext	0x1e8
	ld.ub	%r10,[%r8]
	;.set	novolatile
	or	%r10,0x3	; 	xoor	%r10,%r10,0x00000003
	;.set	volatile
	ext	0x20		; 	xld.b	[262632],%r10
	ext	0x1e8
	ld.b	[%r8],%r10
	;.set	novolatile
	jp	__LX90		; 	xjp	__L90
__LX93:				; __L93:
	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,0x000000a9		; 169
	ld.w	%r10,0x29
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX90:				; __L90:
	ld.w	%r4,[%sp+0x6]	; 	xld.w	%r4,[%sp+24]
	cmp	%r4,0x1		; 	xcmp	%r4,1
	jreq	__LX96		; 	xjreq	__L96
	cmp	%r4,0x2		; 	xcmp	%r4,2
	jreq	__LX97		; 	xjreq	__L97
	jp	__LX98		; 	xjp	__L98
__LX96:				; __L96:
	ext	0x20		; 	xbclr	[262632],0x3
	ext	0x1e8
	bclr	[%r8],0x3
	jp	__LX95		; 	xjp	__L95
__LX97:				; __L97:
	ext	0x20		; 	xbset	[262632],0x3
	ext	0x1e8
	bset	[%r8],0x3
	jp	__LX95		; 	xjp	__L95
__LX98:				; __L98:
	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,0x000000b0		; 176
	ld.w	%r10,0x30
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX95:				; __L95:
	ld.w	%r5,[%sp+0x4]	; 	xld.w	%r5,[%sp+16]
	cmp	%r5,0x1		; 	xcmp	%r5,1
	jreq	__LX102		; 	xjreq	__L102
	jrgt	__LX106		; 	xjrgt	__L106
	cmp	%r5,0x0
	jreq	__LX101		; 	xjreq	__L101
	jp	__LX104		; 	xjp	__L104
__LX106:				; __L106:
	ld.w	%r4,[%sp+0x4]	; 	xld.w	%r4,[%sp+16]
	cmp	%r4,0x2		; 	xcmp	%r4,2
	jreq	__LX103		; 	xjreq	__L103
	jp	__LX104		; 	xjp	__L104
__LX101:				; __L101:
	ext	0x20		; 	xbclr	[262632],0x5
	ext	0x1e8
	bclr	[%r8],0x5
	jp	__LX100		; 	xjp	__L100
__LX102:				; __L102:
	ext	0x20		; 	xbset	[262632],0x5
	ext	0x1e8
	bset	[%r8],0x5
	ext	0x20		; 	xbset	[262632],0x4
	ext	0x1e8
	bset	[%r8],0x4
	jp	__LX100		; 	xjp	__L100
__LX103:				; __L103:
	ext	0x20		; 	xbset	[262632],0x5
	ext	0x1e8
	bset	[%r8],0x5
	ext	0x20		; 	xbclr	[262632],0x4
	ext	0x1e8
	bclr	[%r8],0x4
	jp	__LX100		; 	xjp	__L100
__LX104:				; __L104:
	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,0x000000b8		; 184
	ld.w	%r10,0x38
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX100:				; __L100:
	ext	0x20		; 	xbclr	[262632],0x2
	ext	0x1e8
	bclr	[%r8],0x2
	ld.w	%r5,[%sp+0x8]	; 	xld.w	%r5,[%sp+32]
	cmp	%r5,0x0
	jrge	__LX107		; 	xjrge	__L107
	ext	0x20		; 	xbset	[262470],0x3
	ext	0x146
	bset	[%r8],0x3
	jp	__LX108		; 	xjp	__L108
__LX107:				; __L107:
	ext	0x20		; 	xbclr	[262470],0x3
	ext	0x146
	bclr	[%r8],0x3
	ld.w	%r11,[%sp+0x8]	; 	xld.w	%r11,[%sp+32]
	and	%r11,0x7	; 	xand	%r11,%r11,0x00000007
	sll	%r11,0x4	; 	xsll	%r11,4
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262478]
	ext	0x14e
	ld.ub	%r10,[%r8]
	;.set	novolatile
	ext	0x2		; 	xand	%r10,%r10,0x0000008f
	and	%r10,0xf
	or	%r10,%r11
	;.set	volatile
	ext	0x20		; 	xld.b	[262478],%r10
	ext	0x14e
	ld.b	[%r8],%r10
	;.set	novolatile
__LX108:				; __L108:
	ld.ub	%r4,[%sp+0x28]	; 	xld.ub	%r4,[%sp+40]
	;.set	volatile
	ext	0x20		; 	xld.b	[262509],%r4
	ext	0x16d
	ld.b	[%r8],%r4
	;.set	novolatile
	ld.w	%r11,[%sp+0x9]	; 	xld.w	%r11,[%sp+36]
	and	%r11,0x1	; 	xand	%r11,%r11,0x00000001
	sll	%r11,0x4	; 	xsll	%r11,4
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262633]
	ext	0x1e9
	ld.ub	%r10,[%r8]
	;.set	novolatile
	ext	0x3		; 	xand	%r10,%r10,0x000000ef
	and	%r10,0x2f
	or	%r10,%r11
	;.set	volatile
	ext	0x20		; 	xld.b	[262633],%r10
	ext	0x1e9
	ld.b	[%r8],%r10
	;.set	novolatile
	ext	com_isr+0x0@h	; 	xld.w	%r0,com_isr
	ext	com_isr+0x0@m
	ld.w	%r0,com_isr+0x0@l
	ext	0x0		; 	xld.w	%r12,0x0000003c		; 60
	ld.w	%r12,0x3c
	ld.w	%r13,%r0
	ext	pceVectorSetTrap@rm	; 	xcall	pceVectorSetTrap
	call	pceVectorSetTrap@rl
	ext	0x0		; 	xld.w	%r12,0x0000003d		; 61
	ld.w	%r12,0x3d
	ld.w	%r13,%r0
	ext	pceVectorSetTrap@rm	; 	xcall	pceVectorSetTrap
	call	pceVectorSetTrap@rl
	ext	0x0		; 	xld.w	%r12,0x0000003e		; 62
	ld.w	%r12,0x3e
	ld.w	%r13,%r0
	ext	pceVectorSetTrap@rm	; 	xcall	pceVectorSetTrap
	call	pceVectorSetTrap@rl
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262762]
	ext	0x26a
	ld.ub	%r10,[%r8]
	;.set	novolatile
	or	%r10,0x7	; 	xoor	%r10,%r10,0x00000007
	;.set	volatile
	ext	0x20		; 	xld.b	[262762],%r10
	ext	0x26a
	ld.b	[%r8],%r10
	;.set	novolatile
	ld.w	%r12,0x1	; 	xld.w	%r12,0x00000001		; 1
	ext	com_rts@rm	; 	xcall	com_rts
	call	com_rts@rl
	ext	com_reset@rm	; 	xcall	com_reset
	call	com_reset@rl
	ld.w	%r12,%sp	; 	xadd	%r12,%sp,8
	add	%r12,0x8
	ext	pceSyncEnterCriticalSection@rm	; 	xcall	pceSyncEnterCriticalSection
	call	pceSyncEnterCriticalSection@rl
	ext	0x20		; 	xbset	[262774],0x3
	ext	0x276
	bset	[%r8],0x3
	ext	0x20		; 	xbset	[262774],0x4
	ext	0x276
	bset	[%r8],0x4
	ext	0x20		; 	xbset	[262774],0x5
	ext	0x276
	bset	[%r8],0x5
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262478]
	ext	0x14e
	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	[262478],%r10
	ext	0x14e
	ld.b	[%r8],%r10
	;.set	novolatile
	ld.w	%r10,0x7	; 	xld.w	%r10,0x00000007		; 7
	;.set	volatile
	ext	0x20		; 	xld.b	[262508],%r10
	ext	0x16c
	ld.b	[%r8],%r10
	;.set	novolatile
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262632]
	ext	0x1e8
	ld.ub	%r10,[%r8]
	;.set	novolatile
	or	%r10,%r11
	;.set	volatile
	ext	0x20		; 	xld.b	[262632],%r10
	ext	0x1e8
	ld.b	[%r8],%r10
	;.set	novolatile
	ext	0x20		; 	xbset	[262632],0x6
	ext	0x1e8
	bset	[%r8],0x6
	ld.w	%r12,%sp	; 	xadd	%r12,%sp,8
	add	%r12,0x8
	ext	pceSyncLeaveCriticalSection@rm	; 	xcall	pceSyncLeaveCriticalSection
	call	pceSyncLeaveCriticalSection@rl
	add	%sp,0xd		; 	xadd	%sp,%sp,52
	popn	%r3
	ret
	.align	1
	.global	com_close
com_close:
;	.frame	%sp,16,$31		# vars= 4, regs= 3/0, args= 0, extra= 0
;	.mask	0x80030000,-4
;	.fmask	0x00000000,0
	pushn	%r1
	sub	%sp,0x1		; 	xsub	%sp,%sp,4
	ext	com+0x0@h	; 	xld.w	%r1,com
	ext	com+0x0@m
	ld.w	%r1,com+0x0@l
	ld.w	%r10,[%r1]	; 	xld.w	%r10,[%r1]
	cmp	%r10,0x0
	jreq	__LX113		; 	xjreq	__L113
	ld.w	%r12,%sp
	ext	pceSyncEnterCriticalSection@rm	; 	xcall	pceSyncEnterCriticalSection
	call	pceSyncEnterCriticalSection@rl
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262632]
	ext	0x1e8
	ld.ub	%r10,[%r8]
	;.set	novolatile
	ext	0x1		; 	xld.w	%r11,0x0000007f		; 127
	ld.w	%r11,0x3f
	and	%r10,%r11
	;.set	volatile
	ext	0x20		; 	xld.b	[262632],%r10
	ext	0x1e8
	ld.b	[%r8],%r10
	;.set	novolatile
	ext	0x20		; 	xbclr	[262632],0x6
	ext	0x1e8
	bclr	[%r8],0x6
	ld.w	%r15,0x0
	;.set	volatile
	ext	0x20		; 	xld.b	[262508],%r15
	ext	0x16c
	ld.b	[%r8],%r15
	;.set	novolatile
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262478]
	ext	0x14e
	ld.ub	%r10,[%r8]
	;.set	novolatile
	and	%r10,%r11
	;.set	volatile
	ext	0x20		; 	xld.b	[262478],%r10
	ext	0x14e
	ld.b	[%r8],%r10
	;.set	novolatile
	ext	0x20		; 	xbclr	[262774],0x3
	ext	0x276
	bclr	[%r8],0x3
	ext	0x20		; 	xbclr	[262774],0x4
	ext	0x276
	bclr	[%r8],0x4
	ext	0x20		; 	xbclr	[262774],0x5
	ext	0x276
	bclr	[%r8],0x5
	ld.w	%r12,%sp
	ext	pceSyncLeaveCriticalSection@rm	; 	xcall	pceSyncLeaveCriticalSection
	call	pceSyncLeaveCriticalSection@rl
	ext	0x1c		; 	xadd	%r0,%r1,28
	add	%r0,%r1
	ld.w	%r12,[%r0]	; 	xld.w	%r12,[%r0]
	ext	free@rm		; 	xcall	free
	call	free@rl
	ext	0x10		; 	xld.w	%r12,[%r0+16]
	ld.w	%r12,[%r0]
	ext	free@rm		; 	xcall	free
	call	free@rl
	ld.w	%r12,%r1
	ld.w	%r13,0x0
	ext	0x0		; 	xld.w	%r14,0x00000030		; 48
	ld.w	%r14,0x30
	ext	memset@rm	; 	xcall	memset
	call	memset@rl
__LX113:				; __L113:
	add	%sp,0x1		; 	xadd	%sp,%sp,4
	popn	%r1
	ret
; APP
	
	.code
	.align 1
com_isr:
	pushn %r15
	ld.w %r0, %alr
	ld.w %r1, %ahr
	pushn %r1
	call _com_isr
	popn %r1
	ld.w %ahr, %r1
	ld.w %alr, %r0
	popn %r15
	reti

; NO_APP
	.align	1
_com_isr:
;	.frame	%sp,4,$31		# vars= 0, regs= 1/0, args= 0, extra= 0
;	.mask	0x80000000,-4
;	.fmask	0x00000000,0
	ld.w	%r4,0x0
	;.set	volatile
	ext	0x20		; 	xld.b	[262790],%r4
	ext	0x286
	ld.b	[%r8],%r4
	;.set	novolatile
	ext	0x20		; 	xbtst	[262631],0x0
	ext	0x1e7
	btst	[%r8],0x0
	jreq	__LX120		; 	xjreq	__L120
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262630]
	ext	0x1e6
	ld.ub	%r10,[%r8]
	;.set	novolatile
	ld.ub	%r14,%r10
	ext	com+0x18@h	; 	xld.w	%r11,com+24
	ext	com+0x18@m
	ld.w	%r11,com+0x18@l
	ext	0x8		; 	xsub	%r10,%r11,8
	sub	%r10,%r11
	ld.w	%r12,[%r11]	; 	xld.w	%r12,[%r11]
	ld.w	%r13,[%r10]	; 	xld.w	%r13,[%r10]
	cmp	%r12,%r13
	jrge	__LX121		; 	xjrge	__L121
	ext	0x4		; 	xsub	%r10,%r11,4
	sub	%r10,%r11
	ld.w	%r10,[%r10]	; 	xld.w	%r10,[%r10]
	add	%r10,%r12
	ld.w	%r12,%r10
	cmp	%r12,%r13
	jrlt	__LX122		; 	xjrlt	__L122
	sub	%r12,%r13
__LX122:				; __L122:
	ext	com+0x1c@ah	; 	xld.w	%r10,[com+28]
	ext	com+0x1c@al
	ld.w	%r10,[%r8]
	add	%r10,%r12
	ld.b	[%r10],%r14	; 	xld.b	[%r10],%r14
	ld.w	%r10,[%r11]	; 	xld.w	%r10,[%r11]
	add	%r10,0x1	; 	xadd	%r10,%r10,1
	jp	__LX130		; 	xjp	__L130
__LX121:				; __L121:
	sub	%r11,0xc	; 	xsub	%r11,%r11,12
	ld.w	%r10,0x1	; 	xld.w	%r10,0x00000001		; 1
__LX130:				; __L130:
	ld.w	[%r11],%r10	; 	xld.w	[%r11],%r10
	ext	com+0x4@ah	; 	xld.w	%r10,[com+4]
	ext	com+0x4@al
	ld.w	%r10,[%r8]
	cmp	%r10,0x0
	jreq	__LX120		; 	xjreq	__L120
	call	%r10
__LX120:				; __L120:
	ext	0x20		; 	xbtst	[262631],0x1
	ext	0x1e7
	btst	[%r8],0x1
	jreq	__LX125		; 	xjreq	__L125
	ext	com+0x28@h	; 	xld.w	%r13,com+40
	ext	com+0x28@m
	ld.w	%r13,com+0x28@l
	ld.w	%r15,[%r13]	; 	xld.w	%r15,[%r13]
	cmp	%r15,0x0
	jreq	__LX126		; 	xjreq	__L126
	ext	com+0x2c@ah	; 	xld.w	%r10,[com+44]
	ext	com+0x2c@al
	ld.w	%r10,[%r8]
	ext	com+0x24@ah	; 	xld.w	%r11,[com+36]
	ext	com+0x24@al
	ld.w	%r11,[%r8]
	add	%r10,%r11
	ld.ub	%r14,[%r10]	; 	xld.ub	%r14,[%r10]
	;.set	volatile
	ext	0x20		; 	xld.b	[262629],%r14
	ext	0x1e5
	ld.b	[%r8],%r14
	;.set	novolatile
	ext	0x4		; 	xsub	%r12,%r13,4
	sub	%r12,%r13
	ld.w	%r10,[%r12]	; 	xld.w	%r10,[%r12]
	add	%r10,0x1	; 	xadd	%r10,%r10,1
	ld.w	[%r12],%r10	; 	xld.w	[%r12],%r10
	ext	0x8		; 	xsub	%r11,%r13,8
	sub	%r11,%r13
	ld.w	%r11,[%r11]	; 	xld.w	%r11,[%r11]
	cmp	%r10,%r11
	jrne	__LX127		; 	xjrne	__L127
	ld.w	%r4,0x0
	ld.w	[%r12],%r4	; 	xld.w	[%r12],%r4
__LX127:				; __L127:
	ext	0x1		; 	xsub	%r10,%r15,1
	sub	%r10,%r15
	ld.w	[%r13],%r10	; 	xld.w	[%r13],%r10
	jp	__LX125		; 	xjp	__L125
__LX126:				; __L126:
	ext	0x20		; 	xsub	%r10,%r13,32
	sub	%r10,%r13
	ld.w	%r10,[%r10]	; 	xld.w	%r10,[%r10]
	cmp	%r10,0x0
	jreq	__LX125		; 	xjreq	__L125
	call	%r10
__LX125:				; __L125:
	ret
	.align	1
	.global	com_recv
com_recv:
;	.frame	%sp,32,$31		# vars= 4, regs= 5/0, args= 8, extra= 0
;	.mask	0x800f0000,-4
;	.fmask	0x00000000,0
	pushn	%r3
	sub	%sp,0x3		; 	xsub	%sp,%sp,12
	ld.w	%r3,%r13
	ld.w	%r1,%r12
	ld.w	%r0,0x3f	; 	xld.w	%r0,-1			; 0xffffffff
	ext	com+0x0@h	; 	xld.w	%r2,com
	ext	com+0x0@m
	ld.w	%r2,com+0x0@l
	ld.w	%r10,[%r2]	; 	xld.w	%r10,[%r2]
	cmp	%r10,0x0
	jrne	__LX132		; 	xjrne	__L132
	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	0x5		; 	xld.w	%r10,0x0000015f		; 351
	ld.w	%r10,0x1f
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX132:				; __L132:
	ld.w	%r12,%sp	; 	xadd	%r12,%sp,8
	add	%r12,0x8
	ext	pceSyncEnterCriticalSection@rm	; 	xcall	pceSyncEnterCriticalSection
	call	pceSyncEnterCriticalSection@rl
	ext	0xc		; 	xld.w	%r10,[%r2+12]
	ld.w	%r10,[%r2]
	cmp	%r10,0x0
	jrne	__LX136		; 	xjrne	__L136
	ext	0x20		; 	xbtst	[262631],0x2
	ext	0x1e7
	btst	[%r8],0x2
	jrne	__LX136		; 	xjrne	__L136
	ext	0x20		; 	xbtst	[262631],0x3
	ext	0x1e7
	btst	[%r8],0x3
	jrne	__LX136		; 	xjrne	__L136
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262631]
	ext	0x1e7
	ld.ub	%r10,[%r8]
	;.set	novolatile
	and	%r10,0x10	; 	xand	%r10,%r10,0x00000010
	jrne	__LX136		; 	xjrne	__L136
	ext	0x18		; 	xld.w	%r0,[%r2+24]
	ld.w	%r0,[%r2]
	cmp	%r0,%r3
	jrle	__LX137		; 	xjrle	__L137
	ld.w	%r0,%r3
__LX137:				; __L137:
	ld.w	%r12,%r10
	cmp	%r12,%r0
	jrge	__LX139		; 	xjrge	__L139
	ext	0x14		; 	xadd	%r13,%r2,20
	add	%r13,%r2
	ext	0x10		; 	xadd	%r14,%r2,16
	add	%r14,%r2
__LX141:				; __L141:
	ext	com+0x1c@ah	; 	xld.w	%r10,[com+28]
	ext	com+0x1c@al
	ld.w	%r10,[%r8]
	ext	com+0x14@ah	; 	xld.w	%r11,[com+20]
	ext	com+0x14@al
	ld.w	%r11,[%r8]
	add	%r10,%r11
	ld.ub	%r10,[%r10]	; 	xld.ub	%r10,[%r10]
	ld.b	[%r1],%r10	; 	xld.b	[%r1],%r10
	add	%r1,0x1		; 	xadd	%r1,%r1,1
	ld.w	%r11,[%r13]	; 	xld.w	%r11,[%r13]
	add	%r11,0x1	; 	xadd	%r11,%r11,1
	ld.w	[%r13],%r11	; 	xld.w	[%r13],%r11
	ld.w	%r10,[%r14]	; 	xld.w	%r10,[%r14]
	cmp	%r11,%r10
	jrne	__LX140		; 	xjrne	__L140
	ld.w	%r15,0x0
	ld.w	[%r13],%r15	; 	xld.w	[%r13],%r15
__LX140:				; __L140:
	add	%r12,0x1	; 	xadd	%r12,%r12,1
	cmp	%r12,%r0
	jrlt	__LX141		; 	xjrlt	__L141
__LX139:				; __L139:
	ext	com+0x18@h	; 	xld.w	%r11,com+24
	ext	com+0x18@m
	ld.w	%r11,com+0x18@l
	ld.w	%r10,[%r11]	; 	xld.w	%r10,[%r11]
	sub	%r10,%r0
	ld.w	[%r11],%r10	; 	xld.w	[%r11],%r10
__LX136:				; __L136:
	ld.w	%r12,%sp	; 	xadd	%r12,%sp,8
	add	%r12,0x8
	ext	pceSyncLeaveCriticalSection@rm	; 	xcall	pceSyncLeaveCriticalSection
	call	pceSyncLeaveCriticalSection@rl
	ld.w	%r10,%r0
	add	%sp,0x3		; 	xadd	%sp,%sp,12
	popn	%r3
	ret
	.align	1
	.global	com_send
com_send:
;	.frame	%sp,32,$31		# vars= 4, regs= 5/0, args= 8, extra= 0
;	.mask	0x800f0000,-4
;	.fmask	0x00000000,0
	pushn	%r3
	sub	%sp,0x3		; 	xsub	%sp,%sp,12
	ld.w	%r3,%r13
	ld.w	%r1,%r12
	ext	com+0x0@h	; 	xld.w	%r2,com
	ext	com+0x0@m
	ld.w	%r2,com+0x0@l
	ld.w	%r10,[%r2]	; 	xld.w	%r10,[%r2]
	cmp	%r10,0x0
	jrne	__LX146		; 	xjrne	__L146
	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	0x6		; 	xld.w	%r10,0x000001ac		; 428
	ld.w	%r10,0x2c
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX146:				; __L146:
	cmp	%r3,0x0
	jrge	__LX147		; 	xjrge	__L147
	ld.w	%r12,%r1
	ext	strlen@rm	; 	xcall	strlen
	call	strlen@rl
	ld.w	%r3,%r10
__LX147:				; __L147:
	ld.w	%r0,%r3
	cmp	%r3,0x0
	jreq	__LX149		; 	xjreq	__L149
	add	%r2,0x28	; 	xadd	%r2,%r2,40
__LX150:				; __L150:
	ld.w	%r12,%sp	; 	xadd	%r12,%sp,8
	add	%r12,0x8
	ext	pceSyncEnterCriticalSection@rm	; 	xcall	pceSyncEnterCriticalSection
	call	pceSyncEnterCriticalSection@rl
	ld.w	%r11,[%r2]	; 	xld.w	%r11,[%r2]
	ext	com+0x20@ah	; 	xld.w	%r12,[com+32]
	ext	com+0x20@al
	ld.w	%r12,[%r8]
	cmp	%r11,%r12
	jrge	__LX154		; 	xjrge	__L154
	ext	0x4		; 	xsub	%r10,%r2,4
	sub	%r10,%r2
	ld.w	%r10,[%r10]	; 	xld.w	%r10,[%r10]
	add	%r10,%r11
	ld.w	%r11,%r10
	cmp	%r11,%r12
	jrlt	__LX155		; 	xjrlt	__L155
	sub	%r11,%r12
__LX155:				; __L155:
	ext	com+0x2c@ah	; 	xld.w	%r10,[com+44]
	ext	com+0x2c@al
	ld.w	%r10,[%r8]
	add	%r10,%r11
	ld.ub	%r11,[%r1]	; 	xld.ub	%r11,[%r1]
	ld.b	[%r10],%r11	; 	xld.b	[%r10],%r11
	add	%r1,0x1		; 	xadd	%r1,%r1,1
	ld.w	%r10,[%r2]	; 	xld.w	%r10,[%r2]
	add	%r10,0x1	; 	xadd	%r10,%r10,1
	ld.w	[%r2],%r10	; 	xld.w	[%r2],%r10
	sub	%r0,0x1		; 	xsub	%r0,%r0,1
__LX154:				; __L154:
	ext	_com_isr@rm	; 	xcall	_com_isr
	call	_com_isr@rl
	ld.w	%r12,%sp	; 	xadd	%r12,%sp,8
	add	%r12,0x8
	ext	pceSyncLeaveCriticalSection@rm	; 	xcall	pceSyncLeaveCriticalSection
	call	pceSyncLeaveCriticalSection@rl
	cmp	%r0,0x0
	jrne	__LX150		; 	xjrne	__L150
__LX149:				; __L149:
	ld.w	%r10,%r3
	add	%sp,0x3		; 	xadd	%sp,%sp,12
	popn	%r3
	ret
	.align	1
	.global	com_reset
com_reset:
;	.frame	%sp,20,$31		# vars= 4, regs= 2/0, args= 8, extra= 0
;	.mask	0x80010000,-4
;	.fmask	0x00000000,0
	pushn	%r0
	sub	%sp,0x3		; 	xsub	%sp,%sp,12
	ext	com+0x0@h	; 	xld.w	%r0,com
	ext	com+0x0@m
	ld.w	%r0,com+0x0@l
	ld.w	%r10,[%r0]	; 	xld.w	%r10,[%r0]
	cmp	%r10,0x0
	jrne	__LX159		; 	xjrne	__L159
	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,0x000001db		; 475
	ld.w	%r10,0x1b
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX159:				; __L159:
	ld.w	%r12,%sp	; 	xadd	%r12,%sp,8
	add	%r12,0x8
	ext	pceSyncEnterCriticalSection@rm	; 	xcall	pceSyncEnterCriticalSection
	call	pceSyncEnterCriticalSection@rl
	ext	0xc		; 	xadd	%r10,%r0,12
	add	%r10,%r0
	ld.w	%r11,0x0
	ld.w	[%r10],%r11	; 	xld.w	[%r10],%r11
	ext	0x14		; 	xld.w	[%r0+20],%r11
	ld.w	[%r0],%r11
	ext	0x18		; 	xld.w	[%r0+24],%r11
	ld.w	[%r0],%r11
	ext	0x18		; 	xld.w	[%r10+24],%r11
	ld.w	[%r10],%r11
	ext	0x1c		; 	xld.w	[%r10+28],%r11
	ld.w	[%r10],%r11
	ext	0x20		; 	xbclr	[262631],0x2
	ext	0x1e7
	bclr	[%r8],0x2
	ext	0x20		; 	xbclr	[262631],0x3
	ext	0x1e7
	bclr	[%r8],0x3
	ext	0x20		; 	xbclr	[262631],0x4
	ext	0x1e7
	bclr	[%r8],0x4
	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	%r0
	ret
	.align	1
	.global	com_rts
com_rts:
;	.frame	%sp,20,$31		# vars= 4, regs= 2/0, args= 8, extra= 0
;	.mask	0x80010000,-4
;	.fmask	0x00000000,0
	pushn	%r0
	sub	%sp,0x3		; 	xsub	%sp,%sp,12
	ld.w	%r0,%r12
	ext	com+0x0@ah	; 	xld.w	%r10,[com]
	ext	com+0x0@al
	ld.w	%r10,[%r8]
	cmp	%r10,0x0
	jrne	__LX165		; 	xjrne	__L165
	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,0x000001f0		; 496
	ld.w	%r10,0x30
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX165:				; __L165:
	ld.w	%r10,0x0
	cmp	%r0,0x0
	jrne	__LX166		; 	xjrne	__L166
	ld.w	%r10,0x1	; 	xld.w	%r10,0x00000001		; 1
__LX166:				; __L166:
	ld.w	%r0,%r10
	ld.w	%r12,%sp	; 	xadd	%r12,%sp,8
	add	%r12,0x8
	ext	pceSyncEnterCriticalSection@rm	; 	xcall	pceSyncEnterCriticalSection
	call	pceSyncEnterCriticalSection@rl
	ld.w	%r11,%r0
	sll	%r11,0x2	; 	xsll	%r11,2
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262869]
	ext	0x2d5
	ld.ub	%r10,[%r8]
	;.set	novolatile
	ext	0x3		; 	xand	%r10,%r10,0x000000fb
	and	%r10,0x3b
	or	%r10,%r11
	;.set	volatile
	ext	0x20		; 	xld.b	[262869],%r10
	ext	0x2d5
	ld.b	[%r8],%r10
	;.set	novolatile
	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	%r0
	ret
	.align	1
	.global	com_cts
com_cts:
;	.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
	ext	com+0x0@ah	; 	xld.w	%r10,[com]
	ext	com+0x0@al
	ld.w	%r10,[%r8]
	cmp	%r10,0x0
	jrne	__LX172		; 	xjrne	__L172
	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	0x8		; 	xld.w	%r10,0x00000203		; 515
	ld.w	%r10,0x3
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX172:				; __L172:
	;.set	volatile
	ext	0x20		; 	xld.ub	%r10,[262869]
	ext	0x2d5
	ld.ub	%r10,[%r8]
	;.set	novolatile
	ld.ub	%r10,%r10
	srl	%r10,0x4	; 	xsrl	%r10,4
	and	%r10,0x1	; 	xand	%r10,%r10,0x00000001
	ld.w	%r11,0x0
	jrne	__LX173		; 	xjrne	__L173
	ld.w	%r11,0x1	; 	xld.w	%r11,0x00000001		; 1
__LX173:				; __L173:
	ld.w	%r10,%r11
	add	%sp,0x2		; 	xadd	%sp,%sp,8
	ret

	.lcomm	com 48
