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

```asm
<set_io_record>:
  endbr64
  mov    %rsi,%rdi
  push   %rbx
  mov    (%rcx),%rax
  mov    %rdx,%rsi
  cmp    (%rdx),%rax
  jae    L212
  mov    %rax,(%rdx)
L212:
  mov    0x8(%rcx),%rax
  cmp    %rax,0x8(%rsi)
  jbe    L70
  mov    %rax,0x8(%rsi)
L70:
  mov    0x10(%rcx),%rax
  cmp    %rax,0x10(%rsi)
  jbe    L240
  mov    %rax,0x10(%rsi)
L240:
  mov    0x18(%rcx),%rax
  cmp    %rax,0x18(%rsi)
  jbe    L165
  mov    %rax,0x18(%rsi)
L165:
  mov    0x20(%rcx),%rax
  cmp    %rax,0x20(%rsi)
  jbe    L30
  mov    %rax,0x20(%rsi)
L30:
  mov    0x28(%rcx),%rax
  cmp    %rax,0x28(%rsi)
  jbe    L220
  mov    %rax,0x28(%rsi)
L220:
  mov    0x30(%rcx),%rax
  cmp    %rax,0x30(%rsi)
  jbe    L134
  mov    %rax,0x30(%rsi)
L134:
  mov    0x38(%rcx),%rax
  cmp    %rax,0x38(%rsi)
  jbe    L22
  mov    %rax,0x38(%rsi)
L22:
  mov    0x40(%rcx),%rax
  cmp    %rax,0x40(%rsi)
  jbe    L51
  mov    %rax,0x40(%rsi)
L51:
  mov    0x48(%rcx),%rax
  cmp    %rax,0x48(%rsi)
  jbe    L161
  mov    %rax,0x48(%rsi)
L161:
  mov    0x50(%rcx),%rax
  cmp    0x50(%rsi),%rax
  jae    L131
  mov    %rax,0x50(%rsi)
L131:
  mov    (%rcx),%rdx
  sub    (%rsi),%rdx
  mov    0x20(%rcx),%rax
  mov    %rdx,%r11
  sub    0x20(%rsi),%rax
  mov    0x10(%rcx),%r9
  mov    0x30(%rcx),%r10
  sub    0x10(%rsi),%r9
  sub    0x30(%rsi),%r10
  add    %rax,%r11
  js     L31
  pxor   %xmm7,%xmm7
  cvtsi2sd %r11,%xmm7
L53:
  pxor   %xmm5,%xmm5
  mov    0x8(%rcx),%r11
  cvtsi2sd %r8d,%xmm5
  movapd %xmm5,%xmm1
  unpcklpd %xmm1,%xmm1
  sub    0x8(%rsi),%r11
  js     L42
  pxor   %xmm6,%xmm6
  cvtsi2sd %r11,%xmm6
L107:
  mov    0x28(%rcx),%r11
  sub    0x28(%rsi),%r11
  js     L158
  pxor   %xmm0,%xmm0
  cvtsi2sd %r11,%xmm0
L215:
  unpcklpd %xmm0,%xmm6
  divpd  %xmm1,%xmm6
  test   %rdx,%rdx
  js     L277
  pxor   %xmm3,%xmm3
  cvtsi2sd %rdx,%xmm3
L230:
  test   %rax,%rax
  js     L2
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
L232:
  unpcklpd %xmm0,%xmm3
  movapd %xmm5,%xmm0
  addsd  %xmm5,%xmm0
  divpd  %xmm1,%xmm3
  test   %r9,%r9
  js     L337
  pxor   %xmm1,%xmm1
  cvtsi2sd %r9,%xmm1
L127:
  test   %r10,%r10
  js     L109
  pxor   %xmm2,%xmm2
  cvtsi2sd %r10,%xmm2
L56:
  unpcklpd %xmm2,%xmm1
  unpcklpd %xmm0,%xmm0
  mov    0x40(%rcx),%rax
  divpd  %xmm0,%xmm1
  sub    0x40(%rsi),%rax
  js     L252
  pxor   %xmm2,%xmm2
  cvtsi2sd %rax,%xmm2
L276:
  imul   $0x3e8,%r8d,%r8d
  mov    0x48(%rcx),%rax
  xor    %edx,%edx
  sub    0x48(%rsi),%rax
  movslq %r8d,%r8
  div    %r8
  test   %rax,%rax
  js     L149
  pxor   %xmm8,%xmm8
  cvtsi2sd %rax,%xmm8
L1:
  pxor   %xmm4,%xmm4
  ucomisd %xmm4,%xmm7
  jp     L129
  jne    L129
  pxor   %xmm0,%xmm0
  movapd %xmm0,%xmm4
  movapd %xmm0,%xmm9
L36:
  mulsd  D6(%rip),%xmm5
  unpcklpd %xmm8,%xmm0
  movups %xmm1,0x20(%rdi)
  movapd %xmm4,%xmm1
  movups %xmm0,0x30(%rdi)
  movsd  D13(%rip),%xmm0
  unpcklpd %xmm9,%xmm1
  pop    %rbx
  movups %xmm6,(%rdi)
  movups %xmm3,0x10(%rdi)
  movups %xmm1,0x40(%rdi)
  divsd  %xmm5,%xmm2
  minsd  %xmm2,%xmm0
  movsd  %xmm0,0x50(%rdi)
  ret
  nopw   0x0(%rax,%rax,1)
L129:
  add    %r10,%r9
  pxor   %xmm0,%xmm0
  mov    0x38(%rcx),%rax
  add    0x18(%rcx),%rax
  shr    %r9
  sub    0x18(%rsi),%rax
  cvtsi2sd %r9,%xmm0
  divsd  %xmm7,%xmm0
  sub    0x38(%rsi),%rax
  js     L156
  pxor   %xmm4,%xmm4
  cvtsi2sd %rax,%xmm4
L65:
  movapd %xmm2,%xmm9
  divsd  %xmm7,%xmm4
  divsd  %xmm7,%xmm9
  jmp    L36
  nopl   0x0(%rax)
L156:
  mov    %rax,%rdx
  and    $0x1,%eax
  pxor   %xmm4,%xmm4
  shr    %rdx
  or     %rax,%rdx
  cvtsi2sd %rdx,%xmm4
  addsd  %xmm4,%xmm4
  jmp    L65
  nopl   0x0(%rax,%rax,1)
L149:
  mov    %rax,%rdx
  and    $0x1,%eax
  pxor   %xmm8,%xmm8
  shr    %rdx
  or     %rax,%rdx
  cvtsi2sd %rdx,%xmm8
  addsd  %xmm8,%xmm8
  jmp    L1
  nopl   0x0(%rax,%rax,1)
L252:
  mov    %rax,%rdx
  and    $0x1,%eax
  pxor   %xmm2,%xmm2
  shr    %rdx
  or     %rax,%rdx
  cvtsi2sd %rdx,%xmm2
  addsd  %xmm2,%xmm2
  jmp    L276
  xchg   %ax,%ax
L109:
  mov    %r10,%rax
  mov    %r10,%rdx
  pxor   %xmm2,%xmm2
  shr    %rax
  and    $0x1,%edx
  or     %rdx,%rax
  cvtsi2sd %rax,%xmm2
  addsd  %xmm2,%xmm2
  jmp    L56
  nopl   0x0(%rax)
L337:
  mov    %r9,%rax
  mov    %r9,%rdx
  pxor   %xmm1,%xmm1
  shr    %rax
  and    $0x1,%edx
  or     %rdx,%rax
  cvtsi2sd %rax,%xmm1
  addsd  %xmm1,%xmm1
  jmp    L127
  nopl   0x0(%rax)
L2:
  mov    %rax,%rdx
  and    $0x1,%eax
  pxor   %xmm0,%xmm0
  shr    %rdx
  or     %rax,%rdx
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L232
  xchg   %ax,%ax
L277:
  mov    %rdx,%r11
  and    $0x1,%edx
  pxor   %xmm3,%xmm3
  shr    %r11
  or     %rdx,%r11
  cvtsi2sd %r11,%xmm3
  addsd  %xmm3,%xmm3
  jmp    L230
  xchg   %ax,%ax
L158:
  mov    %r11,%rbx
  and    $0x1,%r11d
  pxor   %xmm0,%xmm0
  shr    %rbx
  or     %r11,%rbx
  cvtsi2sd %rbx,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L215
  nop
L42:
  mov    %r11,%rbx
  and    $0x1,%r11d
  pxor   %xmm6,%xmm6
  shr    %rbx
  or     %r11,%rbx
  cvtsi2sd %rbx,%xmm6
  addsd  %xmm6,%xmm6
  jmp    L107
  nop
L31:
  mov    %r11,%rbx
  and    $0x1,%r11d
  pxor   %xmm7,%xmm7
  shr    %rbx
  or     %r11,%rbx
  cvtsi2sd %rbx,%xmm7
  addsd  %xmm7,%xmm7
  jmp    L53
```

tool_calls: name: parse_data
arguments: data_label: D6
type_infered: f64
name: parse_data
arguments: data_label: D13
type_infered: f64

tool: D6: 10

tool: D13: 100

assistant: ```c
void set_io_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 < 11; i++) {
    if (cur_array[i] < pre_array[i]) {
      pre_array[i] = cur_array[i];
    }
  }
  unsigned long long rd_ios = cur_array[0] - pre_array[0];
  unsigned long long rd_merges = cur_array[1] - pre_array[1];
  unsigned long long rd_sectors = cur_array[2] - pre_array[2];
  unsigned long long rd_ticks = cur_array[3] - pre_array[3];
  ;
  unsigned long long wr_ios = cur_array[4] - pre_array[4];
  unsigned long long wr_merges = cur_array[5] - pre_array[5];
  unsigned long long wr_sectors = cur_array[6] - pre_array[6];
  unsigned long long wr_ticks = cur_array[7] - pre_array[7];
  unsigned long long ticks = cur_array[8] - pre_array[8];
  unsigned long long aveq = cur_array[9] - pre_array[9];
  double n_ios = rd_ios + wr_ios;
  double n_ticks = rd_ticks + wr_ticks;
  double n_kbytes = (rd_sectors + wr_sectors) / 2;
  st_array[0] = rd_merges / (inter * 1.0);
  st_array[1] = wr_merges / (inter * 1.0);
  st_array[2] = rd_ios / (inter * 1.0);
  st_array[3] = wr_ios / (inter * 1.0);
  st_array[4] = rd_sectors / (inter * 2.0);
  st_array[5] = wr_sectors / (inter * 2.0);
  st_array[6] = n_ios ? n_kbytes / n_ios : 0.0;
  st_array[7] = aveq / (inter * 1000);
  st_array[8] = n_ios ? n_ticks / n_ios : 0.0;
  st_array[9] = n_ios ? ticks / n_ios : 0.0;
  st_array[10] = ticks / (inter * 10.0);
  if (st_array[10] > 100.0)
    st_array[10] = 100.0;
}
```