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

```asm
<CompressSparse>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %rdx,-0x68(%rbp)
  mov    %ecx,-0x6c(%rbp)
  mov    -0x60(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x6c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x68(%rbp),%rax
  mov    %rax,-0x48(%rbp)
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x68(%rbp),%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x38(%rbp)
  mov    -0x68(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x30(%rbp),%rax
  add    $0x4,%rax
  cmp    %rax,-0x10(%rbp)
  jbe    L146
  mov    -0x6c(%rbp),%eax
  sar    $0x18,%eax
  mov    %eax,%ecx
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x6c(%rbp),%eax
  sar    $0x10,%eax
  mov    %eax,%ecx
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x6c(%rbp),%eax
  sar    $0x8,%eax
  mov    %eax,%ecx
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  mov    -0x6c(%rbp),%edx
  mov    %dl,(%rax)
  jmp    L154
L304:
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x48(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x40(%rbp)
  movq   $0x0,-0x20(%rbp)
  mov    -0x40(%rbp),%rax
  cmp    -0x10(%rbp),%rax
  jae    L390
L166:
  mov    -0x40(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L318
  addq   $0x1,-0x20(%rbp)
  jmp    L344
L318:
  cmpq   $0x2,-0x20(%rbp)
  ja     L346
  mov    -0x40(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x48(%rbp)
  movq   $0x0,-0x20(%rbp)
L344:
  addq   $0x1,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  cmp    -0x10(%rbp),%rax
  jb     L166
  jmp    L390
L346:
  nop
L390:
  mov    -0x48(%rbp),%rax
  sub    -0x30(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  cmpq   $0x0,-0x28(%rbp)
  je     L247
  jmp    L286
L80:
  mov    -0x38(%rbp),%rax
  add    $0x81,%rax
  cmp    %rax,-0x18(%rbp)
  jbe    L20
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  movb   $0xff,(%rax)
  mov    -0x30(%rbp),%rcx
  mov    -0x38(%rbp),%rax
  mov    $0x80,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  addq   $0xffffffffffffff80,-0x28(%rbp)
  subq   $0xffffffffffffff80,-0x38(%rbp)
  subq   $0xffffffffffffff80,-0x30(%rbp)
L286:
  cmpq   $0x81,-0x28(%rbp)
  ja     L80
  cmpq   $0x80,-0x28(%rbp)
  jbe    L157
  mov    -0x38(%rbp),%rax
  add    $0x2,%rax
  cmp    %rax,-0x18(%rbp)
  jbe    L102
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  movb   $0x80,(%rax)
  mov    -0x30(%rbp),%rcx
  mov    -0x38(%rbp),%rax
  mov    $0x1,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  subq   $0x1,-0x28(%rbp)
  addq   $0x1,-0x38(%rbp)
  addq   $0x1,-0x30(%rbp)
L157:
  cmpq   $0x0,-0x28(%rbp)
  je     L228
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  cmp    %rax,-0x18(%rbp)
  jbe    L359
  mov    -0x28(%rbp),%rax
  lea    -0x1(%rax),%ecx
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  or     $0xffffff80,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x28(%rbp),%rdx
  mov    -0x30(%rbp),%rcx
  mov    -0x38(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x28(%rbp),%rax
  add    %rax,-0x38(%rbp)
  mov    -0x28(%rbp),%rax
  add    %rax,-0x30(%rbp)
  jmp    L247
L228:
  mov    -0x38(%rbp),%rax
  add    $0x2,%rax
  cmp    %rax,-0x18(%rbp)
  jbe    L393
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  movb   $0x80,(%rax)
  mov    -0x30(%rbp),%rcx
  mov    -0x38(%rbp),%rax
  mov    $0x1,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  addq   $0x1,-0x38(%rbp)
  addq   $0x1,-0x30(%rbp)
  jmp    L247
L57:
  mov    -0x38(%rbp),%rax
  add    $0x1,%rax
  cmp    %rax,-0x18(%rbp)
  jbe    L415
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  movb   $0x7f,(%rax)
  subq   $0x82,-0x20(%rbp)
  addq   $0x82,-0x30(%rbp)
L247:
  cmpq   $0x85,-0x20(%rbp)
  ja     L57
  cmpq   $0x82,-0x20(%rbp)
  jbe    L238
  mov    -0x38(%rbp),%rax
  add    $0x1,%rax
  cmp    %rax,-0x18(%rbp)
  jbe    L226
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  movb   $0x0,(%rax)
  subq   $0x3,-0x20(%rbp)
  addq   $0x3,-0x30(%rbp)
L238:
  cmpq   $0x2,-0x20(%rbp)
  jbe    L154
  mov    -0x38(%rbp),%rax
  add    $0x1,%rax
  cmp    %rax,-0x18(%rbp)
  jbe    L434
  mov    -0x20(%rbp),%rax
  mov    %eax,%ecx
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  lea    -0x3(%rcx),%edx
  mov    %dl,(%rax)
  mov    -0x20(%rbp),%rax
  add    %rax,-0x30(%rbp)
L154:
  mov    -0x10(%rbp),%rax
  sub    $0x3,%rax
  cmp    %rax,-0x30(%rbp)
  jb     L304
  mov    -0x30(%rbp),%rax
  cmp    -0x10(%rbp),%rax
  jae    L439
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x40(%rbp)
L30:
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  movzbl (%rax),%eax
  test   %al,%al
  je     L217
  mov    -0x10(%rbp),%rax
  sub    -0x30(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  cmp    %rax,-0x18(%rbp)
  jbe    L71
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  movb   $0xff,(%rax)
  mov    -0x28(%rbp),%rdx
  mov    -0x30(%rbp),%rcx
  mov    -0x38(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x28(%rbp),%rax
  add    %rax,-0x38(%rbp)
  jmp    L439
L217:
  mov    -0x40(%rbp),%rax
  cmp    -0x10(%rbp),%rax
  jb     L240
  mov    -0x38(%rbp),%rax
  add    $0x1,%rax
  cmp    %rax,-0x18(%rbp)
  jbe    L204
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  movb   $0x7f,(%rax)
  jmp    L439
L240:
  nop
  jmp    L30
L439:
  mov    -0x38(%rbp),%rax
  sub    -0x8(%rbp),%rax
  mov    %eax,%edx
  mov    -0x60(%rbp),%rax
  mov    %edx,(%rax)
  jmp    L361
L146:
  nop
  jmp    L361
L20:
  nop
  jmp    L361
L102:
  nop
  jmp    L361
L359:
  nop
  jmp    L361
L393:
  nop
  jmp    L361
L415:
  nop
  jmp    L361
L226:
  nop
  jmp    L361
L434:
  nop
  jmp    L361
L71:
  nop
  jmp    L361
L204:
  nop
L361:
  leave
  ret
```

assistant: ```c
void CompressSparse(void *pvOutBuffer, int *pcbOutBuffer, void *pvInBuffer, int cbInBuffer) {
  unsigned char *pbOutBufferEnd = (unsigned char *)pvOutBuffer + *pcbOutBuffer;
  unsigned char *pbInBufferEnd = (unsigned char *)pvInBuffer + cbInBuffer;
  unsigned char *pbLastNonZero = (unsigned char *)pvInBuffer;
  unsigned char *pbOutBuffer0 = (unsigned char *)pvOutBuffer;
  unsigned char *pbInBuffPtr = (unsigned char *)pvInBuffer;
  unsigned char *pbOutBuffer = (unsigned char *)pvOutBuffer;
  unsigned char *pbInBuffer = (unsigned char *)pvInBuffer;
  size_t NumberOfNonZeros;
  size_t NumberOfZeros;
  if ((pbInBuffer + 4) >= pbInBufferEnd)
    return;
  *pbOutBuffer++ = (unsigned char)(cbInBuffer >> 0x18);
  *pbOutBuffer++ = (unsigned char)(cbInBuffer >> 0x10);
  *pbOutBuffer++ = (unsigned char)(cbInBuffer >> 0x08);
  *pbOutBuffer++ = (unsigned char)(cbInBuffer >> 0x00);
  while (pbInBuffer < (pbInBufferEnd - 3)) {
    pbLastNonZero = pbInBuffer;
    pbInBuffPtr = pbInBuffer;
    NumberOfZeros = 0;
    if (pbInBuffPtr < pbInBufferEnd) {
      do {
        if (*pbInBuffPtr == 0) {
          NumberOfZeros++;
        } else {
          if (NumberOfZeros >= 3)
            break;
          pbLastNonZero = pbInBuffPtr + 1;
          NumberOfZeros = 0;
        }
      } while (++pbInBuffPtr < pbInBufferEnd);
    }
    NumberOfNonZeros = pbLastNonZero - pbInBuffer;
    if (NumberOfNonZeros != 0) {
      while (NumberOfNonZeros > 0x81) {
        if ((pbOutBuffer + 0x81) >= pbOutBufferEnd)
          return;
        *pbOutBuffer++ = 0xFF;
        memcpy(pbOutBuffer, pbInBuffer, 0x80);
        NumberOfNonZeros -= 0x80;
        pbOutBuffer += 0x80;
        pbInBuffer += 0x80;
      }
      if (NumberOfNonZeros > 0x80) {
        if ((pbOutBuffer + 2) >= pbOutBufferEnd)
          return;
        *pbOutBuffer++ = 0x80;
        memcpy(pbOutBuffer, pbInBuffer, 1);
        NumberOfNonZeros--;
        pbOutBuffer++;
        pbInBuffer++;
      }
      if (NumberOfNonZeros >= 0x01) {
        if ((pbOutBuffer + NumberOfNonZeros + 1) >= pbOutBufferEnd)
          return;
        *pbOutBuffer++ = (unsigned char)(0x80 | (NumberOfNonZeros - 1));
        memcpy(pbOutBuffer, pbInBuffer, NumberOfNonZeros);
        pbOutBuffer += NumberOfNonZeros;
        pbInBuffer += NumberOfNonZeros;
      } else {
        if ((pbOutBuffer + 2) >= pbOutBufferEnd)
          return;
        *pbOutBuffer++ = 0x80;
        memcpy(pbOutBuffer, pbInBuffer, 1);
        pbOutBuffer++;
        pbInBuffer++;
      }
    }
    while (NumberOfZeros > 0x85) {
      if ((pbOutBuffer + 1) >= pbOutBufferEnd)
        return;
      *pbOutBuffer++ = 0x7F;
      NumberOfZeros -= 0x82;
      pbInBuffer += 0x82;
    }
    if (NumberOfZeros > 0x82) {
      if ((pbOutBuffer + 1) >= pbOutBufferEnd)
        return;
      *pbOutBuffer++ = 0;
      NumberOfZeros -= 0x03;
      pbInBuffer += 0x03;
    }
    if (NumberOfZeros >= 3) {
      if ((pbOutBuffer + 1) >= pbOutBufferEnd)
        return;
      *pbOutBuffer++ = (unsigned char)(NumberOfZeros - 3);
      pbInBuffer += NumberOfZeros;
    }
  }
  if (pbInBuffer < pbInBufferEnd) {
    pbInBuffPtr = pbInBuffer;
    for (;;) {
      if (*pbInBuffPtr++ != 0) {
        NumberOfNonZeros = (pbInBufferEnd - pbInBuffer);
        if ((pbOutBuffer + NumberOfNonZeros + 1) >= pbOutBufferEnd)
          return;
        *pbOutBuffer++ = 0xFF;
        memcpy(pbOutBuffer, pbInBuffer, NumberOfNonZeros);
        pbOutBuffer += NumberOfNonZeros;
        break;
      } else {
        if (pbInBuffPtr < pbInBufferEnd)
          continue;
        if ((pbOutBuffer + 1) >= pbOutBufferEnd)
          return;
        *pbOutBuffer++ = 0x7F;
        break;
      }
    }
  }
  *pcbOutBuffer = (int)(pbOutBuffer - pbOutBuffer0);
}
```