	.file	"409768.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"create socket error: %s(errno: %d)\n"
	.align 8
.LC1:
	.string	"bind socket error: %s(errno: %d)\n"
	.align 8
.LC2:
	.string	"listen socket error: %s(errno: %d)\n"
	.align 8
.LC3:
	.string	"======waiting for client's request======"
	.align 8
.LC4:
	.string	"accept socket error: %s(errno: %d)"
.LC5:
	.string	"client attached."
.LC6:
	.string	"client detached."
.LC7:
	.string	"recv msg from client: %s\n"
	.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 72
	.cfi_offset 3, -24
	mov	DWORD PTR -4164[rbp], edi
	mov	QWORD PTR -4176[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -4156[rbp], eax
	cmp	DWORD PTR -4156[rbp], -1
	jne	.L2
	call	__errno_location@PLT
	mov	ebx, DWORD PTR [rax]
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	edx, ebx
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
.L2:
	lea	rax, -4144[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -4144[rbp], 2
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -4140[rbp], eax
	mov	edi, 6666
	call	htons@PLT
	mov	WORD PTR -4142[rbp], ax
	lea	rcx, -4144[rbp]
	mov	eax, DWORD PTR -4156[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	cmp	eax, -1
	jne	.L3
	call	__errno_location@PLT
	mov	ebx, DWORD PTR [rax]
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	edx, ebx
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
.L3:
	mov	eax, DWORD PTR -4156[rbp]
	mov	esi, 10
	mov	edi, eax
	call	listen@PLT
	cmp	eax, -1
	jne	.L4
	call	__errno_location@PLT
	mov	ebx, DWORD PTR [rax]
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	edx, ebx
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
.L4:
	lea	rdi, .LC3[rip]
	call	puts@PLT
.L10:
	mov	eax, DWORD PTR -4156[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -4152[rbp], eax
	cmp	DWORD PTR -4152[rbp], -1
	jne	.L5
	call	__errno_location@PLT
	mov	ebx, DWORD PTR [rax]
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	edx, ebx
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L6
.L5:
	call	fork@PLT
	test	eax, eax
	je	.L12
	lea	rdi, .LC5[rip]
	call	puts@PLT
.L9:
	lea	rsi, -4128[rbp]
	mov	eax, DWORD PTR -4152[rbp]
	mov	ecx, 0
	mov	edx, 4096
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -4148[rbp], eax
	cmp	DWORD PTR -4148[rbp], 0
	jne	.L8
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -4152[rbp]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
	jmp	.L6
.L8:
	mov	eax, DWORD PTR -4148[rbp]
	cdqe
	mov	BYTE PTR -4128[rbp+rax], 0
	lea	rax, -4128[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L9
.L12:
	nop
.L6:
	jmp	.L10
	.cfi_endproc
.LFE6:
	.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	"409768.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"create socket error: %s(errno: %d)\012\000"
	.align	2
.LC1:
	.ascii	"bind socket error: %s(errno: %d)\012\000"
	.align	2
.LC2:
	.ascii	"listen socket error: %s(errno: %d)\012\000"
	.align	2
.LC3:
	.ascii	"======waiting for client's request======\000"
	.align	2
.LC4:
	.ascii	"accept socket error: %s(errno: %d)\000"
	.align	2
.LC5:
	.ascii	"client attached.\000"
	.align	2
.LC6:
	.ascii	"client detached.\000"
	.align	2
.LC7:
	.ascii	"recv msg from client: %s\012\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 4136
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4096
	sub	sp, sp, #44
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-36]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r1, [r3, #-40]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [r4, #-32]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	cmn	r3, #1
	bne	.L2
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r4, r0
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L13+4
	bl	printf
	mov	r0, #0
	bl	exit
.L2:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #20
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, #2
	strh	r2, [r3, #-20]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	sub	r2, fp, #4096
	sub	r2, r2, #12
	str	r3, [r2, #-16]
	ldr	r0, .L13+8
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	strh	r2, [r3, #-18]	@ movhi
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #20
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [r0, #-32]
	bl	bind
	mov	r3, r0
	cmn	r3, #1
	bne	.L3
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r4, r0
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L13+12
	bl	printf
	mov	r0, #0
	bl	exit
.L3:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, #10
	ldr	r0, [r3, #-32]
	bl	listen
	mov	r3, r0
	cmn	r3, #1
	bne	.L4
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r4, r0
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L13+16
	bl	printf
	mov	r0, #0
	bl	exit
.L4:
	ldr	r0, .L13+20
	bl	puts
.L10:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [r3, #-32]
	bl	accept
	str	r0, [r4, #-28]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-28]
	cmn	r3, #1
	bne	.L5
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r4, r0
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L13+24
	bl	printf
	b	.L6
.L5:
	bl	fork
	mov	r3, r0
	cmp	r3, #0
	beq	.L12
	ldr	r0, .L13+28
	bl	puts
.L9:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r1, fp, #4096
	sub	r1, r1, #12
	sub	r1, r1, #4
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r0, r3
	mov	r3, #0
	mov	r2, #4096
	ldr	r0, [r0, #-28]
	bl	recv
	str	r0, [r4, #-24]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-24]
	cmp	r3, #0
	bne	.L8
	ldr	r0, .L13+32
	bl	puts
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-28]
	bl	close
	b	.L6
.L8:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-24]
	add	r3, r2, r3
	sub	r3, r3, #4
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L13+36
	bl	printf
	b	.L9
.L12:
	nop
.L6:
	b	.L10
.L14:
	.align	2
.L13:
	.word	.LC8
	.word	.LC0
	.word	6666
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
