	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdns_dsi_mode2cfg
_cdns_dsi_mode2cfg:                     ## @cdns_dsi_mode2cfg
	.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
	movl	%ecx, %r14d
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movq	%rdx, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	(%rbx), %rax
	movq	_MIPI_DSI_MODE_VIDEO_SYNC_PULSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	andl	(%rax), %ebx
	movl	8(%rax), %edi
	callq	_mipi_dsi_pixel_format_to_bpp
	movl	%eax, %r12d
	xorl	%eax, %eax
	testl	%r14d, %r14d
	je	LBB0_1
## %bb.3:
	testl	%ebx, %ebx
	sete	%al
	movl	(%r13), %edi
	subl	4(%r13,%rax,4), %edi
	movq	_DSI_HBP_FRAME_OVERHEAD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r12d, %esi
	callq	_dpi_to_dsi_timing
	movq	%rax, 24(%r15)
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.4:
	leaq	4(%r13), %rax
	leaq	8(%r13), %rcx
	jmp	LBB0_5
LBB0_1:
	testl	%ebx, %ebx
	sete	%al
	movl	12(%r13), %edi
	subl	16(%r13,%rax,4), %edi
	movq	_DSI_HBP_FRAME_OVERHEAD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r12d, %esi
	callq	_dpi_to_dsi_timing
	movq	%rax, 24(%r15)
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.2:
	leaq	16(%r13), %rax
	leaq	20(%r13), %rcx
LBB0_5:
	movl	(%rax), %edi
	subl	(%rcx), %edi
	movq	_DSI_HSA_FRAME_OVERHEAD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r12d, %esi
	callq	_dpi_to_dsi_timing
	movq	%rax, 16(%r15)
LBB0_6:
	xorl	%eax, %eax
	testl	%r14d, %r14d
	sete	%al
	movl	24(%r13,%rax,4), %edi
	movl	%r12d, %esi
	xorl	%edx, %edx
	callq	_dpi_to_dsi_timing
	movq	%rax, 8(%r15)
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_mode_to_dpi_hfp
	movq	_DSI_HFP_FRAME_OVERHEAD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	%r12d, %esi
	callq	_dpi_to_dsi_timing
	movq	%rax, (%r15)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MIPI_DSI_MODE_VIDEO_SYNC_PULSE,4,2 ## @MIPI_DSI_MODE_VIDEO_SYNC_PULSE
	.comm	_DSI_HBP_FRAME_OVERHEAD,4,2     ## @DSI_HBP_FRAME_OVERHEAD
	.comm	_DSI_HSA_FRAME_OVERHEAD,4,2     ## @DSI_HSA_FRAME_OVERHEAD
	.comm	_DSI_HFP_FRAME_OVERHEAD,4,2     ## @DSI_HFP_FRAME_OVERHEAD
	.no_dead_strip	_cdns_dsi_mode2cfg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdns_dsi_mode2cfg
_cdns_dsi_mode2cfg:                     ; @cdns_dsi_mode2cfg
	.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, x3
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
	mov	x0, x2
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	ldr	x8, [x22]
	ldr	w9, [x8]
Lloh0:
	adrp	x10, _MIPI_DSI_MODE_VIDEO_SYNC_PULSE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _MIPI_DSI_MODE_VIDEO_SYNC_PULSE@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	and	w23, w10, w9
	ldr	w0, [x8, #8]
	bl	_mipi_dsi_pixel_format_to_bpp
	mov	x22, x0
	cbz	w20, LBB0_3
; %bb.1:
	ldr	w8, [x21]
	cmp	w23, #0
	mov	w9, #4
	mov	w10, #8
	csel	x9, x10, x9, eq
	ldr	w9, [x21, x9]
	sub	w0, w8, w9
Lloh3:
	adrp	x8, _DSI_HBP_FRAME_OVERHEAD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DSI_HBP_FRAME_OVERHEAD@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x1, x22
	bl	_dpi_to_dsi_timing
	str	x0, [x19, #24]
	cbz	w23, LBB0_6
; %bb.2:
	add	x8, x21, #4
	add	x9, x21, #8
	b	LBB0_5
LBB0_3:
	ldr	w8, [x21, #12]
	cmp	w23, #0
	mov	w9, #16
	mov	w10, #20
	csel	x9, x10, x9, eq
	ldr	w9, [x21, x9]
	sub	w0, w8, w9
Lloh6:
	adrp	x8, _DSI_HBP_FRAME_OVERHEAD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DSI_HBP_FRAME_OVERHEAD@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x1, x22
	bl	_dpi_to_dsi_timing
	str	x0, [x19, #24]
	cbz	w23, LBB0_6
; %bb.4:
	add	x8, x21, #16
	add	x9, x21, #20
LBB0_5:
	ldr	w8, [x8]
	ldr	w9, [x9]
	sub	w0, w8, w9
Lloh9:
	adrp	x8, _DSI_HSA_FRAME_OVERHEAD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DSI_HSA_FRAME_OVERHEAD@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x1, x22
	bl	_dpi_to_dsi_timing
	str	x0, [x19, #16]
LBB0_6:
	cmp	w20, #0
	mov	w8, #24
	mov	w9, #28
	csel	x8, x9, x8, eq
	ldr	w0, [x21, x8]
	mov	x1, x22
	mov	w2, #0
	bl	_dpi_to_dsi_timing
	str	x0, [x19, #8]
	mov	x0, x21
	mov	x1, x20
	bl	_mode_to_dpi_hfp
Lloh12:
	adrp	x8, _DSI_HFP_FRAME_OVERHEAD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DSI_HFP_FRAME_OVERHEAD@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x1, x22
	bl	_dpi_to_dsi_timing
	str	x0, [x19]
	mov	w0, #0
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MIPI_DSI_MODE_VIDEO_SYNC_PULSE,4,2 ; @MIPI_DSI_MODE_VIDEO_SYNC_PULSE
	.comm	_DSI_HBP_FRAME_OVERHEAD,4,2     ; @DSI_HBP_FRAME_OVERHEAD
	.comm	_DSI_HSA_FRAME_OVERHEAD,4,2     ; @DSI_HSA_FRAME_OVERHEAD
	.comm	_DSI_HFP_FRAME_OVERHEAD,4,2     ; @DSI_HFP_FRAME_OVERHEAD
	.no_dead_strip	_cdns_dsi_mode2cfg
.subsections_via_symbols
