	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mcam_v4l_open
_mcam_v4l_open:                         ## @mcam_v4l_open
	.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, %r15
	callq	_video_drvdata
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_mutex_lock
	movq	%r15, %rdi
	callq	_v4l2_fh_open
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_1
LBB0_5:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	%r15, %rdi
	callq	_v4l2_fh_release
	jmp	LBB0_6
LBB0_1:
	movq	%r15, %rdi
	callq	_v4l2_fh_is_singular_file
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	_core@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_s_power@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$1, %ecx
	callq	_sensor_call
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movq	%r14, %rdi
	callq	_mcam_clk_enable
	movq	%r14, %rdi
	callq	___mcam_cam_reset
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_mcam_set_config_needed
LBB0_4:
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%ebx, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_core,4,2                       ## @core
	.comm	_s_power,4,2                    ## @s_power
	.no_dead_strip	_mcam_v4l_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mcam_v4l_open
_mcam_v4l_open:                         ; @mcam_v4l_open
	.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	x20, x0
	bl	_video_drvdata
	mov	x19, x0
	bl	_mutex_lock
	mov	x0, x20
	bl	_v4l2_fh_open
	mov	x21, x0
	cbz	w0, LBB0_2
LBB0_1:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	bl	_v4l2_fh_release
	b	LBB0_6
LBB0_2:
	mov	x0, x20
	bl	_v4l2_fh_is_singular_file
	cbz	x0, LBB0_5
; %bb.3:
Lloh0:
	adrp	x8, _core@GOTPAGE
Lloh1:
	ldr	x8, [x8, _core@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _s_power@GOTPAGE
Lloh4:
	ldr	x8, [x8, _s_power@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #1
	bl	_sensor_call
	mov	x21, x0
	cbnz	w0, LBB0_1
; %bb.4:
	mov	x0, x19
	bl	_mcam_clk_enable
	mov	x0, x19
	bl	___mcam_cam_reset
	mov	x0, x19
	mov	w1, #1
	bl	_mcam_set_config_needed
LBB0_5:
	mov	x0, x19
	bl	_mutex_unlock
	mov	w21, #0
LBB0_6:
	mov	x0, x21
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_core,4,2                       ; @core
	.comm	_s_power,4,2                    ; @s_power
	.no_dead_strip	_mcam_v4l_open
.subsections_via_symbols
