	.file	"extr_fdt_rw.c_fdt_open_into.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	fdt_open_into
	.type	fdt_open_into, @function
fdt_open_into:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, edx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	fdt_totalsize@PLT
	mov	rdi, rbp
	movsx	r13, eax
	call	FDT_CHECK_HEADER@PLT
	mov	rdi, rbp
	call	fdt_num_mem_rsv@PLT
	mov	rdi, rbp
	lea	r15d, 4[0+rax*4]
	call	fdt_version@PLT
	cmp	eax, 16
	jg	.L21
	mov	DWORD PTR 20[rsp], 0
	xor	esi, esi
	lea	rbx, 20[rsp]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L22:
	mov	esi, DWORD PTR 20[rsp]
.L5:
	mov	rdx, rbx
	mov	rdi, rbp
	call	fdt_next_tag@PLT
	cmp	rax, QWORD PTR FDT_END[rip]
	jne	.L22
	mov	edx, DWORD PTR 20[rsp]
	test	edx, edx
	js	.L1
	mov	esi, r15d
	mov	rdi, rbp
	call	_fdt_blocks_misordered@PLT
	test	eax, eax
	je	.L23
.L7:
	mov	esi, 8
	mov	edi, 4
	call	FDT_ALIGN@PLT
	mov	rdi, rbp
	lea	ebx, [rax+r15]
	add	ebx, DWORD PTR 20[rsp]
	call	fdt_size_dt_strings@PLT
	add	ebx, eax
	cmp	ebx, r14d
	jg	.L10
	movsx	rax, ebx
	add	r13, rbp
	lea	rdx, [r12+rax]
	cmp	rbp, rdx
	jnb	.L12
	cmp	r13, r12
	jbe	.L12
	movsx	rdx, r14d
	add	rax, r13
	add	rdx, r12
	cmp	rax, rdx
	ja	.L10
.L9:
	mov	ecx, DWORD PTR 20[rsp]
	mov	edx, r15d
	mov	rsi, r13
	mov	rdi, rbp
	call	_fdt_packblocks@PLT
	mov	edx, ebx
	mov	rsi, r13
	mov	rdi, r12
	call	memmove@PLT
	mov	esi, DWORD PTR FDT_MAGIC[rip]
	mov	rdi, r12
	call	fdt_set_magic@PLT
	mov	esi, r14d
	mov	rdi, r12
	call	fdt_set_totalsize@PLT
	mov	esi, 17
	mov	rdi, r12
	call	fdt_set_version@PLT
	mov	esi, 16
	mov	rdi, r12
	call	fdt_set_last_comp_version@PLT
	mov	rdi, rbp
	call	fdt_boot_cpuid_phys@PLT
	mov	rdi, r12
	mov	esi, eax
	call	fdt_set_boot_cpuid_phys@PLT
	xor	edx, edx
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L24
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, edx
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	mov	edx, r14d
	mov	rsi, r12
	mov	rdi, rbp
	call	fdt_move@PLT
	mov	edx, eax
	test	eax, eax
	jne	.L1
	mov	esi, 17
	mov	rdi, r12
	mov	DWORD PTR 12[rsp], eax
	call	fdt_set_version@PLT
	mov	esi, DWORD PTR 20[rsp]
	mov	rdi, r12
	call	fdt_set_size_dt_struct@PLT
	mov	esi, r14d
	mov	rdi, r12
	call	fdt_set_totalsize@PLT
	mov	edx, DWORD PTR 12[rsp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rdi, rbp
	call	fdt_size_dt_struct@PLT
	mov	esi, r15d
	mov	rdi, rbp
	mov	edx, eax
	mov	DWORD PTR 20[rsp], eax
	call	_fdt_blocks_misordered@PLT
	test	eax, eax
	jne	.L7
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L12:
	mov	r13, r12
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L10:
	mov	edx, DWORD PTR FDT_ERR_NOSPACE[rip]
	neg	edx
	jmp	.L1
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	fdt_open_into, .-fdt_open_into
	.comm	FDT_MAGIC,4,4
	.comm	FDT_ERR_NOSPACE,4,4
	.comm	FDT_END,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_fdt_rw.c_fdt_open_into.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	fdt_open_into
	.syntax unified
	.arm
	.fpu softvfp
	.type	fdt_open_into, %function
fdt_open_into:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L20
	sub	sp, sp, #20
	mov	r4, r0
	mov	r6, r1
	mov	r8, r2
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	fdt_totalsize
	mov	r7, r0
	mov	r0, r4
	bl	FDT_CHECK_HEADER
	mov	r0, r4
	bl	fdt_num_mem_rsv
	mov	r5, r0
	mov	r0, r4
	bl	fdt_version
	add	r5, r5, #1
	cmp	r0, #16
	lsl	r5, r5, #2
	bgt	.L15
	mov	r3, #0
	ldr	r9, .L20+4
	mov	r1, r3
	str	r3, [sp, #8]
	b	.L5
.L16:
	ldr	r1, [sp, #8]
.L5:
	mov	r0, r4
	add	r2, sp, #8
	bl	fdt_next_tag
	ldr	r3, [r9]
	cmp	r0, r3
	bne	.L16
	ldr	r2, [sp, #8]
	cmp	r2, #0
	blt	.L1
.L3:
	mov	r1, r5
	mov	r0, r4
	bl	_fdt_blocks_misordered
	cmp	r0, #0
	beq	.L17
	mov	r1, #8
	mov	r0, #4
	bl	FDT_ALIGN
	ldr	r3, [sp, #8]
	add	r9, r0, r5
	mov	r0, r4
	add	r9, r9, r3
	bl	fdt_size_dt_strings
	add	r9, r9, r0
	cmp	r9, r8
	bgt	.L10
	add	r3, r6, r9
	cmp	r4, r3
	add	r7, r4, r7
	movcs	r3, #0
	movcc	r3, #1
	cmp	r7, r6
	movls	r3, #0
	cmp	r3, #0
	moveq	r7, r6
	bne	.L18
.L9:
	ldr	r3, [sp, #8]
	mov	r2, r5
	mov	r1, r7
	mov	r0, r4
	bl	_fdt_packblocks
	mov	r2, r9
	mov	r1, r7
	mov	r0, r6
	bl	memmove
	ldr	r3, .L20+8
	mov	r0, r6
	ldr	r1, [r3]
	bl	fdt_set_magic
	mov	r1, r8
	mov	r0, r6
	bl	fdt_set_totalsize
	mov	r1, #17
	mov	r0, r6
	bl	fdt_set_version
	mov	r1, #16
	mov	r0, r6
	bl	fdt_set_last_comp_version
	mov	r0, r4
	bl	fdt_boot_cpuid_phys
	mov	r1, r0
	mov	r0, r6
	bl	fdt_set_boot_cpuid_phys
	mov	r2, #0
.L1:
	ldr	r3, .L20
	ldr	r1, [r3]
	ldr	r3, [sp, #12]
	eors	r1, r3, r1
	mov	r3, #0
	bne	.L19
	mov	r0, r2
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L17:
	mov	r2, r8
	mov	r0, r4
	mov	r1, r6
	bl	fdt_move
	subs	r2, r0, #0
	bne	.L1
	mov	r1, #17
	mov	r0, r6
	str	r2, [sp, #4]
	bl	fdt_set_version
	ldr	r1, [sp, #8]
	mov	r0, r6
	bl	fdt_set_size_dt_struct
	mov	r1, r8
	mov	r0, r6
	bl	fdt_set_totalsize
	ldr	r2, [sp, #4]
	b	.L1
.L15:
	mov	r0, r4
	bl	fdt_size_dt_struct
	mov	r2, r0
	str	r0, [sp, #8]
	b	.L3
.L18:
	add	r3, r7, r9
	add	r2, r6, r8
	cmp	r3, r2
	bls	.L9
.L10:
	ldr	r3, .L20+12
	ldr	r2, [r3]
	rsb	r2, r2, #0
	b	.L1
.L19:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	.LC0
	.word	FDT_END
	.word	FDT_MAGIC
	.word	FDT_ERR_NOSPACE
	.size	fdt_open_into, .-fdt_open_into
	.comm	FDT_MAGIC,4,4
	.comm	FDT_ERR_NOSPACE,4,4
	.comm	FDT_END,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
