// File: /workspace/github_c_makefile_star2_O1/msteveb[P]autosetup/./jimsh0.c
// Function: Jim_DictCoreCommand
static int Jim_DictCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
    Jim_Obj *objPtr;
    int types = JIM_DICTMATCH_KEYS;

    enum {
        OPT_CREATE,
        OPT_GET,
        OPT_GETDEF,
        OPT_GETWITHDEFAULT,
        OPT_SET,
        OPT_UNSET,
        OPT_EXISTS,
        OPT_KEYS,
        OPT_SIZE,
        OPT_INFO,
        OPT_MERGE,
        OPT_WITH,
        OPT_APPEND,
        OPT_LAPPEND,
        OPT_INCR,
        OPT_REMOVE,
        OPT_VALUES,
        OPT_FOR,
        OPT_REPLACE,
        OPT_UPDATE,
        OPT_COUNT
    };
    static const jim_subcmd_type cmds[OPT_COUNT + 1] = {
        JIM_DEF_SUBCMD("create", "?key value ...?", 0, -2),
        JIM_DEF_SUBCMD("get", "dictionary ?key ...?", 1, -1),
        JIM_DEF_SUBCMD_HIDDEN("getdef", "dictionary ?key ...? key default", 3, -1),
        JIM_DEF_SUBCMD("getwithdefault", "dictionary ?key ...? key default", 3, -1),
        JIM_DEF_SUBCMD("set", "varName key ?key ...? value", 3, -1),
        JIM_DEF_SUBCMD("unset", "varName key ?key ...?", 2, -1),
        JIM_DEF_SUBCMD("exists", "dictionary key ?key ...?", 2, -1),
        JIM_DEF_SUBCMD("keys", "dictionary ?pattern?", 1, 2),
        JIM_DEF_SUBCMD("size", "dictionary", 1, 1),
        JIM_DEF_SUBCMD("info", "dictionary", 1, 1),
        JIM_DEF_SUBCMD("merge", "?...?", 0, -1),
        JIM_DEF_SUBCMD("with", "dictVar ?key ...? script", 2, -1),
        JIM_DEF_SUBCMD("append", "varName key ?value ...?", 2, -1),
        JIM_DEF_SUBCMD("lappend",  "varName key ?value ...?", 2, -1),
        JIM_DEF_SUBCMD("incr", "varName key ?increment?", 2, 3),
        JIM_DEF_SUBCMD("remove", "dictionary ?key ...?", 1, -1),
        JIM_DEF_SUBCMD("values", "dictionary ?pattern?", 1, 2),
        JIM_DEF_SUBCMD("for", "vars dictionary script", 3, 3),
        JIM_DEF_SUBCMD("replace", "dictionary ?key value ...?", 1, -1),
        JIM_DEF_SUBCMD("update", "varName ?arg ...? script", 2, -1),
        { NULL }
    };
    const jim_subcmd_type *ct = Jim_ParseSubCmd(interp, cmds, argc, argv);
    if (!ct) {
        return JIM_ERR;
    }
    if (ct->function) {

        return ct->function(interp, argc, argv);
    }


    switch (ct - cmds) {
        case OPT_GET:
            if (Jim_DictKeysVector(interp, argv[2], argv + 3, argc - 3, &objPtr,
                    JIM_ERRMSG) != JIM_OK) {
                return JIM_ERR;
            }
            Jim_SetResult(interp, objPtr);
            return JIM_OK;

        case OPT_GETDEF:
        case OPT_GETWITHDEFAULT:{
            int rc = Jim_DictKeysVector(interp, argv[2], argv + 3, argc - 4, &objPtr, JIM_ERRMSG);
            if (rc == -1) {

                return JIM_ERR;
            }
            if (rc == JIM_ERR) {
                Jim_SetResult(interp, argv[argc - 1]);
            }
            else {
                Jim_SetResult(interp, objPtr);
            }
            return JIM_OK;
        }

        case OPT_SET:
            return Jim_SetDictKeysVector(interp, argv[2], argv + 3, argc - 4, argv[argc - 1], JIM_ERRMSG);

        case OPT_EXISTS:{
                int rc = Jim_DictKeysVector(interp, argv[2], argv + 3, argc - 3, &objPtr, JIM_NONE);
                if (rc < 0) {
                    return JIM_ERR;
                }
                Jim_SetResultBool(interp,  rc == JIM_OK);
                return JIM_OK;
            }

        case OPT_UNSET:
            if (Jim_SetDictKeysVector(interp, argv[2], argv + 3, argc - 3, NULL, JIM_NONE) != JIM_OK) {
                return JIM_ERR;
            }
            return JIM_OK;

        case OPT_VALUES:
            types = JIM_DICTMATCH_VALUES;

        case OPT_KEYS:
            return Jim_DictMatchTypes(interp, argv[2], argc == 4 ? argv[3] : NULL, types, types);

        case OPT_SIZE:
            if (Jim_DictSize(interp, argv[2]) < 0) {
                return JIM_ERR;
            }
            Jim_SetResultInt(interp, Jim_DictSize(interp, argv[2]));
            return JIM_OK;

        case OPT_MERGE:
            if (argc == 2) {
                return JIM_OK;
            }
            objPtr = Jim_DictMerge(interp, argc - 2, argv + 2);
            if (objPtr == NULL) {
                return JIM_ERR;
            }
            Jim_SetResult(interp, objPtr);
            return JIM_OK;

        case OPT_CREATE:
            objPtr = Jim_NewDictObj(interp, argv + 2, argc - 2);
            Jim_SetResult(interp, objPtr);
            return JIM_OK;

        case OPT_INFO:
            return Jim_DictInfo(interp, argv[2]);

        case OPT_WITH:
            return JimDictWith(interp, argv[2], argv + 3, argc - 4, argv[argc - 1]);

        case OPT_UPDATE:
            if (argc < 6 || argc % 2) {

                argc = 2;
            }

        default:
            return Jim_EvalEnsemble(interp, "dict", Jim_String(argv[1]), argc - 2, argv + 2);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %rbx
leaq 0x17b33(%rip), %r12     # 0x376e0
movq %r12, %rsi
movl %r15d, %edx
movq %r14, %rcx
callq 0x11bb6
testq %rax, %rax
je 0x1fe81
movq 0x10(%rax), %rcx
testq %rcx, %rcx
je 0x1fbe6
movq %rbx, %rdi
movl %r15d, %esi
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rcx
subq %r12, %rax
sarq $0x5, %rax
cmpq $0x13, %rax
ja 0x1fc99
leaq 0x894e(%rip), %rcx      # 0x2854c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%r14), %rsi
leaq 0x18(%r14), %rdx
leal -0x4(%r15), %ecx
leaq -0x30(%rbp), %r8
movl $0x1, %r12d
movq %rbx, %rdi
movl $0x1, %r9d
callq 0xf714
cmpl $-0x1, %eax
je 0x1fe87
cmpl $0x1, %eax
jne 0x1ff83
movslq %r15d, %rax
movq -0x8(%r14,%rax,8), %r14
incl 0x10(%r14)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x2, %eax
jl 0x1ff9c
jmp 0x1ffa4
movq 0x10(%r14), %rsi
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x117a9
testb $0x1, %r15b
movl $0x2, %eax
movl $0x2, %ecx
cmovel %r15d, %ecx
cmpl $0x6, %r15d
cmovll %eax, %ecx
movl %ecx, %r15d
movq 0x8(%r14), %r12
cmpq $0x0, (%r12)
jne 0x1fcaf
movq 0x8(%r12), %rax
movq %r12, %rdi
callq *0x18(%rax)
movq (%r12), %r12
addq $0x10, %r14
leaq 0xd0d8(%rip), %rsi      # 0x2cd96
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7516
movq %rax, %r13
movq %rax, -0x38(%rbp)
leaq 0xe89d(%rip), %rdx      # 0x2e576
movq %rbx, %rdi
movq %rax, %rsi
movl $0x1, %ecx
callq 0x8653
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x8653
movslq %r15d, %r13
decl %r15d
leaq -0x8(,%r13,8), %rsi
xorl %edi, %edi
callq *0x18576(%rip)          # 0x38288
movq %rax, %r12
movq -0x38(%rbp), %rax
movq %rax, (%r12)
leaq 0x8(%r12), %rdi
leaq -0x10(,%r13,8), %rdx
movq %r14, %rsi
callq 0x6320
movq %rbx, %rdi
movl %r15d, %esi
movq %r12, %rdx
callq 0x10562
movl %eax, %ebx
movq %r12, %rdi
xorl %esi, %esi
callq *0x1853b(%rip)          # 0x38288
movl %ebx, %eax
jmp 0x1fe8a
movl $0x1, %ecx
jmp 0x1fed4
xorl %r12d, %r12d
cmpl $0x2, %r15d
je 0x1fe87
addl $-0x2, %r15d
addq $0x10, %r14
movq %rbx, %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x99ca
movq %rax, -0x30(%rbp)
testq %rax, %rax
je 0x1fe81
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 0x1fdad
movq %rbx, %rdi
callq 0x759a
movq %r14, (%rbx)
jmp 0x1fe87
movq 0x10(%r14), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xf0bd
movl $0x1, %r12d
testl %eax, %eax
jne 0x1fe87
movq 0x18(%r15), %rax
cmpl $-0x1, 0x20(%rax)
jl 0x1fe87
movq 0x10(%r14), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf0bd
movq $-0x1, %r15
testl %eax, %eax
jne 0x1fe5b
movq 0x18(%r14), %rax
movl 0x20(%rax), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
movslq %ecx, %r15
jmp 0x1fe5b
movq 0x10(%r14), %rsi
addq $0x18, %r14
addl $-0x3, %r15d
movq %rbx, %rdi
movq %r14, %rdx
movl %r15d, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
jmp 0x1febc
movq 0x10(%r14), %rsi
addq $0x18, %r14
addl $-0x3, %r15d
leaq -0x30(%rbp), %r8
movq %rbx, %rdi
movq %r14, %rdx
movl %r15d, %ecx
xorl %r9d, %r9d
callq 0xf714
testl %eax, %eax
js 0x1fe81
sete %al
movzbl %al, %r15d
movq %rbx, %rdi
callq 0xae58
movq %rax, %r14
leaq 0x16473(%rip), %rax     # 0x362e0
movq %rax, 0x8(%r14)
movq $0x0, (%r14)
movq %r15, 0x18(%r14)
jmp 0x1ff87
movl $0x1, %r12d
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%r14), %rsi
movslq %r15d, %rax
addl $-0x4, %r15d
movq -0x8(%r14,%rax,8), %r8
addq $0x18, %r14
movq %rbx, %rdi
movq %r14, %rdx
movl %r15d, %ecx
movl $0x1, %r9d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf780
movl $0x2, %ecx
movq 0x10(%r14), %rsi
cmpl $0x4, %r15d
jne 0x1fee4
movq 0x18(%r14), %rdx
jmp 0x1fee6
xorl %edx, %edx
movq %rbx, %rdi
movl %ecx, %r8d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11667
movq 0x10(%r14), %rsi
movslq %r15d, %rax
addl $-0x4, %r15d
movq -0x8(%r14,%rax,8), %r8
addq $0x18, %r14
movq %rbx, %rdi
movq %r14, %rdx
movl %r15d, %ecx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x24dd1
addq $0x10, %r14
addl $-0x2, %r15d
movq %rbx, %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0xf3fd
movq %rax, %r14
movq %rax, -0x30(%rbp)
incl 0x10(%rax)
jmp 0x1ff8b
movq 0x10(%r14), %rsi
addq $0x18, %r14
addl $-0x3, %r15d
leaq -0x30(%rbp), %r8
movl $0x1, %r12d
movq %rbx, %rdi
movq %r14, %rdx
movl %r15d, %ecx
movl $0x1, %r9d
callq 0xf714
testl %eax, %eax
jne 0x1fe87
movq -0x30(%rbp), %r14
incl 0x10(%r14)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x1ffa4
movq %rbx, %rdi
callq 0x759a
movq %r14, (%rbx)
xorl %r12d, %r12d
jmp 0x1fe87