	.file	"76699358.c"
	.intel_syntax noprefix
	.text
	.globl	read_exec_file
	.type	read_exec_file, @function
read_exec_file:
.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, 560
	mov	QWORD PTR -552[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 32
	mov	edi, 1
	call	calloc@PLT
	mov	QWORD PTR -544[rbp], rax
	mov	rdx, QWORD PTR -552[rbp]
	lea	rax, -528[rbp]
	mov	rcx, rdx
	mov	edx, 512
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	lea	rax, -528[rbp]
	mov	QWORD PTR -536[rbp], rax
	mov	rax, QWORD PTR -536[rbp]
	mov	eax, DWORD PTR 28[rax]
	mov	edx, eax
	mov	rax, QWORD PTR -536[rbp]
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -544[rbp]
	mov	edx, 32
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	rax, QWORD PTR -544[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	read_exec_file, .-read_exec_file
	.globl	count_kernel_sectors
	.type	count_kernel_sectors, @function
count_kernel_sectors:
.LFB7:
	.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 -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 16[rax]
	add	eax, 511
	shr	eax, 9
	mov	BYTE PTR -1[rbp], al
	movzx	eax, BYTE PTR -1[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	count_kernel_sectors, .-count_kernel_sectors
	.globl	write_bootblock
	.type	write_bootblock, @function
write_bootblock:
.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
	lea	rax, -528[rbp]
	mov	edx, 512
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -568[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	ecx, eax
	mov	rax, QWORD PTR -560[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	DWORD PTR -532[rbp], 0
	jmp	.L7
.L8:
	mov	rdx, QWORD PTR -560[rbp]
	lea	rax, -528[rbp]
	mov	rcx, rdx
	mov	edx, 512
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	rdx, QWORD PTR -552[rbp]
	lea	rax, -528[rbp]
	mov	rcx, rdx
	mov	edx, 512
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	add	DWORD PTR -532[rbp], 1
.L7:
	mov	eax, DWORD PTR -532[rbp]
	sal	eax, 9
	mov	edx, eax
	mov	rax, QWORD PTR -568[rbp]
	mov	eax, DWORD PTR 16[rax]
	cmp	edx, eax
	jb	.L8
	mov	rax, QWORD PTR -568[rbp]
	mov	eax, DWORD PTR 16[rax]
	and	eax, 511
	test	eax, eax
	je	.L11
	lea	rax, -528[rbp]
	mov	edx, 512
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rdx, QWORD PTR -560[rbp]
	lea	rax, -528[rbp]
	mov	rcx, rdx
	mov	edx, 512
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	rdx, QWORD PTR -552[rbp]
	lea	rax, -528[rbp]
	mov	rcx, rdx
	mov	edx, 512
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
.L11:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	write_bootblock, .-write_bootblock
	.globl	write_kernel
	.type	write_kernel, @function
write_kernel:
.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, 560
	mov	QWORD PTR -536[rbp], rdi
	mov	QWORD PTR -544[rbp], rsi
	mov	QWORD PTR -552[rbp], rdx
	mov	DWORD PTR -556[rbp], ecx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -552[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	ecx, eax
	mov	rax, QWORD PTR -544[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	jmp	.L13
.L14:
	lea	rax, -528[rbp]
	mov	edx, 512
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rdx, QWORD PTR -544[rbp]
	lea	rax, -528[rbp]
	mov	rcx, rdx
	mov	edx, 512
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	rdx, QWORD PTR -536[rbp]
	lea	rax, -528[rbp]
	mov	rcx, rdx
	mov	edx, 512
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
.L13:
	mov	eax, DWORD PTR -556[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -556[rbp], edx
	test	eax, eax
	jne	.L14
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	write_kernel, .-write_kernel
	.globl	record_kernel_sectors
	.type	record_kernel_sectors, @function
record_kernel_sectors:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	eax, esi
	mov	BYTE PTR -28[rbp], al
	lea	rax, -28[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 0
	mov	esi, 511
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	record_kernel_sectors, .-record_kernel_sectors
	.section	.rodata
.LC0:
	.string	"bootblock size is %d byte!\n"
.LC1:
	.string	"Bootblock message :"
	.align 8
.LC2:
	.string	"Bootblock image memory size is 0x%x\n"
	.align 8
.LC3:
	.string	"Bootblock image memory offset is 0x%x\n"
.LC4:
	.string	"kernel message :"
	.align 8
.LC5:
	.string	"kernel image memeory size is 0x%x\n"
	.align 8
.LC6:
	.string	"kernel image memory offset is 0x%x\n"
.LC7:
	.string	"kernel sector size is 0x%x\n"
	.text
	.globl	extent_opt
	.type	extent_opt, @function
extent_opt:
.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, 32
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	DWORD PTR -20[rbp], edx
	cmp	QWORD PTR -8[rbp], 0
	je	.L18
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 20[rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
.L18:
	cmp	QWORD PTR -16[rbp], 0
	je	.L20
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 20[rax]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
.L20:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	extent_opt, .-extent_opt
	.section	.rodata
.LC8:
	.string	"rb"
.LC9:
	.string	"bootblock"
.LC10:
	.string	"the_stack_data/76699358.c"
.LC11:
	.string	"file"
.LC12:
	.string	"kernel"
.LC13:
	.string	"knfile"
.LC14:
	.string	"wb"
.LC15:
	.string	"image"
	.align 8
.LC16:
	.string	"Wrong arguments or too few arguments: \"%s\"\n"
.LC17:
	.string	"--extended"
	.align 8
.LC18:
	.string	"Please input correct arguments: --extended"
	.align 8
.LC19:
	.string	"Please input correct arguments: \"bootblock\" or \"kernel\""
	.align 8
.LC20:
	.string	"Please input correct arguments: \"bootblock\""
	.align 8
.LC21:
	.string	"Please input correct arguments: \"kernel\""
.LC22:
	.string	"Too many arguments"
	.text
	.globl	main
	.type	main, @function
main:
.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, 96
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	lea	rsi, .LC8[rip]
	lea	rdi, .LC9[rip]
	call	fopen@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L22
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 91
	lea	rsi, .LC10[rip]
	lea	rdi, .LC11[rip]
	call	__assert_fail@PLT
.L22:
	lea	rsi, .LC8[rip]
	lea	rdi, .LC12[rip]
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L23
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 93
	lea	rsi, .LC10[rip]
	lea	rdi, .LC13[rip]
	call	__assert_fail@PLT
.L23:
	lea	rsi, .LC14[rip]
	lea	rdi, .LC15[rip]
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	read_exec_file
	mov	QWORD PTR -64[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	read_exec_file
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	count_kernel_sectors
	movzx	eax, al
	mov	DWORD PTR -68[rbp], eax
	mov	rdx, QWORD PTR -64[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	write_bootblock
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 0
	mov	esi, 512
	mov	rdi, rax
	call	fseek@PLT
	mov	ecx, DWORD PTR -68[rbp]
	mov	rdx, QWORD PTR -56[rbp]
	mov	rsi, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	write_kernel
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -68[rbp]
	movzx	edx, al
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	record_kernel_sectors
	cmp	DWORD PTR -84[rbp], 1
	jg	.L24
	mov	QWORD PTR -56[rbp], 0
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR -64[rbp], rax
	jmp	.L25
.L24:
	cmp	DWORD PTR -84[rbp], 2
	jne	.L26
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	mov	QWORD PTR -56[rbp], 0
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR -64[rbp], rax
	jmp	.L25
.L26:
	cmp	DWORD PTR -84[rbp], 3
	jne	.L27
	lea	rax, .LC17[rip]
	mov	QWORD PTR -48[rbp], rax
	jmp	.L28
.L30:
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	add	rdx, 1
	mov	QWORD PTR [rax], rdx
	add	QWORD PTR -48[rbp], 1
.L28:
	mov	rax, QWORD PTR -48[rbp]
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	jne	.L29
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L29
	mov	rax, QWORD PTR -48[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L30
.L29:
	mov	rax, QWORD PTR -48[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L31
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L32
.L31:
	lea	rdi, .LC18[rip]
	call	puts@PLT
	mov	QWORD PTR -56[rbp], 0
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR -64[rbp], rax
	jmp	.L25
.L32:
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 98
	jne	.L34
	lea	rax, .LC9[rip]
	mov	QWORD PTR -48[rbp], rax
	jmp	.L35
.L37:
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 16
	mov	rdx, QWORD PTR [rax]
	add	rdx, 1
	mov	QWORD PTR [rax], rdx
	add	QWORD PTR -48[rbp], 1
.L35:
	mov	rax, QWORD PTR -48[rbp]
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	jne	.L36
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L36
	mov	rax, QWORD PTR -48[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L37
.L36:
	mov	rax, QWORD PTR -48[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L38
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L39
.L38:
	lea	rdi, .LC19[rip]
	call	puts@PLT
	mov	QWORD PTR -56[rbp], 0
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR -64[rbp], rax
	jmp	.L25
.L39:
	mov	QWORD PTR -56[rbp], 0
	jmp	.L25
.L34:
	lea	rax, .LC12[rip]
	mov	QWORD PTR -48[rbp], rax
	jmp	.L41
.L43:
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 16
	mov	rdx, QWORD PTR [rax]
	add	rdx, 1
	mov	QWORD PTR [rax], rdx
	add	QWORD PTR -48[rbp], 1
.L41:
	mov	rax, QWORD PTR -48[rbp]
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	jne	.L42
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L42
	mov	rax, QWORD PTR -48[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L43
.L42:
	mov	rax, QWORD PTR -48[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L44
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L45
.L44:
	lea	rdi, .LC19[rip]
	call	puts@PLT
	mov	QWORD PTR -56[rbp], 0
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR -64[rbp], rax
	jmp	.L25
.L45:
	mov	QWORD PTR -64[rbp], 0
	jmp	.L25
.L27:
	cmp	DWORD PTR -84[rbp], 4
	jne	.L46
	lea	rax, .LC17[rip]
	mov	QWORD PTR -40[rbp], rax
	jmp	.L47
.L49:
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	add	rdx, 1
	mov	QWORD PTR [rax], rdx
	add	QWORD PTR -40[rbp], 1
.L47:
	mov	rax, QWORD PTR -40[rbp]
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	jne	.L48
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L48
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L49
.L48:
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L50
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L51
.L50:
	lea	rdi, .LC18[rip]
	call	puts@PLT
	mov	QWORD PTR -56[rbp], 0
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR -64[rbp], rax
	jmp	.L25
.L51:
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 98
	jne	.L53
	mov	DWORD PTR -76[rbp], 2
	mov	DWORD PTR -72[rbp], 3
	jmp	.L54
.L53:
	mov	DWORD PTR -76[rbp], 3
	mov	DWORD PTR -72[rbp], 2
.L54:
	lea	rax, .LC9[rip]
	mov	QWORD PTR -40[rbp], rax
	jmp	.L55
.L57:
	mov	eax, DWORD PTR -76[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	add	rdx, 1
	mov	QWORD PTR [rax], rdx
	add	QWORD PTR -40[rbp], 1
.L55:
	mov	rax, QWORD PTR -40[rbp]
	movzx	edx, BYTE PTR [rax]
	mov	eax, DWORD PTR -76[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	jne	.L56
	mov	eax, DWORD PTR -76[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L56
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L57
.L56:
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L58
	mov	eax, DWORD PTR -76[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L59
.L58:
	lea	rdi, .LC20[rip]
	call	puts@PLT
	mov	QWORD PTR -64[rbp], 0
.L59:
	lea	rax, .LC12[rip]
	mov	QWORD PTR -40[rbp], rax
	jmp	.L60
.L62:
	mov	eax, DWORD PTR -72[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	add	rdx, 1
	mov	QWORD PTR [rax], rdx
	add	QWORD PTR -40[rbp], 1
.L60:
	mov	rax, QWORD PTR -40[rbp]
	movzx	edx, BYTE PTR [rax]
	mov	eax, DWORD PTR -72[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	jne	.L61
	mov	eax, DWORD PTR -72[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L61
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L62
.L61:
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L63
	mov	eax, DWORD PTR -72[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L25
.L63:
	lea	rdi, .LC21[rip]
	call	puts@PLT
	mov	QWORD PTR -56[rbp], 0
	jmp	.L25
.L46:
	lea	rdi, .LC22[rip]
	call	puts@PLT
	mov	QWORD PTR -56[rbp], 0
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR -64[rbp], rax
.L25:
	mov	edx, DWORD PTR -68[rbp]
	mov	rcx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	extent_opt
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	main, .-main
	.section	.rodata
	.type	__PRETTY_FUNCTION__.0, @object
	.size	__PRETTY_FUNCTION__.0, 5
__PRETTY_FUNCTION__.0:
	.string	"main"
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"76699358.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_exec_file
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_exec_file, %function
read_exec_file:
	@ args = 0, pretend = 0, frame = 536
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #536
	str	r0, [fp, #-536]
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #32
	mov	r0, #1
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-528]
	sub	r0, fp, #520
	ldr	r3, [fp, #-536]
	mov	r2, #512
	mov	r1, #1
	bl	fread
	sub	r3, fp, #520
	str	r3, [fp, #-524]
	ldr	r3, [fp, #-524]
	ldr	r3, [r3, #28]
	ldr	r2, [fp, #-524]
	add	r3, r2, r3
	mov	r2, #32
	mov	r1, r3
	ldr	r0, [fp, #-528]
	bl	memcpy
	ldr	r3, [fp, #-528]
	ldr	r2, .L4
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.size	read_exec_file, .-read_exec_file
	.align	2
	.global	count_kernel_sectors
	.syntax unified
	.arm
	.fpu softvfp
	.type	count_kernel_sectors, %function
count_kernel_sectors:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #16]
	add	r3, r3, #508
	add	r3, r3, #3
	lsr	r3, r3, #9
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	count_kernel_sectors, .-count_kernel_sectors
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	write_bootblock
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_bootblock, %function
write_bootblock:
	@ args = 0, pretend = 0, frame = 536
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #536
	str	r0, [fp, #-528]
	str	r1, [fp, #-532]
	str	r2, [fp, #-536]
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #520
	mov	r2, #512
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-536]
	ldr	r3, [r3, #4]
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-532]
	bl	fseek
	mov	r3, #0
	str	r3, [fp, #-524]
	b	.L9
.L10:
	sub	r0, fp, #520
	ldr	r3, [fp, #-532]
	mov	r2, #512
	mov	r1, #1
	bl	fread
	sub	r0, fp, #520
	ldr	r3, [fp, #-528]
	mov	r2, #512
	mov	r1, #1
	bl	fwrite
	ldr	r3, [fp, #-524]
	add	r3, r3, #1
	str	r3, [fp, #-524]
.L9:
	ldr	r3, [fp, #-524]
	lsl	r3, r3, #9
	mov	r2, r3
	ldr	r3, [fp, #-536]
	ldr	r3, [r3, #16]
	cmp	r2, r3
	bcc	.L10
	ldr	r3, [fp, #-536]
	ldr	r3, [r3, #16]
	lsl	r3, r3, #23
	lsr	r3, r3, #23
	cmp	r3, #0
	beq	.L13
	sub	r3, fp, #520
	mov	r2, #512
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r0, fp, #520
	ldr	r3, [fp, #-532]
	mov	r2, #512
	mov	r1, #1
	bl	fread
	sub	r0, fp, #520
	ldr	r3, [fp, #-528]
	mov	r2, #512
	mov	r1, #1
	bl	fwrite
.L13:
	nop
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC1
	.size	write_bootblock, .-write_bootblock
	.section	.rodata
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	write_kernel
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_kernel, %function
write_kernel:
	@ args = 0, pretend = 0, frame = 536
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #536
	str	r0, [fp, #-528]
	str	r1, [fp, #-532]
	str	r2, [fp, #-536]
	str	r3, [fp, #-540]
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-536]
	ldr	r3, [r3, #4]
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-532]
	bl	fseek
	b	.L17
.L18:
	sub	r3, fp, #520
	mov	r2, #512
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r0, fp, #520
	ldr	r3, [fp, #-532]
	mov	r2, #512
	mov	r1, #1
	bl	fread
	sub	r0, fp, #520
	ldr	r3, [fp, #-528]
	mov	r2, #512
	mov	r1, #1
	bl	fwrite
.L17:
	ldr	r3, [fp, #-540]
	sub	r2, r3, #1
	str	r2, [fp, #-540]
	cmp	r3, #0
	bne	.L18
	nop
	ldr	r3, .L20
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC2
	.size	write_kernel, .-write_kernel
	.align	2
	.global	record_kernel_sectors
	.syntax unified
	.arm
	.fpu softvfp
	.type	record_kernel_sectors, %function
record_kernel_sectors:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r3, r1
	strb	r3, [fp, #-17]
	sub	r3, fp, #17
	str	r3, [fp, #-8]
	mov	r2, #0
	ldr	r1, .L23
	ldr	r0, [fp, #-16]
	bl	fseek
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #1
	ldr	r0, [fp, #-8]
	bl	fwrite
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	511
	.size	record_kernel_sectors, .-record_kernel_sectors
	.section	.rodata
	.align	2
.LC3:
	.ascii	"bootblock size is %d byte!\012\000"
	.align	2
.LC4:
	.ascii	"Bootblock message :\000"
	.align	2
.LC5:
	.ascii	"Bootblock image memory size is 0x%x\012\000"
	.align	2
.LC6:
	.ascii	"Bootblock image memory offset is 0x%x\012\000"
	.align	2
.LC7:
	.ascii	"kernel message :\000"
	.align	2
.LC8:
	.ascii	"kernel image memeory size is 0x%x\012\000"
	.align	2
.LC9:
	.ascii	"kernel image memory offset is 0x%x\012\000"
	.align	2
.LC10:
	.ascii	"kernel sector size is 0x%x\012\000"
	.text
	.align	2
	.global	extent_opt
	.syntax unified
	.arm
	.fpu softvfp
	.type	extent_opt, %function
extent_opt:
	@ 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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L26
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	mov	r1, r3
	ldr	r0, .L29
	bl	printf
	ldr	r0, .L29+4
	bl	puts
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #20]
	mov	r1, r3
	ldr	r0, .L29+8
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, .L29+12
	bl	printf
.L26:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L28
	ldr	r0, .L29+16
	bl	puts
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #20]
	mov	r1, r3
	ldr	r0, .L29+20
	bl	printf
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, .L29+24
	bl	printf
	ldr	r1, [fp, #-16]
	ldr	r0, .L29+28
	bl	printf
.L28:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	extent_opt, .-extent_opt
	.section	.rodata
	.align	2
.LC11:
	.ascii	"rb\000"
	.align	2
.LC12:
	.ascii	"bootblock\000"
	.align	2
.LC13:
	.ascii	"the_stack_data/76699358.c\000"
	.align	2
.LC14:
	.ascii	"file\000"
	.align	2
.LC15:
	.ascii	"kernel\000"
	.align	2
.LC16:
	.ascii	"knfile\000"
	.align	2
.LC17:
	.ascii	"wb\000"
	.align	2
.LC18:
	.ascii	"image\000"
	.align	2
.LC19:
	.ascii	"Wrong arguments or too few arguments: \"%s\"\012\000"
	.align	2
.LC20:
	.ascii	"--extended\000"
	.align	2
.LC21:
	.ascii	"Please input correct arguments: --extended\000"
	.align	2
.LC22:
	.ascii	"Please input correct arguments: \"bootblock\" or \""
	.ascii	"kernel\"\000"
	.align	2
.LC23:
	.ascii	"Please input correct arguments: \"bootblock\"\000"
	.align	2
.LC24:
	.ascii	"Please input correct arguments: \"kernel\"\000"
	.align	2
.LC25:
	.ascii	"Too many arguments\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	ldr	r1, .L75
	ldr	r0, .L75+4
	bl	fopen
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L32
	ldr	r3, .L75+8
	mov	r2, #91
	ldr	r1, .L75+12
	ldr	r0, .L75+16
	bl	__assert_fail
.L32:
	ldr	r1, .L75
	ldr	r0, .L75+20
	bl	fopen
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L33
	ldr	r3, .L75+8
	mov	r2, #93
	ldr	r1, .L75+12
	ldr	r0, .L75+24
	bl	__assert_fail
.L33:
	ldr	r1, .L75+28
	ldr	r0, .L75+32
	bl	fopen
	str	r0, [fp, #-16]
	ldr	r0, [fp, #-24]
	bl	read_exec_file
	str	r0, [fp, #-48]
	ldr	r0, [fp, #-20]
	bl	read_exec_file
	str	r0, [fp, #-44]
	ldr	r0, [fp, #-44]
	bl	count_kernel_sectors
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r2, [fp, #-48]
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-16]
	bl	write_bootblock
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-8]
	mov	r2, #0
	mov	r1, #512
	ldr	r0, [fp, #-8]
	bl	fseek
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-44]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-8]
	bl	write_kernel
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	and	r3, r3, #255
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	record_kernel_sectors
	ldr	r3, [fp, #-56]
	cmp	r3, #1
	bgt	.L34
	mov	r3, #0
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-44]
	str	r3, [fp, #-48]
	b	.L35
.L34:
	ldr	r3, [fp, #-56]
	cmp	r3, #2
	bne	.L36
	ldr	r3, [fp, #-60]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L75+36
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-44]
	str	r3, [fp, #-48]
	b	.L35
.L36:
	ldr	r3, [fp, #-56]
	cmp	r3, #3
	bne	.L37
	ldr	r3, .L75+40
	str	r3, [fp, #-40]
	b	.L38
.L40:
	ldr	r3, [fp, #-60]
	add	r3, r3, #4
	ldr	r2, [r3]
	add	r2, r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L38:
	ldr	r3, [fp, #-40]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-60]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L39
	ldr	r3, [fp, #-60]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L39
	ldr	r3, [fp, #-40]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L40
.L39:
	ldr	r3, [fp, #-40]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L41
	ldr	r3, [fp, #-60]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L42
.L41:
	ldr	r0, .L75+44
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-44]
	str	r3, [fp, #-48]
	b	.L35
.L42:
	ldr	r3, [fp, #-60]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #98
	bne	.L44
	ldr	r3, .L75+4
	str	r3, [fp, #-40]
	b	.L45
.L47:
	ldr	r3, [fp, #-60]
	add	r3, r3, #8
	ldr	r2, [r3]
	add	r2, r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L45:
	ldr	r3, [fp, #-40]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-60]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L46
	ldr	r3, [fp, #-60]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L46
	ldr	r3, [fp, #-40]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L47
.L46:
	ldr	r3, [fp, #-40]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L48
	ldr	r3, [fp, #-60]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L49
.L48:
	ldr	r0, .L75+48
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-44]
	str	r3, [fp, #-48]
	b	.L35
.L49:
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L35
.L44:
	ldr	r3, .L75+20
	str	r3, [fp, #-40]
	b	.L51
.L53:
	ldr	r3, [fp, #-60]
	add	r3, r3, #8
	ldr	r2, [r3]
	add	r2, r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L51:
	ldr	r3, [fp, #-40]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-60]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L52
	ldr	r3, [fp, #-60]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L52
	ldr	r3, [fp, #-40]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L53
.L52:
	ldr	r3, [fp, #-40]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L54
	ldr	r3, [fp, #-60]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L55
.L54:
	ldr	r0, .L75+48
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-44]
	str	r3, [fp, #-48]
	b	.L35
.L55:
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L35
.L37:
	ldr	r3, [fp, #-56]
	cmp	r3, #4
	bne	.L56
	ldr	r3, .L75+40
	str	r3, [fp, #-36]
	b	.L57
.L59:
	ldr	r3, [fp, #-60]
	add	r3, r3, #4
	ldr	r2, [r3]
	add	r2, r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L57:
	ldr	r3, [fp, #-36]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-60]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L58
	ldr	r3, [fp, #-60]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L58
	ldr	r3, [fp, #-36]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L59
.L58:
	ldr	r3, [fp, #-36]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L60
	ldr	r3, [fp, #-60]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L61
.L60:
	ldr	r0, .L75+44
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-44]
	str	r3, [fp, #-48]
	b	.L35
.L61:
	ldr	r3, [fp, #-60]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #98
	bne	.L63
	mov	r3, #2
	str	r3, [fp, #-32]
	mov	r3, #3
	str	r3, [fp, #-28]
	b	.L64
.L63:
	mov	r3, #3
	str	r3, [fp, #-32]
	mov	r3, #2
	str	r3, [fp, #-28]
.L64:
	ldr	r3, .L75+4
	str	r3, [fp, #-36]
	b	.L65
.L67:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-60]
	add	r3, r2, r3
	ldr	r2, [r3]
	add	r2, r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L65:
	ldr	r3, [fp, #-36]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-60]
	add	r3, r1, r3
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L66
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-60]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L66
	ldr	r3, [fp, #-36]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L67
.L66:
	ldr	r3, [fp, #-36]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L68
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-60]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L69
.L68:
	ldr	r0, .L75+52
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-48]
.L69:
	ldr	r3, .L75+20
	str	r3, [fp, #-36]
	b	.L70
.L72:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-60]
	add	r3, r2, r3
	ldr	r2, [r3]
	add	r2, r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L70:
	ldr	r3, [fp, #-36]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-60]
	add	r3, r1, r3
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L71
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-60]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L71
	ldr	r3, [fp, #-36]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L72
.L71:
	ldr	r3, [fp, #-36]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L73
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-60]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L35
.L73:
	ldr	r0, .L75+56
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L35
.L56:
	ldr	r0, .L75+60
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-44]
	str	r3, [fp, #-48]
.L35:
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-44]
	ldr	r0, [fp, #-48]
	bl	extent_opt
	ldr	r0, [fp, #-24]
	bl	fclose
	ldr	r0, [fp, #-20]
	bl	fclose
	ldr	r0, [fp, #-16]
	bl	fclose
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L76:
	.align	2
.L75:
	.word	.LC11
	.word	.LC12
	.word	__PRETTY_FUNCTION__.5706
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.5706, %object
	.size	__PRETTY_FUNCTION__.5706, 5
__PRETTY_FUNCTION__.5706:
	.ascii	"main\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
