	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dtoverlay_import_fdt           ## -- Begin function dtoverlay_import_fdt
	.p2align	4, 0x90
_dtoverlay_import_fdt:                  ## @dtoverlay_import_fdt
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_fdt_check_header
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_dtoverlay_error
	jmp	LBB0_13
LBB0_2:
	movq	%r15, %rdi
	callq	_fdt_totalsize
	cmpl	%ebx, %eax
	jle	LBB0_5
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_4
LBB0_5:
	jge	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_fdt_set_totalsize
LBB0_7:
	movl	$1, %edi
	movl	$16, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rax, %r14
	movq	%r15, 8(%rax)
	movq	$0, (%rax)
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_fdt_next_node
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_13
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_fdt_get_phandle
	cmpq	%r12, %rax
	jle	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rax, (%r14)
	movq	%rax, %r12
	jmp	LBB0_12
LBB0_8:
	leaq	L_.str.2(%rip), %rdi
LBB0_4:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dtoverlay_error
LBB0_13:
	movq	%r14, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"not a valid FDT - err %d"

L_.str.1:                               ## @.str.1
	.asciz	"fdt is too large"

	.comm	_FDT_ERR_NOSPACE,4,2            ## @FDT_ERR_NOSPACE
L_.str.2:                               ## @.str.2
	.asciz	"out of memory"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dtoverlay_import_fdt           ; -- Begin function dtoverlay_import_fdt
	.p2align	2
_dtoverlay_import_fdt:                  ; @dtoverlay_import_fdt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x1
	mov	x19, x0
	bl	_fdt_check_header
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_2
; %bb.1:
	str	x0, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	mov	x0, x19
	bl	_fdt_totalsize
	cmp	w0, w20
	b.le	LBB0_6
; %bb.3:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_4:
	bl	_dtoverlay_error
	mov	x20, #0
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_6:
	b.ge	LBB0_8
; %bb.7:
	mov	x0, x19
	mov	x1, x20
	bl	_fdt_set_totalsize
LBB0_8:
	mov	w0, #1
	mov	w1, #16
	bl	_calloc
	mov	x20, x0
	cbz	x0, LBB0_13
; %bb.9:
	mov	x22, #0
	mov	w21, #0
	stp	xzr, x19, [x20]
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, #0
	bl	_fdt_next_node
	mov	x21, x0
	tbnz	w0, #31, LBB0_5
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_fdt_get_phandle
	cmp	x0, x22
	b.le	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	str	x0, [x20]
	mov	x22, x0
	b	LBB0_10
LBB0_13:
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_dtoverlay_error
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"not a valid FDT - err %d"

l_.str.1:                               ; @.str.1
	.asciz	"fdt is too large"

	.comm	_FDT_ERR_NOSPACE,4,2            ; @FDT_ERR_NOSPACE
l_.str.2:                               ; @.str.2
	.asciz	"out of memory"

.subsections_via_symbols
