user: What is the c source code of the assembly code below:

```asm
<compress>:
  endbr64
  push   %r15
  mov    %rsi,%r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdx,0x8(%rsp)
  test   %rsi,%rsi
  je     L405
  movb   $0x54,(%rdi)
  cmp    $0x1,%rsi
  je     L113
  movb   $0x49,0x1(%rdi)
  cmp    $0x2,%rsi
  je     L183
  movb   $0x4e,0x2(%rdi)
  cmp    $0x3,%rsi
  je     L116
L290:
  movb   $0x59,0x3(%r14)
  mov    $0x4,%r9d
  xor    %ebx,%ebx
  lea    D39(%rip),%rbp
  test   %r12,%r12
  je     L325
  nop
L230:
  test   %rbx,%rbx
  je     L198
  mov    0x8(%rsp),%rax
  xor    %r13d,%r13d
  xor    %ecx,%ecx
  xor    %r10d,%r10d
  mov    %rax,%rsi
  lea    (%rax,%rbx,1),%rdi
  nopl   0x0(%rax)
L133:
  cmp    %rcx,%r12
  jbe    L38
  xor    %eax,%eax
  jmp    L263
  nopl   0x0(%rax)
L49:
  add    $0x1,%rax
  lea    (%rax,%rcx,1),%rdx
  cmp    %r12,%rdx
  jae    L303
L263:
  movzbl (%rdi,%rax,1),%edx
  cmp    %dl,(%rsi,%rax,1)
  je     L49
L303:
  cmp    %rax,%r13
  jae    L38
  mov    %rcx,%r10
  mov    %rax,%r13
L38:
  add    $0x1,%rcx
  add    $0x1,%rsi
  cmp    %rbx,%rcx
  jne    L133
  cmp    $0x3,%r13
  ja     L152
L198:
  cmp    %r9,%r15
  jbe    L248
L164:
  mov    0x8(%rsp),%rax
  movzbl (%rax,%rbx,1),%eax
  add    $0x1,%rbx
  mov    %al,(%r14,%r9,1)
  add    $0x1,%r9
L324:
  cmp    %r12,%rbx
  jb     L230
  lea    0x1(%r9),%rbp
  lea    0x2(%r9),%rbx
  lea    0x3(%r9),%r12
L315:
  cmp    %r9,%r15
  jbe    L82
L212:
  movb   $0xff,(%r14,%r9,1)
  cmp    %rbp,%r15
  jbe    L66
L4:
  movb   $0x0,(%r14,%rbp,1)
  cmp    %rbx,%r15
  jbe    L225
L297:
  movb   $0x0,(%r14,%rbx,1)
  add    $0x28,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L152:
  mov    %rbx,%rcx
  add    %r13,%rbx
  sub    %r10,%rcx
  cmp    %r9,%r15
  jbe    L256
L233:
  movb   $0xff,(%r14,%r9,1)
  lea    0x1(%r9),%rdx
  jmp    L320
L265:
  cmp    %r15,%rdx
  jae    L126
L409:
  mov    %ecx,%eax
  shr    $0x7,%rcx
  or     $0xffffff80,%eax
  mov    %al,(%r14,%rdx,1)
  add    $0x1,%rdx
L320:
  cmp    $0x7f,%rcx
  ja     L265
  cmp    %r15,%rdx
  jae    L150
L332:
  mov    %cl,(%r14,%rdx,1)
  lea    0x1(%rdx),%rsi
  cmp    $0x7f,%r13
  jbe    L138
L26:
  cmp    %r15,%rsi
  jae    L260
L170:
  mov    %r13d,%eax
  add    $0x1,%rsi
  shr    $0x7,%r13
  or     $0xffffff80,%eax
  mov    %al,-0x1(%r14,%rsi,1)
  cmp    $0x7f,%r13
  ja     L26
L138:
  cmp    %r15,%rsi
  jae    L58
L292:
  mov    %r13b,(%r14,%rsi,1)
  lea    0x1(%rsi),%r9
  jmp    L324
L150:
  mov    %rbp,%rdi
  mov    %rdx,0x18(%rsp)
  mov    %rcx,0x10(%rsp)
  call   <error@plt>
  mov    0x18(%rsp),%rdx
  mov    0x10(%rsp),%rcx
  jmp    L332
L58:
  mov    %rbp,%rdi
  mov    %rsi,0x10(%rsp)
  call   <error@plt>
  mov    0x10(%rsp),%rsi
  jmp    L292
L126:
  mov    %rbp,%rdi
  mov    %rdx,0x18(%rsp)
  mov    %rcx,0x10(%rsp)
  call   <error@plt>
  mov    0x18(%rsp),%rdx
  mov    0x10(%rsp),%rcx
  jmp    L409
L260:
  mov    %rbp,%rdi
  mov    %rsi,0x10(%rsp)
  call   <error@plt>
  mov    0x10(%rsp),%rsi
  jmp    L170
L248:
  mov    %rbp,%rdi
  mov    %r9,0x10(%rsp)
  call   <error@plt>
  mov    0x10(%rsp),%r9
  jmp    L164
L256:
  mov    %rbp,%rdi
  mov    %rcx,0x18(%rsp)
  mov    %r9,0x10(%rsp)
  call   <error@plt>
  mov    0x18(%rsp),%rcx
  mov    0x10(%rsp),%r9
  jmp    L233
L405:
  lea    D39(%rip),%rbp
  mov    %rbp,%rdi
  call   <error@plt>
  movb   $0x54,(%r14)
L269:
  mov    %rbp,%rdi
  call   <error@plt>
  movb   $0x49,0x1(%r14)
L77:
  mov    %rbp,%rdi
  call   <error@plt>
  movb   $0x4e,0x2(%r14)
L165:
  mov    %rbp,%rdi
  call   <error@plt>
  jmp    L290
L225:
  lea    D39(%rip),%rdi
  call   <error@plt>
  jmp    L297
L66:
  lea    D39(%rip),%rdi
  call   <error@plt>
  jmp    L4
L82:
  lea    D39(%rip),%rdi
  mov    %r9,0x8(%rsp)
  call   <error@plt>
  mov    0x8(%rsp),%r9
  jmp    L212
L325:
  mov    $0x7,%r12d
  mov    $0x6,%ebx
  mov    $0x5,%ebp
  jmp    L315
L183:
  lea    D39(%rip),%rbp
  jmp    L77
L113:
  lea    D39(%rip),%rbp
  jmp    L269
L116:
  lea    D39(%rip),%rbp
  jmp    L165
```

tool_calls: name: parse_data
arguments: data_label: D39
type_guessed: string

tool: D39: destination overflow

assistant: ```c
size_t compress(char *dst, size_t dst_sz, char *src, size_t src_sz) {
  size_t dst_pos = 0;
  size_t src_pos = 0;
  do {
    if (dst_pos >= dst_sz) {
      error("destination overflow");
    }
    dst[dst_pos++] = ('T');
  } while (0);
  do {
    if (dst_pos >= dst_sz) {
      error("destination overflow");
    }
    dst[dst_pos++] = ('I');
  } while (0);
  do {
    if (dst_pos >= dst_sz) {
      error("destination overflow");
    }
    dst[dst_pos++] = ('N');
  } while (0);
  do {
    if (dst_pos >= dst_sz) {
      error("destination overflow");
    }
    dst[dst_pos++] = ('Y');
  } while (0);
  while (src_pos < src_sz) {
    size_t best_len = 0;
    size_t best_start = 0;
    for (size_t start = 0; start < src_pos; start++) {
      size_t len = 0;
      while (1) {
        if (start + len >= src_sz)
          break;
        if (src[start + len] != src[src_pos + len])
          break;
        len++;
      }
      if (len > best_len) {
        best_len = len;
        best_start = start;
      }
    }
    if (best_len > 3) {
      size_t delta = src_pos - best_start;
      src_pos += best_len;
      do {
        if (dst_pos >= dst_sz) {
          error("destination overflow");
        }
        dst[dst_pos++] = (0xff);
      } while (0);
      do {
        size_t tmp = (delta);
        do {
          if (tmp >= 128) {
            do {
              if (dst_pos >= dst_sz) {
                error("destination overflow");
              }
              dst[dst_pos++] = (128 | (tmp & 0x7f));
            } while (0);
          } else {
            do {
              if (dst_pos >= dst_sz) {
                error("destination overflow");
              }
              dst[dst_pos++] = (tmp & 0x7f);
            } while (0);
          }
          tmp >>= 7;
        } while (tmp > 0);
      } while (0);
      do {
        size_t tmp = (best_len);
        do {
          if (tmp >= 128) {
            do {
              if (dst_pos >= dst_sz) {
                error("destination overflow");
              }
              dst[dst_pos++] = (128 | (tmp & 0x7f));
            } while (0);
          } else {
            do {
              if (dst_pos >= dst_sz) {
                error("destination overflow");
              }
              dst[dst_pos++] = (tmp & 0x7f);
            } while (0);
          }
          tmp >>= 7;
        } while (tmp > 0);
      } while (0);
    } else {
      do {
        if (dst_pos >= dst_sz) {
          error("destination overflow");
        }
        dst[dst_pos++] = (src[src_pos]);
      } while (0);
      if (src[src_pos] == 0xff) {
        do {
          size_t tmp = (0);
          do {
            if (tmp >= 128) {
              do {
                if (dst_pos >= dst_sz) {
                  error("destination overflow");
                }
                dst[dst_pos++] = (128 | (tmp & 0x7f));
              } while (0);
            } else {
              do {
                if (dst_pos >= dst_sz) {
                  error("destination overflow");
                }
                dst[dst_pos++] = (tmp & 0x7f);
              } while (0);
            }
            tmp >>= 7;
          } while (tmp > 0);
        } while (0);
        do {
          size_t tmp = (1);
          do {
            if (tmp >= 128) {
              do {
                if (dst_pos >= dst_sz) {
                  error("destination overflow");
                }
                dst[dst_pos++] = (128 | (tmp & 0x7f));
              } while (0);
            } else {
              do {
                if (dst_pos >= dst_sz) {
                  error("destination overflow");
                }
                dst[dst_pos++] = (tmp & 0x7f);
              } while (0);
            }
            tmp >>= 7;
          } while (tmp > 0);
        } while (0);
      }
      src_pos++;
    }
  }
  do {
    if (dst_pos >= dst_sz) {
      error("destination overflow");
    }
    dst[dst_pos++] = (0xff);
  } while (0);
  do {
    size_t tmp = (0);
    do {
      if (tmp >= 128) {
        do {
          if (dst_pos >= dst_sz) {
            error("destination overflow");
          }
          dst[dst_pos++] = (128 | (tmp & 0x7f));
        } while (0);
      } else {
        do {
          if (dst_pos >= dst_sz) {
            error("destination overflow");
          }
          dst[dst_pos++] = (tmp & 0x7f);
        } while (0);
      }
      tmp >>= 7;
    } while (tmp > 0);
  } while (0);
  do {
    size_t tmp = (0);
    do {
      if (tmp >= 128) {
        do {
          if (dst_pos >= dst_sz) {
            error("destination overflow");
          }
          dst[dst_pos++] = (128 | (tmp & 0x7f));
        } while (0);
      } else {
        do {
          if (dst_pos >= dst_sz) {
            error("destination overflow");
          }
          dst[dst_pos++] = (tmp & 0x7f);
        } while (0);
      }
      tmp >>= 7;
    } while (tmp > 0);
  } while (0);
  return dst_pos;
}
```