// File: fanyazhi[P]Spline-Fitting/src/CRSmatrix.cpp
// Function: Jacobi(CRSmatrix, std::vector<double, std::allocator<double>>)
std::vector<double> Jacobi(CRSmatrix A, std::vector<double> b) {
    //first find the inverse of the diagonal matrix
    CRSmatrix Di = A;
    for (int i = 0; i < Di.getRowSize(); i++) {
        for (int j = 0; j < Di.getColSize(); j++) {
            //remove all elements other than the diagonal
            if (i != j) {
                Di.deleteValue(i, j);
            } else {
                //take the inverse of the diagonal
                for (int n = Di.rowPtr[i]; n < Di.rowPtr[i] + (Di.rowPtr[i + 1] - Di.rowPtr[i]); n++) {
                    if (Di.colInd[n] == j) {
                        Di.value[n] = 1 / Di.value[n];
                    }
                }
            }
        }
    }

    //find L+U
    CRSmatrix LU = A;
    for (int i = 0; i < LU.getRowSize(); i++) {
        for (int j = 0; j < LU.getColSize(); j++) {
            if (i == j) {
                LU.deleteValue(i, j);
            } else {
                //take the inverse of the diagonal
                for (int n = LU.rowPtr[i]; n < LU.rowPtr[i] + (LU.rowPtr[i + 1] - LU.rowPtr[i]); n++) {
                    if (LU.colInd[n] == j) {
                        LU.value[n] = -1.0 * LU.value[n];
                    }
                }
            }
        }
    }

    //take D^-1 * (L+U), store in DLU
    CRSmatrix DLU = LU;
    for (int i = 0; i < DLU.getRowSize(); i++) {
        for (int j = 0; j < DLU.getColSize(); j++) {
            for (int n = DLU.rowPtr[i]; n < DLU.rowPtr[i] + (DLU.rowPtr[i + 1] - DLU.rowPtr[i]); n++) {
                if (DLU.colInd[n] == j) {
                    DLU.value[n] = Di.value[i] * LU.retrieveElement(i, j);
                }
            }
        }
    }

    //find intercept D^-1 * b
    std::vector<double> cep(b.size());
    cep = Di.productAx(b);

    //initial guess is the same as the intercept
    std::vector<double> x = cep;

    //find vetor norm ||b-Ax|| of initial guess
    std::vector<double> normTemp(x.size());
    normTemp = A.productAx(x);
    for (unsigned int i = 0; i < b.size(); i++) {
        normTemp[i] = -1 * normTemp[i];
        normTemp[i] = b[i] + normTemp[i];
    }
    int count = 0;

    //start Jacobi iteration
    std::vector<double> xTemp(b.size());
    std::vector<double> prod(b.size());
    double threshold = 10E-7;
    while (vectorNorm(normTemp) > threshold) {
        count++;

        //x(k-1)
        for (unsigned int i = 0; i < b.size(); i++) {
            xTemp[i] = x[i];
        }

        //find product of D^-1(L+U)*x
        prod = DLU.productAx(xTemp);

        //add D^-1(L+U)*x to D^-1 * b, store in x
        for (unsigned int i = 0; i < x.size(); i++) {
            x[i] = prod[i] + cep[i];
        }

        //find new vetor norm ||x(k-1)-x||
        for (unsigned int i = 0; i < b.size(); i++) {
            normTemp[i] = -1.0 * x[i];
            normTemp[i] = xTemp[i] + normTemp[i];
        }
    }
    return x;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3e0, %rsp            # imm = 0x3E0
movq %rdx, -0x2b0(%rbp)
movq %rsi, -0x2a8(%rbp)
movq %rdi, -0x2a0(%rbp)
movq %rdi, %rax
movq %rax, -0x298(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x4cf0
movl $0x0, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movl %eax, -0x2b4(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x2cf0
movl %eax, %ecx
movl -0x2b4(%rbp), %eax
cmpl %ecx, %eax
jge 0x3580
movl $0x0, -0x70(%rbp)
movl -0x70(%rbp), %eax
movl %eax, -0x2b8(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x2d00
movl %eax, %ecx
movl -0x2b8(%rbp), %eax
cmpl %ecx, %eax
jge 0x3570
movl -0x6c(%rbp), %eax
cmpl -0x70(%rbp), %eax
je 0x3470
movl -0x6c(%rbp), %esi
movl -0x70(%rbp), %edx
leaq -0x68(%rbp), %rdi
callq 0x30d0
jmp 0x345a
jmp 0x3560
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x4184
leaq -0x68(%rbp), %rdi
addq $0x20, %rdi
movslq -0x6c(%rbp), %rsi
callq 0x46a0
movl (%rax), %eax
movl %eax, -0x80(%rbp)
movl -0x80(%rbp), %eax
movl %eax, -0x2bc(%rbp)
leaq -0x68(%rbp), %rdi
addq $0x20, %rdi
movslq -0x6c(%rbp), %rsi
callq 0x46a0
movl (%rax), %eax
movl %eax, -0x2c0(%rbp)
leaq -0x68(%rbp), %rdi
addq $0x20, %rdi
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x46a0
movl (%rax), %eax
movl %eax, -0x2c4(%rbp)
leaq -0x68(%rbp), %rdi
addq $0x20, %rdi
movslq -0x6c(%rbp), %rsi
callq 0x46a0
movl -0x2c4(%rbp), %edx
movl -0x2c0(%rbp), %ecx
movq %rax, %rsi
movl -0x2bc(%rbp), %eax
subl (%rsi), %edx
addl %edx, %ecx
cmpl %ecx, %eax
jge 0x355e
leaq -0x68(%rbp), %rdi
addq $0x38, %rdi
movslq -0x80(%rbp), %rsi
callq 0x46a0
movl (%rax), %eax
cmpl -0x70(%rbp), %eax
jne 0x354e
leaq -0x68(%rbp), %rdi
addq $0x8, %rdi
movslq -0x80(%rbp), %rsi
callq 0x4950
movsd 0x8afb(%rip), %xmm0     # 0xc020
divsd (%rax), %xmm0
movsd %xmm0, -0x2d0(%rbp)
leaq -0x68(%rbp), %rdi
addq $0x8, %rdi
movslq -0x80(%rbp), %rsi
callq 0x4950
movsd -0x2d0(%rbp), %xmm0
movsd %xmm0, (%rax)
jmp 0x3550
movl -0x80(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x80(%rbp)
jmp 0x3486
jmp 0x3560
jmp 0x3562
movl -0x70(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x70(%rbp)
jmp 0x341f
jmp 0x3572
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x33f6
movq -0x2a8(%rbp), %rsi
leaq -0xd0(%rbp), %rdi
callq 0x4cf0
jmp 0x3595
movl $0x0, -0xd4(%rbp)
movl -0xd4(%rbp), %eax
movl %eax, -0x2d4(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x2cf0
movl %eax, %ecx
movl -0x2d4(%rbp), %eax
cmpl %ecx, %eax
jge 0x3790
movl $0x0, -0xd8(%rbp)
movl -0xd8(%rbp), %eax
movl %eax, -0x2d8(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x2d00
movl %eax, %ecx
movl -0x2d8(%rbp), %eax
cmpl %ecx, %eax
jge 0x377a
movl -0xd4(%rbp), %eax
cmpl -0xd8(%rbp), %eax
jne 0x3637
movl -0xd4(%rbp), %esi
movl -0xd8(%rbp), %edx
leaq -0xd0(%rbp), %rdi
callq 0x30d0
jmp 0x3621
jmp 0x3764
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x4178
leaq -0xd0(%rbp), %rdi
addq $0x20, %rdi
movslq -0xd4(%rbp), %rsi
callq 0x46a0
movl (%rax), %eax
movl %eax, -0xdc(%rbp)
movl -0xdc(%rbp), %eax
movl %eax, -0x2dc(%rbp)
leaq -0xd0(%rbp), %rdi
addq $0x20, %rdi
movslq -0xd4(%rbp), %rsi
callq 0x46a0
movl (%rax), %eax
movl %eax, -0x2e0(%rbp)
leaq -0xd0(%rbp), %rdi
addq $0x20, %rdi
movl -0xd4(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x46a0
movl (%rax), %eax
movl %eax, -0x2e4(%rbp)
leaq -0xd0(%rbp), %rdi
addq $0x20, %rdi
movslq -0xd4(%rbp), %rsi
callq 0x46a0
movl -0x2e4(%rbp), %edx
movl -0x2e0(%rbp), %ecx
movq %rax, %rsi
movl -0x2dc(%rbp), %eax
subl (%rsi), %edx
addl %edx, %ecx
cmpl %ecx, %eax
jge 0x3762
leaq -0xd0(%rbp), %rdi
addq $0x38, %rdi
movslq -0xdc(%rbp), %rsi
callq 0x46a0
movl (%rax), %eax
cmpl -0xd8(%rbp), %eax
jne 0x374c
leaq -0xd0(%rbp), %rdi
addq $0x8, %rdi
movslq -0xdc(%rbp), %rsi
callq 0x4950
movsd 0x88fb(%rip), %xmm0     # 0xc018
mulsd (%rax), %xmm0
movsd %xmm0, -0x2f0(%rbp)
leaq -0xd0(%rbp), %rdi
addq $0x8, %rdi
movslq -0xdc(%rbp), %rsi
callq 0x4950
movsd -0x2f0(%rbp), %xmm0
movsd %xmm0, (%rax)
jmp 0x374e
movl -0xdc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xdc(%rbp)
jmp 0x3656
jmp 0x3764
jmp 0x3766
movl -0xd8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd8(%rbp)
jmp 0x35d1
jmp 0x377c
movl -0xd4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd4(%rbp)
jmp 0x359f
leaq -0x130(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x4cf0
jmp 0x37a5
movl $0x0, -0x134(%rbp)
movl -0x134(%rbp), %eax
movl %eax, -0x2f4(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x2cf0
movl %eax, %ecx
movl -0x2f4(%rbp), %eax
cmpl %ecx, %eax
jge 0x3984
movl $0x0, -0x138(%rbp)
movl -0x138(%rbp), %eax
movl %eax, -0x2f8(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x2d00
movl %eax, %ecx
movl -0x2f8(%rbp), %eax
cmpl %ecx, %eax
jge 0x396e
leaq -0x130(%rbp), %rdi
addq $0x20, %rdi
movslq -0x134(%rbp), %rsi
callq 0x46a0
movl (%rax), %eax
movl %eax, -0x13c(%rbp)
movl -0x13c(%rbp), %eax
movl %eax, -0x2fc(%rbp)
leaq -0x130(%rbp), %rdi
addq $0x20, %rdi
movslq -0x134(%rbp), %rsi
callq 0x46a0
movl (%rax), %eax
movl %eax, -0x300(%rbp)
leaq -0x130(%rbp), %rdi
addq $0x20, %rdi
movl -0x134(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x46a0
movl (%rax), %eax
movl %eax, -0x304(%rbp)
leaq -0x130(%rbp), %rdi
addq $0x20, %rdi
movslq -0x134(%rbp), %rsi
callq 0x46a0
movl -0x304(%rbp), %edx
movl -0x300(%rbp), %ecx
movq %rax, %rsi
movl -0x2fc(%rbp), %eax
subl (%rsi), %edx
addl %edx, %ecx
cmpl %ecx, %eax
jge 0x3958
leaq -0x130(%rbp), %rdi
addq $0x38, %rdi
movslq -0x13c(%rbp), %rsi
callq 0x46a0
movl (%rax), %eax
cmpl -0x138(%rbp), %eax
jne 0x3942
leaq -0x68(%rbp), %rdi
addq $0x8, %rdi
movslq -0x134(%rbp), %rsi
callq 0x4950
movsd (%rax), %xmm0
movsd %xmm0, -0x318(%rbp)
movl -0x134(%rbp), %esi
movl -0x138(%rbp), %edx
leaq -0xd0(%rbp), %rdi
callq 0x2d20
movaps %xmm0, %xmm1
movsd -0x318(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x310(%rbp)
leaq -0x130(%rbp), %rdi
addq $0x8, %rdi
movslq -0x13c(%rbp), %rsi
callq 0x4950
movsd -0x310(%rbp), %xmm0
movsd %xmm0, (%rax)
jmp 0x3944
movl -0x13c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x13c(%rbp)
jmp 0x3828
jmp 0x395a
movl -0x138(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x138(%rbp)
jmp 0x37e1
jmp 0x3970
movl -0x134(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x134(%rbp)
jmp 0x37af
movq -0x2b0(%rbp), %rdi
callq 0x49e0
movq %rax, -0x328(%rbp)
leaq -0x159(%rbp), %rdi
movq %rdi, -0x320(%rbp)
callq 0x4a00
movq -0x328(%rbp), %rsi
movq -0x320(%rbp), %rdx
leaq -0x158(%rbp), %rdi
callq 0x4a20
jmp 0x39c6
leaq -0x159(%rbp), %rdi
callq 0x4a90
movq -0x2b0(%rbp), %rsi
leaq -0x190(%rbp), %rdi
callq 0x4da0
jmp 0x39e7
leaq -0x178(%rbp), %rdi
leaq -0x68(%rbp), %rsi
leaq -0x190(%rbp), %rdx
callq 0x2f90
jmp 0x3a00
leaq -0x158(%rbp), %rdi
movq %rdi, -0x330(%rbp)
leaq -0x178(%rbp), %rsi
movq %rsi, -0x338(%rbp)
callq 0x4e90
movq -0x338(%rbp), %rdi
callq 0x4720
leaq -0x190(%rbp), %rdi
callq 0x4720
movq -0x2a0(%rbp), %rdi
movq -0x330(%rbp), %rsi
movb $0x0, -0x191(%rbp)
callq 0x4da0
jmp 0x3a55
movq -0x2a0(%rbp), %rdi
callq 0x49e0
movq %rax, -0x348(%rbp)
leaq -0x1b1(%rbp), %rdi
movq %rdi, -0x340(%rbp)
callq 0x4a00
movq -0x348(%rbp), %rsi
movq -0x340(%rbp), %rdx
leaq -0x1b0(%rbp), %rdi
callq 0x4a20
jmp 0x3a97
leaq -0x1b1(%rbp), %rdi
callq 0x4a90
movq -0x2a0(%rbp), %rsi
leaq -0x1e8(%rbp), %rdi
callq 0x4da0
jmp 0x3ab8
movq -0x2a8(%rbp), %rsi
leaq -0x1d0(%rbp), %rdi
leaq -0x1e8(%rbp), %rdx
callq 0x2f90
jmp 0x3ad4
leaq -0x1b0(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
callq 0x4e90
leaq -0x1d0(%rbp), %rdi
callq 0x4720
leaq -0x1e8(%rbp), %rdi
callq 0x4720
movl $0x0, -0x1ec(%rbp)
movq -0x2b0(%rbp), %rdi
movl -0x1ec(%rbp), %eax
movq %rax, -0x350(%rbp)
callq 0x49e0
movq %rax, %rcx
movq -0x350(%rbp), %rax
cmpq %rcx, %rax
jae 0x3c8f
movl -0x1ec(%rbp), %eax
movl %eax, %esi
leaq -0x1b0(%rbp), %rdi
callq 0x4950
movsd 0x84c7(%rip), %xmm0     # 0xc018
mulsd (%rax), %xmm0
movsd %xmm0, -0x368(%rbp)
movl -0x1ec(%rbp), %eax
movl %eax, %esi
leaq -0x1b0(%rbp), %rdi
callq 0x4950
movsd -0x368(%rbp), %xmm0
movq -0x2b0(%rbp), %rdi
movsd %xmm0, (%rax)
movl -0x1ec(%rbp), %eax
movl %eax, %esi
callq 0x4950
movsd (%rax), %xmm0
movsd %xmm0, -0x360(%rbp)
movl -0x1ec(%rbp), %eax
movl %eax, %esi
leaq -0x1b0(%rbp), %rdi
callq 0x4950
movsd -0x360(%rbp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, -0x358(%rbp)
movl -0x1ec(%rbp), %eax
movl %eax, %esi
leaq -0x1b0(%rbp), %rdi
callq 0x4950
movsd -0x358(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x1ec(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1ec(%rbp)
jmp 0x3b09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x159(%rbp), %rdi
callq 0x4a90
jmp 0x416c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x4160
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x4720
jmp 0x4160
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x1b1(%rbp), %rdi
callq 0x4a90
jmp 0x4154
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x40fd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x1e8(%rbp), %rdi
callq 0x4720
jmp 0x40fd
movq -0x2b0(%rbp), %rdi
movl $0x0, -0x1f0(%rbp)
callq 0x49e0
movq %rax, -0x378(%rbp)
leaq -0x209(%rbp), %rdi
movq %rdi, -0x370(%rbp)
callq 0x4a00
movq -0x378(%rbp), %rsi
movq -0x370(%rbp), %rdx
leaq -0x208(%rbp), %rdi
callq 0x4a20
jmp 0x3cdb
leaq -0x209(%rbp), %rdi
callq 0x4a90
movq -0x2b0(%rbp), %rdi
callq 0x49e0
movq %rax, -0x388(%rbp)
leaq -0x229(%rbp), %rdi
movq %rdi, -0x380(%rbp)
callq 0x4a00
movq -0x388(%rbp), %rsi
movq -0x380(%rbp), %rdx
leaq -0x228(%rbp), %rdi
callq 0x4a20
jmp 0x3d29
leaq -0x229(%rbp), %rdi
callq 0x4a90
movsd 0x82d3(%rip), %xmm0     # 0xc010
movsd %xmm0, -0x238(%rbp)
leaq -0x250(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x4da0
jmp 0x3d5a
leaq -0x250(%rbp), %rdi
callq 0x3330
movsd %xmm0, -0x390(%rbp)
movsd -0x238(%rbp), %xmm0
movsd %xmm0, -0x398(%rbp)
leaq -0x250(%rbp), %rdi
callq 0x4720
movsd -0x398(%rbp), %xmm1
movsd -0x390(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x40af
movl -0x1f0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1f0(%rbp)
movl $0x0, -0x254(%rbp)
movq -0x2b0(%rbp), %rdi
movl -0x254(%rbp), %eax
movq %rax, -0x3a0(%rbp)
callq 0x49e0
movq %rax, %rcx
movq -0x3a0(%rbp), %rax
cmpq %rcx, %rax
jae 0x3e85
movq -0x2a0(%rbp), %rdi
movl -0x254(%rbp), %eax
movl %eax, %esi
callq 0x4950
movsd (%rax), %xmm0
movsd %xmm0, -0x3a8(%rbp)
movl -0x254(%rbp), %eax
movl %eax, %esi
leaq -0x208(%rbp), %rdi
callq 0x4950
movsd -0x3a8(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x254(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x254(%rbp)
jmp 0x3dbd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x209(%rbp), %rdi
callq 0x4a90
jmp 0x40fd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x229(%rbp), %rdi
callq 0x4a90
jmp 0x40f1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x40e5
leaq -0x288(%rbp), %rdi
leaq -0x208(%rbp), %rsi
callq 0x4da0
jmp 0x3e9a
leaq -0x270(%rbp), %rdi
leaq -0x130(%rbp), %rsi
leaq -0x288(%rbp), %rdx
callq 0x2f90
jmp 0x3eb6
leaq -0x228(%rbp), %rdi
leaq -0x270(%rbp), %rsi
callq 0x4e90
leaq -0x270(%rbp), %rdi
callq 0x4720
leaq -0x288(%rbp), %rdi
callq 0x4720
movl $0x0, -0x28c(%rbp)
movq -0x2a0(%rbp), %rdi
movl -0x28c(%rbp), %eax
movq %rax, -0x3b0(%rbp)
callq 0x49e0
movq %rax, %rcx
movq -0x3b0(%rbp), %rax
cmpq %rcx, %rax
jae 0x3fb0
movl -0x28c(%rbp), %eax
movl %eax, %esi
leaq -0x228(%rbp), %rdi
callq 0x4950
movsd (%rax), %xmm0
movsd %xmm0, -0x3c0(%rbp)
movl -0x28c(%rbp), %eax
movl %eax, %esi
leaq -0x158(%rbp), %rdi
callq 0x4950
movsd -0x3c0(%rbp), %xmm0
movq -0x2a0(%rbp), %rdi
addsd (%rax), %xmm0
movsd %xmm0, -0x3b8(%rbp)
movl -0x28c(%rbp), %eax
movl %eax, %esi
callq 0x4950
movsd -0x3b8(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x28c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28c(%rbp)
jmp 0x3eeb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x288(%rbp), %rdi
callq 0x4720
jmp 0x40e5
movl $0x0, -0x290(%rbp)
movq -0x2b0(%rbp), %rdi
movl -0x290(%rbp), %eax
movq %rax, -0x3c8(%rbp)
callq 0x49e0
movq %rax, %rcx
movq -0x3c8(%rbp), %rax
cmpq %rcx, %rax
jae 0x40aa
movq -0x2a0(%rbp), %rdi
movl -0x290(%rbp), %eax
movl %eax, %esi
callq 0x4950
movsd 0x8016(%rip), %xmm0     # 0xc018
mulsd (%rax), %xmm0
movsd %xmm0, -0x3e0(%rbp)
movl -0x290(%rbp), %eax
movl %eax, %esi
leaq -0x1b0(%rbp), %rdi
callq 0x4950
movsd -0x3e0(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x290(%rbp), %eax
movl %eax, %esi
leaq -0x208(%rbp), %rdi
callq 0x4950
movsd (%rax), %xmm0
movsd %xmm0, -0x3d8(%rbp)
movl -0x290(%rbp), %eax
movl %eax, %esi
leaq -0x1b0(%rbp), %rdi
callq 0x4950
movsd -0x3d8(%rbp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, -0x3d0(%rbp)
movl -0x290(%rbp), %eax
movl %eax, %esi
leaq -0x1b0(%rbp), %rdi
callq 0x4950
movsd -0x3d0(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x290(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x290(%rbp)
jmp 0x3fba
jmp 0x3d45
movb $0x1, -0x191(%rbp)
leaq -0x228(%rbp), %rdi
callq 0x4720
leaq -0x208(%rbp), %rdi
callq 0x4720
leaq -0x1b0(%rbp), %rdi
callq 0x4720
testb $0x1, -0x191(%rbp)
jne 0x4117
jmp 0x410b
leaq -0x228(%rbp), %rdi
callq 0x4720
leaq -0x208(%rbp), %rdi
callq 0x4720
leaq -0x1b0(%rbp), %rdi
callq 0x4720
jmp 0x4154
movq -0x2a0(%rbp), %rdi
callq 0x4720
leaq -0x158(%rbp), %rdi
callq 0x4720
leaq -0x130(%rbp), %rdi
callq 0x4ec0
leaq -0xd0(%rbp), %rdi
callq 0x4ec0
leaq -0x68(%rbp), %rdi
callq 0x4ec0
movq -0x298(%rbp), %rax
addq $0x3e0, %rsp            # imm = 0x3E0
popq %rbp
retq
movq -0x2a0(%rbp), %rdi
callq 0x4720
leaq -0x158(%rbp), %rdi
callq 0x4720
leaq -0x130(%rbp), %rdi
callq 0x4ec0
leaq -0xd0(%rbp), %rdi
callq 0x4ec0
leaq -0x68(%rbp), %rdi
callq 0x4ec0
movq -0x78(%rbp), %rdi
callq 0x2310
nopw %cs:(%rax,%rax)