user: What is the c source code of the assembly code below?

```asm
<enc>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x4a8,%rsp
  mov    0x10(%rsi),%rdi
  lea    D37(%rip),%rsi
  mov    %fs:0x28,%rax
  mov    %rax,0x498(%rsp)
  xor    %eax,%eax
  call   <fopen@plt>
  mov    0x18(%rbx),%rdi
  lea    D33(%rip),%rsi
  mov    %rax,%r12
  call   <fopen@plt>
  test   %r12,%r12
  je     L115
  mov    %rax,%r14
  test   %rax,%rax
  je     L69
  mov    %r12,%rdi
  lea    0x490(%rsp),%rbp
  lea    0x110(%rsp),%r13
  call   <feof@plt>
  mov    %eax,0xc(%rsp)
  test   %eax,%eax
  jne    L20
L67:
  lea    0x410(%rsp),%r15
  mov    %r15,%rbx
  nopw   0x0(%rax,%rax,1)
L153:
  mov    %r12,%rdi
  add    $0x1,%rbx
  call   <fgetc@plt>
  mov    %al,-0x1(%rbx)
  cmp    %rbx,%rbp
  jne    L153
  mov    %r13,%rcx
  nop
L21:
  movzbl 0x1(%r15),%esi
  movzbl (%r15),%edi
  mov    %esi,%eax
  and    $0x7f,%eax
  shl    $0x8,%eax
  add    %edi,%eax
  test   %sil,%sil
  movzbl 0x3(%r15),%esi
  lea    -0x8000(%rax),%edi
  cmovs  %edi,%eax
  movzbl 0x2(%r15),%edi
  mov    %eax,(%rcx)
  mov    %esi,%eax
  and    $0x7f,%eax
  shl    $0x8,%eax
  or     %edi,%eax
  test   %sil,%sil
  lea    -0x8000(%rax),%edi
  cmovs  %edi,%eax
  add    $0x4,%r15
  add    $0x4,%rcx
  mov    %eax,0x7c(%rcx)
  cmp    %r15,%rbp
  jne    L21
  xor    %eax,%eax
  lea    0x210(%rsp),%rdi
  nopl   0x0(%rax,%rax,1)
L33:
  pxor   %xmm0,%xmm0
  cvtsi2ssl 0x0(%r13,%rax,1),%xmm0
  mulss  D15(%rip),%xmm0
  movss  %xmm0,(%rdi,%rax,1)
  add    $0x4,%rax
  cmp    $0x100,%rax
  jne    L33
  lea    0x10(%rsp),%rbx
  lea    0x90(%rsp),%r15
  mov    %rbx,%rsi
  call   <edct@plt>
  lea    0x290(%rsp),%rdi
  mov    %r15,%rsi
  call   <edct@plt>
  xor    %eax,%eax
  lea    0x310(%rsp),%rdx
  nopl   0x0(%rax,%rax,1)
L89:
  movss  D21(%rip),%xmm0
  mulss  (%rbx,%rax,1),%xmm0
  cvttss2si %xmm0,%ecx
  movss  D21(%rip),%xmm0
  mulss  (%r15,%rax,1),%xmm0
  mov    %ecx,(%rdx,%rax,2)
  cvttss2si %xmm0,%ecx
  mov    %ecx,0x4(%rdx,%rax,2)
  add    $0x4,%rax
  cmp    $0x80,%rax
  jne    L89
  lea    0x330(%rsp),%r15
  cs nopw 0x0(%rax,%rax,1)
L81:
  movzbl -0x20(%r15),%ebx
  mov    %r14,%rsi
  test   %ebx,%ebx
  setne  %dil
  shl    $0x7,%edi
  mov    %edi,%eax
  or     $0x40,%eax
  cmpb   $0x0,-0x1c(%r15)
  cmovne %eax,%edi
  mov    %edi,%eax
  or     $0x20,%eax
  cmpb   $0x0,-0x18(%r15)
  cmovne %eax,%edi
  mov    %edi,%eax
  or     $0x10,%eax
  cmpb   $0x0,-0x14(%r15)
  cmovne %eax,%edi
  mov    %edi,%eax
  or     $0x8,%eax
  cmpb   $0x0,-0x10(%r15)
  cmovne %eax,%edi
  mov    %edi,%eax
  or     $0x4,%eax
  cmpb   $0x0,-0xc(%r15)
  cmovne %eax,%edi
  mov    %edi,%eax
  or     $0x2,%eax
  cmpb   $0x0,-0x8(%r15)
  cmovne %eax,%edi
  mov    %edi,%eax
  or     $0x1,%eax
  cmpb   $0x0,-0x4(%r15)
  cmovne %eax,%edi
  movsbl %dil,%edi
  call   <fputc@plt>
  lea    -0x1c(%r15),%rdx
  jmp    L113
  nopl   0x0(%rax,%rax,1)
L96:
  cmp    %rdx,%r15
  je     L84
L53:
  mov    (%rdx),%ebx
  add    $0x4,%rdx
  movzbl %bl,%ebx
L113:
  test   %ebx,%ebx
  je     L96
  mov    %r14,%rsi
  mov    %ebx,%edi
  mov    %rdx,(%rsp)
  call   <fputc@plt>
  mov    (%rsp),%rdx
  cmp    %rdx,%r15
  jne    L53
L84:
  addl   $0x8,0xc(%rsp)
  mov    0xc(%rsp),%eax
  add    $0x20,%r15
  cmp    $0x40,%eax
  jne    L81
  mov    %r12,%rdi
  call   <feof@plt>
  mov    %eax,0xc(%rsp)
  test   %eax,%eax
  je     L67
L20:
  mov    %r12,%rdi
  call   <fclose@plt>
  mov    %r14,%rdi
  call   <fclose@plt>
  mov    0x498(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L28
  add    $0x4a8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L115:
  mov    0x498(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L28
  lea    D18(%rip),%rdi
L104:
  add    $0x4a8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1120 <error@plt>
L69:
  mov    0x498(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L28
  lea    D31(%rip),%rdi
  jmp    L104
L28:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D37
type_guessed: string
name: read_data
arguments: data_tag: D33
type_guessed: string
name: read_data
arguments: data_tag: D15
type_guessed: byte[4]
name: read_data
arguments: data_tag: D21
type_guessed: byte[4]
name: read_data
arguments: data_tag: D18
type_guessed: string
name: read_data
arguments: data_tag: D31
type_guessed: string

tool: D37: r

tool: D33: w

tool: {"D15": [0x00,0x00,0x00,0x38]}

tool: {"D21": [0x00,0x00,0x80,0x41]}

tool: D18: Could not open input file

tool: D31: Could not open output file

assistant: ```c
int enc(int argc, char *argv[]) {
  FILE *in;
  FILE *out;
  in = fopen(argv[2], "r");
  out = fopen(argv[3], "w");
  if (in == NULL)
    return error("Could not open input file");
  if (out == NULL)
    return error("Could not open output file");
  unsigned char buf[32 * 4];
  int iarr[32 * 2];
  float darr[32 * 2];
  float doutl[32];
  float doutr[32];
  int iout[32 * 2];
  while (!feof(in)) {
    for (int i = 0; i < 32 * 4; ++i) {
      buf[i] = fgetc(in);
    }
    for (int i = 0; i < 32; ++i) {
      int l = buf[i * 4];
      l += (buf[i * 4 + 1] & 0x7F) * 256;
      if (buf[i * 4 + 1] & 0x80)
        l = (0x8000 - l) * -1;
      iarr[i] = l;
      int r;
      r = 0;
      r |= buf[i * 4 + 2];
      r |= (buf[i * 4 + 3] & 0x7F) * 256;
      if (buf[i * 4 + 3] & 0x80) {
        r = (0x8000 - r) * -1;
      }
      iarr[i + 32] = r;
    }
    for (int i = 0; i < 32 * 2; ++i) {
      darr[i] = ((float)iarr[i]) / 32768.;
    }
    edct(darr, doutl);
    float *darrr = darr + 32;
    edct(darrr, doutr);
    for (int i = 0; i < 32; ++i) {
      iout[i * 2] = doutl[i] * 16;
      iout[i * 2 + 1] = doutr[i] * 16;
    }
    for (int i = 0; i < 32 * 2; i += 8) {
      char control = 0;
      if (iout[i] & 0xFF)
        control |= 128;
      if (iout[i + 1] & 0xFF)
        control |= 64;
      if (iout[i + 2] & 0xFF)
        control |= 32;
      if (iout[i + 3] & 0xFF)
        control |= 16;
      if (iout[i + 4] & 0xFF)
        control |= 8;
      if (iout[i + 5] & 0xFF)
        control |= 4;
      if (iout[i + 6] & 0xFF)
        control |= 2;
      if (iout[i + 7] & 0xFF)
        control |= 1;
      fputc(control, out);
      for (int j = 0; j < 8; ++j) {
        if (iout[i + j] & 0xFF)
          fputc(iout[i + j] & 0xFF, out);
      }
    }
  }
  fclose(in);
  fclose(out);
}
```