	.file	"extr_esas2r_init.c_esas2r_kill_adapter.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"killing adapter %p [%d] "
.LC1:
	.string	"uncached area freed"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"pci_disable_device() called.  msix_enabled: %d msi_enabled: %d irq: %d pin: %d"
	.align 8
.LC3:
	.string	"before pci_disable_device() enable_cnt: %d"
	.align 8
.LC4:
	.string	"after pci_disable_device() enable_cnt: %d"
	.align 8
.LC5:
	.string	"pci_set_drv_data(%p, NULL) called"
	.section	.rodata.str1.1
.LC6:
	.string	"scsi_remove_host() called"
.LC7:
	.string	"scsi_host_put() called"
	.text
	.p2align 4
	.globl	esas2r_kill_adapter
	.type	esas2r_kill_adapter, @function
esas2r_kill_adapter:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rax, QWORD PTR esas2r_adapters[rip]
	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
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movsx	rbp, edi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, QWORD PTR [rax+rbp*8]
	test	rbx, rbx
	je	.L1
	mov	rdx, rbp
	mov	rsi, rbx
	lea	rdi, .LC0[rip]
	xor	eax, eax
	call	esas2r_debug@PLT
	mov	rdi, rbx
	call	esas2r_fw_event_off@PLT
	xor	esi, esi
	mov	rdi, rbx
	call	esas2r_adapter_power_down@PLT
	mov	rdx, QWORD PTR esas2r_buffered_ioctl[rip]
	test	rdx, rdx
	je	.L4
	mov	rdi, QWORD PTR 16[rbx]
	cmp	rdi, QWORD PTR esas2r_buffered_ioctl_pcid[rip]
	je	.L30
.L4:
	mov	rdx, QWORD PTR 96[rbx]
	test	rdx, rdx
	je	.L5
	mov	rdi, QWORD PTR 16[rbx]
	mov	ecx, DWORD PTR 104[rbx]
	mov	rsi, QWORD PTR VDA_MAX_BUFFER_SIZE[rip]
	call	dma_free_coherent@PLT
	mov	QWORD PTR 96[rbx], 0
.L5:
	mov	rdx, QWORD PTR 72[rbx]
	test	rdx, rdx
	je	.L6
	mov	rsi, QWORD PTR 88[rbx]
	mov	rdi, QWORD PTR 16[rbx]
	mov	ecx, DWORD PTR 80[rbx]
	call	dma_free_coherent@PLT
	mov	QWORD PTR 72[rbx], 0
.L6:
	mov	rdi, QWORD PTR 64[rbx]
	xor	r13d, r13d
	lea	r12, 48[rbx]
	call	kfree@PLT
	mov	QWORD PTR 64[rbx], 0
	mov	rsi, r13
	mov	rdi, r12
	call	spin_lock_irqsave@PLT
	mov	r14, QWORD PTR 56[rbx]
	mov	rsi, r13
	mov	rdi, r12
	mov	QWORD PTR 56[rbx], 0
	call	spin_unlock_irqrestore@PLT
	test	r14, r14
	je	.L7
	mov	rdi, r14
	call	destroy_workqueue@PLT
.L7:
	mov	rdx, QWORD PTR 24[rbx]
	mov	r10, QWORD PTR 16[rbx]
	test	rdx, rdx
	je	.L8
	mov	rsi, QWORD PTR 40[rbx]
	mov	ecx, DWORD PTR 32[rbx]
	mov	rdi, r10
	call	dma_free_coherent@PLT
	mov	QWORD PTR 24[rbx], 0
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	esas2r_debug@PLT
	mov	r10, QWORD PTR 16[rbx]
.L8:
	mov	eax, DWORD PTR 8[r10]
	sub	rsp, 8
	.cfi_def_cfa_offset 56
	mov	ecx, DWORD PTR 20[r10]
	mov	rsi, r10
	mov	r9d, DWORD PTR 12[r10]
	mov	r8d, DWORD PTR 16[r10]
	lea	rdx, .LC2[rip]
	push	rax
	.cfi_def_cfa_offset 64
	mov	edi, DWORD PTR ESAS2R_LOG_INFO[rip]
	xor	eax, eax
	call	esas2r_log_dev@PLT
	mov	rsi, QWORD PTR 16[rbx]
	mov	edi, DWORD PTR ESAS2R_LOG_INFO[rip]
	xor	eax, eax
	lea	rdx, .LC3[rip]
	mov	ecx, DWORD PTR 4[rsi]
	call	esas2r_log_dev@PLT
	mov	rdi, QWORD PTR 16[rbx]
	call	pci_disable_device@PLT
	mov	rsi, QWORD PTR 16[rbx]
	mov	edi, DWORD PTR ESAS2R_LOG_INFO[rip]
	xor	eax, eax
	lea	rdx, .LC4[rip]
	mov	ecx, DWORD PTR 4[rsi]
	call	esas2r_log_dev@PLT
	mov	rsi, QWORD PTR 16[rbx]
	mov	edi, DWORD PTR ESAS2R_LOG_INFO[rip]
	xor	eax, eax
	lea	rdx, .LC5[rip]
	mov	rcx, rsi
	call	esas2r_log_dev@PLT
	mov	rdi, QWORD PTR 16[rbx]
	xor	esi, esi
	call	pci_set_drvdata@PLT
	mov	rax, QWORD PTR esas2r_adapters[rip]
	mov	edi, DWORD PTR AF2_INIT_DONE[rip]
	mov	QWORD PTR [rax+rbp*8], 0
	lea	rbp, 12[rbx]
	mov	rsi, rbp
	call	test_bit@PLT
	pop	rdx
	.cfi_def_cfa_offset 56
	pop	rcx
	.cfi_def_cfa_offset 48
	test	rax, rax
	jne	.L31
.L1:
	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
.L31:
	.cfi_restore_state
	mov	edi, DWORD PTR AF2_INIT_DONE[rip]
	mov	rsi, rbp
	call	clear_bit@PLT
	mov	edi, DWORD PTR AF_DEGRADED_MODE[rip]
	lea	rsi, 8[rbx]
	call	set_bit@PLT
	mov	rsi, QWORD PTR [rbx]
	mov	edi, DWORD PTR ESAS2R_LOG_INFO[rip]
	xor	eax, eax
	lea	rdx, .LC6[rip]
	call	esas2r_log_dev@PLT
	mov	rdi, QWORD PTR [rbx]
	call	scsi_remove_host@PLT
	mov	rsi, QWORD PTR [rbx]
	mov	edi, DWORD PTR ESAS2R_LOG_INFO[rip]
	xor	eax, eax
	lea	rdx, .LC7[rip]
	call	esas2r_log_dev@PLT
	mov	rdi, QWORD PTR [rbx]
	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
	jmp	scsi_host_put@PLT
	.p2align 4,,10
	.p2align 3
.L30:
	.cfi_restore_state
	mov	ecx, DWORD PTR esas2r_buffered_ioctl_addr[rip]
	mov	rsi, QWORD PTR esas2r_buffered_ioctl_size[rip]
	call	dma_free_coherent@PLT
	mov	QWORD PTR esas2r_buffered_ioctl[rip], 0
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	esas2r_kill_adapter, .-esas2r_kill_adapter
	.comm	esas2r_buffered_ioctl_size,8,8
	.comm	esas2r_buffered_ioctl_pcid,8,8
	.comm	esas2r_buffered_ioctl_addr,4,4
	.comm	esas2r_buffered_ioctl,8,8
	.comm	esas2r_adapters,8,8
	.comm	VDA_MAX_BUFFER_SIZE,8,8
	.comm	ESAS2R_LOG_INFO,4,4
	.comm	AF_DEGRADED_MODE,4,4
	.comm	AF2_INIT_DONE,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_esas2r_init.c_esas2r_kill_adapter.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"killing adapter %p [%d] \000"
	.align	2
.LC1:
	.ascii	"uncached area freed\000"
	.align	2
.LC2:
	.ascii	"pci_disable_device() called.  msix_enabled: %d msi_"
	.ascii	"enabled: %d irq: %d pin: %d\000"
	.align	2
.LC3:
	.ascii	"before pci_disable_device() enable_cnt: %d\000"
	.align	2
.LC4:
	.ascii	"after pci_disable_device() enable_cnt: %d\000"
	.align	2
.LC5:
	.ascii	"pci_set_drv_data(%p, NULL) called\000"
	.align	2
.LC6:
	.ascii	"scsi_remove_host() called\000"
	.align	2
.LC7:
	.ascii	"scsi_host_put() called\000"
	.text
	.align	2
	.global	esas2r_kill_adapter
	.syntax unified
	.arm
	.fpu softvfp
	.type	esas2r_kill_adapter, %function
esas2r_kill_adapter:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r7, .L32
	sub	sp, sp, #16
	ldr	r3, [r7]
	ldr	r4, [r3, r0, lsl #2]
	cmp	r4, #0
	beq	.L1
	mov	r2, r0
	mov	r1, r4
	mov	r5, r0
	ldr	r0, .L32+4
	bl	esas2r_debug
	ldr	r6, .L32+8
	mov	r0, r4
	bl	esas2r_fw_event_off
	mov	r1, #0
	mov	r0, r4
	bl	esas2r_adapter_power_down
	ldr	r2, [r6]
	cmp	r2, #0
	beq	.L4
	ldr	r3, .L32+12
	ldr	r0, [r4, #12]
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L30
.L4:
	ldr	r2, [r4, #52]
	cmp	r2, #0
	beq	.L5
	ldr	r3, .L32+16
	ldr	r0, [r4, #12]
	ldr	r1, [r3]
	ldr	r3, [r4, #56]
	bl	dma_free_coherent
	mov	r3, #0
	str	r3, [r4, #52]
.L5:
	ldr	r2, [r4, #40]
	cmp	r2, #0
	beq	.L6
	ldr	r3, [r4, #44]
	ldr	r1, [r4, #48]
	ldr	r0, [r4, #12]
	bl	dma_free_coherent
	mov	r3, #0
	str	r3, [r4, #40]
.L6:
	mov	r8, #0
	add	r6, r4, #28
	ldr	r0, [r4, #36]
	bl	kfree
	mov	r1, r8
	mov	r0, r6
	str	r8, [r4, #36]
	bl	spin_lock_irqsave
	ldr	r10, [r4, #32]
	mov	r1, r8
	mov	r0, r6
	str	r8, [r4, #32]
	bl	spin_unlock_irqrestore
	cmp	r10, r8
	beq	.L7
	mov	r0, r10
	bl	destroy_workqueue
.L7:
	ldr	r2, [r4, #16]
	ldr	r1, [r4, #12]
	cmp	r2, #0
	beq	.L8
	mov	r0, r1
	ldr	r3, [r4, #20]
	ldr	r1, [r4, #24]
	bl	dma_free_coherent
	mov	r3, #0
	ldr	r0, .L32+20
	str	r3, [r4, #16]
	bl	esas2r_debug
	ldr	r1, [r4, #12]
.L8:
	ldr	r2, [r1, #8]
	ldr	r3, [r1, #20]
	str	r2, [sp, #8]
	ldr	r2, [r1, #12]
	ldr	r6, .L32+24
	str	r2, [sp, #4]
	ldr	r2, [r1, #16]
	add	r8, r4, #8
	str	r2, [sp]
	ldr	r0, [r6]
	ldr	r2, .L32+28
	bl	esas2r_log_dev
	ldr	r1, [r4, #12]
	ldr	r2, .L32+32
	ldr	r3, [r1, #4]
	ldr	r0, [r6]
	bl	esas2r_log_dev
	ldr	r0, [r4, #12]
	bl	pci_disable_device
	ldr	r1, [r4, #12]
	ldr	r2, .L32+36
	ldr	r3, [r1, #4]
	ldr	r0, [r6]
	bl	esas2r_log_dev
	ldr	r3, [r4, #12]
	ldr	r2, .L32+40
	mov	r1, r3
	ldr	r0, [r6]
	bl	esas2r_log_dev
	mov	r1, #0
	ldr	r0, [r4, #12]
	bl	pci_set_drvdata
	mov	r2, #0
	ldr	r3, [r7]
	ldr	r7, .L32+44
	mov	r1, r8
	ldr	r0, [r7]
	str	r2, [r3, r5, lsl #2]
	bl	test_bit
	cmp	r0, #0
	bne	.L31
.L1:
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L31:
	mov	r1, r8
	ldr	r0, [r7]
	bl	clear_bit
	ldr	r3, .L32+48
	add	r1, r4, #4
	ldr	r0, [r3]
	bl	set_bit
	ldr	r1, [r4]
	ldr	r2, .L32+52
	ldr	r0, [r6]
	bl	esas2r_log_dev
	ldr	r0, [r4]
	bl	scsi_remove_host
	ldr	r0, [r6]
	ldr	r2, .L32+56
	ldr	r1, [r4]
	bl	esas2r_log_dev
	ldr	r0, [r4]
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	scsi_host_put
.L30:
	ldr	r3, .L32+60
	ldr	r1, .L32+64
	ldr	r3, [r3]
	ldr	r1, [r1]
	bl	dma_free_coherent
	mov	r3, #0
	str	r3, [r6]
	b	.L4
.L33:
	.align	2
.L32:
	.word	esas2r_adapters
	.word	.LC0
	.word	esas2r_buffered_ioctl
	.word	esas2r_buffered_ioctl_pcid
	.word	VDA_MAX_BUFFER_SIZE
	.word	.LC1
	.word	ESAS2R_LOG_INFO
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	AF2_INIT_DONE
	.word	AF_DEGRADED_MODE
	.word	.LC6
	.word	.LC7
	.word	esas2r_buffered_ioctl_addr
	.word	esas2r_buffered_ioctl_size
	.size	esas2r_kill_adapter, .-esas2r_kill_adapter
	.comm	esas2r_buffered_ioctl_size,4,4
	.comm	esas2r_buffered_ioctl_pcid,4,4
	.comm	esas2r_buffered_ioctl_addr,4,4
	.comm	esas2r_buffered_ioctl,4,4
	.comm	esas2r_adapters,4,4
	.comm	VDA_MAX_BUFFER_SIZE,4,4
	.comm	ESAS2R_LOG_INFO,4,4
	.comm	AF_DEGRADED_MODE,4,4
	.comm	AF2_INIT_DONE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
