	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_init_phy_workarounds_pchlan
_e1000_init_phy_workarounds_pchlan:     ## @e1000_init_phy_workarounds_pchlan
	.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	_FWSM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_er32
	movl	%eax, %r14d
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_e1000_gate_hw_phy_config_ich8lan
	movq	_e1000_ulp_state_unknown@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r15)
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_e1000_disable_ulp_lpt_lp
	movq	%r15, %rdi
	callq	*24(%r15)
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_e_dbg
	jmp	LBB0_24
LBB0_2:
	movl	(%r15), %eax
	leal	-129(%rax), %ecx
	cmpl	$3, %ecx
	jae	LBB0_5
## %bb.3:
	movq	%r15, %rdi
	callq	_e1000_phy_is_accessible_pchlan
	testl	%eax, %eax
	jne	LBB0_10
## %bb.4:
	movq	_CTRL_EXT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_er32
	movq	_E1000_CTRL_EXT_FORCE_SMBUS@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_ew32
	movl	$50, %edi
	callq	_msleep
	jmp	LBB0_7
LBB0_5:
	cmpl	$128, %eax
	je	LBB0_9
## %bb.6:
	cmpl	$132, %eax
	jne	LBB0_10
LBB0_7:
	movq	%r15, %rdi
	callq	_e1000_phy_is_accessible_pchlan
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:
	cmpl	$128, (%r15)
	jne	LBB0_16
LBB0_9:
	movq	_E1000_ICH_FWSM_FW_VALID@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_16
LBB0_10:
	movq	%r15, %rdi
	callq	*16(%r15)
LBB0_11:
	movq	%r15, %rdi
	callq	*8(%r15)
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	leaq	L_.str.2(%rip), %rdi
	callq	_e_err
LBB0_23:
	xorl	%ebx, %ebx
	jmp	LBB0_24
LBB0_13:
	movq	%r15, %rdi
	callq	_e1000e_phy_hw_reset_generic
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_24
## %bb.14:
	movq	%r15, %rdi
	callq	*8(%r15)
	testq	%rax, %rax
	je	LBB0_23
## %bb.15:
	movq	%rax, %rbx
	leaq	L_.str.3(%rip), %rdi
	callq	_e_err
	jmp	LBB0_24
LBB0_16:
	movq	%r15, %rdi
	callq	*8(%r15)
	testq	%rax, %rax
	je	LBB0_20
## %bb.17:
	leaq	L_.str.1(%rip), %rdi
	callq	_e_dbg
LBB0_18:
	movq	_E1000_ERR_PHY@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	%r15, %rdi
	callq	*16(%r15)
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.19:
	negq	%rbx
LBB0_24:
	cmpl	$132, (%r15)
	jne	LBB0_27
## %bb.25:
	movq	_E1000_ICH_FWSM_FW_VALID@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	jne	LBB0_27
## %bb.26:
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$11000, %esi                    ## imm = 0x2AF8
	callq	_usleep_range
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_e1000_gate_hw_phy_config_ich8lan
LBB0_27:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movq	%r15, %rdi
	callq	_e1000_toggle_lanphypc_pch_lpt
	cmpl	$130, (%r15)
	jl	LBB0_10
## %bb.21:
	movq	%r15, %rdi
	callq	_e1000_phy_is_accessible_pchlan
	testl	%eax, %eax
	jne	LBB0_10
## %bb.22:
	movq	_CTRL_EXT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_er32
	movq	_E1000_CTRL_EXT_FORCE_SMBUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	(%rbx), %edi
	callq	_ew32
	movq	%r15, %rdi
	callq	_e1000_phy_is_accessible_pchlan
	testl	%eax, %eax
	jne	LBB0_10
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_FWSM,4,2                       ## @FWSM
	.comm	_e1000_ulp_state_unknown,4,2    ## @e1000_ulp_state_unknown
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to initialize PHY flow\n"

	.comm	_CTRL_EXT,4,2                   ## @CTRL_EXT
	.comm	_E1000_CTRL_EXT_FORCE_SMBUS,4,2 ## @E1000_CTRL_EXT_FORCE_SMBUS
	.comm	_E1000_ICH_FWSM_FW_VALID,4,2    ## @E1000_ICH_FWSM_FW_VALID
L_.str.1:                               ## @.str.1
	.asciz	"Required LANPHYPC toggle blocked by ME\n"

	.comm	_E1000_ERR_PHY,8,3              ## @E1000_ERR_PHY
L_.str.2:                               ## @.str.2
	.asciz	"Reset blocked by ME\n"

L_.str.3:                               ## @.str.3
	.asciz	"ME blocked access to PHY after reset\n"

	.no_dead_strip	_e1000_init_phy_workarounds_pchlan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_init_phy_workarounds_pchlan
_e1000_init_phy_workarounds_pchlan:     ; @e1000_init_phy_workarounds_pchlan
	.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
Lloh0:
	adrp	x8, _FWSM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FWSM@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_er32
	mov	x20, x0
	mov	x0, x19
	mov	w1, #1
	bl	_e1000_gate_hw_phy_config_ich8lan
Lloh3:
	adrp	x8, _e1000_ulp_state_unknown@GOTPAGE
Lloh4:
	ldr	x8, [x8, _e1000_ulp_state_unknown@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #32]
	mov	x0, x19
	mov	w1, #1
	bl	_e1000_disable_ulp_lpt_lp
	ldr	x8, [x19, #24]
	mov	x0, x19
	blr	x8
	cbz	x0, LBB0_2
; %bb.1:
	mov	x21, x0
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_e_dbg
	b	LBB0_20
LBB0_2:
	ldr	w8, [x19]
	sub	w9, w8, #129
	cmp	w9, #3
	b.hs	LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_e1000_phy_is_accessible_pchlan
	cbnz	w0, LBB0_10
; %bb.4:
Lloh8:
	adrp	x21, _CTRL_EXT@GOTPAGE
Lloh9:
	ldr	x21, [x21, _CTRL_EXT@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_er32
Lloh10:
	adrp	x8, _E1000_CTRL_EXT_FORCE_SMBUS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _E1000_CTRL_EXT_FORCE_SMBUS@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	orr	w1, w8, w0
	ldr	w0, [x21]
	bl	_ew32
	mov	w0, #50
	bl	_msleep
	b	LBB0_7
LBB0_5:
	cmp	w8, #128
	b.eq	LBB0_9
; %bb.6:
	cmp	w8, #132
	b.ne	LBB0_10
LBB0_7:
	mov	x0, x19
	bl	_e1000_phy_is_accessible_pchlan
	cbnz	w0, LBB0_10
; %bb.8:
	ldr	w8, [x19]
	cmp	w8, #128
	b.ne	LBB0_16
LBB0_9:
Lloh13:
	adrp	x8, _E1000_ICH_FWSM_FW_VALID@GOTPAGE
Lloh14:
	ldr	x8, [x8, _E1000_ICH_FWSM_FW_VALID@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_16
LBB0_10:
	ldr	x8, [x19, #16]
	mov	x0, x19
	blr	x8
LBB0_11:
	ldr	x8, [x19, #8]
	mov	x0, x19
	blr	x8
	cbz	x0, LBB0_13
; %bb.12:
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_e_err
	mov	x21, #0
	b	LBB0_20
LBB0_13:
	mov	x0, x19
	bl	_e1000e_phy_hw_reset_generic
	mov	x21, x0
	cbnz	x0, LBB0_20
; %bb.14:
	ldr	x8, [x19, #8]
	mov	x0, x19
	blr	x8
	mov	x21, x0
	cbz	x0, LBB0_20
; %bb.15:
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_e_err
	b	LBB0_20
LBB0_16:
	ldr	x8, [x19, #8]
	mov	x0, x19
	blr	x8
	cbz	x0, LBB0_24
; %bb.17:
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_e_dbg
LBB0_18:
Lloh22:
	adrp	x8, _E1000_ERR_PHY@GOTPAGE
Lloh23:
	ldr	x8, [x8, _E1000_ERR_PHY@GOTPAGEOFF]
Lloh24:
	ldr	x21, [x8]
	ldr	x8, [x19, #16]
	mov	x0, x19
	blr	x8
	cbz	x21, LBB0_11
; %bb.19:
	neg	x21, x21
LBB0_20:
	ldr	w8, [x19]
	cmp	w8, #132
	b.ne	LBB0_23
; %bb.21:
Lloh25:
	adrp	x8, _E1000_ICH_FWSM_FW_VALID@GOTPAGE
Lloh26:
	ldr	x8, [x8, _E1000_ICH_FWSM_FW_VALID@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	tst	w8, w20
	b.ne	LBB0_23
; %bb.22:
	mov	w0, #10000
	mov	w1, #11000
	bl	_usleep_range
	mov	x0, x19
	mov	w1, #0
	bl	_e1000_gate_hw_phy_config_ich8lan
LBB0_23:
	mov	x0, x21
	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_24:
	mov	x0, x19
	bl	_e1000_toggle_lanphypc_pch_lpt
	ldr	w8, [x19]
	cmp	w8, #130
	b.lt	LBB0_10
; %bb.25:
	mov	x0, x19
	bl	_e1000_phy_is_accessible_pchlan
	cbnz	w0, LBB0_10
; %bb.26:
Lloh28:
	adrp	x21, _CTRL_EXT@GOTPAGE
Lloh29:
	ldr	x21, [x21, _CTRL_EXT@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_er32
Lloh30:
	adrp	x8, _E1000_CTRL_EXT_FORCE_SMBUS@GOTPAGE
Lloh31:
	ldr	x8, [x8, _E1000_CTRL_EXT_FORCE_SMBUS@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	bic	w1, w0, w8
	ldr	w0, [x21]
	bl	_ew32
	mov	x0, x19
	bl	_e1000_phy_is_accessible_pchlan
	cbnz	w0, LBB0_10
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_FWSM,4,2                       ; @FWSM
	.comm	_e1000_ulp_state_unknown,4,2    ; @e1000_ulp_state_unknown
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to initialize PHY flow\n"

	.comm	_CTRL_EXT,4,2                   ; @CTRL_EXT
	.comm	_E1000_CTRL_EXT_FORCE_SMBUS,4,2 ; @E1000_CTRL_EXT_FORCE_SMBUS
	.comm	_E1000_ICH_FWSM_FW_VALID,4,2    ; @E1000_ICH_FWSM_FW_VALID
l_.str.1:                               ; @.str.1
	.asciz	"Required LANPHYPC toggle blocked by ME\n"

	.comm	_E1000_ERR_PHY,8,3              ; @E1000_ERR_PHY
l_.str.2:                               ; @.str.2
	.asciz	"Reset blocked by ME\n"

l_.str.3:                               ; @.str.3
	.asciz	"ME blocked access to PHY after reset\n"

	.no_dead_strip	_e1000_init_phy_workarounds_pchlan
.subsections_via_symbols
