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

```asm
<gplot>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %rdx,-0x38(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x2c(%rbp),%eax
  mov    $0x8,%esi
  mov    %eax,%edi
  call   <calloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x2c(%rbp),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rcx
  mov    -0x8(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  movl   $0x0,-0x20(%rbp)
  jmp    L4
L77:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <abs@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm2
  comisd -0x10(%rbp),%xmm2
  jbe    L103
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <abs@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x10(%rbp)
L103:
  addl   $0x1,-0x20(%rbp)
L4:
  mov    -0x20(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L77
  movl   $0x0,-0x1c(%rbp)
  jmp    L7
L106:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm1
  divsd  -0x10(%rbp),%xmm1
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  D15(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x1c(%rbp)
L7:
  mov    -0x1c(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L106
  mov    -0x38(%rbp),%rax
  mov    %rax,%rsi
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0xa,-0x18(%rbp)
  jmp    L108
L49:
  movl   $0x0,-0x14(%rbp)
  jmp    L17
L37:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  cvttsd2si %xmm0,%eax
  cmp    %eax,-0x18(%rbp)
  jne    L35
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L86
L35:
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L86:
  addl   $0x1,-0x14(%rbp)
L17:
  mov    -0x14(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L37
  mov    $0xa,%edi
  call   <putchar@plt>
  subl   $0x1,-0x18(%rbp)
L108:
  cmpl   $0xfffffff6,-0x18(%rbp)
  jge    L49
  nop
  nop
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D15
datatype: f32[2]
name: retrieve_data
arguments: data_label: D0
datatype: string
name: retrieve_data
arguments: data_label: D6
datatype: string
name: retrieve_data
arguments: data_label: D2
datatype: string

tool: {"D15": [0.0,2.5625]}

tool: D0: %s:


tool: D6:  * 

tool: D2:    

assistant: ```c
void gplot(double *yc, int length, char *name) {
  double vmax = 0;
  double *y = calloc(length, sizeof(double));
  memcpy(y, yc, length * sizeof(double));
  putchar('\n');
  putchar('\n');
  for (int i = 0; i < length; i++)
    if (abs(y[i]) > vmax)
      vmax = abs(y[i]);
  for (int i = 0; i < length; i++) {
    y[i] = 10 * (y[i] / vmax);
  }
  printf("%s:\n", name);
  for (int i = 10; i >= -10; i--) {
    for (int t = 0; t < length; t++)
      if ((int)y[t] == i)
        printf(" * ");
      else
        printf("   ");
    putchar('\n');
  }
}
```