	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rv1_update_clocks
_rv1_update_clocks:                     ## @rv1_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, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r13
	callq	_TO_CLK_MGR_INTERNAL
	movq	%rax, %rbx
	movq	32(%r13), %rax
	movq	(%rax), %r12
	movq	(%rbx), %rdi
	callq	_ASSERT
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rbx
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movl	%r14d, %r12d
	movq	%r15, %rsi
	callq	_clk_mgr_helper_get_active_display_cnt
	xorl	%ecx, %ecx
	testl	%eax, %eax
	sete	%cl
	cmpl	%r14d, %ecx
	jne	LBB0_3
## %bb.1:
	movq	32(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	*%rcx
LBB0_3:
	movq	(%r15), %rax
	movq	8(%r15), %rsi
	movq	8(%r13), %rdx
	cmpq	(%r13), %rax
	jg	LBB0_7
## %bb.4:
	cmpq	%rdx, %rsi
	jg	LBB0_7
## %bb.5:
	movq	16(%r15), %rax
	cmpq	16(%r13), %rax
	jg	LBB0_7
## %bb.6:
	movl	24(%r15), %eax
	movb	$1, %r14b
	cmpl	24(%r13), %eax
	jle	LBB0_8
LBB0_7:
	xorl	%r14d, %r14d
LBB0_8:
	movl	%r12d, %edi
                                        ## kill: def $esi killed $esi killed $rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_should_set_clock
	testq	%rax, %rax
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_9
## %bb.10:
	movq	8(%r15), %rax
	movq	%rax, 8(%r13)
	movl	$1, %ebx
	jmp	LBB0_11
LBB0_9:
	xorl	%ebx, %ebx
LBB0_11:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_12
## %bb.13:
	movq	%rsi, 16(%r15)
	jmp	LBB0_14
LBB0_12:
	movq	16(%r15), %rsi
LBB0_14:
	movl	16(%r13), %edx
	movl	%r12d, %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_should_set_clock
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	16(%r15), %rax
	movq	%rax, 16(%r13)
	movl	$1, %ebx
LBB0_16:
	movl	24(%r15), %esi
	movl	24(%r13), %edx
	movl	%r12d, %edi
	callq	_should_set_clock
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movl	24(%r15), %eax
	movl	%eax, 24(%r13)
	movl	$1, %ebx
LBB0_18:
	movl	28(%r15), %esi
	movl	28(%r13), %edx
	movl	%r12d, %edi
	callq	_should_set_clock
	testq	%rax, %rax
	je	LBB0_20
## %bb.19:
	movl	28(%r15), %eax
	movl	%eax, 28(%r13)
	movl	$1, %ebx
LBB0_20:
	testb	%r14b, %r14b
	jne	LBB0_25
## %bb.21:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	24(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_25
## %bb.22:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, 16(%rax)
	je	LBB0_25
## %bb.23:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, 8(%rax)
	je	LBB0_25
## %bb.24:
	movabsq	$2361183241434822607, %rax      ## imm = 0x20C49BA5E353F7CF
	imulq	16(%r15)
	movq	%rdx, %rsi
	shrq	$63, %rsi
	shrq	$7, %rdx
	addl	%edx, %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	*%rcx
	movslq	24(%r15), %rax
	imulq	$274877907, %rax, %rsi          ## imm = 0x10624DD3
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$38, %rsi
	addl	%eax, %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	callq	*16(%rax)
	movl	$999, %eax                      ## imm = 0x3E7
	addl	28(%r15), %eax
	cltq
	imulq	$274877907, %rax, %rsi          ## imm = 0x10624DD3
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$38, %rsi
	addl	%eax, %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	*8(%rdi)
LBB0_25:
	movl	(%r15), %esi
	movl	(%r13), %edx
	movl	%r12d, %edi
	callq	_should_set_clock
	testq	%rax, %rax
	jne	LBB0_27
## %bb.26:
	movq	(%r15), %rax
	cmpq	(%r13), %rax
	jne	LBB0_28
LBB0_27:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r15, %rdx
	callq	_ramp_up_dispclk_with_dpp
	movq	(%r15), %rax
	movq	%rax, (%r13)
	movl	$1, %ebx
LBB0_28:
	testl	%ebx, %ebx
	sete	%al
	xorb	$1, %r14b
	orb	%al, %r14b
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_32
## %bb.29:
	movq	24(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_32
## %bb.30:
	cmpq	$0, 16(%rbx)
	je	LBB0_32
## %bb.31:
	cmpq	$0, 8(%rbx)
	je	LBB0_32
## %bb.33:
	movabsq	$2361183241434822607, %rax      ## imm = 0x20C49BA5E353F7CF
	imulq	16(%r15)
	movq	%rdx, %rsi
	shrq	$63, %rsi
	shrq	$7, %rdx
	addl	%edx, %esi
	movq	%rbx, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	*%rcx
	movslq	24(%r15), %rax
	imulq	$274877907, %rax, %rsi          ## imm = 0x10624DD3
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$38, %rsi
	addl	%eax, %esi
	movq	%rbx, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	*16(%rbx)
	movq	8(%rbx), %rax
	movl	$999, %ecx                      ## imm = 0x3E7
	addl	28(%r15), %ecx
	movslq	%ecx, %rcx
	imulq	$274877907, %rcx, %rsi          ## imm = 0x10624DD3
	movq	%rsi, %rcx
	shrq	$63, %rcx
	sarq	$38, %rsi
	addl	%ecx, %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	*%rax                           ## TAILCALL
LBB0_32:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_rv1_update_clocks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rv1_update_clocks
_rv1_update_clocks:                     ; @rv1_update_clocks
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x24, x2
	mov	x19, x1
	mov	x21, x0
	bl	_TO_CLK_MGR_INTERNAL
	mov	x22, x0
	ldr	x8, [x21, #32]
	ldr	x23, [x8]
	ldr	x0, [x0]
	bl	_ASSERT
	ldr	x20, [x22]
	mov	x0, x23
	mov	x1, x19
	bl	_clk_mgr_helper_get_active_display_cnt
	cmp	w0, #0
	cset	w8, eq
	cmp	w8, w24
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x1, x0
	mov	x0, x20
	blr	x8
LBB0_3:
	ldp	x8, x1, [x19]
	ldp	x9, x2, [x21]
	cmp	x8, x9
	ccmp	x1, x2, #0, le
	b.gt	LBB0_6
; %bb.4:
	ldr	x8, [x19, #16]
	ldr	x9, [x21, #16]
	cmp	x8, x9
	b.gt	LBB0_6
; %bb.5:
	ldr	w8, [x19, #24]
	ldr	w9, [x21, #24]
	cmp	w8, w9
	b.le	LBB0_32
LBB0_6:
	mov	w25, #0
LBB0_7:
	mov	x0, x24
                                        ; kill: def $w1 killed $w1 killed $x1
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_should_set_clock
	cbz	x0, LBB0_10
; %bb.8:
	ldr	x8, [x19, #8]
	str	x8, [x21, #8]
	mov	w26, #1
	ldr	x1, [x23]
	cbz	x1, LBB0_11
LBB0_9:
	str	x1, [x19, #16]
	b	LBB0_12
LBB0_10:
	mov	w26, #0
	ldr	x1, [x23]
	cbnz	x1, LBB0_9
LBB0_11:
	ldr	x1, [x19, #16]
LBB0_12:
	ldr	w2, [x21, #16]
	mov	x0, x24
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_should_set_clock
	cbz	x0, LBB0_14
; %bb.13:
	ldr	x8, [x19, #16]
	str	x8, [x21, #16]
	mov	w26, #1
LBB0_14:
	ldr	w1, [x19, #24]
	ldr	w2, [x21, #24]
	mov	x0, x24
	bl	_should_set_clock
	cbz	x0, LBB0_16
; %bb.15:
	ldr	w8, [x19, #24]
	str	w8, [x21, #24]
	mov	w26, #1
LBB0_16:
	ldr	w1, [x19, #28]
	ldr	w2, [x21, #28]
	mov	x0, x24
	bl	_should_set_clock
	cbz	x0, LBB0_18
; %bb.17:
	ldr	w8, [x19, #28]
	str	w8, [x21, #28]
	mov	w26, #1
LBB0_18:
	tbnz	w25, #0, LBB0_23
; %bb.19:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_23
; %bb.20:
	ldr	x9, [x20, #16]
	cbz	x9, LBB0_23
; %bb.21:
	ldr	x9, [x20, #8]
	cbz	x9, LBB0_23
; %bb.22:
	ldr	x9, [x19, #16]
	mov	x10, #63439
	movk	x10, #58195, lsl #16
	movk	x10, #39845, lsl #32
	movk	x10, #8388, lsl #48
	smulh	x9, x9, x10
	lsr	x10, x9, #63
	lsr	x9, x9, #7
	add	w1, w9, w10
	mov	x0, x20
	blr	x8
	ldr	x8, [x20, #16]
	ldrsw	x9, [x19, #24]
	mov	w27, #19923
	movk	w27, #4194, lsl #16
	mul	x9, x9, x27
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w1, w9, w10
	mov	x0, x20
	blr	x8
	ldr	x8, [x20, #8]
	ldr	w9, [x19, #28]
	add	w9, w9, #999
	smull	x9, w9, w27
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w1, w9, w10
	mov	x0, x20
	blr	x8
LBB0_23:
	ldr	w1, [x19]
	ldr	w2, [x21]
	mov	x0, x24
	bl	_should_set_clock
	cbnz	x0, LBB0_25
; %bb.24:
	ldr	x8, [x19]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_26
LBB0_25:
	mov	x0, x22
	mov	x1, x23
	mov	x2, x19
	bl	_ramp_up_dispclk_with_dpp
	ldr	x8, [x19]
	str	x8, [x21]
	mov	w26, #1
LBB0_26:
	cmp	w26, #0
	cset	w8, eq
	eor	w9, w25, #0x1
	orr	w8, w9, w8
	tbnz	w8, #0, LBB0_31
; %bb.27:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_31
; %bb.28:
	ldr	x9, [x20, #16]
	cbz	x9, LBB0_31
; %bb.29:
	ldr	x9, [x20, #8]
	cbz	x9, LBB0_31
; %bb.30:
	ldr	x9, [x19, #16]
	mov	x10, #63439
	movk	x10, #58195, lsl #16
	movk	x10, #39845, lsl #32
	movk	x10, #8388, lsl #48
	smulh	x9, x9, x10
	lsr	x10, x9, #63
	lsr	x9, x9, #7
	add	w1, w9, w10
	mov	x0, x20
	blr	x8
	ldr	x8, [x20, #16]
	ldrsw	x9, [x19, #24]
	mov	w21, #19923
	movk	w21, #4194, lsl #16
	mul	x9, x9, x21
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w1, w9, w10
	mov	x0, x20
	blr	x8
	ldr	x2, [x20, #8]
	ldr	w8, [x19, #28]
	add	w8, w8, #999
	smull	x8, w8, w21
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w1, w8, w9
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	br	x2
LBB0_31:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_32:
	mov	w25, #1
	b	LBB0_7
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_rv1_update_clocks
.subsections_via_symbols
