// File: /workspace/github_c_makefile_star2_O0/msteveb[P]autosetup/./jimsh0.c
// Function: JimInvokeCommand
static int JimInvokeCommand(Jim_Interp *interp, int objc, Jim_Obj *const *objv)
{
    int retcode;
    Jim_Cmd *cmdPtr;
    void *prevPrivData;
    Jim_Obj *tailcallObj = NULL;

#if 0
    printf("invoke");
    int j;
    for (j = 0; j < objc; j++) {
        printf(" '%s'", Jim_String(objv[j]));
    }
    printf("\n");
#endif

    cmdPtr = Jim_GetCommand(interp, objv[0], JIM_ERRMSG);
    if (cmdPtr == NULL) {
        return JimUnknown(interp, objc, objv);
    }
    JimIncrCmdRefCount(cmdPtr);

    if (interp->evalDepth == interp->maxEvalDepth) {
        Jim_SetResultString(interp, "Infinite eval recursion", -1);
        retcode = JIM_ERR;
        goto out;
    }
    interp->evalDepth++;
    prevPrivData = interp->cmdPrivData;

tailcall:

    interp->evalFrame->argc = objc;
    interp->evalFrame->argv = objv;
    interp->evalFrame->cmd = cmdPtr;

    if (!interp->traceCmdObj ||
        (retcode = JimTraceCallback(interp, "cmd", objc, objv)) == JIM_OK) {

        Jim_SetEmptyResult(interp);
        if (cmdPtr->isproc) {
            retcode = JimCallProcedure(interp, cmdPtr, objc, objv);
        }
        else {
            interp->cmdPrivData = cmdPtr->u.native.privData;
            retcode = cmdPtr->u.native.cmdProc(interp, objc, objv);
        }
        if (retcode == JIM_ERR) {
            JimSetErrorStack(interp, NULL);
        }
    }

    if (tailcallObj) {

        Jim_DecrRefCount(interp, tailcallObj);
        tailcallObj = NULL;
    }


    interp->evalFrame->argc = 0;
    interp->evalFrame->argv = NULL;


    if (retcode == JIM_EVAL && interp->framePtr->tailcallObj) {
        JimDecrCmdRefCount(interp, cmdPtr);


        cmdPtr = interp->framePtr->tailcallCmd;
        interp->framePtr->tailcallCmd = NULL;
        tailcallObj = interp->framePtr->tailcallObj;
        interp->framePtr->tailcallObj = NULL;
        objc = tailcallObj->internalRep.listValue.len;
        objv = tailcallObj->internalRep.listValue.ele;
        goto tailcall;
    }

    interp->cmdPrivData = prevPrivData;
    interp->evalDepth--;

out:
    JimDecrCmdRefCount(interp, cmdPtr);

    if (retcode == JIM_ERR) {
        JimSetErrorStack(interp, NULL);
    }

    if (interp->framePtr->tailcallObj) {
        JimDecrCmdRefCount(interp, interp->framePtr->tailcallCmd);
        Jim_DecrRefCount(interp, interp->framePtr->tailcallObj);
        interp->framePtr->tailcallCmd = NULL;
        interp->framePtr->tailcallObj = NULL;
    }

    return retcode;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
movl $0x1, %edx
callq 0x6930
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x12c73
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
callq 0x24ba0
movl %eax, -0x4(%rbp)
jmp 0x12fcf
movq -0x30(%rbp), %rdi
callq 0xd990
movq -0x10(%rbp), %rax
movl 0x24(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jne 0x12cf0
jmp 0x12c8e
movq -0x10(%rbp), %rdi
leaq 0x298f3(%rip), %rsi     # 0x3c58c
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7990
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x12cd9
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x7a10
movq -0x48(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x24(%rbp)
jmp 0x12f24
movq -0x10(%rbp), %rax
movl 0x24(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x24(%rax)
movq -0x10(%rbp), %rax
movq 0x1b8(%rax), %rax
movq %rax, -0x38(%rbp)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rax
movl %ecx, 0x28(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rax
movq %rcx, 0x20(%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x1a8(%rax)
je 0x12d74
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rcx
leaq 0x29841(%rip), %rsi     # 0x3c5a4
callq 0x24c50
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jne 0x12e25
jmp 0x12d76
movq -0x10(%rbp), %rax
movq 0x128(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x12db7
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x7a10
movq -0x50(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0x12de5
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rcx
callq 0x24e70
movl %eax, -0x24(%rbp)
jmp 0x12e10
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x1b8(%rax)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
callq *%rax
movl %eax, -0x24(%rbp)
cmpl $0x1, -0x24(%rbp)
jne 0x12e23
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x13260
jmp 0x12e25
cmpq $0x0, -0x40(%rbp)
je 0x12e53
movq -0x40(%rbp), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x12e4b
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x7a10
movq $0x0, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rax
movl $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rax
movq $0x0, 0x20(%rax)
cmpl $0x7, -0x24(%rbp)
jne 0x12f08
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
cmpq $0x0, 0x98(%rax)
je 0x12f08
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x1fd20
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq 0xa0(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq $0x0, 0xa0(%rax)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x98(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq $0x0, 0x98(%rax)
movq -0x40(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x12d0c
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x1b8(%rax)
movq -0x10(%rbp), %rax
movl 0x24(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x24(%rax)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x1fd20
cmpl $0x1, -0x24(%rbp)
jne 0x12f44
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x13260
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
cmpq $0x0, 0x98(%rax)
je 0x12fc9
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq 0xa0(%rax), %rsi
callq 0x1fd20
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x98(%rax), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x12fa3
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x98(%rax), %rsi
callq 0x7a10
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq $0x0, 0xa0(%rax)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq $0x0, 0x98(%rax)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)