// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/lua-5.1.5/src/lcode.c
// Function: addk
static int addk (FuncState *fs, TValue *k, TValue *v) {
  lua_State *L = fs->L;
  TValue *idx = luaH_set(L, fs->h, k);
  Proto *f = fs->f;
  int oldsize = f->sizek;
  if (ttisnumber(idx)) {
    lua_assert(luaO_rawequalObj(&fs->f->k[cast_int(nvalue(idx))], v));
    return cast_int(nvalue(idx));
  }
  else {  /* constant not found; create a new entry */
    setnvalue(idx, cast_num(fs->nk));
    luaM_growvector(L, f->k, fs->nk, f->sizek, TValue,
                    MAXARG_Bx, "constant table overflow");
    while (oldsize < f->sizek) setnilvalue(&f->k[oldsize++]);
    setobj(L, &f->k[fs->nk], v);
    luaC_barrier(L, f, v);
    return fs->nk++;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rdx
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
movq 0x20(%rdi), %r14
movq %r14, %rdi
callq 0x59204
cmpl $0x3, 0x8(%rax)
jne 0x63af8
cvttsd2si (%rax), %eax
jmp 0x63cb0
movq (%rbx), %r13
leaq 0x4c(%r13), %r12
movslq 0x4c(%r13), %rbp
cvtsi2sdl 0x40(%rbx), %xmm0
movsd %xmm0, (%rax)
movl $0x3, 0x8(%rax)
movl 0x40(%rbx), %eax
cmpl (%r12), %eax
jl 0x63b41
movq 0x10(%r13), %rsi
leaq 0x8a5be(%rip), %r9      # 0xee0e5
movl $0x10, %ecx
movq %r14, %rdi
movq %r12, %rdx
movl $0x3ffff, %r8d          # imm = 0x3FFFF
callq 0x6372c
movq %rax, 0x10(%r13)
movslq (%r12), %rcx
cmpl %ecx, %ebp
jge 0x63c55
movq 0x10(%r13), %rdx
subq %rbp, %rcx
leaq 0x3(%rcx), %rax
andq $-0x4, %rax
decq %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
shlq $0x4, %rbp
leaq (%rdx,%rbp), %rcx
addq $0x38, %rcx
xorl %edx, %edx
movdqa 0x89d91(%rip), %xmm1    # 0xed910
movdqa 0x89d99(%rip), %xmm2    # 0xed920
movdqa 0x89da1(%rip), %xmm3    # 0xed930
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movq %rdx, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
movdqa %xmm5, %xmm6
por %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %esi
notl %esi
testb $0x1, %sil
je 0x63be1
movl $0x0, -0x30(%rcx)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %esi
testb $0x1, %sil
je 0x63bf7
movl $0x0, -0x20(%rcx)
por %xmm1, %xmm5
pxor %xmm3, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
pxor %xmm4, %xmm5
pextrw $0x0, %xmm5, %esi
testb $0x1, %sil
je 0x63c33
movl $0x0, -0x10(%rcx)
pextrw $0x4, %xmm5, %esi
testb $0x1, %sil
je 0x63c44
movl $0x0, (%rcx)
addq $0x4, %rdx
addq $0x40, %rcx
cmpq %rdx, %rax
jne 0x63b97
movq 0x10(%r13), %rax
movslq 0x40(%rbx), %rcx
shlq $0x4, %rcx
movq (%r15), %rdx
movq %rdx, (%rax,%rcx)
movl 0x8(%r15), %edx
movl %edx, 0x8(%rax,%rcx)
cmpl $0x4, 0x8(%r15)
jl 0x63ca7
movq (%r15), %rsi
testb $0x3, 0x9(%rsi)
je 0x63ca7
movb 0x9(%r13), %al
testb $0x4, %al
je 0x63ca7
movq 0x20(%r14), %rdi
cmpb $0x1, 0x21(%rdi)
jne 0x63c99
callq 0x66a62
jmp 0x63ca7
andb $-0x8, %al
movb 0x20(%rdi), %cl
andb $0x3, %cl
orb %al, %cl
movb %cl, 0x9(%r13)
movl 0x40(%rbx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x40(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq