// File: /workspace/github_c_makefile_star2_O3/msteveb[P]autosetup/./jimsh0.c
// Function: Jim_UnsetVariable
int Jim_UnsetVariable(Jim_Interp *interp, Jim_Obj *nameObjPtr, int flags)
{
    Jim_VarVal *vv;
    int retval;
    Jim_CallFrame *framePtr;

    retval = SetVariableFromAny(interp, nameObjPtr);
    if (retval == JIM_DICT_SUGAR) {

        return JimDictSugarSet(interp, nameObjPtr, NULL);
    }
    else if (retval == JIM_OK) {
        vv = nameObjPtr->internalRep.varValue.vv;


        if (vv->linkFramePtr) {
            framePtr = interp->framePtr;
            interp->framePtr = vv->linkFramePtr;
            retval = Jim_UnsetVariable(interp, vv->objPtr, JIM_NONE);
            interp->framePtr = framePtr;
        }
        else {
            if (nameObjPtr->internalRep.varValue.global) {
                int len;
                const char *name = Jim_GetString(nameObjPtr, &len);
                while (*name == ':') {
                    name++;
                    len--;
                }
                framePtr = interp->topFramePtr;
                Jim_Obj *tempObj = Jim_NewStringObj(interp, name, len);
                retval = JimUnsetVariable(&framePtr->vars, tempObj);
                Jim_FreeNewObj(interp, tempObj);
            }
            else {
                framePtr = interp->framePtr;
                retval = JimUnsetVariable(&framePtr->vars, nameObjPtr);
            }

            if (retval == JIM_OK) {

                framePtr->id = interp->callFrameEpoch++;
            }
        }
    }
    if (retval != JIM_OK && (flags & JIM_ERRMSG)) {
        Jim_SetResultFormatted(interp, "can't unset \"%#s\": no such variable", nameObjPtr);
    }
    return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r14
callq 0xc1c1
testl %eax, %eax
je 0xc83b
movl %eax, %r12d
cmpl $0x64, %eax
jne 0xc8f1
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc360
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0xc869
movq 0x58(%r14), %r13
movq %rcx, 0x58(%r14)
movq (%rax), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0xc7f4
movl %eax, %r12d
movq %r13, 0x58(%r14)
jmp 0xc8f1
cmpl $0x0, 0x28(%rbx)
je 0xc89d
movq (%rbx), %rax
testq %rax, %rax
jne 0xc884
movq 0x8(%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movq (%rbx), %rax
movl 0x14(%rbx), %edx
cmpb $0x3a, (%rax)
jne 0xc8b6
leaq 0x1(%rax), %rsi
decl %edx
cmpb $0x3a, 0x1(%rax)
movq %rsi, %rax
je 0xc88c
jmp 0xc8b9
movq 0x58(%r14), %rax
movq %rax, -0x30(%rbp)
leaq 0x10(%rax), %rdi
movq %rbx, %rsi
callq 0xaab0
movl %eax, %r13d
jmp 0xc8e6
movq %rax, %rsi
movq 0x60(%r14), %r13
movq %r14, %rdi
callq 0x7508
movq %rax, %r12
movq %r13, -0x30(%rbp)
leaq 0x10(%r13), %rdi
movq %rax, %rsi
callq 0xaab0
movl %eax, %r13d
movq %r14, %rdi
movq %r12, %rsi
callq 0x758c
movl $0x1, %r12d
testl %r13d, %r13d
je 0xc922
testb $0x1, %r15b
je 0xc910
testl %r12d, %r12d
je 0xc910
leaq 0x1e496(%rip), %rsi     # 0x2ad99
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x6923
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xa0(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xa0(%r14)
movq -0x30(%rbp), %rcx
movq %rax, (%rcx)
xorl %r12d, %r12d
jmp 0xc910