	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rv770_restore_cgcg             ## -- Begin function rv770_restore_cgcg
	.p2align	4, 0x90
_rv770_restore_cgcg:                    ## @rv770_restore_cgcg
	.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	_GENERAL_PWRMGT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	movl	%eax, %ebx
	movq	_GLOBAL_PWRMGT_EN@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	_SCLK_PWRMGT_CNTL@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_RREG32
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	movq	_DYN_GFX_CLK_OFF_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	andl	%esi, %eax
	jne	LBB0_2
## %bb.3:
	movl	(%r14), %edi
	movl	%esi, %edx
	notl	%edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_WREG32_P                       ## TAILCALL
LBB0_2:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GENERAL_PWRMGT,4,2             ## @GENERAL_PWRMGT
	.comm	_GLOBAL_PWRMGT_EN,4,2           ## @GLOBAL_PWRMGT_EN
	.comm	_SCLK_PWRMGT_CNTL,4,2           ## @SCLK_PWRMGT_CNTL
	.comm	_DYN_GFX_CLK_OFF_EN,4,2         ## @DYN_GFX_CLK_OFF_EN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rv770_restore_cgcg             ; -- Begin function rv770_restore_cgcg
	.p2align	2
_rv770_restore_cgcg:                    ; @rv770_restore_cgcg
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _GENERAL_PWRMGT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GENERAL_PWRMGT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_RREG32
Lloh3:
	adrp	x8, _GLOBAL_PWRMGT_EN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GLOBAL_PWRMGT_EN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w20, w8, w0
Lloh6:
	adrp	x19, _SCLK_PWRMGT_CNTL@GOTPAGE
Lloh7:
	ldr	x19, [x19, _SCLK_PWRMGT_CNTL@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_RREG32
Lloh8:
	adrp	x8, _DYN_GFX_CLK_OFF_EN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DYN_GFX_CLK_OFF_EN@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	and	w8, w1, w0
	cmp	w20, #0
	ccmp	w8, #0, #0, ne
	b.eq	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	ldr	w0, [x19]
	mvn	w2, w1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_WREG32_P
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GENERAL_PWRMGT,4,2             ; @GENERAL_PWRMGT
	.comm	_GLOBAL_PWRMGT_EN,4,2           ; @GLOBAL_PWRMGT_EN
	.comm	_SCLK_PWRMGT_CNTL,4,2           ; @SCLK_PWRMGT_CNTL
	.comm	_DYN_GFX_CLK_OFF_EN,4,2         ; @DYN_GFX_CLK_OFF_EN
.subsections_via_symbols
