	.file	"341332.c"
	.intel_syntax noprefix
	.text
	.globl	listener_d
	.bss
	.align 4
	.type	listener_d, @object
	.size	listener_d, 4
listener_d:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%s: %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
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -8[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	error, .-error
	.globl	catch_signal
	.type	catch_signal, @function
catch_signal:
.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, 176
	mov	DWORD PTR -164[rbp], edi
	mov	QWORD PTR -176[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -176[rbp]
	mov	QWORD PTR -160[rbp], rax
	lea	rax, -160[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sigemptyset@PLT
	mov	DWORD PTR -24[rbp], 0
	lea	rcx, -160[rbp]
	mov	eax, DWORD PTR -164[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	sigaction@PLT
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	catch_signal, .-catch_signal
	.section	.rodata
.LC1:
	.string	"Bye!\n"
	.text
	.globl	handle_shutdown
	.type	handle_shutdown, @function
handle_shutdown:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR listener_d[rip]
	test	eax, eax
	je	.L6
	mov	eax, DWORD PTR listener_d[rip]
	mov	edi, eax
	call	close@PLT
.L6:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 5
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE8:
	.size	handle_shutdown, .-handle_shutdown
	.section	.rodata
.LC2:
	.string	"Can't open listener socket"
	.text
	.globl	open_listener_socket
	.type	open_listener_socket, @function
open_listener_socket:
.LFB9:
	.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	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L8
	lea	rdi, .LC2[rip]
	call	error
.L8:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	open_listener_socket, .-open_listener_socket
	.section	.rodata
.LC3:
	.string	"Can't open client socket"
	.text
	.globl	open_client_socket
	.type	open_client_socket, @function
open_client_socket:
.LFB10:
	.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	eax, DWORD PTR listener_d[rip]
	lea	rdx, address_size.0[rip]
	lea	rsi, client_address.1[rip]
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L11
	lea	rdi, .LC3[rip]
	call	error
.L11:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	open_client_socket, .-open_client_socket
	.section	.rodata
	.align 8
.LC4:
	.string	"Can't set the 'reuse' option on the socket"
.LC5:
	.string	"Can't bind to socket"
	.text
	.globl	bind_to_port
	.type	bind_to_port, @function
bind_to_port:
.LFB11:
	.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	DWORD PTR -56[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	WORD PTR -32[rbp], 2
	mov	eax, DWORD PTR -56[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -30[rbp], ax
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -28[rbp], eax
	mov	DWORD PTR -40[rbp], 1
	lea	rdx, -40[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 2
	mov	esi, 1
	mov	edi, eax
	call	setsockopt@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], -1
	jne	.L14
	lea	rdi, .LC4[rip]
	call	error
.L14:
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], -1
	jne	.L17
	lea	rdi, .LC5[rip]
	call	error
.L17:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	bind_to_port, .-bind_to_port
	.section	.rodata
.LC6:
	.string	"Error talking to the client"
	.text
	.globl	say
	.type	say, @function
say:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rsi, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L19
	lea	rdi, .LC6[rip]
	call	error
.L19:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	say, .-say
	.section	.rodata
.LC7:
	.string	"r"
.LC8:
	.string	"fgetc"
	.text
	.globl	read_in
	.type	read_in, @function
read_in:
.LFB13:
	.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, 40
	.cfi_offset 3, -24
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -40[rbp], edx
	mov	eax, DWORD PTR -36[rbp]
	lea	rsi, .LC7[rip]
	mov	edi, eax
	call	fdopen@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	DWORD PTR -32[rbp], 0
	nop
.L23:
	call	__ctype_b_loc@PLT
	mov	rbx, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	add	rax, rax
	add	rax, rbx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 8192
	test	eax, eax
	je	.L22
	cmp	DWORD PTR -28[rbp], -1
	jne	.L23
.L22:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	ferror@PLT
	test	eax, eax
	je	.L25
	lea	rdi, .LC8[rip]
	call	error
	jmp	.L25
.L28:
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -40[rbp]
	jge	.L26
	mov	eax, DWORD PTR -32[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -32[rbp], edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -28[rbp]
	mov	BYTE PTR [rax], dl
.L26:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	DWORD PTR -28[rbp], eax
.L25:
	cmp	DWORD PTR -28[rbp], 10
	je	.L27
	cmp	DWORD PTR -28[rbp], -1
	jne	.L28
.L27:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	ferror@PLT
	test	eax, eax
	je	.L30
	lea	rdi, .LC8[rip]
	call	error
	jmp	.L30
.L31:
	mov	eax, DWORD PTR -32[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
.L30:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	sub	DWORD PTR -32[rbp], 1
	mov	eax, DWORD PTR -32[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 8192
	test	eax, eax
	jne	.L31
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	read_in, .-read_in
	.globl	intro_msg
	.data
	.align 32
	.type	intro_msg, @object
	.size	intro_msg, 52
intro_msg:
	.string	"Internet Knock-Knock Protocol Server\nKnock, knock.\n"
	.section	.rodata
.LC9:
	.string	"Setting interrupt handler"
.LC10:
	.string	"Can't listen"
	.align 8
.LC11:
	.string	"Waiting for connection on port %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 304
	mov	DWORD PTR -292[rbp], edi
	mov	QWORD PTR -304[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rsi, handle_shutdown[rip]
	mov	edi, 2
	call	catch_signal
	cmp	eax, -1
	jne	.L34
	lea	rdi, .LC9[rip]
	call	error
.L34:
	mov	DWORD PTR -280[rbp], 30000
	call	open_listener_socket
	mov	DWORD PTR listener_d[rip], eax
	mov	eax, DWORD PTR listener_d[rip]
	mov	edx, DWORD PTR -280[rbp]
	mov	esi, edx
	mov	edi, eax
	call	bind_to_port
	mov	eax, DWORD PTR listener_d[rip]
	mov	esi, 10
	mov	edi, eax
	call	listen@PLT
	cmp	eax, -1
	jne	.L38
	lea	rdi, .LC10[rip]
	call	error
.L38:
	mov	eax, DWORD PTR -280[rbp]
	mov	esi, eax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	call	open_client_socket
	mov	DWORD PTR -276[rbp], eax
	mov	eax, DWORD PTR -276[rbp]
	lea	rsi, intro_msg[rip]
	mov	edi, eax
	call	say
	cmp	eax, -1
	jne	.L36
	mov	eax, DWORD PTR -276[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L37
.L36:
	mov	eax, DWORD PTR -276[rbp]
	mov	edi, eax
	call	close@PLT
.L37:
	jmp	.L38
	.cfi_endproc
.LFE14:
	.size	main, .-main
	.local	client_address.1
	.comm	client_address.1,128,32
	.data
	.align 4
	.type	address_size.0, @object
	.size	address_size.0, 4
address_size.0:
	.long	128
	.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	"341332.c"
	.text
	.global	listener_d
	.bss
	.align	2
	.type	listener_d, %object
	.size	listener_d, 4
listener_d:
	.space	4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s: %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	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	ldr	r3, .L2
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	ldr	r2, [fp, #-16]
	ldr	r1, .L2+4
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L3:
	.align	2
.L2:
	.word	stderr
	.word	.LC0
	.size	error, .-error
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	catch_signal
	.syntax unified
	.arm
	.fpu softvfp
	.type	catch_signal, %function
catch_signal:
	@ args = 0, pretend = 0, frame = 152
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #152
	str	r0, [fp, #-152]
	str	r1, [fp, #-156]
	ldr	r3, .L7
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-156]
	str	r3, [fp, #-148]
	sub	r3, fp, #148
	add	r3, r3, #4
	mov	r0, r3
	bl	sigemptyset
	mov	r3, #0
	str	r3, [fp, #-16]
	sub	r3, fp, #148
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-152]
	bl	sigaction
	mov	r3, r0
	ldr	r2, .L7
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L6
	bl	__stack_chk_fail
.L6:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC1
	.size	catch_signal, .-catch_signal
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Bye!\012\000"
	.text
	.align	2
	.global	handle_shutdown
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_shutdown, %function
handle_shutdown:
	@ 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	r3, .L11
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L10
	ldr	r3, .L11
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
.L10:
	ldr	r3, .L11+4
	ldr	r3, [r3]
	mov	r2, #5
	mov	r1, #1
	ldr	r0, .L11+8
	bl	fwrite
	mov	r0, #0
	bl	exit
.L12:
	.align	2
.L11:
	.word	listener_d
	.word	stderr
	.word	.LC2
	.size	handle_shutdown, .-handle_shutdown
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Can't open listener socket\000"
	.text
	.align	2
	.global	open_listener_socket
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_listener_socket, %function
open_listener_socket:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L14
	ldr	r0, .L16
	bl	error
.L14:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC3
	.size	open_listener_socket, .-open_listener_socket
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Can't open client socket\000"
	.text
	.align	2
	.global	open_client_socket
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_client_socket, %function
open_client_socket:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L21
	ldr	r3, [r3]
	ldr	r2, .L21+4
	ldr	r1, .L21+8
	mov	r0, r3
	bl	accept
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L19
	ldr	r0, .L21+12
	bl	error
.L19:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	listener_d
	.word	address_size.6754
	.word	client_address.6753
	.word	.LC4
	.size	open_client_socket, .-open_client_socket
	.section	.rodata
	.align	2
.LC5:
	.ascii	"Can't set the 'reuse' option on the socket\000"
	.align	2
.LC6:
	.ascii	"Can't bind to socket\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	bind_to_port
	.syntax unified
	.arm
	.fpu softvfp
	.type	bind_to_port, %function
bind_to_port:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L28
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #2
	strh	r3, [fp, #-24]	@ movhi
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-22]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-20]
	mov	r3, #1
	str	r3, [fp, #-32]
	sub	r3, fp, #32
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #2
	mov	r1, #1
	ldr	r0, [fp, #-40]
	bl	setsockopt
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmn	r3, #1
	bne	.L24
	ldr	r0, .L28+4
	bl	error
.L24:
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-40]
	bl	bind
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmn	r3, #1
	bne	.L27
	ldr	r0, .L28+8
	bl	error
.L27:
	nop
	ldr	r3, .L28
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L26
	bl	__stack_chk_fail
.L26:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L29:
	.align	2
.L28:
	.word	.LC7
	.word	.LC5
	.word	.LC6
	.size	bind_to_port, .-bind_to_port
	.section	.rodata
	.align	2
.LC8:
	.ascii	"Error talking to the client\000"
	.text
	.align	2
	.global	say
	.syntax unified
	.arm
	.fpu softvfp
	.type	say, %function
say:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r0, [fp, #-20]
	bl	strlen
	mov	r2, r0
	mov	r3, #0
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	send
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L31
	ldr	r0, .L33
	bl	error
.L31:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L34:
	.align	2
.L33:
	.word	.LC8
	.size	say, .-say
	.section	.rodata
	.align	2
.LC9:
	.ascii	"r\000"
	.align	2
.LC10:
	.ascii	"fgetc\000"
	.text
	.align	2
	.global	read_in
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_in, %function
read_in:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	str	r2, [fp, #-40]
	ldr	r1, .L47
	ldr	r0, [fp, #-32]
	bl	fdopen
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-24]
	nop
.L37:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r4, [r3]
	ldr	r0, [fp, #-16]
	bl	fgetc
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #1
	add	r3, r4, r3
	ldrh	r3, [r3]
	and	r3, r3, #8192
	cmp	r3, #0
	beq	.L36
	ldr	r3, [fp, #-20]
	cmn	r3, #1
	bne	.L37
.L36:
	ldr	r0, [fp, #-16]
	bl	ferror
	mov	r3, r0
	cmp	r3, #0
	beq	.L39
	ldr	r0, .L47+4
	bl	error
	b	.L39
.L42:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	bge	.L40
	ldr	r3, [fp, #-24]
	add	r2, r3, #1
	str	r2, [fp, #-24]
	mov	r2, r3
	ldr	r3, [fp, #-36]
	add	r3, r3, r2
	ldr	r2, [fp, #-20]
	and	r2, r2, #255
	strb	r2, [r3]
.L40:
	ldr	r0, [fp, #-16]
	bl	fgetc
	str	r0, [fp, #-20]
.L39:
	ldr	r3, [fp, #-20]
	cmp	r3, #10
	beq	.L41
	ldr	r3, [fp, #-20]
	cmn	r3, #1
	bne	.L42
.L41:
	ldr	r0, [fp, #-16]
	bl	ferror
	mov	r3, r0
	cmp	r3, #0
	beq	.L44
	ldr	r0, .L47+4
	bl	error
	b	.L44
.L45:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
.L44:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	ldr	r1, [fp, #-36]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #8192
	cmp	r3, #0
	bne	.L45
	ldr	r0, [fp, #-36]
	bl	strlen
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L48:
	.align	2
.L47:
	.word	.LC9
	.word	.LC10
	.size	read_in, .-read_in
	.global	intro_msg
	.data
	.align	2
	.type	intro_msg, %object
	.size	intro_msg, 52
intro_msg:
	.ascii	"Internet Knock-Knock Protocol Server\012Knock, knoc"
	.ascii	"k.\012\000"
	.section	.rodata
	.align	2
.LC11:
	.ascii	"Setting interrupt handler\000"
	.align	2
.LC12:
	.ascii	"Can't listen\000"
	.align	2
.LC13:
	.ascii	"Waiting for connection on port %d\012\000"
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 280
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #280
	str	r0, [fp, #-280]
	str	r1, [fp, #-284]
	ldr	r3, .L56
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L56+4
	mov	r0, #2
	bl	catch_signal
	mov	r3, r0
	cmn	r3, #1
	bne	.L50
	ldr	r0, .L56+8
	bl	error
.L50:
	ldr	r3, .L56+12
	str	r3, [fp, #-272]
	bl	open_listener_socket
	mov	r3, r0
	ldr	r2, .L56+16
	str	r3, [r2]
	ldr	r3, .L56+16
	ldr	r3, [r3]
	ldr	r1, [fp, #-272]
	mov	r0, r3
	bl	bind_to_port
	ldr	r3, .L56+16
	ldr	r3, [r3]
	mov	r1, #10
	mov	r0, r3
	bl	listen
	mov	r3, r0
	cmn	r3, #1
	bne	.L54
	ldr	r0, .L56+20
	bl	error
.L54:
	ldr	r1, [fp, #-272]
	ldr	r0, .L56+24
	bl	printf
	bl	open_client_socket
	str	r0, [fp, #-268]
	ldr	r1, .L56+28
	ldr	r0, [fp, #-268]
	bl	say
	mov	r3, r0
	cmn	r3, #1
	bne	.L52
	ldr	r0, [fp, #-268]
	bl	close
	b	.L53
.L52:
	ldr	r0, [fp, #-268]
	bl	close
.L53:
	b	.L54
.L57:
	.align	2
.L56:
	.word	.LC14
	.word	handle_shutdown
	.word	.LC11
	.word	30000
	.word	listener_d
	.word	.LC12
	.word	.LC13
	.word	intro_msg
	.size	main, .-main
	.local	client_address.6753
	.comm	client_address.6753,128,4
	.data
	.align	2
	.type	address_size.6754, %object
	.size	address_size.6754, 4
address_size.6754:
	.word	128
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
