	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smu7_get_profiling_clk
_smu7_get_profiling_clk:                ## @smu7_get_profiling_clk
	.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
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	32(%rdi), %r10
	movl	8(%r10), %ebx
	testl	%ebx, %ebx
	jle	LBB0_1
## %bb.2:
	movq	%rdx, %r9
	movq	16(%r10), %r14
	leal	-1(%rbx), %eax
	movl	(%r14,%rax,4), %r11d
	cmpl	$1, %ebx
	jne	LBB0_4
## %bb.3:
	movl	$70, %eax
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_23
LBB0_4:
	movq	32(%r10), %rax
	movslq	24(%r10), %rdx
	imull	$100, -4(%rax,%rdx,4), %eax
	cltd
	idivl	%r11d
	addl	$-2, %ebx
	movl	(%r14,%rbx,4), %r11d
LBB0_5:
	movl	%ebx, (%rcx)
	imull	%r11d, %eax
	cltq
	imulq	$1374389535, %rax, %r15         ## imm = 0x51EB851F
	movq	%r15, %rax
	shrq	$63, %rax
	sarq	$37, %r15
	addl	%eax, %r15d
	movq	(%rdi), %rax
	movq	_PP_TABLE_V0@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_10
## %bb.6:
	movq	24(%rdi), %r14
	movl	(%r14), %edx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	testl	%edx, %edx
	jle	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%r14), %rax
	movl	-4(%rax,%rdx,4), %ebx
	decq	%rdx
	cmpl	%ebx, %r15d
	jl	LBB0_7
	jmp	LBB0_9
LBB0_10:
	movq	_PP_TABLE_V1@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_18
## %bb.11:
	movq	16(%rdi), %rax
	movq	(%rax), %r14
	movl	(%r14), %edx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	testl	%edx, %edx
	jle	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	8(%r14), %rax
	movl	-4(%rax,%rdx,4), %ebx
	decq	%rdx
	cmpl	%ebx, %r15d
	jl	LBB0_12
LBB0_9:
	movl	%edx, (%r9)
	movq	_AMD_DPM_FORCED_LEVEL_PROFILE_MIN_SCLK@GOTPCREL(%rip), %rdx
	cmpl	%esi, (%rdx)
	je	LBB0_15
	jmp	LBB0_16
LBB0_14:
	movq	8(%r14), %rax
LBB0_15:
	movl	$0, (%r9)
	movl	(%rax), %ebx
LBB0_16:
	movq	_AMD_DPM_FORCED_LEVEL_PROFILE_PEAK@GOTPCREL(%rip), %rax
	movl	%ebx, %r15d
	cmpl	%esi, (%rax)
	jne	LBB0_18
## %bb.17:
	movl	(%r14), %eax
	decl	%eax
	movl	%eax, (%r9)
	movl	%ebx, %r15d
LBB0_18:
	movq	_AMD_DPM_FORCED_LEVEL_PROFILE_MIN_MCLK@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpl	%esi, (%rdx)
	je	LBB0_21
## %bb.19:
	movq	_AMD_DPM_FORCED_LEVEL_PROFILE_PEAK@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_22
## %bb.20:
	movl	8(%r10), %eax
	decl	%eax
LBB0_21:
	movl	%eax, (%rcx)
LBB0_22:
	movl	(%r10), %eax
	decl	%eax
	movl	%eax, (%r8)
	movl	%r15d, 8(%rdi)
	movl	%r11d, 12(%rdi)
	xorl	%eax, %eax
LBB0_23:
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PP_TABLE_V0,8,3                ## @PP_TABLE_V0
	.comm	_AMD_DPM_FORCED_LEVEL_PROFILE_MIN_SCLK,4,2 ## @AMD_DPM_FORCED_LEVEL_PROFILE_MIN_SCLK
	.comm	_AMD_DPM_FORCED_LEVEL_PROFILE_PEAK,4,2 ## @AMD_DPM_FORCED_LEVEL_PROFILE_PEAK
	.comm	_PP_TABLE_V1,8,3                ## @PP_TABLE_V1
	.comm	_AMD_DPM_FORCED_LEVEL_PROFILE_MIN_MCLK,4,2 ## @AMD_DPM_FORCED_LEVEL_PROFILE_MIN_MCLK
	.no_dead_strip	_smu7_get_profiling_clk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smu7_get_profiling_clk
_smu7_get_profiling_clk:                ; @smu7_get_profiling_clk
	.cfi_startproc
; %bb.0:
	ldr	x9, [x0, #32]
	ldr	w11, [x9, #8]
	cmp	w11, #0
	b.le	LBB0_3
; %bb.1:
	ldr	x12, [x9, #16]
	subs	w8, w11, #1
	ldr	w10, [x12, w8, uxtw #2]
	b.ne	LBB0_4
; %bb.2:
	mov	w11, #0
	mov	w8, #70
	b	LBB0_5
LBB0_3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	ret
LBB0_4:
	ldr	x8, [x9, #32]
	ldrsw	x13, [x9, #24]
	add	x8, x8, x13, lsl #2
	ldur	w8, [x8, #-4]
	mov	w13, #100
	mul	w8, w8, w13
	sdiv	w8, w8, w10
	sub	w11, w11, #2
	ldr	w10, [x12, w11, uxtw #2]
LBB0_5:
	str	w11, [x3]
	mul	w8, w10, w8
	mov	w11, #34079
	movk	w11, #20971, lsl #16
	smull	x8, w8, w11
	lsr	x11, x8, #63
	asr	x8, x8, #37
	add	w12, w8, w11
	ldr	x8, [x0]
Lloh3:
	adrp	x11, _PP_TABLE_V0@GOTPAGE
Lloh4:
	ldr	x11, [x11, _PP_TABLE_V0@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x11]
	cmp	x8, x11
	b.ne	LBB0_9
; %bb.6:
	ldr	x8, [x0, #24]
	ldr	w14, [x8]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w14, #1
	b.lt	LBB0_14
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	sub	x15, x14, #1
	ldr	x13, [x8, #8]
	add	x11, x13, x14, lsl #2
	ldur	w11, [x11, #-4]
	mov	x14, x15
	cmp	w12, w11
	b.lt	LBB0_7
	b	LBB0_13
LBB0_9:
Lloh6:
	adrp	x11, _PP_TABLE_V1@GOTPAGE
Lloh7:
	ldr	x11, [x11, _PP_TABLE_V1@GOTPAGEOFF]
Lloh8:
	ldr	x13, [x11]
	mov	x11, x12
	cmp	x8, x13
	b.ne	LBB0_18
; %bb.10:
	ldr	x8, [x0, #16]
	ldr	x8, [x8]
	ldr	w14, [x8]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	cmp	w14, #1
	b.lt	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	sub	x15, x14, #1
	ldr	x13, [x8, #8]
	add	x11, x13, x14, lsl #2
	ldur	w11, [x11, #-4]
	mov	x14, x15
	cmp	w12, w11
	b.lt	LBB0_11
LBB0_13:
	str	w15, [x2]
Lloh9:
	adrp	x12, _AMD_DPM_FORCED_LEVEL_PROFILE_MIN_SCLK@GOTPAGE
Lloh10:
	ldr	x12, [x12, _AMD_DPM_FORCED_LEVEL_PROFILE_MIN_SCLK@GOTPAGEOFF]
Lloh11:
	ldr	w12, [x12]
	cmp	w12, w1
	b.eq	LBB0_15
	b	LBB0_16
LBB0_14:
	ldr	x13, [x8, #8]
LBB0_15:
	str	wzr, [x2]
	ldr	w11, [x13]
LBB0_16:
Lloh12:
	adrp	x12, _AMD_DPM_FORCED_LEVEL_PROFILE_PEAK@GOTPAGE
Lloh13:
	ldr	x12, [x12, _AMD_DPM_FORCED_LEVEL_PROFILE_PEAK@GOTPAGEOFF]
Lloh14:
	ldr	w12, [x12]
	cmp	w12, w1
	b.ne	LBB0_18
; %bb.17:
	ldr	w8, [x8]
	sub	w8, w8, #1
	str	w8, [x2]
LBB0_18:
Lloh15:
	adrp	x8, _AMD_DPM_FORCED_LEVEL_PROFILE_MIN_MCLK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AMD_DPM_FORCED_LEVEL_PROFILE_MIN_MCLK@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_20
; %bb.19:
	mov	w8, #0
	b	LBB0_22
LBB0_20:
Lloh18:
	adrp	x8, _AMD_DPM_FORCED_LEVEL_PROFILE_PEAK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AMD_DPM_FORCED_LEVEL_PROFILE_PEAK@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_23
; %bb.21:
	ldr	w8, [x9, #8]
	sub	w8, w8, #1
LBB0_22:
	str	w8, [x3]
LBB0_23:
	ldr	w9, [x9]
	sub	w9, w9, #1
	str	w9, [x4]
	stp	w11, w10, [x0, #8]
	mov	w0, #0
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PP_TABLE_V0,8,3                ; @PP_TABLE_V0
	.comm	_AMD_DPM_FORCED_LEVEL_PROFILE_MIN_SCLK,4,2 ; @AMD_DPM_FORCED_LEVEL_PROFILE_MIN_SCLK
	.comm	_AMD_DPM_FORCED_LEVEL_PROFILE_PEAK,4,2 ; @AMD_DPM_FORCED_LEVEL_PROFILE_PEAK
	.comm	_PP_TABLE_V1,8,3                ; @PP_TABLE_V1
	.comm	_AMD_DPM_FORCED_LEVEL_PROFILE_MIN_MCLK,4,2 ; @AMD_DPM_FORCED_LEVEL_PROFILE_MIN_MCLK
	.no_dead_strip	_smu7_get_profiling_clk
.subsections_via_symbols
