// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/utils/processtab/tabparser.c
// Function: parseCommand
ASTCommand *
parseCommand(FILE *in)
    {
    ASTCommand *c = newASTCommand();
    char ch;
    ASTAttribute *a = 0;
    ASTStave *s = 0;
    char *comment = 0;
    
    while ((ch = peekChar(in)) && ch != EOF && ch != '\n')
        {
    //printf("[parseCommand] read character: '%c'\n", ch);   
        if (ch == '|')
            {  
            s = parseStave(in);
            if (s == 0) return 0;
            
            c->commandType = StaveCommand;
            c->un.stave = s;
            }
        else if (ch == '#')
            {  
            comment = parseComment(in);
            if (comment == 0) return 0;
            
            c->commandType = CommentCommand;
            c->un.comment = comment;
            }
        else if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || ch == '_')
            {
            a = parseAttribute(in);  
            if (a == 0) return 0;
            
            c->commandType = AttributeCommand;
            c->un.attribute = a;
            break;
            }   
        else if (isspace(ch))
            {
            skipWhiteSpace(in);
            }
        else
            {
            Fatal("unexpected character '%c' reading beginning of line\n");
            return 0;
            }                 
        }
//printf("[parseCommand] consumed character '%s'\n", ch == EOF ? "EOF" : ch == '\n' ? "\\n" : "unknown char");
    
    return c;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
callq 0x3270
movq %rax, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x34c0
movb %al, -0x19(%rbp)
movsbl %al, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x39(%rbp)
je 0x3551
movsbl -0x19(%rbp), %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
movb %al, -0x39(%rbp)
je 0x3551
movsbl -0x19(%rbp), %eax
cmpl $0xa, %eax
setne %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x355d
jmp 0x3695
movsbl -0x19(%rbp), %eax
cmpl $0x7c, %eax
jne 0x35a2
movq -0x10(%rbp), %rdi
callq 0x3750
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x3587
movq $0x0, -0x8(%rbp)
jmp 0x369d
movq -0x18(%rbp), %rax
movl $0x2, (%rax)
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x3690
movsbl -0x19(%rbp), %eax
cmpl $0x23, %eax
jne 0x35e7
movq -0x10(%rbp), %rdi
callq 0x39f0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x35cc
movq $0x0, -0x8(%rbp)
jmp 0x369d
movq -0x18(%rbp), %rax
movl $0x3, (%rax)
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x368e
movsbl -0x19(%rbp), %eax
cmpl $0x61, %eax
jl 0x35f9
movsbl -0x19(%rbp), %eax
cmpl $0x7a, %eax
jle 0x3614
movsbl -0x19(%rbp), %eax
cmpl $0x41, %eax
jl 0x360b
movsbl -0x19(%rbp), %eax
cmpl $0x5a, %eax
jle 0x3614
movsbl -0x19(%rbp), %eax
cmpl $0x5f, %eax
jne 0x364a
movq -0x10(%rbp), %rdi
callq 0x3ad0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x3632
movq $0x0, -0x8(%rbp)
jmp 0x369d
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x3695
callq 0x1190
movq (%rax), %rax
movsbl -0x19(%rbp), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x3672
movq -0x10(%rbp), %rdi
callq 0x3d60
jmp 0x368a
leaq 0x479a(%rip), %rdi      # 0x7e13
movb $0x0, %al
callq 0x63e0
movq $0x0, -0x8(%rbp)
jmp 0x369d
jmp 0x368c
jmp 0x368e
jmp 0x3690
jmp 0x351d
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)