	.file	"658382.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%ld\n"
	.align 8
.LC1:
	.string	"\nminimOS disk image manager v0.2"
	.align 8
.LC2:
	.string	"\n==============================="
.LC3:
	.string	"How many kiB? "
.LC4:
	.string	"%ld"
.LC5:
	.string	"Volume name: "
.LC6:
	.string	"%s"
	.align 8
.LC7:
	.string	"*** Error: not enough memory ***"
.LC8:
	.string	"Image file: "
.LC9:
	.string	"*** Error: no such file ***"
.LC10:
	.string	"Loaded %ld bytes\n"
.LC11:
	.string	"Volume name: %s\n"
	.align 8
.LC12:
	.string	"*** Error: no image in use ***"
.LC13:
	.string	"Save to image file: "
	.align 8
.LC14:
	.string	"*** Error: couldn't save image ***"
	.align 8
.LC15:
	.string	"*** Error: no image to save ***"
.LC16:
	.string	"File to insert: "
	.align 8
.LC17:
	.string	"Delete from image, which file? "
	.align 8
.LC18:
	.string	"Extract from image, which file? "
	.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, 672
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 520
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	QWORD PTR -656[rbp], 0
	mov	QWORD PTR -648[rbp], 0
	mov	BYTE PTR -640[rbp], 0
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
.L20:
	call	menu
	mov	DWORD PTR -672[rbp], eax
	cmp	DWORD PTR -672[rbp], 7
	ja	.L2
	mov	eax, DWORD PTR -672[rbp]
	lea	rdx, 0[0+rax*4]
	lea	rax, .L4[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L4[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L4:
	.long	.L11-.L4
	.long	.L10-.L4
	.long	.L9-.L4
	.long	.L8-.L4
	.long	.L7-.L4
	.long	.L6-.L4
	.long	.L5-.L4
	.long	.L3-.L4
	.text
.L10:
	lea	rax, -656[rbp]
	mov	rdi, rax
	call	discard
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -664[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -96[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rax, QWORD PTR -664[rbp]
	sal	rax, 10
	mov	rcx, rax
	lea	rdx, -96[rbp]
	lea	rax, -656[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	create
	test	eax, eax
	je	.L23
	lea	rdi, .LC7[rip]
	call	puts@PLT
	jmp	.L23
.L9:
	lea	rax, -656[rbp]
	mov	rdi, rax
	call	discard
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -96[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdx, -96[rbp]
	lea	rax, -656[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	open
	mov	DWORD PTR -668[rbp], eax
	cmp	DWORD PTR -668[rbp], -1
	jne	.L13
	lea	rdi, .LC9[rip]
	call	puts@PLT
	jmp	.L2
.L13:
	cmp	DWORD PTR -668[rbp], -2
	jne	.L15
	lea	rdi, .LC7[rip]
	call	puts@PLT
	jmp	.L2
.L15:
	mov	rax, QWORD PTR -648[rbp]
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -656[rbp]
	add	rax, 8
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L2
.L8:
	lea	rax, -656[rbp]
	mov	rdi, rax
	call	dir
	test	eax, eax
	je	.L24
	lea	rdi, .LC12[rip]
	call	puts@PLT
	jmp	.L24
.L7:
	mov	rax, QWORD PTR -656[rbp]
	test	rax, rax
	je	.L17
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -96[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdx, -96[rbp]
	lea	rax, -656[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	close
	mov	DWORD PTR -668[rbp], eax
	cmp	DWORD PTR -668[rbp], -3
	jne	.L18
	lea	rdi, .LC14[rip]
	call	puts@PLT
	jmp	.L2
.L18:
	mov	rax, QWORD PTR -656[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR -656[rbp], 0
	mov	QWORD PTR -648[rbp], 0
	jmp	.L2
.L17:
	lea	rdi, .LC15[rip]
	call	puts@PLT
	jmp	.L2
.L6:
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -96[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdx, -96[rbp]
	lea	rax, -656[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	insert
	mov	DWORD PTR -668[rbp], eax
	jmp	.L2
.L5:
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -96[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdx, -96[rbp]
	lea	rax, -656[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	delete
	mov	DWORD PTR -668[rbp], eax
	jmp	.L2
.L3:
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -96[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdx, -96[rbp]
	lea	rax, -656[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	extract
	mov	DWORD PTR -668[rbp], eax
	jmp	.L2
.L11:
	movzx	eax, BYTE PTR -640[rbp]
	test	al, al
	je	.L2
	lea	rax, -656[rbp]
	mov	rdi, rax
	call	discard
	mov	DWORD PTR -672[rbp], eax
	jmp	.L2
.L23:
	nop
	jmp	.L2
.L24:
	nop
.L2:
	cmp	DWORD PTR -672[rbp], 0
	jne	.L20
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC19:
	.string	"\n1.Create image"
.LC20:
	.string	"2.Open image"
.LC21:
	.string	"3.Show image contents"
.LC22:
	.string	"4.Close image"
.LC23:
	.string	"5.Insert file"
.LC24:
	.string	"6.Delete file"
.LC25:
	.string	"7.Extract file"
.LC26:
	.string	"\n0.EXIT\n"
.LC27:
	.string	"%d"
	.text
	.globl	menu
	.type	menu, @function
menu:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -12[rbp], -1
	lea	rdi, .LC19[rip]
	call	puts@PLT
	lea	rdi, .LC20[rip]
	call	puts@PLT
	lea	rdi, .LC21[rip]
	call	puts@PLT
	lea	rdi, .LC22[rip]
	call	puts@PLT
	lea	rdi, .LC23[rip]
	call	puts@PLT
	lea	rdi, .LC24[rip]
	call	puts@PLT
	lea	rdi, .LC25[rip]
	call	puts@PLT
	lea	rdi, .LC26[rip]
	call	puts@PLT
	jmp	.L26
.L27:
	mov	edi, 62
	call	putchar@PLT
	lea	rax, -12[rbp]
	mov	rsi, rax
	lea	rdi, .LC27[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
.L26:
	mov	eax, DWORD PTR -12[rbp]
	test	eax, eax
	js	.L27
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, 7
	jg	.L27
	mov	eax, DWORD PTR -12[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	menu, .-menu
	.globl	create
	.type	create, @function
create:
.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, 576
	mov	QWORD PTR -552[rbp], rdi
	mov	QWORD PTR -560[rbp], rsi
	mov	QWORD PTR -568[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -532[rbp], 0
	mov	rax, QWORD PTR -560[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -552[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -552[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L31
	mov	eax, -2
	jmp	.L33
.L31:
	mov	rax, QWORD PTR -552[rbp]
	mov	rdx, QWORD PTR -560[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -552[rbp]
	mov	BYTE PTR 16[rax], 1
	mov	WORD PTR -528[rbp], 22113
	mov	DWORD PTR -526[rbp], 707406378
	mov	rax, QWORD PTR -568[rbp]
	lea	rdx, -528[rbp]
	add	rdx, 6
	mov	rsi, rax
	mov	rdi, rdx
	call	strcpy@PLT
	mov	BYTE PTR -282[rbp], 0
	mov	rax, QWORD PTR -552[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, -528[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	w_sector
	mov	eax, 0
.L33:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	create, .-create
	.section	.rodata
.LC28:
	.string	"rb"
.LC29:
	.string	""
	.string	""
	.text
	.globl	open
	.type	open, @function
open:
.LFB9:
	.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	rax, QWORD PTR -48[rbp]
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L36
	mov	eax, -1
	jmp	.L37
.L36:
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	rewind@PLT
	mov	rcx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, .LC29[rip]
	mov	rsi, rcx
	mov	rdi, rax
	call	create
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	je	.L38
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR -20[rbp]
	jmp	.L37
.L38:
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rcx, QWORD PTR -16[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	BYTE PTR 16[rax], 1
	mov	eax, 0
.L37:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	open, .-open
	.section	.rodata
.LC30:
	.string	"Volume: %s\n"
	.text
	.globl	dir
	.type	dir, @function
dir:
.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
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 8
	mov	rsi, rax
	lea	rdi, .LC30[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	dir, .-dir
	.section	.rodata
	.align 8
.LC31:
	.string	"-- File exists. Overwrite? (y/n): "
.LC32:
	.string	"wb"
	.text
	.globl	close
	.type	close, @function
close:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	add	rsp, -128
	mov	QWORD PTR -120[rbp], rdi
	mov	QWORD PTR -128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -128[rbp]
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -104[rbp], rax
	mov	rax, QWORD PTR -104[rbp]
	mov	rdi, rax
	call	fclose@PLT
	cmp	QWORD PTR -104[rbp], 0
	je	.L42
	lea	rdi, .LC31[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -96[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	movzx	eax, BYTE PTR -96[rbp]
	or	eax, 32
	cmp	al, 121
	je	.L42
	mov	eax, -3
	jmp	.L45
.L42:
	mov	rax, QWORD PTR -128[rbp]
	lea	rsi, .LC32[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -104[rbp], rax
	cmp	QWORD PTR -104[rbp], 0
	jne	.L44
	mov	eax, -3
	jmp	.L45
.L44:
	mov	rax, QWORD PTR -120[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rsi, rax
	mov	rax, QWORD PTR -120[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -104[rbp]
	mov	rcx, rdx
	mov	rdx, rsi
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	rax, QWORD PTR -104[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -120[rbp]
	mov	BYTE PTR 16[rax], 0
	mov	eax, 0
.L45:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L46
	call	__stack_chk_fail@PLT
.L46:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	close, .-close
	.globl	insert
	.type	insert, @function
insert:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L48
	mov	eax, -5
	jmp	.L49
.L48:
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR 16[rax], 1
	mov	eax, 0
.L49:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	insert, .-insert
	.globl	delete
	.type	delete, @function
delete:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L51
	mov	eax, -6
	jmp	.L52
.L51:
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR 16[rax], 1
	mov	eax, 0
.L52:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	delete, .-delete
	.globl	extract
	.type	extract, @function
extract:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L54
	mov	eax, -6
	jmp	.L55
.L54:
	mov	eax, 0
.L55:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	extract, .-extract
	.section	.rodata
	.align 8
.LC33:
	.string	"-- Image in use. Discard? (y/n): "
	.text
	.globl	discard
	.type	discard, @function
discard:
.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, 112
	mov	QWORD PTR -104[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L57
	lea	rdi, .LC33[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -96[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	movzx	eax, BYTE PTR -96[rbp]
	or	eax, 32
	cmp	al, 121
	jne	.L57
	mov	rax, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -104[rbp]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR -104[rbp]
	mov	BYTE PTR 16[rax], 0
	mov	eax, 0
	jmp	.L59
.L57:
	mov	eax, -4
.L59:
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L60
	call	__stack_chk_fail@PLT
.L60:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	discard, .-discard
	.globl	w_sector
	.type	w_sector, @function
w_sector:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 7
	mov	BYTE PTR [rax], 13
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	add	rdx, 1
	movzx	eax, WORD PTR [rax]
	mov	WORD PTR [rdx], ax
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 2
	mov	rdx, QWORD PTR -40[rbp]
	add	rdx, 3
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
	nop
.L62:
	mov	eax, DWORD PTR -16[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -16[rbp], edx
	mov	rdx, QWORD PTR -48[rbp]
	cdqe
	movzx	eax, BYTE PTR 6[rdx+rax]
	test	al, al
	jne	.L62
	nop
.L63:
	mov	eax, DWORD PTR -12[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -12[rbp], edx
	mov	rdx, QWORD PTR -48[rbp]
	cdqe
	movzx	eax, BYTE PTR 246[rdx+rax]
	test	al, al
	jne	.L63
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -12[rbp]
	add	eax, edx
	cmp	eax, 240
	jle	.L64
	mov	eax, 239
	sub	eax, DWORD PTR -16[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	cdqe
	mov	BYTE PTR 246[rdx+rax], 0
.L64:
	mov	rax, QWORD PTR -48[rbp]
	lea	rdx, 6[rax]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 8
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -48[rbp]
	lea	rdx, 246[rax]
	mov	eax, DWORD PTR -16[rbp]
	add	eax, 8
	movsx	rcx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rcx
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR 500[rax]
	sal	eax, 11
	mov	DWORD PTR -24[rbp], eax
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR 504[rax]
	sal	eax, 5
	mov	edx, eax
	mov	eax, DWORD PTR -24[rbp]
	or	eax, edx
	mov	DWORD PTR -24[rbp], eax
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR 508[rax]
	sar	eax
	mov	edx, eax
	mov	eax, DWORD PTR -24[rbp]
	or	eax, edx
	mov	DWORD PTR -24[rbp], eax
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR 488[rax]
	sub	eax, 1980
	sal	eax, 9
	mov	DWORD PTR -20[rbp], eax
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR 492[rax]
	sal	eax, 5
	mov	edx, eax
	mov	eax, DWORD PTR -20[rbp]
	or	eax, edx
	mov	DWORD PTR -20[rbp], eax
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR 496[rax]
	mov	edx, eax
	mov	eax, DWORD PTR -20[rbp]
	or	eax, edx
	mov	DWORD PTR -20[rbp], eax
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 248[rax]
	movzx	eax, WORD PTR -24[rbp]
	mov	WORD PTR [rdx], ax
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 250[rax]
	movzx	eax, WORD PTR -20[rbp]
	mov	WORD PTR [rdx], ax
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L66
	call	__stack_chk_fail@PLT
.L66:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	w_sector, .-w_sector
	.globl	r_sector
	.type	r_sector, @function
r_sector:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -12[rbp], 0
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L68
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 7
	movzx	eax, BYTE PTR [rax]
	cmp	al, 13
	je	.L69
.L68:
	mov	eax, -7
	jmp	.L72
.L69:
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 8[rax]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 6
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	nop
.L71:
	mov	eax, DWORD PTR -12[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -12[rbp], edx
	mov	rdx, QWORD PTR -48[rbp]
	cdqe
	movzx	eax, BYTE PTR 6[rdx+rax]
	test	al, al
	jne	.L71
	mov	eax, DWORD PTR -12[rbp]
	add	eax, 8
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 246
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 248
	movzx	eax, WORD PTR [rax]
	mov	WORD PTR -20[rbp], ax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 250
	movzx	eax, WORD PTR [rax]
	mov	WORD PTR -16[rbp], ax
	mov	eax, DWORD PTR -20[rbp]
	shr	eax, 11
	mov	edx, eax
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR 500[rax], edx
	mov	eax, DWORD PTR -20[rbp]
	shr	eax, 5
	and	eax, 63
	mov	edx, eax
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR 504[rax], edx
	mov	eax, DWORD PTR -20[rbp]
	add	eax, eax
	and	eax, 62
	mov	edx, eax
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR 508[rax], edx
	mov	eax, DWORD PTR -16[rbp]
	shr	eax, 9
	mov	edx, eax
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR 488[rax], edx
	mov	eax, DWORD PTR -16[rbp]
	shr	eax, 5
	and	eax, 15
	mov	edx, eax
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR 492[rax], edx
	mov	eax, DWORD PTR -16[rbp]
	and	eax, 31
	mov	edx, eax
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR 496[rax], edx
	mov	eax, 0
.L72:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L73
	call	__stack_chk_fail@PLT
.L73:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	r_sector, .-r_sector
	.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	"658382.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%ld\012\000"
	.align	2
.LC1:
	.ascii	"\012minimOS disk image manager v0.2\000"
	.align	2
.LC2:
	.ascii	"\012===============================\000"
	.align	2
.LC3:
	.ascii	"How many kiB? \000"
	.align	2
.LC4:
	.ascii	"%ld\000"
	.align	2
.LC5:
	.ascii	"Volume name: \000"
	.align	2
.LC6:
	.ascii	"%s\000"
	.align	2
.LC7:
	.ascii	"*** Error: not enough memory ***\000"
	.align	2
.LC8:
	.ascii	"Image file: \000"
	.align	2
.LC9:
	.ascii	"*** Error: no such file ***\000"
	.align	2
.LC10:
	.ascii	"Loaded %ld bytes\012\000"
	.align	2
.LC11:
	.ascii	"Volume name: %s\012\000"
	.align	2
.LC12:
	.ascii	"*** Error: no image in use ***\000"
	.align	2
.LC13:
	.ascii	"Save to image file: \000"
	.align	2
.LC14:
	.ascii	"*** Error: couldn't save image ***\000"
	.align	2
.LC15:
	.ascii	"*** Error: no image to save ***\000"
	.align	2
.LC16:
	.ascii	"File to insert: \000"
	.align	2
.LC17:
	.ascii	"Delete from image, which file? \000"
	.align	2
.LC18:
	.ascii	"Extract from image, which file? \000"
	.align	2
.LC19:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 624
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #624
	ldr	r3, .L25
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #516
	ldr	r0, .L25+4
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-616]
	mov	r3, #0
	str	r3, [fp, #-612]
	mov	r3, #0
	strb	r3, [fp, #-608]
	ldr	r0, .L25+8
	bl	printf
	ldr	r0, .L25+12
	bl	puts
.L20:
	bl	menu
	str	r0, [fp, #-624]
	ldr	r3, [fp, #-624]
	cmp	r3, #7
	ldrls	pc, [pc, r3, asl #2]
	b	.L2
.L4:
	.word	.L11
	.word	.L10
	.word	.L9
	.word	.L8
	.word	.L7
	.word	.L6
	.word	.L5
	.word	.L3
.L10:
	sub	r3, fp, #616
	mov	r0, r3
	bl	discard
	ldr	r0, .L25+16
	bl	printf
	sub	r3, fp, #628
	mov	r1, r3
	ldr	r0, .L25+20
	bl	__isoc99_scanf
	ldr	r0, .L25+24
	bl	printf
	sub	r3, fp, #88
	mov	r1, r3
	ldr	r0, .L25+28
	bl	__isoc99_scanf
	ldr	r3, [fp, #-628]
	lsl	r1, r3, #10
	sub	r2, fp, #88
	sub	r3, fp, #616
	mov	r0, r3
	bl	create
	mov	r3, r0
	cmp	r3, #0
	beq	.L23
	ldr	r0, .L25+32
	bl	puts
	b	.L23
.L9:
	sub	r3, fp, #616
	mov	r0, r3
	bl	discard
	ldr	r0, .L25+36
	bl	printf
	sub	r3, fp, #88
	mov	r1, r3
	ldr	r0, .L25+28
	bl	__isoc99_scanf
	sub	r2, fp, #88
	sub	r3, fp, #616
	mov	r1, r2
	mov	r0, r3
	bl	open
	str	r0, [fp, #-620]
	ldr	r3, [fp, #-620]
	cmn	r3, #1
	bne	.L13
	ldr	r0, .L25+40
	bl	puts
	b	.L2
.L13:
	ldr	r3, [fp, #-620]
	cmn	r3, #2
	bne	.L15
	ldr	r0, .L25+32
	bl	puts
	b	.L2
.L15:
	ldr	r3, [fp, #-612]
	mov	r1, r3
	ldr	r0, .L25+44
	bl	printf
	ldr	r3, [fp, #-616]
	add	r3, r3, #8
	mov	r1, r3
	ldr	r0, .L25+48
	bl	printf
	b	.L2
.L8:
	sub	r3, fp, #616
	mov	r0, r3
	bl	dir
	mov	r3, r0
	cmp	r3, #0
	beq	.L24
	ldr	r0, .L25+52
	bl	puts
	b	.L24
.L7:
	ldr	r3, [fp, #-616]
	cmp	r3, #0
	beq	.L17
	ldr	r0, .L25+56
	bl	printf
	sub	r3, fp, #88
	mov	r1, r3
	ldr	r0, .L25+28
	bl	__isoc99_scanf
	sub	r2, fp, #88
	sub	r3, fp, #616
	mov	r1, r2
	mov	r0, r3
	bl	close
	str	r0, [fp, #-620]
	ldr	r3, [fp, #-620]
	cmn	r3, #3
	bne	.L18
	ldr	r0, .L25+60
	bl	puts
	b	.L2
.L18:
	ldr	r3, [fp, #-616]
	mov	r0, r3
	bl	free
	mov	r3, #0
	str	r3, [fp, #-616]
	mov	r3, #0
	str	r3, [fp, #-612]
	b	.L2
.L17:
	ldr	r0, .L25+64
	bl	puts
	b	.L2
.L6:
	ldr	r0, .L25+68
	bl	printf
	sub	r3, fp, #88
	mov	r1, r3
	ldr	r0, .L25+28
	bl	__isoc99_scanf
	sub	r2, fp, #88
	sub	r3, fp, #616
	mov	r1, r2
	mov	r0, r3
	bl	insert
	str	r0, [fp, #-620]
	b	.L2
.L5:
	ldr	r0, .L25+72
	bl	printf
	sub	r3, fp, #88
	mov	r1, r3
	ldr	r0, .L25+28
	bl	__isoc99_scanf
	sub	r2, fp, #88
	sub	r3, fp, #616
	mov	r1, r2
	mov	r0, r3
	bl	delete
	str	r0, [fp, #-620]
	b	.L2
.L3:
	ldr	r0, .L25+76
	bl	printf
	sub	r3, fp, #88
	mov	r1, r3
	ldr	r0, .L25+28
	bl	__isoc99_scanf
	sub	r2, fp, #88
	sub	r3, fp, #616
	mov	r1, r2
	mov	r0, r3
	bl	extract
	str	r0, [fp, #-620]
	b	.L2
.L11:
	ldrb	r3, [fp, #-608]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L2
	sub	r3, fp, #616
	mov	r0, r3
	bl	discard
	str	r0, [fp, #-624]
	b	.L2
.L23:
	nop
	b	.L2
.L24:
	nop
.L2:
	ldr	r3, [fp, #-624]
	cmp	r3, #0
	bne	.L20
	mov	r3, #0
	ldr	r2, .L25
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L22
	bl	__stack_chk_fail
.L22:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	.LC19
	.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
	.size	main, .-main
	.section	.rodata
	.align	2
.LC20:
	.ascii	"\0121.Create image\000"
	.align	2
.LC21:
	.ascii	"2.Open image\000"
	.align	2
.LC22:
	.ascii	"3.Show image contents\000"
	.align	2
.LC23:
	.ascii	"4.Close image\000"
	.align	2
.LC24:
	.ascii	"5.Insert file\000"
	.align	2
.LC25:
	.ascii	"6.Delete file\000"
	.align	2
.LC26:
	.ascii	"7.Extract file\000"
	.align	2
.LC27:
	.ascii	"\0120.EXIT\012\000"
	.align	2
.LC28:
	.ascii	"%d\000"
	.align	2
.LC29:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	menu
	.syntax unified
	.arm
	.fpu softvfp
	.type	menu, %function
menu:
	@ 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, .L32
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mvn	r3, #0
	str	r3, [fp, #-12]
	ldr	r0, .L32+4
	bl	puts
	ldr	r0, .L32+8
	bl	puts
	ldr	r0, .L32+12
	bl	puts
	ldr	r0, .L32+16
	bl	puts
	ldr	r0, .L32+20
	bl	puts
	ldr	r0, .L32+24
	bl	puts
	ldr	r0, .L32+28
	bl	puts
	ldr	r0, .L32+32
	bl	puts
	b	.L28
.L29:
	mov	r0, #62
	bl	putchar
	sub	r3, fp, #12
	mov	r1, r3
	ldr	r0, .L32+36
	bl	__isoc99_scanf
.L28:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	blt	.L29
	ldr	r3, [fp, #-12]
	cmp	r3, #7
	bgt	.L29
	ldr	r3, [fp, #-12]
	ldr	r2, .L32
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L31
	bl	__stack_chk_fail
.L31:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L33:
	.align	2
.L32:
	.word	.LC29
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.word	.LC27
	.word	.LC28
	.size	menu, .-menu
	.section	.rodata
	.align	2
.LC30:
	.ascii	"****\000"
	.align	2
.LC31:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	create
	.syntax unified
	.arm
	.fpu softvfp
	.type	create, %function
create:
	@ args = 0, pretend = 0, frame = 544
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #544
	str	r0, [fp, #-536]
	str	r1, [fp, #-540]
	str	r2, [fp, #-544]
	ldr	r3, .L39
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-528]
	ldr	r3, [fp, #-540]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-536]
	str	r2, [r3]
	ldr	r3, [fp, #-536]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L35
	mvn	r3, #1
	b	.L37
.L35:
	ldr	r3, [fp, #-536]
	ldr	r2, [fp, #-540]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-536]
	mov	r2, #1
	strb	r2, [r3, #8]
	sub	r3, fp, #4
	sub	r3, r3, #520
	ldr	r2, .L39+4
	strh	r2, [r3]	@ movhi
	ldr	r2, .L39+8
	sub	r3, fp, #520
	sub	r3, r3, #2
	mov	r1, r2
	mov	r2, #4
	mov	r0, r3
	bl	memcpy
	sub	r3, fp, #524
	add	r3, r3, #6
	ldr	r1, [fp, #-544]
	mov	r0, r3
	bl	strcpy
	mov	r3, #0
	strb	r3, [fp, #-278]
	ldr	r3, [fp, #-536]
	ldr	r3, [r3]
	sub	r2, fp, #524
	mov	r1, r2
	mov	r0, r3
	bl	w_sector
	mov	r3, #0
.L37:
	ldr	r2, .L39
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L38
	bl	__stack_chk_fail
.L38:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L40:
	.align	2
.L39:
	.word	.LC31
	.word	22113
	.word	.LC30
	.size	create, .-create
	.section	.rodata
	.align	2
.LC32:
	.ascii	"rb\000"
	.align	2
.LC33:
	.ascii	"\000\000"
	.text
	.align	2
	.global	open
	.syntax unified
	.arm
	.fpu softvfp
	.type	open, %function
open:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r1, .L45
	ldr	r0, [fp, #-28]
	bl	fopen
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L42
	mvn	r3, #0
	b	.L43
.L42:
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-16]
	bl	fseek
	ldr	r0, [fp, #-16]
	bl	ftell
	str	r0, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	rewind
	ldr	r2, .L45+4
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-24]
	bl	create
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L44
	ldr	r0, [fp, #-16]
	bl	fclose
	ldr	r3, [fp, #-8]
	b	.L43
.L44:
	ldr	r3, [fp, #-24]
	ldr	r0, [r3]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	mov	r1, #1
	bl	fread
	ldr	r0, [fp, #-16]
	bl	fclose
	ldr	r3, [fp, #-24]
	mov	r2, #1
	strb	r2, [r3, #8]
	mov	r3, #0
.L43:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L46:
	.align	2
.L45:
	.word	.LC32
	.word	.LC33
	.size	open, .-open
	.section	.rodata
	.align	2
.LC34:
	.ascii	"Volume: %s\012\000"
	.text
	.align	2
	.global	dir
	.syntax unified
	.arm
	.fpu softvfp
	.type	dir, %function
dir:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	add	r3, r3, #8
	mov	r1, r3
	ldr	r0, .L49
	bl	printf
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L50:
	.align	2
.L49:
	.word	.LC34
	.size	dir, .-dir
	.section	.rodata
	.align	2
.LC35:
	.ascii	"-- File exists. Overwrite? (y/n): \000"
	.align	2
.LC36:
	.ascii	"wb\000"
	.align	2
.LC37:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	close
	.syntax unified
	.arm
	.fpu softvfp
	.type	close, %function
close:
	@ args = 0, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #96
	str	r0, [fp, #-96]
	str	r1, [fp, #-100]
	ldr	r3, .L57
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L57+4
	ldr	r0, [fp, #-100]
	bl	fopen
	str	r0, [fp, #-92]
	ldr	r0, [fp, #-92]
	bl	fclose
	ldr	r3, [fp, #-92]
	cmp	r3, #0
	beq	.L52
	ldr	r0, .L57+8
	bl	printf
	sub	r3, fp, #88
	mov	r1, r3
	ldr	r0, .L57+12
	bl	__isoc99_scanf
	ldrb	r3, [fp, #-88]	@ zero_extendqisi2
	orr	r3, r3, #32
	and	r3, r3, #255
	cmp	r3, #121
	beq	.L52
	mvn	r3, #2
	b	.L55
.L52:
	ldr	r1, .L57+16
	ldr	r0, [fp, #-100]
	bl	fopen
	str	r0, [fp, #-92]
	ldr	r3, [fp, #-92]
	cmp	r3, #0
	bne	.L54
	mvn	r3, #2
	b	.L55
.L54:
	ldr	r3, [fp, #-96]
	ldr	r0, [r3]
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #4]
	mov	r2, r3
	ldr	r3, [fp, #-92]
	mov	r1, #1
	bl	fwrite
	ldr	r0, [fp, #-92]
	bl	fclose
	ldr	r3, [fp, #-96]
	mov	r2, #0
	strb	r2, [r3, #8]
	mov	r3, #0
.L55:
	ldr	r2, .L57
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L56
	bl	__stack_chk_fail
.L56:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L58:
	.align	2
.L57:
	.word	.LC37
	.word	.LC32
	.word	.LC35
	.word	.LC6
	.word	.LC36
	.size	close, .-close
	.align	2
	.global	insert
	.syntax unified
	.arm
	.fpu softvfp
	.type	insert, %function
insert:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L60
	mvn	r3, #4
	b	.L61
.L60:
	ldr	r3, [fp, #-8]
	mov	r2, #1
	strb	r2, [r3, #8]
	mov	r3, #0
.L61:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	insert, .-insert
	.align	2
	.global	delete
	.syntax unified
	.arm
	.fpu softvfp
	.type	delete, %function
delete:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L63
	mvn	r3, #5
	b	.L64
.L63:
	ldr	r3, [fp, #-8]
	mov	r2, #1
	strb	r2, [r3, #8]
	mov	r3, #0
.L64:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	delete, .-delete
	.align	2
	.global	extract
	.syntax unified
	.arm
	.fpu softvfp
	.type	extract, %function
extract:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L66
	mvn	r3, #5
	b	.L67
.L66:
	mov	r3, #0
.L67:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	extract, .-extract
	.section	.rodata
	.align	2
.LC38:
	.ascii	"-- Image in use. Discard? (y/n): \000"
	.align	2
.LC39:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	discard
	.syntax unified
	.arm
	.fpu softvfp
	.type	discard, %function
discard:
	@ args = 0, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #96
	str	r0, [fp, #-96]
	ldr	r3, .L73
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-96]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L69
	ldr	r0, .L73+4
	bl	printf
	sub	r3, fp, #88
	mov	r1, r3
	ldr	r0, .L73+8
	bl	__isoc99_scanf
	ldrb	r3, [fp, #-88]	@ zero_extendqisi2
	orr	r3, r3, #32
	and	r3, r3, #255
	cmp	r3, #121
	bne	.L69
	ldr	r3, [fp, #-96]
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-96]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-96]
	mov	r2, #0
	strb	r2, [r3, #8]
	mov	r3, #0
	b	.L71
.L69:
	mvn	r3, #3
.L71:
	ldr	r2, .L73
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L72
	bl	__stack_chk_fail
.L72:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L74:
	.align	2
.L73:
	.word	.LC39
	.word	.LC38
	.word	.LC6
	.size	discard, .-discard
	.section	.rodata
	.align	2
.LC40:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	w_sector
	.syntax unified
	.arm
	.fpu softvfp
	.type	w_sector, %function
w_sector:
	@ 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]
	ldr	r3, .L81
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-32]
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-32]
	add	r3, r3, #7
	mov	r2, #13
	strb	r2, [r3]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	ldr	r1, [fp, #-36]
	mov	r2, #2
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-32]
	add	r0, r3, #3
	ldr	r3, [fp, #-36]
	add	r3, r3, #2
	mov	r2, #4
	mov	r1, r3
	bl	memcpy
	nop
.L76:
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldrb	r3, [r3, #6]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L76
	nop
.L77:
	ldr	r3, [fp, #-12]
	add	r2, r3, #1
	str	r2, [fp, #-12]
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldrb	r3, [r3, #246]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L77
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	cmp	r3, #240
	ble	.L78
	ldr	r3, [fp, #-16]
	rsb	r3, r3, #239
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3, #246]
.L78:
	ldr	r3, [fp, #-32]
	add	r2, r3, #8
	ldr	r3, [fp, #-36]
	add	r3, r3, #6
	mov	r1, r3
	mov	r0, r2
	bl	strcpy
	ldr	r3, [fp, #-16]
	add	r3, r3, #8
	mov	r2, r3
	ldr	r3, [fp, #-32]
	add	r2, r3, r2
	ldr	r3, [fp, #-36]
	add	r3, r3, #246
	mov	r1, r3
	mov	r0, r2
	bl	strcpy
	ldr	r3, [fp, #-36]
	ldr	r3, [r3, #500]
	lsl	r3, r3, #11
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-36]
	ldr	r3, [r3, #504]
	lsl	r3, r3, #5
	mov	r2, r3
	ldr	r3, [fp, #-24]
	orr	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-36]
	ldr	r3, [r3, #508]
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-24]
	orr	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-36]
	ldr	r3, [r3, #488]
	sub	r3, r3, #1968
	sub	r3, r3, #12
	lsl	r3, r3, #9
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-36]
	ldr	r3, [r3, #492]
	lsl	r3, r3, #5
	mov	r2, r3
	ldr	r3, [fp, #-20]
	orr	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-36]
	ldr	r3, [r3, #496]
	mov	r2, r3
	ldr	r3, [fp, #-20]
	orr	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-32]
	add	r3, r3, #248
	sub	r1, fp, #24
	mov	r2, #2
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-32]
	add	r3, r3, #250
	sub	r1, fp, #20
	mov	r2, #2
	mov	r0, r3
	bl	memcpy
	mov	r3, #0
	ldr	r2, .L81
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L80
	bl	__stack_chk_fail
.L80:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L82:
	.align	2
.L81:
	.word	.LC40
	.size	w_sector, .-w_sector
	.section	.rodata
	.align	2
.LC41:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	r_sector
	.syntax unified
	.arm
	.fpu softvfp
	.type	r_sector, %function
r_sector:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L90
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L84
	ldr	r3, [fp, #-24]
	add	r3, r3, #7
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #13
	beq	.L85
.L84:
	mvn	r3, #6
	b	.L88
.L85:
	ldr	r3, [fp, #-28]
	add	r2, r3, #6
	ldr	r3, [fp, #-24]
	add	r3, r3, #8
	mov	r1, r3
	mov	r0, r2
	bl	strcpy
	nop
.L87:
	ldr	r3, [fp, #-12]
	add	r2, r3, #1
	str	r2, [fp, #-12]
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldrb	r3, [r3, #6]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L87
	ldr	r3, [fp, #-28]
	add	r2, r3, #246
	ldr	r3, [fp, #-12]
	add	r3, r3, #8
	mov	r1, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r1
	mov	r1, r3
	mov	r0, r2
	bl	strcpy
	ldr	r3, [fp, #-24]
	add	r1, r3, #248
	sub	r3, fp, #20
	mov	r2, #2
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-24]
	add	r1, r3, #250
	sub	r3, fp, #16
	mov	r2, #2
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-20]
	lsr	r3, r3, #11
	mov	r2, r3
	ldr	r3, [fp, #-28]
	str	r2, [r3, #500]
	ldr	r3, [fp, #-20]
	lsr	r3, r3, #5
	and	r2, r3, #63
	ldr	r3, [fp, #-28]
	str	r2, [r3, #504]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #1
	and	r2, r3, #62
	ldr	r3, [fp, #-28]
	str	r2, [r3, #508]
	ldr	r3, [fp, #-16]
	lsr	r3, r3, #9
	mov	r2, r3
	ldr	r3, [fp, #-28]
	str	r2, [r3, #488]
	ldr	r3, [fp, #-16]
	lsr	r3, r3, #5
	and	r2, r3, #15
	ldr	r3, [fp, #-28]
	str	r2, [r3, #492]
	ldr	r3, [fp, #-16]
	and	r2, r3, #31
	ldr	r3, [fp, #-28]
	str	r2, [r3, #496]
	mov	r3, #0
.L88:
	ldr	r2, .L90
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L89
	bl	__stack_chk_fail
.L89:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L91:
	.align	2
.L90:
	.word	.LC41
	.size	r_sector, .-r_sector
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
