	.file	"extr_a6xx_hfi.c_a6xx_hfi_queue_write.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	a6xx_hfi_queue_write, @function
a6xx_hfi_queue_write:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rcx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	mov	rdi, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	r13, QWORD PTR 16[rsi]
	mov	rbp, QWORD PTR 0[r13]
	call	spin_lock@PLT
	mov	rdx, QWORD PTR 8[r13]
	mov	esi, DWORD PTR 20[r13]
	mov	rdi, QWORD PTR 0[r13]
	call	CIRC_SPACE@PLT
	cmp	rax, r15
	jl	.L2
	test	r15, r15
	jle	.L4
	mov	rdi, QWORD PTR 8[r14]
	mov	rsi, rbx
	lea	rcx, [rbx+r15*8]
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rax, QWORD PTR [rsi]
	add	rsi, 8
	mov	QWORD PTR [rdi+rbp*8], rax
	lea	rax, 1[rbp]
	cqo
	idiv	QWORD PTR 8[r13]
	mov	rbp, rdx
	cmp	rcx, rsi
	jne	.L6
.L4:
	mov	QWORD PTR 0[r13], rbp
	mov	rdi, r14
	call	spin_unlock@PLT
	mov	esi, DWORD PTR REG_A6XX_GMU_HOST2GMU_INTR_SET[rip]
	mov	rdi, r12
	mov	edx, 1
	call	gmu_write@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	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
.L2:
	.cfi_restore_state
	add	DWORD PTR 16[r13], 1
	mov	rdi, r14
	call	spin_unlock@PLT
	mov	eax, DWORD PTR ENOSPC[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	neg	eax
	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
	.cfi_endproc
.LFE0:
	.size	a6xx_hfi_queue_write, .-a6xx_hfi_queue_write
	.comm	REG_A6XX_GMU_HOST2GMU_INTR_SET,4,4
	.comm	ENOSPC,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_a6xx_hfi.c_a6xx_hfi_queue_write.c"
	.text
	.global	__aeabi_idivmod
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	a6xx_hfi_queue_write, %function
a6xx_hfi_queue_write:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r6, [r1, #8]
	mov	r8, r0
	mov	r0, r1
	mov	r9, r3
	mov	r7, r1
	mov	r5, r2
	ldr	r4, [r6]
	bl	spin_lock
	ldr	r2, [r6, #4]
	ldr	r1, [r6, #12]
	ldr	r0, [r6]
	bl	CIRC_SPACE
	cmp	r0, r9
	blt	.L2
	cmp	r9, #0
	ble	.L4
	sub	r5, r5, #4
	ldr	r10, [r7, #4]
	add	r9, r5, r9, lsl #2
.L6:
	ldr	r3, [r5, #4]!
	add	r0, r4, #1
	str	r3, [r10, r4, lsl #2]
	ldr	r1, [r6, #4]
	bl	__aeabi_idivmod
	cmp	r5, r9
	mov	r4, r1
	bne	.L6
.L4:
	mov	r0, r7
	str	r4, [r6]
	bl	spin_unlock
	ldr	r3, .L10
	mov	r0, r8
	mov	r2, #1
	ldr	r1, [r3]
	bl	gmu_write
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	ldr	r3, [r6, #8]
	mov	r0, r7
	add	r3, r3, #1
	str	r3, [r6, #8]
	bl	spin_unlock
	ldr	r3, .L10+4
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L11:
	.align	2
.L10:
	.word	REG_A6XX_GMU_HOST2GMU_INTR_SET
	.word	ENOSPC
	.size	a6xx_hfi_queue_write, .-a6xx_hfi_queue_write
	.comm	REG_A6XX_GMU_HOST2GMU_INTR_SET,4,4
	.comm	ENOSPC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
