user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<prefix_pton>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x28,%rsp
  mov    %rdx,-0x48(%rbp)
  mov    %rsp,%rcx
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  mov    D69(%rip),%rax
  movslq (%rax),%rax
  add    $0xf,%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L149
L21:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L21
L149:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L87
L99:
  mov    $0x2f,%esi
  mov    %r12,%rdi
  mov    %rsp,%r15
  call   <strchr@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L52
  lea    0x1(%rax),%r13
  mov    %r13,%rdi
  call   <strlen@plt>
  sub    $0x1,%rax
  cmp    $0x2,%rax
  ja     L217
  movzbl 0x1(%r14),%eax
  test   %al,%al
  je     L216
  mov    %r13,%rdx
  jmp    L29
  nopl   0x0(%rax)
L69:
  movzbl 0x1(%rdx),%eax
  add    $0x1,%rdx
  test   %al,%al
  je     L216
L29:
  sub    $0x30,%eax
  cmp    $0x9,%al
  jbe    L69
L217:
  xor    %eax,%eax
L14:
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L31
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  nopl   0x0(%rax,%rax,1)
L52:
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %rax,%r15
  mov    D69(%rip),%rax
  movslq (%rax),%rax
  cmp    %rax,%r15
  jae    L217
  mov    %r15,%rdx
  mov    %r12,%rsi
  mov    %rsp,%rdi
  call   <memcpy@plt>
  mov    -0x48(%rbp),%rax
  mov    %rbx,%rdx
  mov    %rsp,%rsi
  movb   $0x0,(%rsp,%r15,1)
  movl   $0x80,(%rax)
  mov    D5(%rip),%rax
  mov    (%rax),%edi
  call   <inet_pton@plt>
  cmp    $0x1,%eax
  je     L14
  mov    0x8(%rbx),%rax
  mov    %rsp,%rsi
  lea    0xc0(%rax),%rdx
  mov    D42(%rip),%rax
  mov    (%rax),%edi
  call   <inet_pton@plt>
  cmp    $0x1,%eax
  jne    L217
L124:
  mov    $0xa,%edx
  xor    %esi,%esi
  mov    %rbx,%rdi
  call   <memset@plt>
  mov    (%rbx),%rax
  movl   $0xffff,0x14(%rax)
  mov    $0x1,%eax
  jmp    L14
  nopl   0x0(%rax,%rax,1)
L216:
  mov    %r13,%rdi
  call   <atoi@plt>
  mov    %r14,%rcx
  mov    %eax,%r13d
  mov    D69(%rip),%rax
  sub    %r12,%rcx
  movslq (%rax),%rax
  cmp    %rax,%rcx
  jae    L217
  mov    %rcx,%rdx
  mov    %r12,%rsi
  mov    %r15,%rdi
  mov    %rcx,-0x50(%rbp)
  call   <memcpy@plt>
  mov    -0x50(%rbp),%rcx
  mov    %rbx,%rdx
  mov    %r15,%rsi
  mov    D5(%rip),%rax
  movb   $0x0,(%r15,%rcx,1)
  mov    (%rax),%edi
  call   <inet_pton@plt>
  cmp    $0x1,%eax
  jne    L123
  cmp    $0x80,%r13d
  jg     L217
  mov    -0x48(%rbp),%rsi
  mov    %r13d,(%rsi)
  jmp    L14
  nopl   0x0(%rax)
L87:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L99
  nopl   0x0(%rax,%rax,1)
L123:
  mov    0x8(%rbx),%rax
  mov    %r15,%rsi
  lea    0xc0(%rax),%rdx
  mov    D42(%rip),%rax
  mov    (%rax),%edi
  call   <inet_pton@plt>
  cmp    $0x1,%eax
  jne    L217
  mov    %r13d,%eax
  cmp    $0x20,%r13d
  jg     L217
  mov    -0x48(%rbp),%rsi
  add    $0x60,%eax
  mov    %eax,(%rsi)
  jmp    L124
L31:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int prefix_pton(const char *src, struct in6_addr *addr, uint8_t *plen) {
  char buf[INET6_ADDRSTRLEN];
  char *slash = strchr(src, '/'), *c;
  uint8_t parsed_len = 128;
  size_t addrlen;
  if (slash) {
    addrlen = strlen(slash + 1);
    if (!addrlen || addrlen > 3)
      return 0;
    for (c = slash + 1; *c; c++) {
      if (*c < '0' || *c > '9')
        return 0;
    }
    parsed_len = atoi(slash + 1);
    addrlen = slash - src;
  } else {
    addrlen = strlen(src);
  }
  if (addrlen >= INET6_ADDRSTRLEN)
    return 0;
  memcpy(buf, src, addrlen);
  buf[addrlen] = 0;
  if (!slash)
    *plen = 128;
  if (inet_pton(AF_INET6, buf, addr) == 1) {
    if (slash) {
      if (parsed_len > 128)
        return 0;
      *plen = parsed_len;
    }
  } else if (inet_pton(AF_INET, buf, &addr->s6_addr[12]) == 1) {
    if (slash) {
      if (parsed_len > 32)
        return 0;
      *plen = parsed_len + 96;
    }
    memset(addr, 0, 10);
    addr->s6_addr16[5] = 0xffff;
  } else {
    return 0;
  }
  return 1;
}
```