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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x18(%rbp),%rsi
  lea    -0x1c(%rbp),%rcx
  lea    -0x20(%rbp),%rdx
  lea    -0x24(%rbp),%rax
  mov    %rsi,%r8
  mov    %rax,%rsi
  lea    D114(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movss  -0x24(%rbp),%xmm0
  movaps %xmm0,%xmm1
  addss  %xmm0,%xmm1
  movss  -0x20(%rbp),%xmm2
  movss  D128(%rip),%xmm0
  mulss  %xmm2,%xmm0
  addss  %xmm0,%xmm1
  movss  -0x1c(%rbp),%xmm2
  movss  D146(%rip),%xmm0
  mulss  %xmm2,%xmm0
  addss  %xmm0,%xmm1
  movss  -0x18(%rbp),%xmm0
  addss  %xmm1,%xmm0
  movss  D96(%rip),%xmm1
  divss  %xmm1,%xmm0
  cvtss2sd %xmm0,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  movq   %rax,%xmm0
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movsd  -0x10(%rbp),%xmm0
  comisd D97(%rip),%xmm0
  jb     L67
  lea    D98(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L22
L67:
  movsd  D6(%rip),%xmm0
  comisd -0x10(%rbp),%xmm0
  jbe    L45
  lea    D158(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L22
L45:
  lea    D46(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x14(%rbp),%rax
  mov    %rax,%rsi
  lea    D70(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movss  -0x14(%rbp),%xmm0
  pxor   %xmm3,%xmm3
  cvtss2sd %xmm0,%xmm3
  movq   %xmm3,%rax
  movq   %rax,%xmm0
  lea    D161(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movss  -0x14(%rbp),%xmm0
  cvtss2sd %xmm0,%xmm0
  addsd  -0x10(%rbp),%xmm0
  movsd  D20(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x10(%rbp),%xmm0
  comisd D6(%rip),%xmm0
  jb     L31
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L14
L31:
  lea    D158(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L14:
  mov    -0x10(%rbp),%rax
  movq   %rax,%xmm0
  lea    D143(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
L22:
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L15
  call   <__stack_chk_fail@plt>
L15:
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D114
type_guessed: string
name: parse_data
arguments: label: D128
type_guessed: f32
name: parse_data
arguments: label: D146
type_guessed: f32
name: parse_data
arguments: label: D96
type_guessed: byte[4]
name: parse_data
arguments: label: D10
type_guessed: string
name: parse_data
arguments: label: D97
type_guessed: f64[2]
name: parse_data
arguments: label: D98
type_guessed: string
name: parse_data
arguments: label: D6
type_guessed: f64[2]
name: parse_data
arguments: label: D158
type_guessed: string
name: parse_data
arguments: label: D46
type_guessed: string
name: parse_data
arguments: label: D70
type_guessed: string
name: parse_data
arguments: label: D161
type_guessed: string
name: parse_data
arguments: label: D20
type_guessed: f64
name: parse_data
arguments: label: D5
type_guessed: string
name: parse_data
arguments: label: D143
type_guessed: string

tool: D114: %f %f %f %f

tool: D128: 3

tool: D146: 4

tool: {"D96": [0x00,0x00,0x20,0x41]}

tool: D10: Media: %.1f


tool: {"D97": [7.0,5.0]}

tool: D98: Aluno aprovado.

tool: {"D6": [5.0,2.0]}

tool: D158: Aluno reprovado.

tool: D46: Aluno em exame.

tool: D70: %f

tool: D161: Nota do exame: %.1f


tool: D20: 2

tool: D5: Aluno aparovado.

tool: D143: Media final: %.1f


assistant: ```c
int main() {
  float n1, n2, n3, n4;
  scanf("%f %f %f %f", &n1, &n2, &n3, &n4);
  double avg = (n1 * 2 + n2 * 3 + n3 * 4 + n4) / (2 + 3 + 4 + 1);
  printf("Media: %.1f\n", avg);
  if (avg >= 7.0)
    printf("Aluno aprovado.\n");
  else if (avg < 5.0)
    printf("Aluno reprovado.\n");
  else {
    printf("Aluno em exame.\n");
    float lst;
    scanf("%f", &lst);
    printf("Nota do exame: %.1f\n", lst);
    avg = (avg + lst) / 2;
    if (avg >= 5.0)
      printf("Aluno aparovado.\n");
    else
      printf("Aluno reprovado.\n");
    printf("Media final: %.1f\n", avg);
  }
  return 0;
}
```