user: Please show me the C implementation that matches the assembly code listed below:

```asm
<fmt_mac>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  movl   $0x0,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x18(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fmt_xlong@plt>
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  add    %eax,-0x8(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  je     L95
  mov    -0x4(%rbp),%eax
  add    %rax,-0x18(%rbp)
L95:
  cmpq   $0x0,-0x18(%rbp)
  je     L50
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movb   $0x3a,(%rax)
L50:
  addl   $0x1,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x18(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fmt_xlong@plt>
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  add    %eax,-0x8(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  je     L29
  mov    -0x4(%rbp),%eax
  add    %rax,-0x18(%rbp)
L29:
  cmpq   $0x0,-0x18(%rbp)
  je     L19
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movb   $0x3a,(%rax)
L19:
  addl   $0x1,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x18(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fmt_xlong@plt>
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  add    %eax,-0x8(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  je     L103
  mov    -0x4(%rbp),%eax
  add    %rax,-0x18(%rbp)
L103:
  cmpq   $0x0,-0x18(%rbp)
  je     L40
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movb   $0x3a,(%rax)
L40:
  addl   $0x1,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x18(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fmt_xlong@plt>
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  add    %eax,-0x8(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  je     L4
  mov    -0x4(%rbp),%eax
  add    %rax,-0x18(%rbp)
L4:
  cmpq   $0x0,-0x18(%rbp)
  je     L2
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movb   $0x3a,(%rax)
L2:
  addl   $0x1,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  add    $0x4,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x18(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fmt_xlong@plt>
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  add    %eax,-0x8(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  je     L98
  mov    -0x4(%rbp),%eax
  add    %rax,-0x18(%rbp)
L98:
  cmpq   $0x0,-0x18(%rbp)
  je     L69
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movb   $0x3a,(%rax)
L69:
  addl   $0x1,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  add    $0x5,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x18(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fmt_xlong@plt>
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  add    %eax,-0x8(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  je     L46
  mov    -0x4(%rbp),%eax
  add    %rax,-0x18(%rbp)
L46:
  mov    -0x18(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x8(%rbp),%eax
  leave
  ret
```

assistant: ```c
unsigned fmt_mac(char *s, const char mac[6]) {
  unsigned i;
  unsigned len = 0;
  i = fmt_xlong(s, (unsigned long)(unsigned char)mac[0]);
  len += i;
  if (s)
    s += i;
  if (s)
    *s++ = ':';
  ++len;
  i = fmt_xlong(s, (unsigned long)(unsigned char)mac[1]);
  len += i;
  if (s)
    s += i;
  if (s)
    *s++ = ':';
  ++len;
  i = fmt_xlong(s, (unsigned long)(unsigned char)mac[2]);
  len += i;
  if (s)
    s += i;
  if (s)
    *s++ = ':';
  ++len;
  i = fmt_xlong(s, (unsigned long)(unsigned char)mac[3]);
  len += i;
  if (s)
    s += i;
  if (s)
    *s++ = ':';
  ++len;
  i = fmt_xlong(s, (unsigned long)(unsigned char)mac[4]);
  len += i;
  if (s)
    s += i;
  if (s)
    *s++ = ':';
  ++len;
  i = fmt_xlong(s, (unsigned long)(unsigned char)mac[5]);
  len += i;
  if (s)
    s += i;
  *s = '\0';
  return len;
}
```