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

```asm
<DecomposeHistogram>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdx,%r10
  mov    %rcx,%r11
  movapd %xmm0,%xmm4
  test   %esi,%esi
  jle    L68
  lea    -0x1(%rsi),%r13d
  mov    %esi,%r12d
  mov    $0x0,%ecx
  mov    $0x0,%ebx
  mov    $0x0,%r14d
  movss  D0(%rip),%xmm5
  movss  D4(%rip),%xmm7
  movaps %xmm7,%xmm6
  jmp    L116
L92:
  movaps %xmm0,%xmm3
  subss  %xmm1,%xmm3
  movaps %xmm0,%xmm1
  subss  %xmm2,%xmm1
  movaps %xmm3,%xmm2
  addss  %xmm1,%xmm2
  divss  %xmm2,%xmm3
  divss  %xmm2,%xmm1
  comiss %xmm3,%xmm1
  jbe    L70
  movaps %xmm6,%xmm2
  subss  %xmm3,%xmm2
  xorps  D26(%rip),%xmm2
L52:
  movslq %ebx,%rax
  pxor   %xmm1,%xmm1
  cvtsi2ss %ebp,%xmm1
  addss  %xmm2,%xmm1
  movss  %xmm1,(%r10,%rax,4)
  mulss  %xmm5,%xmm0
  movss  %xmm0,(%r11,%rax,4)
  pxor   %xmm0,%xmm0
  cvtsd2ss %xmm4,%xmm0
  movss  %xmm0,(%r8,%rax,4)
  add    $0x1,%ebx
L4:
  add    $0x1,%rcx
  cmp    %r12,%rcx
  je     L72
L116:
  mov    %ecx,%ebp
  lea    0x0(%r13,%rcx,1),%eax
  cltd
  idiv   %esi
  movslq %edx,%rdx
  movss  (%rdi,%rdx,4),%xmm1
  movss  (%rdi,%rcx,4),%xmm0
  lea    0x1(%rcx),%eax
  comiss %xmm0,%xmm1
  ja     L4
  cltd
  idiv   %esi
  movslq %edx,%rdx
  movss  (%rdi,%rdx,4),%xmm2
  comiss %xmm0,%xmm2
  ja     L4
  ucomiss %xmm0,%xmm1
  setnp  %al
  cmovne %r14d,%eax
  test   %al,%al
  je     L92
  ucomiss %xmm2,%xmm0
  setnp  %al
  cmovne %r14d,%eax
  test   %al,%al
  je     L92
  jmp    L4
L70:
  movaps %xmm7,%xmm2
  subss  %xmm1,%xmm2
  jmp    L52
L68:
  mov    $0x0,%ebx
L72:
  cmp    %ebx,%r9d
  jle    L90
  movslq %ebx,%rax
  movss  D22(%rip),%xmm1
  cvtsd2ss %xmm4,%xmm4
L102:
  movss  %xmm1,(%r10,%rax,4)
  movl   $0x0,(%r11,%rax,4)
  movss  %xmm4,(%r8,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%r9d
  jg     L102
L90:
  mov    %ebx,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D0
data_type: byte[4]
name: extract_symbolic_data
arguments: data_tag: D4
data_type: f32
name: extract_symbolic_data
arguments: data_tag: D26
data_type: byte[16]
name: extract_symbolic_data
arguments: data_tag: D22
data_type: byte[4]

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

tool: D4: 0.5

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

tool: {"D22": [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;
}
```