	.file	"32951347.c"
	.intel_syntax noprefix
	.text
	.globl	boot_pad
	.bss
	.align 4
	.type	boot_pad, @object
	.size	boot_pad, 4
boot_pad:
	.zero	4
	.globl	kernel_pad
	.align 4
	.type	kernel_pad, @object
	.size	kernel_pad, 4
kernel_pad:
	.zero	4
	.globl	kernel_filesz
	.align 4
	.type	kernel_filesz, @object
	.size	kernel_filesz, 4
kernel_filesz:
	.zero	4
	.section	.rodata
.LC0:
	.string	"e_phnum:%d\n"
	.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	edi, 32
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	edi, 52
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 52
	mov	rdi, rax
	call	fread@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 28[rax]
	mov	ecx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 32
	mov	rdi, rax
	call	fread@PLT
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, WORD PTR 44[rax]
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	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 20[rax]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 511
	lea	edx, 511[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 9
	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
	mov	rax, QWORD PTR -568[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	DWORD PTR -536[rbp], eax
	mov	rax, QWORD PTR -568[rbp]
	mov	eax, DWORD PTR 20[rax]
	mov	DWORD PTR -532[rbp], eax
	mov	eax, DWORD PTR -532[rbp]
	add	eax, 511
	and	eax, -512
	mov	DWORD PTR boot_pad[rip], eax
	mov	ecx, DWORD PTR -536[rbp]
	mov	rax, QWORD PTR -560[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	eax, DWORD PTR -532[rbp]
	movsx	rsi, eax
	mov	rdx, QWORD PTR -560[rbp]
	lea	rax, -528[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fread@PLT
	mov	eax, DWORD PTR -532[rbp]
	movsx	rsi, eax
	mov	rdx, QWORD PTR -552[rbp]
	lea	rax, -528[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fwrite@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	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, 80
	mov	QWORD PTR -56[rbp], rdi
	mov	QWORD PTR -64[rbp], rsi
	mov	QWORD PTR -72[rbp], rdx
	mov	DWORD PTR -76[rbp], ecx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -36[rbp], 0
	mov	rax, QWORD PTR -72[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	DWORD PTR -28[rbp], eax
	mov	rax, QWORD PTR -72[rbp]
	mov	eax, DWORD PTR 20[rax]
	mov	DWORD PTR -24[rbp], eax
	mov	rax, QWORD PTR -72[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -24[rbp]
	add	eax, 511
	and	eax, -512
	mov	DWORD PTR kernel_pad[rip], eax
	mov	ecx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	eax, DWORD PTR kernel_pad[rip]
	sub	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -12[rbp], eax
	mov	DWORD PTR -32[rbp], 0
	jmp	.L9
.L10:
	mov	rdx, QWORD PTR -64[rbp]
	lea	rax, -37[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	rdx, QWORD PTR -56[rbp]
	lea	rax, -37[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	add	DWORD PTR -32[rbp], 1
.L9:
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -16[rbp]
	jl	.L10
	mov	DWORD PTR -32[rbp], 0
	jmp	.L11
.L12:
	mov	rdx, QWORD PTR -56[rbp]
	lea	rax, -36[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	add	DWORD PTR -32[rbp], 1
.L11:
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jl	.L12
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	eax, esi
	mov	BYTE PTR -44[rbp], al
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -44[rbp]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, 0
	mov	esi, 504
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	DWORD PTR -28[rbp], -1437270016
	lea	rax, -28[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, 0
	mov	esi, 508
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 4
	mov	rdi, rax
	call	fwrite@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	record_kernel_sectors, .-record_kernel_sectors
	.section	.rodata
.LC1:
	.string	"0x%x:bootblock\n"
.LC2:
	.string	"\tsegment %d\n"
.LC3:
	.string	"\t\toffset 0x%x\tvaddr 0x%x\n"
.LC4:
	.string	"\t\tfilesize 0x%x\tmemsz 0x%x\n"
.LC5:
	.string	"\t\twriting 0x%x bytes\n"
.LC6:
	.string	"\t\tpadding up to 0x%x\n"
.LC7:
	.string	"0x%x:kernel\n"
	.align 8
.LC8:
	.string	"-----------------my createimage---------------"
	.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
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	esi, 0
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 8[rax]
	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
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 20[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR boot_pad[rip]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	esi, 0
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR 20[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR kernel_pad[rip]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	extent_opt, .-extent_opt
	.section	.rodata
.LC9:
	.string	"rb"
.LC10:
	.string	"bootblock"
.LC11:
	.string	"main"
.LC12:
	.string	"wb"
.LC13:
	.string	"image"
.LC14:
	.string	"os_size:%d\n"
	.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, 48
	lea	rsi, .LC9[rip]
	lea	rdi, .LC10[rip]
	call	fopen@PLT
	mov	QWORD PTR -40[rbp], rax
	lea	rsi, .LC9[rip]
	lea	rdi, .LC11[rip]
	call	fopen@PLT
	mov	QWORD PTR -32[rbp], rax
	lea	rsi, .LC12[rip]
	lea	rdi, .LC13[rip]
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	read_exec_file
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	read_exec_file
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	count_kernel_sectors
	mov	BYTE PTR -41[rbp], al
	mov	rdx, QWORD PTR -16[rbp]
	mov	rcx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	write_bootblock
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 0
	mov	esi, 512
	mov	rdi, rax
	call	fseek@PLT
	movzx	ecx, BYTE PTR -41[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	write_kernel
	movzx	edx, BYTE PTR -41[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	record_kernel_sectors
	movzx	edx, BYTE PTR -41[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	extent_opt
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
	movzx	eax, BYTE PTR -41[rbp]
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	main, .-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	"32951347.c"
	.text
	.comm	boot_pad,4,4
	.comm	kernel_pad,4,4
	.comm	kernel_filesz,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"e_phnum:%d\012\000"
	.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 = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r0, #32
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	mov	r0, #52
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #52
	ldr	r0, [fp, #-8]
	bl	fread
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #28]
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	fseek
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #32
	ldr	r0, [fp, #-12]
	bl	fread
	ldr	r3, [fp, #-8]
	ldrh	r3, [r3, #44]
	mov	r1, r3
	ldr	r0, .L3
	bl	printf
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.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, #20]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	add	r3, r3, #508
	add	r3, r3, #3
	add	r2, r3, #508
	add	r2, r2, #3
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #9
	and	r3, r3, #255
	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 = 552
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #552
	str	r0, [fp, #-544]
	str	r1, [fp, #-548]
	str	r2, [fp, #-552]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-552]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-536]
	ldr	r3, [fp, #-552]
	ldr	r3, [r3, #20]
	str	r3, [fp, #-532]
	ldr	r3, [fp, #-532]
	add	r3, r3, #508
	add	r3, r3, #3
	bic	r3, r3, #508
	bic	r3, r3, #3
	ldr	r2, .L10+4
	str	r3, [r2]
	ldr	r3, [fp, #-536]
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-548]
	bl	fseek
	sub	r0, fp, #528
	ldr	r3, [fp, #-548]
	mov	r2, #1
	ldr	r1, [fp, #-532]
	bl	fread
	sub	r0, fp, #528
	ldr	r3, [fp, #-544]
	mov	r2, #1
	ldr	r1, [fp, #-532]
	bl	fwrite
	nop
	ldr	r3, .L10
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC1
	.word	boot_pad
	.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 = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	str	r2, [fp, #-56]
	str	r3, [fp, #-60]
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-56]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-56]
	ldr	r3, [r3, #20]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-56]
	ldr	r3, [r3, #16]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-24]
	add	r3, r3, #508
	add	r3, r3, #3
	bic	r3, r3, #508
	bic	r3, r3, #3
	ldr	r2, .L19+4
	str	r3, [r2]
	ldr	r3, [fp, #-28]
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-52]
	bl	fseek
	ldr	r3, .L19+4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-20]
	sub	r3, r2, r3
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L13
.L14:
	sub	r0, fp, #37
	ldr	r3, [fp, #-52]
	mov	r2, #1
	mov	r1, #1
	bl	fread
	sub	r0, fp, #37
	ldr	r3, [fp, #-48]
	mov	r2, #1
	mov	r1, #1
	bl	fwrite
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L13:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L14
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L15
.L16:
	sub	r0, fp, #36
	ldr	r3, [fp, #-48]
	mov	r2, #1
	mov	r1, #1
	bl	fwrite
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L15:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	blt	.L16
	nop
	ldr	r3, .L19
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L18
	bl	__stack_chk_fail
.L18:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC2
	.word	kernel_pad
	.size	write_kernel, .-write_kernel
	.section	.rodata
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	record_kernel_sectors
	.syntax unified
	.arm
	.fpu softvfp
	.type	record_kernel_sectors, %function
record_kernel_sectors:
	@ 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]
	mov	r3, r1
	strb	r3, [fp, #-25]
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #25
	str	r3, [fp, #-16]
	mov	r2, #0
	mov	r1, #504
	ldr	r0, [fp, #-24]
	bl	fseek
	ldr	r3, [fp, #-24]
	mov	r2, #1
	mov	r1, #1
	ldr	r0, [fp, #-16]
	bl	fwrite
	ldr	r3, .L23+4
	str	r3, [fp, #-20]
	sub	r3, fp, #20
	str	r3, [fp, #-12]
	mov	r2, #0
	mov	r1, #508
	ldr	r0, [fp, #-24]
	bl	fseek
	ldr	r3, [fp, #-24]
	mov	r2, #1
	mov	r1, #4
	ldr	r0, [fp, #-12]
	bl	fwrite
	nop
	ldr	r3, .L23
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L22
	bl	__stack_chk_fail
.L22:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC3
	.word	-1437270016
	.size	record_kernel_sectors, .-record_kernel_sectors
	.section	.rodata
	.align	2
.LC4:
	.ascii	"0x%x:bootblock\012\000"
	.align	2
.LC5:
	.ascii	"\011segment %d\012\000"
	.align	2
.LC6:
	.ascii	"\011\011offset 0x%x\011vaddr 0x%x\012\000"
	.align	2
.LC7:
	.ascii	"\011\011filesize 0x%x\011memsz 0x%x\012\000"
	.align	2
.LC8:
	.ascii	"\011\011writing 0x%x bytes\012\000"
	.align	2
.LC9:
	.ascii	"\011\011padding up to 0x%x\012\000"
	.align	2
.LC10:
	.ascii	"0x%x:kernel\012\000"
	.align	2
.LC11:
	.ascii	"-----------------my createimage---------------\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]
	ldr	r3, [r3, #8]
	mov	r1, r3
	ldr	r0, .L26
	bl	printf
	mov	r1, #0
	ldr	r0, .L26+4
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r1, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	mov	r2, r3
	ldr	r0, .L26+8
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r1, [r3, #16]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #20]
	mov	r2, r3
	ldr	r0, .L26+12
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	mov	r1, r3
	ldr	r0, .L26+16
	bl	printf
	ldr	r3, .L26+20
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L26+24
	bl	printf
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #8]
	mov	r1, r3
	ldr	r0, .L26+28
	bl	printf
	mov	r1, #0
	ldr	r0, .L26+4
	bl	printf
	ldr	r3, [fp, #-12]
	ldr	r1, [r3, #4]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #8]
	mov	r2, r3
	ldr	r0, .L26+8
	bl	printf
	ldr	r3, [fp, #-12]
	ldr	r1, [r3, #16]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #20]
	mov	r2, r3
	ldr	r0, .L26+12
	bl	printf
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #16]
	mov	r1, r3
	ldr	r0, .L26+16
	bl	printf
	ldr	r3, .L26+32
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L26+24
	bl	printf
	ldr	r0, .L26+36
	bl	puts
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	boot_pad
	.word	.LC9
	.word	.LC10
	.word	kernel_pad
	.word	.LC11
	.size	extent_opt, .-extent_opt
	.section	.rodata
	.align	2
.LC12:
	.ascii	"rb\000"
	.align	2
.LC13:
	.ascii	"bootblock\000"
	.align	2
.LC14:
	.ascii	"main\000"
	.align	2
.LC15:
	.ascii	"wb\000"
	.align	2
.LC16:
	.ascii	"image\000"
	.align	2
.LC17:
	.ascii	"os_size:%d\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r1, .L30
	ldr	r0, .L30+4
	bl	fopen
	str	r0, [fp, #-24]
	ldr	r1, .L30
	ldr	r0, .L30+8
	bl	fopen
	str	r0, [fp, #-20]
	ldr	r1, .L30+12
	ldr	r0, .L30+16
	bl	fopen
	str	r0, [fp, #-16]
	ldr	r0, [fp, #-24]
	bl	read_exec_file
	str	r0, [fp, #-12]
	ldr	r0, [fp, #-20]
	bl	read_exec_file
	str	r0, [fp, #-8]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-16]
	bl	fseek
	ldr	r0, [fp, #-8]
	bl	count_kernel_sectors
	mov	r3, r0
	strb	r3, [fp, #-25]
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-16]
	bl	write_bootblock
	mov	r2, #0
	mov	r1, #512
	ldr	r0, [fp, #-16]
	bl	fseek
	ldrb	r3, [fp, #-25]	@ zero_extendqisi2
	ldr	r2, [fp, #-8]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	write_kernel
	ldrb	r3, [fp, #-25]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	record_kernel_sectors
	ldrb	r3, [fp, #-25]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	extent_opt
	ldr	r0, [fp, #-24]
	bl	fclose
	ldr	r0, [fp, #-20]
	bl	fclose
	ldr	r0, [fp, #-16]
	bl	fclose
	ldrb	r3, [fp, #-25]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L30+20
	bl	printf
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
