	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smu7_power_control_set_level   ## -- Begin function smu7_power_control_set_level
	.p2align	4, 0x90
_smu7_power_control_set_level:          ## @smu7_power_control_set_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_PP_TABLE_V1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	40(%rbx), %rax
	jmp	LBB0_3
LBB0_2:
	leaq	32(%rbx), %rax
LBB0_3:
	movq	(%rax), %r14
	movq	_PHM_PlatformCaps_PowerContainment@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PP_CAP
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movl	16(%rbx), %eax
	movl	%eax, %ecx
	negl	%ecx
	cmpq	$0, 24(%rbx)
	cmovnel	%eax, %ecx
	movq	8(%rbx), %rax
	movq	_CHIP_TONGA@GOTPCREL(%rip), %rdx
	xorl	%esi, %esi
	cmpq	(%rdx), %rax
	setle	%sil
	shll	$8, %ecx
	addl	$25600, %ecx                    ## imm = 0x6400
	imull	(%r14,%rsi,4), %ecx
	movslq	%ecx, %rax
	imulq	$1374389535, %rax, %rsi         ## imm = 0x51EB851F
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$37, %rsi
	addl	%eax, %esi
	movq	%rbx, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_smu7_set_overdriver_target_tdp ## TAILCALL
LBB0_4:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PP_TABLE_V1,8,3                ## @PP_TABLE_V1
	.comm	_PHM_PlatformCaps_PowerContainment,4,2 ## @PHM_PlatformCaps_PowerContainment
	.comm	_CHIP_TONGA,8,3                 ## @CHIP_TONGA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smu7_power_control_set_level   ; -- Begin function smu7_power_control_set_level
	.p2align	2
_smu7_power_control_set_level:          ; @smu7_power_control_set_level
	.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, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _PP_TABLE_V1@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PP_TABLE_V1@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x19, #40]
	b	LBB0_3
LBB0_2:
	add	x8, x19, #32
LBB0_3:
	ldr	x20, [x8]
Lloh3:
	adrp	x8, _PHM_PlatformCaps_PowerContainment@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PHM_PlatformCaps_PowerContainment@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_PP_CAP
	cbz	x0, LBB0_5
; %bb.4:
	ldr	x8, [x19, #24]
	ldr	w9, [x19, #16]
	cmp	x8, #0
	cneg	w8, w9, eq
	ldr	x9, [x19, #8]
Lloh6:
	adrp	x10, _CHIP_TONGA@GOTPAGE
Lloh7:
	ldr	x10, [x10, _CHIP_TONGA@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x9, x10
	cset	w9, le
	ldr	w9, [x20, w9, uxtw #2]
	mov	w10, #25600
	add	w8, w10, w8, lsl #8
	mul	w8, w8, w9
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w1, w8, w9
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_smu7_set_overdriver_target_tdp
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 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	_PP_TABLE_V1,8,3                ; @PP_TABLE_V1
	.comm	_PHM_PlatformCaps_PowerContainment,4,2 ; @PHM_PlatformCaps_PowerContainment
	.comm	_CHIP_TONGA,8,3                 ; @CHIP_TONGA
.subsections_via_symbols
