	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fdt_get_max_phandle            ## -- Begin function fdt_get_max_phandle
	.p2align	4, 0x90
_fdt_get_max_phandle:                   ## @fdt_get_max_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	xorl	%r15d, %r15d
	movl	$-1, %esi
	xorl	%edx, %edx
	callq	_fdt_next_node
	movl	%eax, %ebx
	movq	_FDT_ERR_NOTFOUND@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	addl	%ebx, %eax
	je	LBB0_5
## %bb.1:
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	testl	%ebx, %ebx
	js	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_fdt_get_phandle
	cmpq	%r15, %rax
	movq	%r15, %rcx
	cmovgq	%rax, %rcx
	cmpq	$-1, %rax
	cmovneq	%rcx, %r15
	movq	%r14, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_fdt_next_node
	movl	%eax, %ebx
	addl	(%r12), %eax
	jne	LBB0_2
	jmp	LBB0_5
LBB0_3:
	movq	$-1, %r15
LBB0_5:
	movq	%r15, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FDT_ERR_NOTFOUND,4,2           ## @FDT_ERR_NOTFOUND
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fdt_get_max_phandle            ; -- Begin function fdt_get_max_phandle
	.p2align	2
_fdt_get_max_phandle:                   ; @fdt_get_max_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	x19, x0
	mov	w1, #-1
	mov	x2, #0
	bl	_fdt_next_node
	mov	x20, #0
Lloh0:
	adrp	x22, _FDT_ERR_NOTFOUND@GOTPAGE
Lloh1:
	ldr	x22, [x22, _FDT_ERR_NOTFOUND@GOTPAGEOFF]
	ldr	w8, [x22]
	cmn	w0, w8
	b.eq	LBB0_5
; %bb.1:
	mov	x21, x0
	mov	x20, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	tbnz	w21, #31, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_fdt_get_phandle
	cmp	x0, x20
	csel	x8, x0, x20, gt
	cmn	x0, #1
	csel	x20, x20, x8, eq
	mov	x0, x19
	mov	x1, x21
	mov	x2, #0
	bl	_fdt_next_node
	mov	x21, x0
	ldr	w8, [x22]
	cmn	w0, w8
	b.ne	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	x20, #-1
LBB0_5:
	mov	x0, x20
	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 AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_FDT_ERR_NOTFOUND,4,2           ; @FDT_ERR_NOTFOUND
.subsections_via_symbols
