// File: /workspace/github_c_makefile_star2_O0/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: luaV_concat
static void luaV_concat(lua_State*L,int total,int last){
do{
StkId top=L->base+last+1;
int n=2;
if(!(ttisstring(top-2)||ttisnumber(top-2))||!tostring(L,top-1)){
if(!call_binTM(L,top-2,top-1,top-2,TM_CONCAT))
luaG_concaterror(L,top-2,top-1);
}else if(tsvalue(top-1)->len==0)
(void)tostring(L,top-2);
else{
size_t tl=tsvalue(top-1)->len;
char*buffer;
int i;
for(n=1;n<total&&tostring(L,top-n-1);n++){
size_t l=tsvalue(top-n-1)->len;
if(l>=((size_t)(~(size_t)0)-2)-tl)luaG_runerror(L,"string length overflow");
tl+=l;
}
buffer=luaZ_openspace(L,&G(L)->buff,tl);
tl=0;
for(i=n;i>0;i--){
size_t l=tsvalue(top-i)->len;
memcpy(buffer+tl,svalue(top-i),l);
tl+=l;
}
setsvalue(L,top-n,luaS_newlstr(L,buffer,tl));
}
total-=n-1;
last-=n-1;
}while(total>1);
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movl %esi, 0x4c(%rsp)
movl %edx, 0x48(%rsp)
movq 0x50(%rsp), %rax
movq 0x18(%rax), %rax
movslq 0x48(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addq $0x10, %rax
movq %rax, 0x40(%rsp)
movl $0x2, 0x3c(%rsp)
movq 0x40(%rsp), %rax
cmpl $0x4, -0x18(%rax)
je 0x626d
movq 0x40(%rsp), %rax
cmpl $0x3, -0x18(%rax)
jne 0x6290
movq 0x40(%rsp), %rax
cmpl $0x4, -0x8(%rax)
je 0x62e1
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rsi
addq $-0x10, %rsi
callq 0x6790
cmpl $0x0, %eax
jne 0x62e1
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rsi
addq $-0x20, %rsi
movq 0x40(%rsp), %rdx
addq $-0x10, %rdx
movq 0x40(%rsp), %rcx
addq $-0x20, %rcx
movl $0xf, %r8d
callq 0x6840
cmpl $0x0, %eax
jne 0x62dc
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rsi
addq $-0x20, %rsi
movq 0x40(%rsp), %rdx
addq $-0x10, %rdx
callq 0x68e0
jmp 0x650f
movq 0x40(%rsp), %rax
movq -0x10(%rax), %rax
cmpq $0x0, 0x10(%rax)
jne 0x6328
movq 0x40(%rsp), %rcx
movb $0x1, %al
cmpl $0x4, -0x18(%rcx)
movb %al, 0x7(%rsp)
je 0x631f
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rsi
addq $-0x20, %rsi
callq 0x6790
cmpl $0x0, %eax
setne %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
jmp 0x650d
movq 0x40(%rsp), %rax
movq -0x10(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, 0x30(%rsp)
movl $0x1, 0x3c(%rsp)
movl 0x3c(%rsp), %ecx
xorl %eax, %eax
cmpl 0x4c(%rsp), %ecx
movb %al, 0x6(%rsp)
jge 0x63aa
movq 0x40(%rsp), %rcx
movslq 0x3c(%rsp), %rdx
xorl %eax, %eax
subq %rdx, %rax
shlq $0x4, %rax
addq %rax, %rcx
movb $0x1, %al
cmpl $0x4, -0x8(%rcx)
movb %al, 0x5(%rsp)
je 0x63a2
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rsi
movslq 0x3c(%rsp), %rcx
xorl %eax, %eax
subq %rcx, %rax
shlq $0x4, %rax
addq %rax, %rsi
addq $-0x10, %rsi
callq 0x6790
cmpl $0x0, %eax
setne %al
movb %al, 0x5(%rsp)
movb 0x5(%rsp), %al
movb %al, 0x6(%rsp)
movb 0x6(%rsp), %al
testb $0x1, %al
jne 0x63b4
jmp 0x641f
movq 0x40(%rsp), %rax
movslq 0x3c(%rsp), %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x10(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq $-0x3, %rcx
subq 0x30(%rsp), %rcx
cmpq %rcx, %rax
jb 0x6400
movq 0x50(%rsp), %rdi
leaq 0x1c429(%rip), %rsi     # 0x22822
movb $0x0, %al
callq 0x54a0
movq 0x18(%rsp), %rax
addq 0x30(%rsp), %rax
movq %rax, 0x30(%rsp)
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x6342
movq 0x50(%rsp), %rdi
movq 0x50(%rsp), %rax
movq 0x20(%rax), %rsi
addq $0x58, %rsi
movq 0x30(%rsp), %rdx
callq 0x6930
movq %rax, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movl 0x3c(%rsp), %eax
movl %eax, 0x24(%rsp)
cmpl $0x0, 0x24(%rsp)
jle 0x64c7
movq 0x40(%rsp), %rax
movslq 0x24(%rsp), %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
addq 0x30(%rsp), %rdi
movq 0x40(%rsp), %rax
movslq 0x24(%rsp), %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
addq $0x18, %rsi
movq 0x10(%rsp), %rdx
callq 0x31c0
movq 0x10(%rsp), %rax
addq 0x30(%rsp), %rax
movq %rax, 0x30(%rsp)
movl 0x24(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x6451
movq 0x40(%rsp), %rax
movslq 0x3c(%rsp), %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x49c0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rax
movl $0x4, 0x8(%rax)
jmp 0x650f
movl 0x3c(%rsp), %ecx
subl $0x1, %ecx
movl 0x4c(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x4c(%rsp)
movl 0x3c(%rsp), %ecx
subl $0x1, %ecx
movl 0x48(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x48(%rsp)
cmpl $0x1, 0x4c(%rsp)
jg 0x6231
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)