	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dsi_set_config
_dsi_set_config:                        ## @dsi_set_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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	callq	_to_dsi_data
	movq	%rax, %r15
	leaq	8(%rax), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	16(%rbx), %eax
	movl	%eax, 44(%r15)
	movq	(%rbx), %rax
	movq	%rax, (%r15)
	movq	_OMAP_DSS_DSI_VIDEO_MODE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_dsi_vm_calc
	testl	%eax, %eax
	je	LBB0_4
LBB0_5:
	leaq	-32(%rbp), %rsi
	movq	%r15, %rdi
	callq	_dsi_pll_calc_dsi_fck
	movq	-32(%rbp), %rax
	movq	_HSDIV_DSI@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %edi
	movl	8(%rbx), %edx
	movl	12(%rbx), %esi
	leaq	40(%r15), %rcx
	callq	_dsi_lp_clock_calc
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	callq	_DSSERR
	jmp	LBB0_8
LBB0_2:
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_dsi_cm_calc
	testl	%eax, %eax
	jne	LBB0_5
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_DSSERR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_7:
	movq	-32(%rbp), %rax
	movq	%rax, 32(%r15)
	movl	-40(%rbp), %eax
	movl	%eax, 24(%r15)
	movq	_DISPLAY_FLAGS_INTERLACED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_DISPLAY_FLAGS_HSYNC_LOW@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	notl	%eax
	andl	-44(%rbp), %eax
	movq	_DISPLAY_FLAGS_HSYNC_HIGH@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_DISPLAY_FLAGS_VSYNC_LOW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movq	_DISPLAY_FLAGS_VSYNC_HIGH@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	leaq	16(%r15), %rsi
	movq	_DISPLAY_FLAGS_PIXDATA_NEGEDGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%ecx, %eax
	movq	_DISPLAY_FLAGS_PIXDATA_POSEDGE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_DISPLAY_FLAGS_DE_LOW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movq	_DISPLAY_FLAGS_DE_HIGH@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_DISPLAY_FLAGS_SYNC_POSEDGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%ecx, %eax
	movq	_DISPLAY_FLAGS_SYNC_NEGEDGE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 16(%r15)
	movq	%r15, %rdi
	addq	$20, %rdi
	callq	_dss_mgr_set_timings
	movl	-48(%rbp), %eax
	movl	%eax, 12(%r15)
	xorl	%ebx, %ebx
LBB0_8:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OMAP_DSS_DSI_VIDEO_MODE,8,3    ## @OMAP_DSS_DSI_VIDEO_MODE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to find suitable DSI clock settings\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HSDIV_DSI,8,3                  ## @HSDIV_DSI
L_.str.1:                               ## @.str.1
	.asciz	"failed to find suitable DSI LP clock settings\n"

	.comm	_DISPLAY_FLAGS_INTERLACED,4,2   ## @DISPLAY_FLAGS_INTERLACED
	.comm	_DISPLAY_FLAGS_HSYNC_LOW,4,2    ## @DISPLAY_FLAGS_HSYNC_LOW
	.comm	_DISPLAY_FLAGS_HSYNC_HIGH,4,2   ## @DISPLAY_FLAGS_HSYNC_HIGH
	.comm	_DISPLAY_FLAGS_VSYNC_LOW,4,2    ## @DISPLAY_FLAGS_VSYNC_LOW
	.comm	_DISPLAY_FLAGS_VSYNC_HIGH,4,2   ## @DISPLAY_FLAGS_VSYNC_HIGH
	.comm	_DISPLAY_FLAGS_PIXDATA_NEGEDGE,4,2 ## @DISPLAY_FLAGS_PIXDATA_NEGEDGE
	.comm	_DISPLAY_FLAGS_PIXDATA_POSEDGE,4,2 ## @DISPLAY_FLAGS_PIXDATA_POSEDGE
	.comm	_DISPLAY_FLAGS_DE_LOW,4,2       ## @DISPLAY_FLAGS_DE_LOW
	.comm	_DISPLAY_FLAGS_DE_HIGH,4,2      ## @DISPLAY_FLAGS_DE_HIGH
	.comm	_DISPLAY_FLAGS_SYNC_POSEDGE,4,2 ## @DISPLAY_FLAGS_SYNC_POSEDGE
	.comm	_DISPLAY_FLAGS_SYNC_NEGEDGE,4,2 ## @DISPLAY_FLAGS_SYNC_NEGEDGE
	.no_dead_strip	_dsi_set_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dsi_set_config
_dsi_set_config:                        ; @dsi_set_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x21, x1
	bl	_to_dsi_data
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x21, #16]
	str	w8, [x20, #44]
	ldr	x8, [x21]
	str	x8, [x20]
Lloh0:
	adrp	x9, _OMAP_DSS_DSI_VIDEO_MODE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _OMAP_DSS_DSI_VIDEO_MODE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x21
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	bl	_dsi_vm_calc
	cbz	w0, LBB0_5
LBB0_2:
	add	x8, sp, #8
	add	x1, x8, #16
	mov	x0, x20
	bl	_dsi_pll_calc_dsi_fck
	ldr	x8, [sp, #24]
Lloh3:
	adrp	x9, _HSDIV_DSI@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HSDIV_DSI@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	w0, [x8, x9, lsl #2]
	ldp	w2, w1, [x21, #8]
	add	x3, x20, #40
	bl	_dsi_lp_clock_calc
	mov	x21, x0
	cbz	w0, LBB0_6
; %bb.3:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DSSERR
	b	LBB0_7
LBB0_4:
	bl	_dsi_cm_calc
	cbnz	w0, LBB0_2
LBB0_5:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DSSERR
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_7
LBB0_6:
Lloh13:
	adrp	x8, _DISPLAY_FLAGS_INTERLACED@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DISPLAY_FLAGS_INTERLACED@GOTPAGEOFF]
Lloh15:
	adrp	x9, _DISPLAY_FLAGS_HSYNC_LOW@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DISPLAY_FLAGS_HSYNC_LOW@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldp	w9, w10, [sp, #12]
	bic	w8, w9, w8
Lloh19:
	adrp	x9, _DISPLAY_FLAGS_HSYNC_HIGH@GOTPAGE
Lloh20:
	ldr	x9, [x9, _DISPLAY_FLAGS_HSYNC_HIGH@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh22:
	adrp	x9, _DISPLAY_FLAGS_VSYNC_LOW@GOTPAGE
Lloh23:
	ldr	x9, [x9, _DISPLAY_FLAGS_VSYNC_LOW@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	bic	w8, w8, w9
Lloh25:
	adrp	x9, _DISPLAY_FLAGS_VSYNC_HIGH@GOTPAGE
Lloh26:
	ldr	x9, [x9, _DISPLAY_FLAGS_VSYNC_HIGH@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh28:
	adrp	x9, _DISPLAY_FLAGS_PIXDATA_NEGEDGE@GOTPAGE
Lloh29:
	ldr	x9, [x9, _DISPLAY_FLAGS_PIXDATA_NEGEDGE@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	bic	w8, w8, w9
Lloh31:
	adrp	x9, _DISPLAY_FLAGS_PIXDATA_POSEDGE@GOTPAGE
Lloh32:
	ldr	x9, [x9, _DISPLAY_FLAGS_PIXDATA_POSEDGE@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh34:
	adrp	x9, _DISPLAY_FLAGS_DE_LOW@GOTPAGE
Lloh35:
	ldr	x9, [x9, _DISPLAY_FLAGS_DE_LOW@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	bic	w8, w8, w9
Lloh37:
	adrp	x9, _DISPLAY_FLAGS_DE_HIGH@GOTPAGE
Lloh38:
	ldr	x9, [x9, _DISPLAY_FLAGS_DE_HIGH@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh40:
	adrp	x9, _DISPLAY_FLAGS_SYNC_POSEDGE@GOTPAGE
Lloh41:
	ldr	x9, [x9, _DISPLAY_FLAGS_SYNC_POSEDGE@GOTPAGEOFF]
	ldr	x11, [sp, #24]
Lloh42:
	ldr	w9, [x9]
	bic	w8, w8, w9
Lloh43:
	adrp	x9, _DISPLAY_FLAGS_SYNC_NEGEDGE@GOTPAGE
Lloh44:
	ldr	x9, [x9, _DISPLAY_FLAGS_SYNC_NEGEDGE@GOTPAGEOFF]
Lloh45:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x20, #16]!
	str	x11, [x20, #16]
	str	w10, [x20, #8]
	add	x0, x20, #4
	mov	x1, x20
	bl	_dss_mgr_set_timings
	ldr	w8, [sp, #8]
	stur	w8, [x20, #-4]
LBB0_7:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_OMAP_DSS_DSI_VIDEO_MODE,8,3    ; @OMAP_DSS_DSI_VIDEO_MODE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to find suitable DSI clock settings\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HSDIV_DSI,8,3                  ; @HSDIV_DSI
l_.str.1:                               ; @.str.1
	.asciz	"failed to find suitable DSI LP clock settings\n"

	.comm	_DISPLAY_FLAGS_INTERLACED,4,2   ; @DISPLAY_FLAGS_INTERLACED
	.comm	_DISPLAY_FLAGS_HSYNC_LOW,4,2    ; @DISPLAY_FLAGS_HSYNC_LOW
	.comm	_DISPLAY_FLAGS_HSYNC_HIGH,4,2   ; @DISPLAY_FLAGS_HSYNC_HIGH
	.comm	_DISPLAY_FLAGS_VSYNC_LOW,4,2    ; @DISPLAY_FLAGS_VSYNC_LOW
	.comm	_DISPLAY_FLAGS_VSYNC_HIGH,4,2   ; @DISPLAY_FLAGS_VSYNC_HIGH
	.comm	_DISPLAY_FLAGS_PIXDATA_NEGEDGE,4,2 ; @DISPLAY_FLAGS_PIXDATA_NEGEDGE
	.comm	_DISPLAY_FLAGS_PIXDATA_POSEDGE,4,2 ; @DISPLAY_FLAGS_PIXDATA_POSEDGE
	.comm	_DISPLAY_FLAGS_DE_LOW,4,2       ; @DISPLAY_FLAGS_DE_LOW
	.comm	_DISPLAY_FLAGS_DE_HIGH,4,2      ; @DISPLAY_FLAGS_DE_HIGH
	.comm	_DISPLAY_FLAGS_SYNC_POSEDGE,4,2 ; @DISPLAY_FLAGS_SYNC_POSEDGE
	.comm	_DISPLAY_FLAGS_SYNC_NEGEDGE,4,2 ; @DISPLAY_FLAGS_SYNC_NEGEDGE
	.no_dead_strip	_dsi_set_config
.subsections_via_symbols
