	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vpbe_try_format
_vpbe_try_format:                       ## @vpbe_try_format
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	.cfi_offset %rbx, -24
	movq	(%rdi), %rax
	movq	(%rsi), %r9
	movq	_V4L2_PIX_FMT_UYVY@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_V4L2_PIX_FMT_NV12@GOTPCREL(%rip), %rdx
	cmpq	%rcx, %r9
	je	LBB0_3
## %bb.1:
	cmpq	(%rdx), %r9
	je	LBB0_3
## %bb.2:
	movq	%rcx, (%rsi)
	movq	%rcx, %r9
LBB0_3:
	movq	8(%rsi), %rbx
	movq	_V4L2_FIELD_INTERLACED@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	cmpq	%rdi, %rbx
	je	LBB0_6
## %bb.4:
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rbx
	je	LBB0_6
## %bb.5:
	cmpq	$0, 8(%rax)
	cmovneq	%rdi, %rcx
	movq	%rcx, 8(%rsi)
	movq	%rcx, %rbx
LBB0_6:
	xorl	%ecx, %ecx
	cmpq	%rdi, %rbx
	sete	%r11b
	movq	(%rdx), %r8
	xorl	%edi, %edi
	cmpq	%r8, %r9
	sete	%dil
	movl	$2, %edx
	subl	%edi, %edx
	movl	(%rax), %ebx
	movl	4(%rax), %r10d
	movl	16(%rsi), %edi
	testl	%edi, %edi
	je	LBB0_9
## %bb.7:
	movb	$32, %al
	movzbl	%al, %eax
	divb	%dl
	movzbl	%al, %eax
	cmpl	%eax, %edi
	jl	LBB0_9
## %bb.8:
	cmpl	%ebx, %edi
	jle	LBB0_10
LBB0_9:
	movl	%ebx, 16(%rsi)
	movl	%ebx, %edi
LBB0_10:
	movl	20(%rsi), %eax
	testl	%eax, %eax
	je	LBB0_13
## %bb.11:
	movb	%r11b, %cl
	incl	%ecx
	cmpl	%ecx, %eax
	jl	LBB0_13
## %bb.12:
	cmpl	%r10d, %eax
	jle	LBB0_14
LBB0_13:
	movl	%r10d, 20(%rsi)
	movl	%r10d, %eax
LBB0_14:
	imull	%edx, %edi
	addl	$31, %edi
	andl	$-32, %edi
	imull	%edi, %eax
	movl	%eax, %ecx
	sarl	%ecx
	xorl	%edx, %edx
	cmpq	%r8, %r9
	cmovnel	%edx, %ecx
	movl	%edi, 24(%rsi)
	addl	%eax, %ecx
	movl	%ecx, 28(%rsi)
	xorl	%eax, %eax
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_PIX_FMT_UYVY,8,3          ## @V4L2_PIX_FMT_UYVY
	.comm	_V4L2_PIX_FMT_NV12,8,3          ## @V4L2_PIX_FMT_NV12
	.comm	_V4L2_FIELD_INTERLACED,8,3      ## @V4L2_FIELD_INTERLACED
	.comm	_V4L2_FIELD_NONE,8,3            ## @V4L2_FIELD_NONE
	.no_dead_strip	_vpbe_try_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vpbe_try_format
_vpbe_try_format:                       ; @vpbe_try_format
	.cfi_startproc
; %bb.0:
	ldr	x9, [x0]
	ldr	x8, [x1]
Lloh0:
	adrp	x10, _V4L2_PIX_FMT_UYVY@GOTPAGE
Lloh1:
	ldr	x10, [x10, _V4L2_PIX_FMT_UYVY@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x10]
Lloh3:
	adrp	x10, _V4L2_PIX_FMT_NV12@GOTPAGE
Lloh4:
	ldr	x10, [x10, _V4L2_PIX_FMT_NV12@GOTPAGEOFF]
	ldr	x12, [x10]
	cmp	x8, x11
	ccmp	x8, x12, #4, ne
	b.eq	LBB0_2
; %bb.1:
	str	x11, [x1]
	mov	x8, x11
LBB0_2:
	ldr	x12, [x1, #8]
Lloh5:
	adrp	x11, _V4L2_FIELD_INTERLACED@GOTPAGE
Lloh6:
	ldr	x11, [x11, _V4L2_FIELD_INTERLACED@GOTPAGEOFF]
Lloh7:
	ldr	x11, [x11]
	cmp	x12, x11
	b.eq	LBB0_5
; %bb.3:
Lloh8:
	adrp	x13, _V4L2_FIELD_NONE@GOTPAGE
Lloh9:
	ldr	x13, [x13, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh10:
	ldr	x13, [x13]
	cmp	x12, x13
	b.eq	LBB0_5
; %bb.4:
	ldr	x12, [x9, #8]
	cmp	x12, #0
	csel	x12, x13, x11, eq
	str	x12, [x1, #8]
LBB0_5:
	cmp	x12, x11
	mov	w11, #1
	cinc	w13, w11, eq
	ldr	x10, [x10]
	cmp	x8, x10
	cinc	w11, w11, ne
	ldp	w14, w9, [x9]
	ldr	w12, [x1, #16]
	cbz	w12, LBB0_7
; %bb.6:
	and	w15, w11, #0xff
	mov	w16, #32
	udiv	w15, w16, w15
	cmp	w12, w15
	ccmp	w12, w14, #0, ge
	b.le	LBB0_8
LBB0_7:
	str	w14, [x1, #16]
	mov	x12, x14
LBB0_8:
	ldr	w14, [x1, #20]
	cbz	w14, LBB0_10
; %bb.9:
	cmp	w14, w13
	ccmp	w14, w9, #0, ge
	b.le	LBB0_11
LBB0_10:
	str	w9, [x1, #20]
	mov	x14, x9
LBB0_11:
	orr	w9, wzr, #0x1f
	madd	w9, w12, w11, w9
	and	w9, w9, #0xffffffe0
	mul	w11, w14, w9
	asr	w12, w11, #1
	cmp	x8, x10
	csel	w8, w12, wzr, eq
	add	w8, w11, w8
	stp	w9, w8, [x1, #24]
	mov	w0, #0
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_PIX_FMT_UYVY,8,3          ; @V4L2_PIX_FMT_UYVY
	.comm	_V4L2_PIX_FMT_NV12,8,3          ; @V4L2_PIX_FMT_NV12
	.comm	_V4L2_FIELD_INTERLACED,8,3      ; @V4L2_FIELD_INTERLACED
	.comm	_V4L2_FIELD_NONE,8,3            ; @V4L2_FIELD_NONE
	.no_dead_strip	_vpbe_try_format
.subsections_via_symbols
