	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function trinity_gfx_dynamic_mgpg_enable
_trinity_gfx_dynamic_mgpg_enable:       ## @trinity_gfx_dynamic_mgpg_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	movq	_PM_I_CNTL_1@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_RREG32_SMC
	movq	_DS_PG_CNTL_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movl	$1, %edi
	callq	_DS_PG_CNTL
	orl	%eax, %ebx
	movl	(%r15), %edi
	movl	%ebx, %esi
	callq	_WREG32_SMC
	movq	_SMU_S_PG_CNTL@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_RREG32_SMC
	movq	_DS_PG_EN_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movl	$1, %edi
	callq	_DS_PG_EN
	movl	%eax, %esi
	orl	%ebx, %esi
	jmp	LBB0_3
LBB0_2:
	movq	_SMU_S_PG_CNTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_RREG32_SMC
	movq	_DS_PG_EN_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	(%rbx), %edi
	callq	_WREG32_SMC
	movq	_PM_I_CNTL_1@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_RREG32_SMC
	movq	_DS_PG_CNTL_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
LBB0_3:
	movl	(%r15), %edi
	callq	_WREG32_SMC
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_trinity_gfx_dynamic_mgpg_config ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PM_I_CNTL_1,4,2                ## @PM_I_CNTL_1
	.comm	_DS_PG_CNTL_MASK,4,2            ## @DS_PG_CNTL_MASK
	.comm	_SMU_S_PG_CNTL,4,2              ## @SMU_S_PG_CNTL
	.comm	_DS_PG_EN_MASK,4,2              ## @DS_PG_EN_MASK
	.no_dead_strip	_trinity_gfx_dynamic_mgpg_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_dynamic_mgpg_enable
_trinity_gfx_dynamic_mgpg_enable:       ; @trinity_gfx_dynamic_mgpg_enable
	.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
	mov	x19, x0
	cbz	w1, LBB0_2
; %bb.1:
Lloh0:
	adrp	x20, _PM_I_CNTL_1@GOTPAGE
Lloh1:
	ldr	x20, [x20, _PM_I_CNTL_1@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_RREG32_SMC
Lloh2:
	adrp	x8, _DS_PG_CNTL_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DS_PG_CNTL_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bic	w21, w0, w8
	mov	w0, #1
	bl	_DS_PG_CNTL
	orr	w1, w21, w0
	ldr	w0, [x20]
	bl	_WREG32_SMC
Lloh5:
	adrp	x20, _SMU_S_PG_CNTL@GOTPAGE
Lloh6:
	ldr	x20, [x20, _SMU_S_PG_CNTL@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_RREG32_SMC
Lloh7:
	adrp	x8, _DS_PG_EN_MASK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DS_PG_EN_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	bic	w21, w0, w8
	mov	w0, #1
	bl	_DS_PG_EN
	orr	w1, w21, w0
	b	LBB0_3
LBB0_2:
Lloh10:
	adrp	x20, _SMU_S_PG_CNTL@GOTPAGE
Lloh11:
	ldr	x20, [x20, _SMU_S_PG_CNTL@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_RREG32_SMC
Lloh12:
	adrp	x8, _DS_PG_EN_MASK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DS_PG_EN_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	bic	w1, w0, w8
	ldr	w0, [x20]
	bl	_WREG32_SMC
Lloh15:
	adrp	x20, _PM_I_CNTL_1@GOTPAGE
Lloh16:
	ldr	x20, [x20, _PM_I_CNTL_1@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_RREG32_SMC
Lloh17:
	adrp	x8, _DS_PG_CNTL_MASK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DS_PG_CNTL_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	bic	w1, w0, w8
LBB0_3:
	ldr	w0, [x20]
	bl	_WREG32_SMC
	mov	x0, x19
	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
	b	_trinity_gfx_dynamic_mgpg_config
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PM_I_CNTL_1,4,2                ; @PM_I_CNTL_1
	.comm	_DS_PG_CNTL_MASK,4,2            ; @DS_PG_CNTL_MASK
	.comm	_SMU_S_PG_CNTL,4,2              ; @SMU_S_PG_CNTL
	.comm	_DS_PG_EN_MASK,4,2              ; @DS_PG_EN_MASK
	.no_dead_strip	_trinity_gfx_dynamic_mgpg_enable
.subsections_via_symbols
