	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_reset_hw_82571
_e1000_reset_hw_82571:                  ## @e1000_reset_hw_82571
	.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
	callq	_e1000e_disable_pcie_master
	movq	%rax, %r14
	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), %r12
	movl	(%r12), %edi
	movl	$-1, %esi
	callq	_ew32
	movq	_RCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_ew32
	movq	_TCTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_er32
	movq	_E1000_TCTL_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	(%rbx), %edi
	callq	_ew32
	xorl	%eax, %eax
	callq	_e1e_flush
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$11000, %esi                    ## imm = 0x2AF8
	callq	_usleep_range
	movl	(%r15), %eax
	leal	-128(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_3
## %bb.5:
	movq	%r15, %rdi
	callq	_e1000_get_hw_semaphore_82574
	jmp	LBB0_6
LBB0_3:
	cmpl	$130, %eax
	jne	LBB0_7
## %bb.4:
	movq	%r15, %rdi
	callq	_e1000_get_hw_semaphore_82573
LBB0_6:
	movq	%rax, %r14
LBB0_7:
	movq	_CTRL@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_er32
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
	callq	_e_dbg
	movl	(%r13), %edi
	movq	_E1000_CTRL_RST@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	%ebx, %esi
	callq	_ew32
	movl	(%r15), %eax
	leal	-128(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_8
## %bb.11:
	testq	%r14, %r14
	jne	LBB0_13
## %bb.12:
	movq	%r15, %rdi
	callq	_e1000_put_hw_semaphore_82574
	jmp	LBB0_13
LBB0_8:
	cmpl	$130, %eax
	jne	LBB0_13
## %bb.9:
	testq	%r14, %r14
	jne	LBB0_13
## %bb.10:
	movq	%r15, %rdi
	callq	_e1000_put_hw_semaphore_82573
LBB0_13:
	movq	16(%r15), %rax
	movq	_e1000_nvm_flash_hw@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.14:
	movl	$10, %edi
	movl	$20, %esi
	callq	_usleep_range
	movq	_CTRL_EXT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_er32
	movq	_E1000_CTRL_EXT_EE_RST@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_ew32
	xorl	%eax, %eax
	callq	_e1e_flush
LBB0_15:
	movq	%r15, %rdi
	callq	_e1000e_get_auto_rd_done
	testq	%rax, %rax
	jne	LBB0_26
## %bb.16:
	movl	(%r15), %eax
	leal	-128(%rax), %ecx
	cmpl	$3, %ecx
	jae	LBB0_17
## %bb.19:
	movl	$25, %edi
	callq	_msleep
	jmp	LBB0_20
LBB0_17:
	addl	$-131, %eax
	cmpl	$1, %eax
	ja	LBB0_20
## %bb.18:
	movq	_EECD@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_er32
	movq	_E1000_EECD_REQ@GOTPCREL(%rip), %rcx
	movq	_E1000_EECD_GNT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	(%rbx), %edi
	callq	_ew32
LBB0_20:
	movl	(%r12), %edi
	movl	$-1, %esi
	callq	_ew32
	movq	_ICR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_er32
	cmpl	$132, (%r15)
	jne	LBB0_23
## %bb.21:
	movq	%r15, %rdi
	callq	_e1000_check_alt_mac_addr_generic
	testq	%rax, %rax
	jne	LBB0_26
## %bb.22:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_e1000e_set_laa_state_82571
LBB0_23:
	movq	8(%r15), %rax
	movq	_e1000_media_type_internal_serdes@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_25
## %bb.24:
	movq	_e1000_serdes_link_down@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
LBB0_25:
	xorl	%eax, %eax
LBB0_26:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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_EN,4,2              ## @E1000_TCTL_EN
	.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_nvm_flash_hw,8,3         ## @e1000_nvm_flash_hw
	.comm	_CTRL_EXT,4,2                   ## @CTRL_EXT
	.comm	_E1000_CTRL_EXT_EE_RST,4,2      ## @E1000_CTRL_EXT_EE_RST
	.comm	_EECD,4,2                       ## @EECD
	.comm	_E1000_EECD_REQ,4,2             ## @E1000_EECD_REQ
	.comm	_E1000_EECD_GNT,4,2             ## @E1000_EECD_GNT
	.comm	_ICR,4,2                        ## @ICR
	.comm	_e1000_media_type_internal_serdes,8,3 ## @e1000_media_type_internal_serdes
	.comm	_e1000_serdes_link_down,4,2     ## @e1000_serdes_link_down
	.no_dead_strip	_e1000_reset_hw_82571
.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_82571
_e1000_reset_hw_82571:                  ; @e1000_reset_hw_82571
	.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
	bl	_e1000e_disable_pcie_master
	mov	x20, x0
	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	x22, _IMC@GOTPAGE
Lloh5:
	ldr	x22, [x22, _IMC@GOTPAGEOFF]
	ldr	w0, [x22]
	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	x21, _TCTL@GOTPAGE
Lloh10:
	ldr	x21, [x21, _TCTL@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_er32
Lloh11:
	adrp	x8, _E1000_TCTL_EN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _E1000_TCTL_EN@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	bic	w1, w0, w8
	ldr	w0, [x21]
	bl	_ew32
	bl	_e1e_flush
	mov	w0, #10000
	mov	w1, #11000
	bl	_usleep_range
	ldr	w8, [x19]
	sub	w9, w8, #128
	cmp	w9, #2
	b.hs	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_e1000_get_hw_semaphore_82574
	b	LBB0_6
LBB0_4:
	cmp	w8, #130
	b.ne	LBB0_7
; %bb.5:
	mov	x0, x19
	bl	_e1000_get_hw_semaphore_82573
LBB0_6:
	mov	x20, x0
LBB0_7:
Lloh14:
	adrp	x23, _CTRL@GOTPAGE
Lloh15:
	ldr	x23, [x23, _CTRL@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_er32
	mov	x21, x0
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_e_dbg
	ldr	w0, [x23]
Lloh18:
	adrp	x8, _E1000_CTRL_RST@GOTPAGE
Lloh19:
	ldr	x8, [x8, _E1000_CTRL_RST@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	orr	w1, w8, w21
	bl	_ew32
	ldr	w8, [x19]
	sub	w9, w8, #128
	cmp	w9, #2
	b.hs	LBB0_10
; %bb.8:
	cbnz	x20, LBB0_13
; %bb.9:
	mov	x0, x19
	bl	_e1000_put_hw_semaphore_82574
	b	LBB0_13
LBB0_10:
	cmp	w8, #130
	b.ne	LBB0_13
; %bb.11:
	cbnz	x20, LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_e1000_put_hw_semaphore_82573
LBB0_13:
	ldr	x8, [x19, #16]
Lloh21:
	adrp	x9, _e1000_nvm_flash_hw@GOTPAGE
Lloh22:
	ldr	x9, [x9, _e1000_nvm_flash_hw@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.14:
	mov	w0, #10
	mov	w1, #20
	bl	_usleep_range
Lloh24:
	adrp	x20, _CTRL_EXT@GOTPAGE
Lloh25:
	ldr	x20, [x20, _CTRL_EXT@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_er32
Lloh26:
	adrp	x8, _E1000_CTRL_EXT_EE_RST@GOTPAGE
Lloh27:
	ldr	x8, [x8, _E1000_CTRL_EXT_EE_RST@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	orr	w1, w8, w0
	ldr	w0, [x20]
	bl	_ew32
	bl	_e1e_flush
LBB0_15:
	mov	x0, x19
	bl	_e1000e_get_auto_rd_done
	cbz	x0, LBB0_17
LBB0_16:
	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_17:
	ldr	w8, [x19]
	sub	w9, w8, #128
	cmp	w9, #3
	b.hs	LBB0_19
; %bb.18:
	mov	w0, #25
	bl	_msleep
	b	LBB0_21
LBB0_19:
	sub	w8, w8, #131
	cmp	w8, #1
	b.hi	LBB0_21
; %bb.20:
Lloh29:
	adrp	x20, _EECD@GOTPAGE
Lloh30:
	ldr	x20, [x20, _EECD@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_er32
Lloh31:
	adrp	x8, _E1000_EECD_REQ@GOTPAGE
Lloh32:
	ldr	x8, [x8, _E1000_EECD_REQ@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
Lloh34:
	adrp	x9, _E1000_EECD_GNT@GOTPAGE
Lloh35:
	ldr	x9, [x9, _E1000_EECD_GNT@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w1, w0, w8
	ldr	w0, [x20]
	bl	_ew32
LBB0_21:
	ldr	w0, [x22]
	mov	w1, #-1
	bl	_ew32
Lloh37:
	adrp	x8, _ICR@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ICR@GOTPAGEOFF]
Lloh39:
	ldr	w0, [x8]
	bl	_er32
	ldr	w8, [x19]
	cmp	w8, #132
	b.ne	LBB0_24
; %bb.22:
	mov	x0, x19
	bl	_e1000_check_alt_mac_addr_generic
	cbnz	x0, LBB0_16
; %bb.23:
	mov	x0, x19
	mov	w1, #1
	bl	_e1000e_set_laa_state_82571
LBB0_24:
	ldr	x8, [x19, #8]
Lloh40:
	adrp	x9, _e1000_media_type_internal_serdes@GOTPAGE
Lloh41:
	ldr	x9, [x9, _e1000_media_type_internal_serdes@GOTPAGEOFF]
Lloh42:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_26
; %bb.25:
	mov	x0, #0
Lloh43:
	adrp	x8, _e1000_serdes_link_down@GOTPAGE
Lloh44:
	ldr	x8, [x8, _e1000_serdes_link_down@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	b	LBB0_16
LBB0_26:
	mov	x0, #0
	b	LBB0_16
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.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_EN,4,2              ; @E1000_TCTL_EN
	.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_nvm_flash_hw,8,3         ; @e1000_nvm_flash_hw
	.comm	_CTRL_EXT,4,2                   ; @CTRL_EXT
	.comm	_E1000_CTRL_EXT_EE_RST,4,2      ; @E1000_CTRL_EXT_EE_RST
	.comm	_EECD,4,2                       ; @EECD
	.comm	_E1000_EECD_REQ,4,2             ; @E1000_EECD_REQ
	.comm	_E1000_EECD_GNT,4,2             ; @E1000_EECD_GNT
	.comm	_ICR,4,2                        ; @ICR
	.comm	_e1000_media_type_internal_serdes,8,3 ; @e1000_media_type_internal_serdes
	.comm	_e1000_serdes_link_down,4,2     ; @e1000_serdes_link_down
	.no_dead_strip	_e1000_reset_hw_82571
.subsections_via_symbols
