	.file	"134879.c"
	.intel_syntax noprefix
	.text
	.globl	catalog_f
	.bss
	.align 8
	.type	catalog_f, @object
	.size	catalog_f, 8
catalog_f:
	.zero	8
	.globl	name
	.align 32
	.type	name, @object
	.size	name, 262144
name:
	.zero	262144
	.globl	author
	.align 32
	.type	author, @object
	.size	author, 262144
author:
	.zero	262144
	.globl	publisher
	.align 32
	.type	publisher, @object
	.size	publisher, 262144
publisher:
	.zero	262144
	.globl	numBooks
	.align 4
	.type	numBooks, @object
	.size	numBooks, 4
numBooks:
	.zero	4
	.text
	.globl	consumeLine
	.type	consumeLine, @function
consumeLine:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	nop
.L2:
	call	getchar@PLT
	cmp	eax, 10
	jne	.L2
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	consumeLine, .-consumeLine
	.section	.rodata
.LC0:
	.string	"Card Catalog:"
.LC1:
	.string	"1: Enter"
.LC2:
	.string	"2: Search by Author"
.LC3:
	.string	"3: Search by Title"
.LC4:
	.string	"4: Quit"
.LC5:
	.string	"5: Save to Disk"
.LC6:
	.string	"%d"
	.text
	.globl	menu
	.type	menu, @function
menu:
.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, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 10
	call	putchar@PLT
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 10
	call	putchar@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 10
	call	putchar@PLT
	mov	edi, 58
	call	putchar@PLT
	lea	rax, -12[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, 0
	call	consumeLine
	mov	edi, 10
	call	putchar@PLT
	mov	eax, DWORD PTR -12[rbp]
	test	eax, eax
	jle	.L4
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, 5
	jle	.L5
.L4:
	mov	eax, 0
	jmp	.L7
.L5:
	mov	eax, DWORD PTR -12[rbp]
.L7:
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	menu, .-menu
	.section	.rodata
.LC7:
	.string	"w"
.LC8:
	.string	"CATALOG.txt"
	.text
	.globl	writeCatFile
	.type	writeCatFile, @function
writeCatFile:
.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, 16
	lea	rsi, .LC7[rip]
	lea	rdi, .LC8[rip]
	call	fopen@PLT
	mov	QWORD PTR catalog_f[rip], rax
	mov	rax, QWORD PTR catalog_f[rip]
	test	rax, rax
	jne	.L10
	mov	eax, 1
	jmp	.L11
.L10:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L12
.L13:
	mov	rax, QWORD PTR catalog_f[rip]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	mov	rcx, rdx
	sal	rcx, 9
	lea	rdx, name[rip]
	add	rdx, rcx
	mov	rsi, rax
	mov	rdi, rdx
	call	fputs@PLT
	mov	rax, QWORD PTR catalog_f[rip]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	mov	rcx, rdx
	sal	rcx, 9
	lea	rdx, author[rip]
	add	rdx, rcx
	mov	rsi, rax
	mov	rdi, rdx
	call	fputs@PLT
	mov	rax, QWORD PTR catalog_f[rip]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	mov	rcx, rdx
	sal	rcx, 9
	lea	rdx, publisher[rip]
	add	rdx, rcx
	mov	rsi, rax
	mov	rdi, rdx
	call	fputs@PLT
	mov	rax, QWORD PTR catalog_f[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	add	DWORD PTR -4[rbp], 1
.L12:
	mov	eax, DWORD PTR numBooks[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L13
	mov	rax, QWORD PTR catalog_f[rip]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	writeCatFile, .-writeCatFile
	.section	.rodata
	.align 8
.LC9:
	.string	"Unable to access Catalog file."
.LC10:
	.string	"r"
.LC11:
	.string	"%*[^\n]"
.LC12:
	.string	"%*c"
	.align 8
.LC13:
	.string	"Malformed Catalog file? (%d lines)"
.LC14:
	.string	"Read %d books into memory.\n"
	.text
	.globl	readCatFile
	.type	readCatFile, @function
readCatFile:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	esi, 0
	lea	rdi, .LC8[rip]
	call	access@PLT
	test	eax, eax
	je	.L15
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L16
.L15:
	lea	rsi, .LC10[rip]
	lea	rdi, .LC8[rip]
	call	fopen@PLT
	mov	QWORD PTR catalog_f[rip], rax
	mov	rax, QWORD PTR catalog_f[rip]
	test	rax, rax
	jne	.L17
	mov	eax, 1
	jmp	.L16
.L17:
	mov	DWORD PTR -12[rbp], 0
	jmp	.L18
.L19:
	add	DWORD PTR -12[rbp], 1
.L18:
	mov	rax, QWORD PTR catalog_f[rip]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	rax, QWORD PTR catalog_f[rip]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	cmp	eax, -1
	jne	.L19
	mov	rax, QWORD PTR catalog_f[rip]
	mov	rdi, rax
	call	rewind@PLT
	mov	eax, DWORD PTR -12[rbp]
	and	eax, 3
	test	eax, eax
	je	.L20
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L16
.L20:
	mov	eax, DWORD PTR -12[rbp]
	lea	edx, 3[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 2
	mov	DWORD PTR -4[rbp], eax
	mov	DWORD PTR -8[rbp], 0
	jmp	.L21
.L22:
	mov	rax, QWORD PTR catalog_f[rip]
	mov	edx, DWORD PTR -8[rbp]
	movsx	rdx, edx
	mov	rcx, rdx
	sal	rcx, 9
	lea	rdx, name[rip]
	add	rcx, rdx
	mov	rdx, rax
	mov	esi, 512
	mov	rdi, rcx
	call	fgets@PLT
	mov	rax, QWORD PTR catalog_f[rip]
	mov	edx, DWORD PTR -8[rbp]
	movsx	rdx, edx
	mov	rcx, rdx
	sal	rcx, 9
	lea	rdx, author[rip]
	add	rcx, rdx
	mov	rdx, rax
	mov	esi, 512
	mov	rdi, rcx
	call	fgets@PLT
	mov	rax, QWORD PTR catalog_f[rip]
	mov	edx, DWORD PTR -8[rbp]
	movsx	rdx, edx
	mov	rcx, rdx
	sal	rcx, 9
	lea	rdx, publisher[rip]
	add	rcx, rdx
	mov	rdx, rax
	mov	esi, 512
	mov	rdi, rcx
	call	fgets@PLT
	mov	rax, QWORD PTR catalog_f[rip]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	add	DWORD PTR -8[rbp], 1
.L21:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jl	.L22
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR numBooks[rip], eax
	mov	eax, DWORD PTR numBooks[rip]
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR catalog_f[rip]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	readCatFile, .-readCatFile
	.section	.rodata
.LC15:
	.string	"Enter blank name to end."
.LC16:
	.string	"Name: "
.LC17:
	.string	"Author: "
.LC18:
	.string	"Publisher: "
	.text
	.globl	mEnter
	.type	mEnter, @function
mEnter:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC15[rip]
	call	puts@PLT
.L26:
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	edx, DWORD PTR numBooks[rip]
	movsx	rdx, edx
	mov	rcx, rdx
	sal	rcx, 9
	lea	rdx, name[rip]
	add	rcx, rdx
	mov	rdx, rax
	mov	esi, 512
	mov	rdi, rcx
	call	fgets@PLT
	mov	eax, DWORD PTR numBooks[rip]
	cdqe
	sal	rax, 9
	mov	rdx, rax
	lea	rax, name[rip+1]
	movzx	eax, BYTE PTR [rdx+rax]
	test	al, al
	je	.L28
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	edx, DWORD PTR numBooks[rip]
	movsx	rdx, edx
	mov	rcx, rdx
	sal	rcx, 9
	lea	rdx, author[rip]
	add	rcx, rdx
	mov	rdx, rax
	mov	esi, 512
	mov	rdi, rcx
	call	fgets@PLT
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	edx, DWORD PTR numBooks[rip]
	movsx	rdx, edx
	mov	rcx, rdx
	sal	rcx, 9
	lea	rdx, publisher[rip]
	add	rcx, rdx
	mov	rdx, rax
	mov	esi, 512
	mov	rdi, rcx
	call	fgets@PLT
	mov	eax, DWORD PTR numBooks[rip]
	add	eax, 1
	mov	DWORD PTR numBooks[rip], eax
	jmp	.L26
.L28:
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	mEnter, .-mEnter
	.section	.rodata
.LC19:
	.string	"Wrong Option."
.LC20:
	.string	"NOOP."
.LC21:
	.string	"Wrote to Catalog file."
	.align 8
.LC22:
	.string	"Failed to write to Catalog file!"
	.text
	.globl	menuLogic
	.type	menuLogic, @function
menuLogic:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
.L41:
	mov	eax, 0
	call	menu
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 5
	ja	.L41
	mov	eax, DWORD PTR -4[rbp]
	lea	rdx, 0[0+rax*4]
	lea	rax, .L32[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L32[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L32:
	.long	.L37-.L32
	.long	.L36-.L32
	.long	.L35-.L32
	.long	.L34-.L32
	.long	.L42-.L32
	.long	.L31-.L32
	.text
.L37:
	lea	rdi, .LC19[rip]
	call	puts@PLT
	jmp	.L30
.L36:
	mov	eax, 0
	call	mEnter
	jmp	.L30
.L35:
	lea	rdi, .LC20[rip]
	call	puts@PLT
	jmp	.L30
.L34:
	lea	rdi, .LC20[rip]
	call	puts@PLT
	jmp	.L30
.L31:
	mov	eax, 0
	call	writeCatFile
	test	eax, eax
	jne	.L39
	lea	rdi, .LC21[rip]
	call	puts@PLT
	jmp	.L43
.L39:
	lea	rdi, .LC22[rip]
	call	puts@PLT
.L43:
	nop
.L30:
	jmp	.L41
.L42:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	menuLogic, .-menuLogic
	.section	.rodata
	.align 8
.LC23:
	.string	"Unable to read catalog file into memory!"
	.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
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	mov	eax, 0
	call	readCatFile
	test	eax, eax
	je	.L45
	lea	rdi, .LC23[rip]
	call	puts@PLT
.L45:
	mov	eax, 0
	call	menuLogic
	mov	rax, QWORD PTR catalog_f[rip]
	test	rax, rax
	je	.L46
	mov	rax, QWORD PTR catalog_f[rip]
	mov	rdi, rax
	call	fclose@PLT
.L46:
	mov	eax, 0
	leave
	.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	"134879.c"
	.text
	.comm	catalog_f,4,4
	.comm	name,262144,4
	.comm	author,262144,4
	.comm	publisher,262144,4
	.global	numBooks
	.bss
	.align	2
	.type	numBooks, %object
	.size	numBooks, 4
numBooks:
	.space	4
	.text
	.align	2
	.global	consumeLine
	.syntax unified
	.arm
	.fpu softvfp
	.type	consumeLine, %function
consumeLine:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	nop
.L2:
	bl	getchar
	mov	r3, r0
	cmp	r3, #10
	bne	.L2
	nop
	nop
	pop	{fp, pc}
	.size	consumeLine, .-consumeLine
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Card Catalog:\000"
	.align	2
.LC1:
	.ascii	"1: Enter\000"
	.align	2
.LC2:
	.ascii	"2: Search by Author\000"
	.align	2
.LC3:
	.ascii	"3: Search by Title\000"
	.align	2
.LC4:
	.ascii	"4: Quit\000"
	.align	2
.LC5:
	.ascii	"5: Save to Disk\000"
	.align	2
.LC6:
	.ascii	"%d\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	menu
	.syntax unified
	.arm
	.fpu softvfp
	.type	menu, %function
menu:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #10
	bl	putchar
	ldr	r0, .L9+4
	bl	puts
	mov	r0, #10
	bl	putchar
	ldr	r0, .L9+8
	bl	puts
	ldr	r0, .L9+12
	bl	puts
	ldr	r0, .L9+16
	bl	puts
	ldr	r0, .L9+20
	bl	puts
	ldr	r0, .L9+24
	bl	printf
	mov	r0, #10
	bl	putchar
	mov	r0, #58
	bl	putchar
	sub	r3, fp, #12
	mov	r1, r3
	ldr	r0, .L9+28
	bl	__isoc99_scanf
	bl	consumeLine
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	ble	.L4
	ldr	r3, [fp, #-12]
	cmp	r3, #5
	ble	.L5
.L4:
	mov	r3, #0
	b	.L7
.L5:
	ldr	r3, [fp, #-12]
.L7:
	ldr	r2, .L9
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC7
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	menu, .-menu
	.section	.rodata
	.align	2
.LC8:
	.ascii	"w\000"
	.align	2
.LC9:
	.ascii	"CATALOG.txt\000"
	.text
	.align	2
	.global	writeCatFile
	.syntax unified
	.arm
	.fpu softvfp
	.type	writeCatFile, %function
writeCatFile:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r1, .L16
	ldr	r0, .L16+4
	bl	fopen
	mov	r3, r0
	ldr	r2, .L16+8
	str	r3, [r2]
	ldr	r3, .L16+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L12
	mov	r3, #1
	b	.L13
.L12:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L14
.L15:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #9
	ldr	r2, .L16+12
	add	r3, r3, r2
	ldr	r2, .L16+8
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	fputs
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #9
	ldr	r2, .L16+16
	add	r3, r3, r2
	ldr	r2, .L16+8
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	fputs
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #9
	ldr	r2, .L16+20
	add	r3, r3, r2
	ldr	r2, .L16+8
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	fputs
	ldr	r3, .L16+8
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L14:
	ldr	r3, .L16+24
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L15
	ldr	r3, .L16+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
	mov	r3, #0
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC8
	.word	.LC9
	.word	catalog_f
	.word	name
	.word	author
	.word	publisher
	.word	numBooks
	.size	writeCatFile, .-writeCatFile
	.section	.rodata
	.align	2
.LC10:
	.ascii	"Unable to access Catalog file.\000"
	.align	2
.LC11:
	.ascii	"r\000"
	.align	2
.LC12:
	.ascii	"%*[^\012]\000"
	.align	2
.LC13:
	.ascii	"%*c\000"
	.align	2
.LC14:
	.ascii	"Malformed Catalog file? (%d lines)\000"
	.align	2
.LC15:
	.ascii	"Read %d books into memory.\012\000"
	.text
	.align	2
	.global	readCatFile
	.syntax unified
	.arm
	.fpu softvfp
	.type	readCatFile, %function
readCatFile:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	mov	r1, #0
	ldr	r0, .L27
	bl	access
	mov	r3, r0
	cmp	r3, #0
	beq	.L19
	ldr	r0, .L27+4
	bl	puts
	mov	r3, #1
	b	.L20
.L19:
	ldr	r1, .L27+8
	ldr	r0, .L27
	bl	fopen
	mov	r3, r0
	ldr	r2, .L27+12
	str	r3, [r2]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L21
	mov	r3, #1
	b	.L20
.L21:
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L22
.L23:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L22:
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r1, .L27+16
	mov	r0, r3
	bl	__isoc99_fscanf
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r1, .L27+20
	mov	r0, r3
	bl	__isoc99_fscanf
	mov	r3, r0
	cmn	r3, #1
	bne	.L23
	ldr	r3, .L27+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	rewind
	ldr	r3, [fp, #-16]
	and	r3, r3, #3
	cmp	r3, #0
	beq	.L24
	ldr	r1, [fp, #-16]
	ldr	r0, .L27+24
	bl	printf
	mov	r3, #1
	b	.L20
.L24:
	ldr	r3, [fp, #-16]
	add	r2, r3, #3
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #2
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L25
.L26:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #9
	ldr	r2, .L27+28
	add	r3, r3, r2
	ldr	r2, .L27+12
	ldr	r2, [r2]
	mov	r1, #512
	mov	r0, r3
	bl	fgets
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #9
	ldr	r2, .L27+32
	add	r3, r3, r2
	ldr	r2, .L27+12
	ldr	r2, [r2]
	mov	r1, #512
	mov	r0, r3
	bl	fgets
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #9
	ldr	r2, .L27+36
	add	r3, r3, r2
	ldr	r2, .L27+12
	ldr	r2, [r2]
	mov	r1, #512
	mov	r0, r3
	bl	fgets
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r1, .L27+20
	mov	r0, r3
	bl	__isoc99_fscanf
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L25:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	blt	.L26
	ldr	r2, .L27+40
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	ldr	r3, .L27+40
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L27+44
	bl	printf
	ldr	r3, .L27+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
	mov	r3, #0
.L20:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	catalog_f
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	name
	.word	author
	.word	publisher
	.word	numBooks
	.word	.LC15
	.size	readCatFile, .-readCatFile
	.section	.rodata
	.align	2
.LC16:
	.ascii	"Enter blank name to end.\000"
	.align	2
.LC17:
	.ascii	"Name: \000"
	.align	2
.LC18:
	.ascii	"Author: \000"
	.align	2
.LC19:
	.ascii	"Publisher: \000"
	.text
	.align	2
	.global	mEnter
	.syntax unified
	.arm
	.fpu softvfp
	.type	mEnter, %function
mEnter:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L35
	bl	puts
.L32:
	ldr	r0, .L35+4
	bl	printf
	ldr	r3, .L35+8
	ldr	r3, [r3]
	lsl	r3, r3, #9
	ldr	r2, .L35+12
	add	r3, r3, r2
	ldr	r2, .L35+16
	ldr	r2, [r2]
	mov	r1, #512
	mov	r0, r3
	bl	fgets
	ldr	r3, .L35+8
	ldr	r3, [r3]
	ldr	r2, .L35+12
	lsl	r3, r3, #9
	add	r3, r2, r3
	ldrb	r3, [r3, #1]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L34
	ldr	r0, .L35+20
	bl	printf
	ldr	r3, .L35+8
	ldr	r3, [r3]
	lsl	r3, r3, #9
	ldr	r2, .L35+24
	add	r3, r3, r2
	ldr	r2, .L35+16
	ldr	r2, [r2]
	mov	r1, #512
	mov	r0, r3
	bl	fgets
	ldr	r0, .L35+28
	bl	printf
	ldr	r3, .L35+8
	ldr	r3, [r3]
	lsl	r3, r3, #9
	ldr	r2, .L35+32
	add	r3, r3, r2
	ldr	r2, .L35+16
	ldr	r2, [r2]
	mov	r1, #512
	mov	r0, r3
	bl	fgets
	ldr	r3, .L35+8
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L35+8
	str	r3, [r2]
	b	.L32
.L34:
	nop
	nop
	pop	{fp, pc}
.L36:
	.align	2
.L35:
	.word	.LC16
	.word	.LC17
	.word	numBooks
	.word	name
	.word	stdin
	.word	.LC18
	.word	author
	.word	.LC19
	.word	publisher
	.size	mEnter, .-mEnter
	.section	.rodata
	.align	2
.LC20:
	.ascii	"Wrong Option.\000"
	.align	2
.LC21:
	.ascii	"NOOP.\000"
	.align	2
.LC22:
	.ascii	"Wrote to Catalog file.\000"
	.align	2
.LC23:
	.ascii	"Failed to write to Catalog file!\000"
	.text
	.align	2
	.global	menuLogic
	.syntax unified
	.arm
	.fpu softvfp
	.type	menuLogic, %function
menuLogic:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
.L49:
	bl	menu
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #5
	ldrls	pc, [pc, r3, asl #2]
	b	.L49
.L40:
	.word	.L45
	.word	.L44
	.word	.L43
	.word	.L42
	.word	.L50
	.word	.L39
.L45:
	ldr	r0, .L52
	bl	puts
	b	.L38
.L44:
	bl	mEnter
	b	.L38
.L43:
	ldr	r0, .L52+4
	bl	puts
	b	.L38
.L42:
	ldr	r0, .L52+4
	bl	puts
	b	.L38
.L39:
	bl	writeCatFile
	mov	r3, r0
	cmp	r3, #0
	bne	.L47
	ldr	r0, .L52+8
	bl	puts
	b	.L51
.L47:
	ldr	r0, .L52+12
	bl	puts
.L51:
	nop
.L38:
	b	.L49
.L50:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L53:
	.align	2
.L52:
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.size	menuLogic, .-menuLogic
	.section	.rodata
	.align	2
.LC24:
	.ascii	"Unable to read catalog file into memory!\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	bl	readCatFile
	mov	r3, r0
	cmp	r3, #0
	beq	.L55
	ldr	r0, .L58
	bl	puts
.L55:
	bl	menuLogic
	ldr	r3, .L58+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L56
	ldr	r3, .L58+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
.L56:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L59:
	.align	2
.L58:
	.word	.LC24
	.word	catalog_f
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
