	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdns_dsi_adjust_phy_config
_cdns_dsi_adjust_phy_config:            ## @cdns_dsi_adjust_phy_config
	.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	%rdx, %r15
	movq	%rsi, %r14
	movq	(%rdi), %rax
	movl	(%rax), %edi
	movq	_DSI_HBP_FRAME_OVERHEAD@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rbx
	addq	(%rsi), %rbx
	movq	_MIPI_DSI_MODE_VIDEO_SYNC_PULSE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, 4(%rax)
	je	LBB0_2
## %bb.1:
	movq	_DSI_HSA_FRAME_OVERHEAD@GOTPCREL(%rip), %rax
	addq	32(%r14), %rbx
	addq	(%rax), %rbx
LBB0_2:
	addq	24(%r14), %rbx
	addq	16(%r14), %rbx
	movq	_DSI_HFP_FRAME_OVERHEAD@GOTPCREL(%rip), %rax
	addq	(%rax), %rbx
	movq	%rbx, %rax
	shrq	$32, %rax
	je	LBB0_3
## %bb.4:
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%rdi
	jmp	LBB0_5
LBB0_3:
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%edi
                                        ## kill: def $edx killed $edx def $rdx
LBB0_5:
	movq	%rdi, %r13
	subq	%rdx, %r13
	testq	%rdx, %rdx
	cmoveq	%rdx, %r13
	leaq	(%rbx,%r13), %rax
	xorl	%edx, %edx
	testl	%r8d, %r8d
	sete	%dl
	movslq	(%rcx,%rdx,4), %rsi
	imulq	%rax, %rsi
	imulq	$1000, %rsi, %r12               ## imm = 0x3E8
	movl	8(%rcx,%rdx,8), %esi
	imull	%edi, %esi
	movq	%r12, %rdi
	callq	_do_div
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_7:
	shlq	$3, %r12
	movq	%r12, (%r15)
	movl	%r13d, %eax
	addq	%rax, 16(%r14)
	addq	%rax, %rbx
	movq	%rbx, 8(%r14)
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DSI_HBP_FRAME_OVERHEAD,8,3     ## @DSI_HBP_FRAME_OVERHEAD
	.comm	_MIPI_DSI_MODE_VIDEO_SYNC_PULSE,4,2 ## @MIPI_DSI_MODE_VIDEO_SYNC_PULSE
	.comm	_DSI_HSA_FRAME_OVERHEAD,8,3     ## @DSI_HSA_FRAME_OVERHEAD
	.comm	_DSI_HFP_FRAME_OVERHEAD,8,3     ## @DSI_HFP_FRAME_OVERHEAD
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_cdns_dsi_adjust_phy_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdns_dsi_adjust_phy_config
_cdns_dsi_adjust_phy_config:            ; @cdns_dsi_adjust_phy_config
	.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	x20, x2
	mov	x19, x1
	ldr	x10, [x0]
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _DSI_HBP_FRAME_OVERHEAD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DSI_HBP_FRAME_OVERHEAD@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x9, x9, x8
	ldp	w8, w10, [x10]
Lloh3:
	adrp	x11, _MIPI_DSI_MODE_VIDEO_SYNC_PULSE@GOTPAGE
Lloh4:
	ldr	x11, [x11, _MIPI_DSI_MODE_VIDEO_SYNC_PULSE@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_2
; %bb.1:
	ldr	x10, [x19, #32]
Lloh6:
	adrp	x11, _DSI_HSA_FRAME_OVERHEAD@GOTPAGE
Lloh7:
	ldr	x11, [x11, _DSI_HSA_FRAME_OVERHEAD@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
	add	x9, x10, x9
	add	x9, x9, x11
LBB0_2:
Lloh9:
	adrp	x10, _DSI_HFP_FRAME_OVERHEAD@GOTPAGE
Lloh10:
	ldr	x10, [x10, _DSI_HFP_FRAME_OVERHEAD@GOTPAGEOFF]
	ldp	x12, x11, [x19, #16]
Lloh11:
	ldr	x10, [x10]
	add	x9, x11, x9
	add	x9, x9, x12
	add	x22, x9, x10
	udiv	x9, x22, x8
	msub	x9, x9, x8, x22
	sub	x10, x8, x9
	cmp	x9, #0
	csel	x23, xzr, x10, eq
	add	x9, x23, x22
	cmp	w4, #0
	cset	w10, eq
	ldrsw	x10, [x3, w10, uxtw #2]
	mul	x9, x10, x9
	mov	w10, #1000
	mul	x21, x9, x10
	mov	w9, #8
	mov	w10, #16
	csel	x9, x10, x9, eq
	ldr	w9, [x3, x9]
	mul	w1, w8, w9
	mov	x0, x21
	bl	_do_div
	cbz	x0, LBB0_4
; %bb.3:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
	lsl	x8, x21, #3
	str	x8, [x20]
	and	x8, x23, #0xffffffff
	ldr	x9, [x19, #16]
	add	x9, x9, x8
	add	x8, x8, x22
	stp	x8, x9, [x19, #8]
LBB0_5:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_DSI_HBP_FRAME_OVERHEAD,8,3     ; @DSI_HBP_FRAME_OVERHEAD
	.comm	_MIPI_DSI_MODE_VIDEO_SYNC_PULSE,4,2 ; @MIPI_DSI_MODE_VIDEO_SYNC_PULSE
	.comm	_DSI_HSA_FRAME_OVERHEAD,8,3     ; @DSI_HSA_FRAME_OVERHEAD
	.comm	_DSI_HFP_FRAME_OVERHEAD,8,3     ; @DSI_HFP_FRAME_OVERHEAD
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_cdns_dsi_adjust_phy_config
.subsections_via_symbols
