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

```asm
<authunix_create_default>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x48,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    D16(%rip),%rax
  mov    (%rax),%eax
  add    $0x1,%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x58(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r8
  mov    $0x0,%r9d
  movslq %eax,%rdx
  mov    %rdx,%rsi
  mov    $0x0,%edi
  cltq
  mov    $0x10,%edx
  sub    $0x1,%rdx
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L78:
  cmp    %rdx,%rsp
  je     L53
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L78
L53:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L20
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L20:
  mov    %rsp,%rax
  add    $0x0,%rax
  mov    %rax,-0x50(%rbp)
  mov    D4(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <__sysconf@plt>
  mov    %eax,-0x68(%rbp)
  mov    -0x68(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x48(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r14
  mov    $0x0,%r15d
  movslq %eax,%rdx
  mov    %rdx,%r12
  mov    $0x0,%r13d
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L55:
  cmp    %rdx,%rsp
  je     L12
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L55
L12:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L68
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L68:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x40(%rbp)
  mov    D16(%rip),%rax
  mov    (%rax),%edx
  mov    -0x50(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <__gethostname@plt>
  cmp    $0xffffffff,%eax
  jne    L46
  mov    $0x0,%eax
  call   <abort@plt>
L46:
  mov    D16(%rip),%rax
  mov    (%rax),%eax
  mov    -0x50(%rbp),%rdx
  cltq
  movb   $0x0,(%rdx,%rax,1)
  mov    $0x0,%eax
  call   <__geteuid@plt>
  mov    %eax,-0x64(%rbp)
  mov    $0x0,%eax
  call   <__getegid@plt>
  mov    %eax,-0x60(%rbp)
  mov    -0x40(%rbp),%rdx
  mov    -0x68(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <__getgroups@plt>
  mov    %eax,-0x5c(%rbp)
  cmpl   $0x0,-0x5c(%rbp)
  jns    L82
  mov    $0x0,%eax
  call   <abort@plt>
L82:
  mov    D17(%rip),%rax
  mov    (%rax),%eax
  mov    -0x5c(%rbp),%edx
  mov    %edx,%esi
  mov    %eax,%edi
  call   <MIN@plt>
  mov    %eax,%ecx
  mov    -0x40(%rbp),%rdi
  mov    -0x60(%rbp),%edx
  mov    -0x64(%rbp),%esi
  mov    -0x50(%rbp),%rax
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <authunix_create@plt>
  mov    %rbx,%rsp
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L38
  call   <__stack_chk_fail@plt>
L38:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
AUTH *authunix_create_default(void) {
  int len;
  char machname[MAX_MACHINE_NAME + 1];
  uid_t uid;
  gid_t gid;
  int max_nr_groups = __sysconf(_SC_NGROUPS_MAX);
  gid_t gids[max_nr_groups];
  if (__gethostname(machname, MAX_MACHINE_NAME) == -1)
    abort();
  machname[MAX_MACHINE_NAME] = 0;
  uid = __geteuid();
  gid = __getegid();
  if ((len = __getgroups(max_nr_groups, gids)) < 0)
    abort();
  return authunix_create(machname, uid, gid, MIN(NGRPS, len), gids);
}
```