// File: /workspace/github_c_makefile_star2_O3/msteveb[P]autosetup/./jimsh0.c
// Function: Jim_TimeCoreCommand
static int Jim_TimeCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
    long i, count = 1;
    jim_wide start, elapsed;

    if (argc < 2) {
        Jim_WrongNumArgs(interp, 1, argv, "script ?count?");
        return JIM_ERR;
    }
    if (argc == 3) {
        if (Jim_GetLong(interp, argv[2], &count) != JIM_OK)
            return JIM_ERR;
    }
    if (count < 0)
        return JIM_OK;
    i = count;
    start = Jim_GetTimeUsec(CLOCK_MONOTONIC_RAW);
    while (i-- > 0) {
        int retval;

        retval = Jim_EvalObj(interp, argv[1]);
        if (retval != JIM_OK) {
            return retval;
        }
    }
    elapsed = Jim_GetTimeUsec(CLOCK_MONOTONIC_RAW) - start;
    if (elapsed < count * 10) {
        Jim_SetResult(interp, Jim_NewDoubleObj(interp, elapsed * 1.0 / count));
    }
    else {
        Jim_SetResultInt(interp, count == 0 ? 0 : elapsed / count);
    }
    Jim_AppendString(interp, Jim_GetResult(interp)," microseconds per iteration", -1);
    return JIM_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rdi, %rbx
cmpl $0x1, %esi
jg 0x1ee8f
leaq 0xdeb4(%rip), %rcx      # 0x2cd28
movl $0x1, %r15d
movq %rbx, %rdi
movl $0x1, %esi
movq %r14, %rdx
callq 0x7446
jmp 0x1f00d
movl $0x1, %r12d
cmpl $0x3, %esi
jne 0x1eed8
movq 0x10(%r14), %r12
leaq 0x1644b(%rip), %rax     # 0x352f0
cmpq %rax, 0x8(%r12)
je 0x1eeca
movl $0x1, %r15d
movq %rbx, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0xd6c3
testl %eax, %eax
jne 0x1f00d
movq 0x18(%r12), %r12
testq %r12, %r12
js 0x1f00a
leaq -0x48(%rbp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x6210
movq (%r15), %rax
movq %rax, -0x38(%rbp)
movq 0x8(%r15), %rax
movq %rax, -0x30(%rbp)
leaq 0x1(%r12), %r13
decq %r13
testq %r13, %r13
jle 0x1ef1a
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x908a
testl %eax, %eax
je 0x1eefa
movl %eax, %r15d
jmp 0x1f00d
leaq -0x48(%rbp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x6210
movq (%r14), %rax
subq -0x38(%rbp), %rax
movq 0x8(%r14), %rcx
subq -0x30(%rbp), %rcx
imulq $0xf4240, %rax, %rax    # imm = 0xF4240
addq %rcx, %rax
leaq (%r12,%r12), %rcx
leaq (%rcx,%rcx,4), %rcx
cmpq %rcx, %rax
jge 0x1efa0
cvtsi2sd %rax, %xmm1
cvtsi2sd %r12, %xmm0
divsd %xmm0, %xmm1
movsd %xmm1, -0x30(%rbp)
movq %rbx, %rdi
callq 0xae38
movq %rax, %r14
leaq 0x163cd(%rip), %rax     # 0x35340
movq %rax, 0x8(%r14)
movq $0x0, (%r14)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, 0x18(%r14)
incl 0x10(%r14)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x2, %eax
jl 0x1efe8
jmp 0x1eff0
testq %r12, %r12
je 0x1efaf
cqto
idivq %r12
movq %rax, %r15
jmp 0x1efb2
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0xae38
movq %rax, %r14
leaq 0x1632c(%rip), %rax     # 0x352f0
movq %rax, 0x8(%r14)
movq $0x0, (%r14)
movq %r15, 0x18(%r14)
incl 0x10(%r14)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x1eff0
movq %rbx, %rdi
callq 0x758c
movq %r14, (%rbx)
leaq 0xdd3d(%rip), %rdx      # 0x2cd37
movq %rbx, %rdi
movq %r14, %rsi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x86a0
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq