user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<set_nginx_record>:
  endbr64
  mov    %rdx,%rdi
  mov    %rcx,%rax
  mov    (%rcx),%rdx
  mov    (%rdi),%rcx
  cmp    %rcx,%rdx
  jb     L175
  sub    %rcx,%rdx
  js     L184
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
L167:
  movsd  %xmm0,(%rsi)
L175:
  mov    0x8(%rax),%rdx
  mov    0x8(%rdi),%rcx
  cmp    %rcx,%rdx
  jb     L84
  sub    %rcx,%rdx
  js     L24
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
L38:
  movsd  %xmm0,0x8(%rsi)
L84:
  mov    0x10(%rax),%rdx
  mov    0x10(%rdi),%rcx
  cmp    %rcx,%rdx
  jb     L54
  mov    %rdx,%r9
  sub    %rcx,%r9
  js     L141
  pxor   %xmm0,%xmm0
  cvtsi2sd %r9,%xmm0
L89:
  movsd  %xmm0,0x10(%rsi)
L54:
  mov    0x28(%rax),%r9
  test   %r9,%r9
  js     L115
  pxor   %xmm0,%xmm0
  cvtsi2sd %r9,%xmm0
  mov    0x30(%rax),%r9
  test   %r9,%r9
  js     L81
L186:
  pxor   %xmm1,%xmm1
  cvtsi2sd %r9,%xmm1
  mov    0x18(%rax),%r9
  unpcklpd %xmm1,%xmm0
  test   %r9,%r9
  js     L242
L226:
  pxor   %xmm1,%xmm1
  cvtsi2sd %r9,%xmm1
  mov    0x20(%rax),%r9
  test   %r9,%r9
  js     L249
L34:
  pxor   %xmm2,%xmm2
  cvtsi2sd %r9,%xmm2
L134:
  unpcklpd %xmm2,%xmm1
  movups %xmm0,0x28(%rsi)
  movups %xmm1,0x18(%rsi)
  cmp    %rcx,%rdx
  jb     L55
  mov    %rdx,%r9
  sub    %rcx,%r9
  js     L30
  pxor   %xmm0,%xmm0
  cvtsi2sd %r9,%xmm0
L5:
  pxor   %xmm1,%xmm1
  cvtsi2sd %r8d,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x38(%rsi)
L55:
  mov    0x40(%rax),%rax
  mov    0x40(%rdi),%rdi
  cmp    %rcx,%rdx
  jbe    L12
  cmp    %rdi,%rax
  jae    L193
L12:
  ret
  nopl   (%rax)
L193:
  sub    %rdi,%rax
  js     L239
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  sub    %rcx,%rdx
  js     L74
L101:
  pxor   %xmm1,%xmm1
  cvtsi2sd %rdx,%xmm1
L122:
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x40(%rsi)
  ret
  xchg   %ax,%ax
L24:
  mov    %rdx,%rcx
  and    $0x1,%edx
  pxor   %xmm0,%xmm0
  shr    %rcx
  or     %rdx,%rcx
  cvtsi2sd %rcx,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L38
  xchg   %ax,%ax
L184:
  mov    %rdx,%rcx
  and    $0x1,%edx
  pxor   %xmm0,%xmm0
  shr    %rcx
  or     %rdx,%rcx
  cvtsi2sd %rcx,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L167
  xchg   %ax,%ax
L141:
  mov    %r9,%r10
  and    $0x1,%r9d
  pxor   %xmm0,%xmm0
  shr    %r10
  or     %r9,%r10
  cvtsi2sd %r10,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L89
  nop
L30:
  mov    %r9,%r10
  and    $0x1,%r9d
  pxor   %xmm0,%xmm0
  shr    %r10
  or     %r9,%r10
  cvtsi2sd %r10,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L5
  nop
L115:
  mov    %r9,%r10
  and    $0x1,%r9d
  pxor   %xmm0,%xmm0
  shr    %r10
  or     %r9,%r10
  mov    0x30(%rax),%r9
  cvtsi2sd %r10,%xmm0
  addsd  %xmm0,%xmm0
  test   %r9,%r9
  jns    L186
L81:
  mov    %r9,%r10
  and    $0x1,%r9d
  pxor   %xmm1,%xmm1
  shr    %r10
  or     %r9,%r10
  mov    0x18(%rax),%r9
  cvtsi2sd %r10,%xmm1
  addsd  %xmm1,%xmm1
  unpcklpd %xmm1,%xmm0
  test   %r9,%r9
  jns    L226
L242:
  mov    %r9,%r10
  and    $0x1,%r9d
  pxor   %xmm1,%xmm1
  shr    %r10
  or     %r9,%r10
  mov    0x20(%rax),%r9
  cvtsi2sd %r10,%xmm1
  addsd  %xmm1,%xmm1
  test   %r9,%r9
  jns    L34
L249:
  mov    %r9,%r10
  and    $0x1,%r9d
  pxor   %xmm2,%xmm2
  shr    %r10
  or     %r9,%r10
  cvtsi2sd %r10,%xmm2
  addsd  %xmm2,%xmm2
  jmp    L134
  nopl   0x0(%rax,%rax,1)
L239:
  mov    %rax,%rdi
  and    $0x1,%eax
  pxor   %xmm0,%xmm0
  shr    %rdi
  or     %rax,%rdi
  cvtsi2sd %rdi,%xmm0
  addsd  %xmm0,%xmm0
  sub    %rcx,%rdx
  jns    L101
L74:
  mov    %rdx,%rax
  and    $0x1,%edx
  pxor   %xmm1,%xmm1
  shr    %rax
  or     %rdx,%rax
  cvtsi2sd %rax,%xmm1
  addsd  %xmm1,%xmm1
  jmp    L122
```

assistant: ```c
void set_nginx_record(struct module *mod, double st_array[], unsigned long long pre_array[], unsigned long long cur_array[], int inter) {
  int i;
  for (i = 0; i < 3; i++) {
    if (cur_array[i] >= pre_array[i]) {
      st_array[i] = cur_array[i] - pre_array[i];
    }
  }
  for (i = 3; i < 7; i++) {
    st_array[i] = cur_array[i];
  }
  if (cur_array[2] >= pre_array[2]) {
    st_array[7] = (cur_array[2] - pre_array[2]) * 1.0 / inter;
  }
  if (cur_array[8] >= pre_array[8]) {
    if (cur_array[2] > pre_array[2]) {
      st_array[8] = (cur_array[8] - pre_array[8]) * 1.0 / (cur_array[2] - pre_array[2]);
    }
  }
}
```