LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_u64
bool cmp_read_u64(cmp_ctx_t *ctx, uint64_t *l) {
  cmp_object_t obj;

  if (!cmp_read_object(ctx, &obj))
    return false;

  if (obj.type != CMP_TYPE_UINT64) {
    ctx->error = INVALID_TYPE_ERROR;
    return false;
  }

  *l = obj.as.u64;
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x20(%rbp), %rsi
callq 0x27d3
testb %al, %al
je 0x2c6a
cmpb $0x11, -0x20(%rbp)
jne 0x2c66
movq -0x18(%rbp), %rax
movq %rax, (%rbx)
movb $0x1, %al
jmp 0x2c6c
movb $0xd, (%r14)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_uchar
bool cmp_read_uchar(cmp_ctx_t *ctx, uint8_t *c) {
  cmp_object_t obj;

  if (!cmp_read_object(ctx, &obj))
    return false;

  switch (obj.type) {
    case CMP_TYPE_POSITIVE_FIXNUM:
    case CMP_TYPE_UINT8:
      *c = obj.as.u8;
      return true;
    case CMP_TYPE_NEGATIVE_FIXNUM:
    case CMP_TYPE_SINT8:
      if (obj.as.s8 >= 0) {
        *c = obj.as.s8;
        return true;
      }
      break;
    default:
      break;
  }

  ctx->error = INVALID_TYPE_ERROR;
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x20(%rbp), %rsi
callq 0x27d3
testb %al, %al
je 0x2cc0
movzbl -0x20(%rbp), %eax
testl %eax, %eax
je 0x2caa
cmpl $0x22, %eax
je 0x2caf
cmpl $0x12, %eax
je 0x2caf
cmpl $0xe, %eax
jne 0x2cbc
movb -0x18(%rbp), %al
jmp 0x2cb6
movb -0x18(%rbp), %al
testb %al, %al
js 0x2cbc
movb %al, (%rbx)
movb $0x1, %al
jmp 0x2cc2
movb $0xd, (%r14)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_ushort
bool cmp_read_ushort(cmp_ctx_t *ctx, uint16_t *s) {
  cmp_object_t obj;

  if (!cmp_read_object(ctx, &obj))
    return false;

  switch (obj.type) {
    case CMP_TYPE_POSITIVE_FIXNUM:
    case CMP_TYPE_UINT8:
      *s = obj.as.u8;
      return true;
    case CMP_TYPE_UINT16:
      *s = obj.as.u16;
      return true;
    case CMP_TYPE_NEGATIVE_FIXNUM:
    case CMP_TYPE_SINT8:
      if (obj.as.s8 >= 0) {
        *s = obj.as.s8;
        return true;
      }
      break;
    case CMP_TYPE_SINT16:
      if (obj.as.s16 >= 0) {
        *s = obj.as.s16;
        return true;
      }
      break;
    default:
      break;
  }

  ctx->error = INVALID_TYPE_ERROR;
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x20(%rbp), %rsi
callq 0x27d3
testb %al, %al
je 0x2d3c
movzbl -0x20(%rbp), %eax
leal -0xe(%rax), %ecx
cmpl $0x5, %ecx
ja 0x2d0b
leaq 0x2528(%rip), %rax      # 0x5224
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movzwl -0x18(%rbp), %eax
jmp 0x2d31
cmpl $0x22, %eax
je 0x2d1a
testl %eax, %eax
jne 0x2d38
movzbl -0x18(%rbp), %eax
jmp 0x2d23
movsbl -0x18(%rbp), %eax
testw %ax, %ax
js 0x2d38
movw %ax, (%rbx)
jmp 0x2d34
movzwl -0x18(%rbp), %eax
testw %ax, %ax
js 0x2d38
movw %ax, (%rbx)
movb $0x1, %al
jmp 0x2d3e
movb $0xd, (%r14)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_uint
bool cmp_read_uint(cmp_ctx_t *ctx, uint32_t *i) {
  cmp_object_t obj;

  if (!cmp_read_object(ctx, &obj))
    return false;

  switch (obj.type) {
    case CMP_TYPE_POSITIVE_FIXNUM:
    case CMP_TYPE_UINT8:
      *i = obj.as.u8;
      return true;
    case CMP_TYPE_UINT16:
      *i = obj.as.u16;
      return true;
    case CMP_TYPE_UINT32:
      *i = obj.as.u32;
      return true;
    case CMP_TYPE_NEGATIVE_FIXNUM:
    case CMP_TYPE_SINT8:
      if (obj.as.s8 >= 0) {
        *i = obj.as.s8;
        return true;
      }
      break;
    case CMP_TYPE_SINT16:
      if (obj.as.s16 >= 0) {
        *i = obj.as.s16;
        return true;
      }
      break;
    case CMP_TYPE_SINT32:
      if (obj.as.s32 >= 0) {
        *i = obj.as.s32;
        return true;
      }
      break;
    default:
      break;
  }

  ctx->error = INVALID_TYPE_ERROR;
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x20(%rbp), %rsi
callq 0x27d3
testb %al, %al
je 0x2db8
movzbl -0x20(%rbp), %eax
leal -0xe(%rax), %ecx
cmpl $0x6, %ecx
ja 0x2d87
leaq 0x24c4(%rip), %rax      # 0x523c
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movzwl -0x18(%rbp), %eax
jmp 0x2dae
cmpl $0x22, %eax
je 0x2d96
testl %eax, %eax
jne 0x2db4
movzbl -0x18(%rbp), %eax
jmp 0x2dae
movsbl -0x18(%rbp), %eax
jmp 0x2daa
movl -0x18(%rbp), %eax
jmp 0x2dae
movswl -0x18(%rbp), %eax
jmp 0x2daa
movl -0x18(%rbp), %eax
testl %eax, %eax
js 0x2db4
movl %eax, (%rbx)
movb $0x1, %al
jmp 0x2dba
movb $0xd, (%r14)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_float
bool cmp_read_float(cmp_ctx_t *ctx, float *f) {
  cmp_object_t obj;

  if (!cmp_read_object(ctx, &obj))
    return false;

  if (obj.type != CMP_TYPE_FLOAT) {
    ctx->error = INVALID_TYPE_ERROR;
    return false;
  }

  *f = obj.as.flt;

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x20(%rbp), %rsi
callq 0x27d3
testb %al, %al
je 0x2e8a
cmpb $0xc, -0x20(%rbp)
jne 0x2e86
movss -0x18(%rbp), %xmm0
movss %xmm0, (%rbx)
movb $0x1, %al
jmp 0x2e8c
movb $0xd, (%r14)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_double
bool cmp_read_double(cmp_ctx_t *ctx, double *d) {
  cmp_object_t obj;

  if (!cmp_read_object(ctx, &obj))
    return false;

  if (obj.type != CMP_TYPE_DOUBLE) {
    ctx->error = INVALID_TYPE_ERROR;
    return false;
  }

  *d = obj.as.dbl;

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x20(%rbp), %rsi
callq 0x27d3
testb %al, %al
je 0x2eca
cmpb $0xd, -0x20(%rbp)
jne 0x2ec6
movsd -0x18(%rbp), %xmm0
movsd %xmm0, (%rbx)
movb $0x1, %al
jmp 0x2ecc
movb $0xd, (%r14)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_decimal
bool cmp_read_decimal(cmp_ctx_t *ctx, double *d) {
  cmp_object_t obj;

  if (!cmp_read_object(ctx, &obj))
    return false;

  switch (obj.type) {
    case CMP_TYPE_FLOAT:
      *d = (double)obj.as.flt;
      return true;
    case CMP_TYPE_DOUBLE:
      *d = obj.as.dbl;
      return true;
    default:
      ctx->error = INVALID_TYPE_ERROR;
      return false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x20(%rbp), %rsi
callq 0x27d3
testb %al, %al
je 0x2f19
movzbl -0x20(%rbp), %eax
cmpl $0xd, %eax
je 0x2f08
cmpl $0xc, %eax
jne 0x2f15
cvtss2sd -0x18(%rbp), %xmm0
jmp 0x2f0d
movsd -0x18(%rbp), %xmm0
movsd %xmm0, (%rbx)
movb $0x1, %al
jmp 0x2f1b
movb $0xd, (%r14)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_nil
bool cmp_read_nil(cmp_ctx_t *ctx) {
  cmp_object_t obj;

  if (!cmp_read_object(ctx, &obj))
    return false;

  if (obj.type == CMP_TYPE_NIL)
    return true;

  ctx->error = INVALID_TYPE_ERROR;
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq -0x18(%rbp), %rsi
callq 0x27d3
testb %al, %al
je 0x2f48
movb $0x1, %al
cmpb $0x4, -0x18(%rbp)
je 0x2f4a
movb $0xd, (%rbx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_bool
bool cmp_read_bool(cmp_ctx_t *ctx, bool *b) {
  cmp_object_t obj;

  if (!cmp_read_object(ctx, &obj))
    return false;

  if (obj.type != CMP_TYPE_BOOLEAN) {
    ctx->error = INVALID_TYPE_ERROR;
    return false;
  }

  if (obj.as.boolean)
    *b = true;
  else
    *b = false;

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x20(%rbp), %rsi
callq 0x27d3
testb %al, %al
je 0x2f82
cmpb $0x5, -0x20(%rbp)
jne 0x2f7e
movb -0x18(%rbp), %al
movb %al, (%rbx)
movb $0x1, %al
jmp 0x2f84
movb $0xd, (%r14)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_bool_as_u8
bool cmp_read_bool_as_u8(cmp_ctx_t *ctx, uint8_t *b) {
  cmp_object_t obj;

  if (!cmp_read_object(ctx, &obj))
    return false;

  if (obj.type != CMP_TYPE_BOOLEAN) {
    ctx->error = INVALID_TYPE_ERROR;
    return false;
  }

  if (obj.as.boolean)
    *b = 1;
  else
    *b = 0;

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x20(%rbp), %rsi
callq 0x27d3
testb %al, %al
je 0x2fbe
cmpb $0x5, -0x20(%rbp)
jne 0x2fba
movb -0x18(%rbp), %al
movb %al, (%rbx)
movb $0x1, %al
jmp 0x2fc0
movb $0xd, (%r14)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_str_size
bool cmp_read_str_size(cmp_ctx_t *ctx, uint32_t *size) {
  cmp_object_t obj;

  if (!cmp_read_object(ctx, &obj))
    return false;

  switch (obj.type) {
    case CMP_TYPE_FIXSTR:
    case CMP_TYPE_STR8:
    case CMP_TYPE_STR16:
    case CMP_TYPE_STR32:
      *size = obj.as.str_size;
      return true;
    default:
      ctx->error = INVALID_TYPE_ERROR;
      return false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x20(%rbp), %rsi
callq 0x27d3
testb %al, %al
je 0x3007
movzbl -0x20(%rbp), %eax
cmpl $0x1d, %eax
ja 0x3003
movl $0x38000008, %ecx       # imm = 0x38000008
btl %eax, %ecx
jae 0x3003
movl -0x18(%rbp), %eax
movl %eax, (%rbx)
movb $0x1, %al
jmp 0x3009
movb $0xd, (%r14)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_str
bool cmp_read_str(cmp_ctx_t *ctx, char *data, uint32_t *size) {
  uint32_t str_size = 0;

  if (!cmp_read_str_size(ctx, &str_size))
    return false;

  if ((str_size + 1) > *size) {
    *size = str_size;
    ctx->error = STR_DATA_LENGTH_TOO_LONG_ERROR;
    return false;
  }

  if (!ctx->read(ctx, data, str_size)) {
    ctx->error = DATA_READING_ERROR;
    return false;
  }

  data[str_size] = 0;

  *size = str_size;
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq -0x24(%rbp), %rsi
andl $0x0, (%rsi)
callq 0x2fc9
testb %al, %al
je 0x3071
movl -0x24(%rbp), %r12d
leal 0x1(%r12), %eax
cmpl (%rbx), %eax
jbe 0x3050
movl %r12d, (%rbx)
movb $0x1, (%r14)
jmp 0x3071
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq *0x10(%r14)
testb %al, %al
je 0x306d
movb $0x0, (%r15,%r12)
movl %r12d, (%rbx)
movb $0x1, %al
jmp 0x3073
movb $0x9, (%r14)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_bin_size
bool cmp_read_bin_size(cmp_ctx_t *ctx, uint32_t *size) {
  cmp_object_t obj;

  if (!cmp_read_object(ctx, &obj))
    return false;

  switch (obj.type) {
    case CMP_TYPE_BIN8:
    case CMP_TYPE_BIN16:
    case CMP_TYPE_BIN32:
      *size = obj.as.bin_size;
      return true;
    default:
      ctx->error = INVALID_TYPE_ERROR;
      return false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x20(%rbp), %rsi
callq 0x27d3
testb %al, %al
je 0x30b4
movb -0x20(%rbp), %al
addb $-0x6, %al
cmpb $0x2, %al
ja 0x30b0
movl -0x18(%rbp), %eax
movl %eax, (%rbx)
movb $0x1, %al
jmp 0x30b6
movb $0xd, (%r14)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_bin
bool cmp_read_bin(cmp_ctx_t *ctx, void *data, uint32_t *size) {
  uint32_t bin_size = 0;

  if (!cmp_read_bin_size(ctx, &bin_size))
    return false;

  if (bin_size > *size) {
    ctx->error = BIN_DATA_LENGTH_TOO_LONG_ERROR;
    return false;
  }

  if (!ctx->read(ctx, data, bin_size)) {
    ctx->error = DATA_READING_ERROR;
    return false;
  }

  *size = bin_size;
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq -0x24(%rbp), %rsi
andl $0x0, (%rsi)
callq 0x3080
testb %al, %al
je 0x3112
movl -0x24(%rbp), %r12d
cmpl (%rbx), %r12d
jbe 0x30f6
movb $0x2, (%r14)
jmp 0x3112
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq *0x10(%r14)
testb %al, %al
je 0x310e
movl %r12d, (%rbx)
movb $0x1, %al
jmp 0x3114
movb $0x9, (%r14)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_array
bool cmp_read_array(cmp_ctx_t *ctx, uint32_t *size) {
  cmp_object_t obj;

  if (!cmp_read_object(ctx, &obj))
    return false;

  switch (obj.type) {
    case CMP_TYPE_FIXARRAY:
    case CMP_TYPE_ARRAY16:
    case CMP_TYPE_ARRAY32:
      *size = obj.as.array_size;
      return true;
    default:
      ctx->error = INVALID_TYPE_ERROR;
      return false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x20(%rbp), %rsi
callq 0x27d3
testb %al, %al
je 0x315f
movzbl -0x20(%rbp), %eax
cmpl $0x1f, %eax
ja 0x315b
movl $0xc0000004, %ecx       # imm = 0xC0000004
btl %eax, %ecx
jae 0x315b
movl -0x18(%rbp), %eax
movl %eax, (%rbx)
movb $0x1, %al
jmp 0x3161
movb $0xd, (%r14)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_map
bool cmp_read_map(cmp_ctx_t *ctx, uint32_t *size) {
  cmp_object_t obj;

  if (!cmp_read_object(ctx, &obj))
    return false;

  switch (obj.type) {
    case CMP_TYPE_FIXMAP:
    case CMP_TYPE_MAP16:
    case CMP_TYPE_MAP32:
      *size = obj.as.map_size;
      return true;
    default:
      ctx->error = INVALID_TYPE_ERROR;
      return false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x20(%rbp), %rsi
callq 0x27d3
testb %al, %al
je 0x31af
movzbl -0x20(%rbp), %eax
cmpq $0x21, %rax
ja 0x31ab
movabsq $0x300000002, %rcx      # imm = 0x300000002
btq %rax, %rcx
jae 0x31ab
movl -0x18(%rbp), %eax
movl %eax, (%rbx)
movb $0x1, %al
jmp 0x31b1
movb $0xd, (%r14)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_fixext1_marker
bool cmp_read_fixext1_marker(cmp_ctx_t *ctx, int8_t *type) {
  cmp_object_t obj;

  if (!cmp_read_object(ctx, &obj))
    return false;
  
  if (obj.type != CMP_TYPE_FIXEXT1) {
    ctx->error = INVALID_TYPE_ERROR;
    return false;
  }

  *type = obj.as.ext.type;
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x20(%rbp), %rsi
callq 0x27d3
testb %al, %al
je 0x31eb
cmpb $0x16, -0x20(%rbp)
jne 0x31e7
movb -0x18(%rbp), %al
movb %al, (%rbx)
movb $0x1, %al
jmp 0x31ed
movb $0xd, (%r14)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_fixext1
bool cmp_read_fixext1(cmp_ctx_t *ctx, int8_t *type, void *data) {
  if (!cmp_read_fixext1_marker(ctx, type))
    return false;

  if (ctx->read(ctx, data, 1))
    return true;

  ctx->error = DATA_READING_ERROR;
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
callq 0x31ba
testb %al, %al
je 0x3223
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq *0x10(%rbx)
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x3225
movb $0x9, (%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_fixext2_marker
bool cmp_read_fixext2_marker(cmp_ctx_t *ctx, int8_t *type) {
  cmp_object_t obj;

  if (!cmp_read_object(ctx, &obj))
    return false;
  
  if (obj.type != CMP_TYPE_FIXEXT2) {
    ctx->error = INVALID_TYPE_ERROR;
    return false;
  }

  *type = obj.as.ext.type;
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x20(%rbp), %rsi
callq 0x27d3
testb %al, %al
je 0x325b
cmpb $0x17, -0x20(%rbp)
jne 0x3257
movb -0x18(%rbp), %al
movb %al, (%rbx)
movb $0x1, %al
jmp 0x325d
movb $0xd, (%r14)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_fixext2
bool cmp_read_fixext2(cmp_ctx_t *ctx, int8_t *type, void *data) {
  if (!cmp_read_fixext2_marker(ctx, type))
    return false;

  if (ctx->read(ctx, data, 2))
    return true;

  ctx->error = DATA_READING_ERROR;
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
callq 0x322a
testb %al, %al
je 0x3293
pushq $0x2
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq *0x10(%rbx)
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x3295
movb $0x9, (%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_fixext4_marker
bool cmp_read_fixext4_marker(cmp_ctx_t *ctx, int8_t *type) {
  cmp_object_t obj;

  if (!cmp_read_object(ctx, &obj))
    return false;
  
  if (obj.type != CMP_TYPE_FIXEXT4) {
    ctx->error = INVALID_TYPE_ERROR;
    return false;
  }

  *type = obj.as.ext.type;
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x20(%rbp), %rsi
callq 0x27d3
testb %al, %al
je 0x32cb
cmpb $0x18, -0x20(%rbp)
jne 0x32c7
movb -0x18(%rbp), %al
movb %al, (%rbx)
movb $0x1, %al
jmp 0x32cd
movb $0xd, (%r14)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_fixext4
bool cmp_read_fixext4(cmp_ctx_t *ctx, int8_t *type, void *data) {
  if (!cmp_read_fixext4_marker(ctx, type))
    return false;

  if (ctx->read(ctx, data, 4))
    return true;

  ctx->error = DATA_READING_ERROR;
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
callq 0x329a
testb %al, %al
je 0x3303
pushq $0x4
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq *0x10(%rbx)
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x3305
movb $0x9, (%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_fixext8_marker
bool cmp_read_fixext8_marker(cmp_ctx_t *ctx, int8_t *type) {
  cmp_object_t obj;

  if (!cmp_read_object(ctx, &obj))
    return false;
  
  if (obj.type != CMP_TYPE_FIXEXT8) {
    ctx->error = INVALID_TYPE_ERROR;
    return false;
  }

  *type = obj.as.ext.type;
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x20(%rbp), %rsi
callq 0x27d3
testb %al, %al
je 0x333b
cmpb $0x19, -0x20(%rbp)
jne 0x3337
movb -0x18(%rbp), %al
movb %al, (%rbx)
movb $0x1, %al
jmp 0x333d
movb $0xd, (%r14)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_fixext8
bool cmp_read_fixext8(cmp_ctx_t *ctx, int8_t *type, void *data) {
  if (!cmp_read_fixext8_marker(ctx, type))
    return false;

  if (ctx->read(ctx, data, 8))
    return true;

  ctx->error = DATA_READING_ERROR;
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
callq 0x330a
testb %al, %al
je 0x3373
pushq $0x8
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq *0x10(%rbx)
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x3375
movb $0x9, (%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_fixext16_marker
bool cmp_read_fixext16_marker(cmp_ctx_t *ctx, int8_t *type) {
  cmp_object_t obj;

  if (!cmp_read_object(ctx, &obj))
    return false;
  
  if (obj.type != CMP_TYPE_FIXEXT16) {
    ctx->error = INVALID_TYPE_ERROR;
    return false;
  }

  *type = obj.as.ext.type;
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x20(%rbp), %rsi
callq 0x27d3
testb %al, %al
je 0x33ab
cmpb $0x1a, -0x20(%rbp)
jne 0x33a7
movb -0x18(%rbp), %al
movb %al, (%rbx)
movb $0x1, %al
jmp 0x33ad
movb $0xd, (%r14)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_fixext16
bool cmp_read_fixext16(cmp_ctx_t *ctx, int8_t *type, void *data) {
  if (!cmp_read_fixext16_marker(ctx, type))
    return false;

  if (ctx->read(ctx, data, 16))
    return true;

  ctx->error = DATA_READING_ERROR;
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
callq 0x337a
testb %al, %al
je 0x33e3
pushq $0x10
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq *0x10(%rbx)
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x33e5
movb $0x9, (%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_ext8_marker
bool cmp_read_ext8_marker(cmp_ctx_t *ctx, int8_t *type, uint8_t *size) {
  cmp_object_t obj;

  if (!cmp_read_object(ctx, &obj))
    return false;

  if (obj.type != CMP_TYPE_EXT8) {
    ctx->error = INVALID_TYPE_ERROR;
    return false;
  }

  *type = obj.as.ext.type;
  *size = (uint8_t)obj.as.ext.size;

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq -0x28(%rbp), %rsi
callq 0x27d3
testb %al, %al
je 0x3426
cmpb $0x9, -0x28(%rbp)
jne 0x3422
movb -0x20(%rbp), %al
movb %al, (%r14)
movb -0x1c(%rbp), %al
movb %al, (%rbx)
movb $0x1, %al
jmp 0x3428
movb $0xd, (%r15)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_ext8
bool cmp_read_ext8(cmp_ctx_t *ctx, int8_t *type, uint8_t *size, void *data) {
  if (!cmp_read_ext8_marker(ctx, type, size))
    return false;

  if (ctx->read(ctx, data, *size))
    return true;

  ctx->error = DATA_READING_ERROR;
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
callq 0x33ea
testb %al, %al
je 0x3467
movzbl (%r15), %edx
movq %rbx, %rdi
movq %r14, %rsi
callq *0x10(%rbx)
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x3469
movb $0x9, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_ext16_marker
bool cmp_read_ext16_marker(cmp_ctx_t *ctx, int8_t *type, uint16_t *size) {
  cmp_object_t obj;

  if (!cmp_read_object(ctx, &obj))
    return false;

  if (obj.type != CMP_TYPE_EXT16) {
    ctx->error = INVALID_TYPE_ERROR;
    return false;
  }

  *type = obj.as.ext.type;
  *size = (uint16_t)obj.as.ext.size;

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq -0x28(%rbp), %rsi
callq 0x27d3
testb %al, %al
je 0x34b2
cmpb $0xa, -0x28(%rbp)
jne 0x34ae
movb -0x20(%rbp), %al
movb %al, (%r14)
movzwl -0x1c(%rbp), %eax
movw %ax, (%rbx)
movb $0x1, %al
jmp 0x34b4
movb $0xd, (%r15)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_ext16
bool cmp_read_ext16(cmp_ctx_t *ctx, int8_t *type, uint16_t *size, void *data) {
  if (!cmp_read_ext16_marker(ctx, type, size))
    return false;

  if (ctx->read(ctx, data, *size))
    return true;

  ctx->error = DATA_READING_ERROR;
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
callq 0x3474
testb %al, %al
je 0x34f3
movzwl (%r15), %edx
movq %rbx, %rdi
movq %r14, %rsi
callq *0x10(%rbx)
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x34f5
movb $0x9, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_ext32_marker
bool cmp_read_ext32_marker(cmp_ctx_t *ctx, int8_t *type, uint32_t *size) {
  cmp_object_t obj;

  if (!cmp_read_object(ctx, &obj))
    return false;

  if (obj.type != CMP_TYPE_EXT32) {
    ctx->error = INVALID_TYPE_ERROR;
    return false;
  }

  *type = obj.as.ext.type;
  *size = obj.as.ext.size;

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq -0x28(%rbp), %rsi
callq 0x27d3
testb %al, %al
je 0x353c
cmpb $0xb, -0x28(%rbp)
jne 0x3538
movb -0x20(%rbp), %al
movb %al, (%r14)
movl -0x1c(%rbp), %eax
movl %eax, (%rbx)
movb $0x1, %al
jmp 0x353e
movb $0xd, (%r15)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_ext32
bool cmp_read_ext32(cmp_ctx_t *ctx, int8_t *type, uint32_t *size, void *data) {
  if (!cmp_read_ext32_marker(ctx, type, size))
    return false;

  if (ctx->read(ctx, data, *size))
    return true;

  ctx->error = DATA_READING_ERROR;
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
callq 0x3500
testb %al, %al
je 0x357c
movl (%r15), %edx
movq %rbx, %rdi
movq %r14, %rsi
callq *0x10(%rbx)
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x357e
movb $0x9, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_ext_marker
bool cmp_read_ext_marker(cmp_ctx_t *ctx, int8_t *type, uint32_t *size) {
  cmp_object_t obj;

  if (!cmp_read_object(ctx, &obj))
    return false;

  switch (obj.type) {
    case CMP_TYPE_FIXEXT1:
    case CMP_TYPE_FIXEXT2:
    case CMP_TYPE_FIXEXT4:
    case CMP_TYPE_FIXEXT8:
    case CMP_TYPE_FIXEXT16:
    case CMP_TYPE_EXT8:
    case CMP_TYPE_EXT16:
    case CMP_TYPE_EXT32:
      *type = obj.as.ext.type;
      *size = obj.as.ext.size;
      return true;
    default:
      ctx->error = INVALID_TYPE_ERROR;
      return false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq -0x28(%rbp), %rsi
callq 0x27d3
testb %al, %al
je 0x35d2
movzbl -0x28(%rbp), %eax
cmpl $0x1a, %eax
ja 0x35ce
movl $0x7c00e00, %ecx        # imm = 0x7C00E00
btl %eax, %ecx
jae 0x35ce
movb -0x20(%rbp), %al
movb %al, (%r14)
movl -0x1c(%rbp), %eax
movl %eax, (%rbx)
movb $0x1, %al
jmp 0x35d4
movb $0xd, (%r15)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_read_ext
bool cmp_read_ext(cmp_ctx_t *ctx, int8_t *type, uint32_t *size, void *data) {
  if (!cmp_read_ext_marker(ctx, type, size))
    return false;

  if (ctx->read(ctx, data, *size))
    return true;

  ctx->error = DATA_READING_ERROR;
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
callq 0x3589
testb %al, %al
je 0x3612
movl (%r15), %edx
movq %rbx, %rdi
movq %r14, %rsi
callq *0x10(%rbx)
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x3614
movb $0x9, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_skip_object
bool cmp_skip_object(cmp_ctx_t *ctx, cmp_object_t *obj) {
  uint8_t type_marker = 0;
  uint8_t cmp_type;
  uint32_t size = 0;

  if (!read_type_marker(ctx, &type_marker)) {
    return false;
  }

  if (!type_marker_to_cmp_type(type_marker, &cmp_type)) {
    ctx->error = INVALID_TYPE_ERROR;
    return false;
  }

  switch (cmp_type) {
    case CMP_TYPE_FIXARRAY:
    case CMP_TYPE_ARRAY16:
    case CMP_TYPE_ARRAY32:
    case CMP_TYPE_FIXMAP:
    case CMP_TYPE_MAP16:
    case CMP_TYPE_MAP32:
      obj->type = cmp_type;

      if (!read_obj_data(ctx, type_marker, obj)) {
        return false;
      }

      ctx->error = SKIP_DEPTH_LIMIT_EXCEEDED_ERROR;

      return false;
    default:
      if (!read_type_size(ctx, type_marker, cmp_type, &size)) {
        return false;
      }

      if (size) {
        switch (cmp_type) {
          case CMP_TYPE_FIXEXT1:
          case CMP_TYPE_FIXEXT2:
          case CMP_TYPE_FIXEXT4:
          case CMP_TYPE_FIXEXT8:
          case CMP_TYPE_FIXEXT16:
          case CMP_TYPE_EXT8:
          case CMP_TYPE_EXT16:
          case CMP_TYPE_EXT32:
            size++;
          default:
            break;
        }

        skip_bytes(ctx, size);
      }
  }

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x22(%rbp), %rsi
movb $0x0, (%rsi)
andl $0x0, -0x28(%rbp)
pushq $0x1
popq %rdx
callq *0x10(%rdi)
testb %al, %al
je 0x3930
movzbl -0x22(%rbp), %r15d
leaq -0x21(%rbp), %rsi
movl %r15d, %edi
callq 0x361f
testb %al, %al
je 0x3935
movzbl -0x21(%rbp), %r12d
cmpq $0x21, %r12
ja 0x394b
movabsq $0x3c0000006, %rax      # imm = 0x3C0000006
btq %r12, %rax
jae 0x394b
movb %r12b, (%r14)
movq %rbx, %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x367a
testb %al, %al
je 0x3938
movb $0x10, (%rbx)
jmp 0x3938
movb $0x7, (%rbx)
jmp 0x3938
movb $0xd, (%rbx)
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movzbl %r12b, %edx
leaq -0x28(%rbp), %rcx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x398b
testb %al, %al
je 0x3938
movl -0x28(%rbp), %eax
movb $0x1, %r14b
testl %eax, %eax
je 0x393b
cmpl $0x1a, %r12d
ja 0x397f
movl $0x7c00e00, %ecx        # imm = 0x7C00E00
btl %r12d, %ecx
jae 0x397f
incl %eax
movl %eax, %esi
movq %rbx, %rdi
callq 0x3ac1
jmp 0x393b
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: skip_bytes
static bool skip_bytes(cmp_ctx_t *ctx, size_t count) {
  if (ctx->skip) {
    return ctx->skip(ctx, count);
  }
  else {
    uint8_t floor;
    size_t i;

    for (i = 0; i < count; i++) {
      if (!ctx->read(ctx, &floor, sizeof(uint8_t))) {
        return false;
      }
    }

    return true;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x3af3
movq %r14, %rdi
movq %rbx, %rsi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmpq *%rax
incq %rbx
leaq -0x21(%rbp), %r15
pushq $0x1
popq %r12
decq %rbx
je 0x3b14
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq *0x10(%r14)
testb %al, %al
jne 0x3afe
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_object_as_char
bool cmp_object_as_char(cmp_object_t *obj, int8_t *c) {
  switch (obj->type) {
    case CMP_TYPE_POSITIVE_FIXNUM:
    case CMP_TYPE_NEGATIVE_FIXNUM:
    case CMP_TYPE_SINT8:
      *c = obj->as.s8;
      return true;
    case CMP_TYPE_UINT8:
      if (obj->as.u8 <= 127) {
        *c = obj->as.s8;
        return true;
      }
      else {
        return false;
      }
    default:
        return false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzbl (%rdi), %eax
testl %eax, %eax
je 0x411c
cmpl $0xe, %eax
je 0x4125
cmpl $0x22, %eax
je 0x411c
cmpl $0x12, %eax
jne 0x412c
movb 0x8(%rdi), %al
movb %al, (%rsi)
movb $0x1, %al
jmp 0x412e
movb 0x8(%rdi), %al
testb %al, %al
jns 0x411f
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_object_as_short
bool cmp_object_as_short(cmp_object_t *obj, int16_t *s) {
  switch (obj->type) {
    case CMP_TYPE_POSITIVE_FIXNUM:
    case CMP_TYPE_NEGATIVE_FIXNUM:
    case CMP_TYPE_SINT8:
      *s = obj->as.s8;
      return true;
    case CMP_TYPE_UINT8:
      *s = obj->as.u8;
      return true;
    case CMP_TYPE_SINT16:
      *s = obj->as.s16;
      return true;
    case CMP_TYPE_UINT16:
      if (obj->as.u16 <= 32767) {
        *s = obj->as.u16;
        return true;
      }
      else {
        return false;
      }
    default:
        return false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzbl (%rdi), %ecx
xorl %eax, %eax
leal -0xe(%rcx), %edx
cmpl $0x5, %edx
ja 0x4157
leaq 0x127c(%rip), %rcx      # 0x53c4
movslq (%rcx,%rdx,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movzbl 0x8(%rdi), %eax
jmp 0x4175
cmpl $0x22, %ecx
je 0x4160
testl %ecx, %ecx
jne 0x417a
movsbl 0x8(%rdi), %eax
jmp 0x4175
movzwl 0x8(%rdi), %eax
jmp 0x4175
movzwl 0x8(%rdi), %eax
testw %ax, %ax
js 0x417c
movw %ax, (%rsi)
movb $0x1, %al
popq %rbp
retq
xorl %eax, %eax
jmp 0x417a
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_object_as_int
bool cmp_object_as_int(cmp_object_t *obj, int32_t *i) {
  switch (obj->type) {
    case CMP_TYPE_POSITIVE_FIXNUM:
    case CMP_TYPE_NEGATIVE_FIXNUM:
    case CMP_TYPE_SINT8:
      *i = obj->as.s8;
      return true;
    case CMP_TYPE_UINT8:
      *i = obj->as.u8;
      return true;
    case CMP_TYPE_SINT16:
      *i = obj->as.s16;
      return true;
    case CMP_TYPE_UINT16:
      *i = obj->as.u16;
      return true;
    case CMP_TYPE_SINT32:
      *i = obj->as.s32;
      return true;
    case CMP_TYPE_UINT32:
      if (obj->as.u32 <= 2147483647) {
        *i = obj->as.u32;
        return true;
      }
      else {
        return false;
      }
    default:
        return false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzbl (%rdi), %ecx
xorl %eax, %eax
leal -0xe(%rcx), %edx
cmpl $0x6, %edx
ja 0x41a7
leaq 0x1244(%rip), %rcx      # 0x53dc
movslq (%rcx,%rdx,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movzbl 0x8(%rdi), %eax
jmp 0x41d0
cmpl $0x22, %ecx
je 0x41b0
testl %ecx, %ecx
jne 0x41d4
movsbl 0x8(%rdi), %eax
jmp 0x41d0
movl 0x8(%rdi), %eax
testl %eax, %eax
jns 0x41d0
xorl %eax, %eax
jmp 0x41d4
movswl 0x8(%rdi), %eax
jmp 0x41d0
movzwl 0x8(%rdi), %eax
jmp 0x41d0
movl 0x8(%rdi), %eax
movl %eax, (%rsi)
movb $0x1, %al
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_object_as_ushort
bool cmp_object_as_ushort(cmp_object_t *obj, uint16_t *s) {
  switch (obj->type) {
    case CMP_TYPE_POSITIVE_FIXNUM:
    case CMP_TYPE_UINT8:
      *s = obj->as.u8;
      return true;
    case CMP_TYPE_UINT16:
      *s = obj->as.u16;
      return true;
    default:
        return false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzbl (%rdi), %eax
testl %eax, %eax
je 0x4274
cmpl $0xf, %eax
je 0x427a
cmpl $0xe, %eax
jne 0x4285
movzbl 0x8(%rdi), %eax
jmp 0x427e
movzwl 0x8(%rdi), %eax
movw %ax, (%rsi)
movb $0x1, %al
jmp 0x4287
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_object_as_uint
bool cmp_object_as_uint(cmp_object_t *obj, uint32_t *i) {
  switch (obj->type) {
    case CMP_TYPE_POSITIVE_FIXNUM:
    case CMP_TYPE_UINT8:
      *i = obj->as.u8;
      return true;
    case CMP_TYPE_UINT16:
      *i = obj->as.u16;
      return true;
    case CMP_TYPE_UINT32:
      *i = obj->as.u32;
      return true;
    default:
        return false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzbl (%rdi), %eax
testl %eax, %eax
je 0x42a3
cmpl $0x10, %eax
je 0x42a9
cmpl $0xf, %eax
je 0x42ae
cmpl $0xe, %eax
jne 0x42b8
movzbl 0x8(%rdi), %eax
jmp 0x42b2
movl 0x8(%rdi), %eax
jmp 0x42b2
movzwl 0x8(%rdi), %eax
movl %eax, (%rsi)
movb $0x1, %al
popq %rbp
retq
xorl %eax, %eax
jmp 0x42b6
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_object_as_ulong
bool cmp_object_as_ulong(cmp_object_t *obj, uint64_t *u) {
  switch (obj->type) {
    case CMP_TYPE_POSITIVE_FIXNUM:
    case CMP_TYPE_UINT8:
      *u = obj->as.u8;
      return true;
    case CMP_TYPE_UINT16:
      *u = obj->as.u16;
      return true;
    case CMP_TYPE_UINT32:
      *u = obj->as.u32;
      return true;
    case CMP_TYPE_UINT64:
      *u = obj->as.u64;
      return true;
    default:
        return false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzbl (%rdi), %ecx
leal -0xe(%rcx), %eax
cmpl $0x3, %eax
ja 0x42e1
leaq 0x117a(%rip), %rcx      # 0x544c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzwl 0x8(%rdi), %eax
jmp 0x42f8
testl %ecx, %ecx
jne 0x42eb
movzbl 0x8(%rdi), %eax
jmp 0x42f8
xorl %eax, %eax
jmp 0x42fd
movl 0x8(%rdi), %eax
jmp 0x42f8
movq 0x8(%rdi), %rax
movq %rax, (%rsi)
movb $0x1, %al
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_object_as_float
bool cmp_object_as_float(cmp_object_t *obj, float *f) {
  if (obj->type == CMP_TYPE_FLOAT) {
    *f = obj->as.flt;
    return true;
  }

  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %al
cmpb $0xc, %al
jne 0x431c
movss 0x8(%rdi), %xmm0
movss %xmm0, (%rsi)
cmpb $0xc, %al
sete %al
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_object_as_double
bool cmp_object_as_double(cmp_object_t *obj, double *d) {
  if (obj->type == CMP_TYPE_DOUBLE) {
    *d = obj->as.dbl;
    return true;
  }

  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %al
cmpb $0xd, %al
jne 0x4336
movsd 0x8(%rdi), %xmm0
movsd %xmm0, (%rsi)
cmpb $0xd, %al
sete %al
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_object_as_bool
bool cmp_object_as_bool(cmp_object_t *obj, bool *b) {
  if (obj->type == CMP_TYPE_BOOLEAN) {
    if (obj->as.boolean)
      *b = true;
    else
      *b = false;

    return true;
  }

  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %al
cmpb $0x5, %al
jne 0x434c
movb 0x8(%rdi), %cl
movb %cl, (%rsi)
cmpb $0x5, %al
sete %al
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_object_as_bin
bool cmp_object_as_bin(cmp_object_t *obj, uint32_t *size) {
  switch (obj->type) {
    case CMP_TYPE_BIN8:
    case CMP_TYPE_BIN16:
    case CMP_TYPE_BIN32:
      *size = obj->as.bin_size;
      return true;
    default:
        return false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %al
addb $-0x6, %al
cmpb $0x2, %al
ja 0x4385
movl 0x8(%rdi), %ecx
movl %ecx, (%rsi)
cmpb $0x3, %al
setb %al
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_object_as_ext
bool cmp_object_as_ext(cmp_object_t *obj, int8_t *type, uint32_t *size) {
  switch (obj->type) {
    case CMP_TYPE_FIXEXT1:
    case CMP_TYPE_FIXEXT2:
    case CMP_TYPE_FIXEXT4:
    case CMP_TYPE_FIXEXT8:
    case CMP_TYPE_FIXEXT16:
    case CMP_TYPE_EXT8:
    case CMP_TYPE_EXT16:
    case CMP_TYPE_EXT32:
      *type = obj->as.ext.type;
      *size = obj->as.ext.size;
      return true;
    default:
        return false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzbl (%rdi), %ecx
xorl %eax, %eax
cmpl $0x1a, %ecx
ja 0x43fb
movl $0x7c00e00, %r8d        # imm = 0x7C00E00
btl %ecx, %r8d
jae 0x43fb
movb 0x8(%rdi), %al
movb %al, (%rsi)
movl 0xc(%rdi), %eax
movl %eax, (%rdx)
movb $0x1, %al
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_object_to_str
bool cmp_object_to_str(cmp_ctx_t *ctx, cmp_object_t *obj, char *data,
                                                          uint32_t buf_size) {
  uint32_t str_size = 0;

  switch (obj->type) {
    case CMP_TYPE_FIXSTR:
    case CMP_TYPE_STR8:
    case CMP_TYPE_STR16:
    case CMP_TYPE_STR32:
      str_size = obj->as.str_size;
      if ((str_size + 1) > buf_size) {
        ctx->error = STR_DATA_LENGTH_TOO_LONG_ERROR;
        return false;
      }

      if (!ctx->read(ctx, data, str_size)) {
        ctx->error = DATA_READING_ERROR;
        return false;
      }

      data[str_size] = 0;
      return true;
    default:
      return false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movzbl (%rsi), %edx
xorl %eax, %eax
cmpl $0x1d, %edx
ja 0x4453
movq %rdi, %r14
movl $0x38000008, %edi       # imm = 0x38000008
btl %edx, %edi
jae 0x4453
movl 0x8(%rsi), %r15d
leal 0x1(%r15), %eax
cmpl %ecx, %eax
jbe 0x4433
movb $0x1, (%r14)
jmp 0x4451
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq *0x10(%r14)
testb %al, %al
je 0x444d
movb $0x0, (%rbx,%r15)
movb $0x1, %al
jmp 0x4453
movb $0x9, (%r14)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_object_to_bin
bool cmp_object_to_bin(cmp_ctx_t *ctx, cmp_object_t *obj, void *data,
                                                          uint32_t buf_size) {
  uint32_t bin_size = 0;

  switch (obj->type) {
    case CMP_TYPE_BIN8:
    case CMP_TYPE_BIN16:
    case CMP_TYPE_BIN32:
      bin_size = obj->as.bin_size;
      if (bin_size > buf_size) {
        ctx->error = BIN_DATA_LENGTH_TOO_LONG_ERROR;
        return false;
      }

      if (!ctx->read(ctx, data, bin_size)) {
        ctx->error = DATA_READING_ERROR;
        return false;
      }
      return true;
    default:
      return false;
  }
}

// Assembly:
movb (%rsi), %al
addb $-0x6, %al
cmpb $0x2, %al
ja 0x449c
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x8(%rsi), %eax
movb $0x2, %sil
cmpl %ecx, %eax
ja 0x4490
movq %rbx, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq *0x10(%rbx)
movl %eax, %ecx
movb $0x9, %sil
movb $0x1, %al
testb %cl, %cl
jne 0x4495
movb %sil, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/dump.c
// Function: msgpack_data_read
void msgpack_data_read(msgpack_data *backing_data, void* out_data, size_t length) {
    size_t new_end_position = backing_data->position + length;
    if (new_end_position > backing_data->buffer.length) {
        perror("Msgpack library tried to read more than the message's size. Message is probably malformed.\n");
        exit(4);
    }
    memcpy(out_data, backing_data->buffer.data + backing_data->position, length);
    backing_data->position = new_end_position;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x10(%rdi), %rax
leaq (%rax,%rdx), %r14
cmpq (%rdi), %r14
ja 0x44f4
movq %rdi, %rbx
addq 0x8(%rdi), %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x10a0
movq %r14, 0x10(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1221(%rip), %rdi      # 0x571c
callq 0x10d0
pushq $0x4
popq %rdi
callq 0x10e0
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/dump.c
// Function: msgpack_data_skip
void msgpack_data_skip(msgpack_data *backing_data, size_t length) {
    backing_data->position += length;
    if (backing_data->position > backing_data->buffer.length) {
        perror("Msgpack library tried to read more than the message's size. Message is probably malformed.\n");
        exit(4);
    }
}

// Assembly:
addq 0x10(%rdi), %rsi
movq %rsi, 0x10(%rdi)
cmpq (%rdi), %rsi
ja 0x4516
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x11fb(%rip), %rdi      # 0x571c
callq 0x10d0
pushq $0x4
popq %rdi
callq 0x10e0
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/dump.c
// Function: dump_msgpack
void dump_msgpack(buffer rawdata, bool print_strings) {
    msgpack_data data = make_msgpack_data(rawdata);
    cmp_ctx_t ctx;

    cmp_init(&ctx, &data, msgpack_reader, msgpack_skipper, NULL);

    cmp_object_t obj;
    while (!msgpack_data_reached_eof(&data)) {
        if (!cmp_read_object(&ctx, &obj)) {
            perror("Messagepack library error\n");
            perror(cmp_strerror(&ctx));
            exit(5);
        }

        dump_msgpack_object(&data, &obj, print_strings);
    }
    //printf("%s", "done");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movl %edx, %r12d
leaq -0x38(%rbp), %rbx
movq %rdi, (%rbx)
movq %rsi, 0x8(%rbx)
andq $0x0, 0x10(%rbx)
leaq 0x7c(%rip), %rdx        # 0x45d3
leaq 0x86(%rip), %rcx        # 0x45e4
leaq -0x70(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
xorl %r8d, %r8d
callq 0x13a0
leaq -0x48(%rbp), %r15
movzbl %r12b, %r12d
movq -0x28(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x45a1
movq %r14, %rdi
movq %r15, %rsi
callq 0x27d3
testb %al, %al
je 0x45ae
movq %rbx, %rdi
movq %r15, %rsi
movl %r12d, %edx
callq 0x45f5
jmp 0x4578
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x11c3(%rip), %rdi      # 0x5778
callq 0x10d0
leaq -0x70(%rbp), %rdi
callq 0x13cf
movq %rax, %rdi
callq 0x10d0
pushq $0x5
popq %rdi
callq 0x10e0
// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/dump.c
// Function: dump_msgpack_string
void dump_msgpack_string(msgpack_data *raw_data, cmp_object_t* object, uint32_t length, bool print_strings) {
    char *str = malloc(length);
    msgpack_data_read(raw_data, str, length);

    if (print_strings) {
        fprintf(stdout, "\n\"");
        fwrite(str, 1, length, stdout);
        fprintf(stdout, "\"");
    }

    free(str);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %r15d
movq %rdi, %r12
movl %edx, %r14d
movq %r14, %rdi
callq 0x10b0
movq %rax, %rbx
movq %r12, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x44c5
testl %r15d, %r15d
je 0x48a6
movq 0x576a(%rip), %r12      # 0x9fd8
movq (%r12), %rcx
leaq 0x11d7(%rip), %rdi      # 0x5a50
pushq $0x2
popq %rsi
pushq $0x1
popq %r15
movq %r15, %rdx
callq 0x10f0
movq (%r12), %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x10f0
movq (%r12), %rsi
pushq $0x22
popq %rdi
callq 0x1090
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1030
nop
// File: /workspace/github_c_makefile_star2_O2/nerves-project[P]nerves_initramfs/tests/fixture/init_fixture.c
// Function: fixture_init
__attribute__((constructor)) void fixture_init()
{
    // WARNING: This is hacky!!!
    starting_pid = getpid();
    if (starting_pid == 1)
        errx(EXIT_FAILURE, "getpid() overridden before it should have been");

    work = getenv("WORK");

    // Don't wrap child processes
    unsetenv("LD_PRELOAD");
    unsetenv("DYLD_INSERT_LIBRARIES");
}

// Assembly:
pushq %rax
xorl %eax, %eax
callq *0x4ed3(%rip)           # 0x70b8
cmpl 0x4ea5(%rip), %eax      # 0x7090
pushq $0x1
popq %rcx
cmovnel %eax, %ecx
movl %ecx, 0x4e99(%rip)      # 0x7090
cmpl $0x1, %ecx
je 0x2228
leaq 0x1e70(%rip), %rdi      # 0x4073
callq 0x2030
movq %rax, 0x4e91(%rip)      # 0x70a0
leaq 0x1e62(%rip), %rdi      # 0x4078
callq 0x20c0
leaq 0x1e61(%rip), %rdi      # 0x4083
popq %rax
jmp 0x20c0
leaq 0x1e15(%rip), %rsi      # 0x4044
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x2050