	.file	"extr_ctl.c_ctl_queue_sense.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"ctl_queue_sense\n"
	.text
	.p2align 4
	.globl	ctl_queue_sense
	.type	ctl_queue_sense, @function
ctl_queue_sense:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	CTL_SOFTC@PLT
	mov	rdi, rbp
	mov	r12, rax
	call	CTL_PORT@PLT
	lea	rdi, .LC0[rip]
	mov	r13, rax
	call	CTL_DEBUG_PRINT@PLT
	mov	esi, DWORD PTR 0[rbp]
	mov	rdi, r13
	call	ctl_lun_map_from_port@PLT
	mov	rdi, r12
	mov	rbx, rax
	call	mtx_lock@PLT
	cmp	QWORD PTR ctl_max_luns[rip], rbx
	jbe	.L2
	mov	rax, QWORD PTR 8[r12]
	mov	r13, QWORD PTR [rax+rbx*8]
	test	r13, r13
	je	.L2
	mov	rdi, r13
	call	mtx_lock@PLT
	mov	rdi, r12
	call	mtx_unlock@PLT
	mov	rdi, rbp
	call	ctl_get_initindex@PLT
	mov	rdi, QWORD PTR CTL_MAX_INIT_PER_PORT[rip]
	xor	edx, edx
	mov	rbx, rax
	div	rdi
	mov	r14, rax
	mov	rax, QWORD PTR 8[r13]
	lea	r12, [rax+r14*8]
	mov	rcx, QWORD PTR [r12]
	test	rcx, rcx
	je	.L12
.L5:
	mov	rax, rbx
	xor	edx, edx
	xor	esi, esi
	div	rdi
	lea	r12, [rcx+rdx*4]
	mov	edx, 4
	mov	rdi, r12
	call	memset@PLT
	mov	edx, DWORD PTR 0[rbp]
	lea	rsi, 4[rbp]
	mov	rdi, r12
	call	memcpy@PLT
.L6:
	mov	rdi, r13
	call	mtx_unlock@PLT
.L4:
	mov	rdi, rbp
	call	ctl_free_io@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, DWORD PTR CTL_RETVAL_COMPLETE[rip]
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	esi, DWORD PTR M_CTL[rip]
	mov	edx, DWORD PTR M_NOWAIT[rip]
	sal	edi, 2
	or	edx, DWORD PTR M_ZERO[rip]
	call	malloc@PLT
	mov	QWORD PTR [r12], rax
	mov	rax, QWORD PTR 8[r13]
	mov	rcx, QWORD PTR [rax+r14*8]
	test	rcx, rcx
	je	.L6
	mov	rdi, QWORD PTR CTL_MAX_INIT_PER_PORT[rip]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rdi, r12
	call	mtx_unlock@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	ctl_queue_sense, .-ctl_queue_sense
	.comm	ctl_max_luns,8,8
	.comm	M_ZERO,4,4
	.comm	M_NOWAIT,4,4
	.comm	M_CTL,4,4
	.comm	CTL_RETVAL_COMPLETE,4,4
	.comm	CTL_MAX_INIT_PER_PORT,8,8
	.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_ctl.c_ctl_queue_sense.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"ctl_queue_sense\012\000"
	.global	__aeabi_uidiv
	.global	__aeabi_uidivmod
	.text
	.align	2
	.global	ctl_queue_sense
	.syntax unified
	.arm
	.fpu softvfp
	.type	ctl_queue_sense, %function
ctl_queue_sense:
	@ 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	r4, r0
	bl	CTL_SOFTC
	mov	r5, r0
	mov	r0, r4
	bl	CTL_PORT
	mov	r6, r0
	ldr	r0, .L13
	bl	CTL_DEBUG_PRINT
	mov	r0, r6
	ldr	r1, [r4]
	bl	ctl_lun_map_from_port
	mov	r6, r0
	mov	r0, r5
	bl	mtx_lock
	ldr	r3, .L13+4
	ldr	r3, [r3]
	cmp	r3, r6
	bls	.L2
	ldr	r3, [r5, #4]
	ldr	r6, [r3, r6, lsl #2]
	cmp	r6, #0
	beq	.L2
	mov	r0, r6
	bl	mtx_lock
	mov	r0, r5
	bl	mtx_unlock
	mov	r0, r4
	bl	ctl_get_initindex
	ldr	r10, .L13+8
	mov	r9, r0
	ldr	r7, [r10]
	mov	r1, r7
	bl	__aeabi_uidiv
	ldr	fp, [r6, #4]
	mov	r5, r0
	ldr	r8, [fp, r0, lsl #2]
	cmp	r8, #0
	beq	.L12
.L5:
	mov	r1, r7
	mov	r0, r9
	bl	__aeabi_uidivmod
	mov	r2, r1
	mov	r3, #0
	mov	r1, r4
	add	r0, r8, r2, lsl #2
	strb	r3, [r8, r2, lsl #2]
	strb	r3, [r0, #1]
	strb	r3, [r0, #2]
	strb	r3, [r0, #3]
	ldr	r2, [r1], #4
	bl	memcpy
.L6:
	mov	r0, r6
	bl	mtx_unlock
.L4:
	mov	r0, r4
	bl	ctl_free_io
	ldr	r3, .L13+12
	ldr	r0, [r3]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L12:
	ldr	r2, .L13+16
	ldr	r3, .L13+20
	ldr	r1, [r2]
	ldr	r2, [r3]
	ldr	r3, .L13+24
	orr	r2, r1, r2
	lsl	r0, r7, #2
	ldr	r1, [r3]
	bl	malloc
	ldr	r3, [r6, #4]
	str	r0, [fp, r5, lsl #2]
	ldr	r8, [r3, r5, lsl #2]
	cmp	r8, #0
	beq	.L6
	ldr	r7, [r10]
	b	.L5
.L2:
	mov	r0, r5
	bl	mtx_unlock
	b	.L4
.L14:
	.align	2
.L13:
	.word	.LC0
	.word	ctl_max_luns
	.word	CTL_MAX_INIT_PER_PORT
	.word	CTL_RETVAL_COMPLETE
	.word	M_NOWAIT
	.word	M_ZERO
	.word	M_CTL
	.size	ctl_queue_sense, .-ctl_queue_sense
	.comm	ctl_max_luns,4,4
	.comm	M_ZERO,4,4
	.comm	M_NOWAIT,4,4
	.comm	M_CTL,4,4
	.comm	CTL_RETVAL_COMPLETE,4,4
	.comm	CTL_MAX_INIT_PER_PORT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
