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

```asm
<main>:
  endbr64
  push   %rbx
  lea    D5(%rip),%rdi
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0xd(%rsp),%rbx
  xor    %eax,%eax
  movb   $0x0,0x17(%rsp)
  mov    %rbx,%rsi
  mov    %ax,0x15(%rsp)
  movq   $0x0,0xd(%rsp)
  call   <scanf@plt>
  movsbl 0xf(%rsp),%eax
  movsbl 0x10(%rsp),%edx
  movzbl 0xd(%rsp),%r9d
  movzbl 0xe(%rsp),%r8d
  lea    -0xf0(%rax,%rax,4),%eax
  movzbl 0x11(%rsp),%ecx
  movsbl 0x12(%rsp),%esi
  lea    (%rdx,%rax,2),%eax
  lea    -0x31(%rax),%edi
  cmp    $0x33,%edi
  ja     L158
  lea    -0x3d(%rax),%edi
  lea    -0x44(%rax),%edx
  cmp    $0x13,%edi
  jbe    L139
  lea    -0x51(%rax),%edi
  lea    -0x30(%rax),%edx
  cmp    $0x13,%edi
  ja     L139
  lea    -0x58(%rax),%edx
L139:
  movsbl %cl,%eax
  lea    -0xf0(%rax,%rax,4),%eax
  lea    -0x30(%rsi,%rax,2),%esi
  cmp    $0xc,%edx
  ja     L115
  lea    D23(%rip),%rcx
  movslq (%rcx,%rdx,4),%rax
  add    %rcx,%rax
  notrack jmp *%rax
  cmp    $0x1f,%esi
  jg     L158
L115:
  mov    $0x1,%r8d
  xor    %ecx,%ecx
  xor    %eax,%eax
  lea    D0(%rip),%rdi
  nop
L92:
  movsbl (%rbx,%rcx,1),%edx
  sub    $0x30,%edx
  cmp    $0x8,%ecx
  ja     L211
  mov    %ecx,%esi
  movslq (%rdi,%rsi,4),%rsi
  add    %rdi,%rsi
  notrack jmp *%rsi
  imul   $0x6,%edx,%edx
  add    %edx,%eax
L93:
  mov    $0xb,%ecx
  cltd
  idiv   %ecx
  cmp    $0xa,%edx
  jne    L183
  xor    %edx,%edx
L183:
  movsbl 0x16(%rsp),%eax
  sub    $0x30,%eax
  cmp    %eax,%edx
  je     L161
  lea    D29(%rip),%rdi
  call   <printf@plt>
  xor    %eax,%eax
L206:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L90
  add    $0x20,%rsp
  pop    %rbx
  ret
  lea    (%rdx,%rdx,2),%edx
  nopl   0x0(%rax,%rax,1)
L222:
  add    %edx,%eax
L104:
  add    $0x1,%rcx
  add    $0x1,%r8d
  jmp    L92
  lea    (%rdx,%rdx,8),%edx
  jmp    L222
  imul   $0x7,%edx,%edx
  jmp    L222
  imul   $0xa,%edx,%edx
  jmp    L222
  lea    (%rdx,%rdx,4),%edx
  jmp    L222
  shl    $0x3,%edx
  jmp    L222
  shl    $0x2,%edx
  jmp    L222
  cmp    $0x1e,%esi
  jle    L115
L158:
  lea    D9(%rip),%rdi
  call   <printf@plt>
  xor    %eax,%eax
  jmp    L206
L211:
  lea    (%rax,%rdx,2),%eax
  cmp    $0x9,%r8d
  jne    L104
  jmp    L93
  lea    (%r8,%r9,2),%eax
  test   $0x3,%al
  jne    L45
  cmp    $0x1d,%esi
  jle    L115
  jmp    L158
L161:
  lea    D31(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%eax
  jmp    L206
L45:
  cmp    $0x1c,%esi
  jle    L115
  jmp    L158
L90:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D5
datatype: string
name: retrieve_data
arguments: data_tag: D29
datatype: string
name: retrieve_data
arguments: data_tag: D9
datatype: string
name: retrieve_data
arguments: data_tag: D31
datatype: string

tool: D5: %12s

tool: D29: 0

tool: D9: 
0

tool: D31: 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;
}
```