// File: /workspace/github_cpp_makefile_star2_O3/iu-vail[P]iprimal/Assignment.cpp
// Function: Assignment::ImportVec(std::basic_ifstream<char, std::char_traits<char>>&, std::vector<unsigned int, std::allocator<unsigned int>>&)
void
Assignment::ImportVec(ifstream& input_file, vector<uint>& vec){

  string line;

  if (input_file.is_open())
  {
    while (!input_file.eof() )
    {
      uint num_cols = 0;
      vec.clear();
      getline (input_file,line);
      string word;

      stringstream parse(line);
      while(parse >> word){
	//if comment line, ignore it
	if(word[0] == '#')
	  break;
	vec.push_back(atoi(word.c_str()));  //if not number, convert to zero
	num_cols++;
      } //end inner while

      if(num_cols > 0)
        break;

    } //end out layer while

    input_file.close();

  } //end outmost if
  else{ 
    cerr <<endl<<"Error: Unable to open file! Stopped."<<endl<<endl; 
    exit(0);
  }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rdx, %r15
movq %rsi, %r14
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x78(%rsi), %rdi
callq 0x3080
testb %al, %al
je 0x3dde
leaq 0x30(%rsp), %r12
leaq 0x50(%rsp), %r13
leaq 0x10(%rsp), %rbp
movq (%r14), %rax
movq -0x18(%rax), %rdi
testb $0x2, 0x20(%r14,%rdi)
jne 0x3da8
movq (%r15), %rcx
cmpq %rcx, 0x8(%r15)
je 0x3cc7
movq %rcx, 0x8(%r15)
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x3400
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movb $0x0, 0x20(%rsp)
movq %r13, %rdi
movq %r12, %rbx
movq %r12, %rsi
movl $0x18, %edx
callq 0x3360
xorl %r12d, %r12d
movq %r13, %rdi
movq %rbp, %rsi
callq 0x32d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3d64
movq 0x10(%rsp), %rdi
cmpb $0x23, (%rdi)
je 0x3d64
callq 0x3340
movl %eax, 0xc(%rsp)
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
je 0x3d52
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r15)
jmp 0x3d5f
movq %r15, %rdi
leaq 0xc(%rsp), %rdx
callq 0x43c2
decl %r12d
jmp 0x3d10
movq %r13, %rdi
movq 0xb232(%rip), %rsi      # 0xefa0
callq 0x31b0
leaq 0xd0(%rsp), %rdi
callq 0x30d0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x3d9c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3260
testl %r12d, %r12d
movq %rbx, %r12
je 0x3ca3
movq %r14, %rdi
callq 0x3060
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x3dcc
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3260
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xb20b(%rip), %rdi      # 0xeff0
callq 0x3110
movq %rax, %rbx
leaq 0x7262(%rip), %rsi      # 0xb056
movl $0x24, %edx
movq %rax, %rdi
callq 0x32a0
movq %rbx, %rdi
callq 0x3110
movq %rax, %rdi
callq 0x3110
xorl %edi, %edi
callq 0x32b0
jmp 0x3e1f
movq %rax, %rbx
jmp 0x3e47
movq %rax, %rbx
jmp 0x3e63
jmp 0x3e26
movq %rax, %rbx
movq 0xb170(%rip), %rsi      # 0xefa0
leaq 0x50(%rsp), %rdi
callq 0x31b0
leaq 0xd0(%rsp), %rdi
callq 0x30d0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x3e63
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x3e7f
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3260
movq %rbx, %rdi
callq 0x33d0
nop