LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/UTAP[P]APHTTP/utils/utilities.cpp
// Function: urlDecode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string urlDecode(string const &str) {
  char decode_buf[3];
  string result;
  result.reserve(str.size());

  for (size_t pos = 0; pos < str.size(); ++pos) {
    switch (str[pos]) {
    case '+':
      // convert to space character
      result += ' ';
      break;
    case '%':
      // decode hexidecimal value
      if (pos + 2 < str.size()) {
        decode_buf[0] = str[++pos];
        decode_buf[1] = str[++pos];
        decode_buf[2] = '\0';
        result += static_cast<char>(strtol(decode_buf, nullptr, 16));
      } else {
        // recover from error by not decoding character
        result += '%';
      }
      break;
    default:
      // character does not need to be escaped
      result += str[pos];
    }
  }
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rsi, %r14
movb $0x0, 0x10(%rdi)
movq 0x8(%rsi), %rsi
callq 0x44f0
xorl %r13d, %r13d
pushq $0x10
popq %r12
movq 0x8(%r14), %rdx
cmpq %rdx, %r13
jae 0xb3ba
movq (%r14), %rcx
movzbl (%rcx,%r13), %eax
cmpl $0x25, %eax
je 0xb36d
cmpl $0x2b, %eax
jne 0xb3aa
movb $0x20, %al
jmp 0xb3aa
leaq 0x2(%r13), %r15
movb $0x25, %al
cmpq %rdx, %r15
jae 0xb3aa
movb 0x1(%rcx,%r13), %al
movb %al, -0x2b(%rbp)
movb 0x2(%rcx,%r13), %al
movb %al, -0x2a(%rbp)
movb $0x0, -0x29(%rbp)
leaq -0x2b(%rbp), %rdi
xorl %esi, %esi
movl %r12d, %edx
callq 0x4640
movsbl %al, %esi
movq %rbx, %rdi
callq 0x42e0
movq %r15, %r13
jmp 0xb3b5
movsbl %al, %esi
movq %rbx, %rdi
callq 0x42e0
incq %r13
jmp 0xb34e
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb3ce
movq %rax, %r14
movq %rbx, %rdi
callq 0x4638
movq %r14, %rdi
callq 0x4580
// File: /workspace/github_cpp_makefile_star2_O2/UTAP[P]APHTTP/utils/utilities.cpp
// Function: tokenize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char)
vector<string> tokenize(const string &cnt, char delimiter) {
  vector<string> res;
  istringstream is(cnt);
  string part;
  while (getline(is, part, delimiter))
    res.push_back(part);
  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1a0, %rsp            # imm = 0x1A0
movl %edx, %r14d
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq -0x1c0(%rbp), %rdi
pushq $0x8
popq %rdx
callq 0x4540
leaq -0x30(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movsbl %r14b, %r14d
leaq -0x1c0(%rbp), %r15
leaq -0x40(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
movl %r14d, %edx
callq 0x45c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xb4a2
movq %rbx, %rdi
movq %r12, %rsi
callq 0xa7da
jmp 0xb479
leaq -0x40(%rbp), %rdi
callq 0x4638
leaq -0x1c0(%rbp), %rdi
callq 0x41e0
movq %rbx, %rax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0xb4e7
movq %rax, %r14
leaq -0x40(%rbp), %rdi
callq 0x4638
leaq -0x1c0(%rbp), %rdi
callq 0x41e0
movq %rbx, %rdi
callq 0xa7ae
movq %r14, %rdi
callq 0x4580
// File: /workspace/github_cpp_makefile_star2_O2/UTAP[P]APHTTP/utils/utilities.cpp
// Function: writeObjectToFile(char const*, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
int writeObjectToFile(const char *object, int size,
                      std::string const &filePath) {
  ofstream file;
  file.open(filePath, fstream::binary);
  if (!file.is_open())
    return -1;
  file.write(object, size);
  file.close();
  return sizeof(object);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rdx, %r15
movl %esi, %r14d
movq %rdi, %rbx
leaq -0x220(%rbp), %r12
movq %r12, %rdi
callq 0x4550
pushq $0x4
popq %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x41f0
leaq -0x1b0(%rbp), %rdi
callq 0x40e0
testb %al, %al
je 0xb5c4
movslq %r14d, %rdx
leaq -0x220(%rbp), %rdi
movq %rbx, %rsi
callq 0x4450
leaq -0x220(%rbp), %rdi
callq 0x4480
pushq $0x8
jmp 0xb5c6
pushq $-0x1
popq %rbx
leaq -0x220(%rbp), %rdi
callq 0x44c0
movl %ebx, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x220(%rbp), %rdi
callq 0x44c0
movq %rbx, %rdi
callq 0x4580
// File: /workspace/github_cpp_makefile_star2_O2/UTAP[P]APHTTP/utils/utilities.cpp
// Function: getCimapFromString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
cimap getCimapFromString(std::string str) {
  cimap m;
  vector<string> tokenized = tokenize(str, '&');
  for (auto token : tokenized) {
    vector<string> keyValue = tokenize(token, '=');
    if (keyValue.size() != 2)
      continue;
    string key = keyValue[0];
    string value = keyValue[1];
    m[key] = value;
  }
  return m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
leaq 0x8(%rdi), %rax
andl $0x0, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rdi, -0x30(%rbp)
andq $0x0, 0x28(%rdi)
leaq -0x60(%rbp), %rdi
pushq $0x26
popq %rdx
callq 0xb428
movq -0x60(%rbp), %r14
movq -0x58(%rbp), %rbx
leaq -0xc0(%rbp), %r15
leaq -0x48(%rbp), %r12
leaq -0xa0(%rbp), %r13
cmpq %rbx, %r14
je 0xb6f8
movq %r15, %rdi
movq %r14, %rsi
callq 0x4470
movq %r12, %rdi
movq %r15, %rsi
pushq $0x3d
popq %rdx
callq 0xb428
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rax
subq %rsi, %rax
cmpq $0x40, %rax
jne 0xb6df
leaq -0x80(%rbp), %rdi
callq 0x4470
movq -0x48(%rbp), %rsi
addq $0x20, %rsi
movq %r13, %rdi
callq 0x4470
movq -0x30(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x8216
movq %rax, %rdi
movq %r13, %rsi
callq 0x4240
movq %r13, %rdi
callq 0x4638
leaq -0x80(%rbp), %rdi
callq 0x4638
movq %r12, %rdi
callq 0xa7ae
movq %r15, %rdi
callq 0x4638
addq $0x20, %r14
jmp 0xb66a
leaq -0x60(%rbp), %rdi
callq 0xa7ae
movq -0x30(%rbp), %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0xb766
movq %rax, %rbx
jmp 0xb748
movq %rax, %rbx
jmp 0xb73f
movq %rax, %rbx
jmp 0xb75d
movq %rax, %rbx
jmp 0xb751
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x4638
leaq -0x80(%rbp), %rdi
callq 0x4638
leaq -0x48(%rbp), %rdi
callq 0xa7ae
leaq -0xc0(%rbp), %rdi
callq 0x4638
leaq -0x60(%rbp), %rdi
callq 0xa7ae
movq -0x30(%rbp), %rdi
callq 0x82fc
movq %rbx, %rdi
callq 0x4580
// File: /workspace/github_cpp_makefile_star2_O2/UTAP[P]APHTTP/utils/utilities.cpp
// Function: readMapFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>*)
int readMapFromFile(std::string fname, std::map<std::string, std::string> *m) {
  std::ifstream inputStream(fname);
  if (!inputStream.is_open())
    return -errno;

  std::string line;
  while (std::getline(inputStream, line)) {
    auto tokens = tokenize(line, '=');
    //     KEY         VALUE
    (*m)[tokens[0]] = tokens[(tokens.size() < 2) ? 0 : 1];
  }

  inputStream.close();
  return (*m).size();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rsi, %rbx
movq %rdi, %rsi
leaq -0x268(%rbp), %rdi
pushq $0x8
popq %rdx
callq 0x4510
leaq -0x1f0(%rbp), %rdi
callq 0x40e0
testb %al, %al
je 0xb82b
leaq -0x50(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x60(%rbp), %r15
leaq -0x40(%rbp), %r12
leaq -0x268(%rbp), %rdi
movq %r15, %rsi
callq 0x40a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xb836
movq %r12, %rdi
movq %r15, %rsi
pushq $0x3d
popq %rdx
callq 0xb428
movq -0x40(%rbp), %r14
movq -0x38(%rbp), %r13
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb8a0
subq %r14, %r13
xorl %esi, %esi
cmpq $0x21, %r13
setae %sil
shll $0x5, %esi
addq %r14, %rsi
movq %rax, %rdi
callq 0x4240
movq %r12, %rdi
callq 0xa7ae
jmp 0xb7c8
callq 0x4050
xorl %ebx, %ebx
subl (%rax), %ebx
jmp 0xb84e
leaq -0x268(%rbp), %rdi
callq 0x40b0
movl 0x28(%rbx), %ebx
leaq -0x60(%rbp), %rdi
callq 0x4638
leaq -0x268(%rbp), %rdi
callq 0x4110
movl %ebx, %eax
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb872
jmp 0xb872
movq %rax, %rbx
jmp 0xb883
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0xa7ae
leaq -0x60(%rbp), %rdi
callq 0x4638
leaq -0x268(%rbp), %rdi
callq 0x4110
movq %rbx, %rdi
callq 0x4580
// File: /workspace/github_cpp_makefile_star2_O2/UTAP[P]APHTTP/server/server.cpp
// Function: split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, 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 split(string str, string separator, int max, vector<string> &results) {
  int i = 0;
  size_t found = str.find_first_of(separator);

  while (found != string::npos) {
    if (found > 0)
      results.push_back(str.substr(0, found));
    str = str.substr(found + 1);
    found = str.find_first_of(separator);

    if (max > -1 && ++i == max)
      break;
  }
  if (str.length() > 0)
    results.push_back(str);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, -0x38(%rbp)
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %r14
movq $0x0, -0x30(%rbp)
xorl %edx, %edx
callq 0x4310
movq %rax, %rbx
leaq -0x58(%rbp), %r13
testq %rbx, %rbx
je 0xbc07
cmpq $-0x1, %rbx
je 0xbc52
movq %r13, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x4390
movq -0x38(%rbp), %rdi
movq %r13, %rsi
callq 0xf01a
movq %r13, %rdi
callq 0x4638
incq %rbx
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
pushq $-0x1
popq %rcx
callq 0x4390
movq %r14, %rdi
movq %r13, %rsi
callq 0x4400
movq %r13, %rdi
callq 0x4638
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x4310
movq %rax, %rbx
testl %r15d, %r15d
js 0xbbd8
movq -0x30(%rbp), %rax
incl %eax
movq %rax, -0x30(%rbp)
cmpl %r15d, %eax
jne 0xbbd8
cmpq $0x0, 0x8(%r14)
je 0xbc65
movq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0xa7da
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x4638
movq %rbx, %rdi
callq 0x4580
// File: /workspace/github_cpp_makefile_star2_O2/UTAP[P]APHTTP/server/server.cpp
// Function: Server::~Server()
Server::~Server() {
  if (sc >= 0)
    CLOSESOCKET(sc);
  delete notFoundHandler;
  for (size_t i = 0; i < routes.size(); ++i)
    delete routes[i];

#ifdef _WIN32
  WSACleanup();
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %edi
testl %edi, %edi
js 0xe2a3
callq 0x4600
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0xe2b2
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x8(%rbx), %r14
xorl %r12d, %r12d
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r12
jae 0xe2eb
movq (%rax,%r12,8), %r15
testq %r15, %r15
je 0xe2de
movq %r15, %rdi
callq 0xf30c
movq %r15, %rdi
callq 0x4330
incq %r12
jmp 0xe2b9
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xf120
movq %rax, %rdi
callq 0x5ec6
nop
// File: /workspace/github_cpp_makefile_star2_O2/UTAP[P]APHTTP/server/server.cpp
// Function: ShowFile::callback(Request*)
Response *ShowFile::callback(Request *req) {
  Response *res = new Response;
  res->setHeader("Content-Type", fileType);
  res->setBody(readFile(filePath.c_str()));
  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdi, %r14
pushq $0x78
popq %rdi
callq 0x4380
movq %rax, %rbx
movq %rax, %rdi
movl $0xc8, %esi
callq 0x6e8c
leaq 0x2d4c(%rip), %rsi      # 0x11157
leaq -0x58(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x41a0
leaq 0x28(%r14), %rsi
leaq -0x38(%rbp), %rdi
callq 0x4470
leaq -0x58(%rbp), %rsi
leaq -0x38(%rbp), %rdx
movq %rbx, %rdi
callq 0x7d34
leaq -0x38(%rbp), %rdi
callq 0x4638
leaq -0x58(%rbp), %rdi
callq 0x4638
movq 0x8(%r14), %rsi
leaq -0x78(%rbp), %r14
movq %r14, %rdi
callq 0xafa2
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7d58
leaq -0x78(%rbp), %rdi
callq 0x4638
movq %rbx, %rax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
leaq -0x78(%rbp), %rdi
jmp 0xe495
movq %rax, %r14
leaq -0x38(%rbp), %rdi
callq 0x4638
jmp 0xe491
movq %rax, %r14
leaq -0x58(%rbp), %rdi
callq 0x4638
jmp 0xe4ac
movq %rax, %r14
jmp 0xe4ac
movq %rax, %r14
movq %rbx, %rdi
callq 0x4330
movq %r14, %rdi
callq 0x4580
// File: /workspace/github_cpp_makefile_star2_O2/UTAP[P]APHTTP/server/server.cpp
// Function: TemplateHandler::callback(Request*)
Response *TemplateHandler::callback(Request *req) {
  map<string, string> context;
  context = this->handle(req);
  Response *res = new Response;
  res->setHeader("Content-Type", "text/html");
  res->setBody(parser->getHtml(context));
  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
leaq -0xa0(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rsi, %rdx
movq %rdi, %r14
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
movq (%rdi), %rax
leaq -0x108(%rbp), %rdi
movq %r14, %rsi
callq *0x18(%rax)
leaq -0xa8(%rbp), %rdi
leaq -0x108(%rbp), %rbx
movq %rbx, %rsi
callq 0xed5a
movq %rbx, %rdi
callq 0x6938
pushq $0x78
popq %rdi
callq 0x4380
movq %rax, %rbx
movq %rax, %rdi
movl $0xc8, %esi
callq 0x6e8c
leaq 0x2944(%rip), %rsi      # 0x11157
leaq -0x78(%rbp), %rdi
leaq -0x108(%rbp), %rdx
callq 0x41a0
leaq 0x293a(%rip), %rsi      # 0x11164
leaq -0x58(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x41a0
leaq -0x78(%rbp), %rsi
leaq -0x58(%rbp), %rdx
movq %rbx, %rdi
callq 0x7d34
leaq -0x58(%rbp), %rdi
callq 0x4638
leaq -0x78(%rbp), %rdi
callq 0x4638
movq 0x28(%r14), %r14
leaq -0xd8(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0xede8
leaq -0x38(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
movq %r14, %rsi
callq 0xf626
leaq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0x7d58
leaq -0x38(%rbp), %rdi
callq 0x4638
leaq -0xd8(%rbp), %rdi
callq 0x6938
leaq -0xa8(%rbp), %rdi
callq 0x6938
movq %rbx, %rax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
leaq -0x38(%rbp), %rdi
callq 0x4638
jmp 0xe8d0
movq %rax, %r14
leaq -0xd8(%rbp), %rdi
callq 0x6938
jmp 0xe90e
movq %rax, %r14
leaq -0x58(%rbp), %rdi
callq 0x4638
jmp 0xe8ef
movq %rax, %r14
leaq -0x78(%rbp), %rdi
callq 0x4638
jmp 0xe90e
jmp 0xe90b
movq %rax, %r14
movq %rbx, %rdi
callq 0x4330
jmp 0xe90e
jmp 0xe90b
movq %rax, %r14
leaq -0xa8(%rbp), %rdi
callq 0x6938
movq %r14, %rdi
callq 0x4580
// File: /workspace/github_cpp_makefile_star2_O2/UTAP[P]APHTTP/server/server.cpp
// Function: ServerErrorHandler::callback(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
static Response *callback(string msg) {
    Response *res = new Response(500);
    res->setHeader("Content-Type", "application/json");
    res->setBody("{ \"code\": \"500\", \"message\": \"" + msg + "\" }\n");
    return res;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %r14
pushq $0x78
popq %rdi
callq 0x4380
movq %rax, %rbx
movq %rax, %rdi
movl $0x1f4, %esi            # imm = 0x1F4
callq 0x6e8c
leaq 0x270f(%rip), %rsi      # 0x11157
leaq -0xa0(%rbp), %rdi
leaq -0x40(%rbp), %rdx
callq 0x41a0
leaq 0x2d88(%rip), %rsi      # 0x117e7
leaq -0x80(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x41a0
leaq -0xa0(%rbp), %rsi
leaq -0x80(%rbp), %rdx
movq %rbx, %rdi
callq 0x7d34
leaq -0x80(%rbp), %rdi
callq 0x4638
leaq -0xa0(%rbp), %rdi
callq 0x4638
leaq 0x2d5d(%rip), %rsi      # 0x117f8
leaq -0x40(%rbp), %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0x804f
leaq 0x2d65(%rip), %rdx      # 0x11816
leaq -0x60(%rbp), %rdi
movq %r15, %rsi
callq 0x7ffd
leaq -0x60(%rbp), %rsi
movq %rbx, %rdi
callq 0x7d58
leaq -0x60(%rbp), %rdi
callq 0x4638
leaq -0x40(%rbp), %rdi
callq 0x4638
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0x60(%rbp), %rdi
callq 0x4638
jmp 0xeafd
movq %rax, %r14
leaq -0x40(%rbp), %rdi
jmp 0xeb1b
movq %rax, %r14
leaq -0x80(%rbp), %rdi
callq 0x4638
jmp 0xeb14
movq %rax, %r14
leaq -0xa0(%rbp), %rdi
callq 0x4638
jmp 0xeb32
movq %rax, %r14
jmp 0xeb32
movq %rax, %r14
movq %rbx, %rdi
callq 0x4330
movq %r14, %rdi
callq 0x4580
// File: /workspace/github_cpp_makefile_star2_O2/UTAP[P]APHTTP/server/server.cpp
// Function: NotFoundHandler::callback(Request*)
Response *callback(Request *req) {
    Response *res = new Response(404);
    if (!notFoundErrPage.empty()) {
      res->setHeader("Content-Type", "text/" + getExtension(notFoundErrPage));
      res->setBody(readFile(notFoundErrPage.c_str()));
    }
    return res;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xb0, %rsp
movq %rdi, %r14
pushq $0x78
popq %rdi
callq 0x4380
movq %rax, %rbx
movq %rax, %rdi
movl $0x194, %esi            # imm = 0x194
callq 0x6e8c
cmpq $0x0, 0x10(%r14)
je 0xeceb
leaq 0x2510(%rip), %rsi      # 0x11157
leaq -0x98(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x41a0
addq $0x8, %r14
leaq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0x4470
leaq -0x58(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xb3e1
leaq 0x2b5f(%rip), %rsi      # 0x117da
leaq -0x78(%rbp), %rdi
leaq -0x58(%rbp), %rdx
callq 0x673e
leaq -0x98(%rbp), %rsi
leaq -0x78(%rbp), %rdx
movq %rbx, %rdi
callq 0x7d34
leaq -0x78(%rbp), %rdi
callq 0x4638
leaq -0x58(%rbp), %rdi
callq 0x4638
leaq -0x38(%rbp), %rdi
callq 0x4638
leaq -0x98(%rbp), %rdi
callq 0x4638
movq (%r14), %rsi
leaq -0xb8(%rbp), %r14
movq %r14, %rdi
callq 0xafa2
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7d58
leaq -0xb8(%rbp), %rdi
callq 0x4638
movq %rbx, %rax
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
leaq -0xb8(%rbp), %rdi
jmp 0xed3a
movq %rax, %r14
leaq -0x78(%rbp), %rdi
callq 0x4638
jmp 0xed17
movq %rax, %r14
leaq -0x58(%rbp), %rdi
callq 0x4638
jmp 0xed25
movq %rax, %r14
leaq -0x38(%rbp), %rdi
callq 0x4638
jmp 0xed33
movq %rax, %r14
leaq -0x98(%rbp), %rdi
callq 0x4638
jmp 0xed51
movq %rax, %r14
jmp 0xed51
movq %rax, %r14
movq %rbx, %rdi
callq 0x4330
movq %r14, %rdi
callq 0x4580
nop
// File: /workspace/github_cpp_makefile_star2_O2/UTAP[P]APHTTP/utils/template_parser.cpp
// Function: TemplateParser::TemplateParser(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
TemplateParser::TemplateParser(string _filePath) {
  filePath = _filePath;
  variableCount = 0;
  programName = to_string(TemplateParser::lastParserNum) + SysCmd::fileExtention;
  parserNum = TemplateParser::lastParserNum++;
  code = "";
  parseTemplate();
  makeExecutableTemplate();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
xorl %eax, %eax
movb %al, 0x18(%rdi)
leaq 0x38(%rdi), %rcx
movq %rcx, 0x28(%rdi)
andq $0x0, 0x30(%rdi)
movb %al, 0x38(%rdi)
andl $0x0, 0x50(%rdi)
leaq 0x8(%rdi), %r14
andq $0x0, 0x58(%rdi)
leaq 0x28(%rdi), %r15
leaq 0x50(%rdi), %rcx
movq %rcx, 0x60(%rdi)
movq %rcx, 0x68(%rdi)
andq $0x0, 0x70(%rdi)
leaq 0x90(%rdi), %rcx
movq %rcx, 0x80(%rdi)
andq $0x0, 0x88(%rdi)
movb %al, 0x90(%rdi)
leaq 0xa0(%rdi), %r12
leaq 0xb0(%rdi), %rcx
movq %rcx, 0xa0(%rdi)
andq $0x0, 0xa8(%rdi)
movb %al, 0xb0(%rdi)
movq %r14, %rdi
callq 0x4240
andl $0x0, 0x78(%rbx)
movl 0x9b77(%rip), %esi      # 0x18fd8
leaq -0x50(%rbp), %rdi
callq 0x66a3
leaq 0x9a07(%rip), %rdx      # 0x18e78
leaq -0x70(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x8026
leaq -0x70(%rbp), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x4400
movq %r13, %rdi
callq 0x4638
leaq -0x50(%rbp), %rdi
callq 0x4638
movl 0x9b34(%rip), %eax      # 0x18fd8
leal 0x1(%rax), %ecx
movl %ecx, 0x9b2b(%rip)      # 0x18fd8
movl %eax, (%rbx)
leaq 0x20df(%rip), %rsi      # 0x11595
movq %r15, %rdi
callq 0x45e0
movq %rbx, %rdi
callq 0xf52e
movq %rbx, %rdi
callq 0xf602
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, -0x30(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x4638
jmp 0xf4f2
jmp 0xf4ee
movq %rax, -0x30(%rbp)
leaq 0x80(%rbx), %r13
addq $0x48, %rbx
movq %r12, %rdi
callq 0x4638
movq %r13, %rdi
callq 0x4638
movq %rbx, %rdi
callq 0x6938
movq %r15, %rdi
callq 0x4638
movq %r14, %rdi
callq 0x4638
movq -0x30(%rbp), %rdi
callq 0x4580
// File: /workspace/github_cpp_makefile_star2_O2/UTAP[P]APHTTP/utils/template_parser.cpp
// Function: TemplateParser::parseTemplate()
void TemplateParser::parseTemplate() {
  string unparsedTemplate = readFile(filePath);
  int parsePointer = 0;
  while (parsePointer < (signed int) unparsedTemplate.size()) {
    int begin = findBeginOfCodeBlock(parsePointer, unparsedTemplate);
    int end = findEndOfCodeBlock(parsePointer, unparsedTemplate);
    if (begin < 0)
      break;
    appendHTMLToCode(parsePointer, begin, unparsedTemplate);
    appendCodeBlockToCode(begin, end, unparsedTemplate);
    parsePointer = end + endCodeBlockTag.size();
  }
  appendHTMLToCode(parsePointer, unparsedTemplate.size(), unparsedTemplate);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
leaq 0x8(%rdi), %rsi
leaq -0x68(%rbp), %rbx
movq %rbx, %rdi
callq 0x4470
leaq -0x48(%rbp), %rdi
movq %rbx, %rsi
callq 0xb0ae
leaq -0x68(%rbp), %rdi
callq 0x4638
xorl %r15d, %r15d
leaq -0x48(%rbp), %rbx
movl -0x40(%rbp), %edx
cmpl %edx, %r15d
jge 0xf5c5
movl %r15d, %esi
movq %rbx, %rdx
callq 0xfa4c
movl %eax, %r13d
movl %r15d, %esi
movq %rbx, %rdx
callq 0xfa70
testl %r13d, %r13d
js 0xf5c2
movl %eax, %r12d
movq %r14, %rdi
movl %r15d, %esi
movl %r13d, %edx
callq 0xfa94
movq %r14, %rdi
movl %r13d, %esi
movl %r12d, %edx
movq %rbx, %rcx
callq 0xfd24
addl 0x9903(%rip), %r12d     # 0x18ec0
movl %r12d, %r15d
jmp 0xf56e
movl -0x40(%rbp), %edx
movq %r14, %rdi
movl %r15d, %esi
callq 0xfa94
leaq -0x48(%rbp), %rdi
callq 0x4638
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf5ee
jmp 0xf5ee
jmp 0xf5ee
movq %rax, %r14
movq %rbx, %rdi
callq 0x4638
movq %r14, %rdi
callq 0x4580
nop
// File: /workspace/github_cpp_makefile_star2_O2/UTAP[P]APHTTP/utils/template_parser.cpp
// Function: TemplateParser::TemplateUtils::writeMapToFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>*)
int TemplateParser::TemplateUtils::writeMapToFile(
    std::string fname, std::map<std::string, std::string> *m) {
  int count = 0;
  if (m->empty())
    return 0;

  FILE *fp = fopen(fname.c_str(), "w");
  if (!fp)
    return -errno;

  for (std::map<std::string, std::string>::iterator it = m->begin();
       it != m->end(); it++) {
    fprintf(fp, "%s=%s\n", it->first.c_str(), it->second.c_str());
    count++;
  }

  fclose(fp);
  return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq $0x0, 0x28(%rsi)
je 0xf731
movq %rsi, %rbx
movq (%rdi), %rdi
leaq 0x2408(%rip), %rsi      # 0x11ae4
callq 0x43e0
testq %rax, %rax
je 0xf736
movq %rax, %r15
movq 0x18(%rbx), %r12
addq $0x8, %rbx
leaq 0x23ee(%rip), %r13      # 0x11ae6
xorl %r14d, %r14d
cmpq %rbx, %r12
je 0xf727
movq 0x20(%r12), %rdx
movq 0x40(%r12), %rcx
movq %r15, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x4490
incl %r14d
movq %r12, %rdi
callq 0x4280
movq %rax, %r12
jmp 0xf6fb
movq %r15, %rdi
callq 0x4370
jmp 0xf741
xorl %r14d, %r14d
jmp 0xf741
callq 0x4050
xorl %r14d, %r14d
subl (%rax), %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/UTAP[P]APHTTP/utils/template_parser.cpp
// Function: TemplateParser::appendCodeBlockToCode(int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void TemplateParser::appendCodeBlockToCode(int begin, int end,
                                           string &unparsedTemplate) {
  if (end <= begin || begin < 0)
    throw Server::Exception("Can not parse template " + filePath);
  int codeBlockSize = end - begin - beginCodeBlockTag.size();
  code +=
      unparsedTemplate.substr(begin + beginCodeBlockTag.size(), codeBlockSize);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
testl %esi, %esi
js 0xfd87
cmpl %esi, %edx
jle 0xfd87
movq 0x915d(%rip), %rdi      # 0x18ea0
subl %edi, %edx
subl %esi, %edx
movl %esi, %eax
addq %rdi, %rax
movslq %edx, %r8
leaq -0x38(%rbp), %rbx
movq %rbx, %rdi
movq %rcx, %rsi
movq %rax, %rdx
movq %r8, %rcx
callq 0x4390
addq $0x28, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x45f0
leaq -0x38(%rbp), %rdi
callq 0x4638
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x28
popq %rdi
callq 0x4210
movq %rax, %rbx
addq $0x8, %r14
leaq 0x1b04(%rip), %rsi      # 0x118a1
leaq -0x58(%rbp), %rdi
movq %r14, %rdx
callq 0x804f
movb $0x1, %r15b
leaq -0x58(%rbp), %rsi
movq %rbx, %rdi
callq 0xe304
xorl %r15d, %r15d
leaq 0x7d16(%rip), %rsi      # 0x17ad8
leaq -0x96b5(%rip), %rdx     # 0x6714
movq %rbx, %rdi
callq 0x4560
movq %rax, %r14
leaq -0x58(%rbp), %rdi
callq 0x4638
testb %r15b, %r15b
jne 0xfde7
jmp 0xfdfd
movq %rax, %r14
movq %rbx, %rdi
callq 0x42a0
jmp 0xfdfd
movq %rax, %r14
leaq -0x38(%rbp), %rdi
callq 0x4638
movq %r14, %rdi
callq 0x4580
nop
// File: /workspace/github_cpp_makefile_star2_O2/UTAP[P]APHTTP/utils/template_parser.cpp
// Function: TemplateParser::generateCode()
void TemplateParser::generateCode() {
  addReadFromTemplateToCode();
  addContextMapToCode();
  addIncludesToCode();
  addReturnToCode();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x10476
movq %rbx, %rdi
callq 0x105b0
movq %rbx, %rdi
callq 0x10700
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x10882
// File: /workspace/github_cpp_makefile_star2_O2/UTAP[P]APHTTP/utils/template_parser.cpp
// Function: TemplateParser::makeLocalTemplate()
void TemplateParser::makeLocalTemplate() {
  string templateContent = readFile(filePath);
  if (writeToFile(templateContent,
                  outputFolder + "/" + localTemplate(parserNum)) < 0)
    throw Server::Exception("Can not write template to local " + outputFolder +
                            "folder");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xc0, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %rsi
leaq -0xe0(%rbp), %r12
movq %r12, %rdi
callq 0x4470
leaq -0xc0(%rbp), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0xb0ae
leaq -0xe0(%rbp), %rdi
callq 0x4638
leaq 0x8c81(%rip), %rsi      # 0x18f98
leaq 0xcfd(%rip), %rdx       # 0x1101b
leaq -0x80(%rbp), %rdi
callq 0x8107
movl (%rbx), %esi
leaq -0x60(%rbp), %rdi
callq 0xf338
leaq -0x40(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x8026
leaq -0xc0(%rbp), %rbx
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0xb5fc
movl %eax, %r15d
leaq -0x40(%rbp), %rdi
callq 0x4638
leaq -0x60(%rbp), %rdi
callq 0x4638
leaq -0x80(%rbp), %rdi
callq 0x4638
testl %r15d, %r15d
js 0x10395
leaq -0xc0(%rbp), %rdi
callq 0x4638
addq $0xc0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x28
popq %rdi
callq 0x4210
movq %rax, %r14
leaq 0x1512(%rip), %rsi      # 0x118b9
leaq 0x8bea(%rip), %rdx      # 0x18f98
leaq -0x40(%rbp), %rdi
callq 0x804f
leaq 0x151c(%rip), %rdx      # 0x118da
leaq -0xa0(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x7ffd
movb $0x1, %r12b
leaq -0xa0(%rbp), %rsi
movq %r14, %rdi
callq 0xe304
xorl %r12d, %r12d
leaq 0x76ee(%rip), %rsi      # 0x17ad8
leaq -0x9cdd(%rip), %rdx     # 0x6714
movq %r14, %rdi
callq 0x4560
movq %rax, %r15
leaq -0xa0(%rbp), %rdi
callq 0x4638
jmp 0x10410
movq %rax, %r15
movb $0x1, %r12b
leaq -0x40(%rbp), %rdi
callq 0x4638
testb %r12b, %r12b
jne 0x10423
jmp 0x1042b
movq %rax, %r15
movq %r14, %rdi
callq 0x42a0
movq %rbx, %r14
jmp 0x10465
movq %rax, %r15
leaq -0x40(%rbp), %rdi
callq 0x4638
jmp 0x10441
movq %rax, %r15
leaq -0x60(%rbp), %rdi
callq 0x4638
jmp 0x1044f
movq %rax, %r15
leaq -0x80(%rbp), %rdi
callq 0x4638
jmp 0x10465
movq %rax, %r15
jmp 0x10465
movq %rax, %r15
movq %r12, %r14
movq %r14, %rdi
callq 0x4638
movq %r15, %rdi
callq 0x4580
nop
// File: /workspace/github_cpp_makefile_star2_O2/UTAP[P]APHTTP/utils/template_parser.cpp
// Function: TemplateParser::addContextMapToCode()
void TemplateParser::addContextMapToCode() {
  string mapCode = "std::map<std::string, std::string> context;\n";
  // `mapFile` should be changed if we want to handle requests
  //  in a multi-thread non-blocking way
  mapCode +=
      "readMapFromFile(\"" + outputFolder + "/" + mapFile + "\", &context);\n";
  code = mapCode + code;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
leaq 0x1481(%rip), %rsi      # 0x11a49
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x41a0
leaq 0x149a(%rip), %rsi      # 0x11a76
leaq 0x89b5(%rip), %rdx      # 0x18f98
leaq -0x70(%rbp), %rdi
callq 0x804f
leaq 0xa28(%rip), %rdx       # 0x1101b
leaq -0x90(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x7ffd
leaq 0x89ae(%rip), %rdx      # 0x18fb8
leaq -0xb0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x8026
leaq 0x1464(%rip), %rdx      # 0x11a88
leaq -0x30(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x7ffd
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x45f0
leaq -0x30(%rbp), %rdi
callq 0x4638
leaq -0xb0(%rbp), %rdi
callq 0x4638
leaq -0x90(%rbp), %rdi
callq 0x4638
leaq -0x70(%rbp), %rdi
callq 0x4638
addq $0x28, %rbx
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movq %rbx, %rdx
callq 0x813f
leaq -0x30(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4400
movq %r14, %rdi
callq 0x4638
leaq -0x50(%rbp), %rdi
callq 0x4638
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x106eb
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x4638
jmp 0x106be
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x4638
jmp 0x106cf
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x4638
jmp 0x106e0
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x4638
jmp 0x106ee
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x4638
movq %rbx, %rdi
callq 0x4580
nop
// File: /workspace/github_cpp_makefile_star2_O2/UTAP[P]APHTTP/utils/template_parser.cpp
// Function: TemplateParser::addIncludesToCode()
void TemplateParser::addIncludesToCode() {
  string include = "#include <iostream>\n";
  include += "#include <string>\n";
  include += "#include <map>\n";
  include += "#include <cstring>\n";
  include += "#include \"" + utilitiesHeaderPath + "\"\n";
  include += "using namespace std;\n";
  code = include + "int main(int argc, char const *argv[])\n{\n" + code + "\n";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
leaq 0x125c(%rip), %rsi      # 0x11974
leaq -0x50(%rbp), %r14
leaq -0x70(%rbp), %rdx
movq %r14, %rdi
callq 0x41a0
leaq 0x125a(%rip), %rsi      # 0x11989
movq %r14, %rdi
callq 0x45d0
leaq 0x125e(%rip), %rsi      # 0x1199c
leaq -0x50(%rbp), %rdi
callq 0x45d0
leaq 0x125e(%rip), %rsi      # 0x119ac
leaq -0x50(%rbp), %rdi
callq 0x45d0
leaq 0x1262(%rip), %rsi      # 0x119c0
leaq 0x8773(%rip), %rdx      # 0x18ed8
leaq -0x30(%rbp), %rdi
callq 0x804f
leaq 0x1256(%rip), %rdx      # 0x119cb
leaq -0x70(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x7ffd
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x45f0
leaq -0x70(%rbp), %rdi
callq 0x4638
leaq -0x30(%rbp), %rdi
callq 0x4638
leaq 0x1226(%rip), %rsi      # 0x119ce
leaq -0x50(%rbp), %rdi
callq 0x45d0
leaq 0x122c(%rip), %rdx      # 0x119e4
leaq -0x90(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x8107
addq $0x28, %rbx
leaq -0x30(%rbp), %rdi
leaq -0x90(%rbp), %rsi
movq %rbx, %rdx
callq 0x8026
leaq 0xe7a(%rip), %rdx       # 0x11660
leaq -0x70(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x7ffd
leaq -0x70(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4400
movq %r14, %rdi
callq 0x4638
leaq -0x30(%rbp), %rdi
callq 0x4638
leaq -0x90(%rbp), %rdi
callq 0x4638
leaq -0x50(%rbp), %rdi
callq 0x4638
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x4638
jmp 0x10845
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
jmp 0x10865
jmp 0x1086e
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x4638
jmp 0x10861
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x4638
jmp 0x10871
jmp 0x1086e
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x4638
movq %rbx, %rdi
callq 0x4580
// File: /workspace/github_cpp_makefile_star2_O2/UTAP[P]APHTTP/utils/template_parser.cpp
// Function: TemplateParser::TemplateUtils::runSystemCommand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void TemplateParser::TemplateUtils::runSystemCommand(string command,
                                                     string error) {
  int ret = system(command.c_str());
#ifdef _WIN32
  if(ret != 0) {
      throw Server::Exception(error);
  }
#else
  if (WEXITSTATUS(ret) != EXIT_SUCCESS) {
    throw Server::Exception(error);
  }
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq (%rdi), %rdi
callq 0x42d0
testw $0xff00, %ax            # imm = 0xFF00
jne 0x108c1
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x28
popq %rdi
callq 0x4210
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0x4470
movb $0x1, %r15b
leaq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0xe304
xorl %r15d, %r15d
leaq 0x71e7(%rip), %rsi      # 0x17ad8
leaq -0xa1e4(%rip), %rdx     # 0x6714
movq %rbx, %rdi
callq 0x4560
movq %rax, %r14
leaq -0x38(%rbp), %rdi
callq 0x4638
testb %r15b, %r15b
jne 0x10916
jmp 0x1091e
movq %rax, %r14
movq %rbx, %rdi
callq 0x42a0
movq %r14, %rdi
callq 0x4580
// File: /workspace/github_cpp_makefile_star2_O2/UTAP[P]APHTTP/utils/template_parser.cpp
// Function: TemplateParser::deleteExecutable()
void TemplateParser::deleteExecutable() {
  string cmd = SysCmd::rm + outputFolder + SysCmd::slash + programName;
  string error = "Error in deleting executable file at  " + outputFolder + "/" +
                 programName;
  TemplateUtils::runSystemCommand(cmd, error);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xc0, %rsp
movq %rdi, %rbx
leaq 0x8460(%rip), %rsi      # 0x18df8
leaq 0x85f9(%rip), %rdx      # 0x18f98
leaq -0x50(%rbp), %r14
movq %r14, %rdi
callq 0x813f
leaq 0x84a6(%rip), %rdx      # 0x18e58
leaq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0x8026
addq $0xa0, %rbx
leaq -0xd0(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movq %rbx, %rdx
callq 0x8026
leaq -0x30(%rbp), %rdi
callq 0x4638
leaq -0x50(%rbp), %rdi
callq 0x4638
leaq 0x10a6(%rip), %rsi      # 0x11a97
leaq 0x85a0(%rip), %rdx      # 0x18f98
leaq -0xb0(%rbp), %rdi
callq 0x804f
leaq 0x610(%rip), %rdx       # 0x1101b
leaq -0x50(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x7ffd
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movq %rbx, %rdx
callq 0x8026
leaq -0x50(%rbp), %rdi
callq 0x4638
leaq -0xb0(%rbp), %rdi
callq 0x4638
leaq -0x90(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x4470
leaq -0x70(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x4470
leaq -0x90(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x10898
leaq -0x70(%rbp), %rdi
callq 0x4638
leaq -0x90(%rbp), %rdi
callq 0x4638
leaq -0x30(%rbp), %rdi
callq 0x4638
leaq -0xd0(%rbp), %rdi
callq 0x4638
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x4638
jmp 0x10ab7
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x4638
jmp 0x10ac8
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
jmp 0x10ae6
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x4638
jmp 0x10adf
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x4638
leaq -0xd0(%rbp), %rdi
jmp 0x10b0e
movq %rax, %rbx
jmp 0x10aeb
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x4638
jmp 0x10b0a
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x4638
movq %rbx, %rdi
callq 0x4580
nop
// File: /workspace/github_cpp_makefile_star2_O2/UTAP[P]APHTTP/utils/template_parser.cpp
// Function: TemplateParser::deleteLocalTemplate()
void TemplateParser::deleteLocalTemplate() {
  string cmd = SysCmd::rm + outputFolder + SysCmd::slash + localTemplate(parserNum);
  string error = "Error in deleting local template at  " + outputFolder + "/" +
                 localTemplate(parserNum);
  TemplateUtils::runSystemCommand(cmd, error);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xe0, %rsp
movq %rdi, %rbx
leaq 0x82c4(%rip), %rsi      # 0x18df8
leaq 0x845d(%rip), %rdx      # 0x18f98
leaq -0x70(%rbp), %r14
movq %r14, %rdi
callq 0x813f
leaq 0x830a(%rip), %rdx      # 0x18e58
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
callq 0x8026
movl (%rbx), %esi
leaq -0x30(%rbp), %rdi
callq 0xf338
leaq -0xf0(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x8026
leaq -0x30(%rbp), %rdi
callq 0x4638
leaq -0x50(%rbp), %rdi
callq 0x4638
leaq -0x70(%rbp), %rdi
callq 0x4638
leaq 0xf23(%rip), %rsi       # 0x11abe
leaq 0x83f6(%rip), %rdx      # 0x18f98
leaq -0x30(%rbp), %rdi
callq 0x804f
leaq 0x469(%rip), %rdx       # 0x1101b
leaq -0x70(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x7ffd
movl (%rbx), %esi
leaq -0xd0(%rbp), %rdi
callq 0xf338
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
callq 0x8026
leaq -0xd0(%rbp), %rdi
callq 0x4638
leaq -0x70(%rbp), %rdi
callq 0x4638
leaq -0x30(%rbp), %rdi
callq 0x4638
leaq -0xb0(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x4470
leaq -0x90(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x4470
leaq -0xb0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x10898
leaq -0x90(%rbp), %rdi
callq 0x4638
leaq -0xb0(%rbp), %rdi
callq 0x4638
leaq -0x50(%rbp), %rdi
callq 0x4638
leaq -0xf0(%rbp), %rdi
callq 0x4638
addq $0xe0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x4638
jmp 0x10c82
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x4638
jmp 0x10c93
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
jmp 0x10cbf
movq %rax, %rbx
leaq -0xd0(%rbp), %rdi
callq 0x4638
jmp 0x10cad
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x4638
jmp 0x10cbb
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x4638
leaq -0xf0(%rbp), %rdi
jmp 0x10cf5
movq %rax, %rbx
jmp 0x10cc4
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x4638
jmp 0x10ce3
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x4638
jmp 0x10cf1
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x4638
movq %rbx, %rdi
callq 0x4580
// File: /workspace/github_cpp_makefile_star2_O2/medvedevgroup[P]varmatch/src/vm.cpp
// Function: usage(char*)
int usage(char* command) {
	cout << "\n";
	cout << "\tPlease cite our paper if you are using this program in your research." << endl;
    cout << endl;
	cout << "Usage: " << endl;
    cout << command << " -g genome file path(FASTA format)" << endl;
    cout << "\t-r reference VCF file path" << endl;
    cout << "\t-q query VCF file path" << endl;
    cout << "\t-o output file prefix" << endl;
    cout << "\t[-t thread number]" << endl;
    cout << "\t[-n normalize VCF entries before comparing]" << endl;
    cout << "\t[-m single VCF file to remove duplicates]" << endl;
    cout << "\t[-G do not match genotype when match vcf records]" << endl;
    cout << endl;

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x294db(%rip), %rbx     # 0x2ffc0
leaq 0x1a580(%rip), %rsi     # 0x2106c
movq %rbx, %rdi
callq 0x52f0
leaq 0x1adab(%rip), %rsi     # 0x218a6
movq %rbx, %rdi
callq 0x52f0
movq %rax, %rdi
callq 0x5190
movq %rbx, %rdi
callq 0x5190
leaq 0x1add3(%rip), %rsi     # 0x218ed
movq %rbx, %rdi
callq 0x52f0
movq %rax, %rdi
callq 0x5190
movq %rbx, %rdi
movq %r14, %rsi
callq 0x52f0
leaq 0x1adb9(%rip), %rsi     # 0x218f5
movq %rax, %rdi
callq 0x52f0
movq %rax, %rdi
callq 0x5190
leaq 0x1adc5(%rip), %rsi     # 0x21918
movq %rbx, %rdi
callq 0x52f0
movq %rax, %rdi
callq 0x5190
leaq 0x1adca(%rip), %rsi     # 0x21934
movq %rbx, %rdi
callq 0x52f0
movq %rax, %rdi
callq 0x5190
leaq 0x1adcb(%rip), %rsi     # 0x2194c
movq %rbx, %rdi
callq 0x52f0
movq %rax, %rdi
callq 0x5190
leaq 0x1adcb(%rip), %rsi     # 0x21963
movq %rbx, %rdi
callq 0x52f0
movq %rax, %rdi
callq 0x5190
leaq 0x1adc8(%rip), %rsi     # 0x21977
movq %rbx, %rdi
callq 0x52f0
movq %rax, %rdi
callq 0x5190
leaq 0x1adde(%rip), %rsi     # 0x219a4
movq %rbx, %rdi
callq 0x52f0
movq %rax, %rdi
callq 0x5190
leaq 0x1adf2(%rip), %rsi     # 0x219cf
movq %rbx, %rdi
callq 0x52f0
movq %rax, %rdi
callq 0x5190
movq %rbx, %rdi
callq 0x5190
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/medvedevgroup[P]varmatch/src/wholegenome.cpp
// Function: WholeGenome::~WholeGenome()
WholeGenome::~WholeGenome(){

    for(int j = 0; j < chrom_num; j++){
        ref_variant_by_chrid[j]->clear();
        delete ref_variant_by_chrid[j];
        que_variant_by_chrid[j]->clear();
        delete que_variant_by_chrid[j];
    }
    delete[] ref_variant_by_chrid;
    delete[] que_variant_by_chrid;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r12d, %r12d
pushq $0x18
popq %r14
movslq (%rbx), %rax
movq 0x148(%rbx), %rdi
cmpq %rax, %r12
jge 0xd83f
movq (%rdi,%r12,8), %rdi
callq 0x19a30
movq 0x148(%rbx), %rax
movq (%rax,%r12,8), %r15
testq %r15, %r15
je 0xd7fc
movq %r15, %rdi
callq 0x19a38
movq %r15, %rdi
movq %r14, %rsi
callq 0x5310
movq 0x150(%rbx), %rax
movq (%rax,%r12,8), %rdi
callq 0x19a30
movq 0x150(%rbx), %rax
movq (%rax,%r12,8), %r15
testq %r15, %r15
je 0xd82f
movq %r15, %rdi
callq 0x19a38
movq %r15, %rdi
movq %r14, %rsi
callq 0x5310
incq %r12
jmp 0xd7cc
testq %rdi, %rdi
je 0xd849
callq 0x53a0
movq 0x150(%rbx), %rdi
testq %rdi, %rdi
je 0xd85a
callq 0x53a0
leaq 0x270(%rbx), %rdi
callq 0x1c3c2
leaq 0x250(%rbx), %rdi
callq 0x1c38e
leaq 0x238(%rbx), %rdi
callq 0xce14
leaq 0x220(%rbx), %rdi
callq 0xce14
leaq 0x208(%rbx), %rdi
callq 0xce14
leaq 0x1f0(%rbx), %rdi
callq 0xce14
leaq 0x1c0(%rbx), %rdi
callq 0x55e8
leaq 0x1a0(%rbx), %rdi
callq 0x55e8
leaq 0x160(%rbx), %rdi
callq 0x19a0e
leaq 0x118(%rbx), %rdi
callq 0x1ad04
leaq 0xe8(%rbx), %rdi
callq 0x1ad68
leaq 0xb8(%rbx), %rdi
callq 0x1ad04
leaq 0x88(%rbx), %rdi
callq 0x1ad68
leaq 0x68(%rbx), %rdi
callq 0xadcc
leaq 0x50(%rbx), %rdi
callq 0xadcc
leaq 0x28(%rbx), %rdi
callq 0x55e8
addq $0x8, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x55e8
// File: /workspace/github_cpp_makefile_star2_O2/medvedevgroup[P]varmatch/src/wholegenome.cpp
// Function: WholeGenome::CheckTandemRepeat(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
bool WholeGenome::CheckTandemRepeat(string sequence, int unit_threshold) {
    int sequence_length = (int)sequence.length();
    //cout << sequence_length << "," << unit_threshold << endl;
    if(sequence_length == 1) return true;
    transform(sequence.begin(), sequence.end(), sequence.begin(), ::toupper);
    int end_index = sequence_length / 2 + 1;
    bool final_checking = false;
    int repeat_threshold = min(end_index-1, unit_threshold);
    for (int repeat_length = 1; repeat_length <= end_index; repeat_length++) {
        bool is_tandem_repeat = true;
        int repeat_time = 1;
        string repeat_region = sequence.substr(0, repeat_length);
        int start_position = repeat_length;
        while (start_position < sequence_length) {
            if (start_position + repeat_length > sequence_length)
                break;
            string matching_region = sequence.substr(start_position, repeat_length);
            if (matching_region != repeat_region) {
                is_tandem_repeat = false;
                break;
            }
            start_position += repeat_length;
            repeat_time ++;
        }
        if (is_tandem_repeat && repeat_time > 1) {
            final_checking = true;
            break;
        }
    }
    return final_checking;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, 0x10(%rsp)
movq 0x8(%rsi), %r14
movb $0x1, %al
movq %rax, 0x8(%rsp)
cmpl $0x1, %r14d
je 0xf96c
movq 0x10(%rsp), %rax
movq (%rax), %rbx
xorl %r15d, %r15d
cmpq %r15, %r14
je 0xf88f
movsbl (%rbx,%r15), %edi
callq 0x5590
movb %al, (%rbx,%r15)
incq %r15
jmp 0xf877
pushq $0x2
popq %r12
movl %r14d, %eax
cltd
idivl %r12d
incl %eax
cltq
movq %rax, 0x20(%rsp)
pushq $0x1
popq %r13
xorl %ebx, %ebx
cmpq 0x20(%rsp), %r13
setle %al
jg 0xf963
movq %rax, 0x8(%rsp)
leaq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rsi
xorl %edx, %edx
movq %r13, %rcx
callq 0x5320
movq %r13, %r15
movl %r12d, 0x1c(%rsp)
movl %r12d, %ebp
cmpl %r14d, %r15d
jge 0xf934
cmpl %r14d, %ebp
jg 0xf934
leaq 0x48(%rsp), %r12
movq %r12, %rdi
movq 0x10(%rsp), %rsi
movq %r15, %rdx
movq %r13, %rcx
callq 0x5320
movq %r12, %rdi
leaq 0x28(%rsp), %rsi
callq 0xa908
movq %r12, %rdi
movl %eax, %r12d
callq 0x55e8
incl %ebx
addl %r13d, %ebp
addq %r13, %r15
testb %r12b, %r12b
je 0xf8db
incb %r12b
movzbl %r12b, %eax
andl $0x1, %eax
addl %ebx, %eax
xorl %ebp, %ebp
movl %eax, %ebx
jmp 0xf939
incl %ebx
movb $0x1, %bpl
leaq 0x28(%rsp), %rdi
callq 0x55e8
incq %r13
movl 0x1c(%rsp), %r12d
addl $0x2, %r12d
testb %bpl, %bpl
je 0xf8a7
cmpl $0x2, %ebx
jl 0xf8a7
jmp 0xf96c
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x55e8
movq %rbx, %rdi
callq 0x5540
nop
// File: /workspace/github_cpp_makefile_star2_O2/medvedevgroup[P]varmatch/src/wholegenome.cpp
// Function: WholeGenome::CalculateEditDistance(DiploidVariant&, int, int)
int WholeGenome::CalculateEditDistance(DiploidVariant & dv,
                                int choice,
                                int match_mode){
    int score = 0;
    if(choice <= NOT_USE) return score;

    if(match_mode == 0){
        if(choice == -1){
            score += ScoreEditDistance(dv, 0);
        }else if(choice == -2){
            score += ScoreEditDistance(dv, 1);
        }else if(choice == 0){
            score += ScoreEditDistance(dv, 0);
            if(dv.multi_alts && !dv.zero_one_var){
                score += ScoreEditDistance(dv, 1);
            }
        }else{
            score += ScoreEditDistance(dv, 0);
            score += ScoreEditDistance(dv, 1);
        }
    }else{
        score += 2 * ScoreEditDistance(dv, choice);
    }

    return score;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %ebp, %ebp
cmpl $-0x8, %edx
jl 0x104d3
movq %rsi, %rbx
movq %rdi, %r14
testl %ecx, %ecx
je 0x104e0
movq %r14, %rdi
movq %rbx, %rsi
callq 0xea6a
movl %eax, %ebp
addl %eax, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpl $-0x2, %edx
je 0x10523
testl %edx, %edx
je 0x104f8
cmpl $-0x1, %edx
jne 0x1053b
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
jmp 0x1052c
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0xea6a
movl %eax, %ebp
cmpb $0x1, 0x41(%rbx)
jne 0x104d3
cmpb $0x0, 0x42(%rbx)
jne 0x104d3
pushq $0x1
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xea6a
jmp 0x104d1
pushq $0x1
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xea6a
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0xea6a
movl %eax, %r15d
pushq $0x1
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xea6a
movl %eax, %ebp
addl %r15d, %ebp
jmp 0x104d3
nop