	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a5xx_pm_resume
_a5xx_pm_resume:                        ## @a5xx_pm_resume
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_msm_gpu_pm_resume
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movq	_REG_A5XX_GPMU_RBCCU_POWER_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$7831552, %edx                  ## imm = 0x778000
	callq	_gpu_write
	movl	$3, %edi
	callq	_udelay
	movq	_REG_A5XX_GPMU_RBCCU_PWR_CLK_STATUS@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%r14, %rdi
	movl	$20, %esi
	movl	$1048576, %ecx                  ## imm = 0x100000
	movl	$1048576, %r8d                  ## imm = 0x100000
	callq	_spin_usecs
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %ebx
	movl	(%r14), %r15d
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_gpu_read
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_6
LBB0_3:
	movq	_REG_A5XX_GPMU_SP_POWER_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$7831552, %edx                  ## imm = 0x778000
	callq	_gpu_write
	movq	_REG_A5XX_GPMU_SP_PWR_CLK_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$20, %esi
	movl	$1048576, %ecx                  ## imm = 0x100000
	movl	$1048576, %r8d                  ## imm = 0x100000
	callq	_spin_usecs
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	%eax, %ebx
	movl	(%r14), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_6
LBB0_4:
	xorl	%ebx, %ebx
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_A5XX_GPMU_RBCCU_POWER_CNTL,4,2 ## @REG_A5XX_GPMU_RBCCU_POWER_CNTL
	.comm	_REG_A5XX_GPMU_RBCCU_PWR_CLK_STATUS,4,2 ## @REG_A5XX_GPMU_RBCCU_PWR_CLK_STATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: timeout waiting for RBCCU GDSC enable: %X\n"

	.comm	_REG_A5XX_GPMU_SP_POWER_CNTL,4,2 ## @REG_A5XX_GPMU_SP_POWER_CNTL
	.comm	_REG_A5XX_GPMU_SP_PWR_CLK_STATUS,4,2 ## @REG_A5XX_GPMU_SP_PWR_CLK_STATUS
L_.str.1:                               ## @.str.1
	.asciz	"%s: timeout waiting for SP GDSC enable\n"

	.no_dead_strip	_a5xx_pm_resume
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a5xx_pm_resume
_a5xx_pm_resume:                        ; @a5xx_pm_resume
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	_msm_gpu_pm_resume
	mov	x20, x0
	cbnz	w0, LBB0_6
; %bb.1:
Lloh0:
	adrp	x8, _REG_A5XX_GPMU_RBCCU_POWER_CNTL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_A5XX_GPMU_RBCCU_POWER_CNTL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #32768
	movk	w2, #119, lsl #16
	bl	_gpu_write
	mov	w0, #3
	bl	_udelay
Lloh3:
	adrp	x22, _REG_A5XX_GPMU_RBCCU_PWR_CLK_STATUS@GOTPAGE
Lloh4:
	ldr	x22, [x22, _REG_A5XX_GPMU_RBCCU_PWR_CLK_STATUS@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x19
	mov	w1, #20
	mov	w3, #1048576
	mov	w4, #1048576
	bl	_spin_usecs
	cbz	w0, LBB0_3
; %bb.2:
	mov	x20, x0
	ldr	w21, [x19]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_gpu_read
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	b	LBB0_5
LBB0_3:
Lloh7:
	adrp	x8, _REG_A5XX_GPMU_SP_POWER_CNTL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _REG_A5XX_GPMU_SP_POWER_CNTL@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #32768
	movk	w2, #119, lsl #16
	bl	_gpu_write
Lloh10:
	adrp	x8, _REG_A5XX_GPMU_SP_PWR_CLK_STATUS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _REG_A5XX_GPMU_SP_PWR_CLK_STATUS@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #20
	mov	w3, #1048576
	mov	w4, #1048576
	bl	_spin_usecs
	mov	x20, x0
	cbz	w0, LBB0_6
; %bb.4:
	ldr	w1, [x19]
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_5:
	bl	_DRM_ERROR
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_A5XX_GPMU_RBCCU_POWER_CNTL,4,2 ; @REG_A5XX_GPMU_RBCCU_POWER_CNTL
	.comm	_REG_A5XX_GPMU_RBCCU_PWR_CLK_STATUS,4,2 ; @REG_A5XX_GPMU_RBCCU_PWR_CLK_STATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: timeout waiting for RBCCU GDSC enable: %X\n"

	.comm	_REG_A5XX_GPMU_SP_POWER_CNTL,4,2 ; @REG_A5XX_GPMU_SP_POWER_CNTL
	.comm	_REG_A5XX_GPMU_SP_PWR_CLK_STATUS,4,2 ; @REG_A5XX_GPMU_SP_PWR_CLK_STATUS
l_.str.1:                               ; @.str.1
	.asciz	"%s: timeout waiting for SP GDSC enable\n"

	.no_dead_strip	_a5xx_pm_resume
.subsections_via_symbols
