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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x34(%rbp),%rax
  mov    %rax,%rsi
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  lea    -0x30(%rbp),%rax
  mov    %rax,%rsi
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x34(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x14f8b589,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0xd,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x34(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x68db8bad,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0xc,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  movslq %eax,%rdx
  imul   $0x51eb851f,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x5,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  mov    %edx,-0x20(%rbp)
  mov    -0x20(%rbp),%edx
  imul   $0x64,%edx,%edx
  sub    %edx,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x34(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x68db8bad,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0xc,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  mov    %edx,-0x1c(%rbp)
  mov    -0x1c(%rbp),%edx
  imul   $0x2710,%edx,%edx
  sub    %edx,%eax
  mov    %eax,-0x1c(%rbp)
  movl   $0x0,-0x28(%rbp)
  jmp    L99
L62:
  lea    -0x2c(%rbp),%rax
  mov    %rax,%rsi
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x14f8b589,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0xd,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x68db8bad,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0xc,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  movslq %eax,%rdx
  imul   $0x51eb851f,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x5,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  mov    %edx,-0x14(%rbp)
  mov    -0x14(%rbp),%edx
  imul   $0x64,%edx,%edx
  sub    %edx,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x68db8bad,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0xc,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  mov    %edx,-0x10(%rbp)
  mov    -0x10(%rbp),%edx
  imul   $0x2710,%edx,%edx
  sub    %edx,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x1c(%rbp),%eax
  sub    -0x10(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  cmpl   $0x11,-0xc(%rbp)
  jg     L47
  lea    D21(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L46
L47:
  cmpl   $0x12,-0xc(%rbp)
  jne    L11
  mov    -0x14(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jge    L103
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L46
L103:
  mov    -0x14(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jne    L31
  mov    -0x18(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jg     L96
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L46
L96:
  lea    D21(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L46
L31:
  lea    D21(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L46
L11:
  cmpl   $0x12,-0xc(%rbp)
  jle    L46
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L46:
  addl   $0x1,-0x28(%rbp)
L99:
  mov    -0x30(%rbp),%eax
  cmp    %eax,-0x28(%rbp)
  jl     L62
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L48
  call   <__stack_chk_fail@plt>
L48:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D15
type_infered: string
name: unpack_data
arguments: data_label: D21
type_infered: string
name: unpack_data
arguments: data_label: D7
type_infered: string

tool: D15: %d

tool: D21: NE


tool: D7: DA


assistant: ```c
int main() {
  int date;
  scanf("%d", &date);
  int n;
  scanf("%d", &n);
  int i;
  int day = date / 100000;
  int month = (date / 10000) % 100;
  int year = date % 10000;
  for (i = 0; i < n; ++i) {
    int d;
    scanf("%d", &d);
    int dd = d / 100000;
    int mm = (d / 10000) % 100;
    int yy = d % 10000;
    int years = year - yy;
    if (years < 18) {
      printf("NE\n");
    } else if (years == 18) {
      if (mm < month) {
        printf("DA\n");
      } else if (mm == month) {
        if (dd <= day) {
          printf("DA\n");
        } else {
          printf("NE\n");
        }
      } else {
        printf("NE\n");
      }
    } else if (years > 18) {
      printf("DA\n");
    }
  }
  return 0;
}
```