// File: /workspace/github_c_makefile_star2_O1/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 0xc1a3
testl %eax, %eax
je 0xc81f
movl %eax, %r12d
cmpl $0x64, %eax
jne 0xc8ea
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 0xc345
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0xc84d
movq 0x58(%r14), %r13
movq %rcx, 0x58(%r14)
movq (%rax), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0xc7d8
movl %eax, %r12d
movq %r13, 0x58(%r14)
jmp 0xc8ea
cmpl $0x0, 0x28(%rbx)
je 0xc87f
cmpq $0x0, (%rbx)
jne 0xc863
movq 0x8(%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movl 0x14(%rbx), %edx
movq (%rbx), %rax
cmpb $0x3a, (%rax)
jne 0xc898
leaq 0x1(%rax), %rsi
decl %edx
cmpb $0x3a, 0x1(%rax)
movq %rsi, %rax
je 0xc86e
jmp 0xc89b
movq 0x58(%r14), %rax
movq %rax, -0x30(%rbp)
leaq 0x10(%rax), %rdi
movq %rbx, %rsi
callq 0xaad2
movl %eax, %r12d
jmp 0xc8c9
movq %rax, %rsi
movq 0x60(%r14), %r12
movq %r14, %rdi
callq 0x7516
movq %rax, %r13
movq %r12, -0x30(%rbp)
leaq 0x10(%r12), %rdi
movq %rax, %rsi
callq 0xaad2
movl %eax, %r12d
movq %r14, %rdi
movq %r13, %rsi
callq 0x759a
testl %r12d, %r12d
jne 0xc8ea
movq 0xa0(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xa0(%r14)
movq -0x30(%rbp), %rcx
movq %rax, (%rcx)
xorl %r12d, %r12d
testb $0x1, %r15b
je 0xc909
testl %r12d, %r12d
je 0xc909
leaq 0x1f4f5(%rip), %rsi     # 0x2bdf1
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x692d
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq