// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]tundra/lua/src/lvm.c
// Function: luaV_settable
void luaV_settable (lua_State *L, const TValue *t, TValue *key, StkId val) {
  int loop;
  for (loop = 0; loop < MAXTAGLOOP; loop++) {
    const TValue *tm;
    if (ttistable(t)) {  /* `t' is a table? */
      Table *h = hvalue(t);
      TValue *oldval = luaH_set(L, h, key); /* do a primitive set */
      if (!ttisnil(oldval) ||  /* result is no nil? */
          (tm = fasttm(L, h->metatable, TM_NEWINDEX)) == NULL) { /* or no TM? */
        setobj2t(L, oldval, val);
        luaC_barriert(L, h, val);
        return;
      }
      /* else will try the tag method */
    }
    else if (ttisnil(tm = luaT_gettmbyobj(L, t, TM_NEWINDEX)))
      luaG_typeerror(L, t, "index");
    if (ttisfunction(tm)) {
      callTM(L, tm, t, key, val);
      return;
    }
    t = tm;  /* else repeat with `tm' */ 
  }
  luaG_runerror(L, "loop in settable");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x64, -0x24(%rbp)
jge 0x42275
movq -0x10(%rbp), %rax
cmpl $0x5, 0x8(%rax)
jne 0x42208
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x3fac0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x4219b
movq -0x38(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x42144
xorl %eax, %eax
movq %rax, -0x58(%rbp)
jmp 0x4218d
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movzbl 0xa(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x42160
xorl %eax, %eax
movq %rax, -0x60(%rbp)
jmp 0x42185
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x130(%rax), %rdx
movl $0x1, %esi
callq 0x41040
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x42206
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movq -0x48(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
cmpl $0x4, 0x8(%rax)
jl 0x42201
movq -0x20(%rbp), %rax
movq (%rax), %rax
movzbl 0x9(%rax), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x42201
movq -0x38(%rbp), %rax
movzbl 0x9(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x42201
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x32740
jmp 0x42287
jmp 0x4223a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x1, %edx
callq 0x410b0
movq %rax, -0x30(%rbp)
cmpl $0x0, 0x8(%rax)
jne 0x42238
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0xe7a6(%rip), %rdx      # 0x509d9
callq 0x2e760
jmp 0x4223a
movq -0x30(%rbp), %rax
cmpl $0x6, 0x8(%rax)
jne 0x4225f
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
callq 0x42290
jmp 0x42287
movq -0x30(%rbp), %rax
movq %rax, -0x10(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x420ef
movq -0x8(%rbp), %rdi
leaq 0xeb7d(%rip), %rsi      # 0x50dfd
movb $0x0, %al
callq 0x2ead0
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)