	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cio2_vb2_start_streaming
_cio2_vb2_start_streaming:              ## @cio2_vb2_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, %rbx
	callq	_vb2q_to_cio2_queue
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_vb2_get_drv_priv
	movq	%rax, %r14
	movq	%r15, 16(%rax)
	leaq	12(%r15), %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	movq	8(%r14), %rdi
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	%r15, %rsi
	addq	$8, %rsi
	movq	%r15, %rdi
	callq	_media_pipeline_start
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.3:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_cio2_hw_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movl	4(%r15), %edi
	movq	_video@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_s_stream@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$1, %ecx
	callq	_v4l2_subdev_call
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	%eax, %ebx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_cio2_hw_exit
LBB0_7:
	movq	%r15, %rdi
	callq	_media_pipeline_stop
LBB0_8:
	movq	8(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_dbg
	movq	_VB2_BUF_STATE_QUEUED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_cio2_vb2_return_all_buffers
	movq	8(%r14), %rdi
	callq	_pm_runtime_put
	jmp	LBB0_9
LBB0_1:
	movl	%eax, %ebx
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_info
	movq	8(%r14), %rdi
	callq	_pm_runtime_put_noidle
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	$1, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to set power %d\n"

	.comm	_video,4,2                      ## @video
	.comm	_s_stream,4,2                   ## @s_stream
L_.str.1:                               ## @.str.1
	.asciz	"failed to start streaming (%d)\n"

	.comm	_VB2_BUF_STATE_QUEUED,4,2       ## @VB2_BUF_STATE_QUEUED
	.no_dead_strip	_cio2_vb2_start_streaming
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cio2_vb2_start_streaming
_cio2_vb2_start_streaming:              ; @cio2_vb2_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
	mov	x19, x0
	bl	_vb2q_to_cio2_queue
	mov	x20, x0
	mov	x0, x19
	bl	_vb2_get_drv_priv
	mov	x19, x0
	str	x20, [x0, #16]
	add	x0, x20, #12
	mov	w1, #0
	bl	_atomic_set
	ldr	x0, [x19, #8]
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_7
; %bb.1:
	add	x1, x20, #8
	mov	x0, x20
	bl	_media_pipeline_start
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.2:
	mov	x0, x19
	mov	x1, x20
	bl	_cio2_hw_init
	mov	x21, x0
	cbnz	w0, LBB0_5
; %bb.3:
	ldr	w0, [x20, #4]
Lloh0:
	adrp	x8, _video@GOTPAGE
Lloh1:
	ldr	x8, [x8, _video@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _s_stream@GOTPAGE
Lloh4:
	ldr	x8, [x8, _s_stream@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	w22, #1
	mov	w3, #1
	bl	_v4l2_subdev_call
	mov	x21, x0
	cbz	w0, LBB0_9
; %bb.4:
	mov	x0, x19
	mov	x1, x20
	bl	_cio2_hw_exit
LBB0_5:
	mov	x0, x20
	bl	_media_pipeline_stop
LBB0_6:
	ldr	x0, [x19, #8]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_dev_dbg
Lloh8:
	adrp	x8, _VB2_BUF_STATE_QUEUED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VB2_BUF_STATE_QUEUED@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_cio2_vb2_return_all_buffers
	ldr	x0, [x19, #8]
	bl	_pm_runtime_put
	b	LBB0_8
LBB0_7:
	mov	x21, x0
	ldr	x0, [x19, #8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_info
	ldr	x0, [x19, #8]
	bl	_pm_runtime_put_noidle
LBB0_8:
	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_9:
	str	w22, [x19]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to set power %d\n"

	.comm	_video,4,2                      ; @video
	.comm	_s_stream,4,2                   ; @s_stream
l_.str.1:                               ; @.str.1
	.asciz	"failed to start streaming (%d)\n"

	.comm	_VB2_BUF_STATE_QUEUED,4,2       ; @VB2_BUF_STATE_QUEUED
	.no_dead_strip	_cio2_vb2_start_streaming
.subsections_via_symbols
