// File: /workspace/github_cpp_makefile_star2_O3/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 $0xf4498, %rsp          # imm = 0xF4498
movq %rdi, %r12
leaq 0x48(%rsp), %r14
movq %r14, %rdi
callq 0x2260
movq 0xc0(%r12), %rsi
movq %r14, %rdi
movl $0x8, %edx
callq 0x2150
movq 0x48(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x68(%rsp,%rax)
jne 0x2da2
leaq (%rsp,%rax), %rdi
addq $0x48, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %ecx
leaq 0x48(%rsp), %r14
leaq 0x250(%rsp), %rsi
movl $0xf4240, %edx          # imm = 0xF4240
movq %r14, %rdi
callq 0x23b0
leaq 0x6577(%rip), %r15      # 0x90e5
leaq 0x250(%rsp), %rdi
movq %r15, %rsi
callq 0x2310
movq %rax, %rdi
callq 0x2300
movl %eax, 0x100(%r12)
xorl %edi, %edi
movq %r15, %rsi
callq 0x2310
movq %rax, %rdi
callq 0x2300
movl %eax, 0x104(%r12)
leaq 0xa8(%r12), %rdi
movslq %eax, %rsi
movq %rdi, 0x10(%rsp)
callq 0x6288
movq 0x48(%rsp), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %ecx
leaq 0x48(%rsp), %r15
leaq 0x250(%rsp), %rsi
movl $0xf4240, %edx          # imm = 0xF4240
movq %r15, %rdi
callq 0x23b0
movslq 0x100(%r12), %r14
movslq 0x104(%r12), %rsi
leaq 0x6(%rsp), %rdx
movb $0x0, (%rdx)
leaq 0x20(%rsp), %rdi
leaq 0x7(%rsp), %rcx
callq 0x63aa
leaq 0x18(%r12), %rdi
leaq 0x20(%rsp), %rdx
movq %r14, %rsi
callq 0x6368
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x2c38
callq 0x21f0
cmpl $0x0, 0x104(%r12)
jle 0x2d7c
movq $0x0, 0x8(%rsp)
leaq 0x250(%rsp), %r14
leaq 0x6486(%rip), %r13      # 0x90e5
leaq 0x20(%rsp), %rbx
movq 0x48(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %ecx
movl $0xf4240, %edx          # imm = 0xF4240
movq %r15, %rdi
movq %r14, %rsi
callq 0x23b0
movq %r14, %rdi
movq %r13, %rsi
callq 0x2310
movq %rbx, %rdi
movq %rax, %rsi
leaq 0x6(%rsp), %rdx
callq 0x20e0
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x8996
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2cc9
callq 0x21f0
cmpl $0x0, 0x100(%r12)
movq %r13, %rsi
movq %r12, %rbx
jle 0x2d4c
movl $0x1, %eax
movq 0x8(%rsp), %rcx
shlq %cl, %rax
movq %rax, 0x18(%rsp)
movq $-0x2, %r13
rolq %cl, %r13
movl %ecx, %r12d
shrl $0x6, %r12d
xorl %r14d, %r14d
xorl %ebp, %ebp
xorl %edi, %edi
movq %rsi, %r15
callq 0x2310
movq %rax, %rdi
callq 0x2300
movq 0x18(%rbx), %rcx
movq (%rcx,%r14), %rcx
movq (%rcx,%r12,8), %rdx
movq %rdx, %rsi
andq %r13, %rsi
orq 0x18(%rsp), %rdx
cmpl $0x1, %eax
cmovneq %rsi, %rdx
movq %r15, %rsi
movq %rdx, (%rcx,%r12,8)
incq %rbp
movslq 0x100(%rbx), %rax
addq $0x28, %r14
cmpq %rax, %rbp
jl 0x2d02
movq 0x8(%rsp), %rax
incl %eax
movq %rax, 0x8(%rsp)
cmpl 0x104(%rbx), %eax
leaq 0x48(%rsp), %r15
leaq 0x250(%rsp), %r14
movq %rsi, %r13
movq %rbx, %r12
leaq 0x20(%rsp), %rbx
jl 0x2c64
leaq 0x48(%rsp), %rdi
callq 0x2070
leaq 0x48(%rsp), %rdi
callq 0x2080
addq $0xf4498, %rsp          # imm = 0xF4498
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0xc0, %r12
leaq 0x63d9(%rip), %rsi      # 0x9189
leaq 0x250(%rsp), %rdi
movq %r12, %rdx
callq 0x6206
movq 0x250(%rsp), %rsi
movq 0x258(%rsp), %rdx
movq 0xa201(%rip), %rdi      # 0xcfd8
callq 0x2270
movq %rax, %rdi
callq 0x2120
leaq 0x250(%rsp), %rdi
callq 0x2110
movl $0x1, %edi
callq 0x2290
movq %rax, %rbx
leaq 0x260(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x2e34
jmp 0x2e40
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
jne 0x2e39
jmp 0x2e43
jmp 0x2e40
jmp 0x2e40
jmp 0x2e40
jmp 0x2e40
jmp 0x2e40
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2e43
callq 0x21f0
jmp 0x2e43
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x2370
nop