	.file	"667446.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"[ERROR] %s\n"
	.text
	.globl	error
	.type	error, @function
error:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, -1
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	error, .-error
	.globl	serveraddr
	.bss
	.align 16
	.type	serveraddr, @object
	.size	serveraddr, 16
serveraddr:
	.zero	16
	.section	.rodata
.LC1:
	.string	"error in read"
.LC2:
	.string	"Found it!"
	.align 8
.LC3:
	.string	"Received %d bytes, content = %s\n"
	.text
	.globl	recv_func
	.type	recv_func, @function
recv_func:
.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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -48[rbp], 16
	mov	DWORD PTR -44[rbp], 0
	mov	edi, 4096
	call	malloc@PLT
	mov	QWORD PTR -40[rbp], rax
	mov	rcx, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	edx, 4096
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -44[rbp], eax
	cmp	DWORD PTR -44[rbp], 0
	jns	.L3
	lea	rdi, .LC1[rip]
	call	error
.L3:
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 80
	jne	.L4
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	cmp	al, 87
	jne	.L4
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 2
	movzx	eax, BYTE PTR [rax]
	cmp	al, 78
	jne	.L4
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 3
	movzx	eax, BYTE PTR [rax]
	cmp	al, 73
	jne	.L4
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 4
	movzx	eax, BYTE PTR [rax]
	cmp	al, 84
	jne	.L4
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	eax, 0
	mov	edx, 0
	call	rdx
.L4:
	mov	rdx, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR -44[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	recv_func, .-recv_func
	.section	.rodata
.LC4:
	.string	"ERROR opening socket"
.LC5:
	.string	"ERROR on binding"
	.align 8
.LC6:
	.string	"Failed to start listening on the port"
.LC7:
	.string	"Accept failed"
	.text
	.globl	main
	.type	main, @function
main:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -20[rbp], 7715
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -16[rbp], eax
	cmp	DWORD PTR -16[rbp], 0
	jns	.L7
	lea	rdi, .LC4[rip]
	call	error
.L7:
	mov	DWORD PTR -24[rbp], 1
	lea	rdx, -24[rbp]
	mov	eax, DWORD PTR -16[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 2
	mov	esi, 1
	mov	edi, eax
	call	setsockopt@PLT
	mov	edx, 16
	mov	esi, 0
	lea	rdi, serveraddr[rip]
	call	memset@PLT
	mov	WORD PTR serveraddr[rip], 2
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR serveraddr[rip+4], eax
	mov	eax, DWORD PTR -20[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR serveraddr[rip+2], ax
	mov	eax, DWORD PTR -16[rbp]
	mov	edx, 16
	lea	rsi, serveraddr[rip]
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L8
	lea	rdi, .LC5[rip]
	call	error
.L8:
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, 3
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	jns	.L9
	lea	rdi, .LC6[rip]
	call	error
.L9:
	mov	DWORD PTR -28[rbp], 16
.L11:
	lea	rdx, -28[rbp]
	mov	eax, DWORD PTR -16[rbp]
	lea	rsi, serveraddr[rip]
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jns	.L10
	lea	rdi, .LC7[rip]
	call	error
.L10:
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	recv_func
	jmp	.L11
	.cfi_endproc
.LFE8:
	.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	"667446.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"[ERROR] %s\012\000"
	.text
	.align	2
	.global	error
	.syntax unified
	.arm
	.fpu softvfp
	.type	error, %function
error:
	@ 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	r1, [fp, #-8]
	ldr	r0, .L2
	bl	printf
	mvn	r0, #0
	bl	exit
.L3:
	.align	2
.L2:
	.word	.LC0
	.size	error, .-error
	.comm	serveraddr,16,4
	.section	.rodata
	.align	2
.LC1:
	.ascii	"error in read\000"
	.align	2
.LC2:
	.ascii	"Found it!\000"
	.align	2
.LC3:
	.ascii	"Received %d bytes, content = %s\012\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	recv_func
	.syntax unified
	.arm
	.fpu softvfp
	.type	recv_func, %function
recv_func:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #16
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r0, #4096
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-28]
	mov	r2, #4096
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-40]
	bl	read
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bge	.L5
	ldr	r0, .L8+4
	bl	error
.L5:
	ldr	r3, [fp, #-28]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #80
	bne	.L6
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #87
	bne	.L6
	ldr	r3, [fp, #-28]
	add	r3, r3, #2
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #78
	bne	.L6
	ldr	r3, [fp, #-28]
	add	r3, r3, #3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #73
	bne	.L6
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #84
	bne	.L6
	ldr	r0, .L8+8
	bl	puts
	mov	r3, #0
	blx	r3
.L6:
	ldr	r2, [fp, #-28]
	ldr	r1, [fp, #-32]
	ldr	r0, .L8+12
	bl	printf
	ldr	r0, [fp, #-28]
	bl	free
	nop
	ldr	r3, .L8
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L7
	bl	__stack_chk_fail
.L7:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC4
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	recv_func, .-recv_func
	.section	.rodata
	.align	2
.LC5:
	.ascii	"ERROR opening socket\000"
	.align	2
.LC6:
	.ascii	"ERROR on binding\000"
	.align	2
.LC7:
	.ascii	"Failed to start listening on the port\000"
	.align	2
.LC8:
	.ascii	"Accept failed\000"
	.align	2
.LC9:
	.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, #40
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L17+4
	str	r3, [fp, #-20]
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L11
	ldr	r0, .L17+8
	bl	error
.L11:
	mov	r3, #1
	str	r3, [fp, #-24]
	sub	r3, fp, #24
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #2
	mov	r1, #1
	ldr	r0, [fp, #-16]
	bl	setsockopt
	mov	r2, #16
	mov	r1, #0
	ldr	r0, .L17+12
	bl	memset
	ldr	r3, .L17+12
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	ldr	r2, .L17+12
	str	r3, [r2, #4]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L17+12
	strh	r2, [r3, #2]	@ movhi
	mov	r2, #16
	ldr	r1, .L17+12
	ldr	r0, [fp, #-16]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L12
	ldr	r0, .L17+16
	bl	error
.L12:
	mov	r1, #3
	ldr	r0, [fp, #-16]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	bge	.L13
	ldr	r0, .L17+20
	bl	error
.L13:
	mov	r3, #16
	str	r3, [fp, #-28]
.L15:
	sub	r3, fp, #28
	mov	r2, r3
	ldr	r1, .L17+12
	ldr	r0, [fp, #-16]
	bl	accept
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L14
	ldr	r0, .L17+24
	bl	error
.L14:
	ldr	r0, [fp, #-12]
	bl	recv_func
	b	.L15
.L18:
	.align	2
.L17:
	.word	.LC9
	.word	7715
	.word	.LC5
	.word	serveraddr
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
