	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function navi10_print_clk_levels
_navi10_print_clk_levels:               ## @navi10_print_clk_levels
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	$0, -68(%rbp)
	movl	$0, -76(%rbp)
	movl	$0, -72(%rbp)
	movl	$0, -56(%rbp)
	movq	$0, -64(%rbp)
	leal	-128(%r15), %eax
	xorl	%ebx, %ebx
	cmpl	$6, %eax
	ja	LBB0_13
## %bb.1:
	movq	%rdx, %r14
	movq	%rdi, %r12
	leaq	-68(%rbp), %rdx
	movl	%r15d, %esi
	callq	_smu_get_current_clk_freq
	testl	%eax, %eax
	jne	LBB0_13
## %bb.2:
	movslq	-68(%rbp), %rax
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$37, %rax
	addl	%ecx, %eax
	movl	%eax, -68(%rbp)
	leaq	-72(%rbp), %rdx
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_smu_get_dpm_level_count
	testl	%eax, %eax
	je	LBB0_3
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_navi10_is_support_fine_grained_dpm
	testl	%eax, %eax
	je	LBB0_4
## %bb.8:
	xorl	%ebx, %ebx
	leaq	-64(%rbp), %rcx
	movq	%r12, %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	_smu_get_dpm_freq_by_index
	testl	%eax, %eax
	jne	LBB0_13
## %bb.9:
	movl	-72(%rbp), %edx
	decl	%edx
	leaq	-56(%rbp), %rcx
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_smu_get_dpm_freq_by_index
	testl	%eax, %eax
	jne	LBB0_13
## %bb.10:
	movl	-68(%rbp), %eax
	movl	%eax, -60(%rbp)
	movl	-64(%rbp), %ecx
	movl	-56(%rbp), %edx
	xorl	%esi, %esi
	cmpl	%edx, %eax
	sete	%sil
	incl	%esi
	xorl	%r13d, %r13d
	cmpl	%ecx, %eax
	cmovnel	%esi, %r13d
	leaq	L_.str.1(%rip), %rdi
	movq	%rdi, %rbx
	cmpl	$1, %r13d
	je	LBB0_12
## %bb.11:
	addl	%ecx, %edx
	movl	%edx, %esi
	shrl	$31, %esi
	addl	%edx, %esi
	sarl	%esi
	movl	%esi, -60(%rbp)
	leaq	L_.str.2(%rip), %rbx
LBB0_12:
	cmpl	%ecx, %eax
	leaq	L_.str.2(%rip), %r15
	movq	%r15, %r8
	cmoveq	%rdi, %r8
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_sprintf
	movslq	%eax, %r12
	leaq	(%r14,%r12), %rdi
	movl	-60(%rbp), %ecx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edx
	movq	%rbx, %r8
	callq	_sprintf
	addl	%eax, %r12d
	movslq	%r12d, %rbx
	addq	%rbx, %r14
	movl	-56(%rbp), %ecx
	cmpl	$2, %r13d
	leaq	L_.str.1(%rip), %rax
	cmoveq	%rax, %r15
	movq	%r14, %rdi
	leaq	L_.str(%rip), %rsi
	movl	$2, %edx
	movq	%r15, %r8
	callq	_sprintf
	addl	%eax, %ebx
	jmp	LBB0_13
LBB0_4:
	cmpl	$0, -72(%rbp)
	jle	LBB0_13
## %bb.5:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%r13d, %edx
	leaq	-76(%rbp), %rcx
	callq	_smu_get_dpm_freq_by_index
	testl	%eax, %eax
	jne	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movslq	%ebx, %rbx
	leaq	(%r14,%rbx), %rdi
	movl	-76(%rbp), %ecx
	cmpl	%ecx, -68(%rbp)
	leaq	L_.str.2(%rip), %r8
	leaq	L_.str.1(%rip), %rax
	cmoveq	%rax, %r8
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	callq	_sprintf
	addl	%eax, %ebx
	incl	%r13d
	cmpl	-72(%rbp), %r13d
	jl	LBB0_6
	jmp	LBB0_13
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d: %uMhz %s\n"

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

L_.str.2:                               ## @.str.2
	.space	1

	.no_dead_strip	_navi10_print_clk_levels
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function navi10_print_clk_levels
_navi10_print_clk_levels:               ; @navi10_print_clk_levels
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	w22, #0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	stp	xzr, xzr, [sp, #16]
	str	wzr, [sp, #12]
	str	wzr, [sp, #32]
	sub	w8, w1, #128
	cmp	w8, #6
	b.hi	LBB0_4
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	add	x2, sp, #20
	bl	_smu_get_current_clk_freq
	cbnz	w0, LBB0_3
; %bb.2:
	ldrsw	x8, [sp, #20]
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w8, w8, w9
	str	w8, [sp, #20]
	add	x2, sp, #12
	mov	x0, x21
	mov	x1, x20
	bl	_smu_get_dpm_level_count
	cbz	w0, LBB0_6
LBB0_3:
	mov	w22, #0
LBB0_4:
	ldr	x8, [sp, #40]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.5:
	mov	x0, x22
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_6:
	mov	x0, x21
	mov	x1, x20
	bl	_navi10_is_support_fine_grained_dpm
	cbz	w0, LBB0_12
; %bb.7:
	add	x23, sp, #24
	add	x3, sp, #24
	mov	x0, x21
	mov	x1, x20
	mov	w2, #0
	bl	_smu_get_dpm_freq_by_index
	mov	w22, #0
	cbnz	w0, LBB0_4
; %bb.8:
	ldr	w8, [sp, #12]
	sub	w2, w8, #1
	add	x3, x23, #8
	mov	x0, x21
	mov	x1, x20
	bl	_smu_get_dpm_freq_by_index
	cbnz	w0, LBB0_3
; %bb.9:
	ldp	w8, w3, [sp, #20]
	str	w8, [sp, #28]
	ldr	w9, [sp, #32]
	cmp	w8, w9
	mov	w10, #1
	cinc	w10, w10, eq
	cmp	w8, w3
	csel	w23, wzr, w10, eq
Lloh6:
	adrp	x22, l_.str.1@PAGE
Lloh7:
	add	x22, x22, l_.str.1@PAGEOFF
Lloh8:
	adrp	x24, l_.str.2@PAGE
Lloh9:
	add	x24, x24, l_.str.2@PAGEOFF
	mov	x20, x22
	cmp	w23, #1
	b.eq	LBB0_11
; %bb.10:
	add	w9, w9, w3
	cmp	w9, #0
	cinc	w9, w9, lt
	asr	w9, w9, #1
	str	w9, [sp, #28]
Lloh10:
	adrp	x20, l_.str.2@PAGE
Lloh11:
	add	x20, x20, l_.str.2@PAGEOFF
LBB0_11:
	cmp	w8, w3
	csel	x4, x22, x24, eq
Lloh12:
	adrp	x21, l_.str@PAGE
Lloh13:
	add	x21, x21, l_.str@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	bl	_sprintf
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x25, w0
	add	x0, x19, x25
	ldr	w3, [sp, #28]
	mov	x1, x21
	mov	w2, #1
	mov	x4, x20
	bl	_sprintf
	add	x20, x25, w0, sxtw
	add	x0, x19, x20
	ldr	w3, [sp, #32]
	cmp	w23, #2
	csel	x4, x22, x24, eq
	mov	x1, x21
	mov	w2, #2
	bl	_sprintf
	add	w22, w0, w20
	b	LBB0_4
LBB0_12:
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.13:
	mov	w22, #0
	mov	w23, #0
Lloh14:
	adrp	x25, l_.str.2@PAGE
Lloh15:
	add	x25, x25, l_.str.2@PAGEOFF
Lloh16:
	adrp	x26, l_.str.1@PAGE
Lloh17:
	add	x26, x26, l_.str.1@PAGEOFF
Lloh18:
	adrp	x24, l_.str@PAGE
Lloh19:
	add	x24, x24, l_.str@PAGEOFF
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	add	x3, sp, #16
	mov	x0, x21
	mov	x1, x20
	mov	x2, x23
	bl	_smu_get_dpm_freq_by_index
	cbnz	w0, LBB0_4
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	add	x0, x19, w22, sxtw
	ldp	w3, w8, [sp, #16]
	cmp	w8, w3
	csel	x4, x26, x25, eq
	mov	x1, x24
	mov	x2, x23
	bl	_sprintf
	add	w22, w0, w22
	add	w23, w23, #1
	ldr	w8, [sp, #12]
	cmp	w23, w8
	b.lt	LBB0_14
	b	LBB0_4
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d: %uMhz %s\n"

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

l_.str.2:                               ; @.str.2
	.space	1

	.no_dead_strip	_navi10_print_clk_levels
.subsections_via_symbols
