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

```asm
<main>:
  endbr64
  sub    $0x28,%rsp
  lea    D29(%rip),%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0xd(%rsp),%rsi
  xor    %eax,%eax
  movb   $0x0,0x17(%rsp)
  movq   $0x0,0xd(%rsp)
  mov    %ax,0x15(%rsp)
  call   <scanf@plt>
  movsbl 0xf(%rsp),%ecx
  movsbl 0x10(%rsp),%edx
  movsbl 0xd(%rsp),%r10d
  movsbl 0xe(%rsp),%r9d
  sub    $0x30,%ecx
  movzbl 0x11(%rsp),%r8d
  lea    (%rcx,%rcx,4),%eax
  lea    (%rdx,%rax,2),%esi
  movsbl 0x12(%rsp),%eax
  lea    -0x31(%rsi),%r11d
  cmp    $0x33,%r11d
  ja     L129
  lea    -0x3d(%rsi),%r11d
  lea    -0x44(%rsi),%edi
  cmp    $0x13,%r11d
  jbe    L66
  lea    -0x51(%rsi),%r11d
  lea    -0x30(%rsi),%edi
  cmp    $0x13,%r11d
  ja     L66
  lea    -0x58(%rsi),%edi
L66:
  movsbl %r8b,%esi
  lea    -0xf0(%rsi,%rsi,4),%esi
  add    %esi,%esi
  lea    -0x30(%rax,%rsi,1),%r11d
  cmp    $0xc,%edi
  ja     L162
  lea    D9(%rip),%r8
  movslq (%r8,%rdi,4),%rdi
  add    %r8,%rdi
  notrack jmp *%rdi
  cmp    $0x1f,%r11d
  jg     L129
L162:
  lea    -0x60(%r10,%r10,1),%edi
  sub    $0x30,%edx
  sub    $0x30,%eax
  lea    -0xc0(%rdi,%r9,4),%edi
  lea    (%rdx,%rdx,4),%edx
  lea    (%rdi,%rcx,8),%ecx
  lea    (%rax,%rax,8),%eax
  add    %ecx,%edx
  mov    $0xb,%ecx
  add    %edx,%esi
  movsbl 0x13(%rsp),%edx
  add    %esi,%eax
  sub    $0x30,%edx
  imul   $0x7,%edx,%edx
  add    %edx,%eax
  movsbl 0x14(%rsp),%edx
  sub    $0x30,%edx
  lea    (%rdx,%rdx,2),%edx
  add    %eax,%edx
  movsbl 0x15(%rsp),%eax
  sub    $0x30,%eax
  imul   $0x6,%eax,%eax
  add    %edx,%eax
  cltd
  idiv   %ecx
  cmp    $0xa,%edx
  je     L85
L8:
  movsbl 0x16(%rsp),%eax
  sub    $0x30,%eax
  cmp    %eax,%edx
  je     L141
  lea    D3(%rip),%rdi
  call   <printf@plt>
  xor    %eax,%eax
L121:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L55
  add    $0x28,%rsp
  ret
  cmp    $0x1e,%r11d
  jle    L162
L129:
  lea    D11(%rip),%rdi
  call   <printf@plt>
  xor    %eax,%eax
  jmp    L121
L85:
  xor    %edx,%edx
  jmp    L8
L141:
  lea    D7(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%eax
  jmp    L121
  lea    -0x60(%r9,%r10,2),%edi
  and    $0x3,%dil
  jne    L19
  cmp    $0x1d,%r11d
  jle    L162
  jmp    L129
L19:
  cmp    $0x1c,%r11d
  jle    L162
  jmp    L129
L55:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D29
type_guessed: string
name: disassemble_data
arguments: label: D3
type_guessed: string
name: disassemble_data
arguments: label: D11
type_guessed: string
name: disassemble_data
arguments: label: D7
type_guessed: string

tool: D29: %12s

tool: D3: 0

tool: D11: 
0

tool: D7: 1

assistant: ```c
int main() {
  char EGN[11] = {0};
  int temp = 0;
  int temp2 = 0;
  int day = 0;
  int month = 0;
  int year = 0;
  int controlnum = 0;
  scanf("%12s", EGN);
  temp = (temp + EGN[0]) - 48;
  temp = temp * 10;
  temp = (temp + EGN[1]) - 48;
  year = temp;
  temp = 0;
  temp = (temp + EGN[2]) - 48;
  temp = temp * 10;
  temp = (temp + EGN[3]) - 48;
  month = temp;
  temp = 0;
  temp = (temp + EGN[4]) - 48;
  temp = temp * 10;
  temp = (temp + EGN[5]) - 48;
  day = temp;
  temp = 0;
  if (month > 52) {
    printf("\n0");
    return 0;
  }
  if (month < 1) {
    printf("\n0");
    return 0;
  }
  if (month > 12 && month < 33) {
    month = month - 20;
  }
  if (month > 32 && month < 53) {
    month = month - 40;
  }
  switch (month) {
  case 1:
    if (day > 31) {
      printf("\n0");
      return 0;
    }
    break;
  case 2:
    if (year % 4 == 0) {
      if (day > 29) {
        printf("\n0");
        return 0;
      }
    }
    if (year % 4 != 0) {
      if (day > 28) {
        printf("\n0");
        return 0;
      }
    }
    break;
  case 3:
    if (day > 31) {
      printf("\n0");
      return 0;
    }
    break;
  case 4:
    if (day > 30) {
      printf("\n0");
      return 0;
    }
    break;
  case 5:
    if (day > 31) {
      printf("\n0");
      return 0;
    }
    break;
  case 6:
    if (day > 30) {
      printf("\n0");
      return 0;
    }
    break;
  case 7:
    if (day > 31) {
      printf("\n0");
      return 0;
    }
    break;
  case 8:
    if (day > 31) {
      printf("\n0");
      return 0;
    }
    break;
  case 9:
    if (day > 30) {
      printf("\n0");
      return 0;
    }
    break;
  case 10:
    if (day > 31) {
      printf("\n0");
      return 0;
    }
    break;
  case 11:
    if (day > 30) {
      printf("\n0");
      return 0;
    }
    break;
  case 12:
    if (day > 31) {
      printf("\n0");
      return 0;
    }
    break;
  }
  temp = 0;
  while (temp < 9) {
    temp2 = EGN[temp] - 48;
    switch (temp) {
    case 0:
      temp2 = temp2 * 2;
      break;
    case 1:
      temp2 = temp2 * 4;
      break;
    case 2:
      temp2 = temp2 * 8;
      break;
    case 3:
      temp2 = temp2 * 5;
      break;
    case 4:
      temp2 = temp2 * 10;
      break;
    case 5:
      temp2 = temp2 * 9;
      break;
    case 6:
      temp2 = temp2 * 7;
      break;
    case 7:
      temp2 = temp2 * 3;
      break;
    case 8:
      temp2 = temp2 * 6;
      break;
    }
    controlnum = controlnum + temp2;
    temp++;
  }
  temp = controlnum % 11;
  if (temp == 10) {
    controlnum = 0;
  }
  if (temp < 10) {
    controlnum = temp;
  }
  temp = EGN[9] - 48;
  if (controlnum != temp) {
    printf("0");
    return 0;
  }
  if (controlnum == temp) {
    printf("1");
    return 1;
  }
  return 0;
}
```