	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv090x_get_loop_params
_stv090x_get_loop_params:               ## @stv090x_get_loop_params
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r8
	movl	(%rdi), %r10d
	movq	16(%rdi), %rax
	movslq	(%rax), %rax
	imulq	$274877907, %rax, %r11          ## imm = 0x10624DD3
	movq	%r11, %rax
	shrq	$63, %rax
	sarq	$38, %r11
	addl	%eax, %r11d
	movl	%r10d, %eax
	cltd
	idivl	%r11d
	shll	$16, %eax
	cltq
	imulq	$274877907, %rax, %rbx          ## imm = 0x10624DD3
	movq	%rbx, %rax
	shrq	$63, %rax
	sarq	$38, %rbx
	addl	%eax, %ebx
	movl	8(%rdi), %eax
	leal	-129(%rax), %edx
	cmpl	$2, %edx
	jae	LBB0_1
## %bb.8:
	leal	(%rbx,%rbx,2), %ebx
	movl	$550000, %r9d                   ## imm = 0x86470
	jmp	LBB0_5
LBB0_1:
	cmpl	$128, %eax
	jne	LBB0_3
## %bb.2:
	shll	$2, %ebx
	jmp	LBB0_4
LBB0_3:
	leal	(%rbx,%rbx,2), %ebx
LBB0_4:
	movl	$687500, %r9d                   ## imm = 0xA7D8C
LBB0_5:
	movl	4(%rdi), %r14d
	testl	%r10d, %r10d
	jle	LBB0_7
## %bb.6:
	movl	%r10d, %eax
	imulq	$274877907, %rax, %rdi          ## imm = 0x10624DD3
	shrq	$38, %rdi
	movl	%r9d, %eax
	xorl	%edx, %edx
	divl	%edi
	movl	%eax, %r9d
LBB0_7:
	movslq	%ebx, %rbx
	imulq	$1374389535, %rbx, %r10         ## imm = 0x51EB851F
	movq	%r10, %rax
	shrq	$63, %rax
	sarq	$37, %r10
	addl	%eax, %r10d
	movslq	%r14d, %rax
	imulq	$274877907, %rax, %rdx          ## imm = 0x10624DD3
	movq	%rdx, %rdi
	shrq	$63, %rdi
	sarq	$38, %rdx
	addl	%edi, %edx
	imulq	$1759218605, %rax, %rdi         ## imm = 0x68DB8BAD
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$44, %rdi
	addl	%eax, %edi
	addl	%edx, %edi
	movl	%edi, %eax
	shrl	$31, %eax
	addl	%edi, %eax
	andl	$-2, %eax
	shll	$15, %eax
	cltd
	idivl	%r11d
	cmpl	$16384, %eax                    ## imm = 0x4000
	movl	$16384, %edi                    ## imm = 0x4000
	cmovll	%eax, %edi
	movl	%edi, %eax
	shrl	$31, %eax
	addl	%edi, %eax
	sarl	%eax
	cmpl	%edi, %r10d
	cmovgl	%eax, %r10d
	cmpl	$-99, %ebx
	cmovll	%eax, %r10d
	movl	%edi, %eax
	cltd
	idivl	%r10d
                                        ## kill: def $eax killed $eax def $rax
	leal	1(%rax), %edx
	addl	$-100, %eax
	movslq	%edi, %rdi
	imulq	$1374389535, %rdi, %rdi         ## imm = 0x51EB851F
	movq	%rdi, %rbx
	shrq	$63, %rbx
	sarq	$37, %rdi
	addl	%ebx, %edi
	cmpl	$-101, %eax
	cmovael	%r10d, %edi
	movl	$100, %eax
	cmovbl	%eax, %edx
	cmpl	$100, %r9d
	cmovll	%r9d, %eax
	movl	%edi, (%rsi)
	movl	%eax, (%r8)
	movl	%edx, (%rcx)
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_stv090x_get_loop_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv090x_get_loop_params
_stv090x_get_loop_params:               ; @stv090x_get_loop_params
	.cfi_startproc
; %bb.0:
	ldp	w13, w10, [x0]
	ldr	x8, [x0, #16]
	ldrsw	x8, [x8]
	mov	w11, #19923
	movk	w11, #4194, lsl #16
	mul	x8, x8, x11
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w9, w8, w9
	sdiv	w8, w13, w9
	lsl	w8, w8, #16
	smull	x8, w8, w11
	lsr	x12, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w12
	ldr	w12, [x0, #8]
	sub	w14, w12, #129
	add	w15, w8, w8, lsl #1
	mov	w16, #25712
	movk	w16, #8, lsl #16
	mov	w17, #32140
	movk	w17, #10, lsl #16
	lsl	w8, w8, #2
	mov	w0, #32140
	movk	w0, #10, lsl #16
	cmp	w12, #128
	csel	w8, w8, w15, eq
	csel	w17, w17, w0, eq
	cmp	w14, #2
	csel	w12, w15, w8, lo
	csel	w8, w16, w17, lo
	cmp	w13, #1
	b.lt	LBB0_2
; %bb.1:
	umull	x13, w13, w11
	lsr	x13, x13, #38
	udiv	w8, w8, w13
LBB0_2:
	mov	w13, #34079
	movk	w13, #20971, lsl #16
	smull	x14, w12, w13
	lsr	x15, x14, #63
	asr	x14, x14, #37
	smull	x11, w10, w11
	lsr	x16, x11, #63
	asr	x11, x11, #38
	add	w11, w11, w16
	mov	w16, #35757
	movk	w16, #26843, lsl #16
	smull	x10, w10, w16
	lsr	x16, x10, #63
	asr	x10, x10, #44
	add	w10, w10, w16
	add	w10, w11, w10
	cmp	w10, #0
	cinc	w10, w10, lt
	lsl	w10, w10, #15
	and	w10, w10, #0xffff0000
	sdiv	w9, w10, w9
	mov	w10, #16384
	cmp	w9, #4, lsl #12                 ; =16384
	csel	w9, w9, w10, lt
	cmp	w9, #0
	cinc	w10, w9, lt
	add	w11, w14, w15
	cmp	w11, w9
	mov	w14, #-99
	ccmp	w12, w14, #8, le
	asr	w10, w10, #1
	csel	w10, w10, w11, lt
	sdiv	w11, w9, w10
	sub	w12, w11, #100
	smull	x9, w9, w13
	lsr	x13, x9, #63
	asr	x9, x9, #37
	add	w9, w9, w13
	cmn	w12, #101
	csel	w9, w9, w10, lo
	mov	w10, #100
	csinc	w11, w10, w11, lo
	str	w9, [x1]
	cmp	w8, #100
	csel	w8, w8, w10, lt
	str	w8, [x2]
	str	w11, [x3]
	mov	w0, #0
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_stv090x_get_loop_params
.subsections_via_symbols
