	.file	"206394426.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"127.0.0.1"
	.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
	sub	rsp, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -36[rbp], eax
	lea	rax, -32[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	mov	WORD PTR -32[rbp], 2
	mov	edi, 8787
	call	htons@PLT
	mov	WORD PTR -30[rbp], ax
	lea	rax, -32[rbp]
	add	rax, 4
	mov	rdx, rax
	lea	rsi, .LC0[rip]
	mov	edi, 2
	mov	eax, 0
	call	inet_pton@PLT
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	handle_connection
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC1:
	.string	"client: server is closed.\n"
	.text
	.type	handle_connection, @function
handle_connection:
.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, 2112
	mov	DWORD PTR -2100[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -2100[rbp]
	mov	DWORD PTR -2080[rbp], eax
	mov	WORD PTR -2076[rbp], 1
	mov	DWORD PTR -2072[rbp], 0
	mov	WORD PTR -2068[rbp], 1
.L9:
	lea	rax, -2080[rbp]
	mov	edx, -1
	mov	esi, 2
	mov	rdi, rax
	call	poll@PLT
	movzx	eax, WORD PTR -2074[rbp]
	cwde
	and	eax, 1
	test	eax, eax
	je	.L5
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -2100[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -2084[rbp], eax
	cmp	DWORD PTR -2084[rbp], 0
	jne	.L6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 26
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	mov	eax, DWORD PTR -2100[rbp]
	mov	edi, eax
	call	close@PLT
.L6:
	mov	eax, DWORD PTR -2084[rbp]
	movsx	rdx, eax
	lea	rax, -1040[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
.L5:
	movzx	eax, WORD PTR -2066[rbp]
	cwde
	and	eax, 1
	test	eax, eax
	je	.L9
	lea	rax, -2064[rbp]
	mov	edx, 1024
	mov	rsi, rax
	mov	edi, 0
	call	read@PLT
	mov	DWORD PTR -2084[rbp], eax
	cmp	DWORD PTR -2084[rbp], 0
	jne	.L8
	mov	eax, DWORD PTR -2100[rbp]
	mov	esi, 1
	mov	edi, eax
	call	shutdown@PLT
	jmp	.L7
.L8:
	mov	eax, DWORD PTR -2084[rbp]
	movsx	rdx, eax
	lea	rcx, -2064[rbp]
	mov	eax, DWORD PTR -2100[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
.L7:
	jmp	.L9
	.cfi_endproc
.LFE7:
	.size	handle_connection, .-handle_connection
	.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	"206394426.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"127.0.0.1\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-28]
	sub	r3, fp, #24
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2]
	str	r3, [r2, #4]
	str	r3, [r2, #8]
	str	r3, [r2, #12]
	mov	r3, #2
	strh	r3, [fp, #-24]	@ movhi
	ldr	r0, .L4+4
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-22]	@ movhi
	sub	r3, fp, #24
	add	r3, r3, #4
	mov	r2, r3
	ldr	r1, .L4+8
	mov	r0, #2
	bl	inet_pton
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	connect
	ldr	r0, [fp, #-28]
	bl	handle_connection
	mov	r3, #0
	ldr	r2, .L4
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC1
	.word	8787
	.word	.LC0
	.size	main, .-main
	.section	.rodata
	.align	2
.LC2:
	.ascii	"client: server is closed.\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_connection, %function
handle_connection:
	@ args = 0, pretend = 0, frame = 2080
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2080
	str	r0, [fp, #-2080]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-2080]
	str	r3, [fp, #-2072]
	sub	r3, fp, #4
	sub	r3, r3, #2064
	sub	r3, r3, #4
	mov	r2, #1
	strh	r2, [r3, #4]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-2064]
	sub	r3, fp, #4
	sub	r3, r3, #2064
	sub	r3, r3, #4
	mov	r2, #1
	strh	r2, [r3, #12]	@ movhi
.L11:
	sub	r3, fp, #2064
	sub	r3, r3, #4
	sub	r3, r3, #4
	mvn	r2, #0
	mov	r1, #2
	mov	r0, r3
	bl	poll
	sub	r3, fp, #4
	sub	r3, r3, #2064
	sub	r3, r3, #4
	ldrsh	r3, [r3, #6]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L7
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-2080]
	bl	read
	str	r0, [fp, #-2076]
	ldr	r3, [fp, #-2076]
	cmp	r3, #0
	bne	.L8
	ldr	r3, .L13+4
	ldr	r3, [r3]
	mov	r2, #26
	mov	r1, #1
	ldr	r0, .L13+8
	bl	fwrite
	ldr	r0, [fp, #-2080]
	bl	close
.L8:
	ldr	r2, [fp, #-2076]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	mov	r0, #1
	bl	write
.L7:
	sub	r3, fp, #4
	sub	r3, r3, #2064
	sub	r3, r3, #4
	ldrsh	r3, [r3, #14]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L11
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	mov	r0, #0
	bl	read
	str	r0, [fp, #-2076]
	ldr	r3, [fp, #-2076]
	cmp	r3, #0
	bne	.L10
	mov	r1, #1
	ldr	r0, [fp, #-2080]
	bl	shutdown
	b	.L9
.L10:
	ldr	r2, [fp, #-2076]
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-2080]
	bl	write
.L9:
	b	.L11
.L14:
	.align	2
.L13:
	.word	.LC3
	.word	stderr
	.word	.LC2
	.size	handle_connection, .-handle_connection
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
