	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vega20_get_memclocks
_vega20_get_memclocks:                  ## @vega20_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	16(%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
	movl	24(%rbx), %ecx
	movq	_MAX_NUM_CLOCKS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	cmovll	%ecx, %eax
	movl	%eax, (%rbx)
	movl	%eax, (%rsi)
	testl	%eax, %eax
	jle	LBB0_5
## %bb.3:
	movq	%rdi, %r12
	movl	%eax, %r13d
	movq	8(%rbx), %rcx
	movq	8(%r14), %rdx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%rbx), %rax
	movl	(%rax,%r15,4), %esi
	imull	$1000, %esi, %eax               ## imm = 0x3E8
	movl	%eax, (%rcx,%r15,8)
	movl	%eax, (%rdx,%r15,8)
	movq	%r12, %rdi
	callq	_vega20_get_mem_latency
	movq	8(%rbx), %rcx
	movl	%eax, 4(%rcx,%r15,8)
	movq	8(%r14), %rdx
	movl	%eax, 4(%rdx,%r15,8)
	incq	%r15
	cmpq	%r15, %r13
	jne	LBB0_4
LBB0_5:
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	movl	$-1, %eax
LBB0_6:
                                        ## kill: def $eax killed $eax killed $rax
	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,4,2             ## @MAX_NUM_CLOCKS
	.no_dead_strip	_vega20_get_memclocks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vega20_get_memclocks
_vega20_get_memclocks:                  ; @vega20_get_memclocks
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x21, [x0]
	ldr	x8, [x21, #16]
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	w8, [x21, #24]
Lloh3:
	adrp	x9, _MAX_NUM_CLOCKS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MAX_NUM_CLOCKS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w10, w8, w9, lt
	str	w10, [x21]
	str	w10, [x1]
	cmp	w10, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x20, x0
	mov	x22, #0
	ldr	x8, [x21, #8]
	ldr	x9, [x19, #8]
	lsl	x23, x10, #2
	mov	w24, #4
	mov	w25, #1000
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x21, #32]
	ldr	w1, [x10, x22]
	mul	w10, w1, w25
	add	x8, x8, x24
	stur	w10, [x8, #-4]
	add	x8, x9, x24
	stur	w10, [x8, #-4]
	mov	x0, x20
	bl	_vega20_get_mem_latency
	ldr	x8, [x21, #8]
	str	w0, [x8, x24]
	ldr	x9, [x19, #8]
	str	w0, [x9, x24]
	add	x22, x22, #4
	add	x24, x24, #8
	cmp	x23, x22
	b.ne	LBB0_3
LBB0_4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	mov	w0, #-1
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 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,4,2             ; @MAX_NUM_CLOCKS
	.no_dead_strip	_vega20_get_memclocks
.subsections_via_symbols
