// File: /workspace/github_cpp_makefile_star2_O1/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 $0x48, %rsp
movl %r8d, %r12d
movq %rcx, %rbx
movl %edx, -0x34(%rbp)
testl %esi, %esi
setg %r13b
movq %rdi, -0x40(%rbp)
movl %esi, -0x64(%rbp)
jle 0x12017
movq %rbx, -0x58(%rbp)
movl %esi, %ebx
movl $0x2, %r15d
xorl %r14d, %r14d
movl %r12d, -0x30(%rbp)
xorl %edx, %edx
movq %rbx, -0x50(%rbp)
movl (%rdi,%r15,4), %eax
decl %eax
cmpl $0x5, %eax
ja 0x11fe4
leaq 0x4bd1(%rip), %rcx      # 0x16aa8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x208, %edx            # imm = 0x208
jg 0x1200e
movslq %edx, %r13
leaq 0xcf3a(%rip), %rax      # 0x1ee30
addq %rax, %r13
movl %edx, -0x44(%rbp)
movl -0x8(%rdi,%r15,4), %edx
movq %r13, -0x60(%rbp)
leaq -0x60(%rbp), %rdi
leaq 0x4e31(%rip), %rsi      # 0x16d41
xorl %eax, %eax
callq 0x128d0
movq %r13, %rdi
callq 0x2080
movl -0x44(%rbp), %edx
jmp 0x11fb4
movq -0x8(%rdi,%r15,4), %rdi
movl %edx, %ebx
callq 0x2080
movl %ebx, %edx
movq -0x50(%rbp), %rbx
movq -0x40(%rbp), %rdi
leaq 0xce7c(%rip), %rcx      # 0x1edc0
movl %eax, -0x2(%r15,%rcx)
addl %eax, -0x30(%rbp)
jmp 0x11ff4
cmpl $0x208, %edx            # imm = 0x208
jg 0x1200e
movslq %edx, %r13
leaq 0xcec9(%rip), %rax      # 0x1ee30
addq %rax, %r13
movss -0x8(%rdi,%r15,4), %xmm0
cvttps2dq %xmm0, %xmm1
cvtdq2ps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
leaq 0x517f(%rip), %rsi      # 0x17101
leaq 0x517d(%rip), %rax      # 0x17106
cmovneq %rax, %rsi
movq %r13, -0x60(%rbp)
cmovpq %rax, %rsi
cvtss2sd %xmm0, %xmm0
leaq -0x60(%rbp), %rdi
movb $0x1, %al
movl %edx, %ebx
callq 0x128d0
movq %r13, %rdi
callq 0x2080
movl %ebx, %edx
movq -0x50(%rbp), %rbx
movq -0x40(%rbp), %rdi
leaq 0xce01(%rip), %rcx      # 0x1edc0
movl %eax, -0x2(%r15,%rcx)
addl %eax, %edx
jmp 0x11ff4
movq -0x8(%rdi,%r15,4), %rax
movl -0x4(%rax), %eax
shrl $0x8, %eax
leaq 0xcde6(%rip), %rcx      # 0x1edc0
movl %eax, -0x2(%r15,%rcx)
addl %eax, -0x30(%rbp)
jmp 0x11ff4
leaq 0xcdd5(%rip), %rax      # 0x1edc0
movl $0x0, -0x2(%r15,%rax)
incq %r14
cmpq %rbx, %r14
setb %r13b
addq $0x4, %r15
cmpq %r14, %rbx
jne 0x11ec1
movl %ebx, %r14d
movq -0x58(%rbp), %rbx
movl -0x30(%rbp), %esi
jmp 0x1201f
xorl %edx, %edx
xorl %r14d, %r14d
movl %r12d, %esi
cmpb $0x0, -0x34(%rbp)
je 0x12038
cmpq $0x1, %rbx
movl %r14d, %eax
sbbl $0x0, %eax
xorl %ecx, %ecx
testl %eax, %eax
cmovgl %eax, %ecx
addl %ecx, %esi
addl %edx, %esi
movslq %esi, %rdi
incq %rdi
callq 0x152b1
testq %rbx, %rbx
movq %rax, -0x30(%rbp)
je 0x12082
movslq %r12d, %r15
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2130
movq -0x30(%rbp), %rax
testl %r14d, %r14d
sete %dl
movl -0x34(%rbp), %ecx
xorb $0x1, %cl
orb %dl, %cl
movq -0x40(%rbp), %rcx
jne 0x12089
leal 0x1(%r15), %r12d
movb $0x20, (%rax,%r15)
jmp 0x12089
xorl %r12d, %r12d
movq -0x40(%rbp), %rcx
testl %r14d, %r14d
je 0x12144
movb %r13b, -0x44(%rbp)
leal -0x1(%r14), %edx
shlq $0x2, %rdx
movq %rdx, -0x50(%rbp)
xorl %r13d, %r13d
leaq 0xcd14(%rip), %r8       # 0x1edc0
xorl %ebx, %ebx
movl 0x8(%rcx,%r13,4), %edx
decl %edx
movslq %r12d, %r15
cmpl $0x1, %edx
ja 0x120ec
leaq (%rax,%r15), %rdi
movslq %ebx, %rbx
leaq 0xcd65(%rip), %rax      # 0x1ee30
leaq (%rax,%rbx), %rsi
movslq (%r13,%r8), %r12
movq %r12, %rdx
callq 0x2130
leaq 0xccdd(%rip), %r8       # 0x1edc0
movq -0x40(%rbp), %rcx
addl %r12d, %ebx
jmp 0x1210e
movslq (%r13,%r8), %rdx
testq %rdx, %rdx
je 0x1210e
leaq (%rax,%r15), %rdi
movq (%rcx,%r13,4), %rsi
callq 0x2130
leaq 0xccb6(%rip), %r8       # 0x1edc0
movq -0x40(%rbp), %rcx
movslq (%r13,%r8), %r12
addq %r15, %r12
cmpq %r13, -0x50(%rbp)
je 0x1213c
cmpb $0x0, -0x34(%rbp)
movq -0x30(%rbp), %rax
je 0x12133
movb $0x20, (%rax,%r12)
leal 0x1(%r12), %edx
movl %edx, %r12d
addq $0x4, %r13
jmp 0x120ae
movb -0x44(%rbp), %r13b
movq -0x30(%rbp), %rax
movslq %r12d, %rdx
movb $0x0, (%rax,%rdx)
testb $0x1, %r13b
je 0x12184
movl %r14d, %edx
shlq $0x4, %rdx
addq %rdx, %rcx
movl -0x64(%rbp), %esi
subl %r14d, %esi
movzbl -0x34(%rbp), %edx
movq %rcx, %rdi
movq %rax, %rcx
movq %rax, %rbx
movl %r12d, %r8d
callq 0x11e7b
movq %rax, %r14
movq %rbx, %rdi
callq 0x152d7
movq %r14, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq