user: 这段汇编代码用C语言表示是什么样的:

```asm
<nextpkg>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    (%rdx),%rbx
  mov    (%rcx),%r10d
  movl   $0x0,(%rdi)
  test   %r10d,%r10d
  je     L137
  mov    %rsi,%r11
  mov    %rdx,%r8
  mov    %rcx,%rsi
  movzbl (%rbx),%r9d
  lea    -0x1(%r10),%eax
  test   %eax,%eax
  jle    L138
  test   %r9b,%r9b
  jns    L138
  test   $0x40,%r9b
  jne    L51
  mov    %r9d,%ecx
  and    $0x3,%ecx
  mov    %r9d,%edx
  and    $0x3,%edx
  cmp    $0x3,%edx
  je     L19
  mov    $0x1,%ebp
  shl    %cl,%ebp
  cmp    %ebp,%eax
  jl     L225
  lea    0x1(%rbx),%r12
  lea    0x1(%rbp),%eax
  add    %rax,%rbx
  mov    %r12,%rdx
  mov    $0x0,%eax
L68:
  shl    $0x8,%eax
  add    $0x1,%rdx
  movzbl -0x1(%rdx),%ecx
  or     %ecx,%eax
  cmp    %rbx,%rdx
  jne    L68
  mov    %ebp,%edx
  add    %r12,%rdx
  not    %ebp
  lea    0x0(%rbp,%r10,1),%ecx
  shr    $0x2,%r9d
  and    $0xf,%r9d
L220:
  cmp    %ecx,%eax
  jg     L149
  movslq %eax,%r10
  add    %rdx,%r10
  mov    %r10,(%r8)
  sub    %eax,%ecx
  mov    %ecx,(%rsi)
  mov    %eax,(%r11)
  mov    %r9d,(%rdi)
L215:
  mov    %rdx,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L51:
  and    $0x3f,%r9d
  movzbl 0x1(%rbx),%edx
  movzbl %dl,%eax
  lea    -0x2(%r10),%ecx
  cmp    $0xbf,%eax
  jg     L116
  lea    0x2(%rbx),%rdx
  jmp    L220
L116:
  movzbl %dl,%edx
  sub    $0xc0,%edx
  cmp    $0x1f,%edx
  ja     L84
  test   %ecx,%ecx
  jle    L4
  lea    0x3(%rbx),%rdx
  sub    $0xc0,%eax
  shl    $0x8,%eax
  movzbl 0x2(%rbx),%ecx
  lea    0xc0(%rax,%rcx,1),%eax
  lea    -0x3(%r10),%ecx
  jmp    L220
L84:
  cmp    $0x4,%ecx
  jle    L202
  cmp    $0xff,%eax
  jne    L202
  movzbl 0x2(%rbx),%eax
  shl    $0x18,%eax
  movzbl 0x3(%rbx),%edx
  shl    $0x10,%edx
  or     %edx,%eax
  movzbl 0x5(%rbx),%edx
  or     %edx,%eax
  movzbl 0x4(%rbx),%edx
  shl    $0x8,%edx
  or     %edx,%eax
  lea    0x6(%rbx),%rdx
  lea    -0x6(%r10),%ecx
  jmp    L220
L137:
  mov    $0x0,%edx
  jmp    L215
L138:
  mov    $0x0,%edx
  jmp    L215
L19:
  mov    $0x0,%edx
  jmp    L215
L225:
  mov    $0x0,%edx
  jmp    L215
L4:
  mov    $0x0,%edx
  jmp    L215
L202:
  mov    $0x0,%edx
  jmp    L215
L149:
  mov    $0x0,%edx
  jmp    L215
```

assistant: ```c
unsigned char *nextpkg(int *tagp, int *pkgl, unsigned char **pp, int *ppl) {
  int x, l;
  unsigned char *p = *pp;
  int pl = *ppl;
  int tag;
  *tagp = 0;
  if (!pl)
    return 0;
  x = *p++;
  pl--;
  if (!(x & 128) || pl <= 0)
    return 0;
  if ((x & 64) == 0) {
    tag = (x & 0x3c) >> 2;
    x &= 3;
    if (x == 3)
      return 0;
    l = 1 << x;
    if (pl < l)
      return 0;
    x = 0;
    while (l--) {
      x = x << 8 | *p++;
      pl--;
    }
    l = x;
  } else {
    tag = (x & 0x3f);
    x = *p++;
    pl--;
    if (x < 192)
      l = x;
    else if (x >= 192 && x < 224) {
      if (pl <= 0)
        return 0;
      l = ((x - 192) << 8) + *p++ + 192;
      pl--;
    } else if (x == 255) {
      if (pl <= 4)
        return 0;
      l = p[0] << 24 | p[1] << 16 | p[2] << 8 | p[3];
      p += 4;
      pl -= 4;
    } else
      return 0;
  }
  if (pl < l)
    return 0;
  *pp = p + l;
  *ppl = pl - l;
  *pkgl = l;
  *tagp = tag;
  return p;
}
```