	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dsi_vc_config_source
_dsi_vc_config_source:                  ## @dsi_vc_config_source
	.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	(%rdi), %rax
	movslq	%esi, %r13
	xorl	%ebx, %ebx
	cmpl	%edx, (%rax,%r13,4)
	je	LBB0_6
## %bb.1:
	movl	%edx, %r14d
	movl	%esi, %r12d
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rdi
	callq	_DSSDBG
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_dsi_sync_vc
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movl	%r12d, %esi
	xorl	%edx, %edx
	callq	_dsi_vc_enable
	movl	%r12d, %edi
	callq	_DSI_VC_CTRL
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	$15, %edx
	xorl	%ecx, %ecx
	callq	_wait_for_bit_change
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movl	%r12d, %edi
	callq	_DSI_VC_CTRL
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%r14d, %edx
	movl	$1, %ecx
	movl	$1, %r8d
	callq	_REG_FLD_MOD
	movq	8(%r15), %rax
	movq	_DSI_QUIRK_DCS_CMD_CONFIG_VC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_5
## %bb.4:
	movq	_DSI_VC_SOURCE_VP@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpl	%r14d, (%rax)
	sete	%bl
	movl	%r12d, %edi
	callq	_DSI_VC_CTRL
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	movl	$30, %ecx
	movl	$30, %r8d
	callq	_REG_FLD_MOD
LBB0_5:
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	$1, %edx
	callq	_dsi_vc_enable
	movq	(%r15), %rax
	movl	%r14d, (%rax,%r13,4)
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	movl	%r12d, %esi
	callq	_DSSERR
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Source config of virtual channel %d"

L_.str.1:                               ## @.str.1
	.asciz	"vc(%d) busy when trying to config for VP\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_DSI_QUIRK_DCS_CMD_CONFIG_VC,4,2 ## @DSI_QUIRK_DCS_CMD_CONFIG_VC
	.comm	_DSI_VC_SOURCE_VP,4,2           ## @DSI_VC_SOURCE_VP
	.no_dead_strip	_dsi_vc_config_source
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dsi_vc_config_source
_dsi_vc_config_source:                  ; @dsi_vc_config_source
	.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
	ldr	x8, [x0]
	ldr	w8, [x8, w1, sxtw #2]
	cmp	w8, w2
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_7
LBB0_2:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DSSDBG
	mov	x0, x21
	mov	x1, x20
	bl	_dsi_sync_vc
	mov	x0, x21
	mov	x1, x20
	mov	w2, #0
	bl	_dsi_vc_enable
	mov	x0, x20
	bl	_DSI_VC_CTRL
	mov	x1, x0
	mov	x0, x21
	mov	w2, #15
	mov	w3, #0
	bl	_wait_for_bit_change
	cbz	w0, LBB0_6
; %bb.3:
	sxtw	x23, w20
	mov	x0, x20
	bl	_DSI_VC_CTRL
	mov	x1, x0
	mov	x0, x21
	mov	x2, x19
	mov	w3, #1
	mov	w4, #1
	bl	_REG_FLD_MOD
	ldr	x8, [x21, #8]
	ldr	w8, [x8]
Lloh2:
	adrp	x9, _DSI_QUIRK_DCS_CMD_CONFIG_VC@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DSI_QUIRK_DCS_CMD_CONFIG_VC@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
Lloh5:
	adrp	x8, _DSI_VC_SOURCE_VP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DSI_VC_SOURCE_VP@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, w19
	cset	w22, eq
	mov	x0, x20
	bl	_DSI_VC_CTRL
	mov	x1, x0
	mov	x0, x21
	mov	x2, x22
	mov	w3, #30
	mov	w4, #30
	bl	_REG_FLD_MOD
LBB0_5:
	mov	x0, x21
	mov	x1, x20
	mov	w2, #1
	bl	_dsi_vc_enable
	mov	w0, #0
	ldr	x8, [x21]
	str	w19, [x8, x23, lsl #2]
	b	LBB0_7
LBB0_6:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_DSSERR
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Source config of virtual channel %d"

l_.str.1:                               ; @.str.1
	.asciz	"vc(%d) busy when trying to config for VP\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_DSI_QUIRK_DCS_CMD_CONFIG_VC,4,2 ; @DSI_QUIRK_DCS_CMD_CONFIG_VC
	.comm	_DSI_VC_SOURCE_VP,4,2           ; @DSI_VC_SOURCE_VP
	.no_dead_strip	_dsi_vc_config_source
.subsections_via_symbols
