	.file	"32300.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Could not create socket\n"
.LC1:
	.string	"Could not bind socket\n"
.LC2:
	.string	"Could not listen on socket\n"
.LC3:
	.string	"Server is listening on %d\n"
	.align 8
.LC4:
	.string	"Could not establish new connection\n"
.LC5:
	.string	"Client read failed\n"
.LC6:
	.string	"Received: %s\n"
.LC7:
	.string	"Client write failed\n"
	.text
	.type	run, @function
run:
.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, 1120
	mov	DWORD PTR -1108[rbp], edi
	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 -1088[rbp], eax
	cmp	DWORD PTR -1088[rbp], 0
	jns	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 24
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	WORD PTR -1072[rbp], 2
	mov	eax, DWORD PTR -1108[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -1070[rbp], ax
	mov	edi, 2130706433
	call	htonl@PLT
	mov	DWORD PTR -1068[rbp], eax
	mov	BYTE PTR -1093[rbp], 1
	lea	rdx, -1093[rbp]
	mov	eax, DWORD PTR -1088[rbp]
	mov	r8d, 1
	mov	rcx, rdx
	mov	edx, 2
	mov	esi, 1
	mov	edi, eax
	call	setsockopt@PLT
	lea	rcx, -1072[rbp]
	mov	eax, DWORD PTR -1088[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	mov	DWORD PTR -1084[rbp], eax
	cmp	DWORD PTR -1084[rbp], 0
	jns	.L3
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 22
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	eax, DWORD PTR -1088[rbp]
	mov	esi, 128
	mov	edi, eax
	call	listen@PLT
	mov	DWORD PTR -1084[rbp], eax
	cmp	DWORD PTR -1084[rbp], 0
	jns	.L4
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 27
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	eax, DWORD PTR -1108[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
.L10:
	mov	DWORD PTR -1092[rbp], 16
	lea	rax, -1040[rbp]
	mov	edx, 1024
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rdx, -1092[rbp]
	lea	rcx, -1056[rbp]
	mov	eax, DWORD PTR -1088[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -1080[rbp], eax
	cmp	DWORD PTR -1080[rbp], 0
	jns	.L5
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 35
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1080[rbp]
	mov	ecx, 0
	mov	edx, 1024
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -1076[rbp], eax
	cmp	DWORD PTR -1076[rbp], 0
	je	.L13
	cmp	DWORD PTR -1076[rbp], 0
	jns	.L8
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 19
	mov	esi, 1
	lea	rdi, .LC5[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	lea	rax, -1040[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -1076[rbp]
	movsx	rdx, eax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1080[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -1084[rbp], eax
	cmp	DWORD PTR -1084[rbp], 0
	jns	.L5
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 20
	mov	esi, 1
	lea	rdi, .LC7[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	edi, 1
	call	exit@PLT
.L13:
	nop
	jmp	.L10
	.cfi_endproc
.LFE6:
	.size	run, .-run
	.section	.rodata
.LC8:
	.string	"Usage: %s [port]\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 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
	cmp	DWORD PTR -36[rbp], 1
	jg	.L15
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	edi, 1
	call	exit@PLT
.L15:
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rcx, -24[rbp]
	mov	edx, 10
	mov	rsi, rcx
	mov	rdi, rax
	call	strtol@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L16
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	edi, 1
	call	exit@PLT
.L16:
	mov	rax, QWORD PTR -16[rbp]
	mov	edi, eax
	call	run
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"32300.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Could not create socket\012\000"
	.align	2
.LC1:
	.ascii	"Could not bind socket\012\000"
	.align	2
.LC2:
	.ascii	"Could not listen on socket\012\000"
	.align	2
.LC3:
	.ascii	"Server is listening on %d\012\000"
	.align	2
.LC4:
	.ascii	"Could not establish new connection\012\000"
	.align	2
.LC5:
	.ascii	"Client read failed\012\000"
	.align	2
.LC6:
	.ascii	"Received: %s\012\000"
	.align	2
.LC7:
	.ascii	"Client write failed\012\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	run, %function
run:
	@ args = 0, pretend = 0, frame = 1096
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1104
	str	r0, [fp, #-1096]
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-1080]
	ldr	r3, [fp, #-1080]
	cmp	r3, #0
	bge	.L2
	ldr	r3, .L14+4
	ldr	r3, [r3]
	mov	r2, #24
	mov	r1, #1
	ldr	r0, .L14+8
	bl	fwrite
	ldr	r3, .L14+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	mov	r0, #1
	bl	exit
.L2:
	sub	r3, fp, #4
	sub	r3, r3, #1056
	sub	r3, r3, #4
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-1096]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4
	sub	r3, r3, #1056
	sub	r3, r3, #4
	strh	r2, [r3, #2]	@ movhi
	ldr	r0, .L14+12
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-1060]
	mov	r3, #1
	strb	r3, [fp, #-1085]
	sub	r3, fp, #1072
	sub	r3, r3, #4
	sub	r3, r3, #9
	mov	r2, #1
	str	r2, [sp]
	mov	r2, #2
	mov	r1, #1
	ldr	r0, [fp, #-1080]
	bl	setsockopt
	sub	r3, fp, #1056
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-1080]
	bl	bind
	str	r0, [fp, #-1076]
	ldr	r3, [fp, #-1076]
	cmp	r3, #0
	bge	.L3
	ldr	r3, .L14+4
	ldr	r3, [r3]
	mov	r2, #22
	mov	r1, #1
	ldr	r0, .L14+16
	bl	fwrite
	ldr	r3, .L14+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	mov	r0, #1
	bl	exit
.L3:
	mov	r1, #128
	ldr	r0, [fp, #-1080]
	bl	listen
	str	r0, [fp, #-1076]
	ldr	r3, [fp, #-1076]
	cmp	r3, #0
	bge	.L4
	ldr	r3, .L14+4
	ldr	r3, [r3]
	mov	r2, #27
	mov	r1, #1
	ldr	r0, .L14+20
	bl	fwrite
	ldr	r3, .L14+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	mov	r0, #1
	bl	exit
.L4:
	ldr	r1, [fp, #-1096]
	ldr	r0, .L14+24
	bl	printf
.L10:
	mov	r3, #16
	str	r3, [fp, #-1084]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r2, fp, #1072
	sub	r2, r2, #4
	sub	r2, r2, #8
	sub	r3, fp, #1040
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-1080]
	bl	accept
	str	r0, [fp, #-1072]
	ldr	r3, [fp, #-1072]
	cmp	r3, #0
	bge	.L5
	ldr	r3, .L14+4
	ldr	r3, [r3]
	mov	r2, #35
	mov	r1, #1
	ldr	r0, .L14+28
	bl	fwrite
	ldr	r3, .L14+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	mov	r0, #1
	bl	exit
.L5:
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #1024
	ldr	r0, [fp, #-1072]
	bl	recv
	str	r0, [fp, #-1068]
	ldr	r3, [fp, #-1068]
	cmp	r3, #0
	beq	.L13
	ldr	r3, [fp, #-1068]
	cmp	r3, #0
	bge	.L8
	ldr	r3, .L14+4
	ldr	r3, [r3]
	mov	r2, #19
	mov	r1, #1
	ldr	r0, .L14+32
	bl	fwrite
	ldr	r3, .L14+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	mov	r0, #1
	bl	exit
.L8:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L14+36
	bl	printf
	ldr	r2, [fp, #-1068]
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1072]
	bl	send
	str	r0, [fp, #-1076]
	ldr	r3, [fp, #-1076]
	cmp	r3, #0
	bge	.L5
	ldr	r3, .L14+4
	ldr	r3, [r3]
	mov	r2, #20
	mov	r1, #1
	ldr	r0, .L14+40
	bl	fwrite
	ldr	r3, .L14+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	mov	r0, #1
	bl	exit
.L13:
	nop
	b	.L10
.L15:
	.align	2
.L14:
	.word	.LC8
	.word	stderr
	.word	.LC0
	.word	2130706433
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	run, .-run
	.section	.rodata
	.align	2
.LC9:
	.ascii	"Usage: %s [port]\012\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	bgt	.L17
	ldr	r3, .L21+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L21+8
	bl	fprintf
	ldr	r3, .L21+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	mov	r0, #1
	bl	exit
.L17:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r1, fp, #16
	mov	r2, #10
	mov	r0, r3
	bl	strtol
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L18
	ldr	r3, .L21+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L21+8
	bl	fprintf
	ldr	r3, .L21+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	mov	r0, #1
	bl	exit
.L18:
	ldr	r0, [fp, #-12]
	bl	run
	mov	r3, #0
	ldr	r2, .L21
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L20
	bl	__stack_chk_fail
.L20:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC10
	.word	stderr
	.word	.LC9
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
