// File: /workspace/github_c_makefile_star2_O3/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: luaV_settable
static void luaV_settable(lua_State*L,const TValue*t,TValue*key,StkId val){
int loop;
TValue temp;
for(loop=0;loop<100;loop++){
const TValue*tm;
if(ttistable(t)){
Table*h=hvalue(t);
TValue*oldval=luaH_set(L,h,key);
if(!ttisnil(oldval)||
(tm=fasttm(L,h->metatable,TM_NEWINDEX))==NULL){
setobj(L,oldval,val);
h->flags=0;
luaC_barriert(L,h,val);
return;
}
}
else if(ttisnil(tm=luaT_gettmbyobj(L,t,TM_NEWINDEX)))
luaG_typeerror(L,t,"index");
if(ttisfunction(tm)){
callTM(L,tm,t,key,val);
return;
}
setobj(L,&temp,tm);
t=&temp;
}
luaG_runerror(L,"loop in settable");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x20(%rsp), %r13
leaq 0x8(%rsi), %r14
movl 0x8(%rsi), %ebp
movl $0x64, %r15d
movq %rdi, (%rsp)
cmpl $0x5, %ebp
jne 0x732f
movq %rbx, %rdi
movq (%r12), %rbx
movq %rbx, %rsi
movq 0x10(%rsp), %rdx
callq 0x7aff
movq %rax, %rbp
cmpl $0x0, 0x8(%rax)
jne 0x7383
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x7383
testb $0x2, 0xa(%rdi)
jne 0x7383
movq (%rsp), %rax
movq 0x20(%rax), %rax
movq 0x130(%rax), %rdx
movl $0x1, %esi
callq 0x792f
testq %rax, %rax
je 0x7383
movl 0x8(%rax), %ecx
movq (%rsp), %rbx
jmp 0x734a
movq %rbx, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x5288
movl 0x8(%rax), %ecx
testl %ecx, %ecx
je 0x7470
cmpl $0x6, %ecx
je 0x73d6
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movl %ecx, 0x20(%rsp)
movl %ecx, %ebp
movq %r13, %r14
leaq 0x18(%rsp), %r12
decl %r15d
jne 0x72cf
leaq 0xe401(%rip), %rsi      # 0x1577a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x47e0
movq 0x8(%rsp), %rcx
movq (%rcx), %rax
movq %rax, (%rbp)
movl 0x8(%rcx), %eax
movl %eax, 0x8(%rbp)
movb $0x0, 0xa(%rbx)
cmpl $0x4, %eax
jl 0x73c7
movq (%rcx), %rax
testb $0x3, 0x9(%rax)
je 0x73c7
movb 0x9(%rbx), %al
testb $0x4, %al
je 0x73c7
movq (%rsp), %rcx
movq 0x20(%rcx), %rcx
andb $-0x5, %al
movb %al, 0x9(%rbx)
movq 0x40(%rcx), %rax
movq %rax, 0x30(%rbx)
movq %rbx, 0x40(%rcx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rbx), %rcx
movq (%rax), %rdx
movq %rdx, (%rcx)
movl 0x8(%rax), %eax
movl %eax, 0x8(%rcx)
movq 0x10(%rbx), %rax
movq (%r12), %rcx
movq %rcx, 0x10(%rax)
movl (%r14), %ecx
movl %ecx, 0x18(%rax)
movq 0x10(%rbx), %rax
movq 0x10(%rsp), %rdx
movq (%rdx), %rcx
movq %rcx, 0x20(%rax)
movl 0x8(%rdx), %ecx
movl %ecx, 0x28(%rax)
movq 0x10(%rbx), %rax
movq 0x8(%rsp), %rdx
movq (%rdx), %rcx
movq %rcx, 0x30(%rax)
movl 0x8(%rdx), %ecx
movl %ecx, 0x38(%rax)
movq 0x10(%rbx), %rsi
movq 0x38(%rbx), %rax
subq %rsi, %rax
cmpq $0x40, %rax
jg 0x7450
movl 0x58(%rbx), %eax
leal 0x4(%rax), %ecx
leal (%rax,%rax), %esi
cmpl $0x4, %eax
cmovll %ecx, %esi
movq %rbx, %rdi
callq 0x50e7
movq 0x10(%rbx), %rsi
leaq 0x40(%rsi), %rax
movq %rax, 0x10(%rbx)
movq %rbx, %rdi
xorl %edx, %edx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x53b2
movslq %ebp, %rax
leaq 0x143e6(%rip), %rcx     # 0x1b860
movq (%rcx,%rax,8), %rcx
leaq 0xe23b(%rip), %rsi      # 0x156c0
leaq 0xed14(%rip), %rdx      # 0x161a0
movq %rbx, %rdi
xorl %eax, %eax
callq 0x47e0