user: 下面的汇编指令对应的C源代码是什么:

```asm
<scan_ip6>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  mov    %rsi,%rax
  lea    0x10(%rsi),%rdx
L91:
  movb   $0x0,(%rax)
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L91
  mov    $0x0,%r12d
  mov    $0x2,%r14d
  mov    $0x0,%r13d
  lea    0x28(%rsp),%rax
  mov    %rax,0x8(%rsp)
  jmp    L16
L214:
  add    $0x2,%rbx
  add    $0x2,%r13d
  lea    0x30(%rsp),%r14
  mov    $0x0,%r12d
  lea    0x28(%rsp),%rax
  mov    %rax,0x8(%rsp)
L247:
  cmpb   $0x3a,(%rbx)
  je     L29
  test   %r12d,%r12d
  jne    L190
L230:
  mov    $0x10,%edx
  mov    0x8(%rsp),%rsi
  mov    %rbx,%rdi
  call   <strtol@plt>
  mov    %rax,0x18(%rsp)
  mov    0x28(%rsp),%rax
  mov    %rax,%rdi
  sub    %rbx,%rdi
  mov    %rdi,0x10(%rsp)
  cmp    %ebx,%eax
  je     L112
  lea    (%r15,%r12,1),%eax
  cmp    $0xc,%eax
  ja     L135
  mov    0x10(%rsp),%eax
  cmpb   $0x2e,(%rbx,%rax,1)
  je     L64
L135:
  mov    0x18(%rsp),%rax
  movzbl %ah,%ecx
  mov    %cl,(%r14)
  add    $0x2,%r12d
  mov    %al,0x1(%r14)
  mov    0x10(%rsp),%rdi
  mov    %edi,%eax
  add    %rax,%rbx
  add    %edi,%r13d
  add    $0x2,%r14
  lea    (%r15,%r12,1),%eax
  cmp    $0x10,%eax
  jne    L247
  jmp    L98
L200:
  mov    $0x10,%edx
  mov    0x8(%rsp),%rsi
  mov    %rbx,%rdi
  call   <strtoul@plt>
  mov    0x28(%rsp),%rdx
  sub    %rbx,%rdx
  mov    %edx,0x10(%rsp)
  test   %edx,%edx
  je     L268
  cmp    $0xc,%r15d
  je     L84
  movzbl %ah,%ecx
  mov    %cl,0x0(%rbp,%r12,1)
  mov    %al,0x1(%rbp,%r12,1)
  mov    %edx,%eax
  add    %rax,%rbx
  add    %edx,%r13d
  cmp    $0x10,%r14d
  je     L85
L129:
  add    $0x2,%r14d
  add    $0x2,%r12
L16:
  mov    %r12d,%r15d
  cmpb   $0x3a,(%rbx)
  jne    L200
  cmpb   $0x3a,0x1(%rbx)
  je     L214
  add    $0x1,%r13d
  add    $0x1,%rbx
  jmp    L200
L84:
  mov    %edx,%ecx
  add    %rbx,%rcx
  cmpb   $0x2e,(%rcx)
  je     L245
  movzbl %ah,%ebx
  mov    %bl,0x0(%rbp,%r12,1)
  mov    %al,0x1(%rbp,%r12,1)
  add    %edx,%r13d
  mov    %rcx,%rbx
  jmp    L129
L245:
  lea    0xc(%rbp),%rsi
  mov    %rbx,%rdi
  call   <inet_aton@plt>
  add    0x10(%rsp),%r13d
  test   %rax,%rax
  mov    $0x0,%eax
  cmove  %eax,%r13d
  jmp    L85
L29:
  test   %r12d,%r12d
  je     L85
  add    $0x1,%rbx
  add    $0x1,%r13d
  jmp    L230
L112:
  cmpb   $0x1,(%rbx)
  adc    $0xffffffff,%r13d
L98:
  test   %r12d,%r12d
  je     L85
L190:
  mov    $0x0,%eax
  mov    $0x10,%esi
  sub    %r12d,%esi
L4:
  lea    (%rsi,%rax,1),%edx
  movzbl 0x30(%rsp,%rax,1),%ecx
  mov    %cl,0x0(%rbp,%rdx,1)
  add    $0x1,%rax
  cmp    %eax,%r12d
  ja     L4
L85:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L121
  mov    %r13d,%eax
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L64:
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <inet_aton@plt>
  test   %rax,%rax
  jne    L8
  mov    $0xc,%r15d
  sub    %r12d,%r15d
  jmp    L135
L8:
  add    $0x4,%r12d
  mov    %rbx,%rdi
  call   <strlen@plt>
  add    %eax,%r13d
  jmp    L98
L268:
  mov    0x10(%rsp),%r13d
  jmp    L85
L121:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
unsigned int scan_ip6(const char *s, char ip[16]) {
  unsigned int i;
  unsigned int len = 0;
  unsigned long u;
  char suffix[16];
  unsigned int prefixlen = 0;
  unsigned int suffixlen = 0;
  for (i = 0; i < 16; i++)
    ip[i] = 0;
  for (;;) {
    if (*s == ':') {
      len++;
      if (s[1] == ':') {
        s += 2;
        len++;
        break;
      }
      s++;
    }
    {
      char *tmp;
      u = strtoul(s, &tmp, 16);
      i = tmp - s;
    }
    if (!i)
      return 0;
    if (prefixlen == 12 && s[i] == '.') {
      if (inet_aton(s, (struct in_addr *)(ip + 12)))
        return i + len;
      else
        return 0;
    }
    ip[prefixlen++] = (u >> 8);
    ip[prefixlen++] = (u & 255);
    s += i;
    len += i;
    if (prefixlen == 16)
      return len;
  }
  for (;;) {
    if (*s == ':') {
      if (suffixlen == 0)
        break;
      s++;
      len++;
    } else if (suffixlen != 0)
      break;
    {
      char *tmp;
      u = strtol(s, &tmp, 16);
      i = tmp - s;
    }
    if (!i) {
      if (*s)
        len--;
      break;
    }
    if (suffixlen + prefixlen <= 12 && s[i] == '.') {
      if (inet_aton(s, (struct in_addr *)(suffix + suffixlen))) {
        suffixlen += 4;
        len += strlen(s);
        break;
      } else
        prefixlen = 12 - suffixlen;
    }
    suffix[suffixlen++] = (u >> 8);
    suffix[suffixlen++] = (u & 255);
    s += i;
    len += i;
    if (prefixlen + suffixlen == 16)
      break;
  }
  for (i = 0; i < suffixlen; i++)
    ip[16 - suffixlen + i] = suffix[i];
  return len;
}
```