	.file	"extr_aic79xx_core.c_ahd_queue_scb.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Attempt to queue invalid SCB tag %x\n"
	.text
	.p2align 4
	.globl	ahd_queue_scb
	.type	ahd_queue_scb, @function
ahd_queue_scb:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	ahd_swap_with_next_hscb@PLT
	mov	rdi, r12
	call	SCB_GET_TAG@PLT
	mov	edi, eax
	call	SCBID_IS_NULL@PLT
	test	rax, rax
	jne	.L10
.L2:
	mov	edi, DWORD PTR 0[rbp]
	mov	rbx, QWORD PTR 8[rbp]
	call	AHD_QIN_WRAP@PLT
	mov	rdi, r12
	lea	rbx, [rbx+rax*4]
	call	SCB_GET_TAG@PLT
	mov	rsi, r12
	mov	rdi, rbp
	mov	DWORD PTR [rbx], eax
	add	DWORD PTR 0[rbp], 1
	cmp	QWORD PTR [r12], 0
	je	.L3
	call	ahd_setup_data_scb@PLT
.L4:
	mov	rsi, r12
	mov	rdi, rbp
	call	ahd_setup_scb_common@PLT
	mov	rsi, r12
	mov	rdi, rbp
	mov	edx, DWORD PTR BUS_DMASYNC_PREREAD[rip]
	or	edx, DWORD PTR BUS_DMASYNC_PREWRITE[rip]
	call	ahd_sync_scb@PLT
	mov	esi, DWORD PTR 0[rbp]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	ahd_set_hnscb_qoff@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	call	ahd_setup_noxfer_scb@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rdi, r12
	call	SCB_GET_TAG@PLT
	lea	rdi, .LC0[rip]
	mov	esi, eax
	call	panic@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	ahd_queue_scb, .-ahd_queue_scb
	.comm	ahd_debug,4,4
	.comm	BUS_DMASYNC_PREWRITE,4,4
	.comm	BUS_DMASYNC_PREREAD,4,4
	.comm	AHD_SHOW_QUEUE,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_aic79xx_core.c_ahd_queue_scb.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Attempt to queue invalid SCB tag %x\012\000"
	.text
	.align	2
	.global	ahd_queue_scb
	.syntax unified
	.arm
	.fpu softvfp
	.type	ahd_queue_scb, %function
ahd_queue_scb:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r1
	mov	r4, r0
	bl	ahd_swap_with_next_hscb
	mov	r0, r5
	bl	SCB_GET_TAG
	bl	SCBID_IS_NULL
	cmp	r0, #0
	bne	.L10
.L2:
	ldm	r4, {r0, r7}
	bl	AHD_QIN_WRAP
	mov	r6, r0
	mov	r0, r5
	bl	SCB_GET_TAG
	str	r0, [r7, r6, lsl #2]
	ldr	r3, [r4]
	ldr	r2, [r5]
	add	r3, r3, #1
	cmp	r2, #0
	mov	r1, r5
	mov	r0, r4
	str	r3, [r4]
	beq	.L3
	bl	ahd_setup_data_scb
.L4:
	mov	r1, r5
	mov	r0, r4
	bl	ahd_setup_scb_common
	ldr	r2, .L11
	ldr	r3, .L11+4
	ldr	r2, [r2]
	ldr	r3, [r3]
	mov	r1, r5
	mov	r0, r4
	orr	r2, r2, r3
	bl	ahd_sync_scb
	mov	r0, r4
	ldr	r1, [r4]
	pop	{r4, r5, r6, r7, r8, lr}
	b	ahd_set_hnscb_qoff
.L3:
	bl	ahd_setup_noxfer_scb
	b	.L4
.L10:
	mov	r0, r5
	bl	SCB_GET_TAG
	mov	r1, r0
	ldr	r0, .L11+8
	bl	panic
	b	.L2
.L12:
	.align	2
.L11:
	.word	BUS_DMASYNC_PREREAD
	.word	BUS_DMASYNC_PREWRITE
	.word	.LC0
	.size	ahd_queue_scb, .-ahd_queue_scb
	.comm	ahd_debug,4,4
	.comm	BUS_DMASYNC_PREWRITE,4,4
	.comm	BUS_DMASYNC_PREREAD,4,4
	.comm	AHD_SHOW_QUEUE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
