// File: /workspace/github_cpp_makefile_star2_O3/Ahhgust[P]STRaitRazor/str8.cpp
// Function: buffer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)
bool
buffer(string mem[], string qmem[]) {

  unsigned i=0;
  string dummy;

  while (getline(*currentInputStream, mem[i])) {
    getline(*currentInputStream, mem[i]); // read in the DNA string
    // added by AW: Force to upper-case
    for (char & c : mem[i])
      c = toupper(c);

    getline(*currentInputStream, dummy); // the +
    getline(*currentInputStream, qmem[i]); // the quality string (ignored)
    ++i;
    if (i == RECSINMEM) {
      
      int c = currentInputStream->peek();
      if (c == EOF) {
        LASTREC = RECSINMEM;
        return 1;
      }
      return 0;
    }
  }
  

  LASTREC = i;
  for ( ; i < RECSINMEM; ++i) {
    mem[i].clear();
    qmem[i].clear();
  }
  
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, 0x8(%rsp)
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movl $0x8, %r15d
xorl %ebx, %ebx
movq %rsi, 0x30(%rsp)
movq 0x625858(%rip), %rbp    # 0x629b10
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x3290
movq %rbx, %r12
shlq $0x5, %r12
movq 0x8(%rsp), %rcx
leaq (%rcx,%r12), %r13
movsbl %al, %edx
movq %rbp, %rdi
movq %r13, %rsi
callq 0x34d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x43d6
movq 0x62580c(%rip), %rbp    # 0x629b10
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %edx
movq %rbp, %rdi
movq %r13, %rsi
callq 0x34d0
movq 0x8(%r13), %rbp
testq %rbp, %rbp
je 0x434f
movq (%r13), %r13
xorl %r14d, %r14d
movsbl (%r13,%r14), %edi
callq 0x34e0
movb %al, (%r13,%r14)
incq %r14
cmpq %r14, %rbp
jne 0x4337
movq 0x6257ba(%rip), %r13    # 0x629b10
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3290
movq 0x30(%rsp), %r14
movsbl %al, %edx
movq %r13, %rdi
leaq 0x10(%rsp), %rsi
callq 0x34d0
movq 0x625789(%rip), %r13    # 0x629b10
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3290
addq %r14, %r12
movsbl %al, %edx
movq %r13, %rdi
movq %r12, %rsi
callq 0x34d0
incq %rbx
addq $0x20, %r15
cmpq $0xc350, %rbx           # imm = 0xC350
jne 0x42b1
movq 0x625748(%rip), %rdi    # 0x629b10
callq 0x3100
cmpl $-0x1, %eax
je 0x4414
xorl %ebp, %ebp
jmp 0x4421
movl %ebx, 0xaebc(%rip)      # 0xf298
movb $0x1, %bpl
cmpq $0xc34f, %rbx           # imm = 0xC34F
ja 0x4421
xorl %eax, %eax
movq 0x8(%rsp), %rdx
movq %rax, (%rdx,%r15)
movq -0x8(%rdx,%r15), %rcx
movb %al, (%rcx)
movq %rax, (%r14,%r15)
movq -0x8(%r14,%r15), %rcx
movb %al, (%rcx)
addq $0x20, %r15
cmpq $0x186a08, %r15         # imm = 0x186A08
jne 0x43ef
jmp 0x4421
movl $0xc350, 0xae7a(%rip)   # imm = 0xC350
movb $0x1, %bpl
leaq 0x20(%rsp), %rax
movq 0x10(%rsp), %rdi
cmpq %rax, %rdi
je 0x443d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32d0
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4450
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x446f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32d0
movq %rbx, %rdi
callq 0x3480