	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_v4l2_buffer_initialize      ## -- Begin function ff_v4l2_buffer_initialize
	.p2align	4, 0x90
_ff_v4l2_buffer_initialize:             ## @ff_v4l2_buffer_initialize
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	72(%rdi), %r13
	movq	_V4L2_MEMORY_MMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	16(%rdi), %r14
	movl	%eax, 52(%rdi)
	movl	(%r13), %edi
	movl	%edi, 48(%rbx)
	movl	%esi, 16(%rbx)
	callq	_V4L2_TYPE_IS_MULTIPLANAR
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_VIDEO_MAX_PLANES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	8(%rbx), %rax
	movq	%rax, 32(%rbx)
LBB0_2:
	movq	%rbx, %r15
	movq	%rbx, %rdi
	callq	_buf_to_m2mctx
	movl	(%rax), %edi
	movq	_VIDIOC_QUERYBUF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdx
	callq	_ioctl
	testl	%eax, %eax
	js	LBB0_3
## %bb.5:
	movl	(%r13), %edi
	callq	_V4L2_TYPE_IS_MULTIPLANAR
	movq	%r15, %r14
	testq	%rax, %rax
	je	LBB0_34
## %bb.6:
	movl	$0, (%r15)
	movl	20(%r15), %ecx
	testl	%ecx, %ecx
	jle	LBB0_28
## %bb.7:
	movq	32(%r14), %r8
	cmpl	$1, %ecx
	jne	LBB0_9
## %bb.8:
	xorl	%eax, %eax
	xorl	%esi, %esi
LBB0_15:
	testb	$1, %cl
	je	LBB0_18
## %bb.16:
	leaq	(%rsi,%rsi,2), %rcx
	cmpl	$0, (%r8,%rcx,4)
	je	LBB0_18
## %bb.17:
	incl	%eax
	movl	%eax, (%r14)
LBB0_18:
	testl	%eax, %eax
	jg	LBB0_19
	jmp	LBB0_28
LBB0_3:
	movq	_errno@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_34:
	movl	$1, (%r15)
LBB0_19:
	leaq	8(%r13), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	callq	_V4L2_TYPE_IS_MULTIPLANAR
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	movq	16(%r13), %rcx
	addq	%rbx, %rcx
LBB0_23:                                ##   in Loop: Header=BB0_21 Depth=1
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movl	(%rcx), %eax
	movq	64(%r14), %rcx
	movl	%eax, 16(%rcx,%r15,2)
	movl	(%r13), %edi
	callq	_V4L2_TYPE_IS_MULTIPLANAR
	testq	%rax, %rax
	je	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_21 Depth=1
	movq	32(%r14), %rax
	movq	64(%r14), %rcx
	movq	%r14, %rbx
	movl	(%rax,%r15), %r14d
	movl	%r14d, (%rcx,%r15,2)
	movq	_PROT_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	movq	_MAP_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_buf_to_m2mctx
	movl	(%rax), %r8d
	movq	32(%rbx), %rax
	movl	8(%rax,%r15), %r9d
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_21 Depth=1
	movq	%r14, %rbx
	movl	20(%r14), %r14d
	movq	64(%rbx), %rax
	movl	%r14d, (%rax,%r15,2)
	movq	_PROT_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	movq	_MAP_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_buf_to_m2mctx
	movl	(%rax), %r8d
	movl	40(%rbx), %r9d
LBB0_26:                                ##   in Loop: Header=BB0_21 Depth=1
	xorl	%edi, %edi
	movl	%r14d, %esi
	movl	%r13d, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_mmap
	movq	64(%rbx), %rcx
	movq	%rax, 8(%rcx,%r15,2)
	movq	_MAP_FAILED@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	movq	%rbx, %r14
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_27
## %bb.20:                              ##   in Loop: Header=BB0_21 Depth=1
	incq	%r12
	movslq	(%r14), %rax
	addq	$12, %r15
	addq	$4, %rbx
	cmpq	%rax, %r12
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jl	LBB0_21
LBB0_28:
	movq	_V4L2BUF_AVAILABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%r14)
	movl	(%r13), %edi
	callq	_V4L2_TYPE_IS_OUTPUT
	testq	%rax, %rax
	je	LBB0_29
## %bb.33:
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_29:
	movl	(%r13), %edi
	callq	_V4L2_TYPE_IS_MULTIPLANAR
	movq	8(%r14), %rcx
	testq	%rax, %rax
	je	LBB0_31
## %bb.30:
	movq	%rcx, 32(%r14)
	movq	%r14, %rcx
	jmp	LBB0_32
LBB0_9:
	movl	%ecx, %edi
	andl	$-2, %edi
	xorl	%eax, %eax
	movq	%r8, %rdx
	xorl	%esi, %esi
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	addq	$2, %rsi
	addq	$24, %rdx
	cmpq	%rsi, %rdi
	je	LBB0_15
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rdx)
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	incl	%eax
	movl	%eax, (%r14)
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	cmpl	$0, 12(%rdx)
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	incl	%eax
	movl	%eax, (%r14)
	jmp	LBB0_14
LBB0_31:
	movl	4(%rcx), %eax
	movl	%eax, 24(%r14)
LBB0_32:
	movl	(%rcx), %eax
	movl	%eax, 20(%r14)
	movq	%r14, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ff_v4l2_buffer_enqueue         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_MEMORY_MMAP,4,2           ## @V4L2_MEMORY_MMAP
	.comm	_VIDEO_MAX_PLANES,4,2           ## @VIDEO_MAX_PLANES
	.comm	_VIDIOC_QUERYBUF,4,2            ## @VIDIOC_QUERYBUF
	.comm	_errno,4,2                      ## @errno
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_PROT_WRITE,4,2                 ## @PROT_WRITE
	.comm	_MAP_SHARED,4,2                 ## @MAP_SHARED
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_V4L2BUF_AVAILABLE,4,2          ## @V4L2BUF_AVAILABLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_v4l2_buffer_initialize      ; -- Begin function ff_v4l2_buffer_initialize
	.p2align	2
_ff_v4l2_buffer_initialize:             ; @ff_v4l2_buffer_initialize
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	mov	x20, x0
	str	w1, [x20, #16]!
	ldr	x23, [x20, #56]
Lloh0:
	adrp	x8, _V4L2_MEMORY_MMAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_MEMORY_MMAP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w0, [x23]
	stp	w0, w8, [x20, #32]
	bl	_V4L2_TYPE_IS_MULTIPLANAR
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _VIDEO_MAX_PLANES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VIDEO_MAX_PLANES@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #20]
	ldr	x8, [x19, #8]
	str	x8, [x19, #32]
LBB0_2:
	mov	x0, x19
	bl	_buf_to_m2mctx
	ldr	w0, [x0]
Lloh6:
	adrp	x8, _VIDIOC_QUERYBUF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VIDIOC_QUERYBUF@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_ioctl
	tbnz	w0, #31, LBB0_9
; %bb.3:
	ldr	w0, [x23]
	bl	_V4L2_TYPE_IS_MULTIPLANAR
	cbz	x0, LBB0_11
; %bb.4:
	str	wzr, [x19]
	ldr	w8, [x19, #20]
	cmp	w8, #1
	b.lt	LBB0_20
; %bb.5:
	mov	w9, #0
	ldr	x10, [x19, #32]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x10, x10, #12
	subs	x8, x8, #1
	b.eq	LBB0_10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10]
	cbz	w11, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	w9, w9, #1
	str	w9, [x19]
	b	LBB0_6
LBB0_9:
Lloh9:
	adrp	x8, _errno@GOTPAGE
Lloh10:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
	b	LBB0_23
LBB0_10:
	cmp	w9, #1
	b.ge	LBB0_12
	b	LBB0_20
LBB0_11:
	mov	w8, #1
	str	w8, [x19]
LBB0_12:
	mov	x24, #0
	mov	x25, #0
	mov	x26, #0
	mov	x27, #0
	add	x28, x23, #8
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23]
	bl	_V4L2_TYPE_IS_MULTIPLANAR
	mov	x8, x28
	cbz	x0, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x8, [x23, #16]
	add	x8, x8, x24
LBB0_15:                                ;   in Loop: Header=BB0_13 Depth=1
	ldr	w8, [x8]
	ldr	x9, [x19, #64]
	add	x9, x9, x26
	str	w8, [x9, #16]
	ldr	w0, [x23]
	bl	_V4L2_TYPE_IS_MULTIPLANAR
	cbz	x0, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x8, [x19, #32]
	ldr	w20, [x8, x25]
	ldr	x8, [x19, #64]
	str	w20, [x8, x26]
Lloh11:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _PROT_WRITE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _PROT_WRITE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w21, w9, w8
Lloh17:
	adrp	x8, _MAP_SHARED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MAP_SHARED@GOTPAGEOFF]
Lloh19:
	ldr	w22, [x8]
	mov	x0, x19
	bl	_buf_to_m2mctx
	ldr	w4, [x0]
	ldr	x8, [x19, #32]
	add	x8, x8, x25
	ldr	w5, [x8, #8]
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_13 Depth=1
	ldr	w20, [x19, #20]
	ldr	x8, [x19, #64]
	str	w20, [x8, x26]
Lloh20:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh21:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _PROT_WRITE@GOTPAGE
Lloh24:
	ldr	x9, [x9, _PROT_WRITE@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w21, w9, w8
Lloh26:
	adrp	x8, _MAP_SHARED@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MAP_SHARED@GOTPAGEOFF]
Lloh28:
	ldr	w22, [x8]
	mov	x0, x19
	bl	_buf_to_m2mctx
	ldr	w4, [x0]
	ldr	w5, [x19, #40]
LBB0_18:                                ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, #0
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	bl	_mmap
	ldr	x8, [x19, #64]
	add	x8, x8, x26
	str	x0, [x8, #8]
Lloh29:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh30:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	cmp	x8, x0
	b.eq	LBB0_22
; %bb.19:                               ;   in Loop: Header=BB0_13 Depth=1
	add	x27, x27, #1
	ldrsw	x8, [x19]
	add	x26, x26, #24
	add	x25, x25, #12
	add	x24, x24, #4
	cmp	x27, x8
	b.lt	LBB0_13
LBB0_20:
Lloh32:
	adrp	x8, _V4L2BUF_AVAILABLE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _V4L2BUF_AVAILABLE@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	str	w8, [x19, #56]
	ldr	w0, [x23]
	bl	_V4L2_TYPE_IS_OUTPUT
	cbz	x0, LBB0_24
; %bb.21:
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_22:
Lloh35:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_23:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_24:
	ldr	w0, [x23]
	bl	_V4L2_TYPE_IS_MULTIPLANAR
	ldr	x8, [x19, #8]
	cbz	x0, LBB0_26
; %bb.25:
	str	x8, [x19, #32]
	mov	x8, x19
	b	LBB0_27
LBB0_26:
	ldr	w9, [x8, #4]
	str	w9, [x19, #24]
LBB0_27:
	ldr	w8, [x8]
	str	w8, [x19, #20]
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_ff_v4l2_buffer_enqueue
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_MEMORY_MMAP,4,2           ; @V4L2_MEMORY_MMAP
	.comm	_VIDEO_MAX_PLANES,4,2           ; @VIDEO_MAX_PLANES
	.comm	_VIDIOC_QUERYBUF,4,2            ; @VIDIOC_QUERYBUF
	.comm	_errno,4,2                      ; @errno
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_PROT_WRITE,4,2                 ; @PROT_WRITE
	.comm	_MAP_SHARED,4,2                 ; @MAP_SHARED
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_V4L2BUF_AVAILABLE,4,2          ; @V4L2BUF_AVAILABLE
.subsections_via_symbols
