// File: /workspace/github_c_makefile_star2_O1/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
movl 0x24(%rdi), %eax
cmpl $0x7, %eax
ja 0x181ac
movl $0xc3, %ecx
btl %eax, %ecx
jae 0x181ac
movq (%rdi), %rcx
movzbl (%rcx), %edx
cmpl $0x22, %edx
je 0x18196
cmpl $0x7b, %edx
jne 0x181ac
incq %rcx
movq %rcx, 0x10(%rdi)
movl 0xc(%rdi), %eax
movl %eax, 0x20(%rdi)
movl $0x1, 0x24(%rdi)
popq %rbp
jmp 0x1852d
movl $0x1, 0x2c(%rdi)
incq %rcx
movq %rcx, (%rdi)
decl 0x8(%rdi)
movl 0x20(%rdi), %ecx
movl %ecx, 0x38(%rdi)
movq (%rdi), %rsi
movq %rsi, 0x10(%rdi)
movl 0xc(%rdi), %ecx
movl %ecx, 0x20(%rdi)
movl 0x8(%rdi), %ecx
testl %ecx, %ecx
je 0x182b3
movq (%rdi), %rdx
leaq 0x100ae(%rip), %r8      # 0x2827c
movb (%rdx), %r9b
movzbl %r9b, %r10d
cmpl $0x3a, %r10d
jle 0x18215
cmpl $0x3b, %r10d
je 0x18248
cmpl $0x5c, %r10d
jne 0x18259
cmpl $0x0, 0x2c(%rdi)
jne 0x181f7
cmpb $0xa, 0x1(%rdx)
je 0x182cc
cmpl $0x2, %ecx
jl 0x18261
cmpb $0xa, 0x1(%rdx)
jne 0x18205
incl 0xc(%rdi)
incq %rdx
movq %rdx, (%rdi)
decl %ecx
movl %ecx, 0x8(%rdi)
jmp 0x182a2
leal -0x20(%r10), %r11d
cmpl $0x9, %r11d
ja 0x18234
movslq (%r8,%r11,4), %r10
addq %r8, %r10
jmpq *%r10
cmpl $0x0, 0x2c(%rdi)
je 0x182a2
jmp 0x182ee
leal -0x9(%r10), %r11d
cmpl $0x2, %r11d
jb 0x18248
addl $-0xc, %r10d
cmpl $0x2, %r10d
jae 0x182a2
cmpl $0x0, 0x2c(%rdi)
je 0x182cc
cmpb $0xa, %r9b
jne 0x182a2
incl 0xc(%rdi)
jmp 0x182a2
cmpl $0x5b, %r10d
jne 0x182a2
jmp 0x182cc
cmpl $0x1, %ecx
jne 0x182a2
movl $0x5c, 0x34(%rdi)
jmp 0x182a2
cmpl $0x3, %eax
jne 0x182a2
jmp 0x182dc
cmpl $0x2, %ecx
jl 0x18297
cmpl $0x3, %eax
sete %r10b
cmpb $0x28, %r9b
sete %r9b
cmpb $0x24, 0x1(%rdx)
jne 0x182a2
orb %r9b, %r10b
je 0x182a2
jmp 0x182dc
cmpl $0x3, %eax
je 0x182dc
cmpb $0x28, %r9b
je 0x182dc
incq %rdx
movq %rdx, (%rdi)
decl %ecx
movl %ecx, 0x8(%rdi)
jne 0x181ce
cmpl $0x0, 0x2c(%rdi)
je 0x182c0
movl $0x22, 0x34(%rdi)
movq (%rdi), %rax
decq %rax
movq %rax, 0x18(%rdi)
jmp 0x182d3
decq %rdx
movq %rdx, 0x18(%rdi)
movl $0x2, 0x24(%rdi)
popq %rbp
retq
cmpq %rsi, %rdx
jne 0x182c0
incq %rdx
movq %rdx, (%rdi)
decl %ecx
movl %ecx, 0x8(%rdi)
jmp 0x182c0
leaq -0x1(%rdx), %rax
movq %rax, 0x18(%rdi)
movl $0x2, 0x24(%rdi)
incq %rdx
movq %rdx, (%rdi)
decl %ecx
movl %ecx, 0x8(%rdi)
movl $0x0, 0x2c(%rdi)
jmp 0x182da