	.file	"999834.c"
	.intel_syntax noprefix
	.text
	.globl	MAX_LINE
	.data
	.align 4
	.type	MAX_LINE, @object
	.size	MAX_LINE, 4
MAX_LINE:
	.long	80
	.globl	BUFFER_SIZE
	.align 4
	.type	BUFFER_SIZE, @object
	.size	BUFFER_SIZE, 4
BUFFER_SIZE:
	.long	1024
	.globl	LAST_CMD
	.align 4
	.type	LAST_CMD, @object
	.size	LAST_CMD, 4
LAST_CMD:
	.long	-1
	.globl	MAX
	.align 4
	.type	MAX, @object
	.size	MAX, 4
MAX:
	.long	512
	.globl	count
	.bss
	.align 4
	.type	count, @object
	.size	count, 4
count:
	.zero	4
	.globl	filePtr
	.align 8
	.type	filePtr, @object
	.size	filePtr, 8
filePtr:
	.zero	8
	.globl	head
	.align 8
	.type	head, @object
	.size	head, 8
head:
	.zero	8
	.globl	last
	.align 8
	.type	last, @object
	.size	last, 8
last:
	.zero	8
	.text
	.globl	save_cmd
	.type	save_cmd, @function
save_cmd:
.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	QWORD PTR -24[rbp], rdi
	mov	eax, DWORD PTR count[rip]
	add	eax, 1
	mov	DWORD PTR count[rip], eax
	mov	rax, QWORD PTR head[rip]
	test	rax, rax
	je	.L2
	mov	edi, 104
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR head[rip]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 96[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 96[rax], 0
	mov	rdx, QWORD PTR head[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 88[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	edx, DWORD PTR count[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 80[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR head[rip], rax
	jmp	.L4
.L2:
	mov	edi, 104
	call	malloc@PLT
	mov	QWORD PTR head[rip], rax
	mov	rax, QWORD PTR head[rip]
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcpy@PLT
	mov	rax, QWORD PTR head[rip]
	mov	edx, DWORD PTR count[rip]
	mov	DWORD PTR 80[rax], edx
	mov	rax, QWORD PTR head[rip]
	mov	QWORD PTR 88[rax], 0
	mov	rax, QWORD PTR head[rip]
	mov	QWORD PTR 96[rax], 0
	mov	rax, QWORD PTR head[rip]
	mov	QWORD PTR last[rip], rax
.L4:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	save_cmd, .-save_cmd
	.section	.rodata
.LC0:
	.string	"r"
	.align 8
.LC1:
	.string	"/Users/shashvatkedia/Desktop/Shell/hist.txt"
	.text
	.globl	read_file
	.type	read_file, @function
read_file:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r12
	push	rbx
	sub	rsp, 48
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	r12, rax
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR filePtr[rip], rax
	mov	DWORD PTR count[rip], 0
	mov	ebx, DWORD PTR MAX_LINE[rip]
	movsx	rax, ebx
	sub	rax, 1
	mov	QWORD PTR -56[rbp], rax
	movsx	rax, ebx
	mov	QWORD PTR -80[rbp], rax
	mov	QWORD PTR -72[rbp], 0
	movsx	rax, ebx
	mov	r14, rax
	mov	r15d, 0
	movsx	rax, ebx
	mov	edx, 16
	sub	rdx, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L6:
	cmp	rsp, rdx
	je	.L7
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L6
.L7:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L8
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L8:
	mov	rax, rsp
	add	rax, 0
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR filePtr[rip]
	test	rax, rax
	je	.L9
	jmp	.L10
.L11:
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	BYTE PTR [rax+rdx], 0
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	save_cmd
.L10:
	mov	rdx, QWORD PTR filePtr[rip]
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, ebx
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L11
.L9:
	mov	rax, QWORD PTR filePtr[rip]
	mov	rdi, rax
	call	fclose@PLT
	mov	rsp, r12
	nop
	mov	rax, QWORD PTR -40[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	lea	rsp, -32[rbp]
	pop	rbx
	pop	r12
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	read_file, .-read_file
	.section	.rodata
.LC2:
	.string	"a"
.LC3:
	.string	"%s \n"
	.text
	.globl	write_file
	.type	write_file, @function
write_file:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rsi, .LC2[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR filePtr[rip], rax
	mov	rax, QWORD PTR head[rip]
	mov	rdx, rax
	mov	rax, QWORD PTR filePtr[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR filePtr[rip]
	mov	rdi, rax
	call	fclose@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	write_file, .-write_file
	.section	.rodata
.LC4:
	.string	"%d %s\n"
.LC5:
	.string	"\n%d %s"
	.text
	.globl	show_history
	.type	show_history, @function
show_history:
.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	eax, DWORD PTR count[rip]
	cmp	eax, 9
	jg	.L15
	mov	rax, QWORD PTR head[rip]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L16
.L17:
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 80[rax]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 88[rax]
	mov	QWORD PTR -16[rbp], rax
.L16:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 88[rax]
	test	rax, rax
	jne	.L17
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 80[rax]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L22
.L15:
	mov	rax, QWORD PTR head[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -20[rbp], 0
	jmp	.L19
.L21:
	cmp	QWORD PTR -8[rbp], 0
	je	.L20
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 80[rax]
	mov	esi, eax
	lea	rdi, .LC5[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
.L20:
	add	DWORD PTR -20[rbp], 1
.L19:
	cmp	DWORD PTR -20[rbp], 9
	jle	.L21
.L22:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	show_history, .-show_history
	.section	.rodata
.LC6:
	.string	"No command present in history"
	.text
	.globl	output_command
	.type	output_command, @function
output_command:
.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	DWORD PTR -20[rbp], edi
	cmp	DWORD PTR -20[rbp], 0
	jne	.L24
	mov	eax, DWORD PTR count[rip]
	test	eax, eax
	jne	.L25
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L26
.L25:
	mov	rax, QWORD PTR head[rip]
	jmp	.L26
.L24:
	mov	eax, DWORD PTR count[rip]
	cmp	DWORD PTR -20[rbp], eax
	jle	.L27
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L26
.L27:
	mov	rax, QWORD PTR head[rip]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L28
.L30:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 80[rax]
	cmp	DWORD PTR -20[rbp], eax
	jne	.L29
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L26
.L29:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 88[rax]
	mov	QWORD PTR -8[rbp], rax
.L28:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 88[rax]
	test	rax, rax
	jne	.L30
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 80[rax]
	cmp	DWORD PTR -20[rbp], eax
	jne	.L31
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L26
.L31:
	mov	eax, 0
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	output_command, .-output_command
	.section	.rodata
.LC7:
	.string	"Invalid"
	.text
	.globl	execute
	.type	execute, @function
execute:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	call	fork@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jne	.L33
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L33:
	cmp	DWORD PTR -4[rbp], 0
	jle	.L35
	cmp	DWORD PTR -28[rbp], 0
	jne	.L35
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	waitpid@PLT
.L35:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	execute, .-execute
	.section	.rodata
.LC8:
	.string	"shashvat>"
.LC9:
	.string	"history"
.LC10:
	.string	"!!"
.LC11:
	.string	"Executing   %s\n"
.LC12:
	.string	"quit"
.LC13:
	.string	"Executing  %s\n"
.LC14:
	.string	" "
.LC15:
	.string	"&"
	.text
	.globl	main
	.type	main, @function
main:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 120
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	rbx, rax
	mov	eax, 0
	call	read_file
	mov	DWORD PTR -120[rbp], 1
	mov	DWORD PTR -124[rbp], 0
	mov	DWORD PTR -128[rbp], 0
	mov	eax, DWORD PTR MAX_LINE[rip]
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -104[rbp], rdx
	movsx	rdx, eax
	mov	QWORD PTR -144[rbp], rdx
	mov	QWORD PTR -136[rbp], 0
	movsx	rdx, eax
	mov	QWORD PTR -160[rbp], rdx
	mov	QWORD PTR -152[rbp], 0
	cdqe
	mov	edx, 16
	sub	rdx, 1
	add	rax, rdx
	mov	ecx, 16
	mov	edx, 0
	div	rcx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L37:
	cmp	rsp, rdx
	je	.L38
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L37
.L38:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L39
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L39:
	mov	rax, rsp
	add	rax, 0
	mov	QWORD PTR -96[rbp], rax
	mov	eax, DWORD PTR MAX_LINE[rip]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	add	eax, 1
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -88[rbp], rdx
	movsx	rdx, eax
	mov	r14, rdx
	mov	r15d, 0
	movsx	rdx, eax
	mov	r12, rdx
	mov	r13d, 0
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	ecx, 16
	mov	edx, 0
	div	rcx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L40:
	cmp	rsp, rdx
	je	.L41
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L40
.L41:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L42
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L42:
	mov	rax, rsp
	add	rax, 7
	shr	rax, 3
	sal	rax, 3
	mov	QWORD PTR -80[rbp], rax
	jmp	.L43
.L58:
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR stdin[rip]
	mov	ecx, DWORD PTR MAX_LINE[rip]
	mov	rax, QWORD PTR -96[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	fgets@PLT
	mov	rax, QWORD PTR -96[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -96[rbp]
	mov	BYTE PTR [rax+rdx], 0
	mov	rax, QWORD PTR -96[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L44
	mov	eax, 0
	call	show_history
	mov	rax, QWORD PTR -96[rbp]
	mov	rdi, rax
	call	save_cmd
	mov	eax, 0
	call	write_file
	jmp	.L43
.L44:
	mov	rax, QWORD PTR -96[rbp]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L45
	mov	edi, 0
	call	output_command
	mov	QWORD PTR -64[rbp], rax
	cmp	QWORD PTR -64[rbp], 0
	je	.L43
	mov	rdx, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR -96[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -64[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L47
	mov	eax, 0
	call	show_history
	mov	rax, QWORD PTR -96[rbp]
	mov	rdi, rax
	call	save_cmd
	mov	eax, 0
	call	write_file
	jmp	.L43
.L47:
	mov	rax, QWORD PTR -64[rbp]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L48
	mov	DWORD PTR -120[rbp], 0
	mov	rax, QWORD PTR -96[rbp]
	mov	rdi, rax
	call	save_cmd
	mov	eax, 0
	call	write_file
	jmp	.L43
.L48:
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	save_cmd
	jmp	.L49
.L45:
	mov	rax, QWORD PTR -96[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 33
	jne	.L50
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 1
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -116[rbp], eax
	cmp	DWORD PTR -116[rbp], 0
	je	.L49
	mov	eax, DWORD PTR -116[rbp]
	mov	edi, eax
	call	output_command
	mov	QWORD PTR -72[rbp], rax
	cmp	QWORD PTR -72[rbp], 0
	je	.L43
	mov	rdx, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR -96[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -72[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L52
	mov	eax, 0
	call	show_history
	mov	rax, QWORD PTR -96[rbp]
	mov	rdi, rax
	call	save_cmd
	mov	eax, 0
	call	write_file
	jmp	.L43
.L52:
	mov	rax, QWORD PTR -72[rbp]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L53
	mov	DWORD PTR -120[rbp], 0
	mov	rax, QWORD PTR -96[rbp]
	mov	rdi, rax
	call	save_cmd
	mov	eax, 0
	call	write_file
	jmp	.L43
.L53:
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	save_cmd
	jmp	.L49
.L50:
	mov	rax, QWORD PTR -96[rbp]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L54
	mov	DWORD PTR -120[rbp], 0
	mov	rax, QWORD PTR -96[rbp]
	mov	rdi, rax
	call	save_cmd
	mov	eax, 0
	call	write_file
	jmp	.L43
.L54:
	mov	rax, QWORD PTR -96[rbp]
	mov	rdi, rax
	call	save_cmd
.L49:
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	rax, QWORD PTR -96[rbp]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -112[rbp], rax
	jmp	.L55
.L56:
	mov	rax, QWORD PTR -80[rbp]
	mov	edx, DWORD PTR -128[rbp]
	movsx	rdx, edx
	mov	rcx, QWORD PTR -112[rbp]
	mov	QWORD PTR [rax+rdx*8], rcx
	lea	rsi, .LC14[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -112[rbp], rax
	add	DWORD PTR -128[rbp], 1
.L55:
	cmp	QWORD PTR -112[rbp], 0
	jne	.L56
	mov	rax, QWORD PTR -80[rbp]
	mov	edx, DWORD PTR -128[rbp]
	movsx	rdx, edx
	mov	QWORD PTR [rax+rdx*8], 0
	mov	eax, DWORD PTR -128[rbp]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -80[rbp]
	movsx	rdx, edx
	mov	rax, QWORD PTR [rax+rdx*8]
	lea	rsi, .LC15[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L57
	mov	DWORD PTR -124[rbp], 1
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	eax, DWORD PTR -128[rbp]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -80[rbp]
	movsx	rdx, edx
	mov	QWORD PTR [rax+rdx*8], 0
.L57:
	mov	DWORD PTR -128[rbp], 0
	mov	eax, 0
	call	write_file
	mov	edx, DWORD PTR -124[rbp]
	mov	rax, QWORD PTR -80[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	execute
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
.L43:
	cmp	DWORD PTR -120[rbp], 0
	jne	.L58
	mov	eax, 0
	mov	rsp, rbx
	mov	rbx, QWORD PTR -56[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L60
	call	__stack_chk_fail@PLT
.L60:
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.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	"999834.c"
	.text
	.global	MAX_LINE
	.data
	.align	2
	.type	MAX_LINE, %object
	.size	MAX_LINE, 4
MAX_LINE:
	.word	80
	.global	BUFFER_SIZE
	.align	2
	.type	BUFFER_SIZE, %object
	.size	BUFFER_SIZE, 4
BUFFER_SIZE:
	.word	1024
	.global	LAST_CMD
	.align	2
	.type	LAST_CMD, %object
	.size	LAST_CMD, 4
LAST_CMD:
	.word	-1
	.global	MAX
	.align	2
	.type	MAX, %object
	.size	MAX, 4
MAX:
	.word	512
	.global	count
	.bss
	.align	2
	.type	count, %object
	.size	count, 4
count:
	.space	4
	.comm	filePtr,4,4
	.global	head
	.align	2
	.type	head, %object
	.size	head, 4
head:
	.space	4
	.global	last
	.align	2
	.type	last, %object
	.size	last, 4
last:
	.space	4
	.text
	.align	2
	.global	save_cmd
	.syntax unified
	.arm
	.fpu softvfp
	.type	save_cmd, %function
save_cmd:
	@ 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, .L5
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L5
	str	r3, [r2]
	ldr	r3, .L5+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L2
	mov	r0, #92
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, .L5+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #88]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #88]
	ldr	r3, .L5+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #84]
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	strcpy
	ldr	r3, .L5
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #80]
	ldr	r2, .L5+4
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	b	.L4
.L2:
	mov	r0, #92
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L5+4
	str	r2, [r3]
	ldr	r3, .L5+4
	ldr	r3, [r3]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	strcpy
	ldr	r3, .L5+4
	ldr	r3, [r3]
	ldr	r2, .L5
	ldr	r2, [r2]
	str	r2, [r3, #80]
	ldr	r3, .L5+4
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #84]
	ldr	r3, .L5+4
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #88]
	ldr	r3, .L5+4
	ldr	r3, [r3]
	ldr	r2, .L5+8
	str	r3, [r2]
.L4:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	count
	.word	head
	.word	last
	.size	save_cmd, .-save_cmd
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"/Users/shashvatkedia/Desktop/Shell/hist.txt\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_file
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_file, %function
read_file:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #16
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r5, r3
	ldr	r1, .L12+4
	ldr	r0, .L12+8
	bl	fopen
	mov	r3, r0
	ldr	r2, .L12+12
	str	r3, [r2]
	ldr	r3, .L12+16
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L12+20
	ldr	r4, [r3]
	sub	r3, r4, #1
	str	r3, [fp, #-24]
	mov	r3, r4
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r3, r4
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r3, r4
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #0
	str	r3, [fp, #-20]
	ldr	r3, .L12+12
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L8
	b	.L9
.L10:
	ldr	r0, [fp, #-20]
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	ldr	r2, [fp, #-20]
	mov	r1, #0
	strb	r1, [r2, r3]
	ldr	r0, [fp, #-20]
	bl	save_cmd
.L9:
	ldr	r3, .L12+12
	ldr	r3, [r3]
	mov	r2, r3
	mov	r1, r4
	ldr	r0, [fp, #-20]
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L10
.L8:
	ldr	r3, .L12+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
	mov	sp, r5
	nop
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.word	filePtr
	.word	count
	.word	MAX_LINE
	.size	read_file, .-read_file
	.section	.rodata
	.align	2
.LC3:
	.ascii	"a\000"
	.align	2
.LC4:
	.ascii	"%s \012\000"
	.text
	.align	2
	.global	write_file
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_file, %function
write_file:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r1, .L15
	ldr	r0, .L15+4
	bl	fopen
	mov	r3, r0
	ldr	r2, .L15+8
	str	r3, [r2]
	ldr	r3, .L15+8
	ldr	r3, [r3]
	ldr	r2, .L15+12
	ldr	r2, [r2]
	ldr	r1, .L15+16
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L15+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
	nop
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC3
	.word	.LC1
	.word	filePtr
	.word	head
	.word	.LC4
	.size	write_file, .-write_file
	.section	.rodata
	.align	2
.LC5:
	.ascii	"%d %s\012\000"
	.align	2
.LC6:
	.ascii	"\012%d %s\000"
	.text
	.align	2
	.global	show_history
	.syntax unified
	.arm
	.fpu softvfp
	.type	show_history, %function
show_history:
	@ 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, .L26
	ldr	r3, [r3]
	cmp	r3, #9
	bgt	.L18
	ldr	r3, .L26+4
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	b	.L19
.L20:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #80]
	ldr	r2, [fp, #-16]
	mov	r1, r3
	ldr	r0, .L26+8
	bl	printf
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #84]
	str	r3, [fp, #-16]
.L19:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #84]
	cmp	r3, #0
	bne	.L20
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #80]
	ldr	r2, [fp, #-16]
	mov	r1, r3
	ldr	r0, .L26+8
	bl	printf
	b	.L25
.L18:
	ldr	r3, .L26+4
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L22
.L24:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L23
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #80]
	ldr	r2, [fp, #-12]
	mov	r1, r3
	ldr	r0, .L26+12
	bl	printf
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #84]
	str	r3, [fp, #-12]
.L23:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L22:
	ldr	r3, [fp, #-8]
	cmp	r3, #9
	ble	.L24
.L25:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	count
	.word	head
	.word	.LC5
	.word	.LC6
	.size	show_history, .-show_history
	.section	.rodata
	.align	2
.LC7:
	.ascii	"No command present in history\000"
	.text
	.align	2
	.global	output_command
	.syntax unified
	.arm
	.fpu softvfp
	.type	output_command, %function
output_command:
	@ 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]
	cmp	r3, #0
	bne	.L29
	ldr	r3, .L37
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L30
	ldr	r0, .L37+4
	bl	puts
	mov	r3, #0
	b	.L31
.L30:
	ldr	r3, .L37+8
	ldr	r3, [r3]
	b	.L31
.L29:
	ldr	r3, .L37
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	ble	.L32
	ldr	r0, .L37+4
	bl	puts
	mov	r3, #0
	b	.L31
.L32:
	ldr	r3, .L37+8
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	b	.L33
.L35:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #80]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bne	.L34
	ldr	r3, [fp, #-8]
	b	.L31
.L34:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #84]
	str	r3, [fp, #-8]
.L33:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #84]
	cmp	r3, #0
	bne	.L35
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #80]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bne	.L36
	ldr	r3, [fp, #-8]
	b	.L31
.L36:
	mov	r3, #0
.L31:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L38:
	.align	2
.L37:
	.word	count
	.word	.LC7
	.word	head
	.size	output_command, .-output_command
	.section	.rodata
	.align	2
.LC8:
	.ascii	"Invalid\000"
	.text
	.align	2
	.global	execute
	.syntax unified
	.arm
	.fpu softvfp
	.type	execute, %function
execute:
	@ 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]
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L40
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	execvp
	ldr	r0, .L43
	bl	puts
	mov	r0, #0
	bl	exit
.L40:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	ble	.L42
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L42
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	waitpid
.L42:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L44:
	.align	2
.L43:
	.word	.LC8
	.size	execute, .-execute
	.section	.rodata
	.align	2
.LC9:
	.ascii	"shashvat>\000"
	.align	2
.LC10:
	.ascii	"history\000"
	.align	2
.LC11:
	.ascii	"!!\000"
	.align	2
.LC12:
	.ascii	"Executing   %s\012\000"
	.align	2
.LC13:
	.ascii	"quit\000"
	.align	2
.LC14:
	.ascii	"Executing  %s\012\000"
	.align	2
.LC15:
	.ascii	" \000"
	.align	2
.LC16:
	.ascii	"&\000"
	.align	2
.LC17:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #52
	ldr	r3, .L64
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r4, r3
	bl	read_file
	mov	r3, #1
	str	r3, [fp, #-48]
	mov	r3, #0
	str	r3, [fp, #-52]
	mov	r3, #0
	str	r3, [fp, #-56]
	ldr	r3, .L64+4
	ldr	ip, [r3]
	sub	r3, ip, #1
	str	r3, [fp, #-44]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r3, ip
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #0
	str	r3, [fp, #-40]
	ldr	r3, .L64+4
	ldr	r3, [r3]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	add	ip, r3, #1
	sub	r3, ip, #1
	str	r3, [fp, #-36]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-32]
	b	.L46
.L61:
	ldr	r0, .L64+8
	bl	printf
	ldr	r3, .L64+4
	ldr	r3, [r3]
	ldr	r2, .L64+12
	ldr	r2, [r2]
	mov	r1, r3
	ldr	r0, [fp, #-40]
	bl	fgets
	ldr	r0, [fp, #-40]
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	ldr	r2, [fp, #-40]
	mov	r1, #0
	strb	r1, [r2, r3]
	ldr	r1, .L64+16
	ldr	r0, [fp, #-40]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L47
	bl	show_history
	ldr	r0, [fp, #-40]
	bl	save_cmd
	bl	write_file
	b	.L46
.L47:
	ldr	r1, .L64+20
	ldr	r0, [fp, #-40]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L48
	mov	r0, #0
	bl	output_command
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L46
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-40]
	bl	strcpy
	ldr	r1, [fp, #-20]
	ldr	r0, .L64+24
	bl	printf
	ldr	r1, .L64+16
	ldr	r0, [fp, #-20]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L50
	bl	show_history
	ldr	r0, [fp, #-40]
	bl	save_cmd
	bl	write_file
	b	.L46
.L50:
	ldr	r1, .L64+28
	ldr	r0, [fp, #-20]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L51
	mov	r3, #0
	str	r3, [fp, #-48]
	ldr	r0, [fp, #-40]
	bl	save_cmd
	bl	write_file
	b	.L46
.L51:
	ldr	r0, [fp, #-20]
	bl	save_cmd
	b	.L52
.L48:
	ldr	r3, [fp, #-40]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #33
	bne	.L53
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L52
	ldr	r0, [fp, #-28]
	bl	output_command
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	beq	.L46
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-40]
	bl	strcpy
	ldr	r1, [fp, #-24]
	ldr	r0, .L64+32
	bl	printf
	ldr	r1, .L64+16
	ldr	r0, [fp, #-24]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L55
	bl	show_history
	ldr	r0, [fp, #-40]
	bl	save_cmd
	bl	write_file
	b	.L46
.L55:
	ldr	r1, .L64+28
	ldr	r0, [fp, #-24]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L56
	mov	r3, #0
	str	r3, [fp, #-48]
	ldr	r0, [fp, #-40]
	bl	save_cmd
	bl	write_file
	b	.L46
.L56:
	ldr	r0, [fp, #-24]
	bl	save_cmd
	b	.L52
.L53:
	ldr	r1, .L64+28
	ldr	r0, [fp, #-40]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L57
	mov	r3, #0
	str	r3, [fp, #-48]
	ldr	r0, [fp, #-40]
	bl	save_cmd
	bl	write_file
	b	.L46
.L57:
	ldr	r0, [fp, #-40]
	bl	save_cmd
.L52:
	ldr	r3, .L64+36
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r1, .L64+40
	ldr	r0, [fp, #-40]
	bl	strtok
	str	r0, [fp, #-60]
	b	.L58
.L59:
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-56]
	ldr	r1, [fp, #-60]
	str	r1, [r3, r2, lsl #2]
	ldr	r1, .L64+40
	mov	r0, #0
	bl	strtok
	str	r0, [fp, #-60]
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
.L58:
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	bne	.L59
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-56]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-56]
	sub	r2, r3, #1
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, r2, lsl #2]
	ldr	r1, .L64+44
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L60
	mov	r3, #1
	str	r3, [fp, #-52]
	ldr	r3, .L64+36
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r3, [fp, #-56]
	sub	r2, r3, #1
	ldr	r3, [fp, #-32]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
.L60:
	mov	r3, #0
	str	r3, [fp, #-56]
	bl	write_file
	ldr	r1, [fp, #-52]
	ldr	r0, [fp, #-32]
	bl	execute
	ldr	r3, .L64+36
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
.L46:
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bne	.L61
	mov	r3, #0
	mov	sp, r4
	ldr	r2, .L64
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L63
	bl	__stack_chk_fail
.L63:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L65:
	.align	2
.L64:
	.word	.LC17
	.word	MAX_LINE
	.word	.LC9
	.word	stdin
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	stdout
	.word	.LC15
	.word	.LC16
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
