user: Please show me the C implementation that matches the assembly code listed below:

```asm
<soar_cDetermineTimerResolution>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,%r15
  mov    %rsi,0x18(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  lea    0x34(%rsp),%rdi
  call   <reset_timer@plt>
  lea    0x30(%rsp),%rdi
  call   <reset_timer@plt>
  lea    0x2c(%rsp),%rdi
  call   <start_timer@plt>
  mov    $0x0,%r12d
  mov    D25(%rip),%r14
  mov    %r14,0x8(%rsp)
  movsd  D8(%rip),%xmm7
  movsd  %xmm7,0x10(%rsp)
  lea    0x34(%rsp),%r13
  jmp    L109
L4:
  maxsd  0x10(%rsp),%xmm0
  movsd  %xmm0,0x10(%rsp)
  mov    %r13,%rdi
  call   <timer_value@plt>
  cmp    $0x1,%eax
  jg     L81
  lea    0x1(%r12),%ebx
  lea    (%rbx,%rbx,1),%r12d
  cmp    $0xf423f,%r12d
  jg     L81
  lea    0x30(%rsp),%rdi
  call   <reset_timer@plt>
  lea    0x2c(%rsp),%rdi
  call   <start_timer@plt>
  imul   $0x1e8480,%ebx,%ebx
  test   %ebx,%ebx
  jle    L109
  mov    $0x0,%eax
L97:
  add    $0x1,%eax
  cmp    %ebx,%eax
  jne    L97
L109:
  lea    0x30(%rsp),%rbx
  lea    0x2c(%rsp),%rbp
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <stop_timer@plt>
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <stop_timer@plt>
  mov    %rbx,%rdi
  call   <timer_value@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movapd %xmm0,%xmm1
  minsd  0x8(%rsp),%xmm1
  movsd  %xmm1,0x8(%rsp)
  test   %eax,%eax
  je     L4
  movapd %xmm0,%xmm4
  movq   %r14,%xmm5
  minsd  %xmm5,%xmm4
  movq   %xmm4,%r14
  jmp    L4
L81:
  movq   %r14,%xmm7
  ucomisd D25(%rip),%xmm7
  jp     L71
  cmove  D8(%rip),%r14
L71:
  movsd  0x8(%rsp),%xmm6
  ucomisd D25(%rip),%xmm6
  jp     L59
  movq   %xmm6,%rax
  cmove  D8(%rip),%rax
  mov    %rax,0x8(%rsp)
L59:
  test   %r15,%r15
  je     L43
  movsd  0x8(%rsp),%xmm7
  movsd  %xmm7,(%r15)
L43:
  mov    0x18(%rsp),%rax
  test   %rax,%rax
  je     L85
  movsd  0x10(%rsp),%xmm7
  movsd  %xmm7,(%rax)
L85:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L65
  movq   %r14,%xmm0
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L65:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D25
type_guessed: byte[8]
name: unpack_data
arguments: data_label: D8
type_guessed: byte[8]

tool: {"D25": [0x00,0x00,0x00,0x00,0x80,0x84,0x2e,0x41]}

tool: {"D8": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xbf]}

assistant: ```c
double soar_cDetermineTimerResolution(double *min, double *max) {
  double delta, max_delta, min_delta, min_nz_delta;
  float q;
  int i, j, top;
  struct timeval start, end, total;
  top = (1000000);
  min_delta = (1000000);
  min_nz_delta = (1000000);
  max_delta = -1;
  reset_timer(&total);
  for (i = 0; i < (1000000); i = (i + 1) * 2) {
    reset_timer(&end);
    start_timer(&start);
    for (j = 0; j < i * top; j++) {
      q = (float)(j * i);
    }
    stop_timer(&start, &end);
    stop_timer(&start, &total);
    delta = timer_value(&end);
    if (delta < min_delta)
      min_delta = delta;
    if (delta && delta < min_nz_delta)
      min_nz_delta = delta;
    if (delta > max_delta)
      max_delta = delta;
    if (timer_value(&total) >= 2) {
      break;
    }
  }
  if (min_nz_delta == (1000000))
    min_nz_delta = -1;
  if (min_delta == (1000000))
    min_delta = -1;
  if (min != NULL)
    *min = min_delta;
  if (max != NULL)
    *max = max_delta;
  return min_nz_delta;
}
```