	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a6xx_hfi_queue_write
_a6xx_hfi_queue_write:                  ## @a6xx_hfi_queue_write
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	16(%rsi), %r14
	movq	(%r14), %rbx
	movq	%rsi, %rdi
	callq	_spin_lock
	movl	20(%r14), %esi
	movq	(%r14), %rdi
	movq	8(%r14), %rdx
	callq	_CIRC_SPACE
	cmpq	%r12, %rax
	jge	LBB0_1
## %bb.5:
	incl	16(%r14)
	movq	%r15, %rdi
	callq	_spin_unlock
	movq	_ENOSPC@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_19
LBB0_1:
	testq	%r12, %r12
	jle	LBB0_2
## %bb.3:
	movq	8(%r15), %rcx
	cmpq	$1, %r12
	jne	LBB0_6
## %bb.4:
	xorl	%esi, %esi
LBB0_14:
	testb	$1, %r12b
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_18
## %bb.15:
	movq	(%r13,%rsi,8), %rax
	movq	%rax, (%rcx,%rbx,8)
	incq	%rbx
	movq	8(%r14), %rcx
	movq	%rbx, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_16
## %bb.17:
	movq	%rbx, %rax
	cqto
	idivq	%rcx
	movq	%rdx, %rbx
	jmp	LBB0_18
LBB0_2:
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_18
LBB0_6:
	movq	%r12, %r8
	andq	$-2, %r8
	xorl	%esi, %esi
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	cqto
	idivq	%rdi
	movq	%rdx, %rbx
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	addq	$2, %rsi
	cmpq	%rsi, %r8
	je	LBB0_14
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13,%rsi,8), %rax
	movq	%rax, (%rcx,%rbx,8)
	incq	%rbx
	movq	8(%r14), %rdi
	movq	%rbx, %rax
	orq	%rdi, %rax
	shrq	$32, %rax
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%rbx, %rax
	cqto
	idivq	%rdi
	movq	%rdx, %rax
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_7 Depth=1
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%edi
	movl	%edx, %eax
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%r13,%rsi,8), %rdx
	movq	%rdx, (%rcx,%rax,8)
	incq	%rax
	movq	8(%r14), %rdi
	movq	%rax, %rdx
	orq	%rdi, %rdx
	shrq	$32, %rdx
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%edi
	movl	%edx, %ebx
	jmp	LBB0_13
LBB0_16:
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%edx, %ebx
LBB0_18:
	movq	%rbx, (%r14)
	movq	%r15, %rdi
	callq	_spin_unlock
	movq	_REG_A6XX_GMU_HOST2GMU_INTR_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_gmu_write
	xorl	%eax, %eax
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_REG_A6XX_GMU_HOST2GMU_INTR_SET,4,2 ## @REG_A6XX_GMU_HOST2GMU_INTR_SET
	.no_dead_strip	_a6xx_hfi_queue_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a6xx_hfi_queue_write
_a6xx_hfi_queue_write:                  ; @a6xx_hfi_queue_write
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x3
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x23, [x1, #16]
	ldr	x24, [x23]
	mov	x0, x1
	bl	_spin_lock
	ldr	w1, [x23, #20]
	ldp	x0, x2, [x23]
	bl	_CIRC_SPACE
	cmp	x0, x21
	b.ge	LBB0_2
; %bb.1:
	ldr	w8, [x23, #16]
	add	w8, w8, #1
	str	w8, [x23, #16]
	mov	x0, x20
	bl	_spin_unlock
Lloh0:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_2:
	cmp	x21, #1
	b.lt	LBB0_5
; %bb.3:
	ldr	x8, [x20, #8]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x22], #8
	str	x9, [x8, x24, lsl #3]
	add	x9, x24, #1
	ldr	x10, [x23, #8]
	sdiv	x11, x9, x10
	msub	x24, x11, x10, x9
	subs	x21, x21, #1
	b.ne	LBB0_4
LBB0_5:
	str	x24, [x23]
	mov	x0, x20
	bl	_spin_unlock
Lloh3:
	adrp	x8, _REG_A6XX_GMU_HOST2GMU_INTR_SET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_A6XX_GMU_HOST2GMU_INTR_SET@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_gmu_write
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_REG_A6XX_GMU_HOST2GMU_INTR_SET,4,2 ; @REG_A6XX_GMU_HOST2GMU_INTR_SET
	.no_dead_strip	_a6xx_hfi_queue_write
.subsections_via_symbols
