// File: /workspace/github_c_makefile_star2_O0/msteveb[P]autosetup/./jimsh0.c
// Function: JimParseSubCmd
static void JimParseSubCmd(struct JimParserCtx *pc)
{
    int level = 1;
    int startofword = 1;
    int line = pc->tline;


    pc->p++;
    pc->len--;
    while (pc->len) {
        switch (*pc->p) {
            case '\\':
                if (pc->len > 1) {
                    if (*++pc->p == '\n') {
                        pc->linenr++;
                    }
                    pc->len--;
                }
                break;

            case '[':
                level++;
                break;

            case ']':
                if (--level == 0) {
                    pc->tend = pc->p - 1;
                    pc->p++;
                    pc->len--;
                    return;
                }
                break;

            case '"':
                if (startofword) {
                    JimParseSubQuote(pc);
                    if (pc->missing.ch == '"') {
                        return;
                    }
                    continue;
                }
                break;

            case '{':
                JimParseSubBrace(pc);
                startofword = 0;
                continue;

            case '\n':
                pc->linenr++;
                break;
        }
        startofword = isspace(UCHAR(*pc->p));
        pc->p++;
        pc->len--;
    }
    pc->missing.ch = '[';
    pc->missing.line = line;
    pc->tend = pc->p - 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x1, -0xc(%rbp)
movl $0x1, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x1ecbe
movq -0x8(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
movl %eax, -0x18(%rbp)
subl $0xa, %eax
je 0x1ec70
jmp 0x1eb65
movl -0x18(%rbp), %eax
subl $0x22, %eax
je 0x1ec36
jmp 0x1eb73
movl -0x18(%rbp), %eax
subl $0x5b, %eax
je 0x1ebe5
jmp 0x1eb7d
movl -0x18(%rbp), %eax
subl $0x5c, %eax
je 0x1eba2
jmp 0x1eb87
movl -0x18(%rbp), %eax
subl $0x5d, %eax
je 0x1ebf3
jmp 0x1eb91
movl -0x18(%rbp), %eax
subl $0x7b, %eax
je 0x1ec5b
jmp 0x1ec7d
movq -0x8(%rbp), %rax
cmpl $0x1, 0x8(%rax)
jle 0x1ebe0
movq -0x8(%rbp), %rcx
movq (%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, (%rcx)
movsbl 0x1(%rax), %eax
cmpl $0xa, %eax
jne 0x1ebd3
movq -0x8(%rbp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x8(%rax)
jmp 0x1ec7d
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1ec7d
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
jne 0x1ec34
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $-0x1, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x8(%rax)
jmp 0x1ece6
jmp 0x1ec7d
cmpl $0x0, -0x10(%rbp)
je 0x1ec59
movq -0x8(%rbp), %rdi
callq 0x1ecf0
movq -0x8(%rbp), %rax
cmpl $0x22, 0x34(%rax)
jne 0x1ec54
jmp 0x1ece6
jmp 0x1eb3f
jmp 0x1ec7d
movq -0x8(%rbp), %rdi
callq 0x1e9a0
movl $0x0, -0x10(%rbp)
jmp 0x1eb3f
movq -0x8(%rbp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
callq 0x64f0
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x8(%rax)
jmp 0x1eb3f
movq -0x8(%rbp), %rax
movl $0x5b, 0x34(%rax)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x38(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $-0x1, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)