	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a6xx_get_indexed_registers
_a6xx_get_indexed_registers:            ## @a6xx_get_indexed_registers
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	_a6xx_indexed_reglist@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	movl	%eax, %ebx
	incl	%ebx
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	$8, %edx
	callq	_state_kcalloc
	movq	%rax, 8(%r13)
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_2
## %bb.3:
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_a6xx_indexed_reglist@GOTPCREL(%rip), %r12
	movq	(%r12), %rdx
	addq	%r15, %rdx
	movq	8(%r13), %rcx
	addq	%r14, %rcx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_a6xx_get_indexed_regs
	incq	%rbx
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cltq
	addq	$8, %r14
	addq	$4, %r15
	cmpq	%rax, %rbx
	jl	LBB0_4
	jmp	LBB0_5
LBB0_2:
	xorl	%ebx, %ebx
LBB0_5:
	movq	_REG_A6XX_CP_MEM_POOL_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_gpu_read
	movl	%eax, %r15d
	movl	(%r14), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_gpu_write
	leaq	(,%rbx,8), %rcx
	addq	8(%r13), %rcx
	movq	_a6xx_cp_mempool_indexed@GOTPCREL(%rip), %rdx
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_a6xx_get_indexed_regs
	movq	8(%r13), %rax
	movq	(%rax,%rbx,8), %rax
	movl	%r15d, 32768(%rax)
	movl	(%r14), %esi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_gpu_write
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r13)
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_a6xx_indexed_reglist,8,3       ## @a6xx_indexed_reglist
	.comm	_REG_A6XX_CP_MEM_POOL_SIZE,4,2  ## @REG_A6XX_CP_MEM_POOL_SIZE
	.comm	_a6xx_cp_mempool_indexed,4,2    ## @a6xx_cp_mempool_indexed
	.no_dead_strip	_a6xx_get_indexed_registers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a6xx_get_indexed_registers
_a6xx_get_indexed_registers:            ; @a6xx_get_indexed_registers
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _a6xx_indexed_reglist@GOTPAGE
Lloh1:
	ldr	x22, [x22, _a6xx_indexed_reglist@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	add	w21, w0, #1
	mov	x0, x19
	mov	x1, x21
	mov	w2, #8
	bl	_state_kcalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_6
; %bb.1:
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x24, #0
	mov	x25, #0
	mov	x23, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	add	x2, x8, x24
	ldr	x8, [x19, #8]
	add	x3, x8, x25
	mov	x0, x20
	mov	x1, x19
	bl	_a6xx_get_indexed_regs
	add	x23, x23, #1
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	add	x25, x25, #8
	add	x24, x24, #4
	cmp	x23, w0, sxtw
	b.lt	LBB0_3
	b	LBB0_5
LBB0_4:
	mov	x23, #0
LBB0_5:
Lloh2:
	adrp	x24, _REG_A6XX_CP_MEM_POOL_SIZE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _REG_A6XX_CP_MEM_POOL_SIZE@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x20
	bl	_gpu_read
	mov	x22, x0
	ldr	w1, [x24]
	mov	x0, x20
	mov	w2, #0
	bl	_gpu_write
	ldr	x8, [x19, #8]
	lsl	x23, x23, #3
	add	x3, x8, x23
Lloh4:
	adrp	x2, _a6xx_cp_mempool_indexed@GOTPAGE
Lloh5:
	ldr	x2, [x2, _a6xx_cp_mempool_indexed@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x19
	bl	_a6xx_get_indexed_regs
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x23]
	mov	w9, #32768
	str	w22, [x8, x9]
	ldr	w1, [x24]
	mov	x0, x20
	mov	x2, x22
	bl	_gpu_write
	str	w21, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_a6xx_indexed_reglist,8,3       ; @a6xx_indexed_reglist
	.comm	_REG_A6XX_CP_MEM_POOL_SIZE,4,2  ; @REG_A6XX_CP_MEM_POOL_SIZE
	.comm	_a6xx_cp_mempool_indexed,4,2    ; @a6xx_cp_mempool_indexed
	.no_dead_strip	_a6xx_get_indexed_registers
.subsections_via_symbols
