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

```asm
<set_rndc_stats>:
  endbr64
  mov    %rdx,%rdi
  mov    (%rcx),%rax
  mov    (%rdx),%rdx
  pxor   %xmm0,%xmm0
  cmp    %rax,%rdx
  ja     L50
  sub    %rdx,%rax
  movslq %r8d,%r9
  xor    %edx,%edx
  div    %r9
  test   %rax,%rax
  js     L125
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
L50:
  mov    0x8(%rcx),%rax
  mov    0x8(%rdi),%rdx
  movsd  %xmm0,(%rsi)
  pxor   %xmm0,%xmm0
  cmp    %rdx,%rax
  jb     L113
  sub    %rdx,%rax
  movslq %r8d,%r9
  xor    %edx,%edx
  div    %r9
  test   %rax,%rax
  js     L165
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
L113:
  mov    0x10(%rcx),%rax
  mov    0x10(%rdi),%rdx
  movsd  %xmm0,0x8(%rsi)
  pxor   %xmm0,%xmm0
  cmp    %rdx,%rax
  jb     L159
  sub    %rdx,%rax
  movslq %r8d,%r9
  xor    %edx,%edx
  div    %r9
  test   %rax,%rax
  js     L92
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
L159:
  mov    0x18(%rcx),%rax
  mov    0x18(%rdi),%rdx
  movsd  %xmm0,0x10(%rsi)
  pxor   %xmm0,%xmm0
  cmp    %rdx,%rax
  jb     L22
  sub    %rdx,%rax
  movslq %r8d,%r9
  xor    %edx,%edx
  div    %r9
  test   %rax,%rax
  js     L135
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
L22:
  mov    0x20(%rcx),%rax
  mov    0x20(%rdi),%rdx
  movsd  %xmm0,0x18(%rsi)
  pxor   %xmm0,%xmm0
  cmp    %rdx,%rax
  jb     L4
  sub    %rdx,%rax
  movslq %r8d,%r9
  xor    %edx,%edx
  div    %r9
  test   %rax,%rax
  js     L153
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
L4:
  mov    0x28(%rcx),%rax
  mov    0x28(%rdi),%rdx
  movsd  %xmm0,0x20(%rsi)
  pxor   %xmm0,%xmm0
  cmp    %rdx,%rax
  jb     L44
  sub    %rdx,%rax
  movslq %r8d,%r8
  xor    %edx,%edx
  div    %r8
  test   %rax,%rax
  js     L149
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
L44:
  mov    0x30(%rcx),%rax
  test   %rax,%rax
  js     L15
L144:
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
  unpcklpd %xmm1,%xmm0
  movups %xmm0,0x28(%rsi)
  ret
L165:
  mov    %rax,%rdx
  and    $0x1,%eax
  pxor   %xmm0,%xmm0
  shr    %rdx
  or     %rax,%rdx
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L113
  xchg   %ax,%ax
L125:
  mov    %rax,%rdx
  and    $0x1,%eax
  pxor   %xmm0,%xmm0
  shr    %rdx
  or     %rax,%rdx
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L50
  xchg   %ax,%ax
L135:
  mov    %rax,%rdx
  and    $0x1,%eax
  pxor   %xmm0,%xmm0
  shr    %rdx
  or     %rax,%rdx
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L22
  xchg   %ax,%ax
L92:
  mov    %rax,%rdx
  and    $0x1,%eax
  pxor   %xmm0,%xmm0
  shr    %rdx
  or     %rax,%rdx
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L159
  xchg   %ax,%ax
L149:
  mov    %rax,%rdx
  and    $0x1,%eax
  pxor   %xmm0,%xmm0
  shr    %rdx
  or     %rax,%rdx
  mov    0x30(%rcx),%rax
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
  test   %rax,%rax
  jns    L144
L15:
  mov    %rax,%rdx
  and    $0x1,%eax
  pxor   %xmm1,%xmm1
  shr    %rdx
  or     %rax,%rdx
  cvtsi2sd %rdx,%xmm1
  addsd  %xmm1,%xmm1
  unpcklpd %xmm1,%xmm0
  movups %xmm0,0x28(%rsi)
  ret
  nopl   0x0(%rax,%rax,1)
L153:
  mov    %rax,%rdx
  and    $0x1,%eax
  pxor   %xmm0,%xmm0
  shr    %rdx
  or     %rax,%rdx
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L4
```

assistant: ```c
void set_rndc_stats(struct module *mod, double st_array[], unsigned long long pre_array[], unsigned long long cur_array[], int inter) {
  int i;
  for (i = 0; i < 6; i++) {
    if (cur_array[i] >= pre_array[i]) {
      st_array[i] = (cur_array[i] - pre_array[i]) / inter;
    } else {
      st_array[i] = 0;
    }
  }
  st_array[6] = cur_array[i];
}
```