LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/LiuYinCarl[P]headerFileAnalysis/headerFileAnalysis.cpp
// Function: Graph::get_node_by_id(unsigned int)
Node* Graph::get_node_by_id(uint32_t id) {
  assert(id > 0);
  auto node_iter = node_map.find(id);
  if (node_iter == node_map.end())
    return nullptr;
  else
    return node_iter->second;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %esi, 0xc(%rsp)
testl %esi, %esi
je 0x4ab9
movq %rdi, %rbx
addq $0x8, %rdi
leaq 0xc(%rsp), %rsi
callq 0x6876
addq $0x10, %rbx
cmpq %rbx, %rax
je 0x4ab1
movq 0x28(%rax), %rax
jmp 0x4ab3
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
leaq 0x11698(%rip), %rdi     # 0x16158
leaq 0x11698(%rip), %rsi     # 0x1615f
leaq 0x1175b(%rip), %rcx     # 0x16229
pushq $0x65
popq %rdx
callq 0x4260
// File: /workspace/github_cpp_makefile_star2_O2/LiuYinCarl[P]headerFileAnalysis/headerFileAnalysis.cpp
// Function: Graph::get_node_by_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Node* Graph::get_node_by_name(const std::string& name) {
  assert(name.size() > 0);
  auto node_iter = node_name_map.find(name);
  if (node_iter == node_name_map.end())
    return nullptr;
  else
    return node_iter->second;
}

// Assembly:
pushq %rbx
cmpq $0x0, 0x8(%rsi)
je 0x4afd
movq %rdi, %rbx
addq $0x38, %rdi
callq 0x6c22
addq $0x40, %rbx
cmpq %rbx, %rax
je 0x4af9
movq 0x40(%rax), %rax
jmp 0x4afb
xorl %eax, %eax
popq %rbx
retq
leaq 0x117c3(%rip), %rdi     # 0x162c7
leaq 0x11654(%rip), %rsi     # 0x1615f
leaq 0x1173d(%rip), %rcx     # 0x1624f
pushq $0x6e
popq %rdx
callq 0x4260
// File: /workspace/github_cpp_makefile_star2_O2/LiuYinCarl[P]headerFileAnalysis/headerFileAnalysis.cpp
// Function: Graph::add_record(Node*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool Graph::add_record(Node* node, std::string& parent_name) {
  assert(node != nullptr);
  assert(parent_name.size() > 0);

  // 1. find parent node. if parent node not exist, create it
  Node* parent_node = get_node_by_name(parent_name);
  if (parent_node == nullptr) {
    parent_node = make_node(parent_name);
    add_node(parent_node);
  }

  // 2. insert node into it's parent node
  parent_node->add_child_node(node->get_node_id());

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x4b75
movq %rdx, %r15
cmpq $0x0, 0x8(%rdx)
je 0x4b8e
movq %rsi, %rbx
movq %rdi, %r14
movq %r15, %rsi
callq 0x4ad6
movq %rax, %r12
testq %rax, %rax
jne 0x4b5d
movq %r15, %rdi
callq 0x4bab
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
callq 0x493e
movl (%rbx), %esi
movq %r12, %rdi
callq 0x4824
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x11706(%rip), %rdi     # 0x16282
leaq 0x115dc(%rip), %rsi     # 0x1615f
leaq 0x11708(%rip), %rcx     # 0x16292
pushq $0x77
jmp 0x4ba5
leaq 0x1172b(%rip), %rdi     # 0x162c0
leaq 0x115c3(%rip), %rsi     # 0x1615f
leaq 0x116ef(%rip), %rcx     # 0x16292
pushq $0x78
popq %rdx
callq 0x4260
// File: /workspace/github_cpp_makefile_star2_O2/LiuYinCarl[P]headerFileAnalysis/./headerFileAnalysis.h
// Function: make_node(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
static Node* make_node(const std::string& name) {
  assert(name != "");
  uint32_t id = gen_id();
  Node* node = new Node(id, name);
  return node;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x1184f(%rip), %rsi     # 0x16408
callq 0x6131
testb %al, %al
je 0x4bf0
movl 0x1fb90(%rip), %ebp     # 0x24758
incl %ebp
movl %ebp, 0x1fb88(%rip)     # 0x24758
pushq $0x40
popq %rdi
callq 0x4340
movq %rax, %r14
movq %rax, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x470e
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1198b(%rip), %rdi     # 0x16582
leaq 0x1198f(%rip), %rsi     # 0x1658d
leaq 0x1199f(%rip), %rcx     # 0x165a4
pushq $0x3e
popq %rdx
callq 0x4260
movq %rax, %rbx
pushq $0x40
popq %rsi
movq %r14, %rdi
callq 0x4350
movq %rbx, %rdi
callq 0x4510
nop
// File: /workspace/github_cpp_makefile_star2_O2/LiuYinCarl[P]headerFileAnalysis/headerFileAnalysis.cpp
// Function: Graph::print_circle(std::vector<unsigned int, std::allocator<unsigned int>>&)
void Graph::print_circle(std::vector<uint32_t>& circle_link) {
  for (int i = 0; i < circle_link.size(); i++) {
    uint32_t node_id = circle_link.at(i);
    Node* node = get_node_by_id(node_id);
    if (i == 0) {
      std::cout << node->get_node_name();
    } else {
      std::cout << " -> " << node->get_node_name();
    }
  }
  std::cout << std::endl << std::endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movq 0x1f381(%rip), %r12     # 0x23fc0
leaq 0x11691(%rip), %r13     # 0x162d7
movq 0x8(%rbx), %rax
subq (%rbx), %rax
sarq $0x2, %rax
cmpq %r15, %rax
jbe 0x4c95
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5b2a
movl (%rax), %esi
movq %r14, %rdi
callq 0x4a84
movq %rax, %rbp
movq %r12, %rdi
testq %r15, %r15
je 0x4c84
movq %r12, %rdi
movq %r13, %rsi
callq 0x4320
movq %rax, %rdi
addq $0x8, %rbp
movq %rbp, %rsi
callq 0x4300
incq %r15
jmp 0x4c46
movq 0x1f324(%rip), %rdi     # 0x23fc0
callq 0x41a0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x41a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/LiuYinCarl[P]headerFileAnalysis/headerFileAnalysis.cpp
// Function: Graph::check_circle_dfs(Node*, std::vector<unsigned int, std::allocator<unsigned int>>&)
bool Graph::check_circle_dfs(Node* node, std::vector<uint32_t>& circle_link) {
  visiting.insert(node->get_node_id());
  circle_link.push_back(node->get_node_id());
  std::vector<uint32_t>& childrens = node->get_child_nodes();
  for (uint32_t child_node_id : childrens) {
    assert(node->get_node_id() != child_node_id);
    Node* child_node = get_node_by_id(child_node_id);
    if (visited.count(child_node_id) > 0)
      continue;
    if (visiting.count(child_node_id) > 0) {
      std::cout << "circle include: " << get_node_by_id(child_node_id)->get_node_name() << std::endl;
      print_circle(circle_link);
      circle_link.pop_back();
      visiting.erase(node->get_node_id());
      return true;
    }
    if (check_circle_dfs(child_node, circle_link)) {
      circle_link.pop_back();
      visiting.erase(node->get_node_id());
      return true;
    }
  }
  circle_link.pop_back();
  visiting.erase(node->get_node_id());
  return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
addq $0x98, %rdi
movl (%rsi), %eax
leaq 0x4(%rsp), %r13
movl %eax, (%r13)
movq %rdi, 0x10(%rsp)
movq %r13, %rsi
callq 0x6cf4
movl (%r14), %eax
movl %eax, (%r13)
leaq 0x4(%rsp), %rsi
movq %rbx, 0x8(%rsp)
movq %rbx, %rdi
callq 0x6e46
movq 0x28(%r14), %r15
movq 0x30(%r14), %rax
movq %rax, 0x20(%rsp)
leaq 0x68(%r12), %rbp
cmpq 0x20(%rsp), %r15
je 0x4d77
movl (%r15), %esi
movl %esi, 0x4(%rsp)
cmpl %esi, (%r14)
je 0x4e0d
movq %r12, %rdi
callq 0x4a84
movq %rax, %rbx
movq %rbp, %rdi
movq %r13, %rsi
callq 0x5b4c
testq %rax, %rax
jne 0x4d71
movq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x5b4c
testq %rax, %rax
jne 0x4d8b
movq %r12, %rdi
movq %rbx, %rsi
movq 0x8(%rsp), %rdx
callq 0x4cb8
testb %al, %al
jne 0x4dd8
addq $0x4, %r15
jmp 0x4d19
movq 0x8(%rsp), %rax
addq $-0x4, 0x8(%rax)
movl (%r14), %eax
leaq 0x4(%rsp), %rsi
jmp 0x4dea
movq 0x1f22e(%rip), %rdi     # 0x23fc0
leaq 0x115a6(%rip), %rsi     # 0x1633f
callq 0x4320
movq %rax, %rbx
movl 0x4(%rsp), %esi
movq %r12, %rdi
callq 0x4a84
leaq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0x4300
movq %rax, %rdi
callq 0x41a0
movq %r12, %rdi
movq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x4c24
addq $-0x4, 0x8(%rbx)
jmp 0x4de2
movq 0x8(%rsp), %rax
addq $-0x4, 0x8(%rax)
movl (%r14), %eax
leaq 0x1c(%rsp), %rsi
movl %eax, (%rsi)
movq 0x10(%rsp), %rdi
callq 0x6f8e
cmpq 0x20(%rsp), %r15
setne %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x114c8(%rip), %rdi     # 0x162dc
leaq 0x11344(%rip), %rsi     # 0x1615f
leaq 0x114df(%rip), %rcx     # 0x16301
movl $0x99, %edx
callq 0x4260
// File: /workspace/github_cpp_makefile_star2_O2/LiuYinCarl[P]headerFileAnalysis/headerFileAnalysis.cpp
// Function: Graph::check_circle()
void Graph::check_circle() {
  std::vector<uint32_t> circle_link;
  for (auto& item : node_map) {
    int node_id = item.first;
    Node* node = item.second;
    check_circle_dfs(node, circle_link);
    visited.insert(node_id);
    visiting.clear();
    assert(circle_link.size() == 0);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rax
movaps %xmm0, (%rax)
andq $0x0, 0x10(%rax)
movq 0x20(%rdi), %r13
leaq 0x10(%rdi), %r14
leaq 0x68(%rdi), %r15
leaq 0x98(%rdi), %r12
cmpq %r14, %r13
je 0x4eac
movl 0x20(%r13), %ebp
movq 0x28(%r13), %rsi
movq %rbx, %rdi
leaq 0x10(%rsp), %rdx
callq 0x4cb8
movl %ebp, 0xc(%rsp)
movq %r15, %rdi
leaq 0xc(%rsp), %rsi
callq 0x6cf4
movq %r12, %rdi
callq 0x70de
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
jne 0x4ec5
movq %r13, %rdi
callq 0x4280
movq %rax, %r13
jmp 0x4e60
leaq 0x10(%rsp), %rdi
callq 0x666a
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x11484(%rip), %rdi     # 0x16350
leaq 0x1128c(%rip), %rsi     # 0x1615f
leaq 0x1148e(%rip), %rcx     # 0x16368
movl $0xb7, %edx
callq 0x4260
jmp 0x4ee6
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x666a
movq %rbx, %rdi
callq 0x4510
nop
// File: /workspace/github_cpp_makefile_star2_O2/LiuYinCarl[P]headerFileAnalysis/headerFileAnalysis.cpp
// Function: Graph::gen_dot_file()
bool Graph::gen_dot_file() {
  FILE* fp = fopen("include_graph.dot", "w");
  assert(fp != nullptr);
  // gen node define
  Node* tmp_node = nullptr;
  // ratio 图像高:宽
  // splines=false; 使用直线绘图
  fprintf(fp, "digraph {\n\n graph [ratio = 0.5];\n");
  fprintf(fp, "// node define\n");
  for (auto& item : node_map) {
    tmp_node = item.second;
    fprintf(fp, "%d[label=\"%s %d\"];\n",
            item.first,
            tmp_node->get_node_name().c_str(),
            tmp_node->get_child_node_count());
  }

  fprintf(fp, "\n\n");

  // gen line
  for (auto& item : node_map) {
    Node* node = item.second;
    uint32_t self_node_id = item.first;

    for (auto& child_id : node->get_child_nodes()) {
      fprintf(fp, "%d -> %d;\n", child_id, self_node_id);
    }
  }
  fprintf(fp, "\n}");
  fclose(fp);
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x11472(%rip), %rdi     # 0x16383
leaq 0x1147d(%rip), %rsi     # 0x16395
callq 0x43f0
testq %rax, %rax
je 0x5035
movq %rax, %rbx
leaq 0x11490(%rip), %rdi     # 0x163c0
pushq $0x21
popq %rsi
pushq $0x1
popq %r15
movq %r15, %rdx
movq %rax, %rcx
callq 0x4580
leaq 0x11499(%rip), %rdi     # 0x163e2
pushq $0xf
popq %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x4580
movq 0x20(%r14), %r12
leaq 0x10(%r14), %r13
leaq 0x1148c(%rip), %r15     # 0x163f2
cmpq %r13, %r12
je 0x4f9f
movq 0x28(%r12), %rax
movl 0x20(%r12), %edx
movq 0x8(%rax), %rcx
movq 0x30(%rax), %r8
subq 0x28(%rax), %r8
shrq $0x2, %r8
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x4480
movq %r12, %rdi
callq 0x4280
movq %rax, %r12
jmp 0x4f66
leaq 0x11460(%rip), %rdi     # 0x16406
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x4580
movq 0x20(%r14), %r15
leaq 0x1144a(%rip), %r14     # 0x16409
movq %r13, (%rsp)
cmpq %r13, %r15
je 0x5007
movq 0x28(%r15), %rax
movl 0x20(%r15), %ebp
movq 0x28(%rax), %r12
movq 0x30(%rax), %r13
cmpq %r13, %r12
je 0x4ff6
movl (%r12), %edx
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x4480
addq $0x4, %r12
jmp 0x4fd8
movq %r15, %rdi
callq 0x4280
movq %rax, %r15
movq (%rsp), %r13
jmp 0x4fc3
leaq 0x11406(%rip), %rdi     # 0x16414
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x4580
movq %rbx, %rdi
callq 0x4330
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1135b(%rip), %rdi     # 0x16397
leaq 0x1111c(%rip), %rsi     # 0x1615f
leaq 0x1135b(%rip), %rcx     # 0x163a5
movl $0xbd, %edx
callq 0x4260
// File: /workspace/github_cpp_makefile_star2_O2/LiuYinCarl[P]headerFileAnalysis/headerFileAnalysis.cpp
// Function: WalkMan::walk_dir()
void WalkMan::walk_dir() {
  std::queue<fs::path>dirs;
  dirs.push(base_dir);
  fs::path cur_dir;

  while (!dirs.empty()) {
    cur_dir = std::move(dirs.front());
    dirs.pop();
    for (auto& entry : fs::directory_iterator{cur_dir}) {
      if (entry.is_regular_file()) {
	if (is_source_code(entry.path().extension())) {
	  source_file_paths.push_back(entry.path());
	}
      } else if (entry.is_directory()) {
	dirs.push(entry.path());
      }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdi, %rbx
leaq 0x80(%rsp), %r14
movq %r14, %rdi
callq 0x5c4c
leaq 0xc8(%rbx), %rsi
movq %r14, %rdi
callq 0x73d8
leaq 0x58(%rsp), %rdi
callq 0x5b66
addq $0xf0, %rbx
leaq 0x80(%rsp), %r15
leaq 0x38(%rsp), %r13
movq %rsp, %rbp
leaq 0xd0(%rsp), %r14
movq 0x90(%rsp), %rsi
cmpq %rsi, 0xb0(%rsp)
je 0x535f
leaq 0x58(%rsp), %r12
movq %r12, %rdi
callq 0x5c68
movq %r15, %rdi
callq 0x7656
movq %r13, %rdi
movq %r12, %rsi
callq 0x5ca0
leaq 0x20(%rsp), %rdi
movq %r13, %rsi
callq 0x620e
movaps 0x20(%rsp), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x6242
leaq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x620e
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x6242
movq 0x8(%rsp), %rax
cmpq 0x18(%rsp), %rax
je 0x5337
movq %rbp, %rdi
callq 0x4540
movq %rax, %r13
movq %rax, %rdi
callq 0x5caa
testb %al, %al
je 0x5316
movq %r14, %rdi
movq %r13, %rsi
callq 0x5cb8
movq %r14, %rsi
callq 0x516e
movl %eax, %r12d
movq %r14, %rdi
callq 0x5c36
testb %r12b, %r12b
je 0x532d
movq %rbx, %rdi
movq %r13, %rsi
callq 0x5d36
jmp 0x532d
movq %r13, %rdi
callq 0x5d62
testb %al, %al
je 0x532d
movq %r15, %rdi
movq %r13, %rsi
callq 0x73d8
movq %rbp, %rdi
callq 0x40e0
jmp 0x52c3
leaq 0x18(%rsp), %rdi
callq 0x6242
leaq 0x8(%rsp), %rdi
callq 0x6242
leaq 0x40(%rsp), %rdi
callq 0x6242
leaq 0x38(%rsp), %r13
jmp 0x5246
leaq 0x58(%rsp), %rdi
callq 0x5c36
leaq 0x80(%rsp), %rdi
callq 0x63b4
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x53bf
movq %rax, %rbx
jmp 0x53b5
jmp 0x5394
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x6242
leaq 0x8(%rsp), %rdi
callq 0x6242
leaq 0x40(%rsp), %rdi
callq 0x6242
leaq 0x58(%rsp), %rdi
callq 0x5c36
leaq 0x80(%rsp), %rdi
callq 0x63b4
movq %rbx, %rdi
callq 0x4510
// File: /workspace/github_cpp_makefile_star2_O2/LiuYinCarl[P]headerFileAnalysis/headerFileAnalysis.cpp
// Function: WalkMan::analysis_file()
void WalkMan::analysis_file() {
  // 读取一个文件然后分析出头文件引用
  for (auto& path : source_file_paths) {
    // vector 第一个元素是源文件的名字，其他元素是这个源文件引用的头文件
    std::vector<std::string> include_info = get_include_lines(path);
    assert(include_info.size() > 0);
    include_infos.push_back(include_info);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq 0xf0(%rdi), %r14
movq 0xf8(%rdi), %r13
leaq 0x138(%rdi), %r15
leaq 0x8(%rsp), %r12
cmpq %r13, %r14
je 0x583e
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x549c
movq 0x10(%rsp), %rax
cmpq 0x8(%rsp), %rax
je 0x584c
movq %r15, %rdi
movq %r12, %rsi
callq 0x5fc6
movq %r12, %rdi
callq 0x5fa4
addq $0x28, %r14
jmp 0x5806
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x10c55(%rip), %rdi     # 0x164a8
leaq 0x10905(%rip), %rsi     # 0x1615f
leaq 0x10c5f(%rip), %rcx     # 0x164c0
movl $0x133, %edx            # imm = 0x133
callq 0x4260
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5fa4
movq %rbx, %rdi
callq 0x4510
// File: /workspace/github_cpp_makefile_star2_O2/LiuYinCarl[P]headerFileAnalysis/headerFileAnalysis.cpp
// Function: WalkMan::build_graph()
void WalkMan::build_graph() {
  for (std::vector<std::string>& include_info : include_infos) {
    // 至少要包含源文件自己的文件名
    assert(include_info.size() >= 1);
    // 1. 添加自身节点
    Node* self_node;
    self_node = g.get_node_by_name(include_info.at(0));
    if (self_node == nullptr) {
      self_node = make_node(include_info.at(0));
      g.add_node(self_node);
    }
    // 2. 添加引用关系
    for (int n = include_info.size(), i = 1; i < n; ++i) {
      g.add_record(self_node, include_info.at(i));
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x138(%rdi), %r14
movq 0x140(%rdi), %r13
cmpq %r13, %r14
je 0x592d
movq 0x8(%r14), %rax
cmpq (%r14), %rax
je 0x593c
movq %r14, %rdi
xorl %esi, %esi
callq 0x5ff2
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4ad6
movq %rax, %r15
testq %rax, %rax
jne 0x58ef
movq %r14, %rdi
xorl %esi, %esi
callq 0x5ff2
movq %rax, %rdi
callq 0x4bab
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0x493e
movq 0x8(%r14), %rax
subq (%r14), %rax
shrq $0x5, %rax
movslq %eax, %rbp
pushq $0x1
popq %r12
cmpq %rbp, %r12
jge 0x5924
movq %r14, %rdi
movq %r12, %rsi
callq 0x5ff2
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x4b1a
incq %r12
jmp 0x5901
addq $0x18, %r14
jmp 0x589c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10b9b(%rip), %rdi     # 0x164de
leaq 0x10815(%rip), %rsi     # 0x1615f
leaq 0x10ba6(%rip), %rcx     # 0x164f7
movl $0x13b, %edx            # imm = 0x13B
callq 0x4260
nop
// File: /workspace/github_cpp_makefile_star2_O2/LiuYinCarl[P]headerFileAnalysis/headerFileAnalysis.cpp
// Function: WalkMan::start()
void WalkMan::start() {
  walk_dir();
  init_headers();
  analysis_file();
  build_graph();

  g.check_circle();
  g.gen_dot_file();

  std::cout << "source files number: " << source_file_paths.size() << std::endl;
  std::cout << "header files number: " << headers.size() << std::endl;
  std::cout << "graph  node  number: " << g.get_node_count() << std::endl;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x51ea
movq %rbx, %rdi
callq 0x53d4
movq %rbx, %rdi
callq 0x57dc
movq %rbx, %rdi
callq 0x5880
movq %rbx, %rdi
callq 0x4e2c
movq %rbx, %rdi
callq 0x4efc
movq 0x1e629(%rip), %r14     # 0x23fc0
leaq 0x10b75(%rip), %rsi     # 0x16513
movq %r14, %rdi
callq 0x4320
movq %rax, %rdi
movq 0xf8(%rbx), %rax
subq 0xf0(%rbx), %rax
pushq $0x28
popq %rcx
cqto
idivq %rcx
movq %rax, %rsi
callq 0x4270
movq %rax, %rdi
callq 0x41a0
leaq 0x10b53(%rip), %rsi     # 0x16529
movq %r14, %rdi
callq 0x4320
movq 0x130(%rbx), %rsi
movq %rax, %rdi
callq 0x4270
movq %rax, %rdi
callq 0x41a0
leaq 0x10b43(%rip), %rsi     # 0x1653f
movq %r14, %rdi
callq 0x4320
movl (%rbx), %esi
movq %rax, %rdi
callq 0x4270
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x41a0
// File: /workspace/github_cpp_makefile_star2_O2/LiuYinCarl[P]headerFileAnalysis/headerFileAnalysis.cpp
// Function: main
int main(int argc, char* argv[]) {
  if (argc != 2) {
    std::cout << "usage: ./headerFileAnalysys path/to/project/" << std::endl;
    exit(0);
  }

  std::string base_dir {argv[1]};

  WalkMan walkMan(base_dir);
  walkMan.start();

  return 0;
}

// Assembly:
pushq %rbx
subq $0x170, %rsp            # imm = 0x170
cmpl $0x2, %edi
jne 0x5a72
movq 0x8(%rsi), %rsi
movq %rsp, %rbx
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x5ab6
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x50b0
leaq 0x20(%rsp), %rdi
callq 0x595c
leaq 0x20(%rsp), %rdi
callq 0x5130
movq %rsp, %rdi
callq 0x4180
xorl %eax, %eax
addq $0x170, %rsp            # imm = 0x170
popq %rbx
retq
movq 0x1e547(%rip), %rdi     # 0x23fc0
leaq 0x10ad5(%rip), %rsi     # 0x16555
callq 0x4320
movq %rax, %rdi
callq 0x41a0
xorl %edi, %edi
callq 0x4400
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x5130
jmp 0x5aa6
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4180
movq %rbx, %rdi
callq 0x4510
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/raidSystem.cpp
// Function: RaidSystem::RaidSystem(FileHandler*)
RaidSystem::RaidSystem(FileHandler *fileHandler)
{
	handle = fileHandler;
	raidSystem = Raid_unknown;
	stripeSize = -1;
	lostImages = -1;
	raidSystem = Raid_unknown;
	srand(time(NULL));
}

// Assembly:
pushq %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
andq $0x0, 0x20(%rdi)
movq %rsi, (%rdi)
orl $-0x1, 0x28(%rdi)
movabsq $-0xfffffffb, %rax      # imm = 0xFFFFFFFF00000005
movq %rax, 0x8(%rdi)
xorl %edi, %edi
callq 0x5340
movl %eax, %edi
popq %rax
jmp 0x5370
nop
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/raidSystem.cpp
// Function: RaidSystem::calculateStripeSize()
bool RaidSystem::calculateStripeSize()
{
	int ret = handle->estimateStripeSize();
	if (ret == -1)
		return false;
	this->stripeSize = ret;
	return true;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x7bc8
cmpl $-0x1, %eax
je 0x6716
movl %eax, 0xc(%rbx)
cmpl $-0x1, %eax
setne %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/raidSystem.cpp
// Function: RaidSystem::checkForEqual(char*, char*, unsigned long)
bool RaidSystem::checkForEqual(char *buf, char *in, size_t size)
{
	unsigned int count = 0;
	for (size_t i = 0; i < size; ++i)
	{
		if (in[i] != buf[i])
			++count;
	}
	//A few errors are tolerated
	if (count > (size/1000))
		return false;

	return true;
}

// Assembly:
movq %rcx, %rax
xorl %ecx, %ecx
xorl %edi, %edi
cmpq %rdi, %rax
je 0x6e9f
movb (%rdx,%rdi), %r8b
xorl %r9d, %r9d
cmpb (%rsi,%rdi), %r8b
setne %r9b
addl %r9d, %ecx
incq %rdi
jmp 0x6e83
movl %ecx, %ecx
movl $0x3e8, %esi            # imm = 0x3E8
xorl %edx, %edx
divq %rsi
cmpq %rcx, %rax
setae %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/fileHandler.cpp
// Function: FileHandler::getFileReader(unsigned long)
FileReader * FileHandler::getFileReader(size_t num)
{
	if (num >= inFiles.size())
	{
		std::cerr << "ERROR in FileHandler::getFileReader - num smaller than available Images" << std::endl;
		return NULL;
	}
	return inFiles.at(num);
}

// Assembly:
pushq %rax
movq 0x48(%rdi), %rax
subq 0x40(%rdi), %rax
sarq $0x3, %rax
cmpq %rsi, %rax
jbe 0x79ac
addq $0x40, %rdi
callq 0x6f22
movq (%rax), %rax
jmp 0x79c9
movq 0x1663d(%rip), %rdi     # 0x1dff0
leaq 0xc0ba(%rip), %rsi      # 0x13a74
callq 0x5380
movq %rax, %rdi
callq 0x5180
xorl %eax, %eax
popq %rcx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/fileHandler.cpp
// Function: FileHandler::addImage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void FileHandler::addImage(std::string path)
{
	if (inFiles.size()==0)
	{
		maxBufferSize = (BUFLENGTH/1+1)/2*2;
		maxBufferSize = maxBufferSize/BLOCKSIZE;
		maxBufferSize = maxBufferSize*BLOCKSIZE;
		maxBufferSize = std::min(maxBufferSize,256*1024*1024);
		FileReader *a = new FileReader(path,maxBufferSize);
		inFiles.push_back(a);
	}
	else
	{
		FileReader *a = new FileReader(path,maxBufferSize);
		inFiles.push_back(a);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r15
leaq 0x40(%rdi), %rbx
movq 0x48(%rdi), %rax
cmpq 0x40(%rdi), %rax
je 0x7a21
movl $0x2b8, %edi            # imm = 0x2B8
callq 0x5390
movq %rax, %r14
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x54b0
movslq 0x169bb(%rip), %rdx     # 0x1e3c8
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0xf4c8
leaq 0x10(%rsp), %rdi
jmp 0x7a5e
movl $0x10000000, 0x1699d(%rip) # imm = 0x10000000
movl $0x2b8, %edi            # imm = 0x2B8
callq 0x5390
movq %rax, %r14
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x54b0
movslq 0x1697c(%rip), %rdx     # 0x1e3c8
leaq 0x30(%rsp), %rsi
movq %r14, %rdi
callq 0xf4c8
leaq 0x30(%rsp), %rdi
callq 0x5160
leaq 0x8(%rsp), %rsi
movq %r14, (%rsi)
movq %rbx, %rdi
callq 0xb902
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
jmp 0x7a91
jmp 0x7a98
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x5160
jmp 0x7a9b
movq %rax, %rbx
movq %r14, %rdi
callq 0x5360
movq %rbx, %rdi
callq 0x5610
nop
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/fileHandler.cpp
// Function: FileHandler::findGoodBlock()
bool FileHandler::findGoodBlock()
{
	int64_t sample=inFiles.at(0)->findFirstNonemptyBlock();
	if (sample == -1)
	{
		std::cout << "Couldn't load any good blocks anymore." << std::endl;
		return false;
	}
	//Set offset on the other images
	for (size_t i = 0; i < inFiles.size(); ++i)
	{
		inFiles.at(i)->setOffset(sample);
	}
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x40(%rdi), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x6f22
movq (%rax), %rdi
callq 0xf77e
movq %rax, %rbx
cmpq $-0x1, %rax
je 0x7b05
xorl %r12d, %r12d
movq 0x48(%r14), %rax
subq 0x40(%r14), %rax
sarq $0x3, %rax
cmpq %rax, %r12
jae 0x7b20
movq %r15, %rdi
movq %r12, %rsi
callq 0x6f22
movq (%rax), %rdi
movq %rbx, %rsi
callq 0xf56a
incq %r12
jmp 0x7ad9
movq 0x164a4(%rip), %rdi     # 0x1dfb0
leaq 0xbfa9(%rip), %rsi      # 0x13abc
callq 0x5380
movq %rax, %rdi
callq 0x5180
cmpq $-0x1, %rbx
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/fileHandler.cpp
// Function: FileHandler::reloadBuffers()
bool FileHandler::reloadBuffers()
{
	for (unsigned int i = 0; i < inFiles.size(); ++i)
	{
		if (inFiles.at(i)->reloadBuffer()==false)
			return false;
	}
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x40(%rdi), %r14
xorl %ecx, %ecx
movl %ecx, %r15d
movq 0x48(%rbx), %r12
subq 0x40(%rbx), %r12
sarq $0x3, %r12
cmpq %r15, %r12
jbe 0x7b74
movq %r14, %rdi
movq %r15, %rsi
callq 0x6f22
movq (%rax), %rdi
callq 0xf5e6
leal 0x1(%r15), %ecx
testb %al, %al
jne 0x7b45
cmpq %r15, %r12
setbe %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/fileReader.cpp
// Function: FileReader::setOffset(unsigned long)
void FileReader::setOffset(size_t off)
{
	offset = off - getGlobalAdress();
	while (static_cast<size_t>(offset)+blockSize > getNumberOfElements())
	{
		reloadBuffer();
		offset = off - getGlobalAdress();
	}
	this->readSize = std::min(blockSize, getNumberOfElements()-offset);
	block = &getBuffer()[offset];
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1021c
movq %r14, %r15
subq %rax, %r15
movq %r15, 0x2a8(%rbx)
addq 0x2b0(%rbx), %r15
movq %rbx, %rdi
callq 0x101e6
movq %rbx, %rdi
cmpq %rax, %r15
jbe 0xf5a8
callq 0xf5e6
movq %rbx, %rdi
jmp 0xf575
callq 0x101e6
subq 0x2a8(%rbx), %rax
movq 0x2b0(%rbx), %rcx
cmpq %rcx, %rax
cmovaeq %rcx, %rax
movq %rax, 0x2a0(%rbx)
movq %rbx, %rdi
callq 0x101f6
addq 0x2a8(%rbx), %rax
movq %rax, 0x298(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/fileReader.cpp
// Function: FileReader::reloadBuffer()
bool FileReader::reloadBuffer()
{
	bool ret = Buffered_FileReader::reloadBuffer();
	offset = 0;
	block = Buffered_FileReader::getBuffer();
	readSize = std::min(blockSize, Buffered_FileReader::getNumberOfElements()-blockSize);
	return ret;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xfe8a
movl %eax, %ebp
andq $0x0, 0x2a8(%rbx)
movq %rbx, %rdi
callq 0x101f6
movq %rax, 0x298(%rbx)
movq %rbx, %rdi
callq 0x101e6
movq 0x2b0(%rbx), %rcx
subq %rcx, %rax
cmpq %rcx, %rax
cmovaeq %rcx, %rax
movq %rax, 0x2a0(%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/fileReader.cpp
// Function: FileReader::calcEntropyOfCurrentBlock()
float FileReader::calcEntropyOfCurrentBlock()
{
	float ret = 0.0f;
	unsigned int possibleVals[256]={};
	for (unsigned int i = 0; i < readSize; ++i)
	{
		possibleVals[(unsigned char)block[i]] += 1;
	}
	float tmp;
	if (possibleVals[0] == readSize)
		return 0.0f;
	for (unsigned int i = 0; i < 256; ++i)
	{
		tmp = (float)possibleVals[i]/(float)readSize;
		if (tmp>0)
			ret += -tmp * std::log2(tmp);
	}
	return ret;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x410, %rsp            # imm = 0x410
movq %rdi, %rbx
leaq 0x10(%rsp), %rdi
xorl %ebp, %ebp
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x51d0
movq 0x298(%rbx), %rcx
movq 0x2a0(%rbx), %rax
movl %ebp, %edx
cmpq %rdx, %rax
jbe 0xf6b5
movzbl (%rcx,%rdx), %esi
incl 0x10(%rsp,%rsi,4)
leal 0x1(%rdx), %ebp
jmp 0xf6a1
movl 0x10(%rsp), %ecx
xorps %xmm1, %xmm1
cmpq %rcx, %rax
jne 0xf6d0
movaps %xmm1, %xmm0
addq $0x410, %rsp            # imm = 0x410
popq %rbx
popq %r14
popq %rbp
retq
xorps %xmm2, %xmm2
xorl %r14d, %r14d
cmpq $0x100, %r14            # imm = 0x100
je 0xf6c1
movq 0x2a0(%rbx), %rax
testq %rax, %rax
js 0xf6f2
cvtsi2ss %rax, %xmm3
jmp 0xf707
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm3
addss %xmm3, %xmm3
movl 0x10(%rsp,%r14,4), %eax
cvtsi2ss %rax, %xmm0
divss %xmm3, %xmm0
ucomiss %xmm2, %xmm0
jbe 0xf73e
movss %xmm1, 0xc(%rsp)
movss %xmm0, 0x8(%rsp)
callq 0x5470
xorps %xmm2, %xmm2
movss 0xc(%rsp), %xmm1
mulss 0x8(%rsp), %xmm0
subss %xmm0, %xmm1
incq %r14
jmp 0xf6d6
nop
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/fileReader.cpp
// Function: FileReader::emptyBlock()
bool FileReader::emptyBlock()
{
	char *tmp = getBuffer();
	for (size_t i = 0; i < getNumberOfElements(); ++i)
		if (tmp[i] > 0)
			return false;
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x101f6
movq %rax, %r14
xorl %ecx, %ecx
movq %rcx, %r15
movq %rbx, %rdi
callq 0x101e6
cmpq %rax, %r15
jae 0xf771
leaq 0x1(%r15), %rcx
cmpb $0x0, (%r14,%r15)
jle 0xf756
cmpq %rax, %r15
setae %al
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/fileReader.cpp
// Function: FileReader::findFirstNonemptyBlock()
int64_t FileReader::findFirstNonemptyBlock()
{
	while (newBlock()==true)
	{
		for (size_t j = 0; j < readSize; ++j)
		{
			if (block[j] > 0)
			{
				return (int64_t)getCurrentAdress();
			}
		}
	}
	return -1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq %rbx, %rdi
callq 0xf7bc
testb %al, %al
je 0xf7b6
movq 0x298(%rbx), %rax
movq 0x2a0(%rbx), %rcx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0xf782
cmpb $0x0, (%rax,%rdx)
leaq 0x1(%rdx), %rdx
jle 0xf79e
movq %rbx, %rdi
popq %rbx
jmp 0xf83a
pushq $-0x1
popq %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/fileReader.cpp
// Function: FileReader::newBlock()
bool FileReader::newBlock()
{
	offset += readSize;
	readSize = std::min(getNumberOfElements(), std::min(blockSize, getNumberOfElements()-offset));
	if (readSize == 0)
	{
		bool ret = reloadBuffer();
		block = getBuffer();
		return ret;
	}
	block = &getBuffer()[offset];
	return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x2a0(%rdi), %rax
addq %rax, 0x2a8(%rdi)
callq 0x101e6
movq %rax, %r14
movq %rbx, %rdi
callq 0x101e6
subq 0x2a8(%rbx), %rax
movq 0x2b0(%rbx), %rcx
cmpq %rcx, %rax
cmovaeq %rcx, %rax
cmpq %r14, %rax
cmovaeq %r14, %rax
movq %rax, 0x2a0(%rbx)
movq %rbx, %rdi
testq %rax, %rax
je 0xf81d
callq 0x101f6
addq 0x2a8(%rbx), %rax
movb $0x1, %bpl
jmp 0xf82c
callq 0xf5e6
movl %eax, %ebp
movq %rbx, %rdi
callq 0x101f6
movq %rax, 0x298(%rbx)
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/fileReader.cpp
// Function: FileReader::findFirstEmptyBlock()
int64_t FileReader::findFirstEmptyBlock()
{
	while (newBlock()==true)
	{
		bool zero = true;
		for (size_t j = 0; j < readSize; ++j)
		{
			if (block[j] > 0)
			{
				zero = false;
				break;
			}
		}
		if (zero == true)
			return (int64_t)getCurrentAdress();
	}
	return -1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq %rbx, %rdi
callq 0xf7bc
testb %al, %al
je 0xf886
movq 0x298(%rbx), %rax
movq 0x2a0(%rbx), %rcx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0xf87d
cmpb $0x0, (%rax,%rdx)
leaq 0x1(%rdx), %rdx
jle 0xf86c
jmp 0xf850
movq %rbx, %rdi
popq %rbx
jmp 0xf83a
pushq $-0x1
popq %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/fileReader.cpp
// Function: FileReader::reset()
void FileReader::reset()
{
	Buffered_FileReader::reset();
	offset = 0;
	readSize = std::min(blockSize, Buffered_FileReader::getNumberOfElements());
	block = Buffered_FileReader::getBuffer();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x10224
andq $0x0, 0x2a8(%rbx)
movq %rbx, %rdi
callq 0x101e6
movq 0x2b0(%rbx), %rcx
cmpq %rcx, %rax
cmovbq %rax, %rcx
movq %rcx, 0x2a0(%rbx)
movq %rbx, %rdi
callq 0x101f6
movq %rax, 0x298(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/fileReader.cpp
// Function: FileReader::printBlock()
void FileReader::printBlock()
{
	for (unsigned int i = 0; i < readSize; i = i+16)
	{
		for (int j = 0; j < 16; ++j)
		{
			if (block[i+j] == 0)
			{
				std::cout << ".";
			}
			else
				std::cout << block[i+j];
		}
		std::cout << std::endl;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorl %r12d, %r12d
movq 0xe6a2(%rip), %r14      # 0x1dfb0
leaq 0x5995(%rip), %r15      # 0x152aa
movl %r12d, %r12d
cmpq %r12, 0x2a0(%rbx)
jbe 0xf968
xorl %r13d, %r13d
cmpq $0x10, %r13
je 0xf95a
movq 0x298(%rbx), %rax
addq %r12, %rax
movb (%r13,%rax), %al
testb %al, %al
je 0xf94a
movsbl %al, %esi
movq %r14, %rdi
callq 0x5400
jmp 0xf955
movq %r14, %rdi
movq %r15, %rsi
callq 0x5380
incq %r13
jmp 0xf924
movq %r14, %rdi
callq 0x5180
addl $0x10, %r12d
jmp 0xf915
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/fileReader.cpp
// Function: FileReader::getRelativePos[abi:cxx11]()
std::string FileReader::getRelativePos()
{
	size_t currentPos = getCurrentAdress();
	double blubb = (double)currentPos*100.0f/(double)getFileSize();
	char t[128];
	sprintf(t,"%16lu/%lu", currentPos, getFileSize());
	std::string out = std::string(t) + "\t\t"+std::to_string(blubb)+"%";
	return out;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %rdi
callq 0xf83a
movq %rax, %r15
movq %r12, %rdi
callq 0x10214
movq %rax, %r14
movq %r12, %rdi
callq 0x10214
leaq 0x4feb(%rip), %rsi      # 0x14998
leaq 0x90(%rsp), %r12
movq %r12, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x5080
leaq 0x70(%rsp), %r13
leaq 0xf(%rsp), %rdx
movq %r13, %rdi
movq %r12, %rsi
callq 0x5130
leaq 0x4fc1(%rip), %rdx      # 0x149a2
leaq 0x30(%rsp), %rdi
movq %r13, %rsi
callq 0xfb11
movq %r15, %xmm1
movq 0x3655(%rip), %xmm2     # 0x13050
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x3659(%rip), %xmm3     # 0x13060
subpd %xmm3, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x4f71(%rip), %xmm0     # 0x14990
movq %r14, %xmm1
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
subpd %xmm3, %xmm1
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
leaq 0x10(%rsp), %rdi
callq 0xfb97
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0xfb30
leaq 0x444f(%rip), %rdx      # 0x13eb0
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0xfb11
leaq 0x50(%rsp), %rdi
callq 0x5160
leaq 0x10(%rsp), %rdi
callq 0x5160
leaq 0x30(%rsp), %rdi
callq 0x5160
leaq 0x70(%rsp), %rdi
callq 0x5160
movq %rbx, %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x5160
jmp 0xfabc
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x5160
jmp 0xfacb
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x5160
jmp 0xfada
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x5160
movq %rbx, %rdi
callq 0x5610
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/bufferedFileReader.cpp
// Function: Buffered_FileReader::Buffered_FileReader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned long)
Buffered_FileReader::Buffered_FileReader(std::string path, size_t size) : m_path(path), m_bufferSize(size)
{
	m_fs.open(m_path.c_str(), std::ifstream::in | std::ifstream::binary);

	if (!(m_fs))
	{
		std::cerr << "ERROR FileReader::FileReader - Couldnt open file: " << path << std::endl;
		exit(EXIT_FAILURE);
	}
	//Get filesize
	m_fs.seekg(0,m_fs.end);
	m_fileSize = m_fs.tellg();
	m_fs.seekg(0,m_fs.beg);

	m_loadBuffer = new char[m_bufferSize];
	m_workBuffer = new char[m_bufferSize];

	m_elements = m_loadedElements = 0;
	m_globalAdress = 0;
	reloadBuffer();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
callq 0x53e0
leaq 0x210(%rbx), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x54b0
movq %r12, 0x230(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x260(%rbx)
movups %xmm0, 0x270(%rbx)
movups %xmm0, 0x280(%rbx)
andq $0x0, 0x290(%rbx)
movq 0x210(%rbx), %rsi
pushq $0xc
popq %rdx
movq %rbx, %rdi
callq 0x5220
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%rbx,%rax)
jne 0xfe2e
pushq $0x2
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x54a0
movq %rbx, %rdi
callq 0x5600
movq %rax, 0x208(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x54a0
movq 0x230(%rbx), %r15
movq %r15, %rdi
callq 0x5030
movq %rax, 0x250(%rbx)
movq %r15, %rdi
callq 0x5030
movq %rax, 0x258(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x238(%rbx)
andq $0x0, 0x248(%rbx)
movq %rbx, %rdi
callq 0xfe8a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0xe1bb(%rip), %rdi      # 0x1dff0
leaq 0x4b96(%rip), %rsi      # 0x149d2
callq 0x5380
movq %rax, %rdi
movq %r15, %rsi
callq 0x52f0
movq %rax, %rdi
callq 0x5180
pushq $0x1
popq %rdi
callq 0x5420
jmp 0xfe63
movq %rax, %r15
jmp 0xfe7a
movq %rax, %r15
leaq 0x268(%rbx), %rdi
callq 0xc0d4
movq %r14, %rdi
callq 0x5160
movq %rbx, %rdi
callq 0x50e0
movq %r15, %rdi
callq 0x5610
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/bufferedFileReader.cpp
// Function: Buffered_FileReader::reset()
void Buffered_FileReader::reset()
{
	m_localMtx.lock();
	m_fs.clear();
	m_fs.seekg(0, m_fs.beg);
	m_elements = m_loadedElements = 0;
	m_globalAdress = 0;
	m_localMtx.unlock();
	reloadBuffer();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x270(%rdi), %r14
movq %r14, %rdi
callq 0x10682
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
xorl %esi, %esi
callq 0x55d0
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x54a0
xorps %xmm0, %xmm0
movups %xmm0, 0x238(%rbx)
andq $0x0, 0x248(%rbx)
movq %r14, %rdi
callq 0x5280
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xfe8a
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/bufferedFileReader.cpp
// Function: Buffered_FileReader::closeFile()
void Buffered_FileReader::closeFile()
{
	m_localMtx.lock();
	if (m_fs.is_open())
	{
		m_fs.close();
	}
	m_localMtx.unlock();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x270(%rdi), %rbx
movq %rbx, %rdi
callq 0x10682
leaq 0x78(%r14), %rdi
callq 0x50c0
testb %al, %al
je 0x102ab
movq %r14, %rdi
callq 0x50a0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5280
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/fileWriter.cpp
// Function: FileWriter::FileWriter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned long)
FileWriter::FileWriter(std::string path, size_t bufferS)
{
	outPath = path;
	init = true;
	bufferSize = bufferS;
	workBuffer = new char[bufferSize];
	writeBuffer = new char[bufferSize];
	pos = 0;
	startTime = endTime = 0.0f;
	written = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
callq 0x55e0
leaq 0x200(%rbx), %r14
leaq 0x210(%rbx), %rax
movq %rax, 0x200(%rbx)
andq $0x0, 0x208(%rbx)
movb $0x0, 0x210(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x258(%rbx)
movups %xmm0, 0x268(%rbx)
movups %xmm0, 0x278(%rbx)
andq $0x0, 0x288(%rbx)
movq %r14, %rdi
movq %r12, %rsi
callq 0x51c0
movb $0x1, 0x240(%rbx)
movq %r15, 0x238(%rbx)
movq %r15, %rdi
callq 0x5030
movq %rax, 0x290(%rbx)
movq %r15, %rdi
callq 0x5030
movq %rax, 0x298(%rbx)
andq $0x0, 0x248(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x220(%rbx)
andq $0x0, 0x230(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r15
leaq 0x288(%rbx), %rdi
callq 0xc0d4
movq %r14, %rdi
callq 0x5160
movq %rbx, %rdi
callq 0x5510
movq %r15, %rdi
callq 0x5610
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/fileWriter.cpp
// Function: FileWriter::getTransferRate()
double FileWriter::getTransferRate()
{
	double tmp = endTime - startTime;
	tmp = written/(double)tmp;
	tmp /= 1024.0f;
	tmp *= 1000.0f;
	tmp /= 1024.0f;
	tmp *= 1000.0f;
	return tmp;
}

// Assembly:
movsd 0x228(%rdi), %xmm1
subsd 0x220(%rdi), %xmm1
movsd 0x230(%rdi), %xmm2
unpcklps 0x26ef(%rip), %xmm2     # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1]
subpd 0x26f7(%rip), %xmm2     # 0x13060
movapd %xmm2, %xmm0
unpckhpd %xmm2, %xmm0            # xmm0 = xmm0[1],xmm2[1]
addsd %xmm2, %xmm0
divsd %xmm1, %xmm0
movsd 0x26c7(%rip), %xmm1     # 0x13048
mulsd %xmm1, %xmm0
movsd 0x444b(%rip), %xmm2     # 0x14dd8
mulsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
mulsd %xmm2, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/fileWriter.cpp
// Function: FileWriter::writeToFile(char*, unsigned long)
bool FileWriter::writeToFile(char *buf, size_t size)
{
	//Buffer is written async
	size_t counter = 0;
	while (counter < size)
	{
		if (pos >= bufferSize)
		{
			//If the first buffer should be written, the file has to be opened
			if (init == true)
			{
				startTime = endTime = timeU();
				fs.open(outPath.c_str(), std::fstream::out);
				if (!(fs))
				{
					std::cerr << "ERROR FileWriter::FileWriter - Couldnt open file: " << outPath << std::endl;
					exit(EXIT_FAILURE);
				}
				init = false;
			}
			if (writeAsync() == false)
			{
				std::cerr << "Something went terribly wrong! " << std::endl;
				return false;
			}
			continue;
		}
		workBuffer[pos] = buf[counter];
		++pos;
		++counter;
	}
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x200(%rdi), %rbx
xorl %r13d, %r13d
pushq $0x10
popq %rbp
cmpq %r14, %r13
je 0x10a4e
movq 0x248(%r12), %rax
cmpq 0x238(%r12), %rax
jb 0x10a2f
cmpb $0x1, 0x240(%r12)
jne 0x10a25
callq 0x10a8e
movsd %xmm0, 0x228(%r12)
movsd %xmm0, 0x220(%r12)
movq 0x200(%r12), %rsi
movq %r12, %rdi
movl %ebp, %edx
callq 0x5050
movq (%r12), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r12,%rax)
jne 0x10a5f
movb $0x0, 0x240(%r12)
movq %r12, %rdi
callq 0x10ab6
jmp 0x109c4
movb (%r15,%r13), %cl
movq 0x290(%r12), %rdx
movb %cl, (%rdx,%rax)
incq 0x248(%r12)
incq %r13
jmp 0x109bb
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xd58a(%rip), %rdi      # 0x1dff0
leaq 0x439b(%rip), %rsi      # 0x14e08
callq 0x5380
movq %rax, %rdi
movq %rbx, %rsi
callq 0x52f0
movq %rax, %rdi
callq 0x5180
pushq $0x1
popq %rdi
callq 0x5420
nop
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/fileWriter.cpp
// Function: FileWriter::closeFile()
bool FileWriter::closeFile()
{
	//Check if file is open
	if (fs.is_open())
	{
		writeAsync();
		localMtx.lock();
		fs.close();
		localMtx.unlock();
		//Using Unix, the hashsums are calculated
#ifndef WINDOWS
		std::string sys = "md5sum ";
		sys += outPath;
		std::cout << std::endl;
		std::cout << "Hash5 for " << outPath << ":" << std::endl;
		if (system(sys.c_str()))
		{}
		std::cout << std::endl;
#endif
	}
	return true;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
addq $0x70, %rdi
callq 0x50c0
testb %al, %al
je 0x10f0e
movq %rbx, %rdi
callq 0x10ab6
leaq 0x258(%rbx), %r14
movq %r14, %rdi
callq 0x10682
movq %rbx, %rdi
callq 0x54d0
movq %r14, %rdi
callq 0x5280
leaq 0x2bd8(%rip), %rsi      # 0x13a61
leaq 0x8(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0x5130
addq $0x200, %rbx            # imm = 0x200
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5670
movq 0xd0fc(%rip), %rdi      # 0x1dfb0
callq 0x5180
movq 0xd0f0(%rip), %rdi      # 0x1dfb0
leaq 0x2ba2(%rip), %rsi      # 0x13a69
callq 0x5380
movq %rax, %rdi
movq %rbx, %rsi
callq 0x52f0
leaq 0x265b(%rip), %rsi      # 0x13539
movq %rax, %rdi
callq 0x5380
movq %rax, %rdi
callq 0x5180
movq 0x8(%rsp), %rdi
callq 0x52c0
movq 0xd0b1(%rip), %rdi      # 0x1dfb0
callq 0x5180
leaq 0x8(%rsp), %rdi
callq 0x5160
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5160
movq %rbx, %rdi
callq 0x5610
nop
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/fileWriter.cpp
// Function: FileWriter::setPath(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void FileWriter::setPath(std::string path)
{
	closeFile();
	pos = 0;
	outPath = path;
	init = true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x10e40
andq $0x0, 0x248(%r14)
leaq 0x200(%r14), %rdi
movq %rbx, %rsi
callq 0x51c0
movb $0x1, 0x240(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/fileWriter.cpp
// Function: FileWriter::write()
bool FileWriter::write()
{
	//If file is valid, write
	mtx.lock();
	if(fs.is_open() && fs.good())
	{
		fs.write(writeBuffer, toWrite);
		written += toWrite;
		endTime = timeU();
	}
	mtx.unlock();

	if (fs.bad())
	{
		std::cerr << "Writer is bad" << std::endl;
		return false;
	}
	return true;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xd41b(%rip), %rdi      # 0x1e3a0
callq 0x10682
leaq 0x70(%rbx), %rdi
callq 0x50c0
testb %al, %al
je 0x10fd6
movq (%rbx), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%rbx,%rax)
jne 0x10fd6
movq 0x250(%rbx), %rdx
movq 0x298(%rbx), %rsi
movq %rbx, %rdi
callq 0x5490
movq 0x250(%rbx), %rax
addq %rax, 0x230(%rbx)
callq 0x10a8e
movsd %xmm0, 0x228(%rbx)
leaq 0xd3c3(%rip), %rdi      # 0x1e3a0
callq 0x5280
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x20(%rbx,%rax), %ebx
testb $0x1, %bl
je 0x1100d
movq 0xcff7(%rip), %rdi      # 0x1dff0
leaq 0x3e3b(%rip), %rsi      # 0x14e3b
callq 0x5380
movq %rax, %rdi
callq 0x5180
testb $0x1, %bl
sete %al
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lrq3000[P]rfrb/./src/raidRecover.cpp
// Function: RaidRecover::RaidRecover(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
RaidRecover::RaidRecover(std::string inPath, std::string outPath)
{
	outP = outPath;
	inP = inPath;
	handle = new FileHandler(inPath, outPath);
	system = new RaidSystem(handle);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
xorl %eax, %eax
movb %al, 0x10(%rdi)
leaq 0x20(%rdi), %r14
leaq 0x30(%rdi), %rcx
movq %rcx, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
movb %al, 0x30(%rdi)
movq %rdx, %rsi
callq 0x51c0
movq %r14, %rdi
movq %r13, %rsi
callq 0x51c0
pushq $0x68
popq %rdi
callq 0x5390
movq %rax, %r15
leaq 0x20(%rsp), %rdi
movq %r13, %rsi
callq 0x54b0
movq %rsp, %rdi
movq %r12, %rsi
callq 0x54b0
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
movq %r15, %rdi
callq 0x7542
movq %r15, 0x40(%rbx)
movq %rsp, %rdi
callq 0x5160
leaq 0x20(%rsp), %rdi
callq 0x5160
pushq $0x30
popq %rdi
callq 0x5390
movq %rax, %r15
movq 0x40(%rbx), %rsi
movq %rax, %rdi
callq 0x58f6
movq %r15, 0x48(%rbx)
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x11598
movq %rax, %r12
movq %rsp, %rdi
callq 0x5160
jmp 0x1158c
movq %rax, %r12
leaq 0x20(%rsp), %rdi
callq 0x5160
jmp 0x1159b
movq %rax, %r12
movq %r15, %rdi
callq 0x5360
jmp 0x115a8
movq %rax, %r12
movq %r14, %rdi
callq 0x5160
movq %rbx, %rdi
callq 0x5160
movq %r12, %rdi
callq 0x5610