user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<compress>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x44(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    -0x44(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x34(%rbp)
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0x44(%rbp),%eax
  sub    $0x2,%eax
  mov    %eax,-0x40(%rbp)
  jmp    L67
L84:
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x30(%rbp),%xmm0
  addsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm0
  subsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x8(%rbp),%xmm0
  subsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  pxor   %xmm0,%xmm0
  ucomisd -0x10(%rbp),%xmm0
  jp     L18
  pxor   %xmm0,%xmm0
  ucomisd -0x10(%rbp),%xmm0
  je     L77
L18:
  mov    -0x34(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x34(%rbp)
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  jmp    L68
L77:
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
L68:
  subl   $0x1,-0x40(%rbp)
L67:
  cmpl   $0x0,-0x40(%rbp)
  jns    L84
  movl   $0x0,-0x38(%rbp)
  mov    -0x34(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x3c(%rbp)
  jmp    L78
L74:
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x28(%rbp),%xmm0
  addsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm0
  subsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x30(%rbp),%xmm0
  subsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  pxor   %xmm0,%xmm0
  ucomisd -0x10(%rbp),%xmm0
  jp     L34
  pxor   %xmm0,%xmm0
  ucomisd -0x10(%rbp),%xmm0
  je     L71
L34:
  mov    -0x38(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x38(%rbp)
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,(%rax)
L71:
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  addl   $0x1,-0x3c(%rbp)
L78:
  mov    -0x3c(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L74
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x38(%rbp),%eax
  add    $0x1,%eax
  pop    %rbp
  ret
```

assistant: ```c
int compress(int elen, double *e, double *h) {
  double Q, q;
  double Qnew;
  int eindex, hindex;
  double bvirt;
  double enow, hnow;
  int top, bottom;
  bottom = elen - 1;
  Q = e[bottom];
  for (eindex = elen - 2; eindex >= 0; eindex--) {
    enow = e[eindex];
    Qnew = (double)(Q + enow);
    bvirt = Qnew - Q;
    q = enow - bvirt;
    if (q != 0) {
      h[bottom--] = Qnew;
      Q = q;
    } else {
      Q = Qnew;
    }
  }
  top = 0;
  for (hindex = bottom + 1; hindex < elen; hindex++) {
    hnow = h[hindex];
    Qnew = (double)(hnow + Q);
    bvirt = Qnew - hnow;
    q = Q - bvirt;
    if (q != 0) {
      h[top++] = q;
    }
    Q = Qnew;
  }
  h[top] = Q;
  return top + 1;
}
```