	.file	"153268255.c"
	.intel_syntax noprefix
	.text
	.globl	datafile
	.section	.rodata
.LC0:
	.string	"lab003.data"
	.section	.data.rel.local,"aw"
	.align 8
	.type	datafile, @object
	.size	datafile, 8
datafile:
	.quad	.LC0
	.section	.rodata
	.align 8
.LC1:
	.string	"ERROR: Can't open datafile: %s\n"
.LC2:
	.string	"ERROR: write error."
	.text
	.globl	init_data
	.type	init_data, @function
init_data:
.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR datafile[rip]
	mov	edx, 420
	mov	esi, 65
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -8220[rbp], eax
	cmp	DWORD PTR -8220[rbp], 0
	jns	.L2
	mov	rax, QWORD PTR datafile[rip]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	QWORD PTR -8216[rbp], 0
	jmp	.L3
.L5:
	lea	rcx, -8208[rbp]
	mov	eax, DWORD PTR -8220[rbp]
	mov	edx, 8192
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	test	rax, rax
	jns	.L4
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	edi, 2
	call	exit@PLT
.L4:
	add	QWORD PTR -8216[rbp], 1
.L3:
	cmp	QWORD PTR -8216[rbp], 1279
	jle	.L5
	mov	eax, DWORD PTR -8220[rbp]
	mov	edi, eax
	call	close@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	init_data, .-init_data
	.section	.rodata
	.align 8
.LC3:
	.string	"ERROR: Can't open database: %s\n"
	.text
	.globl	load_data
	.type	load_data, @function
load_data:
.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	rax, QWORD PTR datafile[rip]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -16[rbp], eax
	cmp	DWORD PTR -16[rbp], 0
	jns	.L8
	mov	rax, QWORD PTR datafile[rip]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 2
	call	exit@PLT
.L8:
	lea	rcx, -9[rbp]
	mov	eax, DWORD PTR -16[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	jmp	.L8
	.cfi_endproc
.LFE7:
	.size	load_data, .-load_data
	.globl	import_database
	.type	import_database, @function
import_database:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, 0
	call	load_data
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	import_database, .-import_database
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, 0
	call	init_data
.L12:
	mov	eax, 0
	call	import_database
	jmp	.L12
	.cfi_endproc
.LFE9:
	.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	"153268255.c"
	.text
	.global	datafile
	.section	.rodata
	.align	2
.LC0:
	.ascii	"lab003.data\000"
	.data
	.align	2
	.type	datafile, %object
	.size	datafile, 4
datafile:
	.word	.LC0
	.section	.rodata
	.align	2
.LC1:
	.ascii	"ERROR: Can't open datafile: %s\012\000"
	.align	2
.LC2:
	.ascii	"ERROR: write error.\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	init_data
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_data, %function
init_data:
	@ args = 0, pretend = 0, frame = 8216
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #8192
	sub	sp, sp, #28
	ldr	r3, .L7
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	ldr	r3, .L7+4
	ldr	r3, [r3]
	sub	r2, fp, #8192
	sub	r2, r2, #20
	mov	r6, r2
	mov	r2, #420
	mov	r1, #65
	mov	r0, r3
	bl	open
	str	r0, [r6, #-20]
	sub	r3, fp, #8192
	sub	r3, r3, #20
	ldr	r3, [r3, #-20]
	cmp	r3, #0
	bge	.L2
	ldr	r3, .L7+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L7+8
	bl	printf
	mov	r0, #1
	bl	exit
.L2:
	sub	r3, fp, #8192
	sub	r3, r3, #20
	sub	r3, r3, #16
	mov	r1, r3
	mov	r2, #0
	mov	r3, #0
	stm	r1, {r2-r3}
	b	.L3
.L5:
	sub	r3, fp, #8192
	sub	r3, r3, #20
	sub	r3, r3, #4
	sub	r2, fp, #8192
	sub	r2, r2, #20
	mov	r0, r2
	mov	r2, #8192
	mov	r1, r3
	ldr	r0, [r0, #-20]
	bl	write
	mov	r3, r0
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L7+12
	bl	puts
	mov	r0, #2
	bl	exit
.L4:
	sub	r3, fp, #8192
	sub	r3, r3, #20
	sub	r3, r3, #16
	mov	r1, r3
	sub	r3, fp, #8192
	sub	r3, r3, #20
	sub	r3, r3, #16
	ldmia	r3, {r2-r3}
	adds	r4, r2, #1
	adc	r5, r3, #0
	stm	r1, {r4-r5}
.L3:
	sub	r3, fp, #8192
	sub	r3, r3, #20
	sub	r3, r3, #16
	ldmia	r3, {r2-r3}
	cmp	r2, #1280
	sbcs	r3, r3, #0
	blt	.L5
	sub	r3, fp, #8192
	sub	r3, r3, #20
	ldr	r0, [r3, #-20]
	bl	close
	nop
	ldr	r3, .L7
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L6
	bl	__stack_chk_fail
.L6:
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC3
	.word	datafile
	.word	.LC1
	.word	.LC2
	.size	init_data, .-init_data
	.section	.rodata
	.align	2
.LC4:
	.ascii	"ERROR: Can't open database: %s\012\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	load_data
	.syntax unified
	.arm
	.fpu softvfp
	.type	load_data, %function
load_data:
	@ 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, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L12+4
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L10
	ldr	r3, .L12+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L12+8
	bl	printf
	mov	r0, #2
	bl	exit
.L10:
	sub	r3, fp, #12
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	read
	b	.L10
.L13:
	.align	2
.L12:
	.word	.LC5
	.word	datafile
	.word	.LC4
	.size	load_data, .-load_data
	.align	2
	.global	import_database
	.syntax unified
	.arm
	.fpu softvfp
	.type	import_database, %function
import_database:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	load_data
	nop
	pop	{fp, pc}
	.size	import_database, .-import_database
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	init_data
.L16:
	bl	import_database
	b	.L16
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
