	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mii_phy_probe
_mii_phy_probe:                         ## @mii_phy_probe
	.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	%rdi, %r15
	callq	_PRIV
	movq	_DLINK_GPIO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	addl	(%r15), %r12d
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	addq	$4, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	$31, %ebx
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%ebx, (%rax)
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	addl	$-1, %ebx
	jae	LBB0_7
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %edi
	movl	%ebx, %esi
	movl	$1, %edx
	callq	_mdio_read
	testl	%eax, %eax
	je	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$65535, %eax                    ## imm = 0xFFFF
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_MII_PHYID_REG1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r12d, %edi
	movl	%ebx, %esi
	callq	_mdio_read
	movl	%eax, %r14d
	shll	$16, %r14d
	movq	_MII_PHYID_REG2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r12d, %edi
	movl	%ebx, %esi
	callq	_mdio_read
	movl	%eax, %r13d
	orl	%r14d, %r13d
	movq	_MII_PHYID_REV_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r13d
	movq	%r15, %rdi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	movl	%r13d, %ecx
	callq	_netdev_dbg
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	_AM79C9XX_HOME_PHY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r13d
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	_AM79C9XX_ETH_PHY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r13d
	jne	LBB0_5
	jmp	LBB0_6
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DLINK_GPIO,4,2                 ## @DLINK_GPIO
	.comm	_MII_PHYID_REG1,4,2             ## @MII_PHYID_REG1
	.comm	_MII_PHYID_REG2,4,2             ## @MII_PHYID_REG2
	.comm	_MII_PHYID_REV_MASK,4,2         ## @MII_PHYID_REV_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MII at %d is 0x%08x\n"

	.comm	_AM79C9XX_HOME_PHY,4,2          ## @AM79C9XX_HOME_PHY
	.comm	_AM79C9XX_ETH_PHY,4,2           ## @AM79C9XX_ETH_PHY
	.no_dead_strip	_mii_phy_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mii_phy_probe
_mii_phy_probe:                         ; @mii_phy_probe
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	bl	_PRIV
	mov	x20, x0
Lloh0:
	adrp	x8, _DLINK_GPIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DLINK_GPIO@GOTPAGEOFF]
	ldr	w9, [x19]
Lloh2:
	ldr	w8, [x8]
	add	w21, w8, w9
	add	x25, x0, #4
	mov	w22, #31
	mov	w26, #65535
Lloh3:
	adrp	x27, _MII_PHYID_REV_MASK@GOTPAGE
Lloh4:
	ldr	x27, [x27, _MII_PHYID_REV_MASK@GOTPAGEOFF]
Lloh5:
	adrp	x23, l_.str@PAGE
Lloh6:
	add	x23, x23, l_.str@PAGEOFF
Lloh7:
	adrp	x28, _AM79C9XX_HOME_PHY@GOTPAGE
Lloh8:
	ldr	x28, [x28, _AM79C9XX_HOME_PHY@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	str	w22, [x8]
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	sub	w22, w22, #1
	cmn	w22, #1
	b.eq	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x22
	mov	w2, #1
	bl	_mdio_read
	cbz	w0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w0, w26
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh9:
	adrp	x8, _MII_PHYID_REG1@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MII_PHYID_REG1@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x22
	bl	_mdio_read
	mov	x24, x0
Lloh12:
	adrp	x8, _MII_PHYID_REG2@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MII_PHYID_REG2@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x22
	bl	_mdio_read
	orr	w8, w0, w24, lsl #16
	ldr	w9, [x27]
	and	w24, w8, w9
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	mov	x3, x24
	bl	_netdev_dbg
	ldr	w9, [x28]
	mov	x8, x20
	cmp	w24, w9
	b.eq	LBB0_1
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh15:
	adrp	x8, _AM79C9XX_ETH_PHY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AM79C9XX_ETH_PHY@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x8]
	mov	x8, x25
	cmp	w24, w9
	b.ne	LBB0_1
	b	LBB0_2
LBB0_7:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_DLINK_GPIO,4,2                 ; @DLINK_GPIO
	.comm	_MII_PHYID_REG1,4,2             ; @MII_PHYID_REG1
	.comm	_MII_PHYID_REG2,4,2             ; @MII_PHYID_REG2
	.comm	_MII_PHYID_REV_MASK,4,2         ; @MII_PHYID_REV_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MII at %d is 0x%08x\n"

	.comm	_AM79C9XX_HOME_PHY,4,2          ; @AM79C9XX_HOME_PHY
	.comm	_AM79C9XX_ETH_PHY,4,2           ; @AM79C9XX_ETH_PHY
	.no_dead_strip	_mii_phy_probe
.subsections_via_symbols
