user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  movq   $0xfffffffffffffffb,0x40(%rsp)
  mov    $0x1f4,%esi
  mov    $0x1,%edi
  call   <vector@plt>
  mov    %rax,%r12
  mov    $0x1f4,%esi
  mov    $0x1,%edi
  call   <vector@plt>
  mov    %rax,%rbp
  mov    $0x1f4,%esi
  mov    $0x1,%edi
  call   <vector@plt>
  mov    %rax,%rbx
  lea    D81(%rip),%rdx
  lea    D84(%rip),%rsi
  lea    D99(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D104(%rip),%r9
  lea    D55(%rip),%r8
  mov    %r9,%rcx
  mov    %r8,%rdx
  lea    D88(%rip),%rsi
  lea    D43(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x4,%r13d
L24:
  lea    0x40(%rsp),%r14
  mov    %r14,%rdi
  call   <gasdev@plt>
  pxor   %xmm5,%xmm5
  cvtsd2ss %xmm0,%xmm5
  movss  %xmm5,0xc(%rsp)
  movss  %xmm5,(%r12,%r13,1)
  mov    %r14,%rdi
  call   <gasdev@plt>
  mulsd  D109(%rip),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd 0xc(%rsp),%xmm1
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,0x0(%rbp,%r13,1)
  mov    %r14,%rdi
  call   <gasdev@plt>
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,(%rbx,%r13,1)
  mov    %r14,%rdi
  call   <gasdev@plt>
  pxor   %xmm1,%xmm1
  cvtss2sd (%rbx,%r13,1),%xmm1
  mulsd  D109(%rip),%xmm0
  addsd  %xmm0,%xmm1
  cvtsd2ss %xmm1,%xmm1
  movss  %xmm1,(%rbx,%r13,1)
  add    $0x4,%r13
  cmp    $0x7d4,%r13
  jne    L24
  lea    0x34(%rsp),%rcx
  lea    0x18(%rsp),%rdx
  mov    $0x1f4,%esi
  mov    %r12,%rdi
  call   <avevar@plt>
  lea    0x38(%rsp),%rcx
  lea    0x1c(%rsp),%rdx
  mov    $0x1f4,%esi
  mov    %rbp,%rdi
  call   <avevar@plt>
  lea    0x3c(%rsp),%rcx
  lea    0x20(%rsp),%rdx
  mov    $0x1f4,%esi
  mov    %rbx,%rdi
  call   <avevar@plt>
  mov    $0x4,%eax
  movss  D13(%rip),%xmm2
L47:
  movss  0x18(%rsp),%xmm1
  subss  %xmm2,%xmm1
  movss  (%r12,%rax,1),%xmm0
  subss  %xmm1,%xmm0
  movss  %xmm0,(%r12,%rax,1)
  movss  0x0(%rbp,%rax,1),%xmm0
  subss  0x1c(%rsp),%xmm0
  movss  %xmm0,0x0(%rbp,%rax,1)
  movss  (%rbx,%rax,1),%xmm0
  subss  0x20(%rsp),%xmm0
  movss  %xmm0,(%rbx,%rax,1)
  add    $0x4,%rax
  cmp    $0x7d4,%rax
  jne    L47
  mov    $0x1,%r13d
  lea    0x24(%rsp),%r15
  lea    D77(%rip),%r14
L5:
  pxor   %xmm0,%xmm0
  cvtsi2sd %r13d,%xmm0
  mulsd  D44(%rip),%xmm0
  pxor   %xmm6,%xmm6
  cvtsd2ss %xmm0,%xmm6
  movss  %xmm6,0xc(%rsp)
  mov    $0x4,%eax
L48:
  pxor   %xmm0,%xmm0
  cvtss2sd 0x0(%rbp,%rax,1),%xmm0
  addsd  D44(%rip),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,0x0(%rbp,%rax,1)
  pxor   %xmm0,%xmm0
  cvtss2sd (%rbx,%rax,1),%xmm0
  addsd  D44(%rip),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,(%rbx,%rax,1)
  add    $0x4,%rax
  cmp    $0x7d4,%rax
  jne    L48
  lea    0x2c(%rsp),%rcx
  mov    %r15,%r8
  mov    $0x1f4,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <tptest@plt>
  lea    0x30(%rsp),%rcx
  lea    0x28(%rsp),%r8
  mov    $0x1f4,%edx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <tptest@plt>
  pxor   %xmm0,%xmm0
  cvtss2sd 0xc(%rsp),%xmm0
  pxor   %xmm4,%xmm4
  cvtss2sd 0x28(%rsp),%xmm4
  pxor   %xmm3,%xmm3
  cvtss2sd 0x30(%rsp),%xmm3
  pxor   %xmm2,%xmm2
  cvtss2sd 0x24(%rsp),%xmm2
  pxor   %xmm1,%xmm1
  cvtss2sd 0x2c(%rsp),%xmm1
  mov    %r14,%rdi
  mov    $0x5,%eax
  call   <printf@plt>
  add    $0x1,%r13d
  cmp    $0xc,%r13d
  jne    L5
  mov    $0x1f4,%edx
  mov    $0x1,%esi
  mov    %rbx,%rdi
  call   <free_vector@plt>
  mov    $0x1f4,%edx
  mov    $0x1,%esi
  mov    %rbp,%rdi
  call   <free_vector@plt>
  mov    $0x1f4,%edx
  mov    $0x1,%esi
  mov    %r12,%rdi
  call   <free_vector@plt>
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L41
  mov    $0x0,%eax
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L41:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D81
type_guessed: string
name: read_data
arguments: tag: D84
type_guessed: string
name: read_data
arguments: tag: D99
type_guessed: string
name: read_data
arguments: tag: D104
type_guessed: string
name: read_data
arguments: tag: D55
type_guessed: string
name: read_data
arguments: tag: D88
type_guessed: string
name: read_data
arguments: tag: D43
type_guessed: string
name: read_data
arguments: tag: D109
type_guessed: f64
name: read_data
arguments: tag: D13
type_guessed: byte[4]
name: read_data
arguments: tag: D77
type_guessed: string
name: read_data
arguments: tag: D44
type_guessed: f64

tool: D81: Uncorrelated:

tool: D84: Correlated:

tool: D99: %29s %31s


tool: D104: Probability

tool: D55: t

tool: D88: Shift

tool: D43: %7s %11s %17s %11s %17s


tool: D109: 0.3

tool: {"D13": [0xcd,0xcc,0x4c,0x3d]}

tool: D77: %6.2f %14.4f %12.4f %16.4f %12.4f


tool: D44: 0.01

assistant: ```c
int main(void) {
  long idum = (-5);
  int i, j;
  float ave1, ave2, ave3;
  float offset, prob1, prob2, shift, t1, t2;
  float var1, var2, var3, *data1, *data2, *data3;
  data1 = vector(1, 500);
  data2 = vector(1, 500);
  data3 = vector(1, 500);
  printf("%29s %31s\n", "Correlated:", "Uncorrelated:");
  printf("%7s %11s %17s %11s %17s\n", "Shift", "t", "Probability", "t", "Probability");
  offset = (11 / 2) * 0.01;
  for (j = 1; j <= 500; j++) {
    data1[j] = gasdev(&idum);
    data2[j] = data1[j] + 0.3 * gasdev(&idum);
    data3[j] = gasdev(&idum);
    data3[j] += 0.3 * gasdev(&idum);
  }
  avevar(data1, 500, &ave1, &var1);
  avevar(data2, 500, &ave2, &var2);
  avevar(data3, 500, &ave3, &var3);
  for (j = 1; j <= 500; j++) {
    data1[j] -= ave1 - offset;
    data2[j] -= ave2;
    data3[j] -= ave3;
  }
  for (i = 1; i <= 11; i++) {
    shift = i * 0.01;
    for (j = 1; j <= 500; j++) {
      data2[j] += 0.01;
      data3[j] += 0.01;
    }
    tptest(data1, data2, 500, &t1, &prob1);
    tptest(data1, data3, 500, &t2, &prob2);
    printf("%6.2f %14.4f %12.4f %16.4f %12.4f\n", shift, t1, prob1, t2, prob2);
  }
  free_vector(data3, 1, 500);
  free_vector(data2, 1, 500);
  free_vector(data1, 1, 500);
  return 0;
}
```