	.file	"extr_ivtv-ioctl.c_ivtv_validate_speed.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ivtv_validate_speed, @function
ivtv_validate_speed:
.LFB0:
	.cfi_startproc
	endbr64
	mov	r8d, esi
	mov	r10d, 1000
	sar	r8d, 31
	or	r8d, 1
	test	edi, edi
	je	.L3
	mov	eax, edi
	sar	eax, 31
	xor	edi, eax
	mov	r10d, edi
	sub	r10d, eax
.L3:
	mov	eax, esi
	sar	eax, 31
	mov	ecx, eax
	xor	ecx, esi
	sub	ecx, eax
	cmp	ecx, r10d
	jl	.L4
	cmp	ecx, 1500
	jg	.L22
	cmp	ecx, 1000
	jg	.L23
.L7:
	mov	r9d, 1000
	test	esi, esi
	je	.L1
	cmp	ecx, 1
	je	.L19
	cmp	ecx, 1000
	je	.L19
	mov	eax, r9d
	cdq
	idiv	ecx
	mov	esi, eax
	mov	eax, r9d
	cdq
	idiv	r10d
	cmp	eax, esi
	jne	.L12
	xor	eax, eax
	cmp	ecx, r10d
	setle	al
	lea	esi, -1[rsi+rax*2]
.L12:
	cmp	esi, 60
	jg	.L25
	imul	r8d, esi
	mov	eax, 1000
	cdq
	idiv	r8d
	mov	r9d, eax
	mov	eax, r9d
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	imul	r9d, r8d, 2000
.L1:
	mov	eax, r9d
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	cmp	ecx, 1999
	jg	.L22
	cmp	ecx, 1499
	jg	.L23
	cmp	ecx, 999
	jle	.L7
	imul	r9d, r8d, 1000
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L23:
	imul	r9d, r8d, 1500
	mov	eax, r9d
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	mov	r9d, r8d
	imul	r9d, ecx
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L25:
	imul	r8d, r8d, 60
	mov	eax, 1000
	cdq
	idiv	r8d
	mov	r9d, eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	ivtv_validate_speed, .-ivtv_validate_speed
	.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_ivtv-ioctl.c_ivtv_validate_speed.c"
	.text
	.global	__aeabi_uidiv
	.global	__aeabi_idiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ivtv_validate_speed, %function
ivtv_validate_speed:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r1, #0
	push	{r4, r5, r6, r7, r8, lr}
	mvnlt	r6, #0
	movge	r6, #1
	cmp	r0, #0
	moveq	r5, #1000
	eorne	r5, r0, r0, asr #31
	eor	r4, r1, r1, asr #31
	subne	r5, r5, r0, asr #31
	sub	r4, r4, r1, asr #31
	cmp	r4, r5
	blt	.L4
	ldr	r3, .L23
	cmp	r4, r3
	bgt	.L19
	cmp	r4, #1000
	bgt	.L20
.L7:
	cmp	r1, #0
	beq	.L16
	cmp	r4, #1000
	cmpne	r4, #1
	beq	.L22
	mov	r1, r4
	mov	r0, #1000
	bl	__aeabi_idiv
	mov	r1, r5
	mov	r7, r0
	mov	r0, #1000
	bl	__aeabi_idiv
	cmp	r0, r7
	bne	.L11
	cmp	r4, r5
	mvngt	r3, #0
	movle	r3, #1
	add	r7, r7, r3
.L11:
	cmp	r7, #60
	rsbgt	r6, r6, r6, lsl #4
	mulle	r1, r6, r7
	lslgt	r1, r6, #2
	mov	r0, #1000
	bl	__aeabi_idiv
	pop	{r4, r5, r6, r7, r8, pc}
.L19:
	rsb	r0, r6, r6, lsl #5
	add	r0, r6, r0, lsl #2
	lsl	r0, r0, #4
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	cmp	r4, #2000
	bge	.L19
	ldr	r3, .L23+4
	cmp	r4, r3
	bgt	.L20
	cmp	r4, #1000
	blt	.L7
	rsb	r0, r6, r6, lsl #5
	add	r0, r6, r0, lsl #2
	lsl	r0, r0, #3
	pop	{r4, r5, r6, r7, r8, pc}
.L20:
	add	r0, r6, r6, lsl #2
	add	r0, r0, r0, lsl #2
	rsb	r0, r0, r0, lsl #4
	lsl	r0, r0, #2
	pop	{r4, r5, r6, r7, r8, pc}
.L22:
	mul	r0, r4, r6
	pop	{r4, r5, r6, r7, r8, pc}
.L16:
	mov	r0, #1000
	pop	{r4, r5, r6, r7, r8, pc}
.L24:
	.align	2
.L23:
	.word	1500
	.word	1499
	.size	ivtv_validate_speed, .-ivtv_validate_speed
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
