	.file	"199065.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"mkkdtb kernfile dtbfile outfile"
	.text
	.globl	print_usage
	.type	print_usage, @function
print_usage:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	print_usage, .-print_usage
	.section	.rodata
.LC1:
	.string	"r"
.LC2:
	.string	"Kernel file not found\n"
.LC3:
	.string	"DTB file not found\n"
.LC4:
	.string	"w"
.LC5:
	.string	"Can't open output file\n"
.LC6:
	.string	"kernel read error\n"
.LC7:
	.string	"dtb read error\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 96
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -68[rbp], 0
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	DWORD PTR -20[rbp], 1112818763
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	cmp	DWORD PTR -84[rbp], 3
	jg	.L4
	call	print_usage
	mov	eax, -1
	jmp	.L19
.L4:
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 22
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	DWORD PTR -68[rbp], -1
	jmp	.L7
.L6:
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -48[rbp], rax
	cmp	QWORD PTR -48[rbp], 0
	jne	.L8
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 19
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	DWORD PTR -68[rbp], -1
	jmp	.L7
.L8:
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 0
	jne	.L9
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 23
	mov	esi, 1
	lea	rdi, .LC5[rip]
	call	fwrite@PLT
	mov	DWORD PTR -68[rbp], -1
	jmp	.L7
.L9:
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	DWORD PTR -16[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	eax, DWORD PTR -16[rbp]
	mov	eax, eax
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -64[rbp], rax
	cmp	QWORD PTR -64[rbp], 0
	jne	.L10
	mov	DWORD PTR -68[rbp], -1
	jmp	.L7
.L10:
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, eax
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fread@PLT
	cmp	rax, 1
	je	.L11
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 18
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
	mov	DWORD PTR -68[rbp], -1
	jmp	.L7
.L11:
	mov	eax, DWORD PTR -12[rbp]
	mov	eax, eax
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -56[rbp], rax
	cmp	QWORD PTR -56[rbp], 0
	jne	.L12
	mov	DWORD PTR -68[rbp], -1
	jmp	.L7
.L12:
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fread@PLT
	cmp	rax, 1
	je	.L13
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 15
	mov	esi, 1
	lea	rdi, .LC7[rip]
	call	fwrite@PLT
	mov	DWORD PTR -68[rbp], -1
	jmp	.L7
.L13:
	mov	rdx, QWORD PTR -40[rbp]
	lea	rax, -20[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 12
	mov	rdi, rax
	call	fwrite@PLT
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, eax
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rcx, rdx
	mov	rdx, rsi
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	rcx, rdx
	mov	rdx, rsi
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
.L7:
	cmp	QWORD PTR -32[rbp], 0
	je	.L14
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L14:
	cmp	QWORD PTR -48[rbp], 0
	je	.L15
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L15:
	cmp	QWORD PTR -40[rbp], 0
	je	.L16
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L16:
	cmp	QWORD PTR -64[rbp], 0
	je	.L17
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	free@PLT
.L17:
	cmp	QWORD PTR -56[rbp], 0
	je	.L18
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	free@PLT
.L18:
	mov	eax, DWORD PTR -68[rbp]
.L19:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"199065.c"
	.text
	.section	.rodata
	.align	2
.LC1:
	.ascii	"mkkdtb kernfile dtbfile outfile\000"
	.text
	.align	2
	.global	print_usage
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_usage, %function
print_usage:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L3
	bl	puts
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	.LC1
	.size	print_usage, .-print_usage
	.section	.rodata
	.align	2
.LC2:
	.ascii	"r\000"
	.align	2
.LC3:
	.ascii	"Kernel file not found\012\000"
	.align	2
.LC4:
	.ascii	"DTB file not found\012\000"
	.align	2
.LC5:
	.ascii	"w\000"
	.align	2
.LC6:
	.ascii	"Can't open output file\012\000"
	.align	2
.LC7:
	.ascii	"kernel read error\012\000"
	.align	2
.LC8:
	.ascii	"dtb read error\012\000"
	.align	2
.LC0:
	.ascii	"KDTB"
	.word	0
	.word	0
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-28]
	ldr	r2, .L23+4
	sub	r3, fp, #20
	ldm	r2, {r0, r1, r2}
	stm	r3, {r0, r1, r2}
	ldr	r3, [fp, #-48]
	cmp	r3, #3
	bgt	.L6
	bl	print_usage
	mvn	r3, #0
	b	.L21
.L6:
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L23+8
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L8
	ldr	r3, .L23+12
	ldr	r3, [r3]
	mov	r2, #22
	mov	r1, #1
	ldr	r0, .L23+16
	bl	fwrite
	mvn	r3, #0
	str	r3, [fp, #-44]
	b	.L9
.L8:
	ldr	r3, [fp, #-52]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r1, .L23+8
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L10
	ldr	r3, .L23+12
	ldr	r3, [r3]
	mov	r2, #19
	mov	r1, #1
	ldr	r0, .L23+20
	bl	fwrite
	mvn	r3, #0
	str	r3, [fp, #-44]
	b	.L9
.L10:
	ldr	r3, [fp, #-52]
	add	r3, r3, #12
	ldr	r3, [r3]
	ldr	r1, .L23+24
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L11
	ldr	r3, .L23+12
	ldr	r3, [r3]
	mov	r2, #23
	mov	r1, #1
	ldr	r0, .L23+28
	bl	fwrite
	mvn	r3, #0
	str	r3, [fp, #-44]
	b	.L9
.L11:
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-24]
	bl	fseek
	ldr	r0, [fp, #-24]
	bl	ftell
	mov	r3, r0
	str	r3, [fp, #-16]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-24]
	bl	fseek
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-32]
	bl	fseek
	ldr	r0, [fp, #-32]
	bl	ftell
	mov	r3, r0
	str	r3, [fp, #-12]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-32]
	bl	fseek
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bne	.L12
	mvn	r3, #0
	str	r3, [fp, #-44]
	b	.L9
.L12:
	ldr	r1, [fp, #-16]
	ldr	r3, [fp, #-24]
	mov	r2, #1
	ldr	r0, [fp, #-40]
	bl	fread
	mov	r3, r0
	cmp	r3, #1
	beq	.L13
	ldr	r3, .L23+12
	ldr	r3, [r3]
	mov	r2, #18
	mov	r1, #1
	ldr	r0, .L23+32
	bl	fwrite
	mvn	r3, #0
	str	r3, [fp, #-44]
	b	.L9
.L13:
	ldr	r3, [fp, #-12]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L14
	mvn	r3, #0
	str	r3, [fp, #-44]
	b	.L9
.L14:
	ldr	r1, [fp, #-12]
	ldr	r3, [fp, #-32]
	mov	r2, #1
	ldr	r0, [fp, #-36]
	bl	fread
	mov	r3, r0
	cmp	r3, #1
	beq	.L15
	ldr	r3, .L23+12
	ldr	r3, [r3]
	mov	r2, #15
	mov	r1, #1
	ldr	r0, .L23+36
	bl	fwrite
	mvn	r3, #0
	str	r3, [fp, #-44]
	b	.L9
.L15:
	sub	r0, fp, #20
	ldr	r3, [fp, #-28]
	mov	r2, #1
	mov	r1, #12
	bl	fwrite
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-28]
	mov	r1, #1
	ldr	r0, [fp, #-40]
	bl	fwrite
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-28]
	mov	r1, #1
	ldr	r0, [fp, #-36]
	bl	fwrite
.L9:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	beq	.L16
	ldr	r0, [fp, #-24]
	bl	fclose
.L16:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	beq	.L17
	ldr	r0, [fp, #-32]
	bl	fclose
.L17:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L18
	ldr	r0, [fp, #-28]
	bl	fclose
.L18:
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	beq	.L19
	ldr	r0, [fp, #-40]
	bl	free
.L19:
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L20
	ldr	r0, [fp, #-36]
	bl	free
.L20:
	ldr	r3, [fp, #-44]
.L21:
	ldr	r2, .L23
	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}
.L24:
	.align	2
.L23:
	.word	.LC9
	.word	.LC0
	.word	.LC2
	.word	stderr
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
