	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bttv_try_fmt_vid_cap
_bttv_try_fmt_vid_cap:                  ## @bttv_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	8(%rsi), %r13
	movl	16(%rdx), %edi
	callq	_format_by_fourcc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movl	(%rbx), %r12d
	leal	-128(%r12), %eax
	cmpl	$5, %eax
	ja	LBB0_6
## %bb.3:
	movl	$57, %ecx
	btl	%eax, %ecx
	jb	LBB0_7
## %bb.4:
	movq	_FORMAT_FLAGS_PLANAR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_5
LBB0_6:
	movq	(%r13), %rax
	xorl	%ecx, %ecx
	cmpl	$0, (%r15)
	setne	%cl
	movl	(%rax,%rcx,4), %eax
	sarl	%eax
	xorl	%ecx, %ecx
	cmpl	%eax, 4(%rbx)
	setg	%cl
	movl	$132, %r12d
	subl	%ecx, %r12d
	jmp	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_5:
	movl	$129, %r12d
LBB0_7:
	movl	8(%rbx), %eax
	movl	%eax, -48(%rbp)
	movl	4(%rbx), %eax
	movl	%eax, -44(%rbp)
	leaq	-56(%rbp), %rsi
	leaq	-52(%rbp), %rdx
	movq	%r14, %rdi
	callq	_bttv_get_width_mask_vid_cap
	movl	-56(%rbp), %r8d
	movl	-52(%rbp), %r9d
	leaq	-48(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movl	%r12d, %ecx
	pushq	$0
	pushq	$1
	callq	_limit_scaled_size_lock
	addq	$16, %rsp
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movl	%r12d, (%rbx)
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %ecx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_pix_format_set_size
	movq	_V4L2_COLORSPACE_SMPTE170M@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	xorl	%eax, %eax
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FORMAT_FLAGS_PLANAR,4,2        ## @FORMAT_FLAGS_PLANAR
	.comm	_V4L2_COLORSPACE_SMPTE170M,4,2  ## @V4L2_COLORSPACE_SMPTE170M
	.no_dead_strip	_bttv_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 bttv_try_fmt_vid_cap
_bttv_try_fmt_vid_cap:                  ; @bttv_try_fmt_vid_cap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x2
	mov	x21, x1
	ldr	x23, [x1, #8]
	ldr	w0, [x2, #16]
	bl	_format_by_fourcc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	w22, [x19]
	sub	w8, w22, #128
	cmp	w8, #5
	b.hi	LBB0_4
; %bb.2:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #57
	tst	w8, w9
	b.ne	LBB0_7
; %bb.3:
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _FORMAT_FLAGS_PLANAR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FORMAT_FLAGS_PLANAR@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
LBB0_4:
	ldr	x8, [x23]
	ldr	w9, [x21]
	cmp	w9, #0
	cset	w9, ne
	ldr	w8, [x8, w9, uxtw #2]
	ldr	w9, [x19, #4]
	cmp	w9, w8, asr #1
	mov	w8, #131
	cinc	w22, w8, le
	b	LBB0_7
LBB0_5:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_6:
	mov	w22, #129
LBB0_7:
	ldp	w9, w8, [x19, #4]
	stp	w9, w8, [sp, #8]
	add	x1, sp, #4
	mov	x2, sp
	mov	x0, x20
	bl	_bttv_get_width_mask_vid_cap
	ldp	w5, w4, [sp]
	add	x1, sp, #12
	add	x2, sp, #8
	mov	x0, x21
	mov	x3, x22
	mov	w6, #1
	mov	w7, #0
	bl	_limit_scaled_size_lock
	cbnz	w0, LBB0_9
; %bb.8:
	str	w22, [x19]
	ldp	w3, w2, [sp, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_pix_format_set_size
	mov	w0, #0
Lloh6:
	adrp	x8, _V4L2_COLORSPACE_SMPTE170M@GOTPAGE
Lloh7:
	ldr	x8, [x8, _V4L2_COLORSPACE_SMPTE170M@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #12]
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FORMAT_FLAGS_PLANAR,4,2        ; @FORMAT_FLAGS_PLANAR
	.comm	_V4L2_COLORSPACE_SMPTE170M,4,2  ; @V4L2_COLORSPACE_SMPTE170M
	.no_dead_strip	_bttv_try_fmt_vid_cap
.subsections_via_symbols
