	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fimc_capture_open
_fimc_capture_open:                     ## @fimc_capture_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	%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, %r14
	callq	_video_drvdata
	movq	%rax, %r13
	movq	%rax, %r15
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_task_pid_nr
	movl	16(%r13), %edx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_dbg
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	%r13, %rdi
	callq	_fimc_m2m_active
	testq	%rax, %rax
	je	LBB0_1
LBB0_16:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	16(%r13), %r12
	movq	_ST_CAPT_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_set_bit
	movq	8(%r15), %rdi
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movq	%r14, %rdi
	callq	_v4l2_fh_open
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	movq	8(%r15), %rdi
	callq	_pm_runtime_put_sync
	jmp	LBB0_16
LBB0_2:
	movl	%eax, %ebx
	jmp	LBB0_16
LBB0_5:
	movq	%r14, %rdi
	callq	_v4l2_fh_is_singular_file
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	addq	$40, %r13
	movq	%r13, %rdi
	callq	_fimc_md_graph_lock
	movq	_open@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movq	%r13, %rdx
	movl	$1, %ecx
	callq	_fimc_pipeline_call
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_8
LBB0_13:
	movq	%r13, %rdi
	callq	_fimc_md_graph_unlock
	testl	%ebx, %ebx
	jns	LBB0_16
	jmp	LBB0_15
LBB0_6:
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_8:
	cmpq	$0, 32(%r15)
	je	LBB0_12
## %bb.9:
	cmpl	$0, 24(%r15)
	je	LBB0_12
## %bb.10:
	movl	28(%r15), %edi
	callq	_fimc_ctrls_delete
	movl	28(%r15), %edi
	callq	_fimc_ctrls_create
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.11:
	movl	$0, 24(%r15)
LBB0_12:
	incl	40(%r15)
	movq	%r13, %rdi
	callq	_fimc_md_graph_unlock
	movq	%r15, %rdi
	callq	_fimc_capture_set_default_format
	movl	%eax, %ebx
	testl	%ebx, %ebx
	jns	LBB0_16
LBB0_15:
	movq	_ST_CAPT_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_clear_bit
	movq	8(%r15), %rdi
	callq	_pm_runtime_put_sync
	movq	%r14, %rdi
	callq	_v4l2_fh_release
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pid: %d, state: 0x%lx"

	.comm	_current,4,2                    ## @current
	.comm	_ST_CAPT_BUSY,4,2               ## @ST_CAPT_BUSY
	.comm	_open,4,2                       ## @open
	.no_dead_strip	_fimc_capture_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fimc_capture_open
_fimc_capture_open:                     ; @fimc_capture_open
	.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
	mov	x20, x0
	bl	_video_drvdata
	mov	x19, x0
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
Lloh3:
	adrp	x8, _current@GOTPAGE
Lloh4:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_task_pid_nr
	mov	x1, x0
	mov	x21, x19
	ldr	w2, [x21, #16]!
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dbg
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x19
	bl	_fimc_m2m_active
	cbz	x0, LBB0_3
; %bb.1:
	neg	w22, w22
LBB0_2:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x22
	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
LBB0_3:
Lloh8:
	adrp	x24, _ST_CAPT_BUSY@GOTPAGE
Lloh9:
	ldr	x24, [x24, _ST_CAPT_BUSY@GOTPAGEOFF]
	ldr	w0, [x24]
	mov	x1, x21
	bl	_set_bit
	ldr	x0, [x19, #8]
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_6
; %bb.4:
	mov	x0, x20
	bl	_v4l2_fh_open
	cbz	w0, LBB0_7
; %bb.5:
	mov	x22, x0
	ldr	x0, [x19, #8]
	bl	_pm_runtime_put_sync
	b	LBB0_2
LBB0_6:
	mov	x22, x0
	b	LBB0_2
LBB0_7:
	mov	x0, x20
	bl	_v4l2_fh_is_singular_file
	cbz	x0, LBB0_10
; %bb.8:
	add	x23, x19, #40
	mov	x0, x23
	bl	_fimc_md_graph_lock
Lloh10:
	adrp	x8, _open@GOTPAGE
Lloh11:
	ldr	x8, [x8, _open@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x23
	mov	x2, x23
	mov	w3, #1
	bl	_fimc_pipeline_call
	mov	x22, x0
	cbz	w0, LBB0_11
LBB0_9:
	mov	x0, x23
	bl	_fimc_md_graph_unlock
	tbz	w22, #31, LBB0_2
	b	LBB0_16
LBB0_10:
	mov	w22, #0
	b	LBB0_2
LBB0_11:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_15
; %bb.12:
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_15
; %bb.13:
	ldr	w0, [x19, #28]
	bl	_fimc_ctrls_delete
	ldr	w0, [x19, #28]
	bl	_fimc_ctrls_create
	mov	x22, x0
	cbnz	w0, LBB0_9
; %bb.14:
	str	wzr, [x19, #24]
LBB0_15:
	ldr	w8, [x19, #40]
	add	w8, w8, #1
	str	w8, [x19, #40]
	mov	x0, x23
	bl	_fimc_md_graph_unlock
	mov	x0, x19
	bl	_fimc_capture_set_default_format
	mov	x22, x0
	tbz	w22, #31, LBB0_2
LBB0_16:
	ldr	w0, [x24]
	mov	x1, x21
	bl	_clear_bit
	ldr	x0, [x19, #8]
	bl	_pm_runtime_put_sync
	mov	x0, x20
	bl	_v4l2_fh_release
	b	LBB0_2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pid: %d, state: 0x%lx"

	.comm	_current,4,2                    ; @current
	.comm	_ST_CAPT_BUSY,4,2               ; @ST_CAPT_BUSY
	.comm	_open,4,2                       ; @open
	.no_dead_strip	_fimc_capture_open
.subsections_via_symbols
