LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/CoinXu[P]reviser-compiler/src/compiler/descriptor.cpp
// Function: reviser::compiler::Descriptor::FindEnumContextVariableById(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Enum* Descriptor::FindEnumContextVariableById(string id) {
    ContextVariable* variable = FindContextVariableById(id);
    if (!variable) {
      return nullptr;
    }

    if (variable->type == DECLARE_ENUM) {
      return variable->node.e;
    }

    return nullptr;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq -0x30(%rbp), %r14
movq %r14, %rdi
callq 0x35470
movq %rbx, %rdi
movq %r14, %rsi
callq 0x41122
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x35180
testq %rbx, %rbx
je 0x41368
cmpl $0x0, 0x20(%rbx)
je 0x4136c
xorl %eax, %eax
jmp 0x41370
movq 0x28(%rbx), %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x355f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/CoinXu[P]reviser-compiler/src/compiler/descriptor.cpp
// Function: reviser::compiler::Descriptor::EnumInlcudeProperty(reviser::ast::Enum*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool Descriptor::EnumInlcudeProperty(Enum* e, string name) {
    if (!e) {
      return false;
    }

    for (auto item : e->properties) {
      if (item->id->text == name) {
        return true;
      }
    }

    return false;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rsi, %rsi
je 0x413cf
movq %rdx, %rbx
movq 0x38(%rsi), %r15
movq 0x40(%rsi), %r12
cmpq %r12, %r15
setne %r14b
je 0x413d2
movq (%r15), %rax
movq 0x30(%rax), %rdi
addq $0x8, %rdi
movq %rbx, %rsi
callq 0x39c78
addq $0x8, %r15
testb %al, %al
je 0x413a9
jmp 0x413d2
xorl %r14d, %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/CoinXu[P]reviser-compiler/src/compiler/descriptor.cpp
// Function: reviser::compiler::Descriptor::FindStructContextVariableById(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Struct* Descriptor::FindStructContextVariableById(string id) {
    ContextVariable* variable = FindContextVariableById(id);
    if (!variable) {
      return nullptr;
    }

    if (variable->type == DECLARE_STRUCT) {
      return variable->node.s;
    }

    return nullptr;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq -0x30(%rbp), %r14
movq %r14, %rdi
callq 0x35470
movq %rbx, %rdi
movq %r14, %rsi
callq 0x41122
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x35180
testq %rbx, %rbx
je 0x41420
cmpl $0x1, 0x20(%rbx)
jne 0x41420
movq 0x28(%rbx), %rax
jmp 0x41422
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x355f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/CoinXu[P]reviser-compiler/src/compiler/descriptor.cpp
// Function: reviser::compiler::Descriptor::StructIncludeProperty(reviser::ast::Struct*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool Descriptor::StructIncludeProperty(Struct* s, string id) {
    if (!s) {
      return false;
    }

    for (auto item : s->properties) {
      if (item->declare->id->text == id) {
        return true;
      }
    }

    return false;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rsi, %rsi
je 0x41485
movq %rdx, %rbx
movq 0x38(%rsi), %r15
movq 0x40(%rsi), %r12
cmpq %r12, %r15
setne %r14b
je 0x41488
movq (%r15), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rdi
addq $0x8, %rdi
movq %rbx, %rsi
callq 0x39c78
addq $0x8, %r15
testb %al, %al
je 0x4145b
jmp 0x41488
xorl %r14d, %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/CoinXu[P]reviser-compiler/src/compiler/descriptor.cpp
// Function: reviser::compiler::Descriptor::AddGlobalVariableOnce(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, reviser::compiler::DeclareType)
void Descriptor::AddGlobalVariableOnce(string variable, DeclareType type) {
    for (auto it: global_variables_) {
      if (it.id == variable) {
        return;
      }
    }
    global_variables_.push_back({ variable, type });
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, -0x2c(%rbp)
movq %rsi, %r15
leaq 0x18(%rdi), %rax
movq %rax, -0x38(%rbp)
movq 0x18(%rdi), %r12
movq 0x20(%rdi), %r14
leaq -0x60(%rbp), %r13
cmpq %r14, %r12
je 0x41568
movq %r13, %rdi
movq %r12, %rsi
callq 0x418c4
movq %r13, %rdi
movq %r15, %rsi
callq 0x39c78
movl %eax, %ebx
movq %r13, %rdi
callq 0x35180
addq $0x28, %r12
testb %bl, %bl
je 0x41539
jmp 0x41592
leaq -0x60(%rbp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x35470
movl -0x2c(%rbp), %eax
movl %eax, 0x20(%rbx)
movq -0x38(%rbp), %rdi
movq %rbx, %rsi
callq 0x42232
leaq -0x60(%rbp), %rdi
callq 0x35180
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x355f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/CoinXu[P]reviser-compiler/src/compiler/descriptor.cpp
// Function: bool reviser::compiler::VectorIncludeItem<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const*)
bool VectorIncludeItem(vector<T>* v, const T* item) {
    for (auto it: *v) {
      if (it == *item) {
        return true;
      }
    }
    return false;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %r13
leaq -0x48(%rbp), %r14
movq %rax, %r15
cmpq %r13, %rax
je 0x418ae
movq %r14, %rdi
movq %r15, %rsi
callq 0x35470
movq %r14, %rdi
movq %rbx, %rsi
callq 0x39c78
movl %eax, %r12d
movq %r14, %rdi
callq 0x35180
leaq 0x20(%r15), %rax
testb %r12b, %r12b
je 0x4187c
cmpq %r13, %r15
setne %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/CoinXu[P]reviser-compiler/src/io/path.cpp
// Function: reviser::io::join(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>> const&)
string join(const string& a, const string& b) {
    string temp_a = a;
    string temp_b = b;
    if (temp_a.back() != separator) {
      temp_a += separator;
    }

    if (temp_b.front() != separator) {
      temp_b = separator + temp_b;
    }

    return normalize(temp_a + temp_b);
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq -0x50(%rbp), %rdi
callq 0x35470
leaq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0x35470
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rcx
cmpb $0x2f, -0x1(%rax,%rcx)
je 0x4256d
leaq -0x50(%rbp), %rdi
pushq $0x2f
popq %rsi
callq 0x352c0
movq -0x30(%rbp), %rax
cmpb $0x2f, (%rax)
je 0x4259e
leaq -0x70(%rbp), %rdi
pushq $0x2f
popq %rsi
leaq -0x30(%rbp), %rdx
callq 0x42828
leaq -0x30(%rbp), %rdi
leaq -0x70(%rbp), %r14
movq %r14, %rsi
callq 0x35400
movq %r14, %rdi
callq 0x35180
leaq -0x70(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x42892
leaq -0x70(%rbp), %rsi
movq %rbx, %rdi
callq 0x42616
leaq -0x70(%rbp), %rdi
callq 0x35180
leaq -0x30(%rbp), %rdi
callq 0x35180
leaq -0x50(%rbp), %rdi
callq 0x35180
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x425f4
jmp 0x425f4
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x35180
jmp 0x425f7
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x35180
jmp 0x42605
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x355f0
// File: /workspace/github_cpp_makefile_star2_O2/CoinXu[P]reviser-compiler/src/io/path.cpp
// Function: reviser::io::normalize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string normalize(const string& path) {
    string result = path;
    size_t index = 0;
    while (index < result.length()) {
      if (result[index] == separator && result[index + 1] == separator) {
        result.erase(index, 1);
        continue;
      }
      index++;
    }

    if (result.back() == separator) {
      result.erase(result.length() - 1, 1);
    }

    return result;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x35470
xorl %r14d, %r14d
pushq $0x1
popq %r15
movq (%rbx), %rax
movq 0x8(%rbx), %rsi
cmpq %rsi, %r14
jae 0x4265f
cmpb $0x2f, (%rax,%r14)
jne 0x4265a
cmpb $0x2f, 0x1(%rax,%r14)
jne 0x4265a
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x35090
jmp 0x4262f
incq %r14
jmp 0x4262f
cmpb $0x2f, -0x1(%rax,%rsi)
jne 0x42674
decq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x35090
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x42684
movq %rax, %r14
movq %rbx, %rdi
callq 0x35180
movq %r14, %rdi
callq 0x355f0
// File: /workspace/github_cpp_makefile_star2_O2/CoinXu[P]reviser-compiler/src/io/path.cpp
// Function: reviser::io::mkdir_parents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
bool mkdir_parents(const string& path, int mode) {
    int size = 0;
    string current;
    while (size < path.size()) {
      current.push_back(path[size++]);
      if (current.back() == separator) {
        if (!is_dir(current)) {
          if (mkdir(current.c_str(), mode) == -1) {
            return false;
          }
        }
      }
    }

    return true;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebx
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq %rdi, %r14
movb $0x0, (%rax)
xorl %r12d, %r12d
leaq -0x48(%rbp), %r15
movq 0x8(%r14), %r13
cmpq %r12, %r13
jbe 0x427f4
movq (%r14), %rax
movsbl (%rax,%r12), %esi
movq %r15, %rdi
callq 0x352c0
movq -0x48(%rbp), %rax
movq -0x40(%rbp), %rcx
cmpb $0x2f, -0x1(%rax,%rcx)
jne 0x427ef
movq %r15, %rdi
callq 0x4273b
testb %al, %al
jne 0x427ef
movq -0x48(%rbp), %rdi
movl %ebx, %esi
callq 0x35190
cmpl $-0x1, %eax
je 0x427f4
incq %r12
jmp 0x427ab
cmpq %r12, %r13
setbe %bl
leaq -0x48(%rbp), %rdi
callq 0x35180
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x355f0
// File: /workspace/github_cpp_makefile_star2_O2/CoinXu[P]reviser-compiler/src/io/printer_file.cpp
// Function: reviser::io::PrinterFile::PrinterFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
PrinterFile::PrinterFile(std::string path): path(path) {
    mkdir_parents(path);
    stream.open(path, std::ios::out | std::ios::trunc);
    if (!stream.is_open()) {
      throw std::runtime_error("not found file in path [" + path + "]");
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r12
movq %rdi, %r15
leaq 0x1cc32(%rip), %rax     # 0x6bc70
movq %rax, (%rdi)
leaq 0x8(%rdi), %rbx
movq %rbx, %rdi
callq 0x355b0
leaq 0x208(%r15), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x35470
movq %r12, %rdi
movl $0x1ed, %esi            # imm = 0x1ED
callq 0x4277e
pushq $0x30
popq %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x351b0
addq $0x78, %r15
movq %r15, %rdi
callq 0x350a0
testb %al, %al
je 0x4f099
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x351d0
movq %rax, %r15
leaq 0x988e(%rip), %rsi      # 0x58939
leaq -0x48(%rbp), %rdi
movq %r12, %rdx
callq 0x3aa1e
leaq 0x9954(%rip), %rdx      # 0x58a12
leaq -0x68(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x38f1f
movb $0x1, %r13b
leaq -0x68(%rbp), %rsi
movq %r15, %rdi
callq 0x35560
xorl %r13d, %r13d
movq 0x1cf04(%rip), %rsi     # 0x6bfe8
movq 0x1ce95(%rip), %rdx     # 0x6bf80
movq %r15, %rdi
callq 0x355c0
movq %rax, %r12
leaq -0x68(%rbp), %rdi
callq 0x35180
jmp 0x4f107
movq %rax, %r12
movb $0x1, %r13b
leaq -0x48(%rbp), %rdi
callq 0x35180
testb %r13b, %r13b
jne 0x4f11a
jmp 0x4f12c
movq %rax, %r12
movq %r15, %rdi
callq 0x35290
jmp 0x4f12c
movq %rax, %r12
jmp 0x4f134
movq %rax, %r12
movq %r14, %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x354f0
movq %r12, %rdi
callq 0x355f0
// File: /workspace/github_cpp_makefile_star2_O2/CoinXu[P]reviser-compiler/src/compiler/javascript/javascript_common.h
// Function: reviser::javascript::JavaScriptCommon::Indent[abi:cxx11](int)
const static string Indent(int level) {
      string s;
      for (int i = 0; i < level * IndentSize; i++) {
        s = s + " ";
      }
      return s;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
addl %esi, %esi
xorl %r12d, %r12d
testl %esi, %esi
cmovgl %esi, %r12d
leaq 0x8250(%rip), %r14      # 0x578ac
leaq -0x40(%rbp), %r15
subl $0x1, %r12d
jb 0x4f689
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x3ccf9
movq %rbx, %rdi
movq %r15, %rsi
callq 0x35400
movq %r15, %rdi
callq 0x35180
jmp 0x4f660
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x35180
movq %r14, %rdi
callq 0x355f0
// File: /workspace/github_cpp_makefile_star2_O2/CoinXu[P]reviser-compiler/src/compiler/javascript/javascript_common.h
// Function: reviser::javascript::JavaScriptCommon::JoinVector(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>>>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
const static string JoinVector(vector<string> v, string separator) {
      string result;

      for (vector<string>::const_iterator it = begin(v); it != end(v); it++) {
        result += *it;
        if (next(it) != end(v)) {
          result += separator;
        }
      }

      return result;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rdx, %r14
movq %rsi, %r15
movb $0x0, 0x10(%rdi)
movq (%rsi), %r12
cmpq 0x8(%r15), %r12
je 0x4fe7d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x35670
addq $0x20, %r12
cmpq 0x8(%r15), %r12
je 0x4fe55
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35670
jmp 0x4fe55
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x35180
movq %r14, %rdi
callq 0x355f0
// File: /workspace/github_cpp_makefile_star2_O2/CoinXu[P]reviser-compiler/src/compiler/javascript/javascript_generator.cpp
// Function: reviser::javascript::JavaScriptGenerator::Export[abi:cxx11]()
string JavaScriptGenerator::Export() {
    string code;

    if (descriptor->GlobalVariables().size() == 0) {
      return code;
    }

    code += "export {\n";
    vector<Descriptor::VariableDeclare> variables = descriptor->GlobalVariables();
    for (vector<Descriptor::VariableDeclare>::iterator it = begin(variables); it != end(variables); it++) {
      code += JavaScriptCommon::Indent(1) + (*it).id + (next(it) == end(variables) ? "\n" : ",\n");
    }

    return code += "}";
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
leaq -0x40(%rbp), %r14
movq %r14, -0x10(%r14)
andq $0x0, -0x8(%r14)
movq %rsi, %rbx
movq %rdi, -0x30(%rbp)
movb $0x0, (%r14)
movq 0x50(%rsi), %rsi
leaq -0x88(%rbp), %rdi
callq 0x414ac
leaq -0x88(%rbp), %rdi
movq 0x8(%rdi), %r15
movq (%rdi), %r12
callq 0x4195a
cmpq %r12, %r15
je 0x508b0
leaq 0x82c2(%rip), %rsi      # 0x58aab
leaq -0x50(%rbp), %rdi
callq 0x35640
movq 0x50(%rbx), %rsi
leaq -0x68(%rbp), %rdi
callq 0x414ac
movq -0x68(%rbp), %r14
leaq -0xa8(%rbp), %r15
leaq -0xc8(%rbp), %r13
leaq -0x88(%rbp), %rbx
leaq -0x50(%rbp), %r12
cmpq -0x60(%rbp), %r14
je 0x50885
movq %r15, %rdi
pushq $0x1
popq %rsi
callq 0x4f628
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x42892
addq $0x28, %r14
cmpq -0x60(%rbp), %r14
leaq 0x8163(%rip), %rdx      # 0x589ad
leaq 0x82ed(%rip), %rax      # 0x58b3e
cmoveq %rax, %rdx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x38f1f
movq %r12, %rdi
movq %rbx, %rsi
callq 0x35670
movq %rbx, %rdi
callq 0x35180
movq %r13, %rdi
callq 0x35180
movq %r15, %rdi
callq 0x35180
jmp 0x5081c
leaq 0x6a00(%rip), %rsi      # 0x5728c
leaq -0x50(%rbp), %rdi
callq 0x35640
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x35470
leaq -0x68(%rbp), %rdi
callq 0x4195a
movq -0x30(%rbp), %rbx
jmp 0x508ed
movq -0x30(%rbp), %rbx
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq -0x50(%rbp), %rcx
cmpq %r14, %rcx
je 0x508d1
movq %rcx, (%rbx)
movq -0x40(%rbp), %rax
movq %rax, 0x10(%rbx)
jmp 0x508d8
movups (%r14), %xmm0
movups %xmm0, (%rax)
movq -0x48(%rbp), %rax
movq %rax, 0x8(%rbx)
movq %r14, -0x50(%rbp)
andq $0x0, -0x48(%rbp)
movb $0x0, -0x40(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x35180
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5090f
jmp 0x5090f
movq %rax, %rbx
jmp 0x50955
jmp 0x50916
movq %rax, %rbx
jmp 0x5094c
movq %rax, %rbx
jmp 0x50940
movq %rax, %rbx
jmp 0x50934
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x35180
leaq -0xc8(%rbp), %rdi
callq 0x35180
leaq -0xa8(%rbp), %rdi
callq 0x35180
leaq -0x68(%rbp), %rdi
callq 0x4195a
leaq -0x50(%rbp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x355f0
// File: /workspace/github_cpp_makefile_star2_O2/CoinXu[P]reviser-compiler/src/compiler/javascript/javascript_common.h
// Function: reviser::javascript::JavaScriptCommon::FindReviserSyntaxDefinitionByDataType(reviser::compiler::DataType)
const static vector<ReviserSyntaxDefinition> FindReviserSyntaxDefinitionByDataType(DataType type) {
      vector<ReviserSyntaxDefinition> defs;

      if (JavaScriptDataTypeReviserMap.find(type) == JavaScriptDataTypeReviserMap.end()) {
        return defs;
      }

      for (ReviserType t : JavaScriptDataTypeReviserMap.at(type)) {
        if (ReviserMethodMap.find(t) != ReviserMethodMap.end()) {
          defs.push_back(ReviserMethodMap.at(t));
        }
      }

      return defs;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq -0x38(%rbp), %rax
movl %esi, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, -0x30(%rbp)
andq $0x0, 0x10(%rdi)
leaq 0x1bed5(%rip), %rdi     # 0x6cca8
movq %rax, %rsi
callq 0x5110a
leaq 0x1bece(%rip), %rcx     # 0x6ccb0
cmpq %rcx, %rax
je 0x50e46
leaq 0x1beba(%rip), %rdi     # 0x6cca8
leaq -0x38(%rbp), %rsi
callq 0x5105e
movq (%rax), %r12
movq 0x8(%rax), %r13
leaq 0x1bcfb(%rip), %r14     # 0x6cb00
leaq -0x34(%rbp), %r15
leaq 0x8(%r14), %rbx
cmpq %r13, %r12
je 0x50e46
movl (%r12), %eax
movl %eax, -0x34(%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x51178
cmpq %rbx, %rax
je 0x50e40
movq %r14, %rdi
movq %r15, %rsi
callq 0x510d2
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x51096
addq $0x4, %r12
jmp 0x50e0d
movq -0x30(%rbp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x50e5f
jmp 0x50e5f
jmp 0x50e5f
movq %rax, %r14
movq -0x30(%rbp), %rdi
callq 0x50ede
movq %r14, %rdi
callq 0x355f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/CoinXu[P]reviser-compiler/src/compiler/javascript/javascript_struct.cpp
// Function: reviser::javascript::JavaScriptDecorater::Generate[abi:cxx11]()
string JavaScriptDecorater::Generate() {
    if (ReviserSyntaxBuildIn.find(node->id->text) == ReviserSyntaxBuildIn.end()) {
      return "";
    }

    return JavaScriptCommon::Indent(node->level + 1)
      + "@"
      + JavaScriptCommon::DecoraterDefinition(ReviserSyntaxBuildIn.at(node->id->text))
      + "\n";
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rsi), %rax
movq 0x30(%rax), %rsi
addq $0x8, %rsi
leaq 0x19c8b(%rip), %r15     # 0x6cad0
movq %r15, %rdi
callq 0x51846
addq $0x8, %r15
cmpq %r15, %rax
je 0x52f17
movq 0x20(%r14), %rax
movl 0x8(%rax), %esi
incl %esi
leaq -0x98(%rbp), %r15
movq %r15, %rdi
callq 0x4f628
leaq 0x5d2b(%rip), %rdx      # 0x58ba4
leaq -0x78(%rbp), %rdi
movq %r15, %rsi
callq 0x3ccf9
movq 0x20(%r14), %rax
movq 0x30(%rax), %rsi
addq $0x8, %rsi
leaq 0x19c38(%rip), %rdi     # 0x6cad0
callq 0x50d04
leaq -0xd8(%rbp), %rdi
movq %rax, %rsi
callq 0x406a8
leaq -0x58(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
xorl %edx, %edx
callq 0x52fde
leaq -0x38(%rbp), %rdi
leaq -0x78(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x38ef6
leaq 0x5c68(%rip), %rdx      # 0x58b3e
leaq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0x38f1f
leaq -0x38(%rbp), %rdi
callq 0x35180
leaq -0x58(%rbp), %rdi
callq 0x35180
leaq -0xd8(%rbp), %rdi
callq 0x4062c
leaq -0x78(%rbp), %rdi
callq 0x35180
leaq -0x98(%rbp), %rdi
callq 0x35180
jmp 0x52f2a
leaq 0x5c21(%rip), %rsi      # 0x58b3f
leaq -0x38(%rbp), %rdx
movq %rbx, %rdi
callq 0x35130
movq %rbx, %rax
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x35180
jmp 0x52f4c
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x35180
jmp 0x52f5a
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x4062c
jmp 0x52f70
movq %rax, %rbx
jmp 0x52f79
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x35180
leaq -0x98(%rbp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x355f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/CoinXu[P]reviser-compiler/src/compiler/javascript/javascript_common.h
// Function: reviser::javascript::JavaScriptCommon::DecoraterDefinition[abi:cxx11](reviser::compiler::ReviserSyntaxDefinition, std::vector<reviser::compiler::DecoraterArg, std::allocator<reviser::compiler::DecoraterArg>>*)
const static string DecoraterDefinition(ReviserSyntaxDefinition def, vector<DecoraterArg>* args = nullptr) {
      switch (def.type) {
        case SYNTAX_FUNCTION:
          return def.name;

        case SYNTAX_CALLABLE:
          return DecoraterSyntaxCallable(def, args);

        default:
          return "";
      }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movl 0x20(%rsi), %eax
testl %eax, %eax
je 0x53004
cmpl $0x1, %eax
jne 0x5302c
movq %rbx, %rdi
callq 0x35470
jmp 0x5303f
movq %rdx, %r14
leaq -0x60(%rbp), %r15
movq %r15, %rdi
callq 0x406a8
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x53124
leaq -0x60(%rbp), %rdi
callq 0x4062c
jmp 0x5303f
leaq 0x5b0c(%rip), %rsi      # 0x58b3f
leaq -0x19(%rbp), %rdx
movq %rbx, %rdi
callq 0x35130
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x4062c
movq %rbx, %rdi
callq 0x355f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/CoinXu[P]reviser-compiler/src/compiler/typescript/typescript_common.h
// Function: reviser::typescript::TypeScriptCommon::FindReviserSyntaxDefinitionByDataType(reviser::compiler::DataType)
const static vector<ReviserSyntaxDefinition> FindReviserSyntaxDefinitionByDataType(DataType type) {
      vector<ReviserSyntaxDefinition> defs;

      if (TypeScriptDataTypeReviserMap.find(type) == TypeScriptDataTypeReviserMap.end()) {
        return defs;
      }

      for (ReviserType t : TypeScriptDataTypeReviserMap.at(type)) {
        if (ReviserMethodMap.find(t) != ReviserMethodMap.end()) {
          defs.push_back(ReviserMethodMap.at(t));
        }
      }

      return defs;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq -0x38(%rbp), %rax
movl %esi, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, -0x30(%rbp)
andq $0x0, 0x10(%rdi)
leaq 0x17877(%rip), %rdi     # 0x6ce08
movq %rax, %rsi
callq 0x5110a
leaq 0x17870(%rip), %rcx     # 0x6ce10
cmpq %rcx, %rax
je 0x55604
leaq 0x1785c(%rip), %rdi     # 0x6ce08
leaq -0x38(%rbp), %rsi
callq 0x5105e
movq (%rax), %r12
movq 0x8(%rax), %r13
leaq 0x1753d(%rip), %r14     # 0x6cb00
leaq -0x34(%rbp), %r15
leaq 0x8(%r14), %rbx
cmpq %r13, %r12
je 0x55604
movl (%r12), %eax
movl %eax, -0x34(%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x51178
cmpq %rbx, %rax
je 0x555fe
movq %r14, %rdi
movq %r15, %rsi
callq 0x510d2
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x51096
addq $0x4, %r12
jmp 0x555cb
movq -0x30(%rbp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5561d
jmp 0x5561d
jmp 0x5561d
movq %rax, %r14
movq -0x30(%rbp), %rdi
callq 0x50ede
movq %r14, %rdi
callq 0x355f0
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/CoinXu[P]reviser-compiler/src/compiler/typescript/typescript_struct.cpp
// Function: reviser::typescript::TypeScriptDecorater::Generate[abi:cxx11]()
string TypeScriptDecorater::Generate() {
    if (ReviserSyntaxBuildIn.find(node->id->text) == ReviserSyntaxBuildIn.end()) {
      return "";
    }

    return TypeScriptCommon::Indent(node->level + 1)
      + "@"
      + TypeScriptCommon::DecoraterDefinition(ReviserSyntaxBuildIn.at(node->id->text))
      + "\n";
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rsi), %rax
movq 0x30(%rax), %rsi
addq $0x8, %rsi
leaq 0x16557(%rip), %r15     # 0x6cad0
movq %r15, %rdi
callq 0x51846
addq $0x8, %r15
cmpq %r15, %rax
je 0x5664b
movq 0x20(%r14), %rax
movl 0x8(%rax), %esi
incl %esi
leaq -0x98(%rbp), %r15
movq %r15, %rdi
callq 0x53b3a
leaq 0x25f7(%rip), %rdx      # 0x58ba4
leaq -0x78(%rbp), %rdi
movq %r15, %rsi
callq 0x3ccf9
movq 0x20(%r14), %rax
movq 0x30(%rax), %rsi
addq $0x8, %rsi
leaq 0x16504(%rip), %rdi     # 0x6cad0
callq 0x50d04
leaq -0xd8(%rbp), %rdi
movq %rax, %rsi
callq 0x406a8
leaq -0x58(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
xorl %edx, %edx
callq 0x56a74
leaq -0x38(%rbp), %rdi
leaq -0x78(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x38ef6
leaq 0x2534(%rip), %rdx      # 0x58b3e
leaq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0x38f1f
leaq -0x38(%rbp), %rdi
callq 0x35180
leaq -0x58(%rbp), %rdi
callq 0x35180
leaq -0xd8(%rbp), %rdi
callq 0x4062c
leaq -0x78(%rbp), %rdi
callq 0x35180
leaq -0x98(%rbp), %rdi
callq 0x35180
jmp 0x5665e
leaq 0x24ed(%rip), %rsi      # 0x58b3f
leaq -0x38(%rbp), %rdx
movq %rbx, %rdi
callq 0x35130
movq %rbx, %rax
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x35180
jmp 0x56680
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x35180
jmp 0x5668e
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x4062c
jmp 0x566a4
movq %rax, %rbx
jmp 0x566ad
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x35180
leaq -0x98(%rbp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x355f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH16_TemplatesAndGenericProgramming/examples/compare.cc
// Function: main
int main()
{
    // instantiates int compare(const int&, const int&)
    cout << compare(1, 0) << endl;       // T is int

    // instantiates int compare(const vector<int>&, const vector<int>&)
    vector<int> vec1{1, 2, 3};
    vector<int> vec2{4, 5, 6};
    cout << compare(vec1, vec2) << endl; // T is vector<int>

    long l1, l2;
    int i1, i2;
    compare(i1, i2);      // instantiate compare(int, int)
    compare(l1, l2);      // instantiate compare(long, long)
	compare<int>(i1, l2); // uses compare(int, int)
	compare<long>(i1, l2);// uses compare(long, long)

    const char *cp1 = "hi", *cp2 = "world";
    compare(cp1, cp2);          // calls the specialization
    compare<string>(cp1, cp2);  // converts arguments to string

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq 0x2d37(%rip), %rdi      # 0x3fd8
pushq $0x1
popq %rsi
callq 0x1130
movq %rax, %rdi
callq 0x1090
movabsq $0x200000001, %rax      # imm = 0x200000001
leaq -0x78(%rbp), %rbx
movq %rax, (%rbx)
movl $0x3, 0x8(%rbx)
leaq -0x58(%rbp), %rdi
pushq $0x3
popq %r14
leaq -0x98(%rbp), %rcx
movq %rbx, %rsi
movq %r14, %rdx
callq 0x13ee
movabsq $0x500000004, %rax      # imm = 0x500000004
movq %rax, (%rbx)
movl $0x6, 0x8(%rbx)
leaq -0x40(%rbp), %rdi
leaq -0x78(%rbp), %rsi
leaq -0x98(%rbp), %rcx
movq %r14, %rdx
callq 0x13ee
leaq -0x58(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x1424
movq 0x2cb6(%rip), %rdi      # 0x3fd8
movl %eax, %esi
callq 0x1130
movq %rax, %rdi
callq 0x1090
leaq 0xccc(%rip), %rax       # 0x2004
leaq -0x28(%rbp), %rdi
movq %rax, (%rdi)
leaq 0xcc1(%rip), %rax       # 0x2007
leaq -0x20(%rbp), %rsi
movq %rax, (%rsi)
callq 0x1452
movq -0x28(%rbp), %rsi
leaq -0x78(%rbp), %rdi
leaq -0x12(%rbp), %rdx
callq 0x1060
movq -0x20(%rbp), %rsi
leaq -0x98(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x1060
leaq -0x98(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1489
movq %r14, %rdi
callq 0x1080
movq %rbx, %rdi
callq 0x1080
leaq -0x40(%rbp), %rdi
callq 0x1522
leaq -0x58(%rbp), %rdi
callq 0x1522
xorl %eax, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x1080
jmp 0x13d3
jmp 0x13d0
jmp 0x13d0
movq %rax, %rbx
jmp 0x13dc
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x1522
leaq -0x58(%rbp), %rdi
callq 0x1522
movq %rbx, %rdi
callq 0x1140
nop
// File: /workspace/github_cpp_makefile_star2_O2/overfl0[P]iojack/iojack.cpp
// Function: getArgs(int, char**)
int getArgs(int argc, char **argv)
{
    int opt;
    while((opt = getopt(argc, argv, optString)) != -1)
    {
        switch(opt)
        {
            /*case 'p':
                globalArgs.langCode = optarg;
                break;
            */
            case 'a':
                globalSettings.sendANSI = 1;
                break;

            case 'h':
                displayUsage(argv[0]);
                exit(0);

            case '?':
                displayUsage(argv[0]);
                exit(1);
        }
    }

    if(argc <= optind)
    {
        displayUsage(argv[0]);
        exit(1);
    }

    int firstPid = atoi(argv[optind]);
    if(firstPid <= 1)
        pexit("Can't get correct pid from arguments\n");

    return firstPid;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x3c5e(%rip), %r14      # 0x61c9
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2070
cmpl $0x61, %eax
je 0x258e
cmpl $-0x1, %eax
je 0x2597
cmpl $0x3f, %eax
je 0x25b8
cmpl $0x68, %eax
jne 0x256b
jmp 0x25c8
movb $0x1, 0x8c2b(%rip)      # 0xb1c0
jmp 0x256b
movq 0x8a42(%rip), %rax      # 0xafe0
movslq (%rax), %rax
cmpl %ebp, %eax
jge 0x25b8
movq (%rbx,%rax,8), %rdi
callq 0x22d0
cmpl $0x1, %eax
jle 0x25d7
popq %rbx
popq %r14
popq %rbp
retq
movq (%rbx), %rdi
callq 0x253c
pushq $0x1
popq %rdi
callq 0x21f0
movq (%rbx), %rdi
callq 0x253c
xorl %edi, %edi
callq 0x21f0
leaq 0x3c2e(%rip), %rdi      # 0x620c
callq 0x22c0
jmp 0x25c0
// File: /workspace/github_cpp_makefile_star2_O2/overfl0[P]iojack/iojack.cpp
// Function: signal_sigint(int)
void signal_sigint(int sig)
{
    printf("Caught Ctrl+C, exiting... Press a second time to force.\n");

    //(void) signal(SIGINT, SIG_DFL);
    struct sigaction sa;
    memset(&sa, 0, sizeof(struct sigaction));
    sa.sa_handler = SIG_DFL;
    sa.sa_flags = SA_RESTART;

    sigaction(SIGINT, &sa, NULL);

    tryDetachFromProcesses();
}

// Assembly:
pushq %rbx
subq $0xa0, %rsp
leaq 0x3c3d(%rip), %rdi      # 0x6231
callq 0x22c0
leaq 0x8(%rsp), %rbx
movl $0x98, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x20d0
movl $0x10000000, 0x88(%rbx) # imm = 0x10000000
pushq $0x2
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2210
callq 0x2632
addq $0xa0, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/overfl0[P]iojack/iojack.cpp
// Function: tryDetachFromProcesses()
void tryDetachFromProcesses()
{
    wantToExit = 1;

    printf("Trying to detach...\n");
    foreach(processes, it)
    //for(map<pid_t, processInfo*>::iterator it = processes.begin(); it != processes.end(); it++)
    {
        processInfo *pi = it->second;
        printf("Trying send SIGSTOP to pid %d... ", pi->pid);

        // If we're in the middle of faking a system call, we can't detach from this pid
        if(pi->inSyscall && pi->fakingSyscall != -1)
        {
            printf("faking system call. Aborted.\n");
            continue;
        }

        pi->sigstopToDetach = 1;
        int retval = kill(pi->pid, SIGSTOP);
        if(retval)
        {
            printf("Error while sending SIGSTOP to %d\n", pi->pid);
            perror("Error");
        }
        printf("\n");
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x1, 0x8b7d(%rip)      # 0xb1c4
leaq 0x3c1b(%rip), %rdi      # 0x6269
callq 0x22c0
movq 0x8b86(%rip), %r14      # 0xb1e0
leaq 0x8b6f(%rip), %r13      # 0xb1d0
leaq 0x3a40(%rip), %rbx      # 0x60a8
pushq $0x13
popq %rbp
pushq $0xa
popq %r15
cmpq %r13, %r14
je 0x26f1
movq 0x28(%r14), %r12
movl (%r12), %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2040
cmpl $0x0, 0x4(%r12)
je 0x26a4
cmpl $-0x1, 0x8(%r12)
je 0x26a4
leaq 0x3be0(%rip), %rdi      # 0x627d
callq 0x22c0
jmp 0x26c4
movl $0x1, 0xc(%r12)
movl (%r12), %edi
movl %ebp, %esi
callq 0x2260
testl %eax, %eax
jne 0x26d1
movl %r15d, %edi
callq 0x2240
movq %r14, %rdi
callq 0x20f0
movq %rax, %r14
jmp 0x266f
movl (%r12), %esi
leaq 0x393f(%rip), %rdi      # 0x601b
xorl %eax, %eax
callq 0x2040
leaq 0x3954(%rip), %rdi      # 0x603e
callq 0x2130
jmp 0x26bc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/overfl0[P]iojack/iojack.cpp
// Function: setSignalHandlers()
void setSignalHandlers()
{
    struct sigaction sa;
    memset(&sa, 0, sizeof(struct sigaction));

    sa.sa_handler = signal_sigint;
    sa.sa_flags = SA_RESTART;

    sigaction(SIGINT, &sa, NULL);
}

// Assembly:
pushq %rbx
subq $0xa0, %rsp
leaq 0x10(%rsp), %rbx
movl $0x90, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x20d0
leaq -0x13e(%rip), %rax      # 0x25e5
movq %rax, -0x8(%rbx)
movl $0x10000000, 0x80(%rbx) # imm = 0x10000000
pushq $0x2
popq %rdi
leaq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0x2210
addq $0xa0, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/overfl0[P]iojack/iojack.cpp
// Function: stdinPoll(void*)
void *stdinPoll(void *inBuf)
{
    buffer *inputBuffer = (buffer *)inBuf;
    initTerminal();
    while(!wantToExit)
    {
        int c = getTerminalChar();
        if(c != -1)
        {
            // Lock the buffer and read as much data as you can (useful with
            // special sequences of more than one character)
            inputBuffer->lock();
            do
            {
                inputBuffer->add(c);
                c = getTerminalChar();
            }
            while(c != -1);
            inputBuffer->unlock();

            // TODO: Clean up this mess! Possibly move to a separate function
            // Wake up reading processes
            foreach(processes, it)
            {
                if(it->second->inSyscall && it->second->fakingSyscall == -1)
                {
                    //TODO: if possible, check if the syscall is sys_read
                    it->second->sigstopToRestartSyscall = 1;
                    int retval = kill(it->second->pid, SIGSTOP);
                    if(retval)
                    {
                        printf("Error while sending SIGSTOP to %d\n", it->second->pid);
                        perror("Error");
                    }
                }
            }
        }
        //thread_sleep(10);
        struct timespec waitTime;
        waitTime.tv_sec = 0;
        waitTime.tv_nsec = 100000000; // 0.1 sec
        nanosleep(&waitTime, NULL);
    }
    uninitTerminal();

    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0x3893
leaq 0x8(%rsp), %r14
leaq 0x8a65(%rip), %r15      # 0xb1d0
pushq $0x13
popq %rbp
leaq 0x38c9(%rip), %r12      # 0x603e
cmpl $0x0, 0x8a48(%rip)      # 0xb1c4
jne 0x2835
callq 0x38ab
cmpl $-0x1, %eax
je 0x2817
movl %eax, %r13d
movq %rbx, %rdi
callq 0x3a9e
movsbl %r13b, %esi
movq %rbx, %rdi
callq 0x3ab2
callq 0x38ab
movl %eax, %r13d
cmpl $-0x1, %eax
jne 0x279b
movq %rbx, %rdi
callq 0x3aa8
movq 0x8a1d(%rip), %r13      # 0xb1e0
cmpq %r15, %r13
je 0x2817
movq 0x28(%r13), %rax
cmpl $0x0, 0x4(%rax)
je 0x27ec
cmpl $-0x1, 0x8(%rax)
jne 0x27ec
movl $0x1, 0x10(%rax)
movl (%rax), %edi
movl %ebp, %esi
callq 0x2260
testl %eax, %eax
jne 0x27f9
movq %r13, %rdi
callq 0x20f0
movq %rax, %r13
jmp 0x27c3
movq 0x28(%r13), %rax
movl (%rax), %esi
leaq 0x3815(%rip), %rdi      # 0x601b
xorl %eax, %eax
callq 0x2040
movq %r12, %rdi
callq 0x2130
jmp 0x27ec
andq $0x0, 0x8(%rsp)
movq $0x5f5e100, 0x10(%rsp)  # imm = 0x5F5E100
movq %r14, %rdi
xorl %esi, %esi
callq 0x2090
jmp 0x2775
callq 0x389f
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/overfl0[P]iojack/iojack.cpp
// Function: tmpDump(processInfo*, user_regs_struct*)
void tmpDump(processInfo *pi, user_regs_struct *regs)
{
    unsigned long arr[2];
    arr[0] = pi->getValue(regs->rip - sizeof(long));
    arr[1] = pi->getValue(regs->rip);

    printf("%lX: ", regs->rip - sizeof(long));
    for(unsigned int i = 1; i <= sizeof(long) * 2; i++)
    {
        printf("\\x%02X", ((unsigned char *)arr)[i-1]);
        if(i % 2 == 0) printf(" ");
    }
    printf("\n");
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x80(%rsi), %rsi
addq $-0x8, %rsi
callq 0x40b4
movq %rax, (%rsp)
movq 0x80(%rbx), %rsi
movq %r14, %rdi
callq 0x40b4
movq %rax, 0x8(%rsp)
movq 0x80(%rbx), %rsi
addq $-0x8, %rsi
leaq 0x37b1(%rip), %rdi      # 0x6044
xorl %eax, %eax
callq 0x2040
pushq $0x1
popq %r14
leaq 0x37a5(%rip), %rbx      # 0x604a
pushq $0x20
popq %rbp
cmpq $0x11, %r14
je 0x28d0
movzbl -0x1(%rsp,%r14), %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2040
testb $0x1, %r14b
jne 0x28cb
movl %ebp, %edi
callq 0x2240
incq %r14
jmp 0x28a8
pushq $0xa
popq %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x2240
// File: /workspace/github_cpp_makefile_star2_O2/overfl0[P]iojack/terminal.cpp
// Function: initStdin(termios&)
void initStdin(termios &settings)
{
    tcgetattr(0, &settings);
    termios newSettings = settings;

    newSettings.c_lflag &= (~ICANON);
    newSettings.c_lflag &= (~ECHO);
    //newSettings.c_lflag &= (~ISIG);

    newSettings.c_cc[VTIME] = 0;//1; // timeout (tenths of a second)
    newSettings.c_cc[VMIN] = 0;  // minimum number of characters

    // apply the new settings
    tcsetattr(0, TCSANOW, &newSettings);
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
xorl %edi, %edi
movq %rbx, %rsi
callq 0x21c0
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
movups 0x2c(%rbx), %xmm3
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movaps %xmm1, 0x10(%rdx)
movups %xmm3, 0x2c(%rdx)
movaps %xmm2, 0x20(%rdx)
andb $-0xb, 0xc(%rdx)
andw $0x0, 0x16(%rdx)
xorl %edi, %edi
xorl %esi, %esi
callq 0x2220
addq $0x40, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/overfl0[P]iojack/buffer.cpp
// Function: buffer::lockedSize()
int buffer::lockedSize()
{
    lock();
    int retval = data.size();
    unlock();
    return retval;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x50(%rdi), %r14
movq %r14, %rdi
callq 0x2280
movq %rbx, %rdi
callq 0x3ed2
movq %rax, %rbx
movq %r14, %rdi
callq 0x2100
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/overfl0[P]iojack/buffer.cpp
// Function: buffer::lockedGet()
unsigned char buffer::lockedGet()
{
    lock();
    unsigned char retval = get();
    unlock();
return retval;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x50(%rdi), %r14
movq %r14, %rdi
callq 0x2280
movq %rbx, %rdi
callq 0x3b8c
movl %eax, %ebx
movq %r14, %rdi
callq 0x2100
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/overfl0[P]iojack/processes.cpp
// Function: processInfo::getValue(unsigned long)
unsigned long processInfo::getValue(unsigned long addr)
{
    unsigned long retval = ptrace(PTRACE_PEEKDATA, pid, addr, 0);
    if(retval == (unsigned long)-1 && errno != 0)
    {
        perror("ptrace read");
        printf("errno: %d\n", errno);
    }
    //throw "Exception!!!";
    return retval;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rdx
movl (%rdi), %esi
pushq $0x2
popq %rdi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x2140
movq %rax, %rbx
cmpq $-0x1, %rax
jne 0x40dc
callq 0x2030
cmpl $0x0, (%rax)
jne 0x40e7
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
leaq 0x387a(%rip), %rdi      # 0x796b
callq 0x2130
movl (%r14), %esi
leaq 0x3838(%rip), %rdi      # 0x7938
xorl %eax, %eax
callq 0x2040
jmp 0x40dc
nop
// File: /workspace/github_cpp_makefile_star2_O2/overfl0[P]iojack/processes.cpp
// Function: processInfo::writeLong(unsigned long, unsigned long)
long processInfo::writeLong(unsigned long addr, unsigned long value)
{
    long retval = ptrace(PTRACE_POKEDATA, pid, addr, value);
    if(retval == -1)
    {
        char tmp[100];
        sprintf(tmp, "ptrace write at addr 0x%lx", addr);
        perror(tmp);
    }
    else
        dprintf("Write OK!\n");
    return retval;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdx, %rcx
movq %rsi, %rbx
movl (%rdi), %esi
pushq $0x5
popq %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2140
movq %rax, %r14
cmpq $-0x1, %rax
je 0x413e
movq %r14, %rax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x37fe(%rip), %rsi      # 0x7943
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2060
movq %r15, %rdi
callq 0x2130
jmp 0x4131
nop
// File: /workspace/github_cpp_makefile_star2_O2/overfl0[P]iojack/processes.cpp
// Function: processInfo::readMemcpy(void*, unsigned long, unsigned int)
void processInfo::readMemcpy(void *dest, unsigned long remoteAddr, unsigned int n)
{
    unsigned long *udest = (unsigned long *)dest;
    dprintf("readMemcpy(dest=%lx, remoteAddr=%lx, uint n=%u\n", (unsigned long)dest, remoteAddr, n);
    for(; n >= sizeof(unsigned long); n -= sizeof(unsigned long))
    {
        //dprintf("%u\n", n);
        unsigned long retval = ptrace(PTRACE_PEEKDATA, pid, remoteAddr, 0);
        if(retval == (unsigned long)-1 && errno != 0)
        {
            perror("readMemcpy - ptrace read");
            return;
        }

        *udest++ = retval;
        remoteAddr += sizeof(unsigned long);
    }

    if(n > 0)
    {
        unsigned long retval = ptrace(PTRACE_PEEKDATA, pid, remoteAddr, 0);
        if(retval == (unsigned long)-1 && errno != 0)
        {
            perror("readMemcpy - ptrace read2");
            return;
        }

        char *c = (char *)&retval;
        for(unsigned int i = 0; i < n; i++)
        {
            //dprintf("%d\n", i);
            ((char *)udest)[i] = c[i];
        }
    }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movl %ecx, %r13d
pushq $0x2
popq %rbp
cmpl $0x8, %r13d
jb 0x41e7
movl (%r15), %esi
movl %ebp, %edi
movq %r14, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x2140
movq %rax, %r12
cmpq $-0x1, %rax
jne 0x41d6
callq 0x2030
cmpl $0x0, (%rax)
jne 0x4225
movq %r12, (%rbx)
addq $0x8, %rbx
addq $0x8, %r14
addq $-0x8, %r13
jmp 0x41ac
testl %r13d, %r13d
je 0x424b
movl (%r15), %esi
pushq $0x2
popq %rdi
movq %r14, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x2140
movq %rax, (%rsp)
cmpq $-0x1, %rax
jne 0x4212
callq 0x2030
cmpl $0x0, (%rax)
jne 0x423f
xorl %eax, %eax
subq $0x1, %r13
jb 0x424b
movb (%rsp,%rax), %cl
movb %cl, (%rbx,%rax)
incq %rax
jmp 0x4214
leaq 0x3732(%rip), %rdi      # 0x795e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2130
leaq 0x3731(%rip), %rdi      # 0x7977
callq 0x2130
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/overfl0[P]iojack/processes.cpp
// Function: processInfo::writeMemcpy(unsigned long, void*, unsigned int)
void processInfo::writeMemcpy(unsigned long remoteAddr, void *src, unsigned int n)
{
    unsigned long *usrc = (unsigned long *)src;
    dprintf("writeMemcpy(remoteAddr=%lx, src=%lx, uint n=%u\n", remoteAddr, (unsigned long)src, n);

    for(; n >= sizeof(unsigned long); n -= sizeof(unsigned long))
    {
        long retval = ptrace(PTRACE_POKEDATA, pid, remoteAddr, *usrc);
        if(retval == -1)
        {
            perror("writeMemcpy - ptrace write 1");
            return;
        }

        usrc++;
        remoteAddr += sizeof(unsigned long);
    }

    if(n > 0)
    {
        // Read the whole ulong into memory
        unsigned long remoteData = ptrace(PTRACE_PEEKDATA, pid, remoteAddr, 0);
        if(remoteData == (unsigned long)-1 && errno != 0)
        {
            perror("writeMemcpy - ptrace read");
            return;
        }

        // Modify only the requested bits
        char *c = (char *)&remoteData;
        for(unsigned int i = 0; i < n; i++)
        {
            //dprintf("%d\n", i);
            c[i] = ((char *)usrc)[i];
        }

        // Write it back
        long retval = ptrace(PTRACE_POKEDATA, pid, remoteAddr, remoteData);
        if(retval == -1)
        {
            perror("writeMemcpy - ptrace write 2");
            return;
        }
    }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movl %ecx, %r12d
pushq $0x5
popq %rbp
cmpl $0x8, %r12d
jb 0x42a1
movl (%r15), %esi
movq (%r14), %rcx
movl %ebp, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2140
cmpq $-0x1, %rax
je 0x430a
addq $0x8, %r14
addq $0x8, %rbx
addq $-0x8, %r12
jmp 0x4275
testl %r12d, %r12d
je 0x42fd
movl (%r15), %esi
pushq $0x2
popq %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x2140
movq %rax, 0x8(%rsp)
cmpq $-0x1, %rax
jne 0x42cd
callq 0x2030
cmpl $0x0, (%rax)
jne 0x432b
xorl %eax, %eax
subq $0x1, %r12
jb 0x42e2
movb (%r14,%rax), %cl
movb %cl, 0x8(%rsp,%rax)
incq %rax
jmp 0x42cf
movl (%r15), %esi
movq 0x8(%rsp), %rcx
pushq $0x5
popq %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2140
cmpq $-0x1, %rax
je 0x4322
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3680(%rip), %rdi      # 0x7991
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2130
leaq 0x369f(%rip), %rdi      # 0x79c8
jmp 0x4332
leaq 0x367c(%rip), %rdi      # 0x79ae
callq 0x2130
jmp 0x42fd
nop