	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smu8_get_performance_level
_smu8_get_performance_level:            ## @smu8_get_performance_level
	.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
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.1:
	movq	%rdi, %r14
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	movq	%r8, %r15
	testq	%r8, %r8
	je	LBB0_3
## %bb.4:
	movl	%ecx, %ebx
	movq	%rdx, %r12
	movq	(%r14), %r13
	movq	%rsi, %rdi
	callq	_cast_const_smu8_power_state
	movl	(%rax), %esi
	leal	-1(%rsi), %edx
	cmpl	%ebx, %esi
	cmovgl	%ebx, %edx
	movq	8(%rax), %rax
	movslq	%edx, %r8
	shlq	$4, %r8
	movq	(%rax,%r8), %rcx
	movq	%rcx, (%r15)
	movq	_PHM_PerformanceLevelDesignation_PowerContainment@GOTPCREL(%rip), %rcx
	cmpq	%r12, (%rcx)
	jne	LBB0_10
## %bb.5:
	cmpl	$2, %esi
	jl	LBB0_10
## %bb.6:
	movq	(%r13), %rdi
	shlq	$4, %rsi
	movl	$16, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax,%rbx), %rcx
	cmpq	%rdi, %rcx
	jg	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_8 Depth=1
	addq	$16, %rbx
	cmpq	%rbx, %rsi
	jne	LBB0_8
	jmp	LBB0_10
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_9:
	movq	%rcx, (%r15)
LBB0_10:
	movq	_SMU8_NUM_NBPMEMORYCLOCK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	decl	%ecx
	xorl	%ebx, %ebx
	testl	%edx, %edx
	movq	8(%r13), %rdx
	cmovnel	%ebx, %ecx
	movslq	%ecx, %rcx
	movl	(%rdx,%rcx,4), %ecx
	movl	%ecx, 32(%r15)
	movl	8(%rax,%r8), %esi
	movq	%r14, %rdi
	callq	_smu8_convert_8Bit_index_to_voltage
                                        ## kill: def $eax killed $eax def $rax
	leal	2(%rax), %ecx
	addl	$5, %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	sarl	$2, %eax
	movl	%eax, 8(%r15)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%r15)
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PHM_PerformanceLevelDesignation_PowerContainment,8,3 ## @PHM_PerformanceLevelDesignation_PowerContainment
	.comm	_SMU8_NUM_NBPMEMORYCLOCK,4,2    ## @SMU8_NUM_NBPMEMORYCLOCK
	.no_dead_strip	_smu8_get_performance_level
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smu8_get_performance_level
_smu8_get_performance_level:            ; @smu8_get_performance_level
	.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
	cbz	x1, LBB0_7
; %bb.1:
	mov	x20, x0
	cbz	x0, LBB0_7
; %bb.2:
	mov	x19, x4
	cbz	x4, LBB0_7
; %bb.3:
	mov	x22, x3
	mov	x21, x2
	ldr	x23, [x20]
	mov	x0, x1
	bl	_cast_const_smu8_power_state
	ldr	w12, [x0]
	sub	w8, w12, #1
	cmp	w12, w22
	csel	w10, w22, w8, gt
	ldr	x8, [x0, #8]
	sxtw	x9, w10
	sbfiz	x10, x10, #4, #32
	ldr	x10, [x8, x10]
	str	x10, [x19]
Lloh0:
	adrp	x10, _PHM_PerformanceLevelDesignation_PowerContainment@GOTPAGE
Lloh1:
	ldr	x10, [x10, _PHM_PerformanceLevelDesignation_PowerContainment@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x10, x21
	ccmp	w12, #2, #8, eq
	b.lt	LBB0_9
; %bb.4:
	ldr	x10, [x23]
	add	x11, x8, #16
	sub	x12, x12, #1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x11]
	cmp	x13, x10
	b.gt	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x11, x11, #16
	subs	x12, x12, #1
	b.ne	LBB0_5
	b	LBB0_9
LBB0_7:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_8:
	str	x13, [x19]
LBB0_9:
	ldr	x10, [x23, #8]
Lloh6:
	adrp	x11, _SMU8_NUM_NBPMEMORYCLOCK@GOTPAGE
Lloh7:
	ldr	x11, [x11, _SMU8_NUM_NBPMEMORYCLOCK@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	sub	w11, w11, #1
	cmp	w9, #0
	csel	w11, w11, wzr, eq
	ldr	w10, [x10, w11, sxtw #2]
	str	w10, [x19, #32]
	add	x8, x8, x9, lsl #4
	ldr	w1, [x8, #8]
	mov	x0, x20
	bl	_smu8_convert_8Bit_index_to_voltage
	mov	x8, x0
	mov	w0, #0
	add	w9, w8, #2
	add	w8, w8, #5
	cmp	w9, #0
	csel	w8, w8, w9, lt
	asr	w8, w8, #2
	str	w8, [x19, #8]
	stp	xzr, xzr, [x19, #16]
LBB0_10:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PHM_PerformanceLevelDesignation_PowerContainment,8,3 ; @PHM_PerformanceLevelDesignation_PowerContainment
	.comm	_SMU8_NUM_NBPMEMORYCLOCK,4,2    ; @SMU8_NUM_NBPMEMORYCLOCK
	.no_dead_strip	_smu8_get_performance_level
.subsections_via_symbols
