	.file	"extr_stv090x.c_stv090x_get_loop_params.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	stv090x_get_loop_params, @function
stv090x_get_loop_params:
.LFB0:
	.cfi_startproc
	endbr64
	mov	r10, rdx
	movsx	rdx, DWORD PTR 4[rdi]
	mov	r9d, DWORD PTR [rdi]
	imul	r8, rdx, 274877907
	mov	r11, rdx
	imul	rax, rdx, 1759218605
	sar	r11d, 31
	mov	rdx, QWORD PTR 16[rdi]
	sar	r8, 38
	sar	rax, 44
	sub	r8d, r11d
	sub	eax, r11d
	movsx	r11, DWORD PTR [rdx]
	add	r8d, eax
	mov	eax, r8d
	mov	rdx, r11
	shr	eax, 31
	imul	r11, r11, 274877907
	sar	edx, 31
	add	eax, r8d
	mov	r8d, 16384
	sar	eax
	sal	eax, 16
	sar	r11, 38
	sub	r11d, edx
	cdq
	idiv	r11d
	cmp	eax, 16384
	cmovle	r8d, eax
	mov	eax, r9d
	cdq
	idiv	r11d
	sal	eax, 16
	movsx	rdx, eax
	sar	eax, 31
	imul	rdx, rdx, 274877907
	sar	rdx, 38
	sub	edx, eax
	mov	eax, DWORD PTR 8[rdi]
	cmp	eax, 128
	je	.L2
	sub	eax, 129
	lea	edx, [rdx+rdx*2]
	cmp	eax, 1
	ja	.L3
	mov	eax, 550000
.L4:
	movsx	rdi, edx
	mov	r11d, edx
	imul	rdi, rdi, 1374389535
	sar	r11d, 31
	sar	rdi, 37
	sub	edi, r11d
	cmp	r8d, edi
	jl	.L9
	cmp	edx, -99
	jl	.L9
.L5:
	test	r9d, r9d
	jle	.L7
	movsx	rdx, r9d
	sar	r9d, 31
	imul	rdx, rdx, 274877907
	sar	rdx, 38
	sub	edx, r9d
	mov	r9d, edx
	cdq
	idiv	r9d
.L7:
	cmp	eax, 100
	mov	r9d, 100
	cmovle	r9d, eax
	mov	eax, r8d
	cdq
	idiv	edi
	add	eax, 1
	cmp	eax, 100
	jbe	.L8
	movsx	rdi, r8d
	sar	r8d, 31
	mov	eax, 100
	imul	rdi, rdi, 1374389535
	sar	rdi, 37
	sub	edi, r8d
.L8:
	mov	DWORD PTR [rsi], edi
	mov	DWORD PTR [r10], r9d
	mov	DWORD PTR [rcx], eax
	xor	eax, eax
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edi, r8d
	shr	edi, 31
	add	edi, r8d
	sar	edi
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	mov	eax, 687500
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	sal	edx, 2
	mov	eax, 687500
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	stv090x_get_loop_params, .-stv090x_get_loop_params
	.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_stv090x.c_stv090x_get_loop_params.c"
	.text
	.global	__aeabi_idiv
	.global	__aeabi_uidiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	stv090x_get_loop_params, %function
stv090x_get_loop_params:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	lr, r1
	ldr	ip, [r0, #4]
	ldr	r5, .L13
	ldr	r6, .L13+4
	ldr	r1, [r0, #12]
	smull	r7, r6, ip, r6
	mov	r4, r0
	smull	r7, r0, r5, ip
	ldr	fp, [r1]
	asr	ip, ip, #31
	smull	r7, r1, r5, fp
	rsb	r0, ip, r0, asr #6
	rsb	ip, ip, r6, asr #12
	add	ip, ip, r0
	add	ip, ip, ip, lsr #31
	asr	fp, fp, #31
	asr	ip, ip, #1
	rsb	fp, fp, r1, asr #6
	lsl	r0, ip, #16
	mov	r1, fp
	mov	r8, r3
	mov	r6, lr
	mov	r7, r2
	bl	__aeabi_idiv
	ldr	r10, [r4]
	cmp	r0, #16384
	mov	r9, r0
	mov	r1, fp
	mov	r0, r10
	movge	r9, #16384
	bl	__aeabi_idiv
	lsl	ip, r0, #16
	smull	r3, r5, ip, r5
	ldr	r3, [r4, #8]
	asr	ip, ip, #31
	cmp	r3, #128
	rsb	ip, ip, r5, asr #6
	beq	.L2
	sub	r3, r3, #129
	cmp	r3, #1
	bhi	.L3
	ldr	r5, .L13+8
	add	ip, ip, ip, lsl #1
.L4:
	ldr	r2, .L13+12
	asr	r4, ip, #31
	smull	r3, r2, ip, r2
	rsb	r4, r4, r2, asr #5
	cmn	ip, #99
	cmpge	r9, r4
	addlt	r4, r9, r9, lsr #31
	asrlt	r4, r4, #1
	cmp	r10, #0
	ble	.L6
	ldr	r1, .L13
	mov	r0, r5
	smull	r3, r1, r10, r1
	asr	r10, r10, #31
	rsb	r1, r10, r1, asr #6
	bl	__aeabi_idiv
	mov	r5, r0
.L6:
	mov	r1, r4
	cmp	r5, #100
	mov	r0, r9
	movge	r5, #100
	bl	__aeabi_idiv
	add	r2, r0, #1
	cmp	r2, #100
	movhi	r2, #100
	ldrhi	r4, .L13+12
	mov	r0, #0
	smullhi	r3, r4, r9, r4
	asrhi	r9, r9, #31
	rsbhi	r4, r9, r4, asr #5
	str	r4, [r6]
	str	r5, [r7]
	str	r2, [r8]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r5, .L13+16
	lsl	ip, ip, #2
	b	.L4
.L3:
	ldr	r5, .L13+16
	add	ip, ip, ip, lsl #1
	b	.L4
.L14:
	.align	2
.L13:
	.word	274877907
	.word	1759218605
	.word	550000
	.word	1374389535
	.word	687500
	.size	stv090x_get_loop_params, .-stv090x_get_loop_params
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
