	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_v4l2_buffer_buf_to_avframe  ## -- Begin function ff_v4l2_buffer_buf_to_avframe
	.p2align	4, 0x90
_ff_v4l2_buffer_buf_to_avframe:         ## @ff_v4l2_buffer_buf_to_avframe
	.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, %r15
	movq	%rdi, %rbx
	callq	_av_frame_unref
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_v4l2_buffer_buf_to_swframe
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	movq	_V4L2_BUF_FLAG_KEYFRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	andl	8(%r15), %eax
	setne	%cl
	movl	%ecx, (%rbx)
	movq	%r15, %rdi
	callq	_v4l2_get_color_primaries
	movl	%eax, 40(%rbx)
	movq	%r15, %rdi
	callq	_v4l2_get_color_space
	movl	%eax, 36(%rbx)
	movq	%r15, %rdi
	callq	_v4l2_get_color_range
	movl	%eax, 32(%rbx)
	movq	%r15, %rdi
	callq	_v4l2_get_color_trc
	movl	%eax, 28(%rbx)
	movq	%r15, %rdi
	callq	_v4l2_get_pts
	movl	%eax, 24(%rbx)
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	(%r15), %rax
	movl	12(%rax), %ecx
	movl	%ecx, 16(%rbx)
	movl	8(%rax), %ecx
	movl	%ecx, 12(%rbx)
	movl	4(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	_V4L2_BUF_FLAG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r15)
	je	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	callq	_logger
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	(%r15), %rcx
	movl	(%rcx), %ecx
	leaq	L_.str(%rip), %rdx
	movl	%eax, %edi
	callq	_av_log
	movq	_FF_DECODE_ERROR_INVALID_BITSTREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
LBB0_3:
	movl	%r14d, %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_NOPTS_VALUE,4,2             ## @AV_NOPTS_VALUE
	.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 decode error\n"

	.comm	_FF_DECODE_ERROR_INVALID_BITSTREAM,4,2 ## @FF_DECODE_ERROR_INVALID_BITSTREAM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_v4l2_buffer_buf_to_avframe  ; -- Begin function ff_v4l2_buffer_buf_to_avframe
	.p2align	2
_ff_v4l2_buffer_buf_to_avframe:         ; @ff_v4l2_buffer_buf_to_avframe
	.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	x21, x1
	mov	x19, x0
	bl	_av_frame_unref
	mov	x0, x19
	mov	x1, x21
	bl	_v4l2_buffer_buf_to_swframe
	mov	x20, x0
	cbnz	w0, LBB0_3
; %bb.1:
	ldr	w8, [x21, #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
	cset	w8, ne
	str	w8, [x19]
	mov	x0, x21
	bl	_v4l2_get_color_primaries
	str	w0, [x19, #40]
	mov	x0, x21
	bl	_v4l2_get_color_space
	str	w0, [x19, #36]
	mov	x0, x21
	bl	_v4l2_get_color_range
	str	w0, [x19, #32]
	mov	x0, x21
	bl	_v4l2_get_color_trc
	str	w0, [x19, #28]
	mov	x0, x21
	bl	_v4l2_get_pts
	str	w0, [x19, #24]
Lloh3:
	adrp	x8, _AV_NOPTS_VALUE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	x9, [x21]
	ldr	w10, [x9, #12]
	stp	w10, w8, [x19, #16]
	ldur	d0, [x9, #4]
	str	d0, [x19, #8]
	ldr	w8, [x21, #8]
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_3
; %bb.2:
	mov	x0, x21
	bl	_logger
Lloh9:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	x8, [x21]
	ldr	w3, [x8]
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
Lloh14:
	adrp	x8, _FF_DECODE_ERROR_INVALID_BITSTREAM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FF_DECODE_ERROR_INVALID_BITSTREAM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_3:
	mov	x0, x20
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.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_NOPTS_VALUE,4,2             ; @AV_NOPTS_VALUE
	.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 decode error\n"

	.comm	_FF_DECODE_ERROR_INVALID_BITSTREAM,4,2 ; @FF_DECODE_ERROR_INVALID_BITSTREAM
.subsections_via_symbols
