// File: /workspace/github_cpp_makefile_star2_O3/Fohlen[P]cubescript-standalone/command.cpp
// Function: conc(tagval*, int, bool, char const*, int)
static char *conc(tagval *v, int n, bool space, const char *prefix, int prefixlen)
{
    static int vlen[MAXARGS];
    static char numbuf[3*MAXSTRLEN];
    int len = prefixlen, numlen = 0, i = 0;
    for(; i < n; i++) switch(v[i].type)
    {
        case VAL_MACRO: len += (vlen[i] = v[i].code[-1]>>8); break;
        case VAL_STR: len += (vlen[i] = int(strlen(v[i].s))); break;
        case VAL_INT:
            if(numlen + MAXSTRLEN > int(sizeof(numbuf))) goto overflow;
            intformat(&numbuf[numlen], v[i].i);
            numlen += (vlen[i] = strlen(&numbuf[numlen]));
            break;
        case VAL_FLOAT:
            if(numlen + MAXSTRLEN > int(sizeof(numbuf))) goto overflow;
            floatformat(&numbuf[numlen], v[i].f);
            numlen += (vlen[i] = strlen(&numbuf[numlen]));
            break;
        default: vlen[i] = 0; break;
    }
overflow:
    if(space) len += max(prefix ? i : i-1, 0);
    char *buf = newstring(len + numlen);
    int offset = 0, numoffset = 0;
    if(prefix)
    {
        memcpy(buf, prefix, prefixlen);
        offset += prefixlen;
        if(space && i) buf[offset++] = ' ';
    }
    loopj(i)
    {
        if(v[j].type == VAL_INT || v[j].type == VAL_FLOAT)
        {
            memcpy(&buf[offset], &numbuf[numoffset], vlen[j]);
            numoffset += vlen[j];
        }
        else if(vlen[j]) memcpy(&buf[offset], v[j].s, vlen[j]);
        offset += vlen[j];
        if(j==i-1) break;
        if(space) buf[offset++] = ' ';
    }
    buf[offset] = '\0';
    if(i < n)
    {
        char *morebuf = conc(&v[i], n-i, space, buf, offset);
        delete[] buf;
        return morebuf;
    }
    return buf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %r12d
movq %rcx, %r14
movl %edx, -0x30(%rbp)
movl %esi, %ebx
movq %rdi, -0x40(%rbp)
testl %esi, %esi
movl %esi, -0x2c(%rbp)
jle 0x1254c
movq %r14, -0x48(%rbp)
movl %ebx, %ebx
movb $0x1, %cl
movl $0x2, %r15d
xorl %r13d, %r13d
movl %r12d, -0x50(%rbp)
xorl %edx, %edx
movq -0x40(%rbp), %rax
movl (%rax,%r15,4), %eax
decl %eax
cmpl $0x5, %eax
ja 0x12517
leaq 0x5803(%rip), %rsi      # 0x17c08
movslq (%rsi,%rax,4), %rax
addq %rsi, %rax
jmpq *%rax
cmpl $0x208, %edx            # imm = 0x208
jg 0x12540
movq %r13, -0x38(%rbp)
movslq %edx, %r13
leaq 0xda08(%rip), %rax      # 0x1fe30
addq %rax, %r13
movq -0x40(%rbp), %rax
movl %edx, %r14d
movl -0x8(%rax,%r15,4), %edx
movq %r13, -0x58(%rbp)
leaq -0x58(%rbp), %rdi
leaq 0x5a5b(%rip), %rsi      # 0x17ea1
xorl %eax, %eax
callq 0x12e1e
jmp 0x124d8
movq -0x40(%rbp), %rax
movq -0x8(%rax,%r15,4), %rdi
movl %edx, %r14d
callq 0x2080
movl %r14d, %edx
leaq 0xd953(%rip), %rcx      # 0x1fdc0
movl %eax, -0x2(%r15,%rcx)
addl %eax, -0x50(%rbp)
jmp 0x12527
cmpl $0x208, %edx            # imm = 0x208
jg 0x12540
movq %r13, -0x38(%rbp)
movslq %edx, %r13
leaq 0xd99c(%rip), %rax      # 0x1fe30
addq %rax, %r13
movq -0x40(%rbp), %rax
movss -0x8(%rax,%r15,4), %xmm0
cvttps2dq %xmm0, %xmm1
cvtdq2ps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
leaq 0x5dae(%rip), %rsi      # 0x18261
leaq 0x5dac(%rip), %rax      # 0x18266
cmovneq %rax, %rsi
movq %r13, -0x58(%rbp)
cmovpq %rax, %rsi
cvtss2sd %xmm0, %xmm0
leaq -0x58(%rbp), %rdi
movb $0x1, %al
movl %edx, %r14d
callq 0x12e1e
movq %r13, %rdi
movq -0x38(%rbp), %r13
callq 0x2080
movl %r14d, %edx
leaq 0xd8d2(%rip), %rcx      # 0x1fdc0
movl %eax, -0x2(%r15,%rcx)
addl %eax, %edx
jmp 0x12527
movq -0x40(%rbp), %rax
movq -0x8(%rax,%r15,4), %rax
movl -0x4(%rax), %eax
shrl $0x8, %eax
leaq 0xd8b3(%rip), %rcx      # 0x1fdc0
movl %eax, -0x2(%r15,%rcx)
addl %eax, -0x50(%rbp)
jmp 0x12527
leaq 0xd8a2(%rip), %rax      # 0x1fdc0
movl $0x0, -0x2(%r15,%rax)
incq %r13
cmpq %rbx, %r13
setb %cl
addq $0x4, %r15
cmpq %r13, %rbx
jne 0x123eb
movl %ebx, %r13d
movl -0x2c(%rbp), %ebx
movq -0x48(%rbp), %r14
movl -0x50(%rbp), %esi
jmp 0x12556
xorl %edx, %edx
xorl %r13d, %r13d
movl %r12d, %esi
xorl %ecx, %ecx
cmpb $0x0, -0x30(%rbp)
movl %ecx, -0x5c(%rbp)
je 0x12572
cmpq $0x1, %r14
movl %r13d, %eax
sbbl $0x0, %eax
xorl %ecx, %ecx
testl %eax, %eax
cmovgl %eax, %ecx
addl %ecx, %esi
movq %r13, -0x38(%rbp)
addl %edx, %esi
movslq %esi, %rdi
incq %rdi
callq 0x15705
testq %r14, %r14
movq %rax, -0x48(%rbp)
je 0x125c1
movslq %r12d, %r13
movq %rax, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x2130
cmpl $0x0, -0x38(%rbp)
sete %al
movl -0x30(%rbp), %ecx
xorb $0x1, %cl
orb %al, %cl
jne 0x125c4
leal 0x1(%r13), %r12d
movq -0x48(%rbp), %r14
movb $0x20, (%r14,%r13)
movq -0x38(%rbp), %rcx
jmp 0x125d4
xorl %r12d, %r12d
movq -0x38(%rbp), %rcx
testl %ecx, %ecx
movq -0x48(%rbp), %r14
je 0x1267e
leal -0x1(%rcx), %eax
shlq $0x2, %rax
movq %rax, -0x50(%rbp)
xorl %ebx, %ebx
xorl %r13d, %r13d
movl %r12d, %r15d
movq -0x40(%rbp), %rax
movl 0x8(%rax,%rbx,4), %eax
decl %eax
cmpl $0x1, %eax
ja 0x12629
movslq %r15d, %rdi
addq %r14, %rdi
movslq %r13d, %r14
leaq 0xd82a(%rip), %rax      # 0x1fe30
leaq (%rax,%r14), %rsi
leaq 0xd7af(%rip), %rax      # 0x1fdc0
movl (%rbx,%rax), %r12d
movslq %r12d, %r13
movq %r13, %rdx
callq 0x2130
addl %r14d, %r13d
movq -0x48(%rbp), %r14
jmp 0x12654
leaq 0xd790(%rip), %rax      # 0x1fdc0
movslq (%rbx,%rax), %r12
testq %r12, %r12
je 0x12651
movslq %r15d, %rdi
addq %r14, %rdi
movq -0x40(%rbp), %rax
movq (%rax,%rbx,4), %rsi
movq %r12, %rdx
callq 0x2130
jmp 0x12654
xorl %r12d, %r12d
addl %r15d, %r12d
cmpq %rbx, -0x50(%rbp)
je 0x12677
cmpb $0x0, -0x30(%rbp)
je 0x1266e
movslq %r12d, %rax
incl %r12d
movb $0x20, (%r14,%rax)
addq $0x4, %rbx
jmp 0x125e4
movl -0x2c(%rbp), %ebx
movq -0x38(%rbp), %rcx
movslq %r12d, %rax
movb $0x0, (%r14,%rax)
testb $0x1, -0x5c(%rbp)
je 0x126b7
movl %ecx, %eax
shlq $0x4, %rax
movq -0x40(%rbp), %rdi
addq %rax, %rdi
subl %ecx, %ebx
movzbl -0x30(%rbp), %edx
movl %ebx, %esi
movq %r14, %rcx
movl %r12d, %r8d
callq 0x123a9
movq %r14, %rdi
movq %rax, %r14
callq 0x1572b
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq