	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vce_v1_0_enable_mgcg           ## -- Begin function vce_v1_0_enable_mgcg
	.p2align	4, 0x90
_vce_v1_0_enable_mgcg:                  ## @vce_v1_0_enable_mgcg
	.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_3
## %bb.1:
	movq	_RADEON_CG_SUPPORT_VCE_MGCG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_3
## %bb.2:
	movq	_VCE_CLOCK_GATING_A@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_RREG32
	movq	_CGC_DYN_CLOCK_MODE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_WREG32
	movq	_VCE_UENC_CLOCK_GATING@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_RREG32
                                        ## kill: def $eax killed $eax def $rax
	andl	$6295551, %eax                  ## imm = 0x600FFF
	leal	-8388608(%rax), %esi
	movl	(%rbx), %edi
	callq	_WREG32
	movq	_VCE_UENC_REG_CLOCK_GATING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	andl	$-1024, %eax                    ## imm = 0xFC00
	jmp	LBB0_4
LBB0_3:
	movq	_VCE_CLOCK_GATING_A@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_RREG32
	movq	_CGC_DYN_CLOCK_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	(%rbx), %edi
	callq	_WREG32
	movq	_VCE_UENC_CLOCK_GATING@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_RREG32
                                        ## kill: def $eax killed $eax def $rax
	andl	$6295551, %eax                  ## imm = 0x600FFF
	leal	2093056(%rax), %esi
	movl	(%rbx), %edi
	callq	_WREG32
	movq	_VCE_UENC_REG_CLOCK_GATING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	orl	$1023, %eax                     ## imm = 0x3FF
LBB0_4:
	movq	_VCE_UENC_REG_CLOCK_GATING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_WREG32                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RADEON_CG_SUPPORT_VCE_MGCG,4,2 ## @RADEON_CG_SUPPORT_VCE_MGCG
	.comm	_VCE_CLOCK_GATING_A,4,2         ## @VCE_CLOCK_GATING_A
	.comm	_CGC_DYN_CLOCK_MODE,4,2         ## @CGC_DYN_CLOCK_MODE
	.comm	_VCE_UENC_CLOCK_GATING,4,2      ## @VCE_UENC_CLOCK_GATING
	.comm	_VCE_UENC_REG_CLOCK_GATING,4,2  ## @VCE_UENC_REG_CLOCK_GATING
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vce_v1_0_enable_mgcg           ; -- Begin function vce_v1_0_enable_mgcg
	.p2align	2
_vce_v1_0_enable_mgcg:                  ; @vce_v1_0_enable_mgcg
	.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	w20, #4095
	movk	w20, #96, lsl #16
Lloh0:
	adrp	x19, _VCE_UENC_REG_CLOCK_GATING@GOTPAGE
Lloh1:
	ldr	x19, [x19, _VCE_UENC_REG_CLOCK_GATING@GOTPAGEOFF]
	cbz	w1, LBB0_3
; %bb.1:
	ldr	w8, [x0]
Lloh2:
	adrp	x9, _RADEON_CG_SUPPORT_VCE_MGCG@GOTPAGE
Lloh3:
	ldr	x9, [x9, _RADEON_CG_SUPPORT_VCE_MGCG@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
Lloh5:
	adrp	x21, _VCE_CLOCK_GATING_A@GOTPAGE
Lloh6:
	ldr	x21, [x21, _VCE_CLOCK_GATING_A@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_RREG32
Lloh7:
	adrp	x8, _CGC_DYN_CLOCK_MODE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CGC_DYN_CLOCK_MODE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	orr	w1, w8, w0
	ldr	w0, [x21]
	bl	_WREG32
Lloh10:
	adrp	x21, _VCE_UENC_CLOCK_GATING@GOTPAGE
Lloh11:
	ldr	x21, [x21, _VCE_UENC_CLOCK_GATING@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_RREG32
	and	w8, w0, w20
	orr	w1, w8, #0xff800000
	ldr	w0, [x21]
	bl	_WREG32
	ldr	w0, [x19]
	bl	_RREG32
	and	w1, w0, #0xfffffc00
	b	LBB0_4
LBB0_3:
Lloh12:
	adrp	x21, _VCE_CLOCK_GATING_A@GOTPAGE
Lloh13:
	ldr	x21, [x21, _VCE_CLOCK_GATING_A@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_RREG32
Lloh14:
	adrp	x8, _CGC_DYN_CLOCK_MODE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CGC_DYN_CLOCK_MODE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	bic	w1, w0, w8
	ldr	w0, [x21]
	bl	_WREG32
Lloh17:
	adrp	x21, _VCE_UENC_CLOCK_GATING@GOTPAGE
Lloh18:
	ldr	x21, [x21, _VCE_UENC_CLOCK_GATING@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_RREG32
	and	w8, w0, w20
	orr	w1, w8, #0x1ff000
	ldr	w0, [x21]
	bl	_WREG32
	ldr	w0, [x19]
	bl	_RREG32
	orr	w1, w0, #0x3ff
LBB0_4:
	ldr	w0, [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	_WREG32
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_RADEON_CG_SUPPORT_VCE_MGCG,4,2 ; @RADEON_CG_SUPPORT_VCE_MGCG
	.comm	_VCE_CLOCK_GATING_A,4,2         ; @VCE_CLOCK_GATING_A
	.comm	_CGC_DYN_CLOCK_MODE,4,2         ; @CGC_DYN_CLOCK_MODE
	.comm	_VCE_UENC_CLOCK_GATING,4,2      ; @VCE_UENC_CLOCK_GATING
	.comm	_VCE_UENC_REG_CLOCK_GATING,4,2  ; @VCE_UENC_REG_CLOCK_GATING
.subsections_via_symbols
