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

```asm
<llr_approx>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    0x30(%rsp),%r13
  test   %edx,%edx
  jle    L27
  mov    %edx,%eax
  mov    %ecx,%r10d
  shr    $0x1f,%ecx
  mov    %r8d,%ebp
  sub    $0x1,%eax
  add    %r10d,%ecx
  movaps %xmm0,%xmm7
  mov    %rsi,%rbx
  movss  D1(%rip),%xmm8
  lea    0x8(%rdi,%rax,8),%r12
  sar    %ecx
  lea    -0x1(%r8),%eax
  shl    $0x7,%rax
  xor    %r8d,%r8d
  lea    0x80(%r13,%rax,1),%r11
  nopl   0x0(%rax,%rax,1)
L35:
  test   %ebp,%ebp
  jle    L0
  movslq %r8d,%rax
  mov    %r13,%rdx
  lea    (%rbx,%rax,4),%rsi
  nopw   0x0(%rax,%rax,1)
L15:
  movslq (%rdx),%rax
  movss  (%rdi),%xmm5
  movss  0x4(%rdi),%xmm6
  lea    (%r9,%rax,8),%rax
  movaps %xmm5,%xmm4
  movaps %xmm5,%xmm3
  subss  (%rax),%xmm4
  movaps %xmm6,%xmm0
  subss  0x4(%rax),%xmm0
  movslq 0x300(%rdx),%rax
  mulss  %xmm0,%xmm0
  lea    (%r9,%rax,8),%rax
  mulss  %xmm4,%xmm4
  subss  (%rax),%xmm3
  mulss  %xmm3,%xmm3
  addss  %xmm0,%xmm4
  movaps %xmm6,%xmm0
  subss  0x4(%rax),%xmm0
  mulss  %xmm0,%xmm0
  addss  %xmm0,%xmm3
  cmp    $0x3,%r10d
  jle    L47
  mov    $0x1,%eax
  nopl   0x0(%rax)
L43:
  movslq (%rdx,%rax,4),%r14
  movaps %xmm5,%xmm0
  movaps %xmm6,%xmm1
  movaps %xmm6,%xmm2
  lea    (%r9,%r14,8),%r14
  subss  (%r14),%xmm0
  subss  0x4(%r14),%xmm1
  movslq 0x300(%rdx,%rax,4),%r14
  add    $0x1,%rax
  mulss  %xmm0,%xmm0
  lea    (%r9,%r14,8),%r14
  mulss  %xmm1,%xmm1
  subss  0x4(%r14),%xmm2
  mulss  %xmm2,%xmm2
  addss  %xmm0,%xmm1
  movaps %xmm5,%xmm0
  subss  (%r14),%xmm0
  mulss  %xmm0,%xmm0
  minss  %xmm4,%xmm1
  movaps %xmm1,%xmm4
  addss  %xmm2,%xmm0
  minss  %xmm3,%xmm0
  movaps %xmm0,%xmm3
  cmp    %eax,%ecx
  jg     L43
L47:
  subss  %xmm4,%xmm3
  sub    $0xffffffffffffff80,%rdx
  add    $0x4,%rsi
  xorps  %xmm8,%xmm3
  divss  %xmm7,%xmm3
  movss  %xmm3,-0x4(%rsi)
  cmp    %rdx,%r11
  jne    L15
L0:
  add    $0x8,%rdi
  add    %ebp,%r8d
  cmp    %rdi,%r12
  jne    L35
L27:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

tool_calls: name: read_data
arguments: label: D1
type: byte[4]

tool: {"D1": [0x00,0x00,0x00,0x80]}

assistant: ```c
void llr_approx(const _Complex float *in, float *out, int N, int M, int B, _Complex float *symbols, int (*S)[6][32], float sigma2) {
  int i, s, b;
  float num, den;
  float new_num, new_den;
  float idiff0, qdiff0, idiff1, qdiff1;
  int change_sign = -1;
  for (s = 0; s < N; s++) {
    for (b = 0; b < B; b++) {
      idiff0 = __real__ in[s] - __real__ symbols[S[0][b][0]];
      qdiff0 = __imag__ in[s] - __imag__ symbols[S[0][b][0]];
      num = idiff0 * idiff0 + qdiff0 * qdiff0;
      idiff1 = __real__ in[s] - __real__ symbols[S[1][b][0]];
      qdiff1 = __imag__ in[s] - __imag__ symbols[S[1][b][0]];
      den = idiff1 * idiff1 + qdiff1 * qdiff1;
      for (i = 1; i < M / 2; i++) {
        idiff0 = __real__ in[s] - __real__ symbols[S[0][b][i]];
        qdiff0 = __imag__ in[s] - __imag__ symbols[S[0][b][i]];
        new_num = idiff0 * idiff0 + qdiff0 * qdiff0;
        idiff1 = __real__ in[s] - __real__ symbols[S[1][b][i]];
        qdiff1 = __imag__ in[s] - __imag__ symbols[S[1][b][i]];
        new_den = idiff1 * idiff1 + qdiff1 * qdiff1;
        if (new_num < num) {
          num = new_num;
        }
        if (new_den < den) {
          den = new_den;
        }
      }
      out[s * B + b] = change_sign * (den - num) / sigma2;
    }
  }
}
```