	.file	"59513018.c"
	.intel_syntax noprefix
	.text
	.globl	insert_sorted
	.type	insert_sorted, @function
insert_sorted:
.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, 64
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -52[rbp], edx
	movss	DWORD PTR -56[rbp], xmm0
	mov	edi, 48
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -52[rbp]
	mov	DWORD PTR 32[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	movss	xmm0, DWORD PTR -56[rbp]
	movss	DWORD PTR 36[rax], xmm0
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 40[rax]
	test	rax, rax
	jne	.L2
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 40[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 40[rax], 0
	mov	rax, QWORD PTR -40[rbp]
	jmp	.L6
.L2:
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L4
.L7:
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jg	.L5
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 40[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 40[rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	jmp	.L6
.L5:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	QWORD PTR -16[rbp], rax
.L4:
	cmp	QWORD PTR -16[rbp], 0
	jne	.L7
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 40[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 40[rax], 0
	mov	rax, QWORD PTR -40[rbp]
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	insert_sorted, .-insert_sorted
	.globl	clear
	.type	clear, @function
clear:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L9
.L10:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR -16[rbp], rax
.L9:
	cmp	QWORD PTR -16[rbp], 0
	jne	.L10
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR 40[rax], 0
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	clear, .-clear
	.section	.rodata
.LC0:
	.string	"Enter a number of snacks: "
.LC1:
	.string	"%d"
.LC2:
	.string	"Malloc unsuccessful"
.LC3:
	.string	"\nEnter a name: "
.LC4:
	.string	"%s"
.LC5:
	.string	"\nEnter a cost: "
.LC6:
	.string	"%g"
.LC7:
	.string	"\nEnter a quantity: "
	.align 8
.LC8:
	.string	"\n\nWelcome to my sorted snackbar!"
	.align 8
.LC9:
	.string	"\nSorry, the snack bar is empty"
	.text
	.globl	main
	.type	main, @function
main:
.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, 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -72[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	QWORD PTR -56[rbp], 0
	mov	edi, 48
	call	malloc@PLT
	mov	QWORD PTR -56[rbp], rax
	cmp	QWORD PTR -56[rbp], 0
	jne	.L12
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L18
.L12:
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR [rax], 1684104552
	mov	WORD PTR 4[rax], 29285
	mov	BYTE PTR 6[rax], 0
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR 40[rax], 0
	mov	DWORD PTR -60[rbp], 0
	jmp	.L14
.L15:
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -48[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -68[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -64[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	esi, DWORD PTR -68[rbp]
	mov	edx, DWORD PTR -64[rbp]
	lea	rcx, -48[rbp]
	mov	rax, QWORD PTR -56[rbp]
	movd	xmm0, esi
	mov	rsi, rcx
	mov	rdi, rax
	call	insert_sorted
	mov	QWORD PTR -56[rbp], rax
	add	DWORD PTR -60[rbp], 1
.L14:
	mov	eax, DWORD PTR -72[rbp]
	cmp	DWORD PTR -60[rbp], eax
	jl	.L15
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 40[rax]
	test	rax, rax
	jne	.L16
	lea	rdi, .LC9[rip]
	call	puts@PLT
	jmp	.L17
.L16:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	printItems
.L17:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	clear
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR -56[rbp], 0
	mov	eax, 0
.L18:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC10:
	.string	"\n%d) %s \t cost: $%0.2f \t quantity: %d"
	.align 8
.LC11:
	.string	"\n%d) %s \t cost: $%0.2f \t quantity: %d\n"
	.text
	.globl	printItems
	.type	printItems, @function
printItems:
.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	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -12[rbp], 0
	jmp	.L21
.L22:
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, DWORD PTR 32[rax]
	mov	rax, QWORD PTR -8[rbp]
	movss	xmm0, DWORD PTR 36[rax]
	pxor	xmm1, xmm1
	cvtss2sd	xmm1, xmm0
	movq	rsi, xmm1
	mov	rdx, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -12[rbp]
	movq	xmm0, rsi
	mov	esi, eax
	lea	rdi, .LC10[rip]
	mov	eax, 1
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	QWORD PTR -8[rbp], rax
	add	DWORD PTR -12[rbp], 1
.L21:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 40[rax]
	test	rax, rax
	jne	.L22
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, DWORD PTR 32[rax]
	mov	rax, QWORD PTR -8[rbp]
	movss	xmm0, DWORD PTR 36[rax]
	pxor	xmm2, xmm2
	cvtss2sd	xmm2, xmm0
	movq	rsi, xmm2
	mov	rdx, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -12[rbp]
	movq	xmm0, rsi
	mov	esi, eax
	lea	rdi, .LC11[rip]
	mov	eax, 1
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	printItems, .-printItems
	.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	"59513018.c"
	.text
	.align	2
	.global	insert_sorted
	.syntax unified
	.arm
	.fpu softvfp
	.type	insert_sorted, %function
insert_sorted:
	@ 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]	@ float
	mov	r0, #44
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-28]
	mov	r0, r3
	bl	strcpy
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-32]
	str	r2, [r3, #32]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-36]	@ float
	str	r2, [r3, #36]	@ float
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #40]
	cmp	r3, #0
	bne	.L2
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #40]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #40]
	ldr	r3, [fp, #-24]
	b	.L6
.L2:
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #40]
	str	r3, [fp, #-12]
	b	.L4
.L7:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	mov	r1, r2
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bgt	.L5
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	str	r2, [r3, #40]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #40]
	ldr	r3, [fp, #-24]
	b	.L6
.L5:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #40]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #40]
	str	r3, [fp, #-12]
.L4:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L7
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #40]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #40]
	ldr	r3, [fp, #-24]
.L6:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	insert_sorted, .-insert_sorted
	.align	2
	.global	clear
	.syntax unified
	.arm
	.fpu softvfp
	.type	clear, %function
clear:
	@ 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, #40]
	str	r3, [fp, #-12]
	b	.L9
.L10:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #40]
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	free
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-12]
.L9:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L10
	ldr	r0, [fp, #-12]
	bl	free
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3, #40]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	clear, .-clear
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Enter a number of snacks: \000"
	.align	2
.LC1:
	.ascii	"%d\000"
	.align	2
.LC2:
	.ascii	"Malloc unsuccessful\000"
	.align	2
.LC3:
	.ascii	"header\000"
	.align	2
.LC4:
	.ascii	"\012Enter a name: \000"
	.align	2
.LC5:
	.ascii	"%s\000"
	.align	2
.LC6:
	.ascii	"\012Enter a cost: \000"
	.align	2
.LC7:
	.ascii	"%g\000"
	.align	2
.LC8:
	.ascii	"\012Enter a quantity: \000"
	.align	2
.LC9:
	.ascii	"\012\012Welcome to my sorted snackbar!\000"
	.align	2
.LC10:
	.ascii	"\012Sorry, the snack bar is empty\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L20+4
	bl	printf
	sub	r3, fp, #60
	mov	r1, r3
	ldr	r0, .L20+8
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-48]
	mov	r0, #44
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bne	.L12
	ldr	r0, .L20+12
	bl	printf
	mov	r3, #1
	b	.L18
.L12:
	ldr	r3, [fp, #-48]
	ldr	r2, .L20+16
	mov	r0, r3
	mov	r1, r2
	mov	r3, #7
	mov	r2, r3
	bl	memcpy
	ldr	r3, [fp, #-48]
	mov	r2, #0
	str	r2, [r3, #40]
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L14
.L15:
	ldr	r0, .L20+20
	bl	printf
	sub	r3, fp, #40
	mov	r1, r3
	ldr	r0, .L20+24
	bl	__isoc99_scanf
	ldr	r0, .L20+28
	bl	printf
	sub	r3, fp, #56
	mov	r1, r3
	ldr	r0, .L20+32
	bl	__isoc99_scanf
	ldr	r0, .L20+36
	bl	printf
	sub	r3, fp, #52
	mov	r1, r3
	ldr	r0, .L20+8
	bl	__isoc99_scanf
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-56]	@ float
	sub	r1, fp, #40
	ldr	r0, [fp, #-48]
	bl	insert_sorted
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L14:
	ldr	r3, [fp, #-60]
	ldr	r2, [fp, #-44]
	cmp	r2, r3
	blt	.L15
	ldr	r0, .L20+40
	bl	puts
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, #40]
	cmp	r3, #0
	bne	.L16
	ldr	r0, .L20+44
	bl	puts
	b	.L17
.L16:
	ldr	r0, [fp, #-48]
	bl	printItems
.L17:
	ldr	r0, [fp, #-48]
	bl	clear
	ldr	r0, [fp, #-48]
	bl	free
	mov	r3, #0
	str	r3, [fp, #-48]
	mov	r3, #0
.L18:
	ldr	r2, .L20
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC11
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	main, .-main
	.global	__aeabi_f2d
	.section	.rodata
	.align	2
.LC12:
	.ascii	"\012%d) %s \011 cost: $%0.2f \011 quantity: %d\000"
	.align	2
.LC13:
	.ascii	"\012%d) %s \011 cost: $%0.2f \011 quantity: %d\012\000"
	.text
	.align	2
	.global	printItems
	.syntax unified
	.arm
	.fpu softvfp
	.type	printItems, %function
printItems:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #40]
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L23
.L24:
	ldr	r4, [fp, #-20]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #36]	@ float
	mov	r0, r3
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	ldr	r1, [fp, #-20]
	ldr	r1, [r1, #32]
	str	r1, [sp, #8]
	stm	sp, {r2-r3}
	mov	r2, r4
	ldr	r1, [fp, #-16]
	ldr	r0, .L25
	bl	printf
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #40]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L23:
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #40]
	cmp	r3, #0
	bne	.L24
	ldr	r4, [fp, #-20]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #36]	@ float
	mov	r0, r3
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	ldr	r1, [fp, #-20]
	ldr	r1, [r1, #32]
	str	r1, [sp, #8]
	stm	sp, {r2-r3}
	mov	r2, r4
	ldr	r1, [fp, #-16]
	ldr	r0, .L25+4
	bl	printf
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L26:
	.align	2
.L25:
	.word	.LC12
	.word	.LC13
	.size	printItems, .-printItems
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
