	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rv770_program_memory_timing_parameters
_rv770_program_memory_timing_parameters: ## @rv770_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	%rsi, %rdi
	callq	_rv770_get_ps
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_rv770_get_pi
	movq	%rax, %r15
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	12(%r12), %eax
	movl	%eax, %ecx
	shll	$8, %ecx
	subl	%eax, %ecx
	leal	63(%rcx), %ebx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %ebx
	sarl	$6, %ebx
	movl	(%r12), %eax
	movl	4(%r12), %edx
	cmpl	%ebx, %eax
	cmovll	%eax, %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_radeon_atom_set_engine_dram_timings
	shll	$6, %ebx
	movl	%ebx, %eax
	cltd
	idivl	(%r15)
	movl	%eax, %edi
	callq	_STATE0
	movl	%eax, %r13d
	movl	%ebx, %eax
	cltd
	idivl	12(%r12)
	movl	%eax, %edi
	callq	_STATE1
	orl	%eax, %r13d
	movl	%ebx, %eax
	cltd
	idivl	8(%r12)
	movl	%eax, %edi
	callq	_STATE2
	movl	%eax, %r15d
	movl	%ebx, %eax
	cltd
	idivl	(%r12)
	movl	%eax, %edi
	callq	_STATE3
	orl	%eax, %r15d
	orl	%r13d, %r15d
	movq	_MC_ARB_SQM_RATIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_WREG32
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_rv770_calculate_memory_refresh_rate
	movl	%eax, %edi
	callq	_POWERMODE0
	movl	%eax, %r15d
	movl	12(%r12), %esi
	movq	%r14, %rdi
	callq	_rv770_calculate_memory_refresh_rate
	movl	%eax, %edi
	callq	_POWERMODE1
	orl	%eax, %r15d
	movl	8(%r12), %esi
	movq	%r14, %rdi
	callq	_rv770_calculate_memory_refresh_rate
	movl	%eax, %edi
	callq	_POWERMODE2
	movl	%eax, %ebx
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_rv770_calculate_memory_refresh_rate
	movl	%eax, %edi
	callq	_POWERMODE3
	orl	%eax, %ebx
	orl	%r15d, %ebx
	movq	_MC_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	_MC_ARB_SQM_RATIO,4,2           ## @MC_ARB_SQM_RATIO
	.comm	_MC_ARB_RFSH_RATE,4,2           ## @MC_ARB_RFSH_RATE
	.no_dead_strip	_rv770_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 rv770_program_memory_timing_parameters
_rv770_program_memory_timing_parameters: ; @rv770_program_memory_timing_parameters
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	mov	x0, x1
	bl	_rv770_get_ps
	mov	x20, x0
	mov	x0, x19
	bl	_rv770_get_pi
	mov	x21, x0
	ldr	w8, [x20, #12]
	lsl	w9, w8, #8
	sub	w8, w9, w8
	add	w9, w8, #63
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #6
	ldp	w9, w2, [x20]
	cmp	w9, w8
	csel	w22, w9, w8, lt
	mov	x0, x19
	mov	x1, x22
	bl	_radeon_atom_set_engine_dram_timings
	lsl	w23, w22, #6
	ldr	w8, [x21]
	sdiv	w0, w23, w8
	bl	_STATE0
	mov	x22, x0
	ldr	w8, [x20, #12]
	sdiv	w0, w23, w8
	bl	_STATE1
	orr	w22, w0, w22
	ldr	w8, [x20, #8]
	sdiv	w0, w23, w8
	bl	_STATE2
	orr	w22, w22, w0
	ldr	w8, [x20]
	sdiv	w0, w23, w8
	bl	_STATE3
	orr	w1, w22, w0
Lloh0:
	adrp	x8, _MC_ARB_SQM_RATIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MC_ARB_SQM_RATIO@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_WREG32
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rv770_calculate_memory_refresh_rate
	bl	_POWERMODE0
	mov	x21, x0
	ldr	w1, [x20, #12]
	mov	x0, x19
	bl	_rv770_calculate_memory_refresh_rate
	bl	_POWERMODE1
	orr	w21, w0, w21
	ldr	w1, [x20, #8]
	mov	x0, x19
	bl	_rv770_calculate_memory_refresh_rate
	bl	_POWERMODE2
	orr	w21, w21, w0
	ldr	w1, [x20]
	mov	x0, x19
	bl	_rv770_calculate_memory_refresh_rate
	bl	_POWERMODE3
	orr	w1, w21, w0
Lloh3:
	adrp	x8, _MC_ARB_RFSH_RATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MC_ARB_RFSH_RATE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_WREG32
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MC_ARB_SQM_RATIO,4,2           ; @MC_ARB_SQM_RATIO
	.comm	_MC_ARB_RFSH_RATE,4,2           ; @MC_ARB_RFSH_RATE
	.no_dead_strip	_rv770_program_memory_timing_parameters
.subsections_via_symbols
