	.file	"715218.c"
	.intel_syntax noprefix
	.text
	.globl	tty
	.bss
	.align 32
	.type	tty, @object
	.size	tty, 60
tty:
	.zero	60
	.section	.rodata
.LC0:
	.string	"Please specify an IP address\n"
.LC1:
	.string	"Could not set canonical mode"
	.align 8
.LC2:
	.string	"Oops. Fork failure.\nDid you try a spoon?"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -12[rbp], 0
	cmp	DWORD PTR -20[rbp], 2
	je	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 29
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	setup_socket
	mov	DWORD PTR -12[rbp], eax
	lea	rsi, tty[rip]
	mov	edi, 0
	call	set_non_canon_mode
	test	eax, eax
	jns	.L3
	lea	rdi, .LC1[rip]
	call	perror@PLT
.L3:
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	handle_protocol
	test	eax, eax
	jns	.L4
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	call	fork@PLT
	mov	DWORD PTR -8[rbp], eax
	cmp	DWORD PTR -8[rbp], -1
	je	.L5
	cmp	DWORD PTR -8[rbp], 0
	je	.L10
	jmp	.L7
.L5:
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	close@PLT
.L10:
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	handle_stdin_to_sock
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L8
	call	getppid@PLT
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, 15
	mov	edi, eax
	call	kill@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	cmp	DWORD PTR -4[rbp], 0
	jne	.L10
	call	getppid@PLT
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, 15
	mov	edi, eax
	call	kill@PLT
	mov	edi, 0
	call	exit@PLT
.L7:
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	handle_sock_to_stdout
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L11
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, 15
	mov	edi, eax
	call	kill@PLT
	mov	edi, 1
	call	exit@PLT
.L11:
	cmp	DWORD PTR -4[rbp], 0
	jne	.L7
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, 15
	mov	edi, eax
	call	kill@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC3:
	.string	"Oops. Write failure.\n"
	.text
	.globl	handle_stdin_to_sock
	.type	handle_stdin_to_sock, @function
handle_stdin_to_sock:
.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 48
	mov	DWORD PTR -4132[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -4112[rbp]
	mov	edx, 4096
	mov	rsi, rax
	mov	edi, 0
	call	read@PLT
	mov	DWORD PTR -4116[rbp], eax
	cmp	DWORD PTR -4116[rbp], 0
	jns	.L14
	mov	eax, DWORD PTR -4132[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, -1
	jmp	.L18
.L14:
	cmp	DWORD PTR -4116[rbp], 0
	jne	.L16
	mov	eax, DWORD PTR -4132[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	jmp	.L18
.L16:
	mov	eax, DWORD PTR -4116[rbp]
	movsx	rdx, eax
	lea	rcx, -4112[rbp]
	mov	eax, DWORD PTR -4132[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	test	rax, rax
	jns	.L17
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -4132[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, -1
	jmp	.L18
.L17:
	mov	eax, 1
.L18:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	handle_stdin_to_sock, .-handle_stdin_to_sock
	.section	.rodata
	.align 8
.LC4:
	.string	"Oops. Read failure from socket to STDOUT.\n"
	.text
	.globl	handle_sock_to_stdout
	.type	handle_sock_to_stdout, @function
handle_sock_to_stdout:
.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 48
	mov	DWORD PTR -4132[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rcx, -4112[rbp]
	mov	eax, DWORD PTR -4132[rbp]
	mov	edx, 4096
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -4116[rbp], eax
	cmp	DWORD PTR -4116[rbp], 0
	jns	.L21
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -4132[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, -1
	jmp	.L25
.L21:
	cmp	DWORD PTR -4116[rbp], 0
	jne	.L23
	mov	eax, DWORD PTR -4132[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	jmp	.L25
.L23:
	mov	eax, DWORD PTR -4116[rbp]
	movsx	rdx, eax
	lea	rax, -4112[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	test	rax, rax
	jns	.L24
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -4132[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, -1
	jmp	.L25
.L24:
	mov	eax, 1
.L25:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	handle_sock_to_stdout, .-handle_sock_to_stdout
	.section	.rodata
	.align 8
.LC5:
	.string	"Oops. Read failure in handle_protocol <rembash>.\n"
.LC6:
	.string	"cs407rembash\n"
	.align 8
.LC7:
	.string	"Oops. Read failure in handle_protocol <ok>.\n"
	.text
	.globl	handle_protocol
	.type	handle_protocol, @function
handle_protocol:
.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 48
	mov	DWORD PTR -4132[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -4112[rbp]
	mov	edx, 4096
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rcx, -4112[rbp]
	mov	eax, DWORD PTR -4132[rbp]
	mov	edx, 4096
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -4116[rbp], eax
	cmp	DWORD PTR -4116[rbp], 0
	jns	.L28
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -4132[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, -1
	jmp	.L33
.L28:
	mov	eax, DWORD PTR -4132[rbp]
	mov	edx, 13
	lea	rsi, .LC6[rip]
	mov	edi, eax
	call	write@PLT
	test	rax, rax
	jns	.L30
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -4132[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, -1
	jmp	.L33
.L30:
	lea	rcx, -4112[rbp]
	mov	eax, DWORD PTR -4132[rbp]
	mov	edx, 4096
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -4116[rbp], eax
	cmp	DWORD PTR -4116[rbp], 0
	jns	.L31
	lea	rdi, .LC7[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -4132[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, -1
	jmp	.L33
.L31:
	mov	eax, DWORD PTR -4116[rbp]
	movsx	rdx, eax
	lea	rax, -4112[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	test	rax, rax
	jns	.L32
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -4132[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, -1
	jmp	.L33
.L32:
	mov	eax, 1
.L33:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	handle_protocol, .-handle_protocol
	.section	.rodata
	.align 8
.LC8:
	.string	"Oops. Client could not connect.\n"
	.text
	.globl	setup_socket
	.type	setup_socket, @function
setup_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, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -36[rbp], 0
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -36[rbp], eax
	mov	WORD PTR -32[rbp], 2
	mov	edi, 4070
	call	htons@PLT
	mov	WORD PTR -30[rbp], ax
	lea	rax, -32[rbp]
	lea	rdx, 4[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	inet_aton@PLT
	test	eax, eax
	jne	.L36
	mov	edi, 1
	call	exit@PLT
.L36:
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	test	eax, eax
	je	.L37
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	close@PLT
.L37:
	mov	eax, DWORD PTR -36[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L39
	call	__stack_chk_fail@PLT
.L39:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	setup_socket, .-setup_socket
	.section	.rodata
.LC9:
	.string	"problem in tcgeattr\n"
.LC10:
	.string	"problem in tcsetattr\n"
	.text
	.globl	set_non_canon_mode
	.type	set_non_canon_mode, @function
set_non_canon_mode:
.LFB11:
	.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, 104
	.cfi_offset 3, -24
	mov	DWORD PTR -100[rbp], edi
	mov	QWORD PTR -112[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rdx, -96[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	tcgetattr@PLT
	cmp	eax, -1
	jne	.L41
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L45
.L41:
	cmp	QWORD PTR -112[rbp], 0
	je	.L43
	mov	rax, QWORD PTR -112[rbp]
	mov	rcx, QWORD PTR -96[rbp]
	mov	rbx, QWORD PTR -88[rbp]
	mov	QWORD PTR [rax], rcx
	mov	QWORD PTR 8[rax], rbx
	mov	rcx, QWORD PTR -80[rbp]
	mov	rbx, QWORD PTR -72[rbp]
	mov	QWORD PTR 16[rax], rcx
	mov	QWORD PTR 24[rax], rbx
	mov	rcx, QWORD PTR -64[rbp]
	mov	rbx, QWORD PTR -56[rbp]
	mov	QWORD PTR 32[rax], rcx
	mov	QWORD PTR 40[rax], rbx
	mov	rdx, QWORD PTR -48[rbp]
	mov	QWORD PTR 48[rax], rdx
	mov	edx, DWORD PTR -40[rbp]
	mov	DWORD PTR 56[rax], edx
.L43:
	mov	eax, DWORD PTR -84[rbp]
	and	eax, -11
	mov	DWORD PTR -84[rbp], eax
	mov	eax, DWORD PTR -84[rbp]
	or	eax, 1
	mov	DWORD PTR -84[rbp], eax
	mov	eax, DWORD PTR -96[rbp]
	and	ah, -2
	mov	DWORD PTR -96[rbp], eax
	mov	BYTE PTR -73[rbp], 1
	mov	BYTE PTR -74[rbp], 0
	lea	rdx, -96[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, 2
	mov	edi, eax
	call	tcsetattr@PLT
	cmp	eax, -1
	jne	.L44
	lea	rdi, .LC10[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L45
.L44:
	mov	eax, 0
.L45:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L46
	call	__stack_chk_fail@PLT
.L46:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	set_non_canon_mode, .-set_non_canon_mode
	.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	"715218.c"
	.text
	.comm	tty,60,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Please specify an IP address\012\000"
	.align	2
.LC1:
	.ascii	"Could not set canonical mode\000"
	.align	2
.LC2:
	.ascii	"Oops. Fork failure.\012Did you try a spoon?\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-24]
	cmp	r3, #2
	beq	.L2
	ldr	r3, .L13
	ldr	r3, [r3]
	mov	r2, #29
	mov	r1, #1
	ldr	r0, .L13+4
	bl	fwrite
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	setup_socket
	str	r0, [fp, #-16]
	ldr	r1, .L13+8
	mov	r0, #0
	bl	set_non_canon_mode
	mov	r3, r0
	cmp	r3, #0
	bge	.L3
	ldr	r0, .L13+12
	bl	perror
.L3:
	ldr	r0, [fp, #-16]
	bl	handle_protocol
	mov	r3, r0
	cmp	r3, #0
	bge	.L4
	ldr	r0, [fp, #-16]
	bl	close
	mov	r0, #1
	bl	exit
.L4:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	beq	.L5
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L10
	b	.L7
.L5:
	ldr	r0, .L13+16
	bl	perror
	ldr	r0, [fp, #-16]
	bl	close
.L10:
	ldr	r0, [fp, #-16]
	bl	handle_stdin_to_sock
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L8
	bl	getppid
	str	r0, [fp, #-12]
	mov	r1, #15
	ldr	r0, [fp, #-12]
	bl	kill
	mov	r0, #1
	bl	exit
.L8:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L10
	bl	getppid
	str	r0, [fp, #-12]
	mov	r1, #15
	ldr	r0, [fp, #-12]
	bl	kill
	mov	r0, #0
	bl	exit
.L7:
	ldr	r0, [fp, #-16]
	bl	handle_sock_to_stdout
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L11
	mov	r1, #15
	ldr	r0, [fp, #-12]
	bl	kill
	mov	r0, #1
	bl	exit
.L11:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L7
	mov	r1, #15
	ldr	r0, [fp, #-12]
	bl	kill
	mov	r0, #0
	bl	exit
.L14:
	.align	2
.L13:
	.word	stderr
	.word	.LC0
	.word	tty
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Oops. Write failure.\012\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	handle_stdin_to_sock
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_stdin_to_sock, %function
handle_stdin_to_sock:
	@ args = 0, pretend = 0, frame = 4112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4096
	sub	sp, sp, #20
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-12]
	ldr	r3, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #4096
	mov	r1, r3
	mov	r0, #0
	bl	read
	str	r0, [r4, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r3, #0
	bge	.L16
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-12]
	bl	close
	mvn	r3, #0
	b	.L20
.L16:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r3, #0
	bne	.L18
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-12]
	bl	close
	mov	r3, #0
	b	.L20
.L18:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	sub	r1, fp, #4096
	sub	r1, r1, #12
	mov	r0, r1
	mov	r1, r3
	ldr	r0, [r0, #-12]
	bl	write
	mov	r3, r0
	cmp	r3, #0
	bge	.L19
	ldr	r0, .L22+4
	bl	perror
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-12]
	bl	close
	mvn	r3, #0
	b	.L20
.L19:
	mov	r3, #1
.L20:
	ldr	r2, .L22
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L21
	bl	__stack_chk_fail
.L21:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC4
	.word	.LC3
	.size	handle_stdin_to_sock, .-handle_stdin_to_sock
	.section	.rodata
	.align	2
.LC5:
	.ascii	"Oops. Read failure from socket to STDOUT.\012\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	handle_sock_to_stdout
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_sock_to_stdout, %function
handle_sock_to_stdout:
	@ args = 0, pretend = 0, frame = 4112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4096
	sub	sp, sp, #20
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-12]
	ldr	r3, .L31
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, #4096
	mov	r1, r3
	ldr	r0, [r0, #-12]
	bl	read
	str	r0, [r4, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r3, #0
	bge	.L25
	ldr	r0, .L31+4
	bl	perror
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-12]
	bl	close
	mvn	r3, #0
	b	.L29
.L25:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r3, #0
	bne	.L27
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-12]
	bl	close
	mov	r3, #0
	b	.L29
.L27:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	mov	r0, #1
	bl	write
	mov	r3, r0
	cmp	r3, #0
	bge	.L28
	ldr	r0, .L31+8
	bl	perror
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-12]
	bl	close
	mvn	r3, #0
	b	.L29
.L28:
	mov	r3, #1
.L29:
	ldr	r2, .L31
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L30
	bl	__stack_chk_fail
.L30:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L32:
	.align	2
.L31:
	.word	.LC6
	.word	.LC5
	.word	.LC3
	.size	handle_sock_to_stdout, .-handle_sock_to_stdout
	.section	.rodata
	.align	2
.LC7:
	.ascii	"Oops. Read failure in handle_protocol <rembash>.\012"
	.ascii	"\000"
	.align	2
.LC8:
	.ascii	"cs407rembash\012\000"
	.align	2
.LC9:
	.ascii	"Oops. Read failure in handle_protocol <ok>.\012\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	handle_protocol
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_protocol, %function
handle_protocol:
	@ args = 0, pretend = 0, frame = 4112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4096
	sub	sp, sp, #20
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-12]
	ldr	r3, .L41
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #4096
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, #4096
	mov	r1, r3
	ldr	r0, [r0, #-12]
	bl	read
	str	r0, [r4, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r3, #0
	bge	.L34
	ldr	r0, .L41+4
	bl	perror
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-12]
	bl	close
	mvn	r3, #0
	b	.L39
.L34:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, #13
	ldr	r1, .L41+8
	ldr	r0, [r3, #-12]
	bl	write
	mov	r3, r0
	cmp	r3, #0
	bge	.L36
	ldr	r0, .L41+12
	bl	perror
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-12]
	bl	close
	mvn	r3, #0
	b	.L39
.L36:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, #4096
	mov	r1, r3
	ldr	r0, [r0, #-12]
	bl	read
	str	r0, [r4, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r3, #0
	bge	.L37
	ldr	r0, .L41+16
	bl	perror
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-12]
	bl	close
	mvn	r3, #0
	b	.L39
.L37:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	mov	r0, #1
	bl	write
	mov	r3, r0
	cmp	r3, #0
	bge	.L38
	ldr	r0, .L41+12
	bl	perror
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-12]
	bl	close
	mvn	r3, #0
	b	.L39
.L38:
	mov	r3, #1
.L39:
	ldr	r2, .L41
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L40
	bl	__stack_chk_fail
.L40:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L42:
	.align	2
.L41:
	.word	.LC10
	.word	.LC7
	.word	.LC8
	.word	.LC3
	.word	.LC9
	.size	handle_protocol, .-handle_protocol
	.section	.rodata
	.align	2
.LC11:
	.ascii	"Oops. Client could not connect.\012\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	setup_socket
	.syntax unified
	.arm
	.fpu softvfp
	.type	setup_socket, %function
setup_socket:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	ldr	r3, .L48
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-28]
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-28]
	mov	r3, #2
	strh	r3, [fp, #-24]	@ movhi
	ldr	r0, .L48+4
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-22]	@ movhi
	sub	r3, fp, #24
	add	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	inet_aton
	mov	r3, r0
	cmp	r3, #0
	bne	.L44
	mov	r0, #1
	bl	exit
.L44:
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	connect
	mov	r3, r0
	cmp	r3, #0
	beq	.L45
	ldr	r0, .L48+8
	bl	perror
	ldr	r0, [fp, #-28]
	bl	close
.L45:
	ldr	r3, [fp, #-28]
	ldr	r2, .L48
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L47
	bl	__stack_chk_fail
.L47:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L49:
	.align	2
.L48:
	.word	.LC12
	.word	4070
	.word	.LC11
	.size	setup_socket, .-setup_socket
	.section	.rodata
	.align	2
.LC13:
	.ascii	"problem in tcgeattr\012\000"
	.align	2
.LC14:
	.ascii	"problem in tcsetattr\012\000"
	.align	2
.LC15:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	set_non_canon_mode
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_non_canon_mode, %function
set_non_canon_mode:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #72
	str	r0, [fp, #-72]
	str	r1, [fp, #-76]
	ldr	r3, .L57
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #68
	mov	r1, r3
	ldr	r0, [fp, #-72]
	bl	tcgetattr
	mov	r3, r0
	cmn	r3, #1
	bne	.L51
	ldr	r0, .L57+4
	bl	perror
	mvn	r3, #0
	b	.L55
.L51:
	ldr	r3, [fp, #-76]
	cmp	r3, #0
	beq	.L53
	ldr	r3, [fp, #-76]
	mov	lr, r3
	sub	ip, fp, #68
	ldmia	ip!, {r0, r1, r2, r3}
	stmia	lr!, {r0, r1, r2, r3}
	ldmia	ip!, {r0, r1, r2, r3}
	stmia	lr!, {r0, r1, r2, r3}
	ldmia	ip!, {r0, r1, r2, r3}
	stmia	lr!, {r0, r1, r2, r3}
	ldm	ip, {r0, r1, r2}
	stm	lr, {r0, r1, r2}
.L53:
	ldr	r3, [fp, #-56]
	bic	r3, r3, #10
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-56]
	orr	r3, r3, #1
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-68]
	bic	r3, r3, #256
	str	r3, [fp, #-68]
	mov	r3, #1
	strb	r3, [fp, #-45]
	mov	r3, #0
	strb	r3, [fp, #-46]
	sub	r3, fp, #68
	mov	r2, r3
	mov	r1, #2
	ldr	r0, [fp, #-72]
	bl	tcsetattr
	mov	r3, r0
	cmn	r3, #1
	bne	.L54
	ldr	r0, .L57+8
	bl	perror
	mvn	r3, #0
	b	.L55
.L54:
	mov	r3, #0
.L55:
	ldr	r2, .L57
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L56
	bl	__stack_chk_fail
.L56:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L58:
	.align	2
.L57:
	.word	.LC15
	.word	.LC13
	.word	.LC14
	.size	set_non_canon_mode, .-set_non_canon_mode
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
