user: What would the C source look like for the assembly code provided here?

```asm
<format_address>:
  endbr64
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %r8d,%ebx
  cmp    $0x4,%rcx
  je     L85
  cmp    $0x10,%rcx
  je     L19
  test   %rsi,%rsi
  je     L166
  movb   $0x0,(%rdi)
L226:
  cmp    $0xffffffff,%ebx
  je     L60
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    $0xcccccccd,%edx
  mov    %ebx,%esi
  mov    %rax,%rcx
  mov    %ebx,%eax
  imul   %rdx,%rax
  shr    $0x23,%rax
  lea    (%rax,%rax,4),%edx
  add    %edx,%edx
  sub    %edx,%esi
  add    $0x30,%esi
  cmp    %rcx,%rbp
  jbe    L13
  movb   $0x2f,(%r12,%rcx,1)
  lea    0x1(%rcx),%rdx
  cmp    $0x9,%ebx
  ja     L1
L67:
  cmp    %rdx,%rbp
  jbe    L64
  lea    0x1(%rdx),%rax
  mov    %sil,(%r12,%rdx,1)
  cmp    %rax,%rbp
  jbe    L64
  movb   $0x0,0x1(%r12,%rdx,1)
L60:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L166:
  cmp    $0xffffffff,%r8d
  je     L60
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    $0xcccccccd,%edx
  mov    %ebx,%esi
  mov    %rax,%rcx
  mov    %ebx,%eax
  sub    $0xa,%ebx
  imul   %rdx,%rax
  shr    $0x23,%rax
  lea    (%rax,%rax,4),%edx
  add    %edx,%edx
  sub    %edx,%esi
  add    $0x30,%esi
  cmp    $0x59,%ebx
  ja     L60
L128:
  mov    %eax,%edx
  mov    $0xcccccccd,%edi
  imul   %rdi,%rdx
  mov    %rcx,%rdi
  shr    $0x23,%rdx
  lea    (%rdx,%rdx,4),%edx
  add    %edx,%edx
  sub    %edx,%eax
  add    $0x30,%eax
L54:
  cmp    %rbp,%rdi
  jae    L187
L170:
  mov    %al,(%r12,%rdi,1)
  lea    0x1(%rdi),%rdx
  jmp    L67
  cs nopw 0x0(%rax,%rax,1)
L85:
  call   <format_ipv4_address@plt>
  lea    -0x21(%rbx),%eax
  cmp    $0xffffffdd,%eax
  ja     L226
  mov    %r12,%rdi
  mov    $0x20,%ebx
  call   <strlen@plt>
  mov    $0x32,%esi
  mov    %rax,%rcx
  mov    $0x3,%eax
  cmp    %rcx,%rbp
  jbe    L128
L4:
  movb   $0x2f,(%r12,%rcx,1)
  lea    0x1(%rcx),%rdi
L32:
  mov    %eax,%edx
  mov    $0xcccccccd,%ecx
  imul   %rcx,%rdx
  shr    $0x23,%rdx
  lea    (%rdx,%rdx,4),%ecx
  add    %ecx,%ecx
  sub    %ecx,%eax
  add    $0x30,%eax
  cmp    $0x63,%ebx
  jbe    L54
  add    $0x30,%edx
  cmp    %rdi,%rbp
  jbe    L187
  mov    %dl,(%r12,%rdi,1)
  add    $0x1,%rdi
  cmp    %rdi,%rbp
  ja     L170
L64:
  movb   $0x0,-0x1(%r12,%rbp,1)
L219:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L1:
  mov    %rdx,%rdi
  jmp    L32
  nopl   (%rax)
L19:
  call   <format_ipv6_address@plt>
  lea    -0x81(%rbx),%eax
  cmp    $0xffffff7d,%eax
  ja     L226
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %rax,%rcx
  cmp    %rax,%rbp
  ja     L154
L187:
  test   %rbp,%rbp
  je     L60
  movb   $0x0,-0x1(%r12,%rbp,1)
  jmp    L219
  nop
L13:
  sub    $0xa,%ebx
  cmp    $0x59,%ebx
  ja     L187
  jmp    L128
  nopl   (%rax)
L154:
  mov    $0xc,%eax
  mov    $0x38,%esi
  mov    $0x80,%ebx
  jmp    L4
```

assistant: ```c
void format_address(char *buf, size_t sizeof_buf, const void *v_addr, size_t sizeof_addr, unsigned prefix_length) {
  if (sizeof_addr == 4) {
    format_ipv4_address(buf, sizeof_buf, v_addr);
    if (prefix_length != ~0 && prefix_length > 32)
      prefix_length = 32;
  } else if (sizeof_addr == 16) {
    format_ipv6_address(buf, sizeof_buf, v_addr);
    if (prefix_length != ~0 && prefix_length > 128)
      prefix_length = 128;
  } else if (sizeof_buf > 0)
    buf[0] = '\0';
  if (prefix_length != ~0) {
    size_t d = strlen(buf);
    char c2;
    unsigned number = prefix_length;
    if (d < sizeof_buf)
      buf[d++] = '/';
    c2 = (number % 10) + '0';
    number /= 10;
    if (number) {
      char c1;
      c1 = (number % 10) + '0';
      number /= 10;
      if (number) {
        int c0;
        c0 = number + '0';
        if (d < sizeof_buf)
          buf[d++] = (char)c0;
      }
      if (d < sizeof_buf)
        buf[d++] = c1;
    }
    if (d < sizeof_buf)
      buf[d++] = c2;
    if (d < sizeof_buf)
      buf[d] = '\0';
    else if (sizeof_buf)
      buf[sizeof_buf - 1] = '\0';
  }
}
```