	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rn_update_clocks               ## -- Begin function rn_update_clocks
	.p2align	4, 0x90
_rn_update_clocks:                      ## @rn_update_clocks
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r13d
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_TO_CLK_MGR_INTERNAL
	movq	%rax, %rbx
	movq	40(%r15), %rax
	movq	(%rax), %rdi
	movq	(%rdi), %rax
	movq	(%rax), %r12
	movq	%r14, %rsi
	callq	_clk_mgr_helper_get_active_display_cnt
	xorl	%ecx, %ecx
	testl	%eax, %eax
	sete	%cl
	cmpl	%r13d, %ecx
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_rn_vbios_smu_set_display_count
LBB0_2:
	movq	(%r14), %rsi
	movq	(%r15), %rdx
	movl	%r13d, %edi
	callq	_should_set_clock
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	(%r14), %rsi
	movq	%rsi, (%r15)
	movq	%rbx, %rdi
	callq	_rn_vbios_smu_set_phyclk
LBB0_4:
	movq	8(%r14), %rsi
	movq	8(%r15), %rdx
	movl	%r13d, %edi
	callq	_should_set_clock
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	8(%r14), %rsi
	movq	%rsi, 8(%r15)
	movq	%rbx, %rdi
	callq	_rn_vbios_smu_set_hard_min_dcfclk
LBB0_6:
	movq	16(%r14), %rsi
	movq	16(%r15), %rdx
	movl	%r13d, %edi
	callq	_should_set_clock
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	16(%r14), %rsi
	movq	%rsi, 16(%r15)
	movq	%rbx, %rdi
	callq	_rn_vbios_smu_set_min_deep_sleep_dcfclk
LBB0_8:
	movq	24(%r14), %rsi
	movq	(%rbx), %rdx
	movl	%r13d, %edi
	callq	_should_set_clock
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_9
## %bb.10:
	movq	24(%r14), %rax
	xorl	%r12d, %r12d
	cmpq	%rax, (%rbx)
	setg	%r12b
	movq	%rax, 24(%r15)
	jmp	LBB0_11
LBB0_9:
	xorl	%r12d, %r12d
LBB0_11:
	movq	32(%r14), %rsi
	movq	32(%r15), %rdx
	movl	%r13d, %edi
	callq	_should_set_clock
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	32(%r14), %rsi
	movq	%rsi, 32(%r15)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_rn_vbios_smu_set_dispclk
LBB0_13:
	testq	%rbx, %rbx
	setne	%r13b
	testl	%r12d, %r12d
	je	LBB0_15
## %bb.14:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_dcn20_update_clocks_update_dpp_dto
	movq	24(%r15), %rsi
	movq	%rbx, %rdi
	callq	_rn_vbios_smu_set_dppclk
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_19
LBB0_15:
	orq	-56(%rbp), %rbx                 ## 8-byte Folded Reload
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_17
## %bb.16:
	movq	24(%r15), %rsi
	movq	%r12, %rdi
	callq	_rn_vbios_smu_set_dppclk
LBB0_17:
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_19
## %bb.18:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_dcn20_update_clocks_update_dpp_dto
LBB0_19:
	testq	%rbx, %rbx
	setne	%al
	andb	%al, %r13b
	cmpb	$1, %r13b
	jne	LBB0_21
## %bb.20:
	movq	(%rbx), %rax
	movq	%rbx, %rdi
	callq	*8(%rax)
	testq	%rax, %rax
	je	LBB0_21
## %bb.22:
	movq	(%rbx), %rax
	movq	(%rax), %rcx
	movq	32(%r15), %rsi
	movabsq	$-7652763541436076841, %rdx     ## imm = 0x95CBEC1AEAA46CD7
	movq	%rsi, %rax
	imulq	%rdx
	addq	%rdx, %rsi
	movq	%rsi, %rax
	shrq	$63, %rax
	shrq	$12, %rsi
	addl	%eax, %esi
	movq	%rbx, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rcx                           ## TAILCALL
LBB0_21:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rn_update_clocks               ; -- Begin function rn_update_clocks
	.p2align	2
_rn_update_clocks:                      ; @rn_update_clocks
	.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	x23, x2
	mov	x21, x1
	mov	x19, x0
	bl	_TO_CLK_MGR_INTERNAL
	mov	x22, x0
	ldr	x8, [x19, #40]
	ldr	x0, [x8]
	ldr	x8, [x0]
	ldr	x20, [x8]
	mov	x1, x21
	bl	_clk_mgr_helper_get_active_display_cnt
	cmp	w0, #0
	cset	w8, eq
	cmp	w8, w23
	b.ne	LBB0_2
; %bb.1:
	mov	x1, x0
	mov	x0, x22
	bl	_rn_vbios_smu_set_display_count
LBB0_2:
	ldr	x1, [x21]
	ldr	x2, [x19]
	mov	x0, x23
	bl	_should_set_clock
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x1, [x21]
	str	x1, [x19]
	mov	x0, x22
	bl	_rn_vbios_smu_set_phyclk
LBB0_4:
	ldr	x1, [x21, #8]
	ldr	x2, [x19, #8]
	mov	x0, x23
	bl	_should_set_clock
	cbz	x0, LBB0_6
; %bb.5:
	ldr	x1, [x21, #8]
	str	x1, [x19, #8]
	mov	x0, x22
	bl	_rn_vbios_smu_set_hard_min_dcfclk
LBB0_6:
	ldr	x1, [x21, #16]
	ldr	x2, [x19, #16]
	mov	x0, x23
	bl	_should_set_clock
	cbz	x0, LBB0_8
; %bb.7:
	ldr	x1, [x21, #16]
	str	x1, [x19, #16]
	mov	x0, x22
	bl	_rn_vbios_smu_set_min_deep_sleep_dcfclk
LBB0_8:
	ldr	x1, [x21, #24]
	ldr	x2, [x22]
	mov	x0, x23
	bl	_should_set_clock
	mov	x24, x0
	cbz	x0, LBB0_10
; %bb.9:
	ldr	x8, [x22]
	ldr	x9, [x21, #24]
	cmp	x8, x9
	cset	w26, gt
	str	x9, [x19, #24]
	b	LBB0_11
LBB0_10:
	mov	w26, #0
LBB0_11:
	ldr	x1, [x21, #32]
	ldr	x2, [x19, #32]
	mov	x0, x23
	bl	_should_set_clock
	mov	x23, x0
	cbz	x0, LBB0_13
; %bb.12:
	ldr	x1, [x21, #32]
	str	x1, [x19, #32]
	mov	x0, x22
	bl	_rn_vbios_smu_set_dispclk
LBB0_13:
	cmp	x23, #0
	cset	w25, ne
	cbz	w26, LBB0_15
; %bb.14:
	mov	x0, x22
	mov	x1, x21
	bl	_dcn20_update_clocks_update_dpp_dto
	ldr	x1, [x19, #24]
	mov	x0, x22
	bl	_rn_vbios_smu_set_dppclk
	b	LBB0_19
LBB0_15:
	orr	x8, x24, x23
	cbz	x8, LBB0_17
; %bb.16:
	ldr	x1, [x19, #24]
	mov	x0, x22
	bl	_rn_vbios_smu_set_dppclk
LBB0_17:
	cbz	x24, LBB0_19
; %bb.18:
	mov	x0, x22
	mov	x1, x21
	bl	_dcn20_update_clocks_update_dpp_dto
LBB0_19:
	cmp	x20, #0
	cset	w8, ne
	and	w8, w25, w8
	cmp	w8, #1
	b.ne	LBB0_22
; %bb.20:
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	mov	x0, x20
	blr	x8
	cbz	x0, LBB0_22
; %bb.21:
	ldr	x8, [x20]
	ldr	x2, [x8]
	ldr	x8, [x19, #32]
	mov	x9, #27863
	movk	x9, #60068, lsl #16
	movk	x9, #60442, lsl #32
	movk	x9, #38347, lsl #48
	smulh	x9, x8, x9
	add	x8, x9, x8
	lsr	x9, x8, #63
	lsr	x8, x8, #12
	add	w1, w8, w9
	mov	x0, x20
	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
	br	x2
LBB0_22:
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
