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

```asm
<checktick>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0xc8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xb8(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rbx
  lea    0xb0(%rsp),%rbp
  nopl   (%rax)
L15:
  xor    %eax,%eax
  call   <mysecond@plt>
  movsd  %xmm0,0x8(%rsp)
  nopl   (%rax)
L25:
  xor    %eax,%eax
  call   <mysecond@plt>
  movsd  D29(%rip),%xmm7
  movapd %xmm0,%xmm1
  subsd  0x8(%rsp),%xmm1
  comisd %xmm1,%xmm7
  ja     L25
  movsd  %xmm0,(%rbx)
  add    $0x8,%rbx
  cmp    %rbp,%rbx
  jne    L15
  movupd 0x78(%rsp),%xmm0
  subpd  0x70(%rsp),%xmm0
  pxor   %xmm3,%xmm3
  xor    %ecx,%ecx
  movupd 0x88(%rsp),%xmm2
  movapd D38(%rip),%xmm1
  subpd  0x80(%rsp),%xmm2
  mulpd  %xmm1,%xmm0
  mulpd  %xmm1,%xmm2
  cvttpd2dq %xmm0,%xmm0
  cvttpd2dq %xmm2,%xmm2
  punpcklqdq %xmm2,%xmm0
  movupd 0x68(%rsp),%xmm2
  subpd  0x60(%rsp),%xmm2
  movdqa %xmm0,%xmm4
  pcmpgtd %xmm3,%xmm4
  mulpd  %xmm1,%xmm2
  pand   %xmm0,%xmm4
  movupd 0x58(%rsp),%xmm0
  subpd  0x50(%rsp),%xmm0
  mulpd  %xmm1,%xmm0
  cvttpd2dq %xmm2,%xmm2
  cvttpd2dq %xmm0,%xmm0
  punpcklqdq %xmm2,%xmm0
  movdqa %xmm0,%xmm2
  pcmpgtd %xmm3,%xmm2
  pand   %xmm2,%xmm0
  movdqa %xmm4,%xmm2
  pcmpgtd %xmm0,%xmm2
  pand   %xmm2,%xmm0
  pandn  %xmm4,%xmm2
  movupd 0x28(%rsp),%xmm4
  subpd  0x20(%rsp),%xmm4
  por    %xmm0,%xmm2
  movupd 0x18(%rsp),%xmm0
  subpd  0x10(%rsp),%xmm0
  mulpd  %xmm1,%xmm4
  mulpd  %xmm1,%xmm0
  cvttpd2dq %xmm4,%xmm4
  cvttpd2dq %xmm0,%xmm0
  punpcklqdq %xmm4,%xmm0
  movupd 0x48(%rsp),%xmm4
  subpd  0x40(%rsp),%xmm4
  movdqa %xmm0,%xmm5
  pcmpgtd %xmm3,%xmm5
  pand   %xmm0,%xmm5
  movupd 0x38(%rsp),%xmm0
  subpd  0x30(%rsp),%xmm0
  mulpd  %xmm1,%xmm0
  mulpd  %xmm4,%xmm1
  cvttpd2dq %xmm0,%xmm0
  cvttpd2dq %xmm1,%xmm1
  punpcklqdq %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  pcmpgtd %xmm3,%xmm1
  movsd  0x98(%rsp),%xmm3
  pand   %xmm0,%xmm1
  movdqa %xmm5,%xmm0
  pcmpgtd %xmm1,%xmm0
  pand   %xmm0,%xmm1
  pandn  %xmm5,%xmm0
  por    %xmm1,%xmm0
  movdqa %xmm2,%xmm1
  pcmpgtd %xmm0,%xmm1
  pand   %xmm1,%xmm0
  pandn  %xmm2,%xmm1
  movdqa D24(%rip),%xmm2
  por    %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  pcmpgtd %xmm2,%xmm1
  pand   %xmm1,%xmm2
  pandn  %xmm0,%xmm1
  por    %xmm2,%xmm1
  movdqa %xmm1,%xmm2
  psrldq $0x8,%xmm2
  movdqa %xmm2,%xmm0
  pcmpgtd %xmm1,%xmm0
  pand   %xmm0,%xmm1
  pandn  %xmm2,%xmm0
  por    %xmm1,%xmm0
  movdqa %xmm0,%xmm2
  psrldq $0x4,%xmm2
  movdqa %xmm2,%xmm1
  pcmpgtd %xmm0,%xmm1
  pand   %xmm1,%xmm0
  pandn  %xmm2,%xmm1
  movsd  0xa0(%rsp),%xmm2
  por    %xmm0,%xmm1
  movapd %xmm3,%xmm0
  subsd  0x90(%rsp),%xmm0
  movd   %xmm1,%edx
  movsd  D38(%rip),%xmm1
  mulsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  movapd %xmm2,%xmm0
  subsd  %xmm3,%xmm0
  mulsd  %xmm1,%xmm0
  test   %eax,%eax
  cmovs  %ecx,%eax
  xor    %esi,%esi
  cvttsd2si %xmm0,%ecx
  movsd  0xa8(%rsp),%xmm0
  subsd  %xmm2,%xmm0
  test   %ecx,%ecx
  mulsd  %xmm1,%xmm0
  cmovs  %esi,%ecx
  cmp    %ecx,%eax
  cmovg  %ecx,%eax
  cvttsd2si %xmm0,%ecx
  test   %ecx,%ecx
  cmovs  %esi,%ecx
  cmp    %ecx,%eax
  cmovg  %ecx,%eax
  cmp    %edx,%eax
  cmovg  %edx,%eax
  mov    0xb8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L28
  add    $0xc8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L28:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D29
type_infered: byte[8]
name: extract_symbolic_data
arguments: label: D38
type_infered: f64[2]
name: extract_symbolic_data
arguments: label: D24
type_infered: byte[16]

tool: {"D29": [0x8d,0xed,0xb5,0xa0,0xf7,0xc6,0xb0,0x3e]}

tool: {"D38": [1000000.0,1000000.0]}

tool: {"D24": [0x40,0x42,0x0f,0x00,0x40,0x42,0x0f,0x00,0x40,0x42,0x0f,0x00,0x40,0x42,0x0f,0x00]}

assistant: ```c
int checktick() {
  int i, minDelta, Delta;
  double t1, t2, timesfound[20];
  for (i = 0; i < 20; i++) {
    t1 = mysecond();
    while (((t2 = mysecond()) - t1) < 1.0E-6)
      ;
    timesfound[i] = t1 = t2;
  }
  minDelta = 1000000;
  for (i = 1; i < 20; i++) {
    Delta = (int)(1.0E6 * (timesfound[i] - timesfound[i - 1]));
    minDelta = ((minDelta) < (((Delta) > (0) ? (Delta) : (0))) ? (minDelta) : (((Delta) > (0) ? (Delta) : (0))));
  }
  return (minDelta);
}
```