	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dsi_get_phy_params
_dsi_get_phy_params:                    ## @dsi_get_phy_params
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movl	%edi, %r14d
	movq	_PHY_REF_CLK_PERIOD_PS@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%rsi, %rdi
	xorl	%esi, %esi
	movl	$84, %edx
	callq	_memset
	movl	%r14d, %edi
	movq	%rbx, %rsi
	callq	_dsi_calc_phy_rate
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r14d
	movl	$1000000, %eax                  ## imm = 0xF4240
	xorl	%edx, %edx
	idivl	%r14d
	movl	%eax, %r12d
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	leal	(,%r12,8), %r15d
	movl	$50, %edi
	movl	%r15d, %esi
	callq	_ROUND
	movl	%eax, (%rbx)
	movl	%r12d, %r13d
	shll	$4, %r13d
	movl	$133, %edi
	movl	%r13d, %esi
	callq	_ROUND
	decl	%eax
	movl	%eax, 4(%rbx)
	movl	$262, %edi                      ## imm = 0x106
	movl	%r15d, %esi
	callq	_ROUND
	movl	%eax, 8(%rbx)
	movl	$60, %edi
	movl	%r15d, %esi
	callq	_ROUND
                                        ## kill: def $eax killed $eax def $rax
	addl	%eax, %eax
	addl	$-2, %eax
	movl	%eax, 12(%rbx)
	movslq	-44(%rbp), %rax                 ## 4-byte Folded Reload
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	sarq	$38, %rcx
	shrq	$63, %rax
	leal	(%rcx,%rax), %esi
	decl	%esi
	movl	$1000000, %edi                  ## imm = 0xF4240
	callq	_ROUND
	cmpl	$255, %eax
	movl	$255, %ecx
	cmovll	%eax, %ecx
	movl	%ecx, 16(%rbx)
	movl	%ecx, 20(%rbx)
	movl	(%rbx), %eax
	movl	%eax, 24(%rbx)
	leal	(%r12,%r12,4), %eax
	leal	(%rax,%rax), %edi
	addl	$125, %edi
	movl	%r13d, %esi
	callq	_ROUND
	decl	%eax
	movl	%eax, 28(%rbx)
	leal	(%r12,%r12,2), %eax
	leal	(%rax,%rax), %edi
	addl	$105, %edi
	movl	%r15d, %esi
	callq	_ROUND
	movl	%eax, 32(%rbx)
	leal	(,%r12,4), %r13d
	leal	60(,%r12,4), %edi
	movl	%r15d, %esi
	callq	_ROUND
                                        ## kill: def $eax killed $eax def $rax
	addl	%eax, %eax
	addl	$-2, %eax
	movl	%eax, 36(%rbx)
	movabsq	$17179869187, %rax              ## imm = 0x400000003
	movq	%rax, 40(%rbx)
	movl	$1, 48(%rbx)
	movl	$407, %edi                      ## imm = 0x197
	movl	%r15d, %esi
	callq	_ROUND
	addl	$12, %eax
	movl	%eax, 52(%rbx)
	leal	105(%r13,%r13,2), %edi
	movl	%r15d, %esi
	callq	_ROUND
	movl	%eax, 56(%rbx)
	leal	240(%r13,%r13,2), %edi
	movl	%r15d, %esi
	callq	_ROUND
	incl	%eax
	movl	%eax, 60(%rbx)
	movl	52(%rbx), %eax
	movl	56(%rbx), %ecx
	movl	%ecx, 64(%rbx)
	incl	%eax
	movl	%eax, 68(%rbx)
	imull	$52, %r12d, %edi
	addl	$60, %edi
	movl	%r15d, %esi
	callq	_ROUND
	addl	56(%rbx), %eax
	movl	%eax, 72(%rbx)
	leal	7(%r14), %edi
	testl	%r14d, %r14d
	cmovnsl	%r14d, %edi
	sarl	$3, %edi
	movl	%edi, 76(%rbx)
	movq	_MAX_TX_ESC_CLK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DIV_ROUND_UP
	movl	%eax, 80(%rbx)
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_REF_CLK_PERIOD_PS,4,2      ## @PHY_REF_CLK_PERIOD_PS
	.comm	_MAX_TX_ESC_CLK,4,2             ## @MAX_TX_ESC_CLK
	.no_dead_strip	_dsi_get_phy_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function dsi_get_phy_params
lCPI0_0:
	.long	3                               ; 0x3
	.long	4                               ; 0x4
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_dsi_get_phy_params:                    ; @dsi_get_phy_params
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _PHY_REF_CLK_PERIOD_PS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PHY_REF_CLK_PERIOD_PS@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
	mov	x0, x1
	mov	w1, #0
	mov	w2, #84
	bl	_memset
	mov	x0, x20
	mov	x1, x19
	bl	_dsi_calc_phy_rate
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	mov	w8, #16960
	movk	w8, #15, lsl #16
	sdiv	w23, w8, w0
	lsl	w21, w23, #3
	mov	w0, #50
	mov	x1, x21
	bl	_ROUND
	str	w0, [x19]
	lsl	w22, w23, #4
	mov	w0, #133
	mov	x1, x22
	bl	_ROUND
	sub	w8, w0, #1
	str	w8, [x19, #4]
	mov	w0, #262
	mov	x1, x21
	bl	_ROUND
	str	w0, [x19, #8]
	mov	w0, #60
	mov	x1, x21
	bl	_ROUND
	lsl	w8, w0, #1
	sub	w8, w8, #2
	str	w8, [x19, #12]
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	smull	x8, w24, w8
	lsr	x9, x8, #32
	lsr	x8, x8, #63
	add	w8, w8, w9, asr #6
	sub	w1, w8, #1
	mov	w0, #16960
	movk	w0, #15, lsl #16
	bl	_ROUND
	mov	w8, #255
	cmp	w0, #255
	csel	w8, w0, w8, lt
	stp	w8, w8, [x19, #16]
	ldr	w8, [x19]
	str	w8, [x19, #24]
	mov	w8, #10
	mul	w8, w23, w8
	add	w0, w8, #125
	mov	x1, x22
	bl	_ROUND
	sub	w8, w0, #1
	str	w8, [x19, #28]
	mov	w8, #6
	mul	w8, w23, w8
	add	w0, w8, #105
	mov	x1, x21
	bl	_ROUND
	str	w0, [x19, #32]
	lsl	w8, w23, #2
	add	w0, w8, #60
	mov	x1, x21
	bl	_ROUND
	lsl	w8, w0, #1
	sub	w8, w8, #2
	str	w8, [x19, #36]
Lloh3:
	adrp	x8, lCPI0_0@PAGE
Lloh4:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19, #40]
	mov	w8, #1
	str	w8, [x19, #48]
	mov	w0, #407
	mov	x1, x21
	bl	_ROUND
	add	w8, w0, #12
	str	w8, [x19, #52]
	add	w8, w23, w23, lsl #1
	lsl	w22, w8, #2
	add	w0, w22, #105
	mov	x1, x21
	bl	_ROUND
	str	w0, [x19, #56]
	add	w0, w22, #240
	mov	x1, x21
	bl	_ROUND
	add	w8, w0, #1
	ldp	w10, w9, [x19, #52]
	stp	w8, w9, [x19, #60]
	add	w8, w10, #1
	str	w8, [x19, #68]
	mov	w8, #52
	orr	w9, wzr, #0x3c
	madd	w0, w23, w8, w9
	mov	x1, x21
	bl	_ROUND
	ldr	w8, [x19, #56]
	add	w8, w8, w0
	add	w9, w20, #7
	cmp	w20, #0
	csel	w9, w9, w20, lt
	asr	w0, w9, #3
	stp	w8, w0, [x19, #72]
Lloh5:
	adrp	x8, _MAX_TX_ESC_CLK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MAX_TX_ESC_CLK@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_DIV_ROUND_UP
	str	w0, [x19, #80]
LBB0_2:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdr	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_REF_CLK_PERIOD_PS,4,2      ; @PHY_REF_CLK_PERIOD_PS
	.comm	_MAX_TX_ESC_CLK,4,2             ; @MAX_TX_ESC_CLK
	.no_dead_strip	_dsi_get_phy_params
.subsections_via_symbols
