LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/UTAP[P]APHTTP/utils/utilities.cpp
// Function: readFile[abi:cxx11](char const*)
string readFile(const char *filename) {
  ifstream infile;
  infile.open(filename, infile.binary);
  if (!infile.is_open()) return string();

  infile.seekg(0, infile.end);
  size_t length = infile.tellg();
  infile.seekg(0, infile.beg);

  if (length > BUFFER_SIZE)
    length = BUFFER_SIZE;
  char* buffer = new char[length + 1];

  infile.read(buffer, length);

  string s(buffer, length);
  delete[] buffer;
  return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x220(%rbp), %r15
movq %r15, %rdi
callq 0x43b0
movq %r15, %rdi
movq %r14, %rsi
movl $0x4, %edx
callq 0x4240
leaq -0x1a8(%rbp), %rdi
callq 0x40d0
testb %al, %al
je 0xf299
leaq -0x220(%rbp), %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x4450
leaq -0x220(%rbp), %rdi
callq 0x4580
movq %rax, %r14
leaq -0x220(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4450
movl $0x3f4000, %r15d        # imm = 0x3F4000
cmpq %r15, %r14
cmovbq %r14, %r15
leaq 0x1(%r15), %rdi
callq 0x4030
movq %rax, %r14
leaq -0x220(%rbp), %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x4410
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %r14, %rdx
addq %r15, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6f6c
movq %r14, %rdi
callq 0x4420
jmp 0xf2ac
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
leaq -0x220(%rbp), %rdi
callq 0x40f0
movq %rbx, %rax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf2d1
jmp 0xf2d1
jmp 0xf2d1
jmp 0xf2d1
movq %rax, %rbx
leaq -0x220(%rbp), %rdi
callq 0x40f0
movq %rbx, %rdi
callq 0x45a0
// File: /workspace/github_cpp_makefile_star2_O1/UTAP[P]APHTTP/utils/utilities.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>>, bool)
vector<string> split(string s, string delimiter, bool trim) {
  vector<string> tokens;
  if (trim)
    s.erase(remove(s.begin(), s.end(), ' '), s.end());
  size_t pos = 0;
  string token;
  while ((pos = s.find(delimiter)) != string::npos) {
    token = s.substr(0, pos);
    tokens.push_back(token);
    s.erase(0, pos + delimiter.length());
  }
  tokens.push_back(s);
  return tokens;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, -0x30(%rbp)
movq $0x0, 0x10(%rdi)
testl %ecx, %ecx
je 0xf353
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
leaq -0x50(%rbp), %rdx
movb $0x20, (%rdx)
callq 0xfd53
movq %rax, %rcx
subq (%r14), %rcx
movq %rcx, 0x8(%r14)
movb $0x0, (%rax)
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x70(%rbp), %r12
leaq -0x50(%rbp), %r13
movq (%r15), %rsi
movq 0x8(%r15), %rcx
movq %r14, %rdi
xorl %edx, %edx
callq 0x4590
cmpq $-0x1, %rax
je 0xf3d4
movq %rax, %rbx
movq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x4370
movq %r13, %rdi
movq %r12, %rsi
callq 0x4400
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xf3b5
callq 0x4310
movq -0x30(%rbp), %rdi
movq %r13, %rsi
callq 0xe9e6
addq 0x8(%r15), %rbx
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x40c0
jmp 0xf36e
movq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0xe9e6
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xf3f2
callq 0x4310
movq -0x30(%rbp), %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0xf423
jmp 0xf40e
jmp 0xf40e
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xf423
callq 0x4310
movq -0x30(%rbp), %rdi
callq 0xe998
movq %rbx, %rdi
callq 0x45a0
// File: /workspace/github_cpp_makefile_star2_O1/UTAP[P]APHTTP/utils/utilities.cpp
// Function: urlEncode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string urlEncode(string const &str) {
  char encode_buf[4];
  string result;
  encode_buf[0] = '%';
  result.reserve(str.size());

  // character selection for this algorithm is based on the following url:
  // http://www.blooberry.com/indexdot/html/topics/urlencoding.htm

  for (size_t pos = 0; pos < str.size(); ++pos) {
    switch (str[pos]) {
    default:
      if (str[pos] >= 32 && str[pos] < 127) {
        // character does not need to be escaped
        result += str[pos];
        break;
      }
      // else pass through to next case
    case '$':
    case '&':
    case '+':
    case ',':
    case '/':
    case ':':
    case ';':
    case '=':
    case '?':
    case '@':
    case '"':
    case '<':
    case '>':
    case '#':
    case '%':
    case '{':
    case '}':
    case '|':
    case '\\':
    case '^':
    case '~':
    case '[':
    case ']':
    case '`':
      // the character needs to be encoded
      sprintf(encode_buf + 1, "%02X", str[pos]);
      result += encode_buf;
      break;
    }
  };
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, -0x38(%rbp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movb $0x25, -0x2c(%rbp)
movq 0x8(%rsi), %rsi
callq 0x4510
cmpq $0x0, 0x8(%r14)
je 0xf5a2
leaq 0xa0cf(%rip), %r12      # 0x19606
leaq -0x2c(%rbp), %r13
xorl %r15d, %r15d
movq (%r14), %rax
movzbl (%rax,%r15), %eax
movsbl %al, %edx
leal -0x22(%rax), %ecx
cmpl $0x3e, %ecx
ja 0xf585
movabsq $0x5e0000007f00261f, %rsi # imm = 0x5E0000007F00261F
btq %rcx, %rsi
jae 0xf585
leaq -0x2b(%rbp), %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x40a0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x45f0
incq %r15
cmpq 0x8(%r14), %r15
jb 0xf53e
jmp 0xf5a2
movl %eax, %ecx
addl $-0x7b, %ecx
cmpl $0x4, %ecx
jb 0xf561
addl $-0x7f, %eax
cmpb $-0x5f, %al
jb 0xf561
movq %rbx, %rdi
movl %edx, %esi
callq 0x42e0
jmp 0xf57a
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf5b6
movq %rax, %r14
movq (%rbx), %rdi
cmpq -0x38(%rbp), %rdi
je 0xf5c7
callq 0x4310
movq %r14, %rdi
callq 0x45a0
// File: /workspace/github_cpp_makefile_star2_O1/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
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, -0x38(%rbp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x8(%rsi), %rsi
callq 0x4510
movq 0x8(%r14), %rax
testq %rax, %rax
je 0xf681
xorl %r13d, %r13d
leaq -0x2b(%rbp), %r15
movq (%r14), %rdx
movzbl (%rdx,%r13), %ecx
cmpl $0x25, %ecx
je 0xf62c
cmpl $0x2b, %ecx
jne 0xf66a
movb $0x20, %cl
jmp 0xf66a
leaq 0x2(%r13), %r12
movb $0x25, %cl
cmpq %rax, %r12
jae 0xf66a
movb 0x1(%rdx,%r13), %al
movb %al, -0x2b(%rbp)
movb 0x2(%rdx,%r13), %al
movb %al, -0x2a(%rbp)
movb $0x0, -0x29(%rbp)
movq %r15, %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x4460
movsbl %al, %esi
movq %rbx, %rdi
callq 0x42e0
movq %r12, %r13
jmp 0xf675
movsbl %cl, %esi
movq %rbx, %rdi
callq 0x42e0
incq %r13
movq 0x8(%r14), %rax
cmpq %rax, %r13
jb 0xf616
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf695
movq %rax, %r14
movq (%rbx), %rdi
cmpq -0x38(%rbp), %rdi
je 0xf6a6
callq 0x4310
movq %r14, %rdi
callq 0x45a0
// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movl %edx, %r14d
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq -0x1c8(%rbp), %rdi
movl $0x8, %edx
callq 0x4550
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
movsbl %r14b, %r14d
leaq -0x1c8(%rbp), %r15
leaq -0x48(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
movl %r14d, %edx
callq 0x45e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xf788
movq %rbx, %rdi
movq %r12, %rsi
callq 0xe9e6
jmp 0xf75f
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0xf796
callq 0x4310
movq 0xf82b(%rip), %rsi      # 0x1efc8
leaq -0x1c8(%rbp), %rdi
callq 0x4480
leaq -0x150(%rbp), %rdi
callq 0x4160
movq %rbx, %rax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0xf7ff
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0xf7e0
callq 0x4310
movq 0xf7e1(%rip), %rsi      # 0x1efc8
leaq -0x1c8(%rbp), %rdi
callq 0x4480
leaq -0x150(%rbp), %rdi
callq 0x4160
movq %rbx, %rdi
callq 0xe998
movq %r14, %rdi
callq 0x45a0
// File: /workspace/github_cpp_makefile_star2_O1/UTAP[P]APHTTP/utils/utilities.cpp
// Function: findSubStrPosition(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int const&)
int findSubStrPosition(std::string &str, std::string const &subStr,
                       int const &pos) {
  size_t found = str.find(subStr, pos);
  if (found == string::npos)
    return -1;
  return found;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq (%rdx), %rdx
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
movq %rax, %rsi
popq %rbp
jmp 0x4590
// File: /workspace/github_cpp_makefile_star2_O1/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, %r14
movl %esi, %r15d
movq %rdi, %rbx
leaq -0x220(%rbp), %r12
movq %r12, %rdi
callq 0x4560
movq %r12, %rdi
movq %r14, %rsi
movl $0x4, %edx
callq 0x41d0
leaq -0x1b0(%rbp), %rdi
callq 0x40d0
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testb %al, %al
je 0xf90a
movslq %r15d, %rdx
leaq -0x220(%rbp), %rdi
movq %rbx, %rsi
callq 0x4440
movl $0x8, %r14d
leaq -0x220(%rbp), %rdi
callq 0x4470
movq 0xf6af(%rip), %rax      # 0x1efc0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x218(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x220(%rbp,%rcx)
callq 0x42c0
leaq -0x128(%rbp), %rdi
callq 0x4160
movl %r14d, %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 0x45a0
// File: /workspace/github_cpp_makefile_star2_O1/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
movl $0x0, 0x8(%rdi)
xorl %ecx, %ecx
movq %rcx, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rdi, -0x30(%rbp)
movq %rcx, 0x28(%rdi)
leaq -0xa0(%rbp), %rdi
movl $0x26, %edx
callq 0xf702
movq -0xa0(%rbp), %r12
movq -0x98(%rbp), %r13
cmpq %r13, %r12
je 0xfad2
leaq -0xb0(%rbp), %rbx
leaq -0xc0(%rbp), %r14
leaq -0x88(%rbp), %r15
movq %rbx, -0xc0(%rbp)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x7e12
movq %r15, %rdi
movq %r14, %rsi
movl $0x3d, %edx
callq 0xf702
movq -0x88(%rbp), %rax
movq -0x80(%rbp), %rcx
subq %rax, %rcx
cmpq $0x40, %rcx
jne 0xfaac
leaq -0x60(%rbp), %rcx
movq %rcx, -0x70(%rbp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x70(%rbp), %rdi
callq 0x7e12
movq -0x88(%rbp), %rax
leaq -0x40(%rbp), %rcx
movq %rcx, -0x50(%rbp)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq -0x50(%rbp), %rdi
callq 0x7e12
movq -0x30(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0xa8fe
movq %rax, %rdi
leaq -0x50(%rbp), %rsi
callq 0x4220
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xfa9a
callq 0x4310
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xfaac
callq 0x4310
movq %r15, %rdi
callq 0xe998
movq -0xc0(%rbp), %rdi
cmpq %rbx, %rdi
je 0xfac5
callq 0x4310
addq $0x20, %r12
cmpq %r13, %r12
jne 0xf9f2
leaq -0xa0(%rbp), %rdi
callq 0xe998
movq -0x30(%rbp), %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0xfb5d
movq %rax, %r14
jmp 0xfb34
movq %rax, %r14
jmp 0xfb22
movq %rax, %r14
jmp 0xfb51
movq %rax, %r14
jmp 0xfb40
movq %rax, %r14
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xfb22
callq 0x4310
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xfb34
callq 0x4310
leaq -0x88(%rbp), %rdi
callq 0xe998
movq -0xc0(%rbp), %rdi
cmpq %rbx, %rdi
je 0xfb51
callq 0x4310
leaq -0xa0(%rbp), %rdi
callq 0xe998
movq -0x30(%rbp), %rdi
callq 0xaa2e
movq %r14, %rdi
callq 0x45a0
// File: /workspace/github_cpp_makefile_star2_O1/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, -0x30(%rbp)
movq %rdi, %rsi
leaq -0x270(%rbp), %r14
movq %r14, %rdi
movl $0x8, %edx
callq 0x4520
leaq -0x1f8(%rbp), %rdi
callq 0x40d0
testb %al, %al
je 0xfc49
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x50(%rbp), %r15
leaq -0x68(%rbp), %r12
movq -0x270(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4330
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x45e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xfc54
movq %r12, %rdi
movq %r15, %rsi
movl $0x3d, %edx
callq 0xf702
movq -0x68(%rbp), %r13
movq -0x60(%rbp), %rbx
movq -0x30(%rbp), %rdi
movq %r13, %rsi
callq 0xfcd4
subq %r13, %rbx
xorl %esi, %esi
cmpq $0x21, %rbx
setae %sil
shll $0x5, %esi
addq %r13, %rsi
movq %rax, %rdi
callq 0x4220
movq %r12, %rdi
callq 0xe998
jmp 0xfbcc
callq 0x4060
xorl %ebx, %ebx
subl (%rax), %ebx
jmp 0xfc79
leaq -0x270(%rbp), %rdi
callq 0x40b0
movq -0x30(%rbp), %rax
movl 0x28(%rax), %ebx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xfc79
callq 0x4310
leaq -0x270(%rbp), %rdi
callq 0x40f0
movl %ebx, %eax
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xfcab
jmp 0xfcab
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0xe998
jmp 0xfcae
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xfcc0
callq 0x4310
leaq -0x270(%rbp), %rdi
callq 0x40f0
movq %rbx, %rdi
callq 0x45a0
// File: /workspace/github_cpp_makefile_star2_O1/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 (%rsi), %rsi
movq 0x8(%r12), %rcx
movq $0x0, -0x30(%rbp)
xorl %edx, %edx
callq 0x44d0
movq %rax, %rbx
leaq -0x58(%rbp), %r13
testq %rbx, %rbx
je 0xffed
cmpq $-0x1, %rbx
je 0x10054
movq %r13, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x4370
movq -0x38(%rbp), %rdi
movq %r13, %rsi
callq 0x14ab4
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0xffed
callq 0x4310
incq %rbx
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq $-0x1, %rcx
callq 0x4370
movq %r14, %rdi
movq %r13, %rsi
callq 0x4400
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x10022
callq 0x4310
movq (%r12), %rsi
movq 0x8(%r12), %rcx
movq %r14, %rdi
xorl %edx, %edx
callq 0x44d0
movq %rax, %rbx
testl %r15d, %r15d
js 0xffb0
movq -0x30(%rbp), %rax
incl %eax
movq %rax, -0x30(%rbp)
cmpl %r15d, %eax
jne 0xffb0
cmpq $0x0, 0x8(%r14)
je 0x10067
movq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0xe9e6
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x1008b
callq 0x4310
movq %rbx, %rdi
callq 0x45a0
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %edi
testl %edi, %edi
js 0x13970
callq 0x4600
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x1397f
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x8(%rbx), %rdi
cmpq %rdi, 0x10(%rbx)
je 0x139bc
xorl %r15d, %r15d
movq (%rdi,%r15,8), %r14
testq %r14, %r14
je 0x139a5
movq %r14, %rdi
callq 0x14ea6
movq %r14, %rdi
callq 0x4310
incq %r15
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rax
subq %rdi, %rax
sarq $0x3, %rax
cmpq %rax, %r15
jb 0x1398c
addq $0x8, %rsp
testq %rdi, %rdi
je 0x139d0
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4310
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
callq 0x6f5d
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rdi, %r14
movl $0x78, %edi
callq 0x4350
movq %rax, %rbx
movq %rax, %rdi
movl $0xc8, %esi
callq 0x82ea
leaq -0x50(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x5668(%rip), %rsi      # 0x19175
leaq 0x566d(%rip), %rdx      # 0x19181
leaq -0x60(%rbp), %rdi
callq 0x6f6c
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq 0x28(%r14), %rsi
movq 0x30(%r14), %rdx
addq %rsi, %rdx
leaq -0x40(%rbp), %rdi
callq 0x7e12
leaq -0x60(%rbp), %rsi
leaq -0x40(%rbp), %rdx
movq %rbx, %rdi
callq 0xa430
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x13b58
callq 0x4310
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0x13b66
callq 0x4310
movq 0x8(%r14), %rsi
leaq -0x80(%rbp), %r14
movq %r14, %rdi
callq 0xf1d5
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa454
leaq -0x70(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x13b93
callq 0x4310
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0x70(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x13bdc
jmp 0x13be1
movq %rax, %r14
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x13bcb
callq 0x4310
jmp 0x13bcb
movq %rax, %r14
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
jne 0x13bdc
jmp 0x13be1
movq %rax, %r14
movq %rbx, %rdi
callq 0x4310
movq %r14, %rdi
callq 0x45a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xf0, %rsp
movq %rsi, %rdx
movq %rdi, %r14
leaq -0x48(%rbp), %rbx
movl $0x0, (%rbx)
xorl %eax, %eax
movq %rax, 0x8(%rbx)
movq %rbx, 0x10(%rbx)
movq %rbx, 0x18(%rbx)
movq %rax, 0x20(%rbx)
movq (%rdi), %rax
leaq -0x110(%rbp), %rdi
movq %r14, %rsi
callq *0x18(%rax)
leaq -0x50(%rbp), %rdi
callq 0x14870
movq -0x100(%rbp), %rax
testq %rax, %rax
je 0x14107
leaq -0x108(%rbp), %rcx
movl (%rcx), %edx
movl %edx, -0x48(%rbp)
movq %rax, -0x40(%rbp)
movups 0x10(%rcx), %xmm0
movups %xmm0, -0x38(%rbp)
movq %rbx, 0x8(%rax)
movq 0x20(%rcx), %rax
movq %rax, -0x28(%rbp)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq -0x110(%rbp), %rdi
callq 0x7d78
movl $0x78, %edi
callq 0x4350
movq %rax, %rbx
movq %rax, %rdi
movl $0xc8, %esi
callq 0x82ea
leaq -0x80(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x5039(%rip), %rsi      # 0x19175
leaq 0x503e(%rip), %rdx      # 0x19181
leaq -0x90(%rbp), %rdi
callq 0x6f6c
leaq -0x60(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x5023(%rip), %rsi      # 0x19182
leaq 0x5025(%rip), %rdx      # 0x1918b
leaq -0x70(%rbp), %rdi
callq 0x6f6c
leaq -0x90(%rbp), %rsi
leaq -0x70(%rbp), %rdx
movq %rbx, %rdi
callq 0xa430
movq -0x70(%rbp), %rdi
cmpq %r12, %rdi
je 0x14190
callq 0x4310
movq -0x90(%rbp), %rdi
cmpq %r15, %rdi
je 0x141a1
callq 0x4310
movq 0x28(%r14), %r14
leaq -0xe0(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x148a8
leaq -0xb0(%rbp), %rdi
leaq -0xe0(%rbp), %rdx
movq %r14, %rsi
callq 0x15494
leaq -0xb0(%rbp), %rsi
movq %rbx, %rdi
callq 0xa454
leaq -0xa0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x141ef
callq 0x4310
leaq -0xe0(%rbp), %rdi
callq 0x7d78
leaq -0x50(%rbp), %rdi
callq 0x7d78
movq %rbx, %rax
addq $0xf0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0xa0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14234
callq 0x4310
jmp 0x14234
movq %rax, %r14
leaq -0xe0(%rbp), %rdi
callq 0x7d78
jmp 0x1427a
movq %rax, %r14
movq -0x70(%rbp), %rdi
cmpq %r12, %rdi
je 0x14258
callq 0x4310
jmp 0x14258
movq %rax, %r14
movq -0x90(%rbp), %rdi
cmpq %r15, %rdi
jne 0x1426e
jmp 0x1427a
jmp 0x14277
movq %rax, %r14
movq %rbx, %rdi
callq 0x4310
jmp 0x1427a
jmp 0x14277
movq %rax, %r14
leaq -0x50(%rbp), %rdi
callq 0x7d78
movq %r14, %rdi
callq 0x45a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
subq $0x80, %rsp
movq %rdi, %r14
movl $0x78, %edi
callq 0x4350
movq %rax, %rbx
movq %rax, %rdi
movl $0x1f4, %esi            # imm = 0x1F4
callq 0x82ea
leaq -0x70(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x4e0b(%rip), %rsi      # 0x19175
leaq 0x4e10(%rip), %rdx      # 0x19181
leaq -0x80(%rbp), %rdi
callq 0x6f6c
leaq -0x50(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x5471(%rip), %rsi      # 0x197fb
leaq 0x547a(%rip), %rdx      # 0x1980b
leaq -0x60(%rbp), %rdi
callq 0x6f6c
leaq -0x80(%rbp), %rsi
leaq -0x60(%rbp), %rdx
movq %rbx, %rdi
callq 0xa430
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0x143b8
callq 0x4310
movq -0x80(%rbp), %rdi
cmpq %r15, %rdi
je 0x143c6
callq 0x4310
leaq 0x543f(%rip), %rsi      # 0x1980c
leaq -0xa0(%rbp), %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0xa815
leaq 0x5444(%rip), %rsi      # 0x1982a
movq %r15, %rdi
callq 0x45f0
leaq -0x30(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x14412
movq %rdx, -0x40(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x30(%rbp)
jmp 0x14419
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq -0x40(%rbp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
callq 0xa454
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x1444a
callq 0x4310
leaq -0x90(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1445f
callq 0x4310
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x14488
callq 0x4310
jmp 0x14488
movq %rax, %r14
leaq -0x90(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x144c1
jmp 0x144c6
movq %rax, %r14
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0x144b0
callq 0x4310
jmp 0x144b0
movq %rax, %r14
movq -0x80(%rbp), %rdi
cmpq %r15, %rdi
jne 0x144c1
jmp 0x144c6
movq %rax, %r14
movq %rbx, %rdi
callq 0x4310
movq %r14, %rdi
callq 0x45a0
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %r14
movl $0x78, %edi
callq 0x4350
movq %rax, %rbx
movq %rax, %rdi
movl $0x194, %esi            # imm = 0x194
callq 0x82ea
cmpq $0x0, 0x10(%r14)
je 0x147e1
leaq -0x78(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x4abc(%rip), %rsi      # 0x19175
leaq 0x4ac1(%rip), %rdx      # 0x19181
leaq -0x88(%rbp), %rdi
callq 0x6f6c
leaq -0x58(%rbp), %r12
movq %r12, -0x10(%r12)
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x7e12
leaq -0xa8(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0xf6ae
leaq 0x50ee(%rip), %rcx      # 0x197ee
leaq -0xa8(%rbp), %rdi
movl $0x5, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x43a0
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1473a
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x14742
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rsi
leaq -0x48(%rbp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x88(%rbp), %rsi
movq %rbx, %rdi
callq 0xa430
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x1477a
callq 0x4310
leaq -0x98(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1478f
callq 0x4310
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x1479d
callq 0x4310
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0x147ae
callq 0x4310
movq 0x8(%r14), %rsi
leaq -0xc8(%rbp), %r14
movq %r14, %rdi
callq 0xf1d5
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa454
leaq -0xb8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x147e1
callq 0x4310
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0xb8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x14862
jmp 0x14867
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x14821
callq 0x4310
jmp 0x14821
movq %rax, %r14
leaq -0x98(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1483b
callq 0x4310
jmp 0x1483b
movq %rax, %r14
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x1484e
callq 0x4310
jmp 0x1484e
movq %rax, %r14
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
jne 0x14862
jmp 0x14867
movq %rax, %r14
movq %rbx, %rdi
callq 0x4310
movq %r14, %rdi
callq 0x45a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 $0x58, %rsp
leaq -0x68(%rbp), %r14
movq %r14, -0x10(%r14)
movq 0x8(%rdi), %rsi
movq %rdi, -0x38(%rbp)
movq 0x10(%rdi), %rdx
addq %rsi, %rdx
leaq -0x78(%rbp), %rbx
movq %rbx, %rdi
callq 0x7e12
leaq -0x58(%rbp), %rdi
movq %rbx, %rsi
callq 0xf2e8
movq -0x78(%rbp), %rdi
cmpq %r14, %rdi
je 0x1539e
callq 0x4310
xorl %ebx, %ebx
leaq -0x58(%rbp), %r15
leaq -0x2c(%rbp), %r12
cmpl -0x50(%rbp), %ebx
jge 0x15411
movl %ebx, -0x2c(%rbp)
movq %r15, %rdi
leaq 0xaad6(%rip), %rsi      # 0x1fe90
movq %r12, %rdx
callq 0xf87f
movl %eax, %r13d
movl %ebx, -0x2c(%rbp)
movq %r15, %rdi
leaq 0xaade(%rip), %rsi      # 0x1feb0
movq %r12, %rdx
callq 0xf87f
testl %r13d, %r13d
js 0x1540c
movl %eax, %r14d
movq -0x38(%rbp), %rdi
movl %ebx, %esi
movl %r13d, %edx
callq 0x15c0e
movq -0x38(%rbp), %rdi
movl %r13d, %esi
movl %r14d, %edx
movq %r15, %rcx
callq 0x164ce
addl 0xaaaf(%rip), %r14d     # 0x1feb8
movl %r14d, %ebx
testl %r13d, %r13d
jns 0x153a8
movl -0x50(%rbp), %edx
movq -0x38(%rbp), %rdi
movl %ebx, %esi
callq 0x15c0e
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15431
callq 0x4310
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x15452
movq %rax, %rbx
movq -0x78(%rbp), %rdi
cmpq %r14, %rdi
jne 0x15462
jmp 0x15467
jmp 0x15452
movq %rax, %rbx
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15467
callq 0x4310
movq %rbx, %rdi
callq 0x45a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x15626
movq %rsi, %rbx
movq (%rdi), %rdi
leaq 0x4522(%rip), %rsi      # 0x19af8
callq 0x43e0
testq %rax, %rax
je 0x1562b
movq %rax, %r14
movq 0x18(%rbx), %r12
addq $0x8, %rbx
cmpq %rbx, %r12
je 0x15638
leaq 0x4503(%rip), %r13      # 0x19afa
xorl %r15d, %r15d
movq 0x20(%r12), %rdx
movq 0x40(%r12), %rcx
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x4490
incl %r15d
movq %r12, %rdi
callq 0x4270
movq %rax, %r12
cmpq %rbx, %rax
jne 0x155fa
jmp 0x1563b
xorl %r15d, %r15d
jmp 0x15643
callq 0x4060
xorl %r15d, %r15d
subl (%rax), %r15d
jmp 0x15643
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x4340
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1653e
cmpl %esi, %edx
jle 0x1653e
movq 0x99ab(%rip), %rdi      # 0x1fe98
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 0x4370
addq $0x28, %r14
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x4130
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16533
callq 0x4310
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %edi
callq 0x41f0
movq %rax, %rbx
addq $0x8, %r14
leaq 0x335f(%rip), %rsi      # 0x198b5
leaq -0x58(%rbp), %rdi
movq %r14, %rdx
callq 0xa815
movb $0x1, %r15b
leaq -0x58(%rbp), %rsi
movq %rbx, %rdi
callq 0x139e0
xorl %r15d, %r15d
leaq 0x8555(%rip), %rsi      # 0x1ead0
leaq -0xea38(%rip), %rdx     # 0x7b4a
movq %rbx, %rdi
callq 0x4570
movq %rax, %r14
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x165a7
callq 0x4310
jmp 0x165a7
movq %rax, %r14
movb $0x1, %r15b
testb %r15b, %r15b
je 0x165cb
movq %rbx, %rdi
callq 0x4290
jmp 0x165cb
movq %rax, %r14
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x165cb
callq 0x4310
movq %r14, %rdi
callq 0x45a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x17368
movq %rbx, %rdi
callq 0x17614
movq %rbx, %rdi
callq 0x17894
addq $0x28, %rbx
leaq 0x3453(%rip), %rsi      # 0x19a50
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x45f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq (%rdi), %rdi
callq 0x42d0
testl $0xff00, %eax           # imm = 0xFF00
jne 0x17bac
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %edi
callq 0x41f0
movq %rax, %rbx
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0x40(%rbp), %rdi
callq 0x7e12
movb $0x1, %r15b
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x139e0
xorl %r15d, %r15d
leaq 0x6ee2(%rip), %rsi      # 0x1ead0
leaq -0x100ab(%rip), %rdx    # 0x7b4a
movq %rbx, %rdi
callq 0x4570
movq %rax, %r14
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x17c16
callq 0x4310
jmp 0x17c16
movq %rax, %r14
movb $0x1, %r15b
testb %r15b, %r15b
je 0x17c23
movq %rbx, %rdi
callq 0x4290
movq %r14, %rdi
callq 0x45a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
cmpl $0x0, (%rdi)
jle 0x11f1d
xorl %r15d, %r15d
movq 0x148(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rsi
callq 0x2b686
movq 0x148(%rbx), %rax
movq (%rax,%r15,8), %r14
testq %r14, %r14
je 0x11eda
movq %r14, %rdi
callq 0x28958
movl $0x18, %esi
movq %r14, %rdi
callq 0x5340
movq 0x150(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rsi
callq 0x2b686
movq 0x150(%rbx), %rax
movq (%rax,%r15,8), %r14
testq %r14, %r14
je 0x11f12
movq %r14, %rdi
callq 0x28958
movl $0x18, %esi
movq %r14, %rdi
callq 0x5340
incq %r15
movslq (%rbx), %rax
cmpq %rax, %r15
jl 0x11ea2
movq 0x148(%rbx), %rdi
testq %rdi, %rdi
je 0x11f2e
callq 0x53f0
movq 0x150(%rbx), %rdi
testq %rdi, %rdi
je 0x11f3f
callq 0x53f0
movq 0x270(%rbx), %rdi
testq %rdi, %rdi
je 0x11f5a
movq 0x280(%rbx), %rsi
subq %rdi, %rsi
callq 0x5340
movq 0x250(%rbx), %rdi
testq %rdi, %rdi
je 0x11f75
movq 0x260(%rbx), %rsi
subq %rdi, %rsi
callq 0x5340
movq 0x238(%rbx), %rdi
testq %rdi, %rdi
je 0x11f90
movq 0x248(%rbx), %rsi
subq %rdi, %rsi
callq 0x5340
movq 0x220(%rbx), %rdi
testq %rdi, %rdi
je 0x11fab
movq 0x230(%rbx), %rsi
subq %rdi, %rsi
callq 0x5340
movq 0x208(%rbx), %rdi
testq %rdi, %rdi
je 0x11fc6
movq 0x218(%rbx), %rsi
subq %rdi, %rsi
callq 0x5340
movq 0x1f0(%rbx), %rdi
testq %rdi, %rdi
je 0x11fe1
movq 0x200(%rbx), %rsi
subq %rdi, %rsi
callq 0x5340
movq 0x1c0(%rbx), %rdi
leaq 0x1d0(%rbx), %rax
cmpq %rax, %rdi
je 0x11fff
movq (%rax), %rsi
incq %rsi
callq 0x5340
movq 0x1a0(%rbx), %rdi
leaq 0x1b0(%rbx), %rax
cmpq %rax, %rdi
je 0x1201d
movq (%rax), %rsi
incq %rsi
callq 0x5340
leaq 0x160(%rbx), %rdi
callq 0x2890a
leaq 0x118(%rbx), %rdi
callq 0x29d0e
leaq 0xe8(%rbx), %rdi
callq 0x29d86
leaq 0xb8(%rbx), %rdi
callq 0x29d0e
leaq 0x88(%rbx), %rdi
callq 0x29d86
leaq 0x68(%rbx), %rdi
callq 0xe7ca
leaq 0x50(%rbx), %rdi
callq 0xe7ca
movq 0x28(%rbx), %rdi
leaq 0x38(%rbx), %rax
cmpq %rax, %rdi
je 0x12083
movq (%rax), %rsi
incq %rsi
callq 0x5340
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x120a0
movq (%rbx), %rsi
incq %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x5340
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
xorl %ebp, %ebp
cmpl $-0x8, %edx
jl 0x164f5
movl %edx, %eax
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rsi), %r14
testl %ecx, %ecx
je 0x16500
movslq %eax, %rdx
shlq $0x5, %rdx
addq 0x28(%r15), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28c42
movl %eax, %ebp
addl %eax, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x28(%r15), %rdx
cmpl $-0x2, %eax
je 0x1656a
testl %eax, %eax
je 0x1653a
cmpl $-0x1, %eax
je 0x1656e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28c42
movl %eax, %r12d
movq 0x28(%r15), %rdx
addq $0x20, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28c42
movl %eax, %ebp
addl %r12d, %ebp
jmp 0x164f5
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28c42
movl %eax, %ebp
cmpb $0x1, 0x41(%r15)
jne 0x164f5
cmpb $0x0, 0x42(%r15)
jne 0x164f5
movq 0x28(%r15), %rdx
addq $0x20, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28c42
jmp 0x164f3
addq $0x20, %rdx
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x28c42
nop
// File: /workspace/github_cpp_makefile_star2_O1/medvedevgroup[P]varmatch/src/wholegenome.cpp
// Function: WholeGenome::PathNeedDecision(SequencePath&, std::multimap<int, int, std::less<int>, std::allocator<std::pair<int const, int>>>**, int)
int WholeGenome::PathNeedDecision(SequencePath& sp, multimap<int, int> * choices_by_pos[], int pos){
    for(int i = 0; i < 2; i++){
        if(choices_by_pos[i]->find(pos) != choices_by_pos[i]->end()){
            pair<multimap<int, int>::iterator, multimap<int, int>::iterator> var_range;
            var_range = choices_by_pos[i]->equal_range(pos);

            for(auto it = var_range.first; it != var_range.second; ++it){
                int var_index = (*it).second;
                if(sp.choice_vector[var_index] <= MEANING_CHOICE_BOUND) return var_index;
            }
            // you need to make choices now
            // if(sp.choice_made[i].find(pos) == sp.choice_made[i].end()){
            //     // no choice made at current pos
            //     return true;
            // }
        }
    }
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x4(%rsp), %rax
movl %ecx, (%rax)
xorl %r13d, %r13d
movq (%rbx,%r13,8), %rdi
movq 0x10(%rdi), %rdx
leaq 0x8(%rdi), %rax
movq %rax, %rcx
testq %rdx, %rdx
je 0x17260
movl 0x4(%rsp), %esi
movq %rax, %rcx
xorl %r8d, %r8d
cmpl %esi, 0x20(%rdx)
setl %r8b
cmovgeq %rdx, %rcx
movq 0x10(%rdx,%r8,8), %rdx
testq %rdx, %rdx
jne 0x17248
movq %rax, %rdx
cmpq %rax, %rcx
je 0x17276
movl 0x4(%rsp), %edx
cmpl 0x20(%rcx), %edx
cmovlq %rax, %rcx
movq %rcx, %rdx
cmpq %rax, %rdx
je 0x172b9
leaq 0x4(%rsp), %rsi
callq 0x2e20c
cmpq %rdx, %rax
sete %cl
je 0x172b5
movq %rdx, %r12
movq 0x168(%r14), %r15
movslq 0x24(%rax), %rdx
cmpl $-0x9, (%r15,%rdx,4)
cmovll %edx, %ebp
jl 0x172b5
movq %rax, %rdi
callq 0x5250
cmpq %r12, %rax
sete %cl
jne 0x17297
testb %cl, %cl
je 0x172ce
leaq 0x1(%r13), %rax
testq %r13, %r13
movq %rax, %r13
je 0x1722d
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/medvedevgroup[P]varmatch/src/wholegenome.cpp
// Function: WholeGenome::CalculateScore(DiploidVariant&, int, int, int, int)
int WholeGenome::CalculateScore(DiploidVariant & dv,
                                int choice,
                                int score_unit,
                                int match_mode,
                                int score_scheme){
    int score = 0;
    if(choice <= NOT_USE) return score;
    if(score_unit == 0){
        score = 1;
    }else if(score_unit == 1){
        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 += ScoreEditDistance(dv, choice);
        }
    }

    if(score_scheme == 0){
        return score;
    }else if(score_scheme == 1 || score_scheme == 2){
        if(dv.flag == false && score_scheme == 1){
            return score;
        }else if(dv.flag && score_scheme == 2){
            return score;
        }else{
            return 0;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %ebp, %ebp
cmpl $-0x8, %edx
jl 0x177f0
movl %r9d, %ebx
movq %rsi, %r14
testl %ecx, %ecx
je 0x17735
cmpl $0x1, %ecx
jne 0x1773f
movq %rdi, %r15
leaq 0x8(%r14), %r12
testl %r8d, %r8d
je 0x17746
movslq %edx, %rdx
shlq $0x5, %rdx
addq 0x28(%r14), %rdx
movq %r15, %rdi
movq %r12, %rsi
jmp 0x177c5
movl $0x1, %ebp
jmp 0x177cc
xorl %ebp, %ebp
jmp 0x177cc
movq 0x28(%r14), %rax
cmpl $-0x2, %edx
je 0x177b8
testl %edx, %edx
je 0x17783
cmpl $-0x1, %edx
je 0x177bc
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x28c42
movl %eax, %r13d
movq 0x28(%r14), %rdx
addq $0x20, %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x28c42
movl %eax, %ebp
addl %r13d, %ebp
jmp 0x177cc
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x28c42
movl %eax, %ebp
cmpb $0x1, 0x41(%r14)
jne 0x177cc
cmpb $0x0, 0x42(%r14)
jne 0x177cc
movq 0x28(%r14), %rdx
addq $0x20, %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x28c42
addl %eax, %ebp
jmp 0x177cc
addq $0x20, %rax
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x28c42
movl %eax, %ebp
testl %ebx, %ebx
je 0x177f0
cmpl $0x1, %ebx
sete %cl
movb 0x4c(%r14), %al
testb %al, %al
sete %dl
testb %dl, %cl
jne 0x177f0
xorl %ecx, %ecx
testb %al, %al
cmovel %ecx, %ebp
cmpl $0x2, %ebx
cmovnel %ecx, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/medvedevgroup[P]varmatch/src/wholegenome.cpp
// Function: GetMatchmodeFromModeIndex(int)
int GetMatchmodeFromModeIndex(int mode_index){
    int result = mode_index;
    result >>= 2;
    result &= 1;
    return result;
}

// Assembly:
movl %edi, %eax
shrl $0x2, %eax
andl $0x1, %eax
retq
nop