// File: /workspace/github_c_makefile_star2_O2/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 0x10510
cmpl $0x16, %edx
ja 0x1050b
movq %rdi, %r12
pushq $0x1
popq %r14
movl %edx, %eax
leaq 0xfa8e(%rip), %rcx      # 0x1ff90
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%r15), %rax
jmp 0x1057e
movl %ecx, %edx
andl $0xf, %edx
movl %eax, %esi
andl $0xf, %esi
xorl $0x3, %edx
xorl $0x3, %esi
orl %edx, %esi
jne 0x106bd
cmpl $0x13, %ecx
jne 0x10537
movq (%r15), %rcx
movq %rcx, 0x8(%rsp)
jmp 0x10554
leaq 0x8(%rsp), %rsi
xorl %r14d, %r14d
movq %r15, %rdi
xorl %edx, %edx
callq 0xfed4
testl %eax, %eax
je 0x106c0
movl 0x8(%rbx), %eax
cmpl $0x13, %eax
je 0x10579
leaq 0x10(%rsp), %r15
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xfed4
movq %r15, %rbx
testl %eax, %eax
je 0x106c0
movq 0x8(%rsp), %rax
xorl %r14d, %r14d
cmpq (%rbx), %rax
sete %r14b
jmp 0x106c0
movl (%r15), %eax
xorl %r14d, %r14d
cmpl (%rbx), %eax
jmp 0x10584
movsd (%rbx), %xmm0
cmpeqsd (%r15), %xmm0
movq %xmm0, %r14
andl $0x1, %r14d
jmp 0x106c0
movq (%r15), %rcx
movq (%rbx), %rax
cmpq %rax, %rcx
je 0x106c0
xorl %r14d, %r14d
testq %r12, %r12
je 0x106c0
movq 0x28(%rcx), %rdi
testq %rdi, %rdi
je 0x105f9
testb $0x20, 0xa(%rdi)
jne 0x105f9
movq 0x18(%r12), %rax
movq 0x108(%rax), %rdx
pushq $0x5
popq %rsi
callq 0xf48b
testq %rax, %rax
jne 0x10683
movq (%rbx), %rax
movq 0x28(%rax), %rdi
jmp 0x1065f
movq (%r15), %rdi
movq (%rbx), %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xe440
movq (%r15), %rcx
movq (%rbx), %rax
cmpq %rax, %rcx
je 0x106c0
xorl %r14d, %r14d
testq %r12, %r12
je 0x106c0
movq 0x10(%rcx), %rdi
testq %rdi, %rdi
je 0x1065b
testb $0x20, 0xa(%rdi)
jne 0x1065b
movq 0x18(%r12), %rax
movq 0x108(%rax), %rdx
pushq $0x5
popq %rsi
callq 0xf48b
testq %rax, %rax
jne 0x10683
movq (%rbx), %rax
movq 0x10(%rax), %rdi
testq %rdi, %rdi
je 0x106c0
testb $0x20, 0xa(%rdi)
jne 0x106c0
movq 0x18(%r12), %rax
movq 0x108(%rax), %rdx
pushq $0x5
popq %rsi
callq 0xf48b
testq %rax, %rax
je 0x106bd
movq 0x10(%r12), %r8
pushq $0x1
popq %r14
movq %r12, %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %rbx, %rcx
movl %r14d, %r9d
callq 0xf585
movq 0x10(%r12), %rax
movl 0x8(%rax), %ecx
testl %ecx, %ecx
je 0x106cf
cmpl $0x1, %ecx
jne 0x106c0
xorl %r14d, %r14d
cmpl $0x0, (%rax)
setne %r14b
jmp 0x106c0
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl %ecx, %r14d
jmp 0x106c0