// File: /workspace/github_c_makefile_star2_O2/BatchLabs[P]msgpack-dump/src/cmp.c
// Function: cmp_write_object_v4
bool cmp_write_object_v4(cmp_ctx_t *ctx, cmp_object_t *obj) {
  switch(obj->type) {
    case CMP_TYPE_POSITIVE_FIXNUM:
      return cmp_write_pfix(ctx, obj->as.u8);
    case CMP_TYPE_FIXMAP:
      return cmp_write_fixmap(ctx, (uint8_t)obj->as.map_size);
    case CMP_TYPE_FIXARRAY:
      return cmp_write_fixarray(ctx, (uint8_t)obj->as.array_size);
    case CMP_TYPE_FIXSTR:
      return cmp_write_fixstr_marker(ctx, (uint8_t)obj->as.str_size);
    case CMP_TYPE_NIL:
      return cmp_write_nil(ctx);
    case CMP_TYPE_BOOLEAN:
      if (obj->as.boolean)
        return cmp_write_true(ctx);
      return cmp_write_false(ctx);
    case CMP_TYPE_EXT8:
      return cmp_write_ext8_marker(ctx, obj->as.ext.type, (uint8_t)obj->as.ext.size);
    case CMP_TYPE_EXT16:
      return cmp_write_ext16_marker(
        ctx, obj->as.ext.type, (uint16_t)obj->as.ext.size
      );
    case CMP_TYPE_EXT32:
      return cmp_write_ext32_marker(ctx, obj->as.ext.type, obj->as.ext.size);
    case CMP_TYPE_FLOAT:
      return cmp_write_float(ctx, obj->as.flt);
    case CMP_TYPE_DOUBLE:
      return cmp_write_double(ctx, obj->as.dbl);
    case CMP_TYPE_UINT8:
      return cmp_write_u8(ctx, obj->as.u8);
    case CMP_TYPE_UINT16:
      return cmp_write_u16(ctx, obj->as.u16);
    case CMP_TYPE_UINT32:
      return cmp_write_u32(ctx, obj->as.u32);
    case CMP_TYPE_UINT64:
      return cmp_write_u64(ctx, obj->as.u64);
    case CMP_TYPE_SINT8:
      return cmp_write_s8(ctx, obj->as.s8);
    case CMP_TYPE_SINT16:
      return cmp_write_s16(ctx, obj->as.s16);
    case CMP_TYPE_SINT32:
      return cmp_write_s32(ctx, obj->as.s32);
    case CMP_TYPE_SINT64:
      return cmp_write_s64(ctx, obj->as.s64);
    case CMP_TYPE_FIXEXT1:
      return cmp_write_fixext1_marker(ctx, obj->as.ext.type);
    case CMP_TYPE_FIXEXT2:
      return cmp_write_fixext2_marker(ctx, obj->as.ext.type);
    case CMP_TYPE_FIXEXT4:
      return cmp_write_fixext4_marker(ctx, obj->as.ext.type);
    case CMP_TYPE_FIXEXT8:
      return cmp_write_fixext8_marker(ctx, obj->as.ext.type);
    case CMP_TYPE_FIXEXT16:
      return cmp_write_fixext16_marker(ctx, obj->as.ext.type);
    case CMP_TYPE_STR16:
      return cmp_write_str16_marker(ctx, (uint16_t)obj->as.str_size);
    case CMP_TYPE_STR32:
      return cmp_write_str32_marker(ctx, obj->as.str_size);
    case CMP_TYPE_ARRAY16:
      return cmp_write_array16(ctx, (uint16_t)obj->as.array_size);
    case CMP_TYPE_ARRAY32:
      return cmp_write_array32(ctx, obj->as.array_size);
    case CMP_TYPE_MAP16:
      return cmp_write_map16(ctx, (uint16_t)obj->as.map_size);
    case CMP_TYPE_MAP32:
      return cmp_write_map32(ctx, obj->as.map_size);
    case CMP_TYPE_NEGATIVE_FIXNUM:
      return cmp_write_nfix(ctx, obj->as.s8);
    default:
      ctx->error = INVALID_TYPE_ERROR;
      return false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzbl (%rsi), %eax
cmpq $0x22, %rax
ja 0x26de
leaq 0x2ad5(%rip), %rcx      # 0x5110
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzbl 0x8(%rsi), %esi
popq %rbp
jmp 0x13f4
movq 0x8(%rsi), %rsi
popq %rbp
jmp 0x1573
movsbl 0x8(%rsi), %esi
popq %rbp
jmp 0x2032
movl 0x8(%rsi), %esi
popq %rbp
jmp 0x16e7
movl 0x8(%rsi), %esi
popq %rbp
jmp 0x1a20
movsbl 0x8(%rsi), %esi
popq %rbp
jmp 0x211a
movsd 0x8(%rsi), %xmm0
popq %rbp
jmp 0x17c5
movzwl 0x8(%rsi), %esi
popq %rbp
jmp 0x1e89
movsbl 0x8(%rsi), %esi
popq %rbp
jmp 0x20a6
movzwl 0x8(%rsi), %esi
popq %rbp
jmp 0x169f
movsbl 0x8(%rsi), %esi
popq %rbp
jmp 0x1f4a
movzbl 0x8(%rsi), %esi
popq %rbp
jmp 0x1d8a
movl 0x8(%rsi), %esi
popq %rbp
jmp 0x1ed6
cmpb $0x1, 0x8(%rsi)
jne 0x2791
popq %rbp
jmp 0x184e
movzbl 0x8(%rsi), %esi
popq %rbp
jmp 0x1666
movb $0xd, (%rdi)
xorl %eax, %eax
popq %rbp
retq
movzwl 0x8(%rsi), %esi
popq %rbp
jmp 0x1987
movzbl 0x8(%rsi), %esi
popq %rbp
jmp 0x1e6a
movsbl 0x8(%rsi), %eax
movzbl 0xc(%rsi), %edx
movl %eax, %esi
popq %rbp
jmp 0x218e
movsbl 0x8(%rsi), %eax
movzwl 0xc(%rsi), %edx
movl %eax, %esi
popq %rbp
jmp 0x2229
movq 0x8(%rsi), %rsi
popq %rbp
jmp 0x172c
movsbl 0x8(%rsi), %esi
popq %rbp
jmp 0x147d
movsbl 0x8(%rsi), %esi
popq %rbp
jmp 0x143b
movzbl 0x8(%rsi), %esi
popq %rbp
jmp 0x1894
popq %rbp
jmp 0x183f
movss 0x8(%rsi), %xmm0
popq %rbp
jmp 0x1771
movsbl 0x8(%rsi), %eax
movl 0xc(%rsi), %edx
movl %eax, %esi
popq %rbp
jmp 0x22d4
movl 0x8(%rsi), %esi
popq %rbp
jmp 0x152e
movswl 0x8(%rsi), %esi
popq %rbp
jmp 0x14e6
movsbl 0x8(%rsi), %esi
popq %rbp
jmp 0x1fbe
movl 0x8(%rsi), %esi
popq %rbp
jmp 0x1df6
movzwl 0x8(%rsi), %esi
popq %rbp
jmp 0x1da9
popq %rbp
jmp 0x185d