	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dtoverlay_merge_overlay        ## -- Begin function dtoverlay_merge_overlay
	.p2align	4, 0x90
_dtoverlay_merge_overlay:               ## @dtoverlay_merge_overlay
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	4(%rsi), %edi
	xorl	%esi, %esi
	callq	_fdt_first_subnode
	testl	%eax, %eax
	js	LBB0_25
## %bb.1:
	movl	%eax, %r14d
	leaq	L_.str(%rip), %r15
	jmp	LBB0_2
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edx, %edx
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	movq	%r13, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_fdt_path_offset_namelen
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_13
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	movq	%r12, %rdx
	movl	%ebx, %ecx
	xorl	%r8d, %r8d
	callq	_dtoverlay_merge_fragment
	testl	%eax, %eax
	leaq	L_.str(%rip), %r15
	jne	LBB0_22
LBB0_24:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%r12), %edi
	movl	%r14d, %esi
	callq	_fdt_next_subnode
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_25
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r12), %edi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_fdt_get_name
	movq	%rax, %r13
	movq	%rax, %rdi
	movq	%r15, %rsi
	movl	$9, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	$9, %edx
	callq	_strncmp
	testq	%rax, %rax
	jne	LBB0_24
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	addq	$9, %r13
	leaq	L_.str.2(%rip), %rdi
	movq	%r13, %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_dtoverlay_debug
	movl	4(%r12), %edi
	movl	%r14d, %esi
	leaq	L_.str.3(%rip), %rdx
	callq	_fdt_subnode_offset
	movl	4(%r12), %edi
	testl	%eax, %eax
	js	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %ebx
	movl	%r14d, %esi
	leaq	L_.str.7(%rip), %rdx
	leaq	-44(%rbp), %r15
	movq	%r15, %rcx
	callq	_fdt_getprop
	testq	%rax, %rax
	je	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r13
	movslq	-44(%rbp), %rdx
	testq	%rdx, %rdx
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$0, -1(%r13,%rdx)
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	decq	%rdx
	movl	%edx, -44(%rbp)
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %esi
	leaq	L_.str.4(%rip), %rdx
	callq	_fdt_subnode_offset
	testl	%eax, %eax
	je	LBB0_23
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str.5(%rip), %rdi
	movq	%r13, %rsi
	xorl	%eax, %eax
	callq	_dtoverlay_debug
	jmp	LBB0_24
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%r12), %edi
	movl	%r14d, %esi
	leaq	L_.str.9(%rip), %rdx
	movq	%r15, %rcx
	callq	_fdt_getprop
	testq	%rax, %rax
	je	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$4, -44(%rbp)
	jne	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	4(%rcx), %r15d
	movl	(%rax), %edi
	callq	_fdt32_to_cpu
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_fdt_node_offset_by_phandle
	movl	%eax, %r15d
	testl	%eax, %eax
	jns	LBB0_21
	jmp	LBB0_19
LBB0_23:                                ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str.6(%rip), %rdi
	movq	%r13, %rsi
	xorl	%eax, %eax
	callq	_dtoverlay_error
	jmp	LBB0_24
LBB0_25:
	movl	(%r12), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	xorl	%eax, %eax
LBB0_26:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movl	%eax, %ebx
	leaq	L_.str.12(%rip), %rdi
	xorl	%eax, %eax
	callq	_dtoverlay_error
	movl	%ebx, %eax
	jmp	LBB0_26
LBB0_13:
	movl	-44(%rbp), %esi
	leaq	L_.str.8(%rip), %rdi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_dtoverlay_error
	jmp	LBB0_20
LBB0_15:
	leaq	L_.str.10(%rip), %rdi
	xorl	%eax, %eax
	callq	_dtoverlay_error
	movl	-44(%rbp), %edi
	callq	_NON_FATAL
	jmp	LBB0_26
LBB0_17:
	movq	_FDT_ERR_BADSTRUCTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_NON_FATAL
	jmp	LBB0_26
LBB0_19:
	leaq	L_.str.11(%rip), %rdi
	xorl	%eax, %eax
	callq	_dtoverlay_error
LBB0_20:
	movl	%r15d, %edi
	callq	_NON_FATAL
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fragment@"

L_.str.1:                               ## @.str.1
	.asciz	"fragment-"

L_.str.2:                               ## @.str.2
	.asciz	"Found fragment %s (offset %d)"

L_.str.3:                               ## @.str.3
	.asciz	"__overlay__"

L_.str.4:                               ## @.str.4
	.asciz	"__dormant__"

L_.str.5:                               ## @.str.5
	.asciz	"fragment %s disabled"

L_.str.6:                               ## @.str.6
	.asciz	"no overlay in fragment %s"

L_.str.7:                               ## @.str.7
	.asciz	"target-path"

L_.str.8:                               ## @.str.8
	.asciz	"invalid target-path '%.*s'"

L_.str.9:                               ## @.str.9
	.asciz	"target"

L_.str.10:                              ## @.str.10
	.asciz	"no target or target-path"

	.comm	_FDT_ERR_BADSTRUCTURE,4,2       ## @FDT_ERR_BADSTRUCTURE
L_.str.11:                              ## @.str.11
	.asciz	"invalid target"

L_.str.12:                              ## @.str.12
	.asciz	"merge failed"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dtoverlay_merge_overlay        ; -- Begin function dtoverlay_merge_overlay
	.p2align	2
_dtoverlay_merge_overlay:               ; @dtoverlay_merge_overlay
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x1, #4]
	mov	w1, #0
	bl	_fdt_first_subnode
	tbnz	w0, #31, LBB0_18
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x22, l_.str@PAGE
Lloh1:
	add	x22, x22, l_.str@PAGEOFF
Lloh2:
	adrp	x23, l_.str.2@PAGE
Lloh3:
	add	x23, x23, l_.str.2@PAGEOFF
Lloh4:
	adrp	x24, l_.str.3@PAGE
Lloh5:
	add	x24, x24, l_.str.3@PAGEOFF
Lloh6:
	adrp	x27, l_.str.1@PAGE
Lloh7:
	add	x27, x27, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x19, #4]
	mov	x1, x25
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_fdt_path_offset_namelen
	mov	x28, x0
	tbnz	w0, #31, LBB0_20
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x1, x28
	mov	x2, x20
	mov	x3, x26
	mov	w4, #0
	bl	_dtoverlay_merge_fragment
	cbnz	w0, LBB0_19
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x20, #4]
	mov	x1, x21
	bl	_fdt_next_subnode
	mov	x21, x0
	tbnz	w0, #31, LBB0_18
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20, #4]
	mov	x1, x21
	mov	x2, #0
	bl	_fdt_get_name
	mov	x25, x0
	mov	x1, x22
	mov	w2, #9
	bl	_strncmp
	cbz	x0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x25
	mov	x1, x27
	mov	w2, #9
	bl	_strncmp
	cbnz	x0, LBB0_4
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x25, x25, #9
	str	x21, [sp]
	mov	x0, x23
	mov	x1, x25
	bl	_dtoverlay_debug
	ldr	w0, [x20, #4]
	mov	x1, x21
	mov	x2, x24
	bl	_fdt_subnode_offset
	mov	x26, x0
	ldr	w0, [x20, #4]
	tbnz	w26, #31, LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x3, sp, #28
	mov	x1, x21
Lloh8:
	adrp	x2, l_.str.7@PAGE
Lloh9:
	add	x2, x2, l_.str.7@PAGEOFF
	bl	_fdt_getprop
	cbz	x0, LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x25, x0
	ldr	w2, [sp, #28]
	cbz	w2, LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	sxtw	x8, w2
	sub	x8, x8, #1
	ldrb	w9, [x25, x8]
	cbnz	w9, LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	str	w8, [sp, #28]
	mov	x2, x8
	b	LBB0_2
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x21
Lloh10:
	adrp	x2, l_.str.4@PAGE
Lloh11:
	add	x2, x2, l_.str.4@PAGEOFF
	bl	_fdt_subnode_offset
	cbz	w0, LBB0_17
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
Lloh12:
	adrp	x0, l_.str.5@PAGE
Lloh13:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	x1, x25
	bl	_dtoverlay_debug
	b	LBB0_4
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x20, #4]
	add	x3, sp, #28
	mov	x1, x21
Lloh14:
	adrp	x2, l_.str.9@PAGE
Lloh15:
	add	x2, x2, l_.str.9@PAGEOFF
	bl	_fdt_getprop
	cbz	x0, LBB0_21
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [sp, #28]
	cmp	w8, #4
	b.ne	LBB0_22
; %bb.16:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w25, [x19, #4]
	ldr	w0, [x0]
	bl	_fdt32_to_cpu
	mov	x1, x0
	mov	x0, x25
	bl	_fdt_node_offset_by_phandle
	mov	x28, x0
	tbz	w0, #31, LBB0_3
	b	LBB0_23
LBB0_17:                                ;   in Loop: Header=BB0_5 Depth=1
	str	x25, [sp]
Lloh16:
	adrp	x0, l_.str.6@PAGE
Lloh17:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_dtoverlay_error
	b	LBB0_4
LBB0_18:
	mov	w25, #0
	ldr	w8, [x20]
	str	w8, [x19]
	b	LBB0_26
LBB0_19:
	mov	x25, x0
Lloh18:
	adrp	x0, l_.str.12@PAGE
Lloh19:
	add	x0, x0, l_.str.12@PAGEOFF
	bl	_dtoverlay_error
	b	LBB0_26
LBB0_20:
	ldr	w8, [sp, #28]
	stp	x8, x25, [sp]
Lloh20:
	adrp	x0, l_.str.8@PAGE
Lloh21:
	add	x0, x0, l_.str.8@PAGEOFF
	b	LBB0_24
LBB0_21:
Lloh22:
	adrp	x0, l_.str.10@PAGE
Lloh23:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_dtoverlay_error
	ldr	w0, [sp, #28]
	b	LBB0_25
LBB0_22:
Lloh24:
	adrp	x8, _FDT_ERR_BADSTRUCTURE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _FDT_ERR_BADSTRUCTURE@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	b	LBB0_25
LBB0_23:
Lloh27:
	adrp	x0, l_.str.11@PAGE
Lloh28:
	add	x0, x0, l_.str.11@PAGEOFF
LBB0_24:
	bl	_dtoverlay_error
	mov	x0, x28
LBB0_25:
	bl	_NON_FATAL
	mov	x25, x0
LBB0_26:
	mov	x0, x25
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fragment@"

l_.str.1:                               ; @.str.1
	.asciz	"fragment-"

l_.str.2:                               ; @.str.2
	.asciz	"Found fragment %s (offset %d)"

l_.str.3:                               ; @.str.3
	.asciz	"__overlay__"

l_.str.4:                               ; @.str.4
	.asciz	"__dormant__"

l_.str.5:                               ; @.str.5
	.asciz	"fragment %s disabled"

l_.str.6:                               ; @.str.6
	.asciz	"no overlay in fragment %s"

l_.str.7:                               ; @.str.7
	.asciz	"target-path"

l_.str.8:                               ; @.str.8
	.asciz	"invalid target-path '%.*s'"

l_.str.9:                               ; @.str.9
	.asciz	"target"

l_.str.10:                              ; @.str.10
	.asciz	"no target or target-path"

	.comm	_FDT_ERR_BADSTRUCTURE,4,2       ; @FDT_ERR_BADSTRUCTURE
l_.str.11:                              ; @.str.11
	.asciz	"invalid target"

l_.str.12:                              ; @.str.12
	.asciz	"merge failed"

.subsections_via_symbols
