	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_kmrn_lock_loss_workaround_ich8lan
_e1000_kmrn_lock_loss_workaround_ich8lan: ## @e1000_kmrn_lock_loss_workaround_ich8lan
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, (%rdi)
	je	LBB0_11
## %bb.1:
	movq	%rdi, %r15
	xorl	%ebx, %ebx
	leaq	-44(%rbp), %rcx
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_e1000e_phy_has_link_generic
	cmpl	$0, -44(%rbp)
	je	LBB0_12
## %bb.2:
	movl	$10, %r12d
	movq	_IGP3_KMRN_DIAG@GOTPCREL(%rip), %r13
	leaq	-48(%rbp), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_e1e_rphy
	testq	%rax, %rax
	jne	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r13), %esi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_e1e_rphy
	testq	%rax, %rax
	jne	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_IGP3_KMRN_DIAG_PCS_LOCK_LOSS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -48(%rbp)
	je	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	callq	_e1000_phy_hw_reset
	movl	$5, %edi
	callq	_mdelay
	decl	%r12d
	jne	LBB0_3
## %bb.7:
	movq	_PHY_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_er32
	movq	_E1000_PHY_CTRL_GBE_DISABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_E1000_PHY_CTRL_NOND0A_GBE_DISABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_ew32
	movq	%r15, %rdi
	callq	_e1000e_gig_downshift_workaround_ich8lan
	movq	_E1000_ERR_PHY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subq	(%rax), %rbx
	jmp	LBB0_12
LBB0_11:
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_10:
	movq	%rax, %rbx
LBB0_12:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IGP3_KMRN_DIAG,4,2             ## @IGP3_KMRN_DIAG
	.comm	_IGP3_KMRN_DIAG_PCS_LOCK_LOSS,4,2 ## @IGP3_KMRN_DIAG_PCS_LOCK_LOSS
	.comm	_PHY_CTRL,4,2                   ## @PHY_CTRL
	.comm	_E1000_PHY_CTRL_GBE_DISABLE,4,2 ## @E1000_PHY_CTRL_GBE_DISABLE
	.comm	_E1000_PHY_CTRL_NOND0A_GBE_DISABLE,4,2 ## @E1000_PHY_CTRL_NOND0A_GBE_DISABLE
	.comm	_E1000_ERR_PHY,8,3              ## @E1000_ERR_PHY
	.no_dead_strip	_e1000_kmrn_lock_loss_workaround_ich8lan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_kmrn_lock_loss_workaround_ich8lan
_e1000_kmrn_lock_loss_workaround_ich8lan: ; @e1000_kmrn_lock_loss_workaround_ich8lan
	.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	w8, [x0]
	cbz	w8, LBB0_8
; %bb.1:
	mov	x19, x0
	add	x3, sp, #8
	mov	w1, #1
	mov	w2, #0
	bl	_e1000e_phy_has_link_generic
	ldr	w8, [sp, #8]
	cbz	w8, LBB0_8
; %bb.2:
	mov	w20, #10
Lloh0:
	adrp	x21, _IGP3_KMRN_DIAG@GOTPAGE
Lloh1:
	ldr	x21, [x21, _IGP3_KMRN_DIAG@GOTPAGEOFF]
Lloh2:
	adrp	x22, _IGP3_KMRN_DIAG_PCS_LOCK_LOSS@GOTPAGE
Lloh3:
	ldr	x22, [x22, _IGP3_KMRN_DIAG_PCS_LOCK_LOSS@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_e1e_rphy
	cbnz	x0, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_e1e_rphy
	cbnz	x0, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [sp, #12]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_e1000_phy_hw_reset
	mov	w0, #5
	bl	_mdelay
	subs	w20, w20, #1
	b.ne	LBB0_3
; %bb.7:
Lloh4:
	adrp	x20, _PHY_CTRL@GOTPAGE
Lloh5:
	ldr	x20, [x20, _PHY_CTRL@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_er32
Lloh6:
	adrp	x8, _E1000_PHY_CTRL_GBE_DISABLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _E1000_PHY_CTRL_GBE_DISABLE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _E1000_PHY_CTRL_NOND0A_GBE_DISABLE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _E1000_PHY_CTRL_NOND0A_GBE_DISABLE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w0
	orr	w1, w8, w9
	ldr	w0, [x20]
	bl	_ew32
	mov	x0, x19
	bl	_e1000e_gig_downshift_workaround_ich8lan
Lloh12:
	adrp	x8, _E1000_ERR_PHY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _E1000_ERR_PHY@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	neg	x0, x8
	b	LBB0_9
LBB0_8:
	mov	x0, #0
LBB0_9:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_IGP3_KMRN_DIAG,4,2             ; @IGP3_KMRN_DIAG
	.comm	_IGP3_KMRN_DIAG_PCS_LOCK_LOSS,4,2 ; @IGP3_KMRN_DIAG_PCS_LOCK_LOSS
	.comm	_PHY_CTRL,4,2                   ; @PHY_CTRL
	.comm	_E1000_PHY_CTRL_GBE_DISABLE,4,2 ; @E1000_PHY_CTRL_GBE_DISABLE
	.comm	_E1000_PHY_CTRL_NOND0A_GBE_DISABLE,4,2 ; @E1000_PHY_CTRL_NOND0A_GBE_DISABLE
	.comm	_E1000_ERR_PHY,8,3              ; @E1000_ERR_PHY
	.no_dead_strip	_e1000_kmrn_lock_loss_workaround_ich8lan
.subsections_via_symbols
