// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
leaq 0x35855(%rip), %rcx     # 0x46490
cmpq %rcx, 0x8(%rax)
jne 0x10c4d
movl $0x0, -0x4(%rbp)
jmp 0x10ea0
movq -0x18(%rbp), %rdi
callq 0x109d0
cmpl $0x0, %eax
je 0x10c6e
movq -0x18(%rbp), %rax
cmpl $0x1, 0x10(%rax)
jle 0x10c6e
movq -0x18(%rbp), %rdi
callq 0x7960
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9b50
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
je 0x10cf2
jmp 0x10c90
movq -0x10(%rbp), %rdi
leaq 0x2b442(%rip), %rsi     # 0x3c0dd
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7990
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x10cdb
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x7a10
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x10ea0
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %edx
xorl %esi, %esi
callq 0x11210
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movl 0x24(%rax), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x10e7e
movq -0x30(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x214b0
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x38(%rbp)
je 0x10df0
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x10d92
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x7a10
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x34(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x38(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x10dee
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x7a10
jmp 0x10e6e
movq -0x30(%rbp), %rax
movl 0x20(%rax), %eax
cmpl -0x34(%rbp), %eax
je 0x10e5f
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x30(%rbp), %rsi
movl 0x20(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x20(%rsi)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x34(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x30(%rbp), %rsi
movl 0x20(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x20(%rsi)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x10e6c
movq -0x30(%rbp), %rax
movl 0x20(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x20(%rax)
jmp 0x10e6e
jmp 0x10e70
movl -0x34(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x34(%rbp)
jmp 0x10d29
movq -0x18(%rbp), %rax
leaq 0x35607(%rip), %rcx     # 0x46490
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)