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    L7
L45:
  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     L44
  pxor   %xmm0,%xmm0
  ucomisd -0x10(%rbp),%xmm0
  je     L36
L44:
  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    L55
L36:
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
L55:
  subl   $0x1,-0x40(%rbp)
L7:
  cmpl   $0x0,-0x40(%rbp)
  jns    L45
  movl   $0x0,-0x38(%rbp)
  mov    -0x34(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x3c(%rbp)
  jmp    L32
L49:
  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     L41
  pxor   %xmm0,%xmm0
  ucomisd -0x10(%rbp),%xmm0
  je     L72
L41:
  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)
L72:
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  addl   $0x1,-0x3c(%rbp)
L32:
  mov    -0x3c(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L49
  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(elen, e, h)
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;
}
```