	.file	"32951582.c"
	.intel_syntax noprefix
	.text
	.globl	inventory
	.bss
	.align 8
	.type	inventory, @object
	.size	inventory, 8
inventory:
	.zero	8
	.globl	num_parts
	.align 4
	.type	num_parts, @object
	.size	num_parts, 4
num_parts:
	.zero	4
	.globl	max_parts
	.data
	.align 4
	.type	max_parts, @object
	.size	max_parts, 4
max_parts:
	.long	10
	.section	.rodata
.LC0:
	.string	"Error: malloc failed."
.LC1:
	.string	"Enter operation code: "
.LC2:
	.string	" %c"
.LC3:
	.string	"Illegal code."
	.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, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR max_parts[rip]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR inventory[rip], rax
	mov	rax, QWORD PTR inventory[rip]
	test	rax, rax
	jne	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -9[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	nop
.L3:
	call	getchar@PLT
	cmp	eax, 10
	jne	.L3
	movzx	eax, BYTE PTR -9[rbp]
	movsx	eax, al
	sub	eax, 105
	cmp	eax, 12
	ja	.L4
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L6[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L6[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L6:
	.long	.L10-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L9-.L6
	.long	.L8-.L6
	.long	.L4-.L6
	.long	.L7-.L6
	.long	.L4-.L6
	.long	.L5-.L6
	.text
.L10:
	call	insert
	jmp	.L11
.L7:
	call	search
	jmp	.L11
.L5:
	call	update
	jmp	.L11
.L9:
	mov	eax, DWORD PTR num_parts[rip]
	movsx	rsi, eax
	mov	rax, QWORD PTR inventory[rip]
	lea	rcx, compare[rip]
	mov	edx, 36
	mov	rdi, rax
	call	qsort@PLT
	call	print
	jmp	.L11
.L8:
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L13
	jmp	.L14
.L4:
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	nop
.L11:
	mov	edi, 10
	call	putchar@PLT
	jmp	.L2
.L14:
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	compare
	.type	compare, @function
compare:
.LFB7:
	.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 -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	ecx, DWORD PTR [rax]
	mov	eax, edx
	sub	eax, ecx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	compare, .-compare
	.globl	find_part
	.type	find_part, @function
find_part:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L18
.L21:
	mov	rcx, QWORD PTR inventory[rip]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -20[rbp], eax
	jne	.L19
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L20
.L19:
	add	DWORD PTR -4[rbp], 1
.L18:
	mov	eax, DWORD PTR num_parts[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L21
	mov	eax, -1
.L20:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	find_part, .-find_part
	.section	.rodata
.LC4:
	.string	"Error: realloc failed!"
.LC5:
	.string	"Enter part number: "
.LC6:
	.string	"%d"
.LC7:
	.string	"Part already exists."
.LC8:
	.string	"Enter part name: "
.LC9:
	.string	"Enter quantity on hand: "
	.text
	.globl	insert
	.type	insert, @function
insert:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, DWORD PTR num_parts[rip]
	mov	eax, DWORD PTR max_parts[rip]
	cmp	edx, eax
	jne	.L23
	mov	eax, DWORD PTR max_parts[rip]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR inventory[rip]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR inventory[rip], rax
	mov	rax, QWORD PTR inventory[rip]
	test	rax, rax
	jne	.L23
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L23:
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -12[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	find_part
	test	eax, eax
	js	.L24
	lea	rdi, .LC7[rip]
	call	puts@PLT
	jmp	.L22
.L24:
	mov	rcx, QWORD PTR inventory[rip]
	mov	eax, DWORD PTR num_parts[rip]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	lea	rdx, [rcx+rax]
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR [rdx], eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rcx, QWORD PTR inventory[rip]
	mov	eax, DWORD PTR num_parts[rip]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	add	rax, 4
	mov	esi, 25
	mov	rdi, rax
	call	read_line
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rcx, QWORD PTR inventory[rip]
	mov	eax, DWORD PTR num_parts[rip]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	add	rax, 32
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR num_parts[rip]
	add	eax, 1
	mov	DWORD PTR num_parts[rip], eax
.L22:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	insert, .-insert
	.section	.rodata
.LC10:
	.string	"Part name: %s\n"
.LC11:
	.string	"Quantity on hand: %d\n"
.LC12:
	.string	"Part not found."
	.text
	.globl	search
	.type	search, @function
search:
.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, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -16[rbp]
	mov	edi, eax
	call	find_part
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	js	.L28
	mov	rcx, QWORD PTR inventory[rip]
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	add	rax, 4
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rcx, QWORD PTR inventory[rip]
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR 32[rax]
	mov	esi, eax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L31
.L28:
	lea	rdi, .LC12[rip]
	call	puts@PLT
.L31:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	search, .-search
	.section	.rodata
	.align 8
.LC13:
	.string	"Enter change in quantity on hand: "
	.text
	.globl	update
	.type	update, @function
update:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -20[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	find_part
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	js	.L33
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rcx, QWORD PTR inventory[rip]
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	esi, DWORD PTR 32[rax]
	mov	ecx, DWORD PTR -16[rbp]
	mov	rdi, QWORD PTR inventory[rip]
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	add	rax, rdi
	lea	edx, [rsi+rcx]
	mov	DWORD PTR 32[rax], edx
	jmp	.L36
.L33:
	lea	rdi, .LC12[rip]
	call	puts@PLT
.L36:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L35
	call	__stack_chk_fail@PLT
.L35:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	update, .-update
	.section	.rodata
	.align 8
.LC14:
	.string	"Part Number        Part Name          Quantity on hand"
.LC15:
	.string	"%7d            %-19s%10d\n"
	.text
	.globl	print
	.type	print, @function
print:
.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
	lea	rdi, .LC14[rip]
	call	puts@PLT
	mov	DWORD PTR -4[rbp], 0
	jmp	.L38
.L39:
	mov	rcx, QWORD PTR inventory[rip]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	edx, DWORD PTR 32[rax]
	mov	rsi, QWORD PTR inventory[rip]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 3
	add	rax, rcx
	sal	rax, 2
	add	rax, rsi
	lea	rsi, 4[rax]
	mov	rdi, QWORD PTR inventory[rip]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 3
	add	rax, rcx
	sal	rax, 2
	add	rax, rdi
	mov	eax, DWORD PTR [rax]
	mov	ecx, edx
	mov	rdx, rsi
	mov	esi, eax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L38:
	mov	eax, DWORD PTR num_parts[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L39
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	print, .-print
	.globl	read_line
	.type	read_line, @function
read_line:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	DWORD PTR -20[rbp], 0
	nop
.L41:
	call	__ctype_b_loc@PLT
	mov	rbx, QWORD PTR [rax]
	call	getchar@PLT
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	add	rax, rax
	add	rax, rbx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 8192
	test	eax, eax
	jne	.L41
	jmp	.L42
.L45:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jge	.L43
	mov	eax, DWORD PTR -20[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -20[rbp], edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -24[rbp]
	mov	BYTE PTR [rax], dl
.L43:
	call	getchar@PLT
	mov	DWORD PTR -24[rbp], eax
.L42:
	cmp	DWORD PTR -24[rbp], 10
	je	.L44
	cmp	DWORD PTR -24[rbp], -1
	jne	.L45
.L44:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	eax, DWORD PTR -20[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	read_line, .-read_line
	.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	"32951582.c"
	.text
	.comm	inventory,4,4
	.global	num_parts
	.bss
	.align	2
	.type	num_parts, %object
	.size	num_parts, 4
num_parts:
	.space	4
	.global	max_parts
	.data
	.align	2
	.type	max_parts, %object
	.size	max_parts, 4
max_parts:
	.word	10
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Error: malloc failed.\000"
	.align	2
.LC1:
	.ascii	"Enter operation code: \000"
	.align	2
.LC2:
	.ascii	" %c\000"
	.align	2
.LC3:
	.ascii	"Illegal code.\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.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
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L15+4
	ldr	r3, [r3]
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L15+8
	str	r2, [r3]
	ldr	r3, .L15+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L2
	ldr	r0, .L15+12
	bl	puts
	mov	r0, #1
	bl	exit
.L2:
	ldr	r0, .L15+16
	bl	printf
	sub	r3, fp, #9
	mov	r1, r3
	ldr	r0, .L15+20
	bl	__isoc99_scanf
	nop
.L3:
	bl	getchar
	mov	r3, r0
	cmp	r3, #10
	bne	.L3
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	sub	r3, r3, #105
	cmp	r3, #12
	ldrls	pc, [pc, r3, asl #2]
	b	.L4
.L6:
	.word	.L10
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L9
	.word	.L8
	.word	.L4
	.word	.L7
	.word	.L4
	.word	.L5
.L10:
	bl	insert
	b	.L11
.L7:
	bl	search
	b	.L11
.L5:
	bl	update
	b	.L11
.L9:
	ldr	r3, .L15+8
	ldr	r0, [r3]
	ldr	r3, .L15+24
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r3, .L15+28
	mov	r2, #36
	bl	qsort
	bl	print
	b	.L11
.L8:
	mov	r3, #0
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	b	.L14
.L4:
	ldr	r0, .L15+32
	bl	printf
	nop
.L11:
	mov	r0, #10
	bl	putchar
	b	.L2
.L14:
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC4
	.word	max_parts
	.word	inventory
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	num_parts
	.word	compare
	.word	.LC3
	.size	main, .-main
	.align	2
	.global	compare
	.syntax unified
	.arm
	.fpu softvfp
	.type	compare, %function
compare:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	sub	r3, r2, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	compare, .-compare
	.align	2
	.global	find_part
	.syntax unified
	.arm
	.fpu softvfp
	.type	find_part, %function
find_part:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L20
.L23:
	ldr	r3, .L24
	ldr	r1, [r3]
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bne	.L21
	ldr	r3, [fp, #-8]
	b	.L22
.L21:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L20:
	ldr	r3, .L24+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L23
	mvn	r3, #0
.L22:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L25:
	.align	2
.L24:
	.word	inventory
	.word	num_parts
	.size	find_part, .-find_part
	.section	.rodata
	.align	2
.LC5:
	.ascii	"Error: realloc failed!\000"
	.align	2
.LC6:
	.ascii	"Enter part number: \000"
	.align	2
.LC7:
	.ascii	"%d\000"
	.align	2
.LC8:
	.ascii	"Part already exists.\000"
	.align	2
.LC9:
	.ascii	"Enter part name: \000"
	.align	2
.LC10:
	.ascii	"Enter quantity on hand: \000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	insert
	.syntax unified
	.arm
	.fpu softvfp
	.type	insert, %function
insert:
	@ 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, .L31
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L31+4
	ldr	r2, [r3]
	ldr	r3, .L31+8
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L27
	ldr	r3, .L31+12
	ldr	r2, [r3]
	ldr	r3, .L31+8
	ldr	r3, [r3]
	mov	r1, r3
	mov	r3, r1
	lsl	r3, r3, #3
	add	r3, r3, r1
	lsl	r3, r3, #3
	mov	r1, r3
	mov	r0, r2
	bl	realloc
	mov	r3, r0
	ldr	r2, .L31+12
	str	r3, [r2]
	ldr	r3, .L31+12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L27
	ldr	r0, .L31+16
	bl	puts
	mov	r0, #1
	bl	exit
.L27:
	ldr	r0, .L31+20
	bl	printf
	sub	r3, fp, #12
	mov	r1, r3
	ldr	r0, .L31+24
	bl	__isoc99_scanf
	ldr	r3, [fp, #-12]
	mov	r0, r3
	bl	find_part
	mov	r3, r0
	cmp	r3, #0
	blt	.L28
	ldr	r0, .L31+28
	bl	puts
	b	.L26
.L28:
	ldr	r3, .L31+12
	ldr	r2, [r3]
	ldr	r3, .L31+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r3, r1
	lsl	r3, r3, #3
	add	r3, r3, r1
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-12]
	str	r2, [r3]
	ldr	r0, .L31+32
	bl	printf
	ldr	r3, .L31+12
	ldr	r2, [r3]
	ldr	r3, .L31+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r3, r1
	lsl	r3, r3, #3
	add	r3, r3, r1
	lsl	r3, r3, #2
	add	r3, r2, r3
	add	r3, r3, #4
	mov	r1, #25
	mov	r0, r3
	bl	read_line
	ldr	r0, .L31+36
	bl	printf
	ldr	r3, .L31+12
	ldr	r2, [r3]
	ldr	r3, .L31+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r3, r1
	lsl	r3, r3, #3
	add	r3, r3, r1
	lsl	r3, r3, #2
	add	r3, r2, r3
	add	r3, r3, #32
	mov	r1, r3
	ldr	r0, .L31+24
	bl	__isoc99_scanf
	ldr	r3, .L31+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L31+4
	str	r3, [r2]
.L26:
	ldr	r3, .L31
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L30
	bl	__stack_chk_fail
.L30:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L32:
	.align	2
.L31:
	.word	.LC11
	.word	num_parts
	.word	max_parts
	.word	inventory
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	insert, .-insert
	.section	.rodata
	.align	2
.LC12:
	.ascii	"Part name: %s\012\000"
	.align	2
.LC13:
	.ascii	"Quantity on hand: %d\012\000"
	.align	2
.LC14:
	.ascii	"Part not found.\000"
	.align	2
.LC15:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	search
	.syntax unified
	.arm
	.fpu softvfp
	.type	search, %function
search:
	@ 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, .L38
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L38+4
	bl	printf
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, .L38+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	find_part
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	blt	.L34
	ldr	r3, .L38+12
	ldr	r1, [r3]
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L38+16
	bl	printf
	ldr	r3, .L38+12
	ldr	r1, [r3]
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3, #32]
	mov	r1, r3
	ldr	r0, .L38+20
	bl	printf
	b	.L37
.L34:
	ldr	r0, .L38+24
	bl	puts
.L37:
	nop
	ldr	r3, .L38
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L36
	bl	__stack_chk_fail
.L36:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L39:
	.align	2
.L38:
	.word	.LC15
	.word	.LC6
	.word	.LC7
	.word	inventory
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.size	search, .-search
	.section	.rodata
	.align	2
.LC16:
	.ascii	"Enter change in quantity on hand: \000"
	.align	2
.LC17:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	update
	.syntax unified
	.arm
	.fpu softvfp
	.type	update, %function
update:
	@ 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, .L45
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L45+4
	bl	printf
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L45+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-20]
	mov	r0, r3
	bl	find_part
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	blt	.L41
	ldr	r0, .L45+12
	bl	printf
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, .L45+8
	bl	__isoc99_scanf
	ldr	r3, .L45+16
	ldr	r1, [r3]
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r0, [r3, #32]
	ldr	r1, [fp, #-16]
	ldr	r3, .L45+16
	ldr	ip, [r3]
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, ip, r3
	add	r2, r0, r1
	str	r2, [r3, #32]
	b	.L44
.L41:
	ldr	r0, .L45+20
	bl	puts
.L44:
	nop
	ldr	r3, .L45
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L43
	bl	__stack_chk_fail
.L43:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L46:
	.align	2
.L45:
	.word	.LC17
	.word	.LC6
	.word	.LC7
	.word	.LC16
	.word	inventory
	.word	.LC14
	.size	update, .-update
	.section	.rodata
	.align	2
.LC18:
	.ascii	"Part Number        Part Name          Quantity on h"
	.ascii	"and\000"
	.align	2
.LC19:
	.ascii	"%7d            %-19s%10d\012\000"
	.text
	.align	2
	.global	print
	.syntax unified
	.arm
	.fpu softvfp
	.type	print, %function
print:
	@ 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	r0, .L50
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L48
.L49:
	ldr	r3, .L50+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r0, [r3]
	ldr	r3, .L50+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	ip, r3, #4
	ldr	r3, .L50+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3, #32]
	mov	r2, ip
	mov	r1, r0
	ldr	r0, .L50+8
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L48:
	ldr	r3, .L50+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L49
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L51:
	.align	2
.L50:
	.word	.LC18
	.word	inventory
	.word	.LC19
	.word	num_parts
	.size	print, .-print
	.align	2
	.global	read_line
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_line, %function
read_line:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-16]
	nop
.L53:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r4, [r3]
	bl	getchar
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #1
	add	r3, r4, r3
	ldrh	r3, [r3]
	and	r3, r3, #8192
	cmp	r3, #0
	bne	.L53
	b	.L54
.L57:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	bge	.L55
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r2, [fp, #-20]
	and	r2, r2, #255
	strb	r2, [r3]
.L55:
	bl	getchar
	str	r0, [fp, #-20]
.L54:
	ldr	r3, [fp, #-20]
	cmp	r3, #10
	beq	.L56
	ldr	r3, [fp, #-20]
	cmn	r3, #1
	bne	.L57
.L56:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	read_line, .-read_line
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
