user: 请从给定的汇编指令推导出C源代码：

```asm
<prefix_pton>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %rdx,-0x68(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    D32(%rip),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x30(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  movslq %eax,%rdx
  mov    %rdx,%r8
  mov    $0x0,%r9d
  cltq
  mov    $0x10,%edx
  sub    $0x1,%rdx
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L259:
  cmp    %rdx,%rsp
  je     L62
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L259
L62:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L138
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L138:
  mov    %rsp,%rax
  add    $0x0,%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x58(%rbp),%rax
  mov    $0x2f,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x20(%rbp)
  movl   $0x80,-0x44(%rbp)
  cmpq   $0x0,-0x20(%rbp)
  je     L87
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,-0x38(%rbp)
  cmpq   $0x0,-0x38(%rbp)
  je     L203
  cmpq   $0x3,-0x38(%rbp)
  jbe    L141
L203:
  mov    $0x0,%eax
  jmp    L279
L141:
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x40(%rbp)
  jmp    L220
L44:
  mov    -0x40(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jle    L119
  mov    -0x40(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jle    L108
L119:
  mov    $0x0,%eax
  jmp    L279
L108:
  addq   $0x1,-0x40(%rbp)
L220:
  mov    -0x40(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L44
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x44(%rbp)
  mov    -0x20(%rbp),%rax
  sub    -0x58(%rbp),%rax
  mov    %rax,-0x38(%rbp)
  jmp    L177
L87:
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,-0x38(%rbp)
L177:
  mov    D32(%rip),%rax
  mov    (%rax),%eax
  cltq
  cmp    %rax,-0x38(%rbp)
  jb     L41
  mov    $0x0,%eax
  jmp    L279
L41:
  mov    -0x38(%rbp),%rdx
  mov    -0x58(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x28(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  cmpq   $0x0,-0x20(%rbp)
  jne    L260
  mov    -0x68(%rbp),%rax
  movl   $0x80,(%rax)
L260:
  mov    D38(%rip),%rax
  mov    (%rax),%eax
  mov    -0x60(%rbp),%rdx
  mov    -0x28(%rbp),%rcx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <inet_pton@plt>
  cmp    $0x1,%eax
  jne    L188
  cmpq   $0x0,-0x20(%rbp)
  je     L278
  cmpl   $0x80,-0x44(%rbp)
  jle    L199
  mov    $0x0,%eax
  jmp    L279
L199:
  mov    -0x68(%rbp),%rax
  mov    -0x44(%rbp),%edx
  mov    %edx,(%rax)
  jmp    L278
L188:
  mov    -0x60(%rbp),%rax
  mov    0x8(%rax),%rax
  lea    0xc0(%rax),%rdx
  mov    D28(%rip),%rax
  mov    (%rax),%eax
  mov    -0x28(%rbp),%rcx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <inet_pton@plt>
  cmp    $0x1,%eax
  jne    L265
  cmpq   $0x0,-0x20(%rbp)
  je     L86
  cmpl   $0x20,-0x44(%rbp)
  jle    L12
  mov    $0x0,%eax
  jmp    L279
L12:
  mov    -0x44(%rbp),%eax
  lea    0x60(%rax),%edx
  mov    -0x68(%rbp),%rax
  mov    %edx,(%rax)
L86:
  mov    -0x60(%rbp),%rax
  mov    $0xa,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x60(%rbp),%rax
  mov    (%rax),%rax
  add    $0x14,%rax
  movl   $0xffff,(%rax)
  jmp    L278
L265:
  mov    $0x0,%eax
  jmp    L279
L278:
  mov    $0x1,%eax
L279:
  mov    %rbx,%rsp
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L237
  call   <__stack_chk_fail@plt>
L237:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

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;
}
```