	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_venus_helper_vb2_buf_queue     ## -- Begin function venus_helper_vb2_buf_queue
	.p2align	4, 0x90
_venus_helper_vb2_buf_queue:            ## @venus_helper_vb2_buf_queue
	.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, %r12
	callq	_to_vb2_v4l2_buffer
	movq	%rax, %r14
	movl	(%r12), %edi
	callq	_vb2_get_drv_priv
	movq	%rax, %rbx
	movq	32(%rax), %r13
	leaq	8(%rax), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_v4l2_m2m_buf_queue
	movq	(%rbx), %rax
	movq	_VIDC_SESSION_TYPE_ENC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	cmpq	$0, 24(%rbx)
	je	LBB0_7
## %bb.2:
	cmpq	$0, 16(%rbx)
	je	LBB0_7
LBB0_3:
	movl	(%r12), %edi
	callq	_vb2_start_streaming_called
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_is_buf_refed
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_session_process_buf
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_return_buf_error
LBB0_7:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VIDC_SESSION_TYPE_ENC,8,3      ## @VIDC_SESSION_TYPE_ENC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_venus_helper_vb2_buf_queue     ; -- Begin function venus_helper_vb2_buf_queue
	.p2align	2
_venus_helper_vb2_buf_queue:            ; @venus_helper_vb2_buf_queue
	.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	x22, x0
	bl	_to_vb2_v4l2_buffer
	mov	x19, x0
	ldr	w0, [x22]
	bl	_vb2_get_drv_priv
	mov	x21, x0
	ldr	x23, [x0, #32]
	add	x20, x0, #8
	mov	x0, x20
	bl	_mutex_lock
	mov	x0, x23
	mov	x1, x19
	bl	_v4l2_m2m_buf_queue
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _VIDC_SESSION_TYPE_ENC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VIDC_SESSION_TYPE_ENC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_7
; %bb.2:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_7
LBB0_3:
	ldr	w0, [x22]
	bl	_vb2_start_streaming_called
	cbz	x0, LBB0_7
; %bb.4:
	mov	x0, x21
	mov	x1, x19
	bl	_is_buf_refed
	cbnz	w0, LBB0_7
; %bb.5:
	mov	x0, x21
	mov	x1, x19
	bl	_session_process_buf
	cbz	w0, LBB0_7
; %bb.6:
	mov	x0, x21
	mov	x1, x19
	bl	_return_buf_error
LBB0_7:
	mov	x0, x20
	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
	b	_mutex_unlock
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_VIDC_SESSION_TYPE_ENC,8,3      ; @VIDC_SESSION_TYPE_ENC
.subsections_via_symbols
