	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vb2ops_venc_queue_setup
_vb2ops_venc_queue_setup:               ## @vb2ops_venc_queue_setup
	.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	%rcx, %rbx
	movq	%rdx, %r14
	movq	%rdi, %r15
	callq	_vb2_get_drv_priv
	movl	(%r15), %esi
	movq	%rax, %rdi
	callq	_mtk_venc_get_q_data
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movl	(%r14), %ecx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.2:
	movq	(%rax), %rax
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx,%rdx,4), %esi
	cmpl	(%rax,%rdx,4), %esi
	jb	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rdx
	cmpq	%rdx, %rcx
	jne	LBB0_3
	jmp	LBB0_10
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_11
LBB0_7:
	movq	8(%rax), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%r14)
	testl	%ecx, %ecx
	je	LBB0_10
## %bb.8:
	movq	(%rax), %rcx
	xorl	%eax, %eax
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rdx,4), %esi
	movl	%esi, (%rbx,%rdx,4)
	incq	%rdx
	movl	(%r14), %esi
	cmpq	%rsi, %rdx
	jb	LBB0_9
	jmp	LBB0_11
LBB0_10:
	xorl	%eax, %eax
LBB0_11:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_vb2ops_venc_queue_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vb2ops_venc_queue_setup
_vb2ops_venc_queue_setup:               ; @vb2ops_venc_queue_setup
	.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, x3
	mov	x20, x2
	mov	x21, x0
	bl	_vb2_get_drv_priv
	ldr	w1, [x21]
	bl	_mtk_venc_get_q_data
	cbz	x0, LBB0_5
; %bb.1:
	ldr	w8, [x20]
	cbz	w8, LBB0_6
; %bb.2:
	ldr	x9, [x0]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x19]
	ldr	w11, [x9]
	cmp	w10, w11
	b.lo	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x19, x19, #4
	add	x9, x9, #4
	subs	x8, x8, #1
	b.ne	LBB0_3
	b	LBB0_9
LBB0_5:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_6:
	ldr	x8, [x0, #8]
	ldr	w8, [x8]
	str	w8, [x20]
	cbz	w8, LBB0_9
; %bb.7:
	mov	x8, #0
	ldr	x9, [x0]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x10, x8, #2
	ldr	w11, [x9, x10]
	str	w11, [x19, x10]
	add	x8, x8, #1
	ldr	w10, [x20]
	cmp	x8, x10
	b.lo	LBB0_8
LBB0_9:
	mov	w0, #0
LBB0_10:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_vb2ops_venc_queue_setup
.subsections_via_symbols
