	.file	"extr_visorhba_main.c_add_scsipending_entry.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	add_scsipending_entry, @function
add_scsipending_entry:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	lea	r13, 4[rdi]
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	rdi, r13
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	DWORD PTR 4[rsp], esi
	xor	esi, esi
	call	spin_lock_irqsave@PLT
	mov	esi, DWORD PTR [r15]
	mov	rdi, QWORD PTR 8[r15]
	mov	ecx, DWORD PTR MAX_PENDING_REQUESTS[rip]
	mov	r12d, esi
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	mov	eax, r14d
	cdq
	idiv	ecx
	mov	r12d, edx
	cmp	esi, edx
	je	.L10
.L2:
	movsx	rbx, r12d
	lea	r14d, 1[r12]
	sal	rbx, 4
	add	rbx, rdi
	cmp	QWORD PTR 8[rbx], 0
	jne	.L4
	lea	rcx, 4[rbx]
	xor	esi, esi
	mov	edx, 4
	mov	rdi, rcx
	mov	QWORD PTR 8[rsp], rcx
	call	memset@PLT
	movzx	eax, BYTE PTR 4[rsp]
	test	rbp, rbp
	mov	rdi, r13
	mov	rcx, QWORD PTR 8[rsp]
	mov	BYTE PTR [rbx], al
	mov	eax, r14d
	cmove	rbp, rcx
	cdq
	xor	esi, esi
	idiv	DWORD PTR MAX_PENDING_REQUESTS[rip]
	mov	QWORD PTR 8[rbx], rbp
	mov	DWORD PTR [r15], edx
	call	spin_unlock_irqrestore@PLT
.L1:
	add	rsp, 24
	.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
.L10:
	.cfi_restore_state
	xor	esi, esi
	mov	rdi, r13
	call	spin_unlock_irqrestore@PLT
	mov	r12d, DWORD PTR EBUSY[rip]
	neg	r12d
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	add_scsipending_entry, .-add_scsipending_entry
	.comm	MAX_PENDING_REQUESTS,4,4
	.comm	EBUSY,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_visorhba_main.c_add_scsipending_entry.c"
	.text
	.global	__aeabi_idivmod
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	add_scsipending_entry, %function
add_scsipending_entry:
	@ 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, r0
	add	r10, r0, #4
	mov	r9, r1
	mov	r0, r10
	mov	r1, #0
	mov	r8, r2
	bl	spin_lock_irqsave
	ldr	r5, [r7]
	ldr	r3, .L11
	mov	r4, r5
	ldr	r6, [r7, #8]
	ldr	fp, [r3]
	b	.L2
.L4:
	mov	r1, fp
	bl	__aeabi_idivmod
	cmp	r5, r1
	mov	r4, r1
	beq	.L10
.L2:
	add	r3, r4, r4, lsl #1
	add	r3, r6, r3, lsl #2
	ldr	r2, [r3, #8]
	add	r0, r4, #1
	cmp	r2, #0
	bne	.L4
	add	ip, r3, #4
	cmp	r8, #0
	moveq	r8, ip
	strb	r2, [r3, #4]
	strb	r2, [r3, #5]
	strb	r2, [r3, #6]
	strb	r2, [r3, #7]
	str	r8, [r3, #8]
	strb	r9, [r3]
	mov	r1, fp
	bl	__aeabi_idivmod
	mov	r0, r10
	str	r1, [r7]
	mov	r1, #0
	bl	spin_unlock_irqrestore
	mov	r0, r4
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L10:
	mov	r0, r10
	mov	r1, #0
	bl	spin_unlock_irqrestore
	ldr	r3, .L11+4
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L12:
	.align	2
.L11:
	.word	MAX_PENDING_REQUESTS
	.word	EBUSY
	.size	add_scsipending_entry, .-add_scsipending_entry
	.comm	MAX_PENDING_REQUESTS,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
