	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v7_0_enable_gfx_cgpg
_gfx_v7_0_enable_gfx_cgpg:              ## @gfx_v7_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	testl	%esi, %esi
	je	LBB0_6
## %bb.1:
	movq	_AMD_PG_SUPPORT_GFX_PG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_6
## %bb.2:
	movq	_mmRLC_PG_CNTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_RREG32
	movq	_RLC_PG_CNTL__GFX_POWER_GATING_ENABLE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	%eax, %esi
	cmpl	%esi, %eax
	je	LBB0_4
## %bb.3:
	movl	(%rbx), %edi
	callq	_WREG32
LBB0_4:
	movq	_mmRLC_AUTO_PG_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_RREG32
	movq	_RLC_AUTO_PG_CTRL__AUTO_PG_EN_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	%eax, %esi
	cmpl	%esi, %eax
	jne	LBB0_5
## %bb.11:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_6:
	movq	_mmRLC_PG_CNTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_RREG32
	movq	_RLC_PG_CNTL__GFX_POWER_GATING_ENABLE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	cmpl	%esi, %eax
	je	LBB0_8
## %bb.7:
	movl	(%rbx), %edi
	callq	_WREG32
LBB0_8:
	movq	_mmRLC_AUTO_PG_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_RREG32
	movq	_RLC_AUTO_PG_CTRL__AUTO_PG_EN_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	cmpl	%esi, %eax
	je	LBB0_10
## %bb.9:
	movl	(%rbx), %edi
	callq	_WREG32
LBB0_10:
	movq	_mmDB_RENDER_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_RREG32                         ## TAILCALL
LBB0_5:
	movl	(%rbx), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_WREG32                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AMD_PG_SUPPORT_GFX_PG,4,2      ## @AMD_PG_SUPPORT_GFX_PG
	.comm	_mmRLC_PG_CNTL,4,2              ## @mmRLC_PG_CNTL
	.comm	_RLC_PG_CNTL__GFX_POWER_GATING_ENABLE_MASK,4,2 ## @RLC_PG_CNTL__GFX_POWER_GATING_ENABLE_MASK
	.comm	_mmRLC_AUTO_PG_CTRL,4,2         ## @mmRLC_AUTO_PG_CTRL
	.comm	_RLC_AUTO_PG_CTRL__AUTO_PG_EN_MASK,4,2 ## @RLC_AUTO_PG_CTRL__AUTO_PG_EN_MASK
	.comm	_mmDB_RENDER_CONTROL,4,2        ## @mmDB_RENDER_CONTROL
	.no_dead_strip	_gfx_v7_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_v7_0_enable_gfx_cgpg
_gfx_v7_0_enable_gfx_cgpg:              ; @gfx_v7_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_6
; %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_6
; %bb.2:
Lloh3:
	adrp	x19, _mmRLC_PG_CNTL@GOTPAGE
Lloh4:
	ldr	x19, [x19, _mmRLC_PG_CNTL@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_RREG32
Lloh5:
	adrp	x8, _RLC_PG_CNTL__GFX_POWER_GATING_ENABLE_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RLC_PG_CNTL__GFX_POWER_GATING_ENABLE_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	orr	w1, w8, w0
	cmp	w0, w1
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x19]
	bl	_WREG32
LBB0_4:
Lloh8:
	adrp	x19, _mmRLC_AUTO_PG_CTRL@GOTPAGE
Lloh9:
	ldr	x19, [x19, _mmRLC_AUTO_PG_CTRL@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_RREG32
Lloh10:
	adrp	x8, _RLC_AUTO_PG_CTRL__AUTO_PG_EN_MASK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _RLC_AUTO_PG_CTRL__AUTO_PG_EN_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	orr	w1, w8, w0
	cmp	w0, w1
	b.ne	LBB0_11
; %bb.5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh13:
	adrp	x19, _mmRLC_PG_CNTL@GOTPAGE
Lloh14:
	ldr	x19, [x19, _mmRLC_PG_CNTL@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_RREG32
Lloh15:
	adrp	x8, _RLC_PG_CNTL__GFX_POWER_GATING_ENABLE_MASK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RLC_PG_CNTL__GFX_POWER_GATING_ENABLE_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	bic	w1, w0, w8
	cmp	w0, w1
	b.eq	LBB0_8
; %bb.7:
	ldr	w0, [x19]
	bl	_WREG32
LBB0_8:
Lloh18:
	adrp	x19, _mmRLC_AUTO_PG_CTRL@GOTPAGE
Lloh19:
	ldr	x19, [x19, _mmRLC_AUTO_PG_CTRL@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_RREG32
Lloh20:
	adrp	x8, _RLC_AUTO_PG_CTRL__AUTO_PG_EN_MASK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _RLC_AUTO_PG_CTRL__AUTO_PG_EN_MASK@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	bic	w1, w0, w8
	cmp	w0, w1
	b.eq	LBB0_10
; %bb.9:
	ldr	w0, [x19]
	bl	_WREG32
LBB0_10:
Lloh23:
	adrp	x8, _mmDB_RENDER_CONTROL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _mmDB_RENDER_CONTROL@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_RREG32
LBB0_11:
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_WREG32
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_AMD_PG_SUPPORT_GFX_PG,4,2      ; @AMD_PG_SUPPORT_GFX_PG
	.comm	_mmRLC_PG_CNTL,4,2              ; @mmRLC_PG_CNTL
	.comm	_RLC_PG_CNTL__GFX_POWER_GATING_ENABLE_MASK,4,2 ; @RLC_PG_CNTL__GFX_POWER_GATING_ENABLE_MASK
	.comm	_mmRLC_AUTO_PG_CTRL,4,2         ; @mmRLC_AUTO_PG_CTRL
	.comm	_RLC_AUTO_PG_CTRL__AUTO_PG_EN_MASK,4,2 ; @RLC_AUTO_PG_CTRL__AUTO_PG_EN_MASK
	.comm	_mmDB_RENDER_CONTROL,4,2        ; @mmDB_RENDER_CONTROL
	.no_dead_strip	_gfx_v7_0_enable_gfx_cgpg
.subsections_via_symbols
