	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_e1000_link_stall_workaround_hv ## -- Begin function e1000_link_stall_workaround_hv
	.p2align	4, 0x90
_e1000_link_stall_workaround_hv:        ## @e1000_link_stall_workaround_hv
	.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), %rax
	movq	_e1000_phy_82578@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movq	%rdi, %rbx
	movq	_MII_BMCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	callq	_e1e_rphy
	movq	_BMCR_LOOPBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -28(%rbp)
	je	LBB0_5
LBB0_3:
	xorl	%eax, %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_BM_CS_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_e1e_rphy
	testq	%rax, %rax
	jne	LBB0_4
## %bb.6:
	movq	_BM_CS_STATUS_LINK_UP@GOTPCREL(%rip), %rax
	movq	_BM_CS_STATUS_RESOLVED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_BM_CS_STATUS_SPEED_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%ecx, %eax
	andl	-28(%rbp), %eax
	movl	%eax, -28(%rbp)
	movq	_BM_CS_STATUS_SPEED_1000@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	cmpl	%ecx, %eax
	jne	LBB0_3
## %bb.7:
	movl	$200, %edi
	callq	_msleep
	movq	_HV_MUX_DATA_CTRL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_HV_MUX_DATA_CTRL_GEN_TO_MAC@GOTPCREL(%rip), %r15
	movq	_HV_MUX_DATA_CTRL_FORCE_SPEED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_e1e_wphy
	testq	%rax, %rax
	jne	LBB0_4
## %bb.8:
	movl	(%r14), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_e1e_wphy
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_e1000_phy_82578,8,3            ## @e1000_phy_82578
	.comm	_MII_BMCR,4,2                   ## @MII_BMCR
	.comm	_BMCR_LOOPBACK,4,2              ## @BMCR_LOOPBACK
	.comm	_BM_CS_STATUS,4,2               ## @BM_CS_STATUS
	.comm	_BM_CS_STATUS_LINK_UP,4,2       ## @BM_CS_STATUS_LINK_UP
	.comm	_BM_CS_STATUS_RESOLVED,4,2      ## @BM_CS_STATUS_RESOLVED
	.comm	_BM_CS_STATUS_SPEED_MASK,4,2    ## @BM_CS_STATUS_SPEED_MASK
	.comm	_BM_CS_STATUS_SPEED_1000,4,2    ## @BM_CS_STATUS_SPEED_1000
	.comm	_HV_MUX_DATA_CTRL,4,2           ## @HV_MUX_DATA_CTRL
	.comm	_HV_MUX_DATA_CTRL_GEN_TO_MAC,4,2 ## @HV_MUX_DATA_CTRL_GEN_TO_MAC
	.comm	_HV_MUX_DATA_CTRL_FORCE_SPEED,4,2 ## @HV_MUX_DATA_CTRL_FORCE_SPEED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_e1000_link_stall_workaround_hv ; -- Begin function e1000_link_stall_workaround_hv
	.p2align	2
_e1000_link_stall_workaround_hv:        ; @e1000_link_stall_workaround_hv
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _e1000_phy_82578@GOTPAGE
Lloh1:
	ldr	x9, [x9, _e1000_phy_82578@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _MII_BMCR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MII_BMCR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_e1e_rphy
	ldr	w8, [sp, #12]
Lloh6:
	adrp	x9, _BMCR_LOOPBACK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BMCR_LOOPBACK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
LBB0_2:
	mov	x0, #0
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_4:
Lloh9:
	adrp	x8, _BM_CS_STATUS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BM_CS_STATUS@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_e1e_rphy
	cbnz	x0, LBB0_3
; %bb.5:
Lloh12:
	adrp	x8, _BM_CS_STATUS_LINK_UP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BM_CS_STATUS_LINK_UP@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _BM_CS_STATUS_RESOLVED@GOTPAGE
Lloh16:
	ldr	x9, [x9, _BM_CS_STATUS_RESOLVED@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh18:
	adrp	x9, _BM_CS_STATUS_SPEED_MASK@GOTPAGE
Lloh19:
	ldr	x9, [x9, _BM_CS_STATUS_SPEED_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w9, w8, w9
	ldr	w10, [sp, #12]
	and	w9, w10, w9
	str	w9, [sp, #12]
Lloh21:
	adrp	x10, _BM_CS_STATUS_SPEED_1000@GOTPAGE
Lloh22:
	ldr	x10, [x10, _BM_CS_STATUS_SPEED_1000@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
	orr	w8, w10, w8
	cmp	w9, w8
	b.ne	LBB0_2
; %bb.6:
	mov	w0, #200
	bl	_msleep
Lloh24:
	adrp	x20, _HV_MUX_DATA_CTRL@GOTPAGE
Lloh25:
	ldr	x20, [x20, _HV_MUX_DATA_CTRL@GOTPAGEOFF]
Lloh26:
	adrp	x21, _HV_MUX_DATA_CTRL_GEN_TO_MAC@GOTPAGE
Lloh27:
	ldr	x21, [x21, _HV_MUX_DATA_CTRL_GEN_TO_MAC@GOTPAGEOFF]
	ldr	w1, [x20]
	ldr	w8, [x21]
Lloh28:
	adrp	x9, _HV_MUX_DATA_CTRL_FORCE_SPEED@GOTPAGE
Lloh29:
	ldr	x9, [x9, _HV_MUX_DATA_CTRL_FORCE_SPEED@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_e1e_wphy
	cbnz	x0, LBB0_3
; %bb.7:
	ldr	w1, [x20]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_e1e_wphy
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_e1000_phy_82578,8,3            ; @e1000_phy_82578
	.comm	_MII_BMCR,4,2                   ; @MII_BMCR
	.comm	_BMCR_LOOPBACK,4,2              ; @BMCR_LOOPBACK
	.comm	_BM_CS_STATUS,4,2               ; @BM_CS_STATUS
	.comm	_BM_CS_STATUS_LINK_UP,4,2       ; @BM_CS_STATUS_LINK_UP
	.comm	_BM_CS_STATUS_RESOLVED,4,2      ; @BM_CS_STATUS_RESOLVED
	.comm	_BM_CS_STATUS_SPEED_MASK,4,2    ; @BM_CS_STATUS_SPEED_MASK
	.comm	_BM_CS_STATUS_SPEED_1000,4,2    ; @BM_CS_STATUS_SPEED_1000
	.comm	_HV_MUX_DATA_CTRL,4,2           ; @HV_MUX_DATA_CTRL
	.comm	_HV_MUX_DATA_CTRL_GEN_TO_MAC,4,2 ; @HV_MUX_DATA_CTRL_GEN_TO_MAC
	.comm	_HV_MUX_DATA_CTRL_FORCE_SPEED,4,2 ; @HV_MUX_DATA_CTRL_FORCE_SPEED
.subsections_via_symbols
