	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smu8_get_clock_by_type
_smu8_get_clock_by_type:                ## @smu8_get_clock_by_type
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	8(%rdi), %r12
	callq	_smu8_get_max_sclk_level
	movl	%eax, %ecx
	movl	%eax, (%rbx)
	cmpl	$128, %r14d
	je	LBB0_6
## %bb.1:
	cmpl	$129, %r14d
	je	LBB0_9
## %bb.2:
	movl	$-1, %eax
	cmpl	$130, %r14d
	jne	LBB0_15
## %bb.3:
	testl	%ecx, %ecx
	jle	LBB0_14
## %bb.4:
	movq	(%r12), %rcx
	movq	8(%rbx), %rdx
	xorl	%eax, %eax
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rsi,4), %edi
	addl	%edi, %edi
	leal	(%rdi,%rdi,4), %edi
	movl	%edi, (%rdx,%rsi,4)
	incq	%rsi
	movslq	(%rbx), %rdi
	cmpq	%rdi, %rsi
	jl	LBB0_5
	jmp	LBB0_15
LBB0_6:
	testl	%ecx, %ecx
	jle	LBB0_14
## %bb.7:
	movq	(%r15), %rax
	movq	(%rax), %rcx
	movq	8(%rbx), %rdx
	xorl	%eax, %eax
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rsi,4), %edi
	addl	%edi, %edi
	leal	(%rdi,%rdi,4), %edi
	movl	%edi, (%rdx,%rsi,4)
	incq	%rsi
	movslq	(%rbx), %rdi
	cmpq	%rdi, %rsi
	jl	LBB0_8
	jmp	LBB0_15
LBB0_9:
	movq	_SMU8_NUM_NBPMEMORYCLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, (%rbx)
	testl	%edi, %edi
	jle	LBB0_14
## %bb.10:
	movq	8(%r12), %r8
	movq	8(%rbx), %rdx
	movl	$-1, %esi
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	addl	%esi, %edi
	movslq	%edi, %rdi
	movl	(%r8,%rdi,4), %edi
	addl	%edi, %edi
	leal	(%rdi,%rdi,4), %edi
	movl	%edi, (%rdx,%rcx,4)
	incq	%rcx
	movslq	(%rbx), %rdi
	decl	%esi
	cmpq	%rdi, %rcx
	jl	LBB0_11
	jmp	LBB0_15
LBB0_14:
	xorl	%eax, %eax
LBB0_15:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SMU8_NUM_NBPMEMORYCLOCK,4,2    ## @SMU8_NUM_NBPMEMORYCLOCK
	.no_dead_strip	_smu8_get_clock_by_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smu8_get_clock_by_type
_smu8_get_clock_by_type:                ; @smu8_get_clock_by_type
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x22, [x0, #8]
	bl	_smu8_get_max_sclk_level
	str	w0, [x19]
	cmp	w20, #128
	b.eq	LBB0_6
; %bb.1:
	cmp	w20, #129
	b.eq	LBB0_9
; %bb.2:
	cmp	w20, #130
	b.ne	LBB0_13
; %bb.3:
	cmp	w0, #1
	b.lt	LBB0_12
; %bb.4:
	mov	x8, #0
	ldr	x9, [x22]
	ldr	x10, [x19, #8]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x11, x8, #2
	ldr	w12, [x9, x11]
	add	w12, w12, w12, lsl #2
	lsl	w12, w12, #1
	str	w12, [x10, x11]
	add	x8, x8, #1
	ldrsw	x11, [x19]
	cmp	x8, x11
	b.lt	LBB0_5
	b	LBB0_12
LBB0_6:
	cmp	w0, #1
	b.lt	LBB0_12
; %bb.7:
	mov	x8, #0
	ldr	x9, [x21]
	ldr	x9, [x9]
	ldr	x10, [x19, #8]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x11, x8, #2
	ldr	w12, [x9, x11]
	add	w12, w12, w12, lsl #2
	lsl	w12, w12, #1
	str	w12, [x10, x11]
	add	x8, x8, #1
	ldrsw	x11, [x19]
	cmp	x8, x11
	b.lt	LBB0_8
	b	LBB0_12
LBB0_9:
Lloh0:
	adrp	x8, _SMU8_NUM_NBPMEMORYCLOCK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SMU8_NUM_NBPMEMORYCLOCK@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x8]
	str	w10, [x19]
	cmp	w10, #1
	b.lt	LBB0_12
; %bb.10:
	mov	x8, #0
	ldr	x9, [x22, #8]
	ldr	x11, [x19, #8]
	mov	w12, #-1
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	w10, w10, w12
	ldr	w10, [x9, w10, sxtw #2]
	add	w10, w10, w10, lsl #2
	lsl	w10, w10, #1
	str	w10, [x11, x8, lsl #2]
	add	x8, x8, #1
	ldrsw	x10, [x19]
	sub	w12, w12, #1
	cmp	x8, x10
	b.lt	LBB0_11
LBB0_12:
	mov	w0, #0
	b	LBB0_14
LBB0_13:
	mov	w0, #-1
LBB0_14:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SMU8_NUM_NBPMEMORYCLOCK,4,2    ; @SMU8_NUM_NBPMEMORYCLOCK
	.no_dead_strip	_smu8_get_clock_by_type
.subsections_via_symbols
