	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_querybuf
_vidioc_querybuf:                       ## @vidioc_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
	callq	_fh_to_ctx
	movq	%rax, %rbx
	movq	(%r15), %rax
	movq	_V4L2_MEMORY_MMAP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	(%rbx), %rdx
	movl	24(%r15), %ecx
	leaq	L_.str.1(%rip), %rsi
	movl	$2, %edi
	callq	_mfc_debug
	movq	(%rbx), %rax
	movq	_MFCINST_GOT_INST@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.3:
	movl	24(%r15), %ecx
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_5
## %bb.4:
	addq	$12, %rbx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_vb2_querybuf
	movl	%eax, %r14d
	jmp	LBB0_19
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_mfc_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_20
LBB0_5:
	movq	_MFCINST_RUNNING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_18
## %bb.6:
	movl	24(%r15), %eax
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_18
## %bb.7:
	addq	$8, %rbx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_vb2_querybuf
	movl	%eax, %r14d
	movl	8(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_19
## %bb.8:
	movq	_DST_QUEUE_OFF_BASE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	16(%r15), %rdx
	cmpl	$8, %eax
	jae	LBB0_10
## %bb.9:
	xorl	%esi, %esi
	jmp	LBB0_17
LBB0_18:
	leaq	L_.str.2(%rip), %rdi
	callq	_mfc_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_19:
	xorl	%eax, %eax
	callq	_mfc_debug_leave
LBB0_20:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	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_11
## %bb.12:
	movq	%r8, %rbx
	andq	$-2, %rbx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_13:                                ## =>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_13
	jmp	LBB0_14
LBB0_11:
	xorl	%edi, %edi
LBB0_14:
	testb	$1, %r8b
	je	LBB0_16
## %bb.15:
	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_16:
	cmpq	%rax, %rsi
	je	LBB0_19
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	addl	%ecx, (%rdx,%rsi,4)
	incq	%rsi
	cmpq	%rsi, %rax
	jne	LBB0_17
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_MEMORY_MMAP,8,3           ## @V4L2_MEMORY_MMAP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Only mmapped buffers can be used\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"State: %d, buf->type: %d\n"

	.comm	_MFCINST_GOT_INST,8,3           ## @MFCINST_GOT_INST
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,4,2 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.comm	_MFCINST_RUNNING,8,3            ## @MFCINST_RUNNING
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,4,2 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.comm	_DST_QUEUE_OFF_BASE,8,3         ## @DST_QUEUE_OFF_BASE
L_.str.2:                               ## @.str.2
	.asciz	"vidioc_querybuf called in an inappropriate state\n"

	.no_dead_strip	_vidioc_querybuf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidioc_querybuf
_vidioc_querybuf:                       ; @vidioc_querybuf
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x2
	mov	x0, x1
	bl	_fh_to_ctx
	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_4
; %bb.1:
	mov	x19, x0
	ldr	x2, [x0]
	ldr	w3, [x20, #24]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #2
	bl	_mfc_debug
	ldr	x8, [x19]
Lloh5:
	adrp	x9, _MFCINST_GOT_INST@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MFCINST_GOT_INST@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.2:
	ldr	w9, [x20, #24]
Lloh8:
	adrp	x10, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGE
Lloh9:
	ldr	x10, [x10, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_5
; %bb.3:
	add	x0, x19, #12
	mov	x1, x20
	bl	_vb2_querybuf
	mov	x19, x0
	b	LBB0_11
LBB0_4:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_mfc_err
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_12
LBB0_5:
Lloh16:
	adrp	x9, _MFCINST_RUNNING@GOTPAGE
Lloh17:
	ldr	x9, [x9, _MFCINST_RUNNING@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.6:
	ldr	w8, [x20, #24]
Lloh19:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGE
Lloh20:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_10
; %bb.7:
	add	x0, x19, #8
	mov	x1, x20
	bl	_vb2_querybuf
	mov	x19, x0
	ldr	w9, [x20, #8]
	cmp	w9, #1
	b.lt	LBB0_11
; %bb.8:
Lloh22:
	adrp	x8, _DST_QUEUE_OFF_BASE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _DST_QUEUE_OFF_BASE@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	ldr	x10, [x20, #16]
	cmp	w9, #16
	b.hs	LBB0_13
; %bb.9:
	mov	x11, #0
	b	LBB0_16
LBB0_10:
Lloh25:
	adrp	x0, l_.str.2@PAGE
Lloh26:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_mfc_err
Lloh27:
	adrp	x8, _EINVAL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_11:
	bl	_mfc_debug_leave
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_13:
	and	x11, x9, #0xfffffff0
	dup.4s	v0, w8
	add	x12, x10, #32
	mov	x13, x11
LBB0_14:                                ; =>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_14
; %bb.15:
	cmp	x11, x9
	b.eq	LBB0_11
LBB0_16:
	add	x10, x10, x11, lsl #2
	sub	x9, x9, x11
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10]
	add	w11, w11, w8
	str	w11, [x10], #4
	subs	x9, x9, #1
	b.ne	LBB0_17
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_MEMORY_MMAP,8,3           ; @V4L2_MEMORY_MMAP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Only mmapped buffers can be used\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"State: %d, buf->type: %d\n"

	.comm	_MFCINST_GOT_INST,8,3           ; @MFCINST_GOT_INST
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,4,2 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.comm	_MFCINST_RUNNING,8,3            ; @MFCINST_RUNNING
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,4,2 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.comm	_DST_QUEUE_OFF_BASE,8,3         ; @DST_QUEUE_OFF_BASE
l_.str.2:                               ; @.str.2
	.asciz	"vidioc_querybuf called in an inappropriate state\n"

	.no_dead_strip	_vidioc_querybuf
.subsections_via_symbols
