// File: /workspace/github_cpp_makefile_star2_O1/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 0x625849(%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 0x43f9
movq 0x6257fd(%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 0x435e
movq (%r13), %r13
xorl %r14d, %r14d
movsbl (%r13,%r14), %edi
callq 0x34e0
movb %al, (%r13,%r14)
incq %r14
cmpq %r14, %rbp
jne 0x4346
movq 0x6257ab(%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 0x62577a(%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 0x42c0
movq 0x625739(%rip), %rdi    # 0x629b10
callq 0x3100
cmpl $-0x1, %eax
sete %bpl
leaq 0x20(%rsp), %rdx
jne 0x4441
movl $0xc350, 0xaea4(%rip)   # imm = 0xC350
movb $0x1, %bpl
jmp 0x4441
movl %ebx, 0xae99(%rip)      # 0xf298
movb $0x1, %bpl
cmpq $0xc34f, %rbx           # imm = 0xC34F
ja 0x443c
xorl %eax, %eax
leaq 0x20(%rsp), %rdx
movq 0x8(%rsp), %rsi
movq %rax, (%rsi,%r15)
movq -0x8(%rsi,%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 0x4417
jmp 0x4441
leaq 0x20(%rsp), %rdx
movq 0x10(%rsp), %rdi
cmpq %rdx, %rdi
je 0x4458
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 0x446b
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x448a
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32d0
movq %rbx, %rdi
callq 0x3480