// File: /workspace/github_c_makefile_star2_O3/zenkj[P]luajit-arm64/src/host/minilua.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);
if(n==NULL){
rehash(L,t,key);
return luaH_set(L,t,key);
}
othern=mainposition(t,key2tval(mp));
if(othern!=mp){
while(gnext(othern)!=mp)othern=gnext(othern);
gnext(othern)=n;
*n=*mp;
gnext(mp)=NULL;
setnilvalue(gval(mp));
}
else{
gnext(n)=gnext(mp);
gnext(mp)=n;
mp=n;
}
}
gkey(mp)->value=key->value;gkey(mp)->tt=key->tt;
luaC_barriert(L,t,key);
return gval(mp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r15
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x79ff
movq %rax, %r12
leaq 0xd908(%rip), %rax      # 0x154a8
cmpq %rax, %r12
je 0x7bb1
cmpl $0x0, 0x8(%r12)
je 0x7dfd
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
leaq -0x28(%rcx), %r14
movq %r14, 0x28(%rbx)
cmpq %rax, %rcx
jbe 0x7c29
cmpl $0x0, -0x10(%rcx)
movq %r14, %rcx
jne 0x7bb9
leaq 0x10(%r12), %rsi
movq %rbx, %rdi
callq 0x79ff
cmpq %r12, %rax
je 0x7dec
movq %rax, %rcx
movq 0x20(%rax), %rax
cmpq %r12, %rax
jne 0x7be5
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 0x7dfd
xorps %xmm0, %xmm0
movups %xmm0, 0x8c(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movl 0x38(%rbx), %ecx
xorl %edx, %edx
movl $0x1, %edi
xorl %ebp, %ebp
movl $0x1, %esi
movl %esi, %r8d
cmpl %ecx, %esi
jle 0x7c79
movl %ecx, %r8d
cmpl %ecx, %edi
jg 0x7cca
xorl %r9d, %r9d
cmpl %r8d, %edi
jg 0x7cb7
movq 0x18(%rbx), %r9
movslq %edi, %r11
movslq %r8d, %rdi
leaq -0x1(%r11), %r10
shlq $0x4, %r11
addq %r9, %r11
addq $-0x8, %r11
xorl %r9d, %r9d
cmpl $0x1, (%r11)
sbbl $-0x1, %r9d
incq %r10
addq $0x10, %r11
cmpq %rdi, %r10
jl 0x7c9d
incl %r8d
movl %r8d, %edi
addl %r9d, 0x20(%rsp,%rdx,4)
addl %r9d, %ebp
incq %rdx
addl %esi, %esi
cmpq $0x1f, %rdx
jne 0x7c6b
movq %r13, 0x10(%rsp)
movq %r15, 0x18(%rsp)
movzbl 0xb(%rbx), %ecx
movl $0x0, %r13d
movl $0x0, %edx
cmpq $0x1f, %rcx
ja 0x7d3a
movabsq $0x100000000, %r12      # imm = 0x100000000
shlq %cl, %r12
sarq $0x20, %r12
leaq (%r12,%r12,4), %rcx
leaq (%rax,%rcx,8), %r14
addq $-0x20, %r14
xorl %edx, %edx
xorl %r13d, %r13d
cmpl $0x0, (%r14)
je 0x7d2e
leaq 0x8(%r14), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %r15
movl %edx, %ebx
callq 0x7e4f
movl %ebx, %edx
movq %r15, %rbx
addl %eax, %r13d
incl %edx
decq %r12
addq $-0x28, %r14
testq %r12, %r12
jne 0x7d0b
movl %edx, 0xc(%rsp)
addl %ebp, %r13d
leaq 0x20(%rsp), %r12
movq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x7e4f
movl $0x0, %edx
addl %r13d, %eax
movq 0x18(%rsp), %r14
movl $0x0, %r10d
jle 0x7db5
movl $0x1, %ecx
xorl %edi, %edi
xorl %edx, %edx
xorl %r10d, %r10d
xorl %esi, %esi
movl (%r12), %r8d
leal (%r8,%rsi), %r9d
cmpl %edi, %r9d
setg %dil
testl %r8d, %r8d
cmovgl %r9d, %esi
setg %r8b
testb %dil, %r8b
cmovnel %r9d, %r10d
cmovnel %ecx, %edx
cmpl %eax, %esi
je 0x7db5
leal (%rcx,%rcx), %r8d
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
addq $0x4, %r12
movl %ecx, %edi
cmpl %eax, %ecx
movl %r8d, %ecx
jb 0x7d76
addl 0xc(%rsp), %ebp
subl %r10d, %ebp
incl %ebp
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %ecx
callq 0x7eb9
movq %r14, %rdi
movq %rbx, %rsi
movq 0x10(%rsp), %rdx
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7aff
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 0x7e3a
movq (%r13), %rax
testb $0x3, 0x9(%rax)
je 0x7e3a
movb 0x9(%rbx), %al
testb $0x4, %al
je 0x7e3a
movq 0x20(%r15), %rcx
andb $-0x5, %al
movb %al, 0x9(%rbx)
movq 0x40(%rcx), %rax
movq %rax, 0x30(%rbx)
movq %rbx, 0x40(%rcx)
movq %r12, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq