// File: j-faria[P]kima/src/RVmodel.cpp
// Function: RVmodel::print(std::ostream&) const
void RVmodel::print(std::ostream& out) const
{
    // output precision
    out.setf(ios::fixed,ios::floatfield);
    out.precision(8);

    if (multi_instrument)
    {
        for(int j=0; j<jitters.size(); j++)
            out<<jitters[j]<<'\t';
    }
    else
        out<<extra_sigma<<'\t';

    if(trend)
    {
        out.precision(15);
        if (degree >= 1) out << slope << '\t';
        if (degree >= 2) out << quadr << '\t';
        if (degree == 3) out << cubic << '\t';
        out.precision(8);
    }
        
    if (multi_instrument){
        for(int j=0; j<offsets.size(); j++){
            out<<offsets[j]<<'\t';
        }
    }

    auto data = Data::get_instance();
    if(data.indicator_correlations){
        for(int j=0; j<data.number_indicators; j++){
            out<<betas[j]<<'\t';
        }
    }

    if(GP)
    {
        if (kernel == standard)
            out << eta1 << '\t' << eta2 << '\t' << eta3 << '\t' << eta4 << '\t';
        else
            out << eta1 << '\t' << eta2 << '\t' << eta3 << '\t';
    }
    
    if(MA)
        out << sigmaMA << '\t' << tauMA << '\t';

    if(known_object){ // KO mode!
        for (auto P: KO_P) out << P << "\t";
        for (auto K: KO_K) out << K << "\t";
        for (auto phi: KO_phi) out << phi << "\t";
        for (auto e: KO_e) out << e << "\t";
        for (auto w: KO_w) out << w << "\t";
    }

    planets.print(out);

    out << ' ' << staleness << ' ';

    if (studentt)
        out << '\t' << nu << '\t';

    out << background;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2d0, %rsp            # imm = 0x2D0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1e0(%rbp)
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0x4, %esi
movl $0x104, %edx            # imm = 0x104
callq 0x2b0c0
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0x8, %esi
callq 0x2b120
leaq 0xa1844(%rip), %rax     # 0xc59a8
testb $0x1, (%rax)
je 0x241ed
movl $0x0, -0x14(%rbp)
movq -0x1e0(%rbp), %rdi
movslq -0x14(%rbp), %rax
movq %rax, -0x1e8(%rbp)
addq $0x140, %rdi            # imm = 0x140
callq 0x7c90
movq %rax, %rcx
movq -0x1e8(%rbp), %rax
cmpq %rcx, %rax
jae 0x241eb
movq -0x1e0(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x1f0(%rbp)
addq $0x140, %rdi            # imm = 0x140
movslq -0x14(%rbp), %rsi
callq 0xa6a0
movq -0x1f0(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x68f0
movq %rax, %rdi
movl $0x9, %esi
callq 0x6590
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x24174
jmp 0x24212
movq -0x1e0(%rbp), %rax
movq -0x10(%rbp), %rdi
movsd 0x198(%rax), %xmm0
callq 0x68f0
movq %rax, %rdi
movl $0x9, %esi
callq 0x6590
leaq 0xa178a(%rip), %rax     # 0xc59a3
testb $0x1, (%rax)
je 0x242df
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xf, %esi
callq 0x2b120
leaq 0xa1766(%rip), %rax     # 0xc59a4
cmpl $0x1, (%rax)
jl 0x24268
movq -0x1e0(%rbp), %rax
movq -0x10(%rbp), %rdi
movsd 0x170(%rax), %xmm0
callq 0x68f0
movq %rax, %rdi
movl $0x9, %esi
callq 0x6590
leaq 0xa1735(%rip), %rax     # 0xc59a4
cmpl $0x2, (%rax)
jl 0x24299
movq -0x1e0(%rbp), %rax
movq -0x10(%rbp), %rdi
movsd 0x178(%rax), %xmm0
callq 0x68f0
movq %rax, %rdi
movl $0x9, %esi
callq 0x6590
leaq 0xa1704(%rip), %rax     # 0xc59a4
cmpl $0x3, (%rax)
jne 0x242ca
movq -0x1e0(%rbp), %rax
movq -0x10(%rbp), %rdi
movsd 0x180(%rax), %xmm0
callq 0x68f0
movq %rax, %rdi
movl $0x9, %esi
callq 0x6590
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0x8, %esi
callq 0x2b120
leaq 0xa16c2(%rip), %rax     # 0xc59a8
testb $0x1, (%rax)
je 0x2436f
movl $0x0, -0x18(%rbp)
movq -0x1e0(%rbp), %rdi
movslq -0x18(%rbp), %rax
movq %rax, -0x1f8(%rbp)
addq $0x128, %rdi            # imm = 0x128
callq 0x7c90
movq %rax, %rcx
movq -0x1f8(%rbp), %rax
cmpq %rcx, %rax
jae 0x2436d
movq -0x1e0(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x200(%rbp)
addq $0x128, %rdi            # imm = 0x128
movslq -0x18(%rbp), %rsi
callq 0xa6a0
movq -0x200(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x68f0
movq %rax, %rdi
movl $0x9, %esi
callq 0x6590
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x242f6
jmp 0x2436f
callq 0xab10
movq %rax, %rsi
leaq -0x120(%rbp), %rdi
callq 0x269d0
testb $0x1, -0xa8(%rbp)
je 0x24435
movl $0x0, -0x124(%rbp)
movl -0x124(%rbp), %eax
cmpl -0xa4(%rbp), %eax
jge 0x24433
movq -0x1e0(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x210(%rbp)
addq $0x158, %rdi            # imm = 0x158
movslq -0x124(%rbp), %rsi
callq 0xa6a0
movq -0x210(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x68f0
movq %rax, -0x208(%rbp)
jmp 0x243ea
movq -0x208(%rbp), %rdi
movl $0x9, %esi
callq 0x6590
jmp 0x243fd
jmp 0x243ff
movl -0x124(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x124(%rbp)
jmp 0x2439a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x155c0
jmp 0x24ad1
jmp 0x24435
leaq 0xa1564(%rip), %rax     # 0xc59a0
testb $0x1, (%rax)
je 0x24600
movq -0x1e0(%rbp), %rax
cmpl $0x0, 0x1a8(%rax)
jne 0x2454c
movq -0x1e0(%rbp), %rax
movq -0x10(%rbp), %rdi
movsd 0x1b0(%rax), %xmm0
callq 0x68f0
movq %rax, -0x218(%rbp)
jmp 0x2447a
movq -0x218(%rbp), %rdi
movl $0x9, %esi
callq 0x6590
movq %rax, -0x220(%rbp)
jmp 0x24494
movq -0x220(%rbp), %rdi
movq -0x1e0(%rbp), %rax
movsd 0x1b8(%rax), %xmm0
callq 0x68f0
movq %rax, -0x228(%rbp)
jmp 0x244b8
movq -0x228(%rbp), %rdi
movl $0x9, %esi
callq 0x6590
movq %rax, -0x230(%rbp)
jmp 0x244d2
movq -0x230(%rbp), %rdi
movq -0x1e0(%rbp), %rax
movsd 0x1c0(%rax), %xmm0
callq 0x68f0
movq %rax, -0x238(%rbp)
jmp 0x244f6
movq -0x238(%rbp), %rdi
movl $0x9, %esi
callq 0x6590
movq %rax, -0x240(%rbp)
jmp 0x24510
movq -0x240(%rbp), %rdi
movq -0x1e0(%rbp), %rax
movsd 0x1c8(%rax), %xmm0
callq 0x68f0
movq %rax, -0x248(%rbp)
jmp 0x24534
movq -0x248(%rbp), %rdi
movl $0x9, %esi
callq 0x6590
jmp 0x24547
jmp 0x245fe
movq -0x1e0(%rbp), %rax
movq -0x10(%rbp), %rdi
movsd 0x1b0(%rax), %xmm0
callq 0x68f0
movq %rax, -0x250(%rbp)
jmp 0x2456d
movq -0x250(%rbp), %rdi
movl $0x9, %esi
callq 0x6590
movq %rax, -0x258(%rbp)
jmp 0x24587
movq -0x258(%rbp), %rdi
movq -0x1e0(%rbp), %rax
movsd 0x1b8(%rax), %xmm0
callq 0x68f0
movq %rax, -0x260(%rbp)
jmp 0x245ab
movq -0x260(%rbp), %rdi
movl $0x9, %esi
callq 0x6590
movq %rax, -0x268(%rbp)
jmp 0x245c5
movq -0x268(%rbp), %rdi
movq -0x1e0(%rbp), %rax
movsd 0x1c0(%rax), %xmm0
callq 0x68f0
movq %rax, -0x270(%rbp)
jmp 0x245e9
movq -0x270(%rbp), %rdi
movl $0x9, %esi
callq 0x6590
jmp 0x245fc
jmp 0x245fe
jmp 0x24600
leaq 0xa139a(%rip), %rax     # 0xc59a1
testb $0x1, (%rax)
je 0x24680
movq -0x1e0(%rbp), %rax
movq -0x10(%rbp), %rdi
movsd 0x188(%rax), %xmm0
callq 0x68f0
movq %rax, -0x278(%rbp)
jmp 0x2462d
movq -0x278(%rbp), %rdi
movl $0x9, %esi
callq 0x6590
movq %rax, -0x280(%rbp)
jmp 0x24647
movq -0x280(%rbp), %rdi
movq -0x1e0(%rbp), %rax
movsd 0x190(%rax), %xmm0
callq 0x68f0
movq %rax, -0x288(%rbp)
jmp 0x2466b
movq -0x288(%rbp), %rdi
movl $0x9, %esi
callq 0x6590
jmp 0x2467e
jmp 0x24680
leaq 0xa1322(%rip), %rax     # 0xc59a9
testb $0x1, (%rax)
je 0x249e4
movq -0x1e0(%rbp), %rax
addq $0x308, %rax            # imm = 0x308
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rdi
callq 0x7bf0
movq %rax, -0x148(%rbp)
movq -0x140(%rbp), %rdi
callq 0x7c20
movq %rax, -0x150(%rbp)
leaq -0x148(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x17280
testb $0x1, %al
jne 0x246e3
jmp 0x2473a
leaq -0x148(%rbp), %rdi
callq 0xa620
movsd (%rax), %xmm0
movsd %xmm0, -0x158(%rbp)
movq -0x10(%rbp), %rdi
movsd -0x158(%rbp), %xmm0
callq 0x68f0
movq %rax, -0x290(%rbp)
jmp 0x24715
movq -0x290(%rbp), %rdi
leaq 0x9336d(%rip), %rsi     # 0xb7a90
callq 0x64f0
jmp 0x2472a
jmp 0x2472c
leaq -0x148(%rbp), %rdi
callq 0xa550
jmp 0x246ca
movq -0x1e0(%rbp), %rax
addq $0x320, %rax            # imm = 0x320
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rdi
callq 0x7bf0
movq %rax, -0x168(%rbp)
movq -0x160(%rbp), %rdi
callq 0x7c20
movq %rax, -0x170(%rbp)
leaq -0x168(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x17280
testb $0x1, %al
jne 0x2478d
jmp 0x247e4
leaq -0x168(%rbp), %rdi
callq 0xa620
movsd (%rax), %xmm0
movsd %xmm0, -0x178(%rbp)
movq -0x10(%rbp), %rdi
movsd -0x178(%rbp), %xmm0
callq 0x68f0
movq %rax, -0x298(%rbp)
jmp 0x247bf
movq -0x298(%rbp), %rdi
leaq 0x932c3(%rip), %rsi     # 0xb7a90
callq 0x64f0
jmp 0x247d4
jmp 0x247d6
leaq -0x168(%rbp), %rdi
callq 0xa550
jmp 0x24774
movq -0x1e0(%rbp), %rax
addq $0x350, %rax            # imm = 0x350
movq %rax, -0x180(%rbp)
movq -0x180(%rbp), %rdi
callq 0x7bf0
movq %rax, -0x188(%rbp)
movq -0x180(%rbp), %rdi
callq 0x7c20
movq %rax, -0x190(%rbp)
leaq -0x188(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x17280
testb $0x1, %al
jne 0x24837
jmp 0x2488e
leaq -0x188(%rbp), %rdi
callq 0xa620
movsd (%rax), %xmm0
movsd %xmm0, -0x198(%rbp)
movq -0x10(%rbp), %rdi
movsd -0x198(%rbp), %xmm0
callq 0x68f0
movq %rax, -0x2a0(%rbp)
jmp 0x24869
movq -0x2a0(%rbp), %rdi
leaq 0x93219(%rip), %rsi     # 0xb7a90
callq 0x64f0
jmp 0x2487e
jmp 0x24880
leaq -0x188(%rbp), %rdi
callq 0xa550
jmp 0x2481e
movq -0x1e0(%rbp), %rax
addq $0x338, %rax            # imm = 0x338
movq %rax, -0x1a0(%rbp)
movq -0x1a0(%rbp), %rdi
callq 0x7bf0
movq %rax, -0x1a8(%rbp)
movq -0x1a0(%rbp), %rdi
callq 0x7c20
movq %rax, -0x1b0(%rbp)
leaq -0x1a8(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x17280
testb $0x1, %al
jne 0x248e1
jmp 0x24938
leaq -0x1a8(%rbp), %rdi
callq 0xa620
movsd (%rax), %xmm0
movsd %xmm0, -0x1b8(%rbp)
movq -0x10(%rbp), %rdi
movsd -0x1b8(%rbp), %xmm0
callq 0x68f0
movq %rax, -0x2a8(%rbp)
jmp 0x24913
movq -0x2a8(%rbp), %rdi
leaq 0x9316f(%rip), %rsi     # 0xb7a90
callq 0x64f0
jmp 0x24928
jmp 0x2492a
leaq -0x1a8(%rbp), %rdi
callq 0xa550
jmp 0x248c8
movq -0x1e0(%rbp), %rax
addq $0x368, %rax            # imm = 0x368
movq %rax, -0x1c0(%rbp)
movq -0x1c0(%rbp), %rdi
callq 0x7bf0
movq %rax, -0x1c8(%rbp)
movq -0x1c0(%rbp), %rdi
callq 0x7c20
movq %rax, -0x1d0(%rbp)
leaq -0x1c8(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
callq 0x17280
testb $0x1, %al
jne 0x2498b
jmp 0x249e2
leaq -0x1c8(%rbp), %rdi
callq 0xa620
movsd (%rax), %xmm0
movsd %xmm0, -0x1d8(%rbp)
movq -0x10(%rbp), %rdi
movsd -0x1d8(%rbp), %xmm0
callq 0x68f0
movq %rax, -0x2b0(%rbp)
jmp 0x249bd
movq -0x2b0(%rbp), %rdi
leaq 0x930c5(%rip), %rsi     # 0xb7a90
callq 0x64f0
jmp 0x249d2
jmp 0x249d4
leaq -0x1c8(%rbp), %rdi
callq 0xa550
jmp 0x24972
jmp 0x249e4
movq -0x1e0(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rsi
callq 0x2b150
jmp 0x249fa
movq -0x10(%rbp), %rdi
movl $0x20, %esi
callq 0x6590
movq %rax, -0x2b8(%rbp)
jmp 0x24a11
movq -0x2b8(%rbp), %rdi
movq -0x1e0(%rbp), %rax
movl 0x3b0(%rax), %esi
callq 0x6650
movq %rax, -0x2c0(%rbp)
jmp 0x24a33
movq -0x2c0(%rbp), %rdi
movl $0x20, %esi
callq 0x6590
jmp 0x24a46
leaq 0xa0f63(%rip), %rax     # 0xc59b0
testb $0x1, (%rax)
je 0x24aa2
movq -0x10(%rbp), %rdi
movl $0x9, %esi
callq 0x6590
movq %rax, -0x2c8(%rbp)
jmp 0x24a69
movq -0x2c8(%rbp), %rdi
movq -0x1e0(%rbp), %rax
movsd 0x1a0(%rax), %xmm0
callq 0x68f0
movq %rax, -0x2d0(%rbp)
jmp 0x24a8d
movq -0x2d0(%rbp), %rdi
movl $0x9, %esi
callq 0x6590
jmp 0x24aa0
jmp 0x24aa2
movq -0x1e0(%rbp), %rax
movq -0x10(%rbp), %rdi
movsd 0x120(%rax), %xmm0
callq 0x68f0
jmp 0x24abc
leaq -0x120(%rbp), %rdi
callq 0x155c0
addq $0x2d0, %rsp            # imm = 0x2D0
popq %rbp
retq
movq -0x130(%rbp), %rdi
callq 0x6830
nopl (%rax)