	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v6_0_set_powergating_state
_gfx_v6_0_set_powergating_state:        ## @gfx_v6_0_set_powergating_state
	.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	_AMD_PG_STATE_GATE@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	cmpl	%esi, (%rax)
	sete	%al
	movq	_AMD_PG_SUPPORT_GFX_PG@GOTPCREL(%rip), %r15
	movq	_AMD_PG_SUPPORT_GFX_SMG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%r15), %ecx
	movq	_AMD_PG_SUPPORT_GFX_DMG@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movq	_AMD_PG_SUPPORT_CP@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movq	_AMD_PG_SUPPORT_GDS@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movq	_AMD_PG_SUPPORT_RLC_SMU_HS@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	testl	%ecx, (%rdi)
	je	LBB0_3
## %bb.1:
	movq	%rdi, %rbx
	movb	%al, %r14b
	movl	%r14d, %esi
	callq	_gfx_v6_0_update_gfx_pg
	movl	(%r15), %eax
	testl	%eax, (%rbx)
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_gfx_v6_0_enable_cp_pg
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_gfx_v6_0_enable_gds_pg
LBB0_3:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AMD_PG_STATE_GATE,4,2          ## @AMD_PG_STATE_GATE
	.comm	_AMD_PG_SUPPORT_GFX_PG,4,2      ## @AMD_PG_SUPPORT_GFX_PG
	.comm	_AMD_PG_SUPPORT_GFX_SMG,4,2     ## @AMD_PG_SUPPORT_GFX_SMG
	.comm	_AMD_PG_SUPPORT_GFX_DMG,4,2     ## @AMD_PG_SUPPORT_GFX_DMG
	.comm	_AMD_PG_SUPPORT_CP,4,2          ## @AMD_PG_SUPPORT_CP
	.comm	_AMD_PG_SUPPORT_GDS,4,2         ## @AMD_PG_SUPPORT_GDS
	.comm	_AMD_PG_SUPPORT_RLC_SMU_HS,4,2  ## @AMD_PG_SUPPORT_RLC_SMU_HS
	.no_dead_strip	_gfx_v6_0_set_powergating_state
.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_set_powergating_state
_gfx_v6_0_set_powergating_state:        ; @gfx_v6_0_set_powergating_state
	.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
Lloh0:
	adrp	x8, _AMD_PG_STATE_GATE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AMD_PG_STATE_GATE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
Lloh3:
	adrp	x21, _AMD_PG_SUPPORT_GFX_PG@GOTPAGE
Lloh4:
	ldr	x21, [x21, _AMD_PG_SUPPORT_GFX_PG@GOTPAGEOFF]
	cset	w20, eq
	ldr	w8, [x21]
Lloh5:
	adrp	x9, _AMD_PG_SUPPORT_GFX_SMG@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AMD_PG_SUPPORT_GFX_SMG@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _AMD_PG_SUPPORT_GFX_DMG@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AMD_PG_SUPPORT_GFX_DMG@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh11:
	adrp	x9, _AMD_PG_SUPPORT_CP@GOTPAGE
Lloh12:
	ldr	x9, [x9, _AMD_PG_SUPPORT_CP@GOTPAGEOFF]
	ldr	w10, [x0]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh14:
	adrp	x9, _AMD_PG_SUPPORT_GDS@GOTPAGE
Lloh15:
	ldr	x9, [x9, _AMD_PG_SUPPORT_GDS@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh17:
	adrp	x9, _AMD_PG_SUPPORT_RLC_SMU_HS@GOTPAGE
Lloh18:
	ldr	x9, [x9, _AMD_PG_SUPPORT_RLC_SMU_HS@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w8, w9
	tst	w8, w10
	b.eq	LBB0_3
; %bb.1:
	mov	x19, x0
	mov	x1, x20
	bl	_gfx_v6_0_update_gfx_pg
	ldr	w8, [x19]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x19
	mov	x1, x20
	bl	_gfx_v6_0_enable_cp_pg
	mov	x0, x19
	mov	x1, x20
	bl	_gfx_v6_0_enable_gds_pg
LBB0_3:
	mov	w0, #0
	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	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AMD_PG_STATE_GATE,4,2          ; @AMD_PG_STATE_GATE
	.comm	_AMD_PG_SUPPORT_GFX_PG,4,2      ; @AMD_PG_SUPPORT_GFX_PG
	.comm	_AMD_PG_SUPPORT_GFX_SMG,4,2     ; @AMD_PG_SUPPORT_GFX_SMG
	.comm	_AMD_PG_SUPPORT_GFX_DMG,4,2     ; @AMD_PG_SUPPORT_GFX_DMG
	.comm	_AMD_PG_SUPPORT_CP,4,2          ; @AMD_PG_SUPPORT_CP
	.comm	_AMD_PG_SUPPORT_GDS,4,2         ; @AMD_PG_SUPPORT_GDS
	.comm	_AMD_PG_SUPPORT_RLC_SMU_HS,4,2  ; @AMD_PG_SUPPORT_RLC_SMU_HS
	.no_dead_strip	_gfx_v6_0_set_powergating_state
.subsections_via_symbols
