	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smu_v12_0_get_dpm_ultimate_freq
_smu_v12_0_get_dpm_ultimate_freq:       ## @smu_v12_0_get_dpm_ultimate_freq
	.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
	movq	%rcx, %r13
	movq	%rdx, %r14
	movl	%esi, %r12d
	movq	%rdi, %r15
	callq	_mutex_lock
	testq	%r13, %r13
	je	LBB0_8
## %bb.1:
	leal	-129(%r12), %eax
	cmpl	$2, %eax
	jae	LBB0_2
## %bb.4:
	movq	_SMU_MSG_GetMaxGfxclkFrequency@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_smu_send_smc_msg
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	jmp	LBB0_17
LBB0_2:
	cmpl	$128, %r12d
	jne	LBB0_16
## %bb.3:
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	$1, %edx
	callq	_smu_get_dpm_uclk_limited
	jmp	LBB0_7
LBB0_6:
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_smu_read_smc_arg
LBB0_7:
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_17
LBB0_8:
	testq	%r14, %r14
	je	LBB0_9
## %bb.10:
	leal	-129(%r12), %eax
	cmpl	$2, %eax
	jae	LBB0_11
## %bb.13:
	movq	_SMU_MSG_GetMinGfxclkFrequency@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_smu_send_smc_msg
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
	jmp	LBB0_17
LBB0_9:
	xorl	%ebx, %ebx
	jmp	LBB0_17
LBB0_11:
	cmpl	$128, %r12d
	jne	LBB0_16
## %bb.12:
	movq	%r15, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_smu_get_dpm_uclk_limited
	movl	%eax, %ebx
	jmp	LBB0_17
LBB0_16:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_17:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_smu_read_smc_arg
	movl	%eax, %ebx
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_SMU_MSG_GetMaxGfxclkFrequency,4,2 ## @SMU_MSG_GetMaxGfxclkFrequency
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Attempt to get max GX frequency from SMC Failed !\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SMU_MSG_GetMinGfxclkFrequency,4,2 ## @SMU_MSG_GetMinGfxclkFrequency
L_.str.1:                               ## @.str.1
	.asciz	"Attempt to get min GX frequency from SMC Failed !\n"

	.no_dead_strip	_smu_v12_0_get_dpm_ultimate_freq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smu_v12_0_get_dpm_ultimate_freq
_smu_v12_0_get_dpm_ultimate_freq:       ; @smu_v12_0_get_dpm_ultimate_freq
	.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	x23, x3
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	bl	_mutex_lock
	cbz	x23, LBB0_7
; %bb.1:
	sub	w8, w21, #129
	cmp	w8, #2
	b.hs	LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _SMU_MSG_GetMaxGfxclkFrequency@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SMU_MSG_GetMaxGfxclkFrequency@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_smu_send_smc_msg
	cbz	w0, LBB0_6
; %bb.3:
	mov	x22, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	b	LBB0_15
LBB0_4:
	cmp	w21, #128
	b.ne	LBB0_14
; %bb.5:
	mov	x0, x19
	mov	x1, x23
	mov	w2, #1
	bl	_smu_get_dpm_uclk_limited
	mov	x22, x0
	cbnz	w0, LBB0_15
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	mov	x1, x23
	bl	_smu_read_smc_arg
	mov	x22, x0
	cbnz	w0, LBB0_15
LBB0_7:
	cbz	x20, LBB0_11
; %bb.8:
	sub	w8, w21, #129
	cmp	w8, #2
	b.hs	LBB0_12
; %bb.9:
Lloh5:
	adrp	x8, _SMU_MSG_GetMinGfxclkFrequency@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SMU_MSG_GetMinGfxclkFrequency@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_smu_send_smc_msg
	cbz	w0, LBB0_16
; %bb.10:
	mov	x22, x0
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
	b	LBB0_15
LBB0_11:
	mov	w22, #0
	b	LBB0_15
LBB0_12:
	cmp	w21, #128
	b.ne	LBB0_14
; %bb.13:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_smu_get_dpm_uclk_limited
	mov	x22, x0
	b	LBB0_15
LBB0_14:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_15:
	mov	x0, x19
	bl	_mutex_unlock
	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
LBB0_16:
	mov	x0, x19
	mov	x1, x20
	bl	_smu_read_smc_arg
	mov	x22, x0
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_SMU_MSG_GetMaxGfxclkFrequency,4,2 ; @SMU_MSG_GetMaxGfxclkFrequency
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Attempt to get max GX frequency from SMC Failed !\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SMU_MSG_GetMinGfxclkFrequency,4,2 ; @SMU_MSG_GetMinGfxclkFrequency
l_.str.1:                               ; @.str.1
	.asciz	"Attempt to get min GX frequency from SMC Failed !\n"

	.no_dead_strip	_smu_v12_0_get_dpm_ultimate_freq
.subsections_via_symbols
