	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uvd_v4_2_set_dcm
_uvd_v4_2_set_dcm:                      ## @uvd_v4_2_set_dcm
	.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
	movl	%esi, %r14d
	movq	_UVD_CGC_GATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_REGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_WREG32_FIELD
	movq	_mmUVD_CGC_CTRL@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_RREG32
	movq	_UVD_CGC_CTRL__CLK_OFF_DELAY_MASK@GOTPCREL(%rip), %rcx
	movq	_UVD_CGC_CTRL__CLK_GATE_DLY_TIMER_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movq	_UVD_CGC_CTRL__CLK_OFF_DELAY__SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$4, %eax
	shll	%cl, %eax
	movq	_UVD_CGC_CTRL__DYN_CLOCK_MODE_MASK@GOTPCREL(%rip), %rcx
	movq	_UVD_CGC_CTRL__CLK_GATE_DLY_TIMER__SHIFT@GOTPCREL(%rip), %rdx
	orl	(%rcx), %esi
	movb	(%rdx), %cl
	btsl	%ecx, %esi
	orl	%eax, %esi
	testl	%r14d, %r14d
	je	LBB0_2
## %bb.1:
	movq	_UVD_CGC_CTRL2__DYN_OCLK_RAMP_EN_MASK@GOTPCREL(%rip), %rax
	movq	_UVD_CGC_CTRL2__DYN_RCLK_RAMP_EN_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	andl	$-2147481601, %esi              ## imm = 0x800007FF
	movq	_UVD_CGC_CTRL2__GATER_DIV_ID__SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$7, %ebx
	shll	%cl, %ebx
	orl	%edx, %ebx
	jmp	LBB0_3
LBB0_2:
	orl	$2147481600, %esi               ## imm = 0x7FFFF800
LBB0_3:
	movl	(%r15), %edi
	callq	_WREG32
	movq	_ixUVD_CGC_CTRL2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WREG32_UVD_CTX                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_UVD_CGC_GATE,4,2               ## @UVD_CGC_GATE
	.comm	_REGS,4,2                       ## @REGS
	.comm	_mmUVD_CGC_CTRL,4,2             ## @mmUVD_CGC_CTRL
	.comm	_UVD_CGC_CTRL__CLK_OFF_DELAY_MASK,4,2 ## @UVD_CGC_CTRL__CLK_OFF_DELAY_MASK
	.comm	_UVD_CGC_CTRL__CLK_GATE_DLY_TIMER_MASK,4,2 ## @UVD_CGC_CTRL__CLK_GATE_DLY_TIMER_MASK
	.comm	_UVD_CGC_CTRL__DYN_CLOCK_MODE_MASK,4,2 ## @UVD_CGC_CTRL__DYN_CLOCK_MODE_MASK
	.comm	_UVD_CGC_CTRL__CLK_GATE_DLY_TIMER__SHIFT,4,2 ## @UVD_CGC_CTRL__CLK_GATE_DLY_TIMER__SHIFT
	.comm	_UVD_CGC_CTRL__CLK_OFF_DELAY__SHIFT,4,2 ## @UVD_CGC_CTRL__CLK_OFF_DELAY__SHIFT
	.comm	_UVD_CGC_CTRL2__DYN_OCLK_RAMP_EN_MASK,4,2 ## @UVD_CGC_CTRL2__DYN_OCLK_RAMP_EN_MASK
	.comm	_UVD_CGC_CTRL2__DYN_RCLK_RAMP_EN_MASK,4,2 ## @UVD_CGC_CTRL2__DYN_RCLK_RAMP_EN_MASK
	.comm	_UVD_CGC_CTRL2__GATER_DIV_ID__SHIFT,4,2 ## @UVD_CGC_CTRL2__GATER_DIV_ID__SHIFT
	.comm	_ixUVD_CGC_CTRL2,4,2            ## @ixUVD_CGC_CTRL2
	.no_dead_strip	_uvd_v4_2_set_dcm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uvd_v4_2_set_dcm
_uvd_v4_2_set_dcm:                      ; @uvd_v4_2_set_dcm
	.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	x19, x1
Lloh0:
	adrp	x8, _UVD_CGC_GATE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UVD_CGC_GATE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _REGS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REGS@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_WREG32_FIELD
Lloh6:
	adrp	x20, _mmUVD_CGC_CTRL@GOTPAGE
Lloh7:
	ldr	x20, [x20, _mmUVD_CGC_CTRL@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_RREG32
Lloh8:
	adrp	x8, _UVD_CGC_CTRL__CLK_OFF_DELAY_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _UVD_CGC_CTRL__CLK_OFF_DELAY_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _UVD_CGC_CTRL__CLK_GATE_DLY_TIMER_MASK@GOTPAGE
Lloh12:
	ldr	x9, [x9, _UVD_CGC_CTRL__CLK_GATE_DLY_TIMER_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w8, w0, w8
Lloh14:
	adrp	x9, _UVD_CGC_CTRL__DYN_CLOCK_MODE_MASK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _UVD_CGC_CTRL__DYN_CLOCK_MODE_MASK@GOTPAGEOFF]
Lloh16:
	adrp	x10, _UVD_CGC_CTRL__CLK_GATE_DLY_TIMER__SHIFT@GOTPAGE
Lloh17:
	ldr	x10, [x10, _UVD_CGC_CTRL__CLK_GATE_DLY_TIMER__SHIFT@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
Lloh19:
	ldr	w10, [x10]
	mov	w11, #1
	lsl	w10, w11, w10
Lloh20:
	adrp	x11, _UVD_CGC_CTRL__CLK_OFF_DELAY__SHIFT@GOTPAGE
Lloh21:
	ldr	x11, [x11, _UVD_CGC_CTRL__CLK_OFF_DELAY__SHIFT@GOTPAGEOFF]
Lloh22:
	ldr	w11, [x11]
	mov	w12, #4
	lsl	w11, w12, w11
	orr	w8, w8, w9
	orr	w8, w8, w10
	orr	w8, w8, w11
	cbz	w19, LBB0_2
; %bb.1:
Lloh23:
	adrp	x9, _UVD_CGC_CTRL2__DYN_OCLK_RAMP_EN_MASK@GOTPAGE
Lloh24:
	ldr	x9, [x9, _UVD_CGC_CTRL2__DYN_OCLK_RAMP_EN_MASK@GOTPAGEOFF]
	and	w1, w8, #0x800007ff
Lloh25:
	ldr	w8, [x9]
Lloh26:
	adrp	x9, _UVD_CGC_CTRL2__DYN_RCLK_RAMP_EN_MASK@GOTPAGE
Lloh27:
	ldr	x9, [x9, _UVD_CGC_CTRL2__DYN_RCLK_RAMP_EN_MASK@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh29:
	adrp	x9, _UVD_CGC_CTRL2__GATER_DIV_ID__SHIFT@GOTPAGE
Lloh30:
	ldr	x9, [x9, _UVD_CGC_CTRL2__GATER_DIV_ID__SHIFT@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	mov	w10, #7
	lsl	w9, w10, w9
	orr	w19, w8, w9
	b	LBB0_3
LBB0_2:
	orr	w1, w8, #0x7ffff800
LBB0_3:
	ldr	w0, [x20]
	bl	_WREG32
Lloh32:
	adrp	x8, _ixUVD_CGC_CTRL2@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ixUVD_CGC_CTRL2@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
	mov	x1, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_WREG32_UVD_CTX
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh18
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_UVD_CGC_GATE,4,2               ; @UVD_CGC_GATE
	.comm	_REGS,4,2                       ; @REGS
	.comm	_mmUVD_CGC_CTRL,4,2             ; @mmUVD_CGC_CTRL
	.comm	_UVD_CGC_CTRL__CLK_OFF_DELAY_MASK,4,2 ; @UVD_CGC_CTRL__CLK_OFF_DELAY_MASK
	.comm	_UVD_CGC_CTRL__CLK_GATE_DLY_TIMER_MASK,4,2 ; @UVD_CGC_CTRL__CLK_GATE_DLY_TIMER_MASK
	.comm	_UVD_CGC_CTRL__DYN_CLOCK_MODE_MASK,4,2 ; @UVD_CGC_CTRL__DYN_CLOCK_MODE_MASK
	.comm	_UVD_CGC_CTRL__CLK_GATE_DLY_TIMER__SHIFT,4,2 ; @UVD_CGC_CTRL__CLK_GATE_DLY_TIMER__SHIFT
	.comm	_UVD_CGC_CTRL__CLK_OFF_DELAY__SHIFT,4,2 ; @UVD_CGC_CTRL__CLK_OFF_DELAY__SHIFT
	.comm	_UVD_CGC_CTRL2__DYN_OCLK_RAMP_EN_MASK,4,2 ; @UVD_CGC_CTRL2__DYN_OCLK_RAMP_EN_MASK
	.comm	_UVD_CGC_CTRL2__DYN_RCLK_RAMP_EN_MASK,4,2 ; @UVD_CGC_CTRL2__DYN_RCLK_RAMP_EN_MASK
	.comm	_UVD_CGC_CTRL2__GATER_DIV_ID__SHIFT,4,2 ; @UVD_CGC_CTRL2__GATER_DIV_ID__SHIFT
	.comm	_ixUVD_CGC_CTRL2,4,2            ; @ixUVD_CGC_CTRL2
	.no_dead_strip	_uvd_v4_2_set_dcm
.subsections_via_symbols
