	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a5xx_gpu_state_get_hlsq_regs
_a5xx_gpu_state_get_hlsq_regs:          ## @a5xx_gpu_state_get_hlsq_regs
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movq	$0, -64(%rbp)
	leaq	-80(%rbp), %rsi
	callq	_a5xx_crashdumper_init
	testq	%rax, %rax
	jne	LBB0_14
## %bb.1:
	movq	-80(%rbp), %r13
	movq	_SZ_1K@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	shll	$8, %r12d
	addl	-72(%rbp), %r12d
	movq	_a5xx_hlsq_aperture_regs@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	jle	LBB0_2
## %bb.3:
	xorl	%ebx, %ebx
	movq	%r14, %r15
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	addl	(%rdi,%rbx,8), %r14d
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_4
	jmp	LBB0_5
LBB0_2:
	xorl	%r14d, %r14d
LBB0_5:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	movl	$4, %esi
	callq	_kcalloc
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, (%rbx)
	testl	%eax, %eax
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_14
## %bb.6:
	movq	_a5xx_hlsq_aperture_regs@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_10
## %bb.7:
	xorl	%r15d, %r15d
	movq	_a5xx_hlsq_aperture_regs@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rdi
	movl	(%rdi,%r15,8), %eax
	movl	4(%rdi,%r15,8), %ecx
	shll	$8, %ecx
	movl	%ecx, (%r13)
	movl	%r12d, 8(%r13)
	addq	$16, %r13
	leal	(%r12,%rax,4), %r12d
	incq	%r15
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %r15
	jl	LBB0_8
## %bb.9:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_10:
	movq	$0, (%r13)
	leaq	-80(%rbp), %rsi
	movq	%r15, %rdi
	callq	_a5xx_crashdumper_run
	movl	(%rbx), %edi
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	callq	_kfree
	jmp	LBB0_13
LBB0_12:
	movq	_SZ_1K@GOTPCREL(%rip), %rax
	movslq	(%rax), %rsi
	shlq	$10, %rsi
	addq	-80(%rbp), %rsi
	shll	$2, %r14d
	movl	%r14d, %edx
	callq	_memcpy
LBB0_13:
	movl	-68(%rbp), %edi
	movl	(%r15), %esi
	movl	$1, %edx
	callq	_msm_gem_kernel_put
LBB0_14:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SZ_1K,4,2                      ## @SZ_1K
	.comm	_a5xx_hlsq_aperture_regs,8,3    ## @a5xx_hlsq_aperture_regs
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_REG_A5XX_HLSQ_DBG_READ_SEL,8,3 ## @REG_A5XX_HLSQ_DBG_READ_SEL
	.comm	_REG_A5XX_HLSQ_DBG_AHB_READ_APERTURE,8,3 ## @REG_A5XX_HLSQ_DBG_AHB_READ_APERTURE
	.no_dead_strip	_a5xx_gpu_state_get_hlsq_regs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a5xx_gpu_state_get_hlsq_regs
_a5xx_gpu_state_get_hlsq_regs:          ; @a5xx_gpu_state_get_hlsq_regs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x19, x0
	stp	xzr, xzr, [sp, #8]
	str	xzr, [sp, #24]
	add	x1, sp, #8
	bl	_a5xx_crashdumper_init
	cbnz	x0, LBB0_13
; %bb.1:
	ldr	x23, [sp, #8]
	ldr	w25, [sp, #16]
Lloh0:
	adrp	x22, _SZ_1K@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SZ_1K@GOTPAGEOFF]
	ldr	w26, [x22]
Lloh2:
	adrp	x24, _a5xx_hlsq_aperture_regs@GOTPAGE
Lloh3:
	ldr	x24, [x24, _a5xx_hlsq_aperture_regs@GOTPAGEOFF]
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x27, #0
	mov	x28, #0
	mov	w21, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x24]
	ldr	w8, [x0, x27]
	add	w21, w8, w21
	add	x28, x28, #1
	bl	_ARRAY_SIZE
	add	x27, x27, #8
	cmp	x28, w0, sxtw
	b.lt	LBB0_3
	b	LBB0_5
LBB0_4:
	mov	w21, #0
LBB0_5:
Lloh4:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	x0, x21
	mov	w1, #4
	bl	_kcalloc
	str	w0, [x20]
	cbz	w0, LBB0_13
; %bb.6:
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.7:
	mov	x27, #0
	mov	x28, #0
	add	w25, w25, w26, lsl #8
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x24]
	add	x8, x0, x27
	ldp	w8, w9, [x8]
	lsl	w9, w9, #8
	str	w9, [x23]
	str	w25, [x23, #8]
	add	x23, x23, #16
	add	w25, w25, w8, lsl #2
	add	x28, x28, #1
	bl	_ARRAY_SIZE
	add	x27, x27, #8
	cmp	x28, w0, sxtw
	b.lt	LBB0_8
LBB0_9:
	str	xzr, [x23]
	add	x1, sp, #8
	mov	x0, x19
	bl	_a5xx_crashdumper_run
	mov	x8, x0
	ldr	w0, [x20]
	cbz	x8, LBB0_11
; %bb.10:
	bl	_kfree
	b	LBB0_12
LBB0_11:
	ldr	x8, [sp, #8]
	ldrsw	x9, [x22]
	add	x1, x8, x9, lsl #10
	lsl	w2, w21, #2
	bl	_memcpy
LBB0_12:
	ldr	w0, [sp, #20]
	ldr	w1, [x19]
	mov	w2, #1
	bl	_msm_gem_kernel_put
LBB0_13:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_SZ_1K,4,2                      ; @SZ_1K
	.comm	_a5xx_hlsq_aperture_regs,8,3    ; @a5xx_hlsq_aperture_regs
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_REG_A5XX_HLSQ_DBG_READ_SEL,8,3 ; @REG_A5XX_HLSQ_DBG_READ_SEL
	.comm	_REG_A5XX_HLSQ_DBG_AHB_READ_APERTURE,8,3 ; @REG_A5XX_HLSQ_DBG_AHB_READ_APERTURE
	.no_dead_strip	_a5xx_gpu_state_get_hlsq_regs
.subsections_via_symbols
