// File: j-faria[P]kima/examples/multi_instrument/kima_setup.cpp
// Function: main
int main(int argc, char** argv)
{
    // set the RV data files from multiple instruments
    datafiles = {"HD106252_ELODIE.txt",
                 "HD106252_HET.txt",
                 "HD106252_HJS.txt",
                 "HD106252_Lick.txt"
                };

    // note: all files should have the same structure, and be in the same units
    load_multi(datafiles, "ms", 2);

    // could also do (but not both!)
    //char* datafile = "HD106252_joined.txt";
    // load_multi(datafile, "ms", 1);

    Sampler<RVmodel> sampler = setup<RVmodel>(argc, argv);
    sampler.run(100);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x810, %rsp            # imm = 0x810
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x1, -0xc0(%rbp)
leaq -0xa0(%rbp), %rax
movq %rax, -0x790(%rbp)
movq %rax, -0xa8(%rbp)
leaq -0xa9(%rbp), %rdi
movq %rdi, -0x788(%rbp)
callq 0x6850
movq -0x790(%rbp), %rdi
movq -0x788(%rbp), %rdx
leaq 0x59754(%rip), %rsi     # 0xc69b1
callq 0x2b2b0
jmp 0x6d264
leaq -0x80(%rbp), %rax
movq %rax, -0x7a0(%rbp)
movq %rax, -0xa8(%rbp)
leaq -0xbd(%rbp), %rdi
movq %rdi, -0x798(%rbp)
callq 0x6850
movq -0x7a0(%rbp), %rdi
movq -0x798(%rbp), %rdx
leaq 0x59727(%rip), %rsi     # 0xc69c5
callq 0x2b2b0
jmp 0x6d2a5
leaq -0x60(%rbp), %rax
movq %rax, -0x7b0(%rbp)
movq %rax, -0xa8(%rbp)
leaq -0xbe(%rbp), %rdi
movq %rdi, -0x7a8(%rbp)
callq 0x6850
movq -0x7b0(%rbp), %rdi
movq -0x7a8(%rbp), %rdx
leaq 0x596f7(%rip), %rsi     # 0xc69d6
callq 0x2b2b0
jmp 0x6d2e6
leaq -0x40(%rbp), %rax
movq %rax, -0x7c0(%rbp)
movq %rax, -0xa8(%rbp)
leaq -0xbf(%rbp), %rdi
movq %rdi, -0x7b8(%rbp)
callq 0x6850
movq -0x7c0(%rbp), %rdi
movq -0x7b8(%rbp), %rdx
leaq 0x596c7(%rip), %rsi     # 0xc69e7
callq 0x2b2b0
jmp 0x6d327
movb $0x0, -0xc0(%rbp)
leaq -0xa0(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x4, -0x18(%rbp)
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq 0xae488(%rip), %rdi     # 0x11b7d8
callq 0x6dc40
jmp 0x6d357
leaq -0xa0(%rbp), %rax
movq %rax, -0x7d0(%rbp)
addq $0x80, %rax
movq %rax, -0x7c8(%rbp)
movq -0x7c8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x7d8(%rbp)
callq 0x6948
movq -0x7d0(%rbp), %rcx
movq -0x7d8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x7c8(%rbp)
jne 0x6d372
leaq -0xbf(%rbp), %rdi
callq 0x6550
leaq -0xbe(%rbp), %rdi
callq 0x6550
leaq -0xbd(%rbp), %rdi
callq 0x6550
leaq -0xa9(%rbp), %rdi
callq 0x6550
movl $0x2, -0xc4(%rbp)
leaq 0xae3f4(%rip), %rdi     # 0x11b7d8
leaq 0x4b0fe(%rip), %rsi     # 0xb84e9
leaq -0xc4(%rbp), %rdx
callq 0x6dc90
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq -0x780(%rbp), %rdi
movq %rdi, -0x7e0(%rbp)
callq 0x6ddc0
movq -0x7e0(%rbp), %rdi
movl $0x64, %esi
callq 0x6de60
jmp 0x6d424
movl $0x0, -0x4(%rbp)
leaq -0x780(%rbp), %rdi
callq 0x6e280
movl -0x4(%rbp), %eax
addq $0x810, %rsp            # imm = 0x810
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x6d520
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x6d514
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x6d508
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x6d4fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0xa0(%rbp), %rax
movq %rax, -0x7f0(%rbp)
addq $0x80, %rax
movq %rax, -0x7e8(%rbp)
movq -0x7e8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x7f8(%rbp)
callq 0x6948
movq -0x7f0(%rbp), %rcx
movq -0x7f8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x7e8(%rbp)
jne 0x6d4c9
jmp 0x6d4fc
leaq -0xbf(%rbp), %rdi
callq 0x6550
leaq -0xbe(%rbp), %rdi
callq 0x6550
leaq -0xbd(%rbp), %rdi
callq 0x6550
leaq -0xa9(%rbp), %rdi
callq 0x6550
testb $0x1, -0xc0(%rbp)
jne 0x6d537
jmp 0x6d584
movq -0xa8(%rbp), %rax
leaq -0xa0(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x800(%rbp)
je 0x6d582
movq -0x800(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x808(%rbp)
callq 0x6948
movq -0x808(%rbp), %rax
leaq -0xa0(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x800(%rbp)
jne 0x6d551
jmp 0x6d584
jmp 0x6d5a4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x780(%rbp), %rdi
callq 0x6e280
movq -0xb8(%rbp), %rdi
callq 0x6830