	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arcturus_upload_dpm_level
_arcturus_upload_dpm_level:             ## @arcturus_upload_dpm_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
	movl	%edx, %r15d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_SMU_FEATURE_DPM_GFXCLK_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_smu_feature_is_enabled
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	_FEATURE_DPM_GFXCLK_MASK@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_7
## %bb.2:
	xorl	%r13d, %r13d
	testl	%r14d, %r14d
	sete	%r13b
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movzwl	16(%rax,%r13,4), %eax
	jne	LBB0_3
## %bb.4:
	movq	_SMU_MSG_SetSoftMinByFreq@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_3:
	movq	_SMU_MSG_SetSoftMaxByFreq@GOTPCREL(%rip), %rcx
LBB0_5:
	movl	(%rcx), %esi
	movq	_PPCLK_GFXCLK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	shll	$16, %edx
	orl	%eax, %edx
	movq	%rbx, %rdi
	callq	_smu_send_smc_msg_with_param
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_21
LBB0_7:
	movq	_SMU_FEATURE_DPM_UCLK_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_smu_feature_is_enabled
	testq	%rax, %rax
	je	LBB0_14
## %bb.8:
	movq	_FEATURE_DPM_UCLK_MASK@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_14
## %bb.9:
	xorl	%r13d, %r13d
	testl	%r14d, %r14d
	sete	%r13b
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movzwl	8(%rax,%r13,4), %eax
	jne	LBB0_10
## %bb.11:
	movq	_SMU_MSG_SetSoftMinByFreq@GOTPCREL(%rip), %rcx
	jmp	LBB0_12
LBB0_10:
	movq	_SMU_MSG_SetSoftMaxByFreq@GOTPCREL(%rip), %rcx
LBB0_12:
	movl	(%rcx), %esi
	movq	_PPCLK_UCLK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	shll	$16, %edx
	orl	%eax, %edx
	movq	%rbx, %rdi
	callq	_smu_send_smc_msg_with_param
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	movl	%eax, %r12d
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_21
LBB0_14:
	movq	_SMU_FEATURE_DPM_SOCCLK_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_smu_feature_is_enabled
	xorl	%r12d, %r12d
	testq	%rax, %rax
	je	LBB0_22
## %bb.15:
	movq	_FEATURE_DPM_SOCCLK_MASK@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_22
## %bb.16:
	xorl	%r13d, %r13d
	testl	%r14d, %r14d
	sete	%r13b
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movzwl	(%rax,%r13,4), %eax
	jne	LBB0_17
## %bb.18:
	movq	_SMU_MSG_SetSoftMinByFreq@GOTPCREL(%rip), %rcx
	jmp	LBB0_19
LBB0_17:
	movq	_SMU_MSG_SetSoftMaxByFreq@GOTPCREL(%rip), %rcx
LBB0_19:
	movl	(%rcx), %esi
	movq	_PPCLK_SOCCLK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	shll	$16, %edx
	orl	%eax, %edx
	movq	%rbx, %rdi
	callq	_smu_send_smc_msg_with_param
	testl	%eax, %eax
	je	LBB0_22
## %bb.20:
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %r12d
LBB0_21:
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rsi
	testb	%r13b, %r13b
	cmovneq	%rax, %rsi
	callq	_pr_err
LBB0_22:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SMU_FEATURE_DPM_GFXCLK_BIT,4,2 ## @SMU_FEATURE_DPM_GFXCLK_BIT
	.comm	_FEATURE_DPM_GFXCLK_MASK,4,2    ## @FEATURE_DPM_GFXCLK_MASK
	.comm	_SMU_MSG_SetSoftMaxByFreq,4,2   ## @SMU_MSG_SetSoftMaxByFreq
	.comm	_SMU_MSG_SetSoftMinByFreq,4,2   ## @SMU_MSG_SetSoftMinByFreq
	.comm	_PPCLK_GFXCLK,4,2               ## @PPCLK_GFXCLK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to set soft %s gfxclk !\n"

L_.str.1:                               ## @.str.1
	.asciz	"max"

L_.str.2:                               ## @.str.2
	.asciz	"min"

	.comm	_SMU_FEATURE_DPM_UCLK_BIT,4,2   ## @SMU_FEATURE_DPM_UCLK_BIT
	.comm	_FEATURE_DPM_UCLK_MASK,4,2      ## @FEATURE_DPM_UCLK_MASK
	.comm	_PPCLK_UCLK,4,2                 ## @PPCLK_UCLK
L_.str.3:                               ## @.str.3
	.asciz	"Failed to set soft %s memclk !\n"

	.comm	_SMU_FEATURE_DPM_SOCCLK_BIT,4,2 ## @SMU_FEATURE_DPM_SOCCLK_BIT
	.comm	_FEATURE_DPM_SOCCLK_MASK,4,2    ## @FEATURE_DPM_SOCCLK_MASK
	.comm	_PPCLK_SOCCLK,4,2               ## @PPCLK_SOCCLK
L_.str.4:                               ## @.str.4
	.asciz	"Failed to set soft %s socclk !\n"

	.no_dead_strip	_arcturus_upload_dpm_level
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arcturus_upload_dpm_level
_arcturus_upload_dpm_level:             ; @arcturus_upload_dpm_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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x23, [x0]
Lloh0:
	adrp	x8, _SMU_FEATURE_DPM_GFXCLK_BIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SMU_FEATURE_DPM_GFXCLK_BIT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_smu_feature_is_enabled
	cbz	x0, LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, _FEATURE_DPM_GFXCLK_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FEATURE_DPM_GFXCLK_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_4
; %bb.2:
	cmp	w20, #0
	cset	w24, eq
	mov	w8, #16
	mov	w9, #20
	csel	x8, x9, x8, eq
	ldrh	w2, [x23, x8]
Lloh6:
	adrp	x8, _SMU_MSG_SetSoftMaxByFreq@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SMU_MSG_SetSoftMaxByFreq@GOTPAGEOFF]
Lloh8:
	adrp	x9, _SMU_MSG_SetSoftMinByFreq@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SMU_MSG_SetSoftMinByFreq@GOTPAGEOFF]
	csel	x8, x9, x8, eq
	ldr	w1, [x8]
Lloh10:
	adrp	x8, _PPCLK_GFXCLK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PPCLK_GFXCLK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	bfi	w2, w8, #16, #16
	mov	x0, x19
	bl	_smu_send_smc_msg_with_param
	cbz	w0, LBB0_4
; %bb.3:
	mov	x22, x0
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_12
LBB0_4:
Lloh15:
	adrp	x8, _SMU_FEATURE_DPM_UCLK_BIT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SMU_FEATURE_DPM_UCLK_BIT@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_smu_feature_is_enabled
	cbz	x0, LBB0_8
; %bb.5:
Lloh18:
	adrp	x8, _FEATURE_DPM_UCLK_MASK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _FEATURE_DPM_UCLK_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_8
; %bb.6:
	cmp	w20, #0
	cset	w24, eq
	mov	w8, #8
	mov	w9, #12
	csel	x8, x9, x8, eq
	ldrh	w2, [x23, x8]
Lloh21:
	adrp	x8, _SMU_MSG_SetSoftMaxByFreq@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SMU_MSG_SetSoftMaxByFreq@GOTPAGEOFF]
Lloh23:
	adrp	x9, _SMU_MSG_SetSoftMinByFreq@GOTPAGE
Lloh24:
	ldr	x9, [x9, _SMU_MSG_SetSoftMinByFreq@GOTPAGEOFF]
	csel	x8, x9, x8, eq
	ldr	w1, [x8]
Lloh25:
	adrp	x8, _PPCLK_UCLK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _PPCLK_UCLK@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	bfi	w2, w8, #16, #16
	mov	x0, x19
	bl	_smu_send_smc_msg_with_param
	cbz	w0, LBB0_8
; %bb.7:
	mov	x22, x0
Lloh28:
	adrp	x0, l_.str.3@PAGE
Lloh29:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_12
LBB0_8:
Lloh30:
	adrp	x8, _SMU_FEATURE_DPM_SOCCLK_BIT@GOTPAGE
Lloh31:
	ldr	x8, [x8, _SMU_FEATURE_DPM_SOCCLK_BIT@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_smu_feature_is_enabled
	cbz	x0, LBB0_13
; %bb.9:
Lloh33:
	adrp	x8, _FEATURE_DPM_SOCCLK_MASK@GOTPAGE
Lloh34:
	ldr	x8, [x8, _FEATURE_DPM_SOCCLK_MASK@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_13
; %bb.10:
	cmp	w20, #0
	cset	w24, eq
	lsl	x8, x24, #2
	ldrh	w2, [x23, x8]
Lloh36:
	adrp	x8, _SMU_MSG_SetSoftMaxByFreq@GOTPAGE
Lloh37:
	ldr	x8, [x8, _SMU_MSG_SetSoftMaxByFreq@GOTPAGEOFF]
Lloh38:
	adrp	x9, _SMU_MSG_SetSoftMinByFreq@GOTPAGE
Lloh39:
	ldr	x9, [x9, _SMU_MSG_SetSoftMinByFreq@GOTPAGEOFF]
	csel	x8, x9, x8, eq
	ldr	w1, [x8]
Lloh40:
	adrp	x8, _PPCLK_SOCCLK@GOTPAGE
Lloh41:
	ldr	x8, [x8, _PPCLK_SOCCLK@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	bfi	w2, w8, #16, #16
	mov	x0, x19
	bl	_smu_send_smc_msg_with_param
	mov	x22, x0
	cbz	w0, LBB0_14
; %bb.11:
Lloh43:
	adrp	x0, l_.str.4@PAGE
Lloh44:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_12:
Lloh45:
	adrp	x8, l_.str.1@PAGE
Lloh46:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh47:
	adrp	x9, l_.str.2@PAGE
Lloh48:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w24, #0
	csel	x1, x9, x8, ne
	bl	_pr_err
	b	LBB0_14
LBB0_13:
	mov	w22, #0
LBB0_14:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_SMU_FEATURE_DPM_GFXCLK_BIT,4,2 ; @SMU_FEATURE_DPM_GFXCLK_BIT
	.comm	_FEATURE_DPM_GFXCLK_MASK,4,2    ; @FEATURE_DPM_GFXCLK_MASK
	.comm	_SMU_MSG_SetSoftMaxByFreq,4,2   ; @SMU_MSG_SetSoftMaxByFreq
	.comm	_SMU_MSG_SetSoftMinByFreq,4,2   ; @SMU_MSG_SetSoftMinByFreq
	.comm	_PPCLK_GFXCLK,4,2               ; @PPCLK_GFXCLK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to set soft %s gfxclk !\n"

l_.str.1:                               ; @.str.1
	.asciz	"max"

l_.str.2:                               ; @.str.2
	.asciz	"min"

	.comm	_SMU_FEATURE_DPM_UCLK_BIT,4,2   ; @SMU_FEATURE_DPM_UCLK_BIT
	.comm	_FEATURE_DPM_UCLK_MASK,4,2      ; @FEATURE_DPM_UCLK_MASK
	.comm	_PPCLK_UCLK,4,2                 ; @PPCLK_UCLK
l_.str.3:                               ; @.str.3
	.asciz	"Failed to set soft %s memclk !\n"

	.comm	_SMU_FEATURE_DPM_SOCCLK_BIT,4,2 ; @SMU_FEATURE_DPM_SOCCLK_BIT
	.comm	_FEATURE_DPM_SOCCLK_MASK,4,2    ; @FEATURE_DPM_SOCCLK_MASK
	.comm	_PPCLK_SOCCLK,4,2               ; @PPCLK_SOCCLK
l_.str.4:                               ; @.str.4
	.asciz	"Failed to set soft %s socclk !\n"

	.no_dead_strip	_arcturus_upload_dpm_level
.subsections_via_symbols
