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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movss  D49(%rip),%xmm0
  movss  %xmm0,-0x28(%rbp)
  movss  D49(%rip),%xmm0
  movss  %xmm0,-0x24(%rbp)
  lea    -0x30(%rbp),%rdx
  mov    D164(%rip),%rax
  movq   %rax,%xmm0
  mov    $0xa,%esi
  mov    $0x0,%edi
  call   <arange@plt>
  mov    %rax,-0x18(%rbp)
  movss  D49(%rip),%xmm0
  movss  %xmm0,-0x20(%rbp)
  movss  D158(%rip),%xmm0
  movss  %xmm0,-0x1c(%rbp)
  mov    -0x30(%rbp),%edx
  movss  -0x24(%rbp),%xmm2
  movss  -0x28(%rbp),%xmm1
  movss  -0x20(%rbp),%xmm0
  mov    -0x1c(%rbp),%ecx
  mov    -0x18(%rbp),%rax
  movaps %xmm2,%xmm3
  movaps %xmm1,%xmm2
  movaps %xmm0,%xmm1
  movd   %ecx,%xmm0
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <tinti@plt>
  mov    %rax,-0x10(%rbp)
  movl   $0x0,-0x2c(%rbp)
  jmp    L14
L15:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  cvtss2sd %xmm0,%xmm0
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  pxor   %xmm4,%xmm4
  cvtss2sd %xmm1,%xmm4
  movq   %xmm4,%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  lea    D141(%rip),%rax
  mov    %rax,%rdi
  mov    $0x2,%eax
  call   <printf@plt>
  addl   $0x1,-0x2c(%rbp)
L14:
  mov    -0x30(%rbp),%eax
  cmp    %eax,-0x2c(%rbp)
  jl     L15
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  movss  D49(%rip),%xmm0
  movss  %xmm0,-0x20(%rbp)
  movss  D158(%rip),%xmm0
  movss  %xmm0,-0x1c(%rbp)
  mov    -0x30(%rbp),%edx
  movss  -0x24(%rbp),%xmm2
  movss  -0x28(%rbp),%xmm1
  movss  -0x20(%rbp),%xmm0
  mov    -0x1c(%rbp),%ecx
  mov    -0x18(%rbp),%rax
  movaps %xmm2,%xmm3
  movaps %xmm1,%xmm2
  movaps %xmm0,%xmm1
  movd   %ecx,%xmm0
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <tinti@plt>
  mov    %rax,-0x10(%rbp)
  lea    D99(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movss  -0x1c(%rbp),%xmm0
  movaps %xmm0,%xmm1
  mov    D60(%rip),%eax
  movd   %eax,%xmm0
  call   <r1@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D147(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movss  -0x1c(%rbp),%xmm0
  mov    -0x20(%rbp),%eax
  movaps %xmm0,%xmm1
  movd   %eax,%xmm0
  call   <r1@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D147(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movss  -0x20(%rbp),%xmm1
  movss  -0x1c(%rbp),%xmm0
  mov    -0x1c(%rbp),%eax
  movaps %xmm1,%xmm2
  movaps %xmm0,%xmm1
  movd   %eax,%xmm0
  call   <r2@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D104(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movss  -0x20(%rbp),%xmm1
  movss  -0x1c(%rbp),%xmm0
  mov    -0x1c(%rbp),%eax
  movaps %xmm1,%xmm2
  movaps %xmm0,%xmm1
  movd   %eax,%xmm0
  call   <r2@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D104(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movss  -0x1c(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  movss  -0x20(%rbp),%xmm0
  mov    -0x1c(%rbp),%edx
  movaps %xmm0,%xmm1
  movd   %edx,%xmm0
  mov    %eax,%edi
  call   <sr3@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movss  -0x20(%rbp),%xmm0
  addss  %xmm0,%xmm0
  cvttss2si %xmm0,%eax
  movss  -0x20(%rbp),%xmm0
  mov    -0x1c(%rbp),%edx
  movaps %xmm0,%xmm1
  movd   %edx,%xmm0
  mov    %eax,%edi
  call   <sr3@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movss  -0x20(%rbp),%xmm0
  addss  %xmm0,%xmm0
  movd   %xmm0,%eax
  movss  -0x20(%rbp),%xmm1
  movss  -0x1c(%rbp),%xmm0
  movaps %xmm1,%xmm2
  movaps %xmm0,%xmm1
  movd   %eax,%xmm0
  call   <r4@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D83(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movss  -0x1c(%rbp),%xmm0
  addss  -0x20(%rbp),%xmm0
  movd   %xmm0,%eax
  movss  -0x20(%rbp),%xmm1
  movss  -0x1c(%rbp),%xmm0
  movaps %xmm1,%xmm2
  movaps %xmm0,%xmm1
  movd   %eax,%xmm0
  call   <r4@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D83(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movss  -0x1c(%rbp),%xmm0
  addss  -0x20(%rbp),%xmm0
  movd   %xmm0,%eax
  movss  -0x20(%rbp),%xmm1
  movss  -0x1c(%rbp),%xmm0
  movaps %xmm1,%xmm2
  movaps %xmm0,%xmm1
  movd   %eax,%xmm0
  call   <r5@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D119(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movss  -0x20(%rbp),%xmm0
  addss  %xmm0,%xmm0
  addss  -0x1c(%rbp),%xmm0
  movd   %xmm0,%eax
  movss  -0x20(%rbp),%xmm1
  movss  -0x1c(%rbp),%xmm0
  movaps %xmm1,%xmm2
  movaps %xmm0,%xmm1
  movd   %eax,%xmm0
  call   <r5@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D119(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L11
  call   <__stack_chk_fail@plt>
L11:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D49
datatype: f32
name: retrieve_data
arguments: data_label: D164
datatype: f64
name: retrieve_data
arguments: data_label: D158
datatype: f32
name: retrieve_data
arguments: data_label: D141
datatype: string
name: retrieve_data
arguments: data_label: D99
datatype: string
name: retrieve_data
arguments: data_label: D60
datatype: byte[4]
name: retrieve_data
arguments: data_label: D147
datatype: string
name: retrieve_data
arguments: data_label: D104
datatype: string
name: retrieve_data
arguments: data_label: D5
datatype: string
name: retrieve_data
arguments: data_label: D83
datatype: string
name: retrieve_data
arguments: data_label: D119
datatype: string

tool: D49: 1

tool: D164: 0.001

tool: D158: 2

tool: D141: (%f) %f


tool: D99: Case 2: Ts < Tr < 2*Ts

tool: {"D60": [0x00,0x00,0x00,0x00]}

tool: D147: r1: %f


tool: D104: r2: %f


tool: D5: sr3: %f


tool: D83: r4: %f


tool: D119: r5: %f


assistant: ```c
int main() {
  float t0 = 1.0;
  float slip = 1.0;
  int i;
  float *t;
  float *stf;
  int nt;
  float test;
  t = arange(0, 10, 0.001, &nt);
  float Ts = 1.0;
  float Tr = 2.0;
  stf = tinti(t, nt, Tr, Ts, t0, slip);
  for (i = 0; i < nt; i++) {
    printf("(%f) %f\n", t[i], stf[i]);
  }
  free(stf);
  Ts = 1.0;
  Tr = 2.0;
  stf = tinti(t, nt, Tr, Ts, t0, slip);
  printf("Case 2: Ts < Tr < 2*Ts\n");
  printf("r1: %f\n", r1(0, Tr));
  printf("r1: %f\n", r1(Ts, Tr));
  printf("r2: %f\n", r2(Tr, Tr, Ts));
  printf("r2: %f\n", r2(Tr, Tr, Ts));
  printf("sr3: %f\n", sr3(Tr, Tr, Ts));
  printf("sr3: %f\n", sr3(2 * Ts, Tr, Ts));
  printf("r4: %f\n", r4(2 * Ts, Tr, Ts));
  printf("r4: %f\n", r4(Tr + Ts, Tr, Ts));
  printf("r5: %f\n", r5(Tr + Ts, Tr, Ts));
  printf("r5: %f\n", r5(Tr + 2 * Ts, Tr, Ts));
  free(stf);
  free(t);
  return 0;
}
```