// File: /workspace/github_cpp_makefile_star2_O3/Fohlen[P]cubescript-standalone/command.cpp
// Function: looplistconc(ident*, char const*, unsigned int const*, bool)
void looplistconc(ident *id, const char *list, const uint *body, bool space)
{
    if(id->type!=ID_ALIAS) return;
    identstack stack;
    vector<char> r;
    int n = 0;
    for(const char *s = list, *start, *end; parselist(s, start, end); n++)
    {
        char *val = newstring(start, end-start);
        setiter(*id, val, stack);

        if(n && space) r.add(' ');

        tagval v;
        executeret(body, v);
        const char *vstr = v.getstr();
        int len = strlen(vstr);
        r.put(vstr, len);
        freearg(v);
    }
    if(n) poparg(*id);
    r.add('\0');
    commandret->setstr(newstring(r.getbuf(), r.length()-1));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %ecx, -0x54(%rbp)
movq %rdx, -0x70(%rbp)
cmpl $0x4, (%rdi)
jne 0xba6a
movq %rdi, %r15
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
leaq -0x78(%rbp), %rdi
movq %rsi, (%rdi)
leaq 0x14482(%rip), %rcx     # 0x1fbc0
leaq 0x14483(%rip), %r8      # 0x1fbc8
leaq -0x68(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0xa8fd
testb %al, %al
je 0xb9f6
movb %al, -0x29(%rbp)
xorl %ebx, %ebx
movl %ebx, -0x30(%rbp)
movq %r15, %r13
movq -0x68(%rbp), %r12
movq -0x60(%rbp), %r14
subq %r12, %r14
incq %r14
movq %r14, %rdi
callq 0x15705
movq %rax, %rbx
movq %r12, %rdi
callq 0x2080
movq %rax, %r15
incq %r15
cmpq %r14, %r15
cmovaeq %r14, %r15
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x2130
movb $0x0, -0x1(%rbx,%r15)
movq %r13, %r15
movq 0x28(%r13), %rax
leaq -0x98(%rbp), %rdx
cmpq %rdx, %rax
movq %rbx, %r14
je 0xb81b
movq 0x20(%r15), %rcx
movq %rcx, -0x98(%rbp)
movl 0x10(%r15), %ecx
movl %ecx, -0x90(%rbp)
movq %rax, -0x88(%rbp)
movq %rdx, 0x28(%r15)
movl $0x3, 0x10(%r15)
movq %r14, 0x20(%r15)
movq 0x18(%r15), %rax
testq %rax, %rax
movl -0x30(%rbp), %ebx
je 0xb814
addl $0xffffff00, (%rax)     # imm = 0xFFFFFF00
movq 0x18(%r15), %rdi
cmpl $0xff, (%rdi)
jg 0xb80c
callq 0x1572b
movq $0x0, 0x18(%r15)
andb $-0x21, 0x38(%r15)
jmp 0xb86c
cmpl $0x3, 0x10(%r15)
jne 0xb835
movq 0x20(%r15), %rdi
testq %rdi, %rdi
movl -0x30(%rbp), %ebx
je 0xb840
callq 0x1572b
jmp 0xb840
movl $0x3, 0x10(%r15)
movl -0x30(%rbp), %ebx
movq 0x18(%r15), %rax
testq %rax, %rax
je 0xb868
addl $0xffffff00, (%rax)     # imm = 0xFFFFFF00
movq 0x18(%r15), %rdi
cmpl $0xff, (%rdi)
jg 0xb860
callq 0x1572b
movq $0x0, 0x18(%r15)
movq %r14, 0x20(%r15)
addl $-0x1, %ebx
setb %al
andb -0x54(%rbp), %al
cmpb $0x1, %al
jne 0xb88a
movb $0x20, -0x50(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x12ca0
movq -0x70(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x52fc
movl -0x48(%rbp), %eax
decl %eax
leaq 0xc9cc(%rip), %r13      # 0x1826f
cmpl $0x5, %eax
ja 0xb92f
leaq 0xbfed(%rip), %rcx      # 0x178a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
leaq 0xc9ae(%rip), %r13      # 0x1826f
jmpq *%rax
movq -0x50(%rbp), %r13
jmp 0xb92f
movss -0x50(%rbp), %xmm0
callq 0x4d4c
movq %rax, %r13
jmp 0xb92f
movl -0x50(%rbp), %edx
movl 0x13eb3(%rip), %eax     # 0x1f794
incl %eax
andl $0x3, %eax
movl %eax, 0x13ea8(%rip)     # 0x1f794
movl %eax, %ecx
shll $0x8, %ecx
leal (%rcx,%rax,4), %eax
leaq 0x13ea5(%rip), %rcx     # 0x1f7a0
addq %rcx, %rax
movq %rax, -0x80(%rbp)
leaq -0x80(%rbp), %rdi
leaq 0xc594(%rip), %rsi      # 0x17ea1
xorl %eax, %eax
callq 0x12e1e
movl 0x13e7a(%rip), %eax     # 0x1f794
movq %rax, %rcx
shlq $0x8, %rcx
leaq (%rcx,%rax,4), %r13
leaq 0x13e74(%rip), %rax     # 0x1f7a0
addq %rax, %r13
movq %r13, %rdi
callq 0x2080
leaq -0x40(%rbp), %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0x12ce0
movq -0x50(%rbp), %rdi
movl -0x48(%rbp), %eax
cmpl $0x5, %eax
je 0xb95d
cmpl $0x3, %eax
jne 0xb96c
testq %rdi, %rdi
jne 0xb967
jmp 0xb96c
cmpl $0x0, -0x4(%rdi)
jne 0xb96c
addq $-0x4, %rdi
callq 0x1572b
leaq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rsi
leaq -0x60(%rbp), %rdx
leaq 0x14241(%rip), %rcx     # 0x1fbc0
leaq 0x14242(%rip), %r8      # 0x1fbc8
callq 0xa8fd
testb %al, %al
jne 0xb75f
cmpb $0x0, -0x29(%rbp)
je 0xb9f6
movq 0x28(%r15), %r14
testq %r14, %r14
je 0xb9f6
cmpl $0x3, 0x10(%r15)
jne 0xb9b7
movq 0x20(%r15), %rdi
testq %rdi, %rdi
je 0xb9b7
callq 0x1572b
movl 0x8(%r14), %eax
movl %eax, 0x10(%r15)
movq (%r14), %rax
movq %rax, 0x20(%r15)
movq 0x18(%r15), %rax
testq %rax, %rax
je 0xb9ee
addl $0xffffff00, (%rax)     # imm = 0xFFFFFF00
movq 0x18(%r15), %rdi
cmpl $0xff, (%rdi)
jg 0xb9e6
callq 0x1572b
movq $0x0, 0x18(%r15)
movq 0x10(%r14), %rax
movq %rax, 0x28(%r15)
leaq -0x50(%rbp), %rsi
movb $0x0, (%rsi)
leaq -0x40(%rbp), %rdi
callq 0x12ca0
movq 0x137fb(%rip), %r13     # 0x1f208
movq -0x40(%rbp), %rbx
movslq -0x34(%rbp), %r15
movq %r15, %rdi
callq 0x15705
movq %rax, %r14
movq %rbx, %rdi
callq 0x2080
movq %rax, %r12
incq %r12
cmpq %r15, %r12
cmovaeq %r15, %r12
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x2130
movb $0x0, -0x1(%r14,%r12)
movl $0x3, 0x8(%r13)
movq %r14, (%r13)
movl $0x0, -0x34(%rbp)
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0xba6a
callq 0x1572b
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xba85
jmp 0xba85
jmp 0xba85
jmp 0xba85
jmp 0xba85
jmp 0xba85
movq %rax, %rbx
movl $0x0, -0x34(%rbp)
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0xba9d
callq 0x1572b
movq %rbx, %rdi
callq 0x23a0
nop