	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_fdtput
_do_fdtput:                             ## @do_fdtput
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movq	%rdx, %r15
	movq	%rdi, %rbx
	movq	$0, -56(%rbp)
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_utilfdt_read
	movq	%rax, -48(%rbp)
	movl	$-1, %r13d
	testq	%rax, %rax
	je	LBB0_25
## %bb.1:
	movq	%rax, %r14
	movl	(%rbx), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_22
## %bb.2:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_7:
	xorl	%edi, %edi
	cmpl	$2, %r12d
	setge	%dil
	callq	_assert
	cmpl	$0, 4(%rbx)
	je	LBB0_9
## %bb.8:
	movq	(%r15), %rsi
	leaq	-48(%rbp), %rdi
	callq	_create_paths
	testl	%eax, %eax
	jne	LBB0_25
LBB0_9:
	leaq	16(%r15), %rsi
	addl	$-2, %r12d
	leaq	-56(%rbp), %rcx
	leaq	-60(%rbp), %r8
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_encode_value
	movl	$-1, %r13d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.10:
	movq	(%r15), %rsi
	movq	8(%r15), %rdx
	movq	-56(%rbp), %rcx
	movl	-60(%rbp), %r8d
	leaq	-48(%rbp), %rdi
	callq	_store_key_value
	testl	%eax, %eax
	jne	LBB0_23
	jmp	LBB0_22
LBB0_3:
	testl	%r12d, %r12d
	je	LBB0_22
## %bb.4:
	decl	%r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15,%rbx,8), %rsi
	movq	%r14, %rdi
	callq	_delete_node
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_21
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	leaq	1(%rbx), %rax
	cmpl	%ebx, %r12d
	movq	%rax, %rbx
	jne	LBB0_5
	jmp	LBB0_21
LBB0_17:
	cmpl	$2, %r12d
	jl	LBB0_22
## %bb.18:
	movq	(%r15), %rbx
	addq	$8, %r15
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_delete_prop
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	leal	-1(%r12), %eax
	addq	$8, %r15
	cmpl	$2, %r12d
	movl	%eax, %r12d
	ja	LBB0_19
LBB0_21:
	testl	%r13d, %r13d
	js	LBB0_23
LBB0_22:
	movq	-48(%rbp), %rdi
	callq	_fdt_pack
	movq	-48(%rbp), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_utilfdt_write
	movl	%eax, %r13d
LBB0_23:
	movq	-48(%rbp), %rdi
	callq	_free
	movq	-56(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_25
## %bb.24:
	callq	_free
LBB0_25:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	%r12d, %r12d
	xorl	%r14d, %r14d
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_12 Depth=1
	callq	_create_node
LBB0_16:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	%eax, %r13d
	incq	%r14
	testl	%eax, %eax
	js	LBB0_23
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%r14d, %r12d
	je	LBB0_22
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	cmpl	$0, 4(%rbx)
	movq	(%r15,%r14,8), %rsi
	leaq	-48(%rbp), %rdi
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	callq	_create_paths
	jmp	LBB0_16
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
LJTI0_0:
	.long	L0_0_set_7
	.long	L0_0_set_3
	.long	L0_0_set_17
	.long	L0_0_set_11
	.end_data_region
                                        ## -- End function
	.no_dead_strip	_do_fdtput
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_fdtput
_do_fdtput:                             ; @do_fdtput
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x21, x3
	mov	x20, x2
	mov	x19, x1
	mov	x22, x0
	str	xzr, [sp, #24]
	mov	x0, x1
	bl	_utilfdt_read
	str	x0, [sp, #16]
	cbz	x0, LBB0_5
; %bb.1:
	ldr	w8, [x22]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_20
; %bb.2:
	mov	x24, x0
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
	cmp	w21, #1
	cset	w0, gt
	bl	_assert
	ldr	w8, [x22, #4]
	cbz	w8, LBB0_24
; %bb.4:
	ldr	x1, [x20]
	add	x0, sp, #16
	bl	_create_paths
	cbz	w0, LBB0_24
LBB0_5:
	mov	w23, #-1
	b	LBB0_23
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	bl	_create_paths
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x23, x0
	add	x20, x20, #8
	sub	w21, w21, #1
	tbnz	w0, #31, LBB0_21
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	cbz	w21, LBB0_20
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x22, #4]
	ldr	x1, [x20]
	add	x0, sp, #16
	cbnz	w8, LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	bl	_create_node
	b	LBB0_7
LBB0_11:
	cbz	w21, LBB0_20
; %bb.12:
	sub	w8, w21, #1
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	x21, x8
	ldr	x1, [x20], #8
	mov	x0, x24
	bl	_delete_node
	mov	x23, x0
	tbnz	w0, #31, LBB0_19
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	sub	w8, w21, #1
	cbnz	w21, LBB0_13
	b	LBB0_19
LBB0_15:
	cmp	w21, #2
	b.lt	LBB0_20
; %bb.16:
	ldr	x22, [x20], #8
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	x2, [x20], #8
	mov	x0, x24
	mov	x1, x22
	bl	_delete_prop
	mov	x23, x0
	tbnz	w0, #31, LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	sub	w8, w21, #1
	cmp	w21, #2
	mov	x21, x8
	b.hi	LBB0_17
LBB0_19:
	tbnz	w23, #31, LBB0_21
LBB0_20:
	ldr	x0, [sp, #16]
	bl	_fdt_pack
	ldr	x1, [sp, #16]
	mov	x0, x19
	bl	_utilfdt_write
	mov	x23, x0
LBB0_21:
	ldr	x0, [sp, #16]
	bl	_free
	ldr	x0, [sp, #24]
	cbz	x0, LBB0_23
; %bb.22:
	bl	_free
LBB0_23:
	mov	x0, x23
	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
	add	sp, sp, #96
	ret
LBB0_24:
	add	x1, x20, #16
	sub	w2, w21, #2
	add	x3, sp, #24
	add	x4, sp, #12
	mov	x0, x22
	bl	_encode_value
	cbnz	w0, LBB0_26
; %bb.25:
	ldp	x1, x2, [x20]
	ldr	x3, [sp, #24]
	ldr	w4, [sp, #12]
	add	x0, sp, #16
	bl	_store_key_value
	cbz	w0, LBB0_20
LBB0_26:
	mov	w23, #-1
	b	LBB0_21
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_11-LBB0_3)>>2
	.byte	(LBB0_15-LBB0_3)>>2
	.byte	(LBB0_8-LBB0_3)>>2
                                        ; -- End function
	.no_dead_strip	_do_fdtput
.subsections_via_symbols
