// File: /workspace/github_c_makefile_star2_O3/mattn[P]orelang/ore.c
// Function: ore_is_true
static int
ore_is_true(ore_value v) {
  switch (v.t) {
    case ORE_TYPE_BOOL:
      return v.v.b != 0;
    case ORE_TYPE_INT:
      return v.v.i != 0;
    case ORE_TYPE_FLOAT:
      return v.v.d != 0;
    case ORE_TYPE_STRING:
      return v.v.s->l > 0;
    case ORE_TYPE_ARRAY:
      {
        int n = 0;
        ore_array_t* a = (ore_array_t*) v.v.a->p;
        ore_array_iter_t *k;
        for (k = kl_begin(a); k != kl_end(a); k = kl_next(k)) n++;
        return n > 0;
      }
    case ORE_TYPE_HASH:
      {
        ore_hash_t* h = (ore_hash_t*) v.v.h->p;
        ore_hash_iter_t k;
        int n = 0;
        for (k = kh_begin(h); k != kh_end(h); k++) {
          if (!kh_exist(h, k)) continue;
          n++;
        }
        return n > 0;
      }
    case ORE_TYPE_REGEXP:
      return v.v.r->l > 0;
    case ORE_TYPE_ENV:
      return 1; // TODO
    case ORE_TYPE_CLASS:
      return 1; // TODO
    case ORE_TYPE_CCLASS:
      return 1; // TODO
    case ORE_TYPE_OBJECT:
      return 1; // TODO
    default:
      break;
  }
  return 0;
}

// Assembly:
movl 0x8(%rsp), %ecx
decl %ecx
cmpl $0xc, %ecx
ja 0x1227c
leaq 0x8(%rsp), %rax
leaq 0x2869(%rip), %rdx      # 0x14904
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movb $0x1, %al
jmp 0x1227e
cmpl $0x0, 0x8(%rax)
jmp 0x12277
movq 0x8(%rax), %rax
cmpl $0x0, 0x8(%rax)
setg %al
jmp 0x1227e
movq 0x8(%rax), %rax
movq (%rax), %rax
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
jmp 0x12277
xorpd %xmm0, %xmm0
cmpneqsd 0x8(%rax), %xmm0
movq %xmm0, %rax
andl $0x1, %eax
jmp 0x1227e
movq 0x8(%rax), %rax
movq (%rax), %rcx
movl (%rcx), %esi
xorl %eax, %eax
testl %esi, %esi
je 0x1227e
movq 0x10(%rcx), %rcx
leal 0x3(%rsi), %edx
andl $-0x4, %edx
decl %esi
movd %esi, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa 0x28e2(%rip), %xmm1     # 0x14a00
pxor %xmm2, %xmm2
movdqa 0x2156(%rip), %xmm3     # 0x14280
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movdqa 0x28d6(%rip), %xmm5     # 0x14a10
movdqa 0x28de(%rip), %xmm6     # 0x14a20
movdqa 0x28e5(%rip), %xmm8     # 0x14a30
movdqa 0x28ec(%rip), %xmm10    # 0x14a40
pxor %xmm11, %xmm11
movdqa %xmm11, %xmm9
movdqa %xmm1, %xmm7
pxor %xmm3, %xmm7
pcmpgtd %xmm0, %xmm7
movd %xmm7, %esi
notl %esi
testb $0x1, %sil
je 0x12181
movl %eax, %esi
shrl $0x4, %esi
movss (%rcx,%rsi,4), %xmm11
movdqa %xmm7, %xmm12
pxor %xmm4, %xmm12
pextrw $0x2, %xmm12, %esi
testb $0x1, %sil
je 0x121af
movl %eax, %esi
shrl $0x4, %esi
movss (%rcx,%rsi,4), %xmm13
movlhps %xmm11, %xmm13          # xmm13 = xmm13[0],xmm11[0]
shufps $0xe2, %xmm11, %xmm13   # xmm13 = xmm13[2,0],xmm11[2,3]
movaps %xmm13, %xmm11
pextrw $0x4, %xmm12, %esi
testb $0x1, %sil
je 0x121d0
movl %eax, %esi
shrl $0x4, %esi
movss (%rcx,%rsi,4), %xmm13
shufps $0x30, %xmm11, %xmm13   # xmm13 = xmm13[0,0],xmm11[3,0]
shufps $0x84, %xmm13, %xmm11   # xmm11 = xmm11[0,1],xmm13[0,2]
pextrw $0x6, %xmm12, %esi
testb $0x1, %sil
je 0x121f1
movl %eax, %esi
shrl $0x4, %esi
movss (%rcx,%rsi,4), %xmm12
shufps $0xe4, %xmm11, %xmm12   # xmm12 = xmm12[0,1],xmm11[2,3]
shufps $0x24, %xmm12, %xmm11   # xmm11 = xmm11[0,1],xmm12[2,0]
movdqa %xmm1, %xmm12
pslld $0x18, %xmm12
pand %xmm5, %xmm12
paddd %xmm6, %xmm12
cvttps2dq %xmm12, %xmm12
pshufd $0xf5, %xmm12, %xmm13   # xmm13 = xmm12[1,1,3,3]
pmuludq %xmm8, %xmm12
pshufd $0xe8, %xmm12, %xmm12   # xmm12 = xmm12[0,2,2,3]
pmuludq %xmm8, %xmm13
pshufd $0xe8, %xmm13, %xmm13   # xmm13 = xmm13[0,2,2,3]
punpckldq %xmm13, %xmm12  # xmm12 = xmm12[0],xmm13[0],xmm12[1],xmm13[1]
pand %xmm11, %xmm12
pcmpeqd %xmm2, %xmm12
movdqa %xmm9, %xmm11
psubd %xmm12, %xmm11
addl $0x4, %eax
paddd %xmm10, %xmm1
cmpl %eax, %edx
jne 0x12159
pand %xmm7, %xmm9
pandn %xmm11, %xmm7
por %xmm9, %xmm7
pshufd $0xee, %xmm7, %xmm0     # xmm0 = xmm7[2,3,2,3]
paddd %xmm7, %xmm0
pshufd $0x55, %xmm0, %xmm1     # xmm1 = xmm0[1,1,1,1]
paddd %xmm0, %xmm1
movd %xmm1, %eax
testl %eax, %eax
setne %al
jmp 0x1227e
xorl %eax, %eax
movzbl %al, %eax
retq