	.file	"260638.c"
	.intel_syntax noprefix
	.text
	.globl	money
	.data
	.align 4
	.type	money, @object
	.size	money, 4
money:
	.long	15
	.section	.rodata
	.align 8
.LC0:
	.string	"How many %s would you like to buy?\n"
.LC1:
	.string	"> "
.LC2:
	.string	"%d"
.LC3:
	.string	"That'll cost $%d.\n"
.LC4:
	.string	"Thanks for your purchse!"
	.align 8
.LC5:
	.string	"Sorry, but you don't have enough money."
.LC6:
	.string	"Sucks to be you I guess."
	.align 8
.LC7:
	.string	"I'm sorry, but we don't put up with pranksters."
	.align 8
.LC8:
	.string	"Please buy something or leave."
	.text
	.globl	purchase
	.type	purchase, @function
purchase:
.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	DWORD PTR -28[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -12[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -12[rbp]
	test	eax, eax
	jle	.L2
	mov	eax, DWORD PTR -12[rbp]
	mov	edx, DWORD PTR -28[rbp]
	imul	eax, edx
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR money[rip]
	cmp	DWORD PTR -28[rbp], eax
	jg	.L3
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, DWORD PTR money[rip]
	sub	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR money[rip], eax
	jmp	.L4
.L3:
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	DWORD PTR -12[rbp], 0
	jmp	.L4
.L2:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
.L4:
	mov	eax, DWORD PTR -12[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	purchase, .-purchase
	.section	.rodata
.LC9:
	.string	"Welcome to BCA MART!"
	.align 8
.LC10:
	.string	"We have tons of snacks available for purchase."
	.align 8
.LC11:
	.string	"(Please ignore the fact we charge a markup on everything)"
.LC12:
	.string	""
.LC13:
	.string	"1) Hichew\342\204\242: $2.00"
.LC14:
	.string	"2) Lays\302\256 Potato Chips: $2.00"
.LC15:
	.string	"3) Water in a Bottle: $1.00"
	.align 8
.LC16:
	.string	"4) Not Water\302\251 in a Bottle: $2.00"
.LC17:
	.string	"5) BCA\302\251 school merch: $20.00"
.LC18:
	.string	"6) Flag: $100.00"
.LC19:
	.string	"0) Leave"
.LC20:
	.string	"You currently have $%d.\n"
.LC21:
	.string	"What would you like to buy?"
.LC22:
	.string	"Goodbye!"
.LC23:
	.string	"Come back soon!"
	.align 8
.LC24:
	.string	"Obviously, to spend more money :)"
.LC25:
	.string	"fruity pieces of goodness"
	.align 8
.LC26:
	.string	"b\314\266a\314\266g\314\266s\314\266 \314\266o\314\266f\314\266 \314\266a\314\266i\314\266r\314\266 potato chips"
.LC27:
	.string	"bottles of tap water"
.LC28:
	.string	"generic carbonated beverages"
.LC29:
	.string	"wonderfully-designed t-shirts"
.LC30:
	.string	"super-cool ctf flags"
.LC31:
	.string	"r"
.LC32:
	.string	"flag.txt"
	.align 8
.LC33:
	.string	"Hmm, I can't open our flag.txt file."
	.align 8
.LC34:
	.string	"Sorry, but looks like we're all out of flags."
	.align 8
.LC35:
	.string	"Out of luck, we just sold our last one a couple mintues ago."
	.align 8
.LC36:
	.string	"[If you are seeing this on the remote server, please contact admin]."
	.align 8
.LC37:
	.string	"Sorry, please select a valid option."
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	add	rsp, -128
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR stdout[rip]
	mov	esi, 0
	mov	rdi, rax
	call	setbuf@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	esi, 0
	mov	rdi, rax
	call	setbuf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	esi, 0
	mov	rdi, rax
	call	setbuf@PLT
	lea	rdi, .LC9[rip]
	call	puts@PLT
	lea	rdi, .LC10[rip]
	call	puts@PLT
	lea	rdi, .LC11[rip]
	call	puts@PLT
.L21:
	lea	rdi, .LC12[rip]
	call	puts@PLT
	lea	rdi, .LC13[rip]
	call	puts@PLT
	lea	rdi, .LC14[rip]
	call	puts@PLT
	lea	rdi, .LC15[rip]
	call	puts@PLT
	lea	rdi, .LC16[rip]
	call	puts@PLT
	lea	rdi, .LC17[rip]
	call	puts@PLT
	lea	rdi, .LC18[rip]
	call	puts@PLT
	lea	rdi, .LC19[rip]
	call	puts@PLT
	lea	rdi, .LC12[rip]
	call	puts@PLT
	mov	eax, DWORD PTR money[rip]
	mov	esi, eax
	lea	rdi, .LC20[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC21[rip]
	call	puts@PLT
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -124[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -124[rbp]
	cmp	eax, 6
	ja	.L8
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L10[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L10[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L10:
	.long	.L16-.L10
	.long	.L15-.L10
	.long	.L14-.L10
	.long	.L13-.L10
	.long	.L12-.L10
	.long	.L11-.L10
	.long	.L9-.L10
	.text
.L16:
	lea	rdi, .LC22[rip]
	call	puts@PLT
	lea	rdi, .LC23[rip]
	call	puts@PLT
	lea	rdi, .LC24[rip]
	call	puts@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L22
	jmp	.L23
.L15:
	mov	esi, 2
	lea	rdi, .LC25[rip]
	call	purchase
	jmp	.L18
.L14:
	mov	esi, 2
	lea	rdi, .LC26[rip]
	call	purchase
	jmp	.L18
.L13:
	mov	esi, 1
	lea	rdi, .LC27[rip]
	call	purchase
	jmp	.L18
.L12:
	mov	esi, 2
	lea	rdi, .LC28[rip]
	call	purchase
	jmp	.L18
.L11:
	mov	esi, 20
	lea	rdi, .LC29[rip]
	call	purchase
	jmp	.L18
.L9:
	mov	esi, 100
	lea	rdi, .LC30[rip]
	call	purchase
	test	eax, eax
	jle	.L24
	lea	rsi, .LC31[rip]
	lea	rdi, .LC32[rip]
	call	fopen@PLT
	mov	QWORD PTR -120[rbp], rax
	cmp	QWORD PTR -120[rbp], 0
	jne	.L20
	lea	rdi, .LC33[rip]
	call	puts@PLT
	lea	rdi, .LC34[rip]
	call	puts@PLT
	lea	rdi, .LC35[rip]
	call	puts@PLT
	lea	rdi, .LC36[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L20:
	mov	rdx, QWORD PTR -120[rbp]
	lea	rax, -112[rbp]
	mov	esi, 100
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -112[rbp]
	mov	rdi, rax
	call	puts@PLT
	jmp	.L24
.L8:
	lea	rdi, .LC37[rip]
	call	puts@PLT
	jmp	.L21
.L24:
	nop
.L18:
	jmp	.L21
.L23:
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"260638.c"
	.text
	.global	money
	.data
	.align	2
	.type	money, %object
	.size	money, 4
money:
	.word	15
	.section	.rodata
	.align	2
.LC0:
	.ascii	"How many %s would you like to buy?\012\000"
	.align	2
.LC1:
	.ascii	"> \000"
	.align	2
.LC2:
	.ascii	"%d\000"
	.align	2
.LC3:
	.ascii	"That'll cost $%d.\012\000"
	.align	2
.LC4:
	.ascii	"Thanks for your purchse!\000"
	.align	2
.LC5:
	.ascii	"Sorry, but you don't have enough money.\000"
	.align	2
.LC6:
	.ascii	"Sucks to be you I guess.\000"
	.align	2
.LC7:
	.ascii	"I'm sorry, but we don't put up with pranksters.\000"
	.align	2
.LC8:
	.ascii	"Please buy something or leave.\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	purchase
	.syntax unified
	.arm
	.fpu softvfp
	.type	purchase, %function
purchase:
	@ 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, .L7
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, [fp, #-16]
	ldr	r0, .L7+4
	bl	printf
	ldr	r0, .L7+8
	bl	printf
	sub	r3, fp, #12
	mov	r1, r3
	ldr	r0, .L7+12
	bl	__isoc99_scanf
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	ble	.L2
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-20]
	mul	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, .L7+16
	bl	printf
	ldr	r3, .L7+20
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bgt	.L3
	ldr	r0, .L7+24
	bl	puts
	ldr	r3, .L7+20
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	sub	r3, r2, r3
	ldr	r2, .L7+20
	str	r3, [r2]
	b	.L4
.L3:
	ldr	r0, .L7+28
	bl	puts
	ldr	r0, .L7+32
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L4
.L2:
	ldr	r0, .L7+36
	bl	puts
	ldr	r0, .L7+40
	bl	puts
.L4:
	ldr	r3, [fp, #-12]
	ldr	r2, .L7
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L6
	bl	__stack_chk_fail
.L6:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC9
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	money
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	purchase, .-purchase
	.section	.rodata
	.align	2
.LC10:
	.ascii	"Welcome to BCA MART!\000"
	.align	2
.LC11:
	.ascii	"We have tons of snacks available for purchase.\000"
	.align	2
.LC12:
	.ascii	"(Please ignore the fact we charge a markup on every"
	.ascii	"thing)\000"
	.align	2
.LC13:
	.ascii	"\000"
	.align	2
.LC14:
	.ascii	"1) Hichew\342\204\242: $2.00\000"
	.align	2
.LC15:
	.ascii	"2) Lays\302\256 Potato Chips: $2.00\000"
	.align	2
.LC16:
	.ascii	"3) Water in a Bottle: $1.00\000"
	.align	2
.LC17:
	.ascii	"4) Not Water\302\251 in a Bottle: $2.00\000"
	.align	2
.LC18:
	.ascii	"5) BCA\302\251 school merch: $20.00\000"
	.align	2
.LC19:
	.ascii	"6) Flag: $100.00\000"
	.align	2
.LC20:
	.ascii	"0) Leave\000"
	.align	2
.LC21:
	.ascii	"You currently have $%d.\012\000"
	.align	2
.LC22:
	.ascii	"What would you like to buy?\000"
	.align	2
.LC23:
	.ascii	"Goodbye!\000"
	.align	2
.LC24:
	.ascii	"Come back soon!\000"
	.align	2
.LC25:
	.ascii	"Obviously, to spend more money :)\000"
	.align	2
.LC26:
	.ascii	"fruity pieces of goodness\000"
	.align	2
.LC27:
	.ascii	"b\314\266a\314\266g\314\266s\314\266 \314\266o\314\266"
	.ascii	"f\314\266 \314\266a\314\266i\314\266r\314\266 potat"
	.ascii	"o chips\000"
	.align	2
.LC28:
	.ascii	"bottles of tap water\000"
	.align	2
.LC29:
	.ascii	"generic carbonated beverages\000"
	.align	2
.LC30:
	.ascii	"wonderfully-designed t-shirts\000"
	.align	2
.LC31:
	.ascii	"super-cool ctf flags\000"
	.align	2
.LC32:
	.ascii	"r\000"
	.align	2
.LC33:
	.ascii	"flag.txt\000"
	.align	2
.LC34:
	.ascii	"Hmm, I can't open our flag.txt file.\000"
	.align	2
.LC35:
	.ascii	"Sorry, but looks like we're all out of flags.\000"
	.align	2
.LC36:
	.ascii	"Out of luck, we just sold our last one a couple min"
	.ascii	"tues ago.\000"
	.align	2
.LC37:
	.ascii	"[If you are seeing this on the remote server, pleas"
	.ascii	"e contact admin].\000"
	.align	2
.LC38:
	.ascii	"Sorry, please select a valid option.\000"
	.align	2
.LC39:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #112
	ldr	r3, .L27
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L27+4
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	setbuf
	ldr	r3, .L27+8
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	setbuf
	ldr	r3, .L27+12
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	setbuf
	ldr	r0, .L27+16
	bl	puts
	ldr	r0, .L27+20
	bl	puts
	ldr	r0, .L27+24
	bl	puts
.L23:
	ldr	r0, .L27+28
	bl	puts
	ldr	r0, .L27+32
	bl	puts
	ldr	r0, .L27+36
	bl	puts
	ldr	r0, .L27+40
	bl	puts
	ldr	r0, .L27+44
	bl	puts
	ldr	r0, .L27+48
	bl	puts
	ldr	r0, .L27+52
	bl	puts
	ldr	r0, .L27+56
	bl	puts
	ldr	r0, .L27+28
	bl	puts
	ldr	r3, .L27+60
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L27+64
	bl	printf
	ldr	r0, .L27+68
	bl	puts
	ldr	r0, .L27+72
	bl	printf
	sub	r3, fp, #116
	mov	r1, r3
	ldr	r0, .L27+76
	bl	__isoc99_scanf
	ldr	r3, [fp, #-116]
	cmp	r3, #6
	ldrls	pc, [pc, r3, asl #2]
	b	.L10
.L12:
	.word	.L18
	.word	.L17
	.word	.L16
	.word	.L15
	.word	.L14
	.word	.L13
	.word	.L11
.L18:
	ldr	r0, .L27+80
	bl	puts
	ldr	r0, .L27+84
	bl	puts
	ldr	r0, .L27+88
	bl	puts
	mov	r3, #0
	ldr	r2, .L27
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L24
	b	.L25
.L17:
	mov	r1, #2
	ldr	r0, .L27+92
	bl	purchase
	b	.L20
.L16:
	mov	r1, #2
	ldr	r0, .L27+96
	bl	purchase
	b	.L20
.L15:
	mov	r1, #1
	ldr	r0, .L27+100
	bl	purchase
	b	.L20
.L14:
	mov	r1, #2
	ldr	r0, .L27+104
	bl	purchase
	b	.L20
.L13:
	mov	r1, #20
	ldr	r0, .L27+108
	bl	purchase
	b	.L20
.L11:
	mov	r1, #100
	ldr	r0, .L27+112
	bl	purchase
	mov	r3, r0
	cmp	r3, #0
	ble	.L26
	ldr	r1, .L27+116
	ldr	r0, .L27+120
	bl	fopen
	str	r0, [fp, #-112]
	ldr	r3, [fp, #-112]
	cmp	r3, #0
	bne	.L22
	ldr	r0, .L27+124
	bl	puts
	ldr	r0, .L27+128
	bl	puts
	ldr	r0, .L27+132
	bl	puts
	ldr	r0, .L27+136
	bl	puts
	mov	r0, #1
	bl	exit
.L22:
	sub	r3, fp, #108
	ldr	r2, [fp, #-112]
	mov	r1, #100
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #108
	mov	r0, r3
	bl	puts
	b	.L26
.L10:
	ldr	r0, .L27+140
	bl	puts
	b	.L23
.L26:
	nop
.L20:
	b	.L23
.L25:
	bl	__stack_chk_fail
.L24:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC39
	.word	stdout
	.word	stdin
	.word	stderr
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	money
	.word	.LC21
	.word	.LC22
	.word	.LC1
	.word	.LC2
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.word	.LC27
	.word	.LC28
	.word	.LC29
	.word	.LC30
	.word	.LC31
	.word	.LC32
	.word	.LC33
	.word	.LC34
	.word	.LC35
	.word	.LC36
	.word	.LC37
	.word	.LC38
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
