	.file	"471780.c"
	.intel_syntax noprefix
	.text
	.local	progname
	.comm	progname,8,8
	.section	.rodata
.LC0:
	.string	"PAGESIZE"
.LC1:
	.string	"r"
	.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -20[rbp], 22
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR progname[rip], rax
	lea	rdi, .LC0[rip]
	call	getenv@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	je	.L2
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -20[rbp], eax
.L2:
	cmp	DWORD PTR -36[rbp], 1
	jle	.L3
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 45
	jne	.L3
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	add	rax, 1
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -20[rbp], eax
	sub	DWORD PTR -36[rbp], 1
	add	QWORD PTR -48[rbp], 8
.L3:
	cmp	DWORD PTR -20[rbp], 0
	jne	.L4
	mov	DWORD PTR -20[rbp], 22
.L4:
	cmp	DWORD PTR -36[rbp], 1
	jne	.L5
	mov	rax, QWORD PTR stdin[rip]
	mov	edx, DWORD PTR -20[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	print
	jmp	.L6
.L5:
	mov	DWORD PTR -24[rbp], 1
	jmp	.L7
.L8:
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	efopen
	mov	QWORD PTR -8[rbp], rax
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	print
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	add	DWORD PTR -24[rbp], 1
.L7:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L8
.L6:
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC2:
	.string	"%s: can't open file %s mode %s\n"
	.text
	.type	efopen, @function
efopen:
.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	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L10
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L12
.L10:
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, QWORD PTR -32[rbp]
	mov	rcx, QWORD PTR -24[rbp]
	mov	r8, rsi
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	efopen, .-efopen
	.type	print, @function
print:
.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, 32
	mov	QWORD PTR -4120[rbp], rdi
	mov	DWORD PTR -4124[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	jmp	.L14
.L16:
	mov	eax, DWORD PTR lines.1[rip]
	add	eax, 1
	mov	DWORD PTR lines.1[rip], eax
	mov	eax, DWORD PTR lines.1[rip]
	cmp	DWORD PTR -4124[rbp], eax
	jle	.L15
	mov	rdx, QWORD PTR stdout[rip]
	lea	rax, -4112[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
	jmp	.L14
.L15:
	lea	rax, -4112[rbp]
	mov	rdi, rax
	call	strlen@PLT
	sub	rax, 1
	mov	BYTE PTR -4112[rbp+rax], 0
	mov	rdx, QWORD PTR stdout[rip]
	lea	rax, -4112[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	eax, 0
	call	ttyin
	mov	DWORD PTR lines.1[rip], 0
.L14:
	mov	rdx, QWORD PTR -4120[rbp]
	lea	rax, -4112[rbp]
	mov	esi, 4096
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L16
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	print, .-print
	.section	.rodata
.LC3:
	.string	"dup: %s\n"
	.text
	.type	xdup, @function
xdup:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	dup@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L20
	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
.L20:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	xdup, .-xdup
	.section	.rodata
.LC4:
	.string	"/dev/tty"
.LC5:
	.string	"%s: cannot open /dev/tty: %s\n"
.LC6:
	.string	"-c"
.LC7:
	.string	"sh"
	.text
	.type	xsystem, @function
xsystem:
.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	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	esi, 2
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], -1
	jne	.L22
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L29
.L22:
	call	fork@PLT
	mov	DWORD PTR -32[rbp], eax
	call	fork@PLT
	mov	DWORD PTR -32[rbp], eax
	cmp	DWORD PTR -32[rbp], 0
	jne	.L24
	mov	edi, 0
	call	close@PLT
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	xdup
	mov	edi, 1
	call	close@PLT
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	xdup
	mov	edi, 2
	call	close@PLT
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	xdup
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	r8d, 0
	mov	rcx, rax
	lea	rdx, .LC6[rip]
	lea	rsi, .LC7[rip]
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	execlp@PLT
	mov	edi, 127
	call	exit@PLT
.L24:
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	close@PLT
	cmp	DWORD PTR -32[rbp], -1
	jne	.L25
	mov	eax, -1
	jmp	.L29
.L25:
	mov	esi, 1
	mov	edi, 2
	call	signal@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	esi, 1
	mov	edi, 3
	call	signal@PLT
	mov	QWORD PTR -16[rbp], rax
	nop
.L27:
	lea	rax, -40[rbp]
	mov	rdi, rax
	call	wait@PLT
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -32[rbp]
	je	.L26
	cmp	DWORD PTR -28[rbp], -1
	jne	.L27
.L26:
	cmp	DWORD PTR -28[rbp], -1
	jne	.L28
	mov	DWORD PTR -40[rbp], -1
.L28:
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	mov	edi, 3
	call	signal@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	mov	edi, 2
	call	signal@PLT
	mov	eax, DWORD PTR -40[rbp]
.L29:
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	xsystem, .-xsystem
	.section	.rodata
.LC8:
	.string	"(%d)!\n"
.LC9:
	.string	"!"
	.text
	.type	ttyin, @function
ttyin:
.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR tty.0[rip]
	test	rax, rax
	jne	.L39
	lea	rsi, .LC1[rip]
	lea	rdi, .LC4[rip]
	call	efopen
	mov	QWORD PTR tty.0[rip], rax
.L39:
	mov	rdx, QWORD PTR tty.0[rip]
	lea	rax, -4112[rbp]
	mov	esi, 4096
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	je	.L33
	movzx	eax, BYTE PTR -4112[rbp]
	cmp	al, 113
	jne	.L34
.L33:
	mov	edi, 0
	call	exit@PLT
.L34:
	movzx	eax, BYTE PTR -4112[rbp]
	cmp	al, 33
	jne	.L35
	lea	rax, -4112[rbp]
	add	rax, 1
	mov	rdi, rax
	call	xsystem
	mov	DWORD PTR -4116[rbp], eax
	cmp	DWORD PTR -4116[rbp], 0
	je	.L36
	mov	eax, DWORD PTR -4116[rbp]
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L39
.L36:
	lea	rdi, .LC9[rip]
	call	puts@PLT
	jmp	.L39
.L35:
	movzx	eax, BYTE PTR -4112[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L40
	call	__stack_chk_fail@PLT
.L40:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	ttyin, .-ttyin
	.local	lines.1
	.comm	lines.1,4,4
	.local	tty.0
	.comm	tty.0,8,8
	.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	"471780.c"
	.text
	.local	progname
	.comm	progname,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"PAGESIZE\000"
	.align	2
.LC1:
	.ascii	"r\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, #22
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	ldr	r2, .L9
	str	r3, [r2]
	ldr	r0, .L9+4
	bl	getenv
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L2
	ldr	r0, [fp, #-12]
	bl	atoi
	str	r0, [fp, #-16]
.L2:
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	ble	.L3
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #45
	bne	.L3
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	add	r3, r3, #1
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	str	r3, [fp, #-28]
.L3:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L4
	mov	r3, #22
	str	r3, [fp, #-16]
.L4:
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	bne	.L5
	ldr	r3, .L9+8
	ldr	r3, [r3]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	print
	b	.L6
.L5:
	mov	r3, #1
	str	r3, [fp, #-20]
	b	.L7
.L8:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L9+12
	mov	r0, r3
	bl	efopen
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-8]
	bl	print
	ldr	r0, [fp, #-8]
	bl	fclose
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L7:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L8
.L6:
	mov	r0, #0
	bl	exit
.L10:
	.align	2
.L9:
	.word	progname
	.word	.LC0
	.word	stdin
	.word	.LC1
	.size	main, .-main
	.section	.rodata
	.align	2
.LC2:
	.ascii	"%s: can't open file %s mode %s\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	efopen, %function
efopen:
	@ args = 0, pretend = 0, frame = 16
	@ 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]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L12
	ldr	r3, [fp, #-8]
	b	.L14
.L12:
	ldr	r3, .L15
	ldr	r0, [r3]
	ldr	r3, .L15+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	str	r3, [sp]
	ldr	r3, [fp, #-16]
	ldr	r1, .L15+8
	bl	fprintf
	mov	r0, #1
	bl	exit
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	stderr
	.word	progname
	.word	.LC2
	.size	efopen, .-efopen
	.section	.rodata
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	print, %function
print:
	@ args = 0, pretend = 0, frame = 4112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #4096
	sub	sp, sp, #16
	sub	r3, fp, #4096
	sub	r3, r3, #4
	str	r0, [r3, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #4
	str	r1, [r3, #-16]
	ldr	r3, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	b	.L18
.L20:
	ldr	r3, .L22+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L22+4
	str	r3, [r2]
	ldr	r3, .L22+4
	ldr	r3, [r3]
	sub	r2, fp, #4096
	sub	r2, r2, #4
	ldr	r2, [r2, #-16]
	cmp	r2, r3
	ble	.L19
	ldr	r3, .L22+8
	ldr	r2, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	fputs
	b	.L18
.L19:
	sub	r3, fp, #4096
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	sub	r2, fp, #4096
	sub	r2, r2, #4
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3, #-4]
	ldr	r3, .L22+8
	ldr	r2, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	fputs
	ldr	r3, .L22+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	bl	ttyin
	ldr	r3, .L22+4
	mov	r2, #0
	str	r2, [r3]
.L18:
	sub	r3, fp, #4096
	sub	r3, r3, #4
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [r2, #-12]
	mov	r1, #4096
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L20
	nop
	ldr	r3, .L22
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L21
	bl	__stack_chk_fail
.L21:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC3
	.word	lines.6433
	.word	stdout
	.size	print, .-print
	.section	.rodata
	.align	2
.LC4:
	.ascii	"dup: %s\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	xdup, %function
xdup:
	@ 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, #-24]
	ldr	r0, [fp, #-24]
	bl	dup
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L26
	ldr	r3, .L27
	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, .L27+4
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L26:
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L28:
	.align	2
.L27:
	.word	stderr
	.word	.LC4
	.size	xdup, .-xdup
	.section	.rodata
	.align	2
.LC5:
	.ascii	"/dev/tty\000"
	.align	2
.LC6:
	.ascii	"%s: cannot open /dev/tty: %s\012\000"
	.align	2
.LC7:
	.ascii	"-c\000"
	.align	2
.LC8:
	.ascii	"sh\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	xsystem, %function
xsystem:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #48
	str	r0, [fp, #-48]
	ldr	r3, .L39
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, .L39+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	mov	r1, #2
	ldr	r0, .L39+8
	bl	open
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmn	r3, #1
	bne	.L30
	ldr	r3, .L39+12
	ldr	r4, [r3]
	ldr	r3, .L39+16
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L39+20
	mov	r0, r4
	bl	fprintf
	mvn	r3, #0
	b	.L37
.L30:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-32]
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L32
	mov	r0, #0
	bl	close
	ldr	r0, [fp, #-36]
	bl	xdup
	mov	r0, #1
	bl	close
	ldr	r0, [fp, #-36]
	bl	xdup
	mov	r0, #2
	bl	close
	ldr	r0, [fp, #-36]
	bl	xdup
	ldr	r0, [fp, #-36]
	bl	close
	mov	r3, #0
	str	r3, [sp]
	ldr	r3, [fp, #-48]
	ldr	r2, .L39+24
	ldr	r1, .L39+28
	ldr	r0, .L39+28
	bl	execlp
	mov	r0, #127
	bl	exit
.L32:
	ldr	r0, [fp, #-36]
	bl	close
	ldr	r3, [fp, #-32]
	cmn	r3, #1
	bne	.L33
	mvn	r3, #0
	b	.L37
.L33:
	mov	r1, #1
	mov	r0, #2
	bl	signal
	str	r0, [fp, #-28]
	mov	r1, #1
	mov	r0, #3
	bl	signal
	str	r0, [fp, #-24]
	nop
.L35:
	sub	r3, fp, #40
	mov	r0, r3
	bl	wait
	str	r0, [fp, #-20]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	beq	.L34
	ldr	r3, [fp, #-20]
	cmn	r3, #1
	bne	.L35
.L34:
	ldr	r3, [fp, #-20]
	cmn	r3, #1
	bne	.L36
	mvn	r3, #0
	str	r3, [fp, #-40]
.L36:
	ldr	r1, [fp, #-24]
	mov	r0, #3
	bl	signal
	ldr	r1, [fp, #-28]
	mov	r0, #2
	bl	signal
	ldr	r3, [fp, #-40]
.L37:
	ldr	r2, .L39
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L38
	bl	__stack_chk_fail
.L38:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L40:
	.align	2
.L39:
	.word	.LC9
	.word	stdout
	.word	.LC5
	.word	stderr
	.word	progname
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	xsystem, .-xsystem
	.section	.rodata
	.align	2
.LC10:
	.ascii	"(%d)!\012\000"
	.align	2
.LC11:
	.ascii	"!\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ttyin, %function
ttyin:
	@ args = 0, pretend = 0, frame = 4104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4096
	sub	sp, sp, #12
	ldr	r3, .L52
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, .L52+4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L49
	ldr	r1, .L52+8
	ldr	r0, .L52+12
	bl	efopen
	mov	r3, r0
	ldr	r2, .L52+4
	str	r3, [r2]
.L49:
	ldr	r3, .L52+4
	ldr	r2, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, #4096
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	beq	.L43
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldrb	r3, [r3, #-4]	@ zero_extendqisi2
	cmp	r3, #113
	bne	.L44
.L43:
	mov	r0, #0
	bl	exit
.L44:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldrb	r3, [r3, #-4]	@ zero_extendqisi2
	cmp	r3, #33
	bne	.L45
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	add	r3, r3, #1
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r4, r2
	mov	r0, r3
	bl	xsystem
	str	r0, [r4, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r3, #0
	beq	.L46
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r1, [r3, #-8]
	ldr	r0, .L52+16
	bl	printf
	b	.L49
.L46:
	ldr	r0, .L52+20
	bl	puts
	b	.L49
.L45:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldrb	r3, [r3, #-4]	@ zero_extendqisi2
	ldr	r2, .L52
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L50
	bl	__stack_chk_fail
.L50:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L53:
	.align	2
.L52:
	.word	.LC12
	.word	tty.6456
	.word	.LC1
	.word	.LC5
	.word	.LC10
	.word	.LC11
	.size	ttyin, .-ttyin
	.local	lines.6433
	.comm	lines.6433,4,4
	.local	tty.6456
	.comm	tty.6456,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
