user: Converte this assembly snippet into its equivalent C code:

```asm
<lsf2a>:
  endbr64
  push   %r15
  mov    %rdi,%r8
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x138,%rsp
  movss  D5(%rip),%xmm1
  mov    %rsi,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x128(%rsp)
  mov    %rsi,%rax
  lea    0x28(%rax),%rdx
  nopl   (%rax)
L100:
  movss  (%rax),%xmm0
  add    $0x4,%rax
  mulss  %xmm1,%xmm0
  movss  %xmm0,-0x4(%rax)
  cmp    %rax,%rdx
  jne    L100
  mov    0x8(%rsp),%rax
  pxor   %xmm5,%xmm5
  movss  (%rax),%xmm0
  movss  0x24(%rax),%xmm1
  comiss %xmm0,%xmm5
  jae    L136
  comiss D18(%rip),%xmm1
  jb     L134
  movss  D19(%rip),%xmm2
  movaps %xmm2,%xmm1
  subss  %xmm0,%xmm1
  divss  D31(%rip),%xmm1
L13:
  mov    0x8(%rsp),%rax
  movss  %xmm2,0x24(%rax)
L143:
  mov    0x8(%rsp),%rdx
  lea    0x4(%rdx),%rax
  add    $0x24,%rdx
  jmp    L11
  nopw   0x0(%rax,%rax,1)
L36:
  add    $0x4,%rax
L11:
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  cmp    %rax,%rdx
  jne    L36
L134:
  lea    0x70(%rsp),%r13
  mov    $0x14,%edx
  xor    %esi,%esi
  mov    %r8,0x10(%rsp)
  lea    0x90(%rsp),%rbp
  mov    %r13,%rdi
  lea    0xb0(%rsp),%r12
  call   <memset@plt>
  mov    %rbp,%rdi
  mov    $0x14,%edx
  xor    %esi,%esi
  call   <memset@plt>
  mov    $0x14,%edx
  xor    %esi,%esi
  mov    %r12,%rdi
  call   <memset@plt>
  lea    0xd0(%rsp),%rbx
  mov    $0x14,%edx
  xor    %esi,%esi
  mov    %rbx,%rdi
  lea    0x30(%rsp),%r15
  lea    0x50(%rsp),%r14
  call   <memset@plt>
  lea    0xf0(%rsp),%rcx
  mov    $0x18,%edx
  xor    %esi,%esi
  mov    %rcx,%rdi
  mov    %rcx,0x20(%rsp)
  call   <memset@plt>
  lea    0x110(%rsp),%rdi
  xor    %esi,%esi
  mov    $0x18,%edx
  mov    %rdi,0x28(%rsp)
  call   <memset@plt>
  xor    %esi,%esi
  mov    %rbx,0x18(%rsp)
  mov    0x8(%rsp),%rbx
  mov    %rbp,0x8(%rsp)
  mov    %rsi,%rbp
L9:
  movss  D26(%rip),%xmm0
  mulss  (%rbx,%rbp,2),%xmm0
  call   <cos@plt>
  pxor   %xmm0,%xmm0
  cvtsi2ss %rax,%xmm0
  movss  %xmm0,(%r15,%rbp,1)
  movss  D26(%rip),%xmm0
  mulss  0x4(%rbx,%rbp,2),%xmm0
  call   <cos@plt>
  pxor   %xmm0,%xmm0
  pxor   %xmm5,%xmm5
  cvtsi2ss %rax,%xmm0
  movss  %xmm0,(%r14,%rbp,1)
  add    $0x4,%rbp
  cmp    $0x14,%rbp
  jne    L9
  movss  D60(%rip),%xmm6
  mov    0x10(%rsp),%r8
  xor    %eax,%eax
  lea    0xf4(%rsp),%r9
  mov    0x18(%rsp),%rbx
  mov    0x8(%rsp),%rbp
  lea    0x114(%rsp),%rsi
  mov    0x20(%rsp),%rcx
  mov    0x28(%rsp),%rdi
  movaps %xmm6,%xmm2
  movaps %xmm6,%xmm1
  movss  %xmm6,0xf0(%rsp)
  movss  %xmm6,0x110(%rsp)
L133:
  movss  (%r15,%rax,1),%xmm0
  movss  0x0(%r13,%rax,1),%xmm4
  movss  (%r12,%rax,1),%xmm3
  addss  %xmm0,%xmm0
  mulss  %xmm4,%xmm0
  subss  %xmm0,%xmm1
  movss  (%r14,%rax,1),%xmm0
  addss  0x0(%rbp,%rax,1),%xmm1
  movss  %xmm4,0x0(%rbp,%rax,1)
  addss  %xmm0,%xmm0
  movss  %xmm1,(%r9,%rax,1)
  mulss  %xmm3,%xmm0
  subss  %xmm0,%xmm2
  addss  (%rbx,%rax,1),%xmm2
  movss  (%rcx,%rax,1),%xmm0
  movss  %xmm3,(%rbx,%rax,1)
  movss  %xmm0,0x0(%r13,%rax,1)
  movss  %xmm2,(%rsi,%rax,1)
  movss  (%rdi,%rax,1),%xmm0
  movss  %xmm0,(%r12,%rax,1)
  add    $0x4,%rax
  cmp    $0x14,%rax
  jne    L133
  movss  D64(%rip),%xmm7
  xor    %r10d,%r10d
  nopl   0x0(%rax)
L23:
  test   %r10,%r10
  je     L117
  movl   $0x0,0x110(%rsp)
  movaps %xmm5,%xmm2
  movaps %xmm5,%xmm1
  movl   $0x0,0xf0(%rsp)
L141:
  xor    %eax,%eax
L118:
  movss  (%r15,%rax,1),%xmm0
  movss  0x0(%r13,%rax,1),%xmm4
  movss  (%r12,%rax,1),%xmm3
  addss  %xmm0,%xmm0
  mulss  %xmm4,%xmm0
  subss  %xmm0,%xmm1
  movss  (%r14,%rax,1),%xmm0
  addss  0x0(%rbp,%rax,1),%xmm1
  movss  %xmm4,0x0(%rbp,%rax,1)
  addss  %xmm0,%xmm0
  movss  %xmm1,(%r9,%rax,1)
  mulss  %xmm3,%xmm0
  subss  %xmm0,%xmm2
  addss  (%rbx,%rax,1),%xmm2
  movss  (%rcx,%rax,1),%xmm0
  movss  %xmm3,(%rbx,%rax,1)
  movss  %xmm0,0x0(%r13,%rax,1)
  movss  %xmm2,(%rsi,%rax,1)
  movss  (%rdi,%rax,1),%xmm0
  movss  %xmm0,(%r12,%rax,1)
  add    $0x4,%rax
  cmp    $0x14,%rax
  jne    L118
  movss  0x104(%rsp),%xmm0
  addss  0x124(%rsp),%xmm0
  addss  %xmm0,%xmm0
  movss  %xmm0,0x4(%r8,%r10,4)
  add    $0x1,%r10
  cmp    $0xa,%r10
  jne    L23
  movl   $0x3f800000,(%r8)
  mov    0x128(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L65
  add    $0x138,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L117:
  movss  %xmm6,0xf0(%rsp)
  movaps %xmm7,%xmm2
  movaps %xmm6,%xmm1
  movss  %xmm7,0x110(%rsp)
  jmp    L141
L136:
  comiss D18(%rip),%xmm1
  movss  D91(%rip),%xmm0
  mov    0x8(%rsp),%rax
  movss  %xmm0,(%rax)
  jae    L68
  subss  %xmm0,%xmm1
  divss  D31(%rip),%xmm1
  jmp    L143
L68:
  movss  D32(%rip),%xmm1
  movss  D19(%rip),%xmm2
  jmp    L13
L65:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D5
type_guessed: f32
name: read_data
arguments: label: D18
type_guessed: f32
name: read_data
arguments: label: D19
type_guessed: f32
name: read_data
arguments: label: D31
type_guessed: byte[4]
name: read_data
arguments: label: D26
type_guessed: f32
name: read_data
arguments: label: D60
type_guessed: f32
name: read_data
arguments: label: D64
type_guessed: byte[4]
name: read_data
arguments: label: D91
type_guessed: f32
name: read_data
arguments: label: D32
type_guessed: byte[4]

tool: D5: 0.159154943

tool: D18: 0.5

tool: D19: 0.499

tool: {"D31": [0x00,0x00,0x10,0x41]}

tool: D26: 6.283185307

tool: D60: 0.25

tool: {"D64": [0x00,0x00,0x80,0xbe]}

tool: D91: 0.022

tool: {"D32": [0x87,0x16,0x59,0x3d]}

assistant: ```c
void lsf2a(float *a_coef, float *freq) {
  int i, j;
  float hlp;
  float p[10 / 2], q[10 / 2];
  float a[10 / 2 + 1], a1[10 / 2], a2[10 / 2];
  float b[10 / 2 + 1], b1[10 / 2], b2[10 / 2];
  for (i = 0; i < 10; i++) {
    freq[i] = freq[i] * (float)0.159154943;
  }
  if ((freq[0] <= 0.0) || (freq[10 - 1] >= 0.5)) {
    if (freq[0] <= 0.0) {
      freq[0] = (float)0.022;
    }
    if (freq[10 - 1] >= 0.5) {
      freq[10 - 1] = (float)0.499;
    }
    hlp = (freq[10 - 1] - freq[0]) / (float)(10 - 1);
    for (i = 1; i < 10; i++) {
      freq[i] = freq[i - 1] + hlp;
    }
  }
  memset(a1, 0, 10 / 2 * sizeof(float));
  memset(a2, 0, 10 / 2 * sizeof(float));
  memset(b1, 0, 10 / 2 * sizeof(float));
  memset(b2, 0, 10 / 2 * sizeof(float));
  memset(a, 0, (10 / 2 + 1) * sizeof(float));
  memset(b, 0, (10 / 2 + 1) * sizeof(float));
  for (i = 0; i < 10 / 2; i++) {
    p[i] = (float)cos((float)6.283185307 * freq[2 * i]);
    q[i] = (float)cos((float)6.283185307 * freq[2 * i + 1]);
  }
  a[0] = 0.25;
  b[0] = 0.25;
  for (i = 0; i < 10 / 2; i++) {
    a[i + 1] = a[i] - 2 * p[i] * a1[i] + a2[i];
    b[i + 1] = b[i] - 2 * q[i] * b1[i] + b2[i];
    a2[i] = a1[i];
    a1[i] = a[i];
    b2[i] = b1[i];
    b1[i] = b[i];
  }
  for (j = 0; j < 10; j++) {
    if (j == 0) {
      a[0] = 0.25;
      b[0] = -0.25;
    } else {
      a[0] = b[0] = 0.0;
    }
    for (i = 0; i < 10 / 2; i++) {
      a[i + 1] = a[i] - 2 * p[i] * a1[i] + a2[i];
      b[i + 1] = b[i] - 2 * q[i] * b1[i] + b2[i];
      a2[i] = a1[i];
      a1[i] = a[i];
      b2[i] = b1[i];
      b1[i] = b[i];
    }
    a_coef[j + 1] = 2 * (a[10 / 2] + b[10 / 2]);
  }
  a_coef[0] = 1.0;
}
```