// File: /workspace/github_cpp_makefile_star2_O3/Fohlen[P]cubescript-standalone/command.cpp
// Function: loopconc(ident*, int, unsigned int*, bool)
char *loopconc(ident *id, int n, uint *body, bool space)
{
    identstack stack;
    vector<char> s;
    loopi(n)
    {
        setiter(*id, i, stack);
        tagval v;
        executeret(body, v);
        const char *vstr = v.getstr();
        int len = strlen(vstr);
        if(space && i) s.add(' ');
        s.put(vstr, len);
        freearg(v);
    }
    if(n > 0) poparg(*id);
    s.add('\0');
    return newstring(s.getbuf(), s.length()-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, -0x68(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
testl %esi, %esi
jle 0xa45d
movl %esi, %r15d
movq %rdi, %rbx
xorb $0x1, %cl
movl %ecx, -0x5c(%rbp)
xorl %r14d, %r14d
testl %r14d, %r14d
je 0xa296
movl 0x10(%rbx), %eax
cmpl $0x1, %eax
je 0xa290
cmpl $0x3, %eax
jne 0xa261
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0xa261
callq 0x1572b
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0xa289
addl $0xffffff00, (%rax)     # imm = 0xFFFFFF00
movq 0x18(%rbx), %rdi
cmpl $0xff, (%rdi)
jg 0xa281
callq 0x1572b
movq $0x0, 0x18(%rbx)
movl $0x1, 0x10(%rbx)
movl %r14d, 0x20(%rbx)
jmp 0xa2ef
movq 0x20(%rbx), %rax
movq %rax, -0x80(%rbp)
movl 0x10(%rbx), %eax
movl %eax, -0x78(%rbp)
movq 0x28(%rbx), %rax
movq %rax, -0x70(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, 0x28(%rbx)
movl $0x1, 0x10(%rbx)
movq $0x0, 0x20(%rbx)
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0xa2eb
addl $0xffffff00, (%rax)     # imm = 0xFFFFFF00
movq 0x18(%rbx), %rdi
cmpl $0xff, (%rdi)
jg 0xa2e3
callq 0x1572b
movq $0x0, 0x18(%rbx)
andb $-0x21, 0x38(%rbx)
movq -0x68(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x52fc
movl -0x48(%rbp), %eax
decl %eax
leaq 0xdf67(%rip), %r13      # 0x1826f
cmpl $0x5, %eax
ja 0xa394
leaq 0xd4e8(%rip), %rcx      # 0x17800
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
leaq 0xdf49(%rip), %r13      # 0x1826f
jmpq *%rax
movq -0x50(%rbp), %r13
jmp 0xa394
movss -0x50(%rbp), %xmm0
callq 0x4d4c
movq %rax, %r13
jmp 0xa394
movl -0x50(%rbp), %edx
movl 0x1544e(%rip), %eax     # 0x1f794
incl %eax
andl $0x3, %eax
movl %eax, 0x15443(%rip)     # 0x1f794
movl %eax, %ecx
shll $0x8, %ecx
leal (%rcx,%rax,4), %eax
leaq 0x15440(%rip), %rcx     # 0x1f7a0
addq %rcx, %rax
movq %rax, -0x58(%rbp)
leaq -0x58(%rbp), %rdi
leaq 0xdb2f(%rip), %rsi      # 0x17ea1
xorl %eax, %eax
callq 0x12e1e
movl 0x15415(%rip), %eax     # 0x1f794
movq %rax, %rcx
shlq $0x8, %rcx
leaq (%rcx,%rax,4), %r13
leaq 0x1540f(%rip), %rax     # 0x1f7a0
addq %rax, %r13
movq %r13, %rdi
callq 0x2080
movq %rax, %r12
testl %r14d, %r14d
sete %al
orb -0x5c(%rbp), %al
jne 0xa3bb
movb $0x20, -0x58(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x12ca0
leaq -0x40(%rbp), %rdi
movq %r13, %rsi
movl %r12d, %edx
callq 0x12ce0
movq -0x50(%rbp), %rdi
movl -0x48(%rbp), %eax
cmpl $0x5, %eax
je 0xa3e2
cmpl $0x3, %eax
jne 0xa3f1
testq %rdi, %rdi
jne 0xa3ec
jmp 0xa3f1
cmpl $0x0, -0x4(%rdi)
jne 0xa3f1
addq $-0x4, %rdi
callq 0x1572b
incl %r14d
cmpl %r14d, %r15d
jne 0xa241
testl %r15d, %r15d
jle 0xa45d
movq 0x28(%rbx), %r14
testq %r14, %r14
je 0xa45d
cmpl $0x3, 0x10(%rbx)
jne 0xa41f
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0xa41f
callq 0x1572b
movl 0x8(%r14), %eax
movl %eax, 0x10(%rbx)
movq (%r14), %rax
movq %rax, 0x20(%rbx)
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0xa455
addl $0xffffff00, (%rax)     # imm = 0xFFFFFF00
movq 0x18(%rbx), %rdi
cmpl $0xff, (%rdi)
jg 0xa44d
callq 0x1572b
movq $0x0, 0x18(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x28(%rbx)
leaq -0x50(%rbp), %rsi
movb $0x0, (%rsi)
leaq -0x40(%rbp), %rdi
callq 0x12ca0
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 $0x0, -0x34(%rbp)
testq %rbx, %rbx
je 0xa4bd
movq %rbx, %rdi
callq 0x1572b
movq %r14, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa4d9
jmp 0xa4d9
jmp 0xa4d9
jmp 0xa4d9
jmp 0xa4d9
movq %rax, %rbx
movl $0x0, -0x34(%rbp)
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0xa4f1
callq 0x1572b
movq %rbx, %rdi
callq 0x23a0
nop