	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vega12_get_memclocks
_vega12_get_memclocks:                  ## @vega12_get_memclocks
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	movq	32(%rbx), %rax
	movq	_GNLD_DPM_UCLK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpl	$0, (%rax,%rcx,4)
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r14
	movq	16(%rbx), %rax
	movq	_MAX_NUM_CLOCKS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rax
	cmovlq	%rax, %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	testl	%ecx, %ecx
	jle	LBB0_5
## %bb.3:
	movq	%rdi, %r15
	movl	-48(%rbp), %r13d                ## 4-byte Reload
	movq	8(%r14), %rdx
	movq	8(%rbx), %rcx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%rbx), %rax
	movl	(%rax,%r12,4), %esi
	imull	$1000, %esi, %eax               ## imm = 0x3E8
	movl	%eax, (%rdx,%r12,8)
	imull	$100, %esi, %eax
	movl	%eax, (%rcx,%r12,8)
	movq	%r15, %rdi
	callq	_vega12_get_mem_latency
	movq	8(%rbx), %rcx
	movl	%eax, 4(%rcx,%r12,8)
	movq	8(%r14), %rdx
	movl	%eax, 4(%rdx,%r12,8)
	incq	%r12
	cmpq	%r12, %r13
	jne	LBB0_4
LBB0_5:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, (%rbx)
	movl	%eax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	movl	$-1, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GNLD_DPM_UCLK,8,3              ## @GNLD_DPM_UCLK
	.comm	_MAX_NUM_CLOCKS,8,3             ## @MAX_NUM_CLOCKS
	.no_dead_strip	_vega12_get_memclocks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vega12_get_memclocks
_vega12_get_memclocks:                  ; @vega12_get_memclocks
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x21, [x0]
	ldr	x8, [x21, #32]
Lloh0:
	adrp	x9, _GNLD_DPM_UCLK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _GNLD_DPM_UCLK@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x19, x1
	ldr	x8, [x21, #16]
Lloh3:
	adrp	x9, _MAX_NUM_CLOCKS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MAX_NUM_CLOCKS@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	csel	x22, x8, x9, lt
	cmp	w22, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x20, x0
	mov	x23, #0
	and	x10, x22, #0xffffffff
	ldr	x9, [x19, #8]
	ldr	x8, [x21, #8]
	lsl	x24, x10, #2
	mov	w25, #4
	mov	w26, #1000
	mov	w27, #100
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x21, #24]
	ldr	w1, [x10, x23]
	mul	w10, w1, w26
	add	x9, x9, x25
	stur	w10, [x9, #-4]
	mul	w9, w1, w27
	add	x8, x8, x25
	stur	w9, [x8, #-4]
	mov	x0, x20
	bl	_vega12_get_mem_latency
	ldr	x8, [x21, #8]
	str	w0, [x8, x25]
	ldr	x9, [x19, #8]
	str	w0, [x9, x25]
	add	x23, x23, #4
	add	x25, x25, #8
	cmp	x24, x23
	b.ne	LBB0_3
LBB0_4:
	mov	w0, #0
	str	w22, [x21]
	str	w22, [x19]
	b	LBB0_6
LBB0_5:
	mov	w0, #-1
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_GNLD_DPM_UCLK,8,3              ; @GNLD_DPM_UCLK
	.comm	_MAX_NUM_CLOCKS,8,3             ; @MAX_NUM_CLOCKS
	.no_dead_strip	_vega12_get_memclocks
.subsections_via_symbols
