// File: /workspace/github_c_makefile_star2_O0/msteveb[P]autosetup/./jimsh0.c
// Function: ScanOneEntry
static int ScanOneEntry(Jim_Interp *interp, const char *str, int pos, int str_bytelen,
    ScanFmtStringObj * fmtObj, long idx, Jim_Obj **valObjPtr)
{
    const char *tok;
    const ScanFmtPartDescr *descr = &fmtObj->descr[idx];
    size_t scanned = 0;
    size_t anchor = pos;
    int i;
    Jim_Obj *tmpObj = NULL;


    *valObjPtr = 0;
    if (descr->prefix) {
        for (i = 0; pos < str_bytelen && descr->prefix[i]; ++i) {

            if (isspace(UCHAR(descr->prefix[i])))
                while (pos < str_bytelen && isspace(UCHAR(str[pos])))
                    ++pos;
            else if (descr->prefix[i] != str[pos])
                break;
            else
                ++pos;
        }
        if (pos >= str_bytelen) {
            return -1;
        }
        else if (descr->prefix[i] != 0)
            return 0;
    }

    if (descr->type != 'c' && descr->type != '[' && descr->type != 'n')
        while (isspace(UCHAR(str[pos])))
            ++pos;


    scanned = pos - anchor;


    if (descr->type == 'n') {

        *valObjPtr = Jim_NewIntObj(interp, anchor + scanned);
    }
    else if (pos >= str_bytelen) {

        return -1;
    }
    else if (descr->type == 'c') {
        int c;
        scanned += utf8_tounicode(&str[pos], &c);
        *valObjPtr = Jim_NewIntObj(interp, c);
        return scanned;
    }
    else {

        if (descr->width > 0) {
            size_t sLen = utf8_strlen(&str[pos], str_bytelen - pos);
            size_t tLen = descr->width > sLen ? sLen : descr->width;

            tmpObj = Jim_NewStringObjUtf8(interp, str + pos, tLen);
            tok = tmpObj->bytes;
        }
        else {

            tok = &str[pos];
        }
        switch (descr->type) {
            case 'd':
            case 'o':
            case 'x':
            case 'u':
            case 'i':{
                    char *endp;
                    jim_wide w;

                    int base = descr->type == 'o' ? 8
                        : descr->type == 'x' ? 16 : descr->type == 'i' ? 0 : 10;


                    if (base == 0) {
                        w = jim_strtoull(tok, &endp);
                    }
                    else {
                        w = strtoull(tok, &endp, base);
                    }

                    if (endp != tok) {

                        *valObjPtr = Jim_NewIntObj(interp, w);


                        scanned += endp - tok;
                    }
                    else {
                        scanned = *tok ? 0 : -1;
                    }
                    break;
                }
            case 's':
            case '[':{
                    *valObjPtr = JimScanAString(interp, descr->arg, tok);
                    scanned += Jim_Length(*valObjPtr);
                    break;
                }
            case 'e':
            case 'f':
            case 'g':{
                    char *endp;
                    double value = strtod(tok, &endp);

                    if (endp != tok) {

                        *valObjPtr = Jim_NewDoubleObj(interp, value);

                        scanned += endp - tok;
                    }
                    else {
                        scanned = *tok ? 0 : -1;
                    }
                    break;
                }
        }
        if (tmpObj) {
            Jim_FreeNewObj(interp, tmpObj);
        }
    }
    return scanned;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x28(%rbp), %rax
addq $0x38, %rax
movq -0x30(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movslq -0x1c(%rbp), %rax
movq %rax, -0x50(%rbp)
movq $0x0, -0x60(%rbp)
movq 0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x40(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x12696
movl $0x0, -0x54(%rbp)
movl -0x1c(%rbp), %ecx
xorl %eax, %eax
cmpl -0x20(%rbp), %ecx
movb %al, -0xa1(%rbp)
jge 0x12591
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x54(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0xa1(%rbp)
movb -0xa1(%rbp), %al
testb $0x1, %al
jne 0x125a0
jmp 0x1265d
callq 0x64f0
movq (%rax), %rax
movq -0x40(%rbp), %rcx
movq 0x8(%rcx), %rcx
movslq -0x54(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x12620
jmp 0x125cb
movl -0x1c(%rbp), %ecx
xorl %eax, %eax
cmpl -0x20(%rbp), %ecx
movb %al, -0xa2(%rbp)
jge 0x12607
callq 0x64f0
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movslq -0x1c(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
setne %al
movb %al, -0xa2(%rbp)
movb -0xa2(%rbp), %al
testb $0x1, %al
jne 0x12613
jmp 0x1261e
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x125cb
jmp 0x1264d
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x54(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movq -0x18(%rbp), %rcx
movslq -0x1c(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x12642
jmp 0x1265d
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1264d
jmp 0x1264f
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x12565
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jl 0x12671
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x12a88
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x54(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x12692
movl $0x0, -0x4(%rbp)
jmp 0x12a88
jmp 0x12694
jmp 0x12696
movq -0x40(%rbp), %rax
movsbl 0x1c(%rax), %eax
cmpl $0x63, %eax
je 0x126f1
movq -0x40(%rbp), %rax
movsbl 0x1c(%rax), %eax
cmpl $0x5b, %eax
je 0x126f1
movq -0x40(%rbp), %rax
movsbl 0x1c(%rax), %eax
cmpl $0x6e, %eax
je 0x126f1
jmp 0x126bf
callq 0x64f0
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movslq -0x1c(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x126ef
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x126bf
jmp 0x126f1
movslq -0x1c(%rbp), %rax
subq -0x50(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movsbl 0x1c(%rax), %eax
cmpl $0x6e, %eax
jne 0x1272a
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rsi
addq -0x48(%rbp), %rsi
callq 0x8d60
movq %rax, %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x12a81
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jl 0x1273e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x12a88
movq -0x40(%rbp), %rax
movsbl 0x1c(%rax), %eax
cmpl $0x63, %eax
jne 0x12789
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x64(%rbp)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x64(%rbp), %rsi
callq 0x8d60
movq %rax, %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rax
movl %eax, -0x4(%rbp)
jmp 0x12a88
movq -0x40(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jbe 0x12833
movl -0x20(%rbp), %eax
subl -0x1c(%rbp), %eax
cmpl $0x0, %eax
jge 0x127bb
movq -0x18(%rbp), %rdi
movslq -0x1c(%rbp), %rax
addq %rax, %rdi
callq 0x6190
movl %eax, -0xa8(%rbp)
jmp 0x127c7
movl -0x20(%rbp), %eax
subl -0x1c(%rbp), %eax
movl %eax, -0xa8(%rbp)
movl -0xa8(%rbp), %eax
cltq
movq %rax, -0x70(%rbp)
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x70(%rbp), %rax
jbe 0x127ee
movq -0x70(%rbp), %rax
movq %rax, -0xb0(%rbp)
jmp 0x127fd
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movslq -0x1c(%rbp), %rax
addq %rax, %rsi
movq -0x78(%rbp), %rax
movl %eax, %edx
callq 0xc750
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x12842
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
movsbl 0x1c(%rax), %eax
movl %eax, -0xb4(%rbp)
subl $0x5b, %eax
je 0x129bd
jmp 0x1285b
movl -0xb4(%rbp), %eax
subl $0x64, %eax
je 0x128c5
jmp 0x12868
movl -0xb4(%rbp), %eax
addl $-0x65, %eax
subl $0x3, %eax
jb 0x129f3
jmp 0x1287c
movl -0xb4(%rbp), %eax
subl $0x69, %eax
je 0x128c5
jmp 0x12889
movl -0xb4(%rbp), %eax
subl $0x6f, %eax
je 0x128c5
jmp 0x12896
movl -0xb4(%rbp), %eax
subl $0x73, %eax
je 0x129bd
jmp 0x128a7
movl -0xb4(%rbp), %eax
subl $0x75, %eax
je 0x128c5
jmp 0x128b4
movl -0xb4(%rbp), %eax
subl $0x78, %eax
jne 0x12a67
jmp 0x128c5
movq -0x40(%rbp), %rax
movsbl 0x1c(%rax), %eax
cmpl $0x6f, %eax
jne 0x128df
movl $0x8, %eax
movl %eax, -0xb8(%rbp)
jmp 0x12920
movq -0x40(%rbp), %rax
movsbl 0x1c(%rax), %eax
cmpl $0x78, %eax
jne 0x128f9
movl $0x10, %eax
movl %eax, -0xbc(%rbp)
jmp 0x12914
movq -0x40(%rbp), %rax
movsbl 0x1c(%rax), %edx
movl $0xa, %eax
xorl %ecx, %ecx
cmpl $0x69, %edx
cmovel %ecx, %eax
movl %eax, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
movl %eax, -0xb8(%rbp)
movl -0xb8(%rbp), %eax
movl %eax, -0x8c(%rbp)
cmpl $0x0, -0x8c(%rbp)
jne 0x1294b
movq -0x38(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0xb630
movq %rax, -0x88(%rbp)
jmp 0x12965
movq -0x38(%rbp), %rdi
movl -0x8c(%rbp), %edx
leaq -0x80(%rbp), %rsi
callq 0x6470
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x1299e
movq -0x10(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x8d60
movq %rax, %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x80(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rcx, %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x129b8
movq -0x38(%rbp), %rax
movsbl (%rax), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
cltq
movq %rax, -0x48(%rbp)
jmp 0x12a67
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rax
movq (%rax), %rsi
movq -0x38(%rbp), %rdx
callq 0x24a90
movq %rax, %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
movq 0x10(%rbp), %rax
movq (%rax), %rdi
callq 0xc700
cltq
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x12a67
movq -0x38(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x6130
movsd %xmm0, -0xa0(%rbp)
movq -0x98(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x12a4b
movq -0x10(%rbp), %rdi
movsd -0xa0(%rbp), %xmm0
callq 0xfbe0
movq %rax, %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x98(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rcx, %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x12a65
movq -0x38(%rbp), %rax
movsbl (%rax), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
cltq
movq %rax, -0x48(%rbp)
jmp 0x12a67
cmpq $0x0, -0x60(%rbp)
je 0x12a7b
movq -0x10(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x7a10
jmp 0x12a7d
jmp 0x12a7f
jmp 0x12a81
movq -0x48(%rbp), %rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)