	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v10_0_update_gfx_clock_gating
_gfx_v10_0_update_gfx_clock_gating:     ## @gfx_v10_0_update_gfx_clock_gating
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_amdgpu_gfx_rlc_enter_safe_mode
	movq	%rbx, %rdi
	testl	%r14d, %r14d
	je	LBB0_2
## %bb.1:
	movl	%r14d, %esi
	callq	_gfx_v10_0_update_medium_grain_clock_gating
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_gfx_v10_0_update_3d_clock_gating
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_gfx_v10_0_update_coarse_grain_clock_gating
	jmp	LBB0_3
LBB0_2:
	xorl	%esi, %esi
	callq	_gfx_v10_0_update_coarse_grain_clock_gating
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_gfx_v10_0_update_3d_clock_gating
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_gfx_v10_0_update_medium_grain_clock_gating
LBB0_3:
	movq	_AMD_CG_SUPPORT_GFX_MGCG@GOTPCREL(%rip), %rax
	movq	_AMD_CG_SUPPORT_GFX_CGLS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_AMD_CG_SUPPORT_GFX_CGCG@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_AMD_CG_SUPPORT_GFX_3D_CGCG@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_AMD_CG_SUPPORT_GFX_3D_CGLS@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	testl	%ecx, (%rbx)
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_gfx_v10_0_enable_gui_idle_interrupt
LBB0_5:
	movq	%rbx, %rdi
	callq	_amdgpu_gfx_rlc_exit_safe_mode
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AMD_CG_SUPPORT_GFX_MGCG,4,2    ## @AMD_CG_SUPPORT_GFX_MGCG
	.comm	_AMD_CG_SUPPORT_GFX_CGLS,4,2    ## @AMD_CG_SUPPORT_GFX_CGLS
	.comm	_AMD_CG_SUPPORT_GFX_CGCG,4,2    ## @AMD_CG_SUPPORT_GFX_CGCG
	.comm	_AMD_CG_SUPPORT_GFX_3D_CGCG,4,2 ## @AMD_CG_SUPPORT_GFX_3D_CGCG
	.comm	_AMD_CG_SUPPORT_GFX_3D_CGLS,4,2 ## @AMD_CG_SUPPORT_GFX_3D_CGLS
	.no_dead_strip	_gfx_v10_0_update_gfx_clock_gating
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gfx_v10_0_update_gfx_clock_gating
_gfx_v10_0_update_gfx_clock_gating:     ; @gfx_v10_0_update_gfx_clock_gating
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_amdgpu_gfx_rlc_enter_safe_mode
	mov	x0, x19
	cbz	w20, LBB0_2
; %bb.1:
	mov	x1, x20
	bl	_gfx_v10_0_update_medium_grain_clock_gating
	mov	x0, x19
	mov	x1, x20
	bl	_gfx_v10_0_update_3d_clock_gating
	mov	x0, x19
	mov	x1, x20
	bl	_gfx_v10_0_update_coarse_grain_clock_gating
	b	LBB0_3
LBB0_2:
	mov	w1, #0
	bl	_gfx_v10_0_update_coarse_grain_clock_gating
	mov	x0, x19
	mov	w1, #0
	bl	_gfx_v10_0_update_3d_clock_gating
	mov	x0, x19
	mov	w1, #0
	bl	_gfx_v10_0_update_medium_grain_clock_gating
LBB0_3:
Lloh0:
	adrp	x8, _AMD_CG_SUPPORT_GFX_MGCG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AMD_CG_SUPPORT_GFX_MGCG@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _AMD_CG_SUPPORT_GFX_CGLS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AMD_CG_SUPPORT_GFX_CGLS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _AMD_CG_SUPPORT_GFX_CGCG@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AMD_CG_SUPPORT_GFX_CGCG@GOTPAGEOFF]
	ldr	w10, [x19]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh9:
	adrp	x9, _AMD_CG_SUPPORT_GFX_3D_CGCG@GOTPAGE
Lloh10:
	ldr	x9, [x9, _AMD_CG_SUPPORT_GFX_3D_CGCG@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh12:
	adrp	x9, _AMD_CG_SUPPORT_GFX_3D_CGLS@GOTPAGE
Lloh13:
	ldr	x9, [x9, _AMD_CG_SUPPORT_GFX_3D_CGLS@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w9
	tst	w8, w10
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x19
	mov	x1, x20
	bl	_gfx_v10_0_enable_gui_idle_interrupt
LBB0_5:
	mov	x0, x19
	bl	_amdgpu_gfx_rlc_exit_safe_mode
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AMD_CG_SUPPORT_GFX_MGCG,4,2    ; @AMD_CG_SUPPORT_GFX_MGCG
	.comm	_AMD_CG_SUPPORT_GFX_CGLS,4,2    ; @AMD_CG_SUPPORT_GFX_CGLS
	.comm	_AMD_CG_SUPPORT_GFX_CGCG,4,2    ; @AMD_CG_SUPPORT_GFX_CGCG
	.comm	_AMD_CG_SUPPORT_GFX_3D_CGCG,4,2 ; @AMD_CG_SUPPORT_GFX_3D_CGCG
	.comm	_AMD_CG_SUPPORT_GFX_3D_CGLS,4,2 ; @AMD_CG_SUPPORT_GFX_3D_CGLS
	.no_dead_strip	_gfx_v10_0_update_gfx_clock_gating
.subsections_via_symbols
