	.file	"5713.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"expenses.db"
.LC1:
	.string	"Failed to open DB"
.LC2:
	.string	"Performing query..."
.LC3:
	.string	"select * from expenses"
.LC4:
	.string	"Got results:"
.LC5:
	.string	"%s, "
.LC6:
	.string	"%d, "
.LC7:
	.string	"%g, "
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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	rax, -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	call	sqlite3_open@PLT
	mov	rax, QWORD PTR -24[rbp]
	test	rax, rax
	jne	.L2
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L3
.L2:
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, -16[rbp]
	mov	r8d, 0
	mov	rcx, rdx
	mov	edx, -1
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	sqlite3_prepare_v2@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	jmp	.L4
.L12:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	sqlite3_column_count@PLT
	mov	DWORD PTR -28[rbp], eax
	mov	DWORD PTR -32[rbp], 0
	jmp	.L5
.L11:
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR -32[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	sqlite3_column_type@PLT
	cmp	eax, 3
	je	.L6
	cmp	eax, 3
	jg	.L14
	cmp	eax, 1
	je	.L8
	cmp	eax, 2
	je	.L9
	jmp	.L14
.L6:
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR -32[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	sqlite3_column_text@PLT
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L10
.L8:
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR -32[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	sqlite3_column_int@PLT
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L10
.L9:
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR -32[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	sqlite3_column_double@PLT
	movq	rax, xmm0
	movq	xmm0, rax
	lea	rdi, .LC7[rip]
	mov	eax, 1
	call	printf@PLT
	jmp	.L10
.L14:
	nop
.L10:
	add	DWORD PTR -32[rbp], 1
.L5:
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L11
	mov	edi, 10
	call	putchar@PLT
.L4:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	sqlite3_step@PLT
	cmp	eax, 101
	jne	.L12
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	sqlite3_finalize@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	sqlite3_close@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	getc@PLT
	mov	eax, 0
.L3:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	"5713.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"expenses.db\000"
	.align	2
.LC1:
	.ascii	"Failed to open DB\000"
	.align	2
.LC2:
	.ascii	"Performing query...\000"
	.align	2
.LC3:
	.ascii	"select * from expenses\000"
	.align	2
.LC4:
	.ascii	"Got results:\000"
	.align	2
.LC5:
	.ascii	"%s, \000"
	.align	2
.LC6:
	.ascii	"%d, \000"
	.align	2
.LC7:
	.ascii	"%g, \000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L15+4
	bl	sqlite3_open
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L2
	ldr	r0, .L15+8
	bl	puts
	mov	r3, #1
	b	.L3
.L2:
	ldr	r0, .L15+12
	bl	puts
	ldr	r0, [fp, #-24]
	sub	r3, fp, #20
	mov	r2, #0
	str	r2, [sp]
	mvn	r2, #0
	ldr	r1, .L15+16
	bl	sqlite3_prepare_v2
	ldr	r0, .L15+20
	bl	puts
	b	.L4
.L12:
	ldr	r3, [fp, #-20]
	mov	r0, r3
	bl	sqlite3_column_count
	str	r0, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L5
.L11:
	ldr	r3, [fp, #-20]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	sqlite3_column_type
	mov	r3, r0
	cmp	r3, #3
	beq	.L6
	cmp	r3, #3
	bgt	.L14
	cmp	r3, #1
	beq	.L8
	cmp	r3, #2
	beq	.L9
	b	.L14
.L6:
	ldr	r3, [fp, #-20]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	sqlite3_column_text
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L15+24
	bl	printf
	b	.L10
.L8:
	ldr	r3, [fp, #-20]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	sqlite3_column_int
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L15+28
	bl	printf
	b	.L10
.L9:
	ldr	r3, [fp, #-20]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	sqlite3_column_double
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L15+32
	bl	printf
	b	.L10
.L14:
	nop
.L10:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L5:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	blt	.L11
	mov	r0, #10
	bl	putchar
.L4:
	ldr	r3, [fp, #-20]
	mov	r0, r3
	bl	sqlite3_step
	mov	r3, r0
	cmp	r3, #101
	bne	.L12
	ldr	r3, [fp, #-20]
	mov	r0, r3
	bl	sqlite3_finalize
	ldr	r3, [fp, #-24]
	mov	r0, r3
	bl	sqlite3_close
	ldr	r3, .L15+36
	ldr	r3, [r3]
	mov	r0, r3
	bl	getc
	mov	r3, #0
.L3:
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC8
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	stdin
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
