	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dsi_calc_clk_rate_v2           ## -- Begin function dsi_calc_clk_rate_v2
	.p2align	4, 0x90
_dsi_calc_clk_rate_v2:                  ## @dsi_calc_clk_rate_v2
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	movl	12(%rdi), %edi
	callq	_dsi_get_bpp
	movl	%eax, %r14d
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_dsi_calc_pclk
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_dsi_get_pclk_rate
	movq	%rax, %rbx
	imull	%r14d, %ebx
	movl	%ebx, %edi
	movl	$8, %esi
	callq	_do_div
	movl	%ebx, (%r15)
	movslq	4(%r15), %rax
	imulq	$1125899907, %rax, %rax         ## imm = 0x431BDE83
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$50, %rax
	addl	%ecx, %eax
	movslq	%eax, %r14
	movq	%r14, %rdi
	movl	$20, %esi
	callq	_DIV_ROUND_UP
	movl	%eax, %esi
	decl	%eax
	cmpl	$16, %eax
	jb	LBB0_17
## %bb.1:
	movq	%r14, %rdi
	movl	$19, %esi
	callq	_DIV_ROUND_UP
	movl	%eax, %esi
	decl	%eax
	cmpl	$16, %eax
	jb	LBB0_17
## %bb.2:
	movq	%r14, %rdi
	movl	$18, %esi
	callq	_DIV_ROUND_UP
	movl	%eax, %esi
	decl	%eax
	cmpl	$16, %eax
	jb	LBB0_17
## %bb.3:
	movq	%r14, %rdi
	movl	$17, %esi
	callq	_DIV_ROUND_UP
	movl	%eax, %esi
	decl	%eax
	cmpl	$16, %eax
	jb	LBB0_17
## %bb.4:
	movq	%r14, %rdi
	movl	$16, %esi
	callq	_DIV_ROUND_UP
	movl	%eax, %esi
	decl	%eax
	cmpl	$16, %eax
	jb	LBB0_17
## %bb.5:
	movq	%r14, %rdi
	movl	$15, %esi
	callq	_DIV_ROUND_UP
	movl	%eax, %esi
	decl	%eax
	cmpl	$16, %eax
	jb	LBB0_17
## %bb.6:
	movq	%r14, %rdi
	movl	$14, %esi
	callq	_DIV_ROUND_UP
	movl	%eax, %esi
	decl	%eax
	cmpl	$16, %eax
	jb	LBB0_17
## %bb.7:
	movq	%r14, %rdi
	movl	$13, %esi
	callq	_DIV_ROUND_UP
	movl	%eax, %esi
	decl	%eax
	cmpl	$16, %eax
	jb	LBB0_17
## %bb.8:
	movq	%r14, %rdi
	movl	$12, %esi
	callq	_DIV_ROUND_UP
	movl	%eax, %esi
	decl	%eax
	cmpl	$16, %eax
	jb	LBB0_17
## %bb.9:
	movq	%r14, %rdi
	movl	$11, %esi
	callq	_DIV_ROUND_UP
	movl	%eax, %esi
	decl	%eax
	cmpl	$16, %eax
	jb	LBB0_17
## %bb.10:
	movq	%r14, %rdi
	movl	$10, %esi
	callq	_DIV_ROUND_UP
	movl	%eax, %esi
	decl	%eax
	cmpl	$16, %eax
	jb	LBB0_17
## %bb.11:
	movq	%r14, %rdi
	movl	$9, %esi
	callq	_DIV_ROUND_UP
	movl	%eax, %esi
	decl	%eax
	cmpl	$16, %eax
	jb	LBB0_17
## %bb.12:
	movq	%r14, %rdi
	movl	$8, %esi
	callq	_DIV_ROUND_UP
	movl	%eax, %esi
	decl	%eax
	cmpl	$16, %eax
	jb	LBB0_17
## %bb.13:
	movq	%r14, %rdi
	movl	$7, %esi
	callq	_DIV_ROUND_UP
	movl	%eax, %esi
	decl	%eax
	cmpl	$16, %eax
	jb	LBB0_17
## %bb.14:
	movq	%r14, %rdi
	movl	$6, %esi
	callq	_DIV_ROUND_UP
	movl	%eax, %esi
	decl	%eax
	cmpl	$16, %eax
	jb	LBB0_17
## %bb.15:
	movq	%r14, %rdi
	movl	$5, %esi
	callq	_DIV_ROUND_UP
	movl	%eax, %esi
	decl	%eax
	cmpl	$16, %eax
	jae	LBB0_16
LBB0_17:
	movl	(%r15), %ecx
	movl	4(%r15), %eax
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	divl	%esi
	movl	%eax, 8(%r15)
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	movl	%ecx, %edx
	callq	_DBG
LBB0_18:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"esc=%d, src=%d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dsi_calc_clk_rate_v2           ; -- Begin function dsi_calc_clk_rate_v2
	.p2align	2
_dsi_calc_clk_rate_v2:                  ; @dsi_calc_clk_rate_v2
	.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, x1
	mov	x19, x0
	ldr	w0, [x0, #12]
	bl	_dsi_get_bpp
	mov	x21, x0
	mov	x0, x19
	mov	x1, x20
	bl	_dsi_calc_pclk
	mov	x0, x19
	mov	x1, x20
	bl	_dsi_get_pclk_rate
	mul	w20, w21, w0
	mov	x0, x20
	mov	w1, #8
	bl	_do_div
	str	w20, [x19]
	ldrsw	x8, [x19, #4]
	mov	w9, #56963
	movk	w9, #17179, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #50
	add	w8, w8, w9
	sxtw	x20, w8
	mov	x0, x20
	mov	w1, #20
	bl	_DIV_ROUND_UP
	sub	w8, w0, #1
	cmp	w8, #16
	b.lo	LBB0_16
; %bb.1:
	mov	x0, x20
	mov	w1, #19
	bl	_DIV_ROUND_UP
	sub	w8, w0, #1
	cmp	w8, #16
	b.lo	LBB0_16
; %bb.2:
	mov	x0, x20
	mov	w1, #18
	bl	_DIV_ROUND_UP
	sub	w8, w0, #1
	cmp	w8, #16
	b.lo	LBB0_16
; %bb.3:
	mov	x0, x20
	mov	w1, #17
	bl	_DIV_ROUND_UP
	sub	w8, w0, #1
	cmp	w8, #16
	b.lo	LBB0_16
; %bb.4:
	mov	x0, x20
	mov	w1, #16
	bl	_DIV_ROUND_UP
	sub	w8, w0, #1
	cmp	w8, #16
	b.lo	LBB0_16
; %bb.5:
	mov	x0, x20
	mov	w1, #15
	bl	_DIV_ROUND_UP
	sub	w8, w0, #1
	cmp	w8, #16
	b.lo	LBB0_16
; %bb.6:
	mov	x0, x20
	mov	w1, #14
	bl	_DIV_ROUND_UP
	sub	w8, w0, #1
	cmp	w8, #16
	b.lo	LBB0_16
; %bb.7:
	mov	x0, x20
	mov	w1, #13
	bl	_DIV_ROUND_UP
	sub	w8, w0, #1
	cmp	w8, #16
	b.lo	LBB0_16
; %bb.8:
	mov	x0, x20
	mov	w1, #12
	bl	_DIV_ROUND_UP
	sub	w8, w0, #1
	cmp	w8, #16
	b.lo	LBB0_16
; %bb.9:
	mov	x0, x20
	mov	w1, #11
	bl	_DIV_ROUND_UP
	sub	w8, w0, #1
	cmp	w8, #16
	b.lo	LBB0_16
; %bb.10:
	mov	x0, x20
	mov	w1, #10
	bl	_DIV_ROUND_UP
	sub	w8, w0, #1
	cmp	w8, #16
	b.lo	LBB0_16
; %bb.11:
	mov	x0, x20
	mov	w1, #9
	bl	_DIV_ROUND_UP
	sub	w8, w0, #1
	cmp	w8, #16
	b.lo	LBB0_16
; %bb.12:
	mov	x0, x20
	mov	w1, #8
	bl	_DIV_ROUND_UP
	sub	w8, w0, #1
	cmp	w8, #16
	b.lo	LBB0_16
; %bb.13:
	mov	x0, x20
	mov	w1, #7
	bl	_DIV_ROUND_UP
	sub	w8, w0, #1
	cmp	w8, #16
	b.lo	LBB0_16
; %bb.14:
	mov	x0, x20
	mov	w1, #6
	bl	_DIV_ROUND_UP
	sub	w8, w0, #1
	cmp	w8, #16
	b.lo	LBB0_16
; %bb.15:
	mov	x0, x20
	mov	w1, #5
	bl	_DIV_ROUND_UP
	sub	w8, w0, #1
	cmp	w8, #16
	b.hs	LBB0_18
LBB0_16:
	ldp	w2, w8, [x19]
	udiv	w1, w8, w0
	str	w1, [x19, #8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DBG
	mov	w0, #0
LBB0_17:
	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
LBB0_18:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"esc=%d, src=%d"

.subsections_via_symbols
