// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lvm.c
// Function: luaV_equalobj
int luaV_equalobj (lua_State *L, const TValue *t1, const TValue *t2) {
  const TValue *tm;
  if (ttype(t1) != ttype(t2)) {  /* not the same variant? */
    if (ttnov(t1) != ttnov(t2) || ttnov(t1) != LUA_TNUMBER)
      return 0;  /* only numbers can be equal with different variants */
    else {  /* two numbers with different variants */
      lua_Integer i1, i2;  /* compare them as integers */
      return (tointeger(t1, &i1) && tointeger(t2, &i2) && i1 == i2);
    }
  }
  /* values have same type and same variant */
  switch (ttype(t1)) {
    case LUA_TNIL: return 1;
    case LUA_TNUMINT: return (ivalue(t1) == ivalue(t2));
    case LUA_TNUMFLT: return luai_numeq(fltvalue(t1), fltvalue(t2));
    case LUA_TBOOLEAN: return bvalue(t1) == bvalue(t2);  /* true must be 1 !! */
    case LUA_TLIGHTUSERDATA: return pvalue(t1) == pvalue(t2);
    case LUA_TLCF: return fvalue(t1) == fvalue(t2);
    case LUA_TSHRSTR: return eqshrstr(tsvalue(t1), tsvalue(t2));
    case LUA_TLNGSTR: return luaS_eqlngstr(tsvalue(t1), tsvalue(t2));
    case LUA_TUSERDATA: {
      if (uvalue(t1) == uvalue(t2)) return 1;
      else if (L == NULL) return 0;
      tm = fasttm(L, uvalue(t1)->metatable, TM_EQ);
      if (tm == NULL)
        tm = fasttm(L, uvalue(t2)->metatable, TM_EQ);
      break;  /* will try TM */
    }
    case LUA_TTABLE: {
      if (hvalue(t1) == hvalue(t2)) return 1;
      else if (L == NULL) return 0;
      tm = fasttm(L, hvalue(t1)->metatable, TM_EQ);
      if (tm == NULL)
        tm = fasttm(L, hvalue(t2)->metatable, TM_EQ);
      break;  /* will try TM */
    }
    default:
      return gcvalue(t1) == gcvalue(t2);
  }
  if (tm == NULL)  /* no TM? */
    return 0;  /* objects are different */
  luaT_callTM(L, tm, t1, t2, L->top, 1);  /* call TM */
  return !l_isfalse(L->top);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movl 0x8(%rsi), %ecx
movl %ecx, %edx
andl $0x3f, %edx
movl 0x8(%rbx), %eax
movl %eax, %esi
andl $0x3f, %esi
cmpl %esi, %edx
jne 0x11e35
cmpl $0x16, %edx
ja 0x11e30
movq %rdi, %r12
movl $0x1, %r14d
movl %edx, %eax
leaq 0x11169(%rip), %rcx     # 0x22f90
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%r15), %rax
jmp 0x11ea3
movl %ecx, %edx
andl $0xf, %edx
movl %eax, %esi
andl $0xf, %esi
xorl $0x3, %edx
xorl $0x3, %esi
orl %edx, %esi
jne 0x11fea
cmpl $0x13, %ecx
jne 0x11e5c
movq (%r15), %rcx
movq %rcx, 0x8(%rsp)
jmp 0x11e79
leaq 0x8(%rsp), %rsi
xorl %r14d, %r14d
movq %r15, %rdi
xorl %edx, %edx
callq 0x116b2
testl %eax, %eax
je 0x11fed
movl 0x8(%rbx), %eax
cmpl $0x13, %eax
je 0x11e9e
leaq 0x10(%rsp), %r15
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x116b2
movq %r15, %rbx
testl %eax, %eax
je 0x11fed
movq 0x8(%rsp), %rax
xorl %r14d, %r14d
cmpq (%rbx), %rax
sete %r14b
jmp 0x11fed
movl (%r15), %eax
xorl %r14d, %r14d
cmpl (%rbx), %eax
jmp 0x11ea9
movsd (%rbx), %xmm0
cmpeqsd (%r15), %xmm0
movq %xmm0, %r14
andl $0x1, %r14d
jmp 0x11fed
movq (%r15), %rcx
movq (%rbx), %rax
cmpq %rax, %rcx
je 0x11fed
xorl %r14d, %r14d
testq %r12, %r12
je 0x11fed
movq 0x28(%rcx), %rdi
testq %rdi, %rdi
je 0x11f20
testb $0x20, 0xa(%rdi)
jne 0x11f20
movq 0x18(%r12), %rax
movq 0x108(%rax), %rdx
movl $0x5, %esi
callq 0x10949
testq %rax, %rax
jne 0x11fae
movq (%rbx), %rax
movq 0x28(%rax), %rdi
jmp 0x11f88
movq (%r15), %rdi
movq (%rbx), %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xf5c8
movq (%r15), %rcx
movq (%rbx), %rax
cmpq %rax, %rcx
je 0x11fed
xorl %r14d, %r14d
testq %r12, %r12
je 0x11fed
movq 0x10(%rcx), %rdi
testq %rdi, %rdi
je 0x11f84
testb $0x20, 0xa(%rdi)
jne 0x11f84
movq 0x18(%r12), %rax
movq 0x108(%rax), %rdx
movl $0x5, %esi
callq 0x10949
testq %rax, %rax
jne 0x11fae
movq (%rbx), %rax
movq 0x10(%rax), %rdi
testq %rdi, %rdi
je 0x11fed
testb $0x20, 0xa(%rdi)
jne 0x11fed
movq 0x18(%r12), %rax
movq 0x108(%rax), %rdx
movl $0x5, %esi
callq 0x10949
testq %rax, %rax
je 0x11fea
movq 0x10(%r12), %r8
movq %r12, %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %rbx, %rcx
movl $0x1, %r9d
callq 0x10a4a
movq 0x10(%r12), %rax
movl 0x8(%rax), %r14d
testl %r14d, %r14d
je 0x11fed
cmpl $0x1, %r14d
jne 0x11ffc
xorl %r14d, %r14d
cmpl $0x0, (%rax)
setne %r14b
jmp 0x11fed
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x1, %r14d
jmp 0x11fed