// File: /workspace/github_c_makefile_star2_O1/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 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
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 0x5290
leaq (%rsp,%rax), %rdi
addq $0x70, %rdi
movl $0xa, %esi
callq 0x3200
movsbl %al, %edx
leaq 0x70(%rsp), %r15
leaq 0x20(%rsp), %rsi
movq %r15, %rdi
callq 0x3410
leaq 0x20(%rsp), %rsi
movq 0x8(%rsi), %rcx
decq %rcx
movq %rsp, %rdi
movl $0x1, %edx
callq 0x3240
movq %rsp, %rsi
movq 0x68(%rsp), %rdi
callq 0x5900
leaq 0x10(%rsp), %rbx
movq -0x10(%rbx), %rdi
cmpq %rbx, %rdi
je 0x508b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3230
movq %rsp, %rdi
movq %rbx, (%rdi)
leaq 0x1679b(%rip), %rdx     # 0x1b833
movq %rdx, %rsi
callq 0x5870
leaq 0x50(%rsp), %r14
leaq 0x20(%rsp), %r13
leaq 0x40(%rsp), %r12
movq %rsp, %rbp
leaq 0x1677a(%rip), %rbx     # 0x1b833
movq 0x70(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3200
movsbl %al, %edx
movq %r15, %rdi
movq %r13, %rsi
callq 0x3410
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x5226
movq 0x20(%rsp), %rax
cmpb $0x3e, (%rax)
jne 0x515c
movq 0x28(%rsp), %rcx
decq %rcx
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x3240
movq 0x68(%rsp), %rdi
movq %r12, %rsi
callq 0x5900
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x5135
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x60(%rsp), %rdi
movq %rbp, %rsi
callq 0x57d8
movq 0x8(%rsp), %rdx
movq %rbp, %rdi
xorl %esi, %esi
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x3360
jmp 0x50b9
movq 0x28(%rsp), %rdx
cmpq $0x2, %rdx
jb 0x51c4
addq $-0x2, %rdx
movl $0x2, %ecx
movq %r12, %rdi
movq %r13, %rsi
callq 0x3240
movq %r12, %rdi
leaq 0x166ac(%rip), %rsi     # 0x1b831
callq 0x30b0
movl %eax, %r12d
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x51a4
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3230
testl %r12d, %r12d
leaq 0x40(%rsp), %r12
jne 0x51c4
movq 0x28(%rsp), %rsi
addq $-0x2, %rsi
movl $0x2, %edx
movq %r13, %rdi
callq 0x3080
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rsi
movzbl -0x1(%rax,%rsi), %eax
cmpl $0xd, %eax
je 0x51dd
cmpl $0xa, %eax
jne 0x51ed
decq %rsi
movl $0x1, %edx
movq %r13, %rdi
callq 0x3080
movq %r12, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x5815
movq %rbp, %rdi
movq %r12, %rsi
callq 0x32b0
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x50b9
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x50b9
movq %rsp, %rsi
movq 0x60(%rsp), %rdi
callq 0x57d8
leaq 0x70(%rsp), %rdi
callq 0x3060
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
leaq 0x30(%rsp), %rbx
je 0x525d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x20(%rsp), %rdi
cmpq %rbx, %rdi
je 0x5274
movq 0x30(%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
movq %r14, %r12
leaq 0x16579(%rip), %rsi     # 0x1b813
leaq 0x40(%rsp), %rdi
movq %r15, %rdx
callq 0x574f
leaq 0x164c3(%rip), %rsi     # 0x1b771
leaq 0x40(%rsp), %rdi
callq 0x3420
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x52d9
movups (%rcx), %xmm0
movups %xmm0, (%r14)
jmp 0x52e5
movq %rdx, (%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 (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0xe0cc3(%rip), %rdi     # 0xe5fd0
callq 0x3280
movq %rax, %rdi
callq 0x3120
movq %rsp, %rdi
callq 0x3110
leaq 0x40(%rsp), %rdi
callq 0x3110
movl $0x1, %edi
callq 0x32a0
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x5354
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x5354
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5374
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x5374
movq %rax, %rbx
movq %r12, %r14
jmp 0x53e4
movq %rax, %rbx
leaq 0x30(%rsp), %r14
jmp 0x53e4
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x53d7
jmp 0x53e4
jmp 0x539a
jmp 0x53c1
movq %rax, %rbx
jmp 0x53e4
jmp 0x53c1
jmp 0x53c1
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x53c4
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x53c4
jmp 0x53c1
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
leaq 0x30(%rsp), %r14
je 0x53e4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x53fb
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0x70(%rsp), %rdi
callq 0x3090
movq %rbx, %rdi
callq 0x33e0
nop