user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    $0x10,%esi
  mov    $0x1,%edi
  call   <vector@plt>
  mov    %rax,-0x20(%rbp)
L186:
  mov    $0x10,%esi
  lea    D1(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x3c(%rbp),%rax
  mov    %rax,%rsi
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movss  -0x3c(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  comiss %xmm1,%xmm0
  jae    L104
  movl   $0x1,-0x30(%rbp)
  jmp    L176
L21:
  mov    -0x30(%rbp),%eax
  sub    $0x1,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D140(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movss  -0x3c(%rbp),%xmm1
  cvtss2sd %xmm1,%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  mov    -0x30(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x20(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rbx
  movq   %rax,%xmm0
  call   <sin@plt>
  movd   %xmm0,%eax
  mov    %eax,(%rbx)
  addl   $0x1,-0x30(%rbp)
L176:
  cmpl   $0x10,-0x30(%rbp)
  jle    L21
  mov    -0x20(%rbp),%rax
  mov    $0x10,%esi
  mov    %rax,%rdi
  call   <sinft@plt>
  movss  D131(%rip),%xmm0
  movss  %xmm0,-0x38(%rbp)
  movss  D37(%rip),%xmm0
  movss  %xmm0,-0x34(%rbp)
  movl   $0x1,-0x30(%rbp)
  jmp    L34
L17:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  movss  -0x34(%rbp),%xmm0
  comiss %xmm1,%xmm0
  jbe    L58
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x34(%rbp)
L58:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  comiss -0x38(%rbp),%xmm0
  jbe    L192
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x38(%rbp)
L192:
  addl   $0x1,-0x30(%rbp)
L34:
  cmpl   $0x10,-0x30(%rbp)
  jle    L17
  movss  -0x38(%rbp),%xmm0
  movaps %xmm0,%xmm1
  subss  -0x34(%rbp),%xmm1
  movss  D82(%rip),%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,-0x28(%rbp)
  movl   $0x1,-0x30(%rbp)
  jmp    L44
L140:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  subss  -0x34(%rbp),%xmm0
  mulss  -0x28(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  movsd  D45(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movsd  D84(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x30(%rbp),%eax
  mov    %eax,%esi
  lea    D61(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x1,-0x2c(%rbp)
  jmp    L173
L60:
  mov    $0x2a,%edi
  call   <putchar@plt>
  addl   $0x1,-0x2c(%rbp)
L173:
  mov    -0x24(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x2c(%rbp)
  jle    L60
  mov    $0xa,%edi
  call   <putchar@plt>
  addl   $0x1,-0x30(%rbp)
L44:
  cmpl   $0x10,-0x30(%rbp)
  jle    L140
  lea    D96(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  call   <getchar@plt>
  mov    -0x20(%rbp),%rax
  mov    $0x10,%esi
  mov    %rax,%rdi
  call   <sinft@plt>
  movss  D131(%rip),%xmm0
  movss  %xmm0,-0x38(%rbp)
  movss  D37(%rip),%xmm0
  movss  %xmm0,-0x34(%rbp)
  movl   $0x1,-0x30(%rbp)
  jmp    L79
L203:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  movss  -0x34(%rbp),%xmm0
  comiss %xmm1,%xmm0
  jbe    L4
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x34(%rbp)
L4:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  comiss -0x38(%rbp),%xmm0
  jbe    L187
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x38(%rbp)
L187:
  addl   $0x1,-0x30(%rbp)
L79:
  cmpl   $0x10,-0x30(%rbp)
  jle    L203
  movss  -0x38(%rbp),%xmm0
  movaps %xmm0,%xmm1
  subss  -0x34(%rbp),%xmm1
  movss  D82(%rip),%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,-0x28(%rbp)
  movl   $0x1,-0x30(%rbp)
  jmp    L133
L198:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  subss  -0x34(%rbp),%xmm0
  mulss  -0x28(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  movsd  D45(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movsd  D84(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x30(%rbp),%eax
  mov    %eax,%esi
  lea    D61(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x1,-0x2c(%rbp)
  jmp    L67
L76:
  mov    $0x2a,%edi
  call   <putchar@plt>
  addl   $0x1,-0x2c(%rbp)
L67:
  mov    -0x24(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x2c(%rbp)
  jle    L76
  mov    $0xa,%edi
  call   <putchar@plt>
  addl   $0x1,-0x30(%rbp)
L133:
  cmpl   $0x10,-0x30(%rbp)
  jle    L198
  jmp    L186
L104:
  nop
  mov    -0x20(%rbp),%rax
  mov    $0x10,%edx
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <free_vector@plt>
  mov    $0x0,%eax
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L32
  call   <__stack_chk_fail@plt>
L32:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D1
type_infered: string
name: disassemble_data
arguments: tag: D2
type_infered: string
name: disassemble_data
arguments: tag: D140
type_infered: byte[8]
name: disassemble_data
arguments: tag: D131
type_infered: byte[4]
name: disassemble_data
arguments: tag: D37
type_infered: f32
name: disassemble_data
arguments: tag: D82
type_infered: f32
name: disassemble_data
arguments: tag: D45
type_infered: byte[8]
name: disassemble_data
arguments: tag: D84
type_infered: f64
name: disassemble_data
arguments: tag: D61
type_infered: string
name: disassemble_data
arguments: tag: D96
type_infered: string

tool: D1: 
Period of sinusoid in channels (3-%2d)


tool: D2: %f

tool: {"D140": [0x4a,0xd8,0x12,0x4d,0xfb,0x21,0x19,0x40]}

tool: {"D131": [0xf9,0x02,0x15,0xd0]}

tool: D37: 10000000000

tool: D82: 30

tool: {"D45": [0xfc,0xa9,0xf1,0xd2,0x4d,0x62,0x50,0x3f]}

tool: D84: 0.5

tool: D61: %4d  

tool: D96: press RETURN to continue ...

assistant: ```c
int main(void) {
  float big, per, scal, small, *data;
  int i, j, nlim;
  data = vector(1, 16);
  for (;;) {
    printf("\nPeriod of sinusoid in channels (3-%2d)\n", 16);
    scanf("%f", &per);
    if (per <= 0.0)
      break;
    for (i = 1; i <= 16; i++)
      data[i] = sin(2.0 * 3.1415926 * (i - 1) / per);
    sinft(data, 16);
    big = -1.0e10;
    small = 1.0e10;
    for (i = 1; i <= 16; i++) {
      if (data[i] < small)
        small = data[i];
      if (data[i] > big)
        big = data[i];
    }
    scal = 30.0 / (big - small);
    for (i = 1; i <= 16; i++) {
      nlim = (int)(scal * (data[i] - small) + 1.0e-3 + 0.5);
      printf("%4d  ", i);
      for (j = 1; j <= nlim + 1; j++)
        printf("*");
      printf("\n");
    }
    printf("press RETURN to continue ...\n");
    (void)getchar();
    sinft(data, 16);
    big = -1.0e10;
    small = 1.0e10;
    for (i = 1; i <= 16; i++) {
      if (data[i] < small)
        small = data[i];
      if (data[i] > big)
        big = data[i];
    }
    scal = 30.0 / (big - small);
    for (i = 1; i <= 16; i++) {
      nlim = (int)(scal * (data[i] - small) + 1.0e-3 + 0.5);
      printf("%4d  ", i);
      for (j = 1; j <= nlim + 1; j++)
        printf("*");
      printf("\n");
    }
  }
  free_vector(data, 1, 16);
  return 0;
}
```