LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/pollo[P]graph-partitioning/graph.cpp
// Function: Graph::print_graph() const
void Graph::print_graph() const
{
/*  for (int i=0; i<nodes_number; i++)
  {
    printf("Node %d has neighbors: ",i);
    const vector<int>& neighbors = get_neighbors(i);
    for (vector<int>::const_iterator it = neighbors.begin();
         it != neighbors.end();
         it++)
    {
      printf("%d ",*it);
    }
    printf("\n");
    }*/
  printf("%d %lld\n",counted_nodes_number, counted_edges_number);
  for (int i=0; i<counted_nodes_number; i++)
  {
    const vector<int>& neighbors = get_neighbors(i);
    bool no = true;
    for (vector<int>::const_iterator it = neighbors.begin();
         it != neighbors.end();
         it++)
    {
      no = false;
      printf("%d ",*it+1);
    }
    if (no)
      printf("%d ",i+1);
    printf("\n");
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x8(%rdi), %esi
movq (%rdi), %rdx
leaq 0x28be(%rip), %rdi      # 0x5243
xorl %eax, %eax
callq 0x2030
leaq 0x28b9(%rip), %r14      # 0x524c
xorl %r15d, %r15d
movslq 0x8(%rbx), %rax
cmpq %rax, %r15
jge 0x29f1
movq 0x10(%rbx), %rax
imulq $0x18, %r15, %rcx
leaq (%rax,%rcx), %r12
movq (%rax,%rcx), %r13
movb $0x1, %bpl
cmpq 0x8(%r12), %r13
je 0x29d1
movl (%r13), %esi
incl %esi
xorl %ebp, %ebp
movq %r14, %rdi
xorl %eax, %eax
callq 0x2030
addq $0x4, %r13
jmp 0x29b2
incq %r15
testb $0x1, %bpl
je 0x29e7
movq %r14, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x2030
pushq $0xa
popq %rdi
callq 0x21f0
jmp 0x2996
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/pollo[P]graph-partitioning/graph.cpp
// Function: Graph::get_nodes_randomly(std::vector<int, std::allocator<int>>*) const
void Graph::get_nodes_randomly(vector<int>* nodes) const {
  srand ( unsigned ( std::time(0) ) );
  nodes->resize(counted_nodes_number);
  for (int i=0; i<counted_nodes_number; i++)
    (*nodes)[i] = i;
  random_shuffle(nodes->begin(), nodes->end(), myrandom);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
xorl %edi, %edi
callq 0x2160
movl %eax, %edi
callq 0x2180
movslq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x2e7a
movq (%rbx), %rdi
movslq 0x8(%r14), %rax
cmpq %rax, %r15
jge 0x2a59
movl %r15d, (%rdi,%r15,4)
incq %r15
jmp 0x2a47
movq 0x8(%rbx), %rsi
leaq -0x58(%rip), %rdx       # 0x2a0c
popq %rbx
popq %r14
popq %r15
jmp 0x2eab
// File: /workspace/github_cpp_makefile_star2_O2/pollo[P]graph-partitioning/graph.cpp
// Function: Graph::get_nodes_bfs(std::vector<int, std::allocator<int>>*) const
void Graph::get_nodes_bfs(vector<int>* nodes) const {
  vector<bool> visited(counted_nodes_number, false);
  queue<int> q;

  nodes->reserve(counted_nodes_number);

  for (int i=0; i<counted_nodes_number; i++)
  {
    if (!visited[i])
    {
      visited[i] = true;
      q.push(i);
      while (!q.empty())
      {
        int node = q.front();
        nodes->push_back(node);
        q.pop();
        for (vector<int>::const_iterator neighbor =
               get_neighbors(node).begin();
             neighbor != get_neighbors(node).end();
             ++neighbor)
        {
          if (!visited[*neighbor])
          {
            visited[*neighbor] = true;
            q.push(*neighbor);
          }
        }
      }
    }
  }

  printf("%d %d\n",counted_nodes_number, (int)nodes->size());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movslq 0x8(%rdi), %rsi
leaq 0x38(%rsp), %rdx
movb $0x0, (%rdx)
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rcx
callq 0x2f02
leaq 0x38(%rsp), %rdi
callq 0x2f66
movslq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x2f82
xorl %eax, %eax
leaq 0x10(%rsp), %r15
leaq 0x38(%rsp), %r12
leaq 0xc(%rsp), %rbp
movl %eax, 0x8(%rsp)
movl 0x8(%r14), %esi
cmpl %esi, %eax
jge 0x2b88
movslq %eax, %rsi
movq %r15, %rdi
callq 0x3018
testq %rdx, (%rax)
je 0x2aef
movl 0x8(%rsp), %eax
incl %eax
jmp 0x2ac7
movslq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x3018
orq %rdx, (%rax)
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
callq 0x38c2
movq 0x48(%rsp), %rax
cmpq %rax, 0x68(%rsp)
je 0x2ae7
movl (%rax), %eax
movl %eax, 0xc(%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x2e5c
movq %r12, %rdi
callq 0x3af6
movslq 0xc(%rsp), %rax
movq 0x10(%r14), %rcx
imulq $0x18, %rax, %rdx
movq (%rcx,%rdx), %r13
cltq
imulq $0x18, %rax, %rax
cmpq 0x8(%rcx,%rax), %r13
je 0x2b0c
movslq (%r13), %rsi
movq %r15, %rdi
callq 0x3018
testq %rdx, (%rax)
jne 0x2b7a
movslq (%r13), %rsi
movq %r15, %rdi
callq 0x3018
orq %rdx, (%rax)
movq %r12, %rdi
movq %r13, %rsi
callq 0x38c2
addq $0x4, %r13
movl 0xc(%rsp), %eax
movq 0x10(%r14), %rcx
jmp 0x2b42
movq 0x8(%rbx), %rdx
subq (%rbx), %rdx
shrq $0x2, %rdx
leaq 0x26b6(%rip), %rdi      # 0x5250
xorl %eax, %eax
callq 0x2030
leaq 0x38(%rsp), %rdi
callq 0x3046
leaq 0x10(%rsp), %rdi
callq 0x3036
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2bda
movq %rax, %rbx
jmp 0x2be7
jmp 0x2bda
jmp 0x2bda
jmp 0x2bda
jmp 0x2bda
jmp 0x2bda
jmp 0x2bda
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x3046
leaq 0x10(%rsp), %rdi
callq 0x3036
movq %rbx, %rdi
callq 0x2280
nop
// File: /workspace/github_cpp_makefile_star2_O2/pollo[P]graph-partitioning/graph.cpp
// Function: Graph::get_fraction_edges_cut(Partition const&) const
double Graph::get_fraction_edges_cut(const Partition& partition) const {
  long long int edges_cut = 0;

  for (int node = 0; node < counted_nodes_number; node++)
  {
    int node_partition = partition.get_node_partition(node);
    for (vector<int>::const_iterator neighbor = neighbors[node].begin();
         neighbor != neighbors[node].end();
         ++neighbor)
    {
      if (node_partition != partition.get_node_partition(*neighbor))
        edges_cut++;
    }
  }

  edges_cut /= 2;

  return ((double) edges_cut)/counted_edges_number;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
xorl %r12d, %r12d
movslq 0x8(%rbx), %rax
cmpq %rax, %r15
jge 0x2c66
movq %r14, %rdi
movl %r15d, %esi
callq 0x3f8e
movl %eax, %ebp
movq 0x10(%rbx), %rax
movq %r15, (%rsp)
imulq $0x18, %r15, %r13
movq (%rax,%r13), %r15
cmpq 0x8(%rax,%r13), %r15
je 0x2c5d
movl (%r15), %esi
movq %r14, %rdi
callq 0x3f8e
xorl %ecx, %ecx
cmpl %eax, %ebp
setne %cl
addq %rcx, %r12
addq $0x4, %r15
movq 0x10(%rbx), %rax
jmp 0x2c37
movq (%rsp), %r15
incq %r15
jmp 0x2c11
pushq $0x2
popq %rcx
movq %r12, %rax
cqto
idivq %rcx
cvtsi2sd %rax, %xmm0
cvtsi2sdq (%rbx), %xmm1
divsd %xmm1, %xmm0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/pollo[P]graph-partitioning/graph.cpp
// Function: Graph::get_communication_volume(Partition const&) const
double Graph::get_communication_volume(const Partition& partition) const
{
  int communication_volume = 0;

  for (int node = 0; node < counted_nodes_number; node++)
  {
    int node_partition = partition.get_node_partition(node);
    vector<bool> seen_partition(partition.get_partitions_number(), false);
    for (vector<int>::const_iterator neighbor = neighbors[node].begin();
         neighbor != neighbors[node].end();
         ++neighbor)
    {
      int neighbor_partition = partition.get_node_partition(*neighbor);
      if (node_partition != neighbor_partition &&
          !seen_partition[neighbor_partition])
      {
        communication_volume ++;
        seen_partition[neighbor_partition] = true;
      }
    }
  }

  double fraction_communication_volume = ((double) communication_volume) /
    (counted_nodes_number * (partition.get_partitions_number()-1));

  return fraction_communication_volume;;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
movl $0x0, 0x10(%rsp)
movslq 0x8(%r14), %r15
cmpq %r15, %r12
jge 0x2d5e
movq %rbx, %rdi
movl %r12d, %esi
callq 0x3f8e
movl %eax, %r13d
movq %rbx, %rdi
callq 0x3fa6
movslq %eax, %rsi
movb $0x0, 0xe(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0xe(%rsp), %rdx
leaq 0xf(%rsp), %rcx
callq 0x2f02
movq 0x10(%r14), %rax
movq %r12, 0x18(%rsp)
imulq $0x18, %r12, %r12
movq (%rax,%r12), %r15
cmpq 0x8(%rax,%r12), %r15
je 0x2d47
movl (%r15), %esi
movq %rbx, %rdi
callq 0x3f8e
cmpl %eax, %r13d
je 0x2d3d
movslq %eax, %rbp
leaq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0x3018
testq %rdx, (%rax)
jne 0x2d3d
leaq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0x3018
incl 0x10(%rsp)
orq %rdx, (%rax)
addq $0x4, %r15
movq 0x10(%r14), %rax
jmp 0x2cfd
leaq 0x20(%rsp), %rdi
callq 0x3036
movq 0x18(%rsp), %r12
incq %r12
jmp 0x2cad
cvtsi2sdl 0x10(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
callq 0x3fa6
decl %eax
imull %r15d, %eax
cvtsi2sd %eax, %xmm1
movsd 0x10(%rsp), %xmm0
divsd %xmm1, %xmm0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2d99
jmp 0x2d99
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x3036
movq %rbx, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O2/pollo[P]graph-partitioning/graph.cpp
// Function: Graph::get_normalized_maximum_load(Partition const&) const
double Graph::get_normalized_maximum_load(const Partition& partition) const {
  int maximum_load = 0;

  for (int i=0; i<partition.get_partitions_number(); i++)
  {
    int partition_size = partition.get_partition_size(i);
    if (partition_size > maximum_load)
      maximum_load = partition_size;
  }

  return maximum_load / \
    ((double) counted_nodes_number / partition.get_partitions_number());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %ebp, %ebp
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x3fa6
cmpl %eax, %ebp
jge 0x2de4
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3f9a
cmpl %r15d, %eax
cmovgl %eax, %r15d
incl %ebp
jmp 0x2dc3
cvtsi2sd %r15d, %xmm0
movsd %xmm0, 0x10(%rsp)
cvtsi2sdl 0x8(%r14), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
callq 0x3fa6
cvtsi2sd %eax, %xmm0
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
divsd %xmm1, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/pollo[P]graph-partitioning/loaders.cpp
// Function: snap_loader(Graph*, char const*)
void snap_loader(Graph* graph, const char* file_name) {
  int n,m;
  int from, to;
  char buffer[1000];
  FILE *fp = fopen(file_name, "r");

  if (fp == NULL)
  {
    printf("File %s not found\n",file_name);
    exit(1);
  }

  fgets(buffer, sizeof buffer, fp);
  fgets(buffer, sizeof buffer, fp);
  fgets(buffer, sizeof buffer, fp);
  sscanf(buffer, "# Nodes: %d Edges: %d",&n,&m);

  //read edges
  while (fgets(buffer, sizeof buffer, fp) != NULL)
  {
    if (buffer[0] != '#')
    {
      sscanf(buffer, "%d\t%d", &from,&to);
      graph->add_neighbor(from,to);
    }
  }

  //graph->print_graph_size();

  fclose(fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3f8, %rsp            # imm = 0x3F8
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x163f(%rip), %rsi      # 0x51a9
movq %r15, %rdi
callq 0x21d0
testq %rax, %rax
je 0x3c37
movq %rax, %r14
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
movq %rax, %rdx
callq 0x2230
movq %r15, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
movq %r14, %rdx
callq 0x2230
movq %r15, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
movq %r14, %rdx
callq 0x2230
leaq 0x1724(%rip), %rsi      # 0x52de
leaq 0xc(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %r15, %rdi
xorl %eax, %eax
callq 0x2190
leaq 0x171f(%rip), %r12      # 0x52f4
leaq 0x4(%rsp), %r13
movq %rsp, %rbp
movq %r15, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
movq %r14, %rdx
callq 0x2230
testq %rax, %rax
je 0x3c1d
cmpb $0x23, 0x10(%rsp)
je 0x3bdd
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x2190
movl 0x4(%rsp), %esi
movl (%rsp), %edx
movq %rbx, %rdi
callq 0x288c
jmp 0x3bdd
movq %r14, %rdi
callq 0x21a0
addq $0x3f8, %rsp            # imm = 0x3F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x168d(%rip), %rdi      # 0x52cb
movq %r15, %rsi
xorl %eax, %eax
callq 0x2030
pushq $0x1
popq %rdi
callq 0x21e0
// File: /workspace/github_cpp_makefile_star2_O2/pollo[P]graph-partitioning/loaders.cpp
// Function: preprocessed_loader(Graph*, char const*)
void preprocessed_loader(Graph* graph, const char* file_name) {
  int n,m;
  int from, to;
  char buffer[1000];
  char pre_file_name[1000];
  strcpy(pre_file_name, file_name);
  strcat(pre_file_name, ".preprocessed");

  printf("%s\n",pre_file_name);

  FILE *fp = fopen(pre_file_name, "r");

  fgets(buffer, sizeof buffer, fp);
  sscanf(buffer, "%d %d\n",&n,&m);

  //read edges
  while (fgets(buffer, sizeof buffer, fp) != NULL)
  {
    sscanf(buffer, "%d %d", &from,&to);
    graph->add_neighbor(from,to);
  }

  graph->print_graph_size();

  fclose(fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7e8, %rsp            # imm = 0x7E8
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x2170
movq %r14, %rdi
callq 0x20c0
movabsq $0x636f72706572702e, %rcx # imm = 0x636F72706572702E
movq %rcx, 0x10(%rsp,%rax)
movabsq $0x6465737365636f, %rcx # imm = 0x6465737365636F
movq %rcx, 0x16(%rsp,%rax)
movq %r14, %rdi
callq 0x2220
leaq 0x1503(%rip), %rsi      # 0x51a9
movq %r14, %rdi
callq 0x21d0
movq %rax, %r14
leaq 0x400(%rsp), %r15
movq %r15, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
movq %rax, %rdx
callq 0x2230
leaq 0x1580(%rip), %rsi      # 0x5250
leaq 0xc(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %r15, %rdi
xorl %eax, %eax
callq 0x2190
leaq 0x161d(%rip), %r12      # 0x5308
leaq 0x4(%rsp), %r13
movq %rsp, %rbp
movq %r15, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
movq %r14, %rdx
callq 0x2230
testq %rax, %rax
je 0x3d2c
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x2190
movl 0x4(%rsp), %esi
movl (%rsp), %edx
movq %rbx, %rdi
callq 0x288c
jmp 0x3cf3
movq %rbx, %rdi
callq 0x2942
movq %r14, %rdi
callq 0x21a0
addq $0x7e8, %rsp            # imm = 0x7E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/pollo[P]graph-partitioning/loaders.cpp
// Function: elt_loader(Graph*)
void elt_loader(Graph* graph) {
  int n,m;
  int neighbor;
  string line;
  ifstream elt_file(ELT_FILE);

  elt_file >> n;
  elt_file >> m;

  //read edges
  getline(elt_file, line);
  for (int i=0 ; i<n; i++)
  {
    getline(elt_file, line);
    stringstream linestream(line);

    while (linestream >> neighbor)
    {
      neighbor--;
      graph->add_neighbor(i, neighbor);
    }
  }

  graph->print_graph_size();

  elt_file.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3c8, %rsp            # imm = 0x3C8
movq %rdi, %rbx
leaq 0x28(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x1594(%rip), %rsi      # 0x530e
leaq 0x38(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x2290
leaq 0x38(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x2120
leaq 0x38(%rsp), %rdi
leaq 0x14(%rsp), %rsi
callq 0x2120
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x2040
xorl %ebp, %ebp
leaq 0x18(%rsp), %r15
leaq 0x240(%rsp), %r12
pushq $0x18
popq %r13
leaq 0xc(%rsp), %r14
cmpl 0x10(%rsp), %ebp
jge 0x3e28
leaq 0x38(%rsp), %rdi
movq %r15, %rsi
callq 0x2040
movq %r12, %rdi
movq %r15, %rsi
movl %r13d, %edx
callq 0x2240
movq %r12, %rdi
movq %r14, %rsi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3e1c
movl 0xc(%rsp), %edx
decl %edx
movl %edx, 0xc(%rsp)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x288c
jmp 0x3ded
movq %r12, %rdi
callq 0x2130
incl %ebp
jmp 0x3dcc
movq %rbx, %rdi
callq 0x2942
leaq 0x38(%rsp), %rdi
callq 0x2050
leaq 0x38(%rsp), %rdi
callq 0x2070
leaq 0x18(%rsp), %rdi
callq 0x20d0
addq $0x3c8, %rsp            # imm = 0x3C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x3e88
jmp 0x3e69
jmp 0x3e69
movq %rax, %rbx
jmp 0x3e7e
movq %rax, %rbx
leaq 0x240(%rsp), %rdi
callq 0x2130
leaq 0x38(%rsp), %rdi
callq 0x2070
leaq 0x18(%rsp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O2/pollo[P]graph-partitioning/loaders.cpp
// Function: twitter_loader(Graph*)
void twitter_loader(Graph* graph) {
  int from, to;
  char buffer[1000];
  FILE *fp = fopen(TWITTER_FILE, "r");

  //read edges
  while (fgets(buffer, sizeof buffer, fp) != NULL)
  {
      sscanf(buffer, "%d\t%d", &from,&to);
      graph->add_neighbor(from,to);
  }

  graph->print_graph_size();

  fclose(fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3f8, %rsp            # imm = 0x3F8
movq %rdi, %rbx
leaq 0x1470(%rip), %rdi      # 0x5325
leaq 0x12ed(%rip), %rsi      # 0x51a9
callq 0x21d0
movq %rax, %r14
leaq 0x10(%rsp), %r15
leaq 0x1424(%rip), %r12      # 0x52f4
leaq 0xc(%rsp), %r13
leaq 0x8(%rsp), %rbp
movq %r15, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
movq %r14, %rdx
callq 0x2230
testq %rax, %rax
je 0x3f14
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x2190
movl 0xc(%rsp), %esi
movl 0x8(%rsp), %edx
movq %rbx, %rdi
callq 0x288c
jmp 0x3eda
movq %rbx, %rdi
callq 0x2942
movq %r14, %rdi
callq 0x21a0
addq $0x3f8, %rsp            # imm = 0x3F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/pollo[P]graph-partitioning/partition.cpp
// Function: Partition::set_size(int, int)
void Partition::set_size(int nodes_number, int partitions_number)
{
  this->nodes_number = nodes_number;
  this->partitions_number = partitions_number;
  //-1 means not yet assigned
  partitions.resize(nodes_number, -1);
  partition_sizes.resize(partitions_number, 0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
addq $0x8, %rdi
movslq %esi, %rsi
leaq 0x4(%rsp), %rdx
orl $-0x1, (%rdx)
callq 0x3faa
addq $0x20, %r14
movslq %ebx, %rsi
movq %rsp, %rdx
andl $0x0, (%rdx)
movq %r14, %rdi
callq 0x3faa
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH16_TemplatesAndGenericProgramming/examples/./Blob.h
// Function: BlobPtr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::operator++()
BlobPtr<T>& BlobPtr<T>::operator++()
{
	// if curr already points past the end of the container, can't increment it
	check(curr, "increment past end of BlobPtr");
	++curr;       // advance the current state
	return *this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %r14
leaq 0x19a1(%rip), %rsi      # 0x4060
leaq -0x50(%rbp), %r15
leaq -0x19(%rbp), %rdx
movq %r15, %rdi
callq 0x2060
leaq -0x30(%rbp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x2fec
leaq -0x28(%rbp), %rdi
callq 0x2814
leaq -0x50(%rbp), %rdi
callq 0x2080
incq 0x10(%rbx)
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH16_TemplatesAndGenericProgramming/examples/./Blob.h
// Function: BlobPtr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::check(unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
std::shared_ptr<std::vector<T>> BlobPtr<T>::check(std::size_t i, const std::string& msg) const
{
	auto ret = wptr.lock();   // is the vector still around?
	if (!ret)
		throw std::runtime_error("unbound BlobPtr");
	if (i >= ret->size())
		throw std::out_of_range(msg);
	return ret; // otherwise, return a shared_ptr to the vector
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r14
movq %rdi, %rbx
callq 0x2f6a
movq (%rbx), %rax
testq %rax, %rax
je 0x302a
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x5, %rcx
cmpq %r14, %rcx
jbe 0x3054
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x20a0
movq %rax, %r14
leaq 0x1042(%rip), %rsi      # 0x407e
movq %rax, %rdi
callq 0x2050
movq 0x3f65(%rip), %rdx      # 0x6fb0
movq 0x3f9e(%rip), %rsi      # 0x6ff0
jmp 0x3078
pushq $0x10
popq %rdi
callq 0x20a0
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0x2180
movq 0x3f57(%rip), %rdx      # 0x6fc8
movq 0x3f58(%rip), %rsi      # 0x6fd0
movq %r14, %rdi
callq 0x21b0
jmp 0x3082
movq %rax, %r15
movq %r14, %rdi
callq 0x20d0
jmp 0x3092
movq %rax, %r15
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x2814
movq %r15, %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/FDIR/main_FDIR.cpp
// Function: gestion_wd_arduino(void*)
void* gestion_wd_arduino(void* args)
{
	while(1)
	{
		if(set_wd_ard==true)
		{
			myFDIR.set_arduino();//on demande a mettre la pin a 1
			usleep(5000);
			myFDIR.reset_arduino();//on demande a mettre la pin a 0
			usleep(20000);
			set_wd_ard=false;
		}

		usleep(100);
	}

	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x463a(%rip), %rbx      # 0x7204
pushq $0x64
popq %r14
cmpb $0x1, 0x4653(%rip)      # 0x7228
jne 0x2c02
movq %rbx, %rdi
callq 0x363e
movl $0x1388, %edi           # imm = 0x1388
callq 0x2220
movq %rbx, %rdi
callq 0x364c
movl $0x4e20, %edi           # imm = 0x4E20
callq 0x2220
movb $0x0, 0x4626(%rip)      # 0x7228
movl %r14d, %edi
callq 0x2220
jmp 0x2bce
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/FDIR/main_FDIR.cpp
// Function: ARINC_PID(int)
void ARINC_PID(int signal)
{
	ifstream fichier;
	fichier.open("pid_ARINC");
	string line;
	if(!fichier)
	{
		cout << "Failed to open pid_ARINC" << endl;
		exit(1);
	}
	getline(fichier,line);
	arinc_pid=atoi(line.c_str());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
leaq -0x230(%rbp), %rbx
movq %rbx, %rdi
callq 0x21b0
leaq 0x1333(%rip), %rsi      # 0x423c
pushq $0x8
popq %rdx
movq %rbx, %rdi
callq 0x2100
leaq -0x18(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq -0x230(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x210(%rbp,%rax)
jne 0x2f79
leaq -0x230(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x2080
leaq -0x28(%rbp), %rbx
movq (%rbx), %rdi
callq 0x22b0
movl %eax, 0x427d(%rip)      # 0x71d8
movq %rbx, %rdi
callq 0x20e0
leaq -0x230(%rbp), %rdi
callq 0x20b0
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %rbp
retq
movq 0x4050(%rip), %rdi      # 0x6fd0
leaq 0x12a6(%rip), %rsi      # 0x422d
callq 0x21a0
movq %rax, %rdi
callq 0x20f0
pushq $0x1
popq %rdi
callq 0x21e0
movq %rax, %rbx
jmp 0x2fad
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x20e0
leaq -0x230(%rbp), %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/FDIR/main_FDIR.cpp
// Function: reboot_PM(void*)
void* reboot_PM(void* args)
{
	// reboot PM
	system("xterm -e ./main_PM &");
	sleep(1);

	// maj du listpid
	maj_listpid();

	// previent ARINC qu'il faut prendre en compte la modif de listpid
	if(arinc_pid!=-1)
		kill(arinc_pid,SIGUSR1);

	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x127a(%rip), %rdi      # 0x4246
callq 0x2150
pushq $0x1
popq %rdi
callq 0x2120
callq 0x2c0c
movl 0x41f4(%rip), %edi      # 0x71d8
cmpl $-0x1, %edi
je 0x2ff1
pushq $0xa
popq %rsi
callq 0x2230
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/FDIR/main_FDIR.cpp
// Function: reboot_COM(void*)
void* reboot_COM(void* args)
{
	// reboot COM
	system("xterm -e ./main_Com_ST &");
	sleep(1);

	// maj du listpid
	maj_listpid();

	// previent ARINC qu'il faut prendre en compte la modif de listpid
	if(arinc_pid!=-1)
		kill(arinc_pid,SIGUSR1);

	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x125b(%rip), %rdi      # 0x425b
callq 0x2150
pushq $0x1
popq %rdi
callq 0x2120
callq 0x2c0c
movl 0x41c0(%rip), %edi      # 0x71d8
cmpl $-0x1, %edi
je 0x3025
pushq $0xa
popq %rsi
callq 0x2230
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/FDIR/main_FDIR.cpp
// Function: recouvrement_COM()
void recouvrement_COM()
{
	// tolere faute par crash pas par freeze, sinon faut tuer process avant et donc recup les pid de tout le monde

	if(rec_COM)
	{
		// autre time out
		cout << "faut changer de raspy my boi" << endl;
	}
	else
	{
		rec_COM=true;

		pthread_attr_t *thread_attributes;
	        pthread_t *thread;

	        thread_attributes=(pthread_attr_t *)malloc(sizeof(pthread_attr_t));
	        thread=(pthread_t *)malloc(sizeof(pthread_t));

	        pthread_attr_init(thread_attributes);
	        if (pthread_create(thread, thread_attributes, reboot_COM,(void *) NULL) != 0)
	                perror ("Thread FDIR COM!");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpb $0x1, 0x425d(%rip)      # 0x7294
jne 0x3058
movq 0x3f90(%rip), %rdi      # 0x6fd0
leaq 0x122d(%rip), %rsi      # 0x4274
callq 0x21a0
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x20f0
movb $0x1, 0x4235(%rip)      # 0x7294
pushq $0x38
popq %rdi
callq 0x2200
movq %rax, %rbx
pushq $0x8
popq %rdi
callq 0x2200
movq %rax, %r14
movq %rbx, %rdi
callq 0x21f0
leaq -0x8f(%rip), %rdx       # 0x2ff5
movq %r14, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x2340
testl %eax, %eax
jne 0x309a
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x11f0(%rip), %rdi      # 0x4291
popq %rbx
popq %r14
popq %rbp
jmp 0x2140
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/FDIR/main_FDIR.cpp
// Function: recouvrement_PM()
void recouvrement_PM()
{
	// tolere faute par crash pas par freeze, sinon faut tuer process avant et donc recup les pid de tout le monde

	if(rec_PM)
	{
		cout << "faut changer de raspy my boi" << endl;
	}
	else
	{
		rec_PM=true;

		pthread_attr_t *thread_attributes;
	        pthread_t *thread;

	        thread_attributes=(pthread_attr_t *)malloc(sizeof(pthread_attr_t));
	        thread=(pthread_t *)malloc(sizeof(pthread_t));

	        pthread_attr_init(thread_attributes);
	        if (pthread_create(thread, thread_attributes, reboot_PM,(void *) NULL) != 0)
	                perror ("Thread FDIR PM!");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpb $0x1, 0x41dd(%rip)      # 0x7295
jne 0x30d9
movq 0x3f0f(%rip), %rdi      # 0x6fd0
leaq 0x11ac(%rip), %rsi      # 0x4274
callq 0x21a0
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x20f0
movb $0x1, 0x41b5(%rip)      # 0x7295
pushq $0x38
popq %rdi
callq 0x2200
movq %rax, %rbx
pushq $0x8
popq %rdi
callq 0x2200
movq %rax, %r14
movq %rbx, %rdi
callq 0x21f0
leaq -0x144(%rip), %rdx      # 0x2fc1
movq %r14, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x2340
testl %eax, %eax
jne 0x311b
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1180(%rip), %rdi      # 0x42a2
popq %rbx
popq %r14
popq %rbp
jmp 0x2140
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/FDIR/watchdog_arduino.cpp
// Function: Watchdog_arduino::Watchdog_arduino()
Watchdog_arduino::Watchdog_arduino() 
{
	// activation des GPIO
	GPIOExport(3);
	GPIOExport(2);

	// choix du mode (in/out) des GPIO
	GPIODirection(3,OUT);
	GPIODirection(2,IN);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
pushq $0x3
popq %rbx
movl %ebx, %edi
callq 0x3720
pushq $0x2
popq %r14
movl %r14d, %edi
callq 0x3720
pushq $0x1
popq %rsi
movl %ebx, %edi
callq 0x383c
movl %r14d, %edi
xorl %esi, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x383c
nop
// File: /workspace/github_cpp_makefile_star2_O2/yoavweiss[P]cache-digests-cuckoo/cuckoo.cpp
// Function: Cuckoo::Cuckoo(unsigned int, unsigned int, int)
Cuckoo::Cuckoo(unsigned probability, unsigned entries, int maxCount) {
    // Given the following inputs:
    // * `P`, an integer smaller than 256, that indicates the probability of a false positive that is acceptable, expressed as `1/2\*\*P`.
    // * `N`, an integer that represents the number of entries - a prime number smaller than 2\*\*32
    assert(probability < 256);
    assert(entries < pow(2,32));

    // 1. Let `f` be the number of bits per fingerprint, calculated as `P + 3`
    unsigned fingerprintSize = probability + 3;

    // 3. Let `allocated` be the closest power of 2 that is larger than `N`.
    unsigned logEntries = ceil(log2(entries));
    unsigned allocationEntries = (unsigned)pow(2, logEntries);
    // 4. Let `bytes` be `f`\*`allocated`\*`b`/8 rounded up to the nearest integer
    unsigned bytes = ceil((float)(fingerprintSize * allocationEntries * BucketSize) / 8.0);
    // 5. Add 5 to `bytes`
    bytes += 5;
    // 6. Allocate memory of `bytes` and set it to zero. Assign it to `digest-value`.
    m_digest = new unsigned char[bytes];
    memset(m_digest, 0, bytes);

    // 7. Set the first byte to `P`
    m_digest[0] = (char)fingerprintSize;
    // 8. Set the second till fifth bytes to `N` in big endian form
    bigEndianWrite(m_digest, 1, 4, entries);

    m_digestSize = bytes;
    m_maxCount = maxCount;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, -0x2c(%rbp)
cmpl $0x100, %esi            # imm = 0x100
jae 0x24a8
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %r14
addl $0x3, %r12d
movl %edx, %edi
callq 0x3407
callq 0x2070
cvttsd2si %xmm0, %rax
movl %eax, %eax
cvtsi2sd %rax, %xmm0
callq 0x21a0
cvttsd2si %xmm0, %rax
imull %r12d, %eax
shlq $0x2, %rax
cvtsi2ss %rax, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd 0x1bb7(%rip), %xmm0     # 0x4008
callq 0x2070
cvttsd2si %xmm0, %r13
addl $0x5, %r13d
movq %r13, %rdi
callq 0x2030
movq %rax, %rbx
movq %rax, (%r14)
movq %rax, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x2150
movb %r12b, (%rbx)
movl %r15d, %ecx
pushq $0x1
popq %rsi
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0x24c6
movq %r13, 0x8(%r14)
movl -0x2c(%rbp), %eax
movl %eax, 0x10(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b89(%rip), %rdi      # 0x4038
leaq 0x1b94(%rip), %rsi      # 0x404a
leaq 0x1b98(%rip), %rcx      # 0x4055
pushq $0x1c
popq %rdx
callq 0x2180
nop
// File: /workspace/github_cpp_makefile_star2_O2/yoavweiss[P]cache-digests-cuckoo/cuckoo.cpp
// Function: Cuckoo::bigEndianWrite(unsigned char*, unsigned int, unsigned long, unsigned long)
void Cuckoo::bigEndianWrite(unsigned char* digest, unsigned startPosition, size_t length, unsigned long number) {
    const unsigned long digit = 0xff;
    for (int i = length - 1; i >= 0; --i) {
        unsigned long temp = number & digit;
        digest[startPosition + i] = (unsigned char)temp;
        number >>= 8;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
decl %edx
testl %edx, %edx
js 0x24dc
leal (%rsi,%rdx), %eax
movb %cl, (%rdi,%rax)
shrq $0x8, %rcx
jmp 0x24ca
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yoavweiss[P]cache-digests-cuckoo/cuckoo.cpp
// Function: Cuckoo::bigEndianRead(unsigned char const*, unsigned int, unsigned long)
unsigned long Cuckoo::bigEndianRead(const unsigned char* digest, unsigned startPosition, size_t length) {
    unsigned long readNumber = 0;
    for (unsigned i = 0; i < length; ++i) {
        readNumber <<= 8;
        readNumber += digest[startPosition + i];
    }
    return readNumber;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
xorl %ecx, %ecx
movl %ecx, %r8d
cmpq %rdx, %r8
jae 0x27aa
shlq $0x8, %rax
leal (%rsi,%rcx), %r8d
movzbl (%rdi,%r8), %r8d
orq %r8, %rax
incl %ecx
jmp 0x278e
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yoavweiss[P]cache-digests-cuckoo/cuckoo.cpp
// Function: Cuckoo::key(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string Cuckoo::key(std::string URL, std::string ETag) {
    // Given the following inputs:
    //
    // * `URL`, an array of characters
    // * `ETag`, an array of characters
    // 1. Let `key` be `URL` converted to an ASCII string by percent-encoding as appropriate {{RFC3986}}.
    // TODO(yoav): Convert to ascii.
    std::string keyString = URL;
    // 2. If `ETag` is not null:
    if (!ETag.empty()) {
        // 1. Append `ETag` to `key` as an ASCII string, including both the `weak` indicator (if present) and double quotes, as per {{RFC7232}}, Section 2.3.
        // TODO(yoav): Only add the double quotes if they are not already there.
        keyString += "\"" + ETag + "\"";
    }
    return keyString;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r14
movq %rdi, %rbx
callq 0x2220
cmpq $0x0, 0x8(%r14)
je 0x280e
leaq 0x198d(%rip), %rsi      # 0x415d
leaq -0x30(%rbp), %rdi
movq %r14, %rdx
callq 0x3441
leaq 0x197a(%rip), %rdx      # 0x415d
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3418
leaq -0x50(%rbp), %rsi
movq %rbx, %rdi
callq 0x22d0
leaq -0x50(%rbp), %rdi
callq 0x2120
leaq -0x30(%rbp), %rdi
callq 0x2120
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
leaq -0x50(%rbp), %rdi
callq 0x2120
jmp 0x282b
movq %rax, %r14
leaq -0x30(%rbp), %rdi
callq 0x2120
jmp 0x2839
movq %rax, %r14
movq %rbx, %rdi
callq 0x2120
movq %r14, %rdi
callq 0x2290
nop
// File: /workspace/github_cpp_makefile_star2_O2/yoavweiss[P]cache-digests-cuckoo/cuckoo.cpp
// Function: Cuckoo::hash(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned int)
unsigned Cuckoo::hash(std::string key, unsigned entries) {
    // Given the following inputs:
    //
    // * `key`, an array of characters.
    // * `N`, an integer

    // 1. Let `hash-value` be the SHA-256 message digest {{RFC6234}} of `key`, truncated to 32 bits, expressed as an integer.
    unsigned char hash[SHA256_DIGEST_LENGTH];
    SHA256_CTX sha256;
    SHA256_Init(&sha256);
    SHA256_Update(&sha256, key.c_str(), key.size());
    SHA256_Final(hash, &sha256);
    // Truncate to 32 bits
    unsigned long hashValue = bigEndianRead((const unsigned char *)hash, SHA256_DIGEST_LENGTH - 4, 4);
    // 2. Return `hash-value` modulo N.
    return hashValue % entries;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x98, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq -0xb0(%rbp), %r15
movq %r15, %rdi
callq 0x2170
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq 0x2270
leaq -0x40(%rbp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x22e0
pushq $0x1c
popq %rsi
pushq $0x4
popq %rdx
movq %r14, %rdi
callq 0x2786
movl %ebx, %ecx
xorl %edx, %edx
divq %rcx
movq %rdx, %rax
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yoavweiss[P]cache-digests-cuckoo/cuckoo.cpp
// Function: Cuckoo::fingerprint(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned int)
unsigned long Cuckoo::fingerprint(std::string key, unsigned fingerprintSize) {
    // Given the following inputs:
    //
    // * `key`, an array of characters
    // * `f`, an integer indicating the number of output bits

    assert(fingerprintSize > 0);
    // 1. Let `hash-value` be the SHA-256 message digest {{RFC6234}} of `key`, expressed as an integer.
    unsigned char hash[SHA256_DIGEST_LENGTH];
    SHA256_CTX sha256;
    SHA256_Init(&sha256);
    SHA256_Update(&sha256, key.c_str(), key.size());
    SHA256_Final(hash, &sha256);
    unsigned long fingerprintValue;
    // Note: the implementation below diverges from the literal specified steps, but achieves the same goals.
    // 2. Let `h` be the number of bits in `hash-value`
    // 3. Let `fingerprint-value` be 0
    // 4. While `fingerprint-value` is 0 and `h` > `f`:
    for (unsigned i = SHA256_DIGEST_LENGTH * 8 - fingerprintSize; i >= fingerprintSize; i -= fingerprintSize) {
        // 1. Let `fingerprint-value` be the `f` least significant bits of `hash-value`.
        // 2. Let `hash-value` be the `h`-`f` most significant bits of `hash-value`.
        // 3. Substract `f` from `h`.
        fingerprintValue = readFingerprint(hash, i, fingerprintSize);
        if (fingerprintValue != 0)
            break;
    }
    // 5. If `fingerprint-value` is 0, let `fingerprint-value` be 1.
    if (fingerprintValue == 0)
        fingerprintValue = 1;
    // 6. Return `fingerprint-value`.
    return fingerprintValue;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
testl %esi, %esi
je 0x293c
movl %esi, %ebx
movq %rdi, %r14
leaq -0xb0(%rbp), %r12
movq %r12, %rdi
callq 0x2170
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r12, %rdi
callq 0x2270
leaq -0x40(%rbp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x22e0
movl $0x100, %esi            # imm = 0x100
subl %ebx, %esi
xorl %r14d, %r14d
movl %esi, %r12d
subl %ebx, %r12d
jb 0x2921
movq %r15, %rdi
movl %ebx, %edx
callq 0x29dc
movl %r12d, %esi
testq %rax, %rax
je 0x2907
movq %rax, %r14
cmpq $0x1, %r14
adcq $0x0, %r14
movq %r14, %rax
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x181c(%rip), %rdi      # 0x415f
leaq 0x1700(%rip), %rsi      # 0x404a
leaq 0x1822(%rip), %rcx      # 0x4173
movl $0x12d, %edx            # imm = 0x12D
callq 0x2180
nop
// File: /workspace/github_cpp_makefile_star2_O2/yoavweiss[P]cache-digests-cuckoo/cuckoo.cpp
// Function: Cuckoo::alternateHash(unsigned int, unsigned long, unsigned int)
unsigned Cuckoo::alternateHash(unsigned hash1, unsigned long fingerprintValue, unsigned entries) {
    // Given the following inputs:
    //
    // * `hash1`, an integer indicating the previous hash
    // * `fingerprint`, an integer indicating the fingerprint value
    // * `N`, an integer indicating the number of entries in the digest

    // Note: This is not thread safe (but a bit faster)!!!
    static char fingerprintString[20];
    // 1. Let `fingerprint-string` be the value of `fingerprint` in base 10, expressed as a string.
    sprintf((char*)fingerprintString, "%lu", fingerprintValue);
    // 2. Let `h2` be the return value of {{hash}} with `fingerprint-string` and `N` as inputs, XORed with `h1`.
    unsigned long hash2 = hash(std::string(fingerprintString), entries);
    hash2 ^= hash1;
    // 3. Return `hash2`.
    return hash2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %edx, %r14d
movq %rsi, %rdx
movl %edi, %ebx
leaq 0x4826(%rip), %r15      # 0x71a0
leaq 0x1850(%rip), %rsi      # 0x41d1
movq %r15, %rdi
xorl %eax, %eax
callq 0x2080
leaq -0x48(%rbp), %r12
leaq -0x21(%rbp), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x20f0
movq %r12, %rdi
movl %r14d, %esi
callq 0x284a
movl %eax, %r14d
leaq -0x48(%rbp), %rdi
callq 0x2120
xorl %ebx, %r14d
movl %r14d, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x2120
movq %rbx, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O2/yoavweiss[P]cache-digests-cuckoo/cuckoo.cpp
// Function: Cuckoo::readFingerprint(unsigned char const*, unsigned int, unsigned int)
unsigned long Cuckoo::readFingerprint(const unsigned char* hash, unsigned positionInBits, unsigned fingerprintSizeInBits) {
    const float Bits = 8.0;
    unsigned endPositionInBits = positionInBits + fingerprintSizeInBits;
    unsigned startPositionInBytes = floor((float)positionInBits / Bits);
    unsigned endPositionInBytes = ceil((float)endPositionInBits / Bits);
    unsigned lengthInBytes = endPositionInBytes - startPositionInBytes;
    unsigned long hashValue = bigEndianRead((const unsigned char *)(hash), startPositionInBytes, lengthInBytes);
    unsigned extraBitsAtStart = positionInBits - startPositionInBytes * Bits;
    unsigned extraBitsAtEnd = endPositionInBytes * Bits - endPositionInBits;
    unsigned extraBytes = sizeof(hashValue) - lengthInBytes;
    // TODO(yoav): There's probably a better way to do this, but I'm too jetlagged to think.
    hashValue <<= extraBytes * (unsigned)Bits + extraBitsAtStart;
    hashValue >>= extraBytes * (unsigned)Bits + extraBitsAtStart + extraBitsAtEnd;
    return hashValue;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %r14d
movq %rdi, %rbx
movl %esi, %eax
cvtsi2ss %rax, %xmm0
movss %xmm0, -0x28(%rbp)
addl %esi, %r14d
mulss 0x1628(%rip), %xmm0     # 0x4030
callq 0x20e0
cvttss2si %xmm0, %r15
cvtsi2ss %r14, %xmm1
movss %xmm1, -0x24(%rbp)
movss 0x160c(%rip), %xmm0     # 0x4030
mulss %xmm1, %xmm0
callq 0x2160
cvttss2si %xmm0, %r12
movl %r12d, %r14d
subl %r15d, %r14d
movq %rbx, %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x2786
movl %r15d, %ecx
cvtsi2ss %rcx, %xmm0
movss 0x15de(%rip), %xmm1     # 0x4034
mulss %xmm1, %xmm0
movss -0x28(%rbp), %xmm2
subss %xmm0, %xmm2
cvttss2si %xmm2, %rcx
movl %r12d, %edx
cvtsi2ss %rdx, %xmm0
mulss %xmm1, %xmm0
subss -0x24(%rbp), %xmm0
shll $0x3, %r14d
subl %r14d, %ecx
shlq %cl, %rax
cvttss2si %xmm0, %rdx
addl %edx, %ecx
addl $0x40, %ecx
shrq %cl, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/yoavweiss[P]cache-digests-cuckoo/cuckoo.cpp
// Function: Cuckoo::writeFingerprint(unsigned char*, unsigned int, unsigned int, unsigned long)
void Cuckoo::writeFingerprint(unsigned char* hash, unsigned positionInBits, unsigned fingerprintSizeInBits, unsigned long fingerprintValue) {
    const float Bits = 8.0;
    unsigned endPositionInBits = positionInBits + fingerprintSizeInBits;
    unsigned startPositionInBytes = floor((float)positionInBits / Bits);
    unsigned endPositionInBytes = ceil((float)endPositionInBits / Bits);
    unsigned lengthInBytes = endPositionInBytes - startPositionInBytes;
    unsigned long hashValue = bigEndianRead((const unsigned char *)(hash), startPositionInBytes, lengthInBytes);
    unsigned extraBitsAtStart = positionInBits - startPositionInBytes * Bits;
    unsigned extraBitsAtEnd = endPositionInBytes * Bits - endPositionInBits;
    unsigned extraBytes = sizeof(hashValue) - lengthInBytes;
    unsigned long bitmap = -1;
    bitmap >>= extraBitsAtEnd + fingerprintSizeInBits;
    bitmap <<= extraBitsAtEnd + fingerprintSizeInBits;
    bitmap += (unsigned)(pow(2, extraBitsAtEnd)) - 1;
    hashValue &= bitmap;
    fingerprintValue <<= extraBitsAtEnd;
    hashValue |= fingerprintValue;
    bigEndianWrite(hash, startPositionInBytes, lengthInBytes, hashValue);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movl %edx, %r12d
movl %esi, %eax
cvtsi2ss %rax, %xmm0
movq %rdi, %r15
movq %rdi, -0x40(%rbp)
leal (%r12,%rsi), %r14d
mulss 0x1561(%rip), %xmm0     # 0x4030
callq 0x20e0
cvttss2si %xmm0, %rax
movq %rax, -0x38(%rbp)
cvtsi2ss %r14, %xmm1
movss %xmm1, -0x2c(%rbp)
movss 0x1541(%rip), %xmm0     # 0x4030
mulss %xmm1, %xmm0
callq 0x2160
cvttss2si %xmm0, %r14
movl %r14d, %r13d
movq -0x38(%rbp), %rsi
subl %esi, %r13d
movq %r15, %rdi
movq %r13, %rdx
callq 0x2786
movl %r14d, %ecx
cvtsi2ss %rcx, %xmm0
mulss 0x1512(%rip), %xmm0     # 0x4034
subss -0x2c(%rbp), %xmm0
cvttss2si %xmm0, %r14
addl %r14d, %r12d
pushq $-0x1
popq %r15
movl %r12d, %ecx
shlq %cl, %r15
movq %rax, %r12
movl %r14d, %eax
cvtsi2sd %rax, %xmm0
callq 0x21a0
cvttsd2si %xmm0, %rax
decl %eax
addq %r15, %rax
andq %r12, %rax
movl %r14d, %ecx
shlq %cl, %rbx
orq %rax, %rbx
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq %r13, %rdx
movq %rbx, %rcx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x24c6
// File: /workspace/github_cpp_makefile_star2_O2/yoavweiss[P]cache-digests-cuckoo/cuckoo.cpp
// Function: hex(unsigned char)
unsigned char hex(unsigned char input) {
    if (input >= '0' && input <= '9')
        return input - '0';
    if (input >= 'a' && input <= 'f') {
        return 10 + input - 'a';
    }
    if (input >= 'A' && input <= 'F') {
        return 10 + input - 'A';
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leal -0x30(%rdi), %eax
cmpb $0xa, %al
jb 0x3001
leal -0x61(%rdi), %eax
cmpb $0x5, %al
ja 0x2fef
addb $-0x57, %dil
movl %edi, %eax
jmp 0x3001
leal -0x41(%rdi), %eax
addb $-0x37, %dil
xorl %ecx, %ecx
cmpb $0x6, %al
movzbl %dil, %eax
cmovael %ecx, %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/matrix.cpp
// Function: Matrix3::Identity()
void Matrix3::Identity () {
  int i;
  for (i = 0; i < 9; i++) {
    Set(i,0.0);
  }
  for (i = 0; i < 9; i+=4){
    Set(i,1.0);
  }
  identity = true;
}

// Assembly:
xorl %eax, %eax
cmpq $0x9, %rax
je 0x52d8
andq $0x0, (%rdi,%rax,8)
incq %rax
jmp 0x52c8
xorl %eax, %eax
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
cmpq $0x8, %rax
ja 0x52f4
movq %rcx, (%rdi,%rax,8)
addq $0x4, %rax
jmp 0x52e4
movb $0x1, 0x48(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/matrix.cpp
// Function: Matrix3::RotX(double)
void Matrix3::RotX (double theta) {
  if (theta == 0.0) {
    Identity();
  } else {
    Set(0, 1.0); Set(1, 0.0);        Set(2, 0.0);
    Set(3, 0.0); Set(4, cos(theta)); Set(5, -sin(theta));
    Set(6, 0.0); Set(7, sin(theta)); Set(8,  cos(theta));
    identity = false;
  }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x5337
jp 0x5337
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
jmp 0x52c6
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, (%rbx)
xorpd %xmm1, %xmm1
movupd %xmm1, 0x8(%rbx)
andq $0x0, 0x18(%rbx)
movsd %xmm0, 0x8(%rsp)
callq 0x43a0
movsd %xmm0, 0x20(%rbx)
movsd 0x8(%rsp), %xmm0
callq 0x4070
xorps 0x6cfc(%rip), %xmm0     # 0xc070
movlps %xmm0, 0x28(%rbx)
andq $0x0, 0x30(%rbx)
movsd 0x8(%rsp), %xmm0
callq 0x4070
movsd %xmm0, 0x38(%rbx)
movsd 0x8(%rsp), %xmm0
callq 0x43a0
movsd %xmm0, 0x40(%rbx)
movb $0x0, 0x48(%rbx)
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/matrix.cpp
// Function: Matrix3::RotY(double)
void Matrix3::RotY (double theta) {
  if (theta == 0.0) {
    Identity();
  } else {
    Set(0, cos(theta)); Set(1, 0.0); Set(2, -sin(theta));
    Set(3, 0.0);        Set(4, 1.0); Set(5, 0.0);
    Set(6, sin(theta)); Set(7, 0.0); Set(8, cos(theta));
    identity = false;
  }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x53c9
jp 0x53c9
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
jmp 0x52c6
movsd %xmm0, 0x8(%rsp)
callq 0x43a0
movsd %xmm0, (%rbx)
andq $0x0, 0x8(%rbx)
movsd 0x8(%rsp), %xmm0
callq 0x4070
xorps 0x6c81(%rip), %xmm0     # 0xc070
movlps %xmm0, 0x10(%rbx)
xorps %xmm0, %xmm0
movhps 0x6c4b(%rip), %xmm0     # xmm0 = xmm0[0,1],mem[0,1]
movups %xmm0, 0x18(%rbx)
andq $0x0, 0x28(%rbx)
movsd 0x8(%rsp), %xmm0
callq 0x4070
movsd %xmm0, 0x30(%rbx)
andq $0x0, 0x38(%rbx)
movsd 0x8(%rsp), %xmm0
callq 0x43a0
movsd %xmm0, 0x40(%rbx)
movb $0x0, 0x48(%rbx)
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/matrix.cpp
// Function: Matrix3::RotZ(double)
void Matrix3::RotZ (double theta) {
  if (theta == 0.0) {
    Identity();
  } else {
    Set(0, cos(theta)); Set(1, -sin(theta)); Set(2, 0.0);
    Set(3, sin(theta)); Set(4,  cos(theta)); Set(5, 0.0);
    Set(6, 0.0);        Set(7, 0.0);         Set(8, 1.0);
    identity = false;
  }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x5457
jp 0x5457
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
jmp 0x52c6
movsd %xmm0, 0x8(%rsp)
callq 0x43a0
movsd %xmm0, (%rbx)
movsd 0x8(%rsp), %xmm0
callq 0x4070
xorps 0x6bf8(%rip), %xmm0     # 0xc070
movlps %xmm0, 0x8(%rbx)
andq $0x0, 0x10(%rbx)
movsd 0x8(%rsp), %xmm0
callq 0x4070
movsd %xmm0, 0x18(%rbx)
movsd 0x8(%rsp), %xmm0
callq 0x43a0
movsd %xmm0, 0x20(%rbx)
xorps %xmm0, %xmm0
andq $0x0, 0x38(%rbx)
movups %xmm0, 0x28(%rbx)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x40(%rbx)
movb $0x0, 0x48(%rbx)
addq $0x10, %rsp
popq %rbx
retq
nop