LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/ChanTsune[P]py_string/./py_string.hpp
// Function: py::basic_string<char> py::basic_string<char>::format<int, char const*, int>(int, char const*, int)
basic_string<_Elme> basic_string<_Elme>::format(Args... args)
{
  basic_string<_Elme> str(*this);
  static std::regex match("\\{(![^:])?(:(.+?)?)?\\}");
  if (std::regex_search(str, match)) {
    return this->_format_automatic(str, std::move(args)...);
  }
  return this->_format<0>(str, std::move(args)...);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %r14d
movq %rcx, %r15
movl %edx, %r12d
movq %rsi, %r13
movq %rdi, %rbx
leaq -0x48(%rbp), %rdi
callq 0x4440
movb 0x1e47d(%rip), %al      # 0x23798
testb %al, %al
je 0x5382
leaq 0x1e452(%rip), %rsi     # 0x23778
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
callq 0x10013
testb %al, %al
je 0x534f
leaq -0x48(%rbp), %rdx
movq %rbx, %rdi
movq %r13, %rsi
movl %r12d, %ecx
movq %r15, %r8
movl %r14d, %r9d
callq 0x10030
jmp 0x5367
leaq -0x48(%rbp), %rdx
movq %rbx, %rdi
movq %r13, %rsi
movl %r12d, %ecx
movq %r15, %r8
movl %r14d, %r9d
callq 0x10270
leaq -0x48(%rbp), %rdi
callq 0x4170
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1e40f(%rip), %rdi     # 0x23798
callq 0x4560
testl %eax, %eax
je 0x531f
leaq 0x1e3df(%rip), %rdi     # 0x23778
leaq 0x12745(%rip), %rsi     # 0x17ae5
pushq $0x10
popq %rdx
callq 0x5074
leaq -0x2d1(%rip), %rdi      # 0x50de
leaq 0x1e3c2(%rip), %rsi     # 0x23778
leaq 0x1df3b(%rip), %rdx     # 0x232f8
callq 0x42c0
leaq 0x1e3cf(%rip), %rdi     # 0x23798
callq 0x4220
jmp 0x531f
movq %rax, %rbx
leaq 0x1e3bb(%rip), %rdi     # 0x23798
callq 0x4210
jmp 0x53e7
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x4170
movq %rbx, %rdi
callq 0x4540
// File: /workspace/github_cpp_makefile_star2_O2/ChanTsune[P]py_string/./py_string.hpp
// Function: py::basic_string<char>::pyreplace(py::basic_string<char>, py::basic_string<char>, unsigned long) const
basic_string<_Elme> basic_string<_Elme>::pyreplace(basic_string<_Elme> old,
                                                   basic_string<_Elme> _new,
                                                   size_t count) const
{
  size_t cursor = 0;
  basic_string<_Elme> s(*this);
  size_t oldlen = old.size(), newlen = _new.size();
  cursor = s.find(old, cursor);
  while (cursor != std::basic_string<_Elme>::npos && cursor <= s.size()
         && count > 0) {
    s.replace(cursor, oldlen, _new);
    cursor += newlen;
    if (oldlen != 0) {
      cursor = s.find(old, cursor);
    } else {
      ++cursor;
    }
    --count;
  }
  return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rdi, %rbx
callq 0x4440
movq 0x8(%r12), %r13
movq 0x8(%r15), %rax
movq %rax, -0x38(%rbp)
movq %rbx, %rdi
movq %r12, -0x30(%rbp)
movq %r12, %rsi
xorl %edx, %edx
callq 0x45b0
movq %rax, %r12
cmpq $-0x1, %r12
je 0x557d
addq $-0x1, %r14
setb %al
cmpq 0x8(%rbx), %r12
ja 0x557d
testb %al, %al
je 0x557d
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r15, %rcx
callq 0x40e0
addq -0x38(%rbp), %r12
testq %r13, %r13
jne 0x5571
incq %r12
jmp 0x553b
movq %rbx, %rdi
movq -0x30(%rbp), %rsi
movq %r12, %rdx
jmp 0x5533
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x4170
movq %r14, %rdi
callq 0x4540
// File: /workspace/github_cpp_makefile_star2_O2/ChanTsune[P]py_string/./py_string.hpp
// Function: void py::basic_string<char>::split<std::deque<py::basic_string<char>, std::allocator<py::basic_string<char>>>>(std::deque<py::basic_string<char>, std::allocator<py::basic_string<char>>>&, py::basic_string<char>, unsigned long) const
void basic_string<_Elme>::split(_Iterable &result, basic_string<_Elme> sep,
                                size_t maxsplit) const
{
  if (sep.empty())
    return this->split(result, maxsplit);
  if (result.size() != 0)
    result.clear();
  size_t index, pre_index = 0, sep_len = sep.size();
  for (; maxsplit--;) {
    index = this->find(sep, pre_index);
    if (index == std::basic_string<_Elme>::npos)
      break;
    result.push_back(this->substr(pre_index, index - pre_index));
    pre_index = index + sep_len;
  }
  result.push_back(this->substr(pre_index));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, -0x38(%rbp)
cmpq $0x0, 0x8(%rdx)
je 0x567f
movq %rbx, %rdi
callq 0x161a0
testq %rax, %rax
je 0x55e0
movq %rbx, %rdi
callq 0x161b6
movq %rbx, -0x30(%rbp)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
xorl %r12d, %r12d
leaq -0x60(%rbp), %r13
subq $0x1, %r15
jb 0x5646
movq %r14, %rdi
movq -0x38(%rbp), %rsi
movq %r12, %rdx
callq 0x45b0
cmpq $-0x1, %rax
je 0x5646
movq %rax, %rbx
movq %rax, %rcx
subq %r12, %rcx
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xffac
movq -0x30(%rbp), %rdi
movq %r13, %rsi
callq 0x16566
movq %r13, %rdi
callq 0x4170
addq -0x40(%rbp), %rbx
movq %rbx, %r12
jmp 0x55f7
leaq -0x60(%rbp), %rbx
pushq $-0x1
popq %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xffac
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x16566
leaq -0x60(%rbp), %rdi
callq 0x4170
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1602c
jmp 0x569d
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x4170
movq %rbx, %rdi
callq 0x4540
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChanTsune[P]py_string/./py_string.hpp
// Function: py::basic_string<char>::maketrans(py::basic_string<char>, py::basic_string<char>, py::basic_string<char>)
static transtable_t maketrans(basic_string<_Elme> from,
                                basic_string<_Elme> to,
                                basic_string<_Elme> delchars)
  {
    transtable_t table;
    for (int i = std::min(from.size(), to.size()); i--;) {
      table[from[i]] = to[i];
    }
    for (auto &&s : delchars) {
      table[s] = "";
    }
    return table;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, -0x30(%rbp)
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x30(%rdi), %rax
movq %rax, (%rdi)
movq $0x1, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movl $0x3f800000, 0x20(%rdi) # imm = 0x3F800000
movups %xmm0, 0x28(%rdi)
movq 0x8(%rsi), %rax
movq 0x8(%rdx), %rcx
cmpq %rax, %rcx
cmovbq %rcx, %rax
cltq
movq %rax, %r13
subq $0x1, %r13
jb 0x576f
jge 0x573f
movq 0x8(%r15), %rdx
movq 0x8(%r12), %rcx
jmp 0x5743
xorl %edx, %edx
xorl %ecx, %ecx
addq (%r15), %rdx
movb -0x1(%rax,%rdx), %r14b
addq (%r12), %rcx
leaq (%rax,%rcx), %rsi
decq %rsi
movq %rbx, %rdi
callq 0x1661c
movsbl %r14b, %esi
movq %rax, %rdi
callq 0x4500
movq %r13, %rax
jmp 0x572c
movq -0x30(%rbp), %rax
movq (%rax), %r15
movq 0x8(%rax), %r12
leaq 0x11af6(%rip), %r14     # 0x17277
testq %r12, %r12
je 0x57a4
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1661c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4590
incq %r15
decq %r12
jmp 0x5781
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x57b8
movq %rax, %r14
movq %rbx, %rdi
callq 0x5ef4
movq %r14, %rdi
callq 0x4540
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChanTsune[P]py_string/./py_string.hpp
// Function: py::basic_string<char>::translate(std::unordered_map<char, py::basic_string<char>, std::hash<char>, std::equal_to<char>, std::allocator<std::pair<char const, py::basic_string<char>>>>&) const
basic_string<_Elme> basic_string<_Elme>::translate(transtable_t &table) const
{
  basic_string<_Elme> str;
  for (auto &&s : *this) {
    if (table.count(s)) {
      str += table[s];
    } else {
      str.push_back(s);
    }
  }
  return str;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq (%rsi), %r15
movq 0x8(%rsi), %r12
testq %r12, %r12
je 0x5835
movq %r14, %rdi
movq %r15, %rsi
callq 0x16a82
testq %rax, %rax
je 0x5821
movq %r14, %rdi
movq %r15, %rsi
callq 0x1661c
movq %rbx, %rdi
movq %rax, %rsi
callq 0x45a0
jmp 0x582d
movsbl (%r15), %esi
movq %rbx, %rdi
callq 0x42b0
incq %r15
decq %r12
jmp 0x57f4
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x4170
movq %r14, %rdi
callq 0x4540
// File: /workspace/github_cpp_makefile_star2_O2/ChanTsune[P]py_string/./py_string.hpp
// Function: py::basic_string<char>::slice(py::null_allow::null_allow<int>, py::null_allow::null_allow<int>) const
basic_string<_Elme> basic_string<_Elme>::slice(optional_int start,
                                               optional_int end) const
{
  int s, len;
  std::tie(s, std::ignore, std::ignore, len)
    = util::adjust_index<int>(start, end, this->size());
  return this->substr(s, len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x8(%rsi), %eax
leaq -0x28(%rbp), %r15
movq %r15, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movl %eax, %ecx
callq 0xff86
movslq 0xc(%r15), %rdx
movslq (%r15), %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xffac
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ChanTsune[P]py_string/./py_string.hpp
// Function: std::tuple<int, int, int, int> py::util::adjust_index<int>(py::null_allow::null_allow<int>, py::null_allow::null_allow<int>, py::null_allow::null_allow<int>, int)
inline std::tuple<T, T, T, T> adjust_index(optional<T> _start,
                                             optional<T> _stop,
                                             optional<T> _step, T _length)
  {
    T start, stop, step = _step.value_or(1), upper, lower;
    T step_sign = sign(step);
    bool step_is_negative = step_sign < 0;
    /* Find lower and upper bounds for start and stop. */
    if (step_is_negative) {
      lower = -1;
      upper = _length + lower;
    } else {
      lower = 0;
      upper = _length;
    }
    // Compute start.
    if (_start.has_value()) {
      start = _start.value();
      if (sign(start) < 0) {
        start += _length;

        if (start < lower /* Py_LT */) {
          start = lower;
        }
      } else {
        if (start > upper /* Py_GT */) {
          start = upper;
        }
      }
    } else {
      start = step_is_negative ? upper : lower;
    }
    // Compute stop.
    if (_stop.has_value()) {
      stop = _stop.value();

      if (sign(stop) < 0) {
        stop += _length;
        if (stop < lower /* Py_LT */) {
          stop = lower;
        }
      } else {
        if (stop > upper /* Py_GT */) {
          stop = upper;
        }
      }
    } else {
      stop = step_is_negative ? lower : upper;
    }
    T len = 0;
    if (step < 0) {
      if (stop < start) {
        len = (start - stop - 1) / (-step) + 1;
      }
    } else {
      if (start < stop) {
        len = (stop - start - 1) / step + 1;
      }
    }
    return std::make_tuple(start, stop, step, len);
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movabsq $0x100000000, %rax      # imm = 0x100000000
btq $0x20, %rcx
movl $0x1, %r9d
cmovbl %ecx, %r9d
xorl %ecx, %ecx
movl %r8d, %r10d
movl $0x0, %r11d
movl %r8d, %ebx
testl %r9d, %r9d
jns 0xfeec
leal -0x1(%r8), %ecx
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
movl %r10d, %r11d
movl %ecx, %ebx
testq %rax, %rsi
je 0xff08
testl %esi, %esi
js 0xfefc
cmpl %esi, %ebx
cmovll %ebx, %esi
jmp 0xff06
addl %r8d, %esi
cmpl %r11d, %esi
cmovlel %r11d, %esi
movl %esi, %ecx
testq %rax, %rdx
je 0xff25
testl %edx, %edx
js 0xff18
cmpl %edx, %ebx
cmovll %ebx, %edx
jmp 0xff22
addl %r8d, %edx
cmpl %r11d, %edx
cmovlel %r11d, %edx
movl %edx, %r10d
testl %r9d, %r9d
js 0xff3c
cmpl %r10d, %ecx
jge 0xff54
movl %ecx, %eax
notl %eax
addl %r10d, %eax
cltd
idivl %r9d
jmp 0xff50
cmpl %ecx, %r10d
jge 0xff54
movl %r10d, %eax
notl %eax
addl %ecx, %eax
movl %r9d, %esi
negl %esi
cltd
idivl %esi
incl %eax
jmp 0xff56
xorl %eax, %eax
movl %eax, (%rdi)
movl %r9d, 0x4(%rdi)
movl %r10d, 0x8(%rdi)
movl %ecx, 0xc(%rdi)
movq %rdi, %rax
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChanTsune[P]py_string/./py_string.hpp
// Function: py::basic_string<char> py::basic_string<char>::_format_automatic<int, char const*, int>(py::basic_string<char>&, int, char const*, int) const
basic_string<_Elme> _format_automatic(basic_string<_Elme> &_Str, Head head,
                                        Tail... tail) const
  {
    basic_string<_Elme> str;
    std::smatch sub;
    static std::regex match("\\{(![^:])?(:(.+?)?)?\\}");
    if (std::regex_search(_Str, sub, match)) {
      format_parser::format(sub.str(3), head, str);
      _Str = _Str.pyreplace(sub.str(0), str, 1);
      return this->_format_automatic(_Str, std::move(tail)...);
    }
    return _Str;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movl %r9d, -0x2c(%rbp)
movq %r8, %r12
movl %ecx, %r14d
movq %rdx, %r15
leaq -0x60(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq %rsi, %r13
movq %rdi, %rbx
movb $0x0, (%rax)
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movaps %xmm0, -0x50(%rbp)
movb 0x13748(%rip), %al      # 0x237c0
testb %al, %al
je 0x101ac
leaq 0x13719(%rip), %rdx     # 0x237a0
leaq -0x50(%rbp), %rsi
movq %r15, %rdi
xorl %ecx, %ecx
callq 0x128c8
testb %al, %al
je 0x1017a
leaq -0xf0(%rbp), %rdi
leaq -0x50(%rbp), %rsi
pushq $0x3
popq %rdx
callq 0x13152
leaq -0xf0(%rbp), %rdi
leaq -0x70(%rbp), %rdx
movl %r14d, %esi
callq 0x128e8
leaq -0xf0(%rbp), %rdi
callq 0x4170
leaq -0xb0(%rbp), %rdi
leaq -0x50(%rbp), %rsi
xorl %edx, %edx
callq 0x13152
leaq -0xd0(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x4440
leaq -0x90(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4440
leaq -0x110(%rbp), %rdi
leaq -0xd0(%rbp), %rdx
leaq -0x90(%rbp), %rcx
pushq $0x1
popq %r8
movq %r15, %rsi
callq 0x54f8
leaq -0x110(%rbp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x43e0
movq %r14, %rdi
callq 0x4170
leaq -0x90(%rbp), %rdi
callq 0x4170
leaq -0xd0(%rbp), %rdi
callq 0x4170
leaq -0xb0(%rbp), %rdi
callq 0x4170
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r12, %rcx
movl -0x2c(%rbp), %r8d
callq 0x1317c
jmp 0x10185
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4440
leaq -0x50(%rbp), %rdi
callq 0x10b62
leaq -0x70(%rbp), %rdi
callq 0x4170
movq %rbx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1360d(%rip), %rdi     # 0x237c0
callq 0x4560
testl %eax, %eax
je 0x10080
leaq 0x135d9(%rip), %rdi     # 0x237a0
leaq 0x7917(%rip), %rsi      # 0x17ae5
pushq $0x10
popq %rdx
callq 0x5074
leaq -0xb0ff(%rip), %rdi     # 0x50de
leaq 0x135bc(%rip), %rsi     # 0x237a0
leaq 0x1310d(%rip), %rdx     # 0x232f8
callq 0x42c0
leaq 0x135c9(%rip), %rdi     # 0x237c0
callq 0x4220
jmp 0x10080
movq %rax, %rbx
leaq 0x135b5(%rip), %rdi     # 0x237c0
callq 0x4210
jmp 0x10256
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x4170
jmp 0x10226
movq %rax, %rbx
leaq -0xd0(%rbp), %rdi
callq 0x4170
jmp 0x10237
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
jmp 0x1024c
jmp 0x10253
movq %rax, %rbx
leaq -0xf0(%rbp), %rdi
callq 0x4170
jmp 0x10256
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x10b62
leaq -0x70(%rbp), %rdi
callq 0x4170
movq %rbx, %rdi
callq 0x4540
// File: /workspace/github_cpp_makefile_star2_O2/ChanTsune[P]py_string/./py_string.hpp
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> py::util::itobin<int>(int)
inline std::string itobin(T n)
  {
    std::string str;
    T p = 1;
    for (T i = sizeof(T) * 8; i--;)
      str.push_back(n & (p << i) ? '1' : '0');
    auto pos = str.find('1');
    if (pos != std::string::npos)
      return str.substr(pos);
    return "0";
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %esi, %r14d
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq %rdi, %rbx
movb $0x0, (%rax)
pushq $0x1f
popq %rax
leaq -0x48(%rbp), %r15
cmpl $-0x1, %eax
je 0x1343e
leal -0x1(%rax), %r12d
btl %eax, %r14d
movl $0x0, %esi
adcl $0x30, %esi
movq %r15, %rdi
callq 0x42b0
movl %r12d, %eax
jmp 0x1341c
leaq -0x48(%rbp), %rdi
pushq $0x31
popq %rsi
xorl %edx, %edx
callq 0x4420
cmpq $-0x1, %rax
je 0x13466
leaq -0x48(%rbp), %rsi
pushq $-0x1
popq %rcx
movq %rbx, %rdi
movq %rax, %rdx
callq 0x4340
jmp 0x13479
leaq 0x46ae(%rip), %rsi      # 0x17b1b
leaq -0x21(%rbp), %rdx
movq %rbx, %rdi
callq 0x4120
leaq -0x48(%rbp), %rdi
callq 0x4170
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x13496
jmp 0x13496
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x4170
movq %rbx, %rdi
callq 0x4540
// File: /workspace/github_cpp_makefile_star2_O2/ChanTsune[P]py_string/./py_string.hpp
// Function: py::util::sepinsert(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned long)
inline void sepinsert(std::string &str, const std::string sep, size_t len)
  {
    std::string dst;
    size_t count = 0;
    auto start = str.rbegin();
    auto end = str.rend();
    for (; start != end; ++start) {
      ++count;
      dst.push_back(*start);
      if (!(count % len)) {
        dst += sep;
      }
    }
    if (dst.back() == sep.back())
      dst.pop_back();
    str.clear();
    std::reverse_copy(dst.begin(), dst.end(), std::back_inserter(str));
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r15
movq %rsi, -0x30(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq (%rdi), %rbx
movq %rdi, -0x58(%rbp)
movq 0x8(%rdi), %r14
pushq $0x1
popq %r12
leaq -0x50(%rbp), %r13
testq %r14, %r14
je 0x13519
movsbl -0x1(%rbx,%r14), %esi
movq %r13, %rdi
callq 0x42b0
movq %r12, %rax
xorl %edx, %edx
divq %r15
testq %rdx, %rdx
jne 0x13511
movq %r13, %rdi
movq -0x30(%rbp), %rsi
callq 0x45a0
decq %r14
incq %r12
jmp 0x134e5
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rcx
movb -0x1(%rax,%rcx), %al
movq -0x30(%rbp), %rdx
movq (%rdx), %rcx
movq 0x8(%rdx), %rdx
cmpb -0x1(%rcx,%rdx), %al
jne 0x1353f
leaq -0x50(%rbp), %rdi
callq 0x43d0
movq -0x58(%rbp), %rdx
andq $0x0, 0x8(%rdx)
movq (%rdx), %rax
movb $0x0, (%rax)
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
addq %rdi, %rsi
callq 0x14624
leaq -0x50(%rbp), %rdi
callq 0x4170
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x13578
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x4170
movq %rbx, %rdi
callq 0x4540
// File: /workspace/github_cpp_makefile_star2_O2/ChanTsune[P]py_string/./py_string.hpp
// Function: py::util::__format_eq(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char, unsigned long)
inline void __format_eq(std::string &str, char c, size_t len)
  {
    static std::regex mc("((-|\\+| )?(0[boxX])?)?([0-9a-fA-F,_.]+?)");
    std::smatch sub;
    std::regex_match(str, sub, mc);
    str = sub.str(1)
          + std::string((len - sub.str(1).size()) - sub.str(4).size(), c)
          + sub.str(4);
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %rbx
movb 0xf8a5(%rip), %al       # 0x237e8
testb %al, %al
je 0x1407f
xorps %xmm0, %xmm0
leaq -0x40(%rbp), %rsi
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
leaq 0xf868(%rip), %rdx      # 0x237c8
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x133b4
leaq -0xe0(%rbp), %rdi
leaq -0x40(%rbp), %rsi
pushq $0x1
popq %rdx
callq 0x13152
leaq -0xc0(%rbp), %rdi
leaq -0x40(%rbp), %rsi
pushq $0x1
popq %rdx
callq 0x13152
movq -0xb8(%rbp), %r12
leaq -0xa0(%rbp), %rdi
leaq -0x40(%rbp), %rsi
pushq $0x4
popq %rdx
callq 0x13152
addq -0x98(%rbp), %r12
subq %r12, %r14
leaq -0x50(%rbp), %rax
movq %rax, -0x10(%rax)
movsbl %r15b, %edx
leaq -0x60(%rbp), %rdi
movq %r14, %rsi
callq 0x4390
leaq -0x100(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x147cd
leaq -0x80(%rbp), %rdi
leaq -0x40(%rbp), %rsi
pushq $0x4
popq %rdx
callq 0x13152
leaq -0x120(%rbp), %rdi
leaq -0x100(%rbp), %rsi
leaq -0x80(%rbp), %rdx
callq 0x147cd
leaq -0x120(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x43e0
movq %r14, %rdi
callq 0x4170
leaq -0x80(%rbp), %rdi
callq 0x4170
leaq -0x100(%rbp), %rdi
callq 0x4170
leaq -0x60(%rbp), %rdi
callq 0x4170
leaq -0xa0(%rbp), %rdi
callq 0x4170
leaq -0xc0(%rbp), %rdi
callq 0x4170
leaq -0xe0(%rbp), %rdi
callq 0x4170
leaq -0x40(%rbp), %rdi
callq 0x10b62
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0xf762(%rip), %rdi      # 0x237e8
callq 0x4560
testl %eax, %eax
je 0x13f4b
leaq 0xf72e(%rip), %rdi      # 0x237c8
leaq 0x3a89(%rip), %rsi      # 0x17b2a
pushq $0x10
popq %rdx
callq 0x5074
leaq -0xefd2(%rip), %rdi     # 0x50de
leaq 0xf711(%rip), %rsi      # 0x237c8
leaq 0xf23a(%rip), %rdx      # 0x232f8
callq 0x42c0
leaq 0xf71e(%rip), %rdi      # 0x237e8
callq 0x4220
jmp 0x13f4b
movq %rax, %rbx
leaq 0xf70a(%rip), %rdi      # 0x237e8
callq 0x4210
jmp 0x14153
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x4170
jmp 0x140f6
movq %rax, %rbx
leaq -0x100(%rbp), %rdi
callq 0x4170
jmp 0x14107
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x4170
jmp 0x14115
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x4170
jmp 0x14126
movq %rax, %rbx
leaq -0xc0(%rbp), %rdi
callq 0x4170
leaq -0xe0(%rbp), %rdi
callq 0x4170
jmp 0x1414a
movq %rax, %rbx
jmp 0x14132
jmp 0x14147
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x10b62
movq %rbx, %rdi
callq 0x4540
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChanTsune[P]py_string/./py_string.hpp
// Function: py::basic_string<char>::center(unsigned long, char) const
basic_string<_Elme> basic_string<_Elme>::center(size_t width,
                                                _Elme fillchar) const
{
  size_t r, l, len = this->size();
  if (width <= len)
    return *this;
  l = width - len;
  r = l / 2 + l % 2;

  return basic_string<_Elme>(l - r, fillchar) + *this
         + basic_string<_Elme>(r, fillchar);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %rbx
subq 0x8(%rsi), %r14
jbe 0x142cf
movq %r14, %r12
shrq %r12
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
movsbl %cl, %r15d
leaq -0x68(%rbp), %rdi
movq %r12, %rsi
movl %r15d, %edx
callq 0x4390
leaq -0x88(%rbp), %rdi
movq %r13, %rsi
callq 0x4440
leaq -0xa8(%rbp), %rdi
leaq -0x68(%rbp), %rsi
leaq -0x88(%rbp), %rdx
callq 0x1483e
subq %r12, %r14
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x48(%rbp), %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x4390
leaq -0xa8(%rbp), %rsi
leaq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x1483e
leaq -0x48(%rbp), %rdi
callq 0x4170
leaq -0xa8(%rbp), %rdi
callq 0x4170
leaq -0x88(%rbp), %rdi
callq 0x4170
leaq -0x68(%rbp), %rdi
callq 0x4170
jmp 0x142da
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4440
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x4170
jmp 0x14300
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
callq 0x4170
jmp 0x14311
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x4170
jmp 0x14322
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x4170
movq %rbx, %rdi
callq 0x4540
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChanTsune[P]py_string/./py_string.hpp
// Function: unsigned long py::util::decimal_place<float>(float)
inline size_t decimal_place(T x)
  {
    size_t i = 0, j = 10;
    T t = x;
    while (t != std::floor(t)) {
      t = x * j;
      j *= 10;
      ++i;
    }
    return i;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
pushq $0xa
popq %r14
xorl %ebx, %ebx
movss %xmm0, -0x14(%rbp)
movss %xmm0, -0x18(%rbp)
callq 0x4110
movss -0x18(%rbp), %xmm1
ucomiss %xmm0, %xmm1
jne 0x146e8
jnp 0x1471a
testq %r14, %r14
js 0x146f4
cvtsi2ss %r14, %xmm0
jmp 0x1470c
movq %r14, %rax
shrq %rax
movl %r14d, %ecx
andl $0x1, %ecx
orq %rax, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
mulss -0x14(%rbp), %xmm0
imulq $0xa, %r14, %r14
incq %rbx
jmp 0x146d2
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ChanTsune[P]py_string/./py_string.hpp
// Function: void py::basic_string<char>::split<std::deque<py::basic_string<char>, std::allocator<py::basic_string<char>>>>(std::deque<py::basic_string<char>, std::allocator<py::basic_string<char>>>&, unsigned long) const
void basic_string<_Elme>::split(_Iterable &result, size_t maxsplit) const
{
  if (result.size() != 0)
    result.clear();
  auto start = this->begin();
  auto end = this->end();
  int index = 0, len = 0;
  basic_string<_Elme> tmp;
  for (; start != end && maxsplit; ++start) {
    if (util::isspace(*start)) {
      if (len != 0) {
        result.push_back(this->substr(index, len));
        --maxsplit;
        index += len;
      }
      ++index;
      len = 0;
    } else {
      ++len;
    }
  }
  tmp = this->substr(index);
  tmp = tmp.lstrip();
  if (tmp.size() != 0) {
    result.push_back(tmp);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, -0x30(%rbp)
movq %rsi, %rdi
callq 0x161a0
testq %rax, %rax
je 0x1605c
movq %rbx, %rdi
callq 0x161b6
movq %rbx, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorl %r14d, %r14d
leaq -0x88(%rbp), %rbx
xorl %r12d, %r12d
xorl %r13d, %r13d
movslq %r12d, %rdx
cmpq %r14, -0x48(%rbp)
je 0x160fe
testq %r15, %r15
je 0x160fe
movq -0x40(%rbp), %rax
movzbl (%rax,%r14), %eax
cmpq $0x20, %rax
ja 0x160f9
movabsq $0x1f0003e00, %rcx      # imm = 0x1F0003E00
btq %rax, %rcx
jae 0x160f9
testl %r13d, %r13d
je 0x160ee
movslq %r13d, %rcx
movq %rbx, %rdi
movq -0x30(%rbp), %rsi
callq 0xffac
movq -0x38(%rbp), %rdi
movq %rbx, %rsi
callq 0x16566
movq %rbx, %rdi
callq 0x4170
decq %r15
addl %r13d, %r12d
incl %r12d
xorl %r13d, %r13d
incq %r14
jmp 0x16093
incl %r13d
jmp 0x160f4
leaq -0x88(%rbp), %r15
pushq $-0x1
popq %rcx
movq %r15, %rdi
movq -0x30(%rbp), %rsi
callq 0xffac
leaq -0x68(%rbp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x43e0
movq %r15, %rdi
callq 0x4170
leaq -0x88(%rbp), %rdi
movq %r14, %rsi
callq 0x161f4
movq %r14, %rdi
movq %r15, %rsi
callq 0x43e0
movq %r15, %rdi
callq 0x4170
cmpq $0x0, 0x8(%r14)
je 0x16161
leaq -0x68(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x16248
leaq -0x68(%rbp), %rdi
callq 0x4170
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1617b
movq %rax, %rbx
jmp 0x1618f
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x4170
leaq -0x68(%rbp), %rdi
callq 0x4170
movq %rbx, %rdi
callq 0x4540
// File: /workspace/github_cpp_makefile_star2_O2/ChanTsune[P]py_string/./py_string.hpp
// Function: py::basic_string<char>::lstrip() const
basic_string<_Elme> basic_string<_Elme>::lstrip(void) const
{
  if (this->empty())
    return *this;
  auto itr = this->begin();
  while (util::isspace(*itr))
    ++itr;
  return this->substr(std::distance(this->begin(), itr));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x8(%rsi)
je 0x16235
movq (%rsi), %rax
xorl %edx, %edx
movabsq $0x1f0003e00, %rcx      # imm = 0x1F0003E00
movzbl (%rax,%rdx), %edi
cmpq $0x20, %rdi
ja 0x16228
btq %rdi, %rcx
jae 0x16228
incq %rdx
jmp 0x16213
pushq $-0x1
popq %rcx
movq %rbx, %rdi
callq 0xffac
jmp 0x1623d
movq %rbx, %rdi
callq 0x4440
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChanTsune[P]py_string/./py_string.hpp
// Function: std::unordered_map<char, py::basic_string<char>, std::hash<char>, std::equal_to<char>, std::allocator<std::pair<char const, py::basic_string<char>>>> py::basic_string<char>::_maketrans<std::unordered_map<char, py::basic_string<char>, std::hash<char>, std::equal_to<char>, std::allocator<std::pair<char const, py::basic_string<char>>>>>(std::unordered_map<char, py::basic_string<char>, std::hash<char>, std::equal_to<char>, std::allocator<std::pair<char const, py::basic_string<char>>>>&)
static transtable_t _maketrans(Map &table_map)
  {
    transtable_t table;
    for (auto &&m : table_map) {
      table[m.first] = m.second;
    }
    return table;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x30(%rdi), %rax
movq %rax, (%rdi)
movq $0x1, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movl $0x3f800000, 0x20(%rdi) # imm = 0x3F800000
movups %xmm0, 0x28(%rdi)
addq $0x10, %r14
movq (%r14), %r14
testq %r14, %r14
je 0x16a66
leaq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x1661c
leaq 0x10(%r14), %rsi
movq %rax, %rdi
callq 0x41d0
jmp 0x16a44
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x5ef4
movq %r14, %rdi
callq 0x4540
nop
// File: /workspace/github_cpp_makefile_star2_O2/TheiaRT[P]libiris/tcp_server.cpp
// Function: TCPServer::~TCPServer()
TCPServer::~TCPServer()
{
    /* Loop thread should be stopped before delete. */
    if (loop_thread->joinable()) {
        /* TODO: decide later if we actually need to join */
        loop_thread->detach();
    }

    delete running;
    delete loop_thread;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x60(%rdi), %rdi
cmpq $0x0, (%rdi)
je 0x2452
callq 0x2240
movq 0x58(%rbx), %rdi
pushq $0x1
popq %rsi
callq 0x21d0
movq 0x60(%rbx), %r14
testq %r14, %r14
je 0x246f
movq %r14, %rdi
callq 0x29ac
pushq $0x8
popq %rsi
movq %r14, %rdi
callq 0x21d0
addq $0x38, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2984
movq %rax, %rdi
callq 0x29a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/TheiaRT[P]libiris/tcp_server.cpp
// Function: TCPServer::start(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int)
bool TCPServer::start(std::string host, int port, int backlog)
{
    /* Open a new socket for the server. */
    if ((parentsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
        perror("Could not open socket.");
        return false;
    }

    /* Can re-run immediately after kill, instead of waiting. */
    optval = 1;
    setsockopt(parentsock, SOL_SOCKET, SO_REUSEADDR,
               (const void *)&optval, sizeof(optval));

    /* Zero out the server_addr. */
    bzero((char *) &server_addr, sizeof(server_addr));

    server_addr.sin_family = AF_INET;
    /* Let the system figure out our IP address. */
    server_addr.sin_addr.s_addr = htonl(INADDR_ANY);
    server_addr.sin_port = htons((unsigned short) port);

    /* Bind to the port. */
    if (bind(parentsock,
             (struct sockaddr *) &server_addr,
             sizeof(server_addr)) < 0) {
        perror("Could not bind.");
        return false;
    }

    /* Listen on the port with a backlog of up to backlog connections. */
    if (listen(parentsock, backlog) < 0) {
        perror("Could not listen.");
        return false;
    }

    /* Make the loop thread runnable. */
    *running = true;

    /* Start the loop! Go! */
    loop_thread = new std::thread([=] { serve_loop(); });
    return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebp
movl %edx, %r14d
movq %rdi, %rbx
pushq $0x2
popq %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x2050
movl %eax, 0x4(%rbx)
testl %eax, %eax
js 0x2570
movl $0x1, (%rbx)
pushq $0x1
popq %rsi
pushq $0x2
popq %rdx
pushq $0x4
popq %r8
movl %eax, %edi
movq %rbx, %rcx
callq 0x2260
leaq 0x8(%rbx), %rsi
andq $0x0, 0x10(%rbx)
movw $0x2, 0x8(%rbx)
andl $0x0, 0xc(%rbx)
rolw $0x8, %r14w
movw %r14w, 0xa(%rbx)
movl 0x4(%rbx), %edi
pushq $0x10
popq %rdx
callq 0x2040
testl %eax, %eax
js 0x2579
movl 0x4(%rbx), %edi
movl %ebp, %esi
callq 0x21e0
testl %eax, %eax
js 0x2582
movq 0x58(%rbx), %rax
movb $0x1, %cl
xchgb %cl, (%rax)
pushq $0x8
popq %rdi
callq 0x21c0
movq %rax, %r14
andq $0x0, (%rax)
pushq $0x10
popq %rdi
callq 0x21c0
leaq 0x27e0(%rip), %rcx      # 0x4d18
movq %rcx, (%rax)
movq %rbx, 0x8(%rax)
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %r14, %rdi
xorl %edx, %edx
callq 0x2190
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2561
movq (%rdi), %rax
callq *0x8(%rax)
movq %r14, 0x60(%rbx)
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xa8d(%rip), %rdi       # 0x3004
jmp 0x2589
leaq 0xa9b(%rip), %rdi       # 0x301b
jmp 0x2589
leaq 0xaa2(%rip), %rdi       # 0x302b
callq 0x2170
xorl %eax, %eax
jmp 0x2567
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x25aa
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x25aa
movq %rax, %rbx
pushq $0x8
popq %rsi
movq %r14, %rdi
callq 0x21d0
movq %rbx, %rdi
callq 0x2250
nop
// File: /workspace/github_cpp_makefile_star2_O2/TheiaRT[P]libiris/tcp_server.cpp
// Function: TCPServer::serve_loop()
bool TCPServer::serve_loop()
{
    client_len = sizeof(client_addr);
    std::vector<std::thread *> threads;

    /* While we haven't called ::stop()... */
    while (*running == true) {
        int child_sock = accept(parentsock,
                                (struct sockaddr *) &client_addr,
                                (socklen_t *) &client_len);
        if (child_sock < 0) {
            perror("Could not accept.");
            continue;
        }

        std::thread *tp = new std::thread(
            [=](int sock) {
                dispatch_handler(sock);
            },
            child_sock
        );
        threads.push_back(tp);
    }

    for (std::thread *tp : threads) {
        delete tp;
    }

    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x30(%rdi), %r14
movl $0x10, 0x30(%rdi)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rax
andq $0x0, 0x10(%rax)
movaps %xmm0, (%rax)
leaq 0x18(%rdi), %r12
leaq 0x30(%rsp), %r13
movq 0x58(%rbx), %rax
movb (%rax), %al
testb $0x1, %al
je 0x2693
movl 0x4(%rbx), %edi
movq %r12, %rsi
movq %r14, %rdx
callq 0x2070
movl %eax, %ebp
testl %eax, %eax
js 0x2682
pushq $0x8
popq %rdi
callq 0x21c0
movq %rax, %r15
andq $0x0, (%rax)
pushq $0x18
popq %rdi
callq 0x21c0
leaq 0x271b(%rip), %rcx      # 0x4d58
movq %rcx, (%rax)
movl %ebp, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq %rax, 0x8(%rsp)
movq %r15, %rdi
leaq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0x2190
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x266b
movq (%rdi), %rax
callq *0x8(%rax)
movq %r15, 0x30(%rsp)
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x29ba
jmp 0x25fd
leaq 0x9b4(%rip), %rdi       # 0x303d
callq 0x2170
jmp 0x25fd
movq 0x10(%rsp), %r15
movq 0x18(%rsp), %r12
pushq $0x8
popq %rbx
cmpq %r12, %r15
je 0x26c6
movq (%r15), %r14
testq %r14, %r14
je 0x26b5
movq %r14, %rdi
callq 0x29ac
movq %r14, %rdi
movq %rbx, %rsi
callq 0x21d0
addq $0x8, %r15
jmp 0x26a0
leaq 0x10(%rsp), %rdi
callq 0x2a2c
movb $0x1, %al
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x26f9
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x26f9
movq (%rdi), %rax
callq *0x8(%rax)
pushq $0x8
popq %rsi
movq %r15, %rdi
callq 0x21d0
jmp 0x270b
jmp 0x2708
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2a2c
movq %rbx, %rdi
callq 0x2250
nop
// File: /workspace/github_cpp_makefile_star2_O2/TheiaRT[P]libiris/tcp_server.cpp
// Function: TCPServer::dispatch_handler(int)
bool TCPServer::dispatch_handler(int client)
{
    std::string req = "";
    if (read_from_sock(client, req, timeout_microsec) == false) {
        /* No failure/recovery plan yet. */
        perror("read_from_sock failed.");
        return false;
    }

    /* Handle the client's request. */
    std::string response = handler(req);

    /* Write some response back. */
    int nwritten = send(client, response.c_str(), response.length(), 0);
    if (nwritten < 0 || nwritten != response.length()) {
        perror("Could not write to socket.");
        return false;
    }

    close(client);
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %esi, %ebx
movq %rdi, (%rsp)
leaq 0xac2(%rip), %rsi       # 0x31fe
leaq 0x18(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0x29d8
movq $0x1, 0x8(%rsp)
andq $0x0, 0x10(%rsp)
xorl %eax, %eax
cmpq $0x10, %rax
je 0x276d
andq $0x0, 0x58(%rsp,%rax,8)
incq %rax
jmp 0x275c
pushq $0x40
popq %rcx
movl %ebx, %eax
cltd
idivl %ecx
movslq %eax, %rdx
shll $0x6, %eax
movl %ebx, %ecx
subl %eax, %ecx
pushq $0x1
popq %rax
shlq %cl, %rax
orq %rax, 0x58(%rsp,%rdx,8)
movl $0x400, %edi            # imm = 0x400
callq 0x2030
movq %rax, %r15
movl $0x400, %edx            # imm = 0x400
movq %rax, %rdi
xorl %esi, %esi
callq 0x2120
leal 0x1(%rbx), %ebp
leaq 0x58(%rsp), %r13
leaq 0x8(%rsp), %r12
leaq 0x18(%rsp), %r14
movl %ebp, %edi
movq %r13, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r12, %r8
callq 0x21a0
testl %eax, %eax
js 0x28a5
je 0x2808
movl $0x3ff, %edx            # imm = 0x3FF
movl %ebx, %edi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x2080
testl %eax, %eax
jle 0x28ae
movq %r14, %rdi
movq %r15, %rsi
callq 0x2280
movl $0x400, %edx            # imm = 0x400
movq %r15, %rdi
xorl %esi, %esi
callq 0x2120
jmp 0x27b8
movq %r15, %rdi
callq 0x21f0
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x2210
movq (%rsp), %rsi
addq $0x38, %rsi
leaq 0x58(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x2a14
leaq 0x38(%rsp), %rdi
callq 0x20d0
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
movl %ebx, %edi
xorl %ecx, %ecx
callq 0x2100
testl %eax, %eax
js 0x2895
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpq 0x60(%rsp), %rax
jne 0x2895
movb $0x1, %bpl
movl %ebx, %edi
callq 0x2290
leaq 0x58(%rsp), %rdi
callq 0x20d0
leaq 0x18(%rsp), %rdi
callq 0x20d0
movl %ebp, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7ca(%rip), %rdi       # 0x3066
callq 0x2170
xorl %ebp, %ebp
jmp 0x286d
leaq 0x7d5(%rip), %rdi       # 0x3081
jmp 0x28b5
leaq 0x7db(%rip), %rdi       # 0x3090
callq 0x2170
leaq 0x78e(%rip), %rdi       # 0x304f
callq 0x2170
xorl %ebp, %ebp
jmp 0x2877
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
jmp 0x28e0
jmp 0x28e7
jmp 0x28e7
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x20d0
jmp 0x28ea
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O2/TheiaRT[P]libiris/sampleserver.cpp
// Function: main
int main() {
    TCPServer *server = new TCPServer(reverse_request);
    if (server->start("localhost", 8000) == false) {
        std::cerr << "Could not start server." << std::endl;
        return 1;
    }
    std::cerr << "Listening on localhost:8000..." << std::endl;
    while (1) {
        sleep(1);
    }
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
pushq $0x68
popq %rdi
callq 0x21c0
leaq 0x28(%rsp), %rsi
andq $0x0, 0x8(%rsi)
movq %rax, %rbx
leaq -0x5c(%rip), %rax       # 0x2c3c
movq %rax, (%rsi)
leaq 0xf6(%rip), %rax        # 0x2d98
movq %rax, 0x18(%rsi)
leaq 0xf9(%rip), %rax        # 0x2da6
movq %rax, 0x10(%rsi)
movl $0x186a0, %edx          # imm = 0x186A0
movq %rbx, %rdi
callq 0x23fa
leaq 0x28(%rsp), %rdi
callq 0x2984
leaq 0x4ef(%rip), %rsi       # 0x31be
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x29d8
leaq 0x8(%rsp), %rsi
pushq $0x5
popq %rcx
movq %rbx, %rdi
movl $0x1f40, %edx           # imm = 0x1F40
callq 0x2496
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x20d0
movq 0x22ea(%rip), %rdi      # 0x4ff0
testb %bl, %bl
je 0x2d2a
leaq 0x4cf(%rip), %rsi       # 0x31e0
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
pushq $0x1
popq %rbx
movl %ebx, %edi
callq 0x2140
jmp 0x2d21
leaq 0x497(%rip), %rsi       # 0x31c8
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
pushq $0x1
popq %rax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x20d0
jmp 0x2d75
movq %rax, %r14
jmp 0x2d75
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x2984
pushq $0x68
popq %rsi
movq %rbx, %rdi
callq 0x21d0
movq %r14, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O2/marxn[P]pupp/3rdparty/gmp/./mini-gmp/mini-gmp.c
// Function: mp_get_memory_functions
void
mp_get_memory_functions (void *(**alloc_func) (size_t),
			 void *(**realloc_func) (void *, size_t, size_t),
			 void (**free_func) (void *, size_t))
{
  if (alloc_func)
    *alloc_func = gmp_allocate_func;

  if (realloc_func)
    *realloc_func = gmp_reallocate_func;

  if (free_func)
    *free_func = gmp_free_func;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x121f
movq 0xde7c(%rip), %rax      # 0xf098
movq %rax, (%rdi)
testq %rsi, %rsi
je 0x122e
movq 0xde75(%rip), %rax      # 0xf0a0
movq %rax, (%rsi)
testq %rdx, %rdx
je 0x123d
movq 0xde6e(%rip), %rax      # 0xf0a8
movq %rax, (%rdx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/marxn[P]pupp/3rdparty/gmp/./mini-gmp/mini-gmp.c
// Function: mp_set_memory_functions
void
mp_set_memory_functions (void *(*alloc_func) (size_t),
			 void *(*realloc_func) (void *, size_t, size_t),
			 void (*free_func) (void *, size_t))
{
  if (!alloc_func)
    alloc_func = gmp_default_alloc;
  if (!realloc_func)
    realloc_func = gmp_default_realloc;
  if (!free_func)
    free_func = gmp_default_free;

  gmp_allocate_func = alloc_func;
  gmp_reallocate_func = realloc_func;
  gmp_free_func = free_func;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
leaq 0x37(%rip), %rax        # 0x1284
cmovneq %rdi, %rax
testq %rsi, %rsi
leaq 0x69(%rip), %rcx        # 0x12c4
cmovneq %rsi, %rcx
testq %rdx, %rdx
leaq 0x7a(%rip), %rsi        # 0x12e3
cmovneq %rdx, %rsi
movq %rax, 0xde24(%rip)      # 0xf098
movq %rcx, 0xde25(%rip)      # 0xf0a0
movq %rsi, 0xde26(%rip)      # 0xf0a8
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/marxn[P]pupp/3rdparty/gmp/./mini-gmp/mini-gmp.c
// Function: gmp_default_alloc
static void *
gmp_default_alloc (size_t size)
{
  void *p;

  assert (size > 0);

  p = malloc (size);
  if (!p)
    gmp_die("gmp_default_alloc: Virtual memory exhausted.");

  return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x1299
callq 0x10b0
testq %rax, %rax
je 0x12b8
popq %rbp
retq
leaq 0x90f4(%rip), %rdi      # 0xa394
leaq 0x7dbd(%rip), %rsi      # 0x9064
leaq 0x8c64(%rip), %rcx      # 0x9f12
movl $0xff, %edx
callq 0x1090
leaq 0x8c73(%rip), %rdi      # 0x9f32
callq 0x4fde
// File: /workspace/github_cpp_makefile_star2_O2/marxn[P]pupp/3rdparty/gmp/./mini-gmp/mini-gmp.c
// Function: mpn_cmp
int
mpn_cmp (mp_srcptr ap, mp_srcptr bp, mp_size_t n)
{
  while (--n >= 0)
    {
      if (ap[n] != bp[n])
	return ap[n] > bp[n] ? 1 : -1;
    }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdx, %rdx
jle 0x1350
movq -0x8(%rdi,%rdx,8), %rcx
movq -0x8(%rsi,%rdx,8), %r8
decq %rdx
cmpq %r8, %rcx
je 0x132c
xorl %eax, %eax
cmpq %rcx, %r8
adcl $-0x1, %eax
orl $0x1, %eax
jmp 0x1352
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/marxn[P]pupp/3rdparty/gmp/./mini-gmp/mini-gmp.c
// Function: mpn_add_1
mp_limb_t
mpn_add_1 (mp_ptr rp, mp_srcptr ap, mp_size_t n, mp_limb_t b)
{
  mp_size_t i;

  assert (n > 0);
  i = 0;
  do
    {
      mp_limb_t r = ap[i] + b;
      /* Carry out */
      b = (r < b);
      rp[i] = r;
    }
  while (++i < n);

  return b;
}

// Assembly:
testq %rdx, %rdx
jle 0x13c8
xorl %eax, %eax
addq (%rsi,%rax,8), %rcx
setb %r8b
movq %rcx, (%rdi,%rax,8)
xorl %ecx, %ecx
movb %r8b, %cl
incq %rax
cmpq %rax, %rdx
jne 0x13ab
movq %rcx, %rax
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x8ded(%rip), %rdi      # 0xa1c0
leaq 0x7c8a(%rip), %rsi      # 0x9064
leaq 0x7c99(%rip), %rcx      # 0x907a
movl $0x18f, %edx            # imm = 0x18F
callq 0x1090
// File: /workspace/github_cpp_makefile_star2_O2/marxn[P]pupp/3rdparty/gmp/./mini-gmp/mini-gmp.c
// Function: mpn_add_n
mp_limb_t
mpn_add_n (mp_ptr rp, mp_srcptr ap, mp_srcptr bp, mp_size_t n)
{
  mp_size_t i;
  mp_limb_t cy;

  for (i = 0, cy = 0; i < n; i++)
    {
      mp_limb_t a, b, r;
      a = ap[i]; b = bp[i];
      r = a + cy;
      cy = (r < cy);
      r += b;
      cy += (r < b);
      rp[i] = r;
    }
  return cy;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
testq %rcx, %rcx
cmovleq %rax, %rcx
xorl %r8d, %r8d
cmpq %r8, %rcx
je 0x1426
movq (%rsi,%r8,8), %r9
leaq (%rax,%r9), %r10
xorl %r11d, %r11d
addq (%rdx,%r8,8), %r10
setb %r11b
addq %r9, %rax
adcq $0x0, %r11
movq %r10, (%rdi,%r8,8)
incq %r8
movq %r11, %rax
jmp 0x13fb
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/marxn[P]pupp/3rdparty/gmp/./mini-gmp/mini-gmp.c
// Function: mpn_add
mp_limb_t
mpn_add (mp_ptr rp, mp_srcptr ap, mp_size_t an, mp_srcptr bp, mp_size_t bn)
{
  mp_limb_t cy;

  assert (an >= bn);

  cy = mpn_add_n (rp, ap, bp, bn);
  if (an > bn)
    cy = mpn_add_1 (rp + bn, ap + bn, an - bn, cy);
  return cy;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpq %r8, %rdx
jl 0x1478
movq %r8, %r14
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq %rcx, %rdx
movq %r8, %rcx
callq 0x13eb
subq %r14, %rbx
jle 0x146f
leaq (%r12,%r14,8), %rdi
leaq (%r15,%r14,8), %rsi
movq %rbx, %rdx
movq %rax, %rcx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x13a4
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7c38(%rip), %rdi      # 0x90b7
leaq 0x7bde(%rip), %rsi      # 0x9064
leaq 0x7c33(%rip), %rcx      # 0x90c0
movl $0x1b5, %edx            # imm = 0x1B5
callq 0x1090
// File: /workspace/github_cpp_makefile_star2_O2/marxn[P]pupp/3rdparty/gmp/./mini-gmp/mini-gmp.c
// Function: mpn_sub_1
mp_limb_t
mpn_sub_1 (mp_ptr rp, mp_srcptr ap, mp_size_t n, mp_limb_t b)
{
  mp_size_t i;

  assert (n > 0);

  i = 0;
  do
    {
      mp_limb_t a = ap[i];
      /* Carry out */
      mp_limb_t cy = a < b;;
      rp[i] = a - b;
      b = cy;
    }
  while (++i < n);

  return b;
}

// Assembly:
testq %rdx, %rdx
jle 0x14be
xorl %eax, %eax
movq (%rsi,%rax,8), %r8
subq %rcx, %r8
setb %r9b
xorl %ecx, %ecx
movb %r9b, %cl
movq %r8, (%rdi,%rax,8)
incq %rax
cmpq %rax, %rdx
jne 0x149e
movq %rcx, %rax
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x8cf7(%rip), %rdi      # 0xa1c0
leaq 0x7b94(%rip), %rsi      # 0x9064
leaq 0x7c2f(%rip), %rcx      # 0x9106
movl $0x1c2, %edx            # imm = 0x1C2
callq 0x1090
// File: /workspace/github_cpp_makefile_star2_O2/marxn[P]pupp/3rdparty/gmp/./mini-gmp/mini-gmp.c
// Function: mpn_sub_n
mp_limb_t
mpn_sub_n (mp_ptr rp, mp_srcptr ap, mp_srcptr bp, mp_size_t n)
{
  mp_size_t i;
  mp_limb_t cy;

  for (i = 0, cy = 0; i < n; i++)
    {
      mp_limb_t a, b;
      a = ap[i]; b = bp[i];
      b += cy;
      cy = (b < cy);
      cy += (a < b);
      rp[i] = a - b;
    }
  return cy;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
testq %rcx, %rcx
cmovleq %rax, %rcx
xorl %r8d, %r8d
cmpq %r8, %rcx
je 0x1518
movq (%rsi,%r8,8), %r9
xorl %r10d, %r10d
addq (%rdx,%r8,8), %rax
setb %r10b
subq %rax, %r9
adcq $0x0, %r10
movq %r9, (%rdi,%r8,8)
incq %r8
movq %r10, %rax
jmp 0x14f1
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/marxn[P]pupp/3rdparty/gmp/./mini-gmp/mini-gmp.c
// Function: mpn_sub
mp_limb_t
mpn_sub (mp_ptr rp, mp_srcptr ap, mp_size_t an, mp_srcptr bp, mp_size_t bn)
{
  mp_limb_t cy;

  assert (an >= bn);

  cy = mpn_sub_n (rp, ap, bp, bn);
  if (an > bn)
    cy = mpn_sub_1 (rp + bn, ap + bn, an - bn, cy);
  return cy;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpq %r8, %rdx
jl 0x156a
movq %r8, %r14
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq %rcx, %rdx
movq %r8, %rcx
callq 0x14e1
subq %r14, %rbx
jle 0x1561
leaq (%r12,%r14,8), %rdi
leaq (%r15,%r14,8), %rsi
movq %rbx, %rdx
movq %rax, %rcx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1497
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7b46(%rip), %rdi      # 0x90b7
leaq 0x7aec(%rip), %rsi      # 0x9064
leaq 0x7bc4(%rip), %rcx      # 0x9143
movl $0x1e9, %edx            # imm = 0x1E9
callq 0x1090