	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_try_fmt_cap
_vidioc_try_fmt_cap:                    ## @vidioc_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	%rdx, %rbx
	movl	24(%rdx), %edi
	callq	_format_by_fourcc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	xorl	%eax, %eax
	callq	_norm_maxw
	movl	%eax, %r15d
	xorl	%eax, %eax
	callq	_norm_maxh
	movq	_V4L2_FIELD_INTERLACED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 20(%rbx)
	movl	(%rbx), %esi
	cmpl	$33, %esi
	movl	$32, %edx
	cmovgel	%esi, %edx
	cmpl	%eax, %edx
	movl	%eax, %ecx
	cmovbl	%edx, %ecx
	cmpl	$32, %esi
	jl	LBB0_4
## %bb.3:
	cmpl	%eax, %edx
	jbe	LBB0_5
LBB0_4:
	movl	%ecx, (%rbx)
LBB0_5:
	movl	4(%rbx), %eax
	cmpl	$49, %eax
	movl	$48, %edx
	cmovgel	%eax, %edx
	cmpl	%r15d, %edx
	cmovael	%r15d, %edx
	andl	$2147483644, %edx               ## imm = 0x7FFFFFFC
	movl	%edx, 4(%rbx)
	imull	(%r14), %edx
	sarl	$3, %edx
	movl	%edx, 8(%rbx)
	imull	%edx, %ecx
	movl	%ecx, 12(%rbx)
	movq	_V4L2_COLORSPACE_SMPTE170M@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	movl	24(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_dprintk
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Fourcc format (0x%08x) invalid."

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_FIELD_INTERLACED,4,2      ## @V4L2_FIELD_INTERLACED
	.comm	_V4L2_COLORSPACE_SMPTE170M,4,2  ## @V4L2_COLORSPACE_SMPTE170M
	.no_dead_strip	_vidioc_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 vidioc_try_fmt_cap
_vidioc_try_fmt_cap:                    ; @vidioc_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	x19, x2
	ldr	w0, [x2, #24]
	bl	_format_by_fourcc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	bl	_norm_maxw
	mov	x21, x0
	bl	_norm_maxh
	ldr	w9, [x19]
	mov	w8, #32
	cmp	w9, #32
	csel	w10, w9, w8, gt
	cmp	w10, w0
	csel	w8, w10, w0, lo
	cmp	w9, #32
Lloh0:
	adrp	x9, _V4L2_FIELD_INTERLACED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_FIELD_INTERLACED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	str	w9, [x19, #20]
	ccmp	w10, w0, #2, ge
	b.ls	LBB0_3
; %bb.2:
	str	w8, [x19]
LBB0_3:
	mov	w0, #0
	ldr	w9, [x19, #4]
	mov	w10, #48
	cmp	w9, #48
	csel	w9, w9, w10, gt
	cmp	w9, w21
	csel	w9, w9, w21, lo
	and	w9, w9, #0x7ffffffc
	ldr	w10, [x20]
	mul	w10, w10, w9
	asr	w10, w10, #3
	stp	w9, w10, [x19, #4]
	mul	w8, w8, w10
Lloh3:
	adrp	x9, _V4L2_COLORSPACE_SMPTE170M@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_COLORSPACE_SMPTE170M@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w8, w9, [x19, #12]
	b	LBB0_5
LBB0_4:
	ldr	w2, [x19, #24]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_dprintk
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Fourcc format (0x%08x) invalid."

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_FIELD_INTERLACED,4,2      ; @V4L2_FIELD_INTERLACED
	.comm	_V4L2_COLORSPACE_SMPTE170M,4,2  ; @V4L2_COLORSPACE_SMPTE170M
	.no_dead_strip	_vidioc_try_fmt_cap
.subsections_via_symbols
