	.file	"extr_ql4_nx.c_qla4_82xx_idc_lock.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	qla4_82xx_idc_lock
	.type	qla4_82xx_idc_lock, @function
qla4_82xx_idc_lock:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	xor	r12d, r12d
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L17:
	call	schedule@PLT
	test	ebp, ebp
	jne	.L2
.L6:
	mov	edi, DWORD PTR PCIE_SEM5_LOCK[rip]
	call	QLA82XX_PCIE_REG@PLT
	mov	rdi, r13
	mov	esi, eax
	call	qla4_82xx_rd_32@PLT
	mov	ebp, eax
	cmp	eax, 1
	je	.L2
	cmp	DWORD PTR IDC_LOCK_TIMEOUT[rip], r12d
	jle	.L7
	xor	eax, eax
	add	r12d, 1
	call	in_interrupt@PLT
	test	eax, eax
	je	.L17
	mov	ebx, 20
	.p2align 4,,10
	.p2align 3
.L4:
	xor	eax, eax
	call	cpu_relax@PLT
	sub	ebx, 1
	jne	.L4
	test	ebp, ebp
	je	.L6
.L2:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
.L7:
	.cfi_restore_state
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	eax, -1
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	qla4_82xx_idc_lock, .-qla4_82xx_idc_lock
	.comm	PCIE_SEM5_LOCK,4,4
	.comm	IDC_LOCK_TIMEOUT,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_ql4_nx.c_qla4_82xx_idc_lock.c"
	.text
	.align	2
	.global	qla4_82xx_idc_lock
	.syntax unified
	.arm
	.fpu softvfp
	.type	qla4_82xx_idc_lock, %function
qla4_82xx_idc_lock:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, #0
	mov	r7, r0
	ldr	r8, .L18
	ldr	r9, .L18+4
	b	.L6
.L17:
	bl	schedule
	cmp	r5, #0
	bne	.L2
.L6:
	ldr	r0, [r8]
	bl	QLA82XX_PCIE_REG
	mov	r1, r0
	mov	r0, r7
	bl	qla4_82xx_rd_32
	cmp	r0, #1
	mov	r5, r0
	beq	.L2
	ldr	r3, [r9]
	cmp	r3, r6
	ble	.L7
	bl	in_interrupt
	cmp	r0, #0
	add	r6, r6, #1
	beq	.L17
	mov	r4, #20
.L4:
	bl	cpu_relax
	subs	r4, r4, #1
	bne	.L4
	cmp	r5, #0
	beq	.L6
.L2:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L7:
	mvn	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L19:
	.align	2
.L18:
	.word	PCIE_SEM5_LOCK
	.word	IDC_LOCK_TIMEOUT
	.size	qla4_82xx_idc_lock, .-qla4_82xx_idc_lock
	.comm	PCIE_SEM5_LOCK,4,4
	.comm	IDC_LOCK_TIMEOUT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
