user: 请将以下的汇编代码转换成C语言代码：

```asm
<DecomposeHistogram>:
  endbr64
  push   %r14
  mov    %rdx,%r10
  mov    %rcx,%r11
  movapd %xmm0,%xmm4
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  test   %esi,%esi
  jle    L56
  movss  D8(%rip),%xmm5
  lea    -0x1(%rsi),%ebp
  mov    %esi,%ebx
  xor    %ecx,%ecx
  movss  D5(%rip),%xmm6
  xor    %r12d,%r12d
  xor    %r13d,%r13d
  movss  D31(%rip),%xmm7
  jmp    L14
  nopl   (%rax)
L83:
  subss  %xmm3,%xmm2
  xorps  %xmm7,%xmm2
L102:
  mulss  %xmm5,%xmm0
  pxor   %xmm1,%xmm1
  movslq %r12d,%rax
  add    $0x1,%r12d
  cvtsi2ss %r14d,%xmm1
  addss  %xmm2,%xmm1
  movss  %xmm1,(%r10,%rax,4)
  movss  %xmm0,(%r11,%rax,4)
  pxor   %xmm0,%xmm0
  cvtsd2ss %xmm4,%xmm0
  movss  %xmm0,(%r8,%rax,4)
L10:
  add    $0x1,%rcx
  cmp    %rcx,%rbx
  je     L84
L14:
  lea    0x0(%rbp,%rcx,1),%eax
  movss  (%rdi,%rcx,4),%xmm0
  mov    %ecx,%r14d
  cltd
  idiv   %esi
  lea    0x1(%rcx),%eax
  movslq %edx,%rdx
  movss  (%rdi,%rdx,4),%xmm1
  comiss %xmm0,%xmm1
  ja     L10
  cltd
  idiv   %esi
  movslq %edx,%rdx
  movss  (%rdi,%rdx,4),%xmm2
  comiss %xmm0,%xmm2
  ja     L10
  ucomiss %xmm0,%xmm1
  setnp  %al
  cmovne %r13d,%eax
  test   %al,%al
  je     L8
  ucomiss %xmm2,%xmm0
  setnp  %al
  cmovne %r13d,%eax
  test   %al,%al
  jne    L10
L8:
  movaps %xmm0,%xmm3
  subss  %xmm1,%xmm3
  movaps %xmm0,%xmm1
  subss  %xmm2,%xmm1
  movaps %xmm3,%xmm2
  addss  %xmm1,%xmm2
  divss  %xmm2,%xmm3
  divss  %xmm2,%xmm1
  movaps %xmm6,%xmm2
  comiss %xmm3,%xmm1
  ja     L83
  subss  %xmm1,%xmm2
  jmp    L102
  nopl   0x0(%rax,%rax,1)
L56:
  xor    %r12d,%r12d
  nopl   0x0(%rax,%rax,1)
L84:
  cmp    %r12d,%r9d
  jle    L51
  movss  D23(%rip),%xmm1
  movslq %r12d,%rax
  cvtsd2ss %xmm4,%xmm4
  nopl   0x0(%rax)
L101:
  movss  %xmm1,(%r10,%rax,4)
  movl   $0x0,(%r11,%rax,4)
  movss  %xmm4,(%r8,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%r9d
  jg     L101
L51:
  pop    %rbx
  mov    %r12d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

tool_calls: name: parse_data
arguments: label: D8
type_infered: byte[4]
name: parse_data
arguments: label: D5
type_infered: f32
name: parse_data
arguments: label: D31
type_infered: byte[4]
name: parse_data
arguments: label: D23
type_infered: byte[4]

tool: {"D8": [0x00,0x00,0x80,0x40]}

tool: D5: 0.5

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

tool: {"D23": [0x00,0x00,0x80,0xbf]}

assistant: ```c
int DecomposeHistogram(float *histogram, int bins, float *out_means, float *out_amps, float *out_sigmas, int max_dists, double default_sigma, int iterations) {
  int i;
  int peak = 0;
  for (i = 0; i < bins; i++) {
    float offset = 0;
    float prev = histogram[(i - 1 + bins) % bins];
    float this = histogram[i];
    float next = histogram[(i + 1) % bins];
    if (prev > this || next > this)
      continue;
    if (prev == this && next == this)
      continue;
    float totaldiff = ((this - prev) + (this - next));
    float porpdiffP = (this - prev) / totaldiff;
    float porpdiffN = (this - next) / totaldiff;
    if (porpdiffP < porpdiffN) {
      offset = -(0.5 - porpdiffP);
    } else {
      offset = (0.5 - porpdiffN);
    }
    out_means[peak] = i + offset;
    out_amps[peak] = this * 4;
    out_sigmas[peak] = default_sigma;
    peak++;
  }
  for (i = peak; i < max_dists; i++) {
    out_means[i] = -1;
    out_amps[i] = 0;
    out_sigmas[i] = default_sigma;
  }
  return peak;
}
```