user: 请从给定的汇编指令推导出C源代码：

```asm
<RLE_Compress>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x438,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x428(%rsp)
  xor    %eax,%eax
  test   %edx,%edx
  je     L87
  mov    %rsi,%r14
  lea    0x20(%rsp),%rsi
  mov    %rdi,%r13
  xor    %eax,%eax
  mov    %edx,%ebp
  mov    $0x80,%ecx
  lea    -0x1(%rdx),%edx
  mov    %rsi,%rdi
  rep stos %rax,%es:(%rdi)
  mov    %r13,%rax
  lea    0x1(%r13,%rdx,1),%rcx
  nopl   (%rax)
L124:
  movzbl (%rax),%edx
  add    $0x1,%rax
  addl   $0x1,0x20(%rsp,%rdx,4)
  cmp    %rcx,%rax
  jne    L124
  mov    $0x1,%eax
  xor    %edx,%edx
L3:
  movzbl %dl,%ecx
  movzbl %dl,%r12d
  mov    0x20(%rsp,%rcx,4),%edi
  cmp    %edi,(%rsi,%rax,4)
  cmovb  %eax,%edx
  cmovb  %eax,%r12d
  add    $0x1,%rax
  cmp    $0x100,%rax
  jne    L3
  mov    %dl,(%r14)
  lea    0x1c(%rsp),%rsi
  movzbl 0x0(%r13),%r9d
  movl   $0x1,0x1c(%rsp)
  cmp    $0x1,%ebp
  je     L138
  movzbl 0x1(%r13),%r8d
  mov    $0x2,%ebx
  lea    0x1c(%rsp),%rsi
  movzbl %r9b,%ecx
  cmp    %r8b,%r9b
  je     L28
  nopl   0x0(%rax,%rax,1)
L108:
  mov    %r12d,%edx
  mov    %r14,%rdi
  mov    %rsi,(%rsp)
  mov    %ebx,%r15d
  mov    %r8b,0xf(%rsp)
  call   <_RLE_WriteNonRep@plt>
  movzbl 0xf(%rsp),%r9d
  mov    (%rsp),%rsi
  mov    $0x1,%eax
L42:
  cmp    %ebp,%r15d
  jb     L1
  cmp    $0x1,%eax
  je     L138
L176:
  mov    0x1c(%rsp),%eax
L87:
  mov    0x428(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L89
  add    $0x438,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L1:
  movzbl 0x0(%r13,%r15,1),%r8d
  lea    0x1(%r15),%ebx
  movzbl %r9b,%ecx
  cmp    %r8b,%r9b
  jne    L108
L28:
  cmp    %ebp,%ebx
  jae    L46
  mov    $0x2,%eax
  nopl   0x0(%rax,%rax,1)
L183:
  mov    %ebx,%edx
  add    $0x1,%ebx
  mov    %eax,%r8d
  add    $0x1,%eax
  movzbl 0x0(%r13,%rdx,1),%r10d
  mov    %rdx,%r15
  cmp    %ebx,%ebp
  jbe    L126
  cmp    %r10b,%r9b
  jne    L33
  cmp    $0x8000,%eax
  jne    L183
  mov    $0x8000,%r8d
  mov    %r12d,%edx
  mov    %r14,%rdi
  mov    %rsi,(%rsp)
  call   <_RLE_WriteRep@plt>
  mov    (%rsp),%rsi
L19:
  movzbl 0x0(%r13,%rbx,1),%r9d
  add    $0x2,%r15d
  mov    $0x1,%eax
  jmp    L42
L126:
  cmp    %r10b,%r9b
  je     L115
L33:
  mov    %r12d,%edx
  mov    %r14,%rdi
  mov    %rsi,(%rsp)
  mov    %ebx,%r15d
  mov    %r10b,0xf(%rsp)
  call   <_RLE_WriteRep@plt>
  movzbl 0xf(%rsp),%r9d
  mov    (%rsp),%rsi
  mov    $0x1,%eax
  jmp    L42
  nopl   0x0(%rax)
L138:
  movzbl %r9b,%ecx
  mov    %r12d,%edx
  mov    %r14,%rdi
  call   <_RLE_WriteNonRep@plt>
  jmp    L176
L115:
  mov    %eax,%r8d
  mov    %r12d,%edx
  mov    %r14,%rdi
  mov    %r9b,0xf(%rsp)
  mov    %rsi,(%rsp)
  call   <_RLE_WriteRep@plt>
  cmp    %ebx,%ebp
  mov    (%rsp),%rsi
  movzbl 0xf(%rsp),%r9d
  ja     L19
  mov    %ebx,%r15d
  xor    %eax,%eax
  jmp    L42
L46:
  mov    $0x2,%r8d
  mov    %r12d,%edx
  mov    %r14,%rdi
  mov    %rsi,(%rsp)
  mov    %r9b,0xf(%rsp)
  mov    %ebx,%r15d
  call   <_RLE_WriteRep@plt>
  mov    (%rsp),%rsi
  movzbl 0xf(%rsp),%r9d
  xor    %eax,%eax
  jmp    L42
L89:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int RLE_Compress(unsigned char *in, unsigned char *out, unsigned int insize) {
  unsigned char byte1, byte2, marker;
  unsigned int inpos, outpos, count, i, histogram[256];
  if (insize < 1) {
    return 0;
  }
  for (i = 0; i < 256; ++i) {
    histogram[i] = 0;
  }
  for (i = 0; i < insize; ++i) {
    ++histogram[in[i]];
  }
  marker = 0;
  for (i = 1; i < 256; ++i) {
    if (histogram[i] < histogram[marker]) {
      marker = i;
    }
  }
  out[0] = marker;
  outpos = 1;
  byte1 = in[0];
  inpos = 1;
  count = 1;
  if (insize >= 2) {
    byte2 = in[inpos++];
    count = 2;
    do {
      if (byte1 == byte2) {
        while ((inpos < insize) && (byte1 == byte2) && (count < 32768)) {
          byte2 = in[inpos++];
          ++count;
        }
        if (byte1 == byte2) {
          _RLE_WriteRep(out, &outpos, marker, byte1, count);
          if (inpos < insize) {
            byte1 = in[inpos++];
            count = 1;
          } else {
            count = 0;
          }
        } else {
          _RLE_WriteRep(out, &outpos, marker, byte1, count - 1);
          byte1 = byte2;
          count = 1;
        }
      } else {
        _RLE_WriteNonRep(out, &outpos, marker, byte1);
        byte1 = byte2;
        count = 1;
      }
      if (inpos < insize) {
        byte2 = in[inpos++];
        count = 2;
      }
    } while ((inpos < insize) || (count >= 2));
  }
  if (count == 1) {
    _RLE_WriteNonRep(out, &outpos, marker, byte1);
  }
  return outpos;
}
```