	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_v4l2_m2m_querybuf              ## -- Begin function v4l2_m2m_querybuf
	.p2align	4, 0x90
_v4l2_m2m_querybuf:                     ## @v4l2_m2m_querybuf
	.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	%rdx, %r15
	movq	%rsi, %rdi
	movl	32(%rdx), %esi
	callq	_v4l2_m2m_get_vq
	movq	%rax, %rbx
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_vb2_querybuf
	movl	%eax, %r14d
	movq	(%r15), %rax
	movq	_V4L2_MEMORY_MMAP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.1:
	movl	(%rbx), %edi
	callq	_V4L2_TYPE_IS_OUTPUT
	testl	%eax, %eax
	je	LBB0_2
LBB0_15:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	(%rbx), %edi
	callq	_V4L2_TYPE_IS_MULTIPLANAR
	testq	%rax, %rax
	je	LBB0_14
## %bb.3:
	movl	8(%r15), %eax
	testq	%rax, %rax
	je	LBB0_15
## %bb.4:
	movq	_DST_QUEUE_OFF_BASE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	24(%r15), %rdx
	cmpl	$8, %eax
	jae	LBB0_6
## %bb.5:
	xorl	%esi, %esi
	jmp	LBB0_13
LBB0_14:
	movq	_DST_QUEUE_OFF_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, 16(%r15)
	jmp	LBB0_15
LBB0_6:
	movl	%eax, %esi
	andl	$-8, %esi
	movd	%ecx, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	leaq	-8(%rsi), %rdi
	movq	%rdi, %r8
	shrq	$3, %r8
	incq	%r8
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.8:
	movq	%r8, %rbx
	andq	$-2, %rbx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rdx,%rdi,4), %xmm1
	movdqu	16(%rdx,%rdi,4), %xmm2
	movdqu	32(%rdx,%rdi,4), %xmm3
	movdqu	48(%rdx,%rdi,4), %xmm4
	paddd	%xmm0, %xmm1
	paddd	%xmm0, %xmm2
	movdqu	%xmm1, (%rdx,%rdi,4)
	movdqu	%xmm2, 16(%rdx,%rdi,4)
	paddd	%xmm0, %xmm3
	paddd	%xmm0, %xmm4
	movdqu	%xmm3, 32(%rdx,%rdi,4)
	movdqu	%xmm4, 48(%rdx,%rdi,4)
	addq	$16, %rdi
	addq	$-2, %rbx
	jne	LBB0_9
	jmp	LBB0_10
LBB0_7:
	xorl	%edi, %edi
LBB0_10:
	testb	$1, %r8b
	je	LBB0_12
## %bb.11:
	movdqu	(%rdx,%rdi,4), %xmm1
	movdqu	16(%rdx,%rdi,4), %xmm2
	paddd	%xmm0, %xmm1
	paddd	%xmm0, %xmm2
	movdqu	%xmm1, (%rdx,%rdi,4)
	movdqu	%xmm2, 16(%rdx,%rdi,4)
LBB0_12:
	cmpq	%rax, %rsi
	je	LBB0_15
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	addl	%ecx, (%rdx,%rsi,4)
	incq	%rsi
	cmpq	%rsi, %rax
	jne	LBB0_13
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_MEMORY_MMAP,8,3           ## @V4L2_MEMORY_MMAP
	.comm	_DST_QUEUE_OFF_BASE,8,3         ## @DST_QUEUE_OFF_BASE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_v4l2_m2m_querybuf              ; -- Begin function v4l2_m2m_querybuf
	.p2align	2
_v4l2_m2m_querybuf:                     ; @v4l2_m2m_querybuf
	.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	x20, x2
	mov	x0, x1
	ldr	w1, [x2, #32]
	bl	_v4l2_m2m_get_vq
	mov	x21, x0
	mov	x1, x20
	bl	_vb2_querybuf
	mov	x19, x0
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _V4L2_MEMORY_MMAP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_MEMORY_MMAP@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [x21]
	bl	_V4L2_TYPE_IS_OUTPUT
	cbz	w0, LBB0_3
LBB0_2:
	mov	x0, x19
	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_3:
	ldr	w0, [x21]
	bl	_V4L2_TYPE_IS_MULTIPLANAR
	cbz	x0, LBB0_7
; %bb.4:
	ldr	w9, [x20, #8]
	cbz	w9, LBB0_2
; %bb.5:
Lloh3:
	adrp	x8, _DST_QUEUE_OFF_BASE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DST_QUEUE_OFF_BASE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	x10, [x20, #24]
	cmp	w9, #16
	b.hs	LBB0_8
; %bb.6:
	mov	x11, #0
	b	LBB0_11
LBB0_7:
Lloh6:
	adrp	x8, _DST_QUEUE_OFF_BASE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DST_QUEUE_OFF_BASE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x20, #16]
	add	w8, w9, w8
	str	w8, [x20, #16]
	b	LBB0_2
LBB0_8:
	and	x11, x9, #0xfffffff0
	dup.4s	v0, w8
	add	x12, x10, #32
	mov	x13, x11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q1, q2, [x12, #-32]
	ldp	q3, q4, [x12]
	add.4s	v1, v1, v0
	add.4s	v2, v2, v0
	add.4s	v3, v3, v0
	add.4s	v4, v4, v0
	stp	q1, q2, [x12, #-32]
	stp	q3, q4, [x12], #64
	subs	x13, x13, #16
	b.ne	LBB0_9
; %bb.10:
	cmp	x11, x9
	b.eq	LBB0_2
LBB0_11:
	add	x10, x10, x11, lsl #2
	sub	x9, x9, x11
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10]
	add	w11, w11, w8
	str	w11, [x10], #4
	subs	x9, x9, #1
	b.ne	LBB0_12
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_MEMORY_MMAP,8,3           ; @V4L2_MEMORY_MMAP
	.comm	_DST_QUEUE_OFF_BASE,8,3         ; @DST_QUEUE_OFF_BASE
.subsections_via_symbols
