// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/misc/utils.cpp
// Function: CSA::readPizzaChili(std::basic_ifstream<char, std::char_traits<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
readPizzaChili(std::ifstream& file, std::vector<std::string>& patterns)
{
  std::string header;
  std::getline(file, header);

  std::size_t start = header.find("number=");
  if(start == std::string::npos) { return; }
  int temp = std::atoi(header.substr(start + 7).c_str());
  if(temp <= 0) { return; }
  usint n = temp;

  start = header.find("length=");
  if(start == std::string::npos) { return; }
  temp = std::atoi(header.substr(start + 7).c_str());
  if(temp <= 0) { return; }
  usint l = temp;

  char buffer[l];
  for(usint i = 0; i < n; i++)
  {
    file.read(buffer, l);
    patterns.push_back(std::string(buffer, l));
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, -0x80(%rbp)
movq %rdi, %r13
leaq -0x58(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movq (%rdi), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %edx
leaq -0x68(%rbp), %rsi
movq %r13, %rdi
callq 0x3490
leaq 0x3316(%rip), %rsi      # 0x18960
leaq -0x68(%rbp), %rdi
movl $0x7, %ecx
xorl %edx, %edx
callq 0x3440
cmpq $-0x1, %rax
je 0x15791
addq $0x7, %rax
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rsi
movq %rax, %rdx
movq $-0x1, %rcx
callq 0x3280
leaq -0x38(%rbp), %r14
movq -0x10(%r14), %rbx
movq %rbx, %rdi
callq 0x3390
movl %eax, %r15d
cmpq %r14, %rbx
je 0x156a6
movq -0x38(%rbp), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x3270
testl %r15d, %r15d
jle 0x15791
leaq 0x32b2(%rip), %rsi      # 0x18968
leaq -0x68(%rbp), %rdi
movl $0x7, %ecx
xorl %edx, %edx
callq 0x3440
cmpq $-0x1, %rax
je 0x15791
addq $0x7, %rax
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rsi
movq %rax, %rdx
movq $-0x1, %rcx
callq 0x3280
movq -0x48(%rbp), %r14
movq %r14, %rdi
callq 0x3390
movl %eax, %ebx
leaq -0x38(%rbp), %rax
cmpq %rax, %r14
je 0x15711
movq -0x38(%rbp), %rsi
incq %rsi
movq %r14, %rdi
callq 0x3270
testl %ebx, %ebx
jle 0x15791
movq %r13, -0x78(%rbp)
movq %rsp, -0x70(%rbp)
movl %ebx, %r12d
movq %rsp, %r13
leaq 0xf(%r12), %rax
andq $-0x10, %rax
subq %rax, %r13
movq %r13, %rsp
leaq (%r12,%r13), %rbx
leaq -0x48(%rbp), %r14
movq -0x78(%rbp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x32e0
leaq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x5640
movq -0x80(%rbp), %rdi
movq %r14, %rsi
callq 0x16630
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x15784
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3270
decl %r15d
jne 0x1573a
movq -0x70(%rbp), %rsp
leaq -0x58(%rbp), %r12
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x157a6
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x3270
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x157bd
jmp 0x157bd
jmp 0x157bd
jmp 0x157bd
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x157d9
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x3270
movq %rbx, %rdi
callq 0x3460
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x157c0
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3270
jmp 0x157c0