user: Please show me the C implementation that matches the assembly code listed below:

```asm
<quaddobl_generate>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    %rdx,-0x20(%rbp)
  mov    %rcx,-0x28(%rbp)
  mov    %r8,-0x30(%rbp)
  mov    -0x20(%rbp),%rdx
  mov    -0x14(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <generate_winding_numbers@plt>
  lea    D63(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x4(%rbp)
  jmp    L54
L79:
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%esi
  lea    D42(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x4(%rbp)
L54:
  mov    -0x4(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L79
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    -0x18(%rbp),%eax
  lea    0x0(,%rax,4),%ecx
  mov    -0x28(%rbp),%rdx
  mov    -0x14(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <generate_directions@plt>
  lea    D59(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0x4(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L16
L59:
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%esi
  lea    D11(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x8(%rbp)
  jmp    L37
L31:
  mov    -0x4(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x4(%rbp)
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  lea    D31(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  addl   $0x1,-0x8(%rbp)
L37:
  mov    -0x18(%rbp),%eax
  shl    $0x2,%eax
  cmp    %eax,-0x8(%rbp)
  jl     L31
  mov    $0xa,%edi
  call   <putchar@plt>
  addl   $0x1,-0xc(%rbp)
L16:
  mov    -0xc(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L59
  mov    -0x14(%rbp),%eax
  lea    0x0(,%rax,4),%edx
  mov    -0x30(%rbp),%rax
  mov    %rax,%rsi
  mov    %edx,%edi
  call   <generate_errors@plt>
  lea    D12(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0x4(%rbp)
  jmp    L17
L36:
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  lea    D31(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  addl   $0x1,-0x4(%rbp)
L17:
  mov    -0x14(%rbp),%eax
  shl    $0x2,%eax
  cmp    %eax,-0x4(%rbp)
  jl     L36
  mov    $0xa,%edi
  call   <putchar@plt>
  nop
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D63
datatype: string
name: disassemble_data
arguments: data_label: D42
datatype: string
name: disassemble_data
arguments: data_label: D59
datatype: string
name: disassemble_data
arguments: data_label: D11
datatype: string
name: disassemble_data
arguments: data_label: D31
datatype: string
name: disassemble_data
arguments: data_label: D12
datatype: string

tool: D63: The winding numbers :

tool: D42:  %d

tool: D59: The directions :

tool: D11:   direction %d :

tool: D31:  %.3e

tool: D12: The errors :

assistant: ```c
void quaddobl_generate(int nbt, int dim, int *wind, double *dir, double *err) {
  int i, j, k;
  generate_winding_numbers(nbt, wind);
  printf("The winding numbers :");
  for (k = 0; k < nbt; k++)
    printf(" %d", wind[k]);
  printf("\n");
  generate_directions(nbt, 4 * dim, dir);
  printf("The directions :\n");
  k = 0;
  for (i = 0; i < nbt; i++) {
    printf("  direction %d :", i + 1);
    for (j = 0; j < 4 * dim; j++)
      printf(" %.3e", dir[k++]);
    printf("\n");
  }
  generate_errors(4 * nbt, err);
  printf("The errors :\n");
  for (k = 0; k < 4 * nbt; k++)
    printf(" %.3e", err[k]);
  printf("\n");
}
```