	.file	"330895.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Usage: %s <file> <dtb>\n"
.LC1:
	.string	"DTB not found\n"
.LC2:
	.string	"DTB too big\n"
.LC3:
	.string	"Could not open DTB"
.LC4:
	.string	"Could not open kernel image"
.LC5:
	.string	"OWRTDTB:"
.LC6:
	.string	"DTB marker not found!\n"
	.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, 224
	mov	DWORD PTR -212[rbp], edi
	mov	QWORD PTR -224[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -204[rbp], 0
	mov	DWORD PTR -200[rbp], -1
	cmp	DWORD PTR -212[rbp], 3
	je	.L2
	mov	rax, QWORD PTR -224[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -224[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -196[rbp], eax
	cmp	DWORD PTR -196[rbp], 0
	je	.L22
	mov	rax, QWORD PTR -224[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rdx, -160[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	test	eax, eax
	je	.L5
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 14
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	jmp	.L3
.L5:
	mov	rax, QWORD PTR -112[rbp]
	mov	DWORD PTR -192[rbp], eax
	cmp	DWORD PTR -192[rbp], 16376
	jle	.L6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 12
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	jmp	.L3
.L6:
	mov	rax, QWORD PTR -224[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -196[rbp], eax
	cmp	DWORD PTR -196[rbp], 0
	js	.L7
	mov	eax, DWORD PTR -196[rbp]
	mov	r9d, 0
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 1
	mov	esi, 16384
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -176[rbp], rax
	cmp	QWORD PTR -176[rbp], -1
	jne	.L8
.L7:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 18
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	jmp	.L9
.L8:
	mov	rax, QWORD PTR -224[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 2
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -188[rbp], eax
	cmp	DWORD PTR -188[rbp], 0
	js	.L10
	mov	eax, DWORD PTR -188[rbp]
	mov	r9d, 0
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 3
	mov	esi, 32768
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -168[rbp], rax
	cmp	QWORD PTR -168[rbp], -1
	jne	.L11
.L10:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 27
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	jmp	.L12
.L11:
	mov	rax, QWORD PTR -168[rbp]
	mov	QWORD PTR -184[rbp], rax
	jmp	.L13
.L16:
	mov	rax, QWORD PTR -184[rbp]
	mov	edx, 8
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	memcmp@PLT
	test	eax, eax
	jne	.L14
	mov	DWORD PTR -204[rbp], 1
	add	QWORD PTR -184[rbp], 8
	jmp	.L15
.L14:
	add	QWORD PTR -184[rbp], 4
.L13:
	mov	rax, QWORD PTR -168[rbp]
	add	rax, 16384
	cmp	QWORD PTR -184[rbp], rax
	jb	.L16
.L15:
	cmp	DWORD PTR -204[rbp], 0
	jne	.L17
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 22
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
	jmp	.L18
.L17:
	mov	rax, QWORD PTR -184[rbp]
	mov	edx, 16376
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	eax, DWORD PTR -192[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -176[rbp]
	mov	rax, QWORD PTR -184[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	eax, DWORD PTR -192[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -184[rbp]
	mov	edx, 6
	mov	rsi, rcx
	mov	rdi, rax
	call	msync@PLT
	mov	DWORD PTR -200[rbp], 0
.L18:
	mov	eax, DWORD PTR -192[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -168[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	munmap@PLT
.L12:
	cmp	DWORD PTR -188[rbp], 0
	jle	.L19
	mov	eax, DWORD PTR -188[rbp]
	mov	edi, eax
	call	close@PLT
.L19:
	mov	eax, DWORD PTR -192[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -176[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	munmap@PLT
.L9:
	cmp	DWORD PTR -196[rbp], 0
	jle	.L23
	mov	eax, DWORD PTR -196[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L3
.L22:
	nop
	jmp	.L3
.L23:
	nop
.L3:
	mov	eax, DWORD PTR -200[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"330895.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: %s <file> <dtb>\012\000"
	.align	2
.LC1:
	.ascii	"DTB not found\012\000"
	.align	2
.LC2:
	.ascii	"DTB too big\012\000"
	.align	2
.LC3:
	.ascii	"Could not open DTB\000"
	.align	2
.LC4:
	.ascii	"Could not open kernel image\000"
	.align	2
.LC5:
	.ascii	"OWRTDTB:\000"
	.align	2
.LC6:
	.ascii	"DTB marker not found!\012\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 136
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #144
	str	r0, [fp, #-136]
	str	r1, [fp, #-140]
	ldr	r3, .L24
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-132]
	mvn	r3, #0
	str	r3, [fp, #-128]
	ldr	r3, [fp, #-136]
	cmp	r3, #3
	beq	.L2
	ldr	r3, .L24+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-140]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L24+8
	bl	fprintf
	b	.L3
.L2:
	ldr	r3, [fp, #-140]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-120]
	ldr	r3, [fp, #-120]
	cmp	r3, #0
	beq	.L22
	ldr	r3, [fp, #-140]
	add	r3, r3, #8
	ldr	r3, [r3]
	sub	r2, fp, #100
	mov	r1, r2
	mov	r0, r3
	bl	stat
	mov	r3, r0
	cmp	r3, #0
	beq	.L5
	ldr	r3, .L24+4
	ldr	r3, [r3]
	mov	r2, #14
	mov	r1, #1
	ldr	r0, .L24+12
	bl	fwrite
	b	.L3
.L5:
	ldr	r3, [fp, #-56]
	str	r3, [fp, #-116]
	ldr	r3, [fp, #-116]
	ldr	r2, .L24+16
	cmp	r3, r2
	ble	.L6
	ldr	r3, .L24+4
	ldr	r3, [r3]
	mov	r2, #12
	mov	r1, #1
	ldr	r0, .L24+20
	bl	fwrite
	b	.L3
.L6:
	ldr	r3, [fp, #-140]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-120]
	ldr	r3, [fp, #-120]
	cmp	r3, #0
	blt	.L7
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-120]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #1
	mov	r1, #16384
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-112]
	ldr	r3, [fp, #-112]
	cmn	r3, #1
	bne	.L8
.L7:
	ldr	r3, .L24+4
	ldr	r3, [r3]
	mov	r2, #18
	mov	r1, #1
	ldr	r0, .L24+24
	bl	fwrite
	b	.L9
.L8:
	ldr	r3, [fp, #-140]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #2
	mov	r0, r3
	bl	open
	str	r0, [fp, #-108]
	ldr	r3, [fp, #-108]
	cmp	r3, #0
	blt	.L10
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-108]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r1, #32768
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-104]
	ldr	r3, [fp, #-104]
	cmn	r3, #1
	bne	.L11
.L10:
	ldr	r3, .L24+4
	ldr	r3, [r3]
	mov	r2, #27
	mov	r1, #1
	ldr	r0, .L24+28
	bl	fwrite
	b	.L12
.L11:
	ldr	r3, [fp, #-104]
	str	r3, [fp, #-124]
	b	.L13
.L16:
	mov	r2, #8
	ldr	r1, .L24+32
	ldr	r0, [fp, #-124]
	bl	memcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L14
	mov	r3, #1
	str	r3, [fp, #-132]
	ldr	r3, [fp, #-124]
	add	r3, r3, #8
	str	r3, [fp, #-124]
	b	.L15
.L14:
	ldr	r3, [fp, #-124]
	add	r3, r3, #4
	str	r3, [fp, #-124]
.L13:
	ldr	r3, [fp, #-104]
	add	r3, r3, #16384
	ldr	r2, [fp, #-124]
	cmp	r2, r3
	bcc	.L16
.L15:
	ldr	r3, [fp, #-132]
	cmp	r3, #0
	bne	.L17
	ldr	r3, .L24+4
	ldr	r3, [r3]
	mov	r2, #22
	mov	r1, #1
	ldr	r0, .L24+36
	bl	fwrite
	b	.L18
.L17:
	ldr	r2, .L24+16
	mov	r1, #0
	ldr	r0, [fp, #-124]
	bl	memset
	ldr	r3, [fp, #-116]
	mov	r2, r3
	ldr	r1, [fp, #-112]
	ldr	r0, [fp, #-124]
	bl	memcpy
	ldr	r3, [fp, #-116]
	mov	r2, #6
	mov	r1, r3
	ldr	r0, [fp, #-124]
	bl	msync
	mov	r3, #0
	str	r3, [fp, #-128]
.L18:
	ldr	r3, [fp, #-116]
	mov	r1, r3
	ldr	r0, [fp, #-104]
	bl	munmap
.L12:
	ldr	r3, [fp, #-108]
	cmp	r3, #0
	ble	.L19
	ldr	r0, [fp, #-108]
	bl	close
.L19:
	ldr	r3, [fp, #-116]
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	munmap
.L9:
	ldr	r3, [fp, #-120]
	cmp	r3, #0
	ble	.L23
	ldr	r0, [fp, #-120]
	bl	close
	b	.L3
.L22:
	nop
	b	.L3
.L23:
	nop
.L3:
	ldr	r3, [fp, #-128]
	ldr	r2, .L24
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L21
	bl	__stack_chk_fail
.L21:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC7
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	16376
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
