	.file	"extr_cx2341x.c_cx2341x_try_ctrl.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	cx2341x_try_ctrl, @function
cx2341x_try_ctrl:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	rbx, rdi
	call	to_cxhdl@PLT
	mov	edx, DWORD PTR [rbx]
	cmp	edx, 128
	je	.L2
	cmp	edx, 129
	jne	.L4
	mov	rdx, QWORD PTR 32[rax]
	mov	ecx, DWORD PTR [rdx]
	cmp	ecx, DWORD PTR V4L2_MPEG_STREAM_TYPE_MPEG1_SS[rip]
	je	.L7
	cmp	ecx, DWORD PTR V4L2_MPEG_STREAM_TYPE_MPEG1_VCD[rip]
	mov	edx, DWORD PTR V4L2_MPEG_VIDEO_ENCODING_MPEG_2[rip]
	je	.L7
.L9:
	mov	rcx, QWORD PTR 24[rax]
	mov	DWORD PTR [rcx], edx
	cmp	DWORD PTR V4L2_MPEG_VIDEO_ENCODING_MPEG_1[rip], edx
	mov	rcx, QWORD PTR 16[rax]
	je	.L10
	mov	edx, DWORD PTR [rcx]
.L11:
	cmp	DWORD PTR V4L2_MPEG_VIDEO_BITRATE_MODE_VBR[rip], edx
	je	.L15
.L4:
	xor	eax, eax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rsi, QWORD PTR 40[rax]
	mov	edx, DWORD PTR 4[rbx]
	mov	eax, DWORD PTR [rsi]
	lea	ecx, 1[rdx]
	add	eax, edx
	cdq
	idiv	ecx
	imul	eax, ecx
	cmp	eax, 34
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	sub	eax, ecx
	cmp	eax, 34
	jg	.L6
.L5:
	mov	DWORD PTR [rsi], eax
	xor	eax, eax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	edx, DWORD PTR V4L2_MPEG_VIDEO_ENCODING_MPEG_1[rip]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR [rdx], eax
	jge	.L4
	mov	DWORD PTR [rdx], eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L10:
	mov	edx, DWORD PTR V4L2_MPEG_VIDEO_BITRATE_MODE_CBR[rip]
	mov	DWORD PTR [rcx], edx
	jmp	.L11
	.cfi_endproc
.LFE0:
	.size	cx2341x_try_ctrl, .-cx2341x_try_ctrl
	.comm	V4L2_MPEG_VIDEO_ENCODING_MPEG_2,4,4
	.comm	V4L2_MPEG_VIDEO_ENCODING_MPEG_1,4,4
	.comm	V4L2_MPEG_VIDEO_BITRATE_MODE_VBR,4,4
	.comm	V4L2_MPEG_VIDEO_BITRATE_MODE_CBR,4,4
	.comm	V4L2_MPEG_STREAM_TYPE_MPEG1_VCD,4,4
	.comm	V4L2_MPEG_STREAM_TYPE_MPEG1_SS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_cx2341x.c_cx2341x_try_ctrl.c"
	.text
	.global	__aeabi_idiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cx2341x_try_ctrl, %function
cx2341x_try_ctrl:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	bl	to_cxhdl
	ldr	r3, [r4]
	cmp	r3, #128
	beq	.L2
	cmp	r3, #129
	bne	.L4
	ldr	r3, [r0, #16]
	ldr	r2, .L15
	ldr	r3, [r3]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L7
	ldr	r2, .L15+4
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L7
	ldr	r3, .L15+8
	ldr	r2, .L15+12
	ldr	r3, [r3]
.L9:
	ldr	r1, [r0, #12]
	ldr	ip, [r0, #8]
	str	r3, [r1]
	ldr	r2, [r2]
	cmp	r2, r3
	ldreq	r3, .L15+16
	ldr	r2, .L15+20
	ldreq	r3, [r3]
	ldrne	r3, [ip]
	streq	r3, [ip]
	ldr	r2, [r2]
	cmp	r2, r3
	bne	.L4
	ldm	r0, {r2, r3}
	ldr	r1, [r3]
	ldr	r2, [r2]
	cmp	r1, r2
	strlt	r2, [r3]
.L4:
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L2:
	ldr	r5, [r0, #20]
	ldr	r3, [r4, #4]
	ldr	r0, [r5]
	add	r4, r3, #1
	mov	r1, r4
	add	r0, r3, r0
	bl	__aeabi_idiv
	mul	r0, r4, r0
	cmp	r0, #34
	ble	.L5
.L6:
	sub	r0, r0, r4
	cmp	r0, #34
	bgt	.L6
.L5:
	str	r0, [r5]
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L7:
	ldr	r2, .L15+12
	ldr	r3, [r2]
	b	.L9
.L16:
	.align	2
.L15:
	.word	V4L2_MPEG_STREAM_TYPE_MPEG1_SS
	.word	V4L2_MPEG_STREAM_TYPE_MPEG1_VCD
	.word	V4L2_MPEG_VIDEO_ENCODING_MPEG_2
	.word	V4L2_MPEG_VIDEO_ENCODING_MPEG_1
	.word	V4L2_MPEG_VIDEO_BITRATE_MODE_CBR
	.word	V4L2_MPEG_VIDEO_BITRATE_MODE_VBR
	.size	cx2341x_try_ctrl, .-cx2341x_try_ctrl
	.comm	V4L2_MPEG_VIDEO_ENCODING_MPEG_2,4,4
	.comm	V4L2_MPEG_VIDEO_ENCODING_MPEG_1,4,4
	.comm	V4L2_MPEG_VIDEO_BITRATE_MODE_VBR,4,4
	.comm	V4L2_MPEG_VIDEO_BITRATE_MODE_CBR,4,4
	.comm	V4L2_MPEG_STREAM_TYPE_MPEG1_VCD,4,4
	.comm	V4L2_MPEG_STREAM_TYPE_MPEG1_SS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
