// File: /workspace/github_c_makefile_star2_O2/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 0x72b0
movq %rax, %r12
leaq 0xb00d(%rip), %rax      # 0x12450
cmpq %rax, %r12
je 0x7454
cmpl $0x0, 0x8(%r12)
je 0x7653
movq %r13, 0x10(%rsp)
movq 0x20(%rbx), %r13
movq 0x28(%rbx), %rax
leaq -0x28(%rax), %r14
movq %r14, 0x28(%rbx)
cmpq %r13, %rax
jbe 0x74d0
cmpl $0x0, -0x10(%rax)
movq %r14, %rax
jne 0x7461
leaq 0x10(%r12), %rsi
movq %rbx, %rdi
callq 0x72b0
cmpq %r12, %rax
je 0x763d
movq 0x10(%rsp), %r13
movq %rax, %rcx
movq 0x20(%rax), %rax
cmpq %r12, %rax
jne 0x7492
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)
andq $0x0, 0x20(%r12)
andl $0x0, 0x8(%r12)
jmp 0x7653
xorl %eax, %eax
cmpq $0x1f, %rax
je 0x74e2
andl $0x0, 0x20(%rsp,%rax,4)
incq %rax
jmp 0x74d2
xorl %eax, %eax
pushq $0x1
popq %rcx
xorl %ebp, %ebp
movl %ecx, %edx
cmpq $0x1f, %rax
je 0x7549
movl 0x38(%rbx), %esi
movl %ecx, %edi
cmpl %esi, %ecx
jle 0x7500
movl %esi, %edi
cmpl %esi, %edx
jg 0x7549
movslq %edx, %rsi
movslq %edi, %rdx
incq %rdx
cmpq %rsi, %rdx
cmovleq %rsi, %rdx
movq %rdx, %rdi
subq %rsi, %rdi
shlq $0x4, %rsi
addq $-0x8, %rsi
xorl %r8d, %r8d
subq $0x1, %rdi
jb 0x753a
movq 0x18(%rbx), %r9
cmpl $0x1, (%r9,%rsi)
sbbl $-0x1, %r8d
addq $0x10, %rsi
jmp 0x7521
addl %r8d, 0x20(%rsp,%rax,4)
addl %r8d, %ebp
incq %rax
addl %ecx, %ecx
jmp 0x74eb
movq %r15, 0x18(%rsp)
movb 0xb(%rbx), %cl
movabsq $0x100000000, %r15      # imm = 0x100000000
shlq %cl, %r15
sarq $0x20, %r15
addq $0x10, %r13
xorl %r14d, %r14d
leaq 0x20(%rsp), %r12
movl $0x0, 0xc(%rsp)
imulq $0x28, %r15, %rax
negq %r15
addq %r13, %rax
incq %r15
cmpq $0x1, %r15
je 0x75aa
leaq -0x28(%rax), %rdi
cmpl $0x0, -0x30(%rax)
movq %rdi, %rax
je 0x7580
movq %r12, %rsi
callq 0x76a5
addl %eax, %r14d
incl 0xc(%rsp)
negq %r15
jmp 0x7576
addl %ebp, %r14d
movq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x76a5
addl %r14d, %eax
xorl %esi, %esi
pushq $0x1
popq %rdi
xorl %ecx, %ecx
xorl %edx, %edx
movq 0x18(%rsp), %r14
movl %edi, %r8d
shrl %r8d
cmpl %eax, %r8d
jae 0x7609
movl (%r12), %r9d
leal (%r9,%rsi), %r10d
cmpl %r8d, %r10d
setg %r8b
testl %r9d, %r9d
cmovgl %r10d, %esi
setg %r9b
testb %r8b, %r9b
cmovnel %r10d, %ecx
cmovnel %edi, %edx
cmpl %eax, %esi
je 0x7609
addl %edi, %edi
addq $0x4, %r12
jmp 0x75ce
addl 0xc(%rsp), %ebp
subl %ecx, %ebp
incl %ebp
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %ecx
callq 0x76cd
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x73a2
movq 0x20(%r12), %rax
movq %rax, 0x20(%r14)
movq %r14, 0x20(%r12)
movq %r14, %r12
movq 0x10(%rsp), %r13
movq (%r13), %rax
movq %rax, 0x10(%r12)
movl 0x8(%r13), %eax
movl %eax, 0x18(%r12)
cmpl $0x4, %eax
jl 0x7690
movq (%r13), %rax
testb $0x3, 0x9(%rax)
je 0x7690
movb 0x9(%rbx), %al
testb $0x4, %al
je 0x7690
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