	.file	"36288.c"
	.intel_syntax noprefix
	.text
	.globl	data
	.bss
	.align 8
	.type	data, @object
	.size	data, 8
data:
	.zero	8
	.globl	data_b
	.align 8
	.type	data_b, @object
	.size	data_b, 8
data_b:
	.zero	8
	.section	.rodata
	.align 8
.LC0:
	.string	"Please enter the file name you wish to open to read from:\n"
.LC1:
	.string	"w+"
.LC2:
	.string	"Sales.txt"
.LC3:
	.string	"rb"
	.align 8
.LC4:
	.string	" Firstname: %s \n Lastname: %s\n Address:%s Sales: %d\n\n"
.LC5:
	.string	"\nNumber of records is: %d\n"
	.align 8
.LC6:
	.string	"\nContents of binary file have been printed to \"Sales.txt\""
.LC10:
	.string	"wb+"
.LC11:
	.string	"Bonus.bin"
.LC12:
	.string	"Bonus.txt"
	.align 8
.LC13:
	.string	" Firstname: %s \n Lastname: %s\n Address:%s Bonus: %d\n\n"
	.align 8
.LC14:
	.string	"\nNew records sent to \"Bonus.bin\" and \"Bonus.txt\""
.LC15:
	.string	"q%d.bin"
.LC16:
	.string	"\nQuaterly bin files created"
.LC17:
	.string	"%d"
.LC18:
	.string	"Annual_Bonus.txt"
	.align 8
.LC19:
	.string	" Firstname: %s \n Lastname: %s\n Address:%s Annual Bonus: %d\n\n"
	.align 8
.LC20:
	.string	"\nNew records sent to \"Annual_Bonus.bin\" and \"Annual_Bonus.txt\""
.LC21:
	.string	"\nFile cannot be opened"
	.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, 160
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -160[rbp], 0
	mov	DWORD PTR -156[rbp], 0
	mov	DWORD PTR -152[rbp], 100
	mov	DWORD PTR -148[rbp], 100
	mov	eax, DWORD PTR -152[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR data[rip], rax
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rax, -112[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	lea	rsi, .LC1[rip]
	lea	rdi, .LC2[rip]
	call	fopen@PLT
	mov	QWORD PTR -136[rbp], rax
	lea	rax, -112[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -128[rbp], rax
	cmp	QWORD PTR -128[rbp], 0
	je	.L2
	mov	DWORD PTR -160[rbp], 0
	jmp	.L3
.L5:
	mov	eax, DWORD PTR -152[rbp]
	sub	eax, 1
	cmp	DWORD PTR -160[rbp], eax
	jl	.L4
	add	DWORD PTR -152[rbp], 100
	mov	eax, DWORD PTR -152[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR data[rip]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR data[rip], rax
.L4:
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -160[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	esi, DWORD PTR 80[rax]
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -160[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	lea	rdi, 32[rax]
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -160[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	lea	rcx, 16[rax]
	mov	r8, QWORD PTR data[rip]
	mov	eax, DWORD PTR -160[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, r8
	mov	rdx, rax
	mov	rax, QWORD PTR -136[rbp]
	mov	r9d, esi
	mov	r8, rdi
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -160[rbp], 1
.L3:
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -160[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	lea	rdi, [rcx+rax]
	mov	rax, QWORD PTR -128[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 84
	call	fread@PLT
	test	rax, rax
	jne	.L5
	mov	rax, QWORD PTR -128[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR -160[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR -148[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR data_b[rip], rax
	mov	DWORD PTR -156[rbp], 0
	mov	DWORD PTR -160[rbp], 0
	jmp	.L6
.L8:
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -160[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR 80[rax]
	cmp	eax, 100000
	jle	.L7
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -160[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	rcx, rax
	mov	rsi, QWORD PTR data_b[rip]
	mov	eax, DWORD PTR -156[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rsi
	mov	rsi, rcx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -160[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	lea	rcx, 16[rax]
	mov	rsi, QWORD PTR data_b[rip]
	mov	eax, DWORD PTR -156[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rsi
	add	rax, 16
	mov	rsi, rcx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -160[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	lea	rcx, 32[rax]
	mov	rsi, QWORD PTR data_b[rip]
	mov	eax, DWORD PTR -156[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rsi
	add	rax, 32
	mov	rsi, rcx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -160[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR 80[rax]
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, eax
	movsd	xmm0, QWORD PTR .LC7[rip]
	mulsd	xmm0, xmm1
	movsd	xmm2, QWORD PTR .LC8[rip]
	movapd	xmm1, xmm0
	divsd	xmm1, xmm2
	movsd	xmm0, QWORD PTR .LC9[rip]
	mulsd	xmm0, xmm1
	mov	rcx, QWORD PTR data_b[rip]
	mov	eax, DWORD PTR -156[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	lea	rdx, [rcx+rax]
	cvttsd2si	eax, xmm0
	mov	DWORD PTR 80[rdx], eax
	add	DWORD PTR -156[rbp], 1
	mov	eax, DWORD PTR -148[rbp]
	sub	eax, 1
	cmp	DWORD PTR -156[rbp], eax
	jl	.L7
	add	DWORD PTR -148[rbp], 100
	mov	eax, DWORD PTR -148[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR data_b[rip]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR data_b[rip], rax
.L7:
	add	DWORD PTR -160[rbp], 1
.L6:
	mov	eax, DWORD PTR -160[rbp]
	cmp	eax, DWORD PTR -152[rbp]
	jl	.L8
	mov	rax, QWORD PTR data_b[rip]
	mov	edx, DWORD PTR -148[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	sort
	lea	rsi, .LC10[rip]
	lea	rdi, .LC11[rip]
	call	fopen@PLT
	mov	QWORD PTR -136[rbp], rax
	mov	DWORD PTR -160[rbp], 0
	jmp	.L9
.L12:
	mov	rcx, QWORD PTR data_b[rip]
	mov	eax, DWORD PTR -160[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR 80[rax]
	test	eax, eax
	je	.L36
	mov	rcx, QWORD PTR data_b[rip]
	mov	eax, DWORD PTR -160[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	lea	rdi, [rcx+rax]
	mov	rax, QWORD PTR -136[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 84
	call	fwrite@PLT
	add	DWORD PTR -160[rbp], 1
.L9:
	mov	eax, DWORD PTR -160[rbp]
	cmp	eax, DWORD PTR -148[rbp]
	jl	.L12
	jmp	.L11
.L36:
	nop
.L11:
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rsi, .LC1[rip]
	lea	rdi, .LC12[rip]
	call	fopen@PLT
	mov	QWORD PTR -136[rbp], rax
	mov	DWORD PTR -160[rbp], 0
	jmp	.L13
.L16:
	mov	rcx, QWORD PTR data_b[rip]
	mov	eax, DWORD PTR -160[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR 80[rax]
	test	eax, eax
	je	.L37
	mov	rcx, QWORD PTR data_b[rip]
	mov	eax, DWORD PTR -160[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	esi, DWORD PTR 80[rax]
	mov	rcx, QWORD PTR data_b[rip]
	mov	eax, DWORD PTR -160[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	lea	rdi, 32[rax]
	mov	rcx, QWORD PTR data_b[rip]
	mov	eax, DWORD PTR -160[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	lea	rcx, 16[rax]
	mov	r8, QWORD PTR data_b[rip]
	mov	eax, DWORD PTR -160[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, r8
	mov	rdx, rax
	mov	rax, QWORD PTR -136[rbp]
	mov	r9d, esi
	mov	r8, rdi
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -160[rbp], 1
.L13:
	mov	eax, DWORD PTR -160[rbp]
	cmp	eax, DWORD PTR -148[rbp]
	jl	.L16
	jmp	.L15
.L37:
	nop
.L15:
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rdi, .LC14[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -148[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -144[rbp], rax
	mov	eax, DWORD PTR -148[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -120[rbp], rax
	mov	DWORD PTR -160[rbp], 0
	jmp	.L17
.L18:
	mov	rcx, QWORD PTR data_b[rip]
	mov	eax, DWORD PTR -160[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	rcx, QWORD PTR -144[rbp]
	mov	edx, DWORD PTR -160[rbp]
	movsx	rdx, edx
	sal	rdx, 2
	add	rdx, rcx
	mov	eax, DWORD PTR 80[rax]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -160[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	DWORD PTR [rax], 0
	add	DWORD PTR -160[rbp], 1
.L17:
	mov	eax, DWORD PTR -160[rbp]
	cmp	eax, DWORD PTR -148[rbp]
	jl	.L18
	mov	DWORD PTR -160[rbp], 1
	jmp	.L19
.L24:
	mov	edx, DWORD PTR -160[rbp]
	lea	rax, -64[rbp]
	lea	rsi, .LC15[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -64[rbp]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -136[rbp], rax
	mov	DWORD PTR -156[rbp], 0
	jmp	.L20
.L23:
	mov	rcx, QWORD PTR data_b[rip]
	mov	eax, DWORD PTR -156[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR 80[rax]
	test	eax, eax
	je	.L38
	mov	rdx, QWORD PTR -136[rbp]
	lea	rax, -144[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 4
	mov	rdi, rax
	call	fwrite@PLT
	add	DWORD PTR -156[rbp], 1
.L20:
	mov	eax, DWORD PTR -156[rbp]
	cmp	eax, DWORD PTR -148[rbp]
	jl	.L23
	jmp	.L22
.L38:
	nop
.L22:
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	fclose@PLT
	add	DWORD PTR -160[rbp], 1
.L19:
	cmp	DWORD PTR -160[rbp], 4
	jle	.L24
	lea	rdi, .LC16[rip]
	call	puts@PLT
	mov	DWORD PTR -160[rbp], 1
	jmp	.L25
.L28:
	mov	edx, DWORD PTR -160[rbp]
	lea	rax, -64[rbp]
	lea	rsi, .LC15[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -64[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -128[rbp], rax
	mov	DWORD PTR -156[rbp], 0
	jmp	.L26
.L27:
	mov	rdx, QWORD PTR -144[rbp]
	mov	eax, DWORD PTR -156[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	mov	rax, QWORD PTR -128[rbp]
	lea	rsi, .LC17[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	rdx, QWORD PTR -144[rbp]
	mov	eax, DWORD PTR -156[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	ecx, DWORD PTR [rax]
	mov	eax, DWORD PTR -156[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -156[rbp]
	cdqe
	lea	rsi, 0[0+rax*4]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rsi
	add	edx, ecx
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -128[rbp]
	mov	rdi, rax
	call	fclose@PLT
	add	DWORD PTR -156[rbp], 1
.L26:
	mov	eax, DWORD PTR -156[rbp]
	cmp	eax, DWORD PTR -148[rbp]
	jl	.L27
	add	DWORD PTR -160[rbp], 1
.L25:
	cmp	DWORD PTR -160[rbp], 4
	jle	.L28
	lea	rsi, .LC1[rip]
	lea	rdi, .LC18[rip]
	call	fopen@PLT
	mov	QWORD PTR -136[rbp], rax
	mov	DWORD PTR -160[rbp], 0
	jmp	.L29
.L32:
	mov	rcx, QWORD PTR data_b[rip]
	mov	eax, DWORD PTR -160[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR 80[rax]
	test	eax, eax
	je	.L39
	mov	eax, DWORD PTR -160[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	esi, DWORD PTR [rax]
	mov	rcx, QWORD PTR data_b[rip]
	mov	eax, DWORD PTR -160[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	lea	rdi, 32[rax]
	mov	rcx, QWORD PTR data_b[rip]
	mov	eax, DWORD PTR -160[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	lea	rcx, 16[rax]
	mov	r8, QWORD PTR data_b[rip]
	mov	eax, DWORD PTR -160[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, r8
	mov	rdx, rax
	mov	rax, QWORD PTR -136[rbp]
	mov	r9d, esi
	mov	r8, rdi
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -160[rbp], 1
.L29:
	mov	eax, DWORD PTR -160[rbp]
	cmp	eax, DWORD PTR -148[rbp]
	jl	.L32
	jmp	.L31
.L39:
	nop
.L31:
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rdi, .LC20[rip]
	call	puts@PLT
	jmp	.L33
.L2:
	lea	rdi, .LC21[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -128[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L33:
	call	getchar@PLT
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L35
	call	__stack_chk_fail@PLT
.L35:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	sort
	.type	sort, @function
sort:
.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, 112
	mov	QWORD PTR -104[rbp], rdi
	mov	DWORD PTR -108[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -84[rbp], 0
	mov	DWORD PTR -80[rbp], 0
	mov	DWORD PTR -76[rbp], 0
	mov	DWORD PTR -84[rbp], 0
	jmp	.L41
.L47:
	mov	eax, DWORD PTR -84[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR 80[rax]
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -84[rbp]
	add	eax, 1
	mov	DWORD PTR -80[rbp], eax
	jmp	.L42
.L46:
	mov	eax, DWORD PTR -80[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR 80[rax]
	test	eax, eax
	je	.L49
	mov	eax, DWORD PTR -80[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR 80[rax]
	cmp	DWORD PTR -72[rbp], eax
	jle	.L45
	mov	eax, DWORD PTR -80[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR 80[rax]
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -80[rbp]
	mov	DWORD PTR -76[rbp], eax
.L45:
	add	DWORD PTR -80[rbp], 1
.L42:
	mov	eax, DWORD PTR -80[rbp]
	cmp	eax, DWORD PTR -108[rbp]
	jl	.L46
	jmp	.L44
.L49:
	nop
.L44:
	mov	eax, DWORD PTR -76[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR 80[rax]
	mov	DWORD PTR -68[rbp], eax
	mov	eax, DWORD PTR -84[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -76[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR 80[rcx]
	mov	DWORD PTR 80[rdx], eax
	mov	eax, DWORD PTR -84[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -68[rbp]
	mov	DWORD PTR 80[rdx], eax
	mov	eax, DWORD PTR -76[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	rdx, rax
	lea	rax, -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, DWORD PTR -84[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	rcx, rax
	mov	eax, DWORD PTR -76[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	rsi, rcx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, DWORD PTR -84[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	rdx, rax
	lea	rax, -64[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcpy@PLT
	mov	eax, DWORD PTR -76[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	lea	rdx, 16[rax]
	lea	rax, -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, DWORD PTR -84[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	lea	rcx, 16[rax]
	mov	eax, DWORD PTR -76[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	add	rax, 16
	mov	rsi, rcx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, DWORD PTR -84[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	lea	rdx, 16[rax]
	lea	rax, -64[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcpy@PLT
	mov	eax, DWORD PTR -76[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	lea	rdx, 32[rax]
	lea	rax, -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, DWORD PTR -84[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	lea	rcx, 32[rax]
	mov	eax, DWORD PTR -76[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	add	rax, 32
	mov	rsi, rcx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, DWORD PTR -84[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	lea	rdx, 32[rax]
	lea	rax, -64[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcpy@PLT
	add	DWORD PTR -84[rbp], 1
.L41:
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, 1
	cmp	DWORD PTR -84[rbp], eax
	jl	.L47
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L48
	call	__stack_chk_fail@PLT
.L48:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sort, .-sort
	.section	.rodata
	.align 8
.LC7:
	.long	-1717986918
	.long	1069128089
	.align 8
.LC8:
	.long	0
	.long	1076363264
	.align 8
.LC9:
	.long	0
	.long	1074266112
	.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	"36288.c"
	.text
	.comm	data,4,4
	.comm	data_b,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Please enter the file name you wish to open to read"
	.ascii	" from:\012\000"
	.align	2
.LC1:
	.ascii	"w+\000"
	.align	2
.LC2:
	.ascii	"Sales.txt\000"
	.align	2
.LC3:
	.ascii	"rb\000"
	.align	2
.LC4:
	.ascii	" Firstname: %s \012 Lastname: %s\012 Address:%s Sal"
	.ascii	"es: %d\012\012\000"
	.align	2
.LC5:
	.ascii	"\012Number of records is: %d\012\000"
	.align	2
.LC6:
	.ascii	"\012Contents of binary file have been printed to \""
	.ascii	"Sales.txt\"\000"
	.global	__aeabi_i2d
	.global	__aeabi_dmul
	.global	__aeabi_ddiv
	.global	__aeabi_d2iz
	.align	2
.LC7:
	.ascii	"wb+\000"
	.align	2
.LC8:
	.ascii	"Bonus.bin\000"
	.align	2
.LC9:
	.ascii	"Bonus.txt\000"
	.align	2
.LC10:
	.ascii	" Firstname: %s \012 Lastname: %s\012 Address:%s Bon"
	.ascii	"us: %d\012\012\000"
	.align	2
.LC11:
	.ascii	"\012New records sent to \"Bonus.bin\" and \"Bonus.t"
	.ascii	"xt\"\000"
	.align	2
.LC12:
	.ascii	"q%d.bin\000"
	.align	2
.LC13:
	.ascii	"\012Quaterly bin files created\000"
	.align	2
.LC14:
	.ascii	"%d\000"
	.align	2
.LC15:
	.ascii	"Annual_Bonus.txt\000"
	.align	2
.LC16:
	.ascii	" Firstname: %s \012 Lastname: %s\012 Address:%s Ann"
	.ascii	"ual Bonus: %d\012\012\000"
	.align	2
.LC17:
	.ascii	"\012New records sent to \"Annual_Bonus.bin\" and \""
	.ascii	"Annual_Bonus.txt\"\000"
	.align	2
.LC18:
	.ascii	"\012File cannot be opened\000"
	.align	2
.LC19:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r6, r7, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #140
	ldr	r3, .L40
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-140]
	mov	r3, #0
	str	r3, [fp, #-136]
	mov	r3, #100
	str	r3, [fp, #-132]
	mov	r3, #100
	str	r3, [fp, #-128]
	ldr	r2, [fp, #-132]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L40+4
	str	r2, [r3]
	ldr	r0, .L40+8
	bl	puts
	sub	r3, fp, #112
	mov	r0, r3
	bl	gets
	ldr	r1, .L40+12
	ldr	r0, .L40+16
	bl	fopen
	str	r0, [fp, #-124]
	sub	r3, fp, #112
	ldr	r1, .L40+20
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-120]
	ldr	r3, [fp, #-120]
	cmp	r3, #0
	beq	.L2
	mov	r3, #0
	str	r3, [fp, #-140]
	b	.L3
.L5:
	ldr	r3, [fp, #-132]
	sub	r3, r3, #1
	ldr	r2, [fp, #-140]
	cmp	r2, r3
	blt	.L4
	ldr	r3, [fp, #-132]
	add	r3, r3, #100
	str	r3, [fp, #-132]
	ldr	r3, .L40+4
	ldr	r0, [r3]
	ldr	r2, [fp, #-132]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	mov	r1, r3
	bl	realloc
	mov	r3, r0
	ldr	r2, .L40+4
	str	r3, [r2]
.L4:
	ldr	r3, .L40+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r3, r1, r3
	mov	lr, r3
	ldr	r3, .L40+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r3, r1, r3
	add	ip, r3, #16
	ldr	r3, .L40+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r3, r1, r3
	add	r1, r3, #32
	ldr	r3, .L40+4
	ldr	r0, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r3, r0, r3
	ldr	r3, [r3, #80]
	str	r3, [sp, #4]
	str	r1, [sp]
	mov	r3, ip
	mov	r2, lr
	ldr	r1, .L40+24
	ldr	r0, [fp, #-124]
	bl	fprintf
	ldr	r3, [fp, #-140]
	add	r3, r3, #1
	str	r3, [fp, #-140]
.L3:
	ldr	r3, .L40+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r0, r1, r3
	ldr	r3, [fp, #-120]
	mov	r2, #1
	mov	r1, #84
	bl	fread
	mov	r3, r0
	cmp	r3, #0
	bne	.L5
	ldr	r0, [fp, #-120]
	bl	fclose
	ldr	r1, [fp, #-140]
	ldr	r0, .L40+28
	bl	printf
	ldr	r0, .L40+32
	bl	puts
	ldr	r0, [fp, #-124]
	bl	fclose
	ldr	r2, [fp, #-128]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L40+36
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-136]
	mov	r3, #0
	str	r3, [fp, #-140]
	b	.L6
.L8:
	ldr	r3, .L40+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r3, r1, r3
	ldr	r3, [r3, #80]
	ldr	r2, .L40+40
	cmp	r3, r2
	ble	.L7
	ldr	r3, .L40+36
	ldr	r1, [r3]
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r3, r1, r3
	mov	r0, r3
	ldr	r3, .L40+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r3, r1, r3
	mov	r1, r3
	bl	strcpy
	ldr	r3, .L40+36
	ldr	r1, [r3]
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r3, r1, r3
	add	r0, r3, #16
	ldr	r3, .L40+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r3, r1, r3
	add	r3, r3, #16
	mov	r1, r3
	bl	strcpy
	ldr	r3, .L40+36
	ldr	r1, [r3]
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r3, r1, r3
	add	r0, r3, #32
	ldr	r3, .L40+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r3, r1, r3
	add	r3, r3, #32
	mov	r1, r3
	bl	strcpy
	ldr	r3, .L40+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r3, r1, r3
	ldr	r3, [r3, #80]
	mov	r0, r3
	bl	__aeabi_i2d
	ldr	r2, .L40+44
	ldr	r3, .L40+48
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	ldr	r3, .L40+52
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	ldr	r3, .L40+56
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r6, r2
	mov	r7, r3
	ldr	r3, .L40+36
	ldr	r1, [r3]
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r4, r1, r3
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_d2iz
	mov	r3, r0
	str	r3, [r4, #80]
	ldr	r3, [fp, #-136]
	add	r3, r3, #1
	str	r3, [fp, #-136]
	ldr	r3, [fp, #-128]
	sub	r3, r3, #1
	ldr	r2, [fp, #-136]
	cmp	r2, r3
	blt	.L7
	ldr	r3, [fp, #-128]
	add	r3, r3, #100
	str	r3, [fp, #-128]
	ldr	r3, .L40+36
	ldr	r0, [r3]
	ldr	r2, [fp, #-128]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	mov	r1, r3
	bl	realloc
	mov	r3, r0
	ldr	r2, .L40+36
	str	r3, [r2]
.L7:
	ldr	r3, [fp, #-140]
	add	r3, r3, #1
	str	r3, [fp, #-140]
.L6:
	ldr	r2, [fp, #-140]
	ldr	r3, [fp, #-132]
	cmp	r2, r3
	blt	.L8
	ldr	r3, .L40+36
	ldr	r3, [r3]
	ldr	r1, [fp, #-128]
	mov	r0, r3
	bl	sort
	ldr	r1, .L40+60
	ldr	r0, .L40+64
	bl	fopen
	str	r0, [fp, #-124]
	mov	r3, #0
	str	r3, [fp, #-140]
	b	.L9
.L12:
	ldr	r3, .L40+36
	ldr	r1, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r3, r1, r3
	ldr	r3, [r3, #80]
	cmp	r3, #0
	beq	.L36
	ldr	r3, .L40+36
	ldr	r1, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r0, r1, r3
	ldr	r3, [fp, #-124]
	mov	r2, #1
	mov	r1, #84
	bl	fwrite
	ldr	r3, [fp, #-140]
	add	r3, r3, #1
	str	r3, [fp, #-140]
.L9:
	ldr	r2, [fp, #-140]
	ldr	r3, [fp, #-128]
	cmp	r2, r3
	blt	.L12
	b	.L11
.L36:
	nop
.L11:
	ldr	r0, [fp, #-124]
	bl	fclose
	ldr	r1, .L40+12
	ldr	r0, .L40+68
	bl	fopen
	str	r0, [fp, #-124]
	mov	r3, #0
	str	r3, [fp, #-140]
	b	.L13
.L16:
	ldr	r3, .L40+36
	ldr	r1, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r3, r1, r3
	ldr	r3, [r3, #80]
	cmp	r3, #0
	beq	.L37
	ldr	r3, .L40+36
	ldr	r1, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r3, r1, r3
	mov	lr, r3
	ldr	r3, .L40+36
	ldr	r1, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r3, r1, r3
	add	ip, r3, #16
	ldr	r3, .L40+36
	ldr	r1, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r3, r1, r3
	add	r1, r3, #32
	ldr	r3, .L40+36
	ldr	r0, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r3, r0, r3
	ldr	r3, [r3, #80]
	str	r3, [sp, #4]
	str	r1, [sp]
	mov	r3, ip
	mov	r2, lr
	ldr	r1, .L40+72
	ldr	r0, [fp, #-124]
	bl	fprintf
	ldr	r3, [fp, #-140]
	add	r3, r3, #1
	str	r3, [fp, #-140]
.L13:
	ldr	r2, [fp, #-140]
	ldr	r3, [fp, #-128]
	cmp	r2, r3
	blt	.L16
	b	.L15
.L37:
	nop
.L15:
	ldr	r0, [fp, #-124]
	bl	fclose
	ldr	r0, .L40+76
	bl	puts
	ldr	r3, [fp, #-128]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-144]
	ldr	r3, [fp, #-128]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-116]
	mov	r3, #0
	str	r3, [fp, #-140]
	b	.L17
.L18:
	ldr	r3, .L40+36
	ldr	r1, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r2, r1, r3
	ldr	r1, [fp, #-144]
	ldr	r3, [fp, #-140]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r2, #80]
	str	r2, [r3]
	ldr	r3, [fp, #-140]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-116]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-140]
	add	r3, r3, #1
	str	r3, [fp, #-140]
.L17:
	ldr	r2, [fp, #-140]
	ldr	r3, [fp, #-128]
	cmp	r2, r3
	blt	.L18
	mov	r3, #1
	str	r3, [fp, #-140]
	b	.L19
.L24:
	sub	r3, fp, #68
	ldr	r2, [fp, #-140]
	ldr	r1, .L40+80
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #68
	ldr	r1, .L40+60
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-124]
	mov	r3, #0
	str	r3, [fp, #-136]
	b	.L20
.L23:
	ldr	r3, .L40+36
	ldr	r1, [r3]
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r3, r1, r3
	ldr	r3, [r3, #80]
	cmp	r3, #0
	beq	.L38
	sub	r0, fp, #144
	ldr	r3, [fp, #-124]
	mov	r2, #1
	mov	r1, #4
	bl	fwrite
	ldr	r3, [fp, #-136]
	add	r3, r3, #1
	str	r3, [fp, #-136]
.L20:
	ldr	r2, [fp, #-136]
	ldr	r3, [fp, #-128]
	cmp	r2, r3
	blt	.L23
	b	.L22
.L38:
	nop
.L22:
	ldr	r0, [fp, #-124]
	bl	fclose
	ldr	r3, [fp, #-140]
	add	r3, r3, #1
	str	r3, [fp, #-140]
.L19:
	ldr	r3, [fp, #-140]
	cmp	r3, #4
	ble	.L24
	ldr	r0, .L40+84
	bl	puts
	mov	r3, #1
	str	r3, [fp, #-140]
	b	.L25
.L28:
	sub	r3, fp, #68
	ldr	r2, [fp, #-140]
	ldr	r1, .L40+80
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #68
	ldr	r1, .L40+20
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-120]
	mov	r3, #0
	str	r3, [fp, #-136]
	b	.L26
.L27:
	ldr	r2, [fp, #-144]
	ldr	r3, [fp, #-136]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, r3
	ldr	r1, .L40+88
	ldr	r0, [fp, #-120]
	bl	__isoc99_fscanf
	ldr	r2, [fp, #-144]
	ldr	r3, [fp, #-136]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-136]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-116]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-136]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-116]
	add	r3, r0, r3
	add	r2, r1, r2
	str	r2, [r3]
	ldr	r0, [fp, #-120]
	bl	fclose
	ldr	r3, [fp, #-136]
	add	r3, r3, #1
	str	r3, [fp, #-136]
.L26:
	ldr	r2, [fp, #-136]
	ldr	r3, [fp, #-128]
	cmp	r2, r3
	blt	.L27
	ldr	r3, [fp, #-140]
	add	r3, r3, #1
	str	r3, [fp, #-140]
.L25:
	ldr	r3, [fp, #-140]
	cmp	r3, #4
	ble	.L28
	ldr	r1, .L40+12
	ldr	r0, .L40+92
	bl	fopen
	str	r0, [fp, #-124]
	mov	r3, #0
	str	r3, [fp, #-140]
	b	.L29
.L32:
	ldr	r3, .L40+36
	ldr	r1, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r3, r1, r3
	ldr	r3, [r3, #80]
	cmp	r3, #0
	beq	.L39
	ldr	r3, .L40+36
	ldr	r1, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r3, r1, r3
	mov	ip, r3
	ldr	r3, .L40+36
	ldr	r1, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r3, r1, r3
	add	r0, r3, #16
	ldr	r3, .L40+36
	ldr	r1, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	mov	r3, r2
	add	r3, r1, r3
	add	r3, r3, #32
	ldr	r2, [fp, #-140]
	lsl	r2, r2, #2
	ldr	r1, [fp, #-116]
	add	r2, r1, r2
	ldr	r2, [r2]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, r0
	mov	r2, ip
	ldr	r1, .L40+96
	ldr	r0, [fp, #-124]
	bl	fprintf
	ldr	r3, [fp, #-140]
	add	r3, r3, #1
	str	r3, [fp, #-140]
.L29:
	ldr	r2, [fp, #-140]
	ldr	r3, [fp, #-128]
	cmp	r2, r3
	blt	.L32
	b	.L31
.L39:
	nop
.L31:
	ldr	r0, [fp, #-124]
	bl	fclose
	ldr	r0, .L40+100
	bl	puts
	b	.L33
.L2:
	ldr	r0, .L40+104
	bl	puts
	ldr	r0, [fp, #-120]
	bl	fclose
.L33:
	bl	getchar
	mov	r3, #0
	ldr	r2, .L40
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L35
	bl	__stack_chk_fail
.L35:
	mov	r0, r3
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r6, r7, fp, pc}
.L41:
	.align	2
.L40:
	.word	.LC19
	.word	data
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	data_b
	.word	100000
	.word	-1717986918
	.word	1069128089
	.word	1076363264
	.word	1074266112
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.size	main, .-main
	.section	.rodata
	.align	2
.LC20:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sort
	.syntax unified
	.arm
	.fpu softvfp
	.type	sort, %function
sort:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #80
	str	r0, [fp, #-80]
	str	r1, [fp, #-84]
	ldr	r3, .L52
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-76]
	mov	r3, #0
	str	r3, [fp, #-72]
	mov	r3, #0
	str	r3, [fp, #-68]
	mov	r3, #0
	str	r3, [fp, #-76]
	b	.L43
.L49:
	ldr	r2, [fp, #-76]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	ldr	r3, [fp, #-80]
	add	r3, r3, r2
	ldr	r3, [r3, #80]
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-76]
	add	r3, r3, #1
	str	r3, [fp, #-72]
	b	.L44
.L48:
	ldr	r2, [fp, #-72]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	ldr	r3, [fp, #-80]
	add	r3, r3, r2
	ldr	r3, [r3, #80]
	cmp	r3, #0
	beq	.L51
	ldr	r2, [fp, #-72]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	ldr	r3, [fp, #-80]
	add	r3, r3, r2
	ldr	r3, [r3, #80]
	ldr	r2, [fp, #-64]
	cmp	r2, r3
	ble	.L47
	ldr	r2, [fp, #-72]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	ldr	r3, [fp, #-80]
	add	r3, r3, r2
	ldr	r3, [r3, #80]
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-72]
	str	r3, [fp, #-68]
.L47:
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
.L44:
	ldr	r2, [fp, #-72]
	ldr	r3, [fp, #-84]
	cmp	r2, r3
	blt	.L48
	b	.L46
.L51:
	nop
.L46:
	ldr	r2, [fp, #-68]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	ldr	r3, [fp, #-80]
	add	r3, r3, r2
	ldr	r3, [r3, #80]
	str	r3, [fp, #-60]
	ldr	r2, [fp, #-76]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	ldr	r3, [fp, #-80]
	add	r1, r3, r2
	ldr	r2, [fp, #-68]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	ldr	r3, [fp, #-80]
	add	r3, r3, r2
	ldr	r2, [r1, #80]
	str	r2, [r3, #80]
	ldr	r2, [fp, #-76]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	ldr	r3, [fp, #-80]
	add	r3, r3, r2
	ldr	r2, [fp, #-60]
	str	r2, [r3, #80]
	ldr	r2, [fp, #-68]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	ldr	r3, [fp, #-80]
	add	r3, r3, r2
	mov	r2, r3
	sub	r3, fp, #56
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldr	r2, [fp, #-68]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	ldr	r3, [fp, #-80]
	add	r3, r3, r2
	mov	r0, r3
	ldr	r2, [fp, #-76]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	ldr	r3, [fp, #-80]
	add	r3, r3, r2
	mov	r1, r3
	bl	strcpy
	ldr	r2, [fp, #-76]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	ldr	r3, [fp, #-80]
	add	r3, r3, r2
	mov	r2, r3
	sub	r3, fp, #56
	mov	r1, r3
	mov	r0, r2
	bl	strcpy
	ldr	r2, [fp, #-68]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	ldr	r3, [fp, #-80]
	add	r3, r3, r2
	add	r2, r3, #16
	sub	r3, fp, #56
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldr	r2, [fp, #-68]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	ldr	r3, [fp, #-80]
	add	r3, r3, r2
	add	r0, r3, #16
	ldr	r2, [fp, #-76]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	ldr	r3, [fp, #-80]
	add	r3, r3, r2
	add	r3, r3, #16
	mov	r1, r3
	bl	strcpy
	ldr	r2, [fp, #-76]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	ldr	r3, [fp, #-80]
	add	r3, r3, r2
	add	r3, r3, #16
	sub	r2, fp, #56
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldr	r2, [fp, #-68]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	ldr	r3, [fp, #-80]
	add	r3, r3, r2
	add	r2, r3, #32
	sub	r3, fp, #56
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldr	r2, [fp, #-68]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	ldr	r3, [fp, #-80]
	add	r3, r3, r2
	add	r0, r3, #32
	ldr	r2, [fp, #-76]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	ldr	r3, [fp, #-80]
	add	r3, r3, r2
	add	r3, r3, #32
	mov	r1, r3
	bl	strcpy
	ldr	r2, [fp, #-76]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	ldr	r3, [fp, #-80]
	add	r3, r3, r2
	add	r3, r3, #32
	sub	r2, fp, #56
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldr	r3, [fp, #-76]
	add	r3, r3, #1
	str	r3, [fp, #-76]
.L43:
	ldr	r3, [fp, #-84]
	sub	r3, r3, #1
	ldr	r2, [fp, #-76]
	cmp	r2, r3
	blt	.L49
	nop
	ldr	r3, .L52
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L50
	bl	__stack_chk_fail
.L50:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L53:
	.align	2
.L52:
	.word	.LC20
	.size	sort, .-sort
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
