// File: /workspace/github_c_makefile_star2_O1/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 $0xb8, %rsp
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r12
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x7752
movq %rax, %r15
leaq 0xcb3d(%rip), %rax      # 0x14430
cmpq %rax, %r15
je 0x7903
cmpl $0x0, 0x8(%r15)
je 0x7b75
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
leaq -0x28(%rcx), %r14
movq %r14, 0x28(%rbx)
cmpq %rax, %rcx
jbe 0x7923
cmpl $0x0, -0x10(%rcx)
movq %r14, %rcx
jne 0x790b
jmp 0x7926
xorl %r14d, %r14d
testq %r14, %r14
je 0x797f
leaq 0x10(%r15), %rsi
movq %rbx, %rdi
callq 0x7752
cmpq %r15, %rax
je 0x7b61
movq %rax, %rcx
movq 0x20(%rax), %rax
cmpq %r15, %rax
jne 0x7940
movq %r14, 0x20(%rcx)
movq 0x20(%r15), %rax
movq %rax, 0x20(%r14)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
movq $0x0, 0x20(%r15)
movl $0x0, 0x8(%r15)
jmp 0x7b70
xorps %xmm0, %xmm0
movups %xmm0, 0x9c(%rsp)
movaps %xmm0, 0x90(%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)
movq %rbx, 0x8(%rsp)
movl 0x38(%rbx), %ecx
xorl %edx, %edx
movl $0x1, %edi
xorl %ebp, %ebp
movl $0x1, %esi
movl %esi, %r8d
cmpl %ecx, %esi
jle 0x79dc
movl %ecx, %r8d
cmpl %ecx, %edi
jle 0x79dc
xorl %r8d, %r8d
jmp 0x7a2a
xorl %r9d, %r9d
cmpl %r8d, %edi
jg 0x7a1f
movq 0x8(%rsp), %r9
movq 0x18(%r9), %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 0x7a05
incl %r8d
movl %r8d, %edi
addl %r9d, 0x30(%rsp,%rdx,4)
addl %r9d, %ebp
movb $0x1, %r8b
testb %r8b, %r8b
je 0x7a3a
incq %rdx
addl %esi, %esi
cmpq $0x1f, %rdx
jne 0x79c9
movl %ebp, 0x4(%rsp)
movq %r13, 0x18(%rsp)
movq %r12, 0x20(%rsp)
movq %r15, 0x28(%rsp)
movq 0x8(%rsp), %rcx
movzbl 0xb(%rcx), %ecx
xorl %r12d, %r12d
movl $0x0, %ebp
movl $0x0, %ebx
cmpq $0x1f, %rcx
ja 0x7ab5
movabsq $0x100000000, %r13      # imm = 0x100000000
shlq %cl, %r13
sarq $0x20, %r13
leaq (,%r13,4), %rcx
addq %r13, %rcx
leaq (%rax,%rcx,8), %r15
addq $-0x20, %r15
xorl %ebx, %ebx
xorl %ebp, %ebp
cmpl $0x0, (%r15)
je 0x7aa9
leaq 0x8(%r15), %rdi
leaq 0x30(%rsp), %rsi
callq 0x7bc8
addl %eax, %ebp
incl %ebx
decq %r13
addq $-0x28, %r15
testq %r13, %r13
jne 0x7a91
movl %ebx, 0x14(%rsp)
addl 0x4(%rsp), %ebp
leaq 0x30(%rsp), %r13
movq 0x18(%rsp), %rdi
movq %r13, %rsi
callq 0x7bc8
movl $0x0, %edx
addl %ebp, %eax
movq 0x28(%rsp), %r15
movq 0x8(%rsp), %rbx
jle 0x7b2f
movl $0x1, %ecx
xorl %edi, %edi
xorl %edx, %edx
xorl %r12d, %r12d
xorl %esi, %esi
movl (%r13), %r8d
leal (%r8,%rsi), %r9d
cmpl %edi, %r9d
setg %dil
testl %r8d, %r8d
cmovgl %r9d, %esi
setg %r8b
testb %dil, %r8b
cmovnel %r9d, %r12d
cmovnel %ecx, %edx
cmpl %eax, %esi
je 0x7b2f
leal (%rcx,%rcx), %r8d
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
addq $0x4, %r13
movl %ecx, %edi
cmpl %eax, %ecx
movl %r8d, %ecx
jl 0x7af0
movl 0x4(%rsp), %ecx
addl 0x14(%rsp), %ecx
subl %r12d, %ecx
incl %ecx
movq 0x20(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x7c38
movq %r12, %rdi
movq %rbx, %rsi
movq 0x18(%rsp), %r13
movq %r13, %rdx
callq 0x7852
jmp 0x7b70
movq 0x20(%r15), %rax
movq %rax, 0x20(%r14)
movq %r14, 0x20(%r15)
movq %r14, %r15
testq %r14, %r14
je 0x7bb6
movq (%r13), %rax
movq %rax, 0x10(%r15)
movl 0x8(%r13), %eax
movl %eax, 0x18(%r15)
cmpl $0x4, 0x8(%r13)
jl 0x7bb3
movq (%r13), %rax
testb $0x3, 0x9(%rax)
je 0x7bb3
movb 0x9(%rbx), %al
testb $0x4, %al
je 0x7bb3
movq 0x20(%r12), %rcx
andb $-0x5, %al
movb %al, 0x9(%rbx)
movq 0x40(%rcx), %rax
movq %rax, 0x30(%rbx)
movq %rbx, 0x40(%rcx)
movq %r15, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq