user: What is the c source code of the assembly code below:

```asm
<inet6_opt_append>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  mov    %ecx,-0x24(%rbp)
  mov    %r8d,-0x28(%rbp)
  mov    %r9d,-0x2c(%rbp)
  mov    -0x20(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  movl   $0x0,-0x10(%rbp)
  cmpl   $0x1,-0x24(%rbp)
  jg     L196
  mov    $0xffffffff,%eax
  jmp    L32
L196:
  cmpl   $0x0,-0x28(%rbp)
  js     L102
  cmpl   $0xff,-0x28(%rbp)
  jle    L186
L102:
  mov    $0xffffffff,%eax
  jmp    L32
L186:
  cmpl   $0x1,-0x2c(%rbp)
  je     L174
  cmpl   $0x2,-0x2c(%rbp)
  je     L174
  cmpl   $0x4,-0x2c(%rbp)
  je     L174
  cmpl   $0x8,-0x2c(%rbp)
  je     L174
  mov    $0xffffffff,%eax
  jmp    L32
L174:
  mov    -0x2c(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jle    L173
  mov    $0xffffffff,%eax
  jmp    L32
L173:
  mov    -0x28(%rbp),%eax
  add    $0x2,%eax
  add    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  cltd
  idivl  -0x2c(%rbp)
  mov    %edx,%eax
  test   %eax,%eax
  je     L65
  mov    -0xc(%rbp),%eax
  cltd
  idivl  -0x2c(%rbp)
  mov    -0x2c(%rbp),%eax
  sub    %edx,%eax
  mov    %eax,-0x10(%rbp)
L65:
  mov    -0x10(%rbp),%eax
  add    %eax,-0xc(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  je     L149
  mov    -0xc(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jle    L149
  mov    $0xffffffff,%eax
  jmp    L32
L149:
  cmpq   $0x0,-0x18(%rbp)
  je     L192
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  cmpl   $0x1,-0x10(%rbp)
  jne    L10
  mov    D0(%rip),%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,(%rax)
  addq   $0x4,-0x8(%rbp)
  jmp    L134
L10:
  cmpl   $0x0,-0x10(%rbp)
  jle    L134
  mov    -0x8(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    D14(%rip),%rdx
  mov    (%rdx),%edx
  mov    %edx,(%rax)
  mov    -0x8(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    -0x10(%rbp),%edx
  sub    $0x2,%edx
  mov    %edx,(%rax)
  mov    -0x10(%rbp),%eax
  lea    -0x2(%rax),%edx
  mov    -0x8(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x2,%rax
  sub    $0x8,%rax
  add    %rax,-0x8(%rbp)
L134:
  mov    -0x8(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    -0x24(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x8(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    -0x28(%rbp),%edx
  mov    %edx,(%rax)
  mov    0x10(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  mov    %rdx,(%rax)
L192:
  mov    -0xc(%rbp),%eax
L32:
  leave
  ret
```

assistant: ```c
int inet6_opt_append(void *extbuf, socklen_t extlen, int offset, u_int8_t type, socklen_t len, u_int8_t align, void **databufp) {
  int currentlen = offset, padlen = 0;
  if (type < 2)
    return (-1);
  if (len < 0 || len > 255)
    return (-1);
  if (align != 1 && align != 2 && align != 4 && align != 8)
    return (-1);
  if (align > len)
    return (-1);
  currentlen += 2 + len;
  if (currentlen % align)
    padlen = align - (currentlen % align);
  currentlen += padlen;
  if (extlen && currentlen > extlen)
    return (-1);
  if (extbuf) {
    u_int8_t *optp = (u_int8_t *)extbuf + offset;
    if (padlen == 1) {
      *optp = IP6OPT_PAD1;
      optp++;
    } else if (padlen > 0) {
      *optp++ = IP6OPT_PADN;
      *optp++ = padlen - 2;
      memset(optp, 0, padlen - 2);
      optp += (padlen - 2);
    }
    *optp++ = type;
    *optp++ = len;
    *databufp = optp;
  }
  return (currentlen);
}
```