// File: /workspace/github_cpp_makefile_star2_O2/Fohlen[P]cubescript-standalone/command.cpp
// Function: parselist(char const*&, char const*&, char const*&, char const*&, char const*&)
static bool parselist(const char *&s, const char *&start = liststart, const char *&end = listend, const char *&quotestart = listquotestart, const char *&quoteend = listquoteend)
{
    skiplist(s);
    switch(*s)
    {
        case '"': quotestart = s++; start = s; s = parsestring(s); end = s; if(*s == '"') s++; quoteend = s; break;
        case '(': case '[':
            quotestart = s;
            start = s+1;
            for(int braktype = *s++, brak = 1;;)
            {
                s += strcspn(s, "\"/;()[]\0");
                int c = *s++;
                switch(c)
                {
                    case '\0': s--; quoteend = end = s; return true;
                    case '"': s = parsestring(s); if(*s == '"') s++; break;
                    case '/': if(*s == '/') s += strcspn(s, "\n\0"); break;
                    case '(': case '[': if(c == braktype) brak++; break;
                    case ')': if(braktype == '(' && --brak <= 0) goto endblock; break;
                    case ']': if(braktype == '[' && --brak <= 0) goto endblock; break;
                } 
            }
        endblock:
            end = s-1;
            quoteend = s;
            break;
        case '\0': case ')': case ']': return false;
        default: quotestart = start = s; s = parseword(s); quoteend = end = s; break;
    }
    skiplist(s);
    if(*s == ';') s++;
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r12
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbx
callq 0x8146
movq (%rbx), %rcx
movzbl (%rcx), %edx
xorl %eax, %eax
testl %edx, %edx
je 0x7d58
cmpl $0x5d, %edx
je 0x7d58
cmpl $0x28, %edx
je 0x7c04
cmpl $0x29, %edx
je 0x7d58
cmpl $0x5b, %edx
je 0x7c04
cmpl $0x22, %edx
jne 0x7d17
leaq 0x1(%rcx), %rax
movq %rax, (%rbx)
movq %rcx, (%r15)
movq (%rbx), %rdi
movq %rdi, (%r14)
callq 0x47ed
movq %rax, (%rbx)
movq %rax, (%r13)
movq (%rbx), %rax
cmpb $0x22, (%rax)
jne 0x7d3c
incq %rax
movq %rax, (%rbx)
jmp 0x7d3c
movq %r13, -0x30(%rbp)
movq %r12, -0x38(%rbp)
movq %rcx, (%r15)
movq (%rbx), %rax
incq %rax
movq %rax, (%r14)
movq (%rbx), %rax
leaq 0x1(%rax), %r14
movq %r14, (%rbx)
movb (%rax), %r13b
pushq $0x1
popq %r12
movq %r14, %rdi
leaq 0x9b18(%rip), %rsi      # 0x1174b
callq 0x2030
leaq (%r14,%rax), %r15
incq %r15
movq %r15, (%rbx)
movzbl -0x1(%r15), %edx
cmpl $0x22, %edx
je 0x7ce0
cmpl $0x28, %edx
je 0x7c7b
movq %r14, %rcx
addq %rax, %rcx
cmpl $0x29, %edx
je 0x7c8b
cmpl $0x2f, %edx
je 0x7c96
cmpl $0x5b, %edx
je 0x7c7b
cmpl $0x5d, %edx
je 0x7cbc
movq %r15, %r14
testl %edx, %edx
jne 0x7c29
jmp 0x7d02
xorl %eax, %eax
cmpb %r13b, %dl
sete %al
addl %eax, %r12d
movq %r15, %r14
jmp 0x7c29
movq %r15, %r14
cmpb $0x28, %r13b
jne 0x7c29
jmp 0x7cc9
cmpb $0x2f, (%r15)
movq %r15, %r14
jne 0x7c29
movq %r15, %rdi
leaq 0x9a84(%rip), %rsi      # 0x1172d
callq 0x2030
movq %rax, %r14
addq %r15, %r14
movq %r14, (%rbx)
jmp 0x7c29
movq %r15, %r14
cmpb $0x5b, %r13b
jne 0x7c29
leal -0x1(%r12), %eax
movq %r15, %r14
cmpl $0x2, %r12d
movl %eax, %r12d
jge 0x7c29
jmp 0x7d2e
movq %r15, %rdi
callq 0x47ed
movq %rax, %r14
movq %rax, (%rbx)
cmpb $0x22, (%rax)
jne 0x7c29
incq %r14
movq %r14, (%rbx)
jmp 0x7c29
movq %rcx, (%rbx)
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movb $0x1, %al
jmp 0x7d58
movq %rcx, (%r14)
movq %rcx, (%r15)
movq (%rbx), %rdi
callq 0xbb83
movq %rax, (%rbx)
movq %rax, (%r13)
jmp 0x7d3c
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq (%rbx), %rax
movq -0x38(%rbp), %r12
movq %rax, (%r12)
movq %rbx, %rdi
callq 0x8146
movq (%rbx), %rcx
movb $0x1, %al
cmpb $0x3b, (%rcx)
jne 0x7d58
incq %rcx
movq %rcx, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq