// File: /workspace/github_c_makefile_star2_O1/msteveb[P]autosetup/./jimsh0.c
// Function: Jim_ScanCoreCommand
static int Jim_ScanCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
    Jim_Obj *listPtr, **outVec;
    int outc, i;

    if (argc < 3) {
        Jim_WrongNumArgs(interp, 1, argv, "string format ?varName varName ...?");
        return JIM_ERR;
    }
    if (argv[2]->typePtr != &scanFmtStringObjType)
        SetScanFmtFromAny(interp, argv[2]);
    if (FormatGetError(argv[2]) != 0) {
        Jim_SetResultString(interp, FormatGetError(argv[2]), -1);
        return JIM_ERR;
    }
    if (argc > 3) {
        int maxPos = FormatGetMaxPos(argv[2]);
        int count = FormatGetCnvCount(argv[2]);

        if (maxPos > argc - 3) {
            Jim_SetResultString(interp, "\"%n$\" argument index out of range", -1);
            return JIM_ERR;
        }
        else if (count > argc - 3) {
            Jim_SetResultString(interp, "different numbers of variable names and "
                "field specifiers", -1);
            return JIM_ERR;
        }
        else if (count < argc - 3) {
            Jim_SetResultString(interp, "variable is not assigned by any "
                "conversion specifiers", -1);
            return JIM_ERR;
        }
    }
    listPtr = Jim_ScanString(interp, argv[1], argv[2], JIM_ERRMSG);
    if (listPtr == 0)
        return JIM_ERR;
    if (argc > 3) {
        int rc = JIM_OK;
        int count = 0;

        if (listPtr != 0 && listPtr != (Jim_Obj *)EOF) {
            int len = Jim_ListLength(interp, listPtr);

            if (len != 0) {
                JimListGetElements(interp, listPtr, &outc, &outVec);
                for (i = 0; i < outc; ++i) {
                    if (Jim_Length(outVec[i]) > 0) {
                        ++count;
                        if (Jim_SetVariable(interp, argv[3 + i], outVec[i]) != JIM_OK) {
                            rc = JIM_ERR;
                        }
                    }
                }
            }
            Jim_FreeNewObj(interp, listPtr);
        }
        else {
            count = -1;
        }
        if (rc == JIM_OK) {
            Jim_SetResultInt(interp, count);
        }
        return rc;
    }
    else {
        if (listPtr == (Jim_Obj *)EOF) {
            Jim_SetResult(interp, Jim_NewListObj(interp, 0, 0));
            return JIM_OK;
        }
        Jim_SetResult(interp, listPtr);
    }
    return JIM_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
cmpl $0x2, %esi
jg 0x20df7
leaq 0xd402(%rip), %rcx      # 0x2e1e4
movl $0x1, %r15d
movl $0x1, %esi
callq 0x7454
jmp 0x21566
movq %rsi, -0x68(%rbp)
movq %rdi, -0x58(%rbp)
movq %rdx, -0x60(%rbp)
movq 0x10(%rdx), %rbx
movq 0x8(%rbx), %rax
leaq 0x16eb6(%rip), %rcx     # 0x37cc8
cmpq %rcx, %rax
je 0x21380
cmpq $0x0, (%rbx)
jne 0x20e27
movq %rbx, %rdi
callq *0x18(%rax)
movq (%rbx), %r13
testq %r13, %r13
jne 0x20e39
movq 0x8(%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movslq 0x14(%rbx), %r14
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x20e58
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x20e58
movq -0x58(%rbp), %rdi
movq %rbx, %rsi
callq *%rax
testl %r14d, %r14d
movq %rbx, -0x30(%rbp)
jle 0x20e7e
xorl %ecx, %ecx
xorl %eax, %eax
xorl %edx, %edx
cmpb $0x25, (%r13,%rcx)
sete %dl
addl %edx, %eax
incq %rcx
cmpq %rcx, %r14
jne 0x20e65
incl %eax
jmp 0x20e83
movl $0x1, %eax
movslq %eax, %r12
leal (%r14,%r14,2), %eax
addl %r12d, %eax
movl %r12d, %ecx
shll $0x5, %ecx
addl %ecx, %eax
addl $0x5e, %eax
movslq %eax, %rbx
xorl %edi, %edi
movq %rbx, %rsi
callq *0x173e2(%rip)          # 0x38288
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x6240
movq %rbx, (%r15)
movq $0x0, 0x20(%r15)
shlq $0x5, %r12
leaq (%r15,%r12), %rax
addq $0x38, %rax
movq %rax, 0x30(%r15)
leaq 0x4(%r14,%rax), %rdi
movq %rdi, 0x8(%r15)
movq %r13, %rsi
movq %r14, %rdx
callq 0x6320
movq 0x8(%r15), %rax
movq -0x30(%rbp), %rcx
movq %r15, 0x18(%rcx)
leaq 0x16dd0(%rip), %rdx     # 0x37cc8
movq %rdx, 0x8(%rcx)
testl %r14d, %r14d
jle 0x21380
movq %r15, %rdi
leaq (%r14,%r13), %rbx
leaq 0x38(%r15), %rcx
movq %rcx, -0x78(%rbp)
leaq (%rax,%r14), %r12
incq %r12
addq %r14, %rax
incq %rax
movq %rax, -0x70(%rbp)
movl $0xffffffff, -0x4c(%rbp) # imm = 0xFFFFFFFF
xorl %r9d, %r9d
xorl %r14d, %r14d
movq %r15, -0x40(%rbp)
movl $0x0, -0x38(%rbp)
movslq %r14d, %rax
shlq $0x5, %rax
incq 0x10(%rdi)
movq -0x78(%rbp), %rcx
leaq (%rcx,%rax), %rdx
movq $0x0, 0x10(%rcx,%rax)
cmpb $0x25, (%r13)
jne 0x20f67
cmpb $0x25, 0x1(%r13)
jne 0x20fad
movb $0x0, 0x1c(%rdx)
movslq %r9d, %rax
leaq (%r12,%rax), %rcx
movq %rcx, 0x8(%rdx)
cmpq %rbx, %r13
jae 0x20fa2
cmpb $0x25, (%r13)
jne 0x20f8c
cmpb $0x25, 0x1(%r13)
jne 0x20f9f
incq %r13
movb (%r13), %cl
movb %cl, (%r12,%rax)
incq %rax
incq %r13
cmpq %rbx, %r13
jb 0x20f7b
movl %eax, %r9d
movslq %r9d, %rax
incl %r9d
movb $0x0, (%r12,%rax)
leaq 0x1(%r13), %r15
cmpq %rbx, %r15
jae 0x2136b
movl $0x0, 0x18(%rdx)
cmpb $0x2a, (%r15)
movq %r9, -0x30(%rbp)
movq %rdx, -0x48(%rbp)
jne 0x20fdf
movl $0xffffffff, 0x18(%rdx) # imm = 0xFFFFFFFF
addq $0x2, %r13
movq %r13, %r15
jmp 0x20fe3
incq 0x18(%rdi)
movq %r15, %rdi
leaq 0xd29b(%rip), %rsi      # 0x2e288
leaq -0x38(%rbp), %rdx
leaq -0x50(%rbp), %rcx
xorl %eax, %eax
callq 0x6380
cmpl $0x1, %eax
jne 0x210c3
movslq -0x50(%rbp), %rax
addq %rax, %r15
movq -0x48(%rbp), %rsi
cmpl $-0x1, 0x18(%rsi)
movq -0x30(%rbp), %r9
je 0x210d1
cmpb $0x24, (%r15)
jne 0x210d1
incq %r15
movl -0x38(%rbp), %eax
movl %eax, 0x18(%rsi)
movl $0x0, -0x38(%rbp)
cmpl $0x0, -0x4c(%rbp)
movq -0x40(%rbp), %rdi
je 0x212f7
cmpl $0x0, -0x4c(%rbp)
jle 0x21056
cmpl $0x0, 0x18(%rsi)
je 0x21301
testl %r14d, %r14d
jle 0x2107f
movl %r14d, %eax
shlq $0x5, %rax
xorl %ecx, %ecx
movl 0x50(%rdi,%rcx), %edx
cmpl $-0x1, %edx
je 0x21076
cmpl 0x18(%rsi), %edx
je 0x21313
addq $0x20, %rcx
cmpq %rcx, %rax
jne 0x21064
cmpl $0x0, 0x18(%rsi)
js 0x2130a
movq %r15, %rdi
leaq 0xd1f5(%rip), %rsi      # 0x2e288
leaq -0x38(%rbp), %rdx
leaq -0x50(%rbp), %rcx
xorl %eax, %eax
callq 0x6380
cmpl $0x1, %eax
jne 0x2132a
movslq -0x38(%rbp), %rax
movq -0x48(%rbp), %rsi
movq %rax, 0x10(%rsi)
movslq -0x50(%rbp), %rax
addq %rax, %r15
jmp 0x2132e
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %r9
movq -0x48(%rbp), %rsi
jmp 0x210dd
movslq -0x38(%rbp), %rax
movq %rax, 0x10(%rsi)
movq -0x40(%rbp), %rdi
movl %r14d, -0x34(%rbp)
cmpl $-0x1, -0x4c(%rbp)
jne 0x210ed
movl 0x18(%rsi), %eax
movl %eax, -0x4c(%rbp)
movsbl (%r15), %r14d
cmpl $0x5b, %r14d
jne 0x21123
movb $0x5b, 0x1c(%rsi)
movslq %r9d, %rcx
addq %r12, %rcx
movq %rcx, (%rsi)
movb 0x1(%r15), %dl
cmpb $0x5e, %dl
movabsq $0x100000000, %r8       # imm = 0x100000000
jne 0x21168
addq $0x2, %r15
leal 0x1(%r9), %eax
movb %dl, (%rcx)
jmp 0x2116e
cmpq %rbx, %r15
jae 0x21265
movl $0x4, %edx
leaq 0xd1d6(%rip), %rdi      # 0x2e30e
movl %r14d, %esi
callq 0x6290
testq %rax, %rax
je 0x21259
incq %r15
movl %r14d, %edi
callq 0x6350
movq -0x48(%rbp), %rsi
movb %al, 0x1d(%rsi)
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %r9
jmp 0x21265
incq %r15
movl %r9d, %eax
movl -0x34(%rbp), %r14d
movb (%r15), %cl
cmpb $0x5d, %cl
jne 0x21186
incq %r15
movslq %eax, %rdx
incl %eax
movb %cl, (%r12,%rdx)
movslq %eax, %rdx
movq -0x70(%rbp), %rcx
leaq (%rcx,%rdx), %rsi
shlq $0x20, %rdx
movzbl (%r15), %ecx
testl %ecx, %ecx
je 0x211b1
cmpl $0x5d, %ecx
je 0x211b1
incq %r15
movb %cl, (%rsi)
incl %eax
addq %r8, %rdx
incq %rsi
jmp 0x21195
cmpb $0x5d, %cl
jne 0x21232
sarq $0x20, %rdx
movb $0x0, (%r12,%rdx)
leal -0x1(%rax), %edx
leal 0x1(%r9), %esi
cmpl %edx, %esi
jge 0x21226
movslq %esi, %rdi
movslq %edx, %r8
xorl %r9d, %r9d
movq %rdi, %r10
movq -0x30(%rbp), %r11
cmpb $0x2d, (%r12,%r10)
jne 0x21201
movslq %r11d, %r11
movb (%r12,%r11), %r14b
movb 0x2(%r12,%r11), %r13b
cmpb %r13b, %r14b
jle 0x21201
movb %r13b, (%r12,%r11)
movb %r14b, 0x2(%r12,%r11)
movl $0x1, %r9d
movl %r10d, %r11d
leaq 0x1(%r10), %r14
movq %r14, %r10
cmpq %r8, %r14
jl 0x211da
cmpl %edx, %esi
jge 0x21226
movq %rdi, %r10
movq -0x30(%rbp), %r11
testl %r9d, %r9d
movl $0x0, %r9d
jne 0x211da
incl %eax
movq -0x40(%rbp), %rdi
movl -0x34(%rbp), %r14d
jmp 0x2123d
leaq 0xd0b8(%rip), %rdx      # 0x2e2f1
movq %rdx, 0x28(%rdi)
cmpb $0x5d, %cl
jne 0x2124f
movl %eax, %r9d
incl %r14d
movb $0x1, %cl
jmp 0x2136d
xorl %ecx, %ecx
movl %eax, %r9d
jmp 0x2136d
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %r9
movq -0x48(%rbp), %rsi
cmpq %rbx, %r15
jae 0x212c6
movb (%r15), %al
movb %al, 0x1c(%rsi)
movsbl (%r15), %r14d
movl $0xc, %edx
leaq 0xd0b4(%rip), %rdi      # 0x2e334
movl %r14d, %esi
callq 0x6290
testq %rax, %rax
je 0x212dc
movzbl %r14b, %eax
cmpl $0x75, %eax
movq -0x40(%rbp), %rdi
movl -0x34(%rbp), %r14d
movq -0x30(%rbp), %r9
movq -0x48(%rbp), %rcx
je 0x21356
cmpl $0x63, %eax
jne 0x21245
cmpq $0x0, 0x10(%rcx)
je 0x2134d
leaq 0xd09d(%rip), %rax      # 0x2e35e
jmp 0x21367
leaq 0xd045(%rip), %rax      # 0x2e312
movq %rax, 0x28(%rdi)
xorl %ecx, %ecx
movl -0x34(%rbp), %r14d
jmp 0x2136d
movq -0x40(%rbp), %rdi
leaq 0xd059(%rip), %rax      # 0x2e340
movq %rax, 0x28(%rdi)
xorl %ecx, %ecx
movl -0x34(%rbp), %r14d
movq -0x30(%rbp), %r9
jmp 0x2136d
cmpl $0x0, 0x18(%rsi)
jle 0x21046
leaq 0xadb7(%rip), %rax      # 0x2c0bf
jmp 0x2131a
leaq 0xcfb9(%rip), %rax      # 0x2e2ca
jmp 0x2131a
leaq 0xcf73(%rip), %rax      # 0x2e28d
movq %rax, 0x28(%rdi)
xorl %eax, %eax
testb %al, %al
jne 0x210dd
jmp 0x2136b
movq -0x48(%rbp), %rsi
movslq 0x18(%rsi), %rcx
movb $0x1, %al
testq %rcx, %rcx
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %r9
jle 0x21320
cmpq %rcx, 0x20(%rdi)
jae 0x21320
movq %rcx, 0x20(%rdi)
jmp 0x21320
cmpl $0x75, %eax
jne 0x21245
cmpb $0x6c, 0x1d(%rcx)
jne 0x21245
leaq 0xd029(%rip), %rax      # 0x2e390
movq %rax, 0x28(%rdi)
xorl %ecx, %ecx
testb %cl, %cl
je 0x21380
incq %r15
movq %r15, %r13
cmpq %rbx, %r15
jb 0x20f36
movq -0x60(%rbp), %rdi
movq 0x10(%rdi), %rdx
movq 0x18(%rdx), %rax
movq 0x28(%rax), %rsi
testq %rsi, %rsi
je 0x213cd
movq -0x58(%rbp), %rbx
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7516
movq %rax, %r14
incl 0x10(%rax)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x213c5
movq %rbx, %rdi
callq 0x759a
movq %r14, (%rbx)
jmp 0x21560
movq -0x68(%rbp), %rbx
cmpl $0x3, %ebx
movq -0x58(%rbp), %r12
jne 0x21457
movq 0x8(%rdi), %rsi
movl $0x1, %r15d
movq %r12, %rdi
movl $0x1, %ecx
callq 0xfdb1
testq %rax, %rax
je 0x21566
movq %rax, %r14
cmpl $0x3, %ebx
jne 0x21480
cmpq $-0x1, %r14
jne 0x2142d
movq %r12, %rdi
callq 0xae58
movq %rax, %r14
leaq 0x14f3e(%rip), %rax     # 0x36358
movq %rax, 0x8(%r14)
movq $0x0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r14)
incl 0x10(%r14)
movq (%r12), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x2144b
movq %r12, %rdi
callq 0x759a
movq %r14, (%r12)
xorl %r15d, %r15d
jmp 0x21566
leal -0x3(%rbx), %ecx
cmpl 0x20(%rax), %ecx
jge 0x2146b
leaq 0xacb7(%rip), %rsi      # 0x2c11d
jmp 0x2152f
cmpl 0x18(%rax), %ecx
jge 0x21522
leaq 0xcd8d(%rip), %rsi      # 0x2e208
jmp 0x2152f
cmpq $-0x1, %r14
je 0x2158a
movq %r12, %rdi
movq %r14, %rsi
callq 0xe338
cmpl $0x0, 0x20(%r14)
je 0x21578
movq %r12, %rdi
movq %r14, %rsi
callq 0xe338
movslq 0x20(%r14), %rax
movq %rax, -0x30(%rbp)
testq %rax, %rax
jle 0x21578
movq %r14, -0x48(%rbp)
movq 0x18(%r14), %r13
xorl %r12d, %r12d
xorl %r15d, %r15d
xorl %ebx, %ebx
movq (%r13,%r12,8), %r14
cmpq $0x0, (%r14)
jne 0x214e1
movq 0x8(%r14), %rax
movq %r14, %rdi
callq *0x18(%rax)
cmpl $0x0, 0x14(%r14)
jle 0x2150c
incl %ebx
movq -0x60(%rbp), %rax
movq 0x18(%rax,%r12,8), %rsi
movq (%r13,%r12,8), %rdx
movq -0x58(%rbp), %rdi
callq 0x871b
testl %eax, %eax
movl $0x1, %eax
cmovnel %eax, %r15d
incq %r12
cmpq %r12, -0x30(%rbp)
jne 0x214cc
movslq %ebx, %rbx
movq -0x58(%rbp), %r12
movq -0x48(%rbp), %r14
jmp 0x2157d
jle 0x213da
leaq 0xcd12(%rip), %rsi      # 0x2e241
movq %r12, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7516
movq %rax, %r14
incl 0x10(%rax)
movq (%r12), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x2155c
movq %r12, %rdi
callq 0x759a
movq %r14, (%r12)
movl $0x1, %r15d
movl %r15d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
xorl %r15d, %r15d
movq %r12, %rdi
movq %r14, %rsi
callq 0x759a
jmp 0x21594
xorl %r15d, %r15d
movq $-0x1, %rbx
testl %r15d, %r15d
jne 0x21566
movq %r12, %rdi
callq 0xae58
movq %rax, %r14
leaq 0x14d35(%rip), %rax     # 0x362e0
movq %rax, 0x8(%r14)
movq $0x0, (%r14)
movq %rbx, 0x18(%r14)
incl 0x10(%r14)
movq (%r12), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x215d8
movq %r12, %rdi
callq 0x759a
movq %r14, (%r12)
jmp 0x21566