// File: /workspace/github_cpp_makefile_star2_O3/j-faria[P]kima/src/RVmodel.cpp
// Function: RVmodel::perturb(DNest4::RNG&)
double RVmodel::perturb(RNG& rng)
{
    #if TIMING
    auto begin = std::chrono::high_resolution_clock::now();  // start timing
    #endif

    auto data = Data::get_instance();
    const vector<double>& t = data.get_t();
    const vector<int>& obsi = data.get_obsi();
    auto actind = data.get_actind();
    double logH = 0.;
    double tmid = data.get_t_middle();

    if(GP)
    {
        if(rng.rand() <= 0.5) // perturb planet parameters
        {
            logH += planets.perturb(rng);
            planets.consolidate_diff();
            calculate_mu();
        }
        else if(rng.rand() <= 0.5) // perturb GP parameters
        {
            switch (kernel)
            {
                case standard:
                {
                    if(rng.rand() <= 0.25)
                    {
                        log_eta1 = log(eta1);
                        log_eta1_prior->perturb(log_eta1, rng);
                        eta1 = exp(log_eta1);
                    }
                    else if(rng.rand() <= 0.33330)
                    {
                        // log_eta2 = log(eta2);
                        // log_eta2_prior->perturb(log_eta2, rng);
                        // eta2 = exp(log_eta2);
                        eta2_prior->perturb(eta2, rng);
                    }
                    else if(rng.rand() <= 0.5)
                    {
                        eta3_prior->perturb(eta3, rng);
                    }
                    else
                    {
                        log_eta4 = log(eta4);
                        log_eta4_prior->perturb(log_eta4, rng);
                        eta4 = exp(log_eta4);
                    }

                    break;
                }

                case celerite:
                {
                    if(rng.rand() <= 0.33330)
                    {
                        log_eta1 = log(eta1);
                        log_eta1_prior->perturb(log_eta1, rng);
                        eta1 = exp(log_eta1);
                    }
                    else if(rng.rand() <= 0.5)
                    {
                        // log_eta2 = log(eta2);
                        // log_eta2_prior->perturb(log_eta2, rng);
                        // eta2 = exp(log_eta2);
                        eta2_prior->perturb(eta2, rng);
                    }
                    else
                    {
                        eta3_prior->perturb(eta3, rng);
                    }
                    break;
                }
                default:
                    break;
            }

            calculate_C();
        }
        else if(rng.rand() <= 0.5) // perturb jitter(s) + known_object
        {
            if(multi_instrument)
            {
                for(int i=0; i<jitters.size(); i++)
                    Jprior->perturb(jitters[i], rng);
            }
            else
            {
                Jprior->perturb(extra_sigma, rng);
            }

            calculate_C(); // recalculate covariance matrix

            if (known_object)
            {
                remove_known_object();

                for (int i=0; i<n_known_object; i++){
                    KO_Pprior[i]->perturb(KO_P[i], rng);
                    KO_Kprior[i]->perturb(KO_K[i], rng);
                    KO_eprior[i]->perturb(KO_e[i], rng);
                    KO_phiprior[i]->perturb(KO_phi[i], rng);
                    KO_wprior[i]->perturb(KO_w[i], rng);
                }

                add_known_object();
            }

        }
        else // perturb other parameters: vsys, slope, offsets
        {
            for(size_t i=0; i<mu.size(); i++)
            {
                mu[i] -= background;
                if(trend) {
                    mu[i] -= slope*(t[i]-data.get_t_middle());
                }
                if(multi_instrument) {
                    for(size_t j=0; j<offsets.size(); j++){
                        if (obsi[i] == j+1) { mu[i] -= offsets[j]; }
                    }
                }

                if(data.indicator_correlations) {
                    for(size_t j = 0; j < data.number_indicators; j++){
                        mu[i] -= betas[j] * actind[j][i];
                    }
                }

            }

            Cprior->perturb(background, rng);

            // propose new instrument offsets
            if (multi_instrument){
                for(unsigned j=0; j<offsets.size(); j++)
                    offsets_prior->perturb(offsets[j], rng);
            }

            // propose new slope
            if(trend) {
                slope_prior->perturb(slope, rng);
            }

            // propose new indicator correlations
            if(data.indicator_correlations){
                for(size_t j = 0; j < data.number_indicators; j++){
                    betaprior->perturb(betas[j], rng);
                }
            }

            for(size_t i=0; i<mu.size(); i++)
            {
                mu[i] += background;
                if(trend) {
                    mu[i] += slope*(t[i]-data.get_t_middle());
                }
                if(multi_instrument) {
                    for(size_t j=0; j<offsets.size(); j++){
                        if (obsi[i] == j+1) { mu[i] += offsets[j]; }
                    }
                }

                if(data.indicator_correlations) {
                    for(size_t j = 0; j < data.number_indicators; j++){
                        mu[i] += betas[j]*actind[j][i];
                    }
                }
                
            }
        }

    }

    else if(MA)
    {
        if(rng.rand() <= 0.5) // perturb planet parameters
        {
            logH += planets.perturb(rng);
            planets.consolidate_diff();
            calculate_mu();
        }
        else if(rng.rand() <= 0.5) // perturb MA parameters
        {
            if(rng.rand() <= 0.5)
                sigmaMA_prior->perturb(sigmaMA, rng);
            else
                tauMA_prior->perturb(tauMA, rng);
            
            calculate_mu();
        }
        else if(rng.rand() <= 0.5) // perturb jitter(s)
        {
            if(multi_instrument)
            {
                for(int i=0; i<jitters.size(); i++)
                    Jprior->perturb(jitters[i], rng);
            }
            else
            {
                Jprior->perturb(extra_sigma, rng);
            }
            calculate_C();
        }
        else // perturb other parameters: vsys, slope, offsets
        {
            for(size_t i=0; i<mu.size(); i++)
            {
                mu[i] -= background;
                if(trend) {
                    mu[i] -= slope*(t[i]-data.get_t_middle());
                }
                if(multi_instrument) {
                    for(size_t j=0; j<offsets.size(); j++){
                        if (obsi[i] == j+1) { mu[i] -= offsets[j]; }
                    }
                }

                if(data.indicator_correlations) {
                    for(size_t j = 0; j < data.number_indicators; j++){
                        mu[i] -= betas[j] * actind[j][i];
                    }
                }

            }

            Cprior->perturb(background, rng);

            // propose new instrument offsets
            if (multi_instrument){
                for(unsigned j=0; j<offsets.size(); j++)
                    offsets_prior->perturb(offsets[j], rng);
            }

            // propose new slope
            if(trend) {
                slope_prior->perturb(slope, rng);
            }

            if(data.indicator_correlations){
                for(size_t j = 0; j < data.number_indicators; j++){
                    betaprior->perturb(betas[j], rng);
                }
            }

            for(size_t i=0; i<mu.size(); i++)
            {
                mu[i] += background;
                if(trend) {
                    mu[i] += slope*(t[i]-data.get_t_middle());
                }
                if(multi_instrument) {
                    for(size_t j=0; j<offsets.size(); j++){
                        if (obsi[i] == j+1) { mu[i] += offsets[j]; }
                    }
                }

                if(data.indicator_correlations) {
                    for(size_t j = 0; j < data.number_indicators; j++){
                        mu[i] += betas[j]*actind[j][i];
                    }
                }
                
            }
        }

    }

    else
    {
        if(rng.rand() <= 0.75) // perturb planet parameters
        {
            logH += planets.perturb(rng);
            planets.consolidate_diff();
            calculate_mu();
        }
        else if(rng.rand() <= 0.5) // perturb jitter(s) + known_object
        {
            if(multi_instrument)
            {
                for(int i=0; i<jitters.size(); i++)
                    Jprior->perturb(jitters[i], rng);
            }
            else
            {
                Jprior->perturb(extra_sigma, rng);
            }

            if (studentt)
                nu_prior->perturb(nu, rng);


            if (known_object)
            {
                remove_known_object();

                for (int i=0; i<n_known_object; i++){
                    KO_Pprior[i]->perturb(KO_P[i], rng);
                    KO_Kprior[i]->perturb(KO_K[i], rng);
                    KO_eprior[i]->perturb(KO_e[i], rng);
                    KO_phiprior[i]->perturb(KO_phi[i], rng);
                    KO_wprior[i]->perturb(KO_w[i], rng);
                }

                add_known_object();
            }
        
        }
        else
        {
            for(size_t i=0; i<mu.size(); i++)
            {
                mu[i] -= background;
                if(trend) {
                    mu[i] -= slope*(t[i]-tmid) + quadr*pow(t[i]-tmid, 2) + cubic*pow(t[i]-tmid, 3);
                }
                if(multi_instrument) {
                    for(size_t j=0; j<offsets.size(); j++){
                        if (obsi[i] == j+1) { mu[i] -= offsets[j]; }
                    }
                }

                if(data.indicator_correlations) {
                    for(size_t j = 0; j < data.number_indicators; j++){
                        mu[i] -= betas[j] * actind[j][i];
                    }
                }
            }

            // propose new vsys
            Cprior->perturb(background, rng);

            // propose new instrument offsets
            if (multi_instrument){
                for(unsigned j=0; j<offsets.size(); j++){
                    offsets_prior->perturb(offsets[j], rng);
                }
            }

            // propose new slope
            if(trend) {
                if (degree >= 1) slope_prior->perturb(slope, rng);
                if (degree >= 2) quadr_prior->perturb(quadr, rng);
                if (degree == 3) cubic_prior->perturb(cubic, rng);
            }

            // propose new indicator correlations
            if(data.indicator_correlations){
                for(size_t j = 0; j < data.number_indicators; j++){
                    betaprior->perturb(betas[j], rng);
                }
            }

            for(size_t i=0; i<mu.size(); i++)
            {
                mu[i] += background;
                if(trend) {
                    mu[i] += slope*(t[i]-tmid) + quadr*pow(t[i]-tmid, 2) + cubic*pow(t[i]-tmid, 3);
                }
                if(multi_instrument) {
                    for(size_t j=0; j<offsets.size(); j++){
                        if (obsi[i] == j+1) { mu[i] += offsets[j]; }
                    }
                }

                if(data.indicator_correlations) {
                    for(size_t j = 0; j < data.number_indicators; j++){
                        mu[i] += betas[j]*actind[j][i];
                    }
                }
            }
        }
    }


    #if TIMING
    auto end = std::chrono::high_resolution_clock::now();
    cout << "Perturb took ";
    cout << std::chrono::duration_cast<std::chrono::nanoseconds>(end-begin).count()*1E-6;
    cout << " ms" << std::endl;
    #endif

    return logH;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x401ec(%rip), %rsi     # 0x50400
leaq 0xa0(%rsp), %rdi
callq 0x15552
leaq 0x100(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x15b98
leaq 0xa0(%rsp), %rdi
callq 0x15c32
movsd %xmm0, 0x8(%rsp)
leaq 0x3268f(%rip), %rax     # 0x428dc
cmpb $0x1, (%rax)
jne 0x10660
movq %r14, %rdi
callq 0x39a4e
movsd 0x2cf32(%rip), %xmm1    # 0x3d198
ucomisd %xmm0, %xmm1
jae 0x10f08
movq %r14, %rdi
callq 0x39a4e
movsd 0x2cf18(%rip), %xmm1    # 0x3d198
ucomisd %xmm0, %xmm1
jae 0x10f9e
movq %r14, %rdi
callq 0x39a4e
movsd 0x2cefe(%rip), %xmm1    # 0x3d198
ucomisd %xmm0, %xmm1
jae 0x110ec
movq 0x380(%rbx), %rax
cmpq %rax, 0x388(%rbx)
je 0x10412
leaq 0x32620(%rip), %rcx     # 0x428df
movb (%rcx), %bpl
leaq 0x3261b(%rip), %rcx     # 0x428e4
movb (%rcx), %r12b
xorl %r13d, %r13d
movq %r13, %r15
shlq $0x4, %r15
fldt (%rax,%r15)
fsubl 0x120(%rbx)
fstpt (%rax,%r15)
testb %bpl, %bpl
je 0x10343
movsd 0x170(%rbx), %xmm0
movsd %xmm0, (%rsp)
movq 0xa0(%rsp), %rax
movsd (%rax,%r13,8), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x15c32
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd (%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x58(%rsp)
movq 0x380(%rbx), %rax
fldt (%rax,%r15)
fsubl 0x58(%rsp)
fstpt (%rax,%r15)
testb $0x1, %r12b
je 0x10397
movq 0x128(%rbx), %rax
movq 0x130(%rbx), %rcx
subq %rax, %rcx
je 0x10397
sarq $0x3, %rcx
movq 0xe8(%rsp), %rdx
movslq (%rdx,%r13,4), %rdx
movq 0x380(%rbx), %rsi
addq %r15, %rsi
cmpq $0x1, %rcx
adcq $0x0, %rcx
decq %rdx
xorl %edi, %edi
cmpq %rdi, %rdx
jne 0x1038f
fldt (%rsi)
fsubl (%rax,%rdi,8)
fstpt (%rsi)
incq %rdi
cmpq %rdi, %rcx
jne 0x10383
cmpb $0x1, 0x118(%rsp)
jne 0x103f1
movslq 0x11c(%rsp), %rax
testq %rax, %rax
je 0x103f1
movq 0x158(%rbx), %rcx
movq 0x20(%rsp), %rdx
movq 0x380(%rbx), %rdi
leaq (%rdi,%r15), %rsi
fldt (%rdi,%r15)
xorl %edi, %edi
movsd (%rcx,%rdi,8), %xmm0
movq (%rdx), %r8
mulsd (%r8,%r13,8), %xmm0
movsd %xmm0, 0x50(%rsp)
fsubl 0x50(%rsp)
incq %rdi
addq $0x18, %rdx
cmpq %rdi, %rax
jne 0x103cb
fstpt (%rsi)
incq %r13
movq 0x380(%rbx), %rax
movq 0x388(%rbx), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
cmpq %rcx, %r13
jb 0x102cf
movq 0x3b8(%rbx), %rdi
leaq 0x120(%rbx), %rsi
movq %rsi, 0x18(%rsp)
movq %r14, %rdx
callq 0x3ac36
leaq 0x324b0(%rip), %rax     # 0x428e4
movb (%rax), %bpl
cmpb $0x1, %bpl
jne 0x10488
movq 0x128(%rbx), %rax
cmpq %rax, 0x130(%rbx)
je 0x10488
movl $0x1, %r12d
xorl %ecx, %ecx
movq 0x408(%rbx), %rdi
leaq (%rax,%rcx,8), %rsi
movq %r14, %rdx
callq 0x3ac36
movl %r12d, %ecx
movq 0x128(%rbx), %rax
movq 0x130(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
incl %r12d
cmpq %rcx, %rdx
ja 0x10455
leaq 0x32450(%rip), %rax     # 0x428df
movb (%rax), %r12b
cmpb $0x1, %r12b
jne 0x104ae
movq 0x3d8(%rbx), %rdi
leaq 0x170(%rbx), %rsi
movq %r14, %rdx
callq 0x3ac36
cmpb $0x1, 0x118(%rsp)
jne 0x104f5
cmpl $0x0, 0x11c(%rsp)
je 0x104f5
xorl %r13d, %r13d
xorl %r15d, %r15d
movq 0x418(%rbx), %rdi
movq 0x158(%rbx), %rsi
addq %r13, %rsi
movq %r14, %rdx
callq 0x3ac36
incq %r15
movslq 0x11c(%rsp), %rax
addq $0x8, %r13
cmpq %rax, %r15
jb 0x104c8
movq 0x380(%rbx), %rax
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
cmpq %rax, 0x388(%rbx)
je 0x114d4
xorl %r13d, %r13d
movq 0x18(%rsp), %r15
movq %r13, %r14
shlq $0x4, %r14
fldt (%rax,%r14)
faddl (%r15)
fstpt (%rax,%r14)
testb %r12b, %r12b
je 0x1058d
movsd 0x170(%rbx), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0xa0(%rsp), %rax
movsd (%rax,%r13,8), %xmm0
movsd %xmm0, 0x10(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x15c32
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x48(%rsp)
movq 0x380(%rbx), %rax
fldt (%rax,%r14)
faddl 0x48(%rsp)
fstpt (%rax,%r14)
testb %bpl, %bpl
je 0x105e0
movq 0x128(%rbx), %rax
movq 0x130(%rbx), %rcx
subq %rax, %rcx
je 0x105e0
sarq $0x3, %rcx
movq 0xe8(%rsp), %rdx
movslq (%rdx,%r13,4), %rdx
cmpq $0x1, %rcx
adcq $0x0, %rcx
movq 0x380(%rbx), %rsi
addq %r14, %rsi
decq %rdx
xorl %edi, %edi
cmpq %rdi, %rdx
jne 0x105d8
fldt (%rsi)
faddl (%rax,%rdi,8)
fstpt (%rsi)
incq %rdi
cmpq %rdi, %rcx
jne 0x105cc
cmpb $0x1, 0x118(%rsp)
jne 0x1063a
movslq 0x11c(%rsp), %rax
testq %rax, %rax
je 0x1063a
movq 0x158(%rbx), %rcx
movq 0x20(%rsp), %rdx
movq 0x380(%rbx), %rdi
leaq (%rdi,%r14), %rsi
fldt (%rdi,%r14)
xorl %edi, %edi
movsd (%rcx,%rdi,8), %xmm0
movq (%rdx), %r8
mulsd (%r8,%r13,8), %xmm0
movsd %xmm0, 0x40(%rsp)
faddl 0x40(%rsp)
incq %rdi
addq $0x18, %rdx
cmpq %rdi, %rax
jne 0x10614
fstpt (%rsi)
incq %r13
movq 0x380(%rbx), %rax
movq 0x388(%rbx), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
cmpq %rcx, %r13
jb 0x1051a
jmp 0x114d4
leaq 0x32276(%rip), %rax     # 0x428dd
cmpb $0x1, (%rax)
jne 0x10a7a
movq %r14, %rdi
callq 0x39a4e
movsd 0x2cb18(%rip), %xmm1    # 0x3d198
ucomisd %xmm0, %xmm1
jae 0x10f33
movq %r14, %rdi
callq 0x39a4e
movsd 0x2cafe(%rip), %xmm1    # 0x3d198
ucomisd %xmm0, %xmm1
jae 0x1103d
movq %r14, %rdi
callq 0x39a4e
movsd 0x2cae4(%rip), %xmm1    # 0x3d198
ucomisd %xmm0, %xmm1
jae 0x112ad
movq 0x380(%rbx), %rax
cmpq %rax, 0x388(%rbx)
je 0x1082c
leaq 0x32206(%rip), %rcx     # 0x428df
movb (%rcx), %bpl
leaq 0x32201(%rip), %rcx     # 0x428e4
movb (%rcx), %r12b
xorl %r13d, %r13d
movq %r13, %r15
shlq $0x4, %r15
fldt (%rax,%r15)
fsubl 0x120(%rbx)
fstpt (%rax,%r15)
testb %bpl, %bpl
je 0x1075d
movsd 0x170(%rbx), %xmm0
movsd %xmm0, (%rsp)
movq 0xa0(%rsp), %rax
movsd (%rax,%r13,8), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x15c32
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd (%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x78(%rsp)
movq 0x380(%rbx), %rax
fldt (%rax,%r15)
fsubl 0x78(%rsp)
fstpt (%rax,%r15)
testb $0x1, %r12b
je 0x107b1
movq 0x128(%rbx), %rax
movq 0x130(%rbx), %rcx
subq %rax, %rcx
je 0x107b1
sarq $0x3, %rcx
movq 0xe8(%rsp), %rdx
movslq (%rdx,%r13,4), %rdx
movq 0x380(%rbx), %rsi
addq %r15, %rsi
cmpq $0x1, %rcx
adcq $0x0, %rcx
decq %rdx
xorl %edi, %edi
cmpq %rdi, %rdx
jne 0x107a9
fldt (%rsi)
fsubl (%rax,%rdi,8)
fstpt (%rsi)
incq %rdi
cmpq %rdi, %rcx
jne 0x1079d
cmpb $0x1, 0x118(%rsp)
jne 0x1080b
movslq 0x11c(%rsp), %rax
testq %rax, %rax
je 0x1080b
movq 0x158(%rbx), %rcx
movq 0x20(%rsp), %rdx
movq 0x380(%rbx), %rdi
leaq (%rdi,%r15), %rsi
fldt (%rdi,%r15)
xorl %edi, %edi
movsd (%rcx,%rdi,8), %xmm0
movq (%rdx), %r8
mulsd (%r8,%r13,8), %xmm0
movsd %xmm0, 0x70(%rsp)
fsubl 0x70(%rsp)
incq %rdi
addq $0x18, %rdx
cmpq %rdi, %rax
jne 0x107e5
fstpt (%rsi)
incq %r13
movq 0x380(%rbx), %rax
movq 0x388(%rbx), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
cmpq %rcx, %r13
jb 0x106e9
movq 0x3b8(%rbx), %rdi
leaq 0x120(%rbx), %rsi
movq %rsi, 0x18(%rsp)
movq %r14, %rdx
callq 0x3ac36
leaq 0x32096(%rip), %rax     # 0x428e4
movb (%rax), %bpl
cmpb $0x1, %bpl
jne 0x108a2
movq 0x128(%rbx), %rax
cmpq %rax, 0x130(%rbx)
je 0x108a2
movl $0x1, %r12d
xorl %ecx, %ecx
movq 0x408(%rbx), %rdi
leaq (%rax,%rcx,8), %rsi
movq %r14, %rdx
callq 0x3ac36
movl %r12d, %ecx
movq 0x128(%rbx), %rax
movq 0x130(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
incl %r12d
cmpq %rcx, %rdx
ja 0x1086f
leaq 0x32036(%rip), %rax     # 0x428df
movb (%rax), %r12b
cmpb $0x1, %r12b
jne 0x108c8
movq 0x3d8(%rbx), %rdi
leaq 0x170(%rbx), %rsi
movq %r14, %rdx
callq 0x3ac36
cmpb $0x1, 0x118(%rsp)
jne 0x1090f
cmpl $0x0, 0x11c(%rsp)
je 0x1090f
xorl %r13d, %r13d
xorl %r15d, %r15d
movq 0x418(%rbx), %rdi
movq 0x158(%rbx), %rsi
addq %r13, %rsi
movq %r14, %rdx
callq 0x3ac36
incq %r15
movslq 0x11c(%rsp), %rax
addq $0x8, %r13
cmpq %rax, %r15
jb 0x108e2
movq 0x380(%rbx), %rax
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
cmpq %rax, 0x388(%rbx)
je 0x114d4
xorl %r13d, %r13d
movq 0x18(%rsp), %r15
movq %r13, %r14
shlq $0x4, %r14
fldt (%rax,%r14)
faddl (%r15)
fstpt (%rax,%r14)
testb %r12b, %r12b
je 0x109a7
movsd 0x170(%rbx), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0xa0(%rsp), %rax
movsd (%rax,%r13,8), %xmm0
movsd %xmm0, 0x10(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x15c32
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x68(%rsp)
movq 0x380(%rbx), %rax
fldt (%rax,%r14)
faddl 0x68(%rsp)
fstpt (%rax,%r14)
testb %bpl, %bpl
je 0x109fa
movq 0x128(%rbx), %rax
movq 0x130(%rbx), %rcx
subq %rax, %rcx
je 0x109fa
sarq $0x3, %rcx
movq 0xe8(%rsp), %rdx
movslq (%rdx,%r13,4), %rdx
cmpq $0x1, %rcx
adcq $0x0, %rcx
movq 0x380(%rbx), %rsi
addq %r14, %rsi
decq %rdx
xorl %edi, %edi
cmpq %rdi, %rdx
jne 0x109f2
fldt (%rsi)
faddl (%rax,%rdi,8)
fstpt (%rsi)
incq %rdi
cmpq %rdi, %rcx
jne 0x109e6
cmpb $0x1, 0x118(%rsp)
jne 0x10a54
movslq 0x11c(%rsp), %rax
testq %rax, %rax
je 0x10a54
movq 0x158(%rbx), %rcx
movq 0x20(%rsp), %rdx
movq 0x380(%rbx), %rdi
leaq (%rdi,%r14), %rsi
fldt (%rdi,%r14)
xorl %edi, %edi
movsd (%rcx,%rdi,8), %xmm0
movq (%rdx), %r8
mulsd (%r8,%r13,8), %xmm0
movsd %xmm0, 0x60(%rsp)
faddl 0x60(%rsp)
incq %rdi
addq $0x18, %rdx
cmpq %rdi, %rax
jne 0x10a2e
fstpt (%rsi)
incq %r13
movq 0x380(%rbx), %rax
movq 0x388(%rbx), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
cmpq %rcx, %r13
jb 0x10934
jmp 0x114d4
movq %r14, %rdi
callq 0x39a4e
movsd 0x2cc66(%rip), %xmm1    # 0x3d6f0
ucomisd %xmm0, %xmm1
jae 0x10f5e
movq %r14, %rdi
callq 0x39a4e
movsd 0x2c6f4(%rip), %xmm1    # 0x3d198
ucomisd %xmm0, %xmm1
jae 0x1108a
movq 0x380(%rbx), %rax
cmpq %rax, 0x388(%rbx)
je 0x10c45
leaq 0x31e16(%rip), %rcx     # 0x428df
movb (%rcx), %bpl
leaq 0x31e11(%rip), %rcx     # 0x428e4
movb (%rcx), %r15b
xorl %r12d, %r12d
movq %r12, %r13
shlq $0x4, %r13
fldt (%rax,%r13)
fsubl 0x120(%rbx)
fstpt (%rax,%r13)
testb %bpl, %bpl
je 0x10b71
movq 0xa0(%rsp), %rax
movsd (%rax,%r12,8), %xmm0
subsd 0x8(%rsp), %xmm0
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
mulsd 0x178(%rbx), %xmm1
movsd 0x170(%rbx), %xmm2
mulsd %xmm0, %xmm2
addsd %xmm1, %xmm2
movsd %xmm2, (%rsp)
movsd 0x180(%rbx), %xmm1
movsd %xmm1, 0x10(%rsp)
movsd 0x2cb7e(%rip), %xmm1    # 0x3d6c0
callq 0x66f0
mulsd 0x10(%rsp), %xmm0
addsd (%rsp), %xmm0
movsd %xmm0, 0x98(%rsp)
movq 0x380(%rbx), %rax
fldt (%rax,%r13)
fsubl 0x98(%rsp)
fstpt (%rax,%r13)
testb %r15b, %r15b
je 0x10bc4
movq 0x128(%rbx), %rax
movq 0x130(%rbx), %rcx
subq %rax, %rcx
je 0x10bc4
sarq $0x3, %rcx
movq 0xe8(%rsp), %rdx
movslq (%rdx,%r12,4), %rdx
movq 0x380(%rbx), %rsi
addq %r13, %rsi
cmpq $0x1, %rcx
adcq $0x0, %rcx
decq %rdx
xorl %edi, %edi
cmpq %rdi, %rdx
jne 0x10bbc
fldt (%rsi)
fsubl (%rax,%rdi,8)
fstpt (%rsi)
incq %rdi
cmpq %rdi, %rcx
jne 0x10bb0
cmpb $0x1, 0x118(%rsp)
jne 0x10c24
movslq 0x11c(%rsp), %rax
testq %rax, %rax
je 0x10c24
movq 0x158(%rbx), %rcx
movq 0x20(%rsp), %rdx
movq 0x380(%rbx), %rdi
leaq (%rdi,%r13), %rsi
fldt (%rdi,%r13)
xorl %edi, %edi
movsd (%rcx,%rdi,8), %xmm0
movq (%rdx), %r8
mulsd (%r8,%r12,8), %xmm0
movsd %xmm0, 0x90(%rsp)
fsubl 0x90(%rsp)
incq %rdi
addq $0x18, %rdx
cmpq %rdi, %rax
jne 0x10bf8
fstpt (%rsi)
incq %r12
movq 0x380(%rbx), %rax
movq 0x388(%rbx), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
cmpq %rcx, %r12
jb 0x10ad9
movq 0x3b8(%rbx), %rdi
leaq 0x120(%rbx), %rsi
movq %rsi, 0x38(%rsp)
movq %r14, %rdx
callq 0x3ac36
leaq 0x31c7d(%rip), %rax     # 0x428e4
movb (%rax), %bpl
cmpb $0x1, %bpl
jne 0x10cbb
movq 0x128(%rbx), %rax
cmpq %rax, 0x130(%rbx)
je 0x10cbb
movl $0x1, %r12d
xorl %ecx, %ecx
movq 0x408(%rbx), %rdi
leaq (%rax,%rcx,8), %rsi
movq %r14, %rdx
callq 0x3ac36
movl %r12d, %ecx
movq 0x128(%rbx), %rax
movq 0x130(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
incl %r12d
cmpq %rcx, %rdx
ja 0x10c88
leaq 0x31c1d(%rip), %rax     # 0x428df
movb (%rax), %r12b
cmpb $0x1, %r12b
jne 0x10d28
leaq 0x31c0e(%rip), %rax     # 0x428e0
movl (%rax), %r13d
testl %r13d, %r13d
jle 0x10d28
movq 0x3d8(%rbx), %rdi
leaq 0x170(%rbx), %rsi
movq %r14, %rdx
callq 0x3ac36
cmpl $0x1, %r13d
je 0x10d28
movq 0x3e8(%rbx), %rdi
leaq 0x178(%rbx), %rsi
movq %r14, %rdx
callq 0x3ac36
cmpl $0x3, %r13d
jne 0x10d28
movq 0x3f8(%rbx), %rdi
leaq 0x180(%rbx), %rsi
movq %r14, %rdx
callq 0x3ac36
cmpb $0x1, 0x118(%rsp)
jne 0x10d6f
cmpl $0x0, 0x11c(%rsp)
je 0x10d6f
xorl %r13d, %r13d
xorl %r15d, %r15d
movq 0x418(%rbx), %rdi
movq 0x158(%rbx), %rsi
addq %r13, %rsi
movq %r14, %rdx
callq 0x3ac36
incq %r15
movslq 0x11c(%rsp), %rax
addq $0x8, %r13
cmpq %rax, %r15
jb 0x10d42
movq 0x380(%rbx), %rax
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
cmpq %rax, 0x388(%rbx)
je 0x114d4
xorl %r14d, %r14d
movq 0x38(%rsp), %r15
movq %r14, %r13
shlq $0x4, %r13
fldt (%rax,%r13)
faddl (%r15)
fstpt (%rax,%r13)
testb %r12b, %r12b
je 0x10e2f
movq 0xa0(%rsp), %rax
movsd (%rax,%r14,8), %xmm0
subsd 0x8(%rsp), %xmm0
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
mulsd 0x178(%rbx), %xmm1
movsd 0x170(%rbx), %xmm2
mulsd %xmm0, %xmm2
addsd %xmm1, %xmm2
movsd %xmm2, 0x10(%rsp)
movsd 0x180(%rbx), %xmm1
movsd %xmm1, 0x18(%rsp)
movsd 0x2c8c1(%rip), %xmm1    # 0x3d6c0
callq 0x66f0
mulsd 0x18(%rsp), %xmm0
addsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x88(%rsp)
movq 0x380(%rbx), %rax
fldt (%rax,%r13)
faddl 0x88(%rsp)
fstpt (%rax,%r13)
testb %bpl, %bpl
je 0x10e82
movq 0x128(%rbx), %rax
movq 0x130(%rbx), %rcx
subq %rax, %rcx
je 0x10e82
sarq $0x3, %rcx
movq 0xe8(%rsp), %rdx
movslq (%rdx,%r14,4), %rdx
cmpq $0x1, %rcx
adcq $0x0, %rcx
movq 0x380(%rbx), %rsi
addq %r13, %rsi
decq %rdx
xorl %edi, %edi
cmpq %rdi, %rdx
jne 0x10e7a
fldt (%rsi)
faddl (%rax,%rdi,8)
fstpt (%rsi)
incq %rdi
cmpq %rdi, %rcx
jne 0x10e6e
cmpb $0x1, 0x118(%rsp)
jne 0x10ee2
movslq 0x11c(%rsp), %rax
testq %rax, %rax
je 0x10ee2
movq 0x158(%rbx), %rcx
movq 0x20(%rsp), %rdx
movq 0x380(%rbx), %rdi
leaq (%rdi,%r13), %rsi
fldt (%rdi,%r13)
xorl %edi, %edi
movsd (%rcx,%rdi,8), %xmm0
movq (%rdx), %r8
mulsd (%r8,%r14,8), %xmm0
movsd %xmm0, 0x80(%rsp)
faddl 0x80(%rsp)
incq %rdi
addq $0x18, %rdx
cmpq %rdi, %rax
jne 0x10eb6
fstpt (%rsi)
incq %r14
movq 0x380(%rbx), %rax
movq 0x388(%rbx), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
cmpq %rcx, %r14
jb 0x10d94
jmp 0x114d4
leaq 0x8(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x15c92
movsd %xmm0, (%rsp)
movq %r15, %rdi
callq 0x15808
movq %rbx, %rdi
callq 0xef06
jmp 0x10f87
leaq 0x8(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x15c92
movsd %xmm0, (%rsp)
movq %r15, %rdi
callq 0x15808
movq %rbx, %rdi
callq 0xef06
jmp 0x10f87
leaq 0x8(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x15c92
movsd %xmm0, (%rsp)
movq %r15, %rdi
callq 0x15808
movq %rbx, %rdi
callq 0xef06
xorpd %xmm0, %xmm0
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
jmp 0x114d4
movl 0x1a8(%rbx), %eax
cmpl $0x1, %eax
je 0x1114e
testl %eax, %eax
jne 0x114c3
movq %r14, %rdi
callq 0x39a4e
movsd 0x2c70b(%rip), %xmm1    # 0x3d6d0
ucomisd %xmm0, %xmm1
jae 0x1141c
movq %r14, %rdi
callq 0x39a4e
movsd 0x2c719(%rip), %xmm1    # 0x3d6f8
ucomisd %xmm0, %xmm1
jae 0x1149e
movq %r14, %rdi
callq 0x39a4e
movsd 0x2c19f(%rip), %xmm1    # 0x3d198
ucomisd %xmm0, %xmm1
jae 0x114aa
movsd 0x1c8(%rbx), %xmm0
callq 0x63c0
leaq 0x1f0(%rbx), %r15
movsd %xmm0, 0x1f0(%rbx)
movq 0x478(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3ac36
leaq 0x1c8(%rbx), %r14
jmp 0x11481
movq %r14, %rdi
callq 0x39a4e
xorl %eax, %eax
movsd 0x2c149(%rip), %xmm1    # 0x3d198
ucomisd %xmm0, %xmm1
setb %al
leaq (%rbx,%rax,8), %rsi
addq $0x188, %rsi            # imm = 0x188
shll $0x4, %eax
movq 0x428(%rbx,%rax), %rdi
movq %r14, %rdx
callq 0x3ac36
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
movq %rbx, %rdi
callq 0xef06
jmp 0x114d4
leaq 0x31853(%rip), %rax     # 0x428e4
cmpb $0x1, (%rax)
jne 0x11197
movq 0x140(%rbx), %rsi
cmpq %rsi, 0x148(%rbx)
je 0x111ad
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x3c8(%rbx), %rdi
addq %r15, %rsi
movq %r14, %rdx
callq 0x3ac36
incq %r12
movq 0x140(%rbx), %rsi
movq 0x148(%rbx), %rax
subq %rsi, %rax
sarq $0x3, %rax
addq $0x8, %r15
cmpq %r12, %rax
ja 0x110b4
jmp 0x111ad
leaq 0x317f1(%rip), %rax     # 0x428e4
cmpb $0x1, (%rax)
jne 0x1130f
movq 0x140(%rbx), %rsi
cmpq %rsi, 0x148(%rbx)
je 0x11325
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x3c8(%rbx), %rdi
addq %r15, %rsi
movq %r14, %rdx
callq 0x3ac36
incq %r12
movq 0x140(%rbx), %rsi
movq 0x148(%rbx), %rax
subq %rsi, %rax
sarq $0x3, %rax
addq $0x8, %r15
cmpq %r12, %rax
ja 0x11116
jmp 0x11325
movq %r14, %rdi
callq 0x39a4e
movsd 0x2c59a(%rip), %xmm1    # 0x3d6f8
ucomisd %xmm0, %xmm1
jae 0x1144c
movq %r14, %rdi
callq 0x39a4e
xorl %eax, %eax
movsd 0x2c01e(%rip), %xmm1    # 0x3d198
ucomisd %xmm0, %xmm1
setb %al
leaq 0x1b8(,%rax,8), %rsi
shll $0x4, %eax
addq $0x458, %rax            # imm = 0x458
jmp 0x114b4
movq 0x3c8(%rbx), %rdi
leaq 0x198(%rbx), %rsi
movq %r14, %rdx
callq 0x3ac36
leaq 0x31738(%rip), %rax     # 0x428ec
cmpb $0x1, (%rax)
jne 0x111cf
movq 0x500(%rbx), %rdi
leaq 0x1a0(%rbx), %rsi
movq %r14, %rdx
callq 0x3ac36
leaq 0x3170f(%rip), %rax     # 0x428e5
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
cmpb $0x1, (%rax)
jne 0x114d4
movq %rbx, %rdi
callq 0x10050
leaq 0x316f1(%rip), %rax     # 0x428e8
movslq (%rax), %r15
testq %r15, %r15
jle 0x11406
shlq $0x3, %r15
xorl %r12d, %r12d
movq 0x488(%rbx), %rax
movq (%rax,%r12,2), %rdi
movq 0x308(%rbx), %rsi
addq %r12, %rsi
movq %r14, %rdx
callq 0x3ac36
movq 0x4a0(%rbx), %rax
movq (%rax,%r12,2), %rdi
movq 0x320(%rbx), %rsi
addq %r12, %rsi
movq %r14, %rdx
callq 0x3ac36
movq 0x4b8(%rbx), %rax
movq (%rax,%r12,2), %rdi
movq 0x338(%rbx), %rsi
addq %r12, %rsi
movq %r14, %rdx
callq 0x3ac36
movq 0x4d0(%rbx), %rax
movq (%rax,%r12,2), %rdi
movq 0x350(%rbx), %rsi
addq %r12, %rsi
movq %r14, %rdx
callq 0x3ac36
movq 0x4e8(%rbx), %rax
movq (%rax,%r12,2), %rdi
movq 0x368(%rbx), %rsi
addq %r12, %rsi
movq %r14, %rdx
callq 0x3ac36
addq $0x8, %r12
cmpq %r12, %r15
jne 0x1120a
jmp 0x11406
leaq 0x31630(%rip), %rax     # 0x428e4
cmpb $0x1, (%rax)
jne 0x11492
movq 0x140(%rbx), %rsi
cmpq %rsi, 0x148(%rbx)
je 0x114c3
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x3c8(%rbx), %rdi
addq %r15, %rsi
movq %r14, %rdx
callq 0x3ac36
incq %r12
movq 0x140(%rbx), %rsi
movq 0x148(%rbx), %rax
subq %rsi, %rax
sarq $0x3, %rax
addq $0x8, %r15
cmpq %r12, %rax
ja 0x112d7
jmp 0x114c3
movq 0x3c8(%rbx), %rdi
leaq 0x198(%rbx), %rsi
movq %r14, %rdx
callq 0x3ac36
movq %rbx, %rdi
callq 0xf44e
leaq 0x315b1(%rip), %rax     # 0x428e5
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
cmpb $0x1, (%rax)
jne 0x114d4
movq %rbx, %rdi
callq 0x10050
leaq 0x31593(%rip), %rax     # 0x428e8
movslq (%rax), %r15
testq %r15, %r15
jle 0x11406
shlq $0x3, %r15
xorl %r12d, %r12d
movq 0x488(%rbx), %rax
movq (%rax,%r12,2), %rdi
movq 0x308(%rbx), %rsi
addq %r12, %rsi
movq %r14, %rdx
callq 0x3ac36
movq 0x4a0(%rbx), %rax
movq (%rax,%r12,2), %rdi
movq 0x320(%rbx), %rsi
addq %r12, %rsi
movq %r14, %rdx
callq 0x3ac36
movq 0x4b8(%rbx), %rax
movq (%rax,%r12,2), %rdi
movq 0x338(%rbx), %rsi
addq %r12, %rsi
movq %r14, %rdx
callq 0x3ac36
movq 0x4d0(%rbx), %rax
movq (%rax,%r12,2), %rdi
movq 0x350(%rbx), %rsi
addq %r12, %rsi
movq %r14, %rdx
callq 0x3ac36
movq 0x4e8(%rbx), %rax
movq (%rax,%r12,2), %rdi
movq 0x368(%rbx), %rsi
addq %r12, %rsi
movq %r14, %rdx
callq 0x3ac36
addq $0x8, %r12
cmpq %r12, %r15
jne 0x11368
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
movq %rbx, %rdi
callq 0xfe16
jmp 0x114d4
movsd 0x1b0(%rbx), %xmm0
callq 0x63c0
leaq 0x1d8(%rbx), %r15
movsd %xmm0, 0x1d8(%rbx)
movq 0x448(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3ac36
jmp 0x1147a
movsd 0x1b0(%rbx), %xmm0
callq 0x63c0
leaq 0x1d8(%rbx), %r15
movsd %xmm0, 0x1d8(%rbx)
movq 0x448(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3ac36
leaq 0x1b0(%rbx), %r14
movsd (%r15), %xmm0
callq 0x6730
movsd %xmm0, (%r14)
jmp 0x114c3
movl $0x198, %esi            # imm = 0x198
movl $0x3c8, %eax            # imm = 0x3C8
jmp 0x114b4
movl $0x1b8, %esi            # imm = 0x1B8
movl $0x458, %eax            # imm = 0x458
jmp 0x114b4
movl $0x1c0, %esi            # imm = 0x1C0
movl $0x468, %eax            # imm = 0x468
movq (%rbx,%rax), %rdi
addq %rbx, %rsi
movq %r14, %rdx
callq 0x3ac36
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
movq %rbx, %rdi
callq 0xf44e
leaq 0x20(%rsp), %rdi
callq 0xbb88
leaq 0xa0(%rsp), %rdi
callq 0xb8d2
movsd (%rsp), %xmm0
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x11525
jmp 0x11525
jmp 0x11525
jmp 0x11525
jmp 0x11525
jmp 0x11525
jmp 0x11525
jmp 0x11525
jmp 0x11525
jmp 0x11525
jmp 0x11525
jmp 0x11525
jmp 0x11525
movq %rax, %rbx
jmp 0x11532
jmp 0x11525
jmp 0x11525
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xbb88
leaq 0xa0(%rsp), %rdi
callq 0xb8d2
movq %rbx, %rdi
callq 0x6710
nop