	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function si_enable_smc_cac
_si_enable_smc_cac:                     ## @si_enable_smc_cac
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r13
	movq	%rdi, %rbx
	callq	_ni_get_pi
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_si_get_pi
	xorl	%r14d, %r14d
	cmpq	$0, 8(%r15)
	je	LBB0_14
## %bb.1:
	testl	%r12d, %r12d
	je	LBB0_9
## %bb.2:
	movq	%rax, %r12
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_si_should_disable_uvd_powertune
	testl	%eax, %eax
	jne	LBB0_14
## %bb.3:
	cmpl	$0, (%r15)
	je	LBB0_6
## %bb.4:
	movq	_PPSMC_CACLongTermAvgEnable@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_amdgpu_si_send_msg_to_smc
	movq	_PPSMC_Result_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.5:
	movl	$0, (%r15)
LBB0_6:
	movq	_PPSMC_MSG_EnableCac@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_amdgpu_si_send_msg_to_smc
	movq	_PPSMC_Result_OK@GOTPCREL(%rip), %r13
	movq	_EINVAL@GOTPCREL(%rip), %rsi
	xorl	%ecx, %ecx
	xorl	%r14d, %r14d
	subl	(%rsi), %r14d
	xorl	%edx, %edx
	cmpq	(%r13), %rax
	cmovel	%ecx, %r14d
	sete	%dl
	movl	%edx, 4(%r15)
	cmpq	$0, (%r12)
	je	LBB0_14
## %bb.7:
	movq	%rsi, %r15
	movq	_PPSMC_MSG_EnableDTE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_amdgpu_si_send_msg_to_smc
	cmpq	(%r13), %rax
	je	LBB0_14
## %bb.8:
	xorl	%r14d, %r14d
	subl	(%r15), %r14d
	jmp	LBB0_14
LBB0_9:
	cmpl	$0, 4(%r15)
	je	LBB0_14
## %bb.10:
	cmpq	$0, (%rax)
	je	LBB0_12
## %bb.11:
	movq	_PPSMC_MSG_DisableDTE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_amdgpu_si_send_msg_to_smc
LBB0_12:
	movq	_PPSMC_MSG_DisableCac@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_amdgpu_si_send_msg_to_smc
	movl	$0, 4(%r15)
	cmpl	$0, (%r15)
	je	LBB0_14
## %bb.13:
	movq	_PPSMC_CACLongTermAvgDisable@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_amdgpu_si_send_msg_to_smc
LBB0_14:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PPSMC_CACLongTermAvgEnable,4,2 ## @PPSMC_CACLongTermAvgEnable
	.comm	_PPSMC_Result_OK,8,3            ## @PPSMC_Result_OK
	.comm	_PPSMC_MSG_EnableCac,4,2        ## @PPSMC_MSG_EnableCac
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PPSMC_MSG_EnableDTE,4,2        ## @PPSMC_MSG_EnableDTE
	.comm	_PPSMC_MSG_DisableDTE,4,2       ## @PPSMC_MSG_DisableDTE
	.comm	_PPSMC_MSG_DisableCac,4,2       ## @PPSMC_MSG_DisableCac
	.comm	_PPSMC_CACLongTermAvgDisable,4,2 ## @PPSMC_CACLongTermAvgDisable
	.no_dead_strip	_si_enable_smc_cac
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function si_enable_smc_cac
_si_enable_smc_cac:                     ; @si_enable_smc_cac
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x23, x2
	mov	x22, x1
	mov	x19, x0
	bl	_ni_get_pi
	mov	x20, x0
	mov	x0, x19
	bl	_si_get_pi
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_14
; %bb.1:
	mov	x21, x0
	cbz	w23, LBB0_9
; %bb.2:
	mov	x0, x19
	mov	x1, x22
	bl	_si_should_disable_uvd_powertune
	cbnz	w0, LBB0_14
; %bb.3:
	ldr	w8, [x20]
Lloh0:
	adrp	x23, _PPSMC_Result_OK@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PPSMC_Result_OK@GOTPAGEOFF]
	cbz	w8, LBB0_6
; %bb.4:
Lloh2:
	adrp	x8, _PPSMC_CACLongTermAvgEnable@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PPSMC_CACLongTermAvgEnable@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_amdgpu_si_send_msg_to_smc
	ldr	x8, [x23]
	cmp	x0, x8
	b.eq	LBB0_6
; %bb.5:
	str	wzr, [x20]
LBB0_6:
Lloh5:
	adrp	x8, _PPSMC_MSG_EnableCac@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PPSMC_MSG_EnableCac@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_amdgpu_si_send_msg_to_smc
	ldr	x8, [x23]
	cmp	x0, x8
	cset	w8, eq
Lloh8:
	adrp	x24, _EINVAL@GOTPAGE
Lloh9:
	ldr	x24, [x24, _EINVAL@GOTPAGEOFF]
	ldr	w9, [x24]
	csneg	w22, wzr, w9, eq
	str	w8, [x20, #4]
	ldr	x8, [x21]
	cbz	x8, LBB0_15
; %bb.7:
Lloh10:
	adrp	x8, _PPSMC_MSG_EnableDTE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PPSMC_MSG_EnableDTE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_amdgpu_si_send_msg_to_smc
	ldr	x8, [x23]
	cmp	x0, x8
	b.eq	LBB0_15
; %bb.8:
	ldr	w8, [x24]
	neg	w22, w8
	b	LBB0_15
LBB0_9:
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_14
; %bb.10:
	ldr	x8, [x21]
	cbz	x8, LBB0_12
; %bb.11:
Lloh13:
	adrp	x8, _PPSMC_MSG_DisableDTE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PPSMC_MSG_DisableDTE@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_amdgpu_si_send_msg_to_smc
LBB0_12:
Lloh16:
	adrp	x8, _PPSMC_MSG_DisableCac@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PPSMC_MSG_DisableCac@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_amdgpu_si_send_msg_to_smc
	str	wzr, [x20, #4]
	ldr	w8, [x20]
	cbz	w8, LBB0_14
; %bb.13:
Lloh19:
	adrp	x8, _PPSMC_CACLongTermAvgDisable@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PPSMC_CACLongTermAvgDisable@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_amdgpu_si_send_msg_to_smc
LBB0_14:
	mov	w22, #0
LBB0_15:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_PPSMC_CACLongTermAvgEnable,4,2 ; @PPSMC_CACLongTermAvgEnable
	.comm	_PPSMC_Result_OK,8,3            ; @PPSMC_Result_OK
	.comm	_PPSMC_MSG_EnableCac,4,2        ; @PPSMC_MSG_EnableCac
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PPSMC_MSG_EnableDTE,4,2        ; @PPSMC_MSG_EnableDTE
	.comm	_PPSMC_MSG_DisableDTE,4,2       ; @PPSMC_MSG_DisableDTE
	.comm	_PPSMC_MSG_DisableCac,4,2       ; @PPSMC_MSG_DisableCac
	.comm	_PPSMC_CACLongTermAvgDisable,4,2 ; @PPSMC_CACLongTermAvgDisable
	.no_dead_strip	_si_enable_smc_cac
.subsections_via_symbols
