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

```asm
<mjt_ntop6>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rsi,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  cmp    $0x27,%edx
  jle    L283
  mov    %rdi,%r13
  mov    %edx,%r15d
  mov    $0x0,%eax
  mov    $0x0,%esi
  mov    $0x0,%r12d
  mov    $0x0,%r8d
  mov    $0x0,%r14d
  jmp    L33
L227:
  cmp    %esi,%r12d
  jae    L202
  mov    %esi,%r12d
  mov    %r8d,%r14d
L202:
  add    $0x1,%rax
  cmp    $0x8,%rax
  je     L128
L33:
  movzbl 0x0(%r13,%rax,2),%ecx
  shl    $0x8,%ecx
  movzbl 0x1(%r13,%rax,2),%edx
  or     %ecx,%edx
  mov    %dx,0x10(%rsp,%rax,2)
  test   %dx,%dx
  jne    L227
  test   %esi,%esi
  je     L1
  add    $0x1,%esi
  jmp    L202
L1:
  mov    %eax,%r8d
  mov    $0x1,%esi
  jmp    L202
L128:
  cmp    %esi,%r12d
  jae    L180
  mov    %esi,%r12d
  mov    %r8d,%r14d
L180:
  cmp    $0x1,%r12d
  jbe    L267
  mov    0x8(%rsp),%rdi
  mov    $0x1,%ebx
  lea    0x10(%rsp),%rbp
  test   %r14d,%r14d
  jne    L10
  mov    %rdi,%rax
  mov    %r14d,%ebx
  jmp    L274
L67:
  add    $0x1,%rbx
L10:
  movzwl -0x2(%rbp,%rbx,2),%esi
  call   <hexc@plt>
  cmp    %ebx,%r14d
  jbe    L39
  mov    %rax,%rdi
  test   %ebx,%ebx
  je     L67
  lea    0x1(%rax),%rdi
  movb   $0x3a,(%rax)
  jmp    L67
L39:
  mov    %r14d,%ebx
L274:
  lea    0x1(%rax),%rdi
  movb   $0x3a,(%rax)
  add    %r12d,%ebx
  cmp    $0x8,%ebx
  je     L256
  cmp    $0x7,%ebx
  jbe    L55
  jmp    L176
L256:
  lea    0x2(%rax),%rdi
  movb   $0x3a,0x1(%rax)
  jmp    L176
L267:
  mov    0x8(%rsp),%rdi
  mov    $0x0,%r12d
  mov    $0x0,%ebx
L55:
  lea    0x1(%rbx),%ebp
  jmp    L154
L277:
  mov    %rax,%rdi
L14:
  mov    %ebx,%eax
  movzwl 0x10(%rsp,%rax,2),%esi
  call   <hexc@plt>
  mov    %rax,%rdi
  cmp    $0x7,%ebp
  jbe    L99
L176:
  movb   $0x0,(%rdi)
  mov    $0x1,%eax
L283:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L9
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L119:
  movzwl 0x1c(%rsp),%esi
  mov    %rax,%rdi
  call   <hexc@plt>
  mov    %rax,%rdi
L99:
  add    $0x1,%ebx
  add    $0x1,%ebp
L154:
  test   %ebx,%ebx
  je     L14
  lea    0x1(%rdi),%rax
  movb   $0x3a,(%rdi)
  cmp    $0x6,%ebx
  jne    L277
  test   %r14d,%r14d
  jne    L277
  cmp    $0x6,%r12d
  je     L79
  cmp    $0x5,%r12d
  jne    L119
  cmpw   $0xffff,0x1a(%rsp)
  jne    L119
L79:
  mov    %rax,%rcx
  sub    0x8(%rsp),%rcx
  mov    %r15d,%edx
  sub    %ecx,%edx
  lea    0xc(%r13),%rdi
  mov    %rax,%rsi
  call   <mjt_ntop4@plt>
  jmp    L283
L9:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int mjt_ntop6(const void *_src, char *dst, int size) {
  unsigned i;
  unsigned short w[8];
  unsigned bs = 0, cs = 0;
  unsigned bl = 0, cl = 0;
  char *p;
  const unsigned char *s = (const unsigned char *)_src;
  if (size < 40)
    return 0;
  for (i = 0; i < 8; ++i, s += 2) {
    w[i] = (((unsigned short)(s[0])) << 8) | s[1];
    if (!w[i]) {
      if (!cl++)
        cs = i;
    } else {
      if (cl > bl)
        bl = cl, bs = cs;
    }
  }
  if (cl > bl)
    bl = cl, bs = cs;
  p = dst;
  if (bl == 1)
    bl = 0;
  if (bl) {
    for (i = 0; i < bs; ++i) {
      if (i)
        *p++ = ':';
      p = hexc(p, w[i]);
    }
    *p++ = ':';
    i += bl;
    if (i == 8)
      *p++ = ':';
  } else
    i = 0;
  for (; i < 8; ++i) {
    if (i)
      *p++ = ':';
    if (i == 6 && !bs && (bl == 6 || (bl == 5 && w[5] == 0xffff)))
      return mjt_ntop4(s - 4, p, size - (p - dst));
    p = hexc(p, w[i]);
  }
  *p = '\0';
  return 1;
}
```