user: Converte this assembly snippet into its equivalent C code:

```asm
<post_process>:
  endbr64
  push   %r15
  mov    %rdx,%rax
  movapd %xmm1,%xmm5
  unpcklpd %xmm4,%xmm4
  push   %r14
  mov    %rdi,%r15
  mov    %rsi,%r14
  mov    $0xa,%edi
  push   %r13
  push   %r12
  mov    %ecx,%r12d
  push   %rbp
  mov    %r8,%rbp
  push   %rbx
  mov    %r9,%rbx
  sub    $0x118,%rsp
  movupd (%rax),%xmm1
  movsd  %xmm0,0x18(%rsp)
  pxor   %xmm0,%xmm0
  lea    0x28(%rsp),%rcx
  lea    0x60(%rsp),%rsi
  cvtsi2sdl (%r8),%xmm0
  movsd  %xmm2,0x10(%rsp)
  lea    0x38(%rsp),%r9
  mov    0x150(%rsp),%r13
  movsd  %xmm3,(%rsp)
  movapd %xmm4,%xmm3
  lea    0x20(%rsp),%r8
  mov    %fs:0x28,%rdx
  mov    %rdx,0x108(%rsp)
  xor    %edx,%edx
  lea    0x30(%rsp),%rdx
  movsd  %xmm5,0x8(%rsp)
  unpcklpd %xmm0,%xmm0
  divpd  %xmm0,%xmm1
  divpd  %xmm1,%xmm3
  movaps %xmm1,0x60(%rsp)
  movupd 0x10(%rax),%xmm1
  divpd  %xmm0,%xmm1
  movaps %xmm3,0xb0(%rsp)
  movapd %xmm4,%xmm3
  divpd  %xmm1,%xmm3
  movaps %xmm1,0x70(%rsp)
  movupd 0x20(%rax),%xmm1
  divpd  %xmm0,%xmm1
  movaps %xmm3,0xc0(%rsp)
  movapd %xmm4,%xmm3
  divpd  %xmm1,%xmm3
  movaps %xmm1,0x80(%rsp)
  movupd 0x30(%rax),%xmm1
  divpd  %xmm0,%xmm1
  movaps %xmm3,0xd0(%rsp)
  movapd %xmm4,%xmm3
  divpd  %xmm1,%xmm3
  movaps %xmm1,0x90(%rsp)
  movupd 0x40(%rax),%xmm1
  divpd  %xmm0,%xmm1
  movapd %xmm5,%xmm0
  movaps %xmm3,0xe0(%rsp)
  divpd  %xmm1,%xmm4
  movaps %xmm1,0xa0(%rsp)
  movaps %xmm4,0xf0(%rsp)
  call   <stats@plt>
  movsd  0x10(%rsp),%xmm2
  lea    0x40(%rsp),%rcx
  lea    0x50(%rsp),%rdx
  lea    0x58(%rsp),%r9
  lea    0x48(%rsp),%r8
  mov    $0xa,%edi
  movapd %xmm2,%xmm0
  lea    0xb0(%rsp),%rsi
  call   <stats@plt>
  movsd  (%rsp),%xmm6
  mov    0x0(%rbp),%esi
  mov    %r15,%rdi
  movsd  0x38(%rsp),%xmm4
  movsd  0x20(%rsp),%xmm3
  movsd  0x28(%rsp),%xmm2
  movsd  0x30(%rsp),%xmm1
  movapd %xmm6,%xmm0
  call   <saveData@plt>
  movsd  (%rsp),%xmm6
  mov    0x0(%rbp),%esi
  mov    %r14,%rdi
  movsd  0x58(%rsp),%xmm4
  movsd  0x48(%rsp),%xmm3
  movsd  0x40(%rsp),%xmm2
  movsd  0x50(%rsp),%xmm1
  movapd %xmm6,%xmm0
  call   <saveData@plt>
  movsd  0x40(%rsp),%xmm0
  comisd (%rbx),%xmm0
  movsd  0x8(%rsp),%xmm5
  movsd  0x18(%rsp),%xmm7
  jbe    L9
  movsd  %xmm0,(%rbx)
  mov    %r12d,0x0(%r13)
L9:
  movsd  0x20(%rsp),%xmm0
  mov    %rbp,%rdi
  movapd %xmm7,%xmm2
  movapd %xmm5,%xmm1
  call   <setLoopIters@plt>
  mov    0x108(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L17
  add    $0x118,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L17:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int post_process(FILE *fp, FILE *fp2, double threshold_hi, double *tElapsed, double tScale, double wScale, unsigned int size, double sizeBytes, double work, int *NLOOP, double *localMax, unsigned int *localSize) {
  int i;
  double tMin, tMax, tAvg, tDev, wMax, wMin, wAvg, wDev;
  double tMsg[10], wMsg[10];
  for (i = 0; i < 10; i++) {
    tMsg[i] = tElapsed[i] / ((double)(*NLOOP));
    wMsg[i] = work / tMsg[i];
  }
  stats(10, tMsg, &tAvg, &tMax, &tMin, &tDev, tScale);
  stats(10, wMsg, &wAvg, &wMax, &wMin, &wDev, wScale);
  saveData(fp, sizeBytes, *NLOOP, tAvg, tMax, tMin, tDev);
  saveData(fp2, sizeBytes, *NLOOP, wAvg, wMax, wMin, wDev);
  if (wMax > *localMax) {
    *localMax = wMax;
    *localSize = size;
  }
  setLoopIters(tMin, tScale, threshold_hi, NLOOP);
  return 0;
}
```