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

```asm
<validatom>:
  endbr64
  movzbl (%rdi),%eax
  xor    %r8d,%r8d
  test   %al,%al
  je     L107
  xchg   %ax,%ax
L237:
  cmp    $0x2e,%al
  jne    L145
  add    $0x1,%r8d
  mov    %rdi,%rdx
L145:
  movzbl 0x1(%rdi),%eax
  add    $0x1,%rdi
  test   %al,%al
  jne    L237
  cmp    $0x1,%r8d
  jne    L323
  movzbl 0x2(%rdx),%eax
  test   %al,%al
  jne    L282
  movzbl 0x1(%rdx),%eax
  cmp    $0x78,%al
  je     L107
  sub    $0x61,%eax
  xor    %r8d,%r8d
  cmp    $0x19,%al
  ja     L107
  movzbl %al,%eax
  lea    D8(%rip),%rdx
  mov    (%rdx,%rax,4),%r8d
L107:
  mov    %r8d,%eax
  ret
  nopl   (%rax)
L282:
  movzbl 0x3(%rdx),%ecx
  movzbl 0x4(%rdx),%esi
  test   %cl,%cl
  jne    L140
  movzbl 0x1(%rdx),%edi
  cmp    $0x66,%dil
  je     L325
  cmp    $0x64,%dil
  je     L55
  cmp    $0x76,%dil
  jne    L210
  cmp    $0x78,%al
  je     L331
  cmp    $0x79,%al
  je     L111
  xor    %r8d,%r8d
  cmp    $0x7a,%al
  mov    $0xc,%eax
  cmove  %eax,%r8d
  jmp    L107
L210:
  cmp    $0x61,%al
  jne    L140
  mov    $0x13,%r8d
  cmp    $0x6e,%dil
  je     L107
  nopw   0x0(%rax,%rax,1)
L140:
  xor    %r8d,%r8d
  test   %sil,%sil
  jne    L107
  movzbl 0x1(%rdx),%edx
  cmp    $0x63,%dl
  jne    L334
  cmp    $0x69,%cl
  jne    L323
  mov    $0x11,%r8d
  cmp    $0x68,%al
  je     L107
L323:
  xor    %r8d,%r8d
  mov    %r8d,%eax
  ret
L334:
  cmp    $0x6a,%dl
  jne    L2
  cmp    $0x61,%al
  jne    L323
  mov    $0x12,%r8d
  cmp    $0x61,%cl
  jne    L323
  jmp    L107
  nopl   0x0(%rax)
L55:
  cmp    $0x78,%al
  je     L268
  cmp    $0x79,%al
  je     L380
  xor    %r8d,%r8d
  cmp    $0x7a,%al
  sete   %r8b
  lea    (%r8,%r8,8),%r8d
  jmp    L107
L325:
  cmp    $0x78,%al
  je     L136
  cmp    $0x79,%al
  je     L20
  cmp    $0x7a,%al
  jne    L140
  mov    $0x6,%r8d
  jmp    L107
L2:
  cmp    $0x72,%cl
  sete   %cl
  cmp    $0x65,%al
  sete   %al
  test   %al,%cl
  je     L323
  mov    $0x14,%r8d
  cmp    $0x73,%dl
  jne    L323
  jmp    L107
L136:
  mov    $0x4,%r8d
  jmp    L107
L20:
  mov    $0x5,%r8d
  jmp    L107
L380:
  mov    $0x8,%r8d
  jmp    L107
L268:
  mov    $0x7,%r8d
  jmp    L107
L331:
  mov    $0xa,%r8d
  jmp    L107
L111:
  mov    $0xb,%r8d
  jmp    L107
```

tool_calls: name: retrieve_data
arguments: tag: D8
type: string

tool: D8: 

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);
}
```