	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_k1_gig_workaround_hv
_e1000_k1_gig_workaround_hv:            ## @e1000_k1_gig_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$0, -36(%rbp)
	movq	24(%rdi), %rax
	movq	_e1000_pchlan@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movl	%esi, %r12d
	movq	%rdi, %r15
	movl	32(%rdi), %r14d
	callq	*16(%rdi)
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_15
## %bb.3:
	testl	%r12d, %r12d
	je	LBB0_11
## %bb.4:
	movq	(%r15), %rax
	movq	_e1000_phy_82578@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.5:
	movq	_BM_CS_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	movq	%r15, %rdi
	callq	_e1e_rphy_locked
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_14
## %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	-36(%rbp), %eax
	movl	%eax, -36(%rbp)
	movq	_BM_CS_STATUS_SPEED_1000@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	xorl	%edx, %edx
	cmpl	%ecx, %eax
	cmovel	%edx, %r14d
	movq	(%r15), %rax
LBB0_7:
	movq	_e1000_phy_82577@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.8:
	movq	_HV_M_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	movq	%r15, %rdi
	callq	_e1e_rphy_locked
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_14
## %bb.9:
	movq	_HV_M_STATUS_LINK_UP@GOTPCREL(%rip), %rax
	movq	_HV_M_STATUS_AUTONEG_COMPLETE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_HV_M_STATUS_SPEED_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%ecx, %eax
	andl	-36(%rbp), %eax
	movl	%eax, -36(%rbp)
	movq	_HV_M_STATUS_SPEED_1000@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	xorl	%edx, %edx
	cmpl	%ecx, %eax
	cmovel	%edx, %r14d
LBB0_10:
	movl	$770, %edi                      ## imm = 0x302
	movl	$19, %esi
	callq	_PHY_REG
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	$256, %edx                      ## imm = 0x100
	jmp	LBB0_12
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_15
LBB0_11:
	movl	$770, %edi                      ## imm = 0x302
	movl	$19, %esi
	callq	_PHY_REG
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	$16640, %edx                    ## imm = 0x4100
LBB0_12:
	callq	_e1e_wphy_locked
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_14
## %bb.13:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_e1000_configure_k1_ich8lan
	movq	%rax, %rbx
LBB0_14:
	movq	%r15, %rdi
	callq	*8(%r15)
LBB0_15:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_e1000_pchlan,8,3               ## @e1000_pchlan
	.comm	_e1000_phy_82578,8,3            ## @e1000_phy_82578
	.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	_e1000_phy_82577,8,3            ## @e1000_phy_82577
	.comm	_HV_M_STATUS,4,2                ## @HV_M_STATUS
	.comm	_HV_M_STATUS_LINK_UP,4,2        ## @HV_M_STATUS_LINK_UP
	.comm	_HV_M_STATUS_AUTONEG_COMPLETE,4,2 ## @HV_M_STATUS_AUTONEG_COMPLETE
	.comm	_HV_M_STATUS_SPEED_MASK,4,2     ## @HV_M_STATUS_SPEED_MASK
	.comm	_HV_M_STATUS_SPEED_1000,4,2     ## @HV_M_STATUS_SPEED_1000
	.no_dead_strip	_e1000_k1_gig_workaround_hv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_k1_gig_workaround_hv
_e1000_k1_gig_workaround_hv:            ; @e1000_k1_gig_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
	str	wzr, [sp, #12]
	ldr	x8, [x0, #24]
Lloh0:
	adrp	x9, _e1000_pchlan@GOTPAGE
Lloh1:
	ldr	x9, [x9, _e1000_pchlan@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.1:
	mov	x22, x1
	mov	x19, x0
	ldr	w20, [x0, #32]
	ldr	x8, [x0, #16]
	blr	x8
	mov	x21, x0
	cbnz	x0, LBB0_15
; %bb.2:
	cbz	w22, LBB0_11
; %bb.3:
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _e1000_phy_82578@GOTPAGE
Lloh4:
	ldr	x9, [x9, _e1000_phy_82578@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
Lloh6:
	adrp	x8, _BM_CS_STATUS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BM_CS_STATUS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_e1e_rphy_locked
	mov	x21, x0
	cbnz	x0, LBB0_14
; %bb.5:
Lloh9:
	adrp	x8, _BM_CS_STATUS_LINK_UP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BM_CS_STATUS_LINK_UP@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _BM_CS_STATUS_RESOLVED@GOTPAGE
Lloh13:
	ldr	x9, [x9, _BM_CS_STATUS_RESOLVED@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh15:
	adrp	x9, _BM_CS_STATUS_SPEED_MASK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _BM_CS_STATUS_SPEED_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w9, w8, w9
	ldr	w10, [sp, #12]
	and	w9, w10, w9
Lloh18:
	adrp	x10, _BM_CS_STATUS_SPEED_1000@GOTPAGE
Lloh19:
	ldr	x10, [x10, _BM_CS_STATUS_SPEED_1000@GOTPAGEOFF]
	str	w9, [sp, #12]
Lloh20:
	ldr	w10, [x10]
	orr	w8, w10, w8
	cmp	w9, w8
	csel	w20, wzr, w20, eq
	ldr	x8, [x19]
LBB0_6:
Lloh21:
	adrp	x9, _e1000_phy_82577@GOTPAGE
Lloh22:
	ldr	x9, [x9, _e1000_phy_82577@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.7:
Lloh24:
	adrp	x8, _HV_M_STATUS@GOTPAGE
Lloh25:
	ldr	x8, [x8, _HV_M_STATUS@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_e1e_rphy_locked
	mov	x21, x0
	cbnz	x0, LBB0_14
; %bb.8:
Lloh27:
	adrp	x8, _HV_M_STATUS_LINK_UP@GOTPAGE
Lloh28:
	ldr	x8, [x8, _HV_M_STATUS_LINK_UP@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
Lloh30:
	adrp	x9, _HV_M_STATUS_AUTONEG_COMPLETE@GOTPAGE
Lloh31:
	ldr	x9, [x9, _HV_M_STATUS_AUTONEG_COMPLETE@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
Lloh33:
	adrp	x10, _HV_M_STATUS_SPEED_MASK@GOTPAGE
Lloh34:
	ldr	x10, [x10, _HV_M_STATUS_SPEED_MASK@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh35:
	ldr	w9, [x10]
	orr	w9, w8, w9
	ldr	w10, [sp, #12]
	and	w9, w10, w9
	str	w9, [sp, #12]
Lloh36:
	adrp	x10, _HV_M_STATUS_SPEED_1000@GOTPAGE
Lloh37:
	ldr	x10, [x10, _HV_M_STATUS_SPEED_1000@GOTPAGEOFF]
Lloh38:
	ldr	w10, [x10]
	orr	w8, w10, w8
	cmp	w9, w8
	csel	w20, wzr, w20, eq
LBB0_9:
	mov	w0, #770
	mov	w1, #19
	bl	_PHY_REG
	mov	x1, x0
	mov	x0, x19
	mov	w2, #256
	b	LBB0_12
LBB0_10:
	mov	x21, #0
	b	LBB0_15
LBB0_11:
	mov	w0, #770
	mov	w1, #19
	bl	_PHY_REG
	mov	x1, x0
	mov	x0, x19
	mov	w2, #16640
LBB0_12:
	bl	_e1e_wphy_locked
	mov	x21, x0
	cbnz	x0, LBB0_14
; %bb.13:
	mov	x0, x19
	mov	x1, x20
	bl	_e1000_configure_k1_ich8lan
	mov	x21, x0
LBB0_14:
	ldr	x8, [x19, #8]
	mov	x0, x19
	blr	x8
LBB0_15:
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_e1000_pchlan,8,3               ; @e1000_pchlan
	.comm	_e1000_phy_82578,8,3            ; @e1000_phy_82578
	.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	_e1000_phy_82577,8,3            ; @e1000_phy_82577
	.comm	_HV_M_STATUS,4,2                ; @HV_M_STATUS
	.comm	_HV_M_STATUS_LINK_UP,4,2        ; @HV_M_STATUS_LINK_UP
	.comm	_HV_M_STATUS_AUTONEG_COMPLETE,4,2 ; @HV_M_STATUS_AUTONEG_COMPLETE
	.comm	_HV_M_STATUS_SPEED_MASK,4,2     ; @HV_M_STATUS_SPEED_MASK
	.comm	_HV_M_STATUS_SPEED_1000,4,2     ; @HV_M_STATUS_SPEED_1000
	.no_dead_strip	_e1000_k1_gig_workaround_hv
.subsections_via_symbols
