// File: 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
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x3380
movq 0x632196(%rip), %rdi    # 0x636b20
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %eax
shlq $0x5, %rax
addq %rax, %rsi
callq 0x3090
movq %rax, -0x80(%rbp)
jmp 0x49a3
movq -0x80(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3340
movb %al, -0x81(%rbp)
jmp 0x49be
movb -0x81(%rbp), %al
testb $0x1, %al
jne 0x49cd
jmp 0x4afa
movq 0x63214c(%rip), %rdi    # 0x636b20
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %eax
shlq $0x5, %rax
addq %rax, %rsi
callq 0x3090
jmp 0x49e9
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
callq 0x3250
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rdi
callq 0x3190
movq %rax, -0x68(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x8a90
testb $0x1, %al
jne 0x4a28
jmp 0x4a6e
leaq -0x60(%rbp), %rdi
callq 0x8ad0
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movsbl (%rax), %edi
callq 0x34f0
movb %al, %cl
movq -0x70(%rbp), %rax
movb %cl, (%rax)
leaq -0x60(%rbp), %rdi
callq 0x8af0
jmp 0x4a15
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x31b0
jmp 0x4b5f
movq 0x6320ab(%rip), %rdi    # 0x636b20
leaq -0x40(%rbp), %rsi
callq 0x3090
jmp 0x4a80
movq 0x632099(%rip), %rdi    # 0x636b20
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %eax
shlq $0x5, %rax
addq %rax, %rsi
callq 0x3090
jmp 0x4a9c
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl $0xc350, -0x1c(%rbp)    # imm = 0xC350
jne 0x4af5
movq 0x63206b(%rip), %rdi    # 0x636b20
callq 0x30e0
movl %eax, -0x88(%rbp)
jmp 0x4ac2
movl -0x88(%rbp), %eax
movl %eax, -0x74(%rbp)
cmpl $-0x1, -0x74(%rbp)
jne 0x4ae8
movl $0xc350, 0x177cd(%rip)  # imm = 0xC350
movb $0x1, -0x1(%rbp)
movl $0x1, -0x78(%rbp)
jmp 0x4b48
movb $0x0, -0x1(%rbp)
movl $0x1, -0x78(%rbp)
jmp 0x4b48
jmp 0x4983
movl -0x1c(%rbp), %eax
movl %eax, 0x177a5(%rip)     # 0x1c2a8
cmpl $0xc350, -0x1c(%rbp)    # imm = 0xC350
jae 0x4b3d
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %eax
shlq $0x5, %rax
addq %rax, %rdi
callq 0x3360
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %eax
shlq $0x5, %rax
addq %rax, %rdi
callq 0x3360
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x4b03
movb $0x1, -0x1(%rbp)
movl $0x1, -0x78(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x31b0
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x90, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x34a0
nopl (%rax,%rax)