	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dt_to_blob                     ## -- Begin function dt_to_blob
	.p2align	4, 0x90
_dt_to_blob:                            ## @dt_to_blob
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r13d
	movq	%rsi, %r15
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	_empty_data@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movl	4(%rax), %ecx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)
	movq	%rax, -72(%rbp)
	movq	_version_table@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_4
## %bb.1:
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	cmpl	%r13d, (%rdi,%r15)
	leaq	(%rdi,%r15), %rax
	cmoveq	%rax, %rbx
	incq	%r12
	callq	_ARRAY_SIZE
	cltq
	addq	$8, %r15
	cmpq	%rax, %r12
	jl	LBB0_2
## %bb.3:
	testq	%rbx, %rbx
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_5
LBB0_4:
	leaq	L_.str(%rip), %rdi
	movl	%r13d, %esi
	callq	_die
	xorl	%ebx, %ebx
LBB0_5:
	movl	8(%r15), %edi
	movq	_bin_emitter@GOTPCREL(%rip), %rsi
	leaq	-80(%rbp), %r13
	leaq	-72(%rbp), %rcx
	movq	%r13, %rdx
	movq	%rbx, %r8
	callq	_flatten_tree
	movq	_FDT_END@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_bin_emit_cell
	movl	4(%r15), %edi
	movq	%rbx, %rsi
	callq	_flatten_reserve_list
	movq	%rax, %r13
	movl	-80(%rbp), %ecx
	movl	-72(%rbp), %r8d
	movl	(%r15), %r9d
	leaq	-48(%rbp), %rdi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	callq	_make_fdt_header
	movq	_minsize@GOTPCREL(%rip), %r15
	movq	(%r15), %r12
	testq	%r12, %r12
	jle	LBB0_6
## %bb.7:
	movl	-48(%rbp), %edi
	callq	_fdt32_to_cpu
	subl	%eax, %r12d
	jns	LBB0_10
## %bb.8:
	movq	_quiet@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jg	LBB0_10
## %bb.9:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	-48(%rbp), %edi
	callq	_fdt32_to_cpu
	movq	(%r15), %rcx
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	callq	_fprintf
	jmp	LBB0_10
LBB0_6:
	xorl	%r12d, %r12d
LBB0_10:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	_padsize@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	cmovgl	%eax, %r12d
	testl	%r12d, %r12d
	jle	LBB0_12
## %bb.11:
	movl	-48(%rbp), %edi
	callq	_fdt32_to_cpu
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%r12), %edi
	callq	_cpu_to_fdt32
	movl	%eax, -48(%rbp)
LBB0_12:
	movl	4(%rbx), %edx
	shlq	$32, %r15
	addq	-96(%rbp), %r15                 ## 8-byte Folded Reload
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_data_append_data
	movq	%rax, %rdi
	movl	$8, %esi
	callq	_data_append_align
	movq	%rax, %rdi
	movq	%r13, %rsi
	callq	_data_merge
	movq	%rax, %rdi
	movl	$4, %esi
	callq	_data_append_zeroes
	movq	-80(%rbp), %rsi
	movq	%rax, %rdi
	callq	_data_merge
	movq	-72(%rbp), %rsi
	movq	%rax, %rdi
	callq	_data_merge
	movq	%rax, %rbx
	testl	%r12d, %r12d
	jle	LBB0_14
## %bb.13:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_data_append_zeroes
	movq	%rax, %rbx
LBB0_14:
	movq	%rbx, %rdi
	shrq	$32, %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	movl	%ebx, %esi
	movl	$1, %edx
	movq	%r14, %rcx
	callq	_fwrite
	movq	%r14, %rdi
	callq	_ferror
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_die
LBB0_16:
	movq	%rbx, %rdi
	callq	_data_free
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_empty_data,8,2                 ## @empty_data
	.comm	_version_table,8,3              ## @version_table
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown device tree blob version %d\n"

	.comm	_bin_emitter,4,2                ## @bin_emitter
	.comm	_FDT_END,4,2                    ## @FDT_END
	.comm	_minsize,8,3                    ## @minsize
	.comm	_quiet,4,2                      ## @quiet
	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"Warning: blob size %d >= minimum size %d\n"

	.comm	_padsize,4,2                    ## @padsize
L_.str.2:                               ## @.str.2
	.asciz	"Error writing device tree blob: %s\n"

	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dt_to_blob                     ; -- Begin function dt_to_blob
	.p2align	2
_dt_to_blob:                            ; @dt_to_blob
	.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	x22, x2
	mov	x23, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _empty_data@GOTPAGE
Lloh1:
	ldr	x8, [x8, _empty_data@GOTPAGEOFF]
	ldp	w20, w24, [x8]
	ldr	x8, [x8]
	stp	x8, x8, [sp, #16]
Lloh2:
	adrp	x25, _version_table@GOTPAGE
Lloh3:
	ldr	x25, [x25, _version_table@GOTPAGEOFF]
	ldr	x0, [x25]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x26, #0
	mov	x27, #0
	mov	x21, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x25]
	add	x8, x0, x26
	ldr	w9, [x8]
	cmp	w9, w22
	csel	x21, x8, x21, eq
	add	x27, x27, #1
	bl	_ARRAY_SIZE
	add	x26, x26, #8
	cmp	x27, w0, sxtw
	b.lt	LBB0_2
; %bb.3:
	cbnz	x21, LBB0_5
LBB0_4:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_die
	mov	x21, #0
LBB0_5:
	ldr	w0, [x23, #8]
Lloh6:
	adrp	x1, _bin_emitter@GOTPAGE
Lloh7:
	ldr	x1, [x1, _bin_emitter@GOTPAGEOFF]
	add	x2, sp, #24
	add	x3, sp, #16
	mov	x4, x21
	bl	_flatten_tree
Lloh8:
	adrp	x8, _FDT_END@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FDT_END@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x0, sp, #24
	bl	_bin_emit_cell
	ldr	w0, [x23, #4]
	mov	x1, x21
	bl	_flatten_reserve_list
	mov	x22, x0
	ldr	w3, [sp, #24]
	ldr	w4, [sp, #16]
	ldr	w5, [x23]
	add	x0, sp, #8
	mov	x1, x21
	mov	x2, x22
	bl	_make_fdt_header
Lloh11:
	adrp	x26, _minsize@GOTPAGE
Lloh12:
	ldr	x26, [x26, _minsize@GOTPAGEOFF]
	ldr	x23, [x26]
	cmp	x23, #1
	b.lt	LBB0_9
; %bb.6:
	ldr	w0, [sp, #8]
	bl	_fdt32_to_cpu
	subs	w25, w23, w0
	b.pl	LBB0_10
; %bb.7:
Lloh13:
	adrp	x8, _quiet@GOTPAGE
Lloh14:
	ldr	x8, [x8, _quiet@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w8, #0
	b.gt	LBB0_10
; %bb.8:
Lloh16:
	adrp	x8, _stderr@GOTPAGE
Lloh17:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh18:
	ldr	w23, [x8]
	ldr	w0, [sp, #8]
	bl	_fdt32_to_cpu
	mov	x2, x0
	ldr	x3, [x26]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x23
	bl	_fprintf
	b	LBB0_10
LBB0_9:
	mov	w25, #0
LBB0_10:
Lloh21:
	adrp	x8, _padsize@GOTPAGE
Lloh22:
	ldr	x8, [x8, _padsize@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	cmp	w8, #0
	csel	w23, w8, w25, gt
	cmp	w23, #1
	b.lt	LBB0_12
; %bb.11:
	ldr	w0, [sp, #8]
	bl	_fdt32_to_cpu
	add	w0, w0, w23
	bl	_cpu_to_fdt32
	str	w0, [sp, #8]
LBB0_12:
	ldr	w2, [x21, #4]
	bfi	x20, x24, #32, #32
	add	x1, sp, #8
	mov	x0, x20
	bl	_data_append_data
	mov	w1, #8
	bl	_data_append_align
	mov	x1, x22
	bl	_data_merge
	mov	w1, #4
	bl	_data_append_zeroes
	ldr	x1, [sp, #24]
	bl	_data_merge
	ldr	x1, [sp, #16]
	bl	_data_merge
	mov	x20, x0
	cmp	w23, #1
	b.lt	LBB0_14
; %bb.13:
	mov	x0, x20
	mov	x1, x23
	bl	_data_append_zeroes
	mov	x20, x0
LBB0_14:
	lsr	x0, x20, #32
                                        ; kill: def $w0 killed $w0 killed $x0
	mov	x1, x20
	mov	w2, #1
	mov	x3, x19
	bl	_fwrite
	mov	x0, x19
	bl	_ferror
	cbz	x0, LBB0_16
; %bb.15:
Lloh24:
	adrp	x8, _errno@GOTPAGE
Lloh25:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	bl	_strerror
	mov	x1, x0
Lloh27:
	adrp	x0, l_.str.2@PAGE
Lloh28:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_die
LBB0_16:
	mov	x0, x20
	bl	_data_free
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_empty_data,8,2                 ; @empty_data
	.comm	_version_table,8,3              ; @version_table
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown device tree blob version %d\n"

	.comm	_bin_emitter,4,2                ; @bin_emitter
	.comm	_FDT_END,4,2                    ; @FDT_END
	.comm	_minsize,8,3                    ; @minsize
	.comm	_quiet,4,2                      ; @quiet
	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"Warning: blob size %d >= minimum size %d\n"

	.comm	_padsize,4,2                    ; @padsize
l_.str.2:                               ; @.str.2
	.asciz	"Error writing device tree blob: %s\n"

	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
