// File: /workspace/github_c_makefile_star2_O0/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
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
leaq 0x393ed(%rip), %rcx     # 0x46dd8
cmpq %rcx, 0x8(%rax)
jne 0xda3c
movq -0x18(%rbp), %rax
cmpl $0x0, 0x28(%rax)
je 0xda09
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0xda15
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jne 0xda3a
movl $0x0, -0x4(%rbp)
jmp 0xdbfd
jmp 0xda5b
movq -0x18(%rbp), %rax
leaq 0x393b9(%rip), %rcx     # 0x46e00
cmpq %rcx, 0x8(%rax)
jne 0xda59
movl $0x64, -0x4(%rbp)
jmp 0xdbfd
jmp 0xda5b
movq -0x18(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x89b0
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x30(%rbp)
je 0xdaa8
movq -0x20(%rbp), %rax
movl -0x30(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x29, %eax
jne 0xdaa8
movq -0x20(%rbp), %rdi
movl $0x28, %esi
callq 0x61d0
cmpq $0x0, %rax
je 0xdaa8
movl $0x64, -0x4(%rbp)
jmp 0xdbfd
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3a, %eax
jne 0xdb31
movq -0x20(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x3a, %eax
jne 0xdb31
jmp 0xdac3
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3a, %eax
jne 0xdae6
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movl -0x30(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xdac3
movl $0x1, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x30(%rbp), %edx
callq 0x7990
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rdi
addq $0x10, %rdi
movq -0x40(%rbp), %rsi
callq 0x1f6a0
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x7a10
jmp 0xdb82
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
addq $0x10, %rdi
movq -0x18(%rbp), %rsi
callq 0x1f6a0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0xdb80
movq -0x28(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0xdb80
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x1f6a0
movq %rax, -0x38(%rbp)
jmp 0xdb82
cmpq $0x0, -0x38(%rbp)
jne 0xdb92
movl $0x1, -0x4(%rbp)
jmp 0xdbfd
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xdbc2
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
cmpq $0x0, 0x8(%rax)
je 0xdbc2
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq *%rax
movq -0x18(%rbp), %rax
leaq 0x3920b(%rip), %rcx     # 0x46dd8
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x28(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)