// File: /workspace/github_c_makefile_star2_O0/msteveb[P]autosetup/./jimsh0.c
// Function: Jim_TimeRateCoreCommand
static int Jim_TimeRateCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
    long us = 0;
    jim_wide start, delta, overhead;
    Jim_Obj *objPtr;
    double us_per_iter;
    int count;
    int n;

    if (argc < 2) {
        Jim_WrongNumArgs(interp, 1, argv, "script ?milliseconds?");
        return JIM_ERR;
    }
    if (argc == 3) {
        if (Jim_GetLong(interp, argv[2], &us) != JIM_OK)
            return JIM_ERR;
        us *= 1000;
    }
    if (us < 1) {

        us = 1000 * 1000;
    }


    start = Jim_GetTimeUsec(CLOCK_MONOTONIC_RAW);
    count = 0;
    do {
        int retval = Jim_EvalObj(interp, argv[1]);
        delta = Jim_GetTimeUsec(CLOCK_MONOTONIC_RAW) - start;
        if (retval != JIM_OK) {
            return retval;
        }
        count++;
    } while (delta < us);


    start = Jim_GetTimeUsec(CLOCK_MONOTONIC_RAW);
    n = 0;
    do {
        int retval = Jim_EvalObj(interp, interp->nullScriptObj);
        overhead = Jim_GetTimeUsec(CLOCK_MONOTONIC_RAW) - start;
        if (retval != JIM_OK) {
            return retval;
        }
        n++;
    } while (n < count);

    delta -= overhead;

    us_per_iter = (double)delta / count;
    objPtr = Jim_NewListObj(interp, NULL, 0);

    Jim_ListAppendElement(interp, objPtr, Jim_NewStringObj(interp, "us_per_iter", -1));
    Jim_ListAppendElement(interp, objPtr, Jim_NewDoubleObj(interp, us_per_iter));
    Jim_ListAppendElement(interp, objPtr, Jim_NewStringObj(interp, "iters_per_sec", -1));
    Jim_ListAppendElement(interp, objPtr, Jim_NewDoubleObj(interp, 1e6 / us_per_iter));
    Jim_ListAppendElement(interp, objPtr, Jim_NewStringObj(interp, "count", -1));
    Jim_ListAppendElement(interp, objPtr, Jim_NewIntObj(interp, count));
    Jim_ListAppendElement(interp, objPtr, Jim_NewStringObj(interp, "elapsed_us", -1));
    Jim_ListAppendElement(interp, objPtr, Jim_NewIntObj(interp, delta));
    Jim_SetResult(interp, objPtr);
    return JIM_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
cmpl $0x2, -0x14(%rbp)
jge 0x2af99
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
movl $0x1, %esi
leaq 0x1218d(%rip), %rcx     # 0x3d115
callq 0x7880
movl $0x1, -0x4(%rbp)
jmp 0x2b301
cmpl $0x3, -0x14(%rbp)
jne 0x2afd1
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rsi
leaq -0x28(%rbp), %rdx
callq 0xf4d0
cmpl $0x0, %eax
je 0x2afc5
movl $0x1, -0x4(%rbp)
jmp 0x2b301
imulq $0x3e8, -0x28(%rbp), %rax # imm = 0x3E8
movq %rax, -0x28(%rbp)
cmpq $0x1, -0x28(%rbp)
jge 0x2afe0
movq $0xf4240, -0x28(%rbp)   # imm = 0xF4240
movl $0x4, %edi
callq 0xb820
movq %rax, -0x30(%rbp)
movl $0x0, -0x54(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x9b80
movl %eax, -0x5c(%rbp)
movl $0x4, %edi
callq 0xb820
subq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpl $0x0, -0x5c(%rbp)
je 0x2b02c
movl -0x5c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2b301
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x28(%rbp), %rax
jl 0x2aff5
movl $0x4, %edi
callq 0xb820
movq %rax, -0x30(%rbp)
movl $0x0, -0x58(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rsi
callq 0x9b80
movl %eax, -0x60(%rbp)
movl $0x4, %edi
callq 0xb820
subq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpl $0x0, -0x60(%rbp)
je 0x2b08e
movl -0x60(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2b301
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %eax
cmpl -0x54(%rbp), %eax
jl 0x2b054
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x38(%rbp)
cvtsi2sdq -0x38(%rbp), %xmm0
cvtsi2sdl -0x54(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x7b50
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x12035(%rip), %rsi     # 0x3d12b
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7990
movq -0xe8(%rbp), %rdi
movq -0xe0(%rbp), %rsi
movq %rax, %rdx
callq 0x7bd0
movq -0x10(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x10(%rbp), %rdi
movsd -0x50(%rbp), %xmm0
callq 0xfbe0
movq -0xd8(%rbp), %rdi
movq -0xd0(%rbp), %rsi
movq %rax, %rdx
callq 0x7bd0
movq -0x10(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x11fc6(%rip), %rsi     # 0x3d137
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7990
movq -0xc8(%rbp), %rdi
movq -0xc0(%rbp), %rsi
movq %rax, %rdx
callq 0x7bd0
movq -0x10(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x10(%rbp), %rdi
movsd 0xc6f5(%rip), %xmm0     # 0x378a8
divsd -0x50(%rbp), %xmm0
callq 0xfbe0
movq -0xb8(%rbp), %rdi
movq -0xb0(%rbp), %rsi
movq %rax, %rdx
callq 0x7bd0
movq -0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x101d2(%rip), %rsi     # 0x3b3c6
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7990
movq -0xa8(%rbp), %rdi
movq -0xa0(%rbp), %rsi
movq %rax, %rdx
callq 0x7bd0
movq -0x10(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x54(%rbp), %rsi
callq 0x8d60
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq %rax, %rdx
callq 0x7bd0
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x11eda(%rip), %rsi     # 0x3d145
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7990
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq %rax, %rdx
callq 0x7bd0
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x8d60
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rsi
movq %rax, %rdx
callq 0x7bd0
movq -0x48(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%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 0x2b2ef
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x7a10
movq -0x68(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xf0, %rsp
popq %rbp
retq
nopl (%rax)