	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function genmii_read_link
_genmii_read_link:                      ## @genmii_read_link
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %rax
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.1:
	movq	_MII_LPA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_phy_read
	movl	%eax, %ebx
	movq	_MII_ADVERTISE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_phy_read
	movl	%eax, %r14d
	andl	%ebx, %r14d
	js	LBB0_2
## %bb.3:
	movq	_SUPPORTED_1000baseT_Full@GOTPCREL(%rip), %rax
	movq	_SUPPORTED_1000baseT_Half@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ecx, 8(%r15)
	je	LBB0_4
## %bb.5:
	movq	_MII_CTRL1000@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_phy_read
	movl	%eax, %ebx
	movq	_MII_STAT1000@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_phy_read
	testl	%eax, %eax
	js	LBB0_26
## %bb.6:
	testl	%ebx, %ebx
	js	LBB0_26
## %bb.7:
	shll	$2, %ebx
	andl	%ebx, %eax
	jmp	LBB0_8
LBB0_16:
	movq	_MII_BMCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_phy_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_26
## %bb.17:
	movq	_BMCR_FULLDPLX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	jne	LBB0_18
## %bb.19:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_2:
	movl	%r14d, %ebx
	jmp	LBB0_26
LBB0_18:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
LBB0_20:
	movq	(%rax), %rax
	movq	%rax, 16(%r15)
	movq	_BMCR_SPEED1000@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	movq	_BMCR_SPEED100@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%ebx, %ecx
	jne	LBB0_21
## %bb.22:
	movq	_SPEED_10@GOTPCREL(%rip), %rcx
	testl	%eax, %eax
	jne	LBB0_24
	jmp	LBB0_25
LBB0_21:
	movq	_SPEED_100@GOTPCREL(%rip), %rcx
	testl	%eax, %eax
	je	LBB0_25
LBB0_24:
	movq	_SPEED_1000@GOTPCREL(%rip), %rcx
LBB0_25:
	movq	(%rcx), %rax
	movq	%rax, 32(%r15)
	movq	$0, 24(%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_26
LBB0_4:
	xorl	%eax, %eax
LBB0_8:
	movq	_SPEED_10@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 32(%r15)
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 16(%r15)
	movq	$0, 24(%r15)
	movq	_LPA_1000FULL@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movq	_LPA_1000HALF@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	%edx, %esi
	testl	%eax, %esi
	je	LBB0_10
## %bb.9:
	movq	_SPEED_1000@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movq	%rsi, 32(%r15)
	testl	%eax, %edx
	je	LBB0_14
LBB0_13:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, 16(%r15)
LBB0_14:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpq	(%rax), %rcx
	jne	LBB0_26
## %bb.15:
	movq	_LPA_PAUSE_CAP@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	movl	(%rax), %eax
	andl	%r14d, %eax
	setne	%cl
	movl	%ecx, 24(%r15)
	movq	_LPA_PAUSE_ASYM@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	andl	(%rax), %r14d
	setne	%cl
	movl	%ecx, 28(%r15)
LBB0_26:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_LPA_100FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_LPA_100HALF@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%eax, %edx
	testl	%r14d, %edx
	je	LBB0_12
## %bb.11:
	movq	_SPEED_100@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rdx, 32(%r15)
	testl	%r14d, %eax
	jne	LBB0_13
	jmp	LBB0_14
LBB0_12:
	movq	_LPA_10FULL@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	jne	LBB0_13
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_AUTONEG_ENABLE,8,3             ## @AUTONEG_ENABLE
	.comm	_MII_LPA,4,2                    ## @MII_LPA
	.comm	_MII_ADVERTISE,4,2              ## @MII_ADVERTISE
	.comm	_SUPPORTED_1000baseT_Full,4,2   ## @SUPPORTED_1000baseT_Full
	.comm	_SUPPORTED_1000baseT_Half,4,2   ## @SUPPORTED_1000baseT_Half
	.comm	_MII_CTRL1000,4,2               ## @MII_CTRL1000
	.comm	_MII_STAT1000,4,2               ## @MII_STAT1000
	.comm	_SPEED_10,8,3                   ## @SPEED_10
	.comm	_DUPLEX_HALF,8,3                ## @DUPLEX_HALF
	.comm	_LPA_1000FULL,4,2               ## @LPA_1000FULL
	.comm	_LPA_1000HALF,4,2               ## @LPA_1000HALF
	.comm	_SPEED_1000,8,3                 ## @SPEED_1000
	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
	.comm	_LPA_100FULL,4,2                ## @LPA_100FULL
	.comm	_LPA_100HALF,4,2                ## @LPA_100HALF
	.comm	_SPEED_100,8,3                  ## @SPEED_100
	.comm	_LPA_10FULL,4,2                 ## @LPA_10FULL
	.comm	_LPA_PAUSE_CAP,4,2              ## @LPA_PAUSE_CAP
	.comm	_LPA_PAUSE_ASYM,4,2             ## @LPA_PAUSE_ASYM
	.comm	_MII_BMCR,4,2                   ## @MII_BMCR
	.comm	_BMCR_FULLDPLX,4,2              ## @BMCR_FULLDPLX
	.comm	_BMCR_SPEED1000,4,2             ## @BMCR_SPEED1000
	.comm	_BMCR_SPEED100,4,2              ## @BMCR_SPEED100
	.no_dead_strip	_genmii_read_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function genmii_read_link
_genmii_read_link:                      ; @genmii_read_link
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _AUTONEG_ENABLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AUTONEG_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.1:
Lloh3:
	adrp	x8, _MII_LPA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MII_LPA@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_phy_read
	mov	x20, x0
Lloh6:
	adrp	x8, _MII_ADVERTISE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MII_ADVERTISE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_phy_read
	ands	w21, w0, w20
	b.lt	LBB0_8
; %bb.2:
	ldr	w8, [x19, #8]
Lloh9:
	adrp	x9, _SUPPORTED_1000baseT_Full@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SUPPORTED_1000baseT_Full@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _SUPPORTED_1000baseT_Half@GOTPAGE
Lloh13:
	ldr	x10, [x10, _SUPPORTED_1000baseT_Half@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_9
; %bb.3:
Lloh15:
	adrp	x8, _MII_CTRL1000@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MII_CTRL1000@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_phy_read
	mov	x20, x0
Lloh18:
	adrp	x8, _MII_STAT1000@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MII_STAT1000@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_phy_read
	tbnz	w0, #31, LBB0_16
; %bb.4:
	tbnz	w20, #31, LBB0_16
; %bb.5:
	and	w9, w0, w20, lsl #2
	b	LBB0_10
LBB0_6:
Lloh21:
	adrp	x8, _MII_BMCR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MII_BMCR@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_phy_read
	mov	x20, x0
	tbnz	w0, #31, LBB0_16
; %bb.7:
Lloh24:
	adrp	x8, _BMCR_FULLDPLX@GOTPAGE
Lloh25:
	ldr	x8, [x8, _BMCR_FULLDPLX@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
Lloh27:
	adrp	x9, _DUPLEX_HALF@GOTPAGE
Lloh28:
	ldr	x9, [x9, _DUPLEX_HALF@GOTPAGEOFF]
Lloh29:
	adrp	x10, _DUPLEX_FULL@GOTPAGE
Lloh30:
	ldr	x10, [x10, _DUPLEX_FULL@GOTPAGEOFF]
	tst	w8, w20
	csel	x8, x9, x10, eq
	ldr	x8, [x8]
	str	x8, [x19, #16]
Lloh31:
	adrp	x8, _BMCR_SPEED1000@GOTPAGE
Lloh32:
	ldr	x8, [x8, _BMCR_SPEED1000@GOTPAGEOFF]
Lloh33:
	adrp	x9, _BMCR_SPEED100@GOTPAGE
Lloh34:
	ldr	x9, [x9, _BMCR_SPEED100@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
Lloh36:
	ldr	w9, [x9]
Lloh37:
	adrp	x10, _SPEED_10@GOTPAGE
Lloh38:
	ldr	x10, [x10, _SPEED_10@GOTPAGEOFF]
Lloh39:
	adrp	x11, _SPEED_100@GOTPAGE
Lloh40:
	ldr	x11, [x11, _SPEED_100@GOTPAGEOFF]
	tst	w9, w20
	csel	x9, x10, x11, eq
	ldr	x9, [x9]
Lloh41:
	adrp	x10, _SPEED_1000@GOTPAGE
Lloh42:
	ldr	x10, [x10, _SPEED_1000@GOTPAGEOFF]
Lloh43:
	ldr	x10, [x10]
	tst	w8, w20
	csel	x8, x9, x10, eq
	stp	xzr, x8, [x19, #24]
	b	LBB0_15
LBB0_8:
	mov	x20, x21
	b	LBB0_16
LBB0_9:
	mov	w9, #0
LBB0_10:
Lloh44:
	adrp	x8, _SPEED_10@GOTPAGE
Lloh45:
	ldr	x8, [x8, _SPEED_10@GOTPAGEOFF]
Lloh46:
	ldr	x8, [x8]
	str	x8, [x19, #32]
Lloh47:
	adrp	x8, _DUPLEX_HALF@GOTPAGE
Lloh48:
	ldr	x8, [x8, _DUPLEX_HALF@GOTPAGEOFF]
Lloh49:
	ldr	x8, [x8]
	stp	x8, xzr, [x19, #16]
Lloh50:
	adrp	x10, _LPA_1000FULL@GOTPAGE
Lloh51:
	ldr	x10, [x10, _LPA_1000FULL@GOTPAGEOFF]
Lloh52:
	ldr	w10, [x10]
Lloh53:
	adrp	x11, _LPA_1000HALF@GOTPAGE
Lloh54:
	ldr	x11, [x11, _LPA_1000HALF@GOTPAGEOFF]
Lloh55:
	ldr	w11, [x11]
	orr	w11, w11, w10
	tst	w11, w9
	b.eq	LBB0_17
; %bb.11:
Lloh56:
	adrp	x11, _SPEED_1000@GOTPAGE
Lloh57:
	ldr	x11, [x11, _SPEED_1000@GOTPAGEOFF]
Lloh58:
	ldr	x11, [x11]
	str	x11, [x19, #32]
	tst	w10, w9
	b.eq	LBB0_13
LBB0_12:
Lloh59:
	adrp	x8, _DUPLEX_FULL@GOTPAGE
Lloh60:
	ldr	x8, [x8, _DUPLEX_FULL@GOTPAGEOFF]
Lloh61:
	ldr	x8, [x8]
	str	x8, [x19, #16]
LBB0_13:
Lloh62:
	adrp	x9, _DUPLEX_FULL@GOTPAGE
Lloh63:
	ldr	x9, [x9, _DUPLEX_FULL@GOTPAGEOFF]
Lloh64:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.14:
	mov	w20, #0
Lloh65:
	adrp	x8, _LPA_PAUSE_CAP@GOTPAGE
Lloh66:
	ldr	x8, [x8, _LPA_PAUSE_CAP@GOTPAGEOFF]
Lloh67:
	ldr	w8, [x8]
	tst	w8, w21
Lloh68:
	adrp	x8, _LPA_PAUSE_ASYM@GOTPAGE
Lloh69:
	ldr	x8, [x8, _LPA_PAUSE_ASYM@GOTPAGEOFF]
	cset	w9, ne
Lloh70:
	ldr	w8, [x8]
	tst	w8, w21
	cset	w8, ne
	stp	w9, w8, [x19, #24]
	b	LBB0_16
LBB0_15:
	mov	w20, #0
LBB0_16:
	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
LBB0_17:
Lloh71:
	adrp	x9, _LPA_100FULL@GOTPAGE
Lloh72:
	ldr	x9, [x9, _LPA_100FULL@GOTPAGEOFF]
Lloh73:
	ldr	w9, [x9]
Lloh74:
	adrp	x10, _LPA_100HALF@GOTPAGE
Lloh75:
	ldr	x10, [x10, _LPA_100HALF@GOTPAGEOFF]
Lloh76:
	ldr	w10, [x10]
	orr	w10, w10, w9
	tst	w10, w21
	b.eq	LBB0_19
; %bb.18:
Lloh77:
	adrp	x10, _SPEED_100@GOTPAGE
Lloh78:
	ldr	x10, [x10, _SPEED_100@GOTPAGEOFF]
Lloh79:
	ldr	x10, [x10]
	str	x10, [x19, #32]
	tst	w9, w21
	b.ne	LBB0_12
	b	LBB0_13
LBB0_19:
Lloh80:
	adrp	x9, _LPA_10FULL@GOTPAGE
Lloh81:
	ldr	x9, [x9, _LPA_10FULL@GOTPAGEOFF]
Lloh82:
	ldr	w9, [x9]
	tst	w9, w21
	b.ne	LBB0_12
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh35
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh74, Lloh75, Lloh76
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.loh AdrpLdrGotLdr	Lloh77, Lloh78, Lloh79
	.loh AdrpLdrGotLdr	Lloh80, Lloh81, Lloh82
	.cfi_endproc
                                        ; -- End function
	.comm	_AUTONEG_ENABLE,8,3             ; @AUTONEG_ENABLE
	.comm	_MII_LPA,4,2                    ; @MII_LPA
	.comm	_MII_ADVERTISE,4,2              ; @MII_ADVERTISE
	.comm	_SUPPORTED_1000baseT_Full,4,2   ; @SUPPORTED_1000baseT_Full
	.comm	_SUPPORTED_1000baseT_Half,4,2   ; @SUPPORTED_1000baseT_Half
	.comm	_MII_CTRL1000,4,2               ; @MII_CTRL1000
	.comm	_MII_STAT1000,4,2               ; @MII_STAT1000
	.comm	_SPEED_10,8,3                   ; @SPEED_10
	.comm	_DUPLEX_HALF,8,3                ; @DUPLEX_HALF
	.comm	_LPA_1000FULL,4,2               ; @LPA_1000FULL
	.comm	_LPA_1000HALF,4,2               ; @LPA_1000HALF
	.comm	_SPEED_1000,8,3                 ; @SPEED_1000
	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
	.comm	_LPA_100FULL,4,2                ; @LPA_100FULL
	.comm	_LPA_100HALF,4,2                ; @LPA_100HALF
	.comm	_SPEED_100,8,3                  ; @SPEED_100
	.comm	_LPA_10FULL,4,2                 ; @LPA_10FULL
	.comm	_LPA_PAUSE_CAP,4,2              ; @LPA_PAUSE_CAP
	.comm	_LPA_PAUSE_ASYM,4,2             ; @LPA_PAUSE_ASYM
	.comm	_MII_BMCR,4,2                   ; @MII_BMCR
	.comm	_BMCR_FULLDPLX,4,2              ; @BMCR_FULLDPLX
	.comm	_BMCR_SPEED1000,4,2             ; @BMCR_SPEED1000
	.comm	_BMCR_SPEED100,4,2              ; @BMCR_SPEED100
	.no_dead_strip	_genmii_read_link
.subsections_via_symbols
