	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function start_streaming
_start_streaming:                       ## @start_streaming
	.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
	movq	(%r15), %rbx
	movq	$0, 24(%rbx)
	movq	%rbx, %rdi
	callq	_fimc_capture_hw_init
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_fimc_capture_state_cleanup
	jmp	LBB0_5
LBB0_2:
	movq	_ST_CAPT_PEND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_set_bit
	xorl	%eax, %eax
	cmpl	$2, 8(%rbx)
	setge	%al
	incl	%eax
	xorl	%r14d, %r14d
	cmpl	%eax, 12(%rbx)
	jl	LBB0_5
## %bb.3:
	movq	_ST_CAPT_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_and_set_bit
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_fimc_activate_capture
	movq	_ST_CAPT_ISP_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_and_set_bit
	testl	%eax, %eax
	je	LBB0_6
LBB0_5:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	addq	$16, %rbx
	movq	_set_stream@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fimc_pipeline_call             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ST_CAPT_PEND,4,2               ## @ST_CAPT_PEND
	.comm	_ST_CAPT_STREAM,4,2             ## @ST_CAPT_STREAM
	.comm	_ST_CAPT_ISP_STREAM,4,2         ## @ST_CAPT_ISP_STREAM
	.comm	_set_stream,4,2                 ## @set_stream
	.no_dead_strip	_start_streaming
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function start_streaming
_start_streaming:                       ; @start_streaming
	.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
	ldr	x20, [x0]
	ldr	x19, [x20]
	str	xzr, [x19, #24]
	mov	x0, x19
	bl	_fimc_capture_hw_init
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
	mov	x0, x19
	mov	w1, #0
	bl	_fimc_capture_state_cleanup
	b	LBB0_6
LBB0_2:
Lloh0:
	adrp	x8, _ST_CAPT_PEND@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ST_CAPT_PEND@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_set_bit
	ldp	w8, w9, [x19, #8]
	cmp	w8, #1
	mov	w8, #1
	cinc	w8, w8, gt
	cmp	w9, w8
	b.lt	LBB0_5
; %bb.3:
Lloh3:
	adrp	x8, _ST_CAPT_STREAM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ST_CAPT_STREAM@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_and_set_bit
	cbnz	w0, LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_fimc_activate_capture
Lloh6:
	adrp	x8, _ST_CAPT_ISP_STREAM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ST_CAPT_ISP_STREAM@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_and_set_bit
	cbz	w0, LBB0_7
LBB0_5:
	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
LBB0_7:
	add	x0, x19, #16
Lloh9:
	adrp	x8, _set_stream@GOTPAGE
Lloh10:
	ldr	x8, [x8, _set_stream@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	w2, #1
	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
	b	_fimc_pipeline_call
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ST_CAPT_PEND,4,2               ; @ST_CAPT_PEND
	.comm	_ST_CAPT_STREAM,4,2             ; @ST_CAPT_STREAM
	.comm	_ST_CAPT_ISP_STREAM,4,2         ; @ST_CAPT_ISP_STREAM
	.comm	_set_stream,4,2                 ; @set_stream
	.no_dead_strip	_start_streaming
.subsections_via_symbols
