	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function navi10_set_peak_clock_by_device
_navi10_set_peak_clock_by_device:       ## @navi10_set_peak_clock_by_device
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	(%rax), %rax
	movl	(%rax), %ecx
	movq	_NAVI10_PEAK_SCLK_XTX@GOTPCREL(%rip), %rax
	cmpl	$239, %ecx
	jg	LBB0_4
## %bb.1:
	cmpl	$192, %ecx
	je	LBB0_7
## %bb.2:
	cmpl	$193, %ecx
	je	LBB0_6
LBB0_3:
	movq	_NAVI10_PEAK_SCLK_XL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_4:
	cmpl	$240, %ecx
	je	LBB0_7
## %bb.5:
	cmpl	$241, %ecx
	jne	LBB0_3
LBB0_6:
	movq	_NAVI10_PEAK_SCLK_XT@GOTPCREL(%rip), %rax
LBB0_7:
	movq	(%rax), %r14
	movq	_SMU_UCLK@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_smu_get_dpm_level_count
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:
	movl	(%r15), %esi
	movq	-32(%rbp), %rdx
	decq	%rdx
	leaq	-40(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_smu_get_dpm_freq_by_index
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:
	movq	_SMU_SCLK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	movq	%r14, %rcx
	callq	_smu_set_soft_freq_range
	testl	%eax, %eax
	jne	LBB0_11
## %bb.10:
	movl	(%r15), %esi
	movq	-40(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%rcx, %rdx
	callq	_smu_set_soft_freq_range
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NAVI10_PEAK_SCLK_XTX,8,3       ## @NAVI10_PEAK_SCLK_XTX
	.comm	_NAVI10_PEAK_SCLK_XT,8,3        ## @NAVI10_PEAK_SCLK_XT
	.comm	_NAVI10_PEAK_SCLK_XL,8,3        ## @NAVI10_PEAK_SCLK_XL
	.comm	_SMU_UCLK,4,2                   ## @SMU_UCLK
	.comm	_SMU_SCLK,4,2                   ## @SMU_SCLK
	.no_dead_strip	_navi10_set_peak_clock_by_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function navi10_set_peak_clock_by_device
_navi10_set_peak_clock_by_device:       ; @navi10_set_peak_clock_by_device
	.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
	mov	x19, x0
	ldr	x8, [x0]
	stp	xzr, xzr, [sp]
	ldr	x8, [x8]
	ldr	w9, [x8]
Lloh0:
	adrp	x8, _NAVI10_PEAK_SCLK_XTX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NAVI10_PEAK_SCLK_XTX@GOTPAGEOFF]
	cmp	w9, #239
	b.gt	LBB0_4
; %bb.1:
	cmp	w9, #192
	b.eq	LBB0_7
; %bb.2:
	cmp	w9, #193
	b.eq	LBB0_6
LBB0_3:
Lloh2:
	adrp	x8, _NAVI10_PEAK_SCLK_XL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NAVI10_PEAK_SCLK_XL@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
	cmp	w9, #240
	b.eq	LBB0_7
; %bb.5:
	cmp	w9, #241
	b.ne	LBB0_3
LBB0_6:
Lloh4:
	adrp	x8, _NAVI10_PEAK_SCLK_XT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _NAVI10_PEAK_SCLK_XT@GOTPAGEOFF]
LBB0_7:
	ldr	x20, [x8]
Lloh6:
	adrp	x21, _SMU_UCLK@GOTPAGE
Lloh7:
	ldr	x21, [x21, _SMU_UCLK@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x2, sp
	mov	x0, x19
	bl	_smu_get_dpm_level_count
	cbnz	w0, LBB0_11
; %bb.8:
	ldr	w1, [x21]
	ldr	x8, [sp]
	sub	x2, x8, #1
	add	x3, sp, #8
	mov	x0, x19
	bl	_smu_get_dpm_freq_by_index
	cbnz	w0, LBB0_11
; %bb.9:
Lloh8:
	adrp	x8, _SMU_SCLK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SMU_SCLK@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	mov	x3, x20
	bl	_smu_set_soft_freq_range
	cbnz	w0, LBB0_11
; %bb.10:
	ldr	w1, [x21]
	ldr	x2, [sp, #8]
	mov	x0, x19
	mov	x3, x2
	bl	_smu_set_soft_freq_range
LBB0_11:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_NAVI10_PEAK_SCLK_XTX,8,3       ; @NAVI10_PEAK_SCLK_XTX
	.comm	_NAVI10_PEAK_SCLK_XT,8,3        ; @NAVI10_PEAK_SCLK_XT
	.comm	_NAVI10_PEAK_SCLK_XL,8,3        ; @NAVI10_PEAK_SCLK_XL
	.comm	_SMU_UCLK,4,2                   ; @SMU_UCLK
	.comm	_SMU_SCLK,4,2                   ; @SMU_SCLK
	.no_dead_strip	_navi10_set_peak_clock_by_device
.subsections_via_symbols
