	.file	"774159.c"
	.intel_syntax noprefix
	.text
	.globl	HISTORY_SIZE
	.data
	.align 4
	.type	HISTORY_SIZE, @object
	.size	HISTORY_SIZE, 4
HISTORY_SIZE:
	.long	12
	.globl	HISTORY_FILE_SIZE
	.bss
	.align 4
	.type	HISTORY_FILE_SIZE, @object
	.size	HISTORY_FILE_SIZE, 4
HISTORY_FILE_SIZE:
	.zero	4
	.globl	HISTORY_COUNT
	.data
	.align 4
	.type	HISTORY_COUNT, @object
	.size	HISTORY_COUNT, 4
HISTORY_COUNT:
	.long	1
	.globl	OUT_HISTORY_CHANGED
	.bss
	.align 4
	.type	OUT_HISTORY_CHANGED, @object
	.size	OUT_HISTORY_CHANGED, 4
OUT_HISTORY_CHANGED:
	.zero	4
	.globl	fp
	.align 8
	.type	fp, @object
	.size	fp, 8
fp:
	.zero	8
	.section	.rodata
.LC0:
	.string	"\nSys2ShC: "
.LC1:
	.string	"rr"
.LC2:
	.string	"r"
.LC3:
	.string	"history"
.LC4:
	.string	"h"
.LC5:
	.string	"sethistoryout"
.LC6:
	.string	"sethistory"
.LC7:
	.string	"quit"
.LC8:
	.string	"exit"
	.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, 528
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -520[rbp], 0
	lea	rdx, -96[rbp]
	lea	rax, -520[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	initializeHistoryFile
.L11:
	mov	DWORD PTR -528[rbp], 0
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	fflush@PLT
	lea	rcx, -96[rbp]
	lea	rdx, -528[rbp]
	lea	rsi, -512[rbp]
	lea	rax, -176[rbp]
	mov	rdi, rax
	call	setup
	mov	DWORD PTR -524[rbp], 1
	lea	rax, -176[rbp]
	mov	edx, 2
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L2
	lea	rdx, -520[rbp]
	lea	rax, -96[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	mostRecentCommand
	mov	DWORD PTR -524[rbp], eax
	cmp	DWORD PTR -524[rbp], 0
	je	.L3
	lea	rcx, -96[rbp]
	lea	rdx, -528[rbp]
	lea	rsi, -512[rbp]
	lea	rax, -176[rbp]
	mov	rdi, rax
	call	modifiedSetup
	jmp	.L3
.L2:
	movzx	eax, BYTE PTR -176[rbp]
	movzx	edx, BYTE PTR .LC2[rip]
	movzx	eax, al
	movzx	edx, dl
	sub	eax, edx
	test	eax, eax
	jne	.L3
	lea	rdx, -520[rbp]
	lea	rcx, -512[rbp]
	lea	rax, -96[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	rHistory
	mov	DWORD PTR -524[rbp], eax
	cmp	DWORD PTR -524[rbp], 0
	je	.L3
	lea	rcx, -96[rbp]
	lea	rdx, -528[rbp]
	lea	rsi, -512[rbp]
	lea	rax, -176[rbp]
	mov	rdi, rax
	call	modifiedSetup
.L3:
	lea	rax, -176[rbp]
	mov	edx, 7
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	je	.L4
	movzx	eax, BYTE PTR -176[rbp]
	movzx	edx, BYTE PTR .LC4[rip]
	movzx	eax, al
	movzx	edx, dl
	sub	eax, edx
	test	eax, eax
	jne	.L5
.L4:
	lea	rdx, -96[rbp]
	lea	rax, -520[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	addToHistory
	lea	rax, -520[rbp]
	mov	rdi, rax
	call	viewHistory
	jmp	.L6
.L5:
	lea	rax, -176[rbp]
	mov	edx, 13
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L7
	lea	rdx, -96[rbp]
	lea	rax, -520[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	addToHistory
	lea	rax, -512[rbp]
	mov	rdi, rax
	call	setOutHistorySize
	jmp	.L11
.L7:
	lea	rax, -176[rbp]
	mov	edx, 10
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L8
	lea	rdx, -96[rbp]
	lea	rax, -520[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	addToHistory
	lea	rdx, -520[rbp]
	lea	rax, -512[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	setHistorySize
	jmp	.L11
.L8:
	lea	rax, -176[rbp]
	mov	edx, 4
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	je	.L9
	lea	rax, -176[rbp]
	mov	edx, 4
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L10
.L9:
	lea	rax, -520[rbp]
	mov	rdi, rax
	call	quit
	jmp	.L6
.L10:
	movzx	eax, BYTE PTR -176[rbp]
	movzx	eax, al
	test	eax, eax
	je	.L11
	cmp	DWORD PTR -524[rbp], 0
	je	.L11
	lea	rdx, -96[rbp]
	lea	rax, -520[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	addToHistory
	mov	edx, DWORD PTR -528[rbp]
	lea	rcx, -512[rbp]
	lea	rax, -176[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	executeCommand
.L6:
	jmp	.L11
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC9:
	.string	"error reading command"
	.text
	.globl	setup
	.type	setup, @function
setup:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	QWORD PTR -48[rbp], rcx
	mov	rdx, QWORD PTR stdin[rip]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 80
	mov	rdi, rax
	call	fgets@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -12[rbp], -1
	cmp	DWORD PTR -4[rbp], 0
	jne	.L14
	mov	edi, 0
	call	exit@PLT
.L14:
	cmp	DWORD PTR -4[rbp], 0
	jns	.L15
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L15:
	mov	DWORD PTR -16[rbp], 0
	jmp	.L16
.L24:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	cmp	eax, 38
	je	.L17
	cmp	eax, 38
	jg	.L18
	cmp	eax, 32
	je	.L19
	cmp	eax, 32
	jg	.L18
	cmp	eax, 9
	je	.L19
	cmp	eax, 10
	je	.L20
	jmp	.L18
.L19:
	cmp	DWORD PTR -12[rbp], -1
	je	.L21
	mov	eax, DWORD PTR -12[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR -24[rbp]
	add	rdx, rcx
	mov	QWORD PTR [rax], rdx
	add	DWORD PTR -8[rbp], 1
.L21:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	DWORD PTR -12[rbp], -1
	jmp	.L22
.L20:
	cmp	DWORD PTR -12[rbp], -1
	je	.L23
	mov	eax, DWORD PTR -12[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR -24[rbp]
	add	rdx, rcx
	mov	QWORD PTR [rax], rdx
	add	DWORD PTR -8[rbp], 1
.L23:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	QWORD PTR [rax], 0
	jmp	.L22
.L17:
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], 1
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	jmp	.L22
.L18:
	cmp	DWORD PTR -12[rbp], -1
	jne	.L22
	mov	eax, DWORD PTR -16[rbp]
	mov	DWORD PTR -12[rbp], eax
.L22:
	add	DWORD PTR -16[rbp], 1
.L16:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jl	.L24
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	QWORD PTR [rax], 0
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	setup, .-setup
	.section	.rodata
	.align 8
.LC10:
	.string	"Error: No such file, directory, or command."
	.text
	.globl	child
	.type	child, @function
child:
.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, 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	execvp@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L26
	lea	rdi, .LC10[rip]
	call	puts@PLT
.L26:
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE8:
	.size	child, .-child
	.section	.rodata
.LC11:
	.string	"%d %s"
	.text
	.globl	quit
	.type	quit, @function
quit:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -16[rbp], rax
	mov	eax, DWORD PTR OUT_HISTORY_CHANGED[rip]
	cmp	eax, 1
	jne	.L28
	mov	eax, DWORD PTR HISTORY_FILE_SIZE[rip]
	mov	DWORD PTR HISTORY_SIZE[rip], eax
.L28:
	lea	rax, -24[rbp]
	mov	rdi, rax
	call	adjustForSize
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L29
	jmp	.L30
.L31:
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 88[rax]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	lea	rcx, 4[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR fp[rip]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
.L30:
	mov	rax, QWORD PTR -24[rbp]
	test	rax, rax
	jne	.L31
.L29:
	mov	rax, QWORD PTR fp[rip]
	mov	rdi, rax
	call	fclose@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE9:
	.size	quit, .-quit
	.section	.rodata
.LC12:
	.string	"Nothing in history."
	.text
	.globl	viewHistory
	.type	viewHistory, @function
viewHistory:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L34
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jne	.L37
.L34:
	lea	rdi, .LC12[rip]
	call	puts@PLT
	jmp	.L36
.L38:
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 4[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 88[rax]
	mov	QWORD PTR -8[rbp], rax
.L37:
	cmp	QWORD PTR -8[rbp], 0
	jne	.L38
	nop
.L36:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	viewHistory, .-viewHistory
	.globl	addToHistory
	.type	addToHistory, @function
addToHistory:
.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, 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
	mov	edi, 96
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR HISTORY_COUNT[rip]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 4[rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcpy@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR 88[rax], 0
	mov	eax, DWORD PTR HISTORY_COUNT[rip]
	add	eax, 1
	mov	DWORD PTR HISTORY_COUNT[rip], eax
	mov	eax, DWORD PTR HISTORY_SIZE[rip]
	test	eax, eax
	jne	.L40
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	jmp	.L47
.L40:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L42
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L47
.L42:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, 4[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 4
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L43
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR 88[rax]
	test	rax, rax
	jne	.L43
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L47
.L43:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L44
.L45:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 88[rax]
	mov	QWORD PTR -16[rbp], rax
.L44:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 88[rax]
	test	rax, rax
	jne	.L45
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 88[rax], rdx
	lea	rdx, -24[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	removeDuplicates
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	adjustForSize
.L47:
	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
.LFE11:
	.size	addToHistory, .-addToHistory
	.globl	adjustForSize
	.type	adjustForSize, @function
adjustForSize:
.LFB12:
	.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 -24[rbp], rdi
	mov	eax, DWORD PTR HISTORY_COUNT[rip]
	mov	edx, DWORD PTR HISTORY_SIZE[rip]
	sub	eax, edx
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jle	.L52
	jmp	.L50
.L51:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR 88[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
.L50:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L52
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -4[rbp], eax
	jg	.L51
.L52:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	adjustForSize, .-adjustForSize
	.globl	removeDuplicates
	.type	removeDuplicates, @function
removeDuplicates:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -20[rbp], 1
	jmp	.L54
.L58:
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, 4[rax]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 4
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L55
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, 4[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 4
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L56
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR 88[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L57
.L56:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR 88[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 88[rax], rdx
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 88[rax]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L57
.L55:
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 88[rax]
	mov	QWORD PTR -16[rbp], rax
	add	DWORD PTR -20[rbp], 1
.L54:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 88[rax]
	test	rax, rax
	jne	.L58
	nop
.L57:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	removeDuplicates, .-removeDuplicates
	.section	.rodata
.LC13:
	.string	"History cannot be negative. "
	.align 8
.LC14:
	.string	"History Size is now set to: %d \n"
	.text
	.globl	setHistorySize
	.type	setHistorySize, @function
setHistorySize:
.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	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR HISTORY_SIZE[rip], eax
	mov	eax, DWORD PTR HISTORY_SIZE[rip]
	test	eax, eax
	jns	.L60
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR HISTORY_SIZE[rip], 0
.L60:
	mov	eax, DWORD PTR HISTORY_SIZE[rip]
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	adjustForSize
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	setHistorySize, .-setHistorySize
	.section	.rodata
.LC15:
	.string	"Error creating child process."
	.text
	.globl	executeCommand
	.type	executeCommand, @function
executeCommand:
.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, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	call	fork@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jne	.L62
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	child
	jmp	.L63
.L62:
	cmp	DWORD PTR -12[rbp], 0
	jns	.L63
	lea	rdi, .LC15[rip]
	call	puts@PLT
.L63:
	cmp	DWORD PTR -36[rbp], 0
	jne	.L66
	lea	rcx, -16[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	waitpid@PLT
.L66:
	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
.LFE15:
	.size	executeCommand, .-executeCommand
	.section	.rodata
.LC16:
	.string	"No recent commands."
	.text
	.globl	mostRecentCommand
	.type	mostRecentCommand, @function
mostRecentCommand:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L70
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	jmp	.L69
.L71:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 88[rax]
	mov	QWORD PTR -8[rbp], rax
.L70:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 88[rax]
	test	rax, rax
	jne	.L71
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 4[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, 1
.L69:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	mostRecentCommand, .-mostRecentCommand
	.globl	modifiedSetup
	.type	modifiedSetup, @function
modifiedSetup:
.LFB17:
	.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	QWORD PTR -40[rbp], rdx
	mov	QWORD PTR -48[rbp], rcx
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -12[rbp], -1
	cmp	DWORD PTR -4[rbp], 0
	jne	.L73
	mov	edi, 0
	call	exit@PLT
.L73:
	cmp	DWORD PTR -4[rbp], 0
	jns	.L74
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L74:
	mov	DWORD PTR -16[rbp], 0
	jmp	.L75
.L83:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	cmp	eax, 38
	je	.L76
	cmp	eax, 38
	jg	.L77
	cmp	eax, 32
	je	.L78
	cmp	eax, 32
	jg	.L77
	cmp	eax, 9
	je	.L78
	cmp	eax, 10
	je	.L79
	jmp	.L77
.L78:
	cmp	DWORD PTR -12[rbp], -1
	je	.L80
	mov	eax, DWORD PTR -12[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR -24[rbp]
	add	rdx, rcx
	mov	QWORD PTR [rax], rdx
	add	DWORD PTR -8[rbp], 1
.L80:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	DWORD PTR -12[rbp], -1
	jmp	.L81
.L79:
	cmp	DWORD PTR -12[rbp], -1
	je	.L82
	mov	eax, DWORD PTR -12[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR -24[rbp]
	add	rdx, rcx
	mov	QWORD PTR [rax], rdx
	add	DWORD PTR -8[rbp], 1
.L82:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	QWORD PTR [rax], 0
	jmp	.L81
.L76:
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], 1
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	jmp	.L81
.L77:
	cmp	DWORD PTR -12[rbp], -1
	jne	.L81
	mov	eax, DWORD PTR -16[rbp]
	mov	DWORD PTR -12[rbp], eax
.L81:
	add	DWORD PTR -16[rbp], 1
.L75:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jl	.L83
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	QWORD PTR [rax], 0
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	modifiedSetup, .-modifiedSetup
	.section	.rodata
	.align 8
.LC17:
	.string	"Must include a number or string after r."
.LC18:
	.string	"No commands in history."
	.align 8
.LC19:
	.string	"Number after r must be positive."
	.align 8
.LC20:
	.string	"Could not find command in history. "
	.text
	.globl	rHistory
	.type	rHistory, @function
rHistory:
.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, 160
	mov	QWORD PTR -136[rbp], rdi
	mov	QWORD PTR -144[rbp], rsi
	mov	QWORD PTR -152[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -152[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -104[rbp], rax
	mov	rdx, QWORD PTR -136[rbp]
	lea	rax, -96[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -144[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L85
	lea	rdi, .LC17[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L99
.L85:
	mov	rax, QWORD PTR -152[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L87
	lea	rdi, .LC18[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L99
.L87:
	mov	rax, QWORD PTR -144[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rcx, -112[rbp]
	mov	edx, 10
	mov	rsi, rcx
	mov	rdi, rax
	call	strtol@PLT
	mov	DWORD PTR -120[rbp], eax
	mov	rax, QWORD PTR -112[rbp]
	test	rax, rax
	je	.L88
	mov	rax, QWORD PTR -112[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L89
.L88:
	cmp	DWORD PTR -120[rbp], 0
	jg	.L90
	lea	rdi, .LC19[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L99
.L90:
	mov	rax, QWORD PTR -152[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR 88[rax]
	test	rax, rax
	jne	.L92
	mov	rax, QWORD PTR -152[rbp]
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -120[rbp], eax
	jne	.L92
	mov	rax, QWORD PTR -104[rbp]
	lea	rdx, 4[rax]
	mov	rax, QWORD PTR -136[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, 1
	jmp	.L99
.L94:
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -120[rbp], eax
	jne	.L93
	mov	rax, QWORD PTR -104[rbp]
	lea	rdx, 4[rax]
	mov	rax, QWORD PTR -136[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, 1
	jmp	.L99
.L93:
	mov	rax, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR 88[rax]
	mov	QWORD PTR -104[rbp], rax
.L92:
	mov	rax, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR 88[rax]
	test	rax, rax
	jne	.L94
	lea	rdi, .LC20[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L99
.L89:
	mov	DWORD PTR -124[rbp], 0
	mov	rax, QWORD PTR -112[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -116[rbp], eax
	jmp	.L95
.L97:
	mov	eax, DWORD PTR -116[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -112[rbp]
	mov	rcx, QWORD PTR -104[rbp]
	add	rcx, 4
	mov	rsi, rax
	mov	rdi, rcx
	call	strncmp@PLT
	test	eax, eax
	jne	.L96
	mov	rax, QWORD PTR -104[rbp]
	lea	rdx, 4[rax]
	lea	rax, -96[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	DWORD PTR -124[rbp], 1
.L96:
	mov	rax, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR 88[rax]
	mov	QWORD PTR -104[rbp], rax
.L95:
	mov	rax, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR 88[rax]
	test	rax, rax
	jne	.L97
	cmp	DWORD PTR -124[rbp], 1
	jne	.L98
	lea	rdx, -96[rbp]
	mov	rax, QWORD PTR -136[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, 1
	jmp	.L99
.L98:
	lea	rdi, .LC20[rip]
	call	puts@PLT
	mov	eax, 0
.L99:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L100
	call	__stack_chk_fail@PLT
.L100:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	rHistory, .-rHistory
	.section	.rodata
.LC21:
	.string	"history.shell"
.LC22:
	.string	"Creating history file."
.LC23:
	.string	"a+"
.LC24:
	.string	"Reading from history file."
.LC25:
	.string	"w+"
	.text
	.globl	initializeHistoryFile
	.type	initializeHistoryFile, @function
initializeHistoryFile:
.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, 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	rsi, .LC2[rip]
	lea	rdi, .LC21[rip]
	call	fopen@PLT
	mov	QWORD PTR fp[rip], rax
	mov	rax, QWORD PTR fp[rip]
	test	rax, rax
	jne	.L102
	lea	rdi, .LC22[rip]
	call	puts@PLT
	lea	rsi, .LC23[rip]
	lea	rdi, .LC21[rip]
	call	fopen@PLT
	mov	QWORD PTR fp[rip], rax
	jmp	.L109
.L102:
	lea	rdi, .LC24[rip]
	call	puts@PLT
	jmp	.L104
.L107:
	mov	eax, DWORD PTR HISTORY_FILE_SIZE[rip]
	add	eax, 1
	mov	DWORD PTR HISTORY_FILE_SIZE[rip], eax
	mov	edx, DWORD PTR HISTORY_FILE_SIZE[rip]
	mov	eax, DWORD PTR HISTORY_SIZE[rip]
	cmp	edx, eax
	jle	.L105
	mov	eax, DWORD PTR HISTORY_SIZE[rip]
	add	eax, 1
	mov	DWORD PTR HISTORY_SIZE[rip], eax
.L105:
	lea	rcx, -16[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, 10
	mov	rsi, rcx
	mov	rdi, rax
	call	strtol@PLT
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR HISTORY_COUNT[rip], eax
	mov	rax, QWORD PTR -16[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	jne	.L106
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 1
	mov	QWORD PTR -16[rbp], rax
.L106:
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	addToHistory
.L104:
	mov	rdx, QWORD PTR fp[rip]
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, 80
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L107
	mov	rax, QWORD PTR fp[rip]
	mov	rdi, rax
	call	fclose@PLT
	lea	rsi, .LC25[rip]
	lea	rdi, .LC21[rip]
	call	fopen@PLT
.L109:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L108
	call	__stack_chk_fail@PLT
.L108:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	initializeHistoryFile, .-initializeHistoryFile
	.section	.rodata
	.align 8
.LC26:
	.string	"History Out Size is now set to: %d \n"
	.text
	.globl	setOutHistorySize
	.type	setOutHistorySize, @function
setOutHistorySize:
.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	rax, QWORD PTR -8[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR HISTORY_FILE_SIZE[rip], eax
	mov	eax, DWORD PTR HISTORY_FILE_SIZE[rip]
	test	eax, eax
	jns	.L111
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR HISTORY_FILE_SIZE[rip], 0
.L111:
	mov	eax, DWORD PTR HISTORY_FILE_SIZE[rip]
	mov	esi, eax
	lea	rdi, .LC26[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR OUT_HISTORY_CHANGED[rip], 1
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	setOutHistorySize, .-setOutHistorySize
	.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	"774159.c"
	.text
	.global	HISTORY_SIZE
	.data
	.align	2
	.type	HISTORY_SIZE, %object
	.size	HISTORY_SIZE, 4
HISTORY_SIZE:
	.word	12
	.global	HISTORY_FILE_SIZE
	.bss
	.align	2
	.type	HISTORY_FILE_SIZE, %object
	.size	HISTORY_FILE_SIZE, 4
HISTORY_FILE_SIZE:
	.space	4
	.global	HISTORY_COUNT
	.data
	.align	2
	.type	HISTORY_COUNT, %object
	.size	HISTORY_COUNT, 4
HISTORY_COUNT:
	.word	1
	.global	OUT_HISTORY_CHANGED
	.bss
	.align	2
	.type	OUT_HISTORY_CHANGED, %object
	.size	OUT_HISTORY_CHANGED, 4
OUT_HISTORY_CHANGED:
	.space	4
	.comm	fp,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012Sys2ShC: \000"
	.align	2
.LC1:
	.ascii	"rr\000"
	.align	2
.LC2:
	.ascii	"r\000"
	.align	2
.LC3:
	.ascii	"history\000"
	.align	2
.LC4:
	.ascii	"h\000"
	.align	2
.LC5:
	.ascii	"sethistoryout\000"
	.align	2
.LC6:
	.ascii	"sethistory\000"
	.align	2
.LC7:
	.ascii	"quit\000"
	.align	2
.LC8:
	.ascii	"exit\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 344
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #344
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-340]
	sub	r2, fp, #88
	sub	r3, fp, #340
	mov	r1, r2
	mov	r0, r3
	bl	initializeHistoryFile
.L11:
	mov	r3, #0
	str	r3, [fp, #-344]
	ldr	r0, .L13+4
	bl	printf
	mov	r0, #0
	bl	fflush
	sub	r3, fp, #88
	sub	r2, fp, #344
	sub	r1, fp, #332
	sub	r0, fp, #168
	bl	setup
	mov	r3, #1
	str	r3, [fp, #-336]
	sub	r3, fp, #168
	mov	r2, #2
	ldr	r1, .L13+8
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L2
	sub	r2, fp, #340
	sub	r3, fp, #88
	mov	r1, r2
	mov	r0, r3
	bl	mostRecentCommand
	str	r0, [fp, #-336]
	ldr	r3, [fp, #-336]
	cmp	r3, #0
	beq	.L3
	sub	r3, fp, #88
	sub	r2, fp, #344
	sub	r1, fp, #332
	sub	r0, fp, #168
	bl	modifiedSetup
	b	.L3
.L2:
	ldrb	r2, [fp, #-168]	@ zero_extendqisi2
	ldr	r3, .L13+12
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r2, r3
	cmp	r3, #0
	bne	.L3
	sub	r2, fp, #340
	sub	r1, fp, #332
	sub	r3, fp, #88
	mov	r0, r3
	bl	rHistory
	str	r0, [fp, #-336]
	ldr	r3, [fp, #-336]
	cmp	r3, #0
	beq	.L3
	sub	r3, fp, #88
	sub	r2, fp, #344
	sub	r1, fp, #332
	sub	r0, fp, #168
	bl	modifiedSetup
.L3:
	sub	r3, fp, #168
	mov	r2, #7
	ldr	r1, .L13+16
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L4
	ldrb	r2, [fp, #-168]	@ zero_extendqisi2
	ldr	r3, .L13+20
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r2, r3
	cmp	r3, #0
	bne	.L5
.L4:
	sub	r2, fp, #88
	sub	r3, fp, #340
	mov	r1, r2
	mov	r0, r3
	bl	addToHistory
	sub	r3, fp, #340
	mov	r0, r3
	bl	viewHistory
	b	.L6
.L5:
	sub	r3, fp, #168
	mov	r2, #13
	ldr	r1, .L13+24
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L7
	sub	r2, fp, #88
	sub	r3, fp, #340
	mov	r1, r2
	mov	r0, r3
	bl	addToHistory
	sub	r3, fp, #332
	mov	r0, r3
	bl	setOutHistorySize
	b	.L11
.L7:
	sub	r3, fp, #168
	mov	r2, #10
	ldr	r1, .L13+28
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L8
	sub	r2, fp, #88
	sub	r3, fp, #340
	mov	r1, r2
	mov	r0, r3
	bl	addToHistory
	sub	r2, fp, #340
	sub	r3, fp, #332
	mov	r1, r2
	mov	r0, r3
	bl	setHistorySize
	b	.L11
.L8:
	sub	r3, fp, #168
	mov	r2, #4
	ldr	r1, .L13+32
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	sub	r3, fp, #168
	mov	r2, #4
	ldr	r1, .L13+36
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L10
.L9:
	sub	r3, fp, #340
	mov	r0, r3
	bl	quit
	b	.L6
.L10:
	ldrb	r3, [fp, #-168]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L11
	ldr	r3, [fp, #-336]
	cmp	r3, #0
	beq	.L11
	sub	r2, fp, #88
	sub	r3, fp, #340
	mov	r1, r2
	mov	r0, r3
	bl	addToHistory
	ldr	r2, [fp, #-344]
	sub	r1, fp, #332
	sub	r3, fp, #168
	mov	r0, r3
	bl	executeCommand
.L6:
	b	.L11
.L14:
	.align	2
.L13:
	.word	.LC9
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.section	.rodata
	.align	2
.LC10:
	.ascii	"error reading command\000"
	.text
	.align	2
	.global	setup
	.syntax unified
	.arm
	.fpu softvfp
	.type	setup, %function
setup:
	@ 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, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	ldr	r3, .L28
	ldr	r3, [r3]
	mov	r2, r3
	mov	r1, #80
	ldr	r0, [fp, #-24]
	bl	fgets
	ldr	r0, [fp, #-24]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-36]
	bl	strcpy
	mov	r3, #0
	str	r3, [fp, #-12]
	mvn	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L16
	mov	r0, #0
	bl	exit
.L16:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L17
	ldr	r0, .L28+4
	bl	perror
	mvn	r0, #0
	bl	exit
.L17:
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L18
.L27:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #9
	cmp	r3, #29
	ldrls	pc, [pc, r3, asl #2]
	b	.L19
.L21:
	.word	.L22
	.word	.L23
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L22
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L20
.L22:
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	beq	.L24
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-28]
	add	r3, r1, r3
	ldr	r1, [fp, #-24]
	add	r2, r1, r2
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L24:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	mvn	r3, #0
	str	r3, [fp, #-16]
	b	.L25
.L23:
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	beq	.L26
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-28]
	add	r3, r1, r3
	ldr	r1, [fp, #-24]
	add	r2, r1, r2
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L26:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	b	.L25
.L20:
	ldr	r3, [fp, #-32]
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	b	.L25
.L19:
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L25
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-16]
.L25:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L18:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	blt	.L27
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L29:
	.align	2
.L28:
	.word	stdin
	.word	.LC10
	.size	setup, .-setup
	.section	.rodata
	.align	2
.LC11:
	.ascii	"Error: No such file, directory, or command.\000"
	.text
	.align	2
	.global	child
	.syntax unified
	.arm
	.fpu softvfp
	.type	child, %function
child:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	execvp
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L31
	ldr	r0, .L32
	bl	puts
.L31:
	mov	r0, #0
	bl	exit
.L33:
	.align	2
.L32:
	.word	.LC11
	.size	child, .-child
	.section	.rodata
	.align	2
.LC12:
	.ascii	"%d %s\000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	quit
	.syntax unified
	.arm
	.fpu softvfp
	.type	quit, %function
quit:
	@ 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]
	ldr	r3, .L40
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, .L40+4
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L35
	ldr	r3, .L40+8
	ldr	r3, [r3]
	ldr	r2, .L40+12
	str	r3, [r2]
.L35:
	sub	r3, fp, #16
	mov	r0, r3
	bl	adjustForSize
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L36
	b	.L37
.L38:
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #84]
	str	r3, [fp, #-16]
	ldr	r3, .L40+16
	ldr	r0, [r3]
	ldr	r3, [fp, #-12]
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldr	r1, .L40+20
	bl	fprintf
	ldr	r0, [fp, #-12]
	bl	free
.L37:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L38
.L36:
	ldr	r3, .L40+16
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
	mov	r0, #0
	bl	exit
.L41:
	.align	2
.L40:
	.word	.LC13
	.word	OUT_HISTORY_CHANGED
	.word	HISTORY_FILE_SIZE
	.word	HISTORY_SIZE
	.word	fp
	.word	.LC12
	.size	quit, .-quit
	.section	.rodata
	.align	2
.LC14:
	.ascii	"Nothing in history.\000"
	.text
	.align	2
	.global	viewHistory
	.syntax unified
	.arm
	.fpu softvfp
	.type	viewHistory, %function
viewHistory:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L43
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L46
.L43:
	ldr	r0, .L48
	bl	puts
	b	.L45
.L47:
	ldr	r3, [fp, #-8]
	ldr	r1, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	mov	r2, r3
	ldr	r0, .L48+4
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #84]
	str	r3, [fp, #-8]
.L46:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L47
	nop
.L45:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L49:
	.align	2
.L48:
	.word	.LC14
	.word	.LC12
	.size	viewHistory, .-viewHistory
	.section	.rodata
	.align	2
.LC15:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	addToHistory
	.syntax unified
	.arm
	.fpu softvfp
	.type	addToHistory, %function
addToHistory:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L59
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #88
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r2, .L59+4
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	ldr	r1, [fp, #-28]
	mov	r0, r3
	bl	strcpy
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3, #84]
	ldr	r3, .L59+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L59+4
	str	r3, [r2]
	ldr	r3, .L59+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L51
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	b	.L58
.L51:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L53
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	b	.L58
.L53:
	ldr	r3, [fp, #-16]
	add	r2, r3, #4
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	add	r3, r3, #4
	mov	r1, r3
	mov	r0, r2
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L54
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r3, [r3, #84]
	cmp	r3, #0
	bne	.L54
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	b	.L58
.L54:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	b	.L55
.L56:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #84]
	str	r3, [fp, #-12]
.L55:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #84]
	cmp	r3, #0
	bne	.L56
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	str	r2, [r3, #84]
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	removeDuplicates
	ldr	r0, [fp, #-24]
	bl	adjustForSize
.L58:
	nop
	ldr	r3, .L59
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L57
	bl	__stack_chk_fail
.L57:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L60:
	.align	2
.L59:
	.word	.LC15
	.word	HISTORY_COUNT
	.word	HISTORY_SIZE
	.size	addToHistory, .-addToHistory
	.align	2
	.global	adjustForSize
	.syntax unified
	.arm
	.fpu softvfp
	.type	adjustForSize, %function
adjustForSize:
	@ 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, #-16]
	ldr	r3, .L66
	ldr	r2, [r3]
	ldr	r3, .L66+4
	ldr	r3, [r3]
	sub	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	ble	.L65
	b	.L63
.L64:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [r3, #84]
	ldr	r3, [fp, #-16]
	str	r2, [r3]
.L63:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L65
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bgt	.L64
.L65:
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L67:
	.align	2
.L66:
	.word	HISTORY_COUNT
	.word	HISTORY_SIZE
	.size	adjustForSize, .-adjustForSize
	.align	2
	.global	removeDuplicates
	.syntax unified
	.arm
	.fpu softvfp
	.type	removeDuplicates, %function
removeDuplicates:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L69
.L73:
	ldr	r3, [fp, #-16]
	add	r2, r3, #4
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	add	r3, r3, #4
	mov	r1, r3
	mov	r0, r2
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L70
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	add	r2, r3, #4
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	add	r3, r3, #4
	mov	r1, r3
	mov	r0, r2
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L71
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r2, [r3, #84]
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	b	.L72
.L71:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #84]
	ldr	r3, [fp, #-12]
	str	r2, [r3, #84]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #84]
	str	r3, [fp, #-16]
	b	.L72
.L70:
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #84]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L69:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #84]
	cmp	r3, #0
	bne	.L73
	nop
.L72:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	removeDuplicates, .-removeDuplicates
	.section	.rodata
	.align	2
.LC16:
	.ascii	"History cannot be negative. \000"
	.align	2
.LC17:
	.ascii	"History Size is now set to: %d \012\000"
	.text
	.align	2
	.global	setHistorySize
	.syntax unified
	.arm
	.fpu softvfp
	.type	setHistorySize, %function
setHistorySize:
	@ 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]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L76
	str	r3, [r2]
	ldr	r3, .L76
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L75
	ldr	r0, .L76+4
	bl	printf
	ldr	r3, .L76
	mov	r2, #0
	str	r2, [r3]
.L75:
	ldr	r3, .L76
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L76+8
	bl	printf
	ldr	r0, [fp, #-12]
	bl	adjustForSize
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L77:
	.align	2
.L76:
	.word	HISTORY_SIZE
	.word	.LC16
	.word	.LC17
	.size	setHistorySize, .-setHistorySize
	.section	.rodata
	.align	2
.LC18:
	.ascii	"Error creating child process.\000"
	.align	2
.LC19:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	executeCommand
	.syntax unified
	.arm
	.fpu softvfp
	.type	executeCommand, %function
executeCommand:
	@ 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, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	ldr	r3, .L84
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L79
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	child
	b	.L80
.L79:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L80
	ldr	r0, .L84+4
	bl	puts
.L80:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L83
	sub	r3, fp, #16
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	waitpid
.L83:
	nop
	ldr	r3, .L84
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L82
	bl	__stack_chk_fail
.L82:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L85:
	.align	2
.L84:
	.word	.LC19
	.word	.LC18
	.size	executeCommand, .-executeCommand
	.section	.rodata
	.align	2
.LC20:
	.ascii	"No recent commands.\000"
	.text
	.align	2
	.global	mostRecentCommand
	.syntax unified
	.arm
	.fpu softvfp
	.type	mostRecentCommand, %function
mostRecentCommand:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L89
	ldr	r0, .L91
	bl	printf
	mov	r3, #0
	b	.L88
.L90:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #84]
	str	r3, [fp, #-8]
.L89:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #84]
	cmp	r3, #0
	bne	.L90
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	strcpy
	mov	r3, #1
.L88:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L92:
	.align	2
.L91:
	.word	.LC20
	.size	mostRecentCommand, .-mostRecentCommand
	.align	2
	.global	modifiedSetup
	.syntax unified
	.arm
	.fpu softvfp
	.type	modifiedSetup, %function
modifiedSetup:
	@ 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, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-24]
	bl	strcpy
	ldr	r0, [fp, #-24]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-36]
	bl	strcpy
	mov	r3, #0
	str	r3, [fp, #-12]
	mvn	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L94
	mov	r0, #0
	bl	exit
.L94:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L95
	ldr	r0, .L106
	bl	perror
	mvn	r0, #0
	bl	exit
.L95:
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L96
.L105:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #9
	cmp	r3, #29
	ldrls	pc, [pc, r3, asl #2]
	b	.L97
.L99:
	.word	.L100
	.word	.L101
	.word	.L97
	.word	.L97
	.word	.L97
	.word	.L97
	.word	.L97
	.word	.L97
	.word	.L97
	.word	.L97
	.word	.L97
	.word	.L97
	.word	.L97
	.word	.L97
	.word	.L97
	.word	.L97
	.word	.L97
	.word	.L97
	.word	.L97
	.word	.L97
	.word	.L97
	.word	.L97
	.word	.L97
	.word	.L100
	.word	.L97
	.word	.L97
	.word	.L97
	.word	.L97
	.word	.L97
	.word	.L98
.L100:
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	beq	.L102
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-28]
	add	r3, r1, r3
	ldr	r1, [fp, #-24]
	add	r2, r1, r2
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L102:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	mvn	r3, #0
	str	r3, [fp, #-16]
	b	.L103
.L101:
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	beq	.L104
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-28]
	add	r3, r1, r3
	ldr	r1, [fp, #-24]
	add	r2, r1, r2
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L104:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	b	.L103
.L98:
	ldr	r3, [fp, #-32]
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	b	.L103
.L97:
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L103
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-16]
.L103:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L96:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	blt	.L105
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L107:
	.align	2
.L106:
	.word	.LC10
	.size	modifiedSetup, .-modifiedSetup
	.section	.rodata
	.align	2
.LC21:
	.ascii	"Must include a number or string after r.\000"
	.align	2
.LC22:
	.ascii	"No commands in history.\000"
	.align	2
.LC23:
	.ascii	"Number after r must be positive.\000"
	.align	2
.LC24:
	.ascii	"Could not find command in history. \000"
	.align	2
.LC25:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	rHistory
	.syntax unified
	.arm
	.fpu softvfp
	.type	rHistory, %function
rHistory:
	@ args = 0, pretend = 0, frame = 120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #120
	str	r0, [fp, #-112]
	str	r1, [fp, #-116]
	str	r2, [fp, #-120]
	ldr	r3, .L125
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-120]
	ldr	r3, [r3]
	str	r3, [fp, #-104]
	sub	r3, fp, #88
	ldr	r1, [fp, #-112]
	mov	r0, r3
	bl	strcpy
	ldr	r3, [fp, #-116]
	add	r3, r3, #4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L109
	ldr	r0, .L125+4
	bl	puts
	mov	r3, #0
	b	.L123
.L109:
	ldr	r3, [fp, #-120]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L111
	ldr	r0, .L125+8
	bl	puts
	mov	r3, #0
	b	.L123
.L111:
	ldr	r3, [fp, #-116]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r1, fp, #108
	mov	r2, #10
	mov	r0, r3
	bl	strtol
	str	r0, [fp, #-96]
	ldr	r3, [fp, #-108]
	cmp	r3, #0
	beq	.L112
	ldr	r3, [fp, #-108]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L113
.L112:
	ldr	r3, [fp, #-96]
	cmp	r3, #0
	bgt	.L114
	ldr	r0, .L125+12
	bl	puts
	mov	r3, #0
	b	.L123
.L114:
	ldr	r3, [fp, #-120]
	ldr	r3, [r3]
	ldr	r3, [r3, #84]
	cmp	r3, #0
	bne	.L116
	ldr	r3, [fp, #-120]
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r2, [fp, #-96]
	cmp	r2, r3
	bne	.L116
	ldr	r3, [fp, #-104]
	add	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	strcpy
	mov	r3, #1
	b	.L123
.L118:
	ldr	r3, [fp, #-104]
	ldr	r3, [r3]
	ldr	r2, [fp, #-96]
	cmp	r2, r3
	bne	.L117
	ldr	r3, [fp, #-104]
	add	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	strcpy
	mov	r3, #1
	b	.L123
.L117:
	ldr	r3, [fp, #-104]
	ldr	r3, [r3, #84]
	str	r3, [fp, #-104]
.L116:
	ldr	r3, [fp, #-104]
	ldr	r3, [r3, #84]
	cmp	r3, #0
	bne	.L118
	ldr	r0, .L125+16
	bl	puts
	mov	r3, #0
	b	.L123
.L113:
	mov	r3, #0
	str	r3, [fp, #-100]
	ldr	r3, [fp, #-108]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-92]
	b	.L119
.L121:
	ldr	r3, [fp, #-104]
	add	r3, r3, #4
	ldr	r1, [fp, #-108]
	ldr	r2, [fp, #-92]
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L120
	ldr	r3, [fp, #-104]
	add	r2, r3, #4
	sub	r3, fp, #88
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	mov	r3, #1
	str	r3, [fp, #-100]
.L120:
	ldr	r3, [fp, #-104]
	ldr	r3, [r3, #84]
	str	r3, [fp, #-104]
.L119:
	ldr	r3, [fp, #-104]
	ldr	r3, [r3, #84]
	cmp	r3, #0
	bne	.L121
	ldr	r3, [fp, #-100]
	cmp	r3, #1
	bne	.L122
	sub	r3, fp, #88
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	strcpy
	mov	r3, #1
	b	.L123
.L122:
	ldr	r0, .L125+16
	bl	puts
	mov	r3, #0
.L123:
	ldr	r2, .L125
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L124
	bl	__stack_chk_fail
.L124:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L126:
	.align	2
.L125:
	.word	.LC25
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.size	rHistory, .-rHistory
	.section	.rodata
	.align	2
.LC26:
	.ascii	"history.shell\000"
	.align	2
.LC27:
	.ascii	"Creating history file.\000"
	.align	2
.LC28:
	.ascii	"a+\000"
	.align	2
.LC29:
	.ascii	"Reading from history file.\000"
	.align	2
.LC30:
	.ascii	"w+\000"
	.align	2
.LC31:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	initializeHistoryFile
	.syntax unified
	.arm
	.fpu softvfp
	.type	initializeHistoryFile, %function
initializeHistoryFile:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L136
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L136+4
	ldr	r0, .L136+8
	bl	fopen
	mov	r3, r0
	ldr	r2, .L136+12
	str	r3, [r2]
	ldr	r3, .L136+12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L128
	ldr	r0, .L136+16
	bl	puts
	ldr	r1, .L136+20
	ldr	r0, .L136+8
	bl	fopen
	mov	r3, r0
	ldr	r2, .L136+12
	str	r3, [r2]
	b	.L135
.L128:
	ldr	r0, .L136+24
	bl	puts
	b	.L130
.L133:
	ldr	r3, .L136+28
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L136+28
	str	r3, [r2]
	ldr	r3, .L136+28
	ldr	r2, [r3]
	ldr	r3, .L136+32
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L131
	ldr	r3, .L136+32
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L136+32
	str	r3, [r2]
.L131:
	sub	r3, fp, #16
	mov	r2, #10
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	strtol
	str	r0, [fp, #-12]
	ldr	r2, .L136+36
	ldr	r3, [fp, #-12]
	str	r3, [r2]
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L132
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L132:
	ldr	r3, [fp, #-16]
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	addToHistory
.L130:
	ldr	r3, .L136+12
	ldr	r3, [r3]
	mov	r2, r3
	mov	r1, #80
	ldr	r0, [fp, #-28]
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L133
	ldr	r3, .L136+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
	ldr	r1, .L136+40
	ldr	r0, .L136+8
	bl	fopen
.L135:
	nop
	ldr	r3, .L136
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L134
	bl	__stack_chk_fail
.L134:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L137:
	.align	2
.L136:
	.word	.LC31
	.word	.LC2
	.word	.LC26
	.word	fp
	.word	.LC27
	.word	.LC28
	.word	.LC29
	.word	HISTORY_FILE_SIZE
	.word	HISTORY_SIZE
	.word	HISTORY_COUNT
	.word	.LC30
	.size	initializeHistoryFile, .-initializeHistoryFile
	.section	.rodata
	.align	2
.LC32:
	.ascii	"History Out Size is now set to: %d \012\000"
	.text
	.align	2
	.global	setOutHistorySize
	.syntax unified
	.arm
	.fpu softvfp
	.type	setOutHistorySize, %function
setOutHistorySize:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L140
	str	r3, [r2]
	ldr	r3, .L140
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L139
	ldr	r0, .L140+4
	bl	printf
	ldr	r3, .L140
	mov	r2, #0
	str	r2, [r3]
.L139:
	ldr	r3, .L140
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L140+8
	bl	printf
	ldr	r3, .L140+12
	mov	r2, #1
	str	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L141:
	.align	2
.L140:
	.word	HISTORY_FILE_SIZE
	.word	.LC16
	.word	.LC32
	.word	OUT_HISTORY_CHANGED
	.size	setOutHistorySize, .-setOutHistorySize
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
