	.file	"17806.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"[ERROR] ImageMaker BootLoader.bin Kernel32.bin Kernel64.bin\n"
.LC1:
	.string	"Disk.img"
.LC2:
	.string	"[ERROR] Disk.img open fail.\n"
	.align 8
.LC3:
	.string	"[INFO] Copy boot loader to image file"
.LC4:
	.string	"[ERROR] %s open fail\n"
	.align 8
.LC5:
	.string	"[INFO] %s size = [%d] and sector count = [%d]\n"
	.align 8
.LC6:
	.string	"[INFO] Copy protected mode kernel to image file"
	.align 8
.LC7:
	.string	"[INFO] Start to write kernel information"
	.align 8
.LC8:
	.string	"[INFO] Image file create complete"
	.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	cmp	DWORD PTR -36[rbp], 3
	jg	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 60
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	edi, -1
	call	exit@PLT
.L2:
	mov	edx, 384
	mov	esi, 578
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -24[rbp], eax
	cmp	DWORD PTR -24[rbp], -1
	jne	.L3
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 28
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	edi, -1
	call	exit@PLT
.L3:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], -1
	jne	.L4
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, -1
	call	exit@PLT
.L4:
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, edx
	mov	edi, eax
	call	ConcatenateFile
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, edx
	mov	edi, eax
	call	AdjustInSectorSize
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	ecx, DWORD PTR -12[rbp]
	mov	edx, DWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], -1
	jne	.L5
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 16
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, -1
	call	exit@PLT
.L5:
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, edx
	mov	edi, eax
	call	ConcatenateFile
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, edx
	mov	edi, eax
	call	AdjustInSectorSize
	mov	DWORD PTR -8[rbp], eax
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	ecx, DWORD PTR -8[rbp]
	mov	edx, DWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], -1
	jne	.L6
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 24
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, -1
	call	exit@PLT
.L6:
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, edx
	mov	edi, eax
	call	ConcatenateFile
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, edx
	mov	edi, eax
	call	AdjustInSectorSize
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	mov	ecx, DWORD PTR -8[rbp]
	mov	edx, DWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -4[rbp]
	lea	ecx, [rdx+rax]
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	WriteKernelInformation
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -24[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC9:
	.string	"[INFO] File size [%d] and fill [%d] byte\n"
	.align 8
.LC10:
	.string	"[INFO] File size is aligned 512 byte"
	.text
	.globl	AdjustInSectorSize
	.type	AdjustInSectorSize, @function
AdjustInSectorSize:
.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	DWORD PTR -36[rbp], edi
	mov	DWORD PTR -40[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -40[rbp]
	cdq
	shr	edx, 23
	add	eax, edx
	and	eax, 511
	sub	eax, edx
	mov	DWORD PTR -16[rbp], eax
	mov	BYTE PTR -21[rbp], 0
	cmp	DWORD PTR -16[rbp], 0
	je	.L9
	mov	eax, 512
	sub	eax, DWORD PTR -16[rbp]
	mov	DWORD PTR -16[rbp], eax
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -40[rbp]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -20[rbp], 0
	jmp	.L10
.L11:
	lea	rcx, -21[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	add	DWORD PTR -20[rbp], 1
.L10:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -16[rbp]
	jl	.L11
	jmp	.L12
.L9:
	lea	rdi, .LC10[rip]
	call	puts@PLT
.L12:
	mov	edx, DWORD PTR -40[rbp]
	mov	eax, DWORD PTR -16[rbp]
	add	eax, edx
	lea	edx, 511[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 9
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	AdjustInSectorSize, .-AdjustInSectorSize
	.section	.rodata
	.align 8
.LC11:
	.string	"lseek fail. Return value = %ld, errno = %d, %d\n"
	.align 8
.LC12:
	.string	"[INFO] Total sector count except boot loader [%d]\n"
	.align 8
.LC13:
	.string	"[INFO] Total sector count of protected mode kernel [%d]\n"
	.text
	.globl	WriteKernelInformation
	.type	WriteKernelInformation, @function
WriteKernelInformation:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	DWORD PTR -40[rbp], esi
	mov	DWORD PTR -44[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 0
	mov	esi, 5
	mov	edi, eax
	call	lseek@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], -1
	jne	.L16
	call	__errno_location@PLT
	mov	ecx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -16[rbp]
	mov	r8d, 0
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, -1
	call	exit@PLT
.L16:
	mov	eax, DWORD PTR -40[rbp]
	mov	WORD PTR -18[rbp], ax
	lea	rcx, -18[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 2
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	eax, DWORD PTR -40[rbp]
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -44[rbp]
	mov	WORD PTR -18[rbp], ax
	lea	rcx, -18[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 2
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	eax, DWORD PTR -44[rbp]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	WriteKernelInformation, .-WriteKernelInformation
	.section	.rodata
.LC14:
	.string	"[ERROR] iRead != iWrite.. \n"
	.text
	.globl	ConcatenateFile
	.type	ConcatenateFile, @function
ConcatenateFile:
.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	DWORD PTR -548[rbp], edi
	mov	DWORD PTR -552[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -540[rbp], 0
.L22:
	lea	rcx, -528[rbp]
	mov	eax, DWORD PTR -548[rbp]
	mov	edx, 512
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -536[rbp], eax
	mov	eax, DWORD PTR -536[rbp]
	movsx	rdx, eax
	lea	rcx, -528[rbp]
	mov	eax, DWORD PTR -552[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -532[rbp], eax
	mov	eax, DWORD PTR -536[rbp]
	cmp	eax, DWORD PTR -532[rbp]
	je	.L19
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 27
	mov	esi, 1
	lea	rdi, .LC14[rip]
	call	fwrite@PLT
	mov	edi, -1
	call	exit@PLT
.L19:
	mov	eax, DWORD PTR -536[rbp]
	add	DWORD PTR -540[rbp], eax
	cmp	DWORD PTR -536[rbp], 512
	jne	.L26
	jmp	.L22
.L26:
	nop
	mov	eax, DWORD PTR -540[rbp]
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	ConcatenateFile, .-ConcatenateFile
	.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	"17806.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"[ERROR] ImageMaker BootLoader.bin Kernel32.bin Kern"
	.ascii	"el64.bin\012\000"
	.align	2
.LC1:
	.ascii	"Disk.img\000"
	.align	2
.LC2:
	.ascii	"[ERROR] Disk.img open fail.\012\000"
	.align	2
.LC3:
	.ascii	"[INFO] Copy boot loader to image file\000"
	.align	2
.LC4:
	.ascii	"[ERROR] %s open fail\012\000"
	.align	2
.LC5:
	.ascii	"[INFO] %s size = [%d] and sector count = [%d]\012\000"
	.align	2
.LC6:
	.ascii	"[INFO] Copy protected mode kernel to image file\000"
	.align	2
.LC7:
	.ascii	"[INFO] Start to write kernel information\000"
	.align	2
.LC8:
	.ascii	"[INFO] Image file create complete\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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, [fp, #-32]
	cmp	r3, #3
	bgt	.L2
	ldr	r3, .L8
	ldr	r3, [r3]
	mov	r2, #60
	mov	r1, #1
	ldr	r0, .L8+4
	bl	fwrite
	mvn	r0, #0
	bl	exit
.L2:
	mov	r2, #384
	ldr	r1, .L8+8
	ldr	r0, .L8+12
	bl	open
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmn	r3, #1
	bne	.L3
	ldr	r3, .L8
	ldr	r3, [r3]
	mov	r2, #28
	mov	r1, #1
	ldr	r0, .L8+16
	bl	fwrite
	mvn	r0, #0
	bl	exit
.L3:
	ldr	r0, .L8+20
	bl	puts
	ldr	r3, [fp, #-36]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmn	r3, #1
	bne	.L4
	ldr	r3, .L8
	ldr	r0, [r3]
	ldr	r3, [fp, #-36]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L8+24
	bl	fprintf
	mvn	r0, #0
	bl	exit
.L4:
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	ConcatenateFile
	str	r0, [fp, #-20]
	ldr	r0, [fp, #-24]
	bl	close
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-28]
	bl	AdjustInSectorSize
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-36]
	add	r3, r3, #4
	ldr	r1, [r3]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-20]
	ldr	r0, .L8+28
	bl	printf
	ldr	r0, .L8+32
	bl	puts
	ldr	r3, [fp, #-36]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmn	r3, #1
	bne	.L5
	ldr	r3, .L8
	ldr	r0, [r3]
	ldr	r3, [fp, #-36]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L8+24
	bl	fprintf
	mvn	r0, #0
	bl	exit
.L5:
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	ConcatenateFile
	str	r0, [fp, #-20]
	ldr	r0, [fp, #-24]
	bl	close
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-28]
	bl	AdjustInSectorSize
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-36]
	add	r3, r3, #8
	ldr	r1, [r3]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-20]
	ldr	r0, .L8+28
	bl	printf
	ldr	r3, [fp, #-36]
	add	r3, r3, #12
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmn	r3, #1
	bne	.L6
	ldr	r3, .L8
	ldr	r0, [r3]
	ldr	r3, [fp, #-36]
	add	r3, r3, #12
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L8+24
	bl	fprintf
	mvn	r0, #0
	bl	exit
.L6:
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	ConcatenateFile
	str	r0, [fp, #-20]
	ldr	r0, [fp, #-24]
	bl	close
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-28]
	bl	AdjustInSectorSize
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-36]
	add	r3, r3, #12
	ldr	r1, [r3]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-20]
	ldr	r0, .L8+28
	bl	printf
	ldr	r0, .L8+36
	bl	puts
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [fp, #-12]
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	WriteKernelInformation
	ldr	r0, .L8+40
	bl	puts
	ldr	r0, [fp, #-28]
	bl	close
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	stderr
	.word	.LC0
	.word	578
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.section	.rodata
	.align	2
.LC9:
	.ascii	"[INFO] File size [%d] and fill [%d] byte\012\000"
	.align	2
.LC10:
	.ascii	"[INFO] File size is aligned 512 byte\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	AdjustInSectorSize
	.syntax unified
	.arm
	.fpu softvfp
	.type	AdjustInSectorSize, %function
AdjustInSectorSize:
	@ 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, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-36]
	rsbs	r2, r3, #0
	lsl	r3, r3, #23
	lsr	r3, r3, #23
	lsl	r2, r2, #23
	lsr	r2, r2, #23
	rsbpl	r3, r2, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	strb	r3, [fp, #-21]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L11
	ldr	r3, [fp, #-16]
	rsb	r3, r3, #512
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-36]
	ldr	r0, .L17+4
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L12
.L13:
	sub	r3, fp, #21
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	write
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L12:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L13
	b	.L14
.L11:
	ldr	r0, .L17+8
	bl	puts
.L14:
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	add	r2, r3, #508
	add	r2, r2, #3
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #9
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r2, .L17
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L16
	bl	__stack_chk_fail
.L16:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC11
	.word	.LC9
	.word	.LC10
	.size	AdjustInSectorSize, .-AdjustInSectorSize
	.section	.rodata
	.align	2
.LC12:
	.ascii	"lseek fail. Return value = %ld, errno = %d, %d\012\000"
	.align	2
.LC13:
	.ascii	"[INFO] Total sector count except boot loader [%d]\012"
	.ascii	"\000"
	.align	2
.LC14:
	.ascii	"[INFO] Total sector count of protected mode kernel "
	.ascii	"[%d]\012\000"
	.align	2
.LC15:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	WriteKernelInformation
	.syntax unified
	.arm
	.fpu softvfp
	.type	WriteKernelInformation, %function
WriteKernelInformation:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #44
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	str	r2, [fp, #-40]
	ldr	r3, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r2, #0
	mov	r1, #5
	ldr	r0, [fp, #-32]
	bl	lseek
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmn	r3, #1
	bne	.L20
	ldr	r3, .L22+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [sp]
	ldr	r2, [fp, #-20]
	ldr	r1, .L22+8
	mov	r0, r4
	bl	fprintf
	mvn	r0, #0
	bl	exit
.L20:
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	strh	r3, [fp, #-22]	@ movhi
	sub	r3, fp, #22
	mov	r2, #2
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	write
	ldr	r1, [fp, #-36]
	ldr	r0, .L22+12
	bl	printf
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	strh	r3, [fp, #-22]	@ movhi
	sub	r3, fp, #22
	mov	r2, #2
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	write
	ldr	r1, [fp, #-40]
	ldr	r0, .L22+16
	bl	printf
	nop
	ldr	r3, .L22
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L21
	bl	__stack_chk_fail
.L21:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC15
	.word	stderr
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.size	WriteKernelInformation, .-WriteKernelInformation
	.section	.rodata
	.align	2
.LC16:
	.ascii	"[ERROR] iRead != iWrite.. \012\000"
	.align	2
.LC17:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ConcatenateFile
	.syntax unified
	.arm
	.fpu softvfp
	.type	ConcatenateFile, %function
ConcatenateFile:
	@ 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]
	str	r1, [fp, #-540]
	ldr	r3, .L33
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-532]
.L28:
	sub	r3, fp, #520
	mov	r2, #512
	mov	r1, r3
	ldr	r0, [fp, #-536]
	bl	read
	str	r0, [fp, #-528]
	ldr	r2, [fp, #-528]
	sub	r3, fp, #520
	mov	r1, r3
	ldr	r0, [fp, #-540]
	bl	write
	str	r0, [fp, #-524]
	ldr	r2, [fp, #-528]
	ldr	r3, [fp, #-524]
	cmp	r2, r3
	beq	.L25
	ldr	r3, .L33+4
	ldr	r3, [r3]
	mov	r2, #27
	mov	r1, #1
	ldr	r0, .L33+8
	bl	fwrite
	mvn	r0, #0
	bl	exit
.L25:
	ldr	r2, [fp, #-532]
	ldr	r3, [fp, #-528]
	add	r3, r2, r3
	str	r3, [fp, #-532]
	ldr	r3, [fp, #-528]
	cmp	r3, #512
	bne	.L32
	b	.L28
.L32:
	nop
	ldr	r3, [fp, #-532]
	ldr	r2, .L33
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L30
	bl	__stack_chk_fail
.L30:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L34:
	.align	2
.L33:
	.word	.LC17
	.word	stderr
	.word	.LC16
	.size	ConcatenateFile, .-ConcatenateFile
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
