	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v6_0_enable_gfx_cgpg
_gfx_v6_0_enable_gfx_cgpg:              ## @gfx_v6_0_enable_gfx_cgpg
	.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
	testl	%esi, %esi
	je	LBB0_3
## %bb.1:
	movq	_AMD_PG_SUPPORT_GFX_PG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_3
## %bb.2:
	movq	_mmRLC_TTOP_D@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	$16, %edi
	callq	_RLC_PUD
	movl	%eax, %r15d
	movl	$16, %edi
	callq	_RLC_PDD
	orl	%eax, %r15d
	movl	$16, %edi
	callq	_RLC_TTPD
	movl	%eax, %ebx
	movl	$16, %edi
	callq	_RLC_MSD
	orl	%eax, %ebx
	orl	%r15d, %ebx
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_WREG32
	movq	_RLC_PG_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GFX_POWER_GATING_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edx
	callq	_WREG32_FIELD
	movq	_RLC_AUTO_PG_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_AUTO_PG_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WREG32_FIELD                   ## TAILCALL
LBB0_3:
	movq	_RLC_AUTO_PG_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_AUTO_PG_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_WREG32_FIELD
	movq	_mmDB_RENDER_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_RREG32                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AMD_PG_SUPPORT_GFX_PG,4,2      ## @AMD_PG_SUPPORT_GFX_PG
	.comm	_mmRLC_TTOP_D,4,2               ## @mmRLC_TTOP_D
	.comm	_RLC_PG_CNTL,4,2                ## @RLC_PG_CNTL
	.comm	_GFX_POWER_GATING_ENABLE,4,2    ## @GFX_POWER_GATING_ENABLE
	.comm	_RLC_AUTO_PG_CTRL,4,2           ## @RLC_AUTO_PG_CTRL
	.comm	_AUTO_PG_EN,4,2                 ## @AUTO_PG_EN
	.comm	_mmDB_RENDER_CONTROL,4,2        ## @mmDB_RENDER_CONTROL
	.no_dead_strip	_gfx_v6_0_enable_gfx_cgpg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gfx_v6_0_enable_gfx_cgpg
_gfx_v6_0_enable_gfx_cgpg:              ; @gfx_v6_0_enable_gfx_cgpg
	.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
	cbz	w1, LBB0_3
; %bb.1:
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _AMD_PG_SUPPORT_GFX_PG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AMD_PG_SUPPORT_GFX_PG@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _mmRLC_TTOP_D@GOTPAGE
Lloh4:
	ldr	x8, [x8, _mmRLC_TTOP_D@GOTPAGEOFF]
Lloh5:
	ldr	w19, [x8]
	mov	w0, #16
	bl	_RLC_PUD
	mov	x20, x0
	mov	w0, #16
	bl	_RLC_PDD
	orr	w20, w0, w20
	mov	w0, #16
	bl	_RLC_TTPD
	orr	w20, w20, w0
	mov	w0, #16
	bl	_RLC_MSD
	orr	w1, w20, w0
	mov	x0, x19
	bl	_WREG32
Lloh6:
	adrp	x8, _RLC_PG_CNTL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RLC_PG_CNTL@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x8, _GFX_POWER_GATING_ENABLE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GFX_POWER_GATING_ENABLE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	w2, #1
	bl	_WREG32_FIELD
Lloh12:
	adrp	x8, _RLC_AUTO_PG_CTRL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RLC_AUTO_PG_CTRL@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x8, _AUTO_PG_EN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AUTO_PG_EN@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	w2, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_WREG32_FIELD
LBB0_3:
Lloh18:
	adrp	x8, _RLC_AUTO_PG_CTRL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _RLC_AUTO_PG_CTRL@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x8, _AUTO_PG_EN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AUTO_PG_EN@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_WREG32_FIELD
Lloh24:
	adrp	x8, _mmDB_RENDER_CONTROL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _mmDB_RENDER_CONTROL@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_RREG32
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_AMD_PG_SUPPORT_GFX_PG,4,2      ; @AMD_PG_SUPPORT_GFX_PG
	.comm	_mmRLC_TTOP_D,4,2               ; @mmRLC_TTOP_D
	.comm	_RLC_PG_CNTL,4,2                ; @RLC_PG_CNTL
	.comm	_GFX_POWER_GATING_ENABLE,4,2    ; @GFX_POWER_GATING_ENABLE
	.comm	_RLC_AUTO_PG_CTRL,4,2           ; @RLC_AUTO_PG_CTRL
	.comm	_AUTO_PG_EN,4,2                 ; @AUTO_PG_EN
	.comm	_mmDB_RENDER_CONTROL,4,2        ; @mmDB_RENDER_CONTROL
	.no_dead_strip	_gfx_v6_0_enable_gfx_cgpg
.subsections_via_symbols
