	.file	"639328.c"
	.intel_syntax noprefix
	.text
	.globl	sock_init
	.type	sock_init, @function
sock_init:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	sock_init, .-sock_init
	.globl	sock_uninit
	.type	sock_uninit, @function
sock_uninit:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sock_uninit, .-sock_uninit
	.globl	sock_close
	.type	sock_close, @function
sock_close:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, 2
	mov	edi, eax
	call	shutdown@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	close@PLT
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	sock_close, .-sock_close
	.globl	sock_nblock
	.type	sock_nblock, @function
sock_nblock:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, 3
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 2048
	test	eax, eax
	je	.L6
	mov	eax, 0
	jmp	.L7
.L6:
	mov	eax, DWORD PTR -4[rbp]
	or	ah, 8
	mov	edx, eax
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, 4
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	sock_nblock, .-sock_nblock
	.globl	sock_block
	.type	sock_block, @function
sock_block:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, 3
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 2048
	test	eax, eax
	jne	.L9
	mov	eax, 0
	jmp	.L10
.L9:
	mov	eax, DWORD PTR -4[rbp]
	and	ah, -9
	mov	edx, eax
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, 4
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	sock_block, .-sock_block
	.type	gai_seterrno, @function
gai_seterrno:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	cmp	DWORD PTR -4[rbp], 0
	je	.L21
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 11
	cmp	eax, 9
	ja	.L13
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L15[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L15[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L15:
	.long	.L22-.L15
	.long	.L19-.L15
	.long	.L13-.L15
	.long	.L14-.L15
	.long	.L18-.L15
	.long	.L17-.L15
	.long	.L13-.L15
	.long	.L14-.L15
	.long	.L16-.L15
	.long	.L14-.L15
	.text
.L17:
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 97
	jmp	.L12
.L16:
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 11
	jmp	.L12
.L14:
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 99
	jmp	.L12
.L19:
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 12
	jmp	.L12
.L18:
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 95
	jmp	.L12
.L13:
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 22
	jmp	.L21
.L22:
	nop
.L12:
.L21:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	gai_seterrno, .-gai_seterrno
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	sock_server
	.type	sock_server, @function
sock_server:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 112
	mov	QWORD PTR -104[rbp], rdi
	mov	DWORD PTR -108[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -108[rbp], 0
	jle	.L24
	cmp	DWORD PTR -108[rbp], 65535
	jle	.L25
.L24:
	mov	eax, -22
	jmp	.L34
.L25:
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	DWORD PTR -64[rbp], 1
	mov	DWORD PTR -60[rbp], 10
	mov	DWORD PTR -56[rbp], 1
	mov	DWORD PTR -52[rbp], 6
	mov	QWORD PTR -16[rbp], 0
	mov	edx, DWORD PTR -108[rbp]
	lea	rax, -16[rbp]
	mov	ecx, edx
	lea	rdx, .LC0[rip]
	mov	esi, 8
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	lea	rcx, -80[rbp]
	lea	rdx, -64[rbp]
	lea	rsi, -16[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	rdi, rax
	call	getaddrinfo@PLT
	mov	DWORD PTR -88[rbp], eax
	cmp	DWORD PTR -88[rbp], 0
	je	.L27
	mov	eax, DWORD PTR -88[rbp]
	mov	edi, eax
	call	gai_seterrno
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	neg	eax
	jmp	.L34
.L27:
	mov	DWORD PTR -92[rbp], -1
	mov	rax, QWORD PTR -80[rbp]
	mov	QWORD PTR -72[rbp], rax
	jmp	.L28
.L33:
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -72[rbp]
	mov	ecx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -72[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	esi, ecx
	mov	edi, eax
	call	socket@PLT
	mov	DWORD PTR -92[rbp], eax
	cmp	DWORD PTR -92[rbp], 0
	js	.L36
	mov	DWORD PTR -96[rbp], 1
	lea	rdx, -96[rbp]
	mov	eax, DWORD PTR -92[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 2
	mov	esi, 1
	mov	edi, eax
	call	setsockopt@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -72[rbp]
	mov	rcx, QWORD PTR 24[rax]
	mov	eax, DWORD PTR -92[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	mov	DWORD PTR -84[rbp], eax
	cmp	DWORD PTR -84[rbp], 0
	je	.L37
	mov	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	sock_close
	mov	DWORD PTR -92[rbp], -1
	jmp	.L30
.L36:
	nop
.L30:
	mov	rax, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	QWORD PTR -72[rbp], rax
.L28:
	cmp	QWORD PTR -72[rbp], 0
	jne	.L33
	jmp	.L32
.L37:
	nop
.L32:
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	freeaddrinfo@PLT
	mov	eax, DWORD PTR -92[rbp]
.L34:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L35
	call	__stack_chk_fail@PLT
.L35:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	sock_server, .-sock_server
	.globl	sock_connect
	.type	sock_connect, @function
sock_connect:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 288
	mov	QWORD PTR -264[rbp], rdi
	mov	DWORD PTR -268[rbp], esi
	mov	DWORD PTR -272[rbp], edx
	mov	DWORD PTR -276[rbp], ecx
	mov	DWORD PTR -280[rbp], r8d
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -272[rbp], 0
	jne	.L39
	mov	DWORD PTR -272[rbp], 1
.L39:
	cmp	QWORD PTR -264[rbp], 0
	jne	.L40
	mov	eax, -22
	jmp	.L57
.L40:
	cmp	DWORD PTR -268[rbp], 0
	js	.L42
	cmp	DWORD PTR -268[rbp], 65535
	jle	.L43
.L42:
	mov	eax, -22
	jmp	.L57
.L43:
	mov	QWORD PTR -192[rbp], 0
	mov	QWORD PTR -184[rbp], 0
	mov	QWORD PTR -176[rbp], 0
	mov	QWORD PTR -168[rbp], 0
	mov	QWORD PTR -160[rbp], 0
	mov	QWORD PTR -152[rbp], 0
	mov	DWORD PTR -188[rbp], 10
	mov	eax, DWORD PTR -272[rbp]
	mov	DWORD PTR -184[rbp], eax
	mov	eax, DWORD PTR -276[rbp]
	mov	DWORD PTR -180[rbp], eax
	mov	QWORD PTR -16[rbp], 0
	mov	edx, DWORD PTR -268[rbp]
	lea	rax, -16[rbp]
	mov	ecx, edx
	lea	rdx, .LC0[rip]
	mov	esi, 8
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	lea	rcx, -224[rbp]
	lea	rdx, -192[rbp]
	lea	rsi, -16[rbp]
	mov	rax, QWORD PTR -264[rbp]
	mov	rdi, rax
	call	getaddrinfo@PLT
	mov	DWORD PTR -240[rbp], eax
	cmp	DWORD PTR -240[rbp], 0
	je	.L44
	mov	eax, DWORD PTR -240[rbp]
	mov	edi, eax
	call	gai_seterrno
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	neg	eax
	jmp	.L57
.L44:
	mov	DWORD PTR -244[rbp], -1
	mov	rax, QWORD PTR -224[rbp]
	mov	QWORD PTR -216[rbp], rax
	jmp	.L45
.L56:
	mov	rax, QWORD PTR -216[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -216[rbp]
	mov	ecx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -216[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	esi, ecx
	mov	edi, eax
	call	socket@PLT
	mov	DWORD PTR -244[rbp], eax
	cmp	DWORD PTR -244[rbp], 0
	js	.L59
	mov	eax, DWORD PTR -244[rbp]
	mov	edi, eax
	call	sock_nblock
	mov	rax, QWORD PTR -216[rbp]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -216[rbp]
	mov	rcx, QWORD PTR 24[rax]
	mov	eax, DWORD PTR -244[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	mov	DWORD PTR -236[rbp], eax
	cmp	DWORD PTR -236[rbp], 0
	jne	.L48
	mov	eax, DWORD PTR -244[rbp]
	mov	edi, eax
	call	sock_block
	jmp	.L55
.L48:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 115
	je	.L50
	mov	eax, DWORD PTR -244[rbp]
	mov	edi, eax
	call	sock_close
	mov	DWORD PTR -244[rbp], -1
	jmp	.L47
.L50:
	mov	QWORD PTR -208[rbp], 0
	mov	QWORD PTR -200[rbp], 0
	mov	eax, DWORD PTR -280[rbp]
	cdqe
	mov	QWORD PTR -208[rbp], rax
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -144[rbp]
	mov	rdi, rdx
#APP
# 293 "the_stack_data/639328.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -232[rbp], edx
	mov	DWORD PTR -228[rbp], eax
	mov	eax, DWORD PTR -244[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -144[rbp+rax*8]
	mov	eax, DWORD PTR -244[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	or	rdi, rax
	mov	rdx, rdi
	movsx	rax, esi
	mov	QWORD PTR -144[rbp+rax*8], rdx
	mov	eax, DWORD PTR -244[rbp]
	lea	edi, 1[rax]
	lea	rdx, -208[rbp]
	lea	rax, -144[rbp]
	mov	r8, rdx
	mov	ecx, 0
	mov	rdx, rax
	mov	esi, 0
	call	select@PLT
	mov	DWORD PTR -236[rbp], eax
	cmp	DWORD PTR -236[rbp], 0
	jns	.L51
	mov	eax, DWORD PTR -244[rbp]
	mov	edi, eax
	call	sock_close
	mov	DWORD PTR -244[rbp], -1
	jmp	.L47
.L51:
	cmp	DWORD PTR -236[rbp], 0
	jne	.L52
	mov	eax, DWORD PTR -244[rbp]
	mov	edi, eax
	call	sock_close
	mov	DWORD PTR -244[rbp], -1
	jmp	.L47
.L52:
	mov	DWORD PTR -248[rbp], 4
	lea	rcx, -248[rbp]
	lea	rdx, -252[rbp]
	mov	eax, DWORD PTR -244[rbp]
	mov	r8, rcx
	mov	rcx, rdx
	mov	edx, 4
	mov	esi, 1
	mov	edi, eax
	call	getsockopt@PLT
	test	eax, eax
	je	.L53
	mov	eax, DWORD PTR -244[rbp]
	mov	edi, eax
	call	sock_close
	mov	DWORD PTR -244[rbp], -1
	jmp	.L47
.L53:
	mov	eax, DWORD PTR -252[rbp]
	test	eax, eax
	je	.L54
	call	__errno_location@PLT
	mov	edx, DWORD PTR -252[rbp]
	mov	DWORD PTR [rax], edx
	mov	eax, DWORD PTR -244[rbp]
	mov	edi, eax
	call	sock_close
	mov	DWORD PTR -244[rbp], -1
	jmp	.L47
.L54:
	mov	eax, DWORD PTR -244[rbp]
	mov	edi, eax
	call	sock_block
	jmp	.L55
.L59:
	nop
.L47:
	mov	rax, QWORD PTR -216[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	QWORD PTR -216[rbp], rax
.L45:
	cmp	QWORD PTR -216[rbp], 0
	jne	.L56
.L55:
	mov	rax, QWORD PTR -224[rbp]
	mov	rdi, rax
	call	freeaddrinfo@PLT
	mov	eax, DWORD PTR -244[rbp]
.L57:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L58
	call	__stack_chk_fail@PLT
.L58:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	sock_connect, .-sock_connect
	.globl	sock_send
	.type	sock_send, @function
sock_send:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	mov	QWORD PTR -24[rbp], rdx
	mov	DWORD PTR -8[rbp], ecx
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	sock_send, .-sock_send
	.globl	sock_recv
	.type	sock_recv, @function
sock_recv:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	mov	QWORD PTR -24[rbp], rdx
	mov	DWORD PTR -8[rbp], ecx
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	sock_recv, .-sock_recv
	.section	.rodata
.LC1:
	.string	"::1"
.LC2:
	.string	"can not bind"
.LC3:
	.string	"can not listen"
	.text
	.globl	main
	.type	main, @function
main:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1072
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, 0
	call	sock_init
	mov	esi, 7777
	lea	rdi, .LC1[rip]
	call	sock_server
	mov	DWORD PTR -1060[rbp], eax
	cmp	DWORD PTR -1060[rbp], 0
	jns	.L65
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L65:
	mov	eax, DWORD PTR -1060[rbp]
	mov	esi, 5
	mov	edi, eax
	call	listen@PLT
	mov	DWORD PTR -1056[rbp], eax
	cmp	DWORD PTR -1056[rbp], 0
	je	.L66
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L66:
	mov	eax, DWORD PTR -1060[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -1052[rbp], eax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1052[rbp]
	mov	ecx, 0
	mov	edx, 1024
	mov	edi, eax
	call	recv@PLT
	mov	QWORD PTR -1048[rbp], rax
	lea	rdx, -1040[rbp]
	mov	rax, QWORD PTR -1048[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	rdx, QWORD PTR -1048[rbp]
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1052[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	eax, DWORD PTR -1052[rbp]
	mov	edi, eax
	call	sock_close
	jmp	.L66
	.cfi_endproc
.LFE16:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"639328.c"
	.text
	.align	2
	.global	sock_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	sock_init, %function
sock_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	sock_init, .-sock_init
	.align	2
	.global	sock_uninit
	.syntax unified
	.arm
	.fpu softvfp
	.type	sock_uninit, %function
sock_uninit:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	sock_uninit, .-sock_uninit
	.align	2
	.global	sock_close
	.syntax unified
	.arm
	.fpu softvfp
	.type	sock_close, %function
sock_close:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	mov	r1, #2
	ldr	r0, [fp, #-8]
	bl	shutdown
	ldr	r0, [fp, #-8]
	bl	close
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	sock_close, .-sock_close
	.align	2
	.global	sock_nblock
	.syntax unified
	.arm
	.fpu softvfp
	.type	sock_nblock, %function
sock_nblock:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r1, #3
	ldr	r0, [fp, #-16]
	bl	fcntl
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	and	r3, r3, #2048
	cmp	r3, #0
	beq	.L6
	mov	r3, #0
	b	.L7
.L6:
	ldr	r3, [fp, #-8]
	orr	r3, r3, #2048
	mov	r2, r3
	mov	r1, #4
	ldr	r0, [fp, #-16]
	bl	fcntl
	mov	r3, r0
.L7:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	sock_nblock, .-sock_nblock
	.align	2
	.global	sock_block
	.syntax unified
	.arm
	.fpu softvfp
	.type	sock_block, %function
sock_block:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r1, #3
	ldr	r0, [fp, #-16]
	bl	fcntl
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	and	r3, r3, #2048
	cmp	r3, #0
	bne	.L9
	mov	r3, #0
	b	.L10
.L9:
	ldr	r3, [fp, #-8]
	bic	r3, r3, #2048
	mov	r2, r3
	mov	r1, #4
	ldr	r0, [fp, #-16]
	bl	fcntl
	mov	r3, r0
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	sock_block, .-sock_block
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	gai_seterrno, %function
gai_seterrno:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L21
	ldr	r3, [fp, #-8]
	add	r3, r3, #11
	cmp	r3, #9
	ldrls	pc, [pc, r3, asl #2]
	b	.L13
.L15:
	.word	.L22
	.word	.L19
	.word	.L13
	.word	.L14
	.word	.L18
	.word	.L17
	.word	.L13
	.word	.L14
	.word	.L16
	.word	.L14
.L17:
	bl	__errno_location
	mov	r3, r0
	mov	r2, #97
	str	r2, [r3]
	b	.L12
.L16:
	bl	__errno_location
	mov	r3, r0
	mov	r2, #11
	str	r2, [r3]
	b	.L12
.L14:
	bl	__errno_location
	mov	r3, r0
	mov	r2, #99
	str	r2, [r3]
	b	.L12
.L19:
	bl	__errno_location
	mov	r3, r0
	mov	r2, #12
	str	r2, [r3]
	b	.L12
.L18:
	bl	__errno_location
	mov	r3, r0
	mov	r2, #95
	str	r2, [r3]
	b	.L12
.L13:
	bl	__errno_location
	mov	r3, r0
	mov	r2, #22
	str	r2, [r3]
	b	.L21
.L22:
	nop
.L12:
.L21:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	gai_seterrno, .-gai_seterrno
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sock_server
	.syntax unified
	.arm
	.fpu softvfp
	.type	sock_server, %function
sock_server:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #88
	str	r0, [fp, #-80]
	str	r1, [fp, #-84]
	ldr	r3, .L38
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-84]
	cmp	r3, #0
	ble	.L24
	ldr	r3, [fp, #-84]
	cmp	r3, #65536
	blt	.L25
.L24:
	mvn	r3, #21
	b	.L34
.L25:
	sub	r3, fp, #48
	mov	r2, #32
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #1
	str	r3, [fp, #-48]
	mov	r3, #10
	str	r3, [fp, #-44]
	mov	r3, #1
	str	r3, [fp, #-40]
	mov	r3, #6
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	sub	r0, fp, #16
	ldr	r3, [fp, #-84]
	ldr	r2, .L38+4
	mov	r1, #8
	bl	snprintf
	sub	r3, fp, #72
	sub	r2, fp, #48
	sub	r1, fp, #16
	ldr	r0, [fp, #-80]
	bl	getaddrinfo
	str	r0, [fp, #-56]
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	beq	.L27
	ldr	r0, [fp, #-56]
	bl	gai_seterrno
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	rsb	r3, r3, #0
	b	.L34
.L27:
	mvn	r3, #0
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-72]
	str	r3, [fp, #-60]
	b	.L28
.L33:
	ldr	r3, [fp, #-60]
	ldr	r0, [r3, #4]
	ldr	r3, [fp, #-60]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-60]
	ldr	r3, [r3, #12]
	mov	r2, r3
	bl	socket
	str	r0, [fp, #-64]
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	blt	.L36
	mov	r3, #1
	str	r3, [fp, #-68]
	sub	r3, fp, #68
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #2
	mov	r1, #1
	ldr	r0, [fp, #-64]
	bl	setsockopt
	ldr	r3, [fp, #-60]
	ldr	r1, [r3, #20]
	ldr	r3, [fp, #-60]
	ldr	r3, [r3, #16]
	mov	r2, r3
	ldr	r0, [fp, #-64]
	bl	bind
	str	r0, [fp, #-52]
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	beq	.L37
	ldr	r0, [fp, #-64]
	bl	sock_close
	mvn	r3, #0
	str	r3, [fp, #-64]
	b	.L30
.L36:
	nop
.L30:
	ldr	r3, [fp, #-60]
	ldr	r3, [r3, #28]
	str	r3, [fp, #-60]
.L28:
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	bne	.L33
	b	.L32
.L37:
	nop
.L32:
	ldr	r3, [fp, #-72]
	mov	r0, r3
	bl	freeaddrinfo
	ldr	r3, [fp, #-64]
.L34:
	ldr	r2, .L38
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L35
	bl	__stack_chk_fail
.L35:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L39:
	.align	2
.L38:
	.word	.LC1
	.word	.LC0
	.size	sock_server, .-sock_server
	.section	.rodata
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sock_connect
	.syntax unified
	.arm
	.fpu softvfp
	.type	sock_connect, %function
sock_connect:
	@ args = 4, pretend = 0, frame = 232
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #240
	str	r0, [fp, #-224]
	str	r1, [fp, #-228]
	str	r2, [fp, #-232]
	str	r3, [fp, #-236]
	ldr	r3, .L64
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-232]
	cmp	r3, #0
	bne	.L41
	mov	r3, #1
	str	r3, [fp, #-232]
.L41:
	ldr	r3, [fp, #-224]
	cmp	r3, #0
	bne	.L42
	mvn	r3, #21
	b	.L61
.L42:
	ldr	r3, [fp, #-228]
	cmp	r3, #0
	blt	.L44
	ldr	r3, [fp, #-228]
	cmp	r3, #65536
	blt	.L45
.L44:
	mvn	r3, #21
	b	.L61
.L45:
	sub	r3, fp, #176
	mov	r2, #32
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #10
	str	r3, [fp, #-172]
	ldr	r3, [fp, #-232]
	str	r3, [fp, #-168]
	ldr	r3, [fp, #-236]
	str	r3, [fp, #-164]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	sub	r0, fp, #16
	ldr	r3, [fp, #-228]
	ldr	r2, .L64+4
	mov	r1, #8
	bl	snprintf
	sub	r3, fp, #220
	sub	r2, fp, #176
	sub	r1, fp, #16
	ldr	r0, [fp, #-224]
	bl	getaddrinfo
	str	r0, [fp, #-196]
	ldr	r3, [fp, #-196]
	cmp	r3, #0
	beq	.L46
	ldr	r0, [fp, #-196]
	bl	gai_seterrno
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	rsb	r3, r3, #0
	b	.L61
.L46:
	mvn	r3, #0
	str	r3, [fp, #-208]
	ldr	r3, [fp, #-220]
	str	r3, [fp, #-204]
	b	.L47
.L60:
	ldr	r3, [fp, #-204]
	ldr	r0, [r3, #4]
	ldr	r3, [fp, #-204]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-204]
	ldr	r3, [r3, #12]
	mov	r2, r3
	bl	socket
	str	r0, [fp, #-208]
	ldr	r3, [fp, #-208]
	cmp	r3, #0
	blt	.L63
	ldr	r0, [fp, #-208]
	bl	sock_nblock
	ldr	r3, [fp, #-204]
	ldr	r1, [r3, #20]
	ldr	r3, [fp, #-204]
	ldr	r3, [r3, #16]
	mov	r2, r3
	ldr	r0, [fp, #-208]
	bl	connect
	str	r0, [fp, #-192]
	ldr	r3, [fp, #-192]
	cmp	r3, #0
	bne	.L50
	ldr	r0, [fp, #-208]
	bl	sock_block
	b	.L59
.L50:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #115
	beq	.L52
	ldr	r0, [fp, #-208]
	bl	sock_close
	mvn	r3, #0
	str	r3, [fp, #-208]
	b	.L49
.L52:
	sub	r3, fp, #184
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	ldr	r3, [fp, #4]
	str	r3, [fp, #-184]
	sub	r3, fp, #144
	str	r3, [fp, #-188]
	mov	r3, #0
	str	r3, [fp, #-200]
	b	.L53
.L54:
	ldr	r3, [fp, #-188]
	ldr	r2, [fp, #-200]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-200]
	add	r3, r3, #1
	str	r3, [fp, #-200]
.L53:
	ldr	r3, [fp, #-200]
	cmp	r3, #31
	bls	.L54
	ldr	r3, [fp, #-208]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-140]
	ldr	r3, [fp, #-208]
	rsbs	r0, r3, #0
	and	r3, r3, #31
	and	r0, r0, #31
	rsbpl	r3, r0, #0
	mov	r0, #1
	lsl	r3, r0, r3
	orr	r1, r1, r3
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-140]
	ldr	r3, [fp, #-208]
	add	r0, r3, #1
	sub	r2, fp, #144
	sub	r3, fp, #184
	str	r3, [sp]
	mov	r3, #0
	mov	r1, #0
	bl	select
	str	r0, [fp, #-192]
	ldr	r3, [fp, #-192]
	cmp	r3, #0
	bge	.L55
	ldr	r0, [fp, #-208]
	bl	sock_close
	mvn	r3, #0
	str	r3, [fp, #-208]
	b	.L49
.L55:
	ldr	r3, [fp, #-192]
	cmp	r3, #0
	bne	.L56
	ldr	r0, [fp, #-208]
	bl	sock_close
	mvn	r3, #0
	str	r3, [fp, #-208]
	b	.L49
.L56:
	mov	r3, #4
	str	r3, [fp, #-212]
	sub	r2, fp, #216
	sub	r3, fp, #212
	str	r3, [sp]
	mov	r3, r2
	mov	r2, #4
	mov	r1, #1
	ldr	r0, [fp, #-208]
	bl	getsockopt
	mov	r3, r0
	cmp	r3, #0
	beq	.L57
	ldr	r0, [fp, #-208]
	bl	sock_close
	mvn	r3, #0
	str	r3, [fp, #-208]
	b	.L49
.L57:
	ldr	r3, [fp, #-216]
	cmp	r3, #0
	beq	.L58
	bl	__errno_location
	mov	r2, r0
	ldr	r3, [fp, #-216]
	str	r3, [r2]
	ldr	r0, [fp, #-208]
	bl	sock_close
	mvn	r3, #0
	str	r3, [fp, #-208]
	b	.L49
.L58:
	ldr	r0, [fp, #-208]
	bl	sock_block
	b	.L59
.L63:
	nop
.L49:
	ldr	r3, [fp, #-204]
	ldr	r3, [r3, #28]
	str	r3, [fp, #-204]
.L47:
	ldr	r3, [fp, #-204]
	cmp	r3, #0
	bne	.L60
.L59:
	ldr	r3, [fp, #-220]
	mov	r0, r3
	bl	freeaddrinfo
	ldr	r3, [fp, #-208]
.L61:
	ldr	r2, .L64
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L62
	bl	__stack_chk_fail
.L62:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L65:
	.align	2
.L64:
	.word	.LC2
	.word	.LC0
	.size	sock_connect, .-sock_connect
	.align	2
	.global	sock_send
	.syntax unified
	.arm
	.fpu softvfp
	.type	sock_send, %function
sock_send:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	str	r3, [fp, #-20]
	mov	r3, #0
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	sock_send, .-sock_send
	.align	2
	.global	sock_recv
	.syntax unified
	.arm
	.fpu softvfp
	.type	sock_recv, %function
sock_recv:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	str	r3, [fp, #-20]
	mov	r3, #0
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	sock_recv, .-sock_recv
	.section	.rodata
	.align	2
.LC3:
	.ascii	"::1\000"
	.align	2
.LC4:
	.ascii	"can not bind\000"
	.align	2
.LC5:
	.ascii	"can not listen\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1048
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	sub	sp, sp, #8
	ldr	r3, .L74
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	sock_init
	ldr	r1, .L74+4
	ldr	r0, .L74+8
	bl	sock_server
	str	r0, [fp, #-1048]
	ldr	r3, [fp, #-1048]
	cmp	r3, #0
	bge	.L71
	ldr	r0, .L74+12
	bl	perror
	mov	r0, #1
	bl	exit
.L71:
	mov	r1, #5
	ldr	r0, [fp, #-1048]
	bl	listen
	str	r0, [fp, #-1044]
	ldr	r3, [fp, #-1044]
	cmp	r3, #0
	beq	.L72
	ldr	r0, .L74+16
	bl	perror
	mov	r0, #1
	bl	exit
.L72:
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-1048]
	bl	accept
	str	r0, [fp, #-1040]
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #1024
	ldr	r0, [fp, #-1040]
	bl	recv
	str	r0, [fp, #-1036]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1036]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	puts
	ldr	r2, [fp, #-1036]
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	ldr	r0, [fp, #-1040]
	bl	sock_close
	b	.L72
.L75:
	.align	2
.L74:
	.word	.LC6
	.word	7777
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
