// File: /workspace/github_c_makefile_star2_O1/mattn[P]orelang/ore.c
// Function: ore_cmp_eq
static int
ore_cmp_eq(ore_context* ore, ore_value lhs, ore_value rhs) {
  switch (lhs.t) {
    case ORE_TYPE_NIL:
      return rhs.t == ORE_TYPE_NIL;
    case ORE_TYPE_BOOL:
      if (rhs.t == ORE_TYPE_BOOL && lhs.v.b == rhs.v.b) return 1;
      return 0;
    case ORE_TYPE_INT:
      if (rhs.t == ORE_TYPE_INT && lhs.v.i == rhs.v.i) return 1;
      if (rhs.t == ORE_TYPE_FLOAT && lhs.v.i == rhs.v.d) return 1;
      return 0;
    case ORE_TYPE_FLOAT:
      if (rhs.t == ORE_TYPE_INT && lhs.v.d == rhs.v.i) return 1;
      if (rhs.t == ORE_TYPE_FLOAT && lhs.v.d == rhs.v.d) return 1;
      return 0;
    case ORE_TYPE_STRING:
      if (lhs.t == rhs.t && lhs.v.s->l == rhs.v.s->l &&
          !memcmp(lhs.v.s->p, rhs.v.s->p, lhs.v.s->l))
        return 1;
      return 0;
    case ORE_TYPE_ARRAY:
      if (lhs.t == rhs.t && lhs.v.a->p == rhs.v.a->p)
        return 1;
      return 0;
    case ORE_TYPE_HASH:
      if (lhs.t == rhs.t && lhs.v.h->p == rhs.v.h->p)
        return 1;
      return 0;
    case ORE_TYPE_REGEXP:
      if (lhs.t == rhs.t && lhs.v.r->l == rhs.v.r->l &&
          !memcmp(lhs.v.r->p, rhs.v.r->p, lhs.v.r->l))
        return 1;
      return 0;
    case ORE_TYPE_FUNC:
      if (lhs.t == rhs.t && lhs.v.f.x.o == rhs.v.f.x.o)
        return 1;
      return 0;
    case ORE_TYPE_CFUNC:
      if (lhs.t == rhs.t && lhs.v.f.x.c == rhs.v.f.x.c)
        return 1;
      return 0;
    case ORE_TYPE_ENV:
      if (lhs.t == rhs.t && lhs.v.e->p == rhs.v.e->p)
        return 1;
      return 0;
    default:
      break;
  }
  return 0;
}

// Assembly:
pushq %rax
movl 0x10(%rsp), %esi
xorl %eax, %eax
cmpq $0xa, %rsi
ja 0x129f5
leaq 0x38(%rsp), %rcx
leaq 0x10(%rsp), %rdx
leaq 0x205f(%rip), %rdi      # 0x1492c
movslq (%rdi,%rsi,4), %rsi
addq %rdi, %rsi
jmpq *%rsi
xorl %eax, %eax
cmpl $0x0, (%rcx)
sete %al
jmp 0x129f5
cmpl $0x4, (%rcx)
je 0x12984
jmp 0x129b8
cmpl $0x9, (%rcx)
je 0x129e6
jmp 0x129f5
movl (%rcx), %esi
cmpl $0x3, %esi
je 0x12929
cmpl $0x2, %esi
jne 0x129b8
movl 0x8(%rdx), %edi
movl $0x1, %eax
cmpl 0x8(%rcx), %edi
je 0x129f5
cmpl $0x3, %esi
jne 0x129b8
cvtsi2sdl 0x8(%rdx), %xmm0
movsd 0x8(%rcx), %xmm1
movl $0x1, %eax
ucomisd %xmm0, %xmm1
jmp 0x12979
movl (%rcx), %esi
cmpl $0x3, %esi
je 0x1296a
cmpl $0x2, %esi
jne 0x129b8
cvtsi2sdl 0x8(%rcx), %xmm0
movsd 0x8(%rdx), %xmm1
movl $0x1, %eax
ucomisd %xmm0, %xmm1
jne 0x12965
jnp 0x129f5
cmpl $0x3, %esi
jne 0x129b8
movsd 0x8(%rdx), %xmm0
movl $0x1, %eax
ucomisd 0x8(%rcx), %xmm0
jne 0x129b8
jnp 0x129f5
jmp 0x129b8
cmpl $0x7, (%rcx)
jne 0x129b8
movq 0x8(%rdx), %rax
movslq 0x8(%rax), %rdx
movq 0x8(%rcx), %rcx
cmpl 0x8(%rcx), %edx
jne 0x129b8
movq (%rax), %rdi
movq (%rcx), %rsi
callq 0x21c0
testl %eax, %eax
jne 0x129b8
jmp 0x129f0
cmpl $0x1, (%rcx)
jne 0x129b8
movl 0x8(%rdx), %edx
movl $0x1, %eax
cmpl 0x8(%rcx), %edx
je 0x129f5
xorl %eax, %eax
jmp 0x129f5
cmpl $0x5, (%rcx)
je 0x129cf
jmp 0x129f5
cmpl $0x6, (%rcx)
je 0x129cf
jmp 0x129f5
cmpl $0xa, (%rcx)
jne 0x129f5
movq 0x8(%rdx), %rdx
movq (%rdx), %rdx
movq 0x8(%rcx), %rcx
cmpq (%rcx), %rdx
jne 0x129f5
jmp 0x129f0
cmpl $0x8, (%rcx)
jne 0x129f5
movq 0x18(%rdx), %rdx
cmpq 0x18(%rcx), %rdx
jne 0x129f5
movl $0x1, %eax
popq %rcx
retq