// File: /workspace/github_c_makefile_star2_O2/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, %rbp
movq %rdx, 0x28(%rsp)
movq %rsi, %rbx
leaq 0x70(%rsp), %r15
movq %r15, %rdi
callq 0x3230
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq (%rbx), %rsi
pushq $0x8
popq %rdx
movq %r15, %rdi
callq 0x3150
movq 0x70(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x90(%rsp,%rax)
jne 0x4b65
leaq 0x70(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x3050
leaq 0x30(%rsp), %rsi
movq 0x8(%rsi), %rcx
decq %rcx
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rdx
callq 0x3210
leaq 0x8(%rsp), %rsi
movq %rbp, %rdi
callq 0x504c
leaq 0x8(%rsp), %rdi
callq 0x3100
leaq 0x11e56(%rip), %rsi     # 0x16813
leaq 0x8(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x4f08
leaq 0x70(%rsp), %r15
leaq 0x30(%rsp), %r12
leaq 0x50(%rsp), %r13
pushq $0x1
popq %rbx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3050
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x4b1c
movq 0x30(%rsp), %rax
cmpb $0x3e, (%rax)
jne 0x4a50
movq 0x38(%rsp), %rcx
decq %rcx
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x3210
movq %rbp, %rdi
movq %r13, %rsi
callq 0x504c
movq %r13, %rdi
callq 0x3100
movq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x4f44
leaq 0x8(%rsp), %rdi
leaq 0x11dca(%rip), %rsi     # 0x16813
callq 0x33e0
jmp 0x49de
movq 0x38(%rsp), %rdx
cmpq $0x2, %rdx
jb 0x4acc
movq %r12, %rsi
movq %r15, %rbx
movq %rbp, %r15
addq $-0x2, %rdx
movq %r13, %rdi
pushq $0x2
popq %rcx
callq 0x3210
movq %r13, %rdi
leaq 0x11d94(%rip), %rsi     # 0x16811
callq 0x4f70
movl %eax, %r14d
movq %r13, %rdi
callq 0x3100
movq 0x38(%rsp), %rdx
testb %r14b, %r14b
je 0x4abe
addq $-0x2, %rdx
movq %r12, %rdi
movq %rdx, %rsi
pushq $0x2
popq %rdx
callq 0x3080
movq %r15, %rbp
movq %rbx, %r15
pushq $0x1
popq %rbx
leaq 0x50(%rsp), %r13
movq 0x38(%rsp), %rdx
jmp 0x4acc
movq %r15, %rbp
movq %rbx, %r15
pushq $0x1
popq %rbx
leaq 0x50(%rsp), %r13
movq 0x30(%rsp), %rax
movzbl -0x1(%rax,%rdx), %eax
cmpl $0xd, %eax
je 0x4ae0
cmpl $0xa, %eax
jne 0x4af1
decq %rdx
movq %r12, %rdi
movq %rdx, %rsi
movq %rbx, %rdx
callq 0x3080
movq %r13, %rdi
leaq 0x8(%rsp), %r14
movq %r14, %rsi
movq %r12, %rdx
callq 0x4f7d
movq %r14, %rdi
movq %r13, %rsi
callq 0x3260
movq %r13, %rdi
callq 0x3100
jmp 0x49de
leaq 0x8(%rsp), %rsi
movq 0x28(%rsp), %rdi
callq 0x4f44
leaq 0x70(%rsp), %rdi
callq 0x3060
leaq 0x8(%rsp), %rdi
callq 0x3100
leaq 0x30(%rsp), %rdi
callq 0x3100
leaq 0x70(%rsp), %rdi
callq 0x30a0
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x11c87(%rip), %rsi     # 0x167f3
leaq 0x50(%rsp), %rdi
movq %rbx, %rdx
callq 0x4e92
leaq 0x11bfb(%rip), %rdx     # 0x1677b
leaq 0x8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x4e73
movq 0xde43a(%rip), %rdi     # 0xe2fd0
leaq 0x8(%rsp), %rsi
callq 0x31c0
movq %rax, %rdi
callq 0x3110
leaq 0x8(%rsp), %rdi
callq 0x3100
leaq 0x50(%rsp), %rdi
callq 0x3100
pushq $0x1
popq %rdi
callq 0x3250
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3100
jmp 0x4bd6
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
jmp 0x4c09
jmp 0x4be7
jmp 0x4be7
jmp 0x4c01
jmp 0x4be7
jmp 0x4c01
movq %rax, %rbx
jmp 0x4c0e
jmp 0x4c01
jmp 0x4c01
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x3100
jmp 0x4c04
jmp 0x4c01
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3100
leaq 0x30(%rsp), %rdi
callq 0x3100
leaq 0x70(%rsp), %rdi
callq 0x30a0
movq %rbx, %rdi
callq 0x33a0