// File: /workspace/github_c_makefile_star2_O3/msteveb[P]autosetup/./jimsh0.c
// Function: JimTraceCallback
static int JimTraceCallback(Jim_Interp *interp, const char *type, int argc, Jim_Obj *const *argv)
{
    JimPanic((interp->traceCmdObj == NULL, "xtrace invoked with no object"));

    int ret;
    Jim_Obj *nargv[7];
    Jim_Obj *traceCmdObj = interp->traceCmdObj;
    Jim_Obj *resultObj = Jim_GetResult(interp);
    ScriptObj *script = NULL;



    if (interp->evalFrame->scriptObj) {
        script = JimGetScript(interp, interp->evalFrame->scriptObj);
    }

    nargv[0] = traceCmdObj;
    nargv[1] = Jim_NewStringObj(interp, type, -1);
    nargv[2] = script ? script->fileNameObj : interp->emptyObj;
    nargv[3] = Jim_NewIntObj(interp, script ? script->linenr : 1);
    nargv[4] = resultObj;
    nargv[5] = argv[0];
    nargv[6] = Jim_NewListObj(interp, argv + 1, argc - 1);


    interp->traceCmdObj = NULL;

    Jim_IncrRefCount(resultObj);
    ret = Jim_EvalObjVector(interp, 7, nargv);
    Jim_DecrRefCount(interp, resultObj);

    if (ret == JIM_OK || ret == JIM_RETURN) {

        interp->traceCmdObj = traceCmdObj;
        Jim_SetEmptyResult(interp);
        ret = JIM_OK;
    }
    else {

        Jim_DecrRefCount(interp, traceCmdObj);
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r12
movl %edx, -0x2c(%rbp)
movq %rsi, %r13
movq %rdi, %rbx
movq 0x1a8(%rdi), %rcx
movq (%rdi), %r15
movq 0x108(%rdi), %rax
movq 0x30(%rax), %rsi
testq %rsi, %rsi
je 0x1b128
movq %rbx, %rdi
movq %rcx, %r14
callq 0xb679
movq %r14, %rcx
movq %rax, %r14
jmp 0x1b12b
xorl %r14d, %r14d
movq %rcx, -0x38(%rbp)
movq %rcx, -0x70(%rbp)
movq %rbx, %rdi
movq %r13, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7508
movq %rax, -0x68(%rbp)
leaq 0x8(%r14), %rax
leaq 0x128(%rbx), %rcx
testq %r14, %r14
cmoveq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
je 0x1b168
movslq 0x20(%r14), %r14
jmp 0x1b16e
movl $0x1, %r14d
movq %rbx, %rdi
callq 0xae38
leaq 0x1a173(%rip), %rcx     # 0x352f0
movq %rcx, 0x8(%rax)
xorl %r13d, %r13d
movq %r13, (%rax)
movq %r14, 0x18(%rax)
leaq -0x70(%rbp), %r14
movq %rax, 0x18(%r14)
movq %r15, 0x20(%r14)
movq (%r12), %rax
movq %rax, 0x28(%r14)
addq $0x8, %r12
movl -0x2c(%rbp), %edx
decl %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x762e
movq %rax, 0x30(%r14)
movq %r13, 0x1a8(%rbx)
incl 0x10(%r15)
movq %rbx, %rdi
movl $0x7, %esi
movq %r14, %rdx
callq 0x10431
movl %eax, %r12d
movl 0x10(%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%r15)
cmpl $0x1, %eax
jg 0x1b1f0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x758c
testl $0xfffffffd, %r12d      # imm = 0xFFFFFFFD
je 0x1b215
movq -0x38(%rbp), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x1b24a
movq %rbx, %rdi
callq 0x758c
jmp 0x1b24a
movq -0x38(%rbp), %rax
movq %rax, 0x1a8(%rbx)
movq 0x128(%rbx), %r14
incl 0x10(%r14)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x1b244
movq %rbx, %rdi
callq 0x758c
movq %r14, (%rbx)
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq