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

        if(executebool(body))
        {
            if(r.length()) r.add(' ');
            r.put(quotestart, quoteend-quotestart);
        }
    }
    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 $0x68, %rsp
movq %rdx, -0x78(%rbp)
cmpl $0x4, (%rdi)
jne 0xb71f
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
leaq -0x68(%rbp), %rdi
movq %rsi, (%rdi)
leaq -0x60(%rbp), %rsi
leaq -0x58(%rbp), %rdx
leaq -0x50(%rbp), %rcx
leaq -0x48(%rbp), %r8
callq 0xa23b
testb %al, %al
je 0xb6ab
movb %al, -0x29(%rbp)
leaq -0x90(%rbp), %r14
movq %rbx, -0x70(%rbp)
movq -0x60(%rbp), %r15
movq -0x58(%rbp), %r13
subq %r15, %r13
incq %r13
movq %r13, %rdi
callq 0x152b1
movq %rax, %r12
movq %r15, %rdi
callq 0x2080
movq %r14, %rbx
movq %rax, %r14
incq %r14
cmpq %r13, %r14
cmovaeq %r13, %r14
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2130
movb $0x0, -0x1(%r12,%r14)
movq %rbx, %r14
movq -0x70(%rbp), %rbx
movq 0x28(%rbx), %rax
cmpq %r14, %rax
je 0xb5aa
movq 0x20(%rbx), %rcx
movq %rcx, -0x90(%rbp)
movl 0x10(%rbx), %ecx
movl %ecx, -0x88(%rbp)
movq %rax, -0x80(%rbp)
movq %r14, 0x28(%rbx)
movl $0x3, 0x10(%rbx)
movq %r12, 0x20(%rbx)
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0xb5a4
addl $0xffffff00, (%rax)     # imm = 0xFFFFFF00
movq 0x18(%rbx), %rdi
cmpl $0xff, (%rdi)
jg 0xb59c
callq 0x152d7
movq $0x0, 0x18(%rbx)
andb $-0x21, 0x38(%rbx)
jmp 0xb5f3
cmpl $0x3, 0x10(%rbx)
jne 0xb5c0
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0xb5c7
callq 0x152d7
jmp 0xb5c7
movl $0x3, 0x10(%rbx)
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0xb5ef
addl $0xffffff00, (%rax)     # imm = 0xFFFFFF00
movq 0x18(%rbx), %rdi
cmpl $0xff, (%rdi)
jg 0xb5e7
callq 0x152d7
movq $0x0, 0x18(%rbx)
movq %r12, 0x20(%rbx)
movq -0x78(%rbp), %rdi
callq 0x8f8b
testb %al, %al
je 0xb629
cmpl $0x0, -0x34(%rbp)
je 0xb617
movb $0x20, -0x2a(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x2a(%rbp), %rsi
callq 0x12760
movq -0x50(%rbp), %rsi
movl -0x48(%rbp), %edx
subl %esi, %edx
leaq -0x40(%rbp), %rdi
callq 0x1279e
leaq -0x68(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0x58(%rbp), %rdx
leaq -0x50(%rbp), %rcx
leaq -0x48(%rbp), %r8
callq 0xa23b
testb %al, %al
jne 0xb500
cmpb $0x0, -0x29(%rbp)
je 0xb6ab
movq 0x28(%rbx), %r14
testq %r14, %r14
je 0xb6ab
cmpl $0x3, 0x10(%rbx)
jne 0xb66d
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0xb66d
callq 0x152d7
movl 0x8(%r14), %eax
movl %eax, 0x10(%rbx)
movq (%r14), %rax
movq %rax, 0x20(%rbx)
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0xb6a3
addl $0xffffff00, (%rax)     # imm = 0xFFFFFF00
movq 0x18(%rbx), %rdi
cmpl $0xff, (%rdi)
jg 0xb69b
callq 0x152d7
movq $0x0, 0x18(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x28(%rbx)
leaq -0x68(%rbp), %rsi
movb $0x0, (%rsi)
leaq -0x40(%rbp), %rdi
callq 0x12760
movq 0x12b46(%rip), %r13     # 0x1e208
movq -0x40(%rbp), %rbx
movslq -0x34(%rbp), %r15
movq %r15, %rdi
callq 0x152b1
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 0xb71f
callq 0x152d7
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb734
jmp 0xb734
jmp 0xb734
movq %rax, %rbx
movl $0x0, -0x34(%rbp)
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0xb74c
callq 0x152d7
movq %rbx, %rdi
callq 0x23a0