LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/attractivechaos[P]rb-eval/rb.c
// Function: rb_t_last
void *
rb_t_last (struct rb_traverser *trav, struct rb_table *tree)
{
  struct rb_node *x;

  assert (tree != NULL && trav != NULL);

  trav->rb_table = tree;
  trav->rb_height = 0;
  trav->rb_generation = tree->rb_generation;

  x = tree->rb_root;
  if (x != NULL)
    while (x->rb_link[1] != NULL)
      {
        assert (trav->rb_height < RB_MAX_HEIGHT);
        trav->rb_stack[trav->rb_height++] = x;
        x = x->rb_link[1];
      }
  trav->rb_node = x;

  return x != NULL ? x->rb_data : NULL;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x1a0d
testq %rsi, %rsi
je 0x1a0d
movq %rsi, (%rdi)
movq $0x0, 0x190(%rdi)
movq 0x28(%rsi), %rax
movq %rax, 0x198(%rdi)
movq (%rsi), %rax
testq %rax, %rax
je 0x19d9
cmpq $0x0, 0x8(%rax)
je 0x19db
leaq 0x8(%rax), %rcx
movq 0x190(%rdi), %rdx
cmpq $0x30, %rdx
jae 0x19ee
leaq 0x1(%rdx), %rsi
movq %rsi, 0x190(%rdi)
movq %rax, 0x10(%rdi,%rdx,8)
movq (%rcx), %rax
leaq 0x8(%rax), %rcx
cmpq $0x0, 0x8(%rax)
movq %rsi, %rdx
jne 0x19b0
jmp 0x19db
xorl %eax, %eax
movq %rax, 0x8(%rdi)
testq %rax, %rax
je 0x19ea
movq 0x10(%rax), %rax
jmp 0x19ec
xorl %eax, %eax
popq %rcx
retq
leaq 0x1761(%rip), %rdi      # 0x3156
leaq 0x1618(%rip), %rsi      # 0x3014
leaq 0x1773(%rip), %rcx      # 0x3176
movl $0x202, %edx            # imm = 0x202
callq 0x1040
leaq 0x16ea(%rip), %rdi      # 0x30fe
leaq 0x15f9(%rip), %rsi      # 0x3014
leaq 0x1754(%rip), %rcx      # 0x3176
movl $0x1f8, %edx            # imm = 0x1F8
callq 0x1040
// File: /workspace/github_c_makefile_star2_O1/attractivechaos[P]rb-eval/rb.c
// Function: rb_t_find
void *
rb_t_find (struct rb_traverser *trav, struct rb_table *tree, void *item)
{
  struct rb_node *p, *q;

  assert (trav != NULL && tree != NULL && item != NULL);
  trav->rb_table = tree;
  trav->rb_height = 0;
  trav->rb_generation = tree->rb_generation;
  for (p = tree->rb_root; p != NULL; p = q)
    {
      int cmp = tree->rb_compare (item, p->rb_data, tree->rb_param);

      if (cmp < 0)
        q = p->rb_link[0];
      else if (cmp > 0)
        q = p->rb_link[1];
      else /* |cmp == 0| */
        {
          trav->rb_node = p;
          return p->rb_data;
        }

      assert (trav->rb_height < RB_MAX_HEIGHT);
      trav->rb_stack[trav->rb_height++] = p;
    }

  trav->rb_height = 0;
  trav->rb_node = NULL;
  return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x1b07
movq %rsi, %r15
testq %rsi, %rsi
je 0x1b07
movq %rdx, %r14
testq %rdx, %rdx
je 0x1b07
movq %rdi, %rbx
movq %r15, (%rdi)
movq $0x0, 0x190(%rdi)
movq 0x28(%r15), %rax
movq %rax, 0x198(%rdi)
movq (%r15), %r13
testq %r13, %r13
je 0x1acd
movq 0x10(%r13), %rsi
movq 0x10(%r15), %rdx
movq %r14, %rdi
callq *0x8(%r15)
movq %r13, %rcx
testl %eax, %eax
js 0x1a96
je 0x1abd
leaq 0x8(%r13), %rcx
movq 0x190(%rbx), %rax
cmpq $0x30, %rax
jae 0x1ae8
movq (%rcx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x190(%rbx)
movq %r13, 0x10(%rbx,%rax,8)
movb $0x1, %al
movq %rcx, %r13
jmp 0x1ac7
movq %r13, 0x8(%rbx)
movq 0x10(%r13), %r12
xorl %eax, %eax
testb %al, %al
jne 0x1a75
jmp 0x1adb
xorl %r12d, %r12d
movq %r12, 0x190(%rbx)
movq %r12, 0x8(%rbx)
movq %r12, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x1667(%rip), %rdi      # 0x3156
leaq 0x151e(%rip), %rsi      # 0x3014
leaq 0x16e0(%rip), %rcx      # 0x31dd
movl $0x227, %edx            # imm = 0x227
callq 0x1040
leaq 0x16a2(%rip), %rdi      # 0x31b0
leaq 0x14ff(%rip), %rsi      # 0x3014
leaq 0x16c1(%rip), %rcx      # 0x31dd
movl $0x215, %edx            # imm = 0x215
callq 0x1040
// File: /workspace/github_c_makefile_star2_O1/attractivechaos[P]rb-eval/rb.c
// Function: rb_t_insert
void *
rb_t_insert (struct rb_traverser *trav, struct rb_table *tree, void *item)
{
  void **p;

  assert (trav != NULL && tree != NULL && item != NULL);

  p = rb_probe (tree, item);
  if (p != NULL)
    {
      trav->rb_table = tree;
      trav->rb_node =
        ((struct rb_node *)
         ((char *) p - offsetof (struct rb_node, rb_data)));
      trav->rb_generation = tree->rb_generation - 1;
      return *p;
    }
  else
    {
      rb_t_init (trav, tree);
      return NULL;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1b90
movq %rsi, %r14
testq %rsi, %rsi
je 0x1b90
testq %rdx, %rdx
je 0x1b90
movq %rdi, %rbx
movq %r14, %rdi
movq %rdx, %rsi
callq 0x12bd
movq %r14, (%rbx)
testq %rax, %rax
je 0x1b70
movq %rax, %rcx
addq $-0x10, %rcx
movq %rcx, 0x8(%rbx)
movq 0x28(%r14), %rcx
decq %rcx
movq %rcx, 0x198(%rbx)
movq (%rax), %rax
jmp 0x1b88
xorl %eax, %eax
movq %rax, 0x8(%rbx)
movq %rax, 0x190(%rbx)
movq 0x28(%r14), %rcx
movq %rcx, 0x198(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1619(%rip), %rdi      # 0x31b0
leaq 0x1476(%rip), %rsi      # 0x3014
leaq 0x167a(%rip), %rcx      # 0x321f
movl $0x23c, %edx            # imm = 0x23C
callq 0x1040
// File: /workspace/github_c_makefile_star2_O1/attractivechaos[P]rb-eval/rb.c
// Function: rb_t_copy
void *
rb_t_copy (struct rb_traverser *trav, const struct rb_traverser *src)
{
  assert (trav != NULL && src != NULL);

  if (trav != src)
    {
      trav->rb_table = src->rb_table;
      trav->rb_node = src->rb_node;
      trav->rb_generation = src->rb_generation;
      if (trav->rb_generation == trav->rb_table->rb_generation)
        {
          trav->rb_height = src->rb_height;
          memcpy (trav->rb_stack, (const void *) src->rb_stack,
                  sizeof *trav->rb_stack * trav->rb_height);
        }
    }

  return trav->rb_node != NULL ? trav->rb_node->rb_data : NULL;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x1c16
testq %rsi, %rsi
je 0x1c16
movq %rdi, %rbx
cmpq %rsi, %rdi
je 0x1c03
movq (%rsi), %rax
movq %rax, (%rbx)
movq 0x8(%rsi), %rcx
movq %rcx, 0x8(%rbx)
movq 0x198(%rsi), %rcx
movq %rcx, 0x198(%rbx)
cmpq 0x28(%rax), %rcx
jne 0x1c03
movq 0x190(%rsi), %rdx
movq %rdx, 0x190(%rbx)
leaq 0x10(%rbx), %rdi
addq $0x10, %rsi
shlq $0x3, %rdx
callq 0x1060
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x1c12
movq 0x10(%rax), %rax
jmp 0x1c14
xorl %eax, %eax
popq %rbx
retq
leaq 0x1646(%rip), %rdi      # 0x3263
leaq 0x13f0(%rip), %rsi      # 0x3014
leaq 0x1654(%rip), %rcx      # 0x327f
movl $0x253, %edx            # imm = 0x253
callq 0x1040
// File: /workspace/github_c_makefile_star2_O1/attractivechaos[P]rb-eval/rb.c
// Function: rb_t_next
void *
rb_t_next (struct rb_traverser *trav)
{
  struct rb_node *x;

  assert (trav != NULL);

  if (trav->rb_generation != trav->rb_table->rb_generation)
    trav_refresh (trav);

  x = trav->rb_node;
  if (x == NULL)
    {
      return rb_t_first (trav, trav->rb_table);
    }
  else if (x->rb_link[1] != NULL)
    {
      assert (trav->rb_height < RB_MAX_HEIGHT);
      trav->rb_stack[trav->rb_height++] = x;
      x = x->rb_link[1];

      while (x->rb_link[0] != NULL)
        {
          assert (trav->rb_height < RB_MAX_HEIGHT);
          trav->rb_stack[trav->rb_height++] = x;
          x = x->rb_link[0];
        }
    }
  else
    {
      struct rb_node *y;

      do
        {
          if (trav->rb_height == 0)
            {
              trav->rb_node = NULL;
              return NULL;
            }

          y = x;
          x = trav->rb_stack[--trav->rb_height];
        }
      while (y == x->rb_link[1]);
    }
  trav->rb_node = x;

  return x->rb_data;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x1d31
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x198(%rdi), %rcx
cmpq 0x28(%rax), %rcx
je 0x1c5a
movq %rbx, %rdi
callq 0x1d6f
movq 0x8(%rbx), %rcx
testq %rcx, %rcx
je 0x1cc0
cmpq $0x0, 0x8(%rcx)
movq 0x190(%rbx), %rdx
je 0x1ccc
cmpq $0x30, %rdx
jae 0x1d50
leaq 0x1(%rdx), %rax
movq %rax, 0x190(%rbx)
movq %rcx, 0x10(%rbx,%rdx,8)
movq 0x8(%rcx), %rax
cmpq $0x0, (%rax)
je 0x1d04
movq 0x190(%rbx), %rcx
cmpq $0x30, %rcx
jae 0x1d12
leaq 0x1(%rcx), %rdx
movq %rdx, 0x190(%rbx)
movq %rax, 0x10(%rbx,%rcx,8)
movq (%rax), %rax
cmpq $0x0, (%rax)
movq %rdx, %rcx
jne 0x1c9c
jmp 0x1d04
movq (%rbx), %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x18b2
decq %rdx
movq %rdx, %rsi
cmpq $-0x1, %rdx
je 0x1cf3
movq %rsi, 0x190(%rbx)
movq 0x10(%rbx,%rsi,8), %rax
leaq -0x1(%rsi), %rdx
cmpq 0x8(%rax), %rcx
movq %rax, %rcx
je 0x1ccf
jmp 0x1cfe
movq $0x0, 0x8(%rbx)
movq %rcx, %rax
cmpq $-0x1, %rsi
je 0x1d0e
movq %rax, 0x8(%rbx)
movq 0x10(%rax), %rax
popq %rbx
retq
xorl %eax, %eax
jmp 0x1d0c
leaq 0x143d(%rip), %rdi      # 0x3156
leaq 0x12f4(%rip), %rsi      # 0x3014
leaq 0x159c(%rip), %rcx      # 0x32c3
movl $0x27f, %edx            # imm = 0x27F
callq 0x1040
leaq 0x13d6(%rip), %rdi      # 0x310e
leaq 0x12d5(%rip), %rsi      # 0x3014
leaq 0x157d(%rip), %rcx      # 0x32c3
movl $0x26d, %edx            # imm = 0x26D
callq 0x1040
leaq 0x13ff(%rip), %rdi      # 0x3156
leaq 0x12b6(%rip), %rsi      # 0x3014
leaq 0x155e(%rip), %rcx      # 0x32c3
movl $0x279, %edx            # imm = 0x279
callq 0x1040
// File: /workspace/github_c_makefile_star2_O1/attractivechaos[P]rb-eval/rb.c
// Function: trav_refresh
static void
trav_refresh (struct rb_traverser *trav)
{
  assert (trav != NULL);

  trav->rb_generation = trav->rb_table->rb_generation;

  if (trav->rb_node != NULL)
    {
      rb_comparison_func *cmp = trav->rb_table->rb_compare;
      void *param = trav->rb_table->rb_param;
      struct rb_node *node = trav->rb_node;
      struct rb_node *i;

      trav->rb_height = 0;
      for (i = trav->rb_table->rb_root; i != node; )
        {
          assert (trav->rb_height < RB_MAX_HEIGHT);
          assert (i != NULL);

          trav->rb_stack[trav->rb_height++] = i;
          i = i->rb_link[cmp (node->rb_data, i->rb_data, param) > 0];
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %r15
movq 0x28(%rax), %rcx
movq %rcx, 0x198(%rdi)
testq %r15, %r15
je 0x1deb
movq %rdi, %rbx
movq 0x8(%rax), %r12
movq 0x10(%rax), %r14
movq $0x0, 0x190(%rdi)
movq (%rax), %r13
cmpq %r15, %r13
je 0x1deb
movq 0x190(%rbx), %rax
cmpq $0x30, %rax
jae 0x1e14
testq %r13, %r13
je 0x1df5
leaq 0x1(%rax), %rcx
movq %rcx, 0x190(%rbx)
movq %r13, 0x10(%rbx,%rax,8)
movq 0x10(%r15), %rdi
movq 0x10(%r13), %rsi
movq %r14, %rdx
callq *%r12
xorl %ecx, %ecx
testl %eax, %eax
setg %cl
movq (%r13,%rcx,8), %r13
jmp 0x1da8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x17ce(%rip), %rdi      # 0x35ca
leaq 0x1211(%rip), %rsi      # 0x3014
leaq 0x1797(%rip), %rcx      # 0x35a1
movl $0x1c2, %edx            # imm = 0x1C2
callq 0x1040
leaq 0x133b(%rip), %rdi      # 0x3156
leaq 0x11f2(%rip), %rsi      # 0x3014
leaq 0x1778(%rip), %rcx      # 0x35a1
movl $0x1c1, %edx            # imm = 0x1C1
callq 0x1040
// File: /workspace/github_c_makefile_star2_O1/attractivechaos[P]rb-eval/rb.c
// Function: rb_t_replace
void *
rb_t_replace (struct rb_traverser *trav, void *new)
{
  void *old;

  assert (trav != NULL && trav->rb_node != NULL && new != NULL);
  old = trav->rb_node->rb_data;
  trav->rb_node->rb_data = new;
  return old;
}

// Assembly:
testq %rdi, %rdi
je 0x1fc6
testq %rsi, %rsi
je 0x1fc6
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x1fc6
movq 0x10(%rcx), %rax
movq %rsi, 0x10(%rcx)
retq
pushq %rax
leaq 0x1369(%rip), %rdi      # 0x3337
leaq 0x103f(%rip), %rsi      # 0x3014
leaq 0x1390(%rip), %rcx      # 0x336c
movl $0x2e0, %edx            # imm = 0x2E0
callq 0x1040
// File: /workspace/github_c_makefile_star2_O1/attractivechaos[P]rb-eval/rb.c
// Function: copy_error_recovery
static void
copy_error_recovery (struct rb_node **stack, int height,
                     struct rb_table *new, rb_item_func *destroy)
{
  assert (stack != NULL && height >= 0 && new != NULL);

  for (; height > 2; height -= 2)
    stack[height - 1]->rb_link[1] = NULL;
  rb_destroy (new, destroy);
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x21c5
testl %esi, %esi
js 0x21c5
cmpl $0x3, %esi
jl 0x21b9
movl %esi, %eax
addq $0x2, %rax
movq -0x18(%rdi,%rax,8), %rsi
movq $0x0, 0x8(%rsi)
addq $-0x2, %rax
cmpq $0x4, %rax
jg 0x21a2
movq %rdx, %rdi
movq %rcx, %rsi
popq %rax
jmp 0x21e4
leaq 0x1408(%rip), %rdi      # 0x35d4
leaq 0xe41(%rip), %rsi       # 0x3014
leaq 0x1426(%rip), %rcx      # 0x3600
movl $0x2ed, %edx            # imm = 0x2ED
callq 0x1040
// File: /workspace/github_c_makefile_star2_O1/attractivechaos[P]rb-eval/rb.c
// Function: rb_destroy
void
rb_destroy (struct rb_table *tree, rb_item_func *destroy)
{
  struct rb_node *p, *q;

  assert (tree != NULL);

  for (p = tree->rb_root; p != NULL; p = q)
    if (p->rb_link[0] == NULL)
      {
        q = p->rb_link[1];
        if (destroy != NULL && p->rb_data != NULL)
          destroy (p->rb_data, tree->rb_param);
        tree->rb_alloc->libavl_free (tree->rb_alloc, p);
      }
    else
      {
        q = p->rb_link[0];
        p->rb_link[0] = q->rb_link[1];
        q->rb_link[1] = p;
      }

  tree->rb_alloc->libavl_free (tree->rb_alloc, tree);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2259
movq %rdi, %rbx
movq (%rdi), %r15
testq %r15, %r15
je 0x2241
movq %rsi, %r14
movq (%r15), %r12
testq %r12, %r12
je 0x2216
movq 0x8(%r12), %rax
movq %rax, (%r15)
movq %r15, 0x8(%r12)
jmp 0x2239
movq 0x8(%r15), %r12
testq %r14, %r14
je 0x222f
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0x222f
movq 0x10(%rbx), %rsi
callq *%r14
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq *0x8(%rdi)
movq %r12, %r15
testq %r12, %r12
jne 0x21ff
movq 0x18(%rbx), %rdi
movq 0x8(%rdi), %rax
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *%rax
leaq 0x11d8(%rip), %rdi      # 0x3438
leaq 0xdad(%rip), %rsi       # 0x3014
leaq 0x11d7(%rip), %rcx      # 0x3445
movl $0x361, %edx            # imm = 0x361
callq 0x1040
// File: /workspace/github_c_makefile_star2_O1/attractivechaos[P]rb-eval/rb-c.c
// Function: test_int
int test_int(int n)
{
	int i, cnt = 0;
	uint64_t x = 11;
	intmap_t *d, *r;
	struct rb_table *h;

	h = rb_create(int_cmp, 0, 0);
	for (i = 0; i < n; ++i) {
		unsigned y = x % (n>>1);
		x = kad_splitmix64(x);
		d = (intmap_t*)malloc(sizeof(intmap_t));
		d->key = y; d->value = i;
		if (rb_find(h, d) == 0) {
			rb_insert(h, d);
			++cnt;
		} else {
			r = rb_delete(h, d);
			free(d); free(r);
			--cnt;
		}
	}
	rb_destroy(h, 0);
	return cnt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edi, %ebx
leaq -0x24(%rip), %rdi       # 0x233c
xorl %r15d, %r15d
xorl %esi, %esi
xorl %edx, %edx
callq 0x11cc
movq %rax, %r14
movl %ebx, 0xc(%rsp)
testl %ebx, %ebx
jle 0x2448
movl 0xc(%rsp), %eax
shrl %eax
movq %rax, 0x10(%rsp)
movl $0xb, %r12d
xorl %ebx, %ebx
xorl %r15d, %r15d
movq %r12, %rax
xorl %edx, %edx
divq 0x10(%rsp)
movq %rdx, %rbp
movl $0x8, %edi
callq 0x1070
movq %rax, %r13
movl %ebp, (%rax)
movl %ebx, 0x4(%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x123d
movq %r14, %rdi
testq %rax, %rax
je 0x23e5
movq %r13, %rsi
callq 0x14e9
movq %rax, %rbp
movq %r13, %rdi
callq 0x1030
movq %rbp, %rdi
callq 0x1030
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x23f2
movq %r13, %rsi
callq 0x14a7
movl $0x1, %eax
addl %eax, %r15d
movabsq $-0x61c8864680b583eb, %rax # imm = 0x9E3779B97F4A7C15
addq %rax, %r12
movq %r12, %rax
shrq $0x1e, %rax
xorq %r12, %rax
movabsq $-0x40a7b892e31b1a47, %rcx # imm = 0xBF58476D1CE4E5B9
imulq %rcx, %rax
movq %rax, %rcx
shrq $0x1b, %rcx
xorq %rax, %rcx
movabsq $-0x6b2fb644ecceee15, %rax # imm = 0x94D049BB133111EB
imulq %rax, %rcx
movq %rcx, %r12
shrq $0x1f, %r12
xorq %rcx, %r12
incl %ebx
cmpl %ebx, 0xc(%rsp)
jne 0x2391
movq %r14, %rdi
xorl %esi, %esi
callq 0x21e4
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sheheryarbutt[P]Ext2-File-System/ext2_utils.c
// Function: remove_trailing_slash
void remove_trailing_slash(char * path){
	char* absPath=path;
	char last_element[2]; last_element[1]='\0'; 
	last_element[0]=absPath[(unsigned int)strlen(absPath)-1];
	 if (strcmp(last_element, "/")==0 ){ // removes "/" from the end
    	int path_length=(unsigned int)strlen(absPath);
    	char temp_new_path[path_length]; strcpy(temp_new_path,absPath);
    	temp_new_path[path_length-1]='\0'; strcpy(absPath,temp_new_path);    
    }
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movb $0x0, -0x21(%rbp)
callq 0x1060
movq %rax, %r14
decl %eax
movb (%rbx,%rax), %al
movb %al, -0x22(%rbp)
cmpw $0x2f, -0x22(%rbp)
jne 0x1b18
movq %rsp, %r12
movl %r14d, %eax
movq %rsp, %r15
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1050
decl %r14d
movslq %r14d, %rax
movb $0x0, (%rax,%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1050
movq %r12, %rsp
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sheheryarbutt[P]Ext2-File-System/ext2_utils.c
// Function: all_names
char ** all_names(char *path, int * total_length){
	char *absPath=malloc((unsigned int)strlen(path) + 1);
	strcpy(absPath,path);
	char **names=malloc(256* sizeof(char*));
	remove_trailing_slash(absPath);

	int num_names=0;
	while((unsigned int)strlen(absPath)){
		unsigned int path_len=(unsigned int)strlen(absPath);
		char * temp_name=basename(absPath);
		unsigned int temp_name_len=(unsigned int) strlen(temp_name);
		names[num_names]=malloc(temp_name_len); strcpy(names[num_names],temp_name);
		absPath[path_len-(temp_name_len+1)]='\0';
		num_names++;
	}
	 *total_length=num_names;
	return names;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1060
leal 0x1(%rax), %edi
callq 0x10d0
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x1050
movl $0x800, %edi            # imm = 0x800
callq 0x10d0
movq %rax, %r13
movq %r15, %rdi
callq 0x1ab0
movq %r15, %rdi
callq 0x1060
movq %rax, %r12
testl %r12d, %r12d
je 0x1bf8
movq %rbx, -0x38(%rbp)
xorl %r14d, %r14d
movq %r13, -0x30(%rbp)
movq %r15, %rdi
callq 0x10b0
movq %rax, %r13
movq %rax, %rdi
callq 0x1060
movq %rax, %rbx
movl %ebx, %edi
callq 0x10d0
movq -0x30(%rbp), %rcx
movq %rax, (%rcx,%r14,8)
movq %rax, %rdi
movq %r13, %rsi
callq 0x1050
notl %ebx
addl %ebx, %r12d
movb $0x0, (%r15,%r12)
incq %r14
movq %r15, %rdi
callq 0x1060
movq %rax, %r12
testl %r12d, %r12d
jne 0x1ba1
movq -0x38(%rbp), %rbx
movq -0x30(%rbp), %r13
jmp 0x1bfb
xorl %r14d, %r14d
movl %r14d, (%rbx)
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sheheryarbutt[P]Ext2-File-System/ext2_utils.c
// Function: set_avail_db
int set_avail_db(){

	unsigned int * bb=(unsigned int *)(disk + (EXT2_BLOCK_SIZE*3));			   

	int i;
	 //4= 128/32 because 128 is the total blocks and 32 bits is 4 bytes=unsigned int
	for (i=0; i<4; i++){
		int j=0;	
		while(j<32){
			
			if (!(bb[i]&(1<<j))){
				// updating to notify data block in now in use
				bb[i]|=(1<<j);
				sb->s_free_blocks_count-=1;
				gd->bg_free_blocks_count-=1;
				return (32*i)+(j+1);
			}
			
			j++;
		}
		
	}
	return -1;					   
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x3263(%rip), %rax      # 0x50b0
movq (%rax), %rdx
leaq 0x3261(%rip), %rax      # 0x50b8
movq (%rax), %rsi
leaq 0x325f(%rip), %rax      # 0x50c0
movq (%rax), %rdi
xorl %r8d, %r8d
movl 0xc00(%rdx,%r8,4), %r9d
testb $0x1, %r9b
jne 0x1e82
movl $0x1, %r11d
xorl %r10d, %r10d
xorl %ecx, %ecx
jmp 0x1ea3
xorl %ecx, %ecx
cmpl $0x1f, %ecx
je 0x1ec1
movl $0x2, %r11d
shll %cl, %r11d
incl %ecx
testl %r11d, %r9d
jne 0x1e84
leal -0x1(%rcx), %eax
cmpl $0x1f, %eax
setae %r10b
orl %r11d, %r9d
movl %r9d, 0xc00(%rdx,%r8,4)
decl 0xc(%rsi)
decw 0xc(%rdi)
movl %r8d, %eax
shll $0x5, %eax
addl %ecx, %eax
incl %eax
jmp 0x1ec5
setae %r10b
testb %r10b, %r10b
je 0x1ed8
incq %r8
cmpq $0x4, %r8
jne 0x1e67
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sheheryarbutt[P]Ext2-File-System/ext2_utils.c
// Function: set_avail_ib
int set_avail_ib(){

	unsigned int * ib = (unsigned int *)(disk+(EXT2_BLOCK_SIZE*4));
	int j=EXT2_GOOD_OLD_FIRST_INO-1;
	while(j<32){
			if (!(ib[0]&(1<<j))){
				// updating to notify inode in now in use
				ib[0]|=1<<j;
				sb->s_free_inodes_count-=1;
				gd->bg_free_inodes_count-=1;
				return j+1;
			}
			
			j++;
	}
	return -1;
}

// Assembly:
leaq 0x31cf(%rip), %rax      # 0x50b0
movq (%rax), %rdx
movl 0x1000(%rdx), %esi
movl $0xb, %eax
leal -0x1(%rax), %ecx
movl $0x1, %edi
shll %cl, %edi
movzbl %cl, %ecx
btl %ecx, %esi
jae 0x1f0e
incl %eax
cmpl $0x21, %eax
jne 0x1eef
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
pushq %rbp
movq %rsp, %rbp
orl %edi, %esi
movl %esi, 0x1000(%rdx)
leaq 0x3197(%rip), %rcx      # 0x50b8
movq (%rcx), %rcx
decl 0x10(%rcx)
leaq 0x3192(%rip), %rcx      # 0x50c0
movq (%rcx), %rcx
decw 0xe(%rcx)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sheheryarbutt[P]Ext2-File-System/ext2_utils.c
// Function: create_inode
void create_inode(int avail_ib,unsigned short mode,unsigned int size,unsigned short link_count,unsigned short blocks,unsigned int *block_pointers){
	time_t rawtime; // for setting creation time
	struct ext2_inode inode;
	inode.i_mode=mode;        
	inode.i_uid=0;        
	inode.i_size=size;     
	inode.i_ctime=(unsigned int)(time( &rawtime ));       /* Creation time */
	inode.i_dtime=0;
	inode.i_gid=0;        
	inode.i_links_count=link_count; 
	inode.i_blocks=blocks;    
	inode.osd1=0;        
	for (int i=0;i<15;i++){
		inode.i_block[i]=block_pointers[i];
	}     /* Pointers to blocks */
	free(block_pointers);

	inode.i_generation=0;  
	inode.i_file_acl=0;    
	inode.i_dir_acl=0;    
	inode.i_faddr=0;       
	inode_table[avail_ib-1]=inode;
	if ((mode & EXT2_S_IFDIR) == EXT2_S_IFDIR){
		gd->bg_used_dirs_count+=1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, %r13
movl %r8d, -0x30(%rbp)
movl %ecx, -0x2c(%rbp)
movl %edx, %r12d
movl %esi, %ebx
movl %edi, %r14d
leaq -0x78(%rbp), %rdi
callq 0x10c0
movq %rax, %r15
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups 0x20(%r13), %xmm2
movups 0x2c(%r13), %xmm3
movaps %xmm0, -0x70(%rbp)
movaps %xmm1, -0x60(%rbp)
movaps %xmm2, -0x50(%rbp)
movups %xmm3, -0x44(%rbp)
movq %r13, %rdi
callq 0x1030
leaq 0x312f(%rip), %rax      # 0x50c8
movq (%rax), %rax
movslq %r14d, %rcx
shlq $0x7, %rcx
movw %bx, -0x80(%rax,%rcx)
xorl %edx, %edx
movw %dx, -0x7e(%rax,%rcx)
movl %r12d, -0x7c(%rax,%rcx)
movl %r15d, -0x74(%rax,%rcx)
movl %edx, -0x6c(%rax,%rcx)
movw %dx, -0x68(%rax,%rcx)
movl -0x2c(%rbp), %esi
movw %si, -0x66(%rax,%rcx)
movl -0x30(%rbp), %esi
movl %esi, -0x64(%rax,%rcx)
movl %edx, -0x5c(%rax,%rcx)
movaps -0x70(%rbp), %xmm0
movaps -0x60(%rbp), %xmm1
movaps -0x50(%rbp), %xmm2
movups %xmm0, -0x58(%rax,%rcx)
movups %xmm1, -0x48(%rax,%rcx)
movups %xmm2, -0x38(%rax,%rcx)
movups -0x44(%rbp), %xmm0
movups %xmm0, -0x2c(%rax,%rcx)
xorps %xmm0, %xmm0
movups %xmm0, -0x1c(%rax,%rcx)
btl $0xe, %ebx
jae 0x2015
leaq 0x30b2(%rip), %rax      # 0x50c0
movq (%rax), %rax
incw 0x10(%rax)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sheheryarbutt[P]Ext2-File-System/ext2_utils.c
// Function: create_entry
void create_entry(int dbaddr,unsigned int inode, unsigned short rec_len, unsigned char name_len, unsigned char file_type, char* name){
	//store entry at dbaddr= data block address
	struct ext2_dir_entry* new_entry = (struct ext2_dir_entry *)(disk+dbaddr); 
	new_entry->inode=inode;
	new_entry->rec_len=rec_len;
	new_entry->name_len=name_len;
	new_entry->file_type=file_type;
	// store name after dir entry struct
	memcpy(disk+dbaddr + sizeof(struct ext2_dir_entry), name, name_len); 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x3081(%rip), %rax      # 0x50b0
movq (%rax), %r10
movslq %edi, %rdi
movl %esi, (%r10,%rdi)
movw %dx, 0x4(%r10,%rdi)
movb %cl, 0x6(%r10,%rdi)
movb %r8b, 0x7(%r10,%rdi)
movq (%rax), %rax
leaq 0x8(%rax,%rdi), %rdi
movl %ecx, %edx
movq %r9, %rsi
popq %rbp
jmp 0x10a0
// File: /workspace/github_c_makefile_star2_O1/chrispanag[P]operating-systems-scheduler/prog.c
// Function: main
int main(int argc, char *argv[])
{
	int i, delay, pid;

	/*
	 * Print a number of messages,
	 * use a random delay, so that processes terminate
	 * in random order.
	 */

	pid = getpid();
	srand(pid);
	delay = 30 + ((double)rand() / RAND_MAX) * DELAY;
	printf("%s: Starting, NMSG = %d, delay = %d\n",
		argv[0], NMSG, delay);

	for (i = 0; i < NMSG; i++) {
		printf("%s[%d]: This is message %d\n", argv[0], pid, i);
		compute(delay);
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
callq 0x1030
movl %eax, %ebp
movl %eax, %edi
callq 0x1080
callq 0x1110
cvtsi2sd %eax, %xmm0
divsd 0xcc2(%rip), %xmm0      # 0x2008
mulsd 0xcc2(%rip), %xmm0      # 0x2010
addsd 0xcc2(%rip), %xmm0      # 0x2018
cvttsd2si %xmm0, %r14d
movq (%rbx), %rsi
leaq 0xcbb(%rip), %rdi       # 0x2020
movl $0x64, %edx
movl %r14d, %ecx
xorl %eax, %eax
callq 0x1060
leaq 0xcca(%rip), %r15       # 0x2045
xorl %r12d, %r12d
movq (%rbx), %rsi
movq %r15, %rdi
movl %ebp, %edx
movl %r12d, %ecx
xorl %eax, %eax
callq 0x1060
movl %r14d, %edi
callq 0x13b9
incl %r12d
cmpl $0x64, %r12d
jne 0x137e
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/chrispanag[P]operating-systems-scheduler/proc-common.c
// Function: compute
void compute(int count)
{
	long i;
	volatile long junk;

	junk = 0;
	for (i = 0; i < count * 1000000; i++) {
		junk++;
	}
}

// Assembly:
movq $0x0, -0x8(%rsp)
testl %edi, %edi
jle 0x13e1
imull $0xf4240, %edi, %ecx    # imm = 0xF4240
cmpl $0x2, %ecx
movl $0x1, %eax
cmovgel %ecx, %eax
incq -0x8(%rsp)
decq %rax
jne 0x13d7
retq
// File: /workspace/github_c_makefile_star2_O1/chrispanag[P]operating-systems-scheduler/proc-common.c
// Function: explain_wait_status
void
explain_wait_status(pid_t pid, int status)
{
	if (WIFEXITED(status))
		fprintf(stderr, "My PID = %ld: Child PID = %ld terminated normally, exit status = %d\n",
			(long)getpid(), (long)pid, WEXITSTATUS(status));
	else if (WIFSIGNALED(status))
		fprintf(stderr, "My PID = %ld: Child PID = %ld was terminated by a signal, signo = %d\n",
			(long)getpid(), (long)pid, WTERMSIG(status));
	else if (WIFSTOPPED(status))
		fprintf(stderr, "My PID = %ld: Child PID = %ld has been stopped by a signal, signo = %d\n",
			(long)getpid(), (long)pid, WSTOPSIG(status));
	else {
		fprintf(stderr, "%s: Internal error: Unhandled case, PID = %ld, status = %d\n",
			__func__, (long)pid, status);
		exit(1);
	}
	fflush(stderr);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movl %edi, %ebp
movl %esi, %eax
andl $0x7f, %eax
jne 0x1418
movl %ebp, %edi
movl %ebx, %esi
callq 0x117a
jmp 0x1467
movl %eax, %ecx
shll $0x18, %ecx
addl $0x1000000, %ecx        # imm = 0x1000000
cmpl $0x2000000, %ecx        # imm = 0x2000000
jl 0x1436
movl %ebp, %edi
movl %eax, %esi
callq 0x1145
jmp 0x1467
movq 0x2bbb(%rip), %rax      # 0x3ff8
movq (%rax), %r14
cmpb $0x7f, %bl
jne 0x147a
callq 0x1030
movslq %eax, %rdx
movslq %ebp, %rcx
movzbl %bh, %eax
leaq 0xca1(%rip), %rsi       # 0x20fb
movq %r14, %rdi
movl %eax, %r8d
xorl %eax, %eax
callq 0x1090
movq 0x2b8a(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x10b0
movslq %ebp, %rcx
leaq 0xcbf(%rip), %rsi       # 0x2143
leaq 0xcf4(%rip), %rdx       # 0x217f
movq %r14, %rdi
movl %ebx, %r8d
xorl %eax, %eax
callq 0x1090
movl $0x1, %edi
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O1/chrispanag[P]operating-systems-scheduler/proc-common.c
// Function: wait_for_ready_children
void
wait_for_ready_children(int cnt)
{
	int i;
	pid_t p;
	int status;

	for (i = 0; i < cnt; i++) {
		/* Wait for any child, also get status for stopped children */
		p = waitpid(-1, &status, WUNTRACED);
		explain_wait_status(p, status);
		if (!WIFSTOPPED(status)) {
			fprintf(stderr, "Parent: Child with PID %ld has died unexpectedly!\n",
				(long)p);
			exit(1);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
testl %edi, %edi
jle 0x14df
movl %edi, %ebx
leaq 0xc(%rsp), %r14
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movq %r14, %rsi
movl $0x2, %edx
callq 0x10c0
movl %eax, %ebp
movl 0xc(%rsp), %esi
movl %eax, %edi
callq 0x13fe
cmpb $0x7f, 0xc(%rsp)
jne 0x14e8
decl %ebx
jne 0x14b5
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl %ebp, %edi
callq 0x11b4
// File: /workspace/github_c_makefile_star2_O1/chrispanag[P]operating-systems-scheduler/proc-common.c
// Function: show_pstree
void
show_pstree(pid_t p)
{
	int ret;
	char cmd[1024];

	snprintf(cmd, sizeof(cmd), "echo; echo; pstree -G -c -p %ld; echo; echo",
		(long)p);
	cmd[sizeof(cmd)-1] = '\0';
	ret = system(cmd);
	if (ret < 0) {
		perror("system");
		exit(104);
	}
}

// Assembly:
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movslq %edi, %rcx
leaq 0xcc5(%rip), %rdx       # 0x21c6
movq %rsp, %rbx
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1070
movb $0x0, 0x3ff(%rbx)
movq %rbx, %rdi
callq 0x1050
testl %eax, %eax
js 0x152f
addq $0x400, %rsp            # imm = 0x400
popq %rbx
retq
callq 0x11db
// File: /workspace/github_c_makefile_star2_O1/chrispanag[P]operating-systems-scheduler/proc-common.c
// Function: create_shared_memory_area
void *create_shared_memory_area(unsigned int numbytes)
{
	int pages;
	void *addr;

	if (numbytes == 0) {
		fprintf(stderr, "%s: internal error: called for numbytes == 0\n", __func__);
		exit(1);
	}

	/* Determine the number of pages needed, round up the requested number of pages */
	pages = (numbytes - 1) / sysconf(_SC_PAGE_SIZE) + 1;

	/* Create a shared, anonymous mapping for this number of pages */
	addr = mmap(NULL, pages * sysconf(_SC_PAGE_SIZE),
		PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0);
	if (addr == MAP_FAILED) {
		perror("create_shared_memory_area: mmap failed");
		exit(1);
	}

	return addr;
}

// Assembly:
pushq %rbx
testl %edi, %edi
je 0x158a
movl %edi, %ebx
decl %ebx
movl $0x1e, %edi
callq 0x10e0
movq %rax, %rcx
movq %rbx, %rax
xorl %edx, %edx
idivq %rcx
incl %eax
movslq %eax, %rbx
movl $0x1e, %edi
callq 0x10e0
imulq %rax, %rbx
xorl %edi, %edi
movq %rbx, %rsi
movl $0x3, %edx
movl $0x21, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
callq 0x1040
cmpq $-0x1, %rax
je 0x158f
popq %rbx
retq
callq 0x1205
callq 0x11f0
// File: /workspace/github_c_makefile_star2_O1/antonblanchard[P]will-it-scale/tests/tlb_flush1.c
// Function: testcase
void testcase(unsigned long *iteration, unsigned long nr)
{
	char tmpfile[] = "/tmp/willitscale.XXXXXX";
	int fd = mkstemp(tmpfile);
	unsigned long offset = 0;
	unsigned long pgsize = getpagesize();
	assert(fd >= 0);
	assert(ftruncate(fd, FILESIZE) == 0);
	unlink(tmpfile);
	unsigned long i;

	while (1) {
		char *addr = mmap(NULL, FILESIZE, PROT_READ|PROT_WRITE,
						MAP_PRIVATE, fd, offset);
		for (i = 0; i < FILESIZE; i += pgsize) {
			*(addr + i) = 1;
			madvise(addr + i, pgsize, MADV_DONTNEED);
			assert(*(addr + i) == 0);
			(*iteration)++;
		}
		munmap(addr, FILESIZE);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movaps 0x70e(%rip), %xmm0      # 0x3310
movq %rsp, %rdi
movaps %xmm0, (%rdi)
movabsq $0x5858585858582e, %rax # imm = 0x5858585858582E
movq %rax, 0x10(%rdi)
callq 0x21c0
movl %eax, %ebp
callq 0x2280
testl %ebp, %ebp
js 0x2ca5
movl %eax, %r14d
movl $0x8000000, %esi        # imm = 0x8000000
movl %ebp, %edi
callq 0x2110
testl %eax, %eax
jne 0x2cc4
movslq %r14d, %r14
movq %rsp, %rdi
callq 0x2080
movl $0x8000000, %esi        # imm = 0x8000000
xorl %edi, %edi
movl $0x3, %edx
movl $0x2, %ecx
movl %ebp, %r8d
xorl %r9d, %r9d
callq 0x20e0
movq %rax, %r15
xorl %r12d, %r12d
leaq (%r15,%r12), %rdi
movb $0x1, (%r15,%r12)
movq %r14, %rsi
movl $0x4, %edx
callq 0x2200
cmpb $0x0, (%r15,%r12)
jne 0x2ce3
incq (%rbx)
addq %r14, %r12
cmpq $0x8000000, %r12        # imm = 0x8000000
jb 0x2c6a
movl $0x8000000, %esi        # imm = 0x8000000
movq %r15, %rdi
callq 0x21d0
jmp 0x2c48
leaq 0x5e7(%rip), %rdi       # 0x3293
leaq 0x5e8(%rip), %rsi       # 0x329b
leaq 0x5f4(%rip), %rcx       # 0x32ae
movl $0x16, %edx
callq 0x2120
leaq 0x611(%rip), %rdi       # 0x32dc
leaq 0x5c9(%rip), %rsi       # 0x329b
leaq 0x5d5(%rip), %rcx       # 0x32ae
movl $0x17, %edx
callq 0x2120
leaq 0x60f(%rip), %rdi       # 0x32f9
leaq 0x5aa(%rip), %rsi       # 0x329b
leaq 0x5b6(%rip), %rcx       # 0x32ae
movl $0x21, %edx
callq 0x2120
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/bench/bulk_update/main.c
// Function: sendbatch
static int
sendbatch(struct bulkupdate_state * C)
{

	while (C->Nip < 4096) {
		/* Try to read a key-value pair. */
		if (fread(C->key->buf, 40, 1, C->f) < 1) {
			C->generation++;
			rewind(C->f);
			continue;
		}
		if (fread(C->val->buf, 40, 1, C->f) < 1) {
			C->generation++;
			rewind(C->f);
			continue;
		}

		/* Create a new (somewhat arbitrary) value to record. */
		C->val->buf[39] += C->generation;

		/* Send the request. */
		if (proto_kvlds_request_set(C->Q, C->key, C->val,
		    callback_done, C))
			goto err0;
		C->Nip += 1;
	}

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
xorl %ebx, %ebx
cmpq $0xfff, 0x10(%rdi)      # imm = 0xFFF
ja 0x288c
movq %rdi, %r14
leaq 0x8f(%rip), %r15        # 0x2894
movq 0x8(%r14), %rcx
movq 0x28(%r14), %rdi
incq %rdi
movl $0x28, %esi
movl $0x1, %edx
callq 0x20c0
testq %rax, %rax
je 0x286e
movq 0x8(%r14), %rcx
movq 0x30(%r14), %rdi
incq %rdi
movl $0x28, %esi
movl $0x1, %edx
callq 0x20c0
testq %rax, %rax
je 0x286e
movb 0x18(%r14), %al
movq 0x30(%r14), %rcx
addb %al, 0x28(%rcx)
movq (%r14), %rdi
movq 0x28(%r14), %rsi
movq 0x30(%r14), %rdx
movq %r15, %rcx
movq %r14, %r8
callq 0x5801
testl %eax, %eax
jne 0x2887
incq 0x10(%r14)
jmp 0x287b
incl 0x18(%r14)
movq 0x8(%r14), %rdi
callq 0x2150
cmpq $0x1000, 0x10(%r14)     # imm = 0x1000
jb 0x2805
jmp 0x288c
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/bench/bulk_update/main.c
// Function: callback_done
static int
callback_done(void * cookie, int failed)
{
	struct bulkupdate_state * C = cookie;

	/* This request is no longer in progress. */
	C->Nip -= 1;

	/* Did we fail? */
	if (failed) {
		C->done = 1;
		C->failed = 1;
	}

	/* Notify the benchmarking code, and check if we should quit. */
	if (bench_tick(C->B, &C->done)) {
		warnp("bench_tick");
		goto err0;
	}

	/* Send more requests if possible. */
	if ((!C->done) && sendbatch(C))
		goto err0;

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
decq 0x10(%rdi)
testl %esi, %esi
je 0x28b1
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x1c(%rbx)
movq 0x38(%rbx), %rdi
leaq 0x20(%rbx), %r14
movq %r14, %rsi
callq 0x5419
testl %eax, %eax
je 0x28e8
callq 0x2090
cmpl $0x0, (%rax)
je 0x28fe
movq %rax, %rbx
leaq 0x87d0(%rip), %rdi      # 0xb0a9
xorl %eax, %eax
callq 0x502c
movl $0x0, (%rbx)
jmp 0x290c
xorl %ebp, %ebp
cmpl $0x0, (%r14)
jne 0x2911
movq %rbx, %rdi
callq 0x27e6
testl %eax, %eax
jne 0x290c
jmp 0x2911
leaq 0x87a4(%rip), %rdi      # 0xb0a9
xorl %eax, %eax
callq 0x514b
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/bench/bench.c
// Function: bench_init
struct bench *
bench_init(size_t start, size_t num_seconds)
{
	struct bench * B;
	struct timeval tv_now;

	/* Sanity checks. */
	assert((start + num_seconds) < INT_MAX);
	assert(num_seconds > 0);

	/* Allocate and initialize cookie. */
	if ((B = malloc(sizeof(struct bench))) == NULL) {
		warn0("malloc");
		goto err0;
	}
	B->num_seconds = num_seconds;
	B->started = 0;

	/* Allocate and initialize tick counts. */
	if ((B->ticks = malloc(num_seconds * sizeof(uint64_t))) == NULL) {
		warn0("malloc");
		goto err1;
	}
	if ((B->sorted = malloc(num_seconds * sizeof(uint64_t))) == NULL) {
		warn0("malloc");
		goto err2;
	}
	memset(B->ticks, 0, num_seconds * sizeof(uint64_t));
	B->tick_pos = 0;

	/* Get current time. */
	if (monoclock_get(&tv_now)) {
		warnp("monoclock_get");
		goto err3;
	}

	/* Prepare start benchmark time value. */
	B->tv_start.tv_sec = tv_now.tv_sec + (int)start;
	B->tv_start.tv_usec = tv_now.tv_usec;

	/* Success! */
	return (B);

err3:
	free(B->sorted);
err2:
	free(B->ticks);
err1:
	free(B);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
leaq (%rsi,%rdi), %rax
cmpq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
jae 0x53db
movq %rsi, %r13
testq %rsi, %rsi
je 0x53fa
movq %rdi, %r15
movl $0x48, %edi
callq 0x2220
testq %rax, %rax
je 0x5339
movq %rax, %rbx
movq %r13, (%rax)
movl $0x0, 0x40(%rax)
shlq $0x3, %r13
movq %r13, %rdi
callq 0x2220
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x5356
movq %rax, %r14
movq %r13, %rdi
callq 0x2220
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x5371
movq %rax, %r12
movq %r14, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x21a0
movq $0x0, 0x18(%rbx)
movq %rsp, %rdi
callq 0x3d48
testl %eax, %eax
je 0x538c
callq 0x2090
cmpl $0x0, (%rax)
je 0x53a2
movq %rax, %r15
leaq 0x6464(%rip), %rdi      # 0xb78d
xorl %eax, %eax
callq 0x502c
movl $0x0, (%r15)
jmp 0x53b0
leaq 0x6446(%rip), %rdi      # 0xb786
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x514b
callq 0x2090
movl $0x0, (%rax)
jmp 0x53ca
leaq 0x6429(%rip), %rdi      # 0xb786
xorl %eax, %eax
callq 0x514b
callq 0x2090
movl $0x0, (%rax)
jmp 0x53c0
leaq 0x640e(%rip), %rdi      # 0xb786
xorl %eax, %eax
callq 0x514b
callq 0x2090
movl $0x0, (%rax)
jmp 0x53b8
movslq %r15d, %rax
addq (%rsp), %rax
movq %rax, 0x20(%rbx)
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rbx)
jmp 0x53ca
leaq 0x63e4(%rip), %rdi      # 0xb78d
xorl %eax, %eax
callq 0x514b
movq %r12, %rdi
callq 0x2040
movq %r14, %rdi
callq 0x2040
movq %rbx, %rdi
callq 0x2040
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x6346(%rip), %rdi      # 0xb728
leaq 0x635f(%rip), %rsi      # 0xb748
leaq 0x636d(%rip), %rcx      # 0xb75d
movl $0x27, %edx
callq 0x2180
leaq 0x639d(%rip), %rdi      # 0xb79e
leaq 0x6340(%rip), %rsi      # 0xb748
leaq 0x634e(%rip), %rcx      # 0xb75d
movl $0x28, %edx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/bench/bench.c
// Function: bench_tick
int
bench_tick(struct bench * B, int * done)
{
	struct timeval tv_now;

	/* Get current time. */
	if (monoclock_get(&tv_now)) {
		warnp("monoclock_get");
		goto err0;
	}

	/* Are we still waiting to start recording ticks? */
	if (B->started == 0) {
		/* Bail if it's not time to start counting items. */
		if (tv_cmp(tv_now, B->tv_start) < 0)
			goto done;

		/* Start recording ticks. */
		B->started = 1;

		/* Start tracking seconds. */
		B->tv_end.tv_sec = tv_now.tv_sec + 1;
		B->tv_end.tv_usec = tv_now.tv_usec;
	}

	/* Have we finished a second? */
	if (tv_cmp(tv_now, B->tv_end) > 0) {
		/* Prepare to record in a new position. */
		B->tick_pos++;

		/* Have we run out of seconds to record? */
		if (B->tick_pos >= B->num_seconds) {
			*done = 1;
			goto done;
		}

		/* Set up the next second. */
		B->tv_end.tv_sec = tv_now.tv_sec + 1;
		B->tv_end.tv_usec = tv_now.tv_usec;
	}

	/* Record value in the current position. */
	B->ticks[B->tick_pos]++;

done:
	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3d48
testl %eax, %eax
je 0x5457
callq 0x2090
cmpl $0x0, (%rax)
je 0x54a0
movq %rax, %rbx
leaq 0x6345(%rip), %rdi      # 0xb78d
xorl %eax, %eax
callq 0x502c
movl $0x0, (%rbx)
jmp 0x54ae
cmpl $0x0, 0x40(%rbx)
je 0x54bb
movq 0x8(%rsp), %rax
cmpq 0x30(%rbx), %rax
jl 0x5490
movq 0x10(%rsp), %rcx
jg 0x5475
cmpq 0x38(%rbx), %rcx
jle 0x5490
movq 0x18(%rbx), %rdx
incq %rdx
movq %rdx, 0x18(%rbx)
cmpq (%rbx), %rdx
jae 0x54ec
incq %rax
movq %rax, 0x30(%rbx)
movq %rcx, 0x38(%rbx)
movq 0x8(%rbx), %rax
movq 0x18(%rbx), %rcx
incq (%rax,%rcx,8)
xorl %eax, %eax
jmp 0x54b3
leaq 0x62e6(%rip), %rdi      # 0xb78d
xorl %eax, %eax
callq 0x514b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq 0x8(%rsp), %rcx
xorl %eax, %eax
cmpq 0x20(%rbx), %rcx
jl 0x54b3
movq 0x10(%rsp), %rdx
jg 0x54d5
cmpq 0x28(%rbx), %rdx
jl 0x54b3
movl $0x1, 0x40(%rbx)
incq %rcx
movq %rcx, 0x30(%rbx)
movq %rdx, 0x38(%rbx)
jmp 0x545d
movl $0x1, (%r14)
jmp 0x549c
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/bench/bench.c
// Function: bench_mean
uint64_t
bench_mean(struct bench * B)
{
	size_t i;
	uint64_t sum = 0;

	/* Sanity check. */
	assert(B->num_seconds > 0);

	/* Calculate sum. */
	for (i = 0; i < B->num_seconds; i++)
		sum += B->ticks[i];

	/* Return the mean. */
	return (sum / B->num_seconds);
}

// Assembly:
pushq %rax
movq (%rdi), %rcx
testq %rcx, %rcx
je 0x551e
movq 0x8(%rdi), %rdx
xorl %eax, %eax
xorl %esi, %esi
addq (%rdx,%rsi,8), %rax
incq %rsi
cmpq %rsi, %rcx
jne 0x550b
xorl %edx, %edx
divq %rcx
popq %rcx
retq
leaq 0x6276(%rip), %rdi      # 0xb79b
leaq 0x621c(%rip), %rsi      # 0xb748
leaq 0x627b(%rip), %rcx      # 0xb7ae
movl $0xb8, %edx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/bench/bench.c
// Function: bench_median
uint64_t
bench_median(struct bench * B)
{
	uint64_t median;
	size_t midpos;

	/* Make a copy of the ticks. */
	memcpy(B->sorted, B->ticks, B->num_seconds * sizeof(uint64_t));

	/* Sort the extra array. */
	qsort(B->sorted, B->num_seconds, sizeof(uint64_t), compar_uint64_t);

	/* Find the midpoint, or mean of nearest midpoints. */
	midpos = (B->num_seconds - 1) / 2;
	if ((B->num_seconds % 2) == 0)
		median = (B->sorted[midpos] + B->sorted[midpos + 1]) / 2;
	else
		median = B->sorted[midpos];

	/* Return the median. */
	return (median);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movq (%rbx), %rdx
movq 0x8(%rbx), %rsi
shlq $0x3, %rdx
callq 0x2200
movq (%rbx), %rsi
movq 0x10(%rbx), %rdi
leaq 0x2c(%rip), %rcx        # 0x558f
movl $0x8, %edx
callq 0x20b0
movq (%rbx), %rsi
movq 0x10(%rbx), %rcx
leaq -0x1(%rsi), %rdx
shrq %rdx
movq (%rcx,%rdx,8), %rax
testb $0x1, %sil
jne 0x558d
addq 0x8(%rcx,%rdx,8), %rax
shrq %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/bench/bench.c
// Function: bench_free
void
bench_free(struct bench * B)
{

	/* Behave consistently with free(NULL). */
	if (B == NULL)
		return;

	free(B->sorted);
	free(B->ticks);
	free(B);
}

// Assembly:
testq %rdi, %rdi
je 0x55cc
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x2040
movq 0x8(%rbx), %rdi
callq 0x2040
movq %rbx, %rdi
popq %rbx
jmp 0x2040
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/datastruct/kvldskey.c
// Function: kvldskey_create
struct kvldskey *
kvldskey_create(const uint8_t * buf, size_t len)
{
	struct kvldskey * K;

	/* Sanity check. */
	assert(len <= UINT8_MAX);

	/* Allocate structure. */
	if ((K = malloc(sizeof(struct kvldskey) + len)) == NULL)
		goto err0;

	/* Copy data. */
	K->len = (uint8_t)len;
	memcpy(K->buf, buf, len);

	/* Success! */
	return (K);

err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpq $0x100, %rsi            # imm = 0x100
jae 0x5616
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x1(%rsi), %rdi
callq 0x2220
testq %rax, %rax
je 0x560a
movq %rax, %r14
movb %bl, (%rax)
movq %rax, %rdi
incq %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2200
jmp 0x560d
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x61b5(%rip), %rdi      # 0xb7d2
leaq 0x61bf(%rip), %rsi      # 0xb7e3
leaq 0x61d5(%rip), %rcx      # 0xb800
movl $0x13, %edx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/datastruct/kvldskey.c
// Function: kvldskey_unserialize
size_t
kvldskey_unserialize(struct kvldskey ** K, const uint8_t * buf, size_t buflen)
{
	size_t len;

	/* Length. */
	if (buflen < 1)
		goto err1;
	if (buflen < (len = (size_t)(buf[0]) + 1))
		goto err1;

	/* Allocate structure and copy data. */
	if ((*K = malloc(len)) == NULL)
		goto err0;
	memcpy(*K, buf, len);

	/* Success! */
	return (len);

err1:
	errno = 0;
err0:
	/* Failure! */
	return (0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdx, %rdx
je 0x5670
movq %rsi, %r14
movzbl (%rsi), %ebx
cmpq %rdx, %rbx
jae 0x5670
movq %rdi, %r15
incq %rbx
movq %rbx, %rdi
callq 0x2220
movq %rax, (%r15)
testq %rax, %rax
je 0x567b
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2200
jmp 0x567d
callq 0x2090
movl $0x0, (%rax)
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/datastruct/kvldskey.c
// Function: kvldskey_cmp2
int
kvldskey_cmp2(const struct kvldskey * x, const struct kvldskey * y,
    size_t mlen)
{
	size_t minlen = (x->len < y->len) ? x->len : y->len;
	int rc;

	for (; mlen < minlen; mlen++) {
		if ((rc = x->buf[mlen] - y->buf[mlen]) != 0)
			return (rc);
	}
	return (x->len - y->len);
}

// Assembly:
movzbl (%rdi), %ecx
movzbl (%rsi), %r8d
cmpb %r8b, %cl
movl %r8d, %r9d
cmovbl %ecx, %r9d
cmpq %rdx, %r9
jbe 0x56e9
movzbl 0x1(%rdi,%rdx), %eax
movzbl 0x1(%rsi,%rdx), %r10d
subl %r10d, %eax
jne 0x56ee
incq %rdx
cmpq %rdx, %r9
jne 0x56d1
subl %r8d, %ecx
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/proto_kvlds/proto_kvlds_client.c
// Function: proto_kvlds_request_params
int
proto_kvlds_request_params(struct wire_requestqueue * Q,
    int (* callback)(void *, int, size_t, size_t), void * cookie)
{
	struct params_cookie * C;
	uint8_t * buf;

	/* Bake a cookie. */
	if ((C = malloc(sizeof(struct params_cookie))) == NULL)
		goto err0;
	C->callback = callback;
	C->cookie = cookie;

	/* Start writing a request. */
	if ((buf = wire_requestqueue_add_getbuf(Q, 4,
	    callback_params, C)) == NULL)
		goto err1;

	/* Construct request. */
	be32enc(&buf[0], PROTO_KVLDS_PARAMS);

	/* Finish writing request. */
	if (wire_requestqueue_add_done(Q, buf, 4))
		goto err1;

	/* Success! */
	return (0);

err1:
	free(C);
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r15
movl $0x10, %edi
callq 0x2220
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x5782
movq %rax, %r14
movq %r13, (%rax)
movq %r12, 0x8(%rax)
leaq 0x47(%rip), %rdx        # 0x578e
movl $0x4, %esi
movq %r15, %rdi
movq %rax, %rcx
callq 0x6f4d
testq %rax, %rax
je 0x5776
movl $0x10000, (%rax)        # imm = 0x10000
movl $0x4, %edx
movq %r15, %rdi
movq %rax, %rsi
callq 0x7229
testl %eax, %eax
je 0x5780
movq %r14, %rdi
callq 0x2040
jmp 0x5782
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/proto_kvlds/proto_kvlds_client.c
// Function: callback_params
static int
callback_params(void * cookie, uint8_t * buf, size_t buflen)
{
	struct params_cookie * C = cookie;
	int failed = 1;
	size_t kmax = 0;
	size_t vmax = 0;
	int rc;

	/* If we have a packet, parse it. */
	if (buf != NULL) {
		/* Is the packet length sane? */
		if (buflen != 8)
			BAD("params", "bogus length");

		/* Parse values. */
		kmax = be32dec(&buf[0]);
		vmax = be32dec(&buf[4]);

		/* We successfully parsed this response. */
		failed = 0;
	}

failed:
	/* Invoke the upstream callback. */
	rc = (C->callback)(C->cookie, failed, kmax, vmax);

	/* Free the cookie. */
	free(C);

	/* Return status from callback. */
	return (rc);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %ebp
testq %rsi, %rsi
je 0x57b4
cmpq $0x8, %rdx
jne 0x57b9
movl (%rsi), %r14d
movl 0x4(%rsi), %ecx
bswapl %r14d
bswapl %ecx
xorl %ebp, %ebp
jmp 0x57e5
xorl %r14d, %r14d
jmp 0x57e3
leaq 0x647e(%rip), %rdi      # 0xbc3e
leaq 0x6494(%rip), %rsi      # 0xbc5b
leaq 0x6494(%rip), %rdx      # 0xbc62
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x514b
callq 0x2090
movl $0x0, (%rax)
xorl %ecx, %ecx
movq 0x8(%rbx), %rdi
movl %ebp, %esi
movq %r14, %rdx
callq *(%rbx)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x2040
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq