// File: /workspace/github_cpp_makefile_star2_O2/mateuz[P]MTS-LS1/source/Benchmarks.cpp
// Function: Benchmarks::readOvector()
double* Benchmarks::readOvector()
{
  // read O vector from file in csv format
  double* d = new double[dimension];
  stringstream ss;
  ss<< "cdatafiles/" << "F" << ID << "-xopt.txt";
  ifstream file (ss.str());
  string value;
  string line;
  int c=0;
  
  if (file.is_open())
    {
      stringstream iss;
      while ( getline(file, line) )
        {
          iss<<line;
          while (getline(iss, value, ','))
            {
              d[c++] = stod(value);
            }
          iss.clear();
          // if (c==dimension)
          //   {
          //     break;
          //   }
          // printf("%d\n",c);
        }
      file.close();
    }
  else
    {
      cout<<"Cannot open datafiles"<<endl;
    }
  return d;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x558, %rsp            # imm = 0x558
movq %rdi, %r14
movslq 0xb8(%rdi), %rax
leaq (,%rax,8), %rcx
testq %rax, %rax
pushq $-0x1
popq %rdi
cmovnsq %rcx, %rdi
callq 0x3030
movq %rax, %rbx
leaq -0x378(%rbp), %rdi
callq 0x3140
leaq -0x368(%rbp), %rdi
leaq 0x6620(%rip), %rsi      # 0xa0d0
callq 0x31d0
leaq 0x6620(%rip), %rsi      # 0xa0dc
movq %rax, %rdi
callq 0x31d0
movl 0x8(%r14), %esi
movq %rax, %rdi
callq 0x3130
leaq 0x6607(%rip), %rsi      # 0xa0de
movq %rax, %rdi
callq 0x31d0
leaq -0x360(%rbp), %rsi
leaq -0x1f0(%rbp), %rdi
callq 0x3260
leaq -0x580(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
pushq $0x8
popq %rdx
callq 0x3270
leaq -0x1f0(%rbp), %rdi
callq 0x30e0
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
leaq -0x38(%rbp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
xorl %edx, %edx
movb %dl, (%rax)
movb %dl, (%rcx)
leaq -0x508(%rbp), %rdi
callq 0x3090
testb %al, %al
je 0x3bdb
leaq -0x1f0(%rbp), %r14
movq %r14, %rdi
callq 0x3140
xorl %r13d, %r13d
leaq -0x68(%rbp), %r15
pushq $0x2c
popq %r12
leaq -0x580(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x3060
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3bf8
leaq -0x1e0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x31b0
movslq %r13d, %r13
movq %r14, %rdi
movq %r15, %rsi
movl %r12d, %edx
callq 0x32f0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3bc4
movq %r15, %rdi
xorl %esi, %esi
callq 0x5a35
movsd %xmm0, (%rbx,%r13,8)
incq %r13
jmp 0x3b93
movq -0x1f0(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
xorl %esi, %esi
callq 0x32a0
jmp 0x3b62
movq 0xb3ee(%rip), %rdi      # 0xefd0
leaq 0x64ff(%rip), %rsi      # 0xa0e8
callq 0x31d0
movq %rax, %rdi
callq 0x30f0
jmp 0x3c10
leaq -0x580(%rbp), %rdi
callq 0x3070
leaq -0x1f0(%rbp), %rdi
callq 0x3160
leaq -0x48(%rbp), %rdi
callq 0x30e0
leaq -0x68(%rbp), %rdi
callq 0x30e0
leaq -0x580(%rbp), %rdi
callq 0x30a0
leaq -0x378(%rbp), %rdi
callq 0x3160
movq %rbx, %rax
addq $0x558, %rsp            # imm = 0x558
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3c72
jmp 0x3c53
movq %rax, %rbx
jmp 0x3c81
movq %rax, %rbx
leaq -0x1f0(%rbp), %rdi
callq 0x30e0
jmp 0x3c9f
jmp 0x3c6b
movq %rax, %rbx
jmp 0x3c9f
jmp 0x3c72
movq %rax, %rbx
leaq -0x1f0(%rbp), %rdi
callq 0x3160
leaq -0x48(%rbp), %rdi
callq 0x30e0
leaq -0x68(%rbp), %rdi
callq 0x30e0
leaq -0x580(%rbp), %rdi
callq 0x30a0
leaq -0x378(%rbp), %rdi
callq 0x3160
movq %rbx, %rdi
callq 0x32d0
nop