// File: /workspace/github_c_makefile_star2_O3/fukunagatsu[P]RIblast/fastafile_reader.cpp
// Function: FastafileReader::ReadFastafile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
void FastafileReader::ReadFastafile(string input_file_name, vector<string> &sequences, vector<string> &names){
  ifstream fp;
  string buffer;
  fp.open(input_file_name.c_str(),ios::in);
  if (!fp){
    cout << "Error: can't open input_file:"+input_file_name+"." <<endl;
    exit(1);
  }
  getline(fp,buffer);
  names.push_back(buffer.substr(1,buffer.size()-1));
  string temp_sequence = "";
  int count = 0;
  while(getline(fp,buffer)){
    if(buffer[0] == '>'){
      names.push_back(buffer.substr(1,buffer.size()-1));
      sequences.push_back(temp_sequence);
      temp_sequence = "";
    }else{
      if(buffer.size()>=2){
	if(buffer.substr(buffer.size()-2,2) == "\r\n"){
	  buffer.erase(buffer.size()-2,2);
	}
      }
      if(buffer[buffer.size()-1] == '\r' || buffer[buffer.size()-1] == '\n'){
	buffer.erase(buffer.size()-1,1);
      }
      count += 1;
      temp_sequence = temp_sequence + buffer;
    }
  }
  sequences.push_back(temp_sequence);
  fp.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %rcx, 0x68(%rsp)
movq %rdx, 0x60(%rsp)
movq %rsi, %r15
leaq 0x70(%rsp), %rbx
movq %rbx, %rdi
callq 0x3270
leaq 0x50(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movq (%r15), %rsi
movq %rbx, %rdi
movl $0x8, %edx
callq 0x3160
movq 0x70(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x90(%rsp,%rax)
jne 0x5723
leaq (%rsp,%rax), %rdi
addq $0x70, %rdi
movl $0xa, %esi
callq 0x3200
movsbl %al, %edx
leaq 0x70(%rsp), %rbx
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x3410
leaq 0x40(%rsp), %rsi
movq 0x8(%rsi), %rcx
decq %rcx
movq %rsp, %rdi
movl $0x1, %edx
callq 0x3240
movq %rsp, %rsi
movq 0x68(%rsp), %rdi
callq 0x5d84
leaq 0x10(%rsp), %r14
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x54e6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3230
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x17378(%rip), %rdx     # 0x1c86b
movq %rdx, %rsi
callq 0x5cee
leaq 0x30(%rsp), %r14
leaq 0x40(%rsp), %r12
leaq 0x20(%rsp), %r15
movq %rsp, %rbp
leaq 0x17357(%rip), %r13     # 0x1c86b
movq 0x70(%rsp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3200
movsbl %al, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3410
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x56b9
movq 0x40(%rsp), %rax
cmpb $0x3e, (%rax)
jne 0x55b7
movq 0x48(%rsp), %rcx
decq %rcx
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3240
movq 0x68(%rsp), %rdi
movq %r15, %rsi
callq 0x5d84
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x5590
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x60(%rsp), %rdi
movq %rbp, %rsi
callq 0x5c56
movq 0x8(%rsp), %rdx
movq %rbp, %rdi
xorl %esi, %esi
movq %r13, %rcx
xorl %r8d, %r8d
callq 0x3360
jmp 0x5514
movq 0x48(%rsp), %rax
cmpq $0x2, %rax
jb 0x5659
movq %rbx, %rbp
movq %r13, %rbx
addq $-0x2, %rax
movl $0x2, %ecx
movq %r15, %rdi
movq %r12, %r13
movq %r12, %rsi
movq %rax, %rdx
callq 0x3240
movq %r15, %rdi
leaq 0x17279(%rip), %rsi     # 0x1c869
callq 0x30b0
movl %eax, %r15d
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x560f
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x48(%rsp), %rax
testl %r15d, %r15d
je 0x562f
movq %rbx, %rcx
movq %rbp, %rbx
movq %rsp, %rbp
leaq 0x20(%rsp), %r15
movq %r13, %r12
movq %rcx, %r13
jmp 0x5659
addq $-0x2, %rax
movl $0x2, %edx
movq %r13, %r12
movq %r13, %rdi
movq %rax, %rsi
callq 0x3080
movq %rbx, %r13
movq %rbp, %rbx
movq %rsp, %rbp
leaq 0x20(%rsp), %r15
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
movzbl -0x1(%rcx,%rax), %ecx
cmpl $0xd, %ecx
je 0x566d
cmpl $0xa, %ecx
jne 0x5680
decq %rax
movl $0x1, %edx
movq %r12, %rdi
movq %rax, %rsi
callq 0x3080
movq %r15, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x5c93
movq %rbp, %rdi
movq %r15, %rsi
callq 0x32b0
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x5514
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x5514
movq %rsp, %rsi
movq 0x60(%rsp), %rdi
callq 0x5c56
leaq 0x70(%rsp), %rdi
callq 0x3060
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
leaq 0x50(%rsp), %rbx
je 0x56f0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x40(%rsp), %rdi
cmpq %rbx, %rdi
je 0x5707
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0x70(%rsp), %rdi
callq 0x3090
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x17121(%rip), %rsi     # 0x1c84b
leaq 0x20(%rsp), %rdi
movq %r15, %rdx
callq 0x5bcd
leaq 0x1706d(%rip), %rsi     # 0x1c7ab
leaq 0x20(%rsp), %rdi
callq 0x3420
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
jne 0x576c
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq %r14, %rsi
jmp 0x5778
movq %rsi, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0xe1839(%rip), %rdi     # 0xe6fd0
callq 0x3280
movq %rax, %rdi
callq 0x3120
movq %rsp, %rdi
callq 0x3110
leaq 0x20(%rsp), %rdi
callq 0x3110
movl $0x1, %edi
callq 0x32a0
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x57de
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x57de
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5860
movq 0x30(%rsp), %rsi
jmp 0x5858
jmp 0x5816
movq %rax, %rbx
leaq 0x50(%rsp), %r12
jmp 0x5860
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x5853
jmp 0x5860
jmp 0x5816
jmp 0x583d
movq %rax, %rbx
jmp 0x5860
jmp 0x583d
jmp 0x583d
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x5840
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x5840
jmp 0x583d
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
leaq 0x50(%rsp), %r12
je 0x5860
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x5877
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0x70(%rsp), %rdi
callq 0x3090
movq %rbx, %rdi
callq 0x33e0
nop