user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<packline>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %edx,-0x54(%rbp)
  mov    %ecx,-0x58(%rbp)
  mov    %r8d,-0x5c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x50(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x50(%rbp)
  mov    %rax,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  movb   $0x0,(%rax)
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <intobyte@plt>
  jmp    L33
L32:
  mov    -0x48(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x35(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  add    %rax,-0x48(%rbp)
  subl   $0x1,-0x54(%rbp)
  movl   $0x0,-0x34(%rbp)
  mov    -0x48(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,-0x35(%rbp)
  jne    L13
  cmpl   $0x0,-0x54(%rbp)
  je     L13
L42:
  addl   $0x1,-0x34(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  add    %rax,-0x48(%rbp)
  subl   $0x1,-0x54(%rbp)
  mov    -0x48(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,-0x35(%rbp)
  jne    L111
  cmpl   $0x0,-0x54(%rbp)
  je     L111
  cmpl   $0xf,-0x34(%rbp)
  jne    L42
L111:
  mov    -0x50(%rbp),%rdx
  mov    -0x34(%rbp),%eax
  mov    %eax,%esi
  mov    $0x5,%edi
  call   <intobyte@plt>
  mov    %rax,-0x50(%rbp)
  movzbl -0x35(%rbp),%ecx
  mov    -0x50(%rbp),%rdx
  mov    -0x58(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <intobyte@plt>
  mov    %rax,-0x50(%rbp)
  jmp    L33
L13:
  lea    -0x20(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  jmp    L80
L158:
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x30(%rbp)
  movzbl -0x35(%rbp),%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x34(%rbp)
  mov    -0x48(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x35(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  add    %rax,-0x48(%rbp)
  subl   $0x1,-0x54(%rbp)
L80:
  mov    -0x48(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,-0x35(%rbp)
  je     L131
  cmpl   $0x0,-0x54(%rbp)
  je     L131
  cmpl   $0xf,-0x34(%rbp)
  jne    L158
L131:
  cmpl   $0x0,-0x54(%rbp)
  je     L39
  cmpl   $0xf,-0x34(%rbp)
  jne    L174
L39:
  mov    -0x30(%rbp),%rax
  movzbl -0x35(%rbp),%edx
  mov    %dl,(%rax)
  jmp    L85
L174:
  mov    -0x48(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,-0x35(%rbp)
  jne    L85
  subl   $0x1,-0x34(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  neg    %rax
  add    %rax,-0x48(%rbp)
  addl   $0x1,-0x54(%rbp)
L85:
  mov    -0x34(%rbp),%eax
  or     $0x10,%eax
  mov    %eax,%ecx
  mov    -0x50(%rbp),%rax
  mov    %rax,%rdx
  mov    %ecx,%esi
  mov    $0x5,%edi
  call   <intobyte@plt>
  mov    %rax,-0x50(%rbp)
  lea    -0x20(%rbp),%rax
  mov    %rax,-0x30(%rbp)
L160:
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x30(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%ecx
  mov    -0x50(%rbp),%rdx
  mov    -0x58(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <intobyte@plt>
  mov    %rax,-0x50(%rbp)
  subl   $0x1,-0x34(%rbp)
  cmpl   $0x0,-0x34(%rbp)
  jns    L160
L33:
  cmpl   $0x0,-0x54(%rbp)
  jne    L32
  mov    -0x50(%rbp),%rax
  mov    %rax,%rdx
  mov    $0x0,%esi
  mov    $0x8,%edi
  call   <intobyte@plt>
  mov    %rax,-0x50(%rbp)
  mov    -0x50(%rbp),%rax
  sub    -0x28(%rbp),%rax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x50(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L3
  call   <__stack_chk_fail@plt>
L3:
  leave
  ret
```

assistant: ```c
unsigned char *packline(unsigned char *in, unsigned char *out, int len, int size, int dir) {
  unsigned char differ[16], *d_ptr, *out0, last;
  int counter;
  out0 = out++;
  *out0 = 0;
  intobyte(0, 0, 0);
  while (len) {
    last = *in;
    in += dir;
    --len;
    counter = 0;
    if ((last == *in) && len) {
      do {
        ++counter;
        in += dir;
        --len;
      } while (last == *in && len && counter != 15);
      out = intobyte(5, counter, out);
      out = intobyte(size, last, out);
    } else {
      d_ptr = differ;
      while (last != *in && len && counter != 15) {
        *d_ptr++ = last;
        ++counter;
        last = *in;
        in += dir;
        --len;
      }
      if (!len || counter == 15)
        *d_ptr = last;
      else if (last == *in) {
        --counter;
        in -= dir;
        ++len;
      }
      out = intobyte(5, counter | 0x10, out);
      d_ptr = differ;
      do {
        out = intobyte(size, *d_ptr++, out);
      } while (--counter >= 0);
    }
  }
  out = intobyte(8, 0, out);
  *out0 = out - out0;
  return out;
}
```