	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rv1_vbios_smu_set_dispclk      ## -- Begin function rv1_vbios_smu_set_dispclk
	.p2align	4, 0x90
_rv1_vbios_smu_set_dispclk:             ## @rv1_vbios_smu_set_dispclk
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	8(%rdi), %rax
	movq	(%rax), %rbx
	movq	8(%rbx), %rax
	movq	(%rax), %r14
	movq	_VBIOSSMC_MSG_SetDispclkFreq@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movslq	%esi, %rcx
	imulq	$274877907, %rcx, %rdx          ## imm = 0x10624DD3
	movq	%rdx, %rcx
	shrq	$63, %rcx
	sarq	$38, %rdx
	addl	%ecx, %edx
	movl	%eax, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_rv1_vbios_smu_send_msg_with_param
	movq	_MP1_SMN_C2PMSG_83@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_REG_READ
	movl	%eax, %r15d
	movq	(%rbx), %rax
	movl	(%rax), %edi
	callq	_IS_FPGA_MAXIMUS_DC
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	testq	%r14, %r14
	je	LBB0_5
## %bb.2:
	movq	(%r14), %rax
	movq	%r14, %rdi
	callq	*8(%rax)
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	imull	$1000, %r15d, %eax              ## imm = 0x3E8
	cmpl	%eax, (%r12)
	je	LBB0_5
## %bb.4:
	movq	(%r14), %rcx
	movslq	%eax, %rsi
	imulq	$-1840700269, %rsi, %rax        ## imm = 0x92492493
	shrq	$32, %rax
	addl	%eax, %esi
	movl	%esi, %eax
	shrl	$31, %eax
	sarl	$2, %esi
	addl	%eax, %esi
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	*(%rcx)
LBB0_5:
	imull	$1000000, %r15d, %eax           ## imm = 0xF4240
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VBIOSSMC_MSG_SetDispclkFreq,4,2 ## @VBIOSSMC_MSG_SetDispclkFreq
	.comm	_MP1_SMN_C2PMSG_83,4,2          ## @MP1_SMN_C2PMSG_83
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rv1_vbios_smu_set_dispclk      ; -- Begin function rv1_vbios_smu_set_dispclk
	.p2align	2
_rv1_vbios_smu_set_dispclk:             ; @rv1_vbios_smu_set_dispclk
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	x22, [x8]
	ldr	x8, [x22, #8]
	ldr	x19, [x8]
Lloh0:
	adrp	x8, _VBIOSSMC_MSG_SetDispclkFreq@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VBIOSSMC_MSG_SetDispclkFreq@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	smull	x9, w1, w9
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w2, w9, w10
	mov	x1, x8
	bl	_rv1_vbios_smu_send_msg_with_param
Lloh3:
	adrp	x8, _MP1_SMN_C2PMSG_83@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MP1_SMN_C2PMSG_83@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_REG_READ
	mov	x21, x0
	ldr	x8, [x22]
	ldr	w0, [x8]
	bl	_IS_FPGA_MAXIMUS_DC
	cmp	w0, #0
	ccmp	x19, #0, #4, eq
	b.eq	LBB0_4
; %bb.1:
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
	mov	x0, x19
	blr	x8
	cbz	x0, LBB0_4
; %bb.2:
	mov	w8, #1000
	mul	w8, w21, w8
	ldr	w9, [x20]
	cmp	w9, w8
	b.eq	LBB0_4
; %bb.3:
	ldr	x9, [x19]
	ldr	x9, [x9]
	mov	w10, #9363
	movk	w10, #37449, lsl #16
	smull	x10, w8, w10
	lsr	x10, x10, #32
	add	w8, w10, w8
	asr	w10, w8, #2
	add	w1, w10, w8, lsr #31
	mov	x0, x19
	blr	x9
LBB0_4:
	mov	w8, #16960
	movk	w8, #15, lsl #16
	mul	w0, w21, w8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_VBIOSSMC_MSG_SetDispclkFreq,4,2 ; @VBIOSSMC_MSG_SetDispclkFreq
	.comm	_MP1_SMN_C2PMSG_83,4,2          ; @MP1_SMN_C2PMSG_83
.subsections_via_symbols
