	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rv730_populate_mclk_value      ## -- Begin function rv730_populate_mclk_value
	.p2align	4, 0x90
_rv730_populate_mclk_value:             ## @rv730_populate_mclk_value
	.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
	subq	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movl	%edx, %r15d
	movq	%rdi, %rbx
	callq	_rv770_get_pi
	movq	%rax, %r13
	movl	8(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	12(%r13), %eax
	movl	%eax, -88(%rbp)                 ## 4-byte Spill
	movl	16(%r13), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	20(%r13), %eax
	movl	%eax, -92(%rbp)                 ## 4-byte Spill
	movl	24(%r13), %eax
	movl	%eax, -84(%rbp)                 ## 4-byte Spill
	movl	28(%r13), %r14d
	movl	32(%r13), %r12d
	movq	_COMPUTE_MEMORY_PLL_PARAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-136(%rbp), %r8
	movq	%rbx, %rdi
	movl	%r15d, %edx
	xorl	%ecx, %ecx
	callq	_radeon_atom_get_clock_dividers
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	movq	%rbx, -144(%rbp)                ## 8-byte Spill
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, -64(%rbp)                ## 4-byte Spill
	movl	-136(%rbp), %edi
	cmpq	$0, -112(%rbp)
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	movl	%eax, -80(%rbp)                 ## 4-byte Spill
	je	LBB0_3
## %bb.2:
	movl	-132(%rbp), %eax
	movl	%eax, %ecx
	shrl	$4, %ecx
	andl	$15, %ecx
	andl	$15, %eax
	addl	%ecx, %eax
	addl	$2, %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	_MPLL_DIVEN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	jmp	LBB0_4
LBB0_3:
	movq	_MPLL_DIVEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %edx
	movl	$1, -60(%rbp)                   ## 4-byte Folded Spill
LBB0_4:
	movq	_MPLL_REF_DIV_MASK@GOTPCREL(%rip), %rax
	movq	_MPLL_HILEN_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	orl	(%rax), %r12d
	movq	_MPLL_LOLEN_MASK@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	notl	%r12d
	andl	%edx, %r12d
	movl	%edi, -76(%rbp)                 ## 4-byte Spill
	callq	_MPLL_REF_DIV
	movl	%eax, %r15d
	movl	-132(%rbp), %edi
	shrl	$4, %edi
	andl	$15, %edi
	callq	_MPLL_HILEN
	movl	%eax, %ebx
	orl	%r15d, %ebx
	movl	-132(%rbp), %edi
	andl	$15, %edi
	callq	_MPLL_LOLEN
	movl	%eax, %r14d
	orl	%ebx, %r14d
	orl	%r12d, %r14d
	movq	_MPLL_FB_DIV_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movl	-84(%rbp), %ebx                 ## 4-byte Reload
	andl	%eax, %ebx
	movl	-128(%rbp), %edi
	callq	_MPLL_FB_DIV
	orl	%ebx, %eax
	movq	_MPLL_DITHEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	movl	%r15d, %ecx
	orl	%eax, %ecx
	notl	%r15d
	andl	%eax, %r15d
	cmpq	$0, -120(%rbp)
	cmovnel	%ecx, %r15d
	cmpq	$0, (%r13)
	movl	%r14d, -56(%rbp)                ## 4-byte Spill
	je	LBB0_7
## %bb.5:
	movl	-64(%rbp), %r13d                ## 4-byte Reload
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	imull	%r13d, %ecx
	movq	_ASIC_INTERNAL_MEMORY_SS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-104(%rbp), %rsi
	movq	-144(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_radeon_atombios_get_asic_ss_info
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movl	-76(%rbp), %ecx                 ## 4-byte Reload
	incl	%ecx
	movl	(%rbx), %eax
	leal	(%rax,%rax,4), %eax
	imull	-104(%rbp), %ecx
	cltd
	idivl	%ecx
	movl	%eax, %edi
	movl	-128(%rbp), %eax
	imull	-100(%rbp), %eax
	imull	$10000, %edi, %ecx              ## imm = 0x2710
	cltd
	idivl	%ecx
	movl	%eax, %r14d
	movq	_CLK_S_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	andl	%eax, %r12d
	callq	_CLK_S
	movl	%eax, %ebx
	orl	%r12d, %ebx
	movq	_SSEN@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_CLK_V_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	andl	%eax, %r12d
	movl	%r14d, %edi
	callq	_CLK_V
	movl	%eax, %r14d
	orl	%ebx, %r14d
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_10
LBB0_7:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	movl	-64(%rbp), %r13d                ## 4-byte Reload
	jmp	LBB0_9
LBB0_8:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	-48(%rbp), %r12d                ## 4-byte Reload
LBB0_9:
	movl	-44(%rbp), %r14d                ## 4-byte Reload
LBB0_10:
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_be32
	movq	%rax, 56(%rbx)
	movl	-88(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_be32
	movq	%rax, 48(%rbx)
	movl	%r13d, %edi
	callq	_cpu_to_be32
	movq	%rax, 40(%rbx)
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_be32
	movq	%rax, 32(%rbx)
	movl	-92(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_be32
	movq	%rax, 24(%rbx)
	movl	%r15d, %edi
	callq	_cpu_to_be32
	movq	%rax, 16(%rbx)
	movl	%r14d, %edi
	callq	_cpu_to_be32
	movq	%rax, 8(%rbx)
	movl	%r12d, %edi
	callq	_cpu_to_be32
	movq	%rax, (%rbx)
	movl	-80(%rbp), %eax                 ## 4-byte Reload
LBB0_11:
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_COMPUTE_MEMORY_PLL_PARAM,4,2   ## @COMPUTE_MEMORY_PLL_PARAM
	.comm	_MPLL_DIVEN,4,2                 ## @MPLL_DIVEN
	.comm	_MPLL_REF_DIV_MASK,4,2          ## @MPLL_REF_DIV_MASK
	.comm	_MPLL_HILEN_MASK,4,2            ## @MPLL_HILEN_MASK
	.comm	_MPLL_LOLEN_MASK,4,2            ## @MPLL_LOLEN_MASK
	.comm	_MPLL_FB_DIV_MASK,4,2           ## @MPLL_FB_DIV_MASK
	.comm	_MPLL_DITHEN,4,2                ## @MPLL_DITHEN
	.comm	_ASIC_INTERNAL_MEMORY_SS,4,2    ## @ASIC_INTERNAL_MEMORY_SS
	.comm	_CLK_S_MASK,4,2                 ## @CLK_S_MASK
	.comm	_SSEN,4,2                       ## @SSEN
	.comm	_CLK_V_MASK,4,2                 ## @CLK_V_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rv730_populate_mclk_value      ; -- Begin function rv730_populate_mclk_value
	.p2align	2
_rv730_populate_mclk_value:             ; @rv730_populate_mclk_value
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	str	x3, [sp, #32]                   ; 8-byte Folded Spill
	mov	x25, x2
	mov	x26, x0
	bl	_rv770_get_pi
	mov	x28, x0
	ldp	w21, w20, [x0, #8]
	ldp	w27, w22, [x0, #16]
	ldp	w19, w23, [x0, #24]
	ldr	w24, [x0, #32]
Lloh0:
	adrp	x8, _COMPUTE_MEMORY_PLL_PARAM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _COMPUTE_MEMORY_PLL_PARAM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x4, sp, #48
	mov	x0, x26
	mov	x2, x25
	mov	w3, #0
	bl	_radeon_atom_get_clock_dividers
	cbnz	w0, LBB0_9
; %bb.1:
	mov	x12, x27
	str	x26, [sp, #8]                   ; 8-byte Folded Spill
	ldr	x27, [sp, #32]                  ; 8-byte Folded Reload
	stp	w19, w21, [sp, #16]             ; 8-byte Folded Spill
	stp	w20, w22, [sp, #24]             ; 8-byte Folded Spill
	ldr	w22, [sp, #48]
	ldr	x8, [sp, #72]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x21, x0
	ldr	w8, [sp, #52]
	ubfx	w9, w8, #4, #4
	and	w8, w8, #0xf
	add	w8, w8, w9
	add	w8, w8, #2
	str	w8, [sp, #4]                    ; 4-byte Folded Spill
Lloh3:
	adrp	x8, _MPLL_DIVEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MPLL_DIVEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	orr	w8, w8, w12
	b	LBB0_4
LBB0_3:
	mov	x21, x0
Lloh6:
	adrp	x8, _MPLL_DIVEN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MPLL_DIVEN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	bic	w8, w12, w8
	mov	w9, #1
	str	w9, [sp, #4]                    ; 4-byte Folded Spill
LBB0_4:
	mov	x20, x24
	mov	x24, x23
	mov	x23, x25
	mov	x19, x27
Lloh9:
	adrp	x9, _MPLL_REF_DIV_MASK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MPLL_REF_DIV_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _MPLL_HILEN_MASK@GOTPAGE
Lloh13:
	ldr	x10, [x10, _MPLL_HILEN_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh15:
	adrp	x10, _MPLL_LOLEN_MASK@GOTPAGE
Lloh16:
	ldr	x10, [x10, _MPLL_LOLEN_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	orr	w9, w9, w10
	bic	w26, w8, w9
	mov	x0, x22
	bl	_MPLL_REF_DIV
	orr	w26, w26, w0
	ldr	w8, [sp, #52]
	ubfx	w0, w8, #4, #4
	bl	_MPLL_HILEN
	orr	w26, w26, w0
	ldr	w8, [sp, #52]
	and	w0, w8, #0xf
	bl	_MPLL_LOLEN
	orr	w8, w26, w0
	str	w8, [sp, #32]                   ; 4-byte Folded Spill
Lloh18:
	adrp	x8, _MPLL_FB_DIV_MASK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MPLL_FB_DIV_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	ldr	w9, [sp, #16]                   ; 4-byte Folded Reload
	bic	w25, w9, w8
	ldr	w0, [sp, #56]
	bl	_MPLL_FB_DIV
	orr	w8, w0, w25
	ldr	x9, [sp, #64]
Lloh21:
	adrp	x10, _MPLL_DITHEN@GOTPAGE
Lloh22:
	ldr	x10, [x10, _MPLL_DITHEN@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
	orr	w11, w10, w8
	bic	w8, w8, w10
	cmp	x9, #0
	csel	w8, w8, w11, eq
	str	w8, [sp, #16]                   ; 4-byte Folded Spill
	ldr	x8, [x28]
	cbz	x8, LBB0_7
; %bb.5:
	ldr	w8, [sp, #4]                    ; 4-byte Folded Reload
	mul	w3, w8, w23
Lloh24:
	adrp	x8, _ASIC_INTERNAL_MEMORY_SS@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ASIC_INTERNAL_MEMORY_SS@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	add	x1, sp, #40
	ldr	x27, [sp, #8]                   ; 8-byte Folded Reload
	mov	x0, x27
	bl	_radeon_atombios_get_asic_ss_info
	ldp	w26, w25, [sp, #20]             ; 8-byte Folded Reload
	cbz	x0, LBB0_8
; %bb.6:
	add	w8, w22, #1
	ldp	w9, w10, [sp, #40]
	mul	w8, w9, w8
	ldr	w9, [x27]
	add	w9, w9, w9, lsl #2
	sdiv	w0, w9, w8
	ldr	w8, [sp, #56]
	mul	w8, w8, w10
	mov	w9, #10000
	mul	w9, w0, w9
	sdiv	w22, w8, w9
Lloh27:
	adrp	x8, _CLK_S_MASK@GOTPAGE
Lloh28:
	ldr	x8, [x8, _CLK_S_MASK@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	bic	w24, w24, w8
	bl	_CLK_S
	orr	w8, w24, w0
Lloh30:
	adrp	x9, _SSEN@GOTPAGE
Lloh31:
	ldr	x9, [x9, _SSEN@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	orr	w24, w8, w9
Lloh33:
	adrp	x8, _CLK_V_MASK@GOTPAGE
Lloh34:
	ldr	x8, [x8, _CLK_V_MASK@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	bic	w20, w20, w8
	mov	x0, x22
	bl	_CLK_V
	orr	w24, w24, w0
	b	LBB0_8
LBB0_7:
	ldp	w26, w25, [sp, #20]             ; 8-byte Folded Reload
LBB0_8:
	mov	x0, x26
	bl	_cpu_to_be32
	str	x0, [x19, #56]
	mov	x0, x25
	bl	_cpu_to_be32
	str	x0, [x19, #48]
	mov	x0, x23
	bl	_cpu_to_be32
	str	x0, [x19, #40]
	ldr	w0, [sp, #32]                   ; 4-byte Folded Reload
	bl	_cpu_to_be32
	str	x0, [x19, #32]
	ldr	w0, [sp, #28]                   ; 4-byte Folded Reload
	bl	_cpu_to_be32
	str	x0, [x19, #24]
	ldr	w0, [sp, #16]                   ; 4-byte Folded Reload
	bl	_cpu_to_be32
	str	x0, [x19, #16]
	mov	x0, x24
	bl	_cpu_to_be32
	str	x0, [x19, #8]
	mov	x0, x20
	bl	_cpu_to_be32
	str	x0, [x19]
	mov	x0, x21
LBB0_9:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_COMPUTE_MEMORY_PLL_PARAM,4,2   ; @COMPUTE_MEMORY_PLL_PARAM
	.comm	_MPLL_DIVEN,4,2                 ; @MPLL_DIVEN
	.comm	_MPLL_REF_DIV_MASK,4,2          ; @MPLL_REF_DIV_MASK
	.comm	_MPLL_HILEN_MASK,4,2            ; @MPLL_HILEN_MASK
	.comm	_MPLL_LOLEN_MASK,4,2            ; @MPLL_LOLEN_MASK
	.comm	_MPLL_FB_DIV_MASK,4,2           ; @MPLL_FB_DIV_MASK
	.comm	_MPLL_DITHEN,4,2                ; @MPLL_DITHEN
	.comm	_ASIC_INTERNAL_MEMORY_SS,4,2    ; @ASIC_INTERNAL_MEMORY_SS
	.comm	_CLK_S_MASK,4,2                 ; @CLK_S_MASK
	.comm	_SSEN,4,2                       ; @SSEN
	.comm	_CLK_V_MASK,4,2                 ; @CLK_V_MASK
.subsections_via_symbols
