user: Translate the below assembly code into C programming language:

```asm
<mjt_ntop6>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %edx,-0x64(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x40(%rbp)
  movl   $0x0,-0x3c(%rbp)
  movl   $0x0,-0x38(%rbp)
  movl   $0x0,-0x34(%rbp)
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  cmpl   $0x27,-0x64(%rbp)
  jg     L140
  mov    $0x0,%eax
  jmp    L248
L140:
  movl   $0x0,-0x44(%rbp)
  jmp    L227
L127:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  or     %edx,%eax
  mov    %eax,%edx
  mov    -0x44(%rbp),%eax
  mov    %dx,-0x20(%rbp,%rax,2)
  mov    -0x44(%rbp),%eax
  movzwl -0x20(%rbp,%rax,2),%eax
  test   %ax,%ax
  jne    L217
  mov    -0x34(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x34(%rbp)
  test   %eax,%eax
  jne    L196
  mov    -0x44(%rbp),%eax
  mov    %eax,-0x3c(%rbp)
  jmp    L196
L217:
  mov    -0x34(%rbp),%eax
  cmp    -0x38(%rbp),%eax
  jbe    L196
  mov    -0x34(%rbp),%eax
  mov    %eax,-0x38(%rbp)
  mov    -0x3c(%rbp),%eax
  mov    %eax,-0x40(%rbp)
L196:
  addl   $0x1,-0x44(%rbp)
  addq   $0x2,-0x28(%rbp)
L227:
  cmpl   $0x7,-0x44(%rbp)
  jbe    L127
  mov    -0x34(%rbp),%eax
  cmp    -0x38(%rbp),%eax
  jbe    L134
  mov    -0x34(%rbp),%eax
  mov    %eax,-0x38(%rbp)
  mov    -0x3c(%rbp),%eax
  mov    %eax,-0x40(%rbp)
L134:
  mov    -0x60(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  cmpl   $0x1,-0x38(%rbp)
  jne    L224
  movl   $0x0,-0x38(%rbp)
L224:
  cmpl   $0x0,-0x38(%rbp)
  je     L24
  movl   $0x0,-0x44(%rbp)
  jmp    L2
L142:
  cmpl   $0x0,-0x44(%rbp)
  je     L214
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x30(%rbp)
  movb   $0x3a,(%rax)
L214:
  mov    -0x44(%rbp),%eax
  movzwl -0x20(%rbp,%rax,2),%eax
  movzwl %ax,%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <hexc@plt>
  mov    %rax,-0x30(%rbp)
  addl   $0x1,-0x44(%rbp)
L2:
  mov    -0x44(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jb     L142
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x30(%rbp)
  movb   $0x3a,(%rax)
  mov    -0x38(%rbp),%eax
  add    %eax,-0x44(%rbp)
  cmpl   $0x8,-0x44(%rbp)
  jne    L166
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x30(%rbp)
  movb   $0x3a,(%rax)
  jmp    L166
L24:
  movl   $0x0,-0x44(%rbp)
  jmp    L166
L99:
  cmpl   $0x0,-0x44(%rbp)
  je     L60
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x30(%rbp)
  movb   $0x3a,(%rax)
L60:
  cmpl   $0x6,-0x44(%rbp)
  jne    L157
  cmpl   $0x0,-0x40(%rbp)
  jne    L157
  cmpl   $0x6,-0x38(%rbp)
  je     L6
  cmpl   $0x5,-0x38(%rbp)
  jne    L157
  movzwl -0x16(%rbp),%eax
  cmp    $0xffff,%ax
  jne    L157
L6:
  mov    -0x64(%rbp),%edx
  mov    -0x30(%rbp),%rax
  sub    -0x60(%rbp),%rax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  lea    -0x4(%rax),%rcx
  mov    -0x30(%rbp),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <mjt_ntop4@plt>
  jmp    L248
L157:
  mov    -0x44(%rbp),%eax
  movzwl -0x20(%rbp,%rax,2),%eax
  movzwl %ax,%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <hexc@plt>
  mov    %rax,-0x30(%rbp)
  addl   $0x1,-0x44(%rbp)
L166:
  cmpl   $0x7,-0x44(%rbp)
  jbe    L99
  mov    -0x30(%rbp),%rax
  movb   $0x0,(%rax)
  mov    $0x1,%eax
L248:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L5
  call   <__stack_chk_fail@plt>
L5:
  leave
  ret
```

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