// File: /workspace/github_c_makefile_star2_O1/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 0x272b8(%rip), %rcx     # 0x36380
cmpq %rcx, %rax
je 0xf23a
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x2726c(%rip), %rcx     # 0x36358
cmpq %rcx, %rax
jne 0xf104
cmpl $0x2, 0x10(%r14)
jl 0xf104
cmpq $0x0, (%r14)
jne 0xf104
movq %r14, %rdi
callq *0x18(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe338
movl 0x20(%r14), %r15d
testb $0x1, %r15b
jne 0xf23d
movl $0x30, %esi
xorl %edi, %edi
callq *0x2915e(%rip)          # 0x38288
movq %rax, %r12
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
testl %r15d, %r15d
je 0xf14b
movq %r12, %rdi
movl %r15d, %esi
callq 0x19906
movq 0x18(%r14), %rax
movq %rax, 0x18(%r12)
movq %r14, -0x30(%rbp)
movl 0x24(%r14), %eax
movl %eax, 0x24(%r12)
testl %r15d, %r15d
jle 0xf223
xorl %r13d, %r13d
movq 0x18(%r12), %rax
movq (%rax,%r13,8), %rsi
movq %r12, %rdi
callq 0x198c3
testl %eax, %eax
je 0xf1d3
movq 0x18(%r12), %rcx
movslq %eax, %r14
movq (%rcx,%r14,8), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xf1a4
movq %rbx, %rdi
callq 0x759a
movq 0x18(%r12), %rax
movq 0x8(%rax,%r13,8), %rcx
movq %rcx, (%rax,%r14,8)
movq 0x18(%r12), %rax
movq (%rax,%r13,8), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xf216
movq %rbx, %rdi
callq 0x759a
jmp 0xf216
movl 0x20(%r12), %eax
cmpq %rax, %r13
jne 0xf1e7
addl $0x2, %eax
movl %eax, 0x20(%r12)
jmp 0xf216
cltq
movq 0x18(%r12), %rcx
movq (%rcx,%r13,8), %rdx
leaq 0x1(%rax), %rsi
movl %esi, 0x20(%r12)
movq %rdx, (%rcx,%rax,8)
movq 0x18(%r12), %rcx
movq 0x8(%rcx,%r13,8), %rdx
leal 0x2(%rax), %esi
movl %esi, 0x20(%r12)
movq %rdx, 0x8(%rcx,%rax,8)
addq $0x2, %r13
cmpl %r13d, %r15d
jg 0xf16d
movq -0x30(%rbp), %rax
leaq 0x27152(%rip), %rcx     # 0x36380
movq %rcx, 0x8(%rax)
movq %r12, 0x18(%rax)
xorl %eax, %eax
jmp 0xf278
xorl %eax, %eax
retq
leaq 0x1db35(%rip), %rsi     # 0x2cd79
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 0xf270
movq %rbx, %rdi
callq 0x759a
movq %r14, (%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq