	.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	%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
	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	%r15, %rdi
	callq	*24(%r15)
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_e_dbg
	cmpl	$130, (%r15)
	je	LBB0_23
	jmp	LBB0_25
LBB0_2:
	movl	(%r15), %eax
	cmpl	$128, %eax
	je	LBB0_9
## %bb.3:
	cmpl	$130, %eax
	je	LBB0_7
## %bb.4:
	cmpl	$129, %eax
	jne	LBB0_20
## %bb.5:
	movq	%r15, %rdi
	callq	_e1000_phy_is_accessible_pchlan
	testl	%eax, %eax
	jne	LBB0_20
## %bb.6:
	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
LBB0_7:
	movq	%r15, %rdi
	callq	_e1000_phy_is_accessible_pchlan
	testl	%eax, %eax
	jne	LBB0_20
## %bb.8:
	cmpl	$128, (%r15)
	jne	LBB0_10
LBB0_9:
	movq	_E1000_ICH_FWSM_FW_VALID@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_10
LBB0_20:
	movq	%r15, %rdi
	callq	*8(%r15)
LBB0_21:
	movq	%r15, %rdi
	callq	_e1000e_phy_hw_reset_generic
	movq	%rax, %rbx
	cmpl	$130, (%r15)
	jne	LBB0_25
LBB0_23:
	movq	_E1000_ICH_FWSM_FW_VALID@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	jne	LBB0_25
## %bb.24:
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$20000, %esi                    ## imm = 0x4E20
	callq	_usleep_range
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_e1000_gate_hw_phy_config_ich8lan
LBB0_25:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r15, %rdi
	callq	*16(%r15)
	testl	%eax, %eax
	je	LBB0_14
## %bb.11:
	leaq	L_.str.1(%rip), %rdi
	callq	_e_dbg
LBB0_12:
	movq	_E1000_ERR_PHY@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	%r15, %rdi
	callq	*8(%r15)
	testq	%rbx, %rbx
	je	LBB0_21
## %bb.13:
	negq	%rbx
	cmpl	$130, (%r15)
	je	LBB0_23
	jmp	LBB0_25
LBB0_14:
	leaq	L_.str.2(%rip), %rdi
	callq	_e_dbg
	movq	_FEXTNVM3@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_er32
	movq	_E1000_FEXTNVM3_PHY_CFG_COUNTER_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movq	_E1000_FEXTNVM3_PHY_CFG_COUNTER_50MSEC@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	(%rbx), %edi
	callq	_ew32
	movq	_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_er32
	movq	_E1000_CTRL_LANPHYPC_OVERRIDE@GOTPCREL(%rip), %r13
	orl	(%r13), %eax
	movq	_E1000_CTRL_LANPHYPC_VALUE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movl	(%r12), %edi
	movl	%ebx, %esi
	callq	_ew32
	xorl	%eax, %eax
	callq	_e1e_flush
	movl	$10, %edi
	movl	$20, %esi
	callq	_usleep_range
	movl	(%r13), %esi
	notl	%esi
	andl	%ebx, %esi
	movl	(%r12), %edi
	callq	_ew32
	xorl	%eax, %eax
	callq	_e1e_flush
	cmpl	$129, (%r15)
	jge	LBB0_15
## %bb.26:
	movl	$50, %edi
	callq	_msleep
	jmp	LBB0_20
LBB0_15:
	movl	$-20, %ebx
	movq	_CTRL_EXT@GOTPCREL(%rip), %r12
	movq	_E1000_CTRL_EXT_LPCD@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	$5000, %edi                     ## imm = 0x1388
	movl	$10000, %esi                    ## imm = 0x2710
	callq	_usleep_range
	movl	(%r12), %edi
	callq	_er32
	testl	%eax, (%r13)
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	leal	1(%rbx), %eax
	testl	%ebx, %ebx
	movl	%eax, %ebx
	jne	LBB0_16
LBB0_18:
	movl	$30000, %edi                    ## imm = 0x7530
	movl	$60000, %esi                    ## imm = 0xEA60
	callq	_usleep_range
	movq	%r15, %rdi
	callq	_e1000_phy_is_accessible_pchlan
	testl	%eax, %eax
	jne	LBB0_20
## %bb.19:
	movl	(%r12), %edi
	callq	_er32
	movq	_E1000_CTRL_EXT_FORCE_SMBUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	(%r12), %edi
	callq	_ew32
	movq	%r15, %rdi
	callq	_e1000_phy_is_accessible_pchlan
	testl	%eax, %eax
	jne	LBB0_20
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_FWSM,4,2                       ## @FWSM
	.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	"Toggling LANPHYPC\n"

	.comm	_FEXTNVM3,4,2                   ## @FEXTNVM3
	.comm	_E1000_FEXTNVM3_PHY_CFG_COUNTER_MASK,4,2 ## @E1000_FEXTNVM3_PHY_CFG_COUNTER_MASK
	.comm	_E1000_FEXTNVM3_PHY_CFG_COUNTER_50MSEC,4,2 ## @E1000_FEXTNVM3_PHY_CFG_COUNTER_50MSEC
	.comm	_CTRL,4,2                       ## @CTRL
	.comm	_E1000_CTRL_LANPHYPC_OVERRIDE,4,2 ## @E1000_CTRL_LANPHYPC_OVERRIDE
	.comm	_E1000_CTRL_LANPHYPC_VALUE,4,2  ## @E1000_CTRL_LANPHYPC_VALUE
	.comm	_E1000_CTRL_EXT_LPCD,4,2        ## @E1000_CTRL_EXT_LPCD
	.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	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	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
	ldr	x8, [x19, #24]
	mov	x0, x19
	blr	x8
	cbz	x0, LBB0_2
; %bb.1:
	mov	x21, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_e_dbg
	b	LBB0_12
LBB0_2:
	ldr	w8, [x19]
	cmp	w8, #128
	b.eq	LBB0_9
; %bb.3:
	cmp	w8, #130
	b.eq	LBB0_7
; %bb.4:
	cmp	w8, #129
	b.ne	LBB0_10
; %bb.5:
	mov	x0, x19
	bl	_e1000_phy_is_accessible_pchlan
	cbnz	w0, LBB0_10
; %bb.6:
Lloh5:
	adrp	x21, _CTRL_EXT@GOTPAGE
Lloh6:
	ldr	x21, [x21, _CTRL_EXT@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_er32
Lloh7:
	adrp	x8, _E1000_CTRL_EXT_FORCE_SMBUS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _E1000_CTRL_EXT_FORCE_SMBUS@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	orr	w1, w8, w0
	ldr	w0, [x21]
	bl	_ew32
	mov	w0, #50
	bl	_msleep
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:
Lloh10:
	adrp	x8, _E1000_ICH_FWSM_FW_VALID@GOTPAGE
Lloh11:
	ldr	x8, [x8, _E1000_ICH_FWSM_FW_VALID@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_16
LBB0_10:
	ldr	x8, [x19, #8]
	mov	x0, x19
	blr	x8
LBB0_11:
	mov	x0, x19
	bl	_e1000e_phy_hw_reset_generic
	mov	x21, x0
LBB0_12:
	ldr	w8, [x19]
	cmp	w8, #130
	b.ne	LBB0_15
; %bb.13:
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.ne	LBB0_15
; %bb.14:
	mov	w0, #10000
	mov	w1, #20000
	bl	_usleep_range
	mov	x0, x19
	mov	w1, #0
	bl	_e1000_gate_hw_phy_config_ich8lan
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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_16:
	ldr	x8, [x19, #16]
	mov	x0, x19
	blr	x8
	cbz	w0, LBB0_20
; %bb.17:
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_e_dbg
LBB0_18:
Lloh18:
	adrp	x8, _E1000_ERR_PHY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _E1000_ERR_PHY@GOTPAGEOFF]
Lloh20:
	ldr	x21, [x8]
	ldr	x8, [x19, #8]
	mov	x0, x19
	blr	x8
	cbz	x21, LBB0_11
; %bb.19:
	neg	x21, x21
	b	LBB0_12
LBB0_20:
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_e_dbg
Lloh23:
	adrp	x21, _FEXTNVM3@GOTPAGE
Lloh24:
	ldr	x21, [x21, _FEXTNVM3@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_er32
Lloh25:
	adrp	x8, _E1000_FEXTNVM3_PHY_CFG_COUNTER_MASK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _E1000_FEXTNVM3_PHY_CFG_COUNTER_MASK@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	bic	w8, w0, w8
Lloh28:
	adrp	x9, _E1000_FEXTNVM3_PHY_CFG_COUNTER_50MSEC@GOTPAGE
Lloh29:
	ldr	x9, [x9, _E1000_FEXTNVM3_PHY_CFG_COUNTER_50MSEC@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	orr	w1, w8, w9
	ldr	w0, [x21]
	bl	_ew32
Lloh31:
	adrp	x22, _CTRL@GOTPAGE
Lloh32:
	ldr	x22, [x22, _CTRL@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_er32
Lloh33:
	adrp	x23, _E1000_CTRL_LANPHYPC_OVERRIDE@GOTPAGE
Lloh34:
	ldr	x23, [x23, _E1000_CTRL_LANPHYPC_OVERRIDE@GOTPAGEOFF]
	ldr	w8, [x23]
	orr	w8, w8, w0
Lloh35:
	adrp	x9, _E1000_CTRL_LANPHYPC_VALUE@GOTPAGE
Lloh36:
	ldr	x9, [x9, _E1000_CTRL_LANPHYPC_VALUE@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	bic	w21, w8, w9
	ldr	w0, [x22]
	mov	x1, x21
	bl	_ew32
	bl	_e1e_flush
	mov	w0, #10
	mov	w1, #20
	bl	_usleep_range
	ldr	w8, [x23]
	bic	w1, w21, w8
	ldr	w0, [x22]
	bl	_ew32
	bl	_e1e_flush
	ldr	w8, [x19]
	cmp	w8, #129
	b.ge	LBB0_22
; %bb.21:
	mov	w0, #50
	bl	_msleep
	b	LBB0_10
LBB0_22:
	mov	w22, #-20
Lloh38:
	adrp	x21, _CTRL_EXT@GOTPAGE
Lloh39:
	ldr	x21, [x21, _CTRL_EXT@GOTPAGEOFF]
Lloh40:
	adrp	x23, _E1000_CTRL_EXT_LPCD@GOTPAGE
Lloh41:
	ldr	x23, [x23, _E1000_CTRL_EXT_LPCD@GOTPAGEOFF]
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	mov	w0, #5000
	mov	w1, #10000
	bl	_usleep_range
	ldr	w0, [x21]
	bl	_er32
	ldr	w8, [x23]
	and	w8, w8, w0
	cmp	w8, #0
	ccmp	w22, #0, #4, eq
	add	w22, w22, #1
	b.ne	LBB0_23
; %bb.24:
	mov	w0, #30000
	mov	w1, #60000
	bl	_usleep_range
	mov	x0, x19
	bl	_e1000_phy_is_accessible_pchlan
	cbnz	w0, LBB0_10
; %bb.25:
	ldr	w0, [x21]
	bl	_er32
Lloh42:
	adrp	x8, _E1000_CTRL_EXT_FORCE_SMBUS@GOTPAGE
Lloh43:
	ldr	x8, [x8, _E1000_CTRL_EXT_FORCE_SMBUS@GOTPAGEOFF]
Lloh44:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_FWSM,4,2                       ; @FWSM
	.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	"Toggling LANPHYPC\n"

	.comm	_FEXTNVM3,4,2                   ; @FEXTNVM3
	.comm	_E1000_FEXTNVM3_PHY_CFG_COUNTER_MASK,4,2 ; @E1000_FEXTNVM3_PHY_CFG_COUNTER_MASK
	.comm	_E1000_FEXTNVM3_PHY_CFG_COUNTER_50MSEC,4,2 ; @E1000_FEXTNVM3_PHY_CFG_COUNTER_50MSEC
	.comm	_CTRL,4,2                       ; @CTRL
	.comm	_E1000_CTRL_LANPHYPC_OVERRIDE,4,2 ; @E1000_CTRL_LANPHYPC_OVERRIDE
	.comm	_E1000_CTRL_LANPHYPC_VALUE,4,2  ; @E1000_CTRL_LANPHYPC_VALUE
	.comm	_E1000_CTRL_EXT_LPCD,4,2        ; @E1000_CTRL_EXT_LPCD
	.no_dead_strip	_e1000_init_phy_workarounds_pchlan
.subsections_via_symbols
