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

```asm
<set_proc_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
  add    $0x10,%rax
  mov    (%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  jbe    L152
  mov    -0x20(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  mov    -0x18(%rbp),%rdx
  add    $0x10,%rdx
  mov    (%rdx),%rdx
  sub    %rdx,%rax
  mov    -0x10(%rbp),%rdx
  lea    0x10(%rdx),%rcx
  test   %rax,%rax
  js     L119
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L264
L119:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L264:
  movsd  %xmm0,(%rcx)
  mov    -0x20(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  jb     L229
  jmp    L138
L152:
  mov    -0x10(%rbp),%rax
  add    $0x10,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  jmp    L96
L138:
  mov    -0x20(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rcx
  mov    %rdx,%rax
  sub    %rcx,%rax
  test   %rax,%rax
  js     L51
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L259
L51:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L259:
  movsd  D15(%rip),%xmm1
  mulsd  %xmm1,%xmm0
  mov    -0x10(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm1
  divsd  %xmm1,%xmm0
  mov    -0x10(%rbp),%rax
  movsd  %xmm0,(%rax)
  jmp    L66
L229:
  mov    -0x10(%rbp),%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
L66:
  mov    -0x20(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  jb     L22
  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     L198
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L17
L198:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L17:
  movsd  D15(%rip),%xmm1
  mulsd  %xmm1,%xmm0
  mov    -0x10(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm1
  mov    -0x10(%rbp),%rax
  add    $0x8,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  jmp    L6
L22:
  mov    -0x10(%rbp),%rax
  add    $0x8,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
L6:
  mov    -0x20(%rbp),%rax
  add    $0x20,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  js     L42
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L71
L42:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L71:
  movsd  D15(%rip),%xmm1
  mulsd  %xmm0,%xmm1
  mov    -0x20(%rbp),%rax
  add    $0x18,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  js     L185
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L243
L185:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L243:
  mov    -0x10(%rbp),%rax
  add    $0x18,%rax
  divsd  %xmm0,%xmm1
  movsd  %xmm1,(%rax)
  mov    -0x20(%rbp),%rax
  add    $0x20,%rax
  mov    (%rax),%rax
  mov    -0x10(%rbp),%rdx
  lea    0x20(%rdx),%rcx
  test   %rax,%rax
  js     L104
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L62
L104:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L62:
  movsd  %xmm0,(%rcx)
  mov    -0x20(%rbp),%rax
  add    $0x28,%rax
  mov    (%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    $0x28,%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  jb     L21
  mov    -0x20(%rbp),%rax
  add    $0x28,%rax
  mov    (%rax),%rax
  mov    -0x18(%rbp),%rdx
  add    $0x28,%rdx
  mov    (%rdx),%rdx
  sub    %rdx,%rax
  test   %rax,%rax
  js     L113
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L211
L113:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L211:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x24(%rbp),%xmm1
  mov    -0x10(%rbp),%rax
  add    $0x28,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  jmp    L46
L21:
  mov    -0x10(%rbp),%rax
  add    $0x28,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
L46:
  mov    -0x20(%rbp),%rax
  add    $0x30,%rax
  mov    (%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    $0x30,%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  jb     L31
  mov    -0x20(%rbp),%rax
  add    $0x30,%rax
  mov    (%rax),%rax
  mov    -0x18(%rbp),%rdx
  add    $0x30,%rdx
  mov    (%rdx),%rdx
  sub    %rdx,%rax
  test   %rax,%rax
  js     L37
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L52
L37:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L52:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x24(%rbp),%xmm1
  mov    -0x10(%rbp),%rax
  add    $0x30,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  jmp    L96
L31:
  mov    -0x10(%rbp),%rax
  add    $0x28,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
L96:
  pop    %rbp
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D15
datatype: f64

tool: D15: 100

assistant: ```c
void set_proc_record(struct module *mod, double st_array[], unsigned long long pre_array[], unsigned long long cur_array[], int inter) {
  if (cur_array[2] > pre_array[2]) {
    st_array[2] = cur_array[2] - pre_array[2];
  } else {
    st_array[2] = 0;
    return;
  }
  if (cur_array[0] >= pre_array[0]) {
    st_array[0] = (cur_array[0] - pre_array[0]) * 100.0 / st_array[2];
  } else {
    st_array[0] = 0;
  }
  if (cur_array[1] >= pre_array[1]) {
    st_array[1] = (cur_array[1] - pre_array[1]) * 100.0 / st_array[2];
  } else {
    st_array[1] = 0;
  }
  st_array[3] = cur_array[4] * 100.0 / cur_array[3];
  st_array[4] = cur_array[4];
  if (cur_array[5] >= pre_array[5]) {
    st_array[5] = (cur_array[5] - pre_array[5]) * 1.0 / inter;
  } else {
    st_array[5] = 0;
  }
  if (cur_array[6] >= pre_array[6]) {
    st_array[6] = (cur_array[6] - pre_array[6]) * 1.0 / inter;
  } else {
    st_array[5] = 0;
  }
}
```