user: What would the C source look like for the assembly code provided here?

```asm
<make_tx_filter>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  lea    -0x60000(%rsp),%r11
L167:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L167
  add    $0xffffffffffffff80,%rsp
  mov    %edi,-0x60054(%rbp)
  mov    %esi,-0x60058(%rbp)
  movsd  %xmm0,-0x60060(%rbp)
  movsd  %xmm1,-0x60068(%rbp)
  movsd  %xmm2,-0x60070(%rbp)
  mov    %edx,-0x60074(%rbp)
  mov    %rcx,-0x60080(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x60054(%rbp),%eax
  imul   -0x60058(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x60040(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x60054(%rbp),%xmm0
  mulsd  -0x60068(%rbp),%xmm0
  movapd %xmm0,%xmm1
  addsd  %xmm0,%xmm1
  movsd  -0x60068(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x60020(%rbp)
  movsd  -0x60070(%rbp),%xmm0
  movsd  %xmm0,-0x60018(%rbp)
  movsd  -0x60018(%rbp),%xmm0
  mov    -0x60020(%rbp),%rdx
  mov    -0x60040(%rbp),%esi
  lea    -0x60010(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rdx,%xmm0
  mov    $0x0,%ecx
  mov    $0x1,%edx
  mov    %rax,%rdi
  call   <compute_raised_cosine_filter@plt>
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x60038(%rbp)
  mov    -0x60054(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x60048(%rbp)
  jmp    L159
L93:
  mov    -0x60048(%rbp),%eax
  cltq
  movsd  -0x60010(%rbp,%rax,8),%xmm0
  movsd  -0x60038(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x60038(%rbp)
  mov    -0x60054(%rbp),%eax
  add    %eax,-0x60048(%rbp)
L159:
  mov    -0x60048(%rbp),%eax
  cmp    -0x60040(%rbp),%eax
  jl     L93
  movl   $0x0,-0x60048(%rbp)
  jmp    L81
L257:
  mov    -0x60048(%rbp),%eax
  cltq
  movsd  -0x60010(%rbp,%rax,8),%xmm0
  divsd  -0x60038(%rbp),%xmm0
  mov    -0x60048(%rbp),%eax
  cltq
  movsd  %xmm0,-0x60010(%rbp,%rax,8)
  addl   $0x1,-0x60048(%rbp)
L81:
  mov    -0x60048(%rbp),%eax
  cmp    -0x60040(%rbp),%eax
  jl     L257
  movsd  D95(%rip),%xmm0
  movsd  %xmm0,-0x60038(%rbp)
  cmpl   $0x0,-0x60074(%rbp)
  je     L106
  movsd  D82(%rip),%xmm0
  movsd  %xmm0,-0x60028(%rbp)
  movl   $0x0,-0x60048(%rbp)
  jmp    L201
L74:
  mov    -0x60048(%rbp),%eax
  cltq
  movsd  -0x60010(%rbp,%rax,8),%xmm0
  movq   D152(%rip),%xmm1
  andpd  %xmm1,%xmm0
  comisd -0x60028(%rbp),%xmm0
  jbe    L97
  mov    -0x60048(%rbp),%eax
  cltq
  movsd  -0x60010(%rbp,%rax,8),%xmm0
  movq   D152(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  %xmm0,-0x60028(%rbp)
L97:
  addl   $0x1,-0x60048(%rbp)
L201:
  mov    -0x60048(%rbp),%eax
  cmp    -0x60040(%rbp),%eax
  jl     L74
  movsd  D146(%rip),%xmm0
  movsd  %xmm0,-0x60030(%rbp)
  movsd  -0x60028(%rbp),%xmm0
  movsd  D95(%rip),%xmm1
  comisd %xmm1,%xmm0
  jb     L130
  movsd  -0x60030(%rbp),%xmm0
  divsd  -0x60028(%rbp),%xmm0
  movsd  %xmm0,-0x60030(%rbp)
  movsd  D95(%rip),%xmm0
  divsd  -0x60028(%rbp),%xmm0
  movsd  %xmm0,-0x60038(%rbp)
L130:
  movl   $0x0,-0x60048(%rbp)
  jmp    L19
L24:
  mov    -0x60048(%rbp),%eax
  cltq
  movsd  -0x60010(%rbp,%rax,8),%xmm0
  mulsd  -0x60030(%rbp),%xmm0
  mov    -0x60048(%rbp),%eax
  cltq
  movsd  %xmm0,-0x60010(%rbp,%rax,8)
  addl   $0x1,-0x60048(%rbp)
L19:
  mov    -0x60048(%rbp),%eax
  cmp    -0x60040(%rbp),%eax
  jl     L24
L106:
  mov    -0x60038(%rbp),%rdx
  mov    -0x60080(%rbp),%rax
  movq   %rdx,%xmm0
  mov    %rax,%rsi
  lea    D162(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    -0x60054(%rbp),%edx
  mov    -0x60080(%rbp),%rax
  mov    %rax,%rsi
  lea    D23(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmpl   $0x0,-0x60074(%rbp)
  je     L66
  lea    D110(%rip),%rax
  jmp    L125
L66:
  lea    D147(%rip),%rax
L125:
  mov    -0x60058(%rbp),%esi
  mov    -0x60080(%rbp),%rcx
  mov    -0x60080(%rbp),%rdx
  mov    %esi,%r8d
  mov    %rax,%rsi
  lea    D209(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0x60044(%rbp)
  jmp    L0
L20:
  mov    -0x60044(%rbp),%eax
  mov    %eax,-0x6003c(%rbp)
  lea    D84(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  cmpl   $0x0,-0x60074(%rbp)
  je     L197
  mov    -0x6003c(%rbp),%eax
  cltq
  movsd  -0x60010(%rbp,%rax,8),%xmm0
  cvttsd2si %xmm0,%eax
  mov    -0x60044(%rbp),%edx
  mov    %eax,%esi
  lea    D172(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L94
L197:
  mov    -0x6003c(%rbp),%eax
  cltq
  mov    -0x60010(%rbp,%rax,8),%rax
  mov    -0x60044(%rbp),%edx
  mov    %edx,%esi
  movq   %rax,%xmm0
  lea    D170(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
L94:
  movl   $0x1,-0x60048(%rbp)
  jmp    L101
L56:
  mov    -0x60048(%rbp),%eax
  imul   -0x60054(%rbp),%eax
  mov    %eax,%edx
  mov    -0x60044(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x6003c(%rbp)
  cmpl   $0x0,-0x60074(%rbp)
  je     L119
  mov    -0x6003c(%rbp),%eax
  cltq
  movsd  -0x60010(%rbp,%rax,8),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%esi
  lea    D185(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L68
L119:
  mov    -0x6003c(%rbp),%eax
  cltq
  mov    -0x60010(%rbp,%rax,8),%rax
  movq   %rax,%xmm0
  lea    D139(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
L68:
  addl   $0x1,-0x60048(%rbp)
L101:
  mov    -0x60058(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x60048(%rbp)
  jl     L56
  mov    -0x60048(%rbp),%eax
  imul   -0x60054(%rbp),%eax
  mov    %eax,%edx
  mov    -0x60044(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x6003c(%rbp)
  cmpl   $0x0,-0x60074(%rbp)
  je     L238
  mov    -0x6003c(%rbp),%eax
  cltq
  movsd  -0x60010(%rbp,%rax,8),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%esi
  lea    D124(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L158
L238:
  mov    -0x6003c(%rbp),%eax
  cltq
  mov    -0x60010(%rbp,%rax,8),%rax
  movq   %rax,%xmm0
  lea    D33(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
L158:
  mov    -0x60054(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x60044(%rbp)
  jge    L253
  lea    D216(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L232
L253:
  lea    D61(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L232:
  addl   $0x1,-0x60044(%rbp)
L0:
  mov    -0x60044(%rbp),%eax
  cmp    -0x60054(%rbp),%eax
  jl     L20
  lea    D89(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L48
  call   <__stack_chk_fail@plt>
L48:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D95
datatype: f64
name: unpack_data
arguments: tag: D82
datatype: f32[2]
name: unpack_data
arguments: tag: D152
datatype: qword
name: unpack_data
arguments: tag: D146
datatype: f64
name: unpack_data
arguments: tag: D162
datatype: string
name: unpack_data
arguments: tag: D23
datatype: string
name: unpack_data
arguments: tag: D110
datatype: string
name: unpack_data
arguments: tag: D147
datatype: string
name: unpack_data
arguments: tag: D209
datatype: string
name: unpack_data
arguments: tag: D22
datatype: string
name: unpack_data
arguments: tag: D84
datatype: string
name: unpack_data
arguments: tag: D172
datatype: string
name: unpack_data
arguments: tag: D170
datatype: string
name: unpack_data
arguments: tag: D185
datatype: string
name: unpack_data
arguments: tag: D139
datatype: string
name: unpack_data
arguments: tag: D124
datatype: string
name: unpack_data
arguments: tag: D33
datatype: string
name: unpack_data
arguments: tag: D216
datatype: string
name: unpack_data
arguments: tag: D61
datatype: string
name: unpack_data
arguments: tag: D89
datatype: string

tool: D95: 1

tool: {"D82": [0.0,-1.875]}

tool: D152: 9223372036854775807

tool: D146: 32767

tool: D162: #define TX_PULSESHAPER%s_GAIN        %ff


tool: D23: #define TX_PULSESHAPER%s_COEFF_SETS  %d


tool: D110: int16_t

tool: D147: float

tool: D209: static const %s tx_pulseshaper%s[TX_PULSESHAPER%s_COEFF_SETS][%d] =


tool: D22: {

tool: D84:     {

tool: D172:         %8d,     /* Filter %d */


tool: D170:         %15.10ff,     /* Filter %d */


tool: D185:         %8d,


tool: D139:         %15.10ff,


tool: D124:         %8d


tool: D33:         %15.10ff


tool: D216:     },

tool: D61:     }

tool: D89: };

assistant: ```c
void make_tx_filter(int coeff_sets, int coeffs_per_filter, double carrier, double baud_rate, double excess_bandwidth, int fixed_point, const char *tag) {
  int i;
  int j;
  int x;
  int total_coeffs;
  double alpha;
  double beta;
  double gain;
  double scaling;
  double peak;
  double coeffs[384 * 128 + 1];
  total_coeffs = coeff_sets * coeffs_per_filter + 1;
  alpha = baud_rate / (2.0 * (double)(coeff_sets * baud_rate));
  beta = excess_bandwidth;
  compute_raised_cosine_filter(coeffs, total_coeffs, (!0), 0, alpha, beta);
  gain = 0.0;
  for (i = coeff_sets / 2; i < total_coeffs; i += coeff_sets)
    gain += coeffs[i];
  for (i = 0; i < total_coeffs; i++)
    coeffs[i] /= gain;
  gain = 1.0;
  if (fixed_point) {
    peak = -1.0;
    for (i = 0; i < total_coeffs; i++) {
      if (fabs(coeffs[i]) > peak)
        peak = fabs(coeffs[i]);
    }
    scaling = 32767.0;
    if (peak >= 1.0) {
      scaling /= peak;
      gain = 1.0 / peak;
    }
    for (i = 0; i < total_coeffs; i++)
      coeffs[i] *= scaling;
  }
  printf("#define TX_PULSESHAPER%s_GAIN        %ff\n", tag, gain);
  printf("#define TX_PULSESHAPER%s_COEFF_SETS  %d\n", tag, coeff_sets);
  printf("static const %s tx_pulseshaper%s[TX_PULSESHAPER%s_COEFF_SETS][%d] =\n", (fixed_point) ? "int16_t" : "float", tag, tag, coeffs_per_filter);
  printf("{\n");
  for (j = 0; j < coeff_sets; j++) {
    x = j;
    printf("    {\n");
    if (fixed_point)
      printf("        %8d,     /* Filter %d */\n", (int)coeffs[x], j);
    else
      printf("        %15.10ff,     /* Filter %d */\n", coeffs[x], j);
    for (i = 1; i < coeffs_per_filter - 1; i++) {
      x = i * coeff_sets + j;
      if (fixed_point)
        printf("        %8d,\n", (int)coeffs[x]);
      else
        printf("        %15.10ff,\n", coeffs[x]);
    }
    x = i * coeff_sets + j;
    if (fixed_point)
      printf("        %8d\n", (int)coeffs[x]);
    else
      printf("        %15.10ff\n", coeffs[x]);
    if (j < coeff_sets - 1)
      printf("    },\n");
    else
      printf("    }\n");
  }
  printf("};\n");
}
```