	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_e1000_reset_hw                 ## -- Begin function e1000_reset_hw
	.p2align	4, 0x90
_e1000_reset_hw:                        ## @e1000_reset_hw
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	cmpl	$138, (%rdi)
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_e_dbg
	movq	%r14, %rdi
	callq	_e1000_pci_clear_mwi
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	_E1000_WRITE_FLUSH
	movl	$0, 4(%r14)
	movl	$10, %edi
	callq	_msleep
	movq	_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_er32
	movl	%eax, %ebx
	movl	(%r14), %eax
	cmpl	$140, %eax
	je	LBB0_4
## %bb.3:
	cmpl	$130, %eax
	jne	LBB0_5
LBB0_4:
	movl	(%r12), %edi
	movq	_E1000_CTRL_PHY_RST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	%ebx, %esi
	callq	_ew32
	xorl	%eax, %eax
	callq	_E1000_WRITE_FLUSH
	movl	$5, %edi
	callq	_msleep
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
	callq	_e_dbg
	movl	$-131, %eax
	addl	(%r14), %eax
	cmpl	$10, %eax
	ja	LBB0_9
## %bb.6:
	movl	$1818, %ecx                     ## imm = 0x71A
	btl	%eax, %ecx
	jae	LBB0_7
## %bb.27:
	movl	(%r12), %esi
	movq	_E1000_CTRL_RST@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_E1000_WRITE_REG_IO
	jmp	LBB0_11
LBB0_7:
	movl	$5, %ecx
	btl	%eax, %ecx
	jae	LBB0_9
## %bb.8:
	movq	_CTRL_DUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	jmp	LBB0_10
LBB0_9:
	movl	(%r12), %edi
LBB0_10:
	movq	_E1000_CTRL_RST@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	%ebx, %esi
	callq	_ew32
LBB0_11:
	movl	$-129, %eax
	addl	(%r14), %eax
	cmpl	$11, %eax
	ja	LBB0_14
## %bb.12:
	movl	$960, %ecx                      ## imm = 0x3C0
	btl	%eax, %ecx
	jb	LBB0_15
## %bb.13:
	movl	$20, %edi
	movl	$3075, %ecx                     ## imm = 0xC03
	btl	%eax, %ecx
	jb	LBB0_16
LBB0_14:
	movq	%r14, %rdi
	callq	_e1000_get_auto_rd_done
	testl	%eax, %eax
	jne	LBB0_26
	jmp	LBB0_17
LBB0_15:
	movl	$10, %edi
	callq	_udelay
	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	_E1000_WRITE_FLUSH
	movl	$2, %edi
LBB0_16:
	callq	_msleep
LBB0_17:
	movl	(%r14), %eax
	cmpl	$141, %eax
	jl	LBB0_19
## %bb.18:
	movq	_MANC@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_er32
	movq	_E1000_MANC_ARP_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	(%rbx), %edi
	callq	_ew32
	movl	(%r14), %eax
LBB0_19:
	cmpl	$140, %eax
	je	LBB0_21
## %bb.20:
	cmpl	$130, %eax
	jne	LBB0_22
LBB0_21:
	movq	%r14, %rdi
	callq	_e1000_phy_init_script
	movq	_LEDCTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_er32
	movq	_IGP_ACTIVITY_LED_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_IGP_ACTIVITY_LED_ENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_IGP_LED3_MODE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_ew32
LBB0_22:
	leaq	L_.str.1(%rip), %rdi
	callq	_e_dbg
	movl	(%r15), %edi
	movl	$-1, %esi
	callq	_ew32
	movq	_ICR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_er32
	cmpl	$138, (%r14)
	jne	LBB0_25
## %bb.23:
	movq	_PCI_COMMAND_INVALIDATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r14)
	je	LBB0_25
## %bb.24:
	movq	%r14, %rdi
	callq	_e1000_pci_set_mwi
LBB0_25:
	movq	_E1000_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_26:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Disabling MWI on 82542 rev 2.0\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
	.comm	_E1000_CTRL_PHY_RST,4,2         ## @E1000_CTRL_PHY_RST
L_.str.2:                               ## @.str.2
	.asciz	"Issuing a global reset to MAC\n"

	.comm	_E1000_CTRL_RST,4,2             ## @E1000_CTRL_RST
	.comm	_CTRL_DUP,4,2                   ## @CTRL_DUP
	.comm	_CTRL_EXT,4,2                   ## @CTRL_EXT
	.comm	_E1000_CTRL_EXT_EE_RST,4,2      ## @E1000_CTRL_EXT_EE_RST
	.comm	_MANC,4,2                       ## @MANC
	.comm	_E1000_MANC_ARP_EN,4,2          ## @E1000_MANC_ARP_EN
	.comm	_LEDCTL,4,2                     ## @LEDCTL
	.comm	_IGP_ACTIVITY_LED_MASK,4,2      ## @IGP_ACTIVITY_LED_MASK
	.comm	_IGP_ACTIVITY_LED_ENABLE,4,2    ## @IGP_ACTIVITY_LED_ENABLE
	.comm	_IGP_LED3_MODE,4,2              ## @IGP_LED3_MODE
	.comm	_ICR,4,2                        ## @ICR
	.comm	_PCI_COMMAND_INVALIDATE,4,2     ## @PCI_COMMAND_INVALIDATE
	.comm	_E1000_SUCCESS,4,2              ## @E1000_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_e1000_reset_hw                 ; -- Begin function e1000_reset_hw
	.p2align	2
_e1000_reset_hw:                        ; @e1000_reset_hw
	.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
	ldr	w8, [x0]
	cmp	w8, #138
	b.ne	LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_e_dbg
	mov	x0, x19
	bl	_e1000_pci_clear_mwi
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	_E1000_WRITE_FLUSH
	str	wzr, [x19, #4]
	mov	w0, #10
	bl	_msleep
Lloh15:
	adrp	x22, _CTRL@GOTPAGE
Lloh16:
	ldr	x22, [x22, _CTRL@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_er32
	mov	x20, x0
	ldr	w8, [x19]
	cmp	w8, #140
	b.eq	LBB0_4
; %bb.3:
	cmp	w8, #130
	b.ne	LBB0_5
LBB0_4:
	ldr	w0, [x22]
Lloh17:
	adrp	x8, _E1000_CTRL_PHY_RST@GOTPAGE
Lloh18:
	ldr	x8, [x8, _E1000_CTRL_PHY_RST@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	orr	w1, w8, w20
	bl	_ew32
	bl	_E1000_WRITE_FLUSH
	mov	w0, #5
	bl	_msleep
LBB0_5:
Lloh20:
	adrp	x0, l_.str.2@PAGE
Lloh21:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_e_dbg
	ldr	w8, [x19]
	sub	w8, w8, #131
	cmp	w8, #10
	b.hi	LBB0_10
; %bb.6:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #1818
	tst	w8, w9
	b.eq	LBB0_8
; %bb.7:
	ldr	w1, [x22]
Lloh22:
	adrp	x8, _E1000_CTRL_RST@GOTPAGE
Lloh23:
	ldr	x8, [x8, _E1000_CTRL_RST@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	orr	w2, w8, w20
	mov	x0, x19
	bl	_E1000_WRITE_REG_IO
	b	LBB0_12
LBB0_8:
	mov	w9, #5
	tst	w8, w9
	b.eq	LBB0_10
; %bb.9:
Lloh25:
	adrp	x8, _CTRL_DUP@GOTPAGE
Lloh26:
	ldr	x8, [x8, _CTRL_DUP@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	b	LBB0_11
LBB0_10:
	ldr	w0, [x22]
LBB0_11:
Lloh28:
	adrp	x8, _E1000_CTRL_RST@GOTPAGE
Lloh29:
	ldr	x8, [x8, _E1000_CTRL_RST@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	orr	w1, w8, w20
	bl	_ew32
LBB0_12:
	ldr	w8, [x19]
	sub	w8, w8, #129
	cmp	w8, #11
	b.hi	LBB0_28
; %bb.13:
	mov	w9, #1
	lsl	w8, w9, w8
	tst	w8, #0x3c0
	b.ne	LBB0_16
; %bb.14:
	mov	w9, #3075
	tst	w8, w9
	b.eq	LBB0_28
; %bb.15:
	mov	w0, #20
	b	LBB0_17
LBB0_16:
	mov	w0, #10
	bl	_udelay
Lloh31:
	adrp	x20, _CTRL_EXT@GOTPAGE
Lloh32:
	ldr	x20, [x20, _CTRL_EXT@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_er32
Lloh33:
	adrp	x8, _E1000_CTRL_EXT_EE_RST@GOTPAGE
Lloh34:
	ldr	x8, [x8, _E1000_CTRL_EXT_EE_RST@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	orr	w1, w8, w0
	ldr	w0, [x20]
	bl	_ew32
	bl	_E1000_WRITE_FLUSH
	mov	w0, #2
LBB0_17:
	bl	_msleep
LBB0_18:
	ldr	w8, [x19]
	cmp	w8, #141
	b.lt	LBB0_20
; %bb.19:
Lloh36:
	adrp	x20, _MANC@GOTPAGE
Lloh37:
	ldr	x20, [x20, _MANC@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_er32
Lloh38:
	adrp	x8, _E1000_MANC_ARP_EN@GOTPAGE
Lloh39:
	ldr	x8, [x8, _E1000_MANC_ARP_EN@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	bic	w1, w0, w8
	ldr	w0, [x20]
	bl	_ew32
	ldr	w8, [x19]
LBB0_20:
	cmp	w8, #140
	b.eq	LBB0_22
; %bb.21:
	cmp	w8, #130
	b.ne	LBB0_23
LBB0_22:
	mov	x0, x19
	bl	_e1000_phy_init_script
Lloh41:
	adrp	x20, _LEDCTL@GOTPAGE
Lloh42:
	ldr	x20, [x20, _LEDCTL@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_er32
Lloh43:
	adrp	x8, _IGP_ACTIVITY_LED_MASK@GOTPAGE
Lloh44:
	ldr	x8, [x8, _IGP_ACTIVITY_LED_MASK@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh46:
	adrp	x9, _IGP_ACTIVITY_LED_ENABLE@GOTPAGE
Lloh47:
	ldr	x9, [x9, _IGP_ACTIVITY_LED_ENABLE@GOTPAGEOFF]
Lloh48:
	ldr	w9, [x9]
Lloh49:
	adrp	x10, _IGP_LED3_MODE@GOTPAGE
Lloh50:
	ldr	x10, [x10, _IGP_LED3_MODE@GOTPAGEOFF]
Lloh51:
	ldr	w10, [x10]
	orr	w8, w8, w9
	orr	w1, w8, w10
	ldr	w0, [x20]
	bl	_ew32
LBB0_23:
Lloh52:
	adrp	x0, l_.str.1@PAGE
Lloh53:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_e_dbg
	ldr	w0, [x21]
	mov	w1, #-1
	bl	_ew32
Lloh54:
	adrp	x8, _ICR@GOTPAGE
Lloh55:
	ldr	x8, [x8, _ICR@GOTPAGEOFF]
Lloh56:
	ldr	w0, [x8]
	bl	_er32
	ldr	w8, [x19]
	cmp	w8, #138
	b.ne	LBB0_26
; %bb.24:
	ldr	w8, [x19, #8]
Lloh57:
	adrp	x9, _PCI_COMMAND_INVALIDATE@GOTPAGE
Lloh58:
	ldr	x9, [x9, _PCI_COMMAND_INVALIDATE@GOTPAGEOFF]
Lloh59:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_26
; %bb.25:
	mov	x0, x19
	bl	_e1000_pci_set_mwi
LBB0_26:
Lloh60:
	adrp	x8, _E1000_SUCCESS@GOTPAGE
Lloh61:
	ldr	x8, [x8, _E1000_SUCCESS@GOTPAGEOFF]
Lloh62:
	ldr	w0, [x8]
LBB0_27:
	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_28:
	mov	x0, x19
	bl	_e1000_get_auto_rd_done
	cbnz	w0, LBB0_27
	b	LBB0_18
	.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 AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Disabling MWI on 82542 rev 2.0\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
	.comm	_E1000_CTRL_PHY_RST,4,2         ; @E1000_CTRL_PHY_RST
l_.str.2:                               ; @.str.2
	.asciz	"Issuing a global reset to MAC\n"

	.comm	_E1000_CTRL_RST,4,2             ; @E1000_CTRL_RST
	.comm	_CTRL_DUP,4,2                   ; @CTRL_DUP
	.comm	_CTRL_EXT,4,2                   ; @CTRL_EXT
	.comm	_E1000_CTRL_EXT_EE_RST,4,2      ; @E1000_CTRL_EXT_EE_RST
	.comm	_MANC,4,2                       ; @MANC
	.comm	_E1000_MANC_ARP_EN,4,2          ; @E1000_MANC_ARP_EN
	.comm	_LEDCTL,4,2                     ; @LEDCTL
	.comm	_IGP_ACTIVITY_LED_MASK,4,2      ; @IGP_ACTIVITY_LED_MASK
	.comm	_IGP_ACTIVITY_LED_ENABLE,4,2    ; @IGP_ACTIVITY_LED_ENABLE
	.comm	_IGP_LED3_MODE,4,2              ; @IGP_LED3_MODE
	.comm	_ICR,4,2                        ; @ICR
	.comm	_PCI_COMMAND_INVALIDATE,4,2     ; @PCI_COMMAND_INVALIDATE
	.comm	_E1000_SUCCESS,4,2              ; @E1000_SUCCESS
.subsections_via_symbols
