// File: /workspace/github_c_makefile_star2_O3/msteveb[P]autosetup/./jimsh0.c
// Function: SetVariableFromAny
static int SetVariableFromAny(Jim_Interp *interp, struct Jim_Obj *objPtr)
{
    const char *varName;
    Jim_CallFrame *framePtr;
    int global;
    int len;
    Jim_VarVal *vv;


    if (objPtr->typePtr == &variableObjType) {
        framePtr = objPtr->internalRep.varValue.global ? interp->topFramePtr : interp->framePtr;
        if (objPtr->internalRep.varValue.callFrameId == framePtr->id) {

            return JIM_OK;
        }

    }
    else if (objPtr->typePtr == &dictSubstObjType) {
        return JIM_DICT_SUGAR;
    }

    varName = Jim_GetString(objPtr, &len);


    if (len && varName[len - 1] == ')' && strchr(varName, '(') != NULL) {
        return JIM_DICT_SUGAR;
    }

    if (varName[0] == ':' && varName[1] == ':') {
        while (*varName == ':') {
            varName++;
            len--;
        }
        global = 1;
        framePtr = interp->topFramePtr;

        Jim_Obj *tempObj = Jim_NewStringObj(interp, varName, len);
        vv = JimFindVariable(&framePtr->vars, tempObj);
        Jim_FreeNewObj(interp, tempObj);
    }
    else {
        global = 0;
        framePtr = interp->framePtr;

        vv = JimFindVariable(&framePtr->vars, objPtr);
        if (vv == NULL && framePtr->staticVars) {

            vv = JimFindVariable(framePtr->staticVars, objPtr);
        }
    }

    if (vv == NULL) {
        return JIM_ERR;
    }


    Jim_FreeIntRep(interp, objPtr);
    objPtr->typePtr = &variableObjType;
    objPtr->internalRep.varValue.callFrameId = framePtr->id;
    objPtr->internalRep.varValue.vv = vv;
    objPtr->internalRep.varValue.global = global;
    return JIM_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x8(%rsi), %rax
leaq 0x29b7b(%rip), %rcx     # 0x35d58
cmpq %rcx, %rax
je 0xc1fc
movq %rdi, %r14
leaq 0x29b94(%rip), %rcx     # 0x35d80
cmpq %rcx, %rax
jne 0xc21d
movl $0x64, %r13d
jmp 0xc34e
xorl %ecx, %ecx
cmpl $0x0, 0x28(%rbx)
setne %cl
movq %rdi, %r14
movq 0x58(%rdi,%rcx,8), %rcx
movq 0x20(%rbx), %rdx
xorl %r13d, %r13d
cmpq (%rcx), %rdx
je 0xc34e
movq (%rbx), %r15
testq %r15, %r15
jne 0xc22e
movq %rbx, %rdi
callq *0x18(%rax)
movq (%rbx), %r15
movslq 0x14(%rbx), %r12
testq %r12, %r12
je 0xc25b
cmpb $0x29, -0x1(%r15,%r12)
jne 0xc25b
movq %r15, %rdi
movl $0x28, %esi
callq 0x61c0
movl $0x64, %r13d
testq %rax, %rax
jne 0xc34e
cmpb $0x3a, (%r15)
jne 0xc2a5
cmpb $0x3a, 0x1(%r15)
jne 0xc2a5
movq %r14, %r13
decl %r12d
cmpb $0x3a, 0x1(%r15)
leaq 0x1(%r15), %r15
je 0xc26b
movq 0x60(%r13), %r14
movq %r13, %rdi
movq %r15, %rsi
movl %r12d, %edx
callq 0x7508
movq %rax, %r15
leaq 0x10(%r14), %rdi
movq %rax, %rsi
callq 0xac6b
testq %rax, %rax
je 0xc2f6
movq 0x8(%rax), %r12
jmp 0xc2f9
movq %r14, %r13
movq 0x58(%r14), %r14
leaq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0xac6b
testq %rax, %rax
je 0xc2c9
movq 0x8(%rax), %r12
xorl %r15d, %r15d
testq %r12, %r12
jne 0xc30f
movq %r13, -0x30(%rbp)
movq 0x40(%r14), %rdi
movl $0x1, %r13d
testq %rdi, %rdi
je 0xc34e
movq %rbx, %rsi
callq 0xac6b
testq %rax, %rax
je 0xc34e
movq 0x8(%rax), %r12
xorl %r15d, %r15d
movq -0x30(%rbp), %r13
jmp 0xc30a
xorl %r12d, %r12d
movq %r13, %rdi
movq %r15, %rsi
callq 0x758c
movl $0x1, %r15d
testq %r12, %r12
je 0xc348
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0xc329
movq 0x8(%rax), %rax
testq %rax, %rax
je 0xc329
movq %r13, %rdi
movq %rbx, %rsi
callq *%rax
leaq 0x29a28(%rip), %rax     # 0x35d58
movq %rax, 0x8(%rbx)
movq (%r14), %rax
movq %rax, 0x20(%rbx)
movq %r12, 0x18(%rbx)
movl %r15d, 0x28(%rbx)
xorl %r13d, %r13d
jmp 0xc34e
movl $0x1, %r13d
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq