// File: /workspace/github_c_makefile_star2_O0/msteveb[P]autosetup/./jimsh0.c
// Function: ListElementQuotingType
static unsigned char ListElementQuotingType(const char *s, int len)
{
    int i, level, blevel, trySimple = 1;


    if (len == 0)
        return JIM_ELESTR_BRACE;
    if (s[0] == '"' || s[0] == '{') {
        trySimple = 0;
        goto testbrace;
    }
    for (i = 0; i < len; i++) {
        switch (s[i]) {
            case ' ':
            case '$':
            case '"':
            case '[':
            case ']':
            case ';':
            case '\\':
            case '\r':
            case '\n':
            case '\t':
            case '\f':
            case '\v':
                trySimple = 0;

            case '{':
            case '}':
                goto testbrace;
        }
    }
    return JIM_ELESTR_SIMPLE;

  testbrace:

    if (s[len - 1] == '\\')
        return JIM_ELESTR_QUOTE;
    level = 0;
    blevel = 0;
    for (i = 0; i < len; i++) {
        switch (s[i]) {
            case '{':
                level++;
                break;
            case '}':
                level--;
                if (level < 0)
                    return JIM_ELESTR_QUOTE;
                break;
            case '[':
                blevel++;
                break;
            case ']':
                blevel--;
                break;
            case '\\':
                if (s[i + 1] == '\n')
                    return JIM_ELESTR_QUOTE;
                else if (s[i + 1] != '\0')
                    i++;
                break;
        }
    }
    if (blevel < 0) {
        return JIM_ELESTR_QUOTE;
    }

    if (level == 0) {
        if (!trySimple)
            return JIM_ELESTR_BRACE;
        for (i = 0; i < len; i++) {
            switch (s[i]) {
                case ' ':
                case '$':
                case '"':
                case '[':
                case ']':
                case ';':
                case '\\':
                case '\r':
                case '\n':
                case '\t':
                case '\f':
                case '\v':
                    return JIM_ELESTR_BRACE;
                    break;
            }
        }
        return JIM_ELESTR_SIMPLE;
    }
    return JIM_ELESTR_QUOTE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x1, -0x24(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x20b81
movb $0x1, -0x1(%rbp)
jmp 0x20d75
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
je 0x20b99
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x7b, %eax
jne 0x20ba2
movl $0x0, -0x24(%rbp)
jmp 0x20bfe
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x20bf5
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
addl $-0x9, %eax
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
subl $0x74, %eax
ja 0x20be8
movq -0x30(%rbp), %rax
leaq 0x15c86(%rip), %rcx     # 0x3685c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, -0x24(%rbp)
jmp 0x20bfe
jmp 0x20bea
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x20ba9
movb $0x0, -0x1(%rbp)
jmp 0x20d75
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x5c, %eax
jne 0x20c1d
movb $0x2, -0x1(%rbp)
jmp 0x20d75
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x20cfd
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
addl $-0x5b, %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0x22, %eax
ja 0x20ced
movq -0x38(%rbp), %rax
leaq 0x15f1d(%rip), %rcx     # 0x36b84
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x20ced
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x20c93
movb $0x2, -0x1(%rbp)
jmp 0x20d75
jmp 0x20ced
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x20ced
movl -0x20(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x20ced
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0x20cca
movb $0x2, -0x1(%rbp)
jmp 0x20d75
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x20ce9
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x20ceb
jmp 0x20ced
jmp 0x20cef
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x20c32
cmpl $0x0, -0x20(%rbp)
jge 0x20d09
movb $0x2, -0x1(%rbp)
jmp 0x20d75
cmpl $0x0, -0x1c(%rbp)
jne 0x20d71
cmpl $0x0, -0x24(%rbp)
jne 0x20d1b
movb $0x1, -0x1(%rbp)
jmp 0x20d75
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x20d6b
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
addl $-0x9, %eax
movl %eax, %ecx
movq %rcx, -0x40(%rbp)
subl $0x54, %eax
ja 0x20d5e
movq -0x40(%rbp), %rax
leaq 0x15ce1(%rip), %rcx     # 0x36a30
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x1, -0x1(%rbp)
jmp 0x20d75
jmp 0x20d60
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x20d22
movb $0x0, -0x1(%rbp)
jmp 0x20d75
movb $0x2, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopw (%rax,%rax)