	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function saa7134_try_fmt_vid_cap
_saa7134_try_fmt_vid_cap:               ## @saa7134_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	(%rsi), %rbx
	movl	20(%rdx), %edi
	callq	_format_by_fourcc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movl	(%r13), %r12d
	movl	4(%rbx), %esi
	movl	8(%rbx), %edi
	shll	$2, %edi
	callq	_min
	movl	%eax, %r15d
	movl	(%rbx), %esi
	movl	12(%rbx), %edi
	shll	$2, %edi
	callq	_min
	movq	_V4L2_FIELD_ANY@GOTPCREL(%rip), %rcx
	cmpl	%r12d, (%rcx)
	jne	LBB0_4
## %bb.3:
	movl	%eax, %edx
	shrl	%edx
	movl	$130, %r12d
	movl	$129, %ecx
	cmpl	%edx, 4(%r13)
	jbe	LBB0_7
	jmp	LBB0_9
LBB0_4:
	cmpl	$130, %r12d
	je	LBB0_7
## %bb.5:
	cmpl	$129, %r12d
	je	LBB0_8
## %bb.6:
	cmpl	$128, %r12d
	jne	LBB0_1
LBB0_7:
	shrl	%eax
LBB0_8:
	movl	%r12d, %ecx
LBB0_9:
	movl	%ecx, (%r13)
	movl	4(%r13), %edi
	movl	8(%r13), %edx
	cmpl	$49, %edx
	movl	$48, %ecx
	cmovgel	%edx, %ecx
	cmpl	$33, %edi
	movl	$32, %esi
	cmovael	%edi, %esi
	cmpl	%r15d, %ecx
	cmovael	%r15d, %ecx
	cmpl	%eax, %esi
	movl	%eax, %edx
	cmovbl	%esi, %edx
	cmpl	$32, %edi
	jb	LBB0_11
## %bb.10:
	cmpl	%eax, %esi
	jbe	LBB0_12
LBB0_11:
	movl	%edx, 4(%r13)
LBB0_12:
	andl	$2147483644, %ecx               ## imm = 0x7FFFFFFC
	movl	%ecx, 8(%r13)
	imull	(%r14), %ecx
	sarl	$3, %ecx
	movl	%ecx, 12(%r13)
	imull	%ecx, %edx
	movl	%edx, 16(%r13)
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_FIELD_ANY,4,2             ## @V4L2_FIELD_ANY
	.no_dead_strip	_saa7134_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 saa7134_try_fmt_vid_cap
_saa7134_try_fmt_vid_cap:               ; @saa7134_try_fmt_vid_cap
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x23, [x1]
	ldr	w0, [x2, #20]
	bl	_format_by_fourcc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x0
	ldr	w22, [x19]
	ldp	w1, w8, [x23, #4]
	lsl	w0, w8, #2
	bl	_min
	mov	x21, x0
	ldr	w8, [x23, #12]
	lsl	w0, w8, #2
	ldr	w1, [x23]
	bl	_min
Lloh0:
	adrp	x8, _V4L2_FIELD_ANY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_FIELD_ANY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_4
; %bb.2:
	ldr	w8, [x19, #4]
	cmp	w8, w0, lsr #1
	b.ls	LBB0_8
; %bb.3:
	mov	w22, #129
	b	LBB0_10
LBB0_4:
	cmp	w22, #130
	b.eq	LBB0_9
; %bb.5:
	cmp	w22, #129
	b.eq	LBB0_10
; %bb.6:
	cmp	w22, #128
	b.eq	LBB0_9
LBB0_7:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_8:
	mov	w22, #130
LBB0_9:
	lsr	w0, w0, #1
LBB0_10:
	mov	w8, #48
	ldp	w11, w9, [x19, #4]
	cmp	w9, #48
	csel	w8, w9, w8, gt
	mov	w9, #32
	cmp	w11, #32
	csel	w10, w11, w9, hi
	cmp	w8, w21
	csel	w9, w8, w21, lo
	cmp	w10, w0
	csel	w8, w10, w0, lo
	str	w22, [x19]
	cmp	w11, #32
	b.lo	LBB0_12
; %bb.11:
	cmp	w10, w0
	b.ls	LBB0_13
LBB0_12:
	str	w8, [x19, #4]
LBB0_13:
	mov	w0, #0
	and	w9, w9, #0x7ffffffc
	ldr	w10, [x20]
	mul	w10, w10, w9
	asr	w10, w10, #3
	stp	w9, w10, [x19, #8]
	mul	w8, w8, w10
	str	w8, [x19, #16]
LBB0_14:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_FIELD_ANY,4,2             ; @V4L2_FIELD_ANY
	.no_dead_strip	_saa7134_try_fmt_vid_cap
.subsections_via_symbols
