// File: /workspace/github_c_makefile_star2_O0/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
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xd9d0
movl %eax, -0x2c(%rbp)
cmpl $0x64, -0x2c(%rbp)
jne 0xe532
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xdc10
movl %eax, -0x4(%rbp)
jmp 0xe68f
cmpl $0x0, -0x2c(%rbp)
jne 0xe660
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xe595
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rsi
xorl %edx, %edx
callq 0xe4f0
movl %eax, -0x2c(%rbp)
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x58(%rax)
jmp 0xe65e
movq -0x18(%rbp), %rax
cmpl $0x0, 0x28(%rax)
je 0xe616
movq -0x18(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
callq 0x89b0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3a, %eax
jne 0xe5d3
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movl -0x3c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xe5b0
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
movl -0x3c(%rbp), %edx
callq 0x7990
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rdi
addq $0x10, %rdi
movq -0x50(%rbp), %rsi
callq 0xe6a0
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x7a10
jmp 0xe636
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
addq $0x10, %rdi
movq -0x18(%rbp), %rsi
callq 0xe6a0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0xe65c
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, 0xa0(%rax)
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
jmp 0xe65e
jmp 0xe660
jmp 0xe662
cmpl $0x0, -0x2c(%rbp)
je 0xe689
movl -0x1c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xe689
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x2c8ba(%rip), %rsi     # 0x3af3c
movb $0x0, %al
callq 0x6b40
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)