// File: /workspace/github_c_makefile_star2_O2/msteveb[P]autosetup/./jimsh0.c
// Function: Jim_SetDictKeysVector
int Jim_SetDictKeysVector(Jim_Interp *interp, Jim_Obj *varNamePtr,
    Jim_Obj *const *keyv, int keyc, Jim_Obj *newObjPtr, int flags)
{
    Jim_Obj *varObjPtr, *objPtr, *dictObjPtr;
    int shared, i;

    varObjPtr = objPtr = Jim_GetVariable(interp, varNamePtr, flags);
    if (objPtr == NULL) {
        if (newObjPtr == NULL && (flags & JIM_MUSTEXIST)) {

            return JIM_ERR;
        }
        varObjPtr = objPtr = Jim_NewDictObj(interp, NULL, 0);
        if (Jim_SetVariable(interp, varNamePtr, objPtr) != JIM_OK) {
            Jim_FreeNewObj(interp, varObjPtr);
            return JIM_ERR;
        }
    }
    if ((shared = Jim_IsShared(objPtr)))
        varObjPtr = objPtr = Jim_DuplicateObj(interp, objPtr);
    for (i = 0; i < keyc; i++) {
        dictObjPtr = objPtr;


        if (SetDictFromAny(interp, dictObjPtr) != JIM_OK) {
            goto err;
        }

        if (i == keyc - 1) {

            if (Jim_DictAddElement(interp, objPtr, keyv[keyc - 1], newObjPtr) != JIM_OK) {
                if (newObjPtr || (flags & JIM_MUSTEXIST)) {
                    goto err;
                }
            }
            break;
        }


        Jim_InvalidateStringRep(dictObjPtr);
        if (Jim_DictKey(interp, dictObjPtr, keyv[i], &objPtr,
                newObjPtr ? JIM_NONE : JIM_ERRMSG) == JIM_OK) {
            if (Jim_IsShared(objPtr)) {
                objPtr = Jim_DuplicateObj(interp, objPtr);
                DictAddElement(interp, dictObjPtr, keyv[i], objPtr);
            }
        }
        else {
            if (newObjPtr == NULL) {
                goto err;
            }
            objPtr = Jim_NewDictObj(interp, NULL, 0);
            DictAddElement(interp, dictObjPtr, keyv[i], objPtr);
        }
    }

    Jim_InvalidateStringRep(objPtr);
    Jim_InvalidateStringRep(varObjPtr);
    if (Jim_SetVariable(interp, varNamePtr, varObjPtr) != JIM_OK) {
        goto err;
    }

    if (!(flags & JIM_NORESULT)) {
        Jim_SetResult(interp, varObjPtr);
    }
    return JIM_OK;
  err:
    if (shared) {
        Jim_FreeNewObj(interp, varObjPtr);
    }
    return JIM_ERR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, %r15d
movq %r8, -0x30(%rbp)
movq %rcx, -0x50(%rbp)
movq %rdx, -0x58(%rbp)
movq %rsi, %r13
movq %rdi, %r14
movl %r9d, %edx
callq 0x9378
movq %rax, %r12
movq %rax, -0x38(%rbp)
pushq $0x1
popq %rbx
testq %rax, %rax
je 0xe8a8
movl 0x10(%r12), %eax
movl %eax, -0x5c(%rbp)
cmpl $0x2, %eax
movl %r15d, -0x3c(%rbp)
movq %r13, -0x70(%rbp)
jl 0xe7dd
movq %r14, %rdi
movq %r12, %rsi
callq 0x8a95
movq %rax, %r12
movq %rax, -0x38(%rbp)
movq -0x50(%rbp), %rax
leal -0x1(%rax), %ecx
movq %rcx, -0x68(%rbp)
xorl %ebx, %ebx
cmpq $0x0, -0x30(%rbp)
sete %bl
xorl %r15d, %r15d
testl %eax, %eax
cmovlel %r15d, %eax
movq %rax, -0x50(%rbp)
movq %r12, -0x48(%rbp)
movq %r12, %r13
cmpq %r15, -0x50(%rbp)
je 0xe929
movq %r14, %rdi
movq %r13, %rsi
callq 0xe0fd
testl %eax, %eax
jne 0xe950
cmpq %r15, -0x68(%rbp)
je 0xe8f7
movq %r13, %rdi
callq 0x94f7
movq -0x58(%rbp), %rax
movq (%rax,%r15,8), %rdx
movq %r14, %rdi
movq %r13, %rsi
leaq -0x38(%rbp), %rcx
movl %ebx, %r8d
callq 0xe4cf
testl %eax, %eax
je 0xe86c
cmpq $0x0, -0x30(%rbp)
je 0xe950
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xe3f7
jmp 0xe883
movq -0x38(%rbp), %r12
cmpl $0x2, 0x10(%r12)
jl 0xe8a0
movq %r14, %rdi
movq %r12, %rsi
callq 0x8a95
movq %rax, %r12
movq %rax, -0x38(%rbp)
movq -0x58(%rbp), %rax
movq (%rax,%r15,8), %rdx
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rcx
callq 0xe288
incq %r15
jmp 0xe803
cmpq $0x0, -0x30(%rbp)
sete %al
movl %r15d, %ecx
andl $0x8, %ecx
shrl $0x3, %ecx
testb %cl, %al
jne 0xe965
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xe3f7
movq %rax, %r12
movq %rax, -0x38(%rbp)
movq %r14, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x8306
testl %eax, %eax
je 0xe7b6
movq %r14, %rdi
movq %r12, %rsi
callq 0x73bf
jmp 0xe965
movslq -0x68(%rbp), %rax
movq -0x58(%rbp), %rcx
movq (%rcx,%rax,8), %rdx
movq %r14, %rdi
movq %r13, %rsi
movq -0x30(%rbp), %rcx
callq 0xe0b0
testl %eax, %eax
je 0xe929
cmpq $0x0, -0x30(%rbp)
sete %al
testb $0x8, -0x3c(%rbp)
sete %cl
testb %cl, %al
je 0xe950
movq %r13, %rdi
callq 0x94f7
movq -0x48(%rbp), %rbx
movq %rbx, %rdi
callq 0x94f7
movq %r14, %rdi
movq -0x70(%rbp), %rsi
movq %rbx, %rdx
callq 0x8306
testl %eax, %eax
je 0xe976
cmpl $0x2, -0x5c(%rbp)
jl 0xe962
movq %r14, %rdi
movq -0x48(%rbp), %rsi
callq 0x73bf
pushq $0x1
popq %rbx
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
testb $0x10, -0x3c(%rbp)
jne 0xe965
movq -0x48(%rbp), %r15
incl 0x10(%r15)
movq (%r14), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xe99f
movq %r14, %rdi
callq 0x73bf
movq %r15, (%r14)
jmp 0xe965