	.file	"extr_aic7xxx_core.c_ahc_search_untagged_queues.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Inactive SCB in untaggedQ\n"
	.text
	.p2align 4
	.globl	ahc_search_untagged_queues
	.type	ahc_search_untagged_queues, @function
ahc_search_untagged_queues:
.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, ecx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, r8d
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edx
	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
	mov	rbx, rsi
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	cmp	DWORD PTR 112[rsp], 130
	mov	DWORD PTR 44[rsp], r9d
	je	.L38
	mov	eax, DWORD PTR AHC_SCB_BTT[rip]
	test	DWORD PTR [rdi], eax
	je	.L16
	mov	DWORD PTR 28[rsp], 0
.L1:
	mov	eax, DWORD PTR 28[rsp]
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L38:
	.cfi_restore_state
	mov	DWORD PTR 12[rsp], ecx
	call	ahc_freeze_untagged_queues@PLT
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR AHC_SCB_BTT[rip], eax
	mov	ecx, DWORD PTR 12[rsp]
	jne	.L17
.L16:
	cmp	DWORD PTR CAM_TARGET_WILDCARD[rip], r12d
	je	.L18
	lea	eax, 8[r12]
	cmp	cl, 66
	cmovne	eax, r12d
	lea	edx, 1[rax]
	mov	DWORD PTR 24[rsp], edx
	mov	DWORD PTR 40[rsp], edx
.L4:
	cdqe
	mov	DWORD PTR 28[rsp], 0
	sal	rax, 2
	mov	QWORD PTR 16[rsp], rax
	movsx	eax, r14b
	mov	DWORD PTR 12[rsp], eax
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rax, QWORD PTR 16[rsp]
	add	rax, QWORD PTR 8[rbp]
	mov	rdi, rax
	mov	QWORD PTR 32[rsp], rax
	call	TAILQ_FIRST@PLT
	mov	r15, rax
	.p2align 4,,10
	.p2align 3
.L36:
	test	r15, r15
	je	.L6
.L41:
	mov	esi, DWORD PTR links[rip]
	mov	rdi, r15
	mov	r14, r15
	call	TAILQ_NEXT@PLT
	mov	r15, rax
	mov	eax, DWORD PTR [r14]
	test	DWORD PTR SCB_ACTIVE[rip], eax
	jne	.L36
	mov	eax, DWORD PTR ROLE_INITIATOR[rip]
	sub	rsp, 8
	.cfi_def_cfa_offset 120
	mov	edx, r12d
	mov	r8d, r13d
	mov	r9d, DWORD PTR SCB_LIST_NULL[rip]
	mov	rsi, r14
	mov	rdi, rbp
	push	rax
	.cfi_def_cfa_offset 128
	mov	ecx, DWORD PTR 28[rsp]
	call	ahc_match_scb@PLT
	pop	rdx
	.cfi_def_cfa_offset 120
	pop	rcx
	.cfi_def_cfa_offset 112
	test	rax, rax
	je	.L36
	test	rbx, rbx
	je	.L8
	cmp	QWORD PTR 8[r14], rbx
	jne	.L36
.L8:
	add	DWORD PTR 28[rsp], 1
	cmp	DWORD PTR 112[rsp], 128
	je	.L9
	cmp	DWORD PTR 112[rsp], 130
	jne	.L36
	mov	rdi, r14
	call	ahc_get_transaction_status@PLT
	cmp	DWORD PTR CAM_REQ_INPROG[rip], eax
	je	.L39
.L10:
	mov	rdi, r14
	call	ahc_get_transaction_status@PLT
	cmp	DWORD PTR CAM_REQ_CMP[rip], eax
	je	.L11
	mov	rdi, r14
	call	ahc_freeze_scb@PLT
.L11:
	mov	eax, DWORD PTR [r14]
	test	DWORD PTR SCB_ACTIVE[rip], eax
	je	.L40
.L12:
	mov	rsi, r14
	mov	rdi, rbp
	call	ahc_done@PLT
	test	r15, r15
	jne	.L41
	.p2align 4,,10
	.p2align 3
.L6:
	mov	eax, DWORD PTR 24[rsp]
	mov	ecx, DWORD PTR 40[rsp]
	add	QWORD PTR 16[rsp], 4
	cmp	eax, ecx
	jge	.L34
	add	eax, 1
	mov	DWORD PTR 24[rsp], eax
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L9:
	mov	eax, DWORD PTR SCB_UNTAGGEDQ[rip]
	mov	edx, DWORD PTR links[rip]
	mov	rsi, r14
	mov	rdi, QWORD PTR 32[rsp]
	not	eax
	and	DWORD PTR [r14], eax
	call	TAILQ_REMOVE@PLT
	jmp	.L36
	.p2align 4,,10
	.p2align 3
.L40:
	lea	rdi, .LC0[rip]
	call	printk@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L39:
	mov	esi, DWORD PTR 44[rsp]
	mov	rdi, r14
	call	ahc_set_transaction_status@PLT
	jmp	.L10
.L34:
	cmp	DWORD PTR 112[rsp], 130
	jne	.L1
	mov	rdi, rbp
	call	ahc_release_untagged_queues@PLT
	jmp	.L1
.L17:
	mov	rdi, rbp
	mov	DWORD PTR 28[rsp], 0
	call	ahc_release_untagged_queues@PLT
	jmp	.L1
.L18:
	mov	DWORD PTR 40[rsp], 16
	xor	eax, eax
	mov	DWORD PTR 24[rsp], 1
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	ahc_search_untagged_queues, .-ahc_search_untagged_queues
	.comm	links,4,4
	.comm	SCB_UNTAGGEDQ,4,4
	.comm	SCB_LIST_NULL,4,4
	.comm	SCB_ACTIVE,4,4
	.comm	ROLE_INITIATOR,4,4
	.comm	CAM_TARGET_WILDCARD,4,4
	.comm	CAM_REQ_INPROG,4,4
	.comm	CAM_REQ_CMP,4,4
	.comm	AHC_SCB_BTT,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_aic7xxx_core.c_ahc_search_untagged_queues.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Inactive SCB in untaggedQ\012\000"
	.text
	.align	2
	.global	ahc_search_untagged_queues
	.syntax unified
	.arm
	.fpu softvfp
	.type	ahc_search_untagged_queues, %function
ahc_search_untagged_queues:
	@ args = 12, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #44
	str	r1, [sp, #24]
	ldr	r1, [sp, #88]
	mov	r10, r2
	cmp	r1, #130
	mov	r8, r0
	str	r3, [sp, #16]
	beq	.L37
	ldr	r2, .L41
	ldr	r3, [r0]
	ldr	r2, [r2]
	tst	r2, r3
	beq	.L16
	mov	r3, #0
	str	r3, [sp, #20]
.L1:
	ldr	r0, [sp, #20]
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L37:
	bl	ahc_freeze_untagged_queues
	ldr	r3, .L41
	ldr	r2, [r8]
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L17
.L16:
	ldr	r3, .L41+4
	ldr	r3, [r3]
	cmp	r3, r10
	beq	.L18
	ldr	r3, [sp, #16]
	cmp	r3, #66
	movne	r3, r10
	addeq	r3, r10, #8
	add	r2, r3, #1
	str	r2, [sp, #28]
	str	r2, [sp, #36]
.L4:
	mov	r2, #0
	ldr	fp, .L41+8
	ldr	r6, .L41+12
	ldr	r9, .L41+16
	ldr	r7, .L41+20
	str	r2, [sp, #20]
.L14:
	ldr	r2, [r8, #4]
	add	r3, r2, r3, lsl #2
	mov	r0, r3
	str	r3, [sp, #32]
	bl	TAILQ_FIRST
	subs	r4, r0, #0
	beq	.L6
.L13:
	mov	r0, r4
	ldr	r1, [fp]
	bl	TAILQ_NEXT
	ldr	r2, [r4]
	ldr	r3, [r6]
	mov	r5, r4
	tst	r2, r3
	mov	r4, r0
	bne	.L7
	ldr	r2, [r9]
	ldr	r3, [r7]
	ldr	r1, [sp, #80]
	str	r2, [sp, #8]
	str	r1, [sp]
	str	r3, [sp, #4]
	mov	r2, r10
	mov	r1, r5
	mov	r0, r8
	ldr	r3, [sp, #16]
	bl	ahc_match_scb
	cmp	r0, #0
	beq	.L7
	ldr	r2, [sp, #24]
	cmp	r2, #0
	beq	.L8
	ldr	r3, [r5, #4]
	cmp	r3, r2
	beq	.L8
.L7:
	cmp	r4, #0
	bne	.L13
.L6:
	ldr	r2, [sp, #28]
	ldr	r3, [sp, #36]
	cmp	r2, r3
	mov	r3, r2
	bge	.L34
	add	r2, r2, #1
	str	r2, [sp, #28]
	b	.L14
.L8:
	ldr	r3, [sp, #88]
	cmp	r3, #128
	ldr	r3, [sp, #20]
	add	r3, r3, #1
	str	r3, [sp, #20]
	beq	.L9
	ldr	r3, [sp, #88]
	cmp	r3, #130
	bne	.L7
	mov	r0, r5
	bl	ahc_get_transaction_status
	ldr	r3, .L41+24
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L38
.L10:
	mov	r0, r5
	bl	ahc_get_transaction_status
	ldr	r3, .L41+28
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L11
	mov	r0, r5
	bl	ahc_freeze_scb
.L11:
	ldr	r2, [r5]
	ldr	r3, [r6]
	tst	r2, r3
	beq	.L39
.L12:
	mov	r1, r5
	mov	r0, r8
	bl	ahc_done
	b	.L7
.L9:
	ldr	r3, .L41+32
	mov	r1, r5
	ldr	r2, [r3]
	ldr	r3, [r5]
	ldr	r0, [sp, #32]
	bic	r3, r3, r2
	str	r3, [r5]
	ldr	r2, [fp]
	bl	TAILQ_REMOVE
	b	.L7
.L39:
	ldr	r0, .L41+36
	bl	printk
	b	.L12
.L38:
	mov	r0, r5
	ldr	r1, [sp, #84]
	bl	ahc_set_transaction_status
	b	.L10
.L34:
	ldr	r3, [sp, #88]
	cmp	r3, #130
	bne	.L1
	mov	r0, r8
	bl	ahc_release_untagged_queues
.L40:
	ldr	r0, [sp, #20]
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L17:
	mov	r3, #0
	mov	r0, r8
	str	r3, [sp, #20]
	bl	ahc_release_untagged_queues
	b	.L40
.L18:
	mov	r3, #16
	mov	r2, #1
	str	r3, [sp, #36]
	str	r2, [sp, #28]
	mov	r3, #0
	b	.L4
.L42:
	.align	2
.L41:
	.word	AHC_SCB_BTT
	.word	CAM_TARGET_WILDCARD
	.word	links
	.word	SCB_ACTIVE
	.word	ROLE_INITIATOR
	.word	SCB_LIST_NULL
	.word	CAM_REQ_INPROG
	.word	CAM_REQ_CMP
	.word	SCB_UNTAGGEDQ
	.word	.LC0
	.size	ahc_search_untagged_queues, .-ahc_search_untagged_queues
	.comm	links,4,4
	.comm	SCB_UNTAGGEDQ,4,4
	.comm	SCB_LIST_NULL,4,4
	.comm	SCB_ACTIVE,4,4
	.comm	ROLE_INITIATOR,4,4
	.comm	CAM_TARGET_WILDCARD,4,4
	.comm	CAM_REQ_INPROG,4,4
	.comm	CAM_REQ_CMP,4,4
	.comm	AHC_SCB_BTT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
