	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a6xx_get_crashdumper_hlsq_registers
_a6xx_get_crashdumper_hlsq_registers:   ## @a6xx_get_crashdumper_hlsq_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r13
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r12
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movq	(%r8), %rbx
	movl	8(%r8), %r14d
	movq	_A6XX_CD_DATA_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_REG_A6XX_HLSQ_DBG_READ_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	20(%rdx), %edx
	movq	%rbx, %rdi
	callq	_CRASHDUMP_WRITE
	leaq	(%rbx,%rax,4), %rdi
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%r12)
	jle	LBB0_1
## %bb.2:
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	addl	%r14d, %r15d
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	movq	%rdi, %r14
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %rdi
	movl	%r12d, %esi
	callq	_RANGE
	movq	8(%rbx), %rcx
	movl	(%rcx,%r12,4), %esi
	movq	_REG_A6XX_HLSQ_DBG_AHB_READ_APERTURE@GOTPCREL(%rip), %rcx
	addl	(%rcx), %esi
	movl	%eax, %r13d
	movl	16(%rbx), %eax
	sarl	$2, %eax
	subl	%eax, %esi
	movq	%r14, %rdi
	movl	%r13d, %edx
	movl	%r15d, %ecx
	callq	_CRASHDUMP_READ
	leaq	(%r14,%rax,4), %r14
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	leal	(%r15,%r13,4), %r15d
	addl	%r13d, %eax
	addq	$2, %r12
	cmpl	%r12d, (%rbx)
	jg	LBB0_3
## %bb.4:
	cltq
	shlq	$2, %rax
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	%rax, %rbx
	movq	%r14, %rdi
	jmp	LBB0_5
LBB0_1:
	xorl	%ebx, %ebx
LBB0_5:
	callq	_CRASHDUMP_FINI
	movq	_A6XX_CD_DATA_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	xorl	%edi, %edi
	cmpq	%rax, %rbx
	seta	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_8
## %bb.6:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_a6xx_crashdumper_run
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r15, 8(%r14)
	movq	_A6XX_CD_DATA_OFFSET@GOTPCREL(%rip), %rax
	movslq	(%rax), %rsi
	shlq	$2, %rsi
	addq	(%r13), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_state_kmemdup
	movl	%eax, (%r14)
LBB0_8:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_A6XX_CD_DATA_OFFSET,4,2        ## @A6XX_CD_DATA_OFFSET
	.comm	_REG_A6XX_HLSQ_DBG_READ_SEL,4,2 ## @REG_A6XX_HLSQ_DBG_READ_SEL
	.comm	_REG_A6XX_HLSQ_DBG_AHB_READ_APERTURE,4,2 ## @REG_A6XX_HLSQ_DBG_AHB_READ_APERTURE
	.comm	_A6XX_CD_DATA_SIZE,4,2          ## @A6XX_CD_DATA_SIZE
	.no_dead_strip	_a6xx_get_crashdumper_hlsq_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_crashdumper_hlsq_registers
_a6xx_get_crashdumper_hlsq_registers:   ; @a6xx_get_crashdumper_hlsq_registers
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x21, x4
	mov	x19, x3
	mov	x22, x2
	str	x1, [sp, #8]                    ; 8-byte Folded Spill
	mov	x23, x0
	ldr	x24, [x4]
Lloh0:
	adrp	x8, _A6XX_CD_DATA_OFFSET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _A6XX_CD_DATA_OFFSET@GOTPAGEOFF]
	ldr	w20, [x4, #8]
Lloh2:
	ldr	w26, [x8]
Lloh3:
	adrp	x8, _REG_A6XX_HLSQ_DBG_READ_SEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_A6XX_HLSQ_DBG_READ_SEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	w2, [x2, #20]
	mov	x0, x24
	bl	_CRASHDUMP_WRITE
	add	x24, x24, x0, lsl #2
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x25, #0
	mov	w28, #0
	add	w26, w26, w20
Lloh6:
	adrp	x20, _REG_A6XX_HLSQ_DBG_AHB_READ_APERTURE@GOTPAGE
Lloh7:
	ldr	x20, [x20, _REG_A6XX_HLSQ_DBG_AHB_READ_APERTURE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22, #8]
	mov	x1, x25
	bl	_RANGE
	mov	x27, x0
	ldr	w8, [x20]
	ldr	x9, [x22, #8]
	ldr	w9, [x9, x25, lsl #2]
	add	w8, w9, w8
	ldr	w9, [x22, #16]
	sub	w1, w8, w9, asr #2
	mov	x0, x24
	mov	x2, x27
	mov	x3, x26
	bl	_CRASHDUMP_READ
	add	x24, x24, x0, lsl #2
	add	w26, w26, w27, lsl #2
	add	w28, w27, w28
	add	x25, x25, #2
	ldr	w8, [x22]
	cmp	w8, w25
	b.gt	LBB0_2
; %bb.3:
	sbfiz	x25, x28, #2, #32
	b	LBB0_5
LBB0_4:
	mov	x25, #0
LBB0_5:
	mov	x0, x24
	bl	_CRASHDUMP_FINI
Lloh8:
	adrp	x8, _A6XX_CD_DATA_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _A6XX_CD_DATA_SIZE@GOTPAGEOFF]
Lloh10:
	ldrsw	x8, [x8]
	cmp	x25, x8
	cset	w0, hi
	bl	_WARN_ON
	cbnz	x0, LBB0_8
; %bb.6:
	mov	x0, x23
	mov	x1, x21
	bl	_a6xx_crashdumper_run
	cbnz	x0, LBB0_8
; %bb.7:
	str	x22, [x19, #8]
	ldr	x8, [x21]
Lloh11:
	adrp	x9, _A6XX_CD_DATA_OFFSET@GOTPAGE
Lloh12:
	ldr	x9, [x9, _A6XX_CD_DATA_OFFSET@GOTPAGEOFF]
Lloh13:
	ldrsw	x9, [x9]
	add	x1, x8, x9, lsl #2
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	mov	x2, x25
	bl	_state_kmemdup
	str	w0, [x19]
LBB0_8:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_A6XX_CD_DATA_OFFSET,4,2        ; @A6XX_CD_DATA_OFFSET
	.comm	_REG_A6XX_HLSQ_DBG_READ_SEL,4,2 ; @REG_A6XX_HLSQ_DBG_READ_SEL
	.comm	_REG_A6XX_HLSQ_DBG_AHB_READ_APERTURE,4,2 ; @REG_A6XX_HLSQ_DBG_AHB_READ_APERTURE
	.comm	_A6XX_CD_DATA_SIZE,4,2          ; @A6XX_CD_DATA_SIZE
	.no_dead_strip	_a6xx_get_crashdumper_hlsq_registers
.subsections_via_symbols
