LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/tre/lib/xmalloc.c
// Function: xmalloc_impl
void *
xmalloc_impl(size_t size, const char *file, int line, const char *func)
{
  void *ptr;

  xmalloc_init();
  assert(size > 0);

  if (xmalloc_fail_after == 0)
    {
      xmalloc_fail_after = -2;
#if 0
      printf("xmalloc: forced failure %s:%d: %s\n", file, line, func);
#endif
      return NULL;
    }
  else if (xmalloc_fail_after == -2)
    {
      printf("xmalloc: called after failure from %s:%d: %s\n",
	     file, line, func);
      assert(0);
    }
  else if (xmalloc_fail_after > 0)
    xmalloc_fail_after--;

  ptr = malloc(size);
  if (ptr != NULL)
    hash_table_add(xmalloc_table, ptr, (int)size, file, line, func);
  return ptr;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movl %edx, 0x1c(%rsp)
movq %rcx, 0x10(%rsp)
callq 0x4c41d0
cmpq $0x0, 0x28(%rsp)
jbe 0x4c4456
jmp 0x4c4475
leaq 0x46ab9(%rip), %rdi     # 0x50af16
leaq 0xbbc64(%rip), %rsi     # 0x5800c8
movl $0xf7, %edx
leaq 0xbbc77(%rip), %rcx     # 0x5800e7
callq 0x2fdc0
cmpl $0x0, 0x143d94(%rip)    # 0x608210
jne 0x4c4496
movl $0xfffffffe, 0x143d88(%rip) # imm = 0xFFFFFFFE
movq $0x0, 0x30(%rsp)
jmp 0x4c453e
cmpl $-0x2, 0x143d73(%rip)   # 0x608210
jne 0x4c44da
movq 0x20(%rsp), %rsi
movl 0x1c(%rsp), %edx
movq 0x10(%rsp), %rcx
leaq 0xbbc6f(%rip), %rdi     # 0x580123
movb $0x0, %al
callq 0x2f300
leaq 0xb5f3e(%rip), %rdi     # 0x57a400
leaq 0xbbbff(%rip), %rsi     # 0x5800c8
movl $0x105, %edx            # imm = 0x105
leaq 0xbbc12(%rip), %rcx     # 0x5800e7
callq 0x2fdc0
cmpl $0x0, 0x143d2f(%rip)    # 0x608210
jle 0x4c44f2
movl 0x143d27(%rip), %eax    # 0x608210
addl $-0x1, %eax
movl %eax, 0x143d1e(%rip)    # 0x608210
jmp 0x4c44f4
jmp 0x4c44f6
movq 0x28(%rsp), %rdi
callq 0x34068
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x4c4534
movq 0x143d04(%rip), %rdi    # 0x608218
movq 0x8(%rsp), %rsi
movq 0x28(%rsp), %rax
movl %eax, %edx
movq 0x20(%rsp), %rcx
movl 0x1c(%rsp), %r8d
movq 0x10(%rsp), %r9
callq 0x4c4550
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/tre/lib/xmalloc.c
// Function: hash_table_add
static void
hash_table_add(hashTable *tbl, void *ptr, int bytes,
	       const char *file, int line, const char *func)
{
  int i;
  hashTableItem *item, *new;

  i = hash_void_ptr(ptr);

  item = tbl->table[i];
  if (item != NULL)
    while (item->next != NULL)
      item = item->next;

  new = malloc(sizeof(*new));
  assert(new != NULL);
  new->ptr = ptr;
  new->bytes = bytes;
  new->file = file;
  new->line = line;
  new->func = func;
  new->next = NULL;
  if (item != NULL)
    item->next = new;
  else
    tbl->table[i] = new;

  xmalloc_current += bytes;
  if (xmalloc_current > xmalloc_peak)
    xmalloc_peak = xmalloc_current;
  xmalloc_current_blocks++;
  if (xmalloc_current_blocks > xmalloc_peak_blocks)
    xmalloc_peak_blocks = xmalloc_current_blocks;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movl %edx, 0x34(%rsp)
movq %rcx, 0x28(%rsp)
movl %r8d, 0x24(%rsp)
movq %r9, 0x18(%rsp)
movq 0x38(%rsp), %rdi
callq 0x4c4b60
movl %eax, 0x14(%rsp)
movq 0x40(%rsp), %rax
movq (%rax), %rax
movslq 0x14(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x4c45bd
jmp 0x4c459f
movq 0x8(%rsp), %rax
cmpq $0x0, 0x28(%rax)
je 0x4c45bb
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x4c459f
jmp 0x4c45bd
movl $0x30, %edi
callq 0x34068
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
je 0x4c45d4
jmp 0x4c45f3
leaq 0xbbcb4(%rip), %rdi     # 0x58028f
leaq 0xbbae6(%rip), %rsi     # 0x5800c8
movl $0x6c, %edx
leaq 0xbbcad(%rip), %rcx     # 0x58029b
callq 0x2fdc0
movq 0x38(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, (%rax)
movl 0x34(%rsp), %ecx
movq (%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0x28(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x10(%rax)
movl 0x24(%rsp), %ecx
movq (%rsp), %rax
movl %ecx, 0x18(%rax)
movq 0x18(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x20(%rax)
movq (%rsp), %rax
movq $0x0, 0x28(%rax)
cmpq $0x0, 0x8(%rsp)
je 0x4c4652
movq (%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x28(%rax)
jmp 0x4c4667
movq (%rsp), %rdx
movq 0x40(%rsp), %rax
movq (%rax), %rax
movslq 0x14(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movl 0x34(%rsp), %ecx
leaq 0x143bb6(%rip), %rax    # 0x608228
addl (%rax), %ecx
leaq 0x143bad(%rip), %rax    # 0x608228
movl %ecx, (%rax)
leaq 0x143ba4(%rip), %rax    # 0x608228
movl (%rax), %eax
cmpl 0x143b94(%rip), %eax    # 0x608220
jle 0x4c469d
leaq 0x143b93(%rip), %rax    # 0x608228
movl (%rax), %eax
movl %eax, 0x143b83(%rip)    # 0x608220
leaq 0x143b88(%rip), %rax    # 0x60822c
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x143b7c(%rip), %rax    # 0x60822c
movl %ecx, (%rax)
leaq 0x143b73(%rip), %rax    # 0x60822c
movl (%rax), %eax
cmpl 0x143b63(%rip), %eax    # 0x608224
jle 0x4c46d2
leaq 0x143b62(%rip), %rax    # 0x60822c
movl (%rax), %eax
movl %eax, 0x143b52(%rip)    # 0x608224
addq $0x48, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/tre/lib/xmalloc.c
// Function: xcalloc_impl
void *
xcalloc_impl(size_t nmemb, size_t size, const char *file, int line,
	     const char *func)
{
  void *ptr;

  xmalloc_init();
  assert(size > 0);

  if (xmalloc_fail_after == 0)
    {
      xmalloc_fail_after = -2;
#if 0
      printf("xcalloc: forced failure %s:%d: %s\n", file, line, func);
#endif
      return NULL;
    }
  else if (xmalloc_fail_after == -2)
    {
      printf("xcalloc: called after failure from %s:%d: %s\n",
	     file, line, func);
      assert(0);
    }
  else if (xmalloc_fail_after > 0)
    xmalloc_fail_after--;

  ptr = calloc(nmemb, size);
  if (ptr != NULL)
    hash_table_add(xmalloc_table, ptr, (int)(nmemb * size), file, line, func);
  return ptr;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movl %ecx, 0x14(%rsp)
movq %r8, 0x8(%rsp)
callq 0x4c41d0
cmpq $0x0, 0x20(%rsp)
jbe 0x4c470b
jmp 0x4c472a
leaq 0x46804(%rip), %rdi     # 0x50af16
leaq 0xbb9af(%rip), %rsi     # 0x5800c8
movl $0x117, %edx            # imm = 0x117
leaq 0xbba2c(%rip), %rcx     # 0x580151
callq 0x2fdc0
cmpl $0x0, 0x143adf(%rip)    # 0x608210
jne 0x4c474b
movl $0xfffffffe, 0x143ad3(%rip) # imm = 0xFFFFFFFE
movq $0x0, 0x30(%rsp)
jmp 0x4c47fa
cmpl $-0x2, 0x143abe(%rip)   # 0x608210
jne 0x4c478f
movq 0x18(%rsp), %rsi
movl 0x14(%rsp), %edx
movq 0x8(%rsp), %rcx
leaq 0xbba2c(%rip), %rdi     # 0x580195
movb $0x0, %al
callq 0x2f300
leaq 0xb5c89(%rip), %rdi     # 0x57a400
leaq 0xbb94a(%rip), %rsi     # 0x5800c8
movl $0x125, %edx            # imm = 0x125
leaq 0xbb9c7(%rip), %rcx     # 0x580151
callq 0x2fdc0
cmpl $0x0, 0x143a7a(%rip)    # 0x608210
jle 0x4c47a7
movl 0x143a72(%rip), %eax    # 0x608210
addl $-0x1, %eax
movl %eax, 0x143a69(%rip)    # 0x608210
jmp 0x4c47a9
jmp 0x4c47ab
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x32f50
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
je 0x4c47f1
movq 0x143a4c(%rip), %rdi    # 0x608218
movq (%rsp), %rsi
movq 0x28(%rsp), %rax
imulq 0x20(%rsp), %rax
movl %eax, %edx
movq 0x18(%rsp), %rcx
movl 0x14(%rsp), %r8d
movq 0x8(%rsp), %r9
callq 0x4c4550
movq (%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/tre/lib/xmalloc.c
// Function: xfree_impl
void
xfree_impl(void *ptr, const char *file, int line, const char *func)
{
  /*LINTED*/(void)&file;
  /*LINTED*/(void)&line;
  /*LINTED*/(void)&func;
  xmalloc_init();

  if (ptr != NULL)
    hash_table_del(xmalloc_table, ptr);
  free(ptr);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movl %edx, 0x14(%rsp)
movq %rcx, 0x8(%rsp)
callq 0x4c41d0
cmpq $0x0, 0x20(%rsp)
je 0x4c4845
movq 0x1439dd(%rip), %rdi    # 0x608218
movq 0x20(%rsp), %rsi
callq 0x4c4860
movq 0x20(%rsp), %rdi
callq 0x34078
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/tre/lib/xmalloc.c
// Function: hash_table_del
static void
hash_table_del(hashTable *tbl, void *ptr)
{
  int i;
  hashTableItem *item, *prev;

  i = hash_void_ptr(ptr);

  item = tbl->table[i];
  if (item == NULL)
    {
      printf("xfree: invalid ptr %p\n", ptr);
      abort();
    }
  prev = NULL;
  while (item->ptr != ptr)
    {
      prev = item;
      item = item->next;
    }
  if (item->ptr != ptr)
    {
      printf("xfree: invalid ptr %p\n", ptr);
      abort();
    }

  xmalloc_current -= item->bytes;
  xmalloc_current_blocks--;

  if (prev != NULL)
    {
      prev->next = item->next;
      free(item);
    }
  else
    {
      tbl->table[i] = item->next;
      free(item);
    }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x4c4b60
movl %eax, 0x14(%rsp)
movq 0x20(%rsp), %rax
movq (%rax), %rax
movslq 0x14(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x4c48b2
movq 0x18(%rsp), %rsi
leaq 0xbba44(%rip), %rdi     # 0x5802ea
movb $0x0, %al
callq 0x2f300
callq 0x2f830
movq $0x0, (%rsp)
movq 0x8(%rsp), %rax
movq (%rax), %rax
cmpq 0x18(%rsp), %rax
je 0x4c48e2
movq 0x8(%rsp), %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x4c48ba
movq 0x8(%rsp), %rax
movq (%rax), %rax
cmpq 0x18(%rsp), %rax
je 0x4c4909
movq 0x18(%rsp), %rsi
leaq 0xbb9ed(%rip), %rdi     # 0x5802ea
movb $0x0, %al
callq 0x2f300
callq 0x2f830
movq 0x8(%rsp), %rax
movl 0x8(%rax), %eax
leaq 0x143910(%rip), %rcx    # 0x608228
movl (%rcx), %ecx
subl %eax, %ecx
leaq 0x143905(%rip), %rax    # 0x608228
movl %ecx, (%rax)
leaq 0x143900(%rip), %rax    # 0x60822c
movl (%rax), %ecx
addl $-0x1, %ecx
leaq 0x1438f4(%rip), %rax    # 0x60822c
movl %ecx, (%rax)
cmpq $0x0, (%rsp)
je 0x4c495e
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rcx
movq (%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x8(%rsp), %rdi
callq 0x34078
jmp 0x4c4982
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rdx
movq 0x20(%rsp), %rax
movq (%rax), %rax
movslq 0x14(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x8(%rsp), %rdi
callq 0x34078
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/tre/lib/xmalloc.c
// Function: xrealloc_impl
void *
xrealloc_impl(void *ptr, size_t new_size, const char *file, int line,
	      const char *func)
{
  void *new_ptr;

  xmalloc_init();
  assert(ptr != NULL);
  assert(new_size > 0);

  if (xmalloc_fail_after == 0)
    {
      xmalloc_fail_after = -2;
      return NULL;
    }
  else if (xmalloc_fail_after == -2)
    {
      printf("xrealloc: called after failure from %s:%d: %s\n",
	     file, line, func);
      assert(0);
    }
  else if (xmalloc_fail_after > 0)
    xmalloc_fail_after--;

  hash_table_del(xmalloc_table, ptr);
  new_ptr = realloc(ptr, new_size);
  if (new_ptr != NULL)
    {
      hash_table_add(xmalloc_table, new_ptr, (int)new_size, file, line, func);
    }
  return new_ptr;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movl %ecx, 0x14(%rsp)
movq %r8, 0x8(%rsp)
callq 0x4c41d0
cmpq $0x0, 0x28(%rsp)
je 0x4c49bb
jmp 0x4c49da
leaq 0x93800(%rip), %rdi     # 0x5581c2
leaq 0xbb6ff(%rip), %rsi     # 0x5800c8
movl $0x144, %edx            # imm = 0x144
leaq 0xbb7ee(%rip), %rcx     # 0x5801c3
callq 0x2fdc0
cmpq $0x0, 0x20(%rsp)
jbe 0x4c49e4
jmp 0x4c4a03
leaq 0xbb81d(%rip), %rdi     # 0x580208
leaq 0xbb6d6(%rip), %rsi     # 0x5800c8
movl $0x145, %edx            # imm = 0x145
leaq 0xbb7c5(%rip), %rcx     # 0x5801c3
callq 0x2fdc0
cmpl $0x0, 0x143806(%rip)    # 0x608210
jne 0x4c4a24
movl $0xfffffffe, 0x1437fa(%rip) # imm = 0xFFFFFFFE
movq $0x0, 0x30(%rsp)
jmp 0x4c4ade
cmpl $-0x2, 0x1437e5(%rip)   # 0x608210
jne 0x4c4a68
movq 0x18(%rsp), %rsi
movl 0x14(%rsp), %edx
movq 0x8(%rsp), %rcx
leaq 0xbb7d3(%rip), %rdi     # 0x580215
movb $0x0, %al
callq 0x2f300
leaq 0xb59b0(%rip), %rdi     # 0x57a400
leaq 0xbb671(%rip), %rsi     # 0x5800c8
movl $0x150, %edx            # imm = 0x150
leaq 0xbb760(%rip), %rcx     # 0x5801c3
callq 0x2fdc0
cmpl $0x0, 0x1437a1(%rip)    # 0x608210
jle 0x4c4a80
movl 0x143799(%rip), %eax    # 0x608210
addl $-0x1, %eax
movl %eax, 0x143790(%rip)    # 0x608210
jmp 0x4c4a82
jmp 0x4c4a84
movq 0x14378d(%rip), %rdi    # 0x608218
movq 0x28(%rsp), %rsi
callq 0x4c4860
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x340d0
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
je 0x4c4ad5
movq 0x143762(%rip), %rdi    # 0x608218
movq (%rsp), %rsi
movq 0x20(%rsp), %rax
movl %eax, %edx
movq 0x18(%rsp), %rcx
movl 0x14(%rsp), %r8d
movq 0x8(%rsp), %r9
callq 0x4c4550
movq (%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/tre/lib/xmalloc.c
// Function: hash_table_new
static hashTable *
hash_table_new(void)
{
  hashTable *tbl;

  tbl = malloc(sizeof(*tbl));

  if (tbl != NULL)
    {
      tbl->table = calloc(TABLE_SIZE, sizeof(*tbl->table));

      if (tbl->table == NULL)
	{
	  free(tbl);
	  return NULL;
	}
    }

  return tbl;
}

// Assembly:
subq $0x18, %rsp
movl $0x8, %edi
callq 0x34068
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x4c4b47
movl $0x100, %edi            # imm = 0x100
movl $0x8, %esi
callq 0x32f50
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x4c4b45
movq 0x8(%rsp), %rdi
callq 0x34078
movq $0x0, 0x10(%rsp)
jmp 0x4c4b51
jmp 0x4c4b47
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/tre/lib/xmalloc.c
// Function: hash_void_ptr
static int
hash_void_ptr(void *ptr)
{
  int hash;
  int i;

  /* I took this hash function just off the top of my head, I have
     no idea whether it is bad or very bad. */
  hash = 0;
  for (i = 0; i < (int)sizeof(ptr)*8 / TABLE_BITS; i++)
    {
      hash ^= (GtUword)ptr >> i*8;
      hash += i * 17;
      hash &= TABLE_MASK;
    }
  return hash;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl $0x0, -0xc(%rsp)
movl $0x0, -0x10(%rsp)
cmpl $0x8, -0x10(%rsp)
jge 0x4c4bc3
movq -0x8(%rsp), %rax
movl -0x10(%rsp), %ecx
shll $0x3, %ecx
movl %ecx, %ecx
shrq %cl, %rax
movq %rax, %rcx
movslq -0xc(%rsp), %rax
xorq %rcx, %rax
movl %eax, -0xc(%rsp)
imull $0x11, -0x10(%rsp), %eax
addl -0xc(%rsp), %eax
movl %eax, -0xc(%rsp)
movl -0xc(%rsp), %eax
andl $0xff, %eax
movl %eax, -0xc(%rsp)
movl -0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rsp)
jmp 0x4c4b75
movl -0xc(%rsp), %eax
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/zlib-1.3.0.1/infback.c
// Function: inflateBackEnd
int ZEXPORT inflateBackEnd(z_streamp strm) {
    if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
        return Z_STREAM_ERROR;
    ZFREE(strm, strm->state);
    strm->state = Z_NULL;
    Tracev((stderr, "inflate: end\n"));
    return Z_OK;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x4eea99
movq 0x8(%rsp), %rax
cmpq $0x0, 0x38(%rax)
je 0x4eea99
movq 0x8(%rsp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x4eeaa3
movl $0xfffffffe, 0x14(%rsp) # imm = 0xFFFFFFFE
jmp 0x4eead5
movq 0x8(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rsp), %rcx
movq 0x50(%rcx), %rdi
movq 0x8(%rsp), %rcx
movq 0x38(%rcx), %rsi
callq *%rax
movq 0x8(%rsp), %rax
movq $0x0, 0x38(%rax)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/dynamodb-kv/capacity.c
// Function: capacity_init
struct capacity_reader *
capacity_init(const char * key_id, const char * key_secret,
    const char * tname, const char * rname, struct serverpool * SP,
    struct dynamodb_request_queue * QW, struct dynamodb_request_queue * QR)
{
	struct capacity_reader * M;

	/* Allocate space for our state and copy in parameters. */
	if ((M = malloc(sizeof(struct capacity_reader))) == NULL)
		goto err0;
	if ((M->key_id = strdup(key_id)) == NULL)
		goto err1;
	if ((M->key_secret = strdup(key_secret)) == NULL)
		goto err2;
	M->tname = tname;
	M->rname = rname;
	M->SP = SP;
	M->QW = QW;
	M->QR = QR;

	/* Initialize internal state. */
	M->ddbreq = NULL;
	M->addrs[0] = M->addrs[1] = NULL;
	M->http_cookie = NULL;
	M->timer_cookie = NULL;
	M->done = 0;

	/* Start reading table metadata. */
	if (readmetadata(M))
		goto err3;

	/* Wait for response. */
	if (events_spin(&M->done))
		goto err0;

	/* Success! */
	return (M);

err3:
	insecure_memzero(M->key_secret, strlen(M->key_secret));
err2:
	free(M->key_id);
err1:
	free(M);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl $0x68, %edi
callq 0x34c0
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x483d
jmp 0x495f
movq -0x10(%rbp), %rdi
callq 0x3610
movq -0x40(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x4858
jmp 0x4956
movq -0x18(%rbp), %rdi
callq 0x3610
movq -0x40(%rbp), %rcx
movq %rax, 0x8(%rcx)
cmpq $0x0, %rax
jne 0x4874
jmp 0x494a
movq -0x20(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x30(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x28(%rax)
movq 0x10(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x40(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x40(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x40(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x40(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x40(%rbp), %rax
movq $0x0, 0x58(%rax)
movq -0x40(%rbp), %rax
movl $0x0, 0x60(%rax)
movq -0x40(%rbp), %rdi
callq 0x4980
cmpl $0x0, %eax
je 0x4907
jmp 0x4925
movq -0x40(%rbp), %rdi
addq $0x60, %rdi
callq 0x65e0
cmpl $0x0, %eax
je 0x491b
jmp 0x495f
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x4967
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x3190
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x4b00
movq -0x40(%rbp), %rax
movq (%rax), %rdi
callq 0x3460
movq -0x40(%rbp), %rdi
callq 0x3460
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/dynamodb-kv/capacity.c
// Function: readmetadata
static int
readmetadata(struct capacity_reader * M)
{

	/* Construct the DynamoDB request body. */
	if (asprintf(&M->ddbreq, "{\"TableName\":\"%s\"}", M->tname) == -1) {
		warnp("asprintf");
		goto err0;
	}

	/* Get an address. */
	if ((M->addrs[0] = serverpool_pick(M->SP)) == NULL)
		goto err1;

	/* Send the request. */
	if ((M->http_cookie = dynamodb_request(M->addrs, M->key_id,
	    M->key_secret, M->rname, "DescribeTable",
	    (const uint8_t *)M->ddbreq, strlen(M->ddbreq), 4096,
	    callback_readmetadata, M)) == NULL)
		goto err2;

	/* Success! */
	return (0);

err2:
	sock_addr_free(M->addrs[0]);
	M->addrs[0] = NULL;
err1:
	free(M->ddbreq);
	M->ddbreq = NULL;
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x1ea25(%rip), %rsi     # 0x233c8
movb $0x0, %al
callq 0xc0c0
cmpl $-0x1, %eax
jne 0x49eb
jmp 0x49b1
callq 0x3040
cmpl $0x0, (%rax)
je 0x49d6
leaq 0x1e7cd(%rip), %rdi     # 0x2318f
movb $0x0, %al
callq 0x10000
callq 0x3040
movl $0x0, (%rax)
jmp 0x49e4
leaq 0x1e7b2(%rip), %rdi     # 0x2318f
movb $0x0, %al
callq 0x10250
jmp 0x49e6
jmp 0x4ae3
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x14fe0
movq -0x10(%rbp), %rcx
movq %rax, 0x40(%rcx)
cmpq $0x0, %rax
jne 0x4a0b
jmp 0x4aca
movq -0x10(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x3190
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %r9
movq %rax, %r11
movq -0x10(%rbp), %rax
leaq 0x1e966(%rip), %r8      # 0x233db
leaq 0x154(%rip), %r10       # 0x4bd0
movq %r11, (%rsp)
movq $0x1000, 0x8(%rsp)      # imm = 0x1000
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x11c90
movq -0x10(%rbp), %rcx
movq %rax, 0x50(%rcx)
cmpq $0x0, %rax
jne 0x4aa8
jmp 0x4ab1
movl $0x0, -0x4(%rbp)
jmp 0x4aea
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0xef80
movq -0x10(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x3460
movq -0x10(%rbp), %rax
movq $0x0, 0x38(%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/dynamodb-kv/capacity.c
// Function: capacity_free
void
capacity_free(struct capacity_reader * M)
{

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

	/* Cancel HTTP request and pending timer, if they exist. */
	if (M->http_cookie)
		http_request_cancel(M->http_cookie);
	if (M->timer_cookie)
		events_timer_cancel(M->timer_cookie);

	/* Free the AWS keys. */
	insecure_memzero(M->key_secret, strlen(M->key_secret));
	free(M->key_secret);
	free(M->key_id);

	/* Free our cookie. */
	free(M);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x4b45
jmp 0x4bbc
movq -0x8(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x4b5d
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0x87d0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x4b75
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x7f30
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x3190
movq -0x10(%rbp), %rdi
movq %rax, %rsi
callq 0x4b00
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x3460
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x3460
movq -0x8(%rbp), %rdi
callq 0x3460
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/dynamodb-kv/dispatch.c
// Function: dispatch_accept
struct dispatch_state *
dispatch_accept(struct dynamodb_request_queue * QW,
    struct dynamodb_request_queue * QR, const char * table, int s)
{
	struct dispatch_state * D;

	/* Allocate space for dispatcher state. */
	if ((D = malloc(sizeof(struct dispatch_state))) == NULL)
		goto err0;

	/* Initialize dispatcher. */
	D->QW = QW;
	D->QR = QR;
	D->table = table;
	D->ip_head = D->ip_tail = NULL;

	/* Accept a connection. */
	D->accepting = 1;
	if (network_accept(s, callback_accept, D) == NULL)
		goto err1;

	/* Success! */
	return (D);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl $0x48, %edi
callq 0x34c0
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x52ed
jmp 0x5361
movq -0x10(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x30(%rbp), %rax
movl $0x1, 0x28(%rax)
movl -0x24(%rbp), %edi
movq -0x30(%rbp), %rdx
leaq 0x3f(%rip), %rsi        # 0x5380
callq 0xad10
cmpq $0x0, %rax
jne 0x534e
jmp 0x5358
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x5369
movq -0x30(%rbp), %rdi
callq 0x3460
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/dynamodb-kv/dispatch.c
// Function: dispatch_done
int
dispatch_done(struct dispatch_state * D)
{

	/* Sanity check. */
	assert(D->accepting == 0);
	assert(D->read_cookie == NULL);
	assert(D->ip_head == NULL);
	assert(D->ip_tail == NULL);

	/* Free the buffered reader for the connection. */
	netbuf_read_free(D->readq);

	/* Free the buffered writer for the connection. */
	netbuf_write_free(D->writeq);

	/* Close the connection. */
	if (close(D->sconn))
		warnp("close");

	/* Free allocated memory. */
	free(D);

	/* Success! */
	return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x28(%rax)
jne 0x5628
jmp 0x5647
leaq 0x1e039(%rip), %rdi     # 0x23668
leaq 0x1e044(%rip), %rsi     # 0x2367a
movl $0x1be, %edx            # imm = 0x1BE
leaq 0x1e043(%rip), %rcx     # 0x23685
callq 0x3240
movq -0x8(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x5654
jmp 0x5673
leaq 0x1e055(%rip), %rdi     # 0x236b0
leaq 0x1e018(%rip), %rsi     # 0x2367a
movl $0x1bf, %edx            # imm = 0x1BF
leaq 0x1e017(%rip), %rcx     # 0x23685
callq 0x3240
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x5680
jmp 0x569f
leaq 0x1e040(%rip), %rdi     # 0x236c7
leaq 0x1dfec(%rip), %rsi     # 0x2367a
movl $0x1c0, %edx            # imm = 0x1C0
leaq 0x1dfeb(%rip), %rcx     # 0x23685
callq 0x3240
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x56ac
jmp 0x56cb
leaq 0x1e027(%rip), %rdi     # 0x236da
leaq 0x1dfc0(%rip), %rsi     # 0x2367a
movl $0x1c1, %edx            # imm = 0x1C1
leaq 0x1dfbf(%rip), %rcx     # 0x23685
callq 0x3240
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0xa410
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xaae0
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %edi
callq 0x3660
cmpl $0x0, %eax
je 0x572f
jmp 0x56f8
callq 0x3040
cmpl $0x0, (%rax)
je 0x571d
leaq 0x1e1e7(%rip), %rdi     # 0x238f0
movb $0x0, %al
callq 0x10000
callq 0x3040
movl $0x0, (%rax)
jmp 0x572b
leaq 0x1e1cc(%rip), %rdi     # 0x238f0
movb $0x0, %al
callq 0x10250
jmp 0x572d
jmp 0x572f
movq -0x8(%rbp), %rdi
callq 0x3460
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/dynamodb-kv/dispatch.c
// Function: dropconnection
static int
dropconnection(void * cookie)
{
	struct dispatch_state * D = cookie;

	/* If we're waiting for a request to arrive, stop waiting. */
	if (D->read_cookie != NULL) {
		wire_readpacket_wait_cancel(D->read_cookie);
		D->read_cookie = NULL;
	}

	/*
	 * Flush the DynamoDB request queues: If the connection is dying,
	 * we won't be able to send responses back, so there's no point
	 * processing the requests in the first place.
	 */
	dynamodb_request_queue_flush(D->QW);
	dynamodb_request_queue_flush(D->QR);

	/* Free the list of in-progress requests. */
	while (D->ip_head != NULL)
		request_dequeue(D, D->ip_head);

	/* Success!  (We can't fail -- but netbuf_write doesn't know that.) */
	return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x5778
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x158f0
movq -0x10(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x12530
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x12530
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x57af
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x5c10
jmp 0x5791
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/dynamodb-kv/dispatch.c
// Function: request_dequeue
static void
request_dequeue(struct dispatch_state * D, struct request * R)
{

	/* Sanity-check linked list. */
	assert(D == R->D);

	/* Free the contents of the kivaloo-dynamodb-kv request. */
	proto_dynamodb_kv_request_free(&R->R);

	/* Free the DynamoDB request body we constructed. */
	free(R->body);

	/* Remove from the linked list. */
	if (D->ip_head == R) {
		assert(R->prev == NULL);
		D->ip_head = R->next;
	} else {
		assert(R->prev != NULL);
		R->prev->next = R->next;
	}
	if (D->ip_tail == R) {
		assert(R->next == NULL);
		D->ip_tail = R->prev;
	} else {
		assert(R->next != NULL);
		R->next->prev = R->prev;
	}

	/* Free the request structure. */
	free(R);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jne 0x5c2f
jmp 0x5c4e
leaq 0x1db5d(%rip), %rdi     # 0x23793
leaq 0x1da3d(%rip), %rsi     # 0x2367a
movl $0x3a, %edx
leaq 0x1db54(%rip), %rcx     # 0x2379d
callq 0x3240
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
callq 0x14480
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0x3460
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x5cb4
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x5c83
jmp 0x5ca2
leaq 0x1db53(%rip), %rdi     # 0x237dd
leaq 0x1d9e9(%rip), %rsi     # 0x2367a
movl $0x44, %edx
leaq 0x1db00(%rip), %rcx     # 0x2379d
callq 0x3240
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0x5cf4
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x5cc1
jmp 0x5ce0
leaq 0x1db25(%rip), %rdi     # 0x237ed
leaq 0x1d9ab(%rip), %rsi     # 0x2367a
movl $0x47, %edx
leaq 0x1dac2(%rip), %rcx     # 0x2379d
callq 0x3240
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x5d40
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x5d0f
jmp 0x5d2e
leaq 0x1dae7(%rip), %rdi     # 0x237fd
leaq 0x1d95d(%rip), %rsi     # 0x2367a
movl $0x4b, %edx
leaq 0x1da74(%rip), %rcx     # 0x2379d
callq 0x3240
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
jmp 0x5d80
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x5d4d
jmp 0x5d6c
leaq 0x1dab9(%rip), %rdi     # 0x2380d
leaq 0x1d91f(%rip), %rsi     # 0x2367a
movl $0x4e, %edx
leaq 0x1da36(%rip), %rcx     # 0x2379d
callq 0x3240
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
callq 0x3460
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../lib/proto_dynamodb_kv/proto_dynamodb_kv_server.c
// Function: proto_dynamodb_kv_request_read
int
proto_dynamodb_kv_request_read(struct netbuf_read * R,
    struct proto_ddbkv_request * req)
{
	struct wire_packet P;

	/* Try to grab a packet from the buffered reader. */
	if (wire_readpacket_peek(R, &P))
		goto err0;

	/* Do we have a packet? */
	if (P.buf == NULL)
		goto nopacket;

	/* Parse this packet. */
	if (proto_dynamodb_kv_request_parse(&P, req))
		goto err0;

	/* Consume the packet. */
	wire_readpacket_consume(R, &P);

	/* Success! */
	return (0);

nopacket:
	/* Record that no request was available. */
	req->type = PROTO_DDBKV_NONE;

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x15480
cmpl $0x0, %eax
je 0x140a4
jmp 0x140eb
cmpq $0x0, -0x20(%rbp)
jne 0x140ad
jmp 0x140d7
movq -0x18(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x14100
cmpl $0x0, %eax
je 0x140c1
jmp 0x140eb
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x15950
movl $0x0, -0x4(%rbp)
jmp 0x140f2
movq -0x18(%rbp), %rax
movl $0xffffffff, 0x8(%rax)  # imm = 0xFFFFFFFF
movl $0x0, -0x4(%rbp)
jmp 0x140f2
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../lib/proto_dynamodb_kv/proto_dynamodb_kv_server.c
// Function: proto_dynamodb_kv_request_free
void
proto_dynamodb_kv_request_free(struct proto_ddbkv_request * req)
{

	/* Free malloced data buffer(s) depending on request type. */
	switch (req->type) {
	case PROTO_DDBKV_ICAS:
		free(req->buf2);
		/* FALLTHROUGH */
	case PROTO_DDBKV_CREATE:
	case PROTO_DDBKV_PUT:
		free(req->buf);
		break;
	default:
		/* Nothing to free. */
		break;
	}

	/* Free the key. */
	free(req->key);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0xc(%rbp)
subl $0x10100, %eax          # imm = 0x10100
je 0x144c4
jmp 0x1449f
movl -0xc(%rbp), %eax
subl $0x10101, %eax          # imm = 0x10101
je 0x144b7
jmp 0x144ab
movl -0xc(%rbp), %eax
subl $0x10102, %eax          # imm = 0x10102
je 0x144c4
jmp 0x144d3
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x3460
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x3460
jmp 0x144d5
jmp 0x144d5
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x3460
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../lib/proto_dynamodb_kv/proto_dynamodb_kv_server.c
// Function: proto_dynamodb_kv_response_data
int
proto_dynamodb_kv_response_data(struct netbuf_write * Q, uint64_t ID,
    int status, uint32_t len, const uint8_t * buf)
{
	uint8_t * wbuf;
	size_t rlen;

	/* Sanity check. */
	assert((status == 0) || (status == 1) || (status == 2));

	/* Compute the response length. */
	rlen = 4 + ((status == 0) ? len + 4 : 0);

	/* Get a packet data buffer. */
	if ((wbuf = wire_writepacket_getbuf(Q, ID, rlen)) == NULL)
		goto err0;

	/* Write the packet data. */
	be32enc(&wbuf[0], (uint32_t)status);
	if (status == 0) {
		be32enc(&wbuf[4], len);
		memcpy(&wbuf[8], buf, len);
	}

	/* Finish the packet. */
	if (wire_writepacket_done(Q, wbuf, rlen))
		goto err0;

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1463c
cmpl $0x1, -0x1c(%rbp)
je 0x1463c
cmpl $0x2, -0x1c(%rbp)
jne 0x1463e
jmp 0x1465d
leaq 0x10e29(%rip), %rdi     # 0x2546e
leaq 0x10e52(%rip), %rsi     # 0x2549e
movl $0xe8, %edx
leaq 0x10ec6(%rip), %rcx     # 0x2551e
callq 0x3240
cmpl $0x0, -0x1c(%rbp)
jne 0x1466e
movl -0x20(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x3c(%rbp)
jmp 0x14675
xorl %eax, %eax
movl %eax, -0x3c(%rbp)
jmp 0x14675
movl -0x3c(%rbp), %eax
addl $0x4, %eax
movl %eax, %eax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x15c70
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x1469e
jmp 0x146f7
movq -0x30(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x145a0
cmpl $0x0, -0x1c(%rbp)
jne 0x146d6
movq -0x30(%rbp), %rdi
addq $0x4, %rdi
movl -0x20(%rbp), %esi
callq 0x145a0
movq -0x30(%rbp), %rdi
addq $0x8, %rdi
movq -0x28(%rbp), %rsi
movl -0x20(%rbp), %eax
movl %eax, %edx
callq 0x32c0
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x15eb0
cmpl $0x0, %eax
je 0x146ee
jmp 0x146f7
movl $0x0, -0x4(%rbp)
jmp 0x146fe
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_1/exercise_1_14/frequency_histogram.c
// Function: main
int main(void)
{
  int i;
  char chars_freq[ALPHA_NR + NUM_NR];

  // Initialize the chars_freq array with 0
  for (i = 0; i < (ALPHA_NR + NUM_NR); ++i)
  {
    chars_freq[i] = 0;
  }

  // Count characters from the standard input
  char c;
  while ((c = getchar()) != EOF)
  {
    if (c >= 'a' && c <= 'z')
    {
      ++chars_freq[c - 'a'];
    }
    else if (c >= '0' && c <= '9')
    {
      ++chars_freq[c - '0' + ALPHA_NR];
    }
  }

  // Print horizontal histogram
  for (i = 0; i < (ALPHA_NR + NUM_NR); ++i)
  {
    if (i < ALPHA_NR)
    {
      printf("%c: ", 'a' + i);
    }
    else if (i >= ALPHA_NR)
    {
      printf("%c: ", '0' + i - ALPHA_NR);
    }

    int j;
    for (j = 0; j < chars_freq[i]; ++j)
    {
      printf("#");
    }

    putchar('\n');
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl $0x0, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
cmpl $0x24, -0x8(%rbp)
jge 0x1190
movslq -0x8(%rbp), %rax
movb $0x0, -0x30(%rbp,%rax)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x1176
jmp 0x1192
callq 0x1050
movb %al, -0x31(%rbp)
movsbl %al, %eax
cmpl $-0x1, %eax
je 0x11f7
movsbl -0x31(%rbp), %eax
cmpl $0x61, %eax
jl 0x11ca
movsbl -0x31(%rbp), %eax
cmpl $0x7a, %eax
jg 0x11ca
movsbl -0x31(%rbp), %eax
subl $0x61, %eax
cltq
movb -0x30(%rbp,%rax), %cl
addb $0x1, %cl
movb %cl, -0x30(%rbp,%rax)
jmp 0x11f5
movsbl -0x31(%rbp), %eax
cmpl $0x30, %eax
jl 0x11f3
movsbl -0x31(%rbp), %eax
cmpl $0x39, %eax
jg 0x11f3
movsbl -0x31(%rbp), %eax
subl $0x30, %eax
addl $0x1a, %eax
cltq
movb -0x30(%rbp,%rax), %cl
addb $0x1, %cl
movb %cl, -0x30(%rbp,%rax)
jmp 0x11f5
jmp 0x1192
movl $0x0, -0x8(%rbp)
cmpl $0x24, -0x8(%rbp)
jge 0x128b
cmpl $0x1a, -0x8(%rbp)
jge 0x1224
movl -0x8(%rbp), %esi
addl $0x61, %esi
leaq 0xde9(%rip), %rdi       # 0x2004
movb $0x0, %al
callq 0x1040
jmp 0x1243
cmpl $0x1a, -0x8(%rbp)
jl 0x1241
movl -0x8(%rbp), %esi
addl $0x30, %esi
subl $0x1a, %esi
leaq 0xdca(%rip), %rdi       # 0x2004
movb $0x0, %al
callq 0x1040
jmp 0x1243
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
movslq -0x8(%rbp), %rcx
movsbl -0x30(%rbp,%rcx), %ecx
cmpl %ecx, %eax
jge 0x1273
leaq 0xda8(%rip), %rdi       # 0x2009
movb $0x0, %al
callq 0x1040
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x124a
movl $0xa, %edi
callq 0x1030
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x11fe
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/bmottershead[P]DBF2TSV/tsv2dbf.c
// Function: type_to_str
char* type_to_str(DBFFieldType t) {
  switch(t) {
  case FTInteger: 
    return "FTInteger";
  case FTString: 
    return "FTString";
  case FTDouble: 
    return "FTDouble";
  case FTLogical: 
    return "FTLogical";
  default:
  case FTInvalid: 
    return "FTInvalid";
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x4, %rax
ja 0x1e4c
movq -0x18(%rbp), %rax
leaq 0x4209(%rip), %rcx      # 0x6018
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x438f(%rip), %rax      # 0x61ae
movq %rax, -0x8(%rbp)
jmp 0x1e59
leaq 0x438c(%rip), %rax      # 0x61b8
movq %rax, -0x8(%rbp)
jmp 0x1e59
leaq 0x4388(%rip), %rax      # 0x61c1
movq %rax, -0x8(%rbp)
jmp 0x1e59
leaq 0x4384(%rip), %rax      # 0x61ca
movq %rax, -0x8(%rbp)
jmp 0x1e59
jmp 0x1e4e
leaq 0x437f(%rip), %rax      # 0x61d4
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/plvhx[P]dummy-vm/src/insn.c
// Function: vm_insn_addb_imm8_imm8_to_r0
void vm_insn_addb_imm8_imm8_to_r0(vm_t *vm) {
  vm->state = vm_state_insert(vm->state, VM_INSN_ADDB_IMM8_IMM8_TO_R0);

  short op1 = vm_insn_read_byte(vm) == 0xff
                  ? VM_NEGATE_BYTE(vm_insn_read_byte(vm))
                  : vm_insn_read_byte(vm);

  short op2 = vm_insn_read_byte(vm) == 0xff
                  ? VM_NEGATE_BYTE(vm_insn_read_byte(vm))
                  : vm_insn_read_byte(vm);

  short res = op1 + op2;

  vm->regs->gp->r0->is_negative = ((short)res < 0) ? 1 : 0;
  vm->regs->gp->r0->val =
      !vm->regs->gp->r0->is_negative
          ? VM_ALIGN_TO_BYTE((unsigned short)res)
          : 0xff - (VM_ALIGN_TO_BYTE((unsigned short)res) - 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
movl $0x40, %esi
callq 0x8080
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rdi
callq 0x1290
movzwl %ax, %eax
cmpl $0xff, %eax
jne 0x1b5f
movq -0x8(%rbp), %rdi
callq 0x1290
movzwl %ax, %ecx
andl $0xff, %ecx
movl $0xff, %eax
subl %ecx, %eax
subl $0xff, %eax
movl %eax, -0x14(%rbp)
jmp 0x1b6e
movq -0x8(%rbp), %rdi
callq 0x1290
movzwl %ax, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1290
movzwl %ax, %eax
cmpl $0xff, %eax
jne 0x1bab
movq -0x8(%rbp), %rdi
callq 0x1290
movzwl %ax, %ecx
andl $0xff, %ecx
movl $0xff, %eax
subl %ecx, %eax
subl $0xff, %eax
movl %eax, -0x18(%rbp)
jmp 0x1bba
movq -0x8(%rbp), %rdi
callq 0x1290
movzwl %ax, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movw %ax, -0xc(%rbp)
movswl -0xa(%rbp), %eax
movswl -0xc(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0xe(%rbp)
movswl -0xe(%rbp), %edx
xorl %ecx, %ecx
movl $0x1, %eax
cmpl $0x0, %edx
cmovll %eax, %ecx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movq (%rax), %rax
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movq (%rax), %rax
cmpl $0x0, 0x4(%rax)
jne 0x1c13
movzwl -0xe(%rbp), %eax
andl $0xff, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1c2a
movzwl -0xe(%rbp), %ecx
andl $0xff, %ecx
subl $0x1, %ecx
movl $0xff, %eax
subl %ecx, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movq (%rax), %rax
movw %cx, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/plvhx[P]dummy-vm/src/insn.c
// Function: vm_insn_addb_imm8_imm8_to_r1
void vm_insn_addb_imm8_imm8_to_r1(vm_t *vm) {
  vm->state = vm_state_insert(vm->state, VM_INSN_ADDB_IMM8_IMM8_TO_R1);

  short op1 = vm_insn_read_byte(vm) == 0xff
                  ? VM_NEGATE_BYTE(vm_insn_read_byte(vm))
                  : vm_insn_read_byte(vm);

  short op2 = vm_insn_read_byte(vm) == 0xff
                  ? VM_NEGATE_BYTE(vm_insn_read_byte(vm))
                  : vm_insn_read_byte(vm);

  short res = op1 + op2;

  vm->regs->gp->r1->is_negative = ((short)res < 0) ? 1 : 0;
  vm->regs->gp->r1->val =
      !vm->regs->gp->r1->is_negative
          ? VM_ALIGN_TO_BYTE((unsigned short)res)
          : 0xff - (VM_ALIGN_TO_BYTE((unsigned short)res) - 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
movl $0x41, %esi
callq 0x8080
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rdi
callq 0x1290
movzwl %ax, %eax
cmpl $0xff, %eax
jne 0x1caf
movq -0x8(%rbp), %rdi
callq 0x1290
movzwl %ax, %ecx
andl $0xff, %ecx
movl $0xff, %eax
subl %ecx, %eax
subl $0xff, %eax
movl %eax, -0x14(%rbp)
jmp 0x1cbe
movq -0x8(%rbp), %rdi
callq 0x1290
movzwl %ax, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1290
movzwl %ax, %eax
cmpl $0xff, %eax
jne 0x1cfb
movq -0x8(%rbp), %rdi
callq 0x1290
movzwl %ax, %ecx
andl $0xff, %ecx
movl $0xff, %eax
subl %ecx, %eax
subl $0xff, %eax
movl %eax, -0x18(%rbp)
jmp 0x1d0a
movq -0x8(%rbp), %rdi
callq 0x1290
movzwl %ax, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movw %ax, -0xc(%rbp)
movswl -0xa(%rbp), %eax
movswl -0xc(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0xe(%rbp)
movswl -0xe(%rbp), %edx
xorl %ecx, %ecx
movl $0x1, %eax
cmpl $0x0, %edx
cmovll %eax, %ecx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
cmpl $0x0, 0x4(%rax)
jne 0x1d65
movzwl -0xe(%rbp), %eax
andl $0xff, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1d7c
movzwl -0xe(%rbp), %ecx
andl $0xff, %ecx
subl $0x1, %ecx
movl $0xff, %eax
subl %ecx, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movw %cx, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/plvhx[P]dummy-vm/src/insn.c
// Function: vm_insn_addb_imm8_imm8_to_r2
void vm_insn_addb_imm8_imm8_to_r2(vm_t *vm) {
  vm->state = vm_state_insert(vm->state, VM_INSN_ADDB_IMM8_IMM8_TO_R2);

  short op1 = vm_insn_read_byte(vm) == 0xff
                  ? VM_NEGATE_BYTE(vm_insn_read_byte(vm))
                  : vm_insn_read_byte(vm);

  short op2 = vm_insn_read_byte(vm) == 0xff
                  ? VM_NEGATE_BYTE(vm_insn_read_byte(vm))
                  : vm_insn_read_byte(vm);

  short res = op1 + op2;

  vm->regs->gp->r2->is_negative = ((short)res < 0) ? 1 : 0;
  vm->regs->gp->r2->val =
      !vm->regs->gp->r2->is_negative
          ? VM_ALIGN_TO_BYTE((unsigned short)res)
          : 0xff - (VM_ALIGN_TO_BYTE((unsigned short)res) - 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
movl $0x42, %esi
callq 0x8080
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rdi
callq 0x1290
movzwl %ax, %eax
cmpl $0xff, %eax
jne 0x1dff
movq -0x8(%rbp), %rdi
callq 0x1290
movzwl %ax, %ecx
andl $0xff, %ecx
movl $0xff, %eax
subl %ecx, %eax
subl $0xff, %eax
movl %eax, -0x14(%rbp)
jmp 0x1e0e
movq -0x8(%rbp), %rdi
callq 0x1290
movzwl %ax, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1290
movzwl %ax, %eax
cmpl $0xff, %eax
jne 0x1e4b
movq -0x8(%rbp), %rdi
callq 0x1290
movzwl %ax, %ecx
andl $0xff, %ecx
movl $0xff, %eax
subl %ecx, %eax
subl $0xff, %eax
movl %eax, -0x18(%rbp)
jmp 0x1e5a
movq -0x8(%rbp), %rdi
callq 0x1290
movzwl %ax, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movw %ax, -0xc(%rbp)
movswl -0xa(%rbp), %eax
movswl -0xc(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0xe(%rbp)
movswl -0xe(%rbp), %edx
xorl %ecx, %ecx
movl $0x1, %eax
cmpl $0x0, %edx
cmovll %eax, %ecx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
cmpl $0x0, 0x4(%rax)
jne 0x1eb5
movzwl -0xe(%rbp), %eax
andl $0xff, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1ecc
movzwl -0xe(%rbp), %ecx
andl $0xff, %ecx
subl $0x1, %ecx
movl $0xff, %eax
subl %ecx, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movw %cx, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)