user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<make_tx_filter>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x60000(%rsp),%r11
L82:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L82
  sub    $0x48,%rsp
  pxor   %xmm3,%xmm3
  cvtsi2sd %edi,%xmm3
  movapd %xmm1,%xmm0
  mov    %edi,%r13d
  mov    %edi,0x1c(%rsp)
  imul   %esi,%r13d
  mov    %edi,%r15d
  mov    %esi,%ebp
  mov    %edx,%ebx
  movapd %xmm2,%xmm1
  mov    %rcx,%r12
  mov    $0x1,%edx
  xor    %ecx,%ecx
  mov    %fs:0x28,%rax
  mov    %rax,0x60038(%rsp)
  xor    %eax,%eax
  lea    0x30(%rsp),%rax
  mulsd  %xmm0,%xmm3
  lea    0x1(%r13),%r14d
  mov    %rax,%rdi
  mov    %rax,0x10(%rsp)
  mov    %r14d,%esi
  addsd  %xmm3,%xmm3
  divsd  %xmm3,%xmm0
  call   <compute_raised_cosine_filter@plt>
  mov    %r15d,%eax
  shr    $0x1f,%eax
  add    %r15d,%eax
  sar    %eax
  cmp    %eax,%r14d
  jle    L9
  mov    0x10(%rsp),%rcx
  movslq %r15d,%rdx
  cltq
  pxor   %xmm1,%xmm1
  nopl   0x0(%rax)
L273:
  addsd  (%rcx,%rax,8),%xmm1
  add    %rdx,%rax
  cmp    %eax,%r14d
  jg     L273
L188:
  test   %r14d,%r14d
  jle    L75
  mov    0x10(%rsp),%rsi
  mov    %r13d,%eax
  lea    0x38(%rsp,%rax,8),%rcx
  mov    %rsi,%rdx
  mov    %rsi,%rax
  nopl   0x0(%rax)
L126:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rax)
  cmp    %rcx,%rax
  jne    L126
  test   %ebx,%ebx
  jne    L157
L40:
  movsd  D54(%rip),%xmm0
  mov    %r12,%rsi
  mov    $0x1,%eax
  lea    D100(%rip),%rdi
  call   <printf@plt>
  mov    0x1c(%rsp),%edx
  mov    %r12,%rsi
  xor    %eax,%eax
  lea    D52(%rip),%rdi
  call   <printf@plt>
  lea    D88(%rip),%rsi
L208:
  mov    %ebp,%r8d
  mov    %r12,%rcx
  mov    %r12,%rdx
  xor    %eax,%eax
  lea    D123(%rip),%rdi
  call   <printf@plt>
  lea    D2(%rip),%rdi
  call   <puts@plt>
  mov    0x1c(%rsp),%eax
  test   %eax,%eax
  jle    L129
  movslq 0x1c(%rsp),%rcx
  sub    $0x1,%ebp
  movq   $0x0,0x8(%rsp)
  mov    %rcx,%rax
  lea    -0x1(%rcx),%edx
  mov    %rcx,0x20(%rsp)
  lea    0x0(,%rcx,8),%r12
  imul   %ebp,%eax
  cmp    $0x1,%ebp
  mov    %edx,0x28(%rsp)
  cmovle %ecx,%eax
  mov    %eax,0x2c(%rsp)
  nopw   0x0(%rax,%rax,1)
L224:
  mov    0x8(%rsp),%r15
  lea    D110(%rip),%rdi
  mov    %r15d,0x18(%rsp)
  mov    %r15d,%r14d
  call   <puts@plt>
  mov    0x10(%rsp),%rax
  test   %ebx,%ebx
  je     L265
  cvttsd2si (%rax,%r15,8),%esi
  mov    %r15d,%edx
  xor    %eax,%eax
  lea    D47(%rip),%rdi
  call   <printf@plt>
  cmp    $0x1,%ebp
  jle    L173
L97:
  mov    0x10(%rsp),%rax
  add    0x1c(%rsp),%r14d
  mov    $0x1,%r15d
  movslq %r14d,%r14
  lea    (%rax,%r14,8),%r13
  lea    D95(%rip),%r14
  jmp    L162
  xchg   %ax,%ax
L98:
  cvttsd2si %xmm0,%esi
  mov    %r14,%rdi
  xor    %eax,%eax
  add    $0x1,%r15d
  add    %r12,%r13
  call   <printf@plt>
  cmp    %r15d,%ebp
  je     L85
L162:
  movsd  0x0(%r13),%xmm0
  test   %ebx,%ebx
  jne    L98
  lea    D39(%rip),%rdi
  mov    $0x1,%eax
  add    $0x1,%r15d
  add    %r12,%r13
  call   <printf@plt>
  cmp    %r15d,%ebp
  jne    L162
L85:
  mov    0x18(%rsp),%eax
  add    0x2c(%rsp),%eax
  cltq
  movsd  0x30(%rsp,%rax,8),%xmm0
  test   %ebx,%ebx
  je     L90
L148:
  cvttsd2si %xmm0,%esi
  lea    D149(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x8(%rsp),%ecx
  cmp    %ecx,0x28(%rsp)
  jle    L41
L48:
  lea    D17(%rip),%rdi
  call   <puts@plt>
L5:
  addq   $0x1,0x8(%rsp)
  mov    0x8(%rsp),%rax
  cmp    %rax,0x20(%rsp)
  jne    L224
L129:
  lea    D96(%rip),%rdi
  call   <puts@plt>
  mov    0x60038(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L101
  add    $0x60048,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L265:
  mov    0x8(%rsp),%rcx
  mov    %r15d,%esi
  lea    D182(%rip),%rdi
  movsd  (%rax,%rcx,8),%xmm0
  mov    $0x1,%eax
  call   <printf@plt>
  cmp    $0x1,%ebp
  jg     L97
  mov    0x2c(%rsp),%eax
  add    %r15d,%eax
  cltq
  movsd  0x30(%rsp,%rax,8),%xmm0
  cs nopw 0x0(%rax,%rax,1)
L90:
  lea    D185(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    0x8(%rsp),%ecx
  cmp    %ecx,0x28(%rsp)
  jg     L48
L41:
  lea    D212(%rip),%rdi
  call   <puts@plt>
  jmp    L5
L157:
  movsd  D200(%rip),%xmm1
  movq   D60(%rip),%xmm2
L230:
  movsd  (%rdx),%xmm0
  add    $0x8,%rdx
  andpd  %xmm2,%xmm0
  maxsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  cmp    %rcx,%rdx
  jne    L230
  movsd  D54(%rip),%xmm0
  movsd  D130(%rip),%xmm2
  comisd %xmm0,%xmm1
  movapd %xmm0,%xmm3
  jb     L36
  divsd  %xmm1,%xmm2
  movapd %xmm0,%xmm3
  divsd  %xmm1,%xmm3
L36:
  mov    0x10(%rsp),%rax
  xor    %edx,%edx
  cs nopw 0x0(%rax,%rax,1)
L3:
  movsd  (%rax),%xmm0
  mov    %edx,%ecx
  add    $0x8,%rax
  add    $0x1,%edx
  mulsd  %xmm2,%xmm0
  movsd  %xmm0,-0x8(%rax)
  cmp    %ecx,%r13d
  jg     L3
L205:
  movapd %xmm3,%xmm0
  mov    %r12,%rsi
  mov    $0x1,%eax
  lea    D100(%rip),%rdi
  call   <printf@plt>
  mov    0x1c(%rsp),%edx
  mov    %r12,%rsi
  xor    %eax,%eax
  lea    D52(%rip),%rdi
  call   <printf@plt>
  lea    D92(%rip),%rsi
  jmp    L208
L173:
  mov    0x2c(%rsp),%eax
  add    %r15d,%eax
  cltq
  movsd  0x30(%rsp,%rax,8),%xmm0
  jmp    L148
L75:
  movsd  D54(%rip),%xmm3
  test   %ebx,%ebx
  jne    L205
  jmp    L40
L9:
  pxor   %xmm1,%xmm1
  jmp    L188
L101:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D54
type: f64
name: unpack_data
arguments: data_label: D100
type: string
name: unpack_data
arguments: data_label: D52
type: string
name: unpack_data
arguments: data_label: D88
type: string
name: unpack_data
arguments: data_label: D123
type: string
name: unpack_data
arguments: data_label: D2
type: string
name: unpack_data
arguments: data_label: D110
type: string
name: unpack_data
arguments: data_label: D47
type: string
name: unpack_data
arguments: data_label: D95
type: string
name: unpack_data
arguments: data_label: D39
type: string
name: unpack_data
arguments: data_label: D149
type: string
name: unpack_data
arguments: data_label: D17
type: string
name: unpack_data
arguments: data_label: D96
type: string
name: unpack_data
arguments: data_label: D182
type: string
name: unpack_data
arguments: data_label: D185
type: string
name: unpack_data
arguments: data_label: D212
type: string
name: unpack_data
arguments: data_label: D200
type: f32[2]
name: unpack_data
arguments: data_label: D60
type: qword
name: unpack_data
arguments: data_label: D130
type: f64
name: unpack_data
arguments: data_label: D92
type: string

tool: D54: 1

tool: D100: #define TX_PULSESHAPER%s_GAIN        %ff


tool: D52: #define TX_PULSESHAPER%s_COEFF_SETS  %d


tool: D88: float

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


tool: D2: {

tool: D110:     {

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


tool: D95:         %8d,


tool: D39:         %15.10ff,


tool: D149:         %8d


tool: D17:     },

tool: D96: };

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


tool: D185:         %15.10ff


tool: D212:     }

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

tool: D60: 9223372036854775807

tool: D130: 32767

tool: D92: int16_t

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