	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function update_fdt
_update_fdt:                            ## @update_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	%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	%r9, %r15
	movl	%r8d, %r12d
	movq	%rcx, %r13
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.1:
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rsi, %rdi
	callq	_fdt_check_header
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	leaq	L_.str(%rip), %rsi
LBB0_3:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_pr_efi_err
	jmp	LBB0_4
LBB0_8:
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_fdt_create_empty_tree
	testl	%eax, %eax
	jne	LBB0_30
## %bb.9:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_fdt_update_cell_size
	jmp	LBB0_11
LBB0_5:
	testq	%r14, %r14
	je	LBB0_10
## %bb.6:
	movq	%rbx, %rdi
	callq	_fdt_totalsize
	cmpq	%r14, %rax
	jbe	LBB0_10
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_3
LBB0_10:
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	%r12d, %edx
	callq	_fdt_open_into
	testl	%eax, %eax
	jne	LBB0_30
LBB0_11:
	movq	%r13, %rdi
	callq	_fdt_num_mem_rsv
	testl	%eax, %eax
	jle	LBB0_14
## %bb.12:
	movl	%eax, %ebx
	incl	%ebx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	leal	-2(%rbx), %esi
	movq	%r13, %rdi
	callq	_fdt_del_mem_rsv
	decl	%ebx
	cmpl	$1, %ebx
	ja	LBB0_13
LBB0_14:
	leaq	L_.str.2(%rip), %rdx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_fdt_subnode_offset
	movl	%eax, %r12d
	testl	%eax, %eax
	jns	LBB0_16
## %bb.15:
	leaq	L_.str.2(%rip), %rdx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_fdt_add_subnode
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_30
LBB0_16:
	testq	%r15, %r15
	je	LBB0_19
## %bb.17:
	movq	%r15, %rdi
	callq	_strlen
	testq	%rax, %rax
	jle	LBB0_19
## %bb.18:
	incq	%rax
	leaq	L_.str.3(%rip), %rdx
	movq	%r13, %rdi
	movl	%r12d, %esi
	movq	%r15, %rcx
	movq	%rax, %r8
	callq	_fdt_setprop
	testl	%eax, %eax
	jne	LBB0_30
LBB0_19:
	movq	24(%rbp), %rbx
	testq	%rbx, %rbx
	je	LBB0_22
## %bb.20:
	movq	16(%rbp), %r14
	movq	%r14, %rdi
	callq	_cpu_to_fdt64
	leaq	L_.str.4(%rip), %rdx
	movq	%r13, %rdi
	movl	%r12d, %esi
	movq	%rax, %rcx
	callq	_fdt_setprop_var
	testl	%eax, %eax
	jne	LBB0_30
## %bb.21:
	addq	%r14, %rbx
	movq	%rbx, %rdi
	callq	_cpu_to_fdt64
	leaq	L_.str.5(%rip), %rdx
	movq	%r13, %rdi
	movl	%r12d, %esi
	movq	%rax, %rcx
	callq	_fdt_setprop_var
	testl	%eax, %eax
	jne	LBB0_30
LBB0_22:
	leaq	L_.str.2(%rip), %rdx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_fdt_subnode_offset
	movl	%eax, %r15d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_cpu_to_fdt64
	leaq	L_.str.6(%rip), %rdx
	movq	%r13, %rdi
	movl	%r15d, %esi
	movq	%rax, %rcx
	callq	_fdt_setprop_var
	testl	%eax, %eax
	jne	LBB0_30
## %bb.23:
	movq	_U64_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, -56(%rbp)
	leaq	L_.str.7(%rip), %rdx
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_fdt_setprop_var
	testl	%eax, %eax
	jne	LBB0_30
## %bb.24:
	movq	_U32_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	leaq	L_.str.8(%rip), %rdx
	movq	%r13, %rdi
	movl	%r15d, %esi
	movq	%rbx, %rcx
	callq	_fdt_setprop_var
	testl	%eax, %eax
	jne	LBB0_30
## %bb.25:
	leaq	L_.str.9(%rip), %rdx
	movq	%r13, %rdi
	movl	%r15d, %esi
	movq	%rbx, %rcx
	callq	_fdt_setprop_var
	testl	%eax, %eax
	jne	LBB0_30
## %bb.26:
	leaq	L_.str.10(%rip), %rdx
	movq	%r13, %rdi
	movl	%r15d, %esi
	movq	%rbx, %rcx
	callq	_fdt_setprop_var
	testl	%eax, %eax
	je	LBB0_27
LBB0_30:
	movq	_FDT_ERR_NOSPACE@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	jne	LBB0_4
## %bb.31:
	movq	_EFI_BUFFER_TOO_SMALL@GOTPCREL(%rip), %rax
	jmp	LBB0_34
LBB0_4:
	movq	_EFI_LOAD_ERROR@GOTPCREL(%rip), %rax
LBB0_34:
	movq	(%rax), %rax
LBB0_35:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	movq	_CONFIG_RANDOMIZE_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	testq	%rax, %rax
	je	LBB0_33
## %bb.28:
	leaq	-56(%rbp), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$8, %esi
	callq	_efi_get_random_bytes
	movq	_EFI_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_32
## %bb.29:
	movq	-56(%rbp), %rcx
	leaq	L_.str.11(%rip), %rdx
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_fdt_setprop_var
	testl	%eax, %eax
	jne	LBB0_30
	jmp	LBB0_33
LBB0_32:
	movq	_EFI_NOT_FOUND@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_35
LBB0_33:
	movq	%r13, %rdi
	callq	_fdt_pack
	movq	_EFI_SUCCESS@GOTPCREL(%rip), %rax
	jmp	LBB0_34
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Device Tree header not valid!\n"

	.comm	_EFI_LOAD_ERROR,8,3             ## @EFI_LOAD_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"Truncated device tree! foo!\n"

L_.str.2:                               ## @.str.2
	.asciz	"chosen"

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

L_.str.4:                               ## @.str.4
	.asciz	"linux,initrd-start"

L_.str.5:                               ## @.str.5
	.asciz	"linux,initrd-end"

L_.str.6:                               ## @.str.6
	.asciz	"linux,uefi-system-table"

	.comm	_U64_MAX,8,3                    ## @U64_MAX
L_.str.7:                               ## @.str.7
	.asciz	"linux,uefi-mmap-start"

	.comm	_U32_MAX,8,3                    ## @U32_MAX
L_.str.8:                               ## @.str.8
	.asciz	"linux,uefi-mmap-size"

L_.str.9:                               ## @.str.9
	.asciz	"linux,uefi-mmap-desc-size"

L_.str.10:                              ## @.str.10
	.asciz	"linux,uefi-mmap-desc-ver"

	.comm	_CONFIG_RANDOMIZE_BASE,4,2      ## @CONFIG_RANDOMIZE_BASE
	.comm	_EFI_SUCCESS,8,3                ## @EFI_SUCCESS
L_.str.11:                              ## @.str.11
	.asciz	"kaslr-seed"

	.comm	_EFI_NOT_FOUND,8,3              ## @EFI_NOT_FOUND
	.comm	_FDT_ERR_NOSPACE,4,2            ## @FDT_ERR_NOSPACE
	.comm	_EFI_BUFFER_TOO_SMALL,8,3       ## @EFI_BUFFER_TOO_SMALL
	.no_dead_strip	_update_fdt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function update_fdt
_update_fdt:                            ; @update_fdt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x7
	mov	x22, x6
	mov	x23, x5
	mov	x24, x4
	mov	x19, x3
	mov	x20, x0
	cbz	x1, LBB0_4
; %bb.1:
	mov	x26, x2
	mov	x25, x1
	mov	x0, x1
	bl	_fdt_check_header
	cbz	x0, LBB0_6
; %bb.2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
LBB0_3:
	mov	x0, x20
	bl	_pr_efi_err
	b	LBB0_28
LBB0_4:
	mov	x0, x19
	mov	x1, x24
	bl	_fdt_create_empty_tree
	cbnz	w0, LBB0_26
; %bb.5:
	mov	x0, x20
	mov	x1, x19
	bl	_fdt_update_cell_size
	b	LBB0_10
LBB0_6:
	cbz	x26, LBB0_9
; %bb.7:
	mov	x0, x25
	bl	_fdt_totalsize
	cmp	x0, x26
	b.ls	LBB0_9
; %bb.8:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_9:
	mov	x0, x25
	mov	x1, x19
	mov	x2, x24
	bl	_fdt_open_into
	cbnz	w0, LBB0_26
LBB0_10:
	mov	x0, x19
	bl	_fdt_num_mem_rsv
	cmp	w0, #1
	b.lt	LBB0_13
; %bb.11:
	add	w24, w0, #1
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	sub	w1, w24, #2
	mov	x0, x19
	bl	_fdt_del_mem_rsv
	sub	w24, w24, #1
	cmp	w24, #1
	b.hi	LBB0_12
LBB0_13:
Lloh4:
	adrp	x2, l_.str.2@PAGE
Lloh5:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	bl	_fdt_subnode_offset
	mov	x24, x0
	tbz	w0, #31, LBB0_15
; %bb.14:
Lloh6:
	adrp	x2, l_.str.2@PAGE
Lloh7:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	bl	_fdt_add_subnode
	mov	x24, x0
	tbnz	w0, #31, LBB0_26
LBB0_15:
	cbz	x23, LBB0_18
; %bb.16:
	mov	x0, x23
	bl	_strlen
	cmp	x0, #1
	b.lt	LBB0_18
; %bb.17:
	add	x4, x0, #1
Lloh8:
	adrp	x2, l_.str.3@PAGE
Lloh9:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x1, x24
	mov	x3, x23
	bl	_fdt_setprop
	cbnz	w0, LBB0_26
LBB0_18:
	cbz	x21, LBB0_21
; %bb.19:
	mov	x0, x22
	bl	_cpu_to_fdt64
	mov	x3, x0
Lloh10:
	adrp	x2, l_.str.4@PAGE
Lloh11:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	x1, x24
	bl	_fdt_setprop_var
	cbnz	w0, LBB0_26
; %bb.20:
	add	x0, x21, x22
	bl	_cpu_to_fdt64
	mov	x3, x0
Lloh12:
	adrp	x2, l_.str.5@PAGE
Lloh13:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	x1, x24
	bl	_fdt_setprop_var
	cbnz	w0, LBB0_26
LBB0_21:
Lloh14:
	adrp	x2, l_.str.2@PAGE
Lloh15:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	bl	_fdt_subnode_offset
	mov	x21, x0
	mov	x0, x20
	bl	_cpu_to_fdt64
	mov	x3, x0
Lloh16:
	adrp	x2, l_.str.6@PAGE
Lloh17:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	bl	_fdt_setprop_var
	cbnz	w0, LBB0_26
; %bb.22:
Lloh18:
	adrp	x8, _U64_MAX@GOTPAGE
Lloh19:
	ldr	x8, [x8, _U64_MAX@GOTPAGEOFF]
Lloh20:
	ldr	x3, [x8]
	str	x3, [sp, #8]
Lloh21:
	adrp	x2, l_.str.7@PAGE
Lloh22:
	add	x2, x2, l_.str.7@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	bl	_fdt_setprop_var
	cbnz	w0, LBB0_26
; %bb.23:
Lloh23:
	adrp	x8, _U32_MAX@GOTPAGE
Lloh24:
	ldr	x8, [x8, _U32_MAX@GOTPAGEOFF]
Lloh25:
	ldr	x22, [x8]
Lloh26:
	adrp	x2, l_.str.8@PAGE
Lloh27:
	add	x2, x2, l_.str.8@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	mov	x3, x22
	bl	_fdt_setprop_var
	cbnz	w0, LBB0_26
; %bb.24:
Lloh28:
	adrp	x2, l_.str.9@PAGE
Lloh29:
	add	x2, x2, l_.str.9@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	mov	x3, x22
	bl	_fdt_setprop_var
	cbnz	w0, LBB0_26
; %bb.25:
Lloh30:
	adrp	x2, l_.str.10@PAGE
Lloh31:
	add	x2, x2, l_.str.10@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	mov	x3, x22
	bl	_fdt_setprop_var
	cbz	w0, LBB0_31
LBB0_26:
Lloh32:
	adrp	x8, _FDT_ERR_NOSPACE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _FDT_ERR_NOSPACE@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_28
; %bb.27:
Lloh35:
	adrp	x8, _EFI_BUFFER_TOO_SMALL@GOTPAGE
Lloh36:
	ldr	x8, [x8, _EFI_BUFFER_TOO_SMALL@GOTPAGEOFF]
	b	LBB0_29
LBB0_28:
Lloh37:
	adrp	x8, _EFI_LOAD_ERROR@GOTPAGE
Lloh38:
	ldr	x8, [x8, _EFI_LOAD_ERROR@GOTPAGEOFF]
LBB0_29:
	ldr	x0, [x8]
LBB0_30:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_31:
Lloh39:
	adrp	x8, _CONFIG_RANDOMIZE_BASE@GOTPAGE
Lloh40:
	ldr	x8, [x8, _CONFIG_RANDOMIZE_BASE@GOTPAGEOFF]
Lloh41:
	ldr	w0, [x8]
	bl	_IS_ENABLED
Lloh42:
	adrp	x22, _EFI_SUCCESS@GOTPAGE
Lloh43:
	ldr	x22, [x22, _EFI_SUCCESS@GOTPAGEOFF]
	cbz	x0, LBB0_35
; %bb.32:
	add	x2, sp, #8
	mov	x0, x20
	mov	w1, #8
	bl	_efi_get_random_bytes
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_34
; %bb.33:
	ldr	x3, [sp, #8]
Lloh44:
	adrp	x2, l_.str.11@PAGE
Lloh45:
	add	x2, x2, l_.str.11@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	bl	_fdt_setprop_var
	cbnz	w0, LBB0_26
	b	LBB0_35
LBB0_34:
Lloh46:
	adrp	x8, _EFI_NOT_FOUND@GOTPAGE
Lloh47:
	ldr	x8, [x8, _EFI_NOT_FOUND@GOTPAGEOFF]
Lloh48:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_30
LBB0_35:
	mov	x0, x19
	bl	_fdt_pack
	ldr	x0, [x22]
	b	LBB0_30
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Device Tree header not valid!\n"

	.comm	_EFI_LOAD_ERROR,8,3             ; @EFI_LOAD_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"Truncated device tree! foo!\n"

l_.str.2:                               ; @.str.2
	.asciz	"chosen"

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

l_.str.4:                               ; @.str.4
	.asciz	"linux,initrd-start"

l_.str.5:                               ; @.str.5
	.asciz	"linux,initrd-end"

l_.str.6:                               ; @.str.6
	.asciz	"linux,uefi-system-table"

	.comm	_U64_MAX,8,3                    ; @U64_MAX
l_.str.7:                               ; @.str.7
	.asciz	"linux,uefi-mmap-start"

	.comm	_U32_MAX,8,3                    ; @U32_MAX
l_.str.8:                               ; @.str.8
	.asciz	"linux,uefi-mmap-size"

l_.str.9:                               ; @.str.9
	.asciz	"linux,uefi-mmap-desc-size"

l_.str.10:                              ; @.str.10
	.asciz	"linux,uefi-mmap-desc-ver"

	.comm	_CONFIG_RANDOMIZE_BASE,4,2      ; @CONFIG_RANDOMIZE_BASE
	.comm	_EFI_SUCCESS,8,3                ; @EFI_SUCCESS
l_.str.11:                              ; @.str.11
	.asciz	"kaslr-seed"

	.comm	_EFI_NOT_FOUND,8,3              ; @EFI_NOT_FOUND
	.comm	_FDT_ERR_NOSPACE,4,2            ; @FDT_ERR_NOSPACE
	.comm	_EFI_BUFFER_TOO_SMALL,8,3       ; @EFI_BUFFER_TOO_SMALL
	.no_dead_strip	_update_fdt
.subsections_via_symbols
