	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tvp514x_try_fmt_cap
_tvp514x_try_fmt_cap:                   ## @tvp514x_try_fmt_cap
	.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, %r14
	callq	_to_decoder
	testq	%r15, %r15
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, (%r15)
	je	LBB0_4
## %bb.3:
	movq	%rax, (%r15)
LBB0_4:
	movq	%r14, %rdi
	callq	_tvp514x_get_current_std
	movq	_STD_INVALID@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_5:
	movl	%eax, (%rbx)
	movq	16(%rbx), %rcx
	movl	%eax, %eax
	movl	(%rcx,%rax,8), %r10d
	movl	%r10d, 8(%r15)
	movl	4(%rcx,%rax,8), %r11d
	movl	%r11d, 12(%r15)
	movl	4(%rbx), %esi
	testl	%esi, %esi
	jle	LBB0_6
## %bb.7:
	movq	16(%r15), %rdi
	movq	8(%rbx), %rax
	xorl	%edx, %edx
	movq	%rax, %rcx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	(%rcx), %rdi
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%rdx
	addq	$16, %rcx
	cmpq	%rdx, %rsi
	jne	LBB0_8
## %bb.10:
	movl	%esi, %edx
	jmp	LBB0_11
LBB0_6:
	movq	8(%rbx), %rax
	xorl	%edx, %edx
LBB0_11:
	xorl	%ebx, %ebx
	cmpl	%esi, %edx
	cmovel	%ebx, %edx
	shlq	$4, %rdx
	movq	(%rax,%rdx), %rcx
	movq	%rcx, 16(%r15)
	movq	_V4L2_FIELD_INTERLACED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 44(%r15)
	leal	(%r10,%r10), %r9d
	movl	%r9d, 24(%r15)
	movl	%r11d, %ecx
	imull	%r9d, %ecx
	movl	%ecx, 28(%r15)
	movq	_V4L2_COLORSPACE_SMPTE170M@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 40(%r15)
	movq	$0, 32(%r15)
	movq	_debug@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	8(%rax,%rdx), %r8d
	leaq	L_.str(%rip), %rcx
	movl	$1, %edi
	movq	%r14, %rdx
	pushq	%r11
	pushq	%r10
	callq	_v4l2_dbg
	addq	$16, %rsp
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_STD_INVALID,4,2                ## @STD_INVALID
	.comm	_V4L2_FIELD_INTERLACED,4,2      ## @V4L2_FIELD_INTERLACED
	.comm	_V4L2_COLORSPACE_SMPTE170M,4,2  ## @V4L2_COLORSPACE_SMPTE170M
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Try FMT: pixelformat - %s, bytesperline - %dWidth - %d, Height - %d"

	.no_dead_strip	_tvp514x_try_fmt_cap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tvp514x_try_fmt_cap
_tvp514x_try_fmt_cap:                   ; @tvp514x_try_fmt_cap
	.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	_to_decoder
	cbz	x20, LBB0_4
; %bb.1:
	mov	x21, x0
	ldr	x9, [x20]
Lloh0:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x9, x8
	b.eq	LBB0_3
; %bb.2:
	str	x8, [x20]
LBB0_3:
	mov	x0, x19
	bl	_tvp514x_get_current_std
Lloh3:
	adrp	x8, _STD_INVALID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _STD_INVALID@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_5
LBB0_4:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_5:
	str	w0, [x21]
	ldr	x8, [x21, #16]
	add	x8, x8, w0, uxtw #3
	ldp	w6, w7, [x8]
	stp	w6, w7, [x20, #8]
	ldr	w8, [x21, #4]
	cmp	w8, #0
	b.le	LBB0_10
; %bb.6:
	mov	x10, #0
	ldr	x11, [x20, #16]
	ldr	x9, [x21, #8]
	mov	x12, x9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x12]
	cmp	x11, x13
	b.eq	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x10, x10, #1
	add	x12, x12, #16
	cmp	x8, x10
	b.ne	LBB0_7
; %bb.9:
	mov	x10, x8
	b	LBB0_11
LBB0_10:
	mov	w10, #0
	ldr	x9, [x21, #8]
LBB0_11:
	cmp	w10, w8
	csel	w8, wzr, w10, eq
	add	x8, x9, w8, uxtw #4
	ldr	x9, [x8]
	str	x9, [x20, #16]
Lloh9:
	adrp	x9, _V4L2_FIELD_INTERLACED@GOTPAGE
Lloh10:
	ldr	x9, [x9, _V4L2_FIELD_INTERLACED@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	lsl	w5, w6, #1
	mul	w10, w7, w5
	stp	w5, w10, [x20, #24]
Lloh12:
	adrp	x10, _V4L2_COLORSPACE_SMPTE170M@GOTPAGE
Lloh13:
	ldr	x10, [x10, _V4L2_COLORSPACE_SMPTE170M@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	stp	w10, w9, [x20, #40]
	str	xzr, [x20, #32]
Lloh15:
	adrp	x9, _debug@GOTPAGE
Lloh16:
	ldr	x9, [x9, _debug@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x9]
	ldr	w4, [x8, #8]
Lloh18:
	adrp	x3, l_.str@PAGE
Lloh19:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_v4l2_dbg
	mov	w0, #0
LBB0_12:
	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 AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_STD_INVALID,4,2                ; @STD_INVALID
	.comm	_V4L2_FIELD_INTERLACED,4,2      ; @V4L2_FIELD_INTERLACED
	.comm	_V4L2_COLORSPACE_SMPTE170M,4,2  ; @V4L2_COLORSPACE_SMPTE170M
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Try FMT: pixelformat - %s, bytesperline - %dWidth - %d, Height - %d"

	.no_dead_strip	_tvp514x_try_fmt_cap
.subsections_via_symbols
