	.file	"extr_mpt2sas_base.c__base_wait_on_iocstate.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	_base_wait_on_iocstate, @function
_base_wait_on_iocstate:
.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
	mov	r14d, esi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, ecx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	cmp	DWORD PTR CAN_SLEEP[rip], ecx
	je	.L16
	imul	edx, edx, 2000
.L4:
	lea	r15d, -1[rdx]
	xor	ebx, ebx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L7:
	mov	edi, 500
	call	udelay@PLT
	lea	rax, 1[rbx]
	cmp	r15, rbx
	je	.L1
.L10:
	mov	rbx, rax
.L3:
	mov	esi, 1
	mov	rdi, r13
	call	mpt2sas_base_get_iocstate@PLT
	mov	r12d, eax
	cmp	eax, r14d
	je	.L9
	test	rbx, rbx
	je	.L6
	cmp	DWORD PTR MPI2_IOC_STATE_FAULT[rip], eax
	je	.L1
.L6:
	cmp	DWORD PTR CAN_SLEEP[rip], ebp
	jne	.L7
	mov	edi, 1
	call	msleep@PLT
	lea	rax, 1[rbx]
	cmp	r15, rbx
	jne	.L10
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L9:
	.cfi_restore_state
	xor	r12d, r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L16:
	imul	edx, edx, 1000
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	_base_wait_on_iocstate, .-_base_wait_on_iocstate
	.comm	MPI2_IOC_STATE_FAULT,4,4
	.comm	CAN_SLEEP,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_mpt2sas_base.c__base_wait_on_iocstate.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	_base_wait_on_iocstate, %function
_base_wait_on_iocstate:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r7, r3
	ldr	r10, .L13
	rsb	r6, r2, r2, lsl #5
	ldr	r3, [r10]
	add	r6, r2, r6, lsl #2
	cmp	r3, r7
	lslne	r6, r6, #4
	lsleq	r6, r6, #3
	mov	r8, r0
	mov	r9, r1
	mov	r5, r6
	ldr	fp, .L13+4
	b	.L3
.L7:
	mov	r0, #500
	bl	udelay
	subs	r5, r5, #1
	beq	.L1
.L3:
	mov	r1, #1
	mov	r0, r8
	bl	mpt2sas_base_get_iocstate
	cmp	r0, r9
	mov	r4, r0
	beq	.L9
	cmp	r5, r6
	beq	.L6
	ldr	r3, [fp]
	cmp	r3, r0
	beq	.L1
.L6:
	ldr	r3, [r10]
	cmp	r3, r7
	bne	.L7
	mov	r0, #1
	bl	msleep
	subs	r5, r5, #1
	bne	.L3
.L1:
	mov	r0, r4
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L9:
	mov	r4, #0
	mov	r0, r4
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L14:
	.align	2
.L13:
	.word	CAN_SLEEP
	.word	MPI2_IOC_STATE_FAULT
	.size	_base_wait_on_iocstate, .-_base_wait_on_iocstate
	.comm	MPI2_IOC_STATE_FAULT,4,4
	.comm	CAN_SLEEP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
