// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movl %esi, %r12d
movq %rdi, %rbx
movq (%rdx), %rsi
pushq $0x1
popq %rdx
callq 0x6755
testq %rax, %rax
je 0xf47a
incl (%rax)
movl 0x24(%rbx), %ecx
cmpl 0x20(%rbx), %ecx
jne 0xf4cb
movq %rax, %r15
leaq 0x18dd9(%rip), %rsi     # 0x2821a
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0x7363
movq %rax, %r14
incl 0x10(%rax)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xf46b
movq %rbx, %rdi
callq 0x73bf
movq %r14, (%rbx)
pushq $0x1
popq %r13
movq %r15, %rsi
jmp 0xf619
pushq $0x1
popq %r13
cmpl $0x32, 0x1b0(%rbx)
jg 0xf67d
movq 0x198(%rbx), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x6755
testq %rax, %rax
je 0xf67d
incl 0x1b0(%rbx)
movq 0x198(%rbx), %rsi
movq %rbx, %rdi
movl %r12d, %edx
movq %r15, %rcx
callq 0xf68f
decl 0x1b0(%rbx)
jmp 0xf680
incl %ecx
movl %ecx, 0x24(%rbx)
movq 0x1b8(%rbx), %rcx
movq %rcx, -0x38(%rbp)
xorl %r14d, %r14d
movq 0x108(%rbx), %rcx
movl %r12d, 0x28(%rcx)
movq %r15, 0x20(%rcx)
movq %rax, -0x30(%rbp)
movq %rax, 0x10(%rcx)
cmpq $0x0, 0x1a8(%rbx)
je 0xf51b
movq %rbx, %rdi
leaq 0x18d29(%rip), %rsi     # 0x28232
movl %r12d, %edx
movq %r15, %rcx
callq 0x18a75
movl %eax, %r13d
testl %eax, %eax
jne 0xf58c
movq 0x128(%rbx), %r13
incl 0x10(%r13)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xf53f
movq %rbx, %rdi
callq 0x73bf
movq %r13, (%rbx)
movq -0x30(%rbp), %rcx
cmpl $0x0, 0x4(%rcx)
je 0xf55f
movq %rbx, %rdi
movq %rcx, %rsi
movl %r12d, %edx
movq %r15, %rcx
callq 0x18bd8
jmp 0xf576
movq 0x28(%rcx), %rax
movq %rax, 0x1b8(%rbx)
movq %rbx, %rdi
movl %r12d, %esi
movq %r15, %rdx
callq *0x18(%rcx)
movl %eax, %r13d
cmpl $0x1, %eax
jne 0xf58c
movq %rbx, %rdi
xorl %esi, %esi
callq 0xf84c
pushq $0x1
popq %r13
testq %r14, %r14
je 0xf5ac
movl 0x10(%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%r14)
cmpl $0x1, %eax
jg 0xf5ac
movq %rbx, %rdi
movq %r14, %rsi
callq 0x73bf
movq 0x108(%rbx), %rax
andl $0x0, 0x28(%rax)
andq $0x0, 0x20(%rax)
cmpl $0x7, %r13d
movq -0x30(%rbp), %rsi
jne 0xf60b
movq 0x58(%rbx), %rax
cmpq $0x0, 0x98(%rax)
je 0xf60b
movq %rbx, %rdi
callq 0x16865
movq 0x58(%rbx), %rcx
movq 0x98(%rcx), %r14
movq 0xa0(%rcx), %rax
andq $0x0, 0xa0(%rcx)
andq $0x0, 0x98(%rcx)
movl 0x20(%r14), %r12d
movq 0x18(%r14), %r15
jmp 0xf4de
movq -0x38(%rbp), %rax
movq %rax, 0x1b8(%rbx)
decl 0x24(%rbx)
movq %rbx, %rdi
callq 0x16865
cmpl $0x1, %r13d
jne 0xf631
movq %rbx, %rdi
xorl %esi, %esi
callq 0xf84c
movq 0x58(%rbx), %rax
cmpq $0x0, 0x98(%rax)
je 0xf67d
movq 0xa0(%rax), %rsi
movq %rbx, %rdi
callq 0x16865
movq 0x58(%rbx), %rax
movq 0x98(%rax), %rsi
movl 0x10(%rsi), %ecx
leal -0x1(%rcx), %edx
movl %edx, 0x10(%rsi)
cmpl $0x1, %ecx
jg 0xf673
movq %rbx, %rdi
callq 0x73bf
movq 0x58(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x98(%rax)
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq