	.file	"441434.c"
	.intel_syntax noprefix
	.text
	.globl	child_pid
	.bss
	.align 4
	.type	child_pid, @object
	.size	child_pid, 4
child_pid:
	.zero	4
	.globl	port_flag
	.align 4
	.type	port_flag, @object
	.size	port_flag, 4
port_flag:
	.zero	4
	.globl	compress_flag
	.align 4
	.type	compress_flag, @object
	.size	compress_flag, 4
compress_flag:
	.zero	4
	.globl	port
	.data
	.align 4
	.type	port, @object
	.size	port, 4
port:
	.long	-1
	.globl	new_sfd
	.bss
	.align 4
	.type	new_sfd, @object
	.size	new_sfd, 4
new_sfd:
	.zero	4
	.globl	deflate_stream
	.align 32
	.type	deflate_stream, @object
	.size	deflate_stream, 112
deflate_stream:
	.zero	112
	.globl	inflate_stream
	.align 32
	.type	inflate_stream, @object
	.size	inflate_stream, 112
inflate_stream:
	.zero	112
	.section	.rodata
.LC0:
	.string	"Error reading stdin: %s\n"
	.text
	.globl	safe_read
	.type	safe_read, @function
safe_read:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -24[rbp], edx
	mov	eax, DWORD PTR -24[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L2
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	safe_read, .-safe_read
	.section	.rodata
.LC1:
	.string	"Error writing to stdout: %s\n"
	.text
	.globl	safe_write
	.type	safe_write, @function
safe_write:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -24[rbp], edx
	mov	eax, DWORD PTR -24[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L5
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	safe_write, .-safe_write
	.section	.rodata
	.align 8
.LC2:
	.ascii	"Usage: ./lab1b-server --port=number [OPTION]...\nThe server "
	.ascii	"pro"
	.string	"gram will connect with the client,\nreceive the client's commands and send them to the shell, \nand will \"serve\" the client the outputs of those commands.\n\n\t--port=number   specify the port number for connection\n\t--compress      compress the communication\n\t\t"
	.text
	.globl	getUsage
	.type	getUsage, @function
getUsage:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rax, .LC2[rip]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	getUsage, .-getUsage
	.section	.rodata
.LC3:
	.string	"Erorr during dup2: %s\n"
	.text
	.globl	safe_dup2
	.type	safe_dup2, @function
safe_dup2:
.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	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, edx
	mov	edi, eax
	call	dup2@PLT
	cmp	eax, -1
	jne	.L11
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L11:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	safe_dup2, .-safe_dup2
	.section	.rodata
.LC4:
	.string	"Erorr closing fd: %s\n"
	.text
	.globl	safe_close
	.type	safe_close, @function
safe_close:
.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	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	close@PLT
	cmp	eax, -1
	jne	.L14
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L14:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	safe_close, .-safe_close
	.section	.rodata
.LC5:
	.string	"Error executing %s: %s\n"
	.text
	.globl	safe_execvp
	.type	safe_execvp, @function
safe_execvp:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	cmp	eax, -1
	jne	.L17
	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, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L17:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	safe_execvp, .-safe_execvp
	.section	.rodata
.LC6:
	.string	"/bin/bash"
	.text
	.globl	execute_shell
	.type	execute_shell, @function
execute_shell:
.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, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC6[rip]
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -24[rbp], 0
	lea	rdx, -32[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	safe_execvp
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	execute_shell, .-execute_shell
	.globl	handle_child_process
	.type	handle_child_process, @function
handle_child_process:
.LFB13:
	.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	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, 0
	mov	edi, eax
	call	safe_dup2
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 4
	mov	eax, DWORD PTR [rax]
	mov	esi, 1
	mov	edi, eax
	call	safe_dup2
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 4
	mov	eax, DWORD PTR [rax]
	mov	esi, 2
	mov	edi, eax
	call	safe_dup2
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	safe_close
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 4
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	safe_close
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	safe_close
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 4
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	safe_close
	mov	eax, 0
	call	execute_shell
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	handle_child_process, .-handle_child_process
	.section	.rodata
.LC7:
	.string	"Error killing a process: %s\n"
	.text
	.globl	safe_kill
	.type	safe_kill, @function
safe_kill:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, edx
	mov	edi, eax
	call	kill@PLT
	cmp	eax, -1
	jne	.L23
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L23:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	safe_kill, .-safe_kill
	.section	.rodata
.LC8:
	.string	"Error while polling: %s\n"
	.text
	.globl	safe_poll
	.type	safe_poll, @function
safe_poll:
.LFB15:
	.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	DWORD PTR -12[rbp], esi
	mov	DWORD PTR -16[rbp], edx
	mov	eax, DWORD PTR -12[rbp]
	movsx	rcx, eax
	mov	edx, DWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	poll@PLT
	cmp	eax, -1
	jne	.L26
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L26:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	safe_poll, .-safe_poll
	.section	.rodata
.LC9:
	.string	"Error waiting a process: %s\n"
	.text
	.globl	safe_waitpid
	.type	safe_waitpid, @function
safe_waitpid:
.LFB16:
	.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	QWORD PTR -16[rbp], rsi
	mov	DWORD PTR -8[rbp], edx
	mov	edx, DWORD PTR -8[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	waitpid@PLT
	cmp	eax, -1
	jne	.L29
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L29:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	safe_waitpid, .-safe_waitpid
	.section	.rodata
.LC10:
	.string	"SIGPIPE detected\n"
	.text
	.globl	handle_sigpipe
	.type	handle_sigpipe, @function
handle_sigpipe:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	edx, 17
	lea	rsi, .LC10[rip]
	mov	edi, 2
	call	write@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE17:
	.size	handle_sigpipe, .-handle_sigpipe
	.section	.rodata
.LC11:
	.string	"Error deflating data\n"
	.text
	.globl	safe_deflate
	.type	safe_deflate, @function
safe_deflate:
.LFB18:
	.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	DWORD PTR -12[rbp], esi
	mov	edx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	deflate@PLT
	test	eax, eax
	je	.L33
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 21
	mov	esi, 1
	lea	rdi, .LC11[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L33:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	safe_deflate, .-safe_deflate
	.globl	simple_deflate
	.type	simple_deflate, @function
simple_deflate:
.LFB19:
	.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	QWORD PTR -296[rbp], rdi
	mov	QWORD PTR -304[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -304[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR deflate_stream[rip+8], eax
	mov	rax, QWORD PTR -296[rbp]
	mov	QWORD PTR deflate_stream[rip], rax
	mov	DWORD PTR deflate_stream[rip+32], 256
	lea	rax, -272[rbp]
	mov	QWORD PTR deflate_stream[rip+24], rax
.L35:
	mov	esi, 2
	lea	rdi, deflate_stream[rip]
	call	safe_deflate
	mov	eax, DWORD PTR deflate_stream[rip+8]
	test	eax, eax
	jne	.L35
	mov	edx, DWORD PTR deflate_stream[rip+32]
	mov	eax, 256
	sub	eax, edx
	mov	edx, eax
	mov	rax, QWORD PTR -304[rbp]
	mov	DWORD PTR [rax], edx
	mov	DWORD PTR -276[rbp], 0
	jmp	.L36
.L37:
	mov	eax, DWORD PTR -276[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -296[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -276[rbp]
	cdqe
	movzx	eax, BYTE PTR -272[rbp+rax]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -276[rbp], 1
.L36:
	mov	rax, QWORD PTR -304[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -276[rbp], eax
	jl	.L37
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L38
	call	__stack_chk_fail@PLT
.L38:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	simple_deflate, .-simple_deflate
	.section	.rodata
.LC12:
	.string	"Error inflating data\n"
	.text
	.globl	safe_inflate
	.type	safe_inflate, @function
safe_inflate:
.LFB20:
	.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	DWORD PTR -12[rbp], esi
	mov	edx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	inflate@PLT
	test	eax, eax
	je	.L41
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 21
	mov	esi, 1
	lea	rdi, .LC12[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L41:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	safe_inflate, .-safe_inflate
	.globl	simple_inflate
	.type	simple_inflate, @function
simple_inflate:
.LFB21:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 2096
	mov	QWORD PTR -2088[rbp], rdi
	mov	QWORD PTR -2096[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -2096[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR inflate_stream[rip+8], eax
	mov	rax, QWORD PTR -2088[rbp]
	mov	QWORD PTR inflate_stream[rip], rax
	mov	DWORD PTR inflate_stream[rip+32], 2048
	lea	rax, -2064[rbp]
	mov	QWORD PTR inflate_stream[rip+24], rax
.L43:
	mov	esi, 2
	lea	rdi, inflate_stream[rip]
	call	safe_inflate
	mov	eax, DWORD PTR inflate_stream[rip+8]
	test	eax, eax
	jne	.L43
	mov	edx, DWORD PTR inflate_stream[rip+32]
	mov	eax, 2048
	sub	eax, edx
	mov	edx, eax
	mov	rax, QWORD PTR -2096[rbp]
	mov	DWORD PTR [rax], edx
	mov	DWORD PTR -2068[rbp], 0
	jmp	.L44
.L45:
	mov	eax, DWORD PTR -2068[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -2088[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -2068[rbp]
	cdqe
	movzx	eax, BYTE PTR -2064[rbp+rax]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -2068[rbp], 1
.L44:
	mov	rax, QWORD PTR -2096[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -2068[rbp], eax
	jl	.L45
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L46
	call	__stack_chk_fail@PLT
.L46:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE21:
	.size	simple_inflate, .-simple_inflate
	.section	.rodata
.LC13:
	.string	"\n"
	.text
	.globl	safe_shell_write
	.type	safe_shell_write, @function
safe_shell_write:
.LFB22:
	.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	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	DWORD PTR -4[rbp], 0
	jmp	.L48
.L54:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 4
	jne	.L49
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 4
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	safe_close
	jmp	.L50
.L49:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 3
	jne	.L51
	mov	eax, DWORD PTR child_pid[rip]
	mov	esi, 2
	mov	edi, eax
	call	safe_kill
	jmp	.L50
.L51:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 13
	je	.L52
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	jne	.L53
.L52:
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 4
	mov	eax, DWORD PTR [rax]
	mov	edx, 1
	lea	rsi, .LC13[rip]
	mov	edi, eax
	call	safe_write
	jmp	.L50
.L53:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 4
	mov	eax, DWORD PTR [rax]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	safe_write
.L50:
	add	DWORD PTR -4[rbp], 1
.L48:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L54
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE22:
	.size	safe_shell_write, .-safe_shell_write
	.globl	handle_read_from_socket
	.type	handle_read_from_socket, @function
handle_read_from_socket:
.LFB23:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 2096
	mov	QWORD PTR -2088[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR new_sfd[rip]
	lea	rcx, -2064[rbp]
	mov	edx, 256
	mov	rsi, rcx
	mov	edi, eax
	call	safe_read
	mov	DWORD PTR -2068[rbp], eax
	mov	eax, DWORD PTR compress_flag[rip]
	test	eax, eax
	je	.L56
	lea	rdx, -2068[rbp]
	lea	rax, -2064[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	simple_inflate
.L56:
	mov	edx, DWORD PTR -2068[rbp]
	lea	rcx, -2064[rbp]
	mov	rax, QWORD PTR -2088[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	safe_shell_write
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L57
	call	__stack_chk_fail@PLT
.L57:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE23:
	.size	handle_read_from_socket, .-handle_read_from_socket
	.globl	handle_read_from_child
	.type	handle_read_from_child, @function
handle_read_from_child:
.LFB24:
	.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	QWORD PTR -296[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -296[rbp]
	mov	eax, DWORD PTR [rax]
	lea	rcx, -272[rbp]
	mov	edx, 256
	mov	rsi, rcx
	mov	edi, eax
	call	safe_read
	mov	DWORD PTR -276[rbp], eax
	mov	eax, DWORD PTR compress_flag[rip]
	test	eax, eax
	je	.L59
	lea	rdx, -276[rbp]
	lea	rax, -272[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	simple_deflate
.L59:
	mov	edx, DWORD PTR -276[rbp]
	mov	eax, DWORD PTR new_sfd[rip]
	lea	rcx, -272[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	safe_write
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L60
	call	__stack_chk_fail@PLT
.L60:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE24:
	.size	handle_read_from_child, .-handle_read_from_child
	.globl	read_leftover
	.type	read_leftover, @function
read_leftover:
.LFB25:
	.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	QWORD PTR -296[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	jmp	.L62
.L64:
	mov	eax, DWORD PTR compress_flag[rip]
	test	eax, eax
	je	.L63
	lea	rdx, -276[rbp]
	lea	rax, -272[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	simple_deflate
.L63:
	mov	edx, DWORD PTR -276[rbp]
	mov	eax, DWORD PTR new_sfd[rip]
	lea	rcx, -272[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	safe_write
.L62:
	mov	rax, QWORD PTR -296[rbp]
	mov	eax, DWORD PTR [rax]
	lea	rcx, -272[rbp]
	mov	edx, 256
	mov	rsi, rcx
	mov	edi, eax
	call	safe_read
	mov	DWORD PTR -276[rbp], eax
	mov	eax, DWORD PTR -276[rbp]
	test	eax, eax
	jne	.L64
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L65
	call	__stack_chk_fail@PLT
.L65:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE25:
	.size	read_leftover, .-read_leftover
	.globl	add_observer
	.type	add_observer, @function
add_observer:
.LFB26:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	eax, edx
	mov	WORD PTR -16[rbp], ax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -12[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	movzx	edx, WORD PTR -16[rbp]
	mov	WORD PTR 4[rax], dx
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE26:
	.size	add_observer, .-add_observer
	.section	.rodata
.LC14:
	.string	"Error setting signal: %s\n"
	.text
	.globl	safe_signal
	.type	safe_signal, @function
safe_signal:
.LFB27:
	.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	QWORD PTR -16[rbp], rsi
	mov	rdx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	signal@PLT
	cmp	rax, -1
	jne	.L69
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L69:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE27:
	.size	safe_signal, .-safe_signal
	.section	.rodata
	.align 8
.LC15:
	.string	"SHELL EXIT SIGNAL=%d STATUS=%d\n"
	.text
	.globl	report_child_exit_status
	.type	report_child_exit_status, @function
report_child_exit_status:
.LFB28:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR child_pid[rip]
	lea	rcx, -12[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	safe_waitpid
	mov	eax, DWORD PTR -12[rbp]
	sar	eax, 8
	movzx	edx, al
	mov	eax, DWORD PTR -12[rbp]
	and	eax, 127
	mov	esi, eax
	mov	rax, QWORD PTR stderr[rip]
	mov	ecx, edx
	mov	edx, esi
	lea	rsi, .LC15[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L71
	call	__stack_chk_fail@PLT
.L71:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE28:
	.size	report_child_exit_status, .-report_child_exit_status
	.section	.rodata
.LC16:
	.string	"stdin POLLERR detected: %s\n"
	.align 8
.LC17:
	.string	"backward pipe POLLERR detected: %s\n"
	.text
	.globl	handle_parent_process
	.type	handle_parent_process, @function
handle_parent_process:
.LFB29:
	.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	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, report_child_exit_status[rip]
	call	atexit@PLT
	lea	rsi, handle_sigpipe[rip]
	mov	edi, 13
	call	safe_signal
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	safe_close
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 4
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	safe_close
	mov	ecx, DWORD PTR new_sfd[rip]
	lea	rax, -32[rbp]
	mov	edx, 25
	mov	esi, ecx
	mov	rdi, rax
	call	add_observer
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	lea	rdx, -32[rbp]
	lea	rcx, 8[rdx]
	mov	edx, 25
	mov	esi, eax
	mov	rdi, rcx
	call	add_observer
.L80:
	lea	rax, -32[rbp]
	mov	edx, -1
	mov	esi, 2
	mov	rdi, rax
	call	safe_poll
	movzx	eax, WORD PTR -26[rbp]
	cwde
	and	eax, 1
	test	eax, eax
	je	.L73
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	handle_read_from_socket
.L73:
	movzx	eax, WORD PTR -18[rbp]
	cwde
	and	eax, 1
	test	eax, eax
	je	.L74
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	handle_read_from_child
.L74:
	movzx	eax, WORD PTR -26[rbp]
	cwde
	and	eax, 16
	test	eax, eax
	jne	.L75
	movzx	eax, WORD PTR -18[rbp]
	cwde
	and	eax, 16
	test	eax, eax
	je	.L76
.L75:
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	read_leftover
	jmp	.L72
.L76:
	movzx	eax, WORD PTR -26[rbp]
	cwde
	and	eax, 8
	test	eax, eax
	je	.L78
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L72
.L78:
	movzx	eax, WORD PTR -18[rbp]
	cwde
	and	eax, 8
	test	eax, eax
	je	.L80
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC17[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L72:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L82
	call	__stack_chk_fail@PLT
.L82:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE29:
	.size	handle_parent_process, .-handle_parent_process
	.section	.rodata
	.align 8
.LC18:
	.string	"Error forking the process: %s\n"
	.text
	.globl	safe_fork
	.type	safe_fork, @function
safe_fork:
.LFB30:
	.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
	call	fork@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L84
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L84:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE30:
	.size	safe_fork, .-safe_fork
	.section	.rodata
.LC19:
	.string	"Error creating pipe: %s\n"
	.text
	.globl	safe_pipe
	.type	safe_pipe, @function
safe_pipe:
.LFB31:
	.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	rdi, rax
	call	pipe@PLT
	cmp	eax, -1
	jne	.L88
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L88:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE31:
	.size	safe_pipe, .-safe_pipe
	.globl	handle_shell
	.type	handle_shell, @function
handle_shell:
.LFB32:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -24[rbp]
	mov	rdi, rax
	call	safe_pipe
	lea	rax, -16[rbp]
	mov	rdi, rax
	call	safe_pipe
	mov	eax, 0
	call	safe_fork
	mov	DWORD PTR child_pid[rip], eax
	mov	eax, DWORD PTR child_pid[rip]
	test	eax, eax
	jne	.L90
	lea	rdx, -16[rbp]
	lea	rax, -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	handle_child_process
	jmp	.L93
.L90:
	lea	rdx, -16[rbp]
	lea	rax, -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	handle_parent_process
.L93:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L92
	call	__stack_chk_fail@PLT
.L92:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE32:
	.size	handle_shell, .-handle_shell
	.globl	cleanup_deflate_stream
	.type	cleanup_deflate_stream, @function
cleanup_deflate_stream:
.LFB33:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, deflate_stream[rip]
	call	deflateEnd@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE33:
	.size	cleanup_deflate_stream, .-cleanup_deflate_stream
	.section	.rodata
.LC20:
	.string	"1.2.11"
	.align 8
.LC21:
	.string	"Error initializing deflate stream\n"
	.text
	.globl	safe_delfateInit
	.type	safe_delfateInit, @function
safe_delfateInit:
.LFB34:
	.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	DWORD PTR -12[rbp], esi
	mov	esi, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, 112
	lea	rdx, .LC20[rip]
	mov	rdi, rax
	call	deflateInit_@PLT
	test	eax, eax
	je	.L97
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 34
	mov	esi, 1
	lea	rdi, .LC21[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L97:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE34:
	.size	safe_delfateInit, .-safe_delfateInit
	.globl	init_deflate_stream
	.type	init_deflate_stream, @function
init_deflate_stream:
.LFB35:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR deflate_stream[rip+64], 0
	mov	QWORD PTR deflate_stream[rip+72], 0
	mov	QWORD PTR deflate_stream[rip+80], 0
	mov	esi, -1
	lea	rdi, deflate_stream[rip]
	call	safe_delfateInit
	lea	rdi, cleanup_deflate_stream[rip]
	call	atexit@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE35:
	.size	init_deflate_stream, .-init_deflate_stream
	.globl	cleanup_inflate_stream
	.type	cleanup_inflate_stream, @function
cleanup_inflate_stream:
.LFB36:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, inflate_stream[rip]
	call	inflateEnd@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE36:
	.size	cleanup_inflate_stream, .-cleanup_inflate_stream
	.section	.rodata
	.align 8
.LC22:
	.string	"Error initializing inflate stream\n"
	.text
	.globl	safe_inflateInit
	.type	safe_inflateInit, @function
safe_inflateInit:
.LFB37:
	.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	edx, 112
	lea	rsi, .LC20[rip]
	mov	rdi, rax
	call	inflateInit_@PLT
	test	eax, eax
	je	.L102
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 34
	mov	esi, 1
	lea	rdi, .LC22[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L102:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE37:
	.size	safe_inflateInit, .-safe_inflateInit
	.globl	init_inflate_stream
	.type	init_inflate_stream, @function
init_inflate_stream:
.LFB38:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR inflate_stream[rip+64], 0
	mov	QWORD PTR inflate_stream[rip+72], 0
	mov	QWORD PTR inflate_stream[rip+80], 0
	lea	rdi, inflate_stream[rip]
	call	safe_inflateInit
	lea	rdi, cleanup_inflate_stream[rip]
	call	atexit@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE38:
	.size	init_inflate_stream, .-init_inflate_stream
	.globl	init_compression_streams
	.type	init_compression_streams, @function
init_compression_streams:
.LFB39:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, 0
	call	init_deflate_stream
	mov	eax, 0
	call	init_inflate_stream
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE39:
	.size	init_compression_streams, .-init_compression_streams
	.section	.rodata
.LC23:
	.string	"port"
.LC24:
	.string	"compress"
.LC25:
	.string	""
	.align 8
.LC26:
	.string	"Unrecognized argument detected\n%s\n"
.LC27:
	.string	"--port option is mandatory\n"
	.text
	.globl	support_options
	.type	support_options, @function
support_options:
.LFB40:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 144
	mov	DWORD PTR -132[rbp], edi
	mov	QWORD PTR -144[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC23[rip]
	mov	QWORD PTR -112[rbp], rax
	mov	DWORD PTR -104[rbp], 1
	mov	QWORD PTR -96[rbp], 0
	mov	DWORD PTR -88[rbp], 112
	lea	rax, .LC24[rip]
	mov	QWORD PTR -80[rbp], rax
	mov	DWORD PTR -72[rbp], 0
	mov	QWORD PTR -64[rbp], 0
	mov	DWORD PTR -56[rbp], 99
	mov	QWORD PTR -48[rbp], 0
	mov	DWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	DWORD PTR -24[rbp], 0
.L111:
	lea	rdx, -112[rbp]
	mov	rsi, QWORD PTR -144[rbp]
	mov	eax, DWORD PTR -132[rbp]
	mov	r8d, 0
	mov	rcx, rdx
	lea	rdx, .LC25[rip]
	mov	edi, eax
	call	getopt_long@PLT
	mov	DWORD PTR -116[rbp], eax
	cmp	DWORD PTR -116[rbp], -1
	je	.L115
	cmp	DWORD PTR -116[rbp], 99
	je	.L108
	cmp	DWORD PTR -116[rbp], 112
	jne	.L109
	mov	DWORD PTR port_flag[rip], 1
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR port[rip], eax
	jmp	.L110
.L108:
	mov	DWORD PTR compress_flag[rip], 1
	mov	eax, 0
	call	init_compression_streams
	jmp	.L110
.L109:
	mov	eax, 0
	call	getUsage
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC26[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L110:
	jmp	.L111
.L115:
	nop
	mov	eax, DWORD PTR port_flag[rip]
	test	eax, eax
	jne	.L116
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 27
	mov	esi, 1
	lea	rdi, .LC27[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L116:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L113
	call	__stack_chk_fail@PLT
.L113:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE40:
	.size	support_options, .-support_options
	.section	.rodata
.LC28:
	.string	"Error opening socket: %s\n"
	.text
	.globl	safe_socket
	.type	safe_socket, @function
safe_socket:
.LFB41:
	.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	DWORD PTR -24[rbp], esi
	mov	DWORD PTR -28[rbp], edx
	mov	edx, DWORD PTR -28[rbp]
	mov	ecx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	socket@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L118
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L118:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE41:
	.size	safe_socket, .-safe_socket
	.section	.rodata
	.align 8
.LC29:
	.string	"Error binding a name to a socket: %s\n"
	.text
	.globl	safe_bind
	.type	safe_bind, @function
safe_bind:
.LFB42:
	.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	QWORD PTR -16[rbp], rsi
	mov	DWORD PTR -8[rbp], edx
	mov	edx, DWORD PTR -8[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	cmp	eax, -1
	jne	.L122
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC29[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L122:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE42:
	.size	safe_bind, .-safe_bind
	.section	.rodata
	.align 8
.LC30:
	.string	"Error accepting a connection on a socket: %s\n"
	.text
	.globl	safe_accept
	.type	safe_accept, @function
safe_accept:
.LFB43:
	.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 -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	rdx, QWORD PTR -40[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L124
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC30[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L124:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE43:
	.size	safe_accept, .-safe_accept
	.globl	handle_socket
	.type	handle_socket, @function
handle_socket:
.LFB44:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	safe_socket
	mov	DWORD PTR -52[rbp], eax
	lea	rax, -48[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -48[rbp], 2
	mov	DWORD PTR -44[rbp], 0
	mov	eax, DWORD PTR port[rip]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -46[rbp], ax
	lea	rcx, -48[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	safe_bind
	mov	eax, DWORD PTR -52[rbp]
	mov	esi, 1
	mov	edi, eax
	call	listen@PLT
	mov	DWORD PTR -56[rbp], 16
	lea	rdx, -56[rbp]
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	safe_accept
	mov	DWORD PTR new_sfd[rip], eax
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L127
	call	__stack_chk_fail@PLT
.L127:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE44:
	.size	handle_socket, .-handle_socket
	.globl	main
	.type	main, @function
main:
.LFB45:
	.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	QWORD PTR -16[rbp], rsi
	mov	rdx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	support_options
	mov	eax, 0
	call	handle_socket
	mov	eax, 0
	call	handle_shell
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE45:
	.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	"441434.c"
	.section	.rodata
	.align	2
.LC0:
	.ascii	"port\000"
	.align	2
.LC1:
	.ascii	"compress\000"
	.text
	.comm	child_pid,4,4
	.global	port_flag
	.bss
	.align	2
	.type	port_flag, %object
	.size	port_flag, 4
port_flag:
	.space	4
	.global	compress_flag
	.align	2
	.type	compress_flag, %object
	.size	compress_flag, 4
compress_flag:
	.space	4
	.global	port
	.data
	.align	2
	.type	port, %object
	.size	port, 4
port:
	.word	-1
	.comm	new_sfd,4,4
	.comm	deflate_stream,56,4
	.comm	inflate_stream,56,4
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Error reading stdin: %s\012\000"
	.text
	.align	2
	.global	safe_read
	.syntax unified
	.arm
	.fpu softvfp
	.type	safe_read, %function
safe_read:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	ldr	r3, [fp, #-32]
	mov	r2, r3
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	read
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L2
	ldr	r3, .L4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L4+4
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L5:
	.align	2
.L4:
	.word	stderr
	.word	.LC3
	.size	safe_read, .-safe_read
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Error writing to stdout: %s\012\000"
	.text
	.align	2
	.global	safe_write
	.syntax unified
	.arm
	.fpu softvfp
	.type	safe_write, %function
safe_write:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	ldr	r3, [fp, #-32]
	mov	r2, r3
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	write
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L7
	ldr	r3, .L9
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L9+4
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L7:
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L10:
	.align	2
.L9:
	.word	stderr
	.word	.LC4
	.size	safe_write, .-safe_write
	.section	.rodata
	.align	2
.LC5:
	.ascii	"Usage: ./lab1b-server --port=number [OPTION]...\012"
	.ascii	"The server program will connect with the client,\012"
	.ascii	"receive the client's commands and send them to the "
	.ascii	"shell, \012and will \"serve\" the client the output"
	.ascii	"s of those commands.\012\012\011--port=number   spe"
	.ascii	"cify the port number for connection\012\011--compre"
	.ascii	"ss      compress the communication\012\011\011\000"
	.text
	.align	2
	.global	getUsage
	.syntax unified
	.arm
	.fpu softvfp
	.type	getUsage, %function
getUsage:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	ldr	r3, .L13
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L14:
	.align	2
.L13:
	.word	.LC5
	.size	getUsage, .-getUsage
	.section	.rodata
	.align	2
.LC6:
	.ascii	"Erorr during dup2: %s\012\000"
	.text
	.align	2
	.global	safe_dup2
	.syntax unified
	.arm
	.fpu softvfp
	.type	safe_dup2, %function
safe_dup2:
	@ 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]
	str	r1, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	dup2
	mov	r3, r0
	cmn	r3, #1
	bne	.L17
	ldr	r3, .L18
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L18+4
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L17:
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L19:
	.align	2
.L18:
	.word	stderr
	.word	.LC6
	.size	safe_dup2, .-safe_dup2
	.section	.rodata
	.align	2
.LC7:
	.ascii	"Erorr closing fd: %s\012\000"
	.text
	.align	2
	.global	safe_close
	.syntax unified
	.arm
	.fpu softvfp
	.type	safe_close, %function
safe_close:
	@ 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	r0, [fp, #-16]
	bl	close
	mov	r3, r0
	cmn	r3, #1
	bne	.L22
	ldr	r3, .L23
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L23+4
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L22:
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L24:
	.align	2
.L23:
	.word	stderr
	.word	.LC7
	.size	safe_close, .-safe_close
	.section	.rodata
	.align	2
.LC8:
	.ascii	"Error executing %s: %s\012\000"
	.text
	.align	2
	.global	safe_execvp
	.syntax unified
	.arm
	.fpu softvfp
	.type	safe_execvp, %function
safe_execvp:
	@ 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]
	str	r1, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	execvp
	mov	r3, r0
	cmn	r3, #1
	bne	.L27
	ldr	r3, .L28
	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, .L28+4
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L27:
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L29:
	.align	2
.L28:
	.word	stderr
	.word	.LC8
	.size	safe_execvp, .-safe_execvp
	.section	.rodata
	.align	2
.LC9:
	.ascii	"/bin/bash\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	execute_shell
	.syntax unified
	.arm
	.fpu softvfp
	.type	execute_shell, %function
execute_shell:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L32
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L32+4
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, [fp, #-20]
	bl	safe_execvp
	nop
	ldr	r3, .L32
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L31
	bl	__stack_chk_fail
.L31:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L33:
	.align	2
.L32:
	.word	.LC10
	.word	.LC9
	.size	execute_shell, .-execute_shell
	.align	2
	.global	handle_child_process
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_child_process, %function
handle_child_process:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	safe_dup2
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #1
	mov	r0, r3
	bl	safe_dup2
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #2
	mov	r0, r3
	bl	safe_dup2
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r0, r3
	bl	safe_close
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	safe_close
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	mov	r0, r3
	bl	safe_close
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	safe_close
	bl	execute_shell
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	handle_child_process, .-handle_child_process
	.section	.rodata
	.align	2
.LC11:
	.ascii	"Error killing a process: %s\012\000"
	.text
	.align	2
	.global	safe_kill
	.syntax unified
	.arm
	.fpu softvfp
	.type	safe_kill, %function
safe_kill:
	@ 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]
	str	r1, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	kill
	mov	r3, r0
	cmn	r3, #1
	bne	.L37
	ldr	r3, .L38
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L38+4
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L37:
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L39:
	.align	2
.L38:
	.word	stderr
	.word	.LC11
	.size	safe_kill, .-safe_kill
	.section	.rodata
	.align	2
.LC12:
	.ascii	"Error while polling: %s\012\000"
	.text
	.align	2
	.global	safe_poll
	.syntax unified
	.arm
	.fpu softvfp
	.type	safe_poll, %function
safe_poll:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	poll
	mov	r3, r0
	cmn	r3, #1
	bne	.L42
	ldr	r3, .L43
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L43+4
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L42:
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L44:
	.align	2
.L43:
	.word	stderr
	.word	.LC12
	.size	safe_poll, .-safe_poll
	.section	.rodata
	.align	2
.LC13:
	.ascii	"Error waiting a process: %s\012\000"
	.text
	.align	2
	.global	safe_waitpid
	.syntax unified
	.arm
	.fpu softvfp
	.type	safe_waitpid, %function
safe_waitpid:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	waitpid
	mov	r3, r0
	cmn	r3, #1
	bne	.L47
	ldr	r3, .L48
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L48+4
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L47:
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L49:
	.align	2
.L48:
	.word	stderr
	.word	.LC13
	.size	safe_waitpid, .-safe_waitpid
	.section	.rodata
	.align	2
.LC14:
	.ascii	"SIGPIPE detected\012\000"
	.text
	.align	2
	.global	handle_sigpipe
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_sigpipe, %function
handle_sigpipe:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	mov	r2, #17
	ldr	r1, .L51
	mov	r0, #2
	bl	write
	mov	r0, #0
	bl	exit
.L52:
	.align	2
.L51:
	.word	.LC14
	.size	handle_sigpipe, .-handle_sigpipe
	.section	.rodata
	.align	2
.LC15:
	.ascii	"Error deflating data\012\000"
	.text
	.align	2
	.global	safe_deflate
	.syntax unified
	.arm
	.fpu softvfp
	.type	safe_deflate, %function
safe_deflate:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	deflate
	mov	r3, r0
	cmp	r3, #0
	beq	.L55
	ldr	r3, .L56
	ldr	r3, [r3]
	mov	r2, #21
	mov	r1, #1
	ldr	r0, .L56+4
	bl	fwrite
	mov	r0, #1
	bl	exit
.L55:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L57:
	.align	2
.L56:
	.word	stderr
	.word	.LC15
	.size	safe_deflate, .-safe_deflate
	.section	.rodata
	.align	2
.LC16:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	simple_deflate
	.syntax unified
	.arm
	.fpu softvfp
	.type	simple_deflate, %function
simple_deflate:
	@ args = 0, pretend = 0, frame = 272
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #272
	str	r0, [fp, #-272]
	str	r1, [fp, #-276]
	ldr	r3, .L63
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-276]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, .L63+4
	str	r2, [r3, #4]
	ldr	r2, .L63+4
	ldr	r3, [fp, #-272]
	str	r3, [r2]
	ldr	r3, .L63+4
	mov	r2, #256
	str	r2, [r3, #16]
	ldr	r2, .L63+4
	sub	r3, fp, #264
	str	r3, [r2, #12]
.L59:
	mov	r1, #2
	ldr	r0, .L63+4
	bl	safe_deflate
	ldr	r3, .L63+4
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L59
	ldr	r3, .L63+4
	ldr	r3, [r3, #16]
	rsb	r3, r3, #256
	mov	r2, r3
	ldr	r3, [fp, #-276]
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-268]
	b	.L60
.L61:
	ldr	r3, [fp, #-268]
	ldr	r2, [fp, #-272]
	add	r3, r2, r3
	sub	r1, fp, #264
	ldr	r2, [fp, #-268]
	add	r2, r1, r2
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-268]
	add	r3, r3, #1
	str	r3, [fp, #-268]
.L60:
	ldr	r3, [fp, #-276]
	ldr	r3, [r3]
	ldr	r2, [fp, #-268]
	cmp	r2, r3
	blt	.L61
	nop
	ldr	r3, .L63
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L62
	bl	__stack_chk_fail
.L62:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L64:
	.align	2
.L63:
	.word	.LC16
	.word	deflate_stream
	.size	simple_deflate, .-simple_deflate
	.section	.rodata
	.align	2
.LC17:
	.ascii	"Error inflating data\012\000"
	.text
	.align	2
	.global	safe_inflate
	.syntax unified
	.arm
	.fpu softvfp
	.type	safe_inflate, %function
safe_inflate:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	inflate
	mov	r3, r0
	cmp	r3, #0
	beq	.L67
	ldr	r3, .L68
	ldr	r3, [r3]
	mov	r2, #21
	mov	r1, #1
	ldr	r0, .L68+4
	bl	fwrite
	mov	r0, #1
	bl	exit
.L67:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L69:
	.align	2
.L68:
	.word	stderr
	.word	.LC17
	.size	safe_inflate, .-safe_inflate
	.section	.rodata
	.align	2
.LC18:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	simple_inflate
	.syntax unified
	.arm
	.fpu softvfp
	.type	simple_inflate, %function
simple_inflate:
	@ args = 0, pretend = 0, frame = 2064
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2064
	str	r0, [fp, #-2064]
	str	r1, [fp, #-2068]
	ldr	r3, .L75
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-2068]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, .L75+4
	str	r2, [r3, #4]
	ldr	r2, .L75+4
	ldr	r3, [fp, #-2064]
	str	r3, [r2]
	ldr	r3, .L75+4
	mov	r2, #2048
	str	r2, [r3, #16]
	ldr	r2, .L75+4
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	str	r3, [r2, #12]
.L71:
	mov	r1, #2
	ldr	r0, .L75+4
	bl	safe_inflate
	ldr	r3, .L75+4
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L71
	ldr	r3, .L75+4
	ldr	r3, [r3, #16]
	rsb	r3, r3, #2048
	mov	r2, r3
	ldr	r3, [fp, #-2068]
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-2060]
	b	.L72
.L73:
	ldr	r3, [fp, #-2060]
	ldr	r2, [fp, #-2064]
	add	r2, r2, r3
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, [fp, #-2060]
	add	r3, r3, r1
	ldrb	r3, [r3]	@ zero_extendqisi2
	strb	r3, [r2]
	ldr	r3, [fp, #-2060]
	add	r3, r3, #1
	str	r3, [fp, #-2060]
.L72:
	ldr	r3, [fp, #-2068]
	ldr	r3, [r3]
	ldr	r2, [fp, #-2060]
	cmp	r2, r3
	blt	.L73
	nop
	ldr	r3, .L75
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L74
	bl	__stack_chk_fail
.L74:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L76:
	.align	2
.L75:
	.word	.LC18
	.word	inflate_stream
	.size	simple_inflate, .-simple_inflate
	.section	.rodata
	.align	2
.LC19:
	.ascii	"\012\000"
	.text
	.align	2
	.global	safe_shell_write
	.syntax unified
	.arm
	.fpu softvfp
	.type	safe_shell_write, %function
safe_shell_write:
	@ 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, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L78
.L84:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #4
	bne	.L79
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	safe_close
	b	.L80
.L79:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #3
	bne	.L81
	ldr	r3, .L85
	ldr	r3, [r3]
	mov	r1, #2
	mov	r0, r3
	bl	safe_kill
	b	.L80
.L81:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #13
	beq	.L82
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L83
.L82:
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, #1
	ldr	r1, .L85+4
	mov	r0, r3
	bl	safe_write
	b	.L80
.L83:
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	ldr	r0, [r3]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	mov	r2, #1
	mov	r1, r3
	bl	safe_write
.L80:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L78:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L84
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L86:
	.align	2
.L85:
	.word	child_pid
	.word	.LC19
	.size	safe_shell_write, .-safe_shell_write
	.section	.rodata
	.align	2
.LC20:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	handle_read_from_socket
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_read_from_socket, %function
handle_read_from_socket:
	@ args = 0, pretend = 0, frame = 2064
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2064
	str	r0, [fp, #-2064]
	ldr	r3, .L90
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L90+4
	ldr	r0, [r3]
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #256
	mov	r1, r3
	bl	safe_read
	mov	r3, r0
	str	r3, [fp, #-2060]
	ldr	r3, .L90+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L88
	sub	r2, fp, #2048
	sub	r2, r2, #4
	sub	r2, r2, #8
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	simple_inflate
.L88:
	ldr	r2, [fp, #-2060]
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-2064]
	bl	safe_shell_write
	nop
	ldr	r3, .L90
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L89
	bl	__stack_chk_fail
.L89:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L91:
	.align	2
.L90:
	.word	.LC20
	.word	new_sfd
	.word	compress_flag
	.size	handle_read_from_socket, .-handle_read_from_socket
	.section	.rodata
	.align	2
.LC21:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	handle_read_from_child
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_read_from_child, %function
handle_read_from_child:
	@ args = 0, pretend = 0, frame = 272
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #272
	str	r0, [fp, #-272]
	ldr	r3, .L95
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-272]
	ldr	r3, [r3]
	sub	r1, fp, #264
	mov	r2, #256
	mov	r0, r3
	bl	safe_read
	mov	r3, r0
	str	r3, [fp, #-268]
	ldr	r3, .L95+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L93
	sub	r2, fp, #268
	sub	r3, fp, #264
	mov	r1, r2
	mov	r0, r3
	bl	simple_deflate
.L93:
	ldr	r3, .L95+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-268]
	sub	r1, fp, #264
	mov	r0, r3
	bl	safe_write
	nop
	ldr	r3, .L95
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L94
	bl	__stack_chk_fail
.L94:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L96:
	.align	2
.L95:
	.word	.LC21
	.word	compress_flag
	.word	new_sfd
	.size	handle_read_from_child, .-handle_read_from_child
	.section	.rodata
	.align	2
.LC22:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_leftover
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_leftover, %function
read_leftover:
	@ args = 0, pretend = 0, frame = 272
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #272
	str	r0, [fp, #-272]
	ldr	r3, .L102
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	b	.L98
.L100:
	ldr	r3, .L102+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L99
	sub	r2, fp, #268
	sub	r3, fp, #264
	mov	r1, r2
	mov	r0, r3
	bl	simple_deflate
.L99:
	ldr	r3, .L102+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-268]
	sub	r1, fp, #264
	mov	r0, r3
	bl	safe_write
.L98:
	ldr	r3, [fp, #-272]
	ldr	r3, [r3]
	sub	r1, fp, #264
	mov	r2, #256
	mov	r0, r3
	bl	safe_read
	mov	r3, r0
	str	r3, [fp, #-268]
	ldr	r3, [fp, #-268]
	cmp	r3, #0
	bne	.L100
	nop
	ldr	r3, .L102
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L101
	bl	__stack_chk_fail
.L101:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L103:
	.align	2
.L102:
	.word	.LC22
	.word	compress_flag
	.word	new_sfd
	.size	read_leftover, .-read_leftover
	.align	2
	.global	add_observer
	.syntax unified
	.arm
	.fpu softvfp
	.type	add_observer, %function
add_observer:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	mov	r3, r2
	strh	r3, [fp, #-14]	@ movhi
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldrh	r2, [fp, #-14]	@ movhi
	strh	r2, [r3, #4]	@ movhi
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	add_observer, .-add_observer
	.section	.rodata
	.align	2
.LC23:
	.ascii	"Error setting signal: %s\012\000"
	.text
	.align	2
	.global	safe_signal
	.syntax unified
	.arm
	.fpu softvfp
	.type	safe_signal, %function
safe_signal:
	@ 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]
	str	r1, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	signal
	mov	r3, r0
	cmn	r3, #1
	bne	.L107
	ldr	r3, .L108
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L108+4
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L107:
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L109:
	.align	2
.L108:
	.word	stderr
	.word	.LC23
	.size	safe_signal, .-safe_signal
	.section	.rodata
	.align	2
.LC24:
	.ascii	"SHELL EXIT SIGNAL=%d STATUS=%d\012\000"
	.align	2
.LC25:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	report_child_exit_status
	.syntax unified
	.arm
	.fpu softvfp
	.type	report_child_exit_status, %function
report_child_exit_status:
	@ 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, .L112
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L112+4
	ldr	r3, [r3]
	sub	r1, fp, #12
	mov	r2, #0
	mov	r0, r3
	bl	safe_waitpid
	ldr	r3, .L112+8
	ldr	r0, [r3]
	ldr	r3, [fp, #-12]
	and	r2, r3, #127
	ldr	r3, [fp, #-12]
	asr	r3, r3, #8
	and	r3, r3, #255
	ldr	r1, .L112+12
	bl	fprintf
	nop
	ldr	r3, .L112
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L111
	bl	__stack_chk_fail
.L111:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L113:
	.align	2
.L112:
	.word	.LC25
	.word	child_pid
	.word	stderr
	.word	.LC24
	.size	report_child_exit_status, .-report_child_exit_status
	.section	.rodata
	.align	2
.LC26:
	.ascii	"stdin POLLERR detected: %s\012\000"
	.align	2
.LC27:
	.ascii	"backward pipe POLLERR detected: %s\012\000"
	.align	2
.LC28:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	handle_parent_process
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_parent_process, %function
handle_parent_process:
	@ 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, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L125
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r0, .L125+4
	bl	atexit
	ldr	r1, .L125+8
	mov	r0, #13
	bl	safe_signal
	ldr	r3, [fp, #-40]
	ldr	r3, [r3]
	mov	r0, r3
	bl	safe_close
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	safe_close
	ldr	r3, .L125+12
	ldr	r1, [r3]
	sub	r3, fp, #32
	mov	r2, #25
	mov	r0, r3
	bl	add_observer
	ldr	r3, [fp, #-44]
	ldr	r1, [r3]
	sub	r3, fp, #32
	add	r3, r3, #8
	mov	r2, #25
	mov	r0, r3
	bl	add_observer
.L122:
	sub	r3, fp, #32
	mvn	r2, #0
	mov	r1, #2
	mov	r0, r3
	bl	safe_poll
	ldrsh	r3, [fp, #-26]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L115
	ldr	r0, [fp, #-40]
	bl	handle_read_from_socket
.L115:
	ldrsh	r3, [fp, #-18]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L116
	ldr	r0, [fp, #-44]
	bl	handle_read_from_child
.L116:
	ldrsh	r3, [fp, #-26]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	and	r3, r3, #16
	cmp	r3, #0
	bne	.L117
	ldrsh	r3, [fp, #-18]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	and	r3, r3, #16
	cmp	r3, #0
	beq	.L118
.L117:
	ldr	r0, [fp, #-44]
	bl	read_leftover
	b	.L114
.L118:
	ldrsh	r3, [fp, #-26]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	and	r3, r3, #8
	cmp	r3, #0
	beq	.L120
	ldr	r3, .L125+16
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L125+20
	mov	r0, r4
	bl	fprintf
	b	.L114
.L120:
	ldrsh	r3, [fp, #-18]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	and	r3, r3, #8
	cmp	r3, #0
	beq	.L122
	ldr	r3, .L125+16
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L125+24
	mov	r0, r4
	bl	fprintf
.L114:
	ldr	r3, .L125
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L124
	bl	__stack_chk_fail
.L124:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L126:
	.align	2
.L125:
	.word	.LC28
	.word	report_child_exit_status
	.word	handle_sigpipe
	.word	new_sfd
	.word	stderr
	.word	.LC26
	.word	.LC27
	.size	handle_parent_process, .-handle_parent_process
	.section	.rodata
	.align	2
.LC29:
	.ascii	"Error forking the process: %s\012\000"
	.text
	.align	2
	.global	safe_fork
	.syntax unified
	.arm
	.fpu softvfp
	.type	safe_fork, %function
safe_fork:
	@ 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
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L128
	ldr	r3, .L130
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L130+4
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L128:
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L131:
	.align	2
.L130:
	.word	stderr
	.word	.LC29
	.size	safe_fork, .-safe_fork
	.section	.rodata
	.align	2
.LC30:
	.ascii	"Error creating pipe: %s\012\000"
	.text
	.align	2
	.global	safe_pipe
	.syntax unified
	.arm
	.fpu softvfp
	.type	safe_pipe, %function
safe_pipe:
	@ 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	r0, [fp, #-16]
	bl	pipe
	mov	r3, r0
	cmn	r3, #1
	bne	.L134
	ldr	r3, .L135
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L135+4
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L134:
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L136:
	.align	2
.L135:
	.word	stderr
	.word	.LC30
	.size	safe_pipe, .-safe_pipe
	.section	.rodata
	.align	2
.LC31:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	handle_shell
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_shell, %function
handle_shell:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L142
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #24
	mov	r0, r3
	bl	safe_pipe
	sub	r3, fp, #16
	mov	r0, r3
	bl	safe_pipe
	bl	safe_fork
	mov	r3, r0
	ldr	r2, .L142+4
	str	r3, [r2]
	ldr	r3, .L142+4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L138
	sub	r2, fp, #16
	sub	r3, fp, #24
	mov	r1, r2
	mov	r0, r3
	bl	handle_child_process
	b	.L141
.L138:
	sub	r2, fp, #16
	sub	r3, fp, #24
	mov	r1, r2
	mov	r0, r3
	bl	handle_parent_process
.L141:
	nop
	ldr	r3, .L142
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L140
	bl	__stack_chk_fail
.L140:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L143:
	.align	2
.L142:
	.word	.LC31
	.word	child_pid
	.size	handle_shell, .-handle_shell
	.align	2
	.global	cleanup_deflate_stream
	.syntax unified
	.arm
	.fpu softvfp
	.type	cleanup_deflate_stream, %function
cleanup_deflate_stream:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L145
	bl	deflateEnd
	nop
	pop	{fp, pc}
.L146:
	.align	2
.L145:
	.word	deflate_stream
	.size	cleanup_deflate_stream, .-cleanup_deflate_stream
	.section	.rodata
	.align	2
.LC32:
	.ascii	"1.2.11\000"
	.align	2
.LC33:
	.ascii	"Error initializing deflate stream\012\000"
	.text
	.align	2
	.global	safe_delfateInit
	.syntax unified
	.arm
	.fpu softvfp
	.type	safe_delfateInit, %function
safe_delfateInit:
	@ 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]
	str	r1, [fp, #-12]
	mov	r3, #56
	ldr	r2, .L150
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	deflateInit_
	mov	r3, r0
	cmp	r3, #0
	beq	.L149
	ldr	r3, .L150+4
	ldr	r3, [r3]
	mov	r2, #34
	mov	r1, #1
	ldr	r0, .L150+8
	bl	fwrite
	mov	r0, #1
	bl	exit
.L149:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L151:
	.align	2
.L150:
	.word	.LC32
	.word	stderr
	.word	.LC33
	.size	safe_delfateInit, .-safe_delfateInit
	.align	2
	.global	init_deflate_stream
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_deflate_stream, %function
init_deflate_stream:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L153
	mov	r2, #0
	str	r2, [r3, #32]
	ldr	r3, .L153
	mov	r2, #0
	str	r2, [r3, #36]
	ldr	r3, .L153
	mov	r2, #0
	str	r2, [r3, #40]
	mvn	r1, #0
	ldr	r0, .L153
	bl	safe_delfateInit
	ldr	r0, .L153+4
	bl	atexit
	nop
	pop	{fp, pc}
.L154:
	.align	2
.L153:
	.word	deflate_stream
	.word	cleanup_deflate_stream
	.size	init_deflate_stream, .-init_deflate_stream
	.align	2
	.global	cleanup_inflate_stream
	.syntax unified
	.arm
	.fpu softvfp
	.type	cleanup_inflate_stream, %function
cleanup_inflate_stream:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L156
	bl	inflateEnd
	nop
	pop	{fp, pc}
.L157:
	.align	2
.L156:
	.word	inflate_stream
	.size	cleanup_inflate_stream, .-cleanup_inflate_stream
	.section	.rodata
	.align	2
.LC34:
	.ascii	"Error initializing inflate stream\012\000"
	.text
	.align	2
	.global	safe_inflateInit
	.syntax unified
	.arm
	.fpu softvfp
	.type	safe_inflateInit, %function
safe_inflateInit:
	@ 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]
	mov	r2, #56
	ldr	r1, .L161
	ldr	r0, [fp, #-8]
	bl	inflateInit_
	mov	r3, r0
	cmp	r3, #0
	beq	.L160
	ldr	r3, .L161+4
	ldr	r3, [r3]
	mov	r2, #34
	mov	r1, #1
	ldr	r0, .L161+8
	bl	fwrite
	mov	r0, #1
	bl	exit
.L160:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L162:
	.align	2
.L161:
	.word	.LC32
	.word	stderr
	.word	.LC34
	.size	safe_inflateInit, .-safe_inflateInit
	.align	2
	.global	init_inflate_stream
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_inflate_stream, %function
init_inflate_stream:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L164
	mov	r2, #0
	str	r2, [r3, #32]
	ldr	r3, .L164
	mov	r2, #0
	str	r2, [r3, #36]
	ldr	r3, .L164
	mov	r2, #0
	str	r2, [r3, #40]
	ldr	r0, .L164
	bl	safe_inflateInit
	ldr	r0, .L164+4
	bl	atexit
	nop
	pop	{fp, pc}
.L165:
	.align	2
.L164:
	.word	inflate_stream
	.word	cleanup_inflate_stream
	.size	init_inflate_stream, .-init_inflate_stream
	.align	2
	.global	init_compression_streams
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_compression_streams, %function
init_compression_streams:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	init_deflate_stream
	bl	init_inflate_stream
	nop
	pop	{fp, pc}
	.size	init_compression_streams, .-init_compression_streams
	.section	.rodata
	.align	2
.LC36:
	.ascii	"\000"
	.align	2
.LC37:
	.ascii	"Unrecognized argument detected\012%s\012\000"
	.align	2
.LC38:
	.ascii	"--port option is mandatory\012\000"
	.align	2
.LC35:
	.word	.LC0
	.word	1
	.word	0
	.word	112
	.word	.LC1
	.word	0
	.word	0
	.word	99
	.word	0
	.word	0
	.word	0
	.word	0
	.align	2
.LC39:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	support_options
	.syntax unified
	.arm
	.fpu softvfp
	.type	support_options, %function
support_options:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #76
	str	r0, [fp, #-72]
	str	r1, [fp, #-76]
	ldr	r3, .L179
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, .L179+4
	sub	ip, fp, #64
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
.L173:
	sub	r3, fp, #64
	mov	r2, #0
	str	r2, [sp]
	ldr	r2, .L179+8
	ldr	r1, [fp, #-76]
	ldr	r0, [fp, #-72]
	bl	getopt_long
	str	r0, [fp, #-68]
	ldr	r3, [fp, #-68]
	cmn	r3, #1
	beq	.L177
	ldr	r3, [fp, #-68]
	cmp	r3, #99
	beq	.L170
	ldr	r3, [fp, #-68]
	cmp	r3, #112
	bne	.L171
	ldr	r3, .L179+12
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, .L179+16
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L179+20
	str	r3, [r2]
	b	.L172
.L170:
	ldr	r3, .L179+24
	mov	r2, #1
	str	r2, [r3]
	bl	init_compression_streams
	b	.L172
.L171:
	ldr	r3, .L179+28
	ldr	r4, [r3]
	bl	getUsage
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L179+32
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L172:
	b	.L173
.L177:
	nop
	ldr	r3, .L179+12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L178
	ldr	r3, .L179+28
	ldr	r3, [r3]
	mov	r2, #27
	mov	r1, #1
	ldr	r0, .L179+36
	bl	fwrite
	mov	r0, #1
	bl	exit
.L178:
	nop
	ldr	r3, .L179
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L175
	bl	__stack_chk_fail
.L175:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L180:
	.align	2
.L179:
	.word	.LC39
	.word	.LC35
	.word	.LC36
	.word	port_flag
	.word	optarg
	.word	port
	.word	compress_flag
	.word	stderr
	.word	.LC37
	.word	.LC38
	.size	support_options, .-support_options
	.section	.rodata
	.align	2
.LC40:
	.ascii	"Error opening socket: %s\012\000"
	.text
	.align	2
	.global	safe_socket
	.syntax unified
	.arm
	.fpu softvfp
	.type	safe_socket, %function
safe_socket:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	ldr	r2, [fp, #-32]
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	socket
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L182
	ldr	r3, .L184
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L184+4
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L182:
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L185:
	.align	2
.L184:
	.word	stderr
	.word	.LC40
	.size	safe_socket, .-safe_socket
	.section	.rodata
	.align	2
.LC41:
	.ascii	"Error binding a name to a socket: %s\012\000"
	.text
	.align	2
	.global	safe_bind
	.syntax unified
	.arm
	.fpu softvfp
	.type	safe_bind, %function
safe_bind:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, [fp, #-24]
	mov	r2, r3
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	bind
	mov	r3, r0
	cmn	r3, #1
	bne	.L188
	ldr	r3, .L189
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L189+4
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L188:
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L190:
	.align	2
.L189:
	.word	stderr
	.word	.LC41
	.size	safe_bind, .-safe_bind
	.section	.rodata
	.align	2
.LC42:
	.ascii	"Error accepting a connection on a socket: %s\012\000"
	.text
	.align	2
	.global	safe_accept
	.syntax unified
	.arm
	.fpu softvfp
	.type	safe_accept, %function
safe_accept:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	ldr	r2, [fp, #-32]
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	accept
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L192
	ldr	r3, .L194
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L194+4
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L192:
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L195:
	.align	2
.L194:
	.word	stderr
	.word	.LC42
	.size	safe_accept, .-safe_accept
	.section	.rodata
	.align	2
.LC43:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	handle_socket
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_socket, %function
handle_socket:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	ldr	r3, .L198
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	safe_socket
	str	r0, [fp, #-44]
	sub	r3, fp, #40
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #2
	strh	r3, [fp, #-40]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-36]
	ldr	r3, .L198+4
	ldr	r3, [r3]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-38]	@ movhi
	sub	r3, fp, #40
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-44]
	bl	safe_bind
	mov	r1, #1
	ldr	r0, [fp, #-44]
	bl	listen
	mov	r3, #16
	str	r3, [fp, #-48]
	sub	r2, fp, #48
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, [fp, #-44]
	bl	safe_accept
	mov	r3, r0
	ldr	r2, .L198+8
	str	r3, [r2]
	nop
	ldr	r3, .L198
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L197
	bl	__stack_chk_fail
.L197:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L199:
	.align	2
.L198:
	.word	.LC43
	.word	port
	.word	new_sfd
	.size	handle_socket, .-handle_socket
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	support_options
	bl	handle_socket
	bl	handle_shell
	mov	r0, #0
	bl	exit
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
