user: Translate the below assembly code into C programming language:

```asm
<compress>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  mov    %ecx,-0x28(%rbp)
  jmp    L107
L104:
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0xff,%eax
  je     L99
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L99
  mov    -0x28(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x28(%rbp)
  test   %eax,%eax
  jne    L1
  mov    $0x0,%eax
  call   <noroom@plt>
L1:
  mov    -0x18(%rbp),%rdx
  lea    0x4(%rdx),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x20(%rbp),%rax
  lea    0x4(%rax),%rcx
  mov    %rcx,-0x20(%rbp)
  mov    (%rdx),%edx
  mov    %edx,(%rax)
  subl   $0x1,-0x24(%rbp)
  jmp    L107
L99:
  cmpl   $0x1,-0x28(%rbp)
  jg     L48
  mov    $0x0,%eax
  call   <noroom@plt>
L48:
  mov    -0x18(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  mov    (%rax),%eax
  mov    %eax,-0x4(%rbp)
  subl   $0x1,-0x24(%rbp)
  movl   $0x0,-0x8(%rbp)
  jmp    L122
L147:
  addq   $0x4,-0x18(%rbp)
  addl   $0x1,-0x8(%rbp)
  subl   $0x1,-0x24(%rbp)
L122:
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4(%rbp)
  jne    L60
  cmpl   $0x0,-0x24(%rbp)
  jne    L147
L60:
  cmpl   $0xfd,-0x8(%rbp)
  jle    L69
  cmpl   $0x3,-0x28(%rbp)
  jg     L143
  mov    $0x0,%eax
  call   <noroom@plt>
L143:
  subl   $0x4,-0x28(%rbp)
  mov    -0x20(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  mov    -0x4(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x20(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movl   $0xfe,(%rax)
  mov    -0x20(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  mov    -0x8(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x20(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  mov    -0x8(%rbp),%edx
  sar    $0x8,%edx
  mov    %edx,(%rax)
  jmp    L107
L69:
  cmpl   $0x1,-0x28(%rbp)
  jg     L32
  mov    $0x0,%eax
  call   <noroom@plt>
L32:
  subl   $0x2,-0x28(%rbp)
  mov    -0x20(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  mov    -0x4(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x20(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  mov    -0x8(%rbp),%edx
  mov    %edx,(%rax)
L107:
  cmpl   $0x0,-0x24(%rbp)
  jne    L104
  cmpl   $0x1,-0x28(%rbp)
  jg     L133
  mov    $0x0,%eax
  call   <noroom@plt>
L133:
  subl   $0x2,-0x28(%rbp)
  mov    -0x20(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movl   $0xff,(%rax)
  mov    -0x20(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movl   $0xff,(%rax)
  mov    -0x28(%rbp),%eax
  leave
  ret
```

assistant: ```c
uint16_t compress(uint8_t *in, uint8_t *out, uint16_t ilen, uint16_t omax) {
  uint8_t c;
  uint16_t n;
  while (ilen) {
    if (*in != 0xFF && *in != 0x00) {
      if (omax-- == 0)
        noroom();
      *out++ = *in++;
      ilen--;
      continue;
    }
    if (omax < 2)
      noroom();
    c = *in++;
    ilen--;
    n = 0;
    while (*in == c && ilen) {
      in++;
      n++;
      ilen--;
    }
    if (n > 253) {
      if (omax < 4)
        noroom();
      omax -= 4;
      *out++ = c;
      *out++ = 254;
      *out++ = n;
      *out++ = n >> 8;
      continue;
    }
    if (omax < 2)
      noroom();
    omax -= 2;
    *out++ = c;
    *out++ = n;
  }
  if (omax < 2)
    noroom();
  omax -= 2;
  *out++ = 255;
  *out++ = 255;
  return omax;
}
```