user: Demonstrate the C code that generates the assembly output below:

```asm
<compress>:
  endbr64
  push   %r15
  xor    %r15d,%r15d
  push   %r14
  lea    D15(%rip),%r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    $0xffffffff,%ebp
  push   %rbx
  sub    $0x28,%rsp
  mov    D16(%rip),%r13
  mov    %rsi,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
L156:
  mov    %r12,%rdi
  call   <getc@plt>
  mov    %eax,%ebx
  cmp    %eax,0x0(%r13)
  je     L132
L43:
  test   %ebx,%ebx
  jne    L83
  cmp    $0x1,%ebp
  je     L184
  test   %ebp,%ebp
  jne    L153
  test   %r15d,%r15d
  jne    L23
L153:
  mov    %r12,%rdi
  mov    $0x1,%ebp
  mov    $0x1,%r15d
  call   <getc@plt>
  mov    %eax,%ebx
  cmp    %eax,0x0(%r13)
  jne    L43
L132:
  test   %r15d,%r15d
  je     L219
  cmp    $0x1,%ebp
  je     L228
  test   %ebp,%ebp
  je     L89
L219:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L160
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L83:
  test   %ebp,%ebp
  jne    L33
  cmp    $0x7ffe,%r15d
  jg     L33
  movslq %r15d,%rax
  add    $0x1,%r15d
  mov    %bl,(%r14,%rax,1)
  jmp    L156
  nopl   (%rax)
L33:
  test   %r15d,%r15d
  je     L200
  cmp    $0x1,%ebp
  je     L47
  test   %ebp,%ebp
  je     L133
L200:
  mov    %bl,(%r14)
  xor    %ebp,%ebp
  mov    $0x1,%r15d
  jmp    L156
  nopw   0x0(%rax,%rax,1)
L184:
  add    $0x1,%r15d
  jmp    L156
  nopl   0x0(%rax)
L23:
  mov    0x8(%rsp),%rbx
  mov    %r15d,%eax
  lea    0x14(%rsp),%rdi
  mov    $0x1,%edx
  sar    $0x8,%eax
  mov    $0x2,%esi
  mov    %r15b,0x15(%rsp)
  mov    $0x1,%ebp
  and    $0x7f,%eax
  mov    %rbx,%rcx
  mov    %al,0x14(%rsp)
  call   <fwrite@plt>
  mov    %r15d,%esi
  mov    %rbx,%rcx
  mov    $0x1,%edx
  mov    %r14,%rdi
  mov    $0x1,%r15d
  call   <fwrite@plt>
  jmp    L156
  nopl   0x0(%rax)
L133:
  mov    0x8(%rsp),%rbp
  mov    %r15d,%eax
  lea    0x14(%rsp),%rdi
  mov    $0x1,%edx
  sar    $0x8,%eax
  mov    $0x2,%esi
  mov    %r15b,0x15(%rsp)
  and    $0x7f,%eax
  mov    %rbp,%rcx
  mov    %al,0x14(%rsp)
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x1,%edx
  mov    %r15d,%esi
  mov    %r14,%rdi
  call   <fwrite@plt>
  jmp    L200
  cs nopw 0x0(%rax,%rax,1)
L47:
  mov    %r15d,%eax
  mov    %r15d,%r8d
  mov    0x8(%rsp),%rcx
  lea    0x14(%rsp),%rdi
  shr    $0x18,%eax
  rol    $0x8,%r8w
  mov    $0x1,%edx
  mov    $0x4,%esi
  or     $0xffffff80,%eax
  mov    %r8w,0x16(%rsp)
  mov    %al,0x14(%rsp)
  mov    %r15d,%eax
  sar    $0x10,%eax
  mov    %al,0x15(%rsp)
  call   <fwrite@plt>
  jmp    L200
  nopl   0x0(%rax,%rax,1)
L89:
  mov    0x8(%rsp),%rbx
  mov    %r15d,%eax
  lea    0x14(%rsp),%rdi
  mov    $0x1,%edx
  sar    $0x8,%eax
  mov    $0x2,%esi
  mov    %r15b,0x15(%rsp)
  and    $0x7f,%eax
  mov    %rbx,%rcx
  mov    %al,0x14(%rsp)
  call   <fwrite@plt>
  mov    %rbx,%rcx
  mov    $0x1,%edx
  mov    %r15d,%esi
  lea    D15(%rip),%rdi
  call   <fwrite@plt>
  jmp    L219
  nopw   0x0(%rax,%rax,1)
L228:
  mov    %r15d,%eax
  mov    %r15d,%r8d
  mov    0x8(%rsp),%rcx
  lea    0x14(%rsp),%rdi
  shr    $0x18,%eax
  rol    $0x8,%r8w
  mov    $0x1,%edx
  mov    $0x4,%esi
  or     $0xffffff80,%eax
  mov    %r8w,0x16(%rsp)
  mov    %al,0x14(%rsp)
  mov    %r15d,%eax
  sar    $0x10,%eax
  mov    %al,0x15(%rsp)
  call   <fwrite@plt>
  jmp    L219
L160:
  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);
    }
  }
}
```