user: Converte this assembly snippet into its equivalent C code:

```asm
<_nl_explode_name>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %rcx,-0x30(%rbp)
  mov    %r8,-0x38(%rbp)
  mov    %r9,-0x40(%rbp)
  mov    -0x28(%rbp),%rax
  movq   $0x0,(%rax)
  mov    -0x30(%rbp),%rax
  movq   $0x0,(%rax)
  mov    -0x38(%rbp),%rax
  movq   $0x0,(%rax)
  mov    -0x40(%rbp),%rax
  movq   $0x0,(%rax)
  movl   $0x0,-0xc(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x20(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <_nl_find_language@plt>
  cltq
  mov    %rax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  mov    (%rax),%rax
  cmp    %rax,-0x8(%rbp)
  jne    L57
  mov    -0x20(%rbp),%rax
  mov    (%rax),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <__rawmemchr@plt>
  cltq
  mov    %rax,-0x8(%rbp)
  jmp    L121
L57:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x40,%al
  je     L121
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5f,%al
  jne    L33
  mov    -0x8(%rbp),%rax
  movb   $0x0,(%rax)
  addq   $0x1,-0x8(%rbp)
  mov    -0x30(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  mov    %rdx,(%rax)
  jmp    L183
L82:
  addq   $0x1,-0x8(%rbp)
L183:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L89
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  je     L89
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x40,%al
  jne    L82
L89:
  orl    $0x4,-0xc(%rbp)
L33:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  jne    L121
  mov    -0x8(%rbp),%rax
  movb   $0x0,(%rax)
  addq   $0x1,-0x8(%rbp)
  mov    -0x38(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  mov    %rdx,(%rax)
  jmp    L208
L226:
  addq   $0x1,-0x8(%rbp)
L208:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L222
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x40,%al
  jne    L226
L222:
  orl    $0x2,-0xc(%rbp)
  mov    -0x38(%rbp),%rax
  mov    (%rax),%rax
  cmp    %rax,-0x8(%rbp)
  je     L121
  mov    -0x38(%rbp),%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L121
  mov    -0x38(%rbp),%rax
  mov    (%rax),%rcx
  mov    -0x8(%rbp),%rax
  sub    %rcx,%rax
  mov    %rax,%rdx
  mov    -0x38(%rbp),%rax
  mov    (%rax),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <_nl_normalize_codeset@plt>
  cltq
  mov    %rax,%rdx
  mov    -0x40(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L147
  mov    $0xffffffff,%eax
  jmp    L100
L147:
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x38(%rbp),%rax
  mov    (%rax),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L93
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <free@plt>
  jmp    L121
L93:
  orl    $0x1,-0xc(%rbp)
L121:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x40,%al
  jne    L15
  mov    -0x8(%rbp),%rax
  movb   $0x0,(%rax)
  addq   $0x1,-0x8(%rbp)
  mov    -0x28(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L15
  orl    $0x8,-0xc(%rbp)
L15:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  je     L79
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L79
  andl   $0xfffffffb,-0xc(%rbp)
L79:
  mov    -0x38(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  je     L105
  mov    -0x38(%rbp),%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L105
  andl   $0xfffffffd,-0xc(%rbp)
L105:
  mov    -0xc(%rbp),%eax
L100:
  leave
  ret
```

assistant: ```c
int _nl_explode_name(name, language, modifier, territory, codeset, normalized_codeset)
char *name;
const char **language;
const char **modifier;
const char **territory;
const char **codeset;
const char **normalized_codeset;
{
  char *cp;
  int mask;
  *modifier = ((void *)0);
  *territory = ((void *)0);
  *codeset = ((void *)0);
  *normalized_codeset = ((void *)0);
  mask = 0;
  *language = cp = name;
  cp = _nl_find_language(*language);
  if (*language == cp)
    cp = __rawmemchr(*language, '\0');
  else if (cp[0] != '@') {
    if (cp[0] == '_') {
      cp[0] = '\0';
      *territory = ++cp;
      while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@')
        ++cp;
      mask |= 4;
    }
    if (cp[0] == '.') {
      cp[0] = '\0';
      *codeset = ++cp;
      while (cp[0] != '\0' && cp[0] != '@')
        ++cp;
      mask |= 2;
      if (*codeset != cp && (*codeset)[0] != '\0') {
        *normalized_codeset = _nl_normalize_codeset(*codeset, cp - *codeset);
        if (*normalized_codeset == ((void *)0))
          return -1;
        else if (strcmp(*codeset, *normalized_codeset) == 0)
          free((char *)*normalized_codeset);
        else
          mask |= 1;
      }
    }
  }
  if (cp[0] == '@') {
    cp[0] = '\0';
    *modifier = ++cp;
    if (cp[0] != '\0')
      mask |= 8;
  }
  if (*territory != ((void *)0) && (*territory)[0] == '\0')
    mask &= ~4;
  if (*codeset != ((void *)0) && (*codeset)[0] == '\0')
    mask &= ~2;
  return mask;
}
```