// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/ltable.c
// Function: newkey
static TValue *newkey (lua_State *L, Table *t, const TValue *key) {
  Node *mp = mainposition(t, key);
  if (!ttisnil(gval(mp)) || mp == dummynode) {
    Node *othern;
    Node *n = getfreepos(t);  /* get a free place */
    if (n == NULL) {  /* cannot find a free place? */
      rehash(L, t, key);  /* grow table */
      return luaH_set(L, t, key);  /* re-insert key into grown table */
    }
    lua_assert(n != dummynode);
    othern = mainposition(t, key2tval(mp));
    if (othern != mp) {  /* is colliding node out of its main position? */
      /* yes; move colliding node into free position */
      while (gnext(othern) != mp) othern = gnext(othern);  /* find previous */
      gnext(othern) = n;  /* redo the chain with `n' in place of `mp' */
      *n = *mp;  /* copy colliding node into free pos. (mp->next also goes) */
      gnext(mp) = NULL;  /* now `mp' is free */
      setnilvalue(gval(mp));
    }
    else {  /* colliding node is in its own main position */
      /* new node will go into free position */
      gnext(n) = gnext(mp);  /* chain new position */
      gnext(mp) = n;
      mp = n;
    }
  }
  gkey(mp)->value = key->value; gkey(mp)->tt = key->tt;
  luaC_barriert(L, t, key);
  lua_assert(ttisnil(gval(mp)));
  return gval(mp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r15
movq %rsi, %rdi
movq %rdx, %rsi
callq 0xdbe5
movq %rax, %r12
leaq 0xded3(%rip), %rax      # 0x1bbf8
cmpq %rax, %r12
je 0xdd36
cmpl $0x0, 0x8(%r12)
je 0xdf4f
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
leaq -0x28(%rcx), %r14
movq %r14, 0x28(%rbx)
cmpq %rax, %rcx
jbe 0xddae
cmpl $0x0, -0x10(%rcx)
movq %r14, %rcx
jne 0xdd3e
leaq 0x10(%r12), %rsi
movq %rbx, %rdi
callq 0xdbe5
cmpq %r12, %rax
je 0xdf3e
movq %rax, %rcx
movq 0x20(%rax), %rax
cmpq %r12, %rax
jne 0xdd6a
movq %r14, 0x20(%rcx)
movq 0x20(%r12), %rax
movq %rax, 0x20(%r14)
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
movq $0x0, 0x20(%r12)
movl $0x0, 0x8(%r12)
jmp 0xdf4f
movq %r15, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x6c(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movl 0x38(%rbx), %eax
xorl %ecx, %ecx
movl $0x1, %esi
xorl %ebp, %ebp
movl $0x1, %edx
movl %edx, %edi
cmpl %eax, %edx
jle 0xddf5
movl %eax, %edi
cmpl %eax, %esi
jg 0xde43
xorl %r8d, %r8d
cmpl %edi, %esi
jg 0xde30
movq 0x18(%rbx), %r8
movslq %esi, %r10
movslq %edi, %rsi
leaq -0x1(%r10), %r9
shlq $0x4, %r10
addq %r8, %r10
addq $-0x8, %r10
xorl %r8d, %r8d
cmpl $0x1, (%r10)
sbbl $-0x1, %r8d
incq %r9
addq $0x10, %r10
cmpq %rsi, %r9
jl 0xde18
incl %edi
movl %edi, %esi
addl %r8d, 0x10(%rsp,%rcx,4)
addl %r8d, %ebp
incq %rcx
addl %edx, %edx
cmpq $0x1b, %rcx
jne 0xdde9
movq %r13, 0x8(%rsp)
movb 0xb(%rbx), %cl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shll %cl, %eax
notl %eax
leaq (%rax,%rax,4), %rax
leaq 0x28(,%rax,8), %r15
xorl %r13d, %r13d
leaq 0x10(%rsp), %r12
xorl %r14d, %r14d
movq 0x20(%rbx), %rax
cmpl $0x0, -0x20(%rax,%r15)
je 0xde8d
leaq (%rax,%r15), %rdi
addq $-0x18, %rdi
movq %r12, %rsi
callq 0xe15f
addl %eax, %r14d
incl %r13d
addq $-0x28, %r15
jne 0xde6b
addl %ebp, %r14d
leaq 0x10(%rsp), %r12
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0xe15f
addl %r14d, %eax
jle 0xdf01
movl $0x1, %esi
xorl %r8d, %r8d
xorl %edx, %edx
xorl %ecx, %ecx
xorl %edi, %edi
movq (%rsp), %r14
movl (%r12), %r9d
leal (%r9,%rdi), %r10d
cmpl %r8d, %r10d
setg %r8b
testl %r9d, %r9d
cmovgl %r10d, %edi
setg %r9b
testb %r8b, %r9b
cmovnel %r10d, %ecx
cmovnel %esi, %edx
cmpl %eax, %edi
je 0xdf09
leal (%rsi,%rsi), %r9d
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
addq $0x4, %r12
movl %esi, %r8d
cmpl %eax, %esi
movl %r9d, %esi
jb 0xdebf
jmp 0xdf09
xorl %ecx, %ecx
xorl %edx, %edx
movq (%rsp), %r14
addl %r13d, %ebp
subl %ecx, %ebp
incl %ebp
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %ecx
callq 0xd5e4
movq %r14, %rdi
movq %rbx, %rsi
movq 0x8(%rsp), %rdx
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xdc86
movq 0x20(%r12), %rax
movq %rax, 0x20(%r14)
movq %r14, 0x20(%r12)
movq %r14, %r12
movq (%r13), %rax
movq %rax, 0x10(%r12)
movl 0x8(%r13), %eax
movl %eax, 0x18(%r12)
cmpl $0x4, %eax
jl 0xdf81
movq (%r13), %rax
testb $0x3, 0x9(%rax)
je 0xdf81
testb $0x4, 0x9(%rbx)
je 0xdf81
movq %r15, %rdi
movq %rbx, %rsi
callq 0x9a6d
movq %r12, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq