user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<mjt_ntop6>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %edx,0x4(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  cmp    $0x27,%edx
  jle    L515
  movzwl (%rdi),%eax
  mov    %rdi,%rbp
  mov    %rsi,%r12
  lea    0x2(%rdi),%rdx
  rol    $0x8,%ax
  test   %ax,%ax
  mov    %ax,0xa(%rsp)
  mov    %ax,0x10(%rsp)
  movzwl 0x2(%rdi),%eax
  jne    L246
  rol    $0x8,%ax
  mov    %ax,0x12(%rsp)
  test   %ax,%ax
  je     L752
  movzwl 0x4(%rbp),%eax
  lea    0x4(%rdi),%rdi
  rol    $0x8,%ax
  mov    %ax,0x14(%rsp)
  test   %ax,%ax
  je     L530
  mov    $0x1,%esi
  mov    $0x1,%edx
L617:
  movzwl 0x2(%rdi),%eax
  lea    0x2(%rdi),%r8
  rol    $0x8,%ax
  mov    %ax,0x16(%rsp)
  test   %ax,%ax
  jne    L731
  test   %esi,%esi
  jne    L16
  mov    $0x1,%eax
  mov    $0x3,%ebx
L284:
  movzwl 0x2(%r8),%edi
  lea    0x2(%r8),%r9
  rol    $0x8,%di
  mov    %di,0x18(%rsp)
  test   %di,%di
  je     L831
L804:
  cmp    %eax,%edx
  jae    L38
  mov    %eax,%edx
  mov    %ebx,%esi
L613:
  movzwl 0x2(%r9),%r13d
  lea    0x2(%r9),%rdi
  rol    $0x8,%r13w
  mov    %r13w,0x1a(%rsp)
  test   %r13w,%r13w
  je     L52
L533:
  cmp    %edx,%eax
  jae    L705
  mov    %edx,%eax
  mov    %esi,%ebx
L62:
  lea    0x2(%rdi),%r8
  movzwl 0x2(%rdi),%edi
  rol    $0x8,%di
  mov    %di,0x1c(%rsp)
  test   %di,%di
  je     L494
L252:
  cmp    %eax,%edx
  jae    L661
  mov    %eax,%edi
  mov    %ebx,%r14d
L44:
  movzwl 0x2(%r8),%edx
  rol    $0x8,%dx
  mov    %dx,0x1e(%rsp)
  test   %dx,%dx
  je     L179
L677:
  cmp    %edi,%eax
  jae    L800
  mov    %edi,%eax
  mov    %r14d,%ebx
L800:
  add    $0xe,%rbp
L625:
  cmp    $0x1,%eax
  ja     L786
L341:
  xor    %r15d,%r15d
L564:
  lea    0x1(%r15),%ebp
  jmp    L162
  nopw   0x0(%rax,%rax,1)
L807:
  movb   $0x3a,(%r12)
  lea    0x1(%r12),%rdi
  test   %ebx,%ebx
  jne    L0
  cmp    $0x6,%r15d
  jne    L0
L675:
  mov    %r15d,%eax
  movzwl 0x10(%rsp,%rax,2),%esi
  call   <hexc@plt>
  mov    %rax,%r12
L141:
  add    $0x1,%r15d
  add    $0x1,%ebp
L162:
  test   %r15d,%r15d
  jne    L807
  mov    %r12,%rdi
  jmp    L675
  nopl   (%rax)
L246:
  rol    $0x8,%ax
  mov    %ax,0x12(%rsp)
  test   %ax,%ax
  je     L373
  movzwl 0x4(%rbp),%eax
  lea    0x4(%rdi),%rdi
  rol    $0x8,%ax
  mov    %ax,0x14(%rsp)
  test   %ax,%ax
  jne    L22
  mov    $0x1,%edx
  xor    %eax,%eax
  mov    $0x2,%esi
  xor    %ebx,%ebx
  jmp    L560
  nopl   0x0(%rax)
L515:
  xor    %eax,%eax
L610:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L195
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L752:
  mov    $0x2,%eax
  xor    %ebx,%ebx
L693:
  lea    0x2(%rdx),%rdi
  movzwl 0x2(%rdx),%edx
  rol    $0x8,%dx
  mov    %dx,0x14(%rsp)
  test   %dx,%dx
  je     L713
  mov    %eax,%edx
  mov    %ebx,%esi
L560:
  lea    0x2(%rdi),%r8
  movzwl 0x2(%rdi),%edi
  rol    $0x8,%di
  mov    %di,0x16(%rsp)
  test   %di,%di
  je     L822
L265:
  cmp    %eax,%edx
  jbe    L143
  mov    %edx,%eax
  mov    %esi,%ebx
  jmp    L284
  nopl   0x0(%rax,%rax,1)
L373:
  mov    $0x1,%eax
  mov    $0x1,%ebx
  jmp    L693
L0:
  mov    %r15d,%eax
  movzwl 0x10(%rsp,%rax,2),%esi
  call   <hexc@plt>
  mov    %rax,%rdi
  cmp    $0x7,%ebp
  jbe    L520
L643:
  movb   $0x0,(%rdi)
  mov    $0x1,%eax
  jmp    L610
L90:
  mov    %eax,%edi
  mov    %ebx,%r14d
  mov    %edx,%eax
  mov    %esi,%ebx
  nopl   0x0(%rax,%rax,1)
L179:
  lea    0x1(%rdi),%ecx
  add    $0xe,%rbp
  mov    %ecx,0xc(%rsp)
  cmp    %eax,%ecx
  jbe    L786
L204:
  test   %r14d,%r14d
  je     L408
  lea    0x10(%rsp),%r15
  lea    -0x1(%r14),%eax
  mov    %r12,%rdi
  lea    (%r15,%rax,2),%rbx
  jmp    L416
  xchg   %ax,%ax
L9:
  movb   $0x3a,(%rax)
  lea    0x1(%rax),%rdi
  add    $0x2,%r15
L416:
  movzwl (%r15),%esi
  call   <hexc@plt>
  cmp    %r15,%rbx
  jne    L9
  mov    0xc(%rsp),%ecx
  lea    (%r14,%rcx,1),%r15d
L712:
  movb   $0x3a,(%rax)
  cmp    $0x8,%r15d
  je     L47
  lea    0x1(%rax),%rdi
  cmp    $0x7,%r15d
  ja     L643
  mov    0xc(%rsp),%eax
  cmp    $0x5,%eax
  je     L202
  cmp    $0x6,%eax
  je     L218
  mov    %r14d,%ebx
  mov    %rdi,%r12
  jmp    L564
L202:
  lea    0x1(%r15),%ebx
  jmp    L69
  nop
L64:
  mov    %r8,%rdi
L484:
  mov    %r15d,%eax
  movzwl 0x10(%rsp,%rax,2),%esi
  call   <hexc@plt>
  mov    %rax,%rdi
L428:
  add    $0x1,%r15d
  add    $0x1,%ebx
L69:
  test   %r15d,%r15d
  je     L484
  movb   $0x3a,(%rdi)
  lea    0x1(%rdi),%r8
  cmp    $0x6,%r15d
  jne    L715
  test   %r14d,%r14d
  jne    L715
  cmp    $0xffff,%r13w
  jne    L64
L755:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L195
  mov    0x4(%rsp),%edx
  mov    %r8,%rax
  add    $0x38,%rsp
  lea    -0x2(%rbp),%rdi
  sub    %r12,%rax
  pop    %rbx
  mov    %r8,%rsi
  pop    %rbp
  sub    %eax,%edx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1080 <mjt_ntop4@plt>
  nopw   0x0(%rax,%rax,1)
L661:
  movzwl 0x2(%r8),%edi
  rol    $0x8,%di
  mov    %di,0x1e(%rsp)
  test   %di,%di
  jne    L82
  test   %eax,%eax
  jne    L90
  add    $0xe,%rbp
  test   %edx,%edx
  jne    L29
  mov    $0x7,%ebx
  jmp    L341
L516:
  xchg   %eax,%edx
  xchg   %ebx,%esi
  nopl   0x0(%rax,%rax,1)
L494:
  lea    0x1(%rax),%edi
  mov    %ebx,%r14d
  mov    %edx,%eax
  mov    %esi,%ebx
  jmp    L44
  nop
L705:
  lea    0x2(%rdi),%r8
  movzwl 0x2(%rdi),%edi
  rol    $0x8,%di
  mov    %di,0x1c(%rsp)
  test   %di,%di
  jne    L110
  test   %edx,%edx
  jne    L516
  mov    $0x1,%edi
  mov    $0x6,%r14d
  jmp    L44
L709:
  xchg   %eax,%edx
  xchg   %esi,%ebx
  nopl   0x0(%rax)
L52:
  lea    0x1(%rdx),%r8d
  mov    %eax,%edx
  xor    %r13d,%r13d
  mov    %r8d,%eax
  mov    %esi,%r8d
  mov    %ebx,%esi
  mov    %r8d,%ebx
  jmp    L62
  nopl   0x0(%rax)
L38:
  movzwl 0x2(%r9),%r13d
  lea    0x2(%r9),%rdi
  rol    $0x8,%r13w
  mov    %r13w,0x1a(%rsp)
  test   %r13w,%r13w
  jne    L171
  test   %eax,%eax
  jne    L709
  mov    $0x1,%eax
  mov    $0x5,%ebx
  jmp    L62
L256:
  xchg   %eax,%edx
  xchg   %ebx,%esi
  nopl   0x0(%rax)
L831:
  lea    0x1(%rax),%edi
  mov    %edx,%eax
  mov    %edi,%edx
  mov    %ebx,%edi
  mov    %esi,%ebx
  mov    %edi,%esi
  jmp    L613
  nopw   0x0(%rax,%rax,1)
L143:
  movzwl 0x2(%r8),%edi
  lea    0x2(%r8),%r9
  rol    $0x8,%di
  mov    %di,0x18(%rsp)
  test   %di,%di
  jne    L461
  test   %edx,%edx
  jne    L256
  mov    $0x1,%edx
  mov    $0x4,%esi
  jmp    L613
L16:
  mov    %edx,%eax
  xor    %ebx,%ebx
  xor    %esi,%esi
  mov    $0x1,%edx
  nopl   0x0(%rax)
L822:
  lea    0x1(%rdx),%edi
  mov    %eax,%edx
  mov    %edi,%eax
  mov    %esi,%edi
  mov    %ebx,%esi
  mov    %edi,%ebx
  jmp    L284
  nopw   0x0(%rax,%rax,1)
L713:
  xor    %esi,%esi
L421:
  lea    0x1(%rax),%edx
  mov    %esi,%eax
  mov    %ebx,%esi
  xor    %ebx,%ebx
  jmp    L560
L715:
  mov    %r15d,%eax
  mov    %r8,%rdi
  movzwl 0x10(%rsp,%rax,2),%esi
  call   <hexc@plt>
  mov    %rax,%rdi
  cmp    $0x7,%ebx
  ja     L643
  jmp    L428
  nopl   0x0(%rax)
L47:
  movb   $0x3a,0x1(%rax)
  lea    0x2(%rax),%rdi
  jmp    L643
L786:
  mov    %eax,0xc(%rsp)
  mov    %ebx,%r14d
  jmp    L204
L408:
  mov    0xc(%rsp),%r15d
  mov    %r12,%rax
  jmp    L712
L218:
  movzwl 0xa(%rsp),%r13d
  lea    0x1(%r15),%ebx
  jmp    L111
L688:
  mov    %r15d,%eax
  mov    %r8,%rdi
  movzwl 0x10(%rsp,%rax,2),%esi
  call   <hexc@plt>
  mov    %rax,%rdi
  cmp    $0x7,%ebx
  ja     L643
  cs nopw 0x0(%rax,%rax,1)
L720:
  add    $0x1,%r15d
  add    $0x1,%ebx
L111:
  test   %r15d,%r15d
  je     L100
  movb   $0x3a,(%rdi)
  lea    0x1(%rdi),%r8
  test   %r14d,%r14d
  jne    L688
  cmp    $0x6,%r15d
  je     L755
  jmp    L688
  nopl   0x0(%rax)
L100:
  mov    %r13d,%esi
  call   <hexc@plt>
  mov    %rax,%rdi
  jmp    L720
L82:
  mov    %eax,%edi
  mov    %ebx,%r14d
  mov    %edx,%eax
  mov    %esi,%ebx
  jmp    L677
L29:
  mov    %edx,%eax
  mov    %esi,%ebx
  jmp    L625
L171:
  xchg   %eax,%edx
  xchg   %esi,%ebx
  jmp    L533
L110:
  xchg   %eax,%edx
  xchg   %ebx,%esi
  jmp    L252
L520:
  mov    %rax,%r12
  jmp    L141
L22:
  xor    %esi,%esi
  xor    %edx,%edx
  jmp    L617
L731:
  mov    %edx,%eax
  xor    %ebx,%ebx
  mov    %esi,%edx
  xor    %esi,%esi
  jmp    L265
L530:
  mov    $0x1,%eax
  mov    $0x1,%esi
  xor    %ebx,%ebx
  jmp    L421
L195:
  call   <__stack_chk_fail@plt>
L461:
  xchg   %eax,%edx
  xchg   %ebx,%esi
  jmp    L804
```

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