// File: /workspace/github_c_makefile_star2_O0/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
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x1101f
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
callq 0x11350
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x11013
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x34(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x10f3f
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x34(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
callq 0x7a10
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 0x10f76
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x7a10
movq -0x30(%rbp), %rax
movl 0x20(%rax), %ecx
subl $0x2, %ecx
movl %ecx, 0x20(%rax)
movl -0x34(%rbp), %eax
movq -0x30(%rbp), %rcx
movl 0x20(%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
je 0x11007
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x30(%rbp), %rcx
movslq 0x20(%rcx), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x34(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x30(%rbp), %rcx
movl 0x20(%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x34(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x34(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
movl -0x34(%rbp), %edx
callq 0x11350
movl $0x0, -0x4(%rbp)
jmp 0x11152
movl $0x1, -0x4(%rbp)
jmp 0x11152
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x214b0
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x38(%rbp)
je 0x11092
movq -0x28(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
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 0x11079
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x7a10
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x38(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x1114b
movq -0x30(%rbp), %rax
movl 0x24(%rax), %eax
movq -0x30(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jne 0x110ed
movq -0x30(%rbp), %rax
cmpl $0x4, 0x24(%rax)
jge 0x110b9
movq -0x30(%rbp), %rax
movl $0x4, 0x24(%rax)
jmp 0x110c5
movq -0x30(%rbp), %rax
movl 0x24(%rax), %ecx
shll %ecx
movl %ecx, 0x24(%rax)
movq 0x371c4(%rip), %rax     # 0x48290
movq -0x30(%rbp), %rcx
movq 0x18(%rcx), %rdi
movq -0x30(%rbp), %rcx
movslq 0x24(%rcx), %rsi
shlq $0x3, %rsi
callq *%rax
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x28(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x20(%rbp), %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 -0x28(%rbp), %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)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)