// File: /workspace/github_cpp_makefile_star2_O3/JorisCaze[P]NASG-EOS_Calibration/src/tools.cpp
// Function: readFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<double, std::allocator<double>>&, std::vector<double, std::allocator<double>>&)
void readFile(string const &file, vector<double> &tab_x, vector<double> &tab_y)
{
    // Purpose : read experimental data file with two columns and a header (ignored)
    ifstream streamFile(file);
    string line;
    double data1(0.), data2(0.);

    if (streamFile) {
        while (getline(streamFile,line)) {
            streamFile >> data1 >> data2; 
            tab_x.push_back(data1);
            tab_y.push_back(data2);
            cout << data1 << " " << data2 << endl;
        }
    } 
    else {
        cout << "Error : reading experimental data file " << file << ".txt\n"; exit(0);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
movl $0x8, %edx
callq 0x21e0
leaq 0x20(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb $0x0, (%rcx)
movq %rax, 0x8(%rsp)
movq %rax, (%rsp)
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x50(%rsp,%rax)
jne 0x50c5
leaq 0x8(%rsp), %r13
movq %rsp, %rbp
movq 0x30(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %edx
movq %r15, %rdi
leaq 0x10(%rsp), %rsi
callq 0x2250
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x508d
movq %r15, %rdi
movq %r13, %rsi
callq 0x20a0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x20a0
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x4ff5
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%r14)
jmp 0x5000
movq %r14, %rdi
movq %r13, %rdx
callq 0x58fa
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x501d
movsd (%rsp), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x5028
movq %rbx, %rdi
movq %rbp, %rdx
callq 0x58fa
movsd 0x8(%rsp), %xmm0
movq 0x3fa3(%rip), %rdi      # 0x8fd8
callq 0x21d0
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
leaq 0x13d4(%rip), %rsi      # 0x6420
callq 0x2180
movsd (%rsp), %xmm0
movq %r12, %rdi
callq 0x21d0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
jmp 0x4f89
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x50a9
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2160
leaq 0x30(%rsp), %rdi
callq 0x2050
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3f0c(%rip), %rdi      # 0x8fd8
leaq 0x149f(%rip), %rsi      # 0x6572
movl $0x27, %edx
callq 0x2180
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq 0x3eeb(%rip), %rdi      # 0x8fd8
callq 0x2180
leaq 0x14a1(%rip), %rsi      # 0x659a
movq %rax, %rdi
callq 0x2140
xorl %edi, %edi
callq 0x2190
jmp 0x510a
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x5129
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2160
leaq 0x30(%rsp), %rdi
callq 0x2050
movq %rbx, %rdi
callq 0x2210