	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function dsi_calc_phy_rate
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_dsi_calc_phy_rate:                     ## @dsi_calc_phy_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_PHY_REF_CLK_PERIOD_PS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	leaq	24(%rsi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_dphy_range_info@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	movl	$1, %r15d
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movl	$1, %r14d
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_39:                                ##   in Loop: Header=BB0_1 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r8d
                                        ## kill: def $eax killed $eax def $rax
	cmpq	-80(%rbp), %rax                 ## 8-byte Folded Reload
	jae	LBB0_42
LBB0_40:                                ##   in Loop: Header=BB0_1 Depth=1
	addq	$10, %rbx
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	callq	_ARRAY_SIZE
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$8, %r13d
	xorl	%r14d, %r14d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=2
	incq	%r14
	callq	_ARRAY_SIZE
	addq	$24, %r13
	cmpq	%rax, %r14
	jae	LBB0_7
LBB0_4:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r12), %rdi
	cmpq	-8(%rdi,%r13), %rbx
	jb	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	cmpq	(%rdi,%r13), %rbx
	ja	LBB0_3
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%r14d, %r14d
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cmpq	%rax, %r14
	je	LBB0_41
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r12), %rdi
	leaq	(%r14,%r14,2), %rax
	movl	20(%rdi,%rax,8), %ecx
	movq	-64(%rbp), %r11                 ## 8-byte Reload
	movl	%ecx, 48(%r11)
	movl	16(%rdi,%rax,8), %eax
	movl	%eax, (%r11)
	movb	$7, %cl
	subb	%al, %cl
	andl	$-4, %eax
	movl	$16, %edx
	shrl	%cl, %edx
	cmpl	$4, %eax
	cmoveq	%rdx, %r15
	movq	%r15, %r8
	imulq	-72(%rbp), %r8                  ## 8-byte Folded Reload
	movq	%r8, %rcx
	imulq	%rbx, %rcx
	movq	%rcx, %rax
	shrq	$9, %rax
	movabsq	$19342813113834067, %rdx        ## imm = 0x44B82FA09B5A53
	mulq	%rdx
	movq	%rdx, %rsi
	shrq	$11, %rsi
	imulq	$1000000000, %rsi, %rax         ## imm = 0x3B9ACA00
	subq	%rax, %rcx
	imulq	$1441151881, %rcx, %rax         ## imm = 0x55E63B89
	shrq	$57, %rax
	addl	%eax, %eax
	leal	(%rax,%rax,2), %eax
	btl	$11, %edx
	jb	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$50, %eax
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jb	LBB0_15
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	addq	%rsi, %rsi
	addq	$2, %rsi
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	movl	$2, %ecx
	movl	$2, %r9d
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$50, %eax
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jae	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$30, %eax
	jb	LBB0_18
LBB0_14:                                ##   in Loop: Header=BB0_1 Depth=1
	incq	%rsi
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$30, %eax
	jb	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_1 Depth=1
	leaq	(%rsi,%rsi,2), %rsi
	addq	$2, %rsi
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %r9d
	movl	$1, %eax
	xorl	%ecx, %ecx
	jmp	LBB0_21
LBB0_18:                                ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$10, %eax
	jb	LBB0_33
## %bb.19:                              ##   in Loop: Header=BB0_1 Depth=1
	leaq	(%rsi,%rsi,2), %rsi
	incq	%rsi
LBB0_20:                                ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	movl	$3, %ecx
	movl	$3, %r9d
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%rcx, 8(%r11)
	movl	%eax, 16(%r11)
	movl	20(%r11), %eax
	movb	$7, %cl
	subb	%al, %cl
	andl	$-4, %eax
	movl	$16, %edx
	shrl	%cl, %edx
	cmpl	$4, %eax
	cmoveq	%rdx, %r14
	cmpq	$2, %rsi
	jne	LBB0_23
LBB0_22:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movl	$0, 16(%rax)
	movl	$1, %eax
	jmp	LBB0_37
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_1 Depth=1
	leaq	(,%r14,4), %rax
	cmpq	%rax, %rsi
	jb	LBB0_27
## %bb.24:                              ##   in Loop: Header=BB0_1 Depth=1
	leaq	(,%r14,8), %rax
	cmpq	%rax, %rsi
	ja	LBB0_27
## %bb.25:                              ##   in Loop: Header=BB0_1 Depth=1
	leaq	(%r14,%r14), %rcx
	movq	%rsi, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_31
## %bb.26:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	%rsi, %rax
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_32
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_1 Depth=1
	leaq	(%r14,%r14), %rcx
	leaq	(%rcx,%rcx,4), %rax
	cmpq	%rax, %rsi
	jb	LBB0_22
## %bb.28:                              ##   in Loop: Header=BB0_1 Depth=1
	imulq	$300, %r14, %rax                ## imm = 0x12C
	cmpq	%rax, %rsi
	ja	LBB0_22
## %bb.29:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	%rsi, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_34
## %bb.30:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	%rsi, %rax
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_35
LBB0_31:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	%esi, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_32:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, 24(%r11)
	movq	$0, 32(%r11)
	movl	$1, 40(%r11)
	jmp	LBB0_36
LBB0_33:                                ##   in Loop: Header=BB0_1 Depth=1
	addq	%rsi, %rsi
	jmp	LBB0_11
LBB0_34:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	%esi, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_35:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	%eax, %ecx
	andl	$1, %ecx
	shrq	%rax
	cmpq	$1, %rcx
	sbbq	$0, %rax
	movl	$2, %edx
	subq	%rcx, %rdx
	movq	%rax, 24(%r11)
	movq	%rdx, 32(%r11)
	movl	$0, 40(%r11)
LBB0_36:                                ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
LBB0_37:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	%eax, 44(%r11)
	imulq	$1000000000, %rsi, %rax         ## imm = 0x3B9ACA00
	imulq	%r9, %r8
	movq	%rax, %rcx
	orq	%r8, %rcx
	shrq	$32, %rcx
	je	LBB0_39
## %bb.38:                              ##   in Loop: Header=BB0_1 Depth=1
	xorl	%edx, %edx
	divq	%r8
	cmpq	-80(%rbp), %rax                 ## 8-byte Folded Reload
	jb	LBB0_40
	jmp	LBB0_42
LBB0_41:
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_DRM_ERROR
	xorl	%eax, %eax
LBB0_42:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_REF_CLK_PERIOD_PS,8,3      ## @PHY_REF_CLK_PERIOD_PS
	.comm	_dphy_range_info,8,3            ## @dphy_range_info
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%dkHz out of range\n"

	.no_dead_strip	_dsi_calc_phy_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dsi_calc_phy_rate
_dsi_calc_phy_rate:                     ; @dsi_calc_phy_rate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x1
	mov	x20, x0
	mov	w22, #51712
	movk	w22, #15258, lsl #16
Lloh0:
	adrp	x8, _PHY_REF_CLK_PERIOD_PS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PHY_REF_CLK_PERIOD_PS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	add	x24, x1, #24
Lloh3:
	adrp	x25, _dphy_range_info@GOTPAGE
Lloh4:
	ldr	x25, [x25, _dphy_range_info@GOTPAGEOFF]
	ldr	x0, [x25]
	mov	x21, x20
	mov	w27, #1
	mov	w23, #1
	bl	_ARRAY_SIZE
	cbz	x0, LBB0_5
LBB0_1:
	mov	x26, #0
	mov	x28, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x28, x28, #1
	bl	_ARRAY_SIZE
	add	x26, x26, #24
	cmp	x28, x0
	b.hs	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x25]
	ldr	x8, [x0, x26]
	cmp	x21, x8
	b.lo	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x0, x26
	ldr	x8, [x8, #8]
	cmp	x21, x8
	b.hi	LBB0_2
	b	LBB0_6
LBB0_5:
	mov	x28, #0
LBB0_6:
	ldr	x0, [x25]
	bl	_ARRAY_SIZE
	cmp	x28, x0
	b.eq	LBB0_29
; %bb.7:
	ldr	x0, [x25]
	mov	w8, #24
	madd	x8, x28, x8, x0
	ldp	w8, w9, [x8, #16]
	str	w9, [x19, #48]
	str	w8, [x19]
	and	w9, w8, #0xfffffffc
	mov	w13, #7
	sub	w8, w13, w8
	mov	w14, #16
	lsr	w8, w14, w8
	cmp	w9, #4
	csel	x27, x8, x27, eq
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	mul	x8, x27, x8
	mul	x10, x8, x21
	udiv	x9, x10, x22
	msub	w10, w9, w22, w10
	mov	w11, #15241
	movk	w11, #21990, lsl #16
	umull	x10, w10, w11
	lsr	x10, x10, #57
	add	w10, w10, w10, lsl #1
	lsl	w10, w10, #1
	cmp	w10, #50
	tbnz	w9, #0, LBB0_11
; %bb.8:
	b.lo	LBB0_14
; %bb.9:
	mov	w11, #0
	lsl	x9, x9, #1
	add	x9, x9, #2
LBB0_10:
	mov	w12, #2
	mov	w10, #2
	b	LBB0_20
LBB0_11:
	b.hs	LBB0_13
; %bb.12:
	cmp	w10, #30
	b.lo	LBB0_16
LBB0_13:
	mov	x12, #0
	add	x9, x9, #1
	mov	w10, #1
	mov	x11, x10
	b	LBB0_20
LBB0_14:
	cmp	w10, #30
	b.lo	LBB0_19
; %bb.15:
	mov	w11, #0
	add	x9, x9, x9, lsl #1
	add	x9, x9, #2
	b	LBB0_18
LBB0_16:
	cmp	w10, #10
	b.lo	LBB0_28
; %bb.17:
	mov	w11, #0
	add	x9, x9, x9, lsl #1
	add	x9, x9, #1
LBB0_18:
	mov	w12, #3
	mov	w10, #3
	b	LBB0_20
LBB0_19:
	mov	x12, #0
	mov	w11, #1
	mov	w10, #1
LBB0_20:
	str	x12, [x19, #8]
	str	w11, [x19, #16]
	ldr	w11, [x19, #20]
	and	w12, w11, #0xfffffffc
	sub	w11, w13, w11
	lsr	w11, w14, w11
	cmp	w12, #4
	csel	x23, x11, x23, eq
	cmp	x9, #2
	b.eq	LBB0_23
; %bb.21:
	lsl	x11, x23, #3
	cmp	x9, x23, lsl #2
	ccmp	x9, x11, #2, hs
	b.ls	LBB0_24
; %bb.22:
	add	x11, x23, x23, lsl #2
	mov	w12, #300
	mul	x12, x23, x12
	cmp	x9, x11, lsl #1
	ccmp	x9, x12, #2, hs
	b.ls	LBB0_25
LBB0_23:
	stp	xzr, xzr, [x24]
	mov	w11, #1
	str	wzr, [x24, #16]
	b	LBB0_26
LBB0_24:
	mov	w11, #0
	lsl	x12, x23, #1
	udiv	x12, x9, x12
	stp	x12, xzr, [x19, #24]
	mov	w12, #1
	str	w12, [x19, #40]
	b	LBB0_26
LBB0_25:
	mov	w11, #0
	lsl	x12, x23, #1
	udiv	x12, x9, x12
	tst	x12, #0x1
	cset	w13, eq
	lsr	x12, x12, #1
	mov	w14, #1
	cinc	x14, x14, eq
	sub	x12, x12, x13
	stp	x12, x14, [x19, #24]
	str	wzr, [x19, #40]
LBB0_26:
	str	w11, [x19, #44]
	mul	x9, x9, x22
	mul	x8, x8, x10
	udiv	x8, x9, x8
	cmp	x8, x20
	b.hs	LBB0_30
; %bb.27:
	add	x21, x21, #10
	bl	_ARRAY_SIZE
	cbnz	x0, LBB0_1
	b	LBB0_5
LBB0_28:
	mov	w11, #0
	lsl	x9, x9, #1
	b	LBB0_10
LBB0_29:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_DRM_ERROR
	mov	x8, #0
LBB0_30:
	mov	x0, x8
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_REF_CLK_PERIOD_PS,8,3      ; @PHY_REF_CLK_PERIOD_PS
	.comm	_dphy_range_info,8,3            ; @dphy_range_info
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%dkHz out of range\n"

	.no_dead_strip	_dsi_calc_phy_rate
.subsections_via_symbols
