user: Please show me the C implementation that matches the assembly code listed below:

```asm
<calculation_tests>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x28(%rbp),%rax
  mov    %rax,%rsi
  lea    D65(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  lea    -0x24(%rbp),%rax
  mov    %rax,%rsi
  lea    D65(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rsi
  lea    D65(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movss  -0x28(%rbp),%xmm0
  movss  -0x24(%rbp),%xmm1
  comiss %xmm1,%xmm0
  jbe    L96
  movss  -0x28(%rbp),%xmm0
  movss  -0x20(%rbp),%xmm1
  comiss %xmm1,%xmm0
  jbe    L96
  movss  -0x28(%rbp),%xmm0
  movss  %xmm0,-0x1c(%rbp)
  movss  -0x24(%rbp),%xmm0
  movss  -0x20(%rbp),%xmm1
  comiss %xmm1,%xmm0
  jbe    L95
  movss  -0x24(%rbp),%xmm0
  movss  %xmm0,-0x14(%rbp)
  movss  -0x20(%rbp),%xmm0
  movss  %xmm0,-0x18(%rbp)
  jmp    L96
L95:
  movss  -0x20(%rbp),%xmm0
  movss  %xmm0,-0x14(%rbp)
  movss  -0x24(%rbp),%xmm0
  movss  %xmm0,-0x18(%rbp)
L96:
  movss  -0x24(%rbp),%xmm0
  movss  -0x28(%rbp),%xmm1
  comiss %xmm1,%xmm0
  jbe    L89
  movss  -0x24(%rbp),%xmm0
  movss  -0x20(%rbp),%xmm1
  comiss %xmm1,%xmm0
  jbe    L89
  movss  -0x24(%rbp),%xmm0
  movss  %xmm0,-0x1c(%rbp)
  movss  -0x28(%rbp),%xmm0
  movss  -0x20(%rbp),%xmm1
  comiss %xmm1,%xmm0
  jbe    L94
  movss  -0x28(%rbp),%xmm0
  movss  %xmm0,-0x14(%rbp)
  movss  -0x20(%rbp),%xmm0
  movss  %xmm0,-0x18(%rbp)
  jmp    L89
L94:
  movss  -0x20(%rbp),%xmm0
  movss  %xmm0,-0x14(%rbp)
  movss  -0x28(%rbp),%xmm0
  movss  %xmm0,-0x18(%rbp)
L89:
  movss  -0x20(%rbp),%xmm0
  movss  -0x28(%rbp),%xmm1
  comiss %xmm1,%xmm0
  jbe    L22
  movss  -0x20(%rbp),%xmm0
  movss  -0x24(%rbp),%xmm1
  comiss %xmm1,%xmm0
  jbe    L22
  movss  -0x20(%rbp),%xmm0
  movss  %xmm0,-0x1c(%rbp)
  movss  -0x24(%rbp),%xmm0
  movss  -0x28(%rbp),%xmm1
  comiss %xmm1,%xmm0
  jbe    L101
  movss  -0x24(%rbp),%xmm0
  movss  %xmm0,-0x14(%rbp)
  movss  -0x28(%rbp),%xmm0
  movss  %xmm0,-0x18(%rbp)
  jmp    L22
L101:
  movss  -0x28(%rbp),%xmm0
  movss  %xmm0,-0x14(%rbp)
  movss  -0x24(%rbp),%xmm0
  movss  %xmm0,-0x18(%rbp)
L22:
  movss  -0x14(%rbp),%xmm0
  addss  -0x1c(%rbp),%xmm0
  movss  D15(%rip),%xmm1
  divss  %xmm1,%xmm0
  movss  %xmm0,-0x10(%rbp)
  movss  -0x18(%rbp),%xmm0
  addss  -0x14(%rbp),%xmm0
  addss  -0x1c(%rbp),%xmm0
  movss  D64(%rip),%xmm1
  divss  %xmm1,%xmm0
  movss  %xmm0,-0xc(%rbp)
  mov    -0x10(%rbp),%eax
  movd   %eax,%xmm0
  lea    D66(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0xc(%rbp),%eax
  movd   %eax,%xmm0
  lea    D60(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x18(%rbp),%eax
  movd   %eax,%xmm0
  lea    D43(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x1c(%rbp),%eax
  movd   %eax,%xmm0
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L33
  call   <__stack_chk_fail@plt>
L33:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D65
type_guessed: string
name: read_data
arguments: data_tag: D15
type_guessed: byte[4]
name: read_data
arguments: data_tag: D64
type_guessed: byte[4]
name: read_data
arguments: data_tag: D66
type_guessed: string
name: read_data
arguments: data_tag: D60
type_guessed: string
name: read_data
arguments: data_tag: D43
type_guessed: string
name: read_data
arguments: data_tag: D0
type_guessed: string

tool: D65: %f

tool: {"D15": [0x00,0x00,0x00,0x40]}

tool: {"D64": [0x00,0x00,0x40,0x40]}

tool: D66: Media com as duas melhores notas: %.1f


tool: D60: Media com as tres notas: %.1f


tool: D43: Nota mais baixa: %.1f


tool: D0: Nota mais alta: %.1f


assistant: ```c
void calculation_tests() {
  float nota1, nota2, nota3;
  float maior, menor, media, mediatotal, mediamelhor;
  scanf("%f", &nota1);
  scanf("%f", &nota2);
  scanf("%f", &nota3);
  if (nota1 > nota2 && nota1 > nota3) {
    maior = nota1;
    if (nota2 > nota3) {
      media = nota2;
      menor = nota3;
    } else {
      media = nota3;
      menor = nota2;
    }
  }
  if (nota2 > nota1 && nota2 > nota3) {
    maior = nota2;
    if (nota1 > nota3) {
      media = nota1;
      menor = nota3;
    } else {
      media = nota3;
      menor = nota1;
    }
  }
  if (nota3 > nota1 && nota3 > nota2) {
    maior = nota3;
    if (nota2 > nota1) {
      media = nota2;
      menor = nota1;
    } else {
      media = nota1;
      menor = nota2;
    }
  }
  mediamelhor = (media + maior) / 2;
  mediatotal = (menor + media + maior) / 3;
  printf("Media com as duas melhores notas: %.1f\n", mediamelhor);
  printf("Media com as tres notas: %.1f\n", mediatotal);
  printf("Nota mais baixa: %.1f\n", menor);
  printf("Nota mais alta: %.1f\n", maior);
}
```