	.file	"extr_efx.c_efx_reset.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"resetting (%s)\n"
.LC1:
	.string	"failed to reset hardware\n"
.LC2:
	.string	"has been disabled\n"
.LC3:
	.string	"reset complete\n"
	.text
	.p2align 4
	.globl	efx_reset
	.type	efx_reset, @function
efx_reset:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	mov	edi, esi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	RESET_TYPE@PLT
	mov	edx, DWORD PTR 4[rbx]
	mov	esi, DWORD PTR drv[rip]
	mov	rdi, rbx
	mov	r8d, eax
	lea	rcx, .LC0[rip]
	call	netif_info@PLT
	mov	rdi, rbx
	call	efx_device_detach_sync@PLT
	mov	esi, ebp
	mov	rdi, rbx
	call	efx_reset_down@PLT
	mov	rax, QWORD PTR 16[rbx]
	mov	esi, ebp
	mov	rdi, rbx
	call	[QWORD PTR [rax]]
	test	eax, eax
	jne	.L11
	lea	ecx, 1[rbp]
	mov	eax, -1
	mov	edi, DWORD PTR 12[rbx]
	sal	eax, cl
	and	DWORD PTR [rbx], eax
	call	pci_set_master@PLT
	cmp	DWORD PTR RESET_TYPE_DISABLE[rip], ebp
	je	.L4
	mov	r13d, DWORD PTR RESET_TYPE_RECOVER_OR_DISABLE[rip]
	xor	edx, edx
	mov	rdi, rbx
	mov	esi, ebp
	cmp	r13d, ebp
	setne	dl
	call	efx_reset_up@PLT
	mov	edi, DWORD PTR 4[rbx]
	mov	r12d, eax
	test	eax, eax
	jne	.L3
	cmp	r13d, ebp
	je	.L3
	mov	esi, DWORD PTR drv[rip]
	mov	edx, edi
	lea	rcx, .LC3[rip]
	mov	rdi, rbx
	call	netif_dbg@PLT
	mov	edi, DWORD PTR 4[rbx]
	call	netif_device_attach@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	rdi, rbx
	xor	edx, edx
	mov	esi, ebp
	call	efx_reset_up@PLT
	mov	edi, DWORD PTR 4[rbx]
	mov	r12d, eax
.L3:
	call	dev_close@PLT
	mov	edx, DWORD PTR 4[rbx]
	mov	rdi, rbx
	mov	esi, DWORD PTR drv[rip]
	lea	rcx, .LC2[rip]
	call	netif_err@PLT
	mov	eax, DWORD PTR STATE_DISABLED[rip]
	mov	DWORD PTR 8[rbx], eax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	edx, DWORD PTR 4[rbx]
	mov	esi, DWORD PTR drv[rip]
	mov	rdi, rbx
	mov	r12d, eax
	lea	rcx, .LC1[rip]
	call	netif_err@PLT
	mov	rdi, rbx
	xor	edx, edx
	mov	esi, ebp
	call	efx_reset_up@PLT
	mov	edi, DWORD PTR 4[rbx]
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	efx_reset, .-efx_reset
	.comm	drv,4,4
	.comm	STATE_DISABLED,4,4
	.comm	RESET_TYPE_RECOVER_OR_DISABLE,4,4
	.comm	RESET_TYPE_DISABLE,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_efx.c_efx_reset.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"resetting (%s)\012\000"
	.align	2
.LC1:
	.ascii	"failed to reset hardware\012\000"
	.align	2
.LC2:
	.ascii	"has been disabled\012\000"
	.align	2
.LC3:
	.ascii	"reset complete\012\000"
	.text
	.align	2
	.global	efx_reset
	.syntax unified
	.arm
	.fpu softvfp
	.type	efx_reset, %function
efx_reset:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r7, .L13
	sub	sp, sp, #8
	mov	r0, r1
	mov	r5, r1
	ldr	r6, [r7]
	ldr	r8, [r4, #4]
	bl	RESET_TYPE
	mov	r2, r8
	mov	r1, r6
	ldr	r3, .L13+4
	str	r0, [sp]
	mov	r0, r4
	bl	netif_info
	mov	r0, r4
	bl	efx_device_detach_sync
	mov	r1, r5
	mov	r0, r4
	bl	efx_reset_down
	ldr	r3, [r4, #16]
	mov	r1, r5
	mov	r0, r4
	ldr	r3, [r3]
	blx	r3
	subs	r6, r0, #0
	bne	.L12
	mvn	r1, #0
	ldr	r3, [r4]
	add	r2, r5, #1
	and	r3, r3, r1, lsl r2
	str	r3, [r4]
	ldr	r0, [r4, #12]
	bl	pci_set_master
	ldr	r3, .L13+8
	ldr	r1, [r3]
	cmp	r1, r5
	beq	.L4
	ldr	r3, .L13+12
	mov	r1, r5
	ldr	r8, [r3]
	mov	r0, r4
	subs	r2, r8, r5
	movne	r2, #1
	bl	efx_reset_up
	subs	r6, r0, #0
	bne	.L10
	cmp	r8, r5
	ldr	r0, [r4, #4]
	beq	.L3
	mov	r2, r0
	ldr	r1, [r7]
	ldr	r3, .L13+16
	mov	r0, r4
	bl	netif_dbg
	ldr	r0, [r4, #4]
	bl	netif_device_attach
	mov	r0, r6
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	mov	r2, r6
	mov	r0, r4
	bl	efx_reset_up
	mov	r6, r0
.L10:
	ldr	r0, [r4, #4]
.L3:
	bl	dev_close
	mov	r0, r4
	ldr	r1, [r7]
	ldr	r3, .L13+20
	ldr	r2, [r4, #4]
	bl	netif_err
	mov	r0, r6
	ldr	r3, .L13+24
	ldr	r3, [r3]
	str	r3, [r4, #8]
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	ldr	r3, .L13+28
	ldr	r2, [r4, #4]
	ldr	r1, [r7]
	mov	r0, r4
	bl	netif_err
	mov	r1, r5
	mov	r2, #0
	mov	r0, r4
	bl	efx_reset_up
	ldr	r0, [r4, #4]
	b	.L3
.L14:
	.align	2
.L13:
	.word	drv
	.word	.LC0
	.word	RESET_TYPE_DISABLE
	.word	RESET_TYPE_RECOVER_OR_DISABLE
	.word	.LC3
	.word	.LC2
	.word	STATE_DISABLED
	.word	.LC1
	.size	efx_reset, .-efx_reset
	.comm	drv,4,4
	.comm	STATE_DISABLED,4,4
	.comm	RESET_TYPE_RECOVER_OR_DISABLE,4,4
	.comm	RESET_TYPE_DISABLE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
