// File: xdsopl[P]FEC/./forney.hh
// Function: Forney<4, 0, GF::Types<4, 19, unsigned char>>::compute_magnitudes(GF::Value<4, 19, unsigned char>*, GF::Index<4, 19, unsigned char>*, int, GF::Value<4, 19, unsigned char>*, int, GF::Value<4, 19, unsigned char>*)
static void compute_magnitudes(ValueType *locator, IndexType *locations, int count, ValueType *evaluator, int evaluator_degree, ValueType *magnitudes)
	{
		// $magnitude = root^{FCR-1} * \frac{evaluator(root)}{locator'(root)}$
		for (int i = 0; i < count; ++i) {
			IndexType root(locations[i] * IndexType(1)), tmp(root);
			ValueType eval(evaluator[0]);
			for (int j = 1; j <= evaluator_degree; ++j) {
				eval += evaluator[j] * tmp;
				tmp *= root;
			}
			if (!eval) {
				magnitudes[i] = ValueType(0);
				continue;
			}
			ValueType deriv(locator[1]);
			IndexType root2(root * root), tmp2(root2);
			for (int j = 3; j <= count; j += 2) {
				deriv += locator[j] * tmp2;
				tmp2 *= root2;
			}
			IndexType magnitude(index(eval) / index(deriv));
			if (FCR == 0)
				magnitude /= root;
			if (FCR > 1)
				for (int j = 1; j < FCR; ++j)
					magnitude *= root;
			magnitudes[i] = value(magnitude);
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x103ce
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x36(%rbp)
leaq -0x37(%rbp), %rdi
movl $0x1, %esi
callq 0xbd80
movb -0x36(%rbp), %al
movzbl %al, %edi
movzbl -0x37(%rbp), %esi
callq 0xc110
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %al
movb %al, -0x38(%rbp)
movq -0x20(%rbp), %rax
movb (%rax), %al
movb %al, -0x39(%rbp)
movl $0x1, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x10295
movq -0x20(%rbp), %rax
movslq -0x40(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x42(%rbp)
movb -0x38(%rbp), %al
movb %al, -0x43(%rbp)
movb -0x42(%rbp), %al
movzbl %al, %edi
movzbl -0x43(%rbp), %esi
callq 0xdf70
movb %al, -0x41(%rbp)
leaq -0x39(%rbp), %rdi
movzbl -0x41(%rbp), %esi
callq 0xbd00
movb %al, -0x44(%rbp)
movb -0x35(%rbp), %al
movb %al, -0x45(%rbp)
leaq -0x38(%rbp), %rdi
movzbl -0x45(%rbp), %esi
callq 0xbef0
movb %al, -0x46(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x10236
leaq -0x39(%rbp), %rdi
callq 0xbce0
testb $0x1, %al
jne 0x102c0
leaq -0x47(%rbp), %rdi
xorl %esi, %esi
callq 0xbc30
movq -0x30(%rbp), %rax
movslq -0x34(%rbp), %rcx
movb -0x47(%rbp), %dl
movb %dl, (%rax,%rcx)
jmp 0x103c0
movq -0x8(%rbp), %rax
movb 0x1(%rax), %al
movb %al, -0x48(%rbp)
movb -0x35(%rbp), %al
movb %al, -0x4a(%rbp)
movb -0x35(%rbp), %al
movb %al, -0x4b(%rbp)
movb -0x4a(%rbp), %al
movzbl %al, %edi
movzbl -0x4b(%rbp), %esi
callq 0xc110
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
movb %al, -0x4c(%rbp)
movl $0x3, -0x50(%rbp)
movl -0x50(%rbp), %eax
cmpl -0x14(%rbp), %eax
jg 0x10354
movq -0x8(%rbp), %rax
movslq -0x50(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x52(%rbp)
movb -0x4c(%rbp), %al
movb %al, -0x53(%rbp)
movb -0x52(%rbp), %al
movzbl %al, %edi
movzbl -0x53(%rbp), %esi
callq 0xdf70
movb %al, -0x51(%rbp)
leaq -0x48(%rbp), %rdi
movzbl -0x51(%rbp), %esi
callq 0xbd00
movb %al, -0x54(%rbp)
movb -0x49(%rbp), %al
movb %al, -0x55(%rbp)
leaq -0x4c(%rbp), %rdi
movzbl -0x55(%rbp), %esi
callq 0xbef0
movb %al, -0x56(%rbp)
movl -0x50(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x50(%rbp)
jmp 0x102f5
movb -0x39(%rbp), %al
movb %al, -0x59(%rbp)
movzbl -0x59(%rbp), %edi
callq 0xc200
movb %al, -0x58(%rbp)
movb -0x48(%rbp), %al
movb %al, -0x5b(%rbp)
movzbl -0x5b(%rbp), %edi
callq 0xc200
movb %al, -0x5a(%rbp)
movb -0x58(%rbp), %al
movzbl %al, %edi
movzbl -0x5a(%rbp), %esi
callq 0xd240
movb %al, -0x57(%rbp)
movb -0x35(%rbp), %al
movb %al, -0x5c(%rbp)
leaq -0x57(%rbp), %rdi
movzbl -0x5c(%rbp), %esi
callq 0x103e0
movb %al, -0x5d(%rbp)
movb -0x57(%rbp), %al
movb %al, -0x5f(%rbp)
movzbl -0x5f(%rbp), %edi
callq 0xc0a0
movb %al, -0x5e(%rbp)
movq -0x30(%rbp), %rax
movslq -0x34(%rbp), %rcx
movb -0x5e(%rbp), %dl
movb %dl, (%rax,%rcx)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x101e6
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop