	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function v4l2_buffer_swframe_to_buf
_v4l2_buffer_swframe_to_buf:            ## @v4l2_buffer_swframe_to_buf
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rsi), %rax
	movl	(%rax), %r15d
	movl	4(%rax), %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	8(%rax), %ebx
	movl	12(%rax), %r12d
	movl	16(%rax), %r13d
	movl	%r13d, %edi
	callq	_V4L2_TYPE_IS_MULTIPLANAR
	testq	%rax, %rax
	cmovel	%r15d, %ebx
	movl	%r12d, %r15d
	movl	%r13d, %edi
	callq	_V4L2_TYPE_IS_MULTIPLANAR
	testq	%rax, %rax
	cmovel	-48(%rbp), %r15d                ## 4-byte Folded Reload
	addl	$-140, %ebx
	cmpl	$-12, %ebx
	jae	LBB0_11
## %bb.1:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	24(%rax), %edi
	callq	_av_pix_fmt_desc_get
	cmpl	$0, (%rax)
	jle	LBB0_18
## %bb.2:
	movq	%rax, %r13
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rcx
	movq	(%rcx,%rbx,8), %rsi
	incq	%rsi
	movl	%eax, %edi
	callq	_FFMAX
	incq	%rbx
	movslq	(%r13), %rcx
	cmpq	%rcx, %rbx
	jl	LBB0_3
## %bb.4:
	testl	%eax, %eax
	jle	LBB0_18
## %bb.5:
	movl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	leal	-1(%r14), %eax
	movl	%r15d, %r12d
	cmpl	$1, %eax
	ja	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	4(%r13), %esi
	movl	%r12d, %edi
	callq	_AV_CEIL_RSHIFT
	movl	%eax, %r15d
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rax
	imull	(%rax,%r14,4), %r15d
	movq	8(%rcx), %rax
	movq	16(%rcx), %rcx
	movl	(%rcx,%r14,4), %edx
	movq	(%rax,%r14,8), %r9
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	movl	%r15d, %ecx
	movl	%ebx, %r8d
	callq	_v4l2_bufref_to_buf
	testl	%eax, %eax
	jne	LBB0_19
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	addl	%r15d, %ebx
	incq	%r14
	cmpq	%r14, -64(%rbp)                 ## 8-byte Folded Reload
	movl	%r12d, %r15d
	jne	LBB0_6
	jmp	LBB0_18
LBB0_11:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	cmpl	$0, (%r14)
	jle	LBB0_18
## %bb.12:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movq	(%rax,%rbx,8), %r9
	movl	(%r9), %ecx
	movl	4(%r9), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	xorl	%r8d, %r8d
	callq	_v4l2_bufref_to_buf
	testl	%eax, %eax
	jne	LBB0_19
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_13
LBB0_18:
	xorl	%eax, %eax
LBB0_19:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_v4l2_buffer_swframe_to_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function v4l2_buffer_swframe_to_buf
_v4l2_buffer_swframe_to_buf:            ; @v4l2_buffer_swframe_to_buf
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x1, #8]
	ldp	w22, w23, [x8]
	ldp	w24, w25, [x8, #8]
	ldr	w21, [x8, #16]
	mov	x0, x21
	bl	_V4L2_TYPE_IS_MULTIPLANAR
	cmp	x0, #0
	csel	w22, w22, w24, eq
	mov	x0, x21
	bl	_V4L2_TYPE_IS_MULTIPLANAR
	cmp	x0, #0
	csel	w21, w23, w25, eq
	sub	w8, w22, #140
	cmn	w8, #12
	b.hs	LBB0_10
; %bb.1:
	ldr	w0, [x20, #24]
	bl	_av_pix_fmt_desc_get
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.2:
	mov	x22, x0
	mov	x23, #0
	mov	w0, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	ldr	x8, [x8, x23, lsl #3]
	add	x1, x8, #1
	bl	_FFMAX
	add	x23, x23, #1
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.lt	LBB0_3
; %bb.4:
	cmp	w0, #1
	b.lt	LBB0_14
; %bb.5:
	mov	x25, #0
	mov	w23, #0
	mov	w26, w0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	sub	w8, w25, #1
	mov	x0, x21
	cmp	w8, #1
	b.hi	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x22, #4]
	mov	x0, x21
	bl	_AV_CEIL_RSHIFT
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	lsl	x8, x25, #2
	ldp	x9, x10, [x20]
	ldr	w9, [x9, x8]
	mul	w24, w9, w0
	ldr	x9, [x20, #16]
	ldr	w2, [x9, x8]
	ldr	x5, [x10, x25, lsl #3]
	mov	x0, x19
	mov	w1, #0
	mov	x3, x24
	mov	x4, x23
	bl	_v4l2_bufref_to_buf
	cbnz	w0, LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w23, w24, w23
	add	x25, x25, #1
	cmp	x26, x25
	b.ne	LBB0_6
	b	LBB0_14
LBB0_10:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.11:
	mov	x21, #0
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	x5, [x8, x21, lsl #3]
	ldp	w3, w2, [x5]
	mov	x0, x19
	mov	x1, x21
	mov	w4, #0
	bl	_v4l2_bufref_to_buf
	cbnz	w0, LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x19]
	cmp	x21, x8
	b.lt	LBB0_12
LBB0_14:
	mov	w0, #0
LBB0_15:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_v4l2_buffer_swframe_to_buf
.subsections_via_symbols
