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

```asm
<estimate_noise_loizou>:
  endbr64
  push   %rbp
  mov    %rdx,%rax
  mov    %rcx,%rdx
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  movslq %esi,%rbx
  sub    $0x28,%rsp
  mov    0x10(%rbp),%rcx
  mov    0x18(%rbp),%rsi
  mov    %fs:0x28,%r13
  mov    %r13,-0x38(%rbp)
  xor    %r13d,%r13d
  lea    0x1(%rbx),%r13d
  mov    0x20(%rbp),%r10
  mov    0x28(%rbp),%r11
  movslq %r13d,%r13
  mov    0x30(%rbp),%r12
  lea    0xf(,%r13,4),%r13
  mov    %r13,%r14
  mov    %r13,%r15
  and    $0xfffffffffffffff0,%r14
  and    $0xfffffffffffff000,%r15
  mov    %r14,-0x48(%rbp)
  mov    %rsp,%r14
  sub    %r15,%r14
  cmp    %r14,%rsp
  je     L32
L111:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %r14,%rsp
  jne    L111
L32:
  mov    -0x48(%rbp),%r14
  and    $0xfff,%r14d
  sub    %r14,%rsp
  test   %r14,%r14
  jne    L147
L127:
  mov    %r13,%r15
  and    $0xfffffffffffff000,%r13
  mov    %rsp,%r14
  and    $0xfffffffffffffff0,%r15
  mov    %r15,-0x48(%rbp)
  mov    %rsp,%r15
  sub    %r13,%r15
  cmp    %r15,%rsp
  je     L109
L44:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %r15,%rsp
  jne    L44
L109:
  mov    -0x48(%rbp),%r13
  and    $0xfff,%r13d
  sub    %r13,%rsp
  test   %r13,%r13
  jne    L110
L30:
  mov    %rsp,%r13
  test   %ebx,%ebx
  js     L82
  lea    0x4(,%rbx,4),%r15
  movss  D87(%rip),%xmm7
  movss  D54(%rip),%xmm8
  xor    %ebx,%ebx
  movss  D20(%rip),%xmm1
  movss  D29(%rip),%xmm6
  pxor   %xmm2,%xmm2
  movss  D7(%rip),%xmm5
  movss  D2(%rip),%xmm4
  movss  D81(%rip),%xmm3
  movss  D52(%rip),%xmm10
  movss  D56(%rip),%xmm9
  jmp    L1
  nop
L48:
  movaps %xmm2,%xmm11
  movaps %xmm2,%xmm0
L74:
  movss  %xmm0,0x0(%r13,%rbx,1)
  movss  (%r12,%rbx,1),%xmm0
  mulss  %xmm6,%xmm0
  addss  %xmm11,%xmm0
  movaps %xmm1,%xmm11
  movss  %xmm0,(%r11,%rbx,1)
  mulss  %xmm5,%xmm0
  addss  %xmm4,%xmm0
  subss  %xmm0,%xmm11
  movss  %xmm0,(%r14,%rbx,1)
  mulss  (%rcx,%rbx,1),%xmm0
  mulss  (%rax,%rbx,1),%xmm11
  addss  %xmm0,%xmm11
  movss  %xmm11,(%r9,%rbx,1)
  add    $0x4,%rbx
  cmp    %r15,%rbx
  je     L82
L1:
  movss  (%r8,%rbx,1),%xmm0
  movss  (%rax,%rbx,1),%xmm11
  mulss  %xmm8,%xmm0
  mulss  %xmm7,%xmm11
  addss  %xmm11,%xmm0
  movss  %xmm0,(%rdx,%rbx,1)
  movss  (%r10,%rbx,1),%xmm11
  comiss %xmm11,%xmm0
  jbe    L116
  movss  (%r8,%rbx,1),%xmm12
  mulss  %xmm9,%xmm11
  mulss  %xmm3,%xmm12
  subss  %xmm12,%xmm0
  mulss  %xmm10,%xmm0
  addss  %xmm11,%xmm0
L116:
  movss  %xmm0,(%rsi,%rbx,1)
  movss  (%rdx,%rbx,1),%xmm11
  divss  %xmm0,%xmm11
  comiss (%rdi,%rbx,1),%xmm11
  jbe    L48
  movaps %xmm3,%xmm11
  movaps %xmm1,%xmm0
  jmp    L74
  nop
L147:
  orq    $0x0,-0x8(%rsp,%r14,1)
  jmp    L127
  nopl   0x0(%rax,%rax,1)
L82:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L31
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L110:
  orq    $0x0,-0x8(%rsp,%r13,1)
  jmp    L30
L31:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D87
data_type: byte[4]
name: unpack_data
arguments: data_label: D54
data_type: byte[4]
name: unpack_data
arguments: data_label: D20
data_type: byte[4]
name: unpack_data
arguments: data_label: D29
data_type: byte[4]
name: unpack_data
arguments: data_label: D7
data_type: byte[4]
name: unpack_data
arguments: data_label: D2
data_type: byte[4]
name: unpack_data
arguments: data_label: D81
data_type: byte[4]
name: unpack_data
arguments: data_label: D52
data_type: byte[4]
name: unpack_data
arguments: data_label: D56
data_type: byte[4]

tool: {"D87": [0x9a,0x99,0x99,0x3e]}

tool: {"D54": [0x33,0x33,0x33,0x3f]}

tool: {"D20": [0x00,0x00,0x80,0x3f]}

tool: {"D29": [0xcd,0xcc,0x4c,0x3e]}

tool: {"D7": [0xd0,0xcc,0x4c,0x3d]}

tool: {"D2": [0x33,0x33,0x73,0x3f]}

tool: {"D81": [0xcd,0xcc,0x4c,0x3f]}

tool: {"D52": [0x81,0xd6,0x23,0x3c]}

tool: {"D56": [0xee,0x7c,0x7f,0x3f]}

assistant: ```c
void estimate_noise_loizou(float *thresh, int fft_size_2, float *p2, float *s_pow_spec, float *prev_s_pow_spec, float *noise_thresholds_p2, float *prev_noise, float *p_min, float *prev_p_min, float *speech_p_p, float *prev_speech_p_p) {
  int k;
  float ratio_ns = 0.f;
  float freq_s[fft_size_2 + 1];
  float speech_p_d[fft_size_2 + 1];
  for (k = 0; k <= fft_size_2; k++) {
    s_pow_spec[k] = 0.7f * prev_s_pow_spec[k] + (1.f - 0.7f) * p2[k];
    if (prev_p_min[k] < s_pow_spec[k]) {
      p_min[k] = 0.998f * prev_p_min[k] + ((1.f - 0.998f) / (1.f - 0.8f)) * (s_pow_spec[k] - 0.8f * prev_s_pow_spec[k]);
    } else {
      p_min[k] = s_pow_spec[k];
    }
    ratio_ns = s_pow_spec[k] / p_min[k];
    if (ratio_ns > thresh[k]) {
      speech_p_d[k] = 1.f;
    } else {
      speech_p_d[k] = 0.f;
    }
    speech_p_p[k] = 0.2f * prev_speech_p_p[k] + (1.f - 0.2f) * speech_p_d[k];
    freq_s[k] = 0.95f + (1.f - 0.95f) * speech_p_p[k];
    noise_thresholds_p2[k] = freq_s[k] * prev_noise[k] + (1.f - freq_s[k]) * p2[k];
  }
}
```