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

```asm
<CompressUsingRLE>:
  endbr64
  push   %r15
  mov    %rcx,%r10
  push   %r14
  push   %r13
  mov    %rdx,%r13
  lea    0x7e(%rsi),%edx
  movslq %edx,%rax
  push   %r12
  mov    %rdi,%r12
  imul   $0xffffffff81020409,%rax,%rax
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  shr    $0x20,%rax
  add    %edx,%eax
  sar    $0x1f,%edx
  sub    $0x18,%rsp
  sar    $0x6,%eax
  sub    %edx,%eax
  test   %r13,%r13
  sete   %dl
  test   %rcx,%rcx
  sete   %cl
  or     %ecx,%edx
  test   %rdi,%rdi
  sete   %cl
  or     %ecx,%edx
  cmp    $0xfa,%esi
  jg     L14
  lea    0x1(%rax,%rsi,1),%r11d
  movslq %r11d,%r11
  test   %dl,%dl
  je     L241
L15:
  add    $0x18,%rsp
  mov    %r11,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L14:
  lea    0x2(%rax,%rsi,1),%r11d
  movslq %r11d,%r11
  test   %dl,%dl
  jne    L15
  movl   $0x2,0xc(%rsp)
L218:
  movslq 0xc(%rsp),%rax
  lea    -0x1(%rbp),%r14d
  lea    0x2(%rax),%esi
  lea    0x1(%rax),%r9d
  lea    0x0(%r13,%rax,8),%r8
  xor    %eax,%eax
  jmp    L78
  nopl   (%rax)
L21:
  movslq %esi,%rdx
  mov    %esi,%r15d
  cmp    %r10,%rdx
  ja     L122
  movslq %r9d,%rax
  add    $0x2,%esi
  add    $0x2,%r9d
  add    $0x10,%r8
  movq   $0x0,-0x10(%r8)
  mov    %rdi,0x0(%r13,%rax,8)
  mov    %ecx,%eax
  cmp    %ebp,%eax
  jge    L240
L78:
  movslq %eax,%rdx
  lea    0x1(%rax),%ecx
  mov    (%r12,%rdx,8),%rdi
  lea    0x0(,%rdx,8),%r15
  cmp    %ecx,%ebp
  jle    L21
  cmp    0x8(%r12,%r15,1),%rdi
  jne    L21
  lea    0x2(%rax),%edx
  cmp    %edx,%ebp
  jle    L98
  lea    0x3(%rax),%edx
  mov    %r14d,%r15d
  mov    $0x1,%ecx
  movslq %edx,%rdx
  sub    %eax,%r15d
  jmp    L81
  nop
L27:
  add    $0x1,%ecx
  mov    %edx,%eax
  cmp    %r15d,%ecx
  je     L208
  add    $0x1,%rdx
  cmp    $0x7f,%ecx
  je     L208
L81:
  lea    -0x1(%rdx),%eax
  cmp    %rdi,-0x8(%r12,%rdx,8)
  je     L27
L208:
  movslq %esi,%rdx
  mov    %esi,%r15d
  cmp    %r10,%rdx
  ja     L122
  neg    %ecx
  movq   %rdi,%xmm1
  add    $0x2,%esi
  add    $0x2,%r9d
  movslq %ecx,%rbx
  add    $0x10,%r8
  movq   %rbx,%xmm0
  punpcklqdq %xmm1,%xmm0
  movups %xmm0,-0x10(%r8)
  cmp    %ebp,%eax
  jl     L78
  nopl   0x0(%rax,%rax,1)
L240:
  sub    0xc(%rsp),%r15d
  cmpl   $0x2,0xc(%rsp)
  mov    %rdx,%r11
  je     L100
L158:
  movslq %r15d,%rax
L178:
  mov    %rax,0x0(%r13)
  jmp    L15
  nopw   0x0(%rax,%rax,1)
L241:
  test   %esi,%esi
  jle    L190
  movl   $0x1,0xc(%rsp)
  jmp    L218
  nopl   (%rax)
L122:
  cmp    %r11,%r10
  jb     L152
  mov    0xc(%rsp),%ebx
  xor    %r15d,%r15d
  nopl   0x0(%rax)
L145:
  mov    %ebp,%r14d
  mov    $0x80,%eax
  sub    %r15d,%r14d
  cmp    %eax,%r14d
  cmovg  %eax,%r14d
  movslq %ebx,%rax
  lea    0x8(%r13,%rax,8),%rdi
  movslq %r14d,%rdx
  lea    0x1(%r14,%rbx,1),%ebx
  lea    -0x1(%rdx),%rcx
  mov    %rcx,0x0(%r13,%rax,8)
  movslq %r15d,%rcx
  add    %r14d,%r15d
  lea    (%r12,%rcx,8),%rsi
  call   <memcpy@plt>
  cmp    %r15d,%ebp
  jg     L145
  mov    %ebx,%r15d
  sub    0xc(%rsp),%r15d
  cmpl   $0x2,0xc(%rsp)
  movslq %ebx,%r11
  jne    L158
L100:
  mov    %r15d,%eax
  movzbl %r15b,%r15d
  sar    $0x8,%eax
  mov    %r15,0x8(%r13)
  cltq
  jmp    L178
L152:
  mov    $0xffffffffffffffff,%r11
  jmp    L15
L98:
  mov    %edx,%eax
  mov    $0x1,%ecx
  jmp    L208
L190:
  mov    $0x1,%r11d
  xor    %r15d,%r15d
  jmp    L158
```

assistant: ```c
ssize_t CompressUsingRLE(uint8_t *row, uint16_t uncmpLength, uint8_t *outBuf, size_t bufSize) {
  int byteCountLength = 1 + (uncmpLength > 250);
  uint16_t cmpCursor = byteCountLength;
  uint16_t cursor = 0;
  size_t maxSize = byteCountLength + uncmpLength + (uncmpLength + 126) / 127;
  int outOfRoom = 0;
  uint16_t cmpLength;
  if (row == NULL || outBuf == NULL || bufSize == 0)
    return maxSize;
  while (cursor < uncmpLength) {
    uint8_t byte = row[cursor++];
    uint8_t nextByte;
    if (cursor < uncmpLength && (nextByte = row[cursor]) == byte) {
      int8_t matches = 1;
      while (++cursor < uncmpLength && matches < 127 && row[cursor] == byte) {
        matches++;
      }
      if (cmpCursor + 2 > bufSize) {
        outOfRoom = 1;
        break;
      }
      outBuf[cmpCursor++] = -matches;
      outBuf[cmpCursor++] = byte;
    } else {
      uint8_t literals = 0;
      uint8_t i;
      while (cursor + literals + 1 < uncmpLength && literals < 127 && nextByte != (nextByte = row[cursor + literals + 1])) {
        literals++;
      }
      if (cmpCursor + 2 + literals > bufSize) {
        outOfRoom = 1;
        break;
      }
      outBuf[cmpCursor++] = literals;
      outBuf[cmpCursor++] = byte;
      for (i = 0; i < literals; i++) {
        outBuf[cmpCursor++] = row[cursor++];
      }
    }
  }
  if (outOfRoom) {
    if (bufSize < maxSize) {
      return -1;
    }
    cursor = 0;
    cmpCursor = byteCountLength;
    while (cursor < uncmpLength) {
      uint8_t bytesToCopy = uncmpLength - cursor > 128 ? 128 : uncmpLength - cursor;
      outBuf[cmpCursor++] = bytesToCopy - 1;
      memcpy(outBuf + cmpCursor, row + cursor, bytesToCopy);
      cmpCursor += bytesToCopy;
      cursor += bytesToCopy;
    }
    cmpLength = cmpCursor - 1;
  }
  cmpLength = cmpCursor - byteCountLength;
  if (byteCountLength == 2) {
    outBuf[0] = cmpLength >> 8;
    outBuf[1] = cmpLength & 0xff;
  } else {
    outBuf[0] = cmpLength;
  }
  return cmpCursor;
}
```