	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vb2ops_vdec_buf_prepare
_vb2ops_vdec_buf_prepare:               ## @vb2ops_vdec_buf_prepare
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rdi
	callq	_vb2_get_drv_priv
	movq	%rax, %rbx
	movl	(%rax), %edx
	movq	(%r14), %rax
	movl	(%rax), %ecx
	movl	8(%r14), %r8d
	leaq	L_.str(%rip), %rsi
	movl	$3, %edi
	callq	_mtk_v4l2_debug
	movq	(%r14), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mtk_vdec_get_q_data
	movq	%rax, %r15
	movq	8(%rax), %rax
	cmpl	$0, (%rax)
	jle	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	leaq	L_.str.1(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movq	8(%r15), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_vb2_plane_size
	movq	(%r15), %rcx
	cmpq	(%rcx,%rbx,8), %rax
	jge	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_vb2_plane_size
	movq	(%r15), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movq	%r12, %rdi
	movl	%ebx, %esi
	movq	%rax, %rdx
	callq	_mtk_v4l2_err
	jmp	LBB0_4
LBB0_5:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[%d] (%d) id=%d"

L_.str.1:                               ## @.str.1
	.asciz	"data will not fit into plane %d (%lu < %d)"

	.no_dead_strip	_vb2ops_vdec_buf_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vb2ops_vdec_buf_prepare
_vb2ops_vdec_buf_prepare:               ; @vb2ops_vdec_buf_prepare
	.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
	ldr	x0, [x0]
	bl	_vb2_get_drv_priv
	mov	x20, x0
	ldr	w2, [x0]
	ldr	x8, [x19]
	ldr	w3, [x8]
	ldr	w4, [x19, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #3
	bl	_mtk_v4l2_debug
	ldr	x8, [x19]
	ldr	w1, [x8]
	mov	x0, x20
	bl	_mtk_vdec_get_q_data
	ldr	x8, [x0, #8]
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x20, x0
	mov	x21, #0
Lloh2:
	adrp	x22, l_.str.1@PAGE
Lloh3:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	ldr	x8, [x20, #8]
	ldrsw	x8, [x8]
	cmp	x21, x8
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_vb2_plane_size
	ldr	x8, [x20]
	ldr	x8, [x8, x21, lsl #3]
	cmp	x0, x8
	b.ge	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_vb2_plane_size
	mov	x2, x0
	ldr	x8, [x20]
	ldr	x3, [x8, x21, lsl #3]
	mov	x0, x22
	mov	x1, x21
	bl	_mtk_v4l2_err
	b	LBB0_2
LBB0_5:
	mov	w0, #0
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[%d] (%d) id=%d"

l_.str.1:                               ; @.str.1
	.asciz	"data will not fit into plane %d (%lu < %d)"

	.no_dead_strip	_vb2ops_vdec_buf_prepare
.subsections_via_symbols
