	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_reset_hw_80003es2lan
_e1000_reset_hw_80003es2lan:            ## @e1000_reset_hw_80003es2lan
	.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
	movq	%rdi, %r14
	callq	_e1000e_disable_pcie_master
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_e_dbg
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	callq	_e_dbg
	movq	_IMC@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	$-1, %esi
	callq	_ew32
	movq	_RCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_ew32
	movq	_TCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_E1000_TCTL_PSP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ew32
	xorl	%eax, %eax
	callq	_e1e_flush
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$11000, %esi                    ## imm = 0x2AF8
	callq	_usleep_range
	movq	_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_er32
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_e1000_acquire_phy_80003es2lan
	testq	%rax, %rax
	jne	LBB0_8
## %bb.3:
	leaq	L_.str.2(%rip), %rdi
	callq	_e_dbg
	movl	(%r12), %edi
	movq	_E1000_CTRL_RST@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	%ebx, %esi
	callq	_ew32
	movq	%r14, %rdi
	callq	_e1000_release_phy_80003es2lan
	movq	_E1000_KMRNCTRLSTA_INBAND_PARAM@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	callq	_e1000_read_kmrn_reg_80003es2lan
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	_E1000_KMRNCTRLSTA_IBIST_DISABLE@GOTPCREL(%rip), %rax
	movl	-36(%rbp), %edx
	orl	(%rax), %edx
	movl	%edx, -36(%rbp)
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_e1000_write_kmrn_reg_80003es2lan
	testq	%rax, %rax
	je	LBB0_6
LBB0_5:
	leaq	L_.str.3(%rip), %rdi
	callq	_e_dbg
LBB0_6:
	movq	%r14, %rdi
	callq	_e1000e_get_auto_rd_done
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movl	(%r15), %edi
	movl	$-1, %esi
	callq	_ew32
	movq	_ICR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_er32
	movq	%r14, %rdi
	callq	_e1000_check_alt_mac_addr_generic
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PCI-E Master disable polling has failed.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Masking off all interrupts\n"

	.comm	_IMC,4,2                        ## @IMC
	.comm	_RCTL,4,2                       ## @RCTL
	.comm	_TCTL,4,2                       ## @TCTL
	.comm	_E1000_TCTL_PSP,4,2             ## @E1000_TCTL_PSP
	.comm	_CTRL,4,2                       ## @CTRL
L_.str.2:                               ## @.str.2
	.asciz	"Issuing a global reset to MAC\n"

	.comm	_E1000_CTRL_RST,4,2             ## @E1000_CTRL_RST
	.comm	_E1000_KMRNCTRLSTA_INBAND_PARAM,4,2 ## @E1000_KMRNCTRLSTA_INBAND_PARAM
	.comm	_E1000_KMRNCTRLSTA_IBIST_DISABLE,4,2 ## @E1000_KMRNCTRLSTA_IBIST_DISABLE
L_.str.3:                               ## @.str.3
	.asciz	"Error disabling far-end loopback\n"

	.comm	_ICR,4,2                        ## @ICR
	.no_dead_strip	_e1000_reset_hw_80003es2lan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_reset_hw_80003es2lan
_e1000_reset_hw_80003es2lan:            ; @e1000_reset_hw_80003es2lan
	.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
	mov	x19, x0
	bl	_e1000e_disable_pcie_master
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_e_dbg
LBB0_2:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_e_dbg
Lloh4:
	adrp	x21, _IMC@GOTPAGE
Lloh5:
	ldr	x21, [x21, _IMC@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	w1, #-1
	bl	_ew32
Lloh6:
	adrp	x8, _RCTL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RCTL@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_ew32
Lloh9:
	adrp	x8, _TCTL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TCTL@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x8, _E1000_TCTL_PSP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _E1000_TCTL_PSP@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_ew32
	bl	_e1e_flush
	mov	w0, #10000
	mov	w1, #11000
	bl	_usleep_range
Lloh15:
	adrp	x22, _CTRL@GOTPAGE
Lloh16:
	ldr	x22, [x22, _CTRL@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_er32
	mov	x20, x0
	mov	x0, x19
	bl	_e1000_acquire_phy_80003es2lan
	cbnz	x0, LBB0_8
; %bb.3:
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_e_dbg
	ldr	w0, [x22]
Lloh19:
	adrp	x8, _E1000_CTRL_RST@GOTPAGE
Lloh20:
	ldr	x8, [x8, _E1000_CTRL_RST@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	orr	w1, w8, w20
	bl	_ew32
	mov	x0, x19
	bl	_e1000_release_phy_80003es2lan
Lloh22:
	adrp	x20, _E1000_KMRNCTRLSTA_INBAND_PARAM@GOTPAGE
Lloh23:
	ldr	x20, [x20, _E1000_KMRNCTRLSTA_INBAND_PARAM@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_e1000_read_kmrn_reg_80003es2lan
	cbnz	x0, LBB0_5
; %bb.4:
Lloh24:
	adrp	x8, _E1000_KMRNCTRLSTA_IBIST_DISABLE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _E1000_KMRNCTRLSTA_IBIST_DISABLE@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_e1000_write_kmrn_reg_80003es2lan
	cbz	x0, LBB0_6
LBB0_5:
Lloh27:
	adrp	x0, l_.str.3@PAGE
Lloh28:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_e_dbg
LBB0_6:
	mov	x0, x19
	bl	_e1000e_get_auto_rd_done
	cbnz	x0, LBB0_8
; %bb.7:
	ldr	w0, [x21]
	mov	w1, #-1
	bl	_ew32
Lloh29:
	adrp	x8, _ICR@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ICR@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	bl	_er32
	mov	x0, x19
	bl	_e1000_check_alt_mac_addr_generic
LBB0_8:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PCI-E Master disable polling has failed.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Masking off all interrupts\n"

	.comm	_IMC,4,2                        ; @IMC
	.comm	_RCTL,4,2                       ; @RCTL
	.comm	_TCTL,4,2                       ; @TCTL
	.comm	_E1000_TCTL_PSP,4,2             ; @E1000_TCTL_PSP
	.comm	_CTRL,4,2                       ; @CTRL
l_.str.2:                               ; @.str.2
	.asciz	"Issuing a global reset to MAC\n"

	.comm	_E1000_CTRL_RST,4,2             ; @E1000_CTRL_RST
	.comm	_E1000_KMRNCTRLSTA_INBAND_PARAM,4,2 ; @E1000_KMRNCTRLSTA_INBAND_PARAM
	.comm	_E1000_KMRNCTRLSTA_IBIST_DISABLE,4,2 ; @E1000_KMRNCTRLSTA_IBIST_DISABLE
l_.str.3:                               ; @.str.3
	.asciz	"Error disabling far-end loopback\n"

	.comm	_ICR,4,2                        ; @ICR
	.no_dead_strip	_e1000_reset_hw_80003es2lan
.subsections_via_symbols
