// File: /workspace/github_c_makefile_star2_O2/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
subq $0x18, %rsp
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r14
callq 0xb6e9
testl %eax, %eax
je 0xbd17
movl %eax, %r12d
cmpl $0x64, %eax
jne 0xbdde
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xb86c
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0xbd45
movq 0x58(%r14), %r13
movq %rcx, 0x58(%r14)
movq (%rax), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0xbccd
movl %eax, %r12d
movq %r13, 0x58(%r14)
jmp 0xbdde
cmpl $0x0, 0x28(%rbx)
je 0xbda0
leaq -0x2c(%rbp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7fc7
movl (%r12), %edx
cmpb $0x3a, (%rax)
jne 0xbd6d
incq %rax
decl %edx
movl %edx, -0x2c(%rbp)
jmp 0xbd5e
movq 0x60(%r14), %r12
movq %r14, %rdi
movq %rax, %rsi
callq 0x7363
movq %rax, %r13
movq %r12, -0x38(%rbp)
leaq 0x10(%r12), %rdi
movq %rax, %rsi
callq 0xa254
movl %eax, %r12d
movq %r14, %rdi
movq %r13, %rsi
callq 0x73bf
jmp 0xbdb7
movq 0x58(%r14), %rax
movq %rax, -0x38(%rbp)
leaq 0x10(%rax), %rdi
movq %rbx, %rsi
callq 0xa254
movl %eax, %r12d
testl %r12d, %r12d
je 0xbdc2
pushq $0x1
popq %r12
jmp 0xbdde
movq 0xa0(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xa0(%r14)
movq -0x38(%rbp), %rcx
movq %rax, (%rcx)
xorl %r12d, %r12d
testb $0x1, %r15b
je 0xbdfd
testl %r12d, %r12d
je 0xbdfd
leaq 0x1aff9(%rip), %rsi     # 0x26de9
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x68a7
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq