	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dsi_cm_calc
_dsi_cm_calc:                           ## @dsi_cm_calc
	.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	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r12
	leaq	4(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	4(%rdi), %edi
	callq	_clk_get_rate
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	16(%r14), %edi
	callq	_dsi_get_pixel_size
	movslq	(%r12), %rcx
	decq	%rcx
	movq	8(%r14), %rdx
	movq	(%rdx), %rdx
	leaq	(%rdx,%rdx,2), %r15
	shrq	%r15
	cltq
	imulq	%r15, %rax
	shrq	$3, %rax
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_1
## %bb.2:
	xorl	%edx, %edx
	divq	%rcx
	movq	%rax, %r13
	jmp	LBB0_3
LBB0_1:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %r13d
LBB0_3:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movq	%r12, 40(%rbx)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 24(%rbx)
	movq	%r14, 32(%rbx)
	movq	%r15, (%rbx)
	movq	%r15, 8(%rbx)
	leaq	(%r15,%r15,2), %rax
	shrq	%rax
	movq	%rax, 16(%rbx)
	movl	(%r14), %edi
	shll	$2, %edi
	shlq	$4, %r13
	movq	%r13, %rsi
	callq	_max
	movslq	4(%r14), %rcx
	shlq	$2, %rcx
	movq	24(%rbx), %rdi
	movq	_dsi_cm_calc_pll_cb@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%rax, %rdx
	movq	%rbx, %r9
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dss_pll_calc_a                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_dsi_cm_calc_pll_cb,4,2         ## @dsi_cm_calc_pll_cb
	.no_dead_strip	_dsi_cm_calc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dsi_cm_calc
_dsi_cm_calc:                           ; @dsi_cm_calc
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	x23, x0
	ldr	w0, [x23, #4]!
	bl	_clk_get_rate
	mov	x22, x0
	ldr	w0, [x20, #16]
	bl	_dsi_get_pixel_size
                                        ; kill: def $w0 killed $w0 def $x0
	ldrsw	x8, [x21]
	sub	x8, x8, #1
	ldr	x9, [x20, #8]
	ldr	x9, [x9]
	add	x9, x9, x9, lsl #1
	lsr	x24, x9, #1
	sxtw	x9, w0
	mul	x9, x24, x9
	lsr	x9, x9, #3
	udiv	x25, x9, x8
	mov	x0, x19
	mov	w1, #0
	mov	w2, #48
	bl	_memset
	stp	x20, x21, [x19, #32]
	stp	x24, x24, [x19]
	add	x8, x24, x24, lsl #1
	lsr	x8, x8, #1
	stp	x8, x23, [x19, #16]
	ldr	w8, [x20]
	lsl	w0, w8, #2
	lsl	x1, x25, #4
	bl	_max
	mov	x2, x0
	ldrsw	x8, [x20, #4]
	lsl	x3, x8, #2
	ldr	x0, [x19, #24]
Lloh0:
	adrp	x8, _dsi_cm_calc_pll_cb@GOTPAGE
Lloh1:
	ldr	x8, [x8, _dsi_cm_calc_pll_cb@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	mov	x1, x22
	mov	x5, x19
	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
	b	_dss_pll_calc_a
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_dsi_cm_calc_pll_cb,4,2         ; @dsi_cm_calc_pll_cb
	.no_dead_strip	_dsi_cm_calc
.subsections_via_symbols
