	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a6xx_gmu_notify_slumber
_a6xx_gmu_notify_slumber:               ## @a6xx_gmu_notify_slumber
	.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
	movq	_REG_A6XX_GMU_CX_GMU_POWER_COUNTER_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_gmu_write
	movq	(%rbx), %rax
	movq	_GMU_IDLE_STATE_SPTP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_a6xx_sptprac_disable
LBB0_2:
	movq	_REG_A6XX_GMU_BOOT_SLUMBER_OPTION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_gmu_write
	movq	_GMU_OOB_BOOT_SLUMBER@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_a6xx_gmu_set_oob
	movl	%eax, %r14d
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_a6xx_gmu_clear_oob
	testl	%r14d, %r14d
	jne	LBB0_5
## %bb.3:
	movq	_REG_A6XX_GPU_GMU_CX_GMU_RPMH_POWER_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_gmu_read
	xorl	%r14d, %r14d
	cmpl	$15, %eax
	je	LBB0_5
## %bb.4:
	movl	8(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_DRM_DEV_ERROR
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_5:
	movq	_REG_A6XX_GMU_AO_AHB_FENCE_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_gmu_write
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_A6XX_GMU_CX_GMU_POWER_COUNTER_ENABLE,4,2 ## @REG_A6XX_GMU_CX_GMU_POWER_COUNTER_ENABLE
	.comm	_GMU_IDLE_STATE_SPTP,8,3        ## @GMU_IDLE_STATE_SPTP
	.comm	_REG_A6XX_GMU_BOOT_SLUMBER_OPTION,4,2 ## @REG_A6XX_GMU_BOOT_SLUMBER_OPTION
	.comm	_GMU_OOB_BOOT_SLUMBER,4,2       ## @GMU_OOB_BOOT_SLUMBER
	.comm	_REG_A6XX_GPU_GMU_CX_GMU_RPMH_POWER_STATE,4,2 ## @REG_A6XX_GPU_GMU_CX_GMU_RPMH_POWER_STATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"The GMU did not go into slumber\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_REG_A6XX_GMU_AO_AHB_FENCE_CTRL,4,2 ## @REG_A6XX_GMU_AO_AHB_FENCE_CTRL
	.no_dead_strip	_a6xx_gmu_notify_slumber
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a6xx_gmu_notify_slumber
_a6xx_gmu_notify_slumber:               ; @a6xx_gmu_notify_slumber
	.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	x8, _REG_A6XX_GMU_CX_GMU_POWER_COUNTER_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_A6XX_GMU_CX_GMU_POWER_COUNTER_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_gmu_write
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _GMU_IDLE_STATE_SPTP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GMU_IDLE_STATE_SPTP@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_a6xx_sptprac_disable
LBB0_2:
Lloh6:
	adrp	x8, _REG_A6XX_GMU_BOOT_SLUMBER_OPTION@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REG_A6XX_GMU_BOOT_SLUMBER_OPTION@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_gmu_write
Lloh9:
	adrp	x21, _GMU_OOB_BOOT_SLUMBER@GOTPAGE
Lloh10:
	ldr	x21, [x21, _GMU_OOB_BOOT_SLUMBER@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_a6xx_gmu_set_oob
	mov	x20, x0
	ldr	w1, [x21]
	mov	x0, x19
	bl	_a6xx_gmu_clear_oob
	cbnz	w20, LBB0_6
; %bb.3:
Lloh11:
	adrp	x8, _REG_A6XX_GPU_GMU_CX_GMU_RPMH_POWER_STATE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _REG_A6XX_GPU_GMU_CX_GMU_RPMH_POWER_STATE@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_gmu_read
	cmp	w0, #15
	b.ne	LBB0_5
; %bb.4:
	mov	w20, #0
	b	LBB0_6
LBB0_5:
	ldr	w0, [x19, #8]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DRM_DEV_ERROR
Lloh16:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_6:
Lloh19:
	adrp	x8, _REG_A6XX_GMU_AO_AHB_FENCE_CTRL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _REG_A6XX_GMU_AO_AHB_FENCE_CTRL@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_gmu_write
	mov	x0, x20
	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
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_A6XX_GMU_CX_GMU_POWER_COUNTER_ENABLE,4,2 ; @REG_A6XX_GMU_CX_GMU_POWER_COUNTER_ENABLE
	.comm	_GMU_IDLE_STATE_SPTP,8,3        ; @GMU_IDLE_STATE_SPTP
	.comm	_REG_A6XX_GMU_BOOT_SLUMBER_OPTION,4,2 ; @REG_A6XX_GMU_BOOT_SLUMBER_OPTION
	.comm	_GMU_OOB_BOOT_SLUMBER,4,2       ; @GMU_OOB_BOOT_SLUMBER
	.comm	_REG_A6XX_GPU_GMU_CX_GMU_RPMH_POWER_STATE,4,2 ; @REG_A6XX_GPU_GMU_CX_GMU_RPMH_POWER_STATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"The GMU did not go into slumber\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_REG_A6XX_GMU_AO_AHB_FENCE_CTRL,4,2 ; @REG_A6XX_GMU_AO_AHB_FENCE_CTRL
	.no_dead_strip	_a6xx_gmu_notify_slumber
.subsections_via_symbols
