	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_emac_mii_phy_probe             ## -- Begin function emac_mii_phy_probe
	.p2align	4, 0x90
_emac_mii_phy_probe:                    ## @emac_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_AUTONEG_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rdi)
	movl	$0, 8(%rdi)
	movl	%esi, (%rdi)
	movq	_SPEED_10@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rdi)
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rdi)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rdi)
	callq	_emac_mii_reset_phy
	testq	%rax, %rax
	je	LBB0_2
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_24:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movq	_MII_PHYSID1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_phy_read
	movl	%eax, %r14d
	movq	_MII_PHYSID2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_phy_read
	movq	_mii_phy_table@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rdx
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.3:
	shll	$16, %r14d
	orl	%r14d, %eax
	addq	$8, %rcx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rdx), %esi
	andl	%eax, %esi
	cmpl	4(%rdx), %esi
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rcx), %rdx
	addq	$8, %rcx
	testq	%rdx, %rdx
	jne	LBB0_5
	jmp	LBB0_1
LBB0_6:
	movq	%rdx, 16(%rbx)
	movl	8(%rdx), %eax
	movl	%eax, 4(%rbx)
	testl	%eax, %eax
	jne	LBB0_23
## %bb.7:
	movq	_MII_BMSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_phy_read
	movq	_BMSR_ANEGCAPABLE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.8:
	movq	_SUPPORTED_Autoneg@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 4(%rbx)
LBB0_9:
	movq	_BMSR_10HALF@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.10:
	movq	_SUPPORTED_10baseT_Half@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 4(%rbx)
LBB0_11:
	movq	_BMSR_10FULL@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_13
## %bb.12:
	movq	_SUPPORTED_10baseT_Full@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 4(%rbx)
LBB0_13:
	movq	_BMSR_100HALF@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_15
## %bb.14:
	movq	_SUPPORTED_100baseT_Half@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 4(%rbx)
LBB0_15:
	movq	_BMSR_100FULL@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_17
## %bb.16:
	movq	_SUPPORTED_100baseT_Full@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 4(%rbx)
LBB0_17:
	movq	_BMSR_ESTATEN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_22
## %bb.18:
	movq	_MII_ESTATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_phy_read
	movq	_ESTATUS_1000_TFULL@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_20
## %bb.19:
	movq	_SUPPORTED_1000baseT_Full@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 4(%rbx)
LBB0_20:
	movq	_ESTATUS_1000_THALF@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_22
## %bb.21:
	movq	_SUPPORTED_1000baseT_Half@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
LBB0_22:
	movq	_SUPPORTED_MII@GOTPCREL(%rip), %rcx
	movl	4(%rbx), %eax
	orl	(%rcx), %eax
	movl	%eax, 4(%rbx)
LBB0_23:
	movl	%eax, 8(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.comm	_AUTONEG_DISABLE,4,2            ## @AUTONEG_DISABLE
	.comm	_SPEED_10,4,2                   ## @SPEED_10
	.comm	_DUPLEX_HALF,4,2                ## @DUPLEX_HALF
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_MII_PHYSID1,4,2                ## @MII_PHYSID1
	.comm	_MII_PHYSID2,4,2                ## @MII_PHYSID2
	.comm	_mii_phy_table,8,3              ## @mii_phy_table
	.comm	_MII_BMSR,4,2                   ## @MII_BMSR
	.comm	_BMSR_ANEGCAPABLE,4,2           ## @BMSR_ANEGCAPABLE
	.comm	_SUPPORTED_Autoneg,4,2          ## @SUPPORTED_Autoneg
	.comm	_BMSR_10HALF,4,2                ## @BMSR_10HALF
	.comm	_SUPPORTED_10baseT_Half,4,2     ## @SUPPORTED_10baseT_Half
	.comm	_BMSR_10FULL,4,2                ## @BMSR_10FULL
	.comm	_SUPPORTED_10baseT_Full,4,2     ## @SUPPORTED_10baseT_Full
	.comm	_BMSR_100HALF,4,2               ## @BMSR_100HALF
	.comm	_SUPPORTED_100baseT_Half,4,2    ## @SUPPORTED_100baseT_Half
	.comm	_BMSR_100FULL,4,2               ## @BMSR_100FULL
	.comm	_SUPPORTED_100baseT_Full,4,2    ## @SUPPORTED_100baseT_Full
	.comm	_BMSR_ESTATEN,4,2               ## @BMSR_ESTATEN
	.comm	_MII_ESTATUS,4,2                ## @MII_ESTATUS
	.comm	_ESTATUS_1000_TFULL,4,2         ## @ESTATUS_1000_TFULL
	.comm	_SUPPORTED_1000baseT_Full,4,2   ## @SUPPORTED_1000baseT_Full
	.comm	_ESTATUS_1000_THALF,4,2         ## @ESTATUS_1000_THALF
	.comm	_SUPPORTED_1000baseT_Half,4,2   ## @SUPPORTED_1000baseT_Half
	.comm	_SUPPORTED_MII,4,2              ## @SUPPORTED_MII
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_emac_mii_phy_probe             ; -- Begin function emac_mii_phy_probe
	.p2align	2
_emac_mii_phy_probe:                    ; @emac_mii_phy_probe
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _AUTONEG_DISABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AUTONEG_DISABLE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0, #48]
	str	wzr, [x0, #8]
	str	w1, [x0]
Lloh3:
	adrp	x8, _SPEED_10@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SPEED_10@GOTPAGEOFF]
Lloh5:
	adrp	x9, _DUPLEX_HALF@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DUPLEX_HALF@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #40]
	stp	xzr, xzr, [x0, #24]
	bl	_emac_mii_reset_phy
	cbz	x0, LBB0_3
LBB0_1:
Lloh9:
	adrp	x8, _ENODEV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh12:
	adrp	x8, _MII_PHYSID1@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MII_PHYSID1@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_phy_read
	mov	x20, x0
Lloh15:
	adrp	x8, _MII_PHYSID2@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MII_PHYSID2@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_phy_read
Lloh18:
	adrp	x8, _mii_phy_table@GOTPAGE
Lloh19:
	ldr	x8, [x8, _mii_phy_table@GOTPAGEOFF]
Lloh20:
	ldr	x10, [x8]
	ldr	x8, [x10]
	cbz	x8, LBB0_1
; %bb.4:
	orr	w9, w0, w20, lsl #16
	add	x10, x10, #8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w11, w12, [x8]
	and	w11, w11, w9
	cmp	w11, w12
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x10], #8
	cbnz	x8, LBB0_5
	b	LBB0_1
LBB0_7:
	str	x8, [x19, #16]
	ldr	w8, [x8, #8]
	str	w8, [x19, #4]
	cbnz	w8, LBB0_24
; %bb.8:
Lloh21:
	adrp	x8, _MII_BMSR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MII_BMSR@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_phy_read
Lloh24:
	adrp	x8, _BMSR_ANEGCAPABLE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _BMSR_ANEGCAPABLE@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_10
; %bb.9:
Lloh27:
	adrp	x8, _SUPPORTED_Autoneg@GOTPAGE
Lloh28:
	ldr	x8, [x8, _SUPPORTED_Autoneg@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_10:
Lloh30:
	adrp	x8, _BMSR_10HALF@GOTPAGE
Lloh31:
	ldr	x8, [x8, _BMSR_10HALF@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_12
; %bb.11:
Lloh33:
	adrp	x8, _SUPPORTED_10baseT_Half@GOTPAGE
Lloh34:
	ldr	x8, [x8, _SUPPORTED_10baseT_Half@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_12:
Lloh36:
	adrp	x8, _BMSR_10FULL@GOTPAGE
Lloh37:
	ldr	x8, [x8, _BMSR_10FULL@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_14
; %bb.13:
Lloh39:
	adrp	x8, _SUPPORTED_10baseT_Full@GOTPAGE
Lloh40:
	ldr	x8, [x8, _SUPPORTED_10baseT_Full@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_14:
Lloh42:
	adrp	x8, _BMSR_100HALF@GOTPAGE
Lloh43:
	ldr	x8, [x8, _BMSR_100HALF@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_16
; %bb.15:
Lloh45:
	adrp	x8, _SUPPORTED_100baseT_Half@GOTPAGE
Lloh46:
	ldr	x8, [x8, _SUPPORTED_100baseT_Half@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_16:
Lloh48:
	adrp	x8, _BMSR_100FULL@GOTPAGE
Lloh49:
	ldr	x8, [x8, _BMSR_100FULL@GOTPAGEOFF]
Lloh50:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_18
; %bb.17:
Lloh51:
	adrp	x8, _SUPPORTED_100baseT_Full@GOTPAGE
Lloh52:
	ldr	x8, [x8, _SUPPORTED_100baseT_Full@GOTPAGEOFF]
Lloh53:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_18:
Lloh54:
	adrp	x8, _BMSR_ESTATEN@GOTPAGE
Lloh55:
	ldr	x8, [x8, _BMSR_ESTATEN@GOTPAGEOFF]
Lloh56:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_23
; %bb.19:
Lloh57:
	adrp	x8, _MII_ESTATUS@GOTPAGE
Lloh58:
	ldr	x8, [x8, _MII_ESTATUS@GOTPAGEOFF]
Lloh59:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_phy_read
Lloh60:
	adrp	x8, _ESTATUS_1000_TFULL@GOTPAGE
Lloh61:
	ldr	x8, [x8, _ESTATUS_1000_TFULL@GOTPAGEOFF]
Lloh62:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_21
; %bb.20:
Lloh63:
	adrp	x8, _SUPPORTED_1000baseT_Full@GOTPAGE
Lloh64:
	ldr	x8, [x8, _SUPPORTED_1000baseT_Full@GOTPAGEOFF]
Lloh65:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_21:
Lloh66:
	adrp	x8, _ESTATUS_1000_THALF@GOTPAGE
Lloh67:
	ldr	x8, [x8, _ESTATUS_1000_THALF@GOTPAGEOFF]
Lloh68:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_23
; %bb.22:
Lloh69:
	adrp	x8, _SUPPORTED_1000baseT_Half@GOTPAGE
Lloh70:
	ldr	x8, [x8, _SUPPORTED_1000baseT_Half@GOTPAGEOFF]
Lloh71:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_23:
Lloh72:
	adrp	x8, _SUPPORTED_MII@GOTPAGE
Lloh73:
	ldr	x8, [x8, _SUPPORTED_MII@GOTPAGEOFF]
Lloh74:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_24:
	mov	w0, #0
	str	w8, [x19, #8]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.cfi_endproc
                                        ; -- End function
	.comm	_AUTONEG_DISABLE,4,2            ; @AUTONEG_DISABLE
	.comm	_SPEED_10,4,2                   ; @SPEED_10
	.comm	_DUPLEX_HALF,4,2                ; @DUPLEX_HALF
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_MII_PHYSID1,4,2                ; @MII_PHYSID1
	.comm	_MII_PHYSID2,4,2                ; @MII_PHYSID2
	.comm	_mii_phy_table,8,3              ; @mii_phy_table
	.comm	_MII_BMSR,4,2                   ; @MII_BMSR
	.comm	_BMSR_ANEGCAPABLE,4,2           ; @BMSR_ANEGCAPABLE
	.comm	_SUPPORTED_Autoneg,4,2          ; @SUPPORTED_Autoneg
	.comm	_BMSR_10HALF,4,2                ; @BMSR_10HALF
	.comm	_SUPPORTED_10baseT_Half,4,2     ; @SUPPORTED_10baseT_Half
	.comm	_BMSR_10FULL,4,2                ; @BMSR_10FULL
	.comm	_SUPPORTED_10baseT_Full,4,2     ; @SUPPORTED_10baseT_Full
	.comm	_BMSR_100HALF,4,2               ; @BMSR_100HALF
	.comm	_SUPPORTED_100baseT_Half,4,2    ; @SUPPORTED_100baseT_Half
	.comm	_BMSR_100FULL,4,2               ; @BMSR_100FULL
	.comm	_SUPPORTED_100baseT_Full,4,2    ; @SUPPORTED_100baseT_Full
	.comm	_BMSR_ESTATEN,4,2               ; @BMSR_ESTATEN
	.comm	_MII_ESTATUS,4,2                ; @MII_ESTATUS
	.comm	_ESTATUS_1000_TFULL,4,2         ; @ESTATUS_1000_TFULL
	.comm	_SUPPORTED_1000baseT_Full,4,2   ; @SUPPORTED_1000baseT_Full
	.comm	_ESTATUS_1000_THALF,4,2         ; @ESTATUS_1000_THALF
	.comm	_SUPPORTED_1000baseT_Half,4,2   ; @SUPPORTED_1000baseT_Half
	.comm	_SUPPORTED_MII,4,2              ; @SUPPORTED_MII
.subsections_via_symbols
