	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function trinity_gfx_powergating_enable
_trinity_gfx_powergating_enable:        ## @trinity_gfx_powergating_enable
	.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_4
## %bb.1:
	movq	_CC_SMU_TST_EFUSE1_MISC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32_SMC
	movq	_RB_BACKEND_DISABLE_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.2:
	movq	_SMU_SCRATCH_A@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_RREG32_SMC
	orl	$1, %eax
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_WREG32_SMC
LBB0_3:
	movq	_SCLK_PWRMGT_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DYN_PWR_DOWN_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%esi, %edx
	notl	%edx
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_WREG32_P                       ## TAILCALL
LBB0_4:
	movq	_SCLK_PWRMGT_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DYN_PWR_DOWN_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	xorl	%esi, %esi
	callq	_WREG32_P
	movq	_GB_ADDR_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_RREG32                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CC_SMU_TST_EFUSE1_MISC,4,2     ## @CC_SMU_TST_EFUSE1_MISC
	.comm	_RB_BACKEND_DISABLE_MASK,4,2    ## @RB_BACKEND_DISABLE_MASK
	.comm	_SMU_SCRATCH_A,4,2              ## @SMU_SCRATCH_A
	.comm	_SCLK_PWRMGT_CNTL,4,2           ## @SCLK_PWRMGT_CNTL
	.comm	_DYN_PWR_DOWN_EN,4,2            ## @DYN_PWR_DOWN_EN
	.comm	_GB_ADDR_CONFIG,4,2             ## @GB_ADDR_CONFIG
	.no_dead_strip	_trinity_gfx_powergating_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function trinity_gfx_powergating_enable
_trinity_gfx_powergating_enable:        ; @trinity_gfx_powergating_enable
	.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_4
; %bb.1:
Lloh0:
	adrp	x8, _CC_SMU_TST_EFUSE1_MISC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CC_SMU_TST_EFUSE1_MISC@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_RREG32_SMC
Lloh3:
	adrp	x8, _RB_BACKEND_DISABLE_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RB_BACKEND_DISABLE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _SMU_SCRATCH_A@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SMU_SCRATCH_A@GOTPAGEOFF]
Lloh8:
	ldr	w19, [x8]
	mov	x0, x19
	bl	_RREG32_SMC
	orr	w1, w0, #0x1
	mov	x0, x19
	bl	_WREG32_SMC
LBB0_3:
Lloh9:
	adrp	x8, _SCLK_PWRMGT_CNTL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SCLK_PWRMGT_CNTL@GOTPAGEOFF]
Lloh11:
	adrp	x9, _DYN_PWR_DOWN_EN@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DYN_PWR_DOWN_EN@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	ldr	w1, [x9]
	mvn	w2, w1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_WREG32_P
LBB0_4:
Lloh15:
	adrp	x8, _SCLK_PWRMGT_CNTL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SCLK_PWRMGT_CNTL@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x8, _DYN_PWR_DOWN_EN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DYN_PWR_DOWN_EN@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	mvn	w2, w8
	bl	_WREG32_P
Lloh21:
	adrp	x8, _GB_ADDR_CONFIG@GOTPAGE
Lloh22:
	ldr	x8, [x8, _GB_ADDR_CONFIG@GOTPAGEOFF]
Lloh23:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_CC_SMU_TST_EFUSE1_MISC,4,2     ; @CC_SMU_TST_EFUSE1_MISC
	.comm	_RB_BACKEND_DISABLE_MASK,4,2    ; @RB_BACKEND_DISABLE_MASK
	.comm	_SMU_SCRATCH_A,4,2              ; @SMU_SCRATCH_A
	.comm	_SCLK_PWRMGT_CNTL,4,2           ; @SCLK_PWRMGT_CNTL
	.comm	_DYN_PWR_DOWN_EN,4,2            ; @DYN_PWR_DOWN_EN
	.comm	_GB_ADDR_CONFIG,4,2             ; @GB_ADDR_CONFIG
	.no_dead_strip	_trinity_gfx_powergating_enable
.subsections_via_symbols
