	.file	"extr_e1000_hw.c_e1000_reset_hw.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Disabling MWI on 82542 rev 2.0\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"Masking off all interrupts\n"
	.section	.rodata.str1.8
	.align 8
.LC2:
	.string	"Issuing a global reset to MAC\n"
	.text
	.p2align 4
	.globl	e1000_reset_hw
	.type	e1000_reset_hw, @function
e1000_reset_hw:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	cmp	DWORD PTR [rdi], 138
	je	.L33
.L2:
	lea	rdi, .LC1[rip]
	call	e_dbg@PLT
	mov	edi, DWORD PTR IMC[rip]
	mov	esi, -1
	call	ew32@PLT
	mov	edi, DWORD PTR RCTL[rip]
	xor	esi, esi
	call	ew32@PLT
	mov	esi, DWORD PTR E1000_TCTL_PSP[rip]
	mov	edi, DWORD PTR TCTL[rip]
	call	ew32@PLT
	xor	eax, eax
	call	E1000_WRITE_FLUSH@PLT
	mov	DWORD PTR 4[rbp], 0
	mov	edi, 10
	call	msleep@PLT
	mov	edi, DWORD PTR CTRL[rip]
	call	er32@PLT
	mov	ebx, eax
	mov	eax, DWORD PTR 0[rbp]
	cmp	eax, 140
	je	.L20
	cmp	eax, 130
	je	.L20
.L3:
	lea	rdi, .LC2[rip]
	call	e_dbg@PLT
	mov	eax, DWORD PTR 0[rbp]
	or	ebx, DWORD PTR E1000_CTRL_RST[rip]
	lea	ecx, -131[rax]
	cmp	ecx, 10
	ja	.L5
	lea	rdx, .L7[rip]
	movsx	rax, DWORD PTR [rdx+rcx*4]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L7:
	.long	.L8-.L7
	.long	.L6-.L7
	.long	.L8-.L7
	.long	.L6-.L7
	.long	.L6-.L7
	.long	.L5-.L7
	.long	.L5-.L7
	.long	.L5-.L7
	.long	.L6-.L7
	.long	.L6-.L7
	.long	.L6-.L7
	.text
	.p2align 4,,10
	.p2align 3
.L6:
	mov	esi, DWORD PTR CTRL[rip]
	mov	edx, ebx
	mov	rdi, rbp
	call	E1000_WRITE_REG_IO@PLT
.L9:
	mov	eax, DWORD PTR 0[rbp]
	cmp	eax, 138
	jg	.L10
.L36:
	cmp	eax, 134
	jg	.L11
	sub	eax, 129
	cmp	eax, 1
	ja	.L12
.L13:
	mov	edi, 20
	call	msleep@PLT
.L14:
	mov	eax, DWORD PTR 0[rbp]
	cmp	eax, 140
	jg	.L34
.L16:
	cmp	eax, 140
	je	.L21
.L37:
	cmp	eax, 130
	je	.L21
.L17:
	lea	rdi, .LC1[rip]
	call	e_dbg@PLT
	mov	edi, DWORD PTR IMC[rip]
	mov	esi, -1
	call	ew32@PLT
	mov	edi, DWORD PTR ICR[rip]
	call	er32@PLT
	cmp	DWORD PTR 0[rbp], 138
	je	.L35
.L19:
	mov	eax, DWORD PTR E1000_SUCCESS[rip]
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	edi, DWORD PTR CTRL_DUP[rip]
	mov	esi, ebx
	call	ew32@PLT
	mov	eax, DWORD PTR 0[rbp]
	cmp	eax, 138
	jle	.L36
.L10:
	sub	eax, 139
	cmp	eax, 1
	jbe	.L13
.L12:
	mov	rdi, rbp
	call	e1000_get_auto_rd_done@PLT
	test	eax, eax
	jne	.L1
	mov	eax, DWORD PTR 0[rbp]
	cmp	eax, 140
	jle	.L16
.L34:
	mov	edi, DWORD PTR MANC[rip]
	call	er32@PLT
	mov	esi, DWORD PTR E1000_MANC_ARP_EN[rip]
	mov	edi, DWORD PTR MANC[rip]
	not	esi
	and	esi, eax
	call	ew32@PLT
	mov	eax, DWORD PTR 0[rbp]
	cmp	eax, 140
	jne	.L37
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rdi, rbp
	call	e1000_phy_init_script@PLT
	mov	edi, DWORD PTR LEDCTL[rip]
	call	er32@PLT
	mov	esi, DWORD PTR IGP_ACTIVITY_LED_ENABLE[rip]
	and	eax, DWORD PTR IGP_ACTIVITY_LED_MASK[rip]
	or	esi, DWORD PTR IGP_LED3_MODE[rip]
	mov	edi, DWORD PTR LEDCTL[rip]
	or	esi, eax
	call	ew32@PLT
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edi, DWORD PTR CTRL[rip]
	mov	esi, ebx
	call	ew32@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L11:
	mov	edi, 10
	call	udelay@PLT
	mov	edi, DWORD PTR CTRL_EXT[rip]
	call	er32@PLT
	mov	edi, DWORD PTR CTRL_EXT[rip]
	or	eax, DWORD PTR E1000_CTRL_EXT_EE_RST[rip]
	mov	esi, eax
	call	ew32@PLT
	xor	eax, eax
	call	E1000_WRITE_FLUSH@PLT
	mov	edi, 2
	call	msleep@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L20:
	mov	esi, DWORD PTR E1000_CTRL_PHY_RST[rip]
	mov	edi, DWORD PTR CTRL[rip]
	or	esi, ebx
	call	ew32@PLT
	xor	eax, eax
	call	E1000_WRITE_FLUSH@PLT
	mov	edi, 5
	call	msleep@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L35:
	mov	eax, DWORD PTR 8[rbp]
	test	DWORD PTR PCI_COMMAND_INVALIDATE[rip], eax
	je	.L19
	mov	rdi, rbp
	call	e1000_pci_set_mwi@PLT
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L33:
	lea	rdi, .LC0[rip]
	call	e_dbg@PLT
	mov	rdi, rbp
	call	e1000_pci_clear_mwi@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	e1000_reset_hw, .-e1000_reset_hw
	.comm	TCTL,4,4
	.comm	RCTL,4,4
	.comm	PCI_COMMAND_INVALIDATE,4,4
	.comm	MANC,4,4
	.comm	LEDCTL,4,4
	.comm	IMC,4,4
	.comm	IGP_LED3_MODE,4,4
	.comm	IGP_ACTIVITY_LED_MASK,4,4
	.comm	IGP_ACTIVITY_LED_ENABLE,4,4
	.comm	ICR,4,4
	.comm	E1000_TCTL_PSP,4,4
	.comm	E1000_SUCCESS,4,4
	.comm	E1000_MANC_ARP_EN,4,4
	.comm	E1000_CTRL_RST,4,4
	.comm	E1000_CTRL_PHY_RST,4,4
	.comm	E1000_CTRL_EXT_EE_RST,4,4
	.comm	CTRL_EXT,4,4
	.comm	CTRL_DUP,4,4
	.comm	CTRL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_e1000_hw.c_e1000_reset_hw.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Disabling MWI on 82542 rev 2.0\012\000"
	.align	2
.LC1:
	.ascii	"Masking off all interrupts\012\000"
	.align	2
.LC2:
	.ascii	"Issuing a global reset to MAC\012\000"
	.text
	.align	2
	.global	e1000_reset_hw
	.syntax unified
	.arm
	.fpu softvfp
	.type	e1000_reset_hw, %function
e1000_reset_hw:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0]
	push	{r4, r5, r6, r7, r8, lr}
	cmp	r3, #138
	mov	r4, r0
	beq	.L29
.L2:
	ldr	r6, .L35
	ldr	r0, .L35+4
	bl	e_dbg
	mvn	r1, #0
	ldr	r0, [r6]
	bl	ew32
	ldr	r3, .L35+8
	mov	r1, #0
	ldr	r0, [r3]
	bl	ew32
	ldr	r2, .L35+12
	ldr	r3, .L35+16
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	ew32
	bl	E1000_WRITE_FLUSH
	mov	r3, #0
	ldr	r7, .L35+20
	str	r3, [r4, #4]
	mov	r0, #10
	bl	msleep
	ldr	r0, [r7]
	bl	er32
	ldr	r3, [r4]
	mov	r5, r0
	cmp	r3, #130
	cmpne	r3, #140
	beq	.L30
.L3:
	ldr	r0, .L35+24
	bl	e_dbg
	ldr	r3, [r4]
	sub	r3, r3, #131
	cmp	r3, #10
	ldrls	pc, [pc, r3, asl #2]
	b	.L4
.L6:
	.word	.L7
	.word	.L5
	.word	.L7
	.word	.L5
	.word	.L5
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L5
	.word	.L5
	.word	.L5
.L5:
	ldr	r3, .L35+28
	mov	r0, r4
	ldr	r2, [r3]
	ldr	r1, [r7]
	orr	r2, r5, r2
	bl	E1000_WRITE_REG_IO
.L8:
	ldr	r3, [r4]
	cmp	r3, #138
	bgt	.L9
.L34:
	cmp	r3, #134
	bgt	.L10
	sub	r3, r3, #129
	cmp	r3, #1
	bhi	.L11
.L12:
	mov	r0, #20
	bl	msleep
.L13:
	ldr	r3, [r4]
	cmp	r3, #140
	bgt	.L31
.L15:
	cmp	r3, #130
	cmpne	r3, #140
	beq	.L32
.L16:
	ldr	r0, .L35+4
	bl	e_dbg
	mvn	r1, #0
	ldr	r0, [r6]
	bl	ew32
	ldr	r3, .L35+32
	ldr	r0, [r3]
	bl	er32
	ldr	r3, [r4]
	cmp	r3, #138
	beq	.L33
.L17:
	ldr	r3, .L35+36
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	ldr	r2, .L35+28
	ldr	r3, .L35+40
	ldr	r1, [r2]
	ldr	r0, [r3]
	orr	r1, r5, r1
	bl	ew32
	ldr	r3, [r4]
	cmp	r3, #138
	ble	.L34
.L9:
	sub	r3, r3, #139
	cmp	r3, #1
	bls	.L12
.L11:
	mov	r0, r4
	bl	e1000_get_auto_rd_done
	cmp	r0, #0
	popne	{r4, r5, r6, r7, r8, pc}
	ldr	r3, [r4]
	cmp	r3, #140
	ble	.L15
.L31:
	ldr	r5, .L35+44
	ldr	r0, [r5]
	bl	er32
	mov	r3, r0
	ldr	r2, .L35+48
	ldr	r0, [r5]
	ldr	r1, [r2]
	bic	r1, r3, r1
	bl	ew32
	ldr	r3, [r4]
	cmp	r3, #130
	cmpne	r3, #140
	bne	.L16
.L32:
	ldr	r5, .L35+52
	mov	r0, r4
	bl	e1000_phy_init_script
	ldr	r0, [r5]
	bl	er32
	ldr	r3, .L35+56
	ldr	r1, .L35+60
	ldr	r2, .L35+64
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r1, [r1]
	and	r3, r3, r0
	orr	r1, r1, r2
	ldr	r0, [r5]
	orr	r1, r1, r3
	bl	ew32
	b	.L16
.L4:
	ldr	r3, .L35+28
	ldr	r0, [r7]
	ldr	r1, [r3]
	orr	r1, r5, r1
	bl	ew32
	b	.L8
.L10:
	ldr	r5, .L35+68
	mov	r0, #10
	bl	udelay
	ldr	r0, [r5]
	bl	er32
	mov	r1, r0
	ldr	r3, .L35+72
	ldr	r0, [r5]
	ldr	r3, [r3]
	orr	r1, r1, r3
	bl	ew32
	bl	E1000_WRITE_FLUSH
	mov	r0, #2
	bl	msleep
	b	.L13
.L30:
	ldr	r3, .L35+76
	ldr	r0, [r7]
	ldr	r1, [r3]
	orr	r1, r5, r1
	bl	ew32
	bl	E1000_WRITE_FLUSH
	mov	r0, #5
	bl	msleep
	b	.L3
.L33:
	ldr	r3, .L35+80
	ldr	r2, [r4, #8]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L17
	mov	r0, r4
	bl	e1000_pci_set_mwi
	b	.L17
.L29:
	ldr	r0, .L35+84
	bl	e_dbg
	mov	r0, r4
	bl	e1000_pci_clear_mwi
	b	.L2
.L36:
	.align	2
.L35:
	.word	IMC
	.word	.LC1
	.word	RCTL
	.word	E1000_TCTL_PSP
	.word	TCTL
	.word	CTRL
	.word	.LC2
	.word	E1000_CTRL_RST
	.word	ICR
	.word	E1000_SUCCESS
	.word	CTRL_DUP
	.word	MANC
	.word	E1000_MANC_ARP_EN
	.word	LEDCTL
	.word	IGP_ACTIVITY_LED_MASK
	.word	IGP_ACTIVITY_LED_ENABLE
	.word	IGP_LED3_MODE
	.word	CTRL_EXT
	.word	E1000_CTRL_EXT_EE_RST
	.word	E1000_CTRL_PHY_RST
	.word	PCI_COMMAND_INVALIDATE
	.word	.LC0
	.size	e1000_reset_hw, .-e1000_reset_hw
	.comm	TCTL,4,4
	.comm	RCTL,4,4
	.comm	PCI_COMMAND_INVALIDATE,4,4
	.comm	MANC,4,4
	.comm	LEDCTL,4,4
	.comm	IMC,4,4
	.comm	IGP_LED3_MODE,4,4
	.comm	IGP_ACTIVITY_LED_MASK,4,4
	.comm	IGP_ACTIVITY_LED_ENABLE,4,4
	.comm	ICR,4,4
	.comm	E1000_TCTL_PSP,4,4
	.comm	E1000_SUCCESS,4,4
	.comm	E1000_MANC_ARP_EN,4,4
	.comm	E1000_CTRL_RST,4,4
	.comm	E1000_CTRL_PHY_RST,4,4
	.comm	E1000_CTRL_EXT_EE_RST,4,4
	.comm	CTRL_EXT,4,4
	.comm	CTRL_DUP,4,4
	.comm	CTRL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
