// File: /workspace/github_c_makefile_star2_O0/msteveb[P]autosetup/./jimsh0.c
// Function: JimParseScript
static int JimParseScript(struct JimParserCtx *pc)
{
    while (1) {
        if (!pc->len) {
            pc->tstart = pc->p;
            pc->tend = pc->p - 1;
            pc->tline = pc->linenr;
            pc->tt = JIM_TT_EOL;
            if (pc->inquote) {
                pc->missing.ch = '"';
            }
            pc->eof = 1;
            return JIM_OK;
        }
        switch (*(pc->p)) {
            case '\\':
                if (*(pc->p + 1) == '\n' && !pc->inquote) {
                    return JimParseSep(pc);
                }
                pc->comment = 0;
                return JimParseStr(pc);
            case ' ':
            case '\t':
            case '\r':
            case '\f':
                if (!pc->inquote)
                    return JimParseSep(pc);
                pc->comment = 0;
                return JimParseStr(pc);
            case '\n':
            case ';':
                pc->comment = 1;
                if (!pc->inquote)
                    return JimParseEol(pc);
                return JimParseStr(pc);
            case '[':
                pc->comment = 0;
                return JimParseCmd(pc);
            case '$':
                pc->comment = 0;
                if (JimParseVar(pc) == JIM_ERR) {

                    pc->tstart = pc->tend = pc->p++;
                    pc->len--;
                    pc->tt = JIM_TT_ESC;
                }
                return JIM_OK;
            case '#':
                if (pc->comment) {
                    JimParseComment(pc);
                    continue;
                }
                return JimParseStr(pc);
            default:
                pc->comment = 0;
                return JimParseStr(pc);
        }
        return JIM_OK;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x1d93d
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $-0x1, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x10(%rbp), %rax
movl $0x7, 0x24(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x2c(%rax)
je 0x1d926
movq -0x10(%rbp), %rax
movl $0x22, 0x34(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x28(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x1dad6
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
addl $-0x9, %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x53, %eax
ja 0x1dabf
movq -0x18(%rbp), %rax
leaq 0x18998(%rip), %rcx     # 0x362fc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl 0x1(%rax), %eax
cmpl $0xa, %eax
jne 0x1d998
movq -0x10(%rbp), %rax
cmpl $0x0, 0x2c(%rax)
jne 0x1d998
movq -0x10(%rbp), %rdi
callq 0x1df10
movl %eax, -0x4(%rbp)
jmp 0x1dad6
movq -0x10(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x10(%rbp), %rdi
callq 0x1e030
movl %eax, -0x4(%rbp)
jmp 0x1dad6
movq -0x10(%rbp), %rax
cmpl $0x0, 0x2c(%rax)
jne 0x1d9cf
movq -0x10(%rbp), %rdi
callq 0x1df10
movl %eax, -0x4(%rbp)
jmp 0x1dad6
movq -0x10(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x10(%rbp), %rdi
callq 0x1e030
movl %eax, -0x4(%rbp)
jmp 0x1dad6
movq -0x10(%rbp), %rax
movl $0x1, 0x30(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x2c(%rax)
jne 0x1da11
movq -0x10(%rbp), %rdi
callq 0x1e3a0
movl %eax, -0x4(%rbp)
jmp 0x1dad6
movq -0x10(%rbp), %rdi
callq 0x1e030
movl %eax, -0x4(%rbp)
jmp 0x1dad6
movq -0x10(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x10(%rbp), %rdi
callq 0x1e470
movl %eax, -0x4(%rbp)
jmp 0x1dad6
movq -0x10(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x10(%rbp), %rdi
callq 0x1e4c0
cmpl $0x1, %eax
jne 0x1da90
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, (%rax)
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl $0x2, 0x24(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x1dad6
movq -0x10(%rbp), %rax
cmpl $0x0, 0x30(%rax)
je 0x1dab1
movq -0x10(%rbp), %rdi
callq 0x1e860
jmp 0x1d8cc
movq -0x10(%rbp), %rdi
callq 0x1e030
movl %eax, -0x4(%rbp)
jmp 0x1dad6
movq -0x10(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x10(%rbp), %rdi
callq 0x1e030
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop