	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_v4l2_buffer_buf_to_avpkt    ## -- Begin function ff_v4l2_buffer_buf_to_avpkt
	.p2align	4, 0x90
_ff_v4l2_buffer_buf_to_avpkt:           ## @ff_v4l2_buffer_buf_to_avpkt
	.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	%rsi, %r14
	movq	%rdi, %rbx
	callq	_av_packet_unref
	leaq	16(%rbx), %rdx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_v4l2_buf_to_bufref
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.1:
	movl	24(%r14), %edi
	callq	_V4L2_TYPE_IS_MULTIPLANAR
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	16(%r14), %rax
	jmp	LBB0_4
LBB0_3:
	leaq	12(%r14), %rax
LBB0_4:
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movq	16(%rbx), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movl	8(%r14), %eax
	movq	_V4L2_BUF_FLAG_KEYFRAME@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.5:
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 8(%rbx)
LBB0_6:
	movq	_V4L2_BUF_FLAG_ERROR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	callq	_logger
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	(%r14), %rcx
	movl	(%rcx), %ecx
	leaq	L_.str(%rip), %rdx
	movl	%eax, %edi
	callq	_av_log
	movq	_AV_PKT_FLAG_CORRUPT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%rbx)
LBB0_8:
	movq	%r14, %rdi
	callq	_v4l2_get_pts
	movl	%eax, (%rbx)
	movl	%eax, 4(%rbx)
LBB0_9:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_BUF_FLAG_KEYFRAME,4,2     ## @V4L2_BUF_FLAG_KEYFRAME
	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.comm	_V4L2_BUF_FLAG_ERROR,4,2        ## @V4L2_BUF_FLAG_ERROR
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s driver encode error\n"

	.comm	_AV_PKT_FLAG_CORRUPT,4,2        ## @AV_PKT_FLAG_CORRUPT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_v4l2_buffer_buf_to_avpkt    ; -- Begin function ff_v4l2_buffer_buf_to_avpkt
	.p2align	2
_ff_v4l2_buffer_buf_to_avpkt:           ; @ff_v4l2_buffer_buf_to_avpkt
	.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
	bl	_av_packet_unref
	add	x2, x19, #16
	mov	x0, x20
	mov	w1, #0
	bl	_v4l2_buf_to_bufref
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.1:
	ldr	w0, [x20, #24]
	bl	_V4L2_TYPE_IS_MULTIPLANAR
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x8, [x20, #16]
	b	LBB0_4
LBB0_3:
	add	x8, x20, #12
LBB0_4:
	ldr	w8, [x8]
	ldr	x9, [x19, #16]
	ldr	w9, [x9]
	stp	w9, w8, [x19, #24]
	ldr	w8, [x20, #8]
Lloh0:
	adrp	x9, _V4L2_BUF_FLAG_KEYFRAME@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_BUF_FLAG_KEYFRAME@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
Lloh3:
	adrp	x9, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	ldr	w10, [x19, #8]
	orr	w9, w10, w9
	str	w9, [x19, #8]
LBB0_6:
Lloh6:
	adrp	x9, _V4L2_BUF_FLAG_ERROR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _V4L2_BUF_FLAG_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_logger
Lloh9:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	x8, [x20]
	ldr	w3, [x8]
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
Lloh14:
	adrp	x8, _AV_PKT_FLAG_CORRUPT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_PKT_FLAG_CORRUPT@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
LBB0_8:
	mov	x0, x20
	bl	_v4l2_get_pts
	stp	w0, w0, [x19]
LBB0_9:
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_FLAG_KEYFRAME,4,2     ; @V4L2_BUF_FLAG_KEYFRAME
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.comm	_V4L2_BUF_FLAG_ERROR,4,2        ; @V4L2_BUF_FLAG_ERROR
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s driver encode error\n"

	.comm	_AV_PKT_FLAG_CORRUPT,4,2        ; @AV_PKT_FLAG_CORRUPT
.subsections_via_symbols
