	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a2xx_recover
_a2xx_recover:                          ## @a2xx_recover
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_adreno_dump_info
	movq	_REG_AXXX_CP_SCRATCH_REG0@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	movq	%rbx, %rdi
	callq	_gpu_read
	leaq	L_.str(%rip), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%eax, %edx
	callq	_printk
	movq	(%r15), %rsi
	incq	%rsi
	movq	%rbx, %rdi
	callq	_gpu_read
	movq	%r14, %rdi
	movl	$1, %esi
	movl	%eax, %edx
	callq	_printk
	movq	(%r15), %rsi
	addq	$2, %rsi
	movq	%rbx, %rdi
	callq	_gpu_read
	movq	%r14, %rdi
	movl	$2, %esi
	movl	%eax, %edx
	callq	_printk
	movq	(%r15), %rsi
	addq	$3, %rsi
	movq	%rbx, %rdi
	callq	_gpu_read
	movq	%r14, %rdi
	movl	$3, %esi
	movl	%eax, %edx
	callq	_printk
	movq	(%r15), %rsi
	addq	$4, %rsi
	movq	%rbx, %rdi
	callq	_gpu_read
	movq	%r14, %rdi
	movl	$4, %esi
	movl	%eax, %edx
	callq	_printk
	movq	(%r15), %rsi
	addq	$5, %rsi
	movq	%rbx, %rdi
	callq	_gpu_read
	movq	%r14, %rdi
	movl	$5, %esi
	movl	%eax, %edx
	callq	_printk
	movq	(%r15), %rsi
	addq	$6, %rsi
	movq	%rbx, %rdi
	callq	_gpu_read
	movq	%r14, %rdi
	movl	$6, %esi
	movl	%eax, %edx
	callq	_printk
	movq	(%r15), %rsi
	addq	$7, %rsi
	movq	%rbx, %rdi
	callq	_gpu_read
	movq	%r14, %rdi
	movl	$7, %esi
	movl	%eax, %edx
	callq	_printk
	movq	_hang_debug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_a2xx_dump
LBB0_2:
	movq	_REG_A2XX_RBBM_SOFT_RESET@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_gpu_write
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	callq	_gpu_read
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_gpu_write
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_adreno_recover                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CP_SCRATCH_REG%d: %u\n"

	.comm	_REG_AXXX_CP_SCRATCH_REG0,8,3   ## @REG_AXXX_CP_SCRATCH_REG0
	.comm	_hang_debug,8,3                 ## @hang_debug
	.comm	_REG_A2XX_RBBM_SOFT_RESET,8,3   ## @REG_A2XX_RBBM_SOFT_RESET
	.no_dead_strip	_a2xx_recover
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a2xx_recover
_a2xx_recover:                          ; @a2xx_recover
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	bl	_adreno_dump_info
Lloh0:
	adrp	x21, _REG_AXXX_CP_SCRATCH_REG0@GOTPAGE
Lloh1:
	ldr	x21, [x21, _REG_AXXX_CP_SCRATCH_REG0@GOTPAGEOFF]
	ldr	x1, [x21]
	mov	x0, x19
	bl	_gpu_read
	mov	x2, x0
Lloh2:
	adrp	x20, l_.str@PAGE
Lloh3:
	add	x20, x20, l_.str@PAGEOFF
	mov	x0, x20
	mov	w1, #0
	bl	_printk
	ldr	x8, [x21]
	add	x1, x8, #1
	mov	x0, x19
	bl	_gpu_read
	mov	x2, x0
	mov	x0, x20
	mov	w1, #1
	bl	_printk
	ldr	x8, [x21]
	add	x1, x8, #2
	mov	x0, x19
	bl	_gpu_read
	mov	x2, x0
	mov	x0, x20
	mov	w1, #2
	bl	_printk
	ldr	x8, [x21]
	add	x1, x8, #3
	mov	x0, x19
	bl	_gpu_read
	mov	x2, x0
	mov	x0, x20
	mov	w1, #3
	bl	_printk
	ldr	x8, [x21]
	add	x1, x8, #4
	mov	x0, x19
	bl	_gpu_read
	mov	x2, x0
	mov	x0, x20
	mov	w1, #4
	bl	_printk
	ldr	x8, [x21]
	add	x1, x8, #5
	mov	x0, x19
	bl	_gpu_read
	mov	x2, x0
	mov	x0, x20
	mov	w1, #5
	bl	_printk
	ldr	x8, [x21]
	add	x1, x8, #6
	mov	x0, x19
	bl	_gpu_read
	mov	x2, x0
	mov	x0, x20
	mov	w1, #6
	bl	_printk
	ldr	x8, [x21]
	add	x1, x8, #7
	mov	x0, x19
	bl	_gpu_read
	mov	x2, x0
	mov	x0, x20
	mov	w1, #7
	bl	_printk
Lloh4:
	adrp	x8, _hang_debug@GOTPAGE
Lloh5:
	ldr	x8, [x8, _hang_debug@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_a2xx_dump
LBB0_2:
Lloh7:
	adrp	x20, _REG_A2XX_RBBM_SOFT_RESET@GOTPAGE
Lloh8:
	ldr	x20, [x20, _REG_A2XX_RBBM_SOFT_RESET@GOTPAGEOFF]
	ldr	x1, [x20]
	mov	x0, x19
	mov	w2, #1
	bl	_gpu_write
	ldr	x1, [x20]
	mov	x0, x19
	bl	_gpu_read
	ldr	x1, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_gpu_write
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_adreno_recover
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CP_SCRATCH_REG%d: %u\n"

	.comm	_REG_AXXX_CP_SCRATCH_REG0,8,3   ; @REG_AXXX_CP_SCRATCH_REG0
	.comm	_hang_debug,8,3                 ; @hang_debug
	.comm	_REG_A2XX_RBBM_SOFT_RESET,8,3   ; @REG_A2XX_RBBM_SOFT_RESET
	.no_dead_strip	_a2xx_recover
.subsections_via_symbols
