	.file	"487393.c"
	.intel_syntax noprefix
	.text
	.globl	data
	.bss
	.align 8
	.type	data, @object
	.size	data, 8
data:
	.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	"TextFileOrg.txt"
.LC3:
	.string	"rb"
	.align 8
.LC4:
	.string	" Firstname: %s \n Lastname: %s\n Address:%s Canonical Form: %s\n Record Number: %d\n\n"
	.align 8
.LC5:
	.string	"\nContents of binary file have been printed to \"TextFileOrg.txt\""
.LC6:
	.string	"\nNumber of records is %d\n"
	.align 8
.LC7:
	.string	"\n--------------------------------------MENU--------------------------------------"
.LC8:
	.string	"Press 0 to exit"
	.align 8
.LC9:
	.string	"Press 1 to search for a record and change address"
.LC10:
	.string	"Press 2 to enter a new record"
.LC11:
	.string	"Press 3 to delete a record"
	.align 8
.LC12:
	.string	"\n--------------------------------------------------------------------------------\n"
.LC13:
	.string	"%d"
.LC14:
	.string	"\nPlease enter a first name:"
.LC15:
	.string	"\n\nPlease enter a second name:"
.LC16:
	.string	"\nNow searching...."
.LC17:
	.string	"\n***** Record found *****"
.LC18:
	.string	"\n***** Record not found *****"
.LC19:
	.string	"\nName: %s %s\nAddress:%s\n"
	.align 8
.LC20:
	.string	"\nWould you like to change the address? (1 for yes, 0 for no)"
	.align 8
.LC21:
	.string	"\nPlease enter the new address:"
.LC22:
	.string	"wb+"
.LC23:
	.string	"Text_File_Address_Change.txt"
	.align 8
.LC24:
	.string	"\nNew records sent to \"Text_File_Address_Change.txt\""
.LC25:
	.string	"\nPlease enter a last name:"
.LC26:
	.string	"\nPlease enter an address:"
.LC27:
	.string	"Text_File_New_Record.txt"
	.align 8
.LC28:
	.string	"\nNew records sent to \"Text_File_New_Record.txt\""
	.align 8
.LC29:
	.string	"\nInvalid option, please try again"
.LC30:
	.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
	push	rbx
	sub	rsp, 184
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -180[rbp], 0
	mov	DWORD PTR -176[rbp], 0
	mov	DWORD PTR -172[rbp], 100
	mov	DWORD PTR -188[rbp], 1
	mov	DWORD PTR -184[rbp], 0
	mov	DWORD PTR -168[rbp], 0
	mov	DWORD PTR -164[rbp], 0
	mov	eax, DWORD PTR -172[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR data[rip], rax
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rax, -80[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	lea	rsi, .LC1[rip]
	lea	rdi, .LC2[rip]
	call	fopen@PLT
	mov	QWORD PTR -160[rbp], rax
	lea	rax, -80[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -152[rbp], rax
	cmp	QWORD PTR -152[rbp], 0
	je	.L2
	mov	DWORD PTR -180[rbp], 0
	jmp	.L3
.L5:
	mov	eax, DWORD PTR -172[rbp]
	sub	eax, 1
	cmp	DWORD PTR -180[rbp], eax
	jl	.L4
	add	DWORD PTR -172[rbp], 100
	mov	eax, DWORD PTR -172[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	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:
	add	DWORD PTR -176[rbp], 1
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	add	rax, rcx
	lea	rdi, 80[rax]
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	add	rax, rcx
	lea	rsi, 32[rax]
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	add	rax, rcx
	lea	rdx, 16[rax]
	mov	r8, QWORD PTR data[rip]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 3
	sub	rax, rcx
	sal	rax, 4
	add	rax, r8
	mov	r10, rax
	mov	rax, QWORD PTR -160[rbp]
	sub	rsp, 8
	mov	ecx, DWORD PTR -176[rbp]
	push	rcx
	mov	r9, rdi
	mov	r8, rsi
	mov	rcx, rdx
	mov	rdx, r10
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	rsp, 16
	mov	eax, DWORD PTR -180[rbp]
	mov	DWORD PTR -164[rbp], eax
	add	DWORD PTR -180[rbp], 1
.L3:
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	lea	rdi, [rcx+rax]
	mov	rax, QWORD PTR -152[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 112
	call	fread@PLT
	test	rax, rax
	jne	.L5
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -160[rbp]
	mov	rdi, rax
	call	fclose@PLT
	add	DWORD PTR -164[rbp], 1
	mov	eax, DWORD PTR -164[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
.L30:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
	lea	rdi, .LC9[rip]
	call	puts@PLT
	lea	rdi, .LC10[rip]
	call	puts@PLT
	lea	rdi, .LC11[rip]
	call	puts@PLT
	lea	rdi, .LC12[rip]
	call	puts@PLT
	lea	rax, -188[rbp]
	mov	rsi, rax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, 0
	call	flushall@PLT
	mov	eax, DWORD PTR -188[rbp]
	cmp	eax, 3
	je	.L34
	cmp	eax, 3
	jg	.L7
	cmp	eax, 2
	je	.L8
	cmp	eax, 2
	jg	.L7
	test	eax, eax
	je	.L35
	cmp	eax, 1
	jne	.L7
	lea	rdi, .LC14[rip]
	call	puts@PLT
	lea	rax, -144[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	mov	eax, 0
	call	flushall@PLT
	lea	rdi, .LC15[rip]
	call	puts@PLT
	lea	rax, -128[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	mov	eax, 0
	call	flushall@PLT
	lea	rdx, -128[rbp]
	lea	rax, -112[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rax, -112[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rax, -112[rbp]
	add	rax, rdx
	mov	WORD PTR [rax], 46
	lea	rdx, -144[rbp]
	lea	rax, -112[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	lea	rax, -112[rbp]
	mov	rdi, rax
	call	toupper
	lea	rdi, .LC16[rip]
	call	puts@PLT
	mov	DWORD PTR -180[rbp], 0
	jmp	.L12
.L15:
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	add	rax, rcx
	lea	rdx, 80[rax]
	lea	rax, -112[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L13
	lea	rdi, .LC17[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -180[rbp]
	mov	DWORD PTR -168[rbp], eax
	jmp	.L14
.L13:
	add	DWORD PTR -180[rbp], 1
.L12:
	mov	eax, DWORD PTR -180[rbp]
	cmp	eax, DWORD PTR -172[rbp]
	jl	.L15
.L14:
	cmp	DWORD PTR -168[rbp], 0
	jne	.L16
	lea	rdi, .LC18[rip]
	call	puts@PLT
	jmp	.L11
.L16:
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -168[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	add	rax, rcx
	lea	rcx, 32[rax]
	mov	rsi, QWORD PTR data[rip]
	mov	eax, DWORD PTR -168[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	add	rax, rsi
	lea	rdx, 16[rax]
	mov	rdi, QWORD PTR data[rip]
	mov	eax, DWORD PTR -168[rbp]
	movsx	rsi, eax
	mov	rax, rsi
	sal	rax, 3
	sub	rax, rsi
	sal	rax, 4
	add	rax, rdi
	mov	rsi, rax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC20[rip]
	call	puts@PLT
	lea	rax, -184[rbp]
	mov	rsi, rax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, 0
	call	flushall@PLT
	mov	eax, DWORD PTR -184[rbp]
	test	eax, eax
	je	.L36
	lea	rdi, .LC21[rip]
	call	puts@PLT
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -168[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	add	rax, rcx
	add	rax, 32
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -168[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	add	rax, rcx
	lea	rbx, 32[rax]
	mov	rdi, rbx
	call	strlen@PLT
	add	rax, rbx
	mov	WORD PTR [rax], 10
	mov	eax, 0
	call	flushall@PLT
	lea	rax, -80[rbp]
	lea	rsi, .LC22[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -160[rbp], rax
	mov	DWORD PTR -180[rbp], 0
	jmp	.L19
.L20:
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	lea	rdi, [rcx+rax]
	mov	rax, QWORD PTR -160[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 112
	call	fwrite@PLT
	add	DWORD PTR -180[rbp], 1
.L19:
	mov	eax, DWORD PTR -180[rbp]
	cmp	eax, DWORD PTR -172[rbp]
	jl	.L20
	mov	rax, QWORD PTR -160[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	DWORD PTR -168[rbp], 1
	lea	rsi, .LC1[rip]
	lea	rdi, .LC23[rip]
	call	fopen@PLT
	mov	QWORD PTR -160[rbp], rax
	mov	DWORD PTR -180[rbp], 0
	jmp	.L21
.L22:
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	add	rax, rcx
	lea	rdi, 80[rax]
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	add	rax, rcx
	lea	rsi, 32[rax]
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	add	rax, rcx
	lea	rdx, 16[rax]
	mov	r8, QWORD PTR data[rip]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 3
	sub	rax, rcx
	sal	rax, 4
	add	rax, r8
	mov	r10, rax
	mov	rax, QWORD PTR -160[rbp]
	sub	rsp, 8
	mov	ecx, DWORD PTR -168[rbp]
	push	rcx
	mov	r9, rdi
	mov	r8, rsi
	mov	rcx, rdx
	mov	rdx, r10
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	rsp, 16
	add	DWORD PTR -168[rbp], 1
	add	DWORD PTR -180[rbp], 1
.L21:
	mov	eax, DWORD PTR -180[rbp]
	cmp	eax, DWORD PTR -172[rbp]
	jl	.L22
	mov	rax, QWORD PTR -160[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rdi, .LC24[rip]
	call	puts@PLT
	jmp	.L11
.L8:
	mov	eax, DWORD PTR -164[rbp]
	mov	DWORD PTR -180[rbp], eax
	jmp	.L23
.L25:
	mov	eax, DWORD PTR -172[rbp]
	sub	eax, 1
	cmp	DWORD PTR -180[rbp], eax
	jl	.L24
	add	DWORD PTR -172[rbp], 100
	mov	eax, DWORD PTR -172[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR data[rip]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR data[rip], rax
.L24:
	lea	rdi, .LC14[rip]
	call	puts@PLT
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	add	rax, rcx
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	mov	eax, 0
	call	flushall@PLT
	lea	rdi, .LC25[rip]
	call	puts@PLT
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	add	rax, rcx
	add	rax, 16
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	mov	eax, 0
	call	flushall@PLT
	lea	rdi, .LC26[rip]
	call	puts@PLT
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	add	rax, rcx
	add	rax, 32
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	add	rax, rcx
	lea	rbx, 32[rax]
	mov	rdi, rbx
	call	strlen@PLT
	add	rax, rbx
	mov	WORD PTR [rax], 10
	mov	eax, 0
	call	flushall@PLT
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	add	rax, rcx
	lea	rdx, 16[rax]
	mov	rsi, QWORD PTR data[rip]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 3
	sub	rax, rcx
	sal	rax, 4
	add	rax, rsi
	add	rax, 80
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	add	rax, rcx
	lea	rbx, 80[rax]
	mov	rdi, rbx
	call	strlen@PLT
	add	rax, rbx
	mov	WORD PTR [rax], 46
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	add	rax, rcx
	mov	rcx, rax
	mov	rsi, QWORD PTR data[rip]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	add	rax, rsi
	add	rax, 80
	mov	rsi, rcx
	mov	rdi, rax
	call	strcat@PLT
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	add	rax, rcx
	add	rax, 80
	mov	rdi, rax
	call	toupper
	add	DWORD PTR -180[rbp], 1
.L23:
	mov	eax, DWORD PTR -164[rbp]
	cmp	eax, DWORD PTR -180[rbp]
	jge	.L25
	lea	rax, -80[rbp]
	lea	rsi, .LC22[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -160[rbp], rax
	mov	DWORD PTR -180[rbp], 0
	jmp	.L26
.L27:
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	lea	rdi, [rcx+rax]
	mov	rax, QWORD PTR -160[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 112
	call	fwrite@PLT
	add	DWORD PTR -180[rbp], 1
.L26:
	mov	eax, DWORD PTR -164[rbp]
	cmp	eax, DWORD PTR -180[rbp]
	jge	.L27
	mov	rax, QWORD PTR -160[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	DWORD PTR -168[rbp], 1
	lea	rsi, .LC1[rip]
	lea	rdi, .LC27[rip]
	call	fopen@PLT
	mov	QWORD PTR -160[rbp], rax
	mov	DWORD PTR -180[rbp], 0
	jmp	.L28
.L29:
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	add	rax, rcx
	lea	rdi, 80[rax]
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	add	rax, rcx
	lea	rsi, 32[rax]
	mov	rcx, QWORD PTR data[rip]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	add	rax, rcx
	lea	rdx, 16[rax]
	mov	r8, QWORD PTR data[rip]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 3
	sub	rax, rcx
	sal	rax, 4
	add	rax, r8
	mov	r10, rax
	mov	rax, QWORD PTR -160[rbp]
	sub	rsp, 8
	mov	ecx, DWORD PTR -168[rbp]
	push	rcx
	mov	r9, rdi
	mov	r8, rsi
	mov	rcx, rdx
	mov	rdx, r10
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	rsp, 16
	add	DWORD PTR -168[rbp], 1
	add	DWORD PTR -180[rbp], 1
.L28:
	mov	eax, DWORD PTR -164[rbp]
	cmp	eax, DWORD PTR -180[rbp]
	jge	.L29
	mov	rax, QWORD PTR -160[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rdi, .LC28[rip]
	call	puts@PLT
	jmp	.L11
.L7:
	lea	rdi, .LC29[rip]
	call	puts@PLT
	jmp	.L11
.L34:
	nop
	jmp	.L11
.L35:
	nop
	jmp	.L11
.L36:
	nop
.L11:
	mov	eax, DWORD PTR -188[rbp]
	test	eax, eax
	jne	.L30
	jmp	.L31
.L2:
	lea	rdi, .LC30[rip]
	call	puts@PLT
	call	getchar@PLT
.L31:
	mov	rax, QWORD PTR -152[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L33
	call	__stack_chk_fail@PLT
.L33:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	toupper
	.type	toupper, @function
toupper:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -20[rbp], 0
	jmp	.L38
.L41:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 96
	jle	.L39
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 122
	jg	.L39
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	lea	ecx, -32[rax]
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	jmp	.L40
.L39:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -20[rbp]
	movsx	rcx, edx
	mov	rdx, QWORD PTR -40[rbp]
	add	rdx, rcx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR [rdx], al
.L40:
	add	DWORD PTR -20[rbp], 1
.L38:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rbx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	jbe	.L41
	nop
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	toupper, .-toupper
	.globl	bsort
	.type	bsort, @function
bsort:
.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, 96
	mov	QWORD PTR -88[rbp], rdi
	mov	DWORD PTR -92[rbp], esi
	mov	DWORD PTR -96[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -72[rbp], 0
	mov	DWORD PTR -68[rbp], 0
	jmp	.L43
.L47:
	mov	DWORD PTR -72[rbp], 1
	mov	DWORD PTR -68[rbp], 0
	jmp	.L44
.L46:
	mov	eax, DWORD PTR -68[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	lea	rdx, 80[rax]
	mov	eax, DWORD PTR -96[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 3
	sub	rax, rcx
	sal	rax, 4
	mov	rcx, rax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rcx
	add	rax, 80
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jle	.L45
	mov	DWORD PTR -72[rbp], 0
	mov	eax, DWORD PTR -96[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	lea	rdx, 80[rax]
	lea	rax, -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, DWORD PTR -68[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	lea	rdx, 80[rax]
	mov	eax, DWORD PTR -96[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 3
	sub	rax, rcx
	sal	rax, 4
	mov	rcx, rax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rcx
	add	rax, 80
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, DWORD PTR -68[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	lea	rdx, 80[rax]
	lea	rax, -64[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcpy@PLT
	mov	eax, DWORD PTR -96[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	mov	rdx, rax
	lea	rax, -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, DWORD PTR -68[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	mov	rcx, rax
	mov	eax, DWORD PTR -96[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	mov	rsi, rcx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, DWORD PTR -68[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	mov	rdx, rax
	lea	rax, -64[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcpy@PLT
	mov	eax, DWORD PTR -96[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -88[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 -68[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	lea	rdx, 16[rax]
	mov	eax, DWORD PTR -96[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 3
	sub	rax, rcx
	sal	rax, 4
	mov	rcx, rax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rcx
	add	rax, 16
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, DWORD PTR -68[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -88[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 -96[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -88[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 -68[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	lea	rdx, 32[rax]
	mov	eax, DWORD PTR -96[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 3
	sub	rax, rcx
	sal	rax, 4
	mov	rcx, rax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rcx
	add	rax, 32
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, DWORD PTR -68[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	lea	rdx, 32[rax]
	lea	rax, -64[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcpy@PLT
.L45:
	add	DWORD PTR -68[rbp], 1
.L44:
	mov	eax, DWORD PTR -92[rbp]
	cmp	eax, DWORD PTR -68[rbp]
	jge	.L46
.L43:
	cmp	DWORD PTR -72[rbp], 0
	je	.L47
	nop
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L48
	call	__stack_chk_fail@PLT
.L48:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	bsort, .-bsort
	.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	"487393.c"
	.text
	.comm	data,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	"TextFileOrg.txt\000"
	.align	2
.LC3:
	.ascii	"rb\000"
	.align	2
.LC4:
	.ascii	" Firstname: %s \012 Lastname: %s\012 Address:%s Can"
	.ascii	"onical Form: %s\012 Record Number: %d\012\012\000"
	.align	2
.LC5:
	.ascii	"\012Contents of binary file have been printed to \""
	.ascii	"TextFileOrg.txt\"\000"
	.align	2
.LC6:
	.ascii	"\012Number of records is %d\012\000"
	.align	2
.LC7:
	.ascii	"\012--------------------------------------MENU-----"
	.ascii	"---------------------------------\000"
	.align	2
.LC8:
	.ascii	"Press 0 to exit\000"
	.align	2
.LC9:
	.ascii	"Press 1 to search for a record and change address\000"
	.align	2
.LC10:
	.ascii	"Press 2 to enter a new record\000"
	.align	2
.LC11:
	.ascii	"Press 3 to delete a record\000"
	.align	2
.LC12:
	.ascii	"\012-----------------------------------------------"
	.ascii	"---------------------------------\012\000"
	.align	2
.LC13:
	.ascii	"%d\000"
	.align	2
.LC14:
	.ascii	"\012Please enter a first name:\000"
	.align	2
.LC15:
	.ascii	"\012\012Please enter a second name:\000"
	.align	2
.LC16:
	.ascii	".\000"
	.align	2
.LC17:
	.ascii	"\012Now searching....\000"
	.align	2
.LC18:
	.ascii	"\012***** Record found *****\000"
	.align	2
.LC19:
	.ascii	"\012***** Record not found *****\000"
	.align	2
.LC20:
	.ascii	"\012Name: %s %s\012Address:%s\012\000"
	.align	2
.LC21:
	.ascii	"\012Would you like to change the address? (1 for ye"
	.ascii	"s, 0 for no)\000"
	.align	2
.LC22:
	.ascii	"\012Please enter the new address:\000"
	.align	2
.LC23:
	.ascii	"\012\000"
	.align	2
.LC24:
	.ascii	"wb+\000"
	.align	2
.LC25:
	.ascii	"Text_File_Address_Change.txt\000"
	.align	2
.LC26:
	.ascii	"\012New records sent to \"Text_File_Address_Change."
	.ascii	"txt\"\000"
	.align	2
.LC27:
	.ascii	"\012Please enter a last name:\000"
	.align	2
.LC28:
	.ascii	"\012Please enter an address:\000"
	.align	2
.LC29:
	.ascii	"Text_File_New_Record.txt\000"
	.align	2
.LC30:
	.ascii	"\012New records sent to \"Text_File_New_Record.txt\""
	.ascii	"\000"
	.align	2
.LC31:
	.ascii	"\012Invalid option, please try again\000"
	.align	2
.LC32:
	.ascii	"\012File cannot be opened\000"
	.align	2
.LC33:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 152
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #172
	ldr	r3, .L37
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-152]
	mov	r3, #0
	str	r3, [fp, #-148]
	mov	r3, #100
	str	r3, [fp, #-144]
	mov	r3, #1
	str	r3, [fp, #-160]
	mov	r3, #0
	str	r3, [fp, #-156]
	mov	r3, #0
	str	r3, [fp, #-140]
	mov	r3, #0
	str	r3, [fp, #-136]
	ldr	r2, [fp, #-144]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L37+4
	str	r2, [r3]
	ldr	r0, .L37+8
	bl	puts
	sub	r3, fp, #60
	mov	r0, r3
	bl	gets
	ldr	r1, .L37+12
	ldr	r0, .L37+16
	bl	fopen
	str	r0, [fp, #-132]
	sub	r3, fp, #60
	ldr	r1, .L37+20
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-128]
	ldr	r3, [fp, #-128]
	cmp	r3, #0
	beq	.L2
	mov	r3, #0
	str	r3, [fp, #-152]
	b	.L3
.L5:
	ldr	r3, [fp, #-144]
	sub	r3, r3, #1
	ldr	r2, [fp, #-152]
	cmp	r2, r3
	blt	.L4
	ldr	r3, [fp, #-144]
	add	r3, r3, #100
	str	r3, [fp, #-144]
	ldr	r3, .L37+4
	ldr	r0, [r3]
	ldr	r2, [fp, #-144]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	mov	r1, r3
	bl	realloc
	mov	r3, r0
	ldr	r2, .L37+4
	str	r3, [r2]
.L4:
	ldr	r3, [fp, #-148]
	add	r3, r3, #1
	str	r3, [fp, #-148]
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	mov	lr, r3
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	add	ip, r3, #16
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	add	r1, r3, #32
	ldr	r3, .L37+4
	ldr	r0, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r0, r3
	add	r3, r3, #80
	ldr	r2, [fp, #-148]
	str	r2, [sp, #8]
	str	r3, [sp, #4]
	str	r1, [sp]
	mov	r3, ip
	mov	r2, lr
	ldr	r1, .L37+24
	ldr	r0, [fp, #-132]
	bl	fprintf
	ldr	r3, [fp, #-152]
	str	r3, [fp, #-136]
	ldr	r3, [fp, #-152]
	add	r3, r3, #1
	str	r3, [fp, #-152]
.L3:
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r0, r1, r3
	ldr	r3, [fp, #-128]
	mov	r2, #1
	mov	r1, #112
	bl	fread
	mov	r3, r0
	cmp	r3, #0
	bne	.L5
	ldr	r0, .L37+28
	bl	puts
	ldr	r0, [fp, #-132]
	bl	fclose
	ldr	r3, [fp, #-136]
	add	r3, r3, #1
	str	r3, [fp, #-136]
	ldr	r1, [fp, #-136]
	ldr	r0, .L37+32
	bl	printf
.L31:
	ldr	r0, .L37+36
	bl	puts
	ldr	r0, .L37+40
	bl	puts
	ldr	r0, .L37+44
	bl	puts
	ldr	r0, .L37+48
	bl	puts
	ldr	r0, .L37+52
	bl	puts
	ldr	r0, .L37+56
	bl	puts
	sub	r3, fp, #160
	mov	r1, r3
	ldr	r0, .L37+60
	bl	__isoc99_scanf
	bl	flushall
	ldr	r3, [fp, #-160]
	cmp	r3, #3
	ldrls	pc, [pc, r3, asl #2]
	b	.L6
.L8:
	.word	.L35
	.word	.L10
	.word	.L9
	.word	.L35
.L10:
	ldr	r0, .L37+64
	bl	puts
	sub	r3, fp, #124
	mov	r0, r3
	bl	gets
	bl	flushall
	ldr	r0, .L37+68
	bl	puts
	sub	r3, fp, #108
	mov	r0, r3
	bl	gets
	bl	flushall
	sub	r2, fp, #108
	sub	r3, fp, #92
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #92
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #92
	add	r3, r3, r2
	ldr	r2, .L37+72
	mov	r0, r3
	mov	r1, r2
	mov	r3, #2
	mov	r2, r3
	bl	memcpy
	sub	r2, fp, #124
	sub	r3, fp, #92
	mov	r1, r2
	mov	r0, r3
	bl	strcat
	sub	r3, fp, #92
	mov	r0, r3
	bl	toupper
	ldr	r0, .L37+76
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-152]
	b	.L13
.L16:
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	add	r2, r3, #80
	sub	r3, fp, #92
	mov	r1, r2
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L14
	ldr	r0, .L37+80
	bl	puts
	ldr	r3, [fp, #-152]
	str	r3, [fp, #-140]
	b	.L15
.L14:
	ldr	r3, [fp, #-152]
	add	r3, r3, #1
	str	r3, [fp, #-152]
.L13:
	ldr	r2, [fp, #-152]
	ldr	r3, [fp, #-144]
	cmp	r2, r3
	blt	.L16
.L15:
	ldr	r3, [fp, #-140]
	cmp	r3, #0
	bne	.L17
	ldr	r0, .L37+84
	bl	puts
	b	.L12
.L17:
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	mov	ip, r3
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	add	r0, r3, #16
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	add	r3, r3, #32
	mov	r2, r0
	mov	r1, ip
	ldr	r0, .L37+88
	bl	printf
	ldr	r0, .L37+92
	bl	puts
	sub	r3, fp, #156
	mov	r1, r3
	ldr	r0, .L37+60
	bl	__isoc99_scanf
	bl	flushall
	ldr	r3, [fp, #-156]
	cmp	r3, #0
	beq	.L36
	ldr	r0, .L37+96
	bl	puts
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	add	r3, r3, #32
	mov	r0, r3
	bl	gets
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-140]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	add	r4, r3, #32
	mov	r0, r4
	bl	strlen
	mov	r3, r0
	add	r3, r4, r3
	ldr	r2, .L37+100
	mov	r0, r3
	mov	r1, r2
	mov	r3, #2
	mov	r2, r3
	bl	memcpy
	bl	flushall
	sub	r3, fp, #60
	ldr	r1, .L37+104
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-132]
	mov	r3, #0
	str	r3, [fp, #-152]
	b	.L20
.L21:
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r0, r1, r3
	ldr	r3, [fp, #-132]
	mov	r2, #1
	mov	r1, #112
	bl	fwrite
	ldr	r3, [fp, #-152]
	add	r3, r3, #1
	str	r3, [fp, #-152]
.L20:
	ldr	r2, [fp, #-152]
	ldr	r3, [fp, #-144]
	cmp	r2, r3
	blt	.L21
	ldr	r0, [fp, #-132]
	bl	fclose
	mov	r3, #1
	str	r3, [fp, #-140]
	ldr	r1, .L37+12
	ldr	r0, .L37+108
	bl	fopen
	str	r0, [fp, #-132]
	mov	r3, #0
	str	r3, [fp, #-152]
	b	.L22
.L23:
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	mov	lr, r3
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	add	ip, r3, #16
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	add	r1, r3, #32
	ldr	r3, .L37+4
	ldr	r0, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r0, r3
	add	r3, r3, #80
	ldr	r2, [fp, #-140]
	str	r2, [sp, #8]
	str	r3, [sp, #4]
	str	r1, [sp]
	mov	r3, ip
	mov	r2, lr
	ldr	r1, .L37+24
	ldr	r0, [fp, #-132]
	bl	fprintf
	ldr	r3, [fp, #-140]
	add	r3, r3, #1
	str	r3, [fp, #-140]
	ldr	r3, [fp, #-152]
	add	r3, r3, #1
	str	r3, [fp, #-152]
.L22:
	ldr	r2, [fp, #-152]
	ldr	r3, [fp, #-144]
	cmp	r2, r3
	blt	.L23
	ldr	r0, [fp, #-132]
	bl	fclose
	ldr	r0, .L37+112
	bl	puts
	b	.L12
.L9:
	ldr	r3, [fp, #-136]
	str	r3, [fp, #-152]
	b	.L24
.L26:
	ldr	r3, [fp, #-144]
	sub	r3, r3, #1
	ldr	r2, [fp, #-152]
	cmp	r2, r3
	blt	.L25
	ldr	r3, [fp, #-144]
	add	r3, r3, #100
	str	r3, [fp, #-144]
	ldr	r3, .L37+4
	ldr	r0, [r3]
	ldr	r2, [fp, #-144]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	mov	r1, r3
	bl	realloc
	mov	r3, r0
	ldr	r2, .L37+4
	str	r3, [r2]
.L25:
	ldr	r0, .L37+64
	bl	puts
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	mov	r0, r3
	bl	gets
	bl	flushall
	ldr	r0, .L37+116
	bl	puts
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	add	r3, r3, #16
	mov	r0, r3
	bl	gets
	bl	flushall
	ldr	r0, .L37+120
	bl	puts
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	add	r3, r3, #32
	mov	r0, r3
	bl	gets
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	add	r4, r3, #32
	mov	r0, r4
	bl	strlen
	mov	r3, r0
	add	r3, r4, r3
	ldr	r2, .L37+100
	mov	r0, r3
	mov	r1, r2
	mov	r3, #2
	mov	r2, r3
	bl	memcpy
	bl	flushall
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	add	r0, r3, #80
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	add	r3, r3, #16
	mov	r1, r3
	bl	strcpy
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	add	r4, r3, #80
	mov	r0, r4
	bl	strlen
	mov	r3, r0
	add	r3, r4, r3
	ldr	r2, .L37+72
	mov	r0, r3
	mov	r1, r2
	mov	r3, #2
	mov	r2, r3
	bl	memcpy
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	add	r0, r3, #80
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	mov	r1, r3
	bl	strcat
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	add	r3, r3, #80
	mov	r0, r3
	bl	toupper
	ldr	r3, [fp, #-152]
	add	r3, r3, #1
	str	r3, [fp, #-152]
.L24:
	ldr	r2, [fp, #-136]
	ldr	r3, [fp, #-152]
	cmp	r2, r3
	bge	.L26
	sub	r3, fp, #60
	ldr	r1, .L37+104
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-132]
	mov	r3, #0
	str	r3, [fp, #-152]
	b	.L27
.L28:
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r0, r1, r3
	ldr	r3, [fp, #-132]
	mov	r2, #1
	mov	r1, #112
	bl	fwrite
	ldr	r3, [fp, #-152]
	add	r3, r3, #1
	str	r3, [fp, #-152]
.L27:
	ldr	r2, [fp, #-136]
	ldr	r3, [fp, #-152]
	cmp	r2, r3
	bge	.L28
	ldr	r0, [fp, #-132]
	bl	fclose
	mov	r3, #1
	str	r3, [fp, #-140]
	ldr	r1, .L37+12
	ldr	r0, .L37+124
	bl	fopen
	str	r0, [fp, #-132]
	mov	r3, #0
	str	r3, [fp, #-152]
	b	.L29
.L30:
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	mov	lr, r3
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	add	ip, r3, #16
	ldr	r3, .L37+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	add	r1, r3, #32
	ldr	r3, .L37+4
	ldr	r0, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r0, r3
	add	r3, r3, #80
	ldr	r2, [fp, #-140]
	str	r2, [sp, #8]
	str	r3, [sp, #4]
	str	r1, [sp]
	mov	r3, ip
	mov	r2, lr
	ldr	r1, .L37+24
	ldr	r0, [fp, #-132]
	bl	fprintf
	ldr	r3, [fp, #-140]
	add	r3, r3, #1
	str	r3, [fp, #-140]
	ldr	r3, [fp, #-152]
	add	r3, r3, #1
	str	r3, [fp, #-152]
.L29:
	ldr	r2, [fp, #-136]
	ldr	r3, [fp, #-152]
	cmp	r2, r3
	bge	.L30
	ldr	r0, [fp, #-132]
	bl	fclose
	ldr	r0, .L37+128
	bl	puts
	b	.L12
.L6:
	ldr	r0, .L37+132
	bl	puts
	b	.L12
.L35:
	nop
	b	.L12
.L36:
	nop
.L12:
	ldr	r3, [fp, #-160]
	cmp	r3, #0
	bne	.L31
	b	.L32
.L2:
	ldr	r0, .L37+136
	bl	puts
	bl	getchar
.L32:
	ldr	r0, [fp, #-128]
	bl	fclose
	mov	r3, #0
	ldr	r2, .L37
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L34
	bl	__stack_chk_fail
.L34:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L38:
	.align	2
.L37:
	.word	.LC33
	.word	data
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.word	.LC27
	.word	.LC28
	.word	.LC29
	.word	.LC30
	.word	.LC31
	.word	.LC32
	.size	main, .-main
	.align	2
	.global	toupper
	.syntax unified
	.arm
	.fpu softvfp
	.type	toupper, %function
toupper:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L40
.L43:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #96
	bls	.L41
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #122
	bhi	.L41
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	sub	r2, r2, #32
	and	r2, r2, #255
	strb	r2, [r3]
	b	.L42
.L41:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r2, r2, r3
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
.L42:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L40:
	ldr	r0, [fp, #-16]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bcs	.L43
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	toupper, .-toupper
	.section	.rodata
	.align	2
.LC34:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	bsort
	.syntax unified
	.arm
	.fpu softvfp
	.type	bsort, %function
bsort:
	@ 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, #-72]
	str	r1, [fp, #-76]
	str	r2, [fp, #-80]
	ldr	r3, .L51
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-64]
	mov	r3, #0
	str	r3, [fp, #-60]
	b	.L45
.L49:
	mov	r3, #1
	str	r3, [fp, #-64]
	mov	r3, #0
	str	r3, [fp, #-60]
	b	.L46
.L48:
	ldr	r2, [fp, #-80]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-72]
	add	r3, r3, r2
	add	r0, r3, #80
	ldr	r2, [fp, #-60]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-72]
	add	r3, r3, r2
	add	r3, r3, #80
	mov	r1, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	ble	.L47
	mov	r3, #0
	str	r3, [fp, #-64]
	ldr	r2, [fp, #-80]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-72]
	add	r3, r3, r2
	add	r2, r3, #80
	sub	r3, fp, #56
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldr	r2, [fp, #-80]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-72]
	add	r3, r3, r2
	add	r0, r3, #80
	ldr	r2, [fp, #-60]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-72]
	add	r3, r3, r2
	add	r3, r3, #80
	mov	r1, r3
	bl	strcpy
	ldr	r2, [fp, #-60]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-72]
	add	r3, r3, r2
	add	r3, r3, #80
	sub	r2, fp, #56
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldr	r2, [fp, #-80]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-72]
	add	r3, r3, r2
	mov	r2, r3
	sub	r3, fp, #56
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldr	r2, [fp, #-80]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-72]
	add	r3, r3, r2
	mov	r0, r3
	ldr	r2, [fp, #-60]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-72]
	add	r3, r3, r2
	mov	r1, r3
	bl	strcpy
	ldr	r2, [fp, #-60]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-72]
	add	r3, r3, r2
	mov	r2, r3
	sub	r3, fp, #56
	mov	r1, r3
	mov	r0, r2
	bl	strcpy
	ldr	r2, [fp, #-80]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-72]
	add	r3, r3, r2
	add	r2, r3, #16
	sub	r3, fp, #56
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldr	r2, [fp, #-80]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-72]
	add	r3, r3, r2
	add	r0, r3, #16
	ldr	r2, [fp, #-60]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-72]
	add	r3, r3, r2
	add	r3, r3, #16
	mov	r1, r3
	bl	strcpy
	ldr	r2, [fp, #-60]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-72]
	add	r3, r3, r2
	add	r3, r3, #16
	sub	r2, fp, #56
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldr	r2, [fp, #-80]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-72]
	add	r3, r3, r2
	add	r2, r3, #32
	sub	r3, fp, #56
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldr	r2, [fp, #-80]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-72]
	add	r3, r3, r2
	add	r0, r3, #32
	ldr	r2, [fp, #-60]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-72]
	add	r3, r3, r2
	add	r3, r3, #32
	mov	r1, r3
	bl	strcpy
	ldr	r2, [fp, #-60]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-72]
	add	r3, r3, r2
	add	r3, r3, #32
	sub	r2, fp, #56
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
.L47:
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
.L46:
	ldr	r2, [fp, #-76]
	ldr	r3, [fp, #-60]
	cmp	r2, r3
	bge	.L48
.L45:
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	beq	.L49
	nop
	ldr	r2, .L51
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L50
	bl	__stack_chk_fail
.L50:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L52:
	.align	2
.L51:
	.word	.LC34
	.size	bsort, .-bsort
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
