
;  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	"cliptcp.$(%d)\000"
	.code
	.align	1
tcp_find_client:
;	.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	tcp_driver+0x18@h	; 	xld.w	%r4,tcp_driver+24
	ext	tcp_driver+0x18@m
	ld.w	%r4,tcp_driver+0x18@l
	ld.w	%r15,[%r4]	; 	xld.w	%r15,[%r4]
	cmp	%r15,%r4
	jreq	__LX72		; 	xjreq	__L72
__LX73:				; __L73:
	cmp	%r15,0x0
	jrne	__LX74		; 	xjrne	__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
	ext	0x1		; 	xld.w	%r10,0x00000040		; 64
	ld.w	%r10,0x0
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX74:				; __L74:
	ext	0x28		; 	xsub	%r11,%r15,40
	sub	%r11,%r15
	ld.w	%r10,[%r11]	; 	xld.w	%r10,[%r11]
	cmp	%r10,%r12
	jrne	__LX75		; 	xjrne	__L75
	ext	0x4		; 	xld.w	%r10,[%r11+4]
	ld.w	%r10,[%r11]
	cmp	%r10,%r13
	jrne	__LX75		; 	xjrne	__L75
	ext	0x8		; 	xld.w	%r10,[%r11+8]
	ld.w	%r10,[%r11]
	cmp	%r10,%r14
	jrne	__LX75		; 	xjrne	__L75
	ld.w	%r10,%r11
	jp	__LX77		; 	xjp	__L77
__LX75:				; __L75:
	ld.w	%r15,[%r15]	; 	xld.w	%r15,[%r15]
	cmp	%r15,%r4
	jrne	__LX73		; 	xjrne	__L73
__LX72:				; __L72:
	ld.w	%r10,0x0
__LX77:				; __L77:
	add	%sp,0x2		; 	xadd	%sp,%sp,8
	ret
	.align	1
tcp_allocate_ephemeral_port:
;	.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	tcp_driver+0x18@h	; 	xld.w	%r13,tcp_driver+24
	ext	tcp_driver+0x18@m
	ld.w	%r13,tcp_driver+0x18@l
	ld.w	%r11,[%r13]	; 	xld.w	%r11,[%r13]
	ext	0x300		; 	xld.w	%r12,0x0000c000		; 49152
	ld.w	%r12,0x0
	ext	__LC0+0x0@h	; 	xld.w	%r14,__LC0
	ext	__LC0+0x0@m
	ld.w	%r14,__LC0+0x0@l
	ext	0x1		; 	xld.w	%r15,0x00000067		; 103
	ld.w	%r15,0x27
__LX82:				; __L82:
	cmp	%r11,%r13
	jreq	__LX80		; 	xjreq	__L80
__LX85:				; __L85:
	cmp	%r11,0x0
	jrne	__LX86		; 	xjrne	__L86
	ld.w	[%sp+0x0],%r14	; 	xld.w	[%sp],%r14
	ld.w	[%sp+0x1],%r15	; 	xld.w	[%sp+4],%r15
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX86:				; __L86:
	ext	0x28		; 	xsub	%r10,%r11,40
	sub	%r10,%r11
	ld.w	%r10,[%r10]	; 	xld.w	%r10,[%r10]
	cmp	%r10,%r12
	jreq	__LX84		; 	xjreq	__L84
	ld.w	%r11,[%r11]	; 	xld.w	%r11,[%r11]
	cmp	%r11,%r13
	jrne	__LX85		; 	xjrne	__L85
__LX84:				; __L84:
	cmp	%r11,%r13
	jreq	__LX80		; 	xjreq	__L80
	add	%r12,0x1	; 	xadd	%r12,%r12,1
	ext	0x3ff		; 	xcmp	%r12,65535
	cmp	%r12,0x3f
	jrle	__LX82		; 	xjrle	__L82
__LX80:				; __L80:
	ext	0x3ff		; 	xcmp	%r12,65535
	cmp	%r12,0x3f
	jrle	__LX91		; 	xjrle	__L91
	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,0x00000075		; 117
	ld.w	%r10,0x35
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX91:				; __L91:
	ld.w	%r10,%r12
	add	%sp,0x2		; 	xadd	%sp,%sp,8
	ret
	.align	1
_tcp_send_segment:
;	.frame	%sp,40,$31		# vars= 12, regs= 5/0, args= 8, extra= 0
;	.mask	0x800f0000,-4
;	.fmask	0x00000000,0
	pushn	%r3
	sub	%sp,0x5		; 	xsub	%sp,%sp,20
	ld.w	%r2,%r12
	ld.w	%r3,%r13
	ld.w	%r12,%sp	; 	xadd	%r12,%sp,8
	add	%r12,0x8
	ext	ip_get_config@rm	; 	xcall	ip_get_config
	call	ip_get_config@rl
	ext	0x1c		; 	xld.w	%r10,[%r2+28]
	ld.w	%r10,[%r2]
	ext	0x14		; 	xadd	%r0,%r10,20
	add	%r0,%r10
	ld.w	%r12,%r0
	ext	malloc@rm	; 	xcall	malloc
	call	malloc@rl
	ld.w	%r1,%r10
	cmp	%r1,0x0
	jrne	__LX94		; 	xjrne	__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	0x2		; 	xld.w	%r10,0x0000008d		; 141
	ld.w	%r10,0xd
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX94:				; __L94:
	ld.w	[%sp+0x0],%r3	; 	xld.w	[%sp],%r3
	ld.w	%r12,%r2
	ld.w	%r13,%r1
	ld.w	%r14,%r0
	ld.w	%r15,[%sp+0x2]	; 	xld.w	%r15,[%sp+8]
	ext	pack_tcp_header@rm	; 	xcall	pack_tcp_header
	call	pack_tcp_header@rl
	ld.w	%r0,%r10
	cmp	%r0,0x0
	jrge	__LX95		; 	xjrge	__L95
	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,0x00000098		; 152
	ld.w	%r10,0x18
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX95:				; __L95:
	ext	tcp_driver+0x0@h	; 	xld.w	%r12,tcp_driver
	ext	tcp_driver+0x0@m
	ld.w	%r12,tcp_driver+0x0@l
	ld.w	%r13,%r3
	ld.w	%r14,%r1
	ld.w	%r15,%r0
	ext	ip_send@rm	; 	xcall	ip_send
	call	ip_send@rl
	ld.w	%r12,%r1
	ext	free@rm		; 	xcall	free
	call	free@rl
	add	%sp,0x5		; 	xadd	%sp,%sp,20
	popn	%r3
	ret
	.align	1
tcp_send_segment:
;	.frame	%sp,60,$31		# vars= 32, regs= 5/0, args= 8, extra= 0
;	.mask	0x800f0000,-4
;	.fmask	0x00000000,0
	pushn	%r3
	sub	%sp,0xa		; 	xsub	%sp,%sp,40
	ld.w	%r0,%r12
	ld.w	%r1,%r13
	ld.w	%r3,%r14
	ld.w	%r2,%r15
	ext	0x4		; 	xld.w	%r10,[%r0+4]
	ld.w	%r10,[%r0]
	cmp	%r10,0x0
	jreq	__LX98		; 	xjreq	__L98
	ext	0x8		; 	xld.w	%r10,[%r0+8]
	ld.w	%r10,[%r0]
	cmp	%r10,0x0
	jrne	__LX97		; 	xjrne	__L97
__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,0x000000ad		; 173
	ld.w	%r10,0x2d
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX97:				; __L97:
	cmp	%r2,0x0
	jreq	__LX99		; 	xjreq	__L99
	or	%r1,0x8		; 	xoor	%r1,%r1,0x00000008
__LX99:				; __L99:
	ld.w	%r12,%sp	; 	xadd	%r12,%sp,8
	add	%r12,0x8
	ld.w	%r13,0x0
	ext	0x0		; 	xld.w	%r14,0x00000020		; 32
	ld.w	%r14,0x20
	ext	memset@rm	; 	xcall	memset
	call	memset@rl
	ld.w	%r10,[%r0]	; 	xld.w	%r10,[%r0]
	ld.w	[%sp+0x2],%r10	; 	xld.w	[%sp+8],%r10
	ext	0x8		; 	xld.w	%r10,[%r0+8]
	ld.w	%r10,[%r0]
	ld.w	[%sp+0x3],%r10	; 	xld.w	[%sp+12],%r10
	ext	0x14		; 	xld.w	%r10,[%r0+20]
	ld.w	%r10,[%r0]
	ld.w	[%sp+0x4],%r10	; 	xld.w	[%sp+16],%r10
	ext	0x10		; 	xld.w	%r10,[%r0+16]
	ld.w	%r10,[%r0]
	ld.w	[%sp+0x5],%r10	; 	xld.w	[%sp+20],%r10
	ld.w	[%sp+0x6],%r1	; 	xld.w	[%sp+24],%r1
	ext	0x1c		; 	xld.w	%r12,[%r0+28]
	ld.w	%r12,[%r0]
	ext	buffer_space@rm	; 	xcall	buffer_space
	call	buffer_space@rl
	ld.w	[%sp+0x7],%r10	; 	xld.w	[%sp+28],%r10
	ld.w	[%sp+0x8],%r3	; 	xld.w	[%sp+32],%r3
	ld.w	[%sp+0x9],%r2	; 	xld.w	[%sp+36],%r2
	ld.w	%r12,%sp	; 	xadd	%r12,%sp,8
	add	%r12,0x8
	ext	0x4		; 	xld.w	%r13,[%r0+4]
	ld.w	%r13,[%r0]
	call	_tcp_send_segment	; 	xcall	_tcp_send_segment
	add	%sp,0xa		; 	xadd	%sp,%sp,40
	popn	%r3
	ret
	.align	1
tcp_reply_rst:
;	.frame	%sp,44,$31		# vars= 32, regs= 3/0, args= 0, extra= 0
;	.mask	0x80030000,-4
;	.fmask	0x00000000,0
	pushn	%r1
	sub	%sp,0x8		; 	xsub	%sp,%sp,32
	ld.w	%r0,%r12
	ld.w	%r1,%r13
	ld.w	%r12,%sp
	ld.w	%r13,0x0
	ext	0x0		; 	xld.w	%r14,0x00000020		; 32
	ld.w	%r14,0x20
	ext	memset@rm	; 	xcall	memset
	call	memset@rl
	ext	0x4		; 	xld.w	%r10,[%r0+4]
	ld.w	%r10,[%r0]
	ld.w	[%sp+0x0],%r10	; 	xld.w	[%sp],%r10
	ld.w	%r10,[%r0]	; 	xld.w	%r10,[%r0]
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	0x10		; 	xld.w	%r10,[%r0+16]
	ld.w	%r10,[%r0]
	and	%r10,0x10	; 	xand	%r10,%r10,0x00000010
	jreq	__LX101		; 	xjreq	__L101
	ext	0xc		; 	xld.w	%r10,[%r0+12]
	ld.w	%r10,[%r0]
	ld.w	[%sp+0x2],%r10	; 	xld.w	[%sp+8],%r10
__LX101:				; __L101:
	ld.w	%r10,0x4	; 	xld.w	%r10,0x00000004		; 4
	ld.w	[%sp+0x4],%r10	; 	xld.w	[%sp+16],%r10
	ld.w	%r12,%sp
	ld.w	%r13,%r1
	ext	_tcp_send_segment@rm	; 	xcall	_tcp_send_segment
	call	_tcp_send_segment@rl
	add	%sp,0x8		; 	xadd	%sp,%sp,32
	popn	%r1
	ret
	.align	1
tcp_init_state:
;	.frame	%sp,4,$31		# vars= 0, regs= 1/0, args= 0, extra= 0
;	.mask	0x80000000,-4
;	.fmask	0x00000000,0
	ext	0xc		; 	xld.w	[%r12+12],%r13
	ld.w	[%r12],%r13
	call	tcp_exec_state	; 	xcall	tcp_exec_state
	ret
	.align	1
tcp_exec_state:
;	.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	pceTimerGetCount@rm	; 	xcall	pceTimerGetCount
	call	pceTimerGetCount@rl
	ext	0x24		; 	xld.w	[%r0+36],%r10
	ld.w	[%r0],%r10
	ext	0xc		; 	xld.w	%r10,[%r0+12]
	ld.w	%r10,[%r0]
	cmp	%r10,0xa	; 	xcmp	%r10,10
	jrugt	__LX117		; 	xjrugt	__L117
	sll	%r10,0x2	; 	xsll	%r10,2
	ext	__L118+0x0@h	; 	xld.w	%r10,[%r10+__L118]
	ext	__L118+0x0@m
	ld.w	%r9,__L118+0x0@l
	add	%r9,%r10
	ld.w	%r10,[%r9]
	jp	%r10
	.code
	.align	2
__L118:
	.word	__L104
	.word	__L107
	.word	__L108
	.word	__L110
	.word	__L113
	.word	__L116
	.word	__L110
	.word	__L116
	.word	__L113
	.word	__L116
	.word	__L104
	.code
__L107:
	ld.w	%r12,%r0
	ld.w	%r13,0x2	; 	xld.w	%r13,0x00000002		; 2
	jp	__LX119		; 	xjp	__L119
__L108:
	ld.w	%r12,%r0
	ld.w	%r13,0x12	; 	xld.w	%r13,0x00000012		; 18
	jp	__LX119		; 	xjp	__L119
__L110:
	ext	0x20		; 	xld.w	%r12,[%r0+32]
	ld.w	%r12,[%r0]
	ld.w	%r13,%sp	; 	xadd	%r13,%sp,8
	add	%r13,0x8
	ext	peek_buffer@rm	; 	xcall	peek_buffer
	call	peek_buffer@rl
	ld.w	%r14,%r10
	ld.w	%r10,[%sp+0x2]	; 	xld.w	%r10,[%sp+8]
	ext	0x18		; 	xld.w	%r11,[%r0+24]
	ld.w	%r11,[%r0]
	cmp	%r10,%r11
	jrle	__LX111		; 	xjrle	__L111
	ld.w	[%sp+0x2],%r11	; 	xld.w	[%sp+8],%r11
__LX111:				; __L111:
	ld.w	%r12,%r0
	ld.w	%r13,0x10	; 	xld.w	%r13,0x00000010		; 16
	ld.w	%r15,[%sp+0x2]	; 	xld.w	%r15,[%sp+8]
	ext	tcp_send_segment@rm	; 	xcall	tcp_send_segment
	call	tcp_send_segment@rl
	jp	__L104		; 	xjp	__L104
__L113:
	ld.w	%r12,%r0
	ld.w	%r13,0x11	; 	xld.w	%r13,0x00000011		; 17
	jp	__LX119		; 	xjp	__L119
__L116:
	ld.w	%r12,%r0
	ld.w	%r13,0x10	; 	xld.w	%r13,0x00000010		; 16
__LX119:				; __L119:
	ld.w	%r14,0x0
	ld.w	%r15,%r14
	ext	tcp_send_segment@rm	; 	xcall	tcp_send_segment
	call	tcp_send_segment@rl
	jp	__L104		; 	xjp	__L104
__LX117:				; __L117:
	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	0x4		; 	xld.w	%r10,0x00000119		; 281
	ld.w	%r10,0x19
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__L104:
	add	%sp,0x3		; 	xadd	%sp,%sp,12
	popn	%r0
	ret
	.align	1
tcp_timer_callback:
;	.frame	%sp,24,$31		# vars= 0, regs= 4/0, args= 8, extra= 0
;	.mask	0x80070000,-4
;	.fmask	0x00000000,0
	pushn	%r2
	sub	%sp,0x2		; 	xsub	%sp,%sp,8
	ext	tcp_driver+0x18@h	; 	xld.w	%r1,tcp_driver+24
	ext	tcp_driver+0x18@m
	ld.w	%r1,tcp_driver+0x18@l
	ld.w	%r0,[%r1]	; 	xld.w	%r0,[%r1]
	ext	pceTimerGetCount@rm	; 	xcall	pceTimerGetCount
	call	pceTimerGetCount@rl
	ld.w	%r2,%r10
	cmp	%r0,%r1
	jreq	__LX122		; 	xjreq	__L122
__LX123:				; __L123:
	cmp	%r0,0x0
	jrne	__LX124		; 	xjrne	__L124
	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	0x4		; 	xld.w	%r10,0x00000128		; 296
	ld.w	%r10,0x28
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX124:				; __L124:
	ext	0x28		; 	xsub	%r12,%r0,40
	sub	%r12,%r0
	ext	0x24		; 	xld.w	%r10,[%r12+36]
	ld.w	%r10,[%r12]
	ld.w	%r11,%r2
	sub	%r11,%r10
	ld.w	%r10,%r11
	ext	0x1f		; 	xcmp	%r10,1999
	cmp	%r10,0xf
	jrle	__LX125		; 	xjrle	__L125
	call	tcp_exec_state	; 	xcall	tcp_exec_state
__LX125:				; __L125:
	ld.w	%r0,[%r0]	; 	xld.w	%r0,[%r0]
	cmp	%r0,%r1
	jrne	__LX123		; 	xjrne	__L123
__LX122:				; __L122:
	add	%sp,0x2		; 	xadd	%sp,%sp,8
	popn	%r2
	ret
	.align	1
tcp_recv_callback:
;	.frame	%sp,56,$31		# vars= 32, regs= 4/0, args= 8, extra= 0
;	.mask	0x80070000,-4
;	.fmask	0x00000000,0
	pushn	%r2
	sub	%sp,0xa		; 	xsub	%sp,%sp,40
	ld.w	%r2,%r13
	ld.w	[%sp+0x0],%r14	; 	xld.w	[%sp],%r14
	ld.w	%r12,%sp	; 	xadd	%r12,%sp,8
	add	%r12,0x8
	ld.w	%r13,%r15
	ld.w	%r14,[%sp+0xe]	; 	xld.w	%r14,[%sp+56]
	ld.w	%r15,%r2
	ext	unpack_tcp_header@rm	; 	xcall	unpack_tcp_header
	call	unpack_tcp_header@rl
	cmp	%r10,0x0
	ext	__L127@rm	; 	xjrlt	__L127
	jrlt	__L127@rl
	ld.w	%r12,[%sp+0x3]	; 	xld.w	%r12,[%sp+12]
	ld.w	%r13,%r2
	ld.w	%r14,[%sp+0x2]	; 	xld.w	%r14,[%sp+8]
	ext	tcp_find_client@rm	; 	xcall	tcp_find_client
	call	tcp_find_client@rl
	ld.w	%r0,%r10
	cmp	%r0,0x0
	jrne	__LX129		; 	xjrne	__L129
	ld.w	%r12,[%sp+0x3]	; 	xld.w	%r12,[%sp+12]
	ld.w	%r13,%r2
	ld.w	%r14,%r0
	ext	tcp_find_client@rm	; 	xcall	tcp_find_client
	call	tcp_find_client@rl
	ld.w	%r0,%r10
	cmp	%r0,0x0
	jrne	__LX129		; 	xjrne	__L129
	ld.w	%r12,[%sp+0x3]	; 	xld.w	%r12,[%sp+12]
	ld.w	%r13,%r0
	ld.w	%r14,[%sp+0x2]	; 	xld.w	%r14,[%sp+8]
	ext	tcp_find_client@rm	; 	xcall	tcp_find_client
	call	tcp_find_client@rl
	ld.w	%r0,%r10
	cmp	%r0,0x0
	jrne	__LX129		; 	xjrne	__L129
	ld.w	%r12,[%sp+0x3]	; 	xld.w	%r12,[%sp+12]
	ld.w	%r13,%r0
	ld.w	%r14,%r13
	ext	tcp_find_client@rm	; 	xcall	tcp_find_client
	call	tcp_find_client@rl
	ld.w	%r0,%r10
	cmp	%r0,0x0
	jrne	__LX129		; 	xjrne	__L129
	ld.w	%r12,%sp	; 	xadd	%r12,%sp,8
	add	%r12,0x8
	ld.w	%r13,%r2
	ext	tcp_reply_rst@rm	; 	xcall	tcp_reply_rst
	call	tcp_reply_rst@rl
	ext	__L127@rm	; 	xjp	__L127
	jp	__L127@rl
__LX129:				; __L129:
	ld.w	%r10,[%sp+0x6]	; 	xld.w	%r10,[%sp+24]
	ld.w	%r13,%r10
	and	%r13,0x4	; 	xand	%r13,%r13,0x00000004
	jreq	__LX133		; 	xjreq	__L133
	ext	0xc		; 	xld.w	%r10,[%r0+12]
	ld.w	%r10,[%r0]
	cmp	%r10,0x0
	ext	__L127@rm	; 	xjreq	__L127
	jreq	__L127@rl
	cmp	%r10,0xa	; 	xcmp	%r10,10
	ext	__L127@rm	; 	xjreq	__L127
	jreq	__L127@rl
	ext	__LX175@rm	; 	xjp	__L175
	jp	__LX175@rl
__LX133:				; __L133:
	and	%r10,0x10	; 	xand	%r10,%r10,0x00000010
	jreq	__LX135		; 	xjreq	__L135
	ld.w	%r11,[%sp+0x5]	; 	xld.w	%r11,[%sp+20]
	ext	0x14		; 	xld.w	%r10,[%r0+20]
	ld.w	%r10,[%r0]
	ld.w	%r1,%r11
	sub	%r1,%r10
	ext	0x20		; 	xld.w	%r12,[%r0+32]
	ld.w	%r12,[%r0]
	ext	0x4		; 	xld.w	%r10,[%r12+4]
	ld.w	%r10,[%r12]
	cmp	%r1,0x0
	jrlt	__LX136		; 	xjrlt	__L136
	cmp	%r1,%r10
	jrgt	__LX136		; 	xjrgt	__L136
	ld.w	%r14,%r1
	ext	read_buffer@rm	; 	xcall	read_buffer
	call	read_buffer@rl
	ext	0x14		; 	xld.w	%r10,[%r0+20]
	ld.w	%r10,[%r0]
	add	%r10,%r1
	ext	0x14		; 	xld.w	[%r0+20],%r10
	ld.w	[%r0],%r10
	ld.w	%r10,[%sp+0x7]	; 	xld.w	%r10,[%sp+28]
	ext	0x18		; 	xld.w	[%r0+24],%r10
	ld.w	[%r0],%r10
	jp	__LX135		; 	xjp	__L135
__LX136:				; __L136:
	ext	0xc		; 	xld.w	%r10,[%r0+12]
	ld.w	%r10,[%r0]
	cmp	%r10,0x1	; 	xcmp	%r10,1
	jrugt	__LX176		; 	xjrugt	__L176
	ld.w	%r12,%sp	; 	xadd	%r12,%sp,8
	add	%r12,0x8
	ld.w	%r13,%r2
	ext	tcp_reply_rst@rm	; 	xcall	tcp_reply_rst
	call	tcp_reply_rst@rl
	jp	__LX176		; 	xjp	__L176
__LX135:				; __L135:
	ext	0xc		; 	xld.w	%r10,[%r0+12]
	ld.w	%r10,[%r0]
	cmp	%r10,0x1	; 	xcmp	%r10,1
	jrule	__LX139		; 	xjrule	__L139
	cmp	%r10,0xa	; 	xcmp	%r10,10
	jreq	__LX139		; 	xjreq	__L139
	ld.w	%r11,[%sp+0x4]	; 	xld.w	%r11,[%sp+16]
	ext	0x10		; 	xld.w	%r10,[%r0+16]
	ld.w	%r10,[%r0]
	cmp	%r11,%r10
	jreq	__LX139		; 	xjreq	__L139
__LX176:				; __L176:
	ld.w	%r12,%r0
	ext	tcp_exec_state@rm	; 	xcall	tcp_exec_state
	call	tcp_exec_state@rl
	ext	__L127@rm	; 	xjp	__L127
	jp	__L127@rl
__LX139:				; __L139:
	ext	0xc		; 	xld.w	%r11,[%r0+12]
	ld.w	%r11,[%r0]
	ext	0x3		; 	xsub	%r10,%r11,3
	sub	%r10,%r11
	cmp	%r10,0x1	; 	xcmp	%r10,1
	jrule	__LX142		; 	xjrule	__L142
	cmp	%r11,0x5	; 	xcmp	%r11,5
	jrne	__LX141		; 	xjrne	__L141
__LX142:				; __L142:
	ld.w	%r10,[%sp+0x9]	; 	xld.w	%r10,[%sp+36]
	cmp	%r10,0x0
	jreq	__LX141		; 	xjreq	__L141
	ext	0x1c		; 	xld.w	%r12,[%r0+28]
	ld.w	%r12,[%r0]
	ext	buffer_space@rm	; 	xcall	buffer_space
	call	buffer_space@rl
	ld.w	%r14,[%sp+0x9]	; 	xld.w	%r14,[%sp+36]
	cmp	%r14,%r10
	jrgt	__LX141		; 	xjrgt	__L141
	ext	0x1c		; 	xld.w	%r12,[%r0+28]
	ld.w	%r12,[%r0]
	ld.w	%r13,[%sp+0x8]	; 	xld.w	%r13,[%sp+32]
	ext	write_buffer@rm	; 	xcall	write_buffer
	call	write_buffer@rl
	ext	0x10		; 	xld.w	%r10,[%r0+16]
	ld.w	%r10,[%r0]
	ld.w	%r11,[%sp+0x9]	; 	xld.w	%r11,[%sp+36]
	add	%r10,%r11
	ext	0x10		; 	xld.w	[%r0+16],%r10
	ld.w	[%r0],%r10
	ld.w	%r12,%r0
	ext	tcp_exec_state@rm	; 	xcall	tcp_exec_state
	call	tcp_exec_state@rl
__LX141:				; __L141:
	ext	0xc		; 	xld.w	%r10,[%r0+12]
	ld.w	%r10,[%r0]
	cmp	%r10,0xa	; 	xcmp	%r10,10
	ext	__LX173@rm	; 	xjrugt	__L173
	jrugt	__LX173@rl
	sll	%r10,0x2	; 	xsll	%r10,2
	ext	__L174+0x0@h	; 	xld.w	%r10,[%r10+__L174]
	ext	__L174+0x0@m
	ld.w	%r9,__L174+0x0@l
	add	%r9,%r10
	ld.w	%r10,[%r9]
	jp	%r10
	.code
	.align	2
__L174:
	.word	__L146
	.word	__L154
	.word	__L156
	.word	__L158
	.word	__L160
	.word	__L164
	.word	__L127
	.word	__L166
	.word	__L168
	.word	__L127
	.word	__L127
	.code
__L146:
	ld.w	%r10,[%sp+0x6]	; 	xld.w	%r10,[%sp+24]
	and	%r10,0x2	; 	xand	%r10,%r10,0x00000002
	ext	__L127@rm	; 	xjreq	__L127
	jreq	__L127@rl
	ext	0x4		; 	xld.w	%r10,[%r0+4]
	ld.w	%r10,[%r0]
	cmp	%r10,0x0
	jreq	__LX148		; 	xjreq	__L148
	cmp	%r10,%r2
	jreq	__LX150		; 	xjreq	__L150
	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,0x000001a5		; 421
	ld.w	%r10,0x25
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX148:				; __L148:
	ext	0x4		; 	xld.w	[%r0+4],%r2
	ld.w	[%r0],%r2
__LX150:				; __L150:
	ext	0x8		; 	xld.w	%r11,[%r0+8]
	ld.w	%r11,[%r0]
	cmp	%r11,0x0
	jreq	__LX151		; 	xjreq	__L151
	ld.w	%r10,[%sp+0x2]	; 	xld.w	%r10,[%sp+8]
	cmp	%r11,%r10
	jreq	__LX153		; 	xjreq	__L153
	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
__LX151:				; __L151:
	ld.w	%r10,[%sp+0x2]	; 	xld.w	%r10,[%sp+8]
	ext	0x8		; 	xld.w	[%r0+8],%r10
	ld.w	[%r0],%r10
__LX153:				; __L153:
	ld.w	%r10,[%sp+0x4]	; 	xld.w	%r10,[%sp+16]
	add	%r10,0x1	; 	xadd	%r10,%r10,1
	ext	0x10		; 	xld.w	[%r0+16],%r10
	ld.w	[%r0],%r10
	ld.w	%r10,[%sp+0x7]	; 	xld.w	%r10,[%sp+28]
	ext	0x18		; 	xld.w	[%r0+24],%r10
	ld.w	[%r0],%r10
	ld.w	%r12,%r0
	ld.w	%r13,0x2	; 	xld.w	%r13,0x00000002		; 2
	ext	tcp_init_state@rm	; 	xcall	tcp_init_state
	call	tcp_init_state@rl
	jp	__L127		; 	xjp	__L127
__L154:
	ld.w	%r10,[%sp+0x6]	; 	xld.w	%r10,[%sp+24]
	and	%r10,0x12	; 	xand	%r10,%r10,0x00000012
	cmp	%r10,0x12	; 	xcmp	%r10,18
	jrne	__L127		; 	xjrne	__L127
	ld.w	%r10,[%sp+0x4]	; 	xld.w	%r10,[%sp+16]
	add	%r10,0x1	; 	xadd	%r10,%r10,1
	ext	0x10		; 	xld.w	[%r0+16],%r10
	ld.w	[%r0],%r10
	ld.w	%r10,[%sp+0x7]	; 	xld.w	%r10,[%sp+28]
	ext	0x18		; 	xld.w	[%r0+24],%r10
	ld.w	[%r0],%r10
	jp	__LX177		; 	xjp	__L177
__L156:
	ld.w	%r10,[%sp+0x6]	; 	xld.w	%r10,[%sp+24]
	and	%r10,0x10	; 	xand	%r10,%r10,0x00000010
	jreq	__L127		; 	xjreq	__L127
__LX177:				; __L177:
	ld.w	%r12,%r0
	ld.w	%r13,0x3	; 	xld.w	%r13,0x00000003		; 3
	ext	tcp_init_state@rm	; 	xcall	tcp_init_state
	call	tcp_init_state@rl
	jp	__L127		; 	xjp	__L127
__L158:
	ld.w	%r10,[%sp+0x6]	; 	xld.w	%r10,[%sp+24]
	and	%r10,0x1	; 	xand	%r10,%r10,0x00000001
	jreq	__L127		; 	xjreq	__L127
	ld.w	%r10,[%sp+0x4]	; 	xld.w	%r10,[%sp+16]
	add	%r10,0x1	; 	xadd	%r10,%r10,1
	ext	0x10		; 	xld.w	[%r0+16],%r10
	ld.w	[%r0],%r10
	ld.w	%r12,%r0
	ld.w	%r13,0x6	; 	xld.w	%r13,0x00000006		; 6
	ext	tcp_init_state@rm	; 	xcall	tcp_init_state
	call	tcp_init_state@rl
	jp	__L127		; 	xjp	__L127
__L160:
	ld.w	%r11,[%sp+0x6]	; 	xld.w	%r11,[%sp+24]
	ld.w	%r10,%r11
	and	%r10,0x1	; 	xand	%r10,%r10,0x00000001
	jreq	__LX161		; 	xjreq	__L161
	ld.w	%r10,[%sp+0x4]	; 	xld.w	%r10,[%sp+16]
	add	%r10,0x1	; 	xadd	%r10,%r10,1
	ext	0x10		; 	xld.w	[%r0+16],%r10
	ld.w	[%r0],%r10
	ld.w	%r12,%r0
	ld.w	%r13,0x7	; 	xld.w	%r13,0x00000007		; 7
	ext	tcp_init_state@rm	; 	xcall	tcp_init_state
	call	tcp_init_state@rl
	jp	__L127		; 	xjp	__L127
__LX161:				; __L161:
	ld.w	%r10,%r11
	and	%r10,0x10	; 	xand	%r10,%r10,0x00000010
	jreq	__L127		; 	xjreq	__L127
	ld.w	%r12,%r0
	ld.w	%r13,0x5	; 	xld.w	%r13,0x00000005		; 5
	ext	tcp_init_state@rm	; 	xcall	tcp_init_state
	call	tcp_init_state@rl
	jp	__L127		; 	xjp	__L127
__L164:
	ld.w	%r10,[%sp+0x6]	; 	xld.w	%r10,[%sp+24]
	and	%r10,0x1	; 	xand	%r10,%r10,0x00000001
	jreq	__L127		; 	xjreq	__L127
	ld.w	%r10,[%sp+0x4]	; 	xld.w	%r10,[%sp+16]
	add	%r10,0x1	; 	xadd	%r10,%r10,1
	ext	0x10		; 	xld.w	[%r0+16],%r10
	ld.w	[%r0],%r10
	jp	__LX178		; 	xjp	__L178
__L166:
	ld.w	%r10,[%sp+0x6]	; 	xld.w	%r10,[%sp+24]
	and	%r10,0x10	; 	xand	%r10,%r10,0x00000010
	jreq	__L127		; 	xjreq	__L127
__LX178:				; __L178:
	ld.w	%r12,%r0
	ld.w	%r13,0x9	; 	xld.w	%r13,0x00000009		; 9
	ext	tcp_init_state@rm	; 	xcall	tcp_init_state
	call	tcp_init_state@rl
	jp	__L127		; 	xjp	__L127
__L168:
	ld.w	%r10,[%sp+0x6]	; 	xld.w	%r10,[%sp+24]
	and	%r10,0x10	; 	xand	%r10,%r10,0x00000010
	jreq	__L127		; 	xjreq	__L127
__LX175:				; __L175:
	ld.w	%r12,%r0
	ld.w	%r13,0xa	; 	xld.w	%r13,0x0000000a		; 10
	ext	tcp_init_state@rm	; 	xcall	tcp_init_state
	call	tcp_init_state@rl
	jp	__L127		; 	xjp	__L127
__LX173:				; __L173:
	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,0x00000205		; 517
	ld.w	%r10,0x5
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__L127:
	add	%sp,0xa		; 	xadd	%sp,%sp,40
	popn	%r2
	ret
	.align	1
	.global	tcp_start
tcp_start:
;	.frame	%sp,8,$31		# vars= 0, regs= 2/0, args= 0, extra= 0
;	.mask	0x80010000,-4
;	.fmask	0x00000000,0
	pushn	%r0
	call	tcp_stop	; 	xcall	tcp_stop
	ext	tcp_driver+0x0@h	; 	xld.w	%r0,tcp_driver
	ext	tcp_driver+0x0@m
	ld.w	%r0,tcp_driver+0x0@l
	ld.w	%r12,%r0
	ld.w	%r13,0x0
	ext	0x0		; 	xld.w	%r14,0x00000020		; 32
	ld.w	%r14,0x20
	ext	memset@rm	; 	xcall	memset
	call	memset@rl
	ext	0x18		; 	xadd	%r12,%r0,24
	add	%r12,%r0
	ext	InitializeListHead@rm	; 	xcall	InitializeListHead
	call	InitializeListHead@rl
	ld.w	%r10,0x6	; 	xld.w	%r10,0x00000006		; 6
	ld.w	[%r0],%r10	; 	xld.w	[%r0],%r10
	ext	tcp_recv_callback+0x0@h	; 	xld.w	%r10,tcp_recv_callback
	ext	tcp_recv_callback+0x0@m
	ld.w	%r10,tcp_recv_callback+0x0@l
	ext	0x4		; 	xld.w	[%r0+4],%r10
	ld.w	[%r0],%r10
	ld.w	%r12,%r0
	ext	ip_open@rm	; 	xcall	ip_open
	call	ip_open@rl
	ext	0xf		; 	xld.w	%r12,0x000003e8		; 1000
	ld.w	%r12,0x28
	ext	tcp_timer_callback+0x0@h	; 	xld.w	%r13,tcp_timer_callback
	ext	tcp_timer_callback+0x0@m
	ld.w	%r13,tcp_timer_callback+0x0@l
	ld.w	%r14,0x0
	ext	timer_start@rm	; 	xcall	timer_start
	call	timer_start@rl
	ext	0x14		; 	xld.w	[%r0+20],%r10
	ld.w	[%r0],%r10
	popn	%r0
	ret
	.align	1
	.global	tcp_stop
tcp_stop:
;	.frame	%sp,8,$31		# vars= 0, regs= 2/0, args= 0, extra= 0
;	.mask	0x80010000,-4
;	.fmask	0x00000000,0
	pushn	%r0
	ext	tcp_driver+0x18@h	; 	xld.w	%r0,tcp_driver+24
	ext	tcp_driver+0x18@m
	ld.w	%r0,tcp_driver+0x18@l
	ld.w	%r10,[%r0]	; 	xld.w	%r10,[%r0]
	cmp	%r10,0x0
	jreq	__LX180		; 	xjreq	__L180
	ext	0x4		; 	xsub	%r10,%r0,4
	sub	%r10,%r0
	ld.w	%r12,[%r10]	; 	xld.w	%r12,[%r10]
	ext	timer_stop@rm	; 	xcall	timer_stop
	call	timer_stop@rl
	sub	%r0,0x18	; 	xsub	%r0,%r0,24
	ld.w	%r12,%r0
	ext	ip_close@rm	; 	xcall	ip_close
	call	ip_close@rl
	ld.w	%r12,%r0
	ld.w	%r13,0x0
	ext	0x0		; 	xld.w	%r14,0x00000020		; 32
	ld.w	%r14,0x20
	ext	memset@rm	; 	xcall	memset
	call	memset@rl
__LX180:				; __L180:
	popn	%r0
	ret
	.align	1
	.global	tcp_open
tcp_open:
;	.frame	%sp,24,$31		# vars= 4, regs= 3/0, args= 8, extra= 0
;	.mask	0x80030000,-4
;	.fmask	0x00000000,0
	pushn	%r1
	sub	%sp,0x3		; 	xsub	%sp,%sp,12
	ld.w	%r0,%r12
	ld.w	%r1,%r13
	ld.w	%r12,%sp	; 	xadd	%r12,%sp,8
	add	%r12,0x8
	ext	pceSyncEnterCriticalSection@rm	; 	xcall	pceSyncEnterCriticalSection
	call	pceSyncEnterCriticalSection@rl
	ext	tcp_driver+0x18@h	; 	xld.w	%r12,tcp_driver+24
	ext	tcp_driver+0x18@m
	ld.w	%r12,tcp_driver+0x18@l
	ext	0x28		; 	xadd	%r13,%r0,40
	add	%r13,%r0
	ext	InsertTailList@rm	; 	xcall	InsertTailList
	call	InsertTailList@rl
	ld.w	%r10,[%r0]	; 	xld.w	%r10,[%r0]
	cmp	%r10,0x0
	jrne	__LX186		; 	xjrne	__L186
	ext	tcp_allocate_ephemeral_port@rm	; 	xcall	tcp_allocate_ephemeral_port
	call	tcp_allocate_ephemeral_port@rl
	ld.w	[%r0],%r10	; 	xld.w	[%r0],%r10
__LX186:				; __L186:
	ld.w	%r11,0x0
	ext	0x10		; 	xld.w	[%r0+16],%r11
	ld.w	[%r0],%r11
	ext	pceTimerGetCount@rm	; 	xcall	pceTimerGetCount
	call	pceTimerGetCount@rl
	ext	0x14		; 	xld.w	[%r0+20],%r10
	ld.w	[%r0],%r10
	ld.w	%r11,0x0
	ext	0x18		; 	xld.w	[%r0+24],%r11
	ld.w	[%r0],%r11
	ext	0x16		; 	xld.w	%r12,0x000005b4		; 1460
	ld.w	%r12,0x34
	ext	create_buffer@rm	; 	xcall	create_buffer
	call	create_buffer@rl
	ext	0x1c		; 	xld.w	[%r0+28],%r10
	ld.w	[%r0],%r10
	ext	0x8		; 	xld.w	%r12,0x00000218		; 536
	ld.w	%r12,0x18
	ext	create_buffer@rm	; 	xcall	create_buffer
	call	create_buffer@rl
	ext	0x20		; 	xld.w	[%r0+32],%r10
	ld.w	[%r0],%r10
	ld.w	%r13,0x1	; 	xld.w	%r13,0x00000001		; 1
	ext	0x4		; 	xld.w	[%r10+4],%r13
	ld.w	[%r10],%r13
	cmp	%r1,0x0
	jreq	__LX187		; 	xjreq	__L187
	ext	0x4		; 	xld.w	%r10,[%r0+4]
	ld.w	%r10,[%r0]
	cmp	%r10,0x0
	jreq	__LX189		; 	xjreq	__L189
	ext	0x8		; 	xld.w	%r10,[%r0+8]
	ld.w	%r10,[%r0]
	cmp	%r10,0x0
	jrne	__LX188		; 	xjrne	__L188
__LX189:				; __L189:
	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	0x9		; 	xld.w	%r10,0x00000252		; 594
	ld.w	%r10,0x12
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX188:				; __L188:
	ld.w	%r12,%r0
	jp	__LX192		; 	xjp	__L192
__LX187:				; __L187:
	ld.w	%r12,%r0
	ld.w	%r13,%r1
__LX192:				; __L192:
	ext	tcp_init_state@rm	; 	xcall	tcp_init_state
	call	tcp_init_state@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	%r1
	ret
	.align	1
	.global	tcp_close
tcp_close:
;	.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	%r0,%r12
	ld.w	%r1,%r13
	ext	pceTimerGetCount@rm	; 	xcall	pceTimerGetCount
	call	pceTimerGetCount@rl
	ld.w	%r2,%r10
	cmp	%r1,0x0
	jrge	__LX194		; 	xjrge	__L194
	ext	0xf		; 	xld.w	%r1,0x000003e8		; 1000
	ld.w	%r1,0x28
__LX194:				; __L194:
	ld.w	%r3,0x1		; 	xld.w	%r3,0x00000001		; 1
__LX195:				; __L195:
	ld.w	%r12,%sp	; 	xadd	%r12,%sp,8
	add	%r12,0x8
	ext	pceSyncEnterCriticalSection@rm	; 	xcall	pceSyncEnterCriticalSection
	call	pceSyncEnterCriticalSection@rl
	ext	0xc		; 	xld.w	%r10,[%r0+12]
	ld.w	%r10,[%r0]
	cmp	%r10,0x6	; 	xcmp	%r10,6
	jrugt	__L201		; 	xjrugt	__L201
	sll	%r10,0x2	; 	xsll	%r10,2
	ext	__L210+0x0@h	; 	xld.w	%r10,[%r10+__L210]
	ext	__L210+0x0@m
	ld.w	%r9,__L210+0x0@l
	add	%r9,%r10
	ld.w	%r10,[%r9]
	jp	%r10
	.code
	.align	2
__L210:
	.word	__L203
	.word	__L203
	.word	__L204
	.word	__L206
	.word	__L201
	.word	__L201
	.word	__L208
	.code
__L203:
	ld.w	%r12,%r0
	ld.w	%r13,0xa	; 	xld.w	%r13,0x0000000a		; 10
	jp	__LX216		; 	xjp	__L216
__L204:
	ext	0x20		; 	xld.w	%r10,[%r0+32]
	ld.w	%r10,[%r0]
	ext	0x4		; 	xld.w	%r10,[%r10+4]
	ld.w	%r10,[%r10]
	cmp	%r10,0x1	; 	xcmp	%r10,1
	jreq	__LX205		; 	xjreq	__L205
	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	0x9		; 	xld.w	%r10,0x0000027c		; 636
	ld.w	%r10,0x3c
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX205:				; __L205:
	ld.w	%r12,%r0
	ld.w	%r13,0x4	; 	xld.w	%r13,0x00000004		; 4
	jp	__LX216		; 	xjp	__L216
__L206:
	ext	0x20		; 	xld.w	%r11,[%r0+32]
	ld.w	%r11,[%r0]
	ext	0x4		; 	xld.w	%r10,[%r11+4]
	ld.w	%r10,[%r11]
	cmp	%r10,0x0
	jrne	__L201		; 	xjrne	__L201
	ext	0x4		; 	xld.w	[%r11+4],%r3
	ld.w	[%r11],%r3
	ld.w	%r12,%r0
	ld.w	%r13,0x4	; 	xld.w	%r13,0x00000004		; 4
	jp	__LX216		; 	xjp	__L216
__L208:
	ext	0x20		; 	xld.w	%r11,[%r0+32]
	ld.w	%r11,[%r0]
	ext	0x4		; 	xld.w	%r10,[%r11+4]
	ld.w	%r10,[%r11]
	cmp	%r10,0x0
	jrne	__L201		; 	xjrne	__L201
	ext	0x4		; 	xld.w	[%r11+4],%r3
	ld.w	[%r11],%r3
	ld.w	%r12,%r0
	ld.w	%r13,0x8	; 	xld.w	%r13,0x00000008		; 8
__LX216:				; __L216:
	ext	tcp_init_state@rm	; 	xcall	tcp_init_state
	call	tcp_init_state@rl
__L201:
	ext	0xc		; 	xld.w	%r10,[%r0+12]
	ld.w	%r10,[%r0]
	sub	%r10,0x9	; 	xsub	%r10,%r10,9
	cmp	%r10,0x1	; 	xcmp	%r10,1
	jrule	__LX213		; 	xjrule	__L213
	ext	pceTimerGetCount@rm	; 	xcall	pceTimerGetCount
	call	pceTimerGetCount@rl
	sub	%r10,%r2
	cmp	%r10,%r1
	jrult	__LX212		; 	xjrult	__L212
__LX213:				; __L213:
	ext	0x28		; 	xadd	%r12,%r0,40
	add	%r12,%r0
	ext	RemoveEntryList@rm	; 	xcall	RemoveEntryList
	call	RemoveEntryList@rl
	ext	0x1c		; 	xld.w	%r12,[%r0+28]
	ld.w	%r12,[%r0]
	ext	delete_buffer@rm	; 	xcall	delete_buffer
	call	delete_buffer@rl
	ext	0x20		; 	xld.w	%r12,[%r0+32]
	ld.w	%r12,[%r0]
	ext	delete_buffer@rm	; 	xcall	delete_buffer
	call	delete_buffer@rl
	ld.w	%r0,0x0
__LX212:				; __L212:
	ld.w	%r12,%sp	; 	xadd	%r12,%sp,8
	add	%r12,0x8
	ext	pceSyncLeaveCriticalSection@rm	; 	xcall	pceSyncLeaveCriticalSection
	call	pceSyncLeaveCriticalSection@rl
	cmp	%r0,0x0
	jrne	__LX195		; 	xjrne	__L195
	add	%sp,0x3		; 	xadd	%sp,%sp,12
	popn	%r3
	ret
	.align	1
	.global	tcp_recv
tcp_recv:
;	.frame	%sp,20,$31		# vars= 4, regs= 4/0, args= 0, extra= 0
;	.mask	0x80070000,-4
;	.fmask	0x00000000,0
	pushn	%r2
	sub	%sp,0x1		; 	xsub	%sp,%sp,4
	ld.w	%r2,%r12
	ld.w	%r0,%r13
	ld.w	%r1,%r14
	ld.w	%r12,%sp
	ext	pceSyncEnterCriticalSection@rm	; 	xcall	pceSyncEnterCriticalSection
	call	pceSyncEnterCriticalSection@rl
	ext	0x1c		; 	xld.w	%r12,[%r2+28]
	ld.w	%r12,[%r2]
	ld.w	%r13,%r0
	ld.w	%r14,%r1
	ext	read_buffer@rm	; 	xcall	read_buffer
	call	read_buffer@rl
	ld.w	%r0,%r10
	cmp	%r0,0x0
	jreq	__LX221		; 	xjreq	__L221
	ext	0x1c		; 	xld.w	%r10,[%r2+28]
	ld.w	%r10,[%r2]
	ext	0x4		; 	xld.w	%r10,[%r10+4]
	ld.w	%r10,[%r10]
	cmp	%r10,0x0
	jrne	__LX223		; 	xjrne	__L223
	ld.w	%r12,%r2
	ext	tcp_exec_state@rm	; 	xcall	tcp_exec_state
	call	tcp_exec_state@rl
	jp	__LX223		; 	xjp	__L223
__LX221:				; __L221:
	ext	0xc		; 	xld.w	%r12,[%r2+12]
	ld.w	%r12,[%r2]
	cmp	%r12,0x0
	jrlt	__LX230		; 	xjrlt	__L230
	cmp	%r12,0x2	; 	xcmp	%r12,2
	jrle	__LX223		; 	xjrle	__L223
	cmp	%r12,0x4	; 	xcmp	%r12,4
	jrle	__LX223		; 	xjrle	__L223
__LX230:				; __L230:
	ld.w	%r0,0x3f	; 	xld.w	%r0,-1			; 0xffffffff
__LX223:				; __L223:
	ld.w	%r12,%sp
	ext	pceSyncLeaveCriticalSection@rm	; 	xcall	pceSyncLeaveCriticalSection
	call	pceSyncLeaveCriticalSection@rl
	ld.w	%r10,%r0
	add	%sp,0x1		; 	xadd	%sp,%sp,4
	popn	%r2
	ret
	.align	1
	.global	tcp_send
tcp_send:
;	.frame	%sp,20,$31		# vars= 4, regs= 4/0, args= 0, extra= 0
;	.mask	0x80070000,-4
;	.fmask	0x00000000,0
	pushn	%r2
	sub	%sp,0x1		; 	xsub	%sp,%sp,4
	ld.w	%r1,%r12
	ld.w	%r0,%r13
	ld.w	%r2,%r14
	ld.w	%r12,%sp
	ext	pceSyncEnterCriticalSection@rm	; 	xcall	pceSyncEnterCriticalSection
	call	pceSyncEnterCriticalSection@rl
	ext	0xc		; 	xld.w	%r10,[%r1+12]
	ld.w	%r10,[%r1]
	cmp	%r10,0x3	; 	xcmp	%r10,3
	jreq	__LX239		; 	xjreq	__L239
	jrgt	__LX246		; 	xjrgt	__L246
	cmp	%r10,0x0
	jrlt	__LX244		; 	xjrlt	__L244
	jp	__LX243		; 	xjp	__L243
__LX246:				; __L246:
	cmp	%r10,0x6	; 	xcmp	%r10,6
	jrne	__LX244		; 	xjrne	__L244
__LX239:				; __L239:
	ext	0x20		; 	xld.w	%r12,[%r1+32]
	ld.w	%r12,[%r1]
	ld.w	%r13,%r0
	ld.w	%r14,%r2
	ext	write_buffer@rm	; 	xcall	write_buffer
	call	write_buffer@rl
	ld.w	%r0,%r10
	cmp	%r0,0x0
	jrle	__LX237		; 	xjrle	__L237
	ld.w	%r12,%r1
	ext	tcp_exec_state@rm	; 	xcall	tcp_exec_state
	call	tcp_exec_state@rl
	jp	__LX237		; 	xjp	__L237
__LX243:				; __L243:
	ld.w	%r0,0x0
	jp	__LX237		; 	xjp	__L237
__LX244:				; __L244:
	ld.w	%r0,0x3f	; 	xld.w	%r0,-1			; 0xffffffff
__LX237:				; __L237:
	ld.w	%r12,%sp
	ext	pceSyncLeaveCriticalSection@rm	; 	xcall	pceSyncLeaveCriticalSection
	call	pceSyncLeaveCriticalSection@rl
	ld.w	%r10,%r0
	add	%sp,0x1		; 	xadd	%sp,%sp,4
	popn	%r2
	ret
	.align	1
	.global	tcp_socket_open
tcp_socket_open:
;	.frame	%sp,36,$31		# vars= 8, regs= 5/0, args= 8, extra= 0
;	.mask	0x800f0000,-4
;	.fmask	0x00000000,0
	pushn	%r3
	sub	%sp,0x4		; 	xsub	%sp,%sp,16
	ld.w	%r2,%r12
	ld.w	%r3,%r13
	ld.w	[%sp+0x2],%r14	; 	xld.w	[%sp+8],%r14
	ld.w	[%sp+0x3],%r15	; 	xld.w	[%sp+12],%r15
	ext	0x0		; 	xld.w	%r1,0x00000030		; 48
	ld.w	%r1,0x30
	ld.w	%r12,%r1
	ext	malloc@rm	; 	xcall	malloc
	call	malloc@rl
	ld.w	%r0,%r10
	cmp	%r0,0x0
	jrne	__LX249		; 	xjrne	__L249
	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	0xc		; 	xld.w	%r10,0x0000032e		; 814
	ld.w	%r10,0x2e
	ld.w	[%sp+0x1],%r10	; 	xld.w	[%sp+4],%r10
	ext	die@rm		; 	xcall	die
	call	die@rl
__LX249:				; __L249:
	ld.w	%r12,%r0
	ld.w	%r13,0x0
	ld.w	%r14,%r1
	ext	memset@rm	; 	xcall	memset
	call	memset@rl
	ld.w	[%r0],%r2	; 	xld.w	[%r0],%r2
	ext	0x4		; 	xld.w	[%r0+4],%r3
	ld.w	[%r0],%r3
	ld.w	%r11,[%sp+0x2]	; 	xld.w	%r11,[%sp+8]
	ext	0x8		; 	xld.w	[%r0+8],%r11
	ld.w	[%r0],%r11
	ld.w	%r12,%r0
	ld.w	%r13,[%sp+0x3]	; 	xld.w	%r13,[%sp+12]
	ext	tcp_open@rm	; 	xcall	tcp_open
	call	tcp_open@rl
	ld.w	%r10,%r0
	add	%sp,0x4		; 	xadd	%sp,%sp,16
	popn	%r3
	ret
	.align	1
	.global	tcp_socket_close
tcp_socket_close:
;	.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	tcp_close@rm	; 	xcall	tcp_close
	call	tcp_close@rl
	ld.w	%r12,%r0
	ext	free@rm		; 	xcall	free
	call	free@rl
	popn	%r0
	ret
	.align	1
	.global	tcp_socket_recv
tcp_socket_recv:
;	.frame	%sp,4,$31		# vars= 0, regs= 1/0, args= 0, extra= 0
;	.mask	0x80000000,-4
;	.fmask	0x00000000,0
	ext	tcp_recv@rm	; 	xcall	tcp_recv
	call	tcp_recv@rl
	ret
	.align	1
	.global	tcp_socket_send
tcp_socket_send:
;	.frame	%sp,4,$31		# vars= 0, regs= 1/0, args= 0, extra= 0
;	.mask	0x80000000,-4
;	.fmask	0x00000000,0
	call	tcp_send	; 	xcall	tcp_send
	ret

	.lcomm	tcp_driver 32
