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

```asm
<set_tcp_record>:
  endbr64
  mov    %rdx,%rax
  mov    %rcx,%rdx
  mov    (%rcx),%rcx
  mov    (%rax),%rdi
  cmp    %rdi,%rcx
  jb     L121
  sub    %rdi,%rcx
  js     L21
  pxor   %xmm0,%xmm0
  cvtsi2sd %rcx,%xmm0
L90:
  pxor   %xmm1,%xmm1
  cvtsi2sd %r8d,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rsi)
L121:
  mov    0x8(%rdx),%rcx
  mov    0x8(%rax),%rdi
  cmp    %rdi,%rcx
  jb     L183
  sub    %rdi,%rcx
  js     L109
  pxor   %xmm0,%xmm0
  cvtsi2sd %rcx,%xmm0
L155:
  pxor   %xmm1,%xmm1
  cvtsi2sd %r8d,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x8(%rsi)
L183:
  mov    0x10(%rdx),%rcx
  mov    0x10(%rax),%rdi
  cmp    %rdi,%rcx
  jb     L36
  sub    %rdi,%rcx
  js     L57
  pxor   %xmm0,%xmm0
  cvtsi2sd %rcx,%xmm0
L20:
  pxor   %xmm1,%xmm1
  cvtsi2sd %r8d,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x10(%rsi)
L36:
  mov    0x18(%rdx),%rcx
  mov    0x18(%rax),%rdi
  cmp    %rdi,%rcx
  jb     L88
  mov    %rcx,%r9
  sub    %rdi,%r9
  js     L169
  pxor   %xmm0,%xmm0
  cvtsi2sd %r9,%xmm0
L134:
  pxor   %xmm1,%xmm1
  cvtsi2sd %r8d,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x18(%rsi)
L88:
  mov    0x20(%rdx),%rdx
  mov    0x20(%rax),%rax
  cmp    %rax,%rdx
  jb     L27
  cmp    %rdi,%rcx
  ja     L47
L27:
  movsd  0x20(%rsi),%xmm0
  movsd  D3(%rip),%xmm1
L192:
  comisd %xmm1,%xmm0
  jbe    L139
  movsd  %xmm1,0x20(%rsi)
L139:
  ret
  nopl   0x0(%rax)
L47:
  sub    %rax,%rdx
  js     L195
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
L85:
  movsd  D3(%rip),%xmm1
  mulsd  %xmm1,%xmm0
  sub    %rdi,%rcx
  js     L108
  pxor   %xmm2,%xmm2
  cvtsi2sd %rcx,%xmm2
L187:
  divsd  %xmm2,%xmm0
  movsd  %xmm0,0x20(%rsi)
  jmp    L192
  nopl   0x0(%rax,%rax,1)
L109:
  mov    %rcx,%rdi
  and    $0x1,%ecx
  pxor   %xmm0,%xmm0
  shr    %rdi
  or     %rcx,%rdi
  cvtsi2sd %rdi,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L155
  xchg   %ax,%ax
L21:
  mov    %rcx,%rdi
  and    $0x1,%ecx
  pxor   %xmm0,%xmm0
  shr    %rdi
  or     %rcx,%rdi
  cvtsi2sd %rdi,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L90
  xchg   %ax,%ax
L169:
  mov    %r9,%r10
  and    $0x1,%r9d
  pxor   %xmm0,%xmm0
  shr    %r10
  or     %r9,%r10
  cvtsi2sd %r10,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L134
  nop
L57:
  mov    %rcx,%rdi
  and    $0x1,%ecx
  pxor   %xmm0,%xmm0
  shr    %rdi
  or     %rcx,%rdi
  cvtsi2sd %rdi,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L20
  xchg   %ax,%ax
L195:
  mov    %rdx,%rax
  and    $0x1,%edx
  pxor   %xmm0,%xmm0
  shr    %rax
  or     %rdx,%rax
  cvtsi2sd %rax,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L85
  xchg   %ax,%ax
L108:
  mov    %rcx,%rax
  and    $0x1,%ecx
  pxor   %xmm2,%xmm2
  shr    %rax
  or     %rcx,%rax
  cvtsi2sd %rax,%xmm2
  addsd  %xmm2,%xmm2
  jmp    L187
```

tool_calls: name: read_data
arguments: label: D3
data_type: f64

tool: D3: 100

assistant: ```c
void set_tcp_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 < 4; i++) {
    if (cur_array[i] >= pre_array[i])
      st_array[i] = (cur_array[i] - pre_array[i]) * 1.0 / inter;
  }
  if ((cur_array[4] >= pre_array[4]) && (cur_array[3] > pre_array[3]))
    st_array[4] = (cur_array[4] - pre_array[4]) * 100.0 / (cur_array[3] - pre_array[3]);
  if (st_array[4] > 100.0)
    st_array[4] = 100.0;
}
```