// File: /workspace/github_c_makefile_star2_O2/msteveb[P]autosetup/./jimsh0.c
// Function: SetDictFromAny
static int SetDictFromAny(Jim_Interp *interp, struct Jim_Obj *objPtr)
{
    int listlen;

    if (objPtr->typePtr == &dictObjType) {
        return JIM_OK;
    }

    if (Jim_IsList(objPtr) && Jim_IsShared(objPtr)) {
        Jim_String(objPtr);
    }

    listlen = Jim_ListLength(interp, objPtr);
    if (listlen % 2) {
        Jim_SetResultString(interp, "missing value to go with key", -1);
        return JIM_ERR;
    }
    else {

        Jim_Dict *dict = JimDictNew(interp, 0, listlen);
        int i;


        dict->table = objPtr->internalRep.listValue.ele;
        dict->maxLen = objPtr->internalRep.listValue.maxLen;


        for (i = 0; i < listlen; i += 2) {
            int tvoffset = JimDictAdd(dict, dict->table[i]);
            if (tvoffset) {


                Jim_DecrRefCount(interp, dict->table[tvoffset]);

                dict->table[tvoffset] = dict->table[i + 1];

                Jim_DecrRefCount(interp, dict->table[i]);
            }
            else {
                if (dict->len != i) {
                    dict->table[dict->len++] = dict->table[i];
                    dict->table[dict->len++] = dict->table[i + 1];
                }
                else {
                    dict->len += 2;
                }
            }
        }

        objPtr->typePtr = &dictObjType;
        objPtr->internalRep.dictValue = dict;

        return JIM_OK;
    }
}

// Assembly:
movq 0x8(%rsi), %rax
leaq 0x23328(%rip), %rcx     # 0x31430
cmpq %rcx, %rax
je 0xe228
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x232dc(%rip), %rcx     # 0x31408
cmpq %rcx, %rax
jne 0xe140
cmpl $0x2, 0x10(%r14)
jl 0xe140
movq %r14, %rdi
callq 0x7340
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8b3c
movl %eax, %r12d
testb $0x1, %r12b
jne 0xe242
xorl %r13d, %r13d
xorl %edi, %edi
movl %r12d, %esi
callq 0xe46b
movq %rax, %r15
movq 0x18(%r14), %rax
movq %rax, 0x18(%r15)
movq %r14, -0x30(%rbp)
movl 0x24(%r14), %eax
movl %eax, 0x24(%r15)
movslq %r12d, %r12
cmpq %r12, %r13
jge 0xe22b
movq 0x18(%r15), %rax
movq (%rax,%r13,8), %rsi
movq %r15, %rdi
callq 0x170c7
testl %eax, %eax
je 0xe1ea
movq 0x18(%r15), %rcx
movslq %eax, %r14
movq (%rcx,%r14,8), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %edx
movl %edx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xe1c1
movq %rbx, %rdi
callq 0x73bf
movq 0x18(%r15), %rcx
movq 0x8(%rcx,%r13,8), %rax
movq %rax, (%rcx,%r14,8)
movq 0x18(%r15), %rax
movq (%rax,%r13,8), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xe21f
movq %rbx, %rdi
callq 0x73bf
jmp 0xe21f
movl 0x20(%r15), %eax
cmpq %rax, %r13
jne 0xe1fc
addl $0x2, %eax
movl %eax, 0x20(%r15)
jmp 0xe21f
cltq
movq 0x18(%r15), %rcx
movq (%rcx,%r13,8), %rdx
movq %rdx, (%rcx,%rax,8)
movq 0x18(%r15), %rcx
movq 0x8(%rcx,%r13,8), %rdx
leal 0x2(%rax), %esi
movl %esi, 0x20(%r15)
movq %rdx, 0x8(%rcx,%rax,8)
addq $0x2, %r13
jmp 0xe17f
xorl %eax, %eax
retq
movq -0x30(%rbp), %rax
leaq 0x231fa(%rip), %rcx     # 0x31430
movq %rcx, 0x8(%rax)
movq %r15, 0x18(%rax)
xorl %eax, %eax
jmp 0xe279
leaq 0x19b22(%rip), %rsi     # 0x27d6b
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0x7363
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 0xe273
movq %rbx, %rdi
callq 0x73bf
movq %r14, (%rbx)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq