	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dsi_timing_setup
_dsi_timing_setup:                      ## @dsi_timing_setup
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -64(%rbp)                 ## 4-byte Spill
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %r14
	movl	(%r14), %r15d
	movl	4(%r14), %edx
	movl	8(%r14), %ebx
	movl	12(%r14), %eax
	subl	%eax, %ebx
	movl	16(%r14), %ecx
	movl	%ecx, -84(%rbp)                 ## 4-byte Spill
	movl	20(%r14), %ecx
	movl	%r15d, %r13d
	subl	%eax, %r13d
	movl	24(%r14), %r12d
	leal	(%r12,%r13), %eax
	movl	%eax, -88(%rbp)                 ## 4-byte Spill
	movl	%edx, -80(%rbp)                 ## 4-byte Spill
	movl	%ecx, -68(%rbp)                 ## 4-byte Spill
	subl	%ecx, %edx
	movl	28(%r14), %eax
	movl	%edx, -72(%rbp)                 ## 4-byte Spill
	addl	%edx, %eax
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	leaq	L_.str(%rip), %rdi
	callq	_DBG
	movd	-88(%rbp), %xmm1                ## 4-byte Folded Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	pinsrd	$1, %r13d, %xmm1
	pinsrd	$2, %ebx, %xmm1
	pinsrd	$3, %r12d, %xmm1
	cmpl	$0, -64(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_1
## %bb.2:
	movl	%r15d, %r13d
	shrl	$31, %r13d
	addl	%r15d, %r13d
	sarl	%r13d
	movdqa	%xmm1, %xmm0
	psrld	$31, %xmm0
	paddd	%xmm1, %xmm0
	psrad	$1, %xmm0
	movdqa	%xmm0, %xmm1
	jmp	LBB0_3
LBB0_1:
	movl	%r15d, %r13d
LBB0_3:
	movq	_MIPI_DSI_MODE_VIDEO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	testl	%eax, (%r15)
	movdqa	%xmm1, -64(%rbp)                ## 16-byte Spill
	je	LBB0_5
## %bb.4:
	movl	-84(%rbp), %r12d                ## 4-byte Reload
	subl	-68(%rbp), %r12d                ## 4-byte Folded Reload
	movq	_REG_DSI_ACTIVE_H@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	pextrd	$1, %xmm1, %edi
	callq	_DSI_ACTIVE_H_START
	movl	%eax, %r14d
	movdqa	-64(%rbp), %xmm0                ## 16-byte Reload
	movd	%xmm0, %edi
	callq	_DSI_ACTIVE_H_END
	orl	%eax, %r14d
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	callq	_dsi_write
	movq	_REG_DSI_ACTIVE_V@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	-72(%rbp), %edi                 ## 4-byte Reload
	callq	_DSI_ACTIVE_V_START
	movl	%eax, %ebx
	movl	-76(%rbp), %edi                 ## 4-byte Reload
	callq	_DSI_ACTIVE_V_END
	orl	%eax, %ebx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_dsi_write
	movq	_REG_DSI_TOTAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	decl	%r13d
	movl	%r13d, %edi
	callq	_DSI_TOTAL_H_TOTAL
	movl	%eax, %ebx
	movl	-80(%rbp), %edi                 ## 4-byte Reload
	decl	%edi
	callq	_DSI_TOTAL_V_TOTAL
	orl	%eax, %ebx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_dsi_write
	movq	_REG_DSI_ACTIVE_HSYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	xorl	%edi, %edi
	callq	_DSI_ACTIVE_HSYNC_START
	movl	%eax, %ebx
	movaps	-64(%rbp), %xmm0                ## 16-byte Reload
	extractps	$2, %xmm0, %edi
	callq	_DSI_ACTIVE_HSYNC_END
	orl	%eax, %ebx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_dsi_write
	movq	_REG_DSI_ACTIVE_VSYNC_HPOS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_dsi_write
	movq	_REG_DSI_ACTIVE_VSYNC_VPOS@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	xorl	%edi, %edi
	callq	_DSI_ACTIVE_VSYNC_VPOS_START
	movl	%eax, %ebx
	movl	%r12d, %edi
	callq	_DSI_ACTIVE_VSYNC_VPOS_END
	orl	%eax, %ebx
	movq	%r15, %rdi
	movl	%r14d, %esi
	jmp	LBB0_6
LBB0_5:
	movl	8(%r15), %edi
	callq	_dsi_get_bpp
                                        ## kill: def $eax killed $eax def $rax
	movaps	-64(%rbp), %xmm0                ## 16-byte Reload
	extractps	$3, %xmm0, %r13d
	imull	%r13d, %eax
	leal	7(%rax), %edi
	testl	%eax, %eax
	cmovnsl	%eax, %edi
	sarl	$3, %edi
	incl	%edi
	movq	_REG_DSI_CMD_MDP_STREAM_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	callq	_DSI_CMD_MDP_STREAM_CTRL_WORD_COUNT
	movl	%eax, %r12d
	movl	4(%r15), %edi
	callq	_DSI_CMD_MDP_STREAM_CTRL_VIRTUAL_CHANNEL
	movl	%eax, %ebx
	movq	_MIPI_DSI_DCS_LONG_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_DSI_CMD_MDP_STREAM_CTRL_DATA_TYPE
	orl	%eax, %ebx
	orl	%r12d, %ebx
	movq	%r15, %rdi
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	movl	%ebx, %edx
	callq	_dsi_write
	movq	_REG_DSI_CMD_MDP_STREAM_TOTAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%r13d, %edi
	callq	_DSI_CMD_MDP_STREAM_TOTAL_H_TOTAL
	movl	%eax, %ebx
	movl	28(%r14), %edi
	callq	_DSI_CMD_MDP_STREAM_TOTAL_V_TOTAL
	orl	%eax, %ebx
	movq	%r15, %rdi
	movl	%r12d, %esi
LBB0_6:
	movl	%ebx, %edx
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dsi_write                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.comm	_MIPI_DSI_MODE_VIDEO,4,2        ## @MIPI_DSI_MODE_VIDEO
	.comm	_REG_DSI_ACTIVE_H,4,2           ## @REG_DSI_ACTIVE_H
	.comm	_REG_DSI_ACTIVE_V,4,2           ## @REG_DSI_ACTIVE_V
	.comm	_REG_DSI_TOTAL,4,2              ## @REG_DSI_TOTAL
	.comm	_REG_DSI_ACTIVE_HSYNC,4,2       ## @REG_DSI_ACTIVE_HSYNC
	.comm	_REG_DSI_ACTIVE_VSYNC_HPOS,4,2  ## @REG_DSI_ACTIVE_VSYNC_HPOS
	.comm	_REG_DSI_ACTIVE_VSYNC_VPOS,4,2  ## @REG_DSI_ACTIVE_VSYNC_VPOS
	.comm	_REG_DSI_CMD_MDP_STREAM_CTRL,4,2 ## @REG_DSI_CMD_MDP_STREAM_CTRL
	.comm	_MIPI_DSI_DCS_LONG_WRITE,4,2    ## @MIPI_DSI_DCS_LONG_WRITE
	.comm	_REG_DSI_CMD_MDP_STREAM_TOTAL,4,2 ## @REG_DSI_CMD_MDP_STREAM_TOTAL
	.no_dead_strip	_dsi_timing_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dsi_timing_setup
_dsi_timing_setup:                      ; @dsi_timing_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x19, x0
	ldr	x23, [x0, #16]
	ldp	w28, w10, [x23]
	ldp	w8, w9, [x23, #8]
	sub	w21, w8, w9
	ldp	w8, w24, [x23, #16]
	stp	w8, w10, [sp, #8]               ; 8-byte Folded Spill
	ldp	w27, w26, [x23, #24]
	sub	w25, w28, w9
	add	w22, w27, w25
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DBG
	cmp	w28, #0
	cinc	w8, w28, lt
	asr	w8, w8, #1
	cmp	w21, #0
	cinc	w9, w21, lt
	asr	w9, w9, #1
	cmp	w25, #0
	cinc	w10, w25, lt
	asr	w10, w10, #1
	cmp	w22, #0
	cinc	w11, w22, lt
	asr	w11, w11, #1
	cmp	w27, #0
	cinc	w12, w27, lt
	asr	w12, w12, #1
	cmp	w20, #0
	csel	w22, w22, w11, eq
	csel	w0, w25, w10, eq
	csel	w21, w21, w9, eq
	csel	w20, w27, w12, eq
	csel	w28, w28, w8, eq
	ldr	w8, [x19]
Lloh2:
	adrp	x9, _MIPI_DSI_MODE_VIDEO@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MIPI_DSI_MODE_VIDEO@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldp	w8, w27, [sp, #8]               ; 8-byte Folded Reload
	sub	w20, w8, w24
	sub	w23, w27, w24
	add	w24, w26, w23
Lloh5:
	adrp	x8, _REG_DSI_ACTIVE_H@GOTPAGE
Lloh6:
	ldr	x8, [x8, _REG_DSI_ACTIVE_H@GOTPAGEOFF]
Lloh7:
	ldr	w25, [x8]
	bl	_DSI_ACTIVE_H_START
	mov	x26, x0
	mov	x0, x22
	bl	_DSI_ACTIVE_H_END
	orr	w2, w0, w26
	mov	x0, x19
	mov	x1, x25
	bl	_dsi_write
Lloh8:
	adrp	x8, _REG_DSI_ACTIVE_V@GOTPAGE
Lloh9:
	ldr	x8, [x8, _REG_DSI_ACTIVE_V@GOTPAGEOFF]
Lloh10:
	ldr	w22, [x8]
	mov	x0, x23
	bl	_DSI_ACTIVE_V_START
	mov	x23, x0
	mov	x0, x24
	bl	_DSI_ACTIVE_V_END
	orr	w2, w0, w23
	mov	x0, x19
	mov	x1, x22
	bl	_dsi_write
Lloh11:
	adrp	x8, _REG_DSI_TOTAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _REG_DSI_TOTAL@GOTPAGEOFF]
Lloh13:
	ldr	w22, [x8]
	sub	w0, w28, #1
	bl	_DSI_TOTAL_H_TOTAL
	mov	x23, x0
	sub	w0, w27, #1
	bl	_DSI_TOTAL_V_TOTAL
	orr	w2, w0, w23
	mov	x0, x19
	mov	x1, x22
	bl	_dsi_write
Lloh14:
	adrp	x8, _REG_DSI_ACTIVE_HSYNC@GOTPAGE
Lloh15:
	ldr	x8, [x8, _REG_DSI_ACTIVE_HSYNC@GOTPAGEOFF]
Lloh16:
	ldr	w22, [x8]
	mov	w0, #0
	bl	_DSI_ACTIVE_HSYNC_START
	mov	x23, x0
	mov	x0, x21
	bl	_DSI_ACTIVE_HSYNC_END
	orr	w2, w0, w23
	mov	x0, x19
	mov	x1, x22
	bl	_dsi_write
Lloh17:
	adrp	x8, _REG_DSI_ACTIVE_VSYNC_HPOS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _REG_DSI_ACTIVE_VSYNC_HPOS@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_dsi_write
Lloh20:
	adrp	x8, _REG_DSI_ACTIVE_VSYNC_VPOS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _REG_DSI_ACTIVE_VSYNC_VPOS@GOTPAGEOFF]
Lloh22:
	ldr	w21, [x8]
	mov	w0, #0
	bl	_DSI_ACTIVE_VSYNC_VPOS_START
	mov	x22, x0
	mov	x0, x20
	bl	_DSI_ACTIVE_VSYNC_VPOS_END
	orr	w2, w0, w22
	b	LBB0_3
LBB0_2:
	ldr	w0, [x19, #8]
	bl	_dsi_get_bpp
	mul	w8, w0, w20
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #3
	add	w0, w8, #1
Lloh23:
	adrp	x8, _REG_DSI_CMD_MDP_STREAM_CTRL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _REG_DSI_CMD_MDP_STREAM_CTRL@GOTPAGEOFF]
Lloh25:
	ldr	w21, [x8]
	bl	_DSI_CMD_MDP_STREAM_CTRL_WORD_COUNT
	mov	x22, x0
	ldr	w0, [x19, #4]
	bl	_DSI_CMD_MDP_STREAM_CTRL_VIRTUAL_CHANNEL
	orr	w22, w0, w22
Lloh26:
	adrp	x8, _MIPI_DSI_DCS_LONG_WRITE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MIPI_DSI_DCS_LONG_WRITE@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	bl	_DSI_CMD_MDP_STREAM_CTRL_DATA_TYPE
	orr	w2, w22, w0
	mov	x0, x19
	mov	x1, x21
	bl	_dsi_write
Lloh29:
	adrp	x8, _REG_DSI_CMD_MDP_STREAM_TOTAL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _REG_DSI_CMD_MDP_STREAM_TOTAL@GOTPAGEOFF]
Lloh31:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_DSI_CMD_MDP_STREAM_TOTAL_H_TOTAL
	mov	x20, x0
	ldr	w0, [x23, #28]
	bl	_DSI_CMD_MDP_STREAM_TOTAL_V_TOTAL
	orr	w2, w0, w20
LBB0_3:
	mov	x0, x19
	mov	x1, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_dsi_write
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.comm	_MIPI_DSI_MODE_VIDEO,4,2        ; @MIPI_DSI_MODE_VIDEO
	.comm	_REG_DSI_ACTIVE_H,4,2           ; @REG_DSI_ACTIVE_H
	.comm	_REG_DSI_ACTIVE_V,4,2           ; @REG_DSI_ACTIVE_V
	.comm	_REG_DSI_TOTAL,4,2              ; @REG_DSI_TOTAL
	.comm	_REG_DSI_ACTIVE_HSYNC,4,2       ; @REG_DSI_ACTIVE_HSYNC
	.comm	_REG_DSI_ACTIVE_VSYNC_HPOS,4,2  ; @REG_DSI_ACTIVE_VSYNC_HPOS
	.comm	_REG_DSI_ACTIVE_VSYNC_VPOS,4,2  ; @REG_DSI_ACTIVE_VSYNC_VPOS
	.comm	_REG_DSI_CMD_MDP_STREAM_CTRL,4,2 ; @REG_DSI_CMD_MDP_STREAM_CTRL
	.comm	_MIPI_DSI_DCS_LONG_WRITE,4,2    ; @MIPI_DSI_DCS_LONG_WRITE
	.comm	_REG_DSI_CMD_MDP_STREAM_TOTAL,4,2 ; @REG_DSI_CMD_MDP_STREAM_TOTAL
	.no_dead_strip	_dsi_timing_setup
.subsections_via_symbols
