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

```asm
<gentbl_hapn4800>:
  endbr64
  push   %r15
  mov    %rdi,%rcx
  mov    $0x25,%edx
  mov    $0x1,%esi
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  lea    D403(%rip),%rdi
  push   %rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0xc8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xb8(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%r13
  call   <fwrite@plt>
  mov    $0xa0,%edx
  xor    %esi,%esi
  mov    %r13,%rdi
  call   <memset@plt>
  nopw   0x0(%rax,%rax,1)
L385:
  pxor   %xmm1,%xmm1
  cvtsi2sd %ebx,%xmm1
  movapd %xmm1,%xmm0
  subsd  D221(%rip),%xmm0
  movsd  %xmm1,0x8(%rsp)
  mulsd  D124(%rip),%xmm0
  mulsd  D253(%rip),%xmm0
  call   <sinc@plt>
  movsd  0x8(%rsp),%xmm1
  divsd  D114(%rip),%xmm1
  cvttsd2si %xmm1,%edi
  movsd  %xmm0,(%rsp)
  call   <hamming@plt>
  mulsd  (%rsp),%xmm0
  divsd  D86(%rip),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,0x20(%r13,%rbx,4)
  add    $0x1,%rbx
  cmp    $0x18,%rbx
  jne    L385
  lea    0x70(%rsp),%rdx
  mov    %r13,%rax
  nopl   (%rax)
L261:
  movss  (%rax),%xmm0
  subss  0x20(%rax),%xmm0
  add    $0x4,%rax
  movss  %xmm0,-0x4(%rax)
  cmp    %rdx,%rax
  jne    L261
  mov    %r12,%rcx
  mov    $0x2c,%edx
  mov    $0x1,%esi
  xor    %ebp,%ebp
  lea    D437(%rip),%rdi
  mov    $0x20,%r15d
  lea    D146(%rip),%rbx
  call   <fwrite@plt>
L68:
  cmp    $0x6,%ebp
  setle  (%rsp)
  xor    %r14d,%r14d
  nopl   0x0(%rax)
L391:
  mov    %rbp,%rax
  pxor   %xmm0,%xmm0
  mov    $0x1,%edx
L30:
  movss  0x0(%r13,%rax,4),%xmm1
  test   %edx,%r14d
  je     L114
  addss  %xmm1,%xmm0
L299:
  add    $0x8,%rax
  add    %edx,%edx
  cmp    %r15,%rax
  jne    L30
  mulss  D12(%rip),%xmm0
  xor    %eax,%eax
  mov    %rbx,%rsi
  mov    %r12,%rdi
  addss  D333(%rip),%xmm0
  cvttss2si %xmm0,%edx
  call   <fprintf@plt>
  cmp    $0xe,%r14d
  jle    L395
  cmpb   $0x0,(%rsp)
  jne    L395
L326:
  add    $0x1,%r14d
  cmp    $0x10,%r14d
  jne    L391
  add    $0x1,%r15
  add    $0x1,%rbp
  cmp    $0x28,%r15
  jne    L68
  mov    %r12,%rcx
  mov    $0x5,%edx
  mov    $0x1,%esi
  xor    %ebp,%ebp
  lea    D460(%rip),%rdi
  call   <fwrite@plt>
  mov    $0xa0,%edx
  xor    %esi,%esi
  mov    %r13,%rdi
  call   <memset@plt>
  xchg   %ax,%ax
L57:
  pxor   %xmm1,%xmm1
  cvtsi2sd %ebp,%xmm1
  movapd %xmm1,%xmm0
  subsd  D479(%rip),%xmm0
  movsd  %xmm1,0x8(%rsp)
  divsd  D370(%rip),%xmm0
  mulsd  D253(%rip),%xmm0
  call   <sinc@plt>
  movsd  0x8(%rsp),%xmm1
  divsd  D147(%rip),%xmm1
  cvttsd2si %xmm1,%edi
  movsd  %xmm0,(%rsp)
  call   <hamming@plt>
  mulsd  (%rsp),%xmm0
  divsd  D86(%rip),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,0x28(%r13,%rbp,4)
  add    $0x1,%rbp
  cmp    $0x1e,%rbp
  jne    L57
  lea    0x78(%r13),%rdx
  mov    %r13,%rax
  nopl   0x0(%rax)
L234:
  movss  (%rax),%xmm0
  subss  0x28(%rax),%xmm0
  add    $0x4,%rax
  movss  %xmm0,-0x4(%rax)
  cmp    %rax,%rdx
  jne    L234
  mov    %r12,%rcx
  mov    $0x2d,%edx
  mov    $0x1,%esi
  xor    %ebp,%ebp
  lea    D187(%rip),%rdi
  call   <fwrite@plt>
  nopw   0x0(%rax,%rax,1)
L331:
  cmp    $0x8,%ebp
  setle  (%rsp)
  xor    %r14d,%r14d
  nopw   0x0(%rax,%rax,1)
L293:
  mov    %rbp,%rax
  pxor   %xmm0,%xmm0
  mov    $0x1,%edx
L236:
  movss  0x0(%r13,%rax,4),%xmm1
  test   %edx,%r14d
  je     L167
  addss  %xmm1,%xmm0
L203:
  add    $0xa,%rax
  add    %edx,%edx
  cmp    %rax,%r15
  jne    L236
  mulss  D12(%rip),%xmm0
  xor    %eax,%eax
  mov    %rbx,%rsi
  mov    %r12,%rdi
  addss  D333(%rip),%xmm0
  cvttss2si %xmm0,%edx
  call   <fprintf@plt>
  cmp    $0xe,%r14d
  jle    L32
  cmpb   $0x0,(%rsp)
  jne    L32
L360:
  add    $0x1,%r14d
  cmp    $0x10,%r14d
  jne    L293
  add    $0x1,%r15
  add    $0x1,%rbp
  cmp    $0x32,%r15
  jne    L331
  mov    %r12,%rcx
  mov    $0x5,%edx
  mov    $0x1,%esi
  xor    %ebp,%ebp
  lea    D460(%rip),%rdi
  call   <fwrite@plt>
  mov    $0xa0,%edx
  xor    %esi,%esi
  mov    %r13,%rdi
  call   <memset@plt>
  cs nopw 0x0(%rax,%rax,1)
L13:
  pxor   %xmm1,%xmm1
  cvtsi2sd %ebp,%xmm1
  movapd %xmm1,%xmm0
  subsd  D428(%rip),%xmm0
  movsd  %xmm1,0x8(%rsp)
  mulsd  D124(%rip),%xmm0
  mulsd  D292(%rip),%xmm0
  call   <sinc@plt>
  movsd  0x8(%rsp),%xmm1
  divsd  D297(%rip),%xmm1
  cvttsd2si %xmm1,%edi
  movsd  %xmm0,(%rsp)
  call   <hamming@plt>
  mulsd  (%rsp),%xmm0
  divsd  D163(%rip),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,0x0(%r13,%rbp,4)
  add    $0x1,%rbp
  cmp    $0x19,%rbp
  jne    L13
  lea    0x20(%r13),%rdx
  xor    %ecx,%ecx
  nopl   0x0(%rax,%rax,1)
L403:
  movss  -0x20(%rdx),%xmm0
  lea    -0x1c(%rdx),%rax
  nopl   0x0(%rax)
L320:
  addss  (%rax),%xmm0
  add    $0x4,%rax
  movss  %xmm0,-0x20(%rdx)
  cmp    %rdx,%rax
  jne    L320
  add    $0x1,%ecx
  lea    0x4(%rax),%rdx
  cmp    $0x19,%ecx
  jne    L403
  mov    %r12,%rcx
  mov    $0x2e,%edx
  mov    $0x1,%esi
  xor    %ebp,%ebp
  lea    D120(%rip),%rdi
  mov    $0x20,%r15d
  call   <fwrite@plt>
L292:
  cmp    $0x6,%ebp
  setle  (%rsp)
  xor    %r14d,%r14d
  nopl   0x0(%rax)
L393:
  mov    %rbp,%rax
  pxor   %xmm0,%xmm0
  mov    $0x1,%edx
L287:
  movss  0x0(%r13,%rax,4),%xmm1
  test   %edx,%r14d
  je     L358
  addss  %xmm1,%xmm0
L133:
  add    $0x8,%rax
  add    %edx,%edx
  cmp    %r15,%rax
  jne    L287
  mulss  D12(%rip),%xmm0
  xor    %eax,%eax
  mov    %rbx,%rsi
  mov    %r12,%rdi
  addss  D333(%rip),%xmm0
  cvttss2si %xmm0,%edx
  call   <fprintf@plt>
  cmp    $0xe,%r14d
  jle    L215
  cmpb   $0x0,(%rsp)
  jne    L215
L85:
  add    $0x1,%r14d
  cmp    $0x10,%r14d
  jne    L393
  add    $0x1,%r15
  add    $0x1,%rbp
  cmp    $0x28,%r15
  jne    L292
  mov    %r12,%rcx
  mov    $0x5,%edx
  mov    $0x1,%esi
  xor    %ebp,%ebp
  lea    D460(%rip),%rdi
  call   <fwrite@plt>
  mov    $0xa0,%edx
  xor    %esi,%esi
  mov    %r13,%rdi
  call   <memset@plt>
  xchg   %ax,%ax
L284:
  pxor   %xmm1,%xmm1
  cvtsi2sd %ebp,%xmm1
  movapd %xmm1,%xmm0
  subsd  D354(%rip),%xmm0
  movsd  %xmm1,0x8(%rsp)
  divsd  D370(%rip),%xmm0
  mulsd  D292(%rip),%xmm0
  call   <sinc@plt>
  movsd  0x8(%rsp),%xmm1
  divsd  D380(%rip),%xmm1
  cvttsd2si %xmm1,%edi
  movsd  %xmm0,(%rsp)
  call   <hamming@plt>
  mulsd  (%rsp),%xmm0
  divsd  D413(%rip),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,0x28(%r13,%rbp,4)
  add    $0x1,%rbp
  cmp    $0x1f,%rbp
  jne    L284
  lea    0x24(%r13),%rdx
  xor    %ecx,%ecx
  nopl   0x0(%rax,%rax,1)
L120:
  movss  -0x24(%rdx),%xmm0
  lea    -0x24(%rdx),%rax
  nopl   0x0(%rax)
L328:
  addss  0x4(%rax),%xmm0
  add    $0x4,%rax
  movss  %xmm0,-0x24(%rdx)
  cmp    %rdx,%rax
  jne    L328
  add    $0x1,%ecx
  lea    0x4(%rax),%rdx
  cmp    $0x1f,%ecx
  jne    L120
  mov    %r12,%rcx
  mov    $0x2f,%edx
  mov    $0x1,%esi
  xor    %ebp,%ebp
  lea    D274(%rip),%rdi
  call   <fwrite@plt>
  nopw   0x0(%rax,%rax,1)
L4:
  cmp    $0x8,%ebp
  setle  (%rsp)
  xor    %r14d,%r14d
  nopw   0x0(%rax,%rax,1)
L201:
  mov    %rbp,%rax
  pxor   %xmm0,%xmm0
  mov    $0x1,%edx
L266:
  movss  0x0(%r13,%rax,4),%xmm1
  test   %edx,%r14d
  je     L402
  addss  %xmm1,%xmm0
L376:
  add    $0xa,%rax
  add    %edx,%edx
  cmp    %rax,%r15
  jne    L266
  mulss  D12(%rip),%xmm0
  xor    %eax,%eax
  mov    %rbx,%rsi
  mov    %r12,%rdi
  addss  D333(%rip),%xmm0
  cvttss2si %xmm0,%edx
  call   <fprintf@plt>
  cmp    $0xe,%r14d
  jle    L93
  cmpb   $0x0,(%rsp)
  jne    L93
L312:
  add    $0x1,%r14d
  cmp    $0x10,%r14d
  jne    L201
  add    $0x1,%r15
  add    $0x1,%rbp
  cmp    $0x32,%r15
  jne    L4
  mov    %r12,%rcx
  mov    $0x5,%edx
  mov    $0x1,%esi
  lea    D460(%rip),%rdi
  call   <fwrite@plt>
  mov    0xb8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L66
  add    $0xc8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L402:
  subss  %xmm1,%xmm0
  jmp    L376
  nopl   0x0(%rax)
L167:
  subss  %xmm1,%xmm0
  jmp    L203
  nopl   0x0(%rax)
L358:
  subss  %xmm1,%xmm0
  jmp    L133
  nopl   0x0(%rax)
L114:
  subss  %xmm1,%xmm0
  jmp    L299
  nopl   0x0(%rax)
L93:
  mov    %r14d,%eax
  lea    D447(%rip),%rdx
  lea    D87(%rip),%rsi
  mov    %r12,%rdi
  and    $0x7,%eax
  cmp    $0x7,%eax
  lea    D256(%rip),%rax
  cmove  %rax,%rdx
  xor    %eax,%eax
  call   <fprintf@plt>
  jmp    L312
  nopl   0x0(%rax)
L32:
  mov    %r14d,%eax
  lea    D447(%rip),%rdx
  lea    D87(%rip),%rsi
  mov    %r12,%rdi
  and    $0x7,%eax
  cmp    $0x7,%eax
  lea    D256(%rip),%rax
  cmove  %rax,%rdx
  xor    %eax,%eax
  call   <fprintf@plt>
  jmp    L360
  nopl   0x0(%rax)
L215:
  mov    %r14d,%eax
  lea    D447(%rip),%rdx
  lea    D87(%rip),%rsi
  mov    %r12,%rdi
  and    $0x7,%eax
  cmp    $0x7,%eax
  lea    D256(%rip),%rax
  cmove  %rax,%rdx
  xor    %eax,%eax
  call   <fprintf@plt>
  jmp    L85
  nopl   0x0(%rax)
L395:
  mov    %r14d,%eax
  lea    D447(%rip),%rdx
  lea    D87(%rip),%rsi
  mov    %r12,%rdi
  and    $0x7,%eax
  cmp    $0x7,%eax
  lea    D256(%rip),%rax
  cmove  %rax,%rdx
  xor    %eax,%eax
  call   <fprintf@plt>
  jmp    L326
L66:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D403
datatype: string
name: retrieve_data
arguments: label: D221
datatype: f64
name: retrieve_data
arguments: label: D124
datatype: byte[8]
name: retrieve_data
arguments: label: D253
datatype: f64
name: retrieve_data
arguments: label: D114
datatype: f64
name: retrieve_data
arguments: label: D86
datatype: f64
name: retrieve_data
arguments: label: D437
datatype: string
name: retrieve_data
arguments: label: D146
datatype: string
name: retrieve_data
arguments: label: D12
datatype: byte[4]
name: retrieve_data
arguments: label: D333
datatype: byte[4]
name: retrieve_data
arguments: label: D460
datatype: string
name: retrieve_data
arguments: label: D479
datatype: f64
name: retrieve_data
arguments: label: D370
datatype: f64
name: retrieve_data
arguments: label: D147
datatype: f64
name: retrieve_data
arguments: label: D187
datatype: string
name: retrieve_data
arguments: label: D428
datatype: f64
name: retrieve_data
arguments: label: D292
datatype: f64
name: retrieve_data
arguments: label: D297
datatype: f64
name: retrieve_data
arguments: label: D163
datatype: f64
name: retrieve_data
arguments: label: D120
datatype: string
name: retrieve_data
arguments: label: D354
datatype: f64
name: retrieve_data
arguments: label: D380
datatype: f64
name: retrieve_data
arguments: label: D413
datatype: f64
name: retrieve_data
arguments: label: D274
datatype: string
name: retrieve_data
arguments: label: D447
datatype: string
name: retrieve_data
arguments: label: D87
datatype: string
name: retrieve_data
arguments: label: D256
datatype: string

tool: D403: 
/*
 * hapn4800 specific tables
 */



tool: D221: 11.5

tool: {"D124": [0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x3f]}

tool: D253: 1.5

tool: D114: 23

tool: D86: 2.4

tool: D437: static unsigned char hapn48_txfilt_8[] = {
	

tool: D146: %4d

tool: {"D12": [0x00,0x00,0xfe,0x42]}

tool: {"D333": [0x00,0x00,0x00,0x43]}

tool: D460: 
};



tool: D479: 14.5

tool: D370: 10

tool: D147: 29

tool: D187: static unsigned char hapn48_txfilt_10[] = {
	

tool: D428: 12

tool: D292: 1.4

tool: D297: 24

tool: D163: 6.3

tool: D120: static unsigned char hapn48_txfilt_pm8[] = {
	

tool: D354: 15

tool: D380: 30

tool: D413: 7.9

tool: D274: static unsigned char hapn48_txfilt_pm10[] = {
	

tool: 

tool: D87: ,%s

tool: D256: 
	

assistant: ```c
void gentbl_hapn4800(FILE *f) {
  int i, j, k, l;
  float s;
  float c[40];
  float min, max;
  fprintf(f, "\n/*\n * hapn4800 specific tables\n */\n\n");
  min = max = 0;
  memset(c, 0, sizeof(c));
  for (i = 0; i < 24; i++)
    c[8 + i] = sinc(1.5 * ((i - 11.5) / 8.0)) * hamming(i / 23.0) / 2.4;
  for (i = 0; i < 24; i++)
    c[i] -= c[i + 8];
  fprintf(f, "static unsigned char hapn48_txfilt_8[] = {\n\t");
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 16; j++) {
      for (k = 1, s = 0, l = i; k < 16; k <<= 1, l += 8) {
        if (j & k)
          s += c[l];
        else
          s -= c[l];
      }
      if (s > max)
        max = s;
      if (s < min)
        min = s;
      fprintf(f, "%4d", (int)(128 + 127 * s));
      if (i < 7 || j < 15)
        fprintf(f, ",%s", (j & 7) == 7 ? "\n\t" : "");
    }
  }
  fprintf(f, "\n};\n\n");
  min = max = 0;
  memset(c, 0, sizeof(c));
  for (i = 0; i < 30; i++)
    c[10 + i] = sinc(1.5 * ((i - 14.5) / 10.0)) * hamming(i / 29.0) / 2.4;
  for (i = 0; i < 30; i++)
    c[i] -= c[i + 10];
  fprintf(f, "static unsigned char hapn48_txfilt_10[] = {\n\t");
  for (i = 0; i < 10; i++) {
    for (j = 0; j < 16; j++) {
      for (k = 1, s = 0, l = i; k < 16; k <<= 1, l += 10) {
        if (j & k)
          s += c[l];
        else
          s -= c[l];
      }
      if (s > max)
        max = s;
      if (s < min)
        min = s;
      fprintf(f, "%4d", (int)(128 + 127 * s));
      if (i < 9 || j < 15)
        fprintf(f, ",%s", (j & 7) == 7 ? "\n\t" : "");
    }
  }
  fprintf(f, "\n};\n\n");
  min = max = 0;
  memset(c, 0, sizeof(c));
  for (i = 0; i < 25; i++)
    c[i] = sinc(1.4 * ((i - 12.0) / 8.0)) * hamming(i / 24.0) / 6.3;
  for (i = 0; i < 25; i++)
    for (j = 1; j < 8; j++)
      c[i] += c[i + j];
  fprintf(f, "static unsigned char hapn48_txfilt_pm8[] = {\n\t");
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 16; j++) {
      for (k = 1, s = 0, l = i; k < 16; k <<= 1, l += 8) {
        if (j & k)
          s += c[l];
        else
          s -= c[l];
      }
      if (s > max)
        max = s;
      if (s < min)
        min = s;
      fprintf(f, "%4d", (int)(128 + 127 * s));
      if (i < 7 || j < 15)
        fprintf(f, ",%s", (j & 7) == 7 ? "\n\t" : "");
    }
  }
  fprintf(f, "\n};\n\n");
  min = max = 0;
  memset(c, 0, sizeof(c));
  for (i = 0; i < 31; i++)
    c[10 + i] = sinc(1.4 * ((i - 15.0) / 10.0)) * hamming(i / 30.0) / 7.9;
  for (i = 0; i < 31; i++)
    for (j = 1; j < 10; j++)
      c[i] += c[i + j];
  fprintf(f, "static unsigned char hapn48_txfilt_pm10[] = {\n\t");
  for (i = 0; i < 10; i++) {
    for (j = 0; j < 16; j++) {
      for (k = 1, s = 0, l = i; k < 16; k <<= 1, l += 10) {
        if (j & k)
          s += c[l];
        else
          s -= c[l];
      }
      if (s > max)
        max = s;
      if (s < min)
        min = s;
      fprintf(f, "%4d", (int)(128 + 127 * s));
      if (i < 9 || j < 15)
        fprintf(f, ",%s", (j & 7) == 7 ? "\n\t" : "");
    }
  }
  fprintf(f, "\n};\n\n");
}
```