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

```asm
<checkthat>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  mov    %rcx,-0x30(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  jmp    L15
L23:
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,(%rax)
L15:
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L23
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x9,%al
  je     L23
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L23
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x24(%rbp)
  jmp    L94
L81:
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,(%rax)
L94:
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L27
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x9,%al
  jne    L81
L27:
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  sub    -0x24(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edi
  call   <ft_memalloc@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x20(%rbp),%rax
  mov    -0x24(%rbp),%edx
  mov    %edx,(%rax)
  movl   $0x0,-0x24(%rbp)
  jmp    L108
L51:
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%ecx
  mov    -0x20(%rbp),%rdx
  mov    %ecx,(%rdx)
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x10(%rbp),%rsi
  mov    -0x24(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x24(%rbp)
  cltq
  lea    (%rsi,%rax,1),%rdx
  movzbl (%rcx),%eax
  mov    %al,(%rdx)
L108:
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L26
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L26
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x9,%al
  jne    L51
L26:
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x10(%rbp),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x10(%rbp),%rax
  mov    -0x30(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <ft_strcmp@plt>
  test   %rax,%rax
  je     L150
  lea    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <ft_memdel@plt>
  mov    -0x30(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x6e,%al
  jne    L140
  mov    $0x2,%eax
  jmp    L122
L140:
  mov    $0x1,%eax
  jmp    L122
L150:
  lea    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <ft_memdel@plt>
  mov    $0x0,%eax
L122:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L158
  call   <__stack_chk_fail@plt>
L158:
  leave
  ret
```

assistant: ```c
int checkthat(char *buff, int *i, int save, char *find) {
  char *name;
  while (buff[i[0]] == ' ' || buff[i[0]] == '\t' || buff[i[0]] == '\n')
    (*i)++;
  save = i[0];
  while (buff[i[0]] != ' ' && buff[i[0]] != '\t')
    (*i)++;
  name = (char *)ft_memalloc(sizeof(char) * ((i[0] - save) + 1));
  i[0] = save;
  save = 0;
  while (buff[*i] && buff[i[0]] != ' ' && buff[i[0]] != '\t')
    name[save++] = buff[i[0]++];
  i[0]++;
  name[save] = '\0';
  if ((ft_strcmp(name, find)) != 0) {
    ft_memdel((void **)&name);
    if (find[1] == 'n')
      return (2);
    return (1);
  }
  ft_memdel((void **)&name);
  return (0);
}
```