// File: /workspace/github_c_makefile_star2_O3/msteveb[P]autosetup/./jimsh0.c
// Function: JimParseStr
static int JimParseStr(struct JimParserCtx *pc)
{
    if (pc->tt == JIM_TT_SEP || pc->tt == JIM_TT_EOL ||
        pc->tt == JIM_TT_NONE || pc->tt == JIM_TT_STR) {

        if (*pc->p == '{') {
            return JimParseBrace(pc);
        }
        if (*pc->p == '"') {
            pc->inquote = 1;
            pc->p++;
            pc->len--;

            pc->missing.line = pc->tline;
        }
    }
    pc->tstart = pc->p;
    pc->tline = pc->linenr;
    while (1) {
        if (pc->len == 0) {
            if (pc->inquote) {
                pc->missing.ch = '"';
            }
            pc->tend = pc->p - 1;
            pc->tt = JIM_TT_ESC;
            return JIM_OK;
        }
        switch (*pc->p) {
            case '\\':
                if (!pc->inquote && *(pc->p + 1) == '\n') {
                    pc->tend = pc->p - 1;
                    pc->tt = JIM_TT_ESC;
                    return JIM_OK;
                }
                if (pc->len >= 2) {
                    if (*(pc->p + 1) == '\n') {
                        pc->linenr++;
                    }
                    pc->p++;
                    pc->len--;
                }
                else if (pc->len == 1) {

                    pc->missing.ch = '\\';
                }
                break;
            case '(':

                if (pc->len > 1 && pc->p[1] != '$') {
                    break;
                }

            case ')':

                if (*pc->p == '(' || pc->tt == JIM_TT_VAR) {
                    if (pc->p == pc->tstart) {

                        pc->p++;
                        pc->len--;
                    }
                    pc->tend = pc->p - 1;
                    pc->tt = JIM_TT_ESC;
                    return JIM_OK;
                }
                break;

            case '$':
            case '[':
                pc->tend = pc->p - 1;
                pc->tt = JIM_TT_ESC;
                return JIM_OK;
            case ' ':
            case '\t':
            case '\n':
            case '\r':
            case '\f':
            case ';':
                if (!pc->inquote) {
                    pc->tend = pc->p - 1;
                    pc->tt = JIM_TT_ESC;
                    return JIM_OK;
                }
                else if (*pc->p == '\n') {
                    pc->linenr++;
                }
                break;
            case '"':
                if (pc->inquote) {
                    pc->tend = pc->p - 1;
                    pc->tt = JIM_TT_ESC;
                    pc->p++;
                    pc->len--;
                    pc->inquote = 0;
                    return JIM_OK;
                }
                break;
        }
        pc->p++;
        pc->len--;
    }
    return JIM_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movl 0x24(%rdi), %ecx
cmpl $0x7, %ecx
ja 0x17c89
movl $0xc3, %eax
btl %ecx, %eax
jae 0x17c89
movq (%rdi), %rdx
movzbl (%rdx), %eax
cmpl $0x22, %eax
je 0x17c71
cmpl $0x7b, %eax
jne 0x17c8c
incq %rdx
movq %rdx, 0x10(%rdi)
movl 0xc(%rdi), %eax
movl %eax, 0x20(%rdi)
movl $0x1, 0x24(%rdi)
popq %rbx
popq %rbp
jmp 0x18039
movl $0x1, 0x2c(%rdi)
incq %rdx
movq %rdx, (%rdi)
decl 0x8(%rdi)
movl 0x20(%rdi), %eax
movl %eax, 0x38(%rdi)
jmp 0x17c8c
movq (%rdi), %rdx
movq %rdx, 0x10(%rdi)
movl 0x8(%rdi), %esi
movl 0xc(%rdi), %r8d
movl %r8d, 0x20(%rdi)
testl %esi, %esi
je 0x17d69
leaq 0xf5ae(%rip), %r9       # 0x27258
movq %rdx, %rax
movb (%rax), %r10b
movzbl %r10b, %r11d
cmpl $0x3a, %r11d
jle 0x17cef
cmpl $0x3b, %r11d
je 0x17d20
cmpl $0x5c, %r11d
jne 0x17d35
cmpl $0x0, 0x2c(%rdi)
jne 0x17cd6
cmpb $0xa, 0x1(%rax)
je 0x17d79
cmpl $0x2, %esi
jl 0x17d3d
cmpb $0xa, 0x1(%rax)
jne 0x17ce8
incl %r8d
movl %r8d, 0xc(%rdi)
incq %rax
decl %esi
jmp 0x17d56
leal -0x20(%r11), %ebx
cmpl $0x9, %ebx
ja 0x17d0d
movslq (%r9,%rbx,4), %r11
addq %r9, %r11
jmpq *%r11
cmpl $0x0, 0x2c(%rdi)
je 0x17d56
jmp 0x17db2
leal -0x9(%r11), %ebx
cmpl $0x2, %ebx
jb 0x17d20
addl $-0xc, %r11d
cmpl $0x2, %r11d
jae 0x17d56
cmpl $0x0, 0x2c(%rdi)
je 0x17d79
cmpb $0xa, %r10b
jne 0x17d56
incl %r8d
movl %r8d, 0xc(%rdi)
jmp 0x17d56
cmpl $0x5b, %r11d
jne 0x17d56
jmp 0x17d79
cmpl $0x1, %esi
jne 0x17d56
jmp 0x17d9c
cmpl $0x3, %ecx
jne 0x17d56
jmp 0x17d8a
cmpl $0x2, %esi
jl 0x17d8a
cmpb $0x24, 0x1(%rax)
je 0x17d8a
incq %rax
movq %rax, (%rdi)
decl %esi
movl %esi, 0x8(%rdi)
jne 0x17cad
jmp 0x17d6c
movq %rdx, %rax
cmpl $0x0, 0x2c(%rdi)
je 0x17d79
movl $0x22, 0x34(%rdi)
decq %rax
movq %rax, 0x18(%rdi)
movl $0x2, 0x24(%rdi)
popq %rbx
popq %rbp
retq
cmpq %rdx, %rax
jne 0x17d79
incq %rax
movq %rax, (%rdi)
decl %esi
movl %esi, 0x8(%rdi)
jmp 0x17d79
movl $0x5c, 0x34(%rdi)
incq %rax
movq %rax, (%rdi)
movl $0x0, 0x8(%rdi)
jmp 0x17d6c
leaq -0x1(%rax), %rcx
movq %rcx, 0x18(%rdi)
movl $0x2, 0x24(%rdi)
incq %rax
movq %rax, (%rdi)
decl %esi
movl %esi, 0x8(%rdi)
movl $0x0, 0x2c(%rdi)
jmp 0x17d87