	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vega12_get_sclks
_vega12_get_sclks:                      ## @vega12_get_sclks
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdi), %rax
	movq	16(%rax), %rcx
	movq	_GNLD_DPM_GFXCLK@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpl	$0, (%rcx,%rdx,4)
	je	LBB0_1
## %bb.2:
	movq	(%rax), %rcx
	movq	_MAX_NUM_CLOCKS@GOTPCREL(%rip), %rdx
	movq	(%rdx), %r10
	cmpq	%r10, %rcx
	cmovlq	%rcx, %r10
	testl	%r10d, %r10d
	jle	LBB0_9
## %bb.3:
	movq	8(%rax), %rdx
	movq	8(%rsi), %r8
	movl	%r10d, %r11d
	movl	%r10d, %r9d
	andl	$1, %r9d
	cmpq	$1, %r11
	jne	LBB0_5
## %bb.4:
	xorl	%ecx, %ecx
	jmp	LBB0_7
LBB0_1:
	movl	$-1, %eax
	popq	%rbp
	retq
LBB0_5:
	subq	%r9, %r11
	leaq	24(%r8), %rax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	imull	$1000, (%rdx,%rcx,4), %edi      ## imm = 0x3E8
	movl	%edi, -24(%rax)
	movq	$0, -16(%rax)
	imull	$1000, 4(%rdx,%rcx,4), %edi     ## imm = 0x3E8
	movl	%edi, -8(%rax)
	movq	$0, (%rax)
	addq	$2, %rcx
	addq	$32, %rax
	cmpq	%rcx, %r11
	jne	LBB0_6
LBB0_7:
	testq	%r9, %r9
	je	LBB0_9
## %bb.8:
	imull	$1000, (%rdx,%rcx,4), %eax      ## imm = 0x3E8
	shlq	$4, %rcx
	movl	%eax, (%r8,%rcx)
	movq	$0, 8(%r8,%rcx)
LBB0_9:
	movl	%r10d, (%rsi)
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GNLD_DPM_GFXCLK,8,3            ## @GNLD_DPM_GFXCLK
	.comm	_MAX_NUM_CLOCKS,8,3             ## @MAX_NUM_CLOCKS
	.no_dead_strip	_vega12_get_sclks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vega12_get_sclks
_vega12_get_sclks:                      ; @vega12_get_sclks
	.cfi_startproc
; %bb.0:
	ldr	x9, [x0]
	ldr	x8, [x9, #16]
Lloh0:
	adrp	x10, _GNLD_DPM_GFXCLK@GOTPAGE
Lloh1:
	ldr	x10, [x10, _GNLD_DPM_GFXCLK@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	ldr	w8, [x8, x10, lsl #2]
	cbz	w8, LBB0_4
; %bb.1:
	ldr	x8, [x9]
Lloh3:
	adrp	x10, _MAX_NUM_CLOCKS@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MAX_NUM_CLOCKS@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x10
	csel	x8, x8, x10, lt
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.2:
	ldr	x11, [x9, #8]
	ldr	x10, [x1, #8]
	and	x9, x8, #0xffffffff
	cmp	x9, #4
	b.hs	LBB0_5
; %bb.3:
	mov	x12, #0
	b	LBB0_8
LBB0_4:
	mov	w0, #-1
	ret
LBB0_5:
	and	x13, x8, #0x3
	sub	x12, x9, x13
	add	x14, x10, #32
	add	x15, x11, #8
	mov	w16, #1000
	mov	x17, x12
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w0, w2, [x15, #-8]
	ldp	w3, w4, [x15], #16
	mul	w0, w0, w16
	mul	w2, w2, w16
	mul	w3, w3, w16
	stur	w0, [x14, #-32]
	stur	w2, [x14, #-16]
	str	w3, [x14]
	mul	w0, w4, w16
	str	w0, [x14, #16]
	stur	xzr, [x14, #-24]
	stur	xzr, [x14, #-8]
	str	xzr, [x14, #8]
	str	xzr, [x14, #24]
	add	x14, x14, #64
	subs	x17, x17, #4
	b.ne	LBB0_6
; %bb.7:
	cbz	x13, LBB0_10
LBB0_8:
	add	x11, x11, x12, lsl #2
	add	x10, x10, x12, lsl #4
	add	x10, x10, #8
	sub	x9, x9, x12
	mov	w12, #1000
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x11], #4
	mul	w13, w13, w12
	stur	w13, [x10, #-8]
	str	xzr, [x10], #16
	subs	x9, x9, #1
	b.ne	LBB0_9
LBB0_10:
	mov	w0, #0
	str	w8, [x1]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_GNLD_DPM_GFXCLK,8,3            ; @GNLD_DPM_GFXCLK
	.comm	_MAX_NUM_CLOCKS,8,3             ; @MAX_NUM_CLOCKS
	.no_dead_strip	_vega12_get_sclks
.subsections_via_symbols
