// File: /workspace/github_c_makefile_star2_O0/tylerneylon[P]APIsWithLua/lua/lcode.c
// Function: addk
static int addk (FuncState *fs, TValue *key, TValue *v) {
  lua_State *L = fs->ls->L;
  Proto *f = fs->f;
  TValue *idx = luaH_set(L, fs->ls->h, key);  /* index scanner table */
  int k, oldsize;
  if (ttisinteger(idx)) {  /* is there an index there? */
    k = cast_int(ivalue(idx));
    /* correct value? (warning: must distinguish floats from integers!) */
    if (k < fs->nk && ttype(&f->k[k]) == ttype(v) &&
                      luaV_rawequalobj(&f->k[k], v))
      return k;  /* reuse index */
  }
  /* constant not found; create a new entry */
  oldsize = f->sizek;
  k = fs->nk;
  /* numerical value does not need GC barrier;
     table has no metatable, so it does not need to invalidate cache */
  setivalue(idx, k);
  luaM_growvector(L, f->k, k, f->sizek, TValue, MAXARG_Ax, "constants");
  while (oldsize < f->sizek) setnilvalue(&f->k[oldsize++]);
  setobj(L, &f->k[k], v);
  fs->nk++;
  luaC_barrier(L, f, v);
  return k;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x38(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x50(%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0x17480
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpl $0x13, 0x8(%rax)
jne 0x224b5
movq -0x38(%rbp), %rax
movq (%rax), %rax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x2c(%rcx), %eax
jge 0x224b3
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x3c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
andl $0x3f, %eax
movq -0x20(%rbp), %rcx
movl 0x8(%rcx), %ecx
andl $0x3f, %ecx
cmpl %ecx, %eax
jne 0x224b3
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rsi
movslq -0x3c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rsi
movq -0x20(%rbp), %rdx
xorl %eax, %eax
movl %eax, %edi
callq 0x1a340
cmpl $0x0, %eax
je 0x224b3
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x225ea
jmp 0x224b5
movq -0x30(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movslq -0x3c(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rax
movl $0x13, 0x8(%rax)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movq -0x30(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jle 0x2252c
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rsi
movq -0x30(%rbp), %rdx
addq $0x14, %rdx
movl $0x10, %ecx
movl $0x3ffffff, %r8d        # imm = 0x3FFFFFF
leaq 0x13588(%rip), %r9      # 0x35aa4
callq 0x10070
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x30(%rax)
jmp 0x2252e
movl -0x40(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jge 0x22560
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x40(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x40(%rbp)
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl $0x0, 0x8(%rax)
jmp 0x2252e
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x3c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x2c(%rax)
movq -0x20(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x225e2
movq -0x30(%rbp), %rax
movzbl 0x9(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x225e2
movq -0x20(%rbp), %rax
movq (%rax), %rax
movzbl 0x9(%rax), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x225e2
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
callq 0xd5a0
jmp 0x225e4
jmp 0x225e4
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)