	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function round_plldsi_rate
_round_plldsi_rate:                     ## @round_plldsi_rate
	.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
	movq	%rdi, %r12
	movq	_PRCMU_HDMICLK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_clock_rate
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testq	%r12, %r12
	je	LBB0_1
## %bb.2:
	leal	(,%r12,8), %ebx
	subl	%r12d, %ebx
	movl	$7, %r13d
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movq	%r15, %rsi
	callq	_do_div
	cmpl	$255, %ebx
	movl	$255, %r14d
	cmovll	%ebx, %r14d
	cmpl	$7, %r14d
	movl	$6, %eax
	cmovll	%eax, %r14d
	imull	%r15d, %r14d
	leal	(%r14,%r14), %eax
	cltq
	movq	_MIN_PLL_VCO_RATE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	imulq	%r13, %rcx
	cmpq	%rax, %rcx
	ja	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_MAX_PLL_VCO_RATE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	imulq	%r13, %rcx
	cmpq	%rax, %rcx
	jb	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r14d, %edi
	movq	%r13, %rsi
	callq	_do_div
	movslq	%r14d, %rax
	cmpq	%r12, %rax
	ja	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rcx
	subq	%rax, %rcx
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	cmpq	%rsi, %rcx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	cmovbq	%rax, %rdx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	cmovbq	%rcx, %rsi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	-1(%r13), %rax
	subl	%r12d, %ebx
	cmpq	$1, %r13
	movq	%rax, %r13
	jne	LBB0_3
	jmp	LBB0_9
LBB0_1:
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_9
LBB0_10:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	cmoveq	%rax, %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
LBB0_9:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PRCMU_HDMICLK,4,2              ## @PRCMU_HDMICLK
	.comm	_MIN_PLL_VCO_RATE,8,3           ## @MIN_PLL_VCO_RATE
	.comm	_MAX_PLL_VCO_RATE,8,3           ## @MAX_PLL_VCO_RATE
	.no_dead_strip	_round_plldsi_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function round_plldsi_rate
_round_plldsi_rate:                     ; @round_plldsi_rate
	.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	x28, x0
Lloh0:
	adrp	x8, _PRCMU_HDMICLK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PRCMU_HDMICLK@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_clock_rate
	cbz	x28, LBB0_8
; %bb.1:
	mov	x21, x0
	mov	x19, #0
	lsl	w8, w28, #3
	sub	w22, w8, w28
	mov	w23, #7
	mov	w25, #255
	mov	w26, #6
Lloh3:
	adrp	x27, _MIN_PLL_VCO_RATE@GOTPAGE
Lloh4:
	ldr	x27, [x27, _MIN_PLL_VCO_RATE@GOTPAGEOFF]
	mov	x20, x28
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x21
	bl	_do_div
	cmp	w22, #255
	csel	w8, w22, w25, lt
	cmp	w8, #6
	csel	w8, w8, w26, gt
	mul	w24, w8, w21
	lsl	w8, w24, #1
	sxtw	x8, w8
	ldr	x9, [x27]
	mul	x9, x9, x23
	cmp	x9, x8
	b.hi	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh5:
	adrp	x9, _MAX_PLL_VCO_RATE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MAX_PLL_VCO_RATE@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	mul	x9, x9, x23
	cmp	x9, x8
	b.lo	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x24
	mov	x1, x23
	bl	_do_div
	sxtw	x8, w24
	cmp	x8, x28
	b.hi	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	x9, x28, x8
	cmp	x9, x20
	csel	x19, x8, x19, lo
	csel	x20, x9, x20, lo
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	cbz	x20, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	x8, x23, #1
	sub	w22, w22, w28
	cmp	x23, #1
	mov	x23, x8
	b.ne	LBB0_2
	b	LBB0_10
LBB0_8:
	mov	x19, #0
	b	LBB0_10
LBB0_9:
	cmp	x19, #0
	csel	x19, x8, x19, eq
LBB0_10:
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PRCMU_HDMICLK,4,2              ; @PRCMU_HDMICLK
	.comm	_MIN_PLL_VCO_RATE,8,3           ; @MIN_PLL_VCO_RATE
	.comm	_MAX_PLL_VCO_RATE,8,3           ; @MAX_PLL_VCO_RATE
	.no_dead_strip	_round_plldsi_rate
.subsections_via_symbols
