	.file	"16210.c"
	.intel_syntax noprefix
	.text
	.local	current_cd
	.comm	current_cd,80,32
	.local	current_cat
	.comm	current_cat,80,32
	.globl	title_file
	.section	.rodata
.LC0:
	.string	"title.cdb"
	.section	.data.rel.local,"aw"
	.align 8
	.type	title_file, @object
	.size	title_file, 8
title_file:
	.quad	.LC0
	.globl	tracks_file
	.section	.rodata
.LC1:
	.string	"tracks.cdb"
	.section	.data.rel.local
	.align 8
	.type	tracks_file, @object
	.size	tracks_file, 8
tracks_file:
	.quad	.LC1
	.globl	temp_file
	.section	.rodata
.LC2:
	.string	"cdb.tmp"
	.section	.data.rel.local
	.align 8
	.type	temp_file, @object
	.size	temp_file, 8
temp_file:
	.quad	.LC2
	.globl	main_menu
	.section	.rodata
.LC3:
	.string	"aadd new CD"
.LC4:
	.string	"ffind CD"
	.align 8
.LC5:
	.string	"ccount CDs and tracks in the catalog"
.LC6:
	.string	"qquit"
	.section	.data.rel.local
	.align 32
	.type	main_menu, @object
	.size	main_menu, 40
main_menu:
	.quad	.LC3
	.quad	.LC4
	.quad	.LC5
	.quad	.LC6
	.quad	0
	.globl	extended_menu
	.section	.rodata
.LC7:
	.string	"llist tracks on current CD"
.LC8:
	.string	"rremove current CD"
.LC9:
	.string	"uupdate track information"
	.section	.data.rel.local
	.align 32
	.type	extended_menu, @object
	.size	extended_menu, 64
extended_menu:
	.quad	.LC3
	.quad	.LC4
	.quad	.LC5
	.quad	.LC7
	.quad	.LC8
	.quad	.LC9
	.quad	.LC6
	.quad	0
	.section	.rodata
.LC10:
	.string	"Options:"
	.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, 16
	call	initscr@PLT
.L13:
	movzx	eax, BYTE PTR current_cd[rip]
	test	al, al
	je	.L2
	lea	rax, extended_menu[rip]
	jmp	.L3
.L2:
	lea	rax, main_menu[rip]
.L3:
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	call	getchoice
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	sub	eax, 97
	cmp	eax, 20
	ja	.L4
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L6[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L6[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L6:
	.long	.L12-.L6
	.long	.L4-.L6
	.long	.L11-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L10-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L9-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L7-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L5-.L6
	.text
.L12:
	call	add_record
	jmp	.L4
.L11:
	call	count_cds
	jmp	.L4
.L10:
	call	find_cd
	jmp	.L4
.L9:
	call	list_tracks
	jmp	.L4
.L7:
	call	remove_cd
	jmp	.L4
.L5:
	call	update_cd
	nop
.L4:
	cmp	DWORD PTR -4[rbp], 113
	jne	.L13
	call	endwin@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	getchoice
	.type	getchoice, @function
getchoice:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -28[rbp], 0
	mov	DWORD PTR -16[rbp], 6
	mov	DWORD PTR -12[rbp], 10
	mov	DWORD PTR -20[rbp], 0
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L15
.L16:
	add	DWORD PTR -28[rbp], 1
	add	QWORD PTR -8[rbp], 8
.L15:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L16
	mov	eax, DWORD PTR selected_row.0[rip]
	cmp	DWORD PTR -28[rbp], eax
	jg	.L17
	mov	DWORD PTR selected_row.0[rip], 0
.L17:
	call	clear_all_screen
	mov	eax, DWORD PTR -16[rbp]
	lea	ecx, -2[rax]
	mov	rdx, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	mov	edi, ecx
	mov	eax, 0
	call	mvprintw@PLT
	mov	rax, QWORD PTR stdscr[rip]
	mov	esi, 1
	mov	rdi, rax
	call	keypad@PLT
	call	cbreak@PLT
	call	noecho@PLT
	mov	DWORD PTR -20[rbp], 0
	jmp	.L18
.L24:
	cmp	DWORD PTR -20[rbp], 259
	jne	.L19
	mov	eax, DWORD PTR selected_row.0[rip]
	test	eax, eax
	jne	.L20
	mov	eax, DWORD PTR -28[rbp]
	sub	eax, 1
	mov	DWORD PTR selected_row.0[rip], eax
	jmp	.L19
.L20:
	mov	eax, DWORD PTR selected_row.0[rip]
	sub	eax, 1
	mov	DWORD PTR selected_row.0[rip], eax
.L19:
	cmp	DWORD PTR -20[rbp], 258
	jne	.L21
	mov	eax, DWORD PTR -28[rbp]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR selected_row.0[rip]
	cmp	edx, eax
	jne	.L22
	mov	DWORD PTR selected_row.0[rip], 0
	jmp	.L21
.L22:
	mov	eax, DWORD PTR selected_row.0[rip]
	add	eax, 1
	mov	DWORD PTR selected_row.0[rip], eax
.L21:
	mov	eax, DWORD PTR selected_row.0[rip]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	DWORD PTR -24[rbp], eax
	mov	esi, DWORD PTR selected_row.0[rip]
	mov	ecx, DWORD PTR -12[rbp]
	mov	edx, DWORD PTR -16[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	draw_menu
	mov	rax, QWORD PTR stdscr[rip]
	mov	rdi, rax
	call	wgetch@PLT
	mov	DWORD PTR -20[rbp], eax
.L18:
	cmp	DWORD PTR -20[rbp], 113
	je	.L23
	cmp	DWORD PTR -20[rbp], 343
	je	.L23
	cmp	DWORD PTR -20[rbp], 10
	jne	.L24
.L23:
	mov	rax, QWORD PTR stdscr[rip]
	mov	esi, 0
	mov	rdi, rax
	call	keypad@PLT
	call	nocbreak@PLT
	call	echo@PLT
	cmp	DWORD PTR -20[rbp], 113
	jne	.L25
	mov	DWORD PTR -24[rbp], 113
.L25:
	mov	eax, DWORD PTR -24[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	getchoice, .-getchoice
	.section	.rodata
.LC11:
	.string	"%s"
	.align 8
.LC12:
	.string	"Move highlight then press Return "
	.text
	.globl	draw_menu
	.type	draw_menu, @function
draw_menu:
.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, 64
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	DWORD PTR -48[rbp], edx
	mov	DWORD PTR -52[rbp], ecx
	mov	DWORD PTR -20[rbp], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L28
.L31:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jne	.L29
	mov	rax, QWORD PTR stdscr[rip]
	mov	edx, 0
	mov	esi, 65536
	mov	rdi, rax
	call	wattr_on@PLT
.L29:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	add	QWORD PTR -8[rbp], 1
	mov	edx, DWORD PTR -48[rbp]
	mov	eax, DWORD PTR -20[rbp]
	lea	edi, [rdx+rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	rcx, rdx
	lea	rdx, .LC11[rip]
	mov	esi, eax
	mov	eax, 0
	call	mvprintw@PLT
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jne	.L30
	mov	rax, QWORD PTR stdscr[rip]
	mov	edx, 0
	mov	esi, 65536
	mov	rdi, rax
	call	wattr_off@PLT
.L30:
	add	DWORD PTR -20[rbp], 1
	add	QWORD PTR -16[rbp], 8
.L28:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L31
	mov	edx, DWORD PTR -48[rbp]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, edx
	lea	ecx, 3[rax]
	mov	eax, DWORD PTR -52[rbp]
	lea	rdx, .LC12[rip]
	mov	esi, eax
	mov	edi, ecx
	mov	eax, 0
	call	mvprintw@PLT
	mov	rax, QWORD PTR stdscr[rip]
	mov	rdi, rax
	call	wrefresh@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	draw_menu, .-draw_menu
	.section	.rodata
.LC13:
	.string	"CD Database Application"
.LC14:
	.string	"Current CD: %s: %s\n"
	.text
	.globl	clear_all_screen
	.type	clear_all_screen, @function
clear_all_screen:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR stdscr[rip]
	mov	rdi, rax
	call	wclear@PLT
	lea	rcx, .LC13[rip]
	lea	rdx, .LC11[rip]
	mov	esi, 20
	mov	edi, 2
	mov	eax, 0
	call	mvprintw@PLT
	movzx	eax, BYTE PTR current_cd[rip]
	test	al, al
	je	.L33
	lea	r8, current_cd[rip]
	lea	rcx, current_cat[rip]
	lea	rdx, .LC14[rip]
	mov	esi, 0
	mov	edi, 22
	mov	eax, 0
	call	mvprintw@PLT
.L33:
	mov	rax, QWORD PTR stdscr[rip]
	mov	rdi, rax
	call	wrefresh@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	clear_all_screen, .-clear_all_screen
	.section	.rodata
.LC15:
	.string	" Press return "
	.text
	.globl	get_return
	.type	get_return, @function
get_return:
.LFB10:
	.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
	lea	rcx, .LC15[rip]
	lea	rdx, .LC11[rip]
	mov	esi, 0
	mov	edi, 23
	mov	eax, 0
	call	mvprintw@PLT
	mov	rax, QWORD PTR stdscr[rip]
	mov	rdi, rax
	call	wrefresh@PLT
	nop
.L36:
	call	getchar@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 10
	je	.L37
	cmp	DWORD PTR -4[rbp], -1
	jne	.L36
.L37:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	get_return, .-get_return
	.section	.rodata
.LC16:
	.string	"Are you sure? "
.LC17:
	.string	"    Cancelled"
	.text
	.globl	get_confirm
	.type	get_confirm, @function
get_confirm:
.LFB11:
	.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	DWORD PTR -4[rbp], 0
	mov	BYTE PTR -5[rbp], 78
	lea	rdx, .LC16[rip]
	mov	esi, 5
	mov	edi, 20
	mov	eax, 0
	call	mvprintw@PLT
	mov	rax, QWORD PTR stdscr[rip]
	mov	rdi, rax
	call	wclrtoeol@PLT
	mov	rax, QWORD PTR stdscr[rip]
	mov	rdi, rax
	call	wrefresh@PLT
	call	cbreak@PLT
	mov	rax, QWORD PTR stdscr[rip]
	mov	rdi, rax
	call	wgetch@PLT
	mov	BYTE PTR -5[rbp], al
	cmp	BYTE PTR -5[rbp], 89
	je	.L39
	cmp	BYTE PTR -5[rbp], 121
	jne	.L40
.L39:
	mov	DWORD PTR -4[rbp], 1
.L40:
	call	nocbreak@PLT
	cmp	DWORD PTR -4[rbp], 0
	jne	.L41
	lea	rdx, .LC17[rip]
	mov	esi, 1
	mov	edi, 20
	mov	eax, 0
	call	mvprintw@PLT
	mov	rax, QWORD PTR stdscr[rip]
	mov	rdi, rax
	call	wclrtoeol@PLT
	mov	rax, QWORD PTR stdscr[rip]
	mov	rdi, rax
	call	wrefresh@PLT
	mov	edi, 1
	call	sleep@PLT
.L41:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	get_confirm, .-get_confirm
	.section	.rodata
.LC18:
	.string	"a"
	.align 8
.LC19:
	.string	"cannot open CD titles database"
.LC20:
	.string	"%s\n"
	.text
	.globl	insert_title
	.type	insert_title, @function
insert_title:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR title_file[rip]
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L44
	lea	rdx, .LC19[rip]
	mov	esi, 0
	mov	edi, 22
	mov	eax, 0
	call	mvprintw@PLT
	jmp	.L46
.L44:
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC20[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L46:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	insert_title, .-insert_title
	.globl	get_string
	.type	get_string, @function
get_string:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR stdscr[rip]
	mov	rcx, QWORD PTR -24[rbp]
	mov	edx, 80
	mov	rsi, rcx
	mov	rdi, rax
	call	wgetnstr@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jle	.L49
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	jne	.L49
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
.L49:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	get_string, .-get_string
	.section	.rodata
.LC21:
	.string	"Enter new CD details"
.LC22:
	.string	"Catalog Number: "
.LC23:
	.string	"      CD Title: "
.LC24:
	.string	"       CD Type: "
.LC25:
	.string	"        Artist: "
.LC26:
	.string	"About to add this new entry:"
.LC27:
	.string	"%s,%s,%s,%s"
	.text
	.globl	add_record
	.type	add_record, @function
add_record:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 432
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -424[rbp], 6
	mov	DWORD PTR -420[rbp], 10
	call	clear_all_screen
	mov	ecx, DWORD PTR -420[rbp]
	mov	eax, DWORD PTR -424[rbp]
	lea	rdx, .LC21[rip]
	mov	esi, ecx
	mov	edi, eax
	mov	eax, 0
	call	mvprintw@PLT
	add	DWORD PTR -424[rbp], 2
	mov	ecx, DWORD PTR -420[rbp]
	mov	eax, DWORD PTR -424[rbp]
	lea	rdx, .LC22[rip]
	mov	esi, ecx
	mov	edi, eax
	mov	eax, 0
	call	mvprintw@PLT
	lea	rax, -416[rbp]
	mov	rdi, rax
	call	get_string
	add	DWORD PTR -424[rbp], 1
	mov	ecx, DWORD PTR -420[rbp]
	mov	eax, DWORD PTR -424[rbp]
	lea	rdx, .LC23[rip]
	mov	esi, ecx
	mov	edi, eax
	mov	eax, 0
	call	mvprintw@PLT
	lea	rax, -336[rbp]
	mov	rdi, rax
	call	get_string
	add	DWORD PTR -424[rbp], 1
	mov	ecx, DWORD PTR -420[rbp]
	mov	eax, DWORD PTR -424[rbp]
	lea	rdx, .LC24[rip]
	mov	esi, ecx
	mov	edi, eax
	mov	eax, 0
	call	mvprintw@PLT
	lea	rax, -256[rbp]
	mov	rdi, rax
	call	get_string
	add	DWORD PTR -424[rbp], 1
	mov	ecx, DWORD PTR -420[rbp]
	mov	eax, DWORD PTR -424[rbp]
	lea	rdx, .LC25[rip]
	mov	esi, ecx
	mov	edi, eax
	mov	eax, 0
	call	mvprintw@PLT
	lea	rax, -176[rbp]
	mov	rdi, rax
	call	get_string
	add	DWORD PTR -424[rbp], 1
	lea	rdx, .LC26[rip]
	mov	esi, 5
	mov	edi, 15
	mov	eax, 0
	call	mvprintw@PLT
	lea	rdi, -176[rbp]
	lea	rsi, -256[rbp]
	lea	rcx, -336[rbp]
	lea	rdx, -416[rbp]
	lea	rax, -96[rbp]
	mov	r9, rdi
	mov	r8, rsi
	lea	rsi, .LC27[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -96[rbp]
	mov	rcx, rax
	lea	rdx, .LC11[rip]
	mov	esi, 5
	mov	edi, 17
	mov	eax, 0
	call	mvprintw@PLT
	mov	rax, QWORD PTR stdscr[rip]
	mov	rdi, rax
	call	wrefresh@PLT
	mov	rax, QWORD PTR stdscr[rip]
	mov	edx, 0
	mov	esi, 18
	mov	rdi, rax
	call	wmove@PLT
	call	get_confirm
	test	eax, eax
	je	.L53
	lea	rax, -96[rbp]
	mov	rdi, rax
	call	insert_title
	lea	rax, -336[rbp]
	mov	rsi, rax
	lea	rdi, current_cd[rip]
	call	strcpy@PLT
	lea	rax, -416[rbp]
	mov	rsi, rax
	lea	rdi, current_cat[rip]
	call	strcpy@PLT
.L53:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L52
	call	__stack_chk_fail@PLT
.L52:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	add_record, .-add_record
	.section	.rodata
.LC28:
	.string	"r"
	.align 8
.LC29:
	.string	"Database contains %d titles, with a total of %d tracks."
	.text
	.globl	count_cds
	.type	count_cds, @function
count_cds:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1072
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -1064[rbp], 0
	mov	DWORD PTR -1060[rbp], 0
	mov	rax, QWORD PTR title_file[rip]
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -1056[rbp], rax
	cmp	QWORD PTR -1056[rbp], 0
	je	.L55
	jmp	.L56
.L57:
	add	DWORD PTR -1064[rbp], 1
.L56:
	mov	rdx, QWORD PTR -1056[rbp]
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L57
	mov	rax, QWORD PTR -1056[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L55:
	mov	rax, QWORD PTR tracks_file[rip]
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -1048[rbp], rax
	cmp	QWORD PTR -1048[rbp], 0
	je	.L58
	jmp	.L59
.L60:
	add	DWORD PTR -1060[rbp], 1
.L59:
	mov	rdx, QWORD PTR -1048[rbp]
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L60
	mov	rax, QWORD PTR -1048[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L58:
	mov	edx, DWORD PTR -1060[rbp]
	mov	eax, DWORD PTR -1064[rbp]
	mov	r8d, edx
	mov	ecx, eax
	lea	rdx, .LC29[rip]
	mov	esi, 0
	mov	edi, 22
	mov	eax, 0
	call	mvprintw@PLT
	call	get_return
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L61
	call	__stack_chk_fail@PLT
.L61:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	count_cds, .-count_cds
	.section	.rodata
	.align 8
.LC30:
	.string	"Enter a string to search for in CD titles: "
.LC31:
	.string	"Sorry, no matching CD found. "
	.align 8
.LC32:
	.string	"Sorry, match is ambiguous: %d CDs found. "
	.text
	.globl	find_cd
	.type	find_cd, @function
find_cd:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1168
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -1156[rbp], 0
	lea	rdx, .LC30[rip]
	mov	esi, 0
	mov	edi, 20
	mov	eax, 0
	call	mvprintw@PLT
	lea	rax, -1120[rbp]
	mov	rdi, rax
	call	get_string
	mov	rax, QWORD PTR title_file[rip]
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -1152[rbp], rax
	cmp	QWORD PTR -1152[rbp], 0
	je	.L63
	jmp	.L64
.L65:
	lea	rax, -1040[rbp]
	mov	QWORD PTR -1144[rbp], rax
	mov	rax, QWORD PTR -1144[rbp]
	mov	esi, 44
	mov	rdi, rax
	call	strchr@PLT
	mov	QWORD PTR -1136[rbp], rax
	cmp	QWORD PTR -1136[rbp], 0
	je	.L64
	mov	rax, QWORD PTR -1136[rbp]
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -1136[rbp]
	add	rax, 1
	mov	QWORD PTR -1128[rbp], rax
	mov	rax, QWORD PTR -1128[rbp]
	mov	esi, 44
	mov	rdi, rax
	call	strchr@PLT
	mov	QWORD PTR -1136[rbp], rax
	cmp	QWORD PTR -1136[rbp], 0
	je	.L64
	mov	rax, QWORD PTR -1136[rbp]
	mov	BYTE PTR [rax], 0
	lea	rdx, -1120[rbp]
	mov	rax, QWORD PTR -1128[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strstr@PLT
	mov	QWORD PTR -1136[rbp], rax
	cmp	QWORD PTR -1136[rbp], 0
	je	.L64
	add	DWORD PTR -1156[rbp], 1
	mov	rax, QWORD PTR -1128[rbp]
	mov	rsi, rax
	lea	rdi, current_cd[rip]
	call	strcpy@PLT
	mov	rax, QWORD PTR -1144[rbp]
	mov	rsi, rax
	lea	rdi, current_cat[rip]
	call	strcpy@PLT
.L64:
	mov	rdx, QWORD PTR -1152[rbp]
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L65
	mov	rax, QWORD PTR -1152[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L63:
	cmp	DWORD PTR -1156[rbp], 1
	je	.L70
	cmp	DWORD PTR -1156[rbp], 0
	jne	.L67
	lea	rdx, .LC31[rip]
	mov	esi, 0
	mov	edi, 22
	mov	eax, 0
	call	mvprintw@PLT
.L67:
	cmp	DWORD PTR -1156[rbp], 1
	jle	.L68
	mov	eax, DWORD PTR -1156[rbp]
	mov	ecx, eax
	lea	rdx, .LC32[rip]
	mov	esi, 0
	mov	edi, 22
	mov	eax, 0
	call	mvprintw@PLT
.L68:
	mov	BYTE PTR current_cd[rip], 0
	call	get_return
.L70:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L69
	call	__stack_chk_fail@PLT
.L69:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	find_cd, .-find_cd
	.section	.rodata
.LC33:
	.string	"w"
	.text
	.globl	remove_tracks
	.type	remove_tracks, @function
remove_tracks:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1072
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	movzx	eax, BYTE PTR current_cd[rip]
	test	al, al
	je	.L79
	lea	rdi, current_cat[rip]
	call	strlen@PLT
	mov	DWORD PTR -1060[rbp], eax
	mov	rax, QWORD PTR tracks_file[rip]
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -1056[rbp], rax
	cmp	QWORD PTR -1056[rbp], 0
	je	.L80
	mov	rax, QWORD PTR temp_file[rip]
	lea	rsi, .LC33[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -1048[rbp], rax
	jmp	.L75
.L76:
	mov	eax, DWORD PTR -1060[rbp]
	movsx	rdx, eax
	lea	rax, -1040[rbp]
	mov	rsi, rax
	lea	rdi, current_cat[rip]
	call	strncmp@PLT
	test	eax, eax
	je	.L75
	mov	rdx, QWORD PTR -1048[rbp]
	lea	rax, -1040[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
.L75:
	mov	rdx, QWORD PTR -1056[rbp]
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L76
	mov	rax, QWORD PTR -1056[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -1048[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR tracks_file[rip]
	mov	rdi, rax
	call	unlink@PLT
	mov	rdx, QWORD PTR tracks_file[rip]
	mov	rax, QWORD PTR temp_file[rip]
	mov	rsi, rdx
	mov	rdi, rax
	call	rename@PLT
	jmp	.L71
.L79:
	nop
	jmp	.L71
.L80:
	nop
.L71:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L78
	call	__stack_chk_fail@PLT
.L78:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	remove_tracks, .-remove_tracks
	.section	.rodata
.LC34:
	.string	"About to remove CD %s: %s. "
	.text
	.globl	remove_cd
	.type	remove_cd, @function
remove_cd:
.LFB18:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1072
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	movzx	eax, BYTE PTR current_cd[rip]
	test	al, al
	je	.L89
	call	clear_all_screen
	lea	r8, current_cd[rip]
	lea	rcx, current_cat[rip]
	lea	rdx, .LC34[rip]
	mov	esi, 0
	mov	edi, 18
	mov	eax, 0
	call	mvprintw@PLT
	call	get_confirm
	test	eax, eax
	je	.L90
	lea	rdi, current_cat[rip]
	call	strlen@PLT
	mov	DWORD PTR -1060[rbp], eax
	mov	rax, QWORD PTR title_file[rip]
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -1056[rbp], rax
	mov	rax, QWORD PTR temp_file[rip]
	lea	rsi, .LC33[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -1048[rbp], rax
	jmp	.L85
.L86:
	mov	eax, DWORD PTR -1060[rbp]
	movsx	rdx, eax
	lea	rax, -1040[rbp]
	mov	rsi, rax
	lea	rdi, current_cat[rip]
	call	strncmp@PLT
	test	eax, eax
	je	.L85
	mov	rdx, QWORD PTR -1048[rbp]
	lea	rax, -1040[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
.L85:
	mov	rdx, QWORD PTR -1056[rbp]
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L86
	mov	rax, QWORD PTR -1056[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -1048[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR title_file[rip]
	mov	rdi, rax
	call	unlink@PLT
	mov	rdx, QWORD PTR title_file[rip]
	mov	rax, QWORD PTR temp_file[rip]
	mov	rsi, rdx
	mov	rdi, rax
	call	rename@PLT
	call	remove_tracks
	mov	BYTE PTR current_cd[rip], 0
	jmp	.L81
.L89:
	nop
	jmp	.L81
.L90:
	nop
.L81:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L88
	call	__stack_chk_fail@PLT
.L88:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	remove_cd, .-remove_cd
	.section	.rodata
.LC35:
	.string	"You must select a CD first. "
.LC36:
	.string	"CD Track Listing\n"
	.align 8
.LC37:
	.string	"Cursor keys to scroll, RETURN or q to exit"
.LC38:
	.string	"RETURN or q to exit"
	.text
	.globl	list_tracks
	.type	list_tracks, @function
list_tracks:
.LFB19:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1088
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -1076[rbp], 0
	mov	DWORD PTR -1072[rbp], 0
	mov	DWORD PTR -1064[rbp], 0
	movzx	eax, BYTE PTR current_cd[rip]
	test	al, al
	jne	.L92
	mov	rax, QWORD PTR stdout[rip]
	mov	rcx, rax
	lea	rdx, .LC35[rip]
	mov	esi, 0
	mov	edi, 22
	mov	eax, 0
	call	mvprintw@PLT
	call	get_return
	jmp	.L91
.L92:
	call	clear_all_screen
	lea	rdi, current_cat[rip]
	call	strlen@PLT
	mov	DWORD PTR -1060[rbp], eax
	mov	rax, QWORD PTR tracks_file[rip]
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -1056[rbp], rax
	cmp	QWORD PTR -1056[rbp], 0
	je	.L110
	jmp	.L95
.L96:
	mov	eax, DWORD PTR -1060[rbp]
	movsx	rdx, eax
	lea	rax, -1040[rbp]
	mov	rsi, rax
	lea	rdi, current_cat[rip]
	call	strncmp@PLT
	test	eax, eax
	jne	.L95
	add	DWORD PTR -1072[rbp], 1
.L95:
	mov	rdx, QWORD PTR -1056[rbp]
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L96
	mov	rax, QWORD PTR -1056[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR -1072[rbp]
	add	eax, 12
	mov	esi, 61
	mov	edi, eax
	call	newpad@PLT
	mov	QWORD PTR -1048[rbp], rax
	cmp	QWORD PTR -1048[rbp], 0
	je	.L111
	mov	rax, QWORD PTR tracks_file[rip]
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -1056[rbp], rax
	cmp	QWORD PTR -1056[rbp], 0
	je	.L112
	lea	rdx, .LC36[rip]
	mov	esi, 0
	mov	edi, 4
	mov	eax, 0
	call	mvprintw@PLT
	jmp	.L99
.L100:
	mov	eax, DWORD PTR -1060[rbp]
	movsx	rdx, eax
	lea	rax, -1040[rbp]
	mov	rsi, rax
	lea	rdi, current_cat[rip]
	call	strncmp@PLT
	test	eax, eax
	jne	.L99
	mov	eax, DWORD PTR -1060[rbp]
	cdqe
	lea	rdx, 1[rax]
	lea	rax, -1040[rbp]
	lea	rcx, [rax+rdx]
	mov	eax, DWORD PTR -1076[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -1076[rbp], edx
	mov	rdi, QWORD PTR -1048[rbp]
	mov	r8, rcx
	lea	rcx, .LC11[rip]
	mov	edx, 0
	mov	esi, eax
	mov	eax, 0
	call	mvwprintw@PLT
.L99:
	mov	rdx, QWORD PTR -1056[rbp]
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L100
	mov	rax, QWORD PTR -1056[rbp]
	mov	rdi, rax
	call	fclose@PLT
	cmp	DWORD PTR -1076[rbp], 11
	jle	.L101
	lea	rdx, .LC37[rip]
	mov	esi, 0
	mov	edi, 6
	mov	eax, 0
	call	mvprintw@PLT
	jmp	.L102
.L101:
	lea	rdx, .LC38[rip]
	mov	esi, 0
	mov	edi, 6
	mov	eax, 0
	call	mvprintw@PLT
.L102:
	mov	rax, QWORD PTR stdscr[rip]
	mov	rdi, rax
	call	wrefresh@PLT
	mov	rax, QWORD PTR stdscr[rip]
	mov	esi, 1
	mov	rdi, rax
	call	keypad@PLT
	call	cbreak@PLT
	call	noecho@PLT
	mov	DWORD PTR -1068[rbp], 0
	jmp	.L103
.L107:
	cmp	DWORD PTR -1068[rbp], 259
	jne	.L104
	cmp	DWORD PTR -1064[rbp], 0
	jle	.L104
	sub	DWORD PTR -1064[rbp], 1
.L104:
	cmp	DWORD PTR -1068[rbp], 258
	jne	.L105
	mov	eax, DWORD PTR -1064[rbp]
	add	eax, 12
	cmp	DWORD PTR -1072[rbp], eax
	jle	.L105
	add	DWORD PTR -1064[rbp], 1
.L105:
	mov	esi, DWORD PTR -1064[rbp]
	mov	rax, QWORD PTR -1048[rbp]
	sub	rsp, 8
	push	62
	mov	r9d, 19
	mov	r8d, 2
	mov	ecx, 8
	mov	edx, 0
	mov	rdi, rax
	call	prefresh@PLT
	add	rsp, 16
	mov	rax, QWORD PTR stdscr[rip]
	mov	rdi, rax
	call	wgetch@PLT
	mov	DWORD PTR -1068[rbp], eax
.L103:
	cmp	DWORD PTR -1068[rbp], 113
	je	.L106
	cmp	DWORD PTR -1068[rbp], 343
	je	.L106
	cmp	DWORD PTR -1068[rbp], 10
	jne	.L107
.L106:
	mov	rax, QWORD PTR -1048[rbp]
	mov	rdi, rax
	call	delwin@PLT
	mov	rax, QWORD PTR stdscr[rip]
	mov	esi, 0
	mov	rdi, rax
	call	keypad@PLT
	call	nocbreak@PLT
	call	echo@PLT
	jmp	.L91
.L110:
	nop
	jmp	.L91
.L111:
	nop
	jmp	.L91
.L112:
	nop
.L91:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L109
	call	__stack_chk_fail@PLT
.L109:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	list_tracks, .-list_tracks
	.section	.rodata
.LC39:
	.string	"Re-entering tracks for CD. "
.LC40:
	.string	"Enter a blank line to finish"
.LC41:
	.string	"Track %d: "
.LC42:
	.string	"%s,%d,%s\n"
	.text
	.globl	update_cd
	.type	update_cd, @function
update_cd:
.LFB20:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 144
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -132[rbp], 1
	mov	DWORD PTR -128[rbp], 1
	call	clear_all_screen
	lea	rdx, .LC39[rip]
	mov	esi, 0
	mov	edi, 18
	mov	eax, 0
	call	mvprintw@PLT
	call	get_confirm
	test	eax, eax
	je	.L126
	mov	rax, QWORD PTR stdscr[rip]
	mov	edx, 0
	mov	esi, 18
	mov	rdi, rax
	call	wmove@PLT
	mov	rax, QWORD PTR stdscr[rip]
	mov	rdi, rax
	call	wclrtoeol@PLT
	call	remove_tracks
	lea	rdx, .LC40[rip]
	mov	esi, 0
	mov	edi, 6
	mov	eax, 0
	call	mvprintw@PLT
	mov	rax, QWORD PTR tracks_file[rip]
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -120[rbp], rax
	mov	rax, QWORD PTR stdscr[rip]
	mov	r8d, 1
	mov	ecx, 7
	mov	edx, 62
	mov	esi, 13
	mov	rdi, rax
	call	subwin@PLT
	mov	QWORD PTR -112[rbp], rax
	cmp	QWORD PTR -112[rbp], 0
	je	.L127
	mov	edi, DWORD PTR acs_map[rip+452]
	mov	ecx, DWORD PTR acs_map[rip+452]
	mov	edx, DWORD PTR acs_map[rip+480]
	mov	esi, DWORD PTR acs_map[rip+480]
	mov	rax, QWORD PTR -112[rbp]
	sub	rsp, 8
	push	0
	push	0
	push	0
	mov	r9d, 0
	mov	r8d, edi
	mov	rdi, rax
	call	wborder@PLT
	add	rsp, 32
	mov	rax, QWORD PTR stdscr[rip]
	mov	r8d, 2
	mov	ecx, 8
	mov	edx, 60
	mov	esi, 11
	mov	rdi, rax
	call	subwin@PLT
	mov	QWORD PTR -104[rbp], rax
	cmp	QWORD PTR -104[rbp], 0
	je	.L128
	mov	rax, QWORD PTR -104[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	scrollok@PLT
	mov	rax, QWORD PTR -104[rbp]
	mov	rdi, rax
	call	werase@PLT
	mov	rax, QWORD PTR stdscr[rip]
	test	rax, rax
	je	.L118
	mov	rax, QWORD PTR stdscr[rip]
	movzx	eax, WORD PTR 4[rax]
	cwde
	lea	edx, 1[rax]
	jmp	.L119
.L118:
	mov	edx, -1
.L119:
	mov	rax, QWORD PTR stdscr[rip]
	mov	ecx, 1
	mov	esi, 0
	mov	rdi, rax
	call	wtouchln@PLT
.L123:
	mov	eax, DWORD PTR -128[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -128[rbp], edx
	mov	edx, DWORD PTR -132[rbp]
	mov	rdi, QWORD PTR -104[rbp]
	mov	r8d, edx
	lea	rcx, .LC41[rip]
	mov	edx, 4
	mov	esi, eax
	mov	eax, 0
	call	mvwprintw@PLT
	mov	rax, QWORD PTR stdscr[rip]
	mov	rdi, rax
	call	wclrtoeol@PLT
	mov	rax, QWORD PTR stdscr[rip]
	mov	rdi, rax
	call	wrefresh@PLT
	lea	rcx, -96[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, 80
	mov	rsi, rcx
	mov	rdi, rax
	call	wgetnstr@PLT
	lea	rax, -96[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -124[rbp], eax
	cmp	DWORD PTR -124[rbp], 0
	jle	.L120
	mov	eax, DWORD PTR -124[rbp]
	sub	eax, 1
	cdqe
	movzx	eax, BYTE PTR -96[rbp+rax]
	cmp	al, 10
	jne	.L120
	mov	eax, DWORD PTR -124[rbp]
	sub	eax, 1
	cdqe
	mov	BYTE PTR -96[rbp+rax], 0
.L120:
	movzx	eax, BYTE PTR -96[rbp]
	test	al, al
	je	.L121
	lea	rcx, -96[rbp]
	mov	edx, DWORD PTR -132[rbp]
	mov	rax, QWORD PTR -120[rbp]
	mov	r8, rcx
	mov	ecx, edx
	lea	rdx, current_cat[rip]
	lea	rsi, .LC42[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L121:
	add	DWORD PTR -132[rbp], 1
	cmp	DWORD PTR -128[rbp], 10
	jle	.L122
	mov	rax, QWORD PTR -104[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	wscrl@PLT
	sub	DWORD PTR -128[rbp], 1
.L122:
	movzx	eax, BYTE PTR -96[rbp]
	test	al, al
	jne	.L123
	mov	rax, QWORD PTR -104[rbp]
	mov	rdi, rax
	call	delwin@PLT
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	fclose@PLT
	jmp	.L113
.L126:
	nop
	jmp	.L113
.L127:
	nop
	jmp	.L113
.L128:
	nop
.L113:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L125
	call	__stack_chk_fail@PLT
.L125:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	update_cd, .-update_cd
	.local	selected_row.0
	.comm	selected_row.0,4,4
	.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	"16210.c"
	.text
	.local	current_cd
	.comm	current_cd,80,4
	.local	current_cat
	.comm	current_cat,80,4
	.global	title_file
	.section	.rodata
	.align	2
.LC0:
	.ascii	"title.cdb\000"
	.data
	.align	2
	.type	title_file, %object
	.size	title_file, 4
title_file:
	.word	.LC0
	.global	tracks_file
	.section	.rodata
	.align	2
.LC1:
	.ascii	"tracks.cdb\000"
	.data
	.align	2
	.type	tracks_file, %object
	.size	tracks_file, 4
tracks_file:
	.word	.LC1
	.global	temp_file
	.section	.rodata
	.align	2
.LC2:
	.ascii	"cdb.tmp\000"
	.data
	.align	2
	.type	temp_file, %object
	.size	temp_file, 4
temp_file:
	.word	.LC2
	.global	main_menu
	.section	.rodata
	.align	2
.LC3:
	.ascii	"aadd new CD\000"
	.align	2
.LC4:
	.ascii	"ffind CD\000"
	.align	2
.LC5:
	.ascii	"ccount CDs and tracks in the catalog\000"
	.align	2
.LC6:
	.ascii	"qquit\000"
	.data
	.align	2
	.type	main_menu, %object
	.size	main_menu, 20
main_menu:
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	0
	.global	extended_menu
	.section	.rodata
	.align	2
.LC7:
	.ascii	"llist tracks on current CD\000"
	.align	2
.LC8:
	.ascii	"rremove current CD\000"
	.align	2
.LC9:
	.ascii	"uupdate track information\000"
	.data
	.align	2
	.type	extended_menu, %object
	.size	extended_menu, 32
extended_menu:
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC6
	.word	0
	.section	.rodata
	.align	2
.LC10:
	.ascii	"Options:\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	bl	initscr
.L13:
	ldr	r3, .L14
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L2
	ldr	r3, .L14+4
	b	.L3
.L2:
	ldr	r3, .L14+8
.L3:
	mov	r1, r3
	ldr	r0, .L14+12
	bl	getchoice
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	sub	r3, r3, #97
	cmp	r3, #20
	ldrls	pc, [pc, r3, asl #2]
	b	.L4
.L6:
	.word	.L12
	.word	.L4
	.word	.L11
	.word	.L4
	.word	.L4
	.word	.L10
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L9
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L7
	.word	.L4
	.word	.L4
	.word	.L5
.L12:
	bl	add_record
	b	.L4
.L11:
	bl	count_cds
	b	.L4
.L10:
	bl	find_cd
	b	.L4
.L9:
	bl	list_tracks
	b	.L4
.L7:
	bl	remove_cd
	b	.L4
.L5:
	bl	update_cd
	nop
.L4:
	ldr	r3, [fp, #-8]
	cmp	r3, #113
	bne	.L13
	bl	endwin
	mov	r0, #0
	bl	exit
.L15:
	.align	2
.L14:
	.word	current_cd
	.word	extended_menu
	.word	main_menu
	.word	.LC10
	.size	main, .-main
	.align	2
	.global	getchoice
	.syntax unified
	.arm
	.fpu softvfp
	.type	getchoice, %function
getchoice:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-28]
	mov	r3, #6
	str	r3, [fp, #-12]
	mov	r3, #10
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-24]
	b	.L17
.L18:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-24]
	add	r3, r3, #4
	str	r3, [fp, #-24]
.L17:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L18
	ldr	r3, .L29
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bgt	.L19
	ldr	r3, .L29
	mov	r2, #0
	str	r2, [r3]
.L19:
	bl	clear_all_screen
	ldr	r3, [fp, #-12]
	sub	r3, r3, #2
	ldr	r2, [fp, #-32]
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	mvprintw
	ldr	r3, .L29+4
	ldr	r3, [r3]
	mov	r1, #1
	mov	r0, r3
	bl	keypad
	bl	cbreak
	bl	noecho
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L20
.L26:
	ldr	r3, [fp, #-16]
	ldr	r2, .L29+8
	cmp	r3, r2
	bne	.L21
	ldr	r3, .L29
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L22
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	ldr	r2, .L29
	str	r3, [r2]
	b	.L21
.L22:
	ldr	r3, .L29
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L29
	str	r3, [r2]
.L21:
	ldr	r3, [fp, #-16]
	ldr	r2, .L29+12
	cmp	r3, r2
	bne	.L23
	ldr	r3, [fp, #-28]
	sub	r2, r3, #1
	ldr	r3, .L29
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L24
	ldr	r3, .L29
	mov	r2, #0
	str	r2, [r3]
	b	.L23
.L24:
	ldr	r3, .L29
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L29
	str	r3, [r2]
.L23:
	ldr	r3, .L29
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-20]
	ldr	r3, .L29
	ldr	r1, [r3]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	ldr	r0, [fp, #-36]
	bl	draw_menu
	ldr	r3, .L29+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	wgetch
	str	r0, [fp, #-16]
.L20:
	ldr	r3, [fp, #-16]
	cmp	r3, #113
	beq	.L25
	ldr	r3, [fp, #-16]
	ldr	r2, .L29+16
	cmp	r3, r2
	beq	.L25
	ldr	r3, [fp, #-16]
	cmp	r3, #10
	bne	.L26
.L25:
	ldr	r3, .L29+4
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	keypad
	bl	nocbreak
	bl	echo
	ldr	r3, [fp, #-16]
	cmp	r3, #113
	bne	.L27
	mov	r3, #113
	str	r3, [fp, #-20]
.L27:
	ldr	r3, [fp, #-20]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	selected_row.7409
	.word	stdscr
	.word	259
	.word	258
	.word	343
	.size	getchoice, .-getchoice
	.section	.rodata
	.align	2
.LC11:
	.ascii	"%s\000"
	.align	2
.LC12:
	.ascii	"Move highlight then press Return \000"
	.text
	.align	2
	.global	draw_menu
	.syntax unified
	.arm
	.fpu softvfp
	.type	draw_menu, %function
draw_menu:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-12]
	b	.L32
.L35:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	bne	.L33
	ldr	r3, .L36
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #65536
	mov	r0, r3
	bl	wattr_on
.L33:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-16]
	add	r0, r2, r3
	ldr	r3, [fp, #-8]
	ldr	r2, .L36+4
	ldr	r1, [fp, #-36]
	bl	mvprintw
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	bne	.L34
	ldr	r3, .L36
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #65536
	mov	r0, r3
	bl	wattr_off
.L34:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	str	r3, [fp, #-12]
.L32:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L35
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	add	r3, r3, #3
	ldr	r2, .L36+8
	ldr	r1, [fp, #-36]
	mov	r0, r3
	bl	mvprintw
	ldr	r3, .L36
	ldr	r3, [r3]
	mov	r0, r3
	bl	wrefresh
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L37:
	.align	2
.L36:
	.word	stdscr
	.word	.LC11
	.word	.LC12
	.size	draw_menu, .-draw_menu
	.section	.rodata
	.align	2
.LC13:
	.ascii	"CD Database Application\000"
	.align	2
.LC14:
	.ascii	"Current CD: %s: %s\012\000"
	.text
	.align	2
	.global	clear_all_screen
	.syntax unified
	.arm
	.fpu softvfp
	.type	clear_all_screen, %function
clear_all_screen:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L40
	ldr	r3, [r3]
	mov	r0, r3
	bl	wclear
	ldr	r3, .L40+4
	ldr	r2, .L40+8
	mov	r1, #20
	mov	r0, #2
	bl	mvprintw
	ldr	r3, .L40+12
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L39
	ldr	r3, .L40+12
	str	r3, [sp]
	ldr	r3, .L40+16
	ldr	r2, .L40+20
	mov	r1, #0
	mov	r0, #22
	bl	mvprintw
.L39:
	ldr	r3, .L40
	ldr	r3, [r3]
	mov	r0, r3
	bl	wrefresh
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L41:
	.align	2
.L40:
	.word	stdscr
	.word	.LC13
	.word	.LC11
	.word	current_cd
	.word	current_cat
	.word	.LC14
	.size	clear_all_screen, .-clear_all_screen
	.section	.rodata
	.align	2
.LC15:
	.ascii	" Press return \000"
	.text
	.align	2
	.global	get_return
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_return, %function
get_return:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L46
	ldr	r2, .L46+4
	mov	r1, #0
	mov	r0, #23
	bl	mvprintw
	ldr	r3, .L46+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	wrefresh
	nop
.L44:
	bl	getchar
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #10
	beq	.L45
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L44
.L45:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L47:
	.align	2
.L46:
	.word	.LC15
	.word	.LC11
	.word	stdscr
	.size	get_return, .-get_return
	.section	.rodata
	.align	2
.LC16:
	.ascii	"Are you sure? \000"
	.align	2
.LC17:
	.ascii	"    Cancelled\000"
	.text
	.align	2
	.global	get_confirm
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_confirm, %function
get_confirm:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	str	r3, [fp, #-8]
	mov	r3, #78
	strb	r3, [fp, #-9]
	ldr	r2, .L53
	mov	r1, #5
	mov	r0, #20
	bl	mvprintw
	ldr	r3, .L53+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	wclrtoeol
	ldr	r3, .L53+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	wrefresh
	bl	cbreak
	ldr	r3, .L53+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	wgetch
	mov	r3, r0
	strb	r3, [fp, #-9]
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	cmp	r3, #89
	beq	.L49
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	cmp	r3, #121
	bne	.L50
.L49:
	mov	r3, #1
	str	r3, [fp, #-8]
.L50:
	bl	nocbreak
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L51
	ldr	r2, .L53+8
	mov	r1, #1
	mov	r0, #20
	bl	mvprintw
	ldr	r3, .L53+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	wclrtoeol
	ldr	r3, .L53+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	wrefresh
	mov	r0, #1
	bl	sleep
.L51:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L54:
	.align	2
.L53:
	.word	.LC16
	.word	stdscr
	.word	.LC17
	.size	get_confirm, .-get_confirm
	.section	.rodata
	.align	2
.LC18:
	.ascii	"a\000"
	.align	2
.LC19:
	.ascii	"cannot open CD titles database\000"
	.align	2
.LC20:
	.ascii	"%s\012\000"
	.text
	.align	2
	.global	insert_title
	.syntax unified
	.arm
	.fpu softvfp
	.type	insert_title, %function
insert_title:
	@ 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]
	ldr	r3, .L59
	ldr	r3, [r3]
	ldr	r1, .L59+4
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L56
	ldr	r2, .L59+8
	mov	r1, #0
	mov	r0, #22
	bl	mvprintw
	b	.L58
.L56:
	ldr	r2, [fp, #-16]
	ldr	r1, .L59+12
	ldr	r0, [fp, #-8]
	bl	fprintf
	ldr	r0, [fp, #-8]
	bl	fclose
.L58:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L60:
	.align	2
.L59:
	.word	title_file
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.size	insert_title, .-insert_title
	.align	2
	.global	get_string
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_string, %function
get_string:
	@ 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]
	ldr	r3, .L64
	ldr	r3, [r3]
	mov	r2, #80
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	wgetnstr
	ldr	r0, [fp, #-16]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	ble	.L63
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L63
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
.L63:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L65:
	.align	2
.L64:
	.word	stdscr
	.size	get_string, .-get_string
	.section	.rodata
	.align	2
.LC21:
	.ascii	"Enter new CD details\000"
	.align	2
.LC22:
	.ascii	"Catalog Number: \000"
	.align	2
.LC23:
	.ascii	"      CD Title: \000"
	.align	2
.LC24:
	.ascii	"       CD Type: \000"
	.align	2
.LC25:
	.ascii	"        Artist: \000"
	.align	2
.LC26:
	.ascii	"About to add this new entry:\000"
	.align	2
.LC27:
	.ascii	"%s,%s,%s,%s\000"
	.align	2
.LC28:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	add_record
	.syntax unified
	.arm
	.fpu softvfp
	.type	add_record, %function
add_record:
	@ args = 0, pretend = 0, frame = 416
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #424
	ldr	r3, .L70
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #6
	str	r3, [fp, #-416]
	mov	r3, #10
	str	r3, [fp, #-412]
	bl	clear_all_screen
	ldr	r2, .L70+4
	ldr	r1, [fp, #-412]
	ldr	r0, [fp, #-416]
	bl	mvprintw
	ldr	r3, [fp, #-416]
	add	r3, r3, #2
	str	r3, [fp, #-416]
	ldr	r2, .L70+8
	ldr	r1, [fp, #-412]
	ldr	r0, [fp, #-416]
	bl	mvprintw
	sub	r3, fp, #408
	mov	r0, r3
	bl	get_string
	ldr	r3, [fp, #-416]
	add	r3, r3, #1
	str	r3, [fp, #-416]
	ldr	r2, .L70+12
	ldr	r1, [fp, #-412]
	ldr	r0, [fp, #-416]
	bl	mvprintw
	sub	r3, fp, #328
	mov	r0, r3
	bl	get_string
	ldr	r3, [fp, #-416]
	add	r3, r3, #1
	str	r3, [fp, #-416]
	ldr	r2, .L70+16
	ldr	r1, [fp, #-412]
	ldr	r0, [fp, #-416]
	bl	mvprintw
	sub	r3, fp, #248
	mov	r0, r3
	bl	get_string
	ldr	r3, [fp, #-416]
	add	r3, r3, #1
	str	r3, [fp, #-416]
	ldr	r2, .L70+20
	ldr	r1, [fp, #-412]
	ldr	r0, [fp, #-416]
	bl	mvprintw
	sub	r3, fp, #168
	mov	r0, r3
	bl	get_string
	ldr	r3, [fp, #-416]
	add	r3, r3, #1
	str	r3, [fp, #-416]
	ldr	r2, .L70+24
	mov	r1, #5
	mov	r0, #15
	bl	mvprintw
	sub	r1, fp, #328
	sub	r2, fp, #408
	sub	r0, fp, #88
	sub	r3, fp, #168
	str	r3, [sp, #4]
	sub	r3, fp, #248
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L70+28
	bl	sprintf
	sub	r3, fp, #88
	ldr	r2, .L70+32
	mov	r1, #5
	mov	r0, #17
	bl	mvprintw
	ldr	r3, .L70+36
	ldr	r3, [r3]
	mov	r0, r3
	bl	wrefresh
	ldr	r3, .L70+36
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #18
	mov	r0, r3
	bl	wmove
	bl	get_confirm
	mov	r3, r0
	cmp	r3, #0
	beq	.L69
	sub	r3, fp, #88
	mov	r0, r3
	bl	insert_title
	sub	r3, fp, #328
	mov	r1, r3
	ldr	r0, .L70+40
	bl	strcpy
	sub	r3, fp, #408
	mov	r1, r3
	ldr	r0, .L70+44
	bl	strcpy
.L69:
	nop
	ldr	r3, .L70
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L68
	bl	__stack_chk_fail
.L68:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L71:
	.align	2
.L70:
	.word	.LC28
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.word	.LC27
	.word	.LC11
	.word	stdscr
	.word	current_cd
	.word	current_cat
	.size	add_record, .-add_record
	.section	.rodata
	.align	2
.LC29:
	.ascii	"r\000"
	.align	2
.LC30:
	.ascii	"Database contains %d titles, with a total of %d tra"
	.ascii	"cks.\000"
	.align	2
.LC31:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	count_cds
	.syntax unified
	.arm
	.fpu softvfp
	.type	count_cds, %function
count_cds:
	@ args = 0, pretend = 0, frame = 1048
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1056
	ldr	r3, .L80
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-1048]
	mov	r3, #0
	str	r3, [fp, #-1044]
	ldr	r3, .L80+4
	ldr	r3, [r3]
	ldr	r1, .L80+8
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-1040]
	ldr	r3, [fp, #-1040]
	cmp	r3, #0
	beq	.L73
	b	.L74
.L75:
	ldr	r3, [fp, #-1048]
	add	r3, r3, #1
	str	r3, [fp, #-1048]
.L74:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1040]
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L75
	ldr	r0, [fp, #-1040]
	bl	fclose
.L73:
	ldr	r3, .L80+12
	ldr	r3, [r3]
	ldr	r1, .L80+8
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-1036]
	ldr	r3, [fp, #-1036]
	cmp	r3, #0
	beq	.L76
	b	.L77
.L78:
	ldr	r3, [fp, #-1044]
	add	r3, r3, #1
	str	r3, [fp, #-1044]
.L77:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1036]
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L78
	ldr	r0, [fp, #-1036]
	bl	fclose
.L76:
	ldr	r3, [fp, #-1044]
	str	r3, [sp]
	ldr	r3, [fp, #-1048]
	ldr	r2, .L80+16
	mov	r1, #0
	mov	r0, #22
	bl	mvprintw
	bl	get_return
	nop
	ldr	r3, .L80
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L79
	bl	__stack_chk_fail
.L79:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L81:
	.align	2
.L80:
	.word	.LC31
	.word	title_file
	.word	.LC29
	.word	tracks_file
	.word	.LC30
	.size	count_cds, .-count_cds
	.section	.rodata
	.align	2
.LC32:
	.ascii	"Enter a string to search for in CD titles: \000"
	.align	2
.LC33:
	.ascii	"Sorry, no matching CD found. \000"
	.align	2
.LC34:
	.ascii	"Sorry, match is ambiguous: %d CDs found. \000"
	.align	2
.LC35:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	find_cd
	.syntax unified
	.arm
	.fpu softvfp
	.type	find_cd, %function
find_cd:
	@ args = 0, pretend = 0, frame = 1128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1120
	sub	sp, sp, #8
	ldr	r3, .L91
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-1132]
	ldr	r2, .L91+4
	mov	r1, #0
	mov	r0, #20
	bl	mvprintw
	sub	r3, fp, #1104
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	get_string
	ldr	r3, .L91+8
	ldr	r3, [r3]
	ldr	r1, .L91+12
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-1128]
	ldr	r3, [fp, #-1128]
	cmp	r3, #0
	beq	.L83
	b	.L84
.L85:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	str	r3, [fp, #-1124]
	mov	r1, #44
	ldr	r0, [fp, #-1124]
	bl	strchr
	str	r0, [fp, #-1120]
	ldr	r3, [fp, #-1120]
	cmp	r3, #0
	beq	.L84
	ldr	r3, [fp, #-1120]
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-1120]
	add	r3, r3, #1
	str	r3, [fp, #-1116]
	mov	r1, #44
	ldr	r0, [fp, #-1116]
	bl	strchr
	str	r0, [fp, #-1120]
	ldr	r3, [fp, #-1120]
	cmp	r3, #0
	beq	.L84
	ldr	r3, [fp, #-1120]
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #1104
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-1116]
	bl	strstr
	str	r0, [fp, #-1120]
	ldr	r3, [fp, #-1120]
	cmp	r3, #0
	beq	.L84
	ldr	r3, [fp, #-1132]
	add	r3, r3, #1
	str	r3, [fp, #-1132]
	ldr	r1, [fp, #-1116]
	ldr	r0, .L91+16
	bl	strcpy
	ldr	r1, [fp, #-1124]
	ldr	r0, .L91+20
	bl	strcpy
.L84:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1128]
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L85
	ldr	r0, [fp, #-1128]
	bl	fclose
.L83:
	ldr	r3, [fp, #-1132]
	cmp	r3, #1
	beq	.L90
	ldr	r3, [fp, #-1132]
	cmp	r3, #0
	bne	.L87
	ldr	r2, .L91+24
	mov	r1, #0
	mov	r0, #22
	bl	mvprintw
.L87:
	ldr	r3, [fp, #-1132]
	cmp	r3, #1
	ble	.L88
	ldr	r3, [fp, #-1132]
	ldr	r2, .L91+28
	mov	r1, #0
	mov	r0, #22
	bl	mvprintw
.L88:
	ldr	r3, .L91+16
	mov	r2, #0
	strb	r2, [r3]
	bl	get_return
.L90:
	nop
	ldr	r3, .L91
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L89
	bl	__stack_chk_fail
.L89:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L92:
	.align	2
.L91:
	.word	.LC35
	.word	.LC32
	.word	title_file
	.word	.LC29
	.word	current_cd
	.word	current_cat
	.word	.LC33
	.word	.LC34
	.size	find_cd, .-find_cd
	.section	.rodata
	.align	2
.LC36:
	.ascii	"w\000"
	.align	2
.LC37:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	remove_tracks
	.syntax unified
	.arm
	.fpu softvfp
	.type	remove_tracks, %function
remove_tracks:
	@ args = 0, pretend = 0, frame = 1048
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	sub	sp, sp, #8
	ldr	r3, .L103
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L103+4
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L101
	ldr	r0, .L103+8
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-1048]
	ldr	r3, .L103+12
	ldr	r3, [r3]
	ldr	r1, .L103+16
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-1044]
	ldr	r3, [fp, #-1044]
	cmp	r3, #0
	beq	.L102
	ldr	r3, .L103+20
	ldr	r3, [r3]
	ldr	r1, .L103+24
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-1040]
	b	.L97
.L98:
	ldr	r2, [fp, #-1048]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r1, r3
	ldr	r0, .L103+8
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L97
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #8
	ldr	r1, [fp, #-1040]
	mov	r0, r3
	bl	fputs
.L97:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #8
	ldr	r2, [fp, #-1044]
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L98
	ldr	r0, [fp, #-1044]
	bl	fclose
	ldr	r0, [fp, #-1040]
	bl	fclose
	ldr	r3, .L103+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	unlink
	ldr	r3, .L103+20
	ldr	r3, [r3]
	ldr	r2, .L103+12
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	rename
	b	.L93
.L101:
	nop
	b	.L93
.L102:
	nop
.L93:
	ldr	r3, .L103
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L100
	bl	__stack_chk_fail
.L100:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L104:
	.align	2
.L103:
	.word	.LC37
	.word	current_cd
	.word	current_cat
	.word	tracks_file
	.word	.LC29
	.word	temp_file
	.word	.LC36
	.size	remove_tracks, .-remove_tracks
	.section	.rodata
	.align	2
.LC38:
	.ascii	"About to remove CD %s: %s. \000"
	.align	2
.LC39:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	remove_cd
	.syntax unified
	.arm
	.fpu softvfp
	.type	remove_cd, %function
remove_cd:
	@ args = 0, pretend = 0, frame = 1040
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	sub	sp, sp, #8
	ldr	r3, .L115
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L115+4
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L113
	bl	clear_all_screen
	ldr	r3, .L115+4
	str	r3, [sp]
	ldr	r3, .L115+8
	ldr	r2, .L115+12
	mov	r1, #0
	mov	r0, #18
	bl	mvprintw
	bl	get_confirm
	mov	r3, r0
	cmp	r3, #0
	beq	.L114
	ldr	r0, .L115+8
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-1044]
	ldr	r3, .L115+16
	ldr	r3, [r3]
	ldr	r1, .L115+20
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-1040]
	ldr	r3, .L115+24
	ldr	r3, [r3]
	ldr	r1, .L115+28
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-1036]
	b	.L109
.L110:
	ldr	r2, [fp, #-1044]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L115+8
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L109
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, [fp, #-1036]
	mov	r0, r3
	bl	fputs
.L109:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1040]
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L110
	ldr	r0, [fp, #-1040]
	bl	fclose
	ldr	r0, [fp, #-1036]
	bl	fclose
	ldr	r3, .L115+16
	ldr	r3, [r3]
	mov	r0, r3
	bl	unlink
	ldr	r3, .L115+24
	ldr	r3, [r3]
	ldr	r2, .L115+16
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	rename
	bl	remove_tracks
	ldr	r3, .L115+4
	mov	r2, #0
	strb	r2, [r3]
	b	.L105
.L113:
	nop
	b	.L105
.L114:
	nop
.L105:
	ldr	r3, .L115
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L112
	bl	__stack_chk_fail
.L112:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L116:
	.align	2
.L115:
	.word	.LC39
	.word	current_cd
	.word	current_cat
	.word	.LC38
	.word	title_file
	.word	.LC29
	.word	temp_file
	.word	.LC36
	.size	remove_cd, .-remove_cd
	.section	.rodata
	.align	2
.LC40:
	.ascii	"You must select a CD first. \000"
	.align	2
.LC41:
	.ascii	"CD Track Listing\012\000"
	.align	2
.LC42:
	.ascii	"Cursor keys to scroll, RETURN or q to exit\000"
	.align	2
.LC43:
	.ascii	"RETURN or q to exit\000"
	.align	2
.LC44:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	list_tracks
	.syntax unified
	.arm
	.fpu softvfp
	.type	list_tracks, %function
list_tracks:
	@ args = 0, pretend = 0, frame = 1056
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1072
	ldr	r3, .L139
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-1060]
	mov	r3, #0
	str	r3, [fp, #-1056]
	mov	r3, #0
	str	r3, [fp, #-1048]
	ldr	r3, .L139+4
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L118
	ldr	r3, .L139+8
	ldr	r3, [r3]
	ldr	r2, .L139+12
	mov	r1, #0
	mov	r0, #22
	bl	mvprintw
	bl	get_return
	b	.L117
.L118:
	bl	clear_all_screen
	ldr	r0, .L139+16
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-1044]
	ldr	r3, .L139+20
	ldr	r3, [r3]
	ldr	r1, .L139+24
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-1040]
	ldr	r3, [fp, #-1040]
	cmp	r3, #0
	beq	.L136
	b	.L121
.L122:
	ldr	r2, [fp, #-1044]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L139+16
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L121
	ldr	r3, [fp, #-1056]
	add	r3, r3, #1
	str	r3, [fp, #-1056]
.L121:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1040]
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L122
	ldr	r0, [fp, #-1040]
	bl	fclose
	ldr	r3, [fp, #-1056]
	add	r3, r3, #12
	mov	r1, #61
	mov	r0, r3
	bl	newpad
	str	r0, [fp, #-1036]
	ldr	r3, [fp, #-1036]
	cmp	r3, #0
	beq	.L137
	ldr	r3, .L139+20
	ldr	r3, [r3]
	ldr	r1, .L139+24
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-1040]
	ldr	r3, [fp, #-1040]
	cmp	r3, #0
	beq	.L138
	ldr	r2, .L139+28
	mov	r1, #0
	mov	r0, #4
	bl	mvprintw
	b	.L125
.L126:
	ldr	r2, [fp, #-1044]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L139+16
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L125
	ldr	r1, [fp, #-1060]
	add	r3, r1, #1
	str	r3, [fp, #-1060]
	ldr	r3, [fp, #-1044]
	add	r2, r3, #1
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, r2
	str	r3, [sp]
	ldr	r3, .L139+32
	mov	r2, #0
	ldr	r0, [fp, #-1036]
	bl	mvwprintw
.L125:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1040]
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L126
	ldr	r0, [fp, #-1040]
	bl	fclose
	ldr	r3, [fp, #-1060]
	cmp	r3, #11
	ble	.L127
	ldr	r2, .L139+36
	mov	r1, #0
	mov	r0, #6
	bl	mvprintw
	b	.L128
.L127:
	ldr	r2, .L139+40
	mov	r1, #0
	mov	r0, #6
	bl	mvprintw
.L128:
	ldr	r3, .L139+44
	ldr	r3, [r3]
	mov	r0, r3
	bl	wrefresh
	ldr	r3, .L139+44
	ldr	r3, [r3]
	mov	r1, #1
	mov	r0, r3
	bl	keypad
	bl	cbreak
	bl	noecho
	mov	r3, #0
	str	r3, [fp, #-1052]
	b	.L129
.L133:
	ldr	r3, [fp, #-1052]
	ldr	r2, .L139+48
	cmp	r3, r2
	bne	.L130
	ldr	r3, [fp, #-1048]
	cmp	r3, #0
	ble	.L130
	ldr	r3, [fp, #-1048]
	sub	r3, r3, #1
	str	r3, [fp, #-1048]
.L130:
	ldr	r3, [fp, #-1052]
	ldr	r2, .L139+52
	cmp	r3, r2
	bne	.L131
	ldr	r3, [fp, #-1048]
	add	r3, r3, #12
	ldr	r2, [fp, #-1056]
	cmp	r2, r3
	ble	.L131
	ldr	r3, [fp, #-1048]
	add	r3, r3, #1
	str	r3, [fp, #-1048]
.L131:
	mov	r3, #62
	str	r3, [sp, #8]
	mov	r3, #19
	str	r3, [sp, #4]
	mov	r3, #2
	str	r3, [sp]
	mov	r3, #8
	mov	r2, #0
	ldr	r1, [fp, #-1048]
	ldr	r0, [fp, #-1036]
	bl	prefresh
	ldr	r3, .L139+44
	ldr	r3, [r3]
	mov	r0, r3
	bl	wgetch
	str	r0, [fp, #-1052]
.L129:
	ldr	r3, [fp, #-1052]
	cmp	r3, #113
	beq	.L132
	ldr	r3, [fp, #-1052]
	ldr	r2, .L139+56
	cmp	r3, r2
	beq	.L132
	ldr	r3, [fp, #-1052]
	cmp	r3, #10
	bne	.L133
.L132:
	ldr	r0, [fp, #-1036]
	bl	delwin
	ldr	r3, .L139+44
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	keypad
	bl	nocbreak
	bl	echo
	b	.L117
.L136:
	nop
	b	.L117
.L137:
	nop
	b	.L117
.L138:
	nop
.L117:
	ldr	r3, .L139
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L135
	bl	__stack_chk_fail
.L135:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L140:
	.align	2
.L139:
	.word	.LC44
	.word	current_cd
	.word	stdout
	.word	.LC40
	.word	current_cat
	.word	tracks_file
	.word	.LC29
	.word	.LC41
	.word	.LC11
	.word	.LC42
	.word	.LC43
	.word	stdscr
	.word	259
	.word	258
	.word	343
	.size	list_tracks, .-list_tracks
	.section	.rodata
	.align	2
.LC45:
	.ascii	"Re-entering tracks for CD. \000"
	.align	2
.LC46:
	.ascii	"Enter a blank line to finish\000"
	.align	2
.LC47:
	.ascii	"Track %d: \000"
	.align	2
.LC48:
	.ascii	"%s,%d,%s\012\000"
	.align	2
.LC49:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	update_cd
	.syntax unified
	.arm
	.fpu softvfp
	.type	update_cd, %function
update_cd:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #136
	ldr	r3, .L157
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-112]
	mov	r3, #1
	str	r3, [fp, #-108]
	bl	clear_all_screen
	ldr	r2, .L157+4
	mov	r1, #0
	mov	r0, #18
	bl	mvprintw
	bl	get_confirm
	mov	r3, r0
	cmp	r3, #0
	beq	.L154
	ldr	r3, .L157+8
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #18
	mov	r0, r3
	bl	wmove
	ldr	r3, .L157+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	wclrtoeol
	bl	remove_tracks
	ldr	r2, .L157+12
	mov	r1, #0
	mov	r0, #6
	bl	mvprintw
	ldr	r3, .L157+16
	ldr	r3, [r3]
	ldr	r1, .L157+20
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-104]
	ldr	r3, .L157+8
	ldr	r0, [r3]
	mov	r3, #1
	str	r3, [sp]
	mov	r3, #7
	mov	r2, #62
	mov	r1, #13
	bl	subwin
	str	r0, [fp, #-100]
	ldr	r3, [fp, #-100]
	cmp	r3, #0
	beq	.L155
	ldr	r3, .L157+24
	ldr	r1, [r3, #480]
	ldr	r3, .L157+24
	ldr	r2, [r3, #480]
	ldr	r3, .L157+24
	ldr	r0, [r3, #452]
	ldr	r3, .L157+24
	ldr	r3, [r3, #452]
	mov	ip, #0
	str	ip, [sp, #16]
	mov	ip, #0
	str	ip, [sp, #12]
	mov	ip, #0
	str	ip, [sp, #8]
	mov	ip, #0
	str	ip, [sp, #4]
	str	r3, [sp]
	mov	r3, r0
	ldr	r0, [fp, #-100]
	bl	wborder
	ldr	r3, .L157+8
	ldr	r0, [r3]
	mov	r3, #2
	str	r3, [sp]
	mov	r3, #8
	mov	r2, #60
	mov	r1, #11
	bl	subwin
	str	r0, [fp, #-96]
	ldr	r3, [fp, #-96]
	cmp	r3, #0
	beq	.L156
	mov	r1, #1
	ldr	r0, [fp, #-96]
	bl	scrollok
	ldr	r0, [fp, #-96]
	bl	werase
	ldr	r3, .L157+8
	ldr	r0, [r3]
	ldr	r3, .L157+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L146
	ldr	r3, .L157+8
	ldr	r3, [r3]
	ldrsh	r3, [r3, #4]
	add	r2, r3, #1
	b	.L147
.L146:
	mvn	r2, #0
.L147:
	mov	r3, #1
	mov	r1, #0
	bl	wtouchln
.L151:
	ldr	r1, [fp, #-108]
	add	r3, r1, #1
	str	r3, [fp, #-108]
	ldr	r3, [fp, #-112]
	str	r3, [sp]
	ldr	r3, .L157+28
	mov	r2, #4
	ldr	r0, [fp, #-96]
	bl	mvwprintw
	ldr	r3, .L157+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	wclrtoeol
	ldr	r3, .L157+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	wrefresh
	sub	r3, fp, #88
	mov	r2, #80
	mov	r1, r3
	ldr	r0, [fp, #-96]
	bl	wgetnstr
	sub	r3, fp, #88
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-92]
	ldr	r3, [fp, #-92]
	cmp	r3, #0
	ble	.L148
	ldr	r3, [fp, #-92]
	sub	r3, r3, #1
	sub	r2, fp, #4
	add	r3, r2, r3
	ldrb	r3, [r3, #-84]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L148
	ldr	r3, [fp, #-92]
	sub	r3, r3, #1
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3, #-84]
.L148:
	ldrb	r3, [fp, #-88]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L149
	sub	r3, fp, #88
	str	r3, [sp]
	ldr	r3, [fp, #-112]
	ldr	r2, .L157+32
	ldr	r1, .L157+36
	ldr	r0, [fp, #-104]
	bl	fprintf
.L149:
	ldr	r3, [fp, #-112]
	add	r3, r3, #1
	str	r3, [fp, #-112]
	ldr	r3, [fp, #-108]
	cmp	r3, #10
	ble	.L150
	mov	r1, #1
	ldr	r0, [fp, #-96]
	bl	wscrl
	ldr	r3, [fp, #-108]
	sub	r3, r3, #1
	str	r3, [fp, #-108]
.L150:
	ldrb	r3, [fp, #-88]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L151
	ldr	r0, [fp, #-96]
	bl	delwin
	ldr	r0, [fp, #-104]
	bl	fclose
	b	.L141
.L154:
	nop
	b	.L141
.L155:
	nop
	b	.L141
.L156:
	nop
.L141:
	ldr	r3, .L157
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L153
	bl	__stack_chk_fail
.L153:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L158:
	.align	2
.L157:
	.word	.LC49
	.word	.LC45
	.word	stdscr
	.word	.LC46
	.word	tracks_file
	.word	.LC18
	.word	acs_map
	.word	.LC47
	.word	current_cat
	.word	.LC48
	.size	update_cd, .-update_cd
	.local	selected_row.7409
	.comm	selected_row.7409,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
