user: 请将以下的汇编代码转换成C语言代码：

```asm
<gplot>:
  endbr64
  push   %r15
  mov    %esi,%r15d
  mov    $0x8,%esi
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  mov    %r15d,%edi
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  sub    $0x18,%rsp
  call   <calloc@plt>
  lea    0x0(,%r15,8),%edx
  mov    %r12,%rsi
  mov    %rax,%rdi
  mov    %rax,(%rsp)
  mov    %rax,%rbx
  call   <memcpy@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  test   %r15d,%r15d
  jle    L144
  mov    %r15d,%eax
  pxor   %xmm5,%xmm5
  mov    %rbx,%r12
  lea    (%rbx,%rax,8),%r13
  movsd  %xmm5,0x8(%rsp)
  jmp    L139
  nopl   (%rax)
L142:
  add    $0x8,%rbx
  cmp    %r13,%rbx
  je     L110
L139:
  movsd  (%rbx),%xmm0
  call   <abs@plt>
  comisd 0x8(%rsp),%xmm0
  jbe    L142
  movsd  (%rbx),%xmm0
  add    $0x8,%rbx
  call   <abs@plt>
  movsd  %xmm0,0x8(%rsp)
  cmp    %r13,%rbx
  jne    L139
L110:
  cmp    $0x1,%r15d
  je     L39
  movsd  0x8(%rsp),%xmm2
  mov    %r15d,%eax
  movapd D25(%rip),%xmm1
  shr    %eax
  shl    $0x4,%rax
  unpcklpd %xmm2,%xmm2
  add    (%rsp),%rax
  nopl   0x0(%rax,%rax,1)
L112:
  movupd (%r12),%xmm0
  add    $0x10,%r12
  divpd  %xmm2,%xmm0
  mulpd  %xmm1,%xmm0
  movups %xmm0,-0x10(%r12)
  cmp    %rax,%r12
  jne    L112
  mov    %r15d,%eax
  and    $0xfffffffe,%eax
  test   $0x1,%r15b
  je     L144
L95:
  mov    (%rsp),%rcx
  cltq
  lea    (%rcx,%rax,8),%rax
  movsd  (%rax),%xmm0
  divsd  0x8(%rsp),%xmm0
  mulsd  D25(%rip),%xmm0
  movsd  %xmm0,(%rax)
L144:
  mov    %rbp,%rsi
  lea    D24(%rip),%rdi
  xor    %eax,%eax
  mov    $0xa,%ebx
  call   <printf@plt>
  mov    (%rsp),%rdx
  lea    -0x1(%r15),%eax
  lea    D15(%rip),%r12
  lea    D9(%rip),%r13
  lea    0x8(%rdx,%rax,8),%rbp
  nopw   0x0(%rax,%rax,1)
L55:
  mov    (%rsp),%r14
  test   %r15d,%r15d
  jg     L54
  jmp    L67
  nopl   0x0(%rax,%rax,1)
L105:
  mov    %r12,%rdi
  xor    %eax,%eax
  add    $0x8,%r14
  call   <printf@plt>
  cmp    %r14,%rbp
  je     L67
L54:
  cvttsd2si (%r14),%eax
  cmp    %ebx,%eax
  jne    L105
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x8,%r14
  call   <printf@plt>
  cmp    %r14,%rbp
  jne    L54
L67:
  mov    $0xa,%edi
  sub    $0x1,%ebx
  call   <putchar@plt>
  cmp    $0xfffffff5,%ebx
  jne    L55
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L39:
  xor    %eax,%eax
  jmp    L95
```

tool_calls: name: read_data
arguments: data_label: D25
type_infered: f32[4]
name: read_data
arguments: data_label: D24
type_infered: string
name: read_data
arguments: data_label: D15
type_infered: string
name: read_data
arguments: data_label: D9
type_infered: string

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

tool: D24: %s:


tool: D15:    

tool: D9:  * 

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');
  }
}
```