	.file	"443831.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"must have 3 args, now: %d"
.LC1:
	.string	"error port"
	.align 8
.LC2:
	.string	"socket start, ip: %s, port: %d\n"
.LC3:
	.string	"socket error"
.LC4:
	.string	"bind start"
.LC5:
	.string	"bind error"
.LC6:
	.string	"listen start"
.LC7:
	.string	"listen error"
.LC8:
	.string	"accept start"
.LC9:
	.string	"accept error"
	.align 8
.LC10:
	.string	"client info: ip: %s, port: %d\n"
.LC11:
	.string	"recv client start"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 1144
	.cfi_offset 3, -24
	mov	DWORD PTR -1140[rbp], edi
	mov	QWORD PTR -1152[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -1140[rbp], 3
	je	.L2
	mov	eax, DWORD PTR -1140[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L10
.L2:
	mov	rax, QWORD PTR -1152[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -1104[rbp], rax
	mov	rax, QWORD PTR -1152[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -1096[rbp], rax
	mov	rax, QWORD PTR -1096[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	WORD PTR -1122[rbp], ax
	cmp	WORD PTR -1122[rbp], 0
	jne	.L4
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, -2
	jmp	.L10
.L4:
	mov	WORD PTR -1088[rbp], 2
	mov	rax, QWORD PTR -1104[rbp]
	mov	rdi, rax
	call	inet_addr@PLT
	mov	DWORD PTR -1084[rbp], eax
	movzx	eax, WORD PTR -1122[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -1086[rbp], ax
	movsx	edx, WORD PTR -1122[rbp]
	mov	rax, QWORD PTR -1104[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -1116[rbp], eax
	cmp	DWORD PTR -1116[rbp], 0
	jns	.L5
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, -3
	jmp	.L10
.L5:
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rcx, -1088[rbp]
	mov	eax, DWORD PTR -1116[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L6
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	eax, -10
	jmp	.L10
.L6:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -1116[rbp]
	mov	esi, 1024
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	jns	.L7
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	eax, -4
	jmp	.L10
.L7:
	lea	rdi, .LC8[rip]
	call	puts@PLT
	lea	rax, -1072[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -1120[rbp], 16
	lea	rdx, -1120[rbp]
	lea	rcx, -1072[rbp]
	mov	eax, DWORD PTR -1116[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -1112[rbp], eax
	cmp	DWORD PTR -1112[rbp], 0
	jns	.L8
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	eax, -5
	jmp	.L10
.L8:
	movzx	eax, WORD PTR -1070[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	movzx	ebx, ax
	lea	rax, -1056[rbp]
	lea	rdx, -1072[rbp]
	lea	rsi, 4[rdx]
	mov	ecx, 1024
	mov	rdx, rax
	mov	edi, 2
	call	inet_ntop@PLT
	mov	edx, ebx
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC11[rip]
	call	puts@PLT
	call	fork@PLT
	mov	DWORD PTR -1108[rbp], eax
	cmp	DWORD PTR -1108[rbp], 0
	jne	.L7
	mov	eax, DWORD PTR -1112[rbp]
	mov	edi, eax
	call	handle_client
	mov	edi, 0
	call	exit@PLT
.L10:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC12:
	.string	"read error"
.LC13:
	.string	"client exit"
.LC14:
	.string	"recv: %s\n"
	.text
	.globl	handle_client
	.type	handle_client, @function
handle_client:
.LFB7:
	.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	DWORD PTR -1060[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
.L17:
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1060[rbp]
	mov	edx, 8
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	read@PLT
	mov	DWORD PTR -1044[rbp], eax
	cmp	DWORD PTR -1044[rbp], 0
	jns	.L13
	lea	rdi, .LC12[rip]
	call	puts@PLT
	jmp	.L12
.L13:
	cmp	DWORD PTR -1044[rbp], 0
	jne	.L15
	lea	rdi, .LC13[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -1060[rbp]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
	jmp	.L12
.L15:
	mov	eax, DWORD PTR -1044[rbp]
	cdqe
	mov	BYTE PTR -1040[rbp+rax], 0
	lea	rax, -1040[rbp]
	mov	rsi, rax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L17
.L12:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	handle_client, .-handle_client
	.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	"443831.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"must have 3 args, now: %d\000"
	.align	2
.LC1:
	.ascii	"error port\000"
	.align	2
.LC2:
	.ascii	"socket start, ip: %s, port: %d\012\000"
	.align	2
.LC3:
	.ascii	"socket error\000"
	.align	2
.LC4:
	.ascii	"bind start\000"
	.align	2
.LC5:
	.ascii	"bind error\000"
	.align	2
.LC6:
	.ascii	"listen start\000"
	.align	2
.LC7:
	.ascii	"listen error\000"
	.align	2
.LC8:
	.ascii	"accept start\000"
	.align	2
.LC9:
	.ascii	"accept error\000"
	.align	2
.LC10:
	.ascii	"client info: ip: %s, port: %d\012\000"
	.align	2
.LC11:
	.ascii	"recv client start\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1096
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #1088
	sub	sp, sp, #12
	str	r0, [fp, #-1104]
	str	r1, [fp, #-1108]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-1104]
	cmp	r3, #3
	beq	.L2
	ldr	r1, [fp, #-1104]
	ldr	r0, .L12+4
	bl	printf
	mvn	r3, #0
	b	.L10
.L2:
	ldr	r3, [fp, #-1108]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-1092]
	ldr	r3, [fp, #-1108]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-1088]
	ldr	r0, [fp, #-1088]
	bl	atoi
	mov	r2, r0
	sub	r3, fp, #12
	sub	r3, r3, #1072
	sub	r3, r3, #14
	strh	r2, [r3]	@ movhi
	sub	r3, fp, #12
	sub	r3, r3, #1072
	sub	r3, r3, #14
	ldrsh	r3, [r3]
	cmp	r3, #0
	bne	.L4
	ldr	r0, .L12+8
	bl	puts
	mvn	r3, #1
	b	.L10
.L4:
	sub	r3, fp, #12
	sub	r3, r3, #1056
	sub	r3, r3, #4
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r0, [fp, #-1092]
	bl	inet_addr
	mov	r3, r0
	str	r3, [fp, #-1068]
	sub	r3, fp, #12
	sub	r3, r3, #1072
	sub	r3, r3, #14
	ldrh	r3, [r3]
	mov	r0, r3
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #12
	sub	r3, r3, #1056
	sub	r3, r3, #4
	strh	r2, [r3, #2]	@ movhi
	sub	r3, fp, #12
	sub	r3, r3, #1072
	sub	r3, r3, #14
	ldrsh	r3, [r3]
	mov	r2, r3
	ldr	r1, [fp, #-1092]
	ldr	r0, .L12+12
	bl	printf
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-1084]
	ldr	r3, [fp, #-1084]
	cmp	r3, #0
	bge	.L5
	ldr	r0, .L12+16
	bl	puts
	mvn	r3, #2
	b	.L10
.L5:
	ldr	r0, .L12+20
	bl	puts
	sub	r3, fp, #1056
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-1084]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L6
	ldr	r0, .L12+24
	bl	puts
	mvn	r3, #9
	b	.L10
.L6:
	ldr	r0, .L12+28
	bl	puts
	mov	r1, #1024
	ldr	r0, [fp, #-1084]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	bge	.L7
	ldr	r0, .L12+32
	bl	puts
	mvn	r3, #3
	b	.L10
.L7:
	ldr	r0, .L12+36
	bl	puts
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #16
	str	r3, [fp, #-1096]
	sub	r2, fp, #1072
	sub	r2, r2, #12
	sub	r2, r2, #12
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-1084]
	bl	accept
	str	r0, [fp, #-1080]
	ldr	r3, [fp, #-1080]
	cmp	r3, #0
	bge	.L8
	ldr	r0, .L12+40
	bl	puts
	mvn	r3, #4
	b	.L10
.L8:
	sub	r2, fp, #1024
	sub	r2, r2, #12
	sub	r2, r2, #4
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #4
	add	r1, r3, #4
	mov	r3, #1024
	mov	r0, #2
	bl	inet_ntop
	mov	r4, r0
	sub	r3, fp, #12
	sub	r3, r3, #1040
	sub	r3, r3, #4
	ldrh	r3, [r3, #2]
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L12+44
	bl	printf
	ldr	r0, .L12+48
	bl	puts
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-1076]
	ldr	r3, [fp, #-1076]
	cmp	r3, #0
	bne	.L7
	ldr	r0, [fp, #-1080]
	bl	handle_client
	mov	r0, #0
	bl	exit
.L10:
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC12
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	main, .-main
	.section	.rodata
	.align	2
.LC13:
	.ascii	"read error\000"
	.align	2
.LC14:
	.ascii	"client exit\000"
	.align	2
.LC15:
	.ascii	"recv: %s\012\000"
	.align	2
.LC16:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	handle_client
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_client, %function
handle_client:
	@ args = 0, pretend = 0, frame = 1040
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	str	r0, [fp, #-1040]
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
.L19:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-1040]
	bl	read
	str	r0, [fp, #-1036]
	ldr	r3, [fp, #-1036]
	cmp	r3, #0
	bge	.L15
	ldr	r0, .L21+4
	bl	puts
	b	.L14
.L15:
	ldr	r3, [fp, #-1036]
	cmp	r3, #0
	bne	.L17
	ldr	r0, .L21+8
	bl	puts
	ldr	r0, [fp, #-1040]
	bl	close
	b	.L14
.L17:
	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	r1, r3
	ldr	r0, .L21+12
	bl	printf
	b	.L19
.L14:
	ldr	r3, .L21
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L20
	bl	__stack_chk_fail
.L20:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC16
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.size	handle_client, .-handle_client
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
