// File: /workspace/github_c_makefile_star2_O3/msteveb[P]autosetup/./jimsh0.c
// Function: JimDictWith
static int JimDictWith(Jim_Interp *interp, Jim_Obj *dictVarName, Jim_Obj *const *keyv, int keyc, Jim_Obj *scriptObj)
{
    int i;
    Jim_Obj *objPtr;
    Jim_Obj *dictObj;
    Jim_Obj **dictValues;
    int len;
    int ret = JIM_OK;


    dictObj = Jim_GetVariable(interp, dictVarName, JIM_ERRMSG);
    if (dictObj == NULL || Jim_DictKeysVector(interp, dictObj, keyv, keyc, &objPtr, JIM_ERRMSG) != JIM_OK) {
        return JIM_ERR;
    }

    dictValues = Jim_DictPairs(interp, objPtr, &len);
    if (len && dictValues == NULL) {
        return JIM_ERR;
    }
    for (i = 0; i < len; i += 2) {
        if (Jim_SetVariable(interp, dictValues[i], dictValues[i + 1]) == JIM_ERR) {
            return JIM_ERR;
        }
    }


    if (Jim_Length(scriptObj)) {
        ret = Jim_EvalObj(interp, scriptObj);


        if (ret == JIM_OK && Jim_GetVariable(interp, dictVarName, 0) != NULL) {

            Jim_Obj **newkeyv = Jim_Alloc(sizeof(*newkeyv) * (keyc + 1));
            for (i = 0; i < keyc; i++) {
                newkeyv[i] = keyv[i];
            }

            for (i = 0; i < len; i += 2) {

                if (Jim_StringCompareObj(interp, dictVarName, dictValues[i], 0) != 0) {

                    objPtr = Jim_GetVariable(interp, dictValues[i], 0);
                    newkeyv[keyc] = dictValues[i];
                    Jim_SetDictKeysVector(interp, dictVarName, newkeyv, keyc + 1, objPtr, JIM_NORESULT);
                }
            }
            Jim_Free(newkeyv);
        }
    }

    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, -0x40(%rbp)
movl %ecx, %ebx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %edx
callq 0x98e7
testq %rax, %rax
je 0x24689
movq %rax, %rsi
movq %r12, -0x38(%rbp)
movq %r14, -0x48(%rbp)
testl %ebx, %ebx
movl %ebx, -0x2c(%rbp)
jle 0x24664
movl %ebx, %r14d
xorl %r12d, %r12d
leaq -0x50(%rbp), %r13
movq -0x38(%rbp), %rax
movq (%rax,%r12,8), %rdx
movl $0x1, %ebx
movq %r15, %rdi
movq %r13, %rcx
movl $0x1, %r8d
callq 0xf4bf
testl %eax, %eax
jne 0x2468e
movq -0x50(%rbp), %rsi
incq %r12
cmpq %r12, %r14
jne 0x24636
leaq -0x54(%rbp), %rbx
movq %r15, %rdi
movq %rbx, %rdx
callq 0xf69a
movq %rax, %r13
movl (%rbx), %r14d
testl %r14d, %r14d
setne %al
testq %r13, %r13
sete %cl
testb %cl, %al
je 0x2469f
movl $0x1, %ebx
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %r14d, %r14d
jle 0x246c5
xorl %ebx, %ebx
movq (%r13,%rbx,8), %rsi
movq 0x8(%r13,%rbx,8), %rdx
movq %r15, %rdi
callq 0x876e
testl %eax, %eax
jne 0x24689
addq $0x2, %rbx
cmpl %ebx, %r14d
jg 0x246a6
movq -0x40(%rbp), %rbx
cmpq $0x0, (%rbx)
jne 0x246d9
movq 0x8(%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
cmpl $0x0, 0x14(%rbx)
je 0x247bb
movq %r15, %rdi
movq %rbx, %rsi
callq 0x908a
movl %eax, %ebx
testl %eax, %eax
jne 0x2468e
xorl %ebx, %ebx
movq %r15, %rdi
movq -0x48(%rbp), %rsi
xorl %edx, %edx
callq 0x98e7
testq %rax, %rax
je 0x2468e
movl -0x2c(%rbp), %ebx
movslq %ebx, %rax
movq %rax, -0x40(%rbp)
leaq 0x8(,%rax,8), %rsi
xorl %edi, %edi
callq *0x12b65(%rip)          # 0x37288
testl %ebx, %ebx
movq -0x38(%rbp), %rsi
jle 0x2473f
movl %ebx, %edi
xorl %ecx, %ecx
movq (%rsi,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
incq %rcx
cmpq %rcx, %rdi
jne 0x2472f
movq %rax, -0x38(%rbp)
testl %r14d, %r14d
jle 0x247a8
incl -0x2c(%rbp)
xorl %r12d, %r12d
movq -0x48(%rbp), %rbx
movq (%r13,%r12,8), %rdx
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0xb312
testl %eax, %eax
je 0x2479f
movq (%r13,%r12,8), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x98e7
movq (%r13,%r12,8), %rcx
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %r8
movq %rcx, (%r8,%rdx,8)
movq %r15, %rdi
movq %rbx, %rsi
movq %r8, %rdx
movl -0x2c(%rbp), %ecx
movq %rax, %r8
movl $0x10, %r9d
callq 0xf76e
addq $0x2, %r12
cmpl %r12d, %r14d
jg 0x24752
xorl %ebx, %ebx
movq -0x38(%rbp), %rdi
xorl %esi, %esi
callq *0x12ad2(%rip)          # 0x37288
jmp 0x2468e
xorl %ebx, %ebx
jmp 0x2468e