// File: /workspace/github_c_makefile_star2_O0/tylerneylon[P]APIsWithLua/lua/ltable.c
// Function: mainposition
static Node *mainposition (const Table *t, const TValue *key) {
  switch (ttype(key)) {
    case LUA_TNUMINT:
      return hashint(t, ivalue(key));
    case LUA_TNUMFLT:
      return hashmod(t, l_hashfloat(fltvalue(key)));
    case LUA_TSHRSTR:
      return hashstr(t, tsvalue(key));
    case LUA_TLNGSTR:
      return hashpow2(t, luaS_hashlongstr(tsvalue(key)));
    case LUA_TBOOLEAN:
      return hashboolean(t, bvalue(key));
    case LUA_TLIGHTUSERDATA:
      return hashpointer(t, pvalue(key));
    case LUA_TLCF:
      return hashpointer(t, fvalue(key));
    default:
      lua_assert(!ttisdeadkey(key));
      return hashpointer(t, gcvalue(key));
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x3f, %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x15, %eax
ja 0x17b2f
movq -0x20(%rbp), %rax
leaq 0x1d6ca(%rip), %rcx     # 0x35000
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rcx
movzbl 0xb(%rcx), %ecx
movl $0x1, %edx
shll %cl, %edx
movq -0x28(%rbp), %rcx
subl $0x1, %edx
movslq %edx, %rdx
andq %rdx, %rcx
movslq %ecx, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x17b7b
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movsd (%rax), %xmm0
callq 0x18230
movq -0x10(%rbp), %rcx
movzbl 0xb(%rcx), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
subl $0x1, %ecx
orl $0x1, %ecx
cltd
idivl %ecx
movq -0x30(%rbp), %rax
movslq %edx, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x17b7b
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movl 0xc(%rcx), %ecx
movl %ecx, -0x34(%rbp)
movq -0x10(%rbp), %rcx
movzbl 0xb(%rcx), %ecx
movl $0x1, %edx
shll %cl, %edx
movl -0x34(%rbp), %ecx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x17b7b
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x16560
movl %eax, %ecx
movq -0x40(%rbp), %rax
movl %ecx, -0x38(%rbp)
movq -0x10(%rbp), %rcx
movzbl 0xb(%rcx), %ecx
movl $0x1, %edx
shll %cl, %edx
movl -0x38(%rbp), %ecx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x17b7b
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, -0x44(%rbp)
movq -0x10(%rbp), %rcx
movzbl 0xb(%rcx), %ecx
movl $0x1, %edx
shll %cl, %edx
movl -0x44(%rbp), %ecx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x17b7b
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movabsq $0xffffffff, %rcx       # imm = 0xFFFFFFFF
andq %rcx, %rax
movq -0x10(%rbp), %rcx
movzbl 0xb(%rcx), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
subl $0x1, %ecx
orl $0x1, %ecx
xorl %edx, %edx
divl %ecx
movq -0x50(%rbp), %rax
movl %edx, %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x17b7b
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movabsq $0xffffffff, %rcx       # imm = 0xFFFFFFFF
andq %rcx, %rax
movq -0x10(%rbp), %rcx
movzbl 0xb(%rcx), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
subl $0x1, %ecx
orl $0x1, %ecx
xorl %edx, %edx
divl %ecx
movq -0x58(%rbp), %rax
movl %edx, %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x17b7b
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movabsq $0xffffffff, %rcx       # imm = 0xFFFFFFFF
andq %rcx, %rax
movq -0x10(%rbp), %rcx
movzbl 0xb(%rcx), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
subl $0x1, %ecx
orl $0x1, %ecx
xorl %edx, %edx
divl %ecx
movq -0x60(%rbp), %rax
movl %edx, %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)