// File: /workspace/github_cpp_makefile_star2_O2/fukunagatsu[P]LogicomeProfiler/logicome_profiler.cpp
// Function: LogicomeProfiler::ReadData()
void LogicomeProfiler::ReadData(){
  ifstream fp;
  fp.open(_input_data_file_name.c_str(), ios::in);
  if (!fp) {
    cout << "Cannot open " + _input_data_file_name << endl;
    exit(1);
  }
  char buf[1000000];
  fp.getline(buf, 1000000);
  char* tp;
  tp = strtok(buf, " ");
  _number_of_samples = atoi(tp);
  tp = strtok(NULL, " ");
  _number_of_elements = atoi(tp);
  _name_vector.reserve(_number_of_elements);
  fp.getline(buf, 1000000);
  
  _dataset.resize(_number_of_samples, vector<bool>(_number_of_elements, 0));
  for (int i = 0; i < _number_of_elements; i++){
    fp.getline(buf, 1000000);
    tp = strtok(buf, " ");
    _name_vector.push_back(string(tp));
    for(int j = 0; j < _number_of_samples; j++){
      tp = strtok(NULL, " ");
      _dataset[j][i] = atoi(tp) == 1 ? true : false;
    }
  }
  fp.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf4488, %rsp          # imm = 0xF4488
movq %rdi, %rbx
leaq 0x38(%rsp), %r14
movq %r14, %rdi
callq 0x21f0
movq 0xc0(%rbx), %rsi
pushq $0x8
popq %rdx
movq %r14, %rdi
callq 0x2130
movq 0x38(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x58(%rsp,%rax)
jne 0x2bf2
leaq 0x38(%rsp), %rdi
leaq 0x240(%rsp), %rsi
movl $0xf4240, %edx          # imm = 0xF4240
callq 0x2090
leaq 0x5662(%rip), %r14      # 0x80c5
leaq 0x240(%rsp), %rdi
movq %r14, %rsi
callq 0x22a0
movq %rax, %rdi
callq 0x2290
movl %eax, 0x100(%rbx)
xorl %edi, %edi
movq %r14, %rsi
callq 0x22a0
movq %rax, %rdi
callq 0x2290
movl %eax, 0x104(%rbx)
leaq 0xa8(%rbx), %rdi
movslq %eax, %rsi
movq %rdi, 0x8(%rsp)
callq 0x4c4c
leaq 0x38(%rsp), %rdi
leaq 0x240(%rsp), %rsi
movl $0xf4240, %edx          # imm = 0xF4240
callq 0x2090
movslq 0x100(%rbx), %r14
movslq 0x104(%rbx), %rsi
leaq 0x6(%rsp), %rdx
movb $0x0, (%rdx)
leaq 0x10(%rsp), %rdi
leaq 0x7(%rsp), %rcx
callq 0x4d14
leaq 0x18(%rbx), %r15
leaq 0x10(%rsp), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x4cd8
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x28e0
xorl %r13d, %r13d
leaq 0x240(%rsp), %r12
movslq 0x104(%rbx), %rax
cmpq %rax, %r13
jge 0x2bcc
movl $0xf4240, %edx          # imm = 0xF4240
leaq 0x38(%rsp), %rdi
movq %r12, %rsi
callq 0x2090
movq %r12, %rdi
leaq 0x5584(%rip), %rsi      # 0x80c5
callq 0x22a0
movq %r14, %rdi
movq %rax, %rsi
leaq 0x6(%rsp), %rdx
callq 0x20c0
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x738e
movq %r14, %rdi
callq 0x20f0
xorl %r12d, %r12d
xorl %r14d, %r14d
movslq 0x100(%rbx), %rax
cmpq %rax, %r14
jge 0x2bbf
xorl %edi, %edi
leaq 0x553f(%rip), %rsi      # 0x80c5
callq 0x22a0
movq %rax, %rdi
callq 0x2290
movl %eax, %ebp
movq (%r15), %rdi
addq %r12, %rdi
movq %r13, %rsi
callq 0x4a1c
cmpl $0x1, %ebp
jne 0x2bad
orq (%rax), %rdx
jmp 0x2bb3
notq %rdx
andq (%rax), %rdx
movq %rdx, (%rax)
incq %r14
addq $0x28, %r12
jmp 0x2b71
incq %r13
leaq 0x10(%rsp), %r14
jmp 0x2b0d
leaq 0x38(%rsp), %rdi
callq 0x2060
leaq 0x38(%rsp), %rdi
callq 0x2070
addq $0xf4488, %rsp          # imm = 0xF4488
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0xc0, %rbx
leaq 0x5569(%rip), %rsi      # 0x8169
leaq 0x240(%rsp), %rdi
movq %rbx, %rdx
callq 0x4bd6
movq 0xa3c1(%rip), %rdi      # 0xcfd8
leaq 0x240(%rsp), %rsi
callq 0x2190
movq %rax, %rdi
callq 0x2100
leaq 0x240(%rsp), %rdi
callq 0x20f0
pushq $0x1
popq %rdi
callq 0x2210
movq %rax, %rbx
leaq 0x240(%rsp), %rdi
jmp 0x2c6f
jmp 0x2c7a
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x28e0
jmp 0x2c7d
jmp 0x2c7a
jmp 0x2c7a
jmp 0x2c7a
jmp 0x2c7a
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x20f0
jmp 0x2c7d
jmp 0x2c7a
jmp 0x2c7a
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x2310
nop