	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_node_phandle               ## -- Begin function get_node_phandle
	.p2align	4, 0x90
_get_node_phandle:                      ## @get_node_phandle
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rsi), %rax
	leaq	1(%rax), %rcx
	cmpq	$1, %rcx
	ja	LBB0_5
## %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_get_property
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_assert
	movl	_get_node_phandle.phandle(%rip), %esi
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_get_node_by_phandle
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	_get_node_phandle.phandle(%rip), %esi
	incl	%esi
	movl	%esi, _get_node_phandle.phandle(%rip)
	jmp	LBB0_3
LBB0_4:
	movslq	_get_node_phandle.phandle(%rip), %rsi
	movq	%rsi, (%r14)
	movq	_empty_data@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_data_append_cell
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_build_property
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_add_property
	movq	(%r14), %rax
LBB0_5:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.p2align	2                               ## @get_node_phandle.phandle
_get_node_phandle.phandle:
	.long	1                               ## 0x1

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"linux,phandle"

	.comm	_empty_data,4,2                 ## @empty_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_node_phandle               ; -- Begin function get_node_phandle
	.p2align	2
_get_node_phandle:                      ; @get_node_phandle
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
	ldr	x0, [x1]
	add	x8, x0, #1
	cmp	x8, #1
	b.hi	LBB0_5
; %bb.1:
	mov	x19, x1
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_get_property
	cmp	w0, #0
	cset	w0, eq
	bl	_assert
	adrp	x21, _get_node_phandle.phandle@PAGE
	ldr	w1, [x21, _get_node_phandle.phandle@PAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_get_node_by_phandle
	cbz	x0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x21, _get_node_phandle.phandle@PAGEOFF]
	add	w1, w8, #1
	str	w1, [x21, _get_node_phandle.phandle@PAGEOFF]
	b	LBB0_2
LBB0_4:
	ldrsw	x1, [x21, _get_node_phandle.phandle@PAGEOFF]
	str	x1, [x19]
Lloh2:
	adrp	x8, _empty_data@GOTPAGE
Lloh3:
	ldr	x8, [x8, _empty_data@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_data_append_cell
	mov	x1, x0
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, #0
	bl	_build_property
	mov	x1, x0
	mov	x0, x19
	bl	_add_property
	ldr	x0, [x19]
LBB0_5:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.p2align	2                               ; @get_node_phandle.phandle
_get_node_phandle.phandle:
	.long	1                               ; 0x1

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"linux,phandle"

	.comm	_empty_data,4,2                 ; @empty_data
.subsections_via_symbols
