user: 下面的汇编指令对应的C源代码是什么：

```asm
<rle_compress_hdmv>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %edx,-0x44(%rbp)
  mov    %ecx,-0x48(%rbp)
  mov    %r8,-0x50(%rbp)
  movq   $0x0,-0x18(%rbp)
  movq   $0x0,-0x10(%rbp)
  mov    -0x38(%rbp),%rax
  movq   $0x0,(%rax)
  mov    -0x50(%rbp),%rax
  movl   $0x0,(%rax)
  movl   $0x0,-0x28(%rbp)
  jmp    L89
L57:
  mov    -0x18(%rbp),%rax
  mov    %eax,%ecx
  mov    -0x38(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x10(%rbp),%rax
  sub    %rdx,%rax
  sar    $0x2,%rax
  mov    %eax,%edx
  mov    %ecx,%eax
  sub    %edx,%eax
  mov    %eax,%edx
  mov    -0x44(%rbp),%eax
  shl    $0x2,%eax
  cmp    %eax,%edx
  jge    L41
  mov    -0x38(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x10(%rbp),%rax
  sub    %rdx,%rax
  sar    $0x2,%rax
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  jne    L50
  mov    -0x44(%rbp),%eax
  imul   -0x48(%rbp),%eax
  lea    0xf(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x4,%eax
  cltq
  jmp    L60
L50:
  mov    -0x18(%rbp),%rax
  add    %rax,%rax
L60:
  mov    %rax,-0x18(%rbp)
  mov    -0x38(%rbp),%rax
  mov    (%rax),%rax
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <realloc@plt>
  mov    -0x38(%rbp),%rdx
  mov    %rax,(%rdx)
  mov    -0x38(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,-0x10(%rbp)
L41:
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x24(%rbp)
  movl   $0x1,-0x20(%rbp)
  movl   $0x1,-0x1c(%rbp)
  movl   $0x1,-0x1c(%rbp)
  jmp    L2
L56:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x24(%rbp)
  jne    L25
  addl   $0x1,-0x20(%rbp)
  jmp    L15
L25:
  mov    -0x20(%rbp),%edx
  mov    -0x24(%rbp),%ecx
  mov    -0x10(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <write_rle_hdmv@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x50(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x50(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x24(%rbp)
  movl   $0x1,-0x20(%rbp)
L15:
  addl   $0x1,-0x1c(%rbp)
L2:
  mov    -0x1c(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L56
  cmpl   $0x0,-0x20(%rbp)
  je     L99
  mov    -0x20(%rbp),%edx
  mov    -0x24(%rbp),%ecx
  mov    -0x10(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <write_rle_hdmv@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x50(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x50(%rbp),%rax
  mov    %edx,(%rax)
L99:
  mov    -0x10(%rbp),%rax
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <write_rle_hdmv@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x50(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x50(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x40(%rbp)
  addl   $0x1,-0x28(%rbp)
L89:
  mov    -0x28(%rbp),%eax
  cmp    -0x48(%rbp),%eax
  jl     L57
  mov    -0x38(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x10(%rbp),%rax
  sub    %rdx,%rax
  sar    $0x2,%rax
  leave
  ret
```

assistant: ```c
size_t rle_compress_hdmv(uint8_t **rle_data, const uint8_t *data, uint w, uint h, int *num_rle) {
  uint y;
  size_t rle_size = 0;
  uint8_t *rle = NULL;
  *rle_data = NULL;
  *num_rle = 0;
  for (y = 0; y < h; y++) {
    if ((ssize_t)(rle_size - (rle - *rle_data)) < w * 4) {
      size_t used = rle - *rle_data;
      rle_size = rle_size < 1 ? w * h / 16 : rle_size * 2;
      *rle_data = realloc(*rle_data, rle_size);
      rle = *rle_data + used;
    }
    uint color = *data;
    uint len = 1;
    uint x = 1;
    for (x = 1; x < w; x++) {
      if (data[x] == color) {
        len++;
      } else {
        rle = write_rle_hdmv(rle, color, len);
        (*num_rle)++;
        color = data[x];
        len = 1;
      }
    }
    if (len) {
      rle = write_rle_hdmv(rle, color, len);
      (*num_rle)++;
    }
    rle = write_rle_hdmv(rle, 0, 0);
    (*num_rle)++;
    data += w;
  }
  return rle - *rle_data;
}
```