	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function venc_start_streaming
_venc_start_streaming:                  ## @venc_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	%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, %r15
	callq	_vb2_get_drv_priv
	movq	%rax, %rbx
	movq	%rax, %r14
	addq	$8, %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%r15), %rax
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_2
## %bb.1:
	movl	$1, (%rbx)
	movl	4(%rbx), %eax
	movl	$1, %ecx
	testl	%ecx, %eax
	je	LBB0_4
LBB0_5:
	movq	%rbx, %rdi
	callq	_venus_helper_init_instance
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rbx)
	movq	%rbx, %rdi
	callq	_venc_init_session
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.6:
	movq	%rbx, %rdi
	callq	_venc_set_properties
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_10
## %bb.7:
	movq	%rbx, %rdi
	callq	_venc_verify_conf
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:
	movl	12(%rbx), %edx
	movl	16(%rbx), %esi
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_venus_helper_set_num_bufs
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movq	%rbx, %rdi
	callq	_venus_helper_vb2_start_streaming
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_14
LBB0_10:
	movq	%rbx, %rdi
	callq	_hfi_session_deinit
	movl	%r13d, %r12d
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPCREL(%rip), %r13
LBB0_11:
	movq	_VB2_BUF_STATE_QUEUED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_venus_helper_buffers_done
	movq	(%r15), %rax
	cmpq	(%r13), %rax
	jne	LBB0_13
## %bb.12:
	movl	$0, (%rbx)
	jmp	LBB0_14
LBB0_2:
	movl	$1, 4(%rbx)
	movl	(%rbx), %ecx
	movl	$1, %eax
	testl	%ecx, %eax
	jne	LBB0_5
LBB0_4:
	xorl	%r12d, %r12d
	jmp	LBB0_14
LBB0_13:
	movl	$0, 4(%rbx)
LBB0_14:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,8,3 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.comm	_VB2_BUF_STATE_QUEUED,4,2       ## @VB2_BUF_STATE_QUEUED
	.no_dead_strip	_venc_start_streaming
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function venc_start_streaming
_venc_start_streaming:                  ; @venc_start_streaming
	.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	x21, x0
	bl	_vb2_get_drv_priv
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x21]
Lloh0:
	adrp	x23, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.1:
	mov	w9, #1
	str	w9, [x20]
	ldr	w8, [x20, #4]
	tst	w8, w9
	b.eq	LBB0_11
LBB0_2:
	mov	x0, x20
	bl	_venus_helper_init_instance
	stp	xzr, xzr, [x20, #24]
	mov	x0, x20
	bl	_venc_init_session
	mov	x22, x0
	cbnz	w0, LBB0_8
; %bb.3:
	mov	x0, x20
	bl	_venc_set_properties
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.4:
	mov	x0, x20
	bl	_venc_verify_conf
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.5:
	ldp	w2, w1, [x20, #12]
	mov	x0, x20
	mov	w3, #0
	bl	_venus_helper_set_num_bufs
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_venus_helper_vb2_start_streaming
	mov	x22, x0
	cbz	w0, LBB0_13
LBB0_7:
	mov	x0, x20
	bl	_hfi_session_deinit
LBB0_8:
Lloh2:
	adrp	x8, _VB2_BUF_STATE_QUEUED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VB2_BUF_STATE_QUEUED@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_venus_helper_buffers_done
	ldr	x8, [x21]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.9:
	str	wzr, [x20]
	b	LBB0_13
LBB0_10:
	mov	w8, #1
	str	w8, [x20, #4]
	ldr	w9, [x20]
	tst	w8, w9
	b.ne	LBB0_2
LBB0_11:
	mov	w22, #0
	b	LBB0_13
LBB0_12:
	str	wzr, [x20, #4]
LBB0_13:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,8,3 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.comm	_VB2_BUF_STATE_QUEUED,4,2       ; @VB2_BUF_STATE_QUEUED
	.no_dead_strip	_venc_start_streaming
.subsections_via_symbols
