	.file	"extr_be_main.c_beiscsi_eh_device_reset.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"BM_%d : Failed to allocate memory formgmt_invalidate_icds\n"
	.align 8
.LC1:
	.string	"BM_%d : mgmt_invalidate_icds could not be submitted\n"
	.text
	.p2align 4
	.type	beiscsi_eh_device_reset, @function
beiscsi_eh_device_reset:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	edi, DWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	scsi_target@PLT
	mov	edi, eax
	call	starget_to_session@PLT
	mov	rbx, QWORD PTR [rax]
	lea	r14, 8[rbx]
	mov	rdi, r14
	call	spin_lock_bh@PLT
	mov	r13, QWORD PTR 16[rbx]
	test	r13, r13
	je	.L2
	mov	rax, QWORD PTR ISCSI_STATE_LOGGED_IN[rip]
	cmp	QWORD PTR [rbx], rax
	je	.L3
.L2:
	mov	rdi, r14
	call	spin_unlock_bh@PLT
	mov	eax, DWORD PTR FAILED[rip]
.L1:
	mov	rcx, QWORD PTR 24[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L20
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	rax, QWORD PTR 8[r13]
	xor	esi, esi
	mov	r12, QWORD PTR 8[rax]
	mov	r15d, DWORD PTR [rax]
	mov	eax, DWORD PTR BE2_CMDS_PER_CXN[rip]
	mov	rbx, QWORD PTR 8[r12]
	lea	edx, 0[0+rax*8]
	mov	rdi, rbx
	call	memset@PLT
	mov	rax, QWORD PTR 0[r13]
	mov	r13d, DWORD PTR [rax]
	test	r13d, r13d
	je	.L5
	mov	rdx, QWORD PTR 8[rax]
	lea	ecx, -1[r13]
	mov	rsi, QWORD PTR ISCSI_TASK_FREE[rip]
	xor	r13d, r13d
	lea	rax, 8[rdx]
	lea	rcx, [rax+rcx*8]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L21:
	add	rax, 8
.L7:
	mov	rdx, QWORD PTR [rdx]
	cmp	QWORD PTR 8[rdx], 0
	je	.L6
	cmp	QWORD PTR [rdx], rsi
	je	.L6
	mov	rdx, QWORD PTR 16[rdx]
	add	r13d, 1
	mov	DWORD PTR [rbx], r15d
	add	rbx, 8
	mov	rdx, QWORD PTR [rdx]
	mov	edx, DWORD PTR [rdx]
	mov	DWORD PTR -4[rbx], edx
.L6:
	mov	rdx, rax
	cmp	rax, rcx
	jne	.L21
.L5:
	mov	rdi, r14
	mov	rbx, rsp
	call	spin_unlock_bh@PLT
	mov	edi, DWORD PTR [r12]
	lea	rdx, 4[rsp]
	mov	esi, 4
	mov	r14, QWORD PTR 8[r12]
	call	pci_alloc_consistent@PLT
	mov	QWORD PTR 8[rsp], rax
	mov	rdi, rax
	test	rax, rax
	je	.L22
	mov	edx, 4
	xor	esi, esi
	mov	DWORD PTR [rsp], 4
	call	memset@PLT
	mov	rsi, r14
	mov	r8, rbx
	mov	ecx, r15d
	mov	edx, r13d
	mov	rdi, r12
	call	mgmt_invalidate_icds@PLT
	mov	esi, eax
	test	eax, eax
	je	.L23
	mov	rcx, QWORD PTR 8[rsp]
	xor	edx, edx
	mov	rdi, r12
	call	beiscsi_mccq_compl@PLT
	mov	edi, DWORD PTR [r12]
	mov	ecx, DWORD PTR 4[rsp]
	mov	rdx, QWORD PTR 8[rsp]
	mov	esi, DWORD PTR [rsp]
	call	pci_free_consistent@PLT
	mov	rdi, rbp
	call	iscsi_eh_device_reset@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L23:
	mov	edx, DWORD PTR BEISCSI_LOG_EH[rip]
	mov	esi, DWORD PTR KERN_WARNING[rip]
	lea	rcx, .LC1[rip]
	mov	rdi, r12
	call	beiscsi_log@PLT
	mov	ecx, DWORD PTR 4[rsp]
	mov	rdx, QWORD PTR 8[rsp]
	mov	esi, DWORD PTR [rsp]
	mov	edi, DWORD PTR [r12]
	call	pci_free_consistent@PLT
	mov	eax, DWORD PTR FAILED[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L22:
	mov	edx, DWORD PTR BEISCSI_LOG_EH[rip]
	mov	esi, DWORD PTR KERN_ERR[rip]
	lea	rcx, .LC0[rip]
	mov	rdi, r12
	call	beiscsi_log@PLT
	mov	eax, DWORD PTR FAILED[rip]
	jmp	.L1
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	beiscsi_eh_device_reset, .-beiscsi_eh_device_reset
	.comm	KERN_WARNING,4,4
	.comm	KERN_ERR,4,4
	.comm	ISCSI_TASK_FREE,8,8
	.comm	ISCSI_STATE_LOGGED_IN,8,8
	.comm	FAILED,4,4
	.comm	BEISCSI_LOG_EH,4,4
	.comm	BE2_CMDS_PER_CXN,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_be_main.c_beiscsi_eh_device_reset.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"BM_%d : Failed to allocate memory formgmt_invalidat"
	.ascii	"e_icds\012\000"
	.align	2
.LC1:
	.ascii	"BM_%d : mgmt_invalidate_icds could not be submitted"
	.ascii	"\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	beiscsi_eh_device_reset, %function
beiscsi_eh_device_reset:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L26
	sub	sp, sp, #28
	mov	r6, r0
	ldr	r0, [r0]
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	scsi_target
	bl	starget_to_session
	ldr	r4, [r0]
	add	r7, r4, #4
	mov	r0, r7
	bl	spin_lock_bh
	ldr	r5, [r4, #8]
	cmp	r5, #0
	beq	.L2
	ldr	r3, .L26+4
	ldr	r2, [r4]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L3
.L2:
	mov	r0, r7
	bl	spin_unlock_bh
	ldr	r3, .L26+8
	ldr	r0, [r3]
.L1:
	ldr	r3, .L26
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L23
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L3:
	ldr	r3, [r5, #4]
	ldr	r2, .L26+12
	ldr	r8, [r3, #4]
	ldr	r2, [r2]
	ldr	r4, [r8, #4]
	mov	r1, #0
	mov	r0, r4
	lsl	r2, r2, #3
	ldr	r9, [r3]
	bl	memset
	ldr	r3, [r5]
	ldr	r5, [r3]
	cmp	r5, #0
	beq	.L5
	ldr	r1, [r3, #4]
	ldr	r3, .L26+16
	add	r0, r1, r5, lsl #2
	mov	r5, #0
	ldr	lr, [r3]
	sub	r0, r0, #4
	sub	r1, r1, #4
.L7:
	ldr	r2, [r1, #4]!
	ldr	ip, [r2, #4]
	cmp	ip, #0
	beq	.L6
	ldr	r3, [r2]
	cmp	r3, lr
	beq	.L6
	ldr	r3, [r2, #8]
	add	r5, r5, #1
	ldr	r3, [r3]
	add	r4, r4, #8
	ldr	r3, [r3]
	str	r9, [r4, #-8]
	str	r3, [r4, #-4]
.L6:
	cmp	r1, r0
	bne	.L7
.L5:
	mov	r0, r7
	bl	spin_unlock_bh
	ldm	r8, {r0, r7}
	mov	r1, #4
	add	r2, sp, #12
	bl	pci_alloc_consistent
	cmp	r0, #0
	str	r0, [sp, #16]
	beq	.L24
	mov	ip, #4
	mov	r4, #0
	str	ip, [sp, #8]
	add	ip, sp, #8
	strb	r4, [r0]
	strb	r4, [r0, #1]
	strb	r4, [r0, #2]
	strb	r4, [r0, #3]
	mov	r1, r7
	mov	r3, r9
	mov	r2, r5
	mov	r0, r8
	str	ip, [sp]
	bl	mgmt_invalidate_icds
	subs	r1, r0, #0
	beq	.L25
	mov	r2, r4
	ldr	r3, [sp, #16]
	mov	r0, r8
	bl	beiscsi_mccq_compl
	ldr	r0, [r8]
	ldr	r3, [sp, #12]
	ldr	r2, [sp, #16]
	ldr	r1, [sp, #8]
	bl	pci_free_consistent
	mov	r0, r6
	bl	iscsi_eh_device_reset
	b	.L1
.L25:
	ldr	r3, .L26+20
	ldr	r2, .L26+24
	ldr	r1, [r3]
	ldr	r2, [r2]
	ldr	r3, .L26+28
	mov	r0, r8
	bl	beiscsi_log
	ldr	r3, [sp, #12]
	ldr	r0, [r8]
	ldr	r2, [sp, #16]
	ldr	r1, [sp, #8]
	bl	pci_free_consistent
	ldr	r3, .L26+8
	ldr	r0, [r3]
	b	.L1
.L24:
	ldr	r3, .L26+32
	ldr	r2, .L26+24
	ldr	r1, [r3]
	mov	r0, r8
	ldr	r3, .L26+36
	ldr	r2, [r2]
	bl	beiscsi_log
	ldr	r3, .L26+8
	ldr	r0, [r3]
	b	.L1
.L23:
	bl	__stack_chk_fail
.L27:
	.align	2
.L26:
	.word	.LC2
	.word	ISCSI_STATE_LOGGED_IN
	.word	FAILED
	.word	BE2_CMDS_PER_CXN
	.word	ISCSI_TASK_FREE
	.word	KERN_WARNING
	.word	BEISCSI_LOG_EH
	.word	.LC1
	.word	KERN_ERR
	.word	.LC0
	.size	beiscsi_eh_device_reset, .-beiscsi_eh_device_reset
	.comm	KERN_WARNING,4,4
	.comm	KERN_ERR,4,4
	.comm	ISCSI_TASK_FREE,4,4
	.comm	ISCSI_STATE_LOGGED_IN,4,4
	.comm	FAILED,4,4
	.comm	BEISCSI_LOG_EH,4,4
	.comm	BE2_CMDS_PER_CXN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
