	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsl_pq_mdio_find_free
_fsl_pq_mdio_find_free:                 ## @fsl_pq_mdio_find_free
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_PHY_MAX_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	jle	LBB0_7
## %bb.1:
	movq	%rdi, %r14
	leaq	-36(%rbp), %r15
	movl	$1, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	movq	%r15, %rdx
	callq	_get_phy_id
	xorl	%ecx, %ecx
	cmpl	$-1, -36(%rbp)
	sete	%cl
	addl	%ecx, %ecx
	testq	%rax, %rax
	cmovnel	%r12d, %ecx
	testl	%ecx, %ecx
	jne	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	leal	-1(%rbx), %eax
	cmpl	$1, %ebx
	movl	%eax, %ebx
	jg	LBB0_2
## %bb.6:
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_3:
	cmpl	$2, %ecx
	je	LBB0_7
## %bb.4:
	movl	$-1, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_MAX_ADDR,4,2               ## @PHY_MAX_ADDR
	.no_dead_strip	_fsl_pq_mdio_find_free
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fsl_pq_mdio_find_free
_fsl_pq_mdio_find_free:                 ; @fsl_pq_mdio_find_free
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
Lloh0:
	adrp	x8, _PHY_MAX_ADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PHY_MAX_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	cmp	w19, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x20, x0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x2, sp, #12
	mov	x0, x20
	mov	x1, x19
	bl	_get_phy_id
	ldr	w8, [sp, #12]
	cmn	w8, #1
	cset	w8, eq
	lsl	w8, w8, #1
	cmp	x0, #0
	csinc	w8, w8, wzr, eq
	cbnz	w8, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	subs	w19, w19, #1
	b.gt	LBB0_2
; %bb.4:
	mov	w19, #0
	b	LBB0_6
LBB0_5:
	mov	w9, #-1
	cmp	w8, #2
	csel	w19, w19, w9, eq
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_MAX_ADDR,4,2               ; @PHY_MAX_ADDR
	.no_dead_strip	_fsl_pq_mdio_find_free
.subsections_via_symbols
