	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cx25821_vidioc_try_fmt_vid_cap
_cx25821_vidioc_try_fmt_vid_cap:        ## @cx25821_vidioc_try_fmt_vid_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	%rdx, %rbx
	callq	_video_drvdata
	movq	(%rax), %r15
	movl	(%rbx), %r14d
	movl	24(%rbx), %edi
	callq	_cx25821_format_by_fourcc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_V4L2_STD_625_50@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r15)
	movl	$480, %edx                      ## imm = 0x1E0
	movl	$576, %ecx                      ## imm = 0x240
	cmovel	%edx, %ecx
	movl	4(%rbx), %edx
	movq	_V4L2_FIELD_BOTTOM@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %r14d
	je	LBB0_4
## %bb.3:
	movq	_V4L2_FIELD_TOP@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r14d
LBB0_4:
	cmpl	$351, %edx                      ## imm = 0x15F
	ja	LBB0_6
## %bb.5:
	shrl	$2, %ecx
	movl	%ecx, 8(%rbx)
	movl	$176, %edx
	jmp	LBB0_9
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_6:
	cmpl	$719, %edx                      ## imm = 0x2CF
	ja	LBB0_8
## %bb.7:
	shrl	%ecx
	movl	%ecx, 8(%rbx)
	movl	$352, %edx                      ## imm = 0x160
	jmp	LBB0_9
LBB0_8:
	movl	%ecx, 8(%rbx)
	movq	_V4L2_FIELD_INTERLACED@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r14d
	movl	$720, %edx                      ## imm = 0x2D0
LBB0_9:
	movl	%r14d, (%rbx)
	movl	%edx, 4(%rbx)
	imull	(%rax), %edx
	shrl	$3, %edx
	movl	%edx, 12(%rbx)
	imull	%ecx, %edx
	movl	%edx, 16(%rbx)
	movq	_V4L2_COLORSPACE_SMPTE170M@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_STD_625_50,4,2            ## @V4L2_STD_625_50
	.comm	_V4L2_FIELD_BOTTOM,4,2          ## @V4L2_FIELD_BOTTOM
	.comm	_V4L2_FIELD_TOP,4,2             ## @V4L2_FIELD_TOP
	.comm	_V4L2_FIELD_INTERLACED,4,2      ## @V4L2_FIELD_INTERLACED
	.comm	_V4L2_COLORSPACE_SMPTE170M,4,2  ## @V4L2_COLORSPACE_SMPTE170M
	.no_dead_strip	_cx25821_vidioc_try_fmt_vid_cap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cx25821_vidioc_try_fmt_vid_cap
_cx25821_vidioc_try_fmt_vid_cap:        ; @cx25821_vidioc_try_fmt_vid_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	x19, x2
	bl	_video_drvdata
	ldr	x21, [x0]
	ldr	w20, [x19]
	ldr	w0, [x19, #24]
	bl	_cx25821_format_by_fourcc
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w8, [x21]
Lloh0:
	adrp	x9, _V4L2_STD_625_50@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_STD_625_50@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	mov	w8, #576
	mov	w9, #480
	csel	w9, w9, w8, eq
	ldr	w8, [x19, #4]
Lloh3:
	adrp	x10, _V4L2_FIELD_BOTTOM@GOTPAGE
Lloh4:
	ldr	x10, [x10, _V4L2_FIELD_BOTTOM@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
Lloh6:
	adrp	x11, _V4L2_FIELD_TOP@GOTPAGE
Lloh7:
	ldr	x11, [x11, _V4L2_FIELD_TOP@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	cmp	w20, w10
	csel	w10, w20, w11, eq
	cmp	w8, #351
	b.hi	LBB0_4
; %bb.2:
	lsr	w9, w9, #2
	str	w9, [x19, #8]
	mov	w11, #176
	b	LBB0_7
LBB0_3:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w8, w8
	b	LBB0_8
LBB0_4:
	cmp	w8, #719
	b.hi	LBB0_6
; %bb.5:
	lsr	w9, w9, #1
	str	w9, [x19, #8]
	mov	w11, #352
	b	LBB0_7
LBB0_6:
	str	w9, [x19, #8]
Lloh12:
	adrp	x8, _V4L2_FIELD_INTERLACED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _V4L2_FIELD_INTERLACED@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x8]
	mov	w11, #720
LBB0_7:
	mov	w8, #0
	stp	w10, w11, [x19]
	ldr	w10, [x0]
	mul	w10, w10, w11
	lsr	w10, w10, #3
	mul	w9, w9, w10
	stp	w10, w9, [x19, #12]
Lloh15:
	adrp	x9, _V4L2_COLORSPACE_SMPTE170M@GOTPAGE
Lloh16:
	ldr	x9, [x9, _V4L2_COLORSPACE_SMPTE170M@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	str	w9, [x19, #20]
LBB0_8:
	mov	x0, x8
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_STD_625_50,4,2            ; @V4L2_STD_625_50
	.comm	_V4L2_FIELD_BOTTOM,4,2          ; @V4L2_FIELD_BOTTOM
	.comm	_V4L2_FIELD_TOP,4,2             ; @V4L2_FIELD_TOP
	.comm	_V4L2_FIELD_INTERLACED,4,2      ; @V4L2_FIELD_INTERLACED
	.comm	_V4L2_COLORSPACE_SMPTE170M,4,2  ; @V4L2_COLORSPACE_SMPTE170M
	.no_dead_strip	_cx25821_vidioc_try_fmt_vid_cap
.subsections_via_symbols
