user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<ex8>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D81(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L212:
  lea    D187(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    -0x18(%rbp),%rax
  mov    %rax,%rsi
  lea    D183(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x18(%rbp),%eax
  test   %eax,%eax
  jle    L212
  mov    -0x18(%rbp),%eax
  cmp    $0x1f,%eax
  jg     L212
L49:
  lea    D25(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    -0x1c(%rbp),%rax
  mov    %rax,%rsi
  lea    D183(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x1c(%rbp),%eax
  test   %eax,%eax
  jle    L49
  mov    -0x1c(%rbp),%eax
  cmp    $0xc,%eax
  jg     L49
L126:
  lea    D91(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rsi
  lea    D183(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x20(%rbp),%eax
  test   %eax,%eax
  jle    L126
  lea    D195(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L158:
  lea    D187(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    -0xc(%rbp),%rax
  mov    %rax,%rsi
  lea    D183(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0xc(%rbp),%eax
  test   %eax,%eax
  jle    L158
  mov    -0xc(%rbp),%eax
  cmp    $0x1f,%eax
  jg     L158
L42:
  lea    D25(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    -0x10(%rbp),%rax
  mov    %rax,%rsi
  lea    D183(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x10(%rbp),%eax
  test   %eax,%eax
  jle    L42
  mov    -0x10(%rbp),%eax
  cmp    $0xc,%eax
  jg     L42
L39:
  lea    D91(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    -0x14(%rbp),%rax
  mov    %rax,%rsi
  lea    D183(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x14(%rbp),%eax
  test   %eax,%eax
  jle    L39
  mov    -0x20(%rbp),%edx
  mov    -0x14(%rbp),%eax
  cmp    %eax,%edx
  jle    L86
  lea    D206(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L210
L86:
  mov    -0x14(%rbp),%edx
  mov    -0x20(%rbp),%eax
  cmp    %eax,%edx
  jle    L40
  lea    D135(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L210
L40:
  mov    -0x1c(%rbp),%edx
  mov    -0x10(%rbp),%eax
  cmp    %eax,%edx
  jle    L175
  lea    D206(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L210
L175:
  mov    -0x10(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jle    L204
  lea    D135(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L210
L204:
  mov    -0x18(%rbp),%edx
  mov    -0xc(%rbp),%eax
  cmp    %eax,%edx
  jle    L135
  lea    D206(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L210
L135:
  mov    -0xc(%rbp),%edx
  mov    -0x18(%rbp),%eax
  cmp    %eax,%edx
  jle    L59
  lea    D135(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L210
L59:
  lea    D112(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L210:
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L16
  call   <__stack_chk_fail@plt>
L16:
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D81
type_infered: string
name: read_data
arguments: label: D187
type_infered: string
name: read_data
arguments: label: D183
type_infered: string
name: read_data
arguments: label: D25
type_infered: string
name: read_data
arguments: label: D91
type_infered: string
name: read_data
arguments: label: D195
type_infered: string
name: read_data
arguments: label: D206
type_infered: string
name: read_data
arguments: label: D135
type_infered: string
name: read_data
arguments: label: D112
type_infered: string

tool: D81: Informe a primeira data: 


tool: D187: 	Dia: 

tool: D183: %d

tool: D25: 	Mes: 

tool: D91: 	Ano: 

tool: D195: Informe a segunda data: 


tool: D206: A primeira data e maior.


tool: D135: A segunda data e maior.


tool: D112: As datas sao iguais.


assistant: ```c
void ex8() {
  int ano1, mes1, dia1, ano2, mes2, dia2;
  printf("Informe a primeira data: \n");
  do {
    printf("\tDia: ");
    scanf("%d", &dia1);
  } while (!(dia1 > 0 && dia1 < 32));
  do {
    printf("\tMes: ");
    scanf("%d", &mes1);
  } while (!(mes1 > 0 && mes1 < 13));
  do {
    printf("\tAno: ");
    scanf("%d", &ano1);
  } while (!(ano1 > 0));
  printf("Informe a segunda data: \n");
  do {
    printf("\tDia: ");
    scanf("%d", &dia2);
  } while (!(dia2 > 0 && dia2 < 32));
  do {
    printf("\tMes: ");
    scanf("%d", &mes2);
  } while (!(mes2 > 0 && mes2 < 13));
  do {
    printf("\tAno: ");
    scanf("%d", &ano2);
  } while (!(ano2 > 0));
  if (ano1 > ano2)
    printf("A primeira data e maior.\n");
  else if (ano2 > ano1)
    printf("A segunda data e maior.\n");
  else {
    if (mes1 > mes2)
      printf("A primeira data e maior.\n");
    else if (mes2 > mes1)
      printf("A segunda data e maior.\n");
    else {
      if (dia1 > dia2)
        printf("A primeira data e maior.\n");
      else if (dia2 > dia1)
        printf("A segunda data e maior.\n");
      else
        printf("As datas sao iguais.\n");
    }
  }
}
```