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

```asm
<compress>:
  endbr64
  push   %r15
  mov    $0xffffffff,%r15d
  push   %r14
  lea    D21(%rip),%r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
  sub    $0x28,%rsp
  mov    D18(%rip),%r13
  mov    %rsi,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
L128:
  mov    %r12,%rdi
  call   <getc@plt>
  mov    %eax,%ebx
  cmp    %eax,0x0(%r13)
  je     L31
L37:
  test   %ebx,%ebx
  jne    L88
  cmp    $0x1,%r15d
  je     L180
  test   %r15d,%r15d
  jne    L165
  test   %ebp,%ebp
  jne    L158
L165:
  mov    %r12,%rdi
  mov    $0x1,%r15d
  mov    $0x1,%ebp
  call   <getc@plt>
  mov    %eax,%ebx
  cmp    %eax,0x0(%r13)
  jne    L37
L31:
  test   %ebp,%ebp
  je     L78
  cmp    $0x1,%r15d
  je     L99
  test   %r15d,%r15d
  je     L206
L78:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L27
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L88:
  test   %r15d,%r15d
  jne    L201
  cmp    $0x7ffe,%ebp
  jg     L201
  movslq %ebp,%rax
  add    $0x1,%ebp
  mov    %bl,(%r14,%rax,1)
  jmp    L128
  nopl   0x0(%rax)
L201:
  test   %ebp,%ebp
  je     L183
  cmp    $0x1,%r15d
  je     L169
  test   %r15d,%r15d
  je     L154
L183:
  mov    %bl,(%r14)
  xor    %r15d,%r15d
  mov    $0x1,%ebp
  jmp    L128
  nopl   0x0(%rax,%rax,1)
L180:
  add    $0x1,%ebp
  jmp    L128
L158:
  mov    %ebp,%edx
  mov    0x8(%rsp),%rbx
  xor    %eax,%eax
  mov    %ebp,%ecx
  sar    $0x8,%edx
  lea    0x14(%rsp),%rdi
  mov    $0x2,%esi
  mov    $0x1,%r15d
  and    $0x7f,%edx
  mov    %dl,%al
  mov    $0x1,%edx
  mov    %cl,%ah
  mov    %rbx,%rcx
  mov    %ax,0x14(%rsp)
  call   <fwrite@plt>
  mov    %ebp,%esi
  mov    %rbx,%rcx
  mov    $0x1,%edx
  mov    %r14,%rdi
  mov    $0x1,%ebp
  call   <fwrite@plt>
  jmp    L128
  nopl   0x0(%rax,%rax,1)
L154:
  mov    %ebp,%edx
  mov    0x8(%rsp),%r15
  xor    %eax,%eax
  mov    %ebp,%ecx
  sar    $0x8,%edx
  lea    0x14(%rsp),%rdi
  mov    $0x2,%esi
  and    $0x7f,%edx
  mov    %dl,%al
  mov    $0x1,%edx
  mov    %cl,%ah
  mov    %r15,%rcx
  mov    %ax,0x14(%rsp)
  call   <fwrite@plt>
  mov    %r15,%rcx
  mov    $0x1,%edx
  mov    %ebp,%esi
  mov    %r14,%rdi
  call   <fwrite@plt>
  jmp    L183
L169:
  mov    %ebp,%edx
  xor    %eax,%eax
  mov    %ebp,%ecx
  mov    $0x4,%esi
  shr    $0x18,%edx
  lea    0x14(%rsp),%rdi
  or     $0xffffff80,%edx
  mov    %dl,%al
  mov    %ebp,%edx
  shl    $0x18,%ebp
  sar    $0x10,%edx
  mov    %dl,%ah
  movzbl %ch,%edx
  mov    0x8(%rsp),%rcx
  shl    $0x10,%edx
  movzwl %ax,%eax
  or     %edx,%eax
  mov    $0x1,%edx
  or     %eax,%ebp
  mov    %ebp,0x14(%rsp)
  call   <fwrite@plt>
  jmp    L183
  nopw   0x0(%rax,%rax,1)
L206:
  mov    %ebp,%edx
  mov    0x8(%rsp),%rbx
  xor    %eax,%eax
  mov    %ebp,%ecx
  sar    $0x8,%edx
  lea    0x14(%rsp),%rdi
  mov    $0x2,%esi
  and    $0x7f,%edx
  mov    %dl,%al
  mov    $0x1,%edx
  mov    %cl,%ah
  mov    %rbx,%rcx
  mov    %ax,0x14(%rsp)
  call   <fwrite@plt>
  mov    %rbx,%rcx
  mov    $0x1,%edx
  mov    %ebp,%esi
  lea    D21(%rip),%rdi
  call   <fwrite@plt>
  jmp    L78
  nopl   0x0(%rax)
L99:
  mov    %ebp,%edx
  xor    %eax,%eax
  mov    %ebp,%ecx
  mov    $0x4,%esi
  shr    $0x18,%edx
  lea    0x14(%rsp),%rdi
  or     $0xffffff80,%edx
  mov    %dl,%al
  mov    %ebp,%edx
  shl    $0x18,%ebp
  sar    $0x10,%edx
  mov    %dl,%ah
  movzbl %ch,%edx
  mov    0x8(%rsp),%rcx
  shl    $0x10,%edx
  movzwl %ax,%eax
  or     %edx,%eax
  mov    $0x1,%edx
  or     %eax,%ebp
  mov    %ebp,0x14(%rsp)
  call   <fwrite@plt>
  jmp    L78
L27:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void compress(FILE *in, FILE *out) {
  static unsigned char data_buf[65526];
  unsigned char number_buf[4];
  int count = 0;
  int zero_mode = -1;
  int input;
  while ((input = getc(in)) != EOF) {
    if (input == 0) {
      if (zero_mode == 1) {
        count++;
      } else {
        if (count > 0) {
          if (zero_mode == 1) {
            number_buf[0] = ((count >> 24) & 0x7f) | 0x80;
            number_buf[1] = (count >> 16) & 0xff;
            number_buf[2] = (count >> 8) & 0xff;
            number_buf[3] = count & 0xff;
            fwrite(number_buf, 4, 1, out);
          } else if (zero_mode == 0) {
            number_buf[0] = (count >> 8) & 0x7f;
            number_buf[1] = count & 0xff;
            fwrite(number_buf, 2, 1, out);
            fwrite(data_buf, count, 1, out);
          }
        }
        zero_mode = 1;
        count = 1;
      }
    } else {
      if (zero_mode == 0 && count < 0x7fff) {
        data_buf[count++] = input;
      } else {
        if (count > 0) {
          if (zero_mode == 1) {
            number_buf[0] = ((count >> 24) & 0x7f) | 0x80;
            number_buf[1] = (count >> 16) & 0xff;
            number_buf[2] = (count >> 8) & 0xff;
            number_buf[3] = count & 0xff;
            fwrite(number_buf, 4, 1, out);
          } else if (zero_mode == 0) {
            number_buf[0] = (count >> 8) & 0x7f;
            number_buf[1] = count & 0xff;
            fwrite(number_buf, 2, 1, out);
            fwrite(data_buf, count, 1, out);
          }
        }
        zero_mode = 0;
        data_buf[0] = input;
        count = 1;
      }
    }
  }
  if (count > 0) {
    if (zero_mode == 1) {
      number_buf[0] = ((count >> 24) & 0x7f) | 0x80;
      number_buf[1] = (count >> 16) & 0xff;
      number_buf[2] = (count >> 8) & 0xff;
      number_buf[3] = count & 0xff;
      fwrite(number_buf, 4, 1, out);
    } else if (zero_mode == 0) {
      number_buf[0] = (count >> 8) & 0x7f;
      number_buf[1] = count & 0xff;
      fwrite(number_buf, 2, 1, out);
      fwrite(data_buf, count, 1, out);
    }
  }
}
```