	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rv6xx_program_memory_timing_parameters
_rv6xx_program_memory_timing_parameters: ## @rv6xx_program_memory_timing_parameters
	.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, %r14
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_rv6xx_get_pi
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	_R600_POWER_LEVEL_HIGH@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rcx
	movq	%rdx, %r13
	movl	(%rax,%rcx,4), %ecx
	movq	_R600_POWER_LEVEL_LOW@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rdx
	movq	%rsi, %r12
	movl	(%rax,%rdx,4), %eax
	movl	%eax, %edx
	shll	$8, %edx
	subl	%eax, %edx
	leal	63(%rdx), %ebx
	testl	%edx, %edx
	cmovnsl	%edx, %ebx
	sarl	$6, %ebx
	cmpl	%ebx, %ecx
	cmovll	%ecx, %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_radeon_atom_set_engine_dram_timings
	shll	$6, %ebx
	movq	(%r15), %rcx
	movq	(%r12), %rsi
	movl	%ebx, %eax
	cltd
	idivl	(%rcx,%rsi,4)
	movl	%eax, %edi
	callq	_STATE0
	movl	%eax, %r12d
	movq	(%r15), %rcx
	movq	_R600_POWER_LEVEL_MEDIUM@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%ebx, %eax
	cltd
	idivl	(%rcx,%rsi,4)
	movl	%eax, %edi
	callq	_STATE1
	orl	%eax, %r12d
	movq	(%r15), %rcx
	movq	%r13, %r14
	movq	(%r13), %rsi
	movl	%ebx, %eax
	cltd
	idivl	(%rcx,%rsi,4)
	movl	%eax, %edi
	callq	_STATE2
	movl	%eax, %r13d
	movq	(%r15), %rcx
	movq	(%r14), %rsi
	movl	%ebx, %eax
	cltd
	idivl	(%rcx,%rsi,4)
	movl	%eax, %edi
	callq	_STATE3
	orl	%eax, %r13d
	orl	%r12d, %r13d
	movq	_SQM_RATIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r13d, %esi
	callq	_WREG32
	movq	(%r15), %rax
	movq	_R600_POWER_LEVEL_LOW@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_calculate_memory_refresh_rate
	movl	%eax, %edi
	callq	_POWERMODE0
	movl	%eax, %r12d
	movq	(%r15), %rax
	movq	_R600_POWER_LEVEL_MEDIUM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	%r14, %rdi
	callq	_calculate_memory_refresh_rate
	movl	%eax, %edi
	callq	_POWERMODE1
	orl	%eax, %r12d
	movq	(%r15), %rax
	movq	_R600_POWER_LEVEL_HIGH@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	%r14, %rdi
	callq	_calculate_memory_refresh_rate
	movl	%eax, %edi
	callq	_POWERMODE2
	movl	%eax, %ebx
	movq	(%r15), %rax
	movq	(%r13), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	%r14, %rdi
	callq	_calculate_memory_refresh_rate
	movl	%eax, %edi
	callq	_POWERMODE3
	orl	%eax, %ebx
	orl	%r12d, %ebx
	movq	_ARB_RFSH_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WREG32                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_R600_POWER_LEVEL_HIGH,8,3      ## @R600_POWER_LEVEL_HIGH
	.comm	_R600_POWER_LEVEL_LOW,8,3       ## @R600_POWER_LEVEL_LOW
	.comm	_R600_POWER_LEVEL_MEDIUM,8,3    ## @R600_POWER_LEVEL_MEDIUM
	.comm	_SQM_RATIO,4,2                  ## @SQM_RATIO
	.comm	_ARB_RFSH_RATE,4,2              ## @ARB_RFSH_RATE
	.no_dead_strip	_rv6xx_program_memory_timing_parameters
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rv6xx_program_memory_timing_parameters
_rv6xx_program_memory_timing_parameters: ; @rv6xx_program_memory_timing_parameters
	.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
	mov	x19, x0
	bl	_rv6xx_get_pi
	mov	x20, x0
Lloh0:
	adrp	x22, _R600_POWER_LEVEL_HIGH@GOTPAGE
Lloh1:
	ldr	x22, [x22, _R600_POWER_LEVEL_HIGH@GOTPAGEOFF]
	ldr	x8, [x0]
	ldr	x9, [x22]
	ldr	w9, [x8, x9, lsl #2]
Lloh2:
	adrp	x23, _R600_POWER_LEVEL_LOW@GOTPAGE
Lloh3:
	ldr	x23, [x23, _R600_POWER_LEVEL_LOW@GOTPAGEOFF]
	ldr	x10, [x23]
	ldr	w8, [x8, x10, lsl #2]
	lsl	w10, w8, #8
	sub	w8, w10, w8
	add	w10, w8, #63
	cmp	w8, #0
	csel	w8, w10, w8, lt
	asr	w8, w8, #6
	cmp	w9, w8
	csel	w21, w9, w8, lt
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	bl	_radeon_atom_set_engine_dram_timings
	lsl	w24, w21, #6
	ldr	x8, [x20]
	ldr	x9, [x23]
	ldr	w8, [x8, x9, lsl #2]
	sdiv	w0, w24, w8
	bl	_STATE0
	mov	x21, x0
	ldr	x8, [x20]
Lloh4:
	adrp	x25, _R600_POWER_LEVEL_MEDIUM@GOTPAGE
Lloh5:
	ldr	x25, [x25, _R600_POWER_LEVEL_MEDIUM@GOTPAGEOFF]
	ldr	x9, [x25]
	ldr	w8, [x8, x9, lsl #2]
	sdiv	w0, w24, w8
	bl	_STATE1
	orr	w21, w0, w21
	ldr	x8, [x20]
	ldr	x9, [x22]
	ldr	w8, [x8, x9, lsl #2]
	sdiv	w0, w24, w8
	bl	_STATE2
	orr	w21, w21, w0
	ldr	x8, [x20]
	ldr	x9, [x22]
	ldr	w8, [x8, x9, lsl #2]
	sdiv	w0, w24, w8
	bl	_STATE3
	orr	w1, w21, w0
Lloh6:
	adrp	x8, _SQM_RATIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SQM_RATIO@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_WREG32
	ldr	x8, [x20]
	ldr	x9, [x23]
	ldr	w1, [x8, x9, lsl #2]
	mov	x0, x19
	bl	_calculate_memory_refresh_rate
	bl	_POWERMODE0
	mov	x21, x0
	ldr	x8, [x20]
	ldr	x9, [x25]
	ldr	w1, [x8, x9, lsl #2]
	mov	x0, x19
	bl	_calculate_memory_refresh_rate
	bl	_POWERMODE1
	orr	w21, w0, w21
	ldr	x8, [x20]
	ldr	x9, [x22]
	ldr	w1, [x8, x9, lsl #2]
	mov	x0, x19
	bl	_calculate_memory_refresh_rate
	bl	_POWERMODE2
	orr	w21, w21, w0
	ldr	x8, [x20]
	ldr	x9, [x22]
	ldr	w1, [x8, x9, lsl #2]
	mov	x0, x19
	bl	_calculate_memory_refresh_rate
	bl	_POWERMODE3
	orr	w1, w21, w0
Lloh9:
	adrp	x8, _ARB_RFSH_RATE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ARB_RFSH_RATE@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	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
	b	_WREG32
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_R600_POWER_LEVEL_HIGH,8,3      ; @R600_POWER_LEVEL_HIGH
	.comm	_R600_POWER_LEVEL_LOW,8,3       ; @R600_POWER_LEVEL_LOW
	.comm	_R600_POWER_LEVEL_MEDIUM,8,3    ; @R600_POWER_LEVEL_MEDIUM
	.comm	_SQM_RATIO,4,2                  ; @SQM_RATIO
	.comm	_ARB_RFSH_RATE,4,2              ; @ARB_RFSH_RATE
	.no_dead_strip	_rv6xx_program_memory_timing_parameters
.subsections_via_symbols
