	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ni_calculate_power_boost_limit
_ni_calculate_power_boost_limit:        ## @ni_calculate_power_boost_limit
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_ni_get_ps
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_evergreen_get_pi
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_ni_get_pi
	cmpq	$0, 8(%rax)
	je	LBB0_9
## %bb.1:
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.2:
	movl	(%r15), %eax
	cmpl	$3, %eax
	jl	LBB0_9
## %bb.3:
	movq	8(%r15), %rcx
	addl	$-2, %eax
	movl	(%rcx,%rax,4), %edx
	leaq	-36(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_ni_populate_voltage_value
	testl	%eax, %eax
	jne	LBB0_9
## %bb.4:
	leaq	-36(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_ni_get_std_voltage_value
	testl	%eax, %eax
	jne	LBB0_9
## %bb.5:
	movq	8(%r15), %rax
	movslq	(%r15), %rcx
	movl	-4(%rax,%rcx,4), %edx
	leaq	-36(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_ni_populate_voltage_value
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:
	leaq	-36(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_ni_get_std_voltage_value
	testl	%eax, %eax
	je	LBB0_11
LBB0_9:
	xorl	%eax, %eax
LBB0_10:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	-56(%rbp), %eax
	imull	%eax, %r14d
	imull	%eax, %r14d
	imull	$90, %r14d, %edi
	movl	-48(%rbp), %eax
	imull	%eax, %eax
	imull	$100, %eax, %esi
	callq	_div64_u64
	cltq
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ni_calculate_power_boost_limit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ni_calculate_power_boost_limit
_ni_calculate_power_boost_limit:        ; @ni_calculate_power_boost_limit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x2
	mov	x20, x0
	mov	x0, x1
	bl	_ni_get_ps
	mov	x22, x0
	mov	x0, x20
	bl	_evergreen_get_pi
	mov	x21, x0
	mov	x0, x20
	bl	_ni_get_pi
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_7
; %bb.1:
	ldr	x8, [x0]
	cbz	x8, LBB0_7
; %bb.2:
	ldr	w8, [x22]
	cmp	w8, #3
	b.lt	LBB0_7
; %bb.3:
	ldr	x9, [x22, #8]
	sub	w8, w8, #2
	ldr	w2, [x9, w8, uxtw #2]
	add	x3, sp, #28
	mov	x0, x20
	mov	x1, x21
	bl	_ni_populate_voltage_value
	cbnz	w0, LBB0_7
; %bb.4:
	add	x1, sp, #28
	add	x2, sp, #16
	mov	x0, x20
	bl	_ni_get_std_voltage_value
	cbnz	w0, LBB0_7
; %bb.5:
	ldr	x8, [x22, #8]
	ldrsw	x9, [x22]
	add	x8, x8, x9, lsl #2
	ldur	w2, [x8, #-4]
	add	x3, sp, #28
	mov	x0, x20
	mov	x1, x21
	bl	_ni_populate_voltage_value
	cbnz	w0, LBB0_7
; %bb.6:
	add	x1, sp, #28
	add	x2, sp, #8
	mov	x0, x20
	bl	_ni_get_std_voltage_value
	cbz	w0, LBB0_9
LBB0_7:
	mov	x0, #0
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_9:
	ldr	w8, [sp, #16]
	mul	w9, w19, w8
	mul	w8, w9, w8
	mov	w9, #90
	mul	w0, w8, w9
	ldr	w8, [sp, #8]
	mul	w8, w8, w8
	mov	w9, #100
	mul	w1, w8, w9
	bl	_div64_u64
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x0, w0
	b	LBB0_8
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ni_calculate_power_boost_limit
.subsections_via_symbols
