// File: /workspace/github_c_makefile_star2_O3/msteveb[P]autosetup/./jimsh0.c
// Function: DictAddElement
static int DictAddElement(Jim_Interp *interp, Jim_Obj *objPtr,
    Jim_Obj *keyObjPtr, Jim_Obj *valueObjPtr)
{
    Jim_Dict *dict = objPtr->internalRep.dictValue;
    if (valueObjPtr == NULL) {

        int tvoffset = JimDictHashFind(dict, keyObjPtr, DICT_HASH_REMOVE);
        if (tvoffset) {

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

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


                JimDictHashFind(dict, dict->table[tvoffset - 1], tvoffset);
            }
            return JIM_OK;
        }
        return JIM_ERR;
    }
    else {

        int tvoffset = JimDictAdd(dict, keyObjPtr);
        if (tvoffset) {

            Jim_IncrRefCount(valueObjPtr);
            Jim_DecrRefCount(interp, dict->table[tvoffset]);
            dict->table[tvoffset] = valueObjPtr;
        }
        else {
            if (dict->maxLen == dict->len) {

                if (dict->maxLen < 4) {
                    dict->maxLen = 4;
                }
                else {
                    dict->maxLen *= 2;
                }
                dict->table = Jim_Realloc(dict->table, dict->maxLen * sizeof(*dict->table));
            }
            Jim_IncrRefCount(keyObjPtr);
            Jim_IncrRefCount(valueObjPtr);

            dict->table[dict->len++] = keyObjPtr;
            dict->table[dict->len++] = valueObjPtr;

        }
        return JIM_OK;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r15
testq %rcx, %rcx
je 0xf2ce
movq %rcx, %r14
movq %rbx, %rdi
movq %r12, %rsi
callq 0x193f8
testl %eax, %eax
je 0xf375
incl 0x10(%r14)
movq 0x18(%rbx), %rcx
movslq %eax, %r12
movq (%rcx,%r12,8), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %edx
movl %edx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xf2c5
movq %r15, %rdi
callq 0x758c
movq 0x18(%rbx), %rcx
movq %r14, (%rcx,%r12,8)
jmp 0xf3d2
movq %rbx, %rdi
movq %r12, %rsi
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
callq 0xf54a
testl %eax, %eax
je 0xf3a7
movl %eax, %r12d
movq 0x18(%rbx), %rax
movslq %r12d, %r14
movq -0x8(%rax,%r14,8), %rsi
movl 0x10(%rsi), %ecx
leal -0x1(%rcx), %edx
movl %edx, 0x10(%rsi)
cmpl $0x1, %ecx
jg 0xf30f
movq %r15, %rdi
callq 0x758c
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xf329
movq %r15, %rdi
callq 0x758c
movslq 0x20(%rbx), %rax
leal -0x2(%rax), %ecx
movl %ecx, 0x20(%rbx)
leal -0x1(%rax), %ecx
xorl %r15d, %r15d
cmpl %ecx, %r12d
je 0xf3d5
leaq -0x1(%r14), %rcx
movq 0x18(%rbx), %rdx
movq -0x10(%rdx,%rax,8), %rsi
movq %rsi, (%rdx,%rcx,8)
movq 0x18(%rbx), %rdx
movq -0x8(%rdx,%rax,8), %rax
movq %rax, (%rdx,%r14,8)
movq 0x18(%rbx), %rax
movq (%rax,%rcx,8), %rsi
movq %rbx, %rdi
movl %r14d, %edx
callq 0xf54a
jmp 0xf3d5
movl 0x20(%rbx), %ecx
movl 0x24(%rbx), %eax
cmpl %ecx, %eax
jne 0xf3af
leal (%rax,%rax), %ecx
cmpl $0x4, %eax
movl $0x4, %esi
cmovgel %ecx, %esi
movl %esi, 0x24(%rbx)
movq 0x18(%rbx), %rdi
shlq $0x3, %rsi
callq *0x27eea(%rip)          # 0x37288
movq %rax, 0x18(%rbx)
movl 0x20(%rbx), %ecx
jmp 0xf3b3
movl $0x1, %r15d
jmp 0xf3d5
movq 0x18(%rbx), %rax
incl 0x10(%r12)
incl 0x10(%r14)
movslq %ecx, %rcx
movq %r12, (%rax,%rcx,8)
movq 0x18(%rbx), %rax
leal 0x2(%rcx), %edx
movl %edx, 0x20(%rbx)
movq %r14, 0x8(%rax,%rcx,8)
xorl %r15d, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq