// File: /workspace/github_c_makefile_star2_O1/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, %r14
movl 0x8(%rsi), %eax
movl %eax, %edx
andl $0x3f, %edx
movl 0x8(%rbx), %ecx
movl %ecx, %esi
andl $0x3f, %esi
cmpl %esi, %edx
jne 0x115d6
cmpl $0x16, %edx
ja 0x115c8
movq %rdi, %r15
movl $0x1, %r12d
movl %edx, %eax
leaq 0x10941(%rip), %rcx     # 0x21f00
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%r14), %rax
xorl %r12d, %r12d
cmpq (%rbx), %rax
jmp 0x11656
movl %eax, %edx
andl $0xf, %edx
andl $0xf, %ecx
xorl $0x3, %edx
xorl $0x3, %ecx
orl %edx, %ecx
jne 0x1178a
cmpl $0x13, %eax
jne 0x115fb
movq (%r14), %rax
movq %rax, 0x10(%rsp)
jmp 0x11615
leaq 0x10(%rsp), %rsi
xorl %r12d, %r12d
movq %r14, %rdi
xorl %edx, %edx
callq 0x10e26
testl %eax, %eax
je 0x1178d
cmpl $0x13, 0x8(%rbx)
jne 0x11625
movq (%rbx), %rax
movq %rax, 0x8(%rsp)
jmp 0x1163f
leaq 0x8(%rsp), %rsi
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %edx, %edx
callq 0x10e26
testl %eax, %eax
je 0x1178d
movq 0x10(%rsp), %rax
xorl %r12d, %r12d
cmpq 0x8(%rsp), %rax
jmp 0x11656
movl (%r14), %eax
xorl %r12d, %r12d
cmpl (%rbx), %eax
sete %r12b
jmp 0x1178d
movsd (%rbx), %xmm0
cmpeqsd (%r14), %xmm0
movq %xmm0, %r12
andl $0x1, %r12d
jmp 0x1178d
movq (%r14), %rax
cmpq (%rbx), %rax
je 0x1178d
testq %r15, %r15
je 0x1178a
movq 0x28(%rax), %rdi
testq %rdi, %rdi
je 0x11709
testb $0x20, 0xa(%rdi)
jne 0x11709
movq 0x18(%r15), %rax
movq 0x108(%rax), %rdx
movl $0x5, %esi
callq 0x102d9
movq %rax, %rsi
jmp 0x1170b
movq (%r14), %rdi
movq (%rbx), %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xf0a4
movq (%r14), %rax
cmpq (%rbx), %rax
je 0x1178d
testq %r15, %r15
je 0x1178a
movq 0x10(%rax), %rdi
testq %rdi, %rdi
je 0x11719
testb $0x20, 0xa(%rdi)
jne 0x11719
movq 0x18(%r15), %rax
movq 0x108(%rax), %rdx
movl $0x5, %esi
callq 0x102d9
movq %rax, %rsi
jmp 0x1171b
xorl %esi, %esi
testq %rsi, %rsi
jne 0x1174e
movq (%rbx), %rax
movq 0x28(%rax), %rdi
jmp 0x11727
xorl %esi, %esi
testq %rsi, %rsi
jne 0x1174e
movq (%rbx), %rax
movq 0x10(%rax), %rdi
testq %rdi, %rdi
je 0x1174c
testb $0x20, 0xa(%rdi)
jne 0x1174c
movq 0x18(%r15), %rax
movq 0x108(%rax), %rdx
movl $0x5, %esi
callq 0x102d9
movq %rax, %rsi
jmp 0x1174e
xorl %esi, %esi
testq %rsi, %rsi
je 0x1178a
movq 0x10(%r15), %r8
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
movl $0x1, %r9d
callq 0x103d7
movq 0x10(%r15), %rax
movl 0x8(%rax), %r12d
testl %r12d, %r12d
je 0x1178d
cmpl $0x1, %r12d
jne 0x1179c
xorl %r12d, %r12d
cmpl $0x0, (%rax)
setne %r12b
jmp 0x1178d
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x1, %r12d
jmp 0x1178d