user: Translate the below assembly code into C programming language:

```asm
<validatom>:
  endbr64
  movzbl (%rdi),%eax
  test   %al,%al
  je     L58
  mov    $0x0,%edx
  jmp    L109
L382:
  add    $0x1,%rdi
  movzbl (%rdi),%eax
  test   %al,%al
  je     L230
L109:
  cmp    $0x2e,%al
  jne    L382
  add    $0x1,%edx
  mov    %rdi,%rcx
  jmp    L382
L230:
  cmp    $0x1,%edx
  jne    L42
  movzbl 0x2(%rcx),%eax
  test   %al,%al
  jne    L250
  movzbl 0x1(%rcx),%eax
  cmp    $0x78,%al
  je     L337
  sub    $0x61,%eax
  cmp    $0x19,%al
  ja     L63
  movzbl %al,%eax
  lea    D9(%rip),%rdx
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  mov    $0x3,%edx
  jmp    L337
  mov    $0xd,%edx
  jmp    L337
  mov    $0xe,%edx
  jmp    L337
  mov    $0xf,%edx
  jmp    L337
  mov    $0x10,%edx
  jmp    L337
L63:
  mov    $0x0,%edx
  jmp    L337
L250:
  movzbl 0x4(%rcx),%edi
  movzbl 0x3(%rcx),%esi
  test   %sil,%sil
  jne    L170
  movzbl 0x1(%rcx),%ecx
  cmp    $0x66,%cl
  je     L484
  cmp    $0x64,%cl
  je     L376
  cmp    $0x76,%cl
  jne    L344
  cmp    $0x78,%al
  je     L26
  cmp    $0x79,%al
  je     L246
  cmp    $0x7a,%al
  jne    L166
  mov    $0xc,%edx
  jmp    L337
L484:
  cmp    $0x78,%al
  je     L507
  cmp    $0x79,%al
  je     L117
  cmp    $0x7a,%al
  je     L255
L166:
  test   %dil,%dil
  jne    L269
L467:
  cmp    $0x65,%al
  sete   %dl
  cmp    $0x72,%sil
  sete   %al
  test   %al,%dl
  je     L478
  mov    $0x14,%edx
  cmp    $0x73,%cl
  je     L337
L478:
  mov    $0x0,%edx
  jmp    L337
L376:
  cmp    $0x78,%al
  je     L281
  cmp    $0x79,%al
  je     L197
  cmp    $0x7a,%al
  jne    L166
  mov    $0x9,%edx
  jmp    L337
L344:
  cmp    $0x61,%al
  jne    L166
  mov    $0x13,%edx
  cmp    $0x6e,%cl
  jne    L166
  jmp    L337
L170:
  mov    $0x0,%edx
  test   %dil,%dil
  jne    L337
  movzbl 0x1(%rcx),%ecx
  cmp    $0x68,%al
  sete   %dil
  cmp    $0x63,%cl
  sete   %dl
  test   %dl,%dil
  je     L61
  cmp    $0x69,%sil
  je     L236
L61:
  cmp    $0x61,%al
  sete   %dil
  cmp    $0x61,%sil
  sete   %dl
  test   %dl,%dil
  je     L467
  cmp    $0x6a,%cl
  jne    L467
  mov    $0x12,%edx
  jmp    L337
L58:
  mov    $0x0,%edx
  jmp    L337
L42:
  mov    $0x0,%edx
L337:
  mov    %edx,%eax
  ret
  mov    $0x2,%edx
  jmp    L337
L507:
  mov    $0x4,%edx
  jmp    L337
L117:
  mov    $0x5,%edx
  jmp    L337
L255:
  mov    $0x6,%edx
  jmp    L337
L281:
  mov    $0x7,%edx
  jmp    L337
L197:
  mov    $0x8,%edx
  jmp    L337
L26:
  mov    $0xa,%edx
  jmp    L337
L246:
  mov    $0xb,%edx
  jmp    L337
L236:
  mov    $0x11,%edx
  jmp    L337
L269:
  mov    $0x0,%edx
  jmp    L337
```

assistant: ```c
int validatom(who)
char *who;
{
  char *cp, *pp, *cp1, *cp2, *cp3;
  int i;
  cp = who;
  i = 0;
  while (*cp != '\0') {
    if (*cp == '.') {
      i++;
      pp = cp;
    }
    cp++;
  }
  if (i != 1)
    return (0);
  cp = pp;
  cp++;
  cp1 = cp;
  cp1++;
  cp2 = cp1;
  cp2++;
  cp3 = cp2;
  cp3++;
  *cp3 == '\0';
  if (*cp1 == '\0') {
    if (*cp == 'x')
      return (1);
    if (*cp == 'y')
      return (2);
    if (*cp == 'z')
      return (3);
    if (*cp == 'q')
      return (13);
    if (*cp == 'a')
      return (14);
    if (*cp == 'b')
      return (15);
    if (*cp == 'm')
      return (16);
    return (0);
  }
  if (*cp2 == '\0') {
    if (*cp == 'f') {
      if (*cp1 == 'x')
        return (4);
      if (*cp1 == 'y')
        return (5);
      if (*cp1 == 'z')
        return (6);
    }
    if (*cp == 'd') {
      if (*cp1 == 'x')
        return (7);
      if (*cp1 == 'y')
        return (8);
      if (*cp1 == 'z')
        return (9);
    }
    if (*cp == 'v') {
      if (*cp1 == 'x')
        return (10);
      if (*cp1 == 'y')
        return (11);
      if (*cp1 == 'z')
        return (12);
    }
    if (*cp == 'n') {
      if (*cp1 == 'a')
        return 19;
    }
  }
  if (*cp3 == '\0') {
    if (*cp == 'c' && *cp1 == 'h' && *cp2 == 'i')
      return 17;
    if (*cp == 'j' && *cp1 == 'a' && *cp2 == 'a')
      return 18;
    if (*cp == 's' && *cp1 == 'e' && *cp2 == 'r')
      return 20;
  }
  return (0);
}
```