	.file	"extr_ena_netdev.c_ena_destroy_device.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ena_destroy_device, @function
ena_destroy_device:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	lea	rbp, 4[rdi]
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	mov	r14, QWORD PTR 32[rdi]
	mov	rsi, rbp
	mov	r13, QWORD PTR 16[rdi]
	mov	edi, DWORD PTR ENA_FLAG_DEVICE_RUNNING[rip]
	call	test_bit@PLT
	test	eax, eax
	jne	.L16
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	rdi, r14
	call	netif_carrier_off@PLT
	lea	rdi, 24[rbx]
	call	del_timer_sync@PLT
	mov	edi, DWORD PTR ENA_FLAG_DEV_UP[rip]
	mov	rsi, rbp
	call	test_bit@PLT
	mov	DWORD PTR [rbx], eax
	mov	r14d, eax
	test	r12d, r12d
	je	.L17
.L3:
	mov	edi, DWORD PTR ENA_FLAG_DEV_UP[rip]
	mov	rsi, rbp
	call	test_bit@PLT
	test	eax, eax
	jne	.L18
.L4:
	mov	edi, DWORD PTR ENA_FLAG_TRIGGER_RESET[rip]
	mov	rsi, rbp
	call	test_bit@PLT
	test	r14d, r14d
	je	.L7
	test	eax, eax
	je	.L7
.L5:
	mov	rdi, rbx
	call	ena_free_mgmnt_irq@PLT
	mov	rdi, rbx
	call	ena_disable_msix@PLT
	mov	rdi, r13
	call	ena_com_abort_admin_commands@PLT
	mov	rdi, r13
	call	ena_com_wait_for_abort_completion@PLT
	mov	rdi, r13
	call	ena_com_admin_destroy@PLT
	mov	rdi, r13
	call	ena_com_mmio_reg_read_request_destroy@PLT
	mov	eax, DWORD PTR ENA_REGS_RESET_NORMAL[rip]
	mov	edi, DWORD PTR ENA_FLAG_TRIGGER_RESET[rip]
	mov	rsi, rbp
	mov	DWORD PTR 8[rbx], eax
	call	clear_bit@PLT
	mov	edi, DWORD PTR ENA_FLAG_DEVICE_RUNNING[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rsi, rbp
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	clear_bit@PLT
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	esi, DWORD PTR 8[rbx]
	mov	rdi, QWORD PTR 16[rbx]
	call	ena_com_dev_reset@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L17:
	xor	esi, esi
	mov	rdi, r13
	call	ena_com_set_admin_running_state@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rdi, rbx
	call	ena_down@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	ena_destroy_device, .-ena_destroy_device
	.comm	ENA_REGS_RESET_NORMAL,4,4
	.comm	ENA_FLAG_TRIGGER_RESET,4,4
	.comm	ENA_FLAG_DEV_UP,4,4
	.comm	ENA_FLAG_DEVICE_RUNNING,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_ena_netdev.c_ena_destroy_device.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ena_destroy_device, %function
ena_destroy_device:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r0
	ldr	r9, .L16
	add	r5, r0, #4
	mov	r7, r1
	ldr	r0, [r9]
	mov	r1, r5
	ldr	r6, [r4, #20]
	ldr	r8, [r4, #12]
	bl	test_bit
	cmp	r0, #0
	popeq	{r4, r5, r6, r7, r8, r9, r10, pc}
	mov	r0, r6
	ldr	r10, .L16+4
	bl	netif_carrier_off
	add	r0, r4, #16
	bl	del_timer_sync
	mov	r1, r5
	ldr	r0, [r10]
	bl	test_bit
	cmp	r7, #0
	mov	r6, r0
	str	r0, [r4]
	beq	.L14
.L3:
	mov	r1, r5
	ldr	r0, [r10]
	bl	test_bit
	cmp	r0, #0
	bne	.L15
.L4:
	ldr	r7, .L16+8
	mov	r1, r5
	ldr	r0, [r7]
	bl	test_bit
	cmp	r0, #0
	cmpne	r6, #0
	bne	.L5
	ldr	r1, [r4, #8]
	ldr	r0, [r4, #12]
	bl	ena_com_dev_reset
.L5:
	mov	r0, r4
	bl	ena_free_mgmnt_irq
	mov	r0, r4
	bl	ena_disable_msix
	mov	r0, r8
	bl	ena_com_abort_admin_commands
	mov	r0, r8
	bl	ena_com_wait_for_abort_completion
	mov	r0, r8
	bl	ena_com_admin_destroy
	mov	r0, r8
	bl	ena_com_mmio_reg_read_request_destroy
	ldr	r3, .L16+12
	mov	r1, r5
	ldr	r3, [r3]
	ldr	r0, [r7]
	str	r3, [r4, #8]
	bl	clear_bit
	mov	r1, r5
	ldr	r0, [r9]
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	clear_bit
.L14:
	mov	r1, r7
	mov	r0, r8
	bl	ena_com_set_admin_running_state
	b	.L3
.L15:
	mov	r0, r4
	bl	ena_down
	b	.L4
.L17:
	.align	2
.L16:
	.word	ENA_FLAG_DEVICE_RUNNING
	.word	ENA_FLAG_DEV_UP
	.word	ENA_FLAG_TRIGGER_RESET
	.word	ENA_REGS_RESET_NORMAL
	.size	ena_destroy_device, .-ena_destroy_device
	.comm	ENA_REGS_RESET_NORMAL,4,4
	.comm	ENA_FLAG_TRIGGER_RESET,4,4
	.comm	ENA_FLAG_DEV_UP,4,4
	.comm	ENA_FLAG_DEVICE_RUNNING,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
