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

```asm
<main>:
  endbr64
  push   %r12
  lea    D8(%rip),%rdi
  push   %rbp
  lea    D35(%rip),%rbp
  sub    $0x58,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%r12
  call   <printf@plt>
  lea    0x10(%rsp),%rdi
  call   <gets@plt>
  lea    D107(%rip),%rdi
  call   <printf@plt>
  lea    0x8(%rsp),%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  lea    D48(%rip),%rdi
  call   <printf@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  movss  0xc(%rsp),%xmm0
  movss  0x8(%rsp),%xmm1
  comiss %xmm0,%xmm1
  jbe    L55
  lea    D79(%rip),%rdi
  call   <printf@plt>
L57:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L48
  add    $0x58,%rsp
  pop    %rbp
  pop    %r12
  ret
L55:
  lea    D90(%rip),%rdi
  movss  %xmm0,0x8(%rsp)
  call   <printf@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  movss  0xc(%rsp),%xmm0
  movss  0x8(%rsp),%xmm1
  comiss %xmm0,%xmm1
  jbe    L72
  lea    D99(%rip),%rdi
  call   <printf@plt>
  jmp    L57
L72:
  lea    D65(%rip),%rdi
  movss  %xmm0,0x8(%rsp)
  call   <printf@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  movss  0xc(%rsp),%xmm0
  movss  0x8(%rsp),%xmm1
  comiss %xmm0,%xmm1
  ja     L22
  lea    D14(%rip),%rdi
  movss  %xmm0,0x8(%rsp)
  call   <printf@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  movss  0x8(%rsp),%xmm0
  comiss 0xc(%rsp),%xmm0
  jbe    L8
  lea    D88(%rip),%rdi
  call   <printf@plt>
  jmp    L57
L22:
  lea    D9(%rip),%rdi
  call   <printf@plt>
  jmp    L57
L8:
  lea    D58(%rip),%rdi
  call   <printf@plt>
  jmp    L57
L48:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D8
data_type: string
name: disassemble_data
arguments: data_label: D35
data_type: string
name: disassemble_data
arguments: data_label: D107
data_type: string
name: disassemble_data
arguments: data_label: D48
data_type: string
name: disassemble_data
arguments: data_label: D79
data_type: string
name: disassemble_data
arguments: data_label: D90
data_type: string
name: disassemble_data
arguments: data_label: D99
data_type: string
name: disassemble_data
arguments: data_label: D65
data_type: string
name: disassemble_data
arguments: data_label: D14
data_type: string
name: disassemble_data
arguments: data_label: D88
data_type: string
name: disassemble_data
arguments: data_label: D9
data_type: string
name: disassemble_data
arguments: data_label: D58
data_type: string

tool: D8: Nome do aluno: 

tool: D35: %f

tool: D107: Nota da primeira prova: 

tool: D48: Nota da segunda prova: 

tool: D79: 
Refaca a segunda prova.


tool: D90: Nota da terceira prova: 

tool: D99: 
Refaca a terceira prova.


tool: D65: Nota da quarta prova: 

tool: D14: Nota da quinta prova: 

tool: D88: 
Refaca a quinta prova.


tool: D9: 
Refaca a quarta prova.


tool: D58: 
Nao eh necessario refazer nenhuma prova.


assistant: ```c
void main() {
  char nome[50];
  float nota1, nota2;
  printf("Nome do aluno: ");
  gets(nome);
  printf("Nota da primeira prova: ");
  scanf("%f", &nota1);
  printf("Nota da segunda prova: ");
  scanf("%f", &nota2);
  if (nota1 > nota2)
    printf("\nRefaca a segunda prova.\n");
  else {
    nota1 = nota2;
    printf("Nota da terceira prova: ");
    scanf("%f", &nota2);
    if (nota1 > nota2)
      printf("\nRefaca a terceira prova.\n");
    else {
      nota1 = nota2;
      printf("Nota da quarta prova: ");
      scanf("%f", &nota2);
      if (nota1 > nota2)
        printf("\nRefaca a quarta prova.\n");
      else {
        nota1 = nota2;
        printf("Nota da quinta prova: ");
        scanf("%f", &nota2);
        if (nota1 > nota2)
          printf("\nRefaca a quinta prova.\n");
        else
          printf("\nNao eh necessario refazer nenhuma prova.\n");
      }
    }
  }
}
```