	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function v4l2_buffer_buf_to_swframe
_v4l2_buffer_buf_to_swframe:            ## @v4l2_buffer_buf_to_swframe
	.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	%rsi, %r15
	movq	%rdi, %r14
	movq	8(%rsi), %rcx
	movl	(%rcx), %edx
	movl	%edx, (%rdi)
	movl	(%rsi), %esi
	testl	%esi, %esi
	jle	LBB0_5
## %bb.1:
	movq	24(%r14), %rdx
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	addq	%r12, %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_v4l2_buf_to_bufref
	testl	%eax, %eax
	jne	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r15), %rax
	movl	(%rax,%rbx,4), %eax
	movq	8(%r14), %rcx
	movl	%eax, (%rcx,%rbx,4)
	movq	16(%r14), %rax
	movq	24(%r14), %rdx
	movq	(%rdx,%rbx,8), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax,%rbx,4)
	incq	%rbx
	movslq	(%r15), %rsi
	addq	$8, %r12
	cmpq	%rsi, %rbx
	jl	LBB0_2
## %bb.4:
	movq	8(%r15), %rcx
	movl	(%rcx), %edx
LBB0_5:
	xorl	%eax, %eax
	leal	-129(%rdx), %edi
	cmpl	$2, %edi
	jae	LBB0_6
## %bb.9:
	cmpl	$1, %esi
	jg	LBB0_11
## %bb.10:
	movq	16(%r15), %rdx
	movl	(%rdx), %esi
	movq	8(%r14), %rdi
	movl	%esi, 4(%rdi)
	movq	16(%r14), %rsi
	movq	24(%r14), %rdi
	movl	4(%rcx), %ecx
	imull	(%rdx), %ecx
	movq	(%rdi), %rdx
	addl	(%rdx), %ecx
	movl	%ecx, 4(%rsi)
	jmp	LBB0_11
LBB0_6:
	cmpl	$128, %edx
	jne	LBB0_11
## %bb.7:
	cmpl	$1, %esi
	jg	LBB0_11
## %bb.8:
	movq	16(%r15), %rdx
	movl	(%rdx), %esi
	sarl	%esi
	movq	8(%r14), %rdi
	movl	%esi, 4(%rdi)
	movl	(%rdx), %esi
	sarl	%esi
	movl	%esi, 8(%rdi)
	movq	16(%r14), %rsi
	movq	24(%r14), %rdi
	movq	(%rdi), %rdi
	movl	4(%rcx), %ebx
	imull	(%rdx), %ebx
	addl	(%rdi), %ebx
	movl	%ebx, 4(%rsi)
	movl	4(%rcx), %ecx
	imull	(%rdx), %ecx
	sarl	$2, %ecx
	addl	%ebx, %ecx
	movl	%ecx, 8(%rsi)
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_v4l2_buffer_buf_to_swframe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function v4l2_buffer_buf_to_swframe
_v4l2_buffer_buf_to_swframe:            ; @v4l2_buffer_buf_to_swframe
	.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, x1
	mov	x19, x0
	ldr	x8, [x1, #8]
	ldr	w10, [x8]
	str	w10, [x0]
	ldr	w9, [x1]
	cmp	w9, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x22, #0
	mov	x21, #0
	ldr	x8, [x19, #24]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x2, x8, x22
	mov	x0, x20
	mov	x1, x21
	bl	_v4l2_buf_to_bufref
	cbnz	w0, LBB0_11
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x20, #16]
	lsl	x9, x21, #2
	ldr	w8, [x8, x9]
	ldp	x10, x11, [x19, #8]
	str	w8, [x10, x9]
	ldr	x8, [x19, #24]
	ldr	x10, [x8, x21, lsl #3]
	ldr	w10, [x10]
	str	w10, [x11, x9]
	add	x21, x21, #1
	ldrsw	x9, [x20]
	add	x22, x22, #8
	cmp	x21, x9
	b.lt	LBB0_2
; %bb.4:
	ldr	x8, [x20, #8]
	ldr	w10, [x8]
LBB0_5:
	sub	w11, w10, #129
	cmp	w11, #2
	b.hs	LBB0_8
; %bb.6:
	cmp	w9, #1
	b.gt	LBB0_10
; %bb.7:
	mov	w0, #0
	ldr	x9, [x20, #16]
	ldr	w10, [x9]
	ldp	x11, x12, [x19, #8]
	str	w10, [x11, #4]
	ldr	x10, [x19, #24]
	ldr	x10, [x10]
	ldr	w10, [x10]
	ldr	w9, [x9]
	ldr	w8, [x8, #4]
	madd	w8, w8, w9, w10
	str	w8, [x12, #4]
	b	LBB0_11
LBB0_8:
	cmp	w10, #128
	b.ne	LBB0_10
; %bb.9:
	cmp	w9, #1
	b.le	LBB0_12
LBB0_10:
	mov	w0, #0
LBB0_11:
	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_12:
	mov	w0, #0
	ldr	x9, [x20, #16]
	ldr	w10, [x9]
	asr	w10, w10, #1
	ldp	x11, x12, [x19, #8]
	str	w10, [x11, #4]
	ldr	w10, [x9]
	asr	w10, w10, #1
	str	w10, [x11, #8]
	ldr	x10, [x19, #24]
	ldr	x10, [x10]
	ldr	w10, [x10]
	ldr	w11, [x9]
	ldr	w13, [x8, #4]
	madd	w10, w13, w11, w10
	str	w10, [x12, #4]
	ldr	w9, [x9]
	ldr	w8, [x8, #4]
	mul	w8, w8, w9
	add	w8, w10, w8, asr #2
	str	w8, [x12, #8]
	b	LBB0_11
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_v4l2_buffer_buf_to_swframe
.subsections_via_symbols
