	.file	"extr_be_cmds.c_beiscsi_mccq_compl_wait.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"BC_%d : invalid tag %u\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"BC_%d : MBX Cmd Completion timed out\n"
	.text
	.p2align 4
	.globl	beiscsi_mccq_compl_wait
	.type	beiscsi_mccq_compl_wait, @function
beiscsi_mccq_compl_wait:
.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
	mov	r12d, esi
	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, 8
	.cfi_def_cfa_offset 64
	test	esi, esi
	je	.L2
	cmp	DWORD PTR MAX_MCC_CMD[rip], esi
	jnb	.L3
.L2:
	mov	esi, DWORD PTR KERN_ERR[rip]
	mov	ecx, r12d
	lea	rdx, .LC0[rip]
	mov	rdi, rbp
	call	__beiscsi_log@PLT
	mov	r13d, DWORD PTR EINVAL[rip]
	neg	r13d
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	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	r14, rdx
	mov	r13, rcx
	mov	ebx, r12d
	call	beiscsi_hba_in_error@PLT
	test	rax, rax
	jne	.L14
	mov	edi, DWORD PTR BEISCSI_HOST_MBX_TIMEOUT[rip]
	call	msecs_to_jiffies@PLT
	mov	edx, eax
	mov	rax, QWORD PTR 8[rbp]
	mov	esi, DWORD PTR [rax+rbx*4]
	mov	rax, QWORD PTR 16[rbp]
	mov	edi, DWORD PTR [rax+rbx*4]
	call	wait_event_interruptible_timeout@PLT
	mov	edi, DWORD PTR BEISCSI_HBA_ONLINE[rip]
	lea	rsi, 24[rbp]
	mov	r15d, eax
	call	test_bit@PLT
	test	eax, eax
	je	.L14
	test	r15d, r15d
	jle	.L16
	mov	rcx, r13
	mov	esi, r12d
	mov	rdi, rbp
	mov	rdx, r14
	call	__beiscsi_mcc_compl_status@PLT
	mov	esi, r12d
	mov	rdi, rbp
	mov	r13d, eax
	call	free_mcc_wrb@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rax, QWORD PTR 0[rbp]
	lea	rbx, [rbx+rbx*2]
	sal	rbx, 3
	add	rax, rbx
	test	r13, r13
	je	.L8
	mov	rdx, QWORD PTR 0[r13]
	mov	QWORD PTR 8[rax], rdx
	mov	edx, DWORD PTR 12[r13]
	mov	DWORD PTR 20[rax], edx
	mov	edx, DWORD PTR 8[r13]
	mov	DWORD PTR 16[rax], edx
.L9:
	xor	eax, eax
	call	wmb@PLT
	mov	edi, DWORD PTR MCC_TAG_STATE_TIMEOUT[rip]
	add	rbx, QWORD PTR 0[rbp]
	mov	rsi, rbx
	call	set_bit@PLT
	mov	esi, DWORD PTR KERN_ERR[rip]
	mov	edx, DWORD PTR BEISCSI_LOG_INIT[rip]
	mov	rdi, rbp
	or	edx, DWORD PTR BEISCSI_LOG_EH[rip]
	lea	rcx, .LC1[rip]
	or	edx, DWORD PTR BEISCSI_LOG_CONFIG[rip]
	call	beiscsi_log@PLT
	mov	r13d, DWORD PTR EBUSY[rip]
	neg	r13d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rax, QWORD PTR 0[rbp]
	lea	rdx, [rbx+rbx*2]
	mov	edi, DWORD PTR MCC_TAG_STATE_RUNNING[rip]
	lea	rsi, [rax+rdx*8]
	call	clear_bit@PLT
	mov	r13d, DWORD PTR EIO[rip]
	neg	r13d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L8:
	mov	QWORD PTR 8[rax], 0
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	beiscsi_mccq_compl_wait, .-beiscsi_mccq_compl_wait
	.comm	MCC_TAG_STATE_TIMEOUT,4,4
	.comm	MCC_TAG_STATE_RUNNING,4,4
	.comm	MAX_MCC_CMD,4,4
	.comm	KERN_ERR,4,4
	.comm	EIO,4,4
	.comm	EINVAL,4,4
	.comm	EBUSY,4,4
	.comm	BEISCSI_LOG_INIT,4,4
	.comm	BEISCSI_LOG_EH,4,4
	.comm	BEISCSI_LOG_CONFIG,4,4
	.comm	BEISCSI_HOST_MBX_TIMEOUT,4,4
	.comm	BEISCSI_HBA_ONLINE,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_cmds.c_beiscsi_mccq_compl_wait.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"BC_%d : invalid tag %u\012\000"
	.align	2
.LC1:
	.ascii	"BC_%d : MBX Cmd Completion timed out\012\000"
	.text
	.align	2
	.global	beiscsi_mccq_compl_wait
	.syntax unified
	.arm
	.fpu softvfp
	.type	beiscsi_mccq_compl_wait, %function
beiscsi_mccq_compl_wait:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	subs	r4, r1, #0
	mov	r5, r0
	beq	.L2
	mov	r6, r3
	ldr	r3, .L17
	ldr	r3, [r3]
	cmp	r3, r4
	bcs	.L3
.L2:
	ldr	r2, .L17+4
	mov	r3, r4
	ldr	r1, [r2]
	mov	r0, r5
	ldr	r2, .L17+8
	bl	__beiscsi_log
	ldr	r3, .L17+12
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L3:
	mov	r7, r2
	bl	beiscsi_hba_in_error
	cmp	r0, #0
	bne	.L14
	ldr	r3, .L17+16
	ldr	r1, [r5, #8]
	ldr	r2, [r5, #4]
	ldr	r0, [r3]
	ldr	r8, [r1, r4, lsl #2]
	ldr	r9, [r2, r4, lsl #2]
	bl	msecs_to_jiffies
	mov	r1, r9
	mov	r2, r0
	mov	r0, r8
	bl	wait_event_interruptible_timeout
	ldr	r2, .L17+20
	mov	r8, r0
	add	r1, r5, #12
	ldr	r0, [r2]
	bl	test_bit
	cmp	r0, #0
	beq	.L14
	cmp	r8, #0
	ble	.L16
	mov	r3, r6
	mov	r2, r7
	mov	r1, r4
	mov	r0, r5
	bl	__beiscsi_mcc_compl_status
	mov	r3, r0
	mov	r1, r4
	mov	r4, r3
	mov	r0, r5
	bl	free_mcc_wrb
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L16:
	cmp	r6, #0
	ldr	r3, [r5]
	ldrne	r1, [r6, #8]
	ldrne	r2, [r6, #4]
	ldrne	r0, [r6]
	add	r3, r3, r4, lsl #4
	strne	r1, [r3, #12]
	strne	r2, [r3, #8]
	strne	r0, [r3, #4]
	streq	r6, [r3, #4]
	bl	wmb
	ldr	r3, .L17+24
	ldr	r1, [r5]
	lsl	r4, r4, #4
	add	r1, r1, r4
	ldr	r0, [r3]
	bl	set_bit
	ldr	r1, .L17+28
	ldr	r3, .L17+32
	ldr	r2, .L17+36
	ldr	r0, [r1]
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r1, .L17+4
	orr	r3, r3, r0
	orr	r2, r3, r2
	mov	r0, r5
	ldr	r3, .L17+40
	ldr	r1, [r1]
	bl	beiscsi_log
	ldr	r3, .L17+44
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L14:
	ldr	r1, [r5]
	ldr	r3, .L17+48
	add	r1, r1, r4, lsl #4
	ldr	r0, [r3]
	bl	clear_bit
	ldr	r3, .L17+52
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L18:
	.align	2
.L17:
	.word	MAX_MCC_CMD
	.word	KERN_ERR
	.word	.LC0
	.word	EINVAL
	.word	BEISCSI_HOST_MBX_TIMEOUT
	.word	BEISCSI_HBA_ONLINE
	.word	MCC_TAG_STATE_TIMEOUT
	.word	BEISCSI_LOG_EH
	.word	BEISCSI_LOG_INIT
	.word	BEISCSI_LOG_CONFIG
	.word	.LC1
	.word	EBUSY
	.word	MCC_TAG_STATE_RUNNING
	.word	EIO
	.size	beiscsi_mccq_compl_wait, .-beiscsi_mccq_compl_wait
	.comm	MCC_TAG_STATE_TIMEOUT,4,4
	.comm	MCC_TAG_STATE_RUNNING,4,4
	.comm	MAX_MCC_CMD,4,4
	.comm	KERN_ERR,4,4
	.comm	EIO,4,4
	.comm	EINVAL,4,4
	.comm	EBUSY,4,4
	.comm	BEISCSI_LOG_INIT,4,4
	.comm	BEISCSI_LOG_EH,4,4
	.comm	BEISCSI_LOG_CONFIG,4,4
	.comm	BEISCSI_HOST_MBX_TIMEOUT,4,4
	.comm	BEISCSI_HBA_ONLINE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
