// File: j-faria[P]kima/src/RVmodel.cpp
// Function: RVmodel::add_known_object()
void RVmodel::add_known_object()
{
    auto data = Data::get_instance();
    auto t = data.get_t();
    double f, v, ti, Tp;
    for(int j=0; j<n_known_object; j++)
    {
        for(size_t i=0; i<t.size(); i++)
        {
            ti = t[i];
            Tp = data.M0_epoch-(KO_P[j]*KO_phi[j])/(2.*M_PI);
            f = kepler::true_anomaly(ti, KO_P[j], KO_e[j], Tp);
            v = KO_K[j] * (cos(f+KO_w[j]) + KO_e[j]*cos(KO_w[j]));
            mu[i] += v;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x180(%rbp)
callq 0xab10
movq %rax, %rsi
leaq -0x110(%rbp), %rdi
movq %rdi, -0x178(%rbp)
callq 0x269d0
movq -0x178(%rbp), %rdi
callq 0x271b0
movq %rax, -0x170(%rbp)
jmp 0x203ea
movq -0x170(%rbp), %rsi
leaq -0x128(%rbp), %rdi
callq 0x17c50
jmp 0x203ff
movl $0x0, -0x15c(%rbp)
movl -0x15c(%rbp), %eax
leaq 0xa5596(%rip), %rcx     # 0xc59ac
cmpl (%rcx), %eax
jge 0x206f5
movq $0x0, -0x168(%rbp)
movq -0x168(%rbp), %rax
movq %rax, -0x188(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x7c90
movq %rax, %rcx
movq -0x188(%rbp), %rax
cmpq %rcx, %rax
jae 0x206df
movq -0x168(%rbp), %rsi
leaq -0x128(%rbp), %rdi
callq 0xc6a0
movq -0x180(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x150(%rbp)
movsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x1b0(%rbp)
addq $0x308, %rdi            # imm = 0x308
movq %rdi, -0x1a8(%rbp)
movslq -0x15c(%rbp), %rsi
callq 0xc6a0
movq -0x180(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x1b8(%rbp)
addq $0x350, %rdi            # imm = 0x350
movslq -0x15c(%rbp), %rsi
callq 0xc6a0
movsd -0x1b8(%rbp), %xmm1
movsd -0x1b0(%rbp), %xmm0
movq -0x1a8(%rbp), %rdi
movsd (%rax), %xmm2
mulsd %xmm2, %xmm1
movsd 0x971b0(%rip), %xmm2    # 0xb76a0
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x158(%rbp)
movsd -0x150(%rbp), %xmm0
movsd %xmm0, -0x1a0(%rbp)
movslq -0x15c(%rbp), %rsi
callq 0xc6a0
movq -0x180(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x198(%rbp)
addq $0x338, %rdi            # imm = 0x338
movslq -0x15c(%rbp), %rsi
callq 0xc6a0
movsd -0x1a0(%rbp), %xmm0
movsd -0x198(%rbp), %xmm1
movsd (%rax), %xmm2
movsd -0x158(%rbp), %xmm3
callq 0x20730
movsd %xmm0, -0x190(%rbp)
jmp 0x2056d
movq -0x180(%rbp), %rdi
movsd -0x190(%rbp), %xmm0
movsd %xmm0, -0x140(%rbp)
addq $0x320, %rdi            # imm = 0x320
movslq -0x15c(%rbp), %rsi
callq 0xc6a0
movq -0x180(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x1d0(%rbp)
movsd -0x140(%rbp), %xmm0
movsd %xmm0, -0x1f0(%rbp)
addq $0x368, %rdi            # imm = 0x368
movq %rdi, -0x1e8(%rbp)
movslq -0x15c(%rbp), %rsi
callq 0xc6a0
movsd -0x1f0(%rbp), %xmm0
movsd (%rax), %xmm1
addsd %xmm1, %xmm0
callq 0x68e0
movq -0x180(%rbp), %rdi
movsd %xmm0, -0x1d8(%rbp)
addq $0x338, %rdi            # imm = 0x338
movslq -0x15c(%rbp), %rsi
callq 0xc6a0
movq -0x1e8(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x1e0(%rbp)
movslq -0x15c(%rbp), %rsi
callq 0xc6a0
movsd (%rax), %xmm0
callq 0x68e0
movsd -0x1e0(%rbp), %xmm1
movsd -0x1d8(%rbp), %xmm2
movq -0x180(%rbp), %rdi
movaps %xmm0, %xmm3
movsd -0x1d0(%rbp), %xmm0
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x148(%rbp)
fldl -0x148(%rbp)
fstpt -0x1c4(%rbp)
addq $0x380, %rdi            # imm = 0x380
movq -0x168(%rbp), %rsi
callq 0x27ad0
fldt -0x1c4(%rbp)
fldt (%rax)
faddp %st, %st(1)
fstpt (%rax)
movq -0x168(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x168(%rbp)
jmp 0x20429
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
jmp 0x20716
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x78f0
jmp 0x20716
jmp 0x206e1
movl -0x15c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x15c(%rbp)
jmp 0x20409
leaq -0x128(%rbp), %rdi
callq 0x78f0
leaq -0x110(%rbp), %rdi
callq 0x155c0
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
leaq -0x110(%rbp), %rdi
callq 0x155c0
movq -0x130(%rbp), %rdi
callq 0x6830
nop