	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cx2341x_try_ctrl
_cx2341x_try_ctrl:                      ## @cx2341x_try_ctrl
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_to_cxhdl
	movl	(%rbx), %ecx
	cmpl	$129, %ecx
	je	LBB0_5
## %bb.1:
	cmpl	$128, %ecx
	jne	LBB0_13
## %bb.2:
	movl	4(%rbx), %ecx
	leal	1(%rcx), %edi
	movq	40(%rax), %rsi
	movl	(%rsi), %ebx
	leal	(%rbx,%rcx), %eax
	cltd
	idivl	%edi
	leal	(%rbx,%rcx,2), %eax
	subl	%edx, %eax
	incl	%eax
	notl	%ecx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	addl	%ecx, %eax
	cmpl	$34, %eax
	jg	LBB0_3
## %bb.4:
	movl	%eax, (%rsi)
	jmp	LBB0_13
LBB0_5:
	movq	24(%rax), %rcx
	movq	32(%rax), %rdx
	movl	(%rdx), %esi
	movq	_V4L2_MPEG_STREAM_TYPE_MPEG1_SS@GOTPCREL(%rip), %r8
	movq	_V4L2_MPEG_STREAM_TYPE_MPEG1_VCD@GOTPCREL(%rip), %rdi
	movq	_V4L2_MPEG_VIDEO_ENCODING_MPEG_1@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdx
	cmpl	(%rdi), %esi
	je	LBB0_7
## %bb.6:
	movq	_V4L2_MPEG_VIDEO_ENCODING_MPEG_2@GOTPCREL(%rip), %rdx
LBB0_7:
	cmpl	(%r8), %esi
	cmoveq	%rbx, %rdx
	movl	(%rdx), %edx
	movl	%edx, (%rcx)
	cmpl	(%rbx), %edx
	jne	LBB0_8
## %bb.9:
	movq	_V4L2_MPEG_VIDEO_BITRATE_MODE_CBR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	16(%rax), %rdx
	movl	%ecx, (%rdx)
	jmp	LBB0_10
LBB0_8:
	movq	16(%rax), %rcx
	movl	(%rcx), %ecx
LBB0_10:
	movq	_V4L2_MPEG_VIDEO_BITRATE_MODE_VBR@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_13
## %bb.11:
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	movl	(%rcx), %ecx
	cmpl	%ecx, (%rax)
	jge	LBB0_13
## %bb.12:
	movl	%ecx, (%rax)
LBB0_13:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_MPEG_STREAM_TYPE_MPEG1_SS,4,2 ## @V4L2_MPEG_STREAM_TYPE_MPEG1_SS
	.comm	_V4L2_MPEG_STREAM_TYPE_MPEG1_VCD,4,2 ## @V4L2_MPEG_STREAM_TYPE_MPEG1_VCD
	.comm	_V4L2_MPEG_VIDEO_ENCODING_MPEG_1,4,2 ## @V4L2_MPEG_VIDEO_ENCODING_MPEG_1
	.comm	_V4L2_MPEG_VIDEO_ENCODING_MPEG_2,4,2 ## @V4L2_MPEG_VIDEO_ENCODING_MPEG_2
	.comm	_V4L2_MPEG_VIDEO_BITRATE_MODE_CBR,4,2 ## @V4L2_MPEG_VIDEO_BITRATE_MODE_CBR
	.comm	_V4L2_MPEG_VIDEO_BITRATE_MODE_VBR,4,2 ## @V4L2_MPEG_VIDEO_BITRATE_MODE_VBR
	.no_dead_strip	_cx2341x_try_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cx2341x_try_ctrl
_cx2341x_try_ctrl:                      ; @cx2341x_try_ctrl
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_to_cxhdl
	ldr	w8, [x19]
	cmp	w8, #129
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #128
	b.ne	LBB0_10
; %bb.2:
	ldr	w10, [x19, #4]
	add	w9, w10, #1
	ldr	x8, [x0, #40]
	ldr	w11, [x8]
	add	w12, w11, w10
	neg	w13, w12
	sdiv	w12, w12, w9
	add	w11, w11, w10, lsl #1
	madd	w9, w12, w9, w13
	add	w9, w11, w9
	add	w9, w9, #1
	mvn	w10, w10
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	w9, w9, w10
	cmp	w9, #34
	b.gt	LBB0_3
	b	LBB0_9
LBB0_4:
	ldp	x9, x8, [x0, #24]
	ldr	w8, [x8]
Lloh0:
	adrp	x10, _V4L2_MPEG_STREAM_TYPE_MPEG1_SS@GOTPAGE
Lloh1:
	ldr	x10, [x10, _V4L2_MPEG_STREAM_TYPE_MPEG1_SS@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
Lloh3:
	adrp	x11, _V4L2_MPEG_STREAM_TYPE_MPEG1_VCD@GOTPAGE
Lloh4:
	ldr	x11, [x11, _V4L2_MPEG_STREAM_TYPE_MPEG1_VCD@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	cmp	w8, w11
Lloh6:
	adrp	x11, _V4L2_MPEG_VIDEO_ENCODING_MPEG_1@GOTPAGE
Lloh7:
	ldr	x11, [x11, _V4L2_MPEG_VIDEO_ENCODING_MPEG_1@GOTPAGEOFF]
Lloh8:
	adrp	x12, _V4L2_MPEG_VIDEO_ENCODING_MPEG_2@GOTPAGE
Lloh9:
	ldr	x12, [x12, _V4L2_MPEG_VIDEO_ENCODING_MPEG_2@GOTPAGEOFF]
	ccmp	w8, w10, #4, ne
	csel	x8, x11, x12, eq
	ldr	w8, [x8]
	str	w8, [x9]
	ldr	w9, [x11]
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.5:
Lloh10:
	adrp	x8, _V4L2_MPEG_VIDEO_BITRATE_MODE_CBR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _V4L2_MPEG_VIDEO_BITRATE_MODE_CBR@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	ldr	x9, [x0, #16]
	str	w8, [x9]
	b	LBB0_7
LBB0_6:
	ldr	x8, [x0, #16]
	ldr	w8, [x8]
LBB0_7:
Lloh13:
	adrp	x9, _V4L2_MPEG_VIDEO_BITRATE_MODE_VBR@GOTPAGE
Lloh14:
	ldr	x9, [x9, _V4L2_MPEG_VIDEO_BITRATE_MODE_VBR@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_10
; %bb.8:
	ldp	x9, x8, [x0]
	ldr	w10, [x8]
	ldr	w9, [x9]
	cmp	w10, w9
	b.ge	LBB0_10
LBB0_9:
	str	w9, [x8]
LBB0_10:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_MPEG_STREAM_TYPE_MPEG1_SS,4,2 ; @V4L2_MPEG_STREAM_TYPE_MPEG1_SS
	.comm	_V4L2_MPEG_STREAM_TYPE_MPEG1_VCD,4,2 ; @V4L2_MPEG_STREAM_TYPE_MPEG1_VCD
	.comm	_V4L2_MPEG_VIDEO_ENCODING_MPEG_1,4,2 ; @V4L2_MPEG_VIDEO_ENCODING_MPEG_1
	.comm	_V4L2_MPEG_VIDEO_ENCODING_MPEG_2,4,2 ; @V4L2_MPEG_VIDEO_ENCODING_MPEG_2
	.comm	_V4L2_MPEG_VIDEO_BITRATE_MODE_CBR,4,2 ; @V4L2_MPEG_VIDEO_BITRATE_MODE_CBR
	.comm	_V4L2_MPEG_VIDEO_BITRATE_MODE_VBR,4,2 ; @V4L2_MPEG_VIDEO_BITRATE_MODE_VBR
	.no_dead_strip	_cx2341x_try_ctrl
.subsections_via_symbols
