	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ni_enable_power_containment
_ni_enable_power_containment:           ## @ni_enable_power_containment
	.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, %r13d
	movq	%rsi, %r12
	movq	%rdi, %r15
	callq	_ni_get_pi
	xorl	%ebx, %ebx
	cmpq	$0, 8(%rax)
	je	LBB0_8
## %bb.1:
	movq	%rax, %r14
	testl	%r13d, %r13d
	je	LBB0_6
## %bb.2:
	movl	(%r12), %esi
	movl	4(%r12), %edi
	callq	_r600_is_uvd_state
	testl	%eax, %eax
	jne	LBB0_8
## %bb.3:
	movq	_PPSMC_TDPClampingActive@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_rv770_send_msg_to_smc
	movq	_PPSMC_Result_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	xorl	%ebx, %ebx
	movl	$1, %ecx
	jmp	LBB0_7
LBB0_6:
	movq	_PPSMC_TDPClampingInactive@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_rv770_send_msg_to_smc
	movq	_PPSMC_Result_OK@GOTPCREL(%rip), %rdx
	movq	_EINVAL@GOTPCREL(%rip), %rsi
	xorl	%ecx, %ecx
	xorl	%ebx, %ebx
	subl	(%rsi), %ebx
	cmpq	(%rdx), %rax
	cmovel	%ecx, %ebx
	jmp	LBB0_7
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ecx, (%r14)
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PPSMC_TDPClampingActive,4,2    ## @PPSMC_TDPClampingActive
	.comm	_PPSMC_Result_OK,8,3            ## @PPSMC_Result_OK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PPSMC_TDPClampingInactive,4,2  ## @PPSMC_TDPClampingInactive
	.no_dead_strip	_ni_enable_power_containment
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ni_enable_power_containment
_ni_enable_power_containment:           ; @ni_enable_power_containment
	.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	x22, x2
	mov	x21, x1
	mov	x20, x0
	bl	_ni_get_pi
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x19, x0
	cbz	w22, LBB0_4
; %bb.2:
	ldp	w1, w0, [x21]
	bl	_r600_is_uvd_state
	cbz	w0, LBB0_5
LBB0_3:
	mov	w0, #0
	b	LBB0_9
LBB0_4:
Lloh0:
	adrp	x8, _PPSMC_TDPClampingInactive@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PPSMC_TDPClampingInactive@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rv770_send_msg_to_smc
	mov	w8, #0
Lloh3:
	adrp	x9, _PPSMC_Result_OK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PPSMC_Result_OK@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _EINVAL@GOTPAGE
Lloh7:
	ldr	x10, [x10, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	cmp	x0, x9
	csneg	w0, wzr, w10, eq
	b	LBB0_8
LBB0_5:
Lloh9:
	adrp	x8, _PPSMC_TDPClampingActive@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PPSMC_TDPClampingActive@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rv770_send_msg_to_smc
Lloh12:
	adrp	x8, _PPSMC_Result_OK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PPSMC_Result_OK@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.6:
	mov	w0, #0
	mov	w8, #1
	b	LBB0_8
LBB0_7:
	mov	w8, #0
Lloh15:
	adrp	x9, _EINVAL@GOTPAGE
Lloh16:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	neg	w0, w9
LBB0_8:
	str	w8, [x19]
LBB0_9:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_PPSMC_TDPClampingActive,4,2    ; @PPSMC_TDPClampingActive
	.comm	_PPSMC_Result_OK,8,3            ; @PPSMC_Result_OK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PPSMC_TDPClampingInactive,4,2  ; @PPSMC_TDPClampingInactive
	.no_dead_strip	_ni_enable_power_containment
.subsections_via_symbols
