	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a6xx_hfi_queue_read
_a6xx_hfi_queue_read:                   ## @a6xx_hfi_queue_read
	.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	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %r13
	movq	(%r13), %rbx
	cmpq	8(%r13), %rbx
	jne	LBB0_1
## %bb.8:
	movl	$1, 16(%r13)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdx, %r14
	movq	%rdi, %r12
	movq	(%rdi), %rax
	movq	(%rax,%rbx,8), %r15
	movq	%r15, %rdi
	callq	_HFI_HEADER_SIZE
	cltq
	xorl	%edi, %edi
	cmpq	%r14, %rax
	seta	%dil
	callq	_BUG_ON
	movq	%r15, %rdi
	callq	_HFI_HEADER_SIZE
	testl	%eax, %eax
	je	LBB0_7
## %bb.2:
	xorl	%r14d, %r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%rcx
	movq	%rdx, %rbx
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r14
	movq	%r15, %rdi
	callq	_HFI_HEADER_SIZE
	cltq
	cmpq	%rax, %r14
	jae	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx,%r14,8)
	incq	%rbx
	movq	24(%r13), %rcx
	movq	%rbx, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%edx, %ebx
	jmp	LBB0_6
LBB0_7:
	movq	%rbx, (%r13)
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_HFI_HEADER_SIZE                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_a6xx_hfi_queue_read
.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_read
_a6xx_hfi_queue_read:                   ; @a6xx_hfi_queue_read
	.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
	ldr	x23, [x0, #8]
	ldp	x24, x8, [x23]
	cmp	x24, x8
	b.ne	LBB0_2
; %bb.1:
	mov	w8, #1
	str	w8, [x23, #16]
	mov	w0, #0
	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
LBB0_2:
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x21, [x8, x24, lsl #3]
	mov	x0, x21
	bl	_HFI_HEADER_SIZE
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	cmp	x8, x22
	cset	w0, hi
	bl	_BUG_ON
	mov	x0, x21
	bl	_HFI_HEADER_SIZE
	cbz	w0, LBB0_5
; %bb.3:
	mov	x22, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	x8, [x8, x24, lsl #3]
	str	x8, [x19, x22, lsl #3]
	add	x8, x24, #1
	ldr	x9, [x23, #24]
	udiv	x10, x8, x9
	msub	x24, x10, x9, x8
	add	x22, x22, #1
	mov	x0, x21
	bl	_HFI_HEADER_SIZE
	cmp	x22, w0, sxtw
	b.lo	LBB0_4
LBB0_5:
	str	x24, [x23]
	mov	x0, x21
	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
	b	_HFI_HEADER_SIZE
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_a6xx_hfi_queue_read
.subsections_via_symbols
