	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mcam_enable_mipi
_mcam_enable_mipi:                      ## @mcam_enable_mipi
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	*%rax
LBB0_2:
	movq	(%rbx), %rax
	movl	(%rax), %edx
	movl	4(%rax), %ecx
	movl	8(%rax), %r8d
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_cam_dbg
	movq	_REG_CSI2_DPHY3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_mcam_reg_write
	movq	_REG_CSI2_DPHY5@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rax
	movl	4(%rax), %edx
	movq	%rbx, %rdi
	callq	_mcam_reg_write
	movq	_REG_CSI2_DPHY6@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rax
	movl	8(%rax), %edx
	movq	%rbx, %rdi
	callq	_mcam_reg_write
	cmpl	$0, 8(%rbx)
	jne	LBB0_6
## %bb.3:
	movl	12(%rbx), %edi
	leal	-5(%rdi), %eax
	cmpl	$-5, %eax
	ja	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_cam_warn
	movl	$1, 12(%rbx)
	movl	$1, %edi
LBB0_5:
	movq	_REG_CSI2_CTRL0@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_CSI2_C0_MIPI_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_CSI2_C0_ACT_LANE
	orl	%eax, %r15d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_mcam_reg_write
	movl	$1, 8(%rbx)
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"camera: DPHY3=0x%x, DPHY5=0x%x, DPHY6=0x%x\n"

	.comm	_REG_CSI2_DPHY3,4,2             ## @REG_CSI2_DPHY3
	.comm	_REG_CSI2_DPHY5,4,2             ## @REG_CSI2_DPHY5
	.comm	_REG_CSI2_DPHY6,4,2             ## @REG_CSI2_DPHY6
L_.str.1:                               ## @.str.1
	.asciz	"lane number error\n"

	.comm	_REG_CSI2_CTRL0,4,2             ## @REG_CSI2_CTRL0
	.comm	_CSI2_C0_MIPI_EN,4,2            ## @CSI2_C0_MIPI_EN
	.no_dead_strip	_mcam_enable_mipi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mcam_enable_mipi
_mcam_enable_mipi:                      ; @mcam_enable_mipi
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	blr	x8
LBB0_2:
	ldr	x8, [x19]
	ldp	w2, w3, [x8]
	ldr	w4, [x8, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_cam_dbg
Lloh2:
	adrp	x8, _REG_CSI2_DPHY3@GOTPAGE
Lloh3:
	ldr	x8, [x8, _REG_CSI2_DPHY3@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	ldr	x8, [x19]
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mcam_reg_write
Lloh5:
	adrp	x8, _REG_CSI2_DPHY5@GOTPAGE
Lloh6:
	ldr	x8, [x8, _REG_CSI2_DPHY5@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	x8, [x19]
	ldr	w2, [x8, #4]
	mov	x0, x19
	bl	_mcam_reg_write
Lloh8:
	adrp	x8, _REG_CSI2_DPHY6@GOTPAGE
Lloh9:
	ldr	x8, [x8, _REG_CSI2_DPHY6@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ldr	x8, [x19]
	ldr	w2, [x8, #8]
	mov	x0, x19
	bl	_mcam_reg_write
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_6
; %bb.3:
	ldr	w0, [x19, #12]
	sub	w8, w0, #5
	cmn	w8, #5
	b.hi	LBB0_5
; %bb.4:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_cam_warn
	mov	w0, #1
	str	w0, [x19, #12]
LBB0_5:
Lloh13:
	adrp	x8, _REG_CSI2_CTRL0@GOTPAGE
Lloh14:
	ldr	x8, [x8, _REG_CSI2_CTRL0@GOTPAGEOFF]
Lloh15:
	ldr	w20, [x8]
Lloh16:
	adrp	x8, _CSI2_C0_MIPI_EN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CSI2_C0_MIPI_EN@GOTPAGEOFF]
Lloh18:
	ldr	w21, [x8]
	bl	_CSI2_C0_ACT_LANE
	orr	w2, w0, w21
	mov	x0, x19
	mov	x1, x20
	bl	_mcam_reg_write
	mov	w8, #1
	str	w8, [x19, #8]
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"camera: DPHY3=0x%x, DPHY5=0x%x, DPHY6=0x%x\n"

	.comm	_REG_CSI2_DPHY3,4,2             ; @REG_CSI2_DPHY3
	.comm	_REG_CSI2_DPHY5,4,2             ; @REG_CSI2_DPHY5
	.comm	_REG_CSI2_DPHY6,4,2             ; @REG_CSI2_DPHY6
l_.str.1:                               ; @.str.1
	.asciz	"lane number error\n"

	.comm	_REG_CSI2_CTRL0,4,2             ; @REG_CSI2_CTRL0
	.comm	_CSI2_C0_MIPI_EN,4,2            ; @CSI2_C0_MIPI_EN
	.no_dead_strip	_mcam_enable_mipi
.subsections_via_symbols
