	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smu_get_dpm_freq_by_index      ## -- Begin function smu_get_dpm_freq_by_index
	.p2align	4, 0x90
_smu_get_dpm_freq_by_index:             ## @smu_get_dpm_freq_by_index
	.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	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rcx, %rcx
	je	LBB0_1
## %bb.2:
	movq	%rcx, %r14
	movl	%edx, %r15d
	movl	%esi, %ebx
	movq	%rdi, %r12
	callq	_smu_clk_dpm_is_enabled
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	je	LBB0_7
## %bb.3:
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_smu_clk_get_index
	testl	%eax, %eax
	js	LBB0_7
## %bb.4:
	shll	$16, %eax
	movzwl	%r15w, %edx
	orl	%eax, %edx
	movl	%edx, -36(%rbp)
	movq	_SMU_MSG_GetDpmFreqByIndex@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_smu_send_smc_msg_with_param
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	leaq	-36(%rbp), %rsi
	movq	%r12, %rdi
	callq	_smu_read_smc_arg
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movl	$2147483647, %eax               ## imm = 0x7FFFFFFF
	andl	-36(%rbp), %eax
	movl	%eax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SMU_MSG_GetDpmFreqByIndex,4,2  ## @SMU_MSG_GetDpmFreqByIndex
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smu_get_dpm_freq_by_index      ; -- Begin function smu_get_dpm_freq_by_index
	.p2align	2
_smu_get_dpm_freq_by_index:             ; @smu_get_dpm_freq_by_index
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	cbz	x3, LBB0_6
; %bb.1:
	mov	x19, x3
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	bl	_smu_clk_dpm_is_enabled
	cbz	w0, LBB0_7
; %bb.2:
	mov	x0, x20
	mov	x1, x22
	bl	_smu_clk_get_index
	tbnz	w0, #31, LBB0_7
; %bb.3:
	bfi	w21, w0, #16, #16
	str	w21, [sp, #12]
Lloh0:
	adrp	x8, _SMU_MSG_GetDpmFreqByIndex@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SMU_MSG_GetDpmFreqByIndex@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_smu_send_smc_msg_with_param
	cbnz	w0, LBB0_7
; %bb.4:
	add	x1, sp, #12
	mov	x0, x20
	bl	_smu_read_smc_arg
	cbnz	w0, LBB0_7
; %bb.5:
	ldr	w8, [sp, #12]
	and	w8, w8, #0x7fffffff
	str	w8, [x19]
	b	LBB0_7
LBB0_6:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SMU_MSG_GetDpmFreqByIndex,4,2  ; @SMU_MSG_GetDpmFreqByIndex
.subsections_via_symbols
