	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a5xx_pm_suspend
_a5xx_pm_suspend:                       ## @a5xx_pm_suspend
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_REG_A5XX_VBIF_XIN_HALT_CTRL0@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	$15, %edx
	callq	_gpu_write
	movq	_REG_A5XX_VBIF_XIN_HALT_CTRL1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_gpu_read
	notl	%eax
	xorl	%edi, %edi
	testb	$15, %al
	sete	%dil
	callq	_spin_until
	movl	(%r14), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_gpu_write
	movq	_REG_A5XX_RBBM_BLOCK_SW_RESET_CMD@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	$3932160, %edx                  ## imm = 0x3C0000
	callq	_gpu_write
	movl	(%r14), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_gpu_write
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_msm_gpu_pm_suspend             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_A5XX_VBIF_XIN_HALT_CTRL0,4,2 ## @REG_A5XX_VBIF_XIN_HALT_CTRL0
	.comm	_REG_A5XX_VBIF_XIN_HALT_CTRL1,4,2 ## @REG_A5XX_VBIF_XIN_HALT_CTRL1
	.comm	_REG_A5XX_RBBM_BLOCK_SW_RESET_CMD,4,2 ## @REG_A5XX_RBBM_BLOCK_SW_RESET_CMD
	.no_dead_strip	_a5xx_pm_suspend
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a5xx_pm_suspend
_a5xx_pm_suspend:                       ; @a5xx_pm_suspend
	.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
Lloh0:
	adrp	x20, _REG_A5XX_VBIF_XIN_HALT_CTRL0@GOTPAGE
Lloh1:
	ldr	x20, [x20, _REG_A5XX_VBIF_XIN_HALT_CTRL0@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	w21, #15
	mov	w2, #15
	bl	_gpu_write
Lloh2:
	adrp	x8, _REG_A5XX_VBIF_XIN_HALT_CTRL1@GOTPAGE
Lloh3:
	ldr	x8, [x8, _REG_A5XX_VBIF_XIN_HALT_CTRL1@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_gpu_read
	bics	wzr, w21, w0
	cset	w0, eq
	bl	_spin_until
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_gpu_write
Lloh5:
	adrp	x20, _REG_A5XX_RBBM_BLOCK_SW_RESET_CMD@GOTPAGE
Lloh6:
	ldr	x20, [x20, _REG_A5XX_RBBM_BLOCK_SW_RESET_CMD@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #3932160
	bl	_gpu_write
	ldr	w1, [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	_msm_gpu_pm_suspend
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_A5XX_VBIF_XIN_HALT_CTRL0,4,2 ; @REG_A5XX_VBIF_XIN_HALT_CTRL0
	.comm	_REG_A5XX_VBIF_XIN_HALT_CTRL1,4,2 ; @REG_A5XX_VBIF_XIN_HALT_CTRL1
	.comm	_REG_A5XX_RBBM_BLOCK_SW_RESET_CMD,4,2 ; @REG_A5XX_RBBM_BLOCK_SW_RESET_CMD
	.no_dead_strip	_a5xx_pm_suspend
.subsections_via_symbols
