user: Translate the below assembly code into C programming language:

```asm
<set_pharos_record>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    %rdx,-0x18(%rbp)
  mov    %rcx,-0x20(%rbp)
  mov    %r8d,-0x24(%rbp)
  mov    -0x20(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  jbe    L83
  mov    -0x20(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rcx
  mov    %rdx,%rax
  sub    %rcx,%rax
  test   %rax,%rax
  js     L131
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L65
L131:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L65
L83:
  pxor   %xmm0,%xmm0
L65:
  mov    -0x10(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x20(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  jbe    L8
  mov    -0x20(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  mov    -0x18(%rbp),%rdx
  add    $0x8,%rdx
  mov    (%rdx),%rdx
  sub    %rdx,%rax
  test   %rax,%rax
  js     L16
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L122
L16:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L122
L8:
  pxor   %xmm0,%xmm0
L122:
  mov    -0x10(%rbp),%rax
  add    $0x8,%rax
  movsd  %xmm0,(%rax)
  mov    -0x20(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  jbe    L27
  mov    -0x20(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  mov    -0x18(%rbp),%rdx
  add    $0x10,%rdx
  mov    (%rdx),%rdx
  sub    %rdx,%rax
  test   %rax,%rax
  js     L41
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L96
L41:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L96
L27:
  pxor   %xmm0,%xmm0
L96:
  mov    -0x10(%rbp),%rax
  add    $0x10,%rax
  movsd  %xmm0,(%rax)
  mov    -0x10(%rbp),%rax
  movsd  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x24(%rbp),%xmm1
  mov    -0x10(%rbp),%rax
  add    $0x18,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x20(%rbp),%rax
  add    $0x18,%rax
  mov    (%rax),%rax
  mov    -0x10(%rbp),%rdx
  lea    0x20(%rdx),%rcx
  test   %rax,%rax
  js     L51
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L21
L51:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L21:
  movsd  %xmm0,(%rcx)
  nop
  pop    %rbp
  ret
```

assistant: ```c
void set_pharos_record(struct module *mod, double st_array[], unsigned long long pre_array[], unsigned long long cur_array[], int inter) {
  st_array[0] = ((cur_array[0]) <= (pre_array[0]) ? 0 : (cur_array[0]) - (pre_array[0]));
  st_array[1] = ((cur_array[1]) <= (pre_array[1]) ? 0 : (cur_array[1]) - (pre_array[1]));
  st_array[2] = ((cur_array[2]) <= (pre_array[2]) ? 0 : (cur_array[2]) - (pre_array[2]));
  st_array[3] = st_array[0] * 1.0 / inter;
  st_array[4] = cur_array[3];
}
```