// File: /workspace/github_cpp_makefile_star2_O3/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 0xbd3b
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 0xa8fd
testb %al, %al
je 0xbcc7
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 0x15705
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 0xbbc6
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 0xbbc0
addl $0xffffff00, (%rax)     # imm = 0xFFFFFF00
movq 0x18(%rbx), %rdi
cmpl $0xff, (%rdi)
jg 0xbbb8
callq 0x1572b
movq $0x0, 0x18(%rbx)
andb $-0x21, 0x38(%rbx)
jmp 0xbc0f
cmpl $0x3, 0x10(%rbx)
jne 0xbbdc
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0xbbe3
callq 0x1572b
jmp 0xbbe3
movl $0x3, 0x10(%rbx)
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0xbc0b
addl $0xffffff00, (%rax)     # imm = 0xFFFFFF00
movq 0x18(%rbx), %rdi
cmpl $0xff, (%rdi)
jg 0xbc03
callq 0x1572b
movq $0x0, 0x18(%rbx)
movq %r12, 0x20(%rbx)
movq -0x78(%rbp), %rdi
callq 0x966f
testb %al, %al
je 0xbc45
cmpl $0x0, -0x34(%rbp)
je 0xbc33
movb $0x20, -0x2a(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x2a(%rbp), %rsi
callq 0x12ca0
movq -0x50(%rbp), %rsi
movl -0x48(%rbp), %edx
subl %esi, %edx
leaq -0x40(%rbp), %rdi
callq 0x12ce0
leaq -0x68(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0x58(%rbp), %rdx
leaq -0x50(%rbp), %rcx
leaq -0x48(%rbp), %r8
callq 0xa8fd
testb %al, %al
jne 0xbb1c
cmpb $0x0, -0x29(%rbp)
je 0xbcc7
movq 0x28(%rbx), %r14
testq %r14, %r14
je 0xbcc7
cmpl $0x3, 0x10(%rbx)
jne 0xbc89
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0xbc89
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 0xbcbf
addl $0xffffff00, (%rax)     # imm = 0xFFFFFF00
movq 0x18(%rbx), %rdi
cmpl $0xff, (%rdi)
jg 0xbcb7
callq 0x1572b
movq $0x0, 0x18(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x28(%rbx)
leaq -0x68(%rbp), %rsi
movb $0x0, (%rsi)
leaq -0x40(%rbp), %rdi
callq 0x12ca0
movq 0x1352a(%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 0xbd3b
callq 0x1572b
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xbd50
jmp 0xbd50
jmp 0xbd50
movq %rax, %rbx
movl $0x0, -0x34(%rbp)
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0xbd68
callq 0x1572b
movq %rbx, %rdi
callq 0x23a0