	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_of_overlay_fdt_apply           ## -- Begin function of_overlay_fdt_apply
	.p2align	4, 0x90
_of_overlay_fdt_apply:                  ## @of_overlay_fdt_apply
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$0, (%rdx)
	cmpl	$4, %esi
	jb	LBB0_2
## %bb.1:
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_fdt_check_header
	testq	%rax, %rax
	je	LBB0_3
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r15, %rdi
	callq	_fdt_totalsize
	cmpl	%ebx, %eax
	jg	LBB0_4
## %bb.6:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_kmemdup
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r15
	xorl	%ebx, %ebx
	leaq	-32(%rbp), %rdx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_of_fdt_unflatten_tree
	movq	-32(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.10:
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_of_overlay_apply
	testl	%eax, %eax
	jns	LBB0_12
## %bb.11:
	movl	%eax, %ebx
	jmp	LBB0_12
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_kfree
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid overlay_fdt header\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"unable to unflatten overlay_fdt\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_of_overlay_fdt_apply           ; -- Begin function of_overlay_fdt_apply
	.p2align	2
_of_overlay_fdt_apply:                  ; @of_overlay_fdt_apply
	.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
	str	wzr, [x2]
	cmp	w1, #4
	b.lo	LBB0_2
; %bb.1:
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	bl	_fdt_check_header
	cbz	x0, LBB0_6
LBB0_2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
LBB0_3:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_5:
	mov	x0, x19
	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:
	mov	x0, x20
	bl	_fdt_totalsize
	cmp	w0, w21
	b.gt	LBB0_3
; %bb.7:
	mov	x1, x0
Lloh4:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_kmemdup
	cbz	x0, LBB0_11
; %bb.8:
	mov	x20, x0
	add	x2, sp, #8
	mov	x1, #0
	bl	_of_fdt_unflatten_tree
	ldr	x1, [sp, #8]
	cbz	x1, LBB0_12
; %bb.9:
	mov	x0, x20
	mov	x2, x19
	bl	_of_overlay_apply
	tbnz	w0, #31, LBB0_13
; %bb.10:
	mov	w19, #0
	b	LBB0_5
LBB0_11:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_4
LBB0_12:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w19, w8
	mov	x0, x20
	bl	_kfree
	b	LBB0_5
LBB0_13:
	mov	x19, x0
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid overlay_fdt header\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"unable to unflatten overlay_fdt\n"

.subsections_via_symbols
