// File: /workspace/github_c_makefile_star2_O3/mattn[P]orelang/ore.c
// Function: ore_value_to_str
static char*
ore_value_to_str(ore_context* ore, ore_value v) {
  kstring_t ks = { 0, 0, NULL };

  switch (v.t) {
    case ORE_TYPE_NIL:
      kputs("nil", &ks);
      break;
    case ORE_TYPE_BOOL:
      if (v.v.b)
        kputs("true", &ks);
      else
        kputs("false", &ks);
      break;
    case ORE_TYPE_INT:
      ksprintf(&ks, "%d", v.v.i);
      break;
    case ORE_TYPE_FLOAT:
      ksprintf(&ks, "%f", v.v.d);
      break;
    case ORE_TYPE_STRING:
      kputs(v.v.s->p, &ks);
      break;
    case ORE_TYPE_ARRAY:
      {
        ore_array_t* a = (ore_array_t*) v.v.a->p;
        ore_array_iter_t* k;
        ore_array_iter_t* b = kl_begin(a);
        kputc('[', &ks);
        for (k = b; k != kl_end(a); k = kl_next(k)) {
          if (k != b) {
            kputc(',', &ks);
          }
          char* s = ore_value_to_str(ore, kl_val(k));
          kputs(s, &ks);
          free(s);
        }
        kputc(']', &ks);
      }
      break;
    case ORE_TYPE_HASH:
      {
        ore_hash_t* h = (ore_hash_t*) v.v.h->p;
        ore_hash_iter_t k;
        int n = 0;
        kputc('{', &ks);
        for (k = kh_begin(h); k != kh_end(h); k++) {
          if (!kh_exist(h, k)) continue;
          if (n > 0) {
            kputc(',', &ks);
          }
          const char* key = kh_key(h, k);
          kputs(key, &ks);
          kputs(": ", &ks);
          kputs(ore_value_to_str(ore, kh_val(h, k)), &ks);
          n++;
        }
        kputc('}', &ks);
      }
      break;
    case ORE_TYPE_REGEXP:
      kputs(v.v.r->p, &ks);
      break;
    case ORE_TYPE_FUNC:
      ksprintf(&ks, "<func-0x%p>", v.v.f.x.o);
      break;
    case ORE_TYPE_CFUNC:
      ksprintf(&ks, "<func-0x%p>", v.v.f.x.c);
      break;
    case ORE_TYPE_ENV:
      ksprintf(&ks, "<env-0x%p>", v.v.e->p);
      break;
    case ORE_TYPE_CLASS:
      kputs(v.v.c->n, &ks);
      break;
    case ORE_TYPE_CCLASS:
      kputs(v.v.c->n, &ks);
      break;
    case ORE_TYPE_OBJECT:
      ksprintf(&ks, "<%s-0x%p>", ((ore_class*)v.v.o->c)->n, v.v.o);
      break;
    default:
      kputs("<unknown>", &ks);
      break;
  }
  return ks.s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
movl 0xa0(%rsp), %ecx
cmpq $0xd, %rcx
ja 0x12ea7
leaq 0xa0(%rsp), %rax
leaq 0x1cae(%rip), %rdx      # 0x14964
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq 0x8(%rax), %rax
movq (%rax), %rbx
movq %rbx, %rdi
callq 0x20c0
movslq %eax, %r14
leaq 0x1(%r14), %rax
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rdi
shrq $0x10, %rdi
orq %rax, %rdi
incq %rdi
callq 0x21a0
testq %rax, %rax
je 0x1342b
movq %rax, %r15
movq %rax, 0x40(%rsp)
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2190
movb $0x0, (%r15,%r14)
jmp 0x1342b
movq 0x18(%rax), %rdx
leaq 0x343d(%rip), %rsi      # 0x1617f
jmp 0x12d98
movq 0x8(%rax), %rax
movq (%rax), %r12
movq $0x2, 0x38(%rsp)
movl $0x2, %r15d
movl $0x2, %edi
callq 0x21a0
testq %rax, %rax
je 0x12ed7
movq %rax, 0x40(%rsp)
movq $0x1, 0x30(%rsp)
movw $0x7b, (%rax)
movl $0x1, %ebx
jmp 0x12ed9
movq 0x8(%rax), %rax
movq (%rax), %rdx
leaq 0x33f3(%rip), %rsi      # 0x1618b
leaq 0x30(%rsp), %rdi
xorl %eax, %eax
callq 0xb17a
jmp 0x1342b
movl 0x8(%rax), %edx
leaq 0x33c9(%rip), %rsi      # 0x1617c
leaq 0x30(%rsp), %rdi
xorl %eax, %eax
callq 0xb17a
jmp 0x1342b
movsd 0x8(%rax), %xmm0
leaq 0x32cd(%rip), %rsi      # 0x1609d
leaq 0x30(%rsp), %rdi
movb $0x1, %al
callq 0xb17a
jmp 0x1342b
movl $0x8, %edi
callq 0x21a0
testq %rax, %rax
je 0x1342b
movq %rax, 0x40(%rsp)
movl $0x6c696e, (%rax)       # imm = 0x6C696E
jmp 0x1342b
movl 0x8(%rax), %ebx
movl $0x8, %edi
callq 0x21a0
testl %ebx, %ebx
je 0x1322b
testq %rax, %rax
je 0x1342b
movq %rax, 0x40(%rsp)
movl $0x65757274, (%rax)     # imm = 0x65757274
movb $0x0, 0x4(%rax)
jmp 0x1342b
movq 0x8(%rax), %rax
movq (%rax), %rax
movq %rax, 0x48(%rsp)
movq (%rax), %r14
movq $0x2, 0x38(%rsp)
movl $0x2, %r15d
movl $0x2, %edi
callq 0x21a0
testq %rax, %rax
je 0x1324a
movq %rax, 0x40(%rsp)
movq $0x1, 0x30(%rsp)
movw $0x5b, (%rax)
movl $0x1, %ebx
jmp 0x1324c
movq 0x8(%rax), %rcx
movq 0x8(%rcx), %rax
movq (%rax), %rdx
leaq 0x3300(%rip), %rsi      # 0x16196
leaq 0x30(%rsp), %rdi
xorl %eax, %eax
callq 0xb17a
jmp 0x1342b
movl $0x10, %edi
callq 0x21a0
testq %rax, %rax
je 0x1342b
movq %rax, 0x40(%rsp)
movabsq $0x6e776f6e6b6e753c, %rcx # imm = 0x6E776F6E6B6E753C
movq %rcx, (%rax)
movw $0x3e, 0x8(%rax)
jmp 0x1342b
xorl %ebx, %ebx
movl (%r12), %eax
testl %eax, %eax
je 0x131c1
xorl %ebp, %ebp
xorl %esi, %esi
xorl %r13d, %r13d
movq %r12, 0x48(%rsp)
movq 0x10(%r12), %rcx
movl %r13d, %edx
shrl $0x4, %edx
movl (%rcx,%rdx,4), %edx
movl %ebp, %ecx
andb $0x1e, %cl
shrl %cl, %edx
testb $0x3, %dl
jne 0x131a8
movq 0x30(%rsp), %rbx
movq 0x38(%rsp), %r15
testl %esi, %esi
movl %esi, 0x54(%rsp)
jle 0x12fa6
leaq 0x1(%rbx), %r14
cmpq %r15, %r14
jae 0x12f35
movq 0x40(%rsp), %rax
jmp 0x12f85
movq %r14, %rax
shrq %rax
orq %r14, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %r15
shrq $0x10, %r15
orq %rcx, %r15
incq %r15
movq %r15, 0x38(%rsp)
movq 0x40(%rsp), %rdi
movq %r15, %rsi
callq 0x21e0
testq %rax, %rax
je 0x12fa6
movq %rax, 0x40(%rsp)
movq %r14, 0x30(%rsp)
movb $0x2c, (%rax,%rbx)
movq 0x30(%rsp), %rax
movq 0x40(%rsp), %rcx
movb $0x0, (%rcx,%rax)
movq 0x30(%rsp), %rbx
movq 0x38(%rsp), %r15
movq 0x18(%r12), %rax
movl %r13d, %ecx
movq %rcx, 0x58(%rsp)
movq (%rax,%rcx,8), %rdi
movq %rdi, 0x60(%rsp)
callq 0x20c0
movslq %eax, %r14
leaq (%rbx,%r14), %rax
incq %rax
cmpq %r15, %rax
jae 0x12fd7
movq 0x40(%rsp), %r12
jmp 0x1302a
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %r15
shrq $0x10, %r15
orq %rax, %r15
incq %r15
movq %r15, 0x38(%rsp)
movq 0x40(%rsp), %rdi
movq %r15, %rsi
callq 0x21e0
testq %rax, %rax
je 0x13052
movq %rax, %r12
movq %rax, 0x40(%rsp)
leaq (%r12,%rbx), %rdi
movq 0x60(%rsp), %rsi
movq %r14, %rdx
callq 0x2190
addq %r14, %rbx
movq %rbx, 0x30(%rsp)
movb $0x0, (%r12,%rbx)
movq 0x30(%rsp), %rbx
movq 0x38(%rsp), %r15
leaq 0x3(%rbx), %rax
cmpq %r15, %rax
movq 0x48(%rsp), %r14
jae 0x1306c
movq 0x40(%rsp), %rax
movq 0x58(%rsp), %rsi
jmp 0x130be
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rdi
callq 0x21e0
testq %rax, %rax
movq 0x58(%rsp), %rsi
je 0x130dc
movq %rax, 0x40(%rsp)
movw $0x203a, (%rax,%rbx)    # imm = 0x203A
movq 0x30(%rsp), %rax
movq 0x40(%rsp), %rcx
leaq 0x2(%rax), %rdx
movq %rdx, 0x30(%rsp)
movb $0x0, 0x2(%rcx,%rax)
movq 0x20(%r14), %rax
leaq (%rsi,%rsi,4), %rcx
movq 0x20(%rax,%rcx,8), %rdx
movq %rdx, 0x20(%rsp)
movups (%rax,%rcx,8), %xmm0
movups 0x10(%rax,%rcx,8), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x12c77
movq %rax, %rbx
movq %rax, %rdi
callq 0x20c0
movq 0x30(%rsp), %r12
movslq %eax, %r14
leaq (%r12,%r14), %rax
incq %rax
cmpq 0x38(%rsp), %rax
jae 0x1312d
movq 0x40(%rsp), %r15
jmp 0x1317d
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rdi
callq 0x21e0
testq %rax, %rax
je 0x13199
movq %rax, %r15
movq %rax, 0x40(%rsp)
leaq (%r15,%r12), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2190
addq %r14, %r12
movq %r12, 0x30(%rsp)
movb $0x0, (%r15,%r12)
movl 0x54(%rsp), %esi
incl %esi
movq 0x48(%rsp), %r12
movl (%r12), %eax
incl %r13d
addl $0x2, %ebp
cmpl %eax, %r13d
jne 0x12ef1
movq 0x30(%rsp), %rbx
movq 0x38(%rsp), %r15
leaq 0x1(%rbx), %r14
cmpq %r15, %r14
jae 0x131d1
movq 0x40(%rsp), %rax
jmp 0x1321d
movq %r14, %rax
shrq %rax
orq %r14, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq 0x40(%rsp), %rdi
callq 0x21e0
testq %rax, %rax
je 0x1342b
movq %rax, 0x40(%rsp)
movq %r14, 0x30(%rsp)
movb $0x7d, (%rax,%rbx)
jmp 0x1341d
testq %rax, %rax
je 0x1342b
movq %rax, 0x40(%rsp)
movl $0x736c6166, (%rax)     # imm = 0x736C6166
movw $0x65, 0x4(%rax)
jmp 0x1342b
xorl %ebx, %ebx
movq 0x48(%rsp), %rax
cmpq 0x8(%rax), %r14
je 0x133bc
movq %r14, %rbp
movq %r14, %r12
cmpq %r14, %rbp
je 0x132e1
movq 0x30(%rsp), %rbx
leaq 0x1(%rbx), %r14
cmpq 0x38(%rsp), %r14
jae 0x1327d
movq 0x40(%rsp), %rax
jmp 0x132ca
movq %r14, %rax
shrq %rax
orq %r14, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rdi
callq 0x21e0
testq %rax, %rax
je 0x132e1
movq %rax, 0x40(%rsp)
movq %r14, 0x30(%rsp)
movb $0x2c, (%rax,%rbx)
movq 0x30(%rsp), %rax
movq 0x40(%rsp), %rcx
movb $0x0, (%rcx,%rax)
movq 0x20(%rbp), %rax
movq %rax, 0x20(%rsp)
movups (%rbp), %xmm0
movups 0x10(%rbp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x12c77
movq %rax, %rbx
movq %rax, %rdi
callq 0x20c0
movq 0x30(%rsp), %r13
movslq %eax, %r14
leaq (%r14,%r13), %rax
incq %rax
cmpq 0x38(%rsp), %rax
jae 0x13328
movq 0x40(%rsp), %r15
jmp 0x13378
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rdi
callq 0x21e0
testq %rax, %rax
je 0x13394
movq %rax, %r15
movq %rax, 0x40(%rsp)
leaq (%r15,%r13), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2190
addq %r14, %r13
movq %r13, 0x30(%rsp)
movb $0x0, (%r15,%r13)
movq %rbx, %rdi
callq 0x22c0
movq 0x28(%rbp), %rbp
movq 0x48(%rsp), %rax
cmpq 0x8(%rax), %rbp
movq %r12, %r14
jne 0x1325e
movq 0x30(%rsp), %rbx
movq 0x38(%rsp), %r15
leaq 0x1(%rbx), %r14
cmpq %r15, %r14
jae 0x133cc
movq 0x40(%rsp), %rax
jmp 0x13414
movq %r14, %rax
shrq %rax
orq %r14, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq 0x40(%rsp), %rdi
callq 0x21e0
testq %rax, %rax
je 0x1342b
movq %rax, 0x40(%rsp)
movq %r14, 0x30(%rsp)
movb $0x5d, (%rax,%rbx)
movq 0x30(%rsp), %rax
movq 0x40(%rsp), %rcx
movb $0x0, (%rcx,%rax)
movq 0x40(%rsp), %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq