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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D45(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    -0x14(%rbp),%rsi
  lea    -0x18(%rbp),%rcx
  lea    -0x1c(%rbp),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rsi,%r8
  mov    %rax,%rsi
  lea    D50(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    D44(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    -0x10(%rbp),%rax
  mov    %rax,%rsi
  lea    D49(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movss  -0x20(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  movsd  -0x10(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jb     L37
  lea    D53(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L28
L37:
  movss  -0x1c(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  movsd  -0x10(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jb     L55
  lea    D82(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L28
L55:
  movss  -0x18(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  movsd  -0x10(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jb     L41
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L28
L41:
  movss  -0x14(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  movsd  -0x10(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jb     L5
  lea    D26(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L28
L5:
  lea    D60(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L28:
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L3
  call   <__stack_chk_fail@plt>
L3:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D45
type_infered: string
name: read_data
arguments: data_tag: D50
type_infered: string
name: read_data
arguments: data_tag: D44
type_infered: string
name: read_data
arguments: data_tag: D49
type_infered: string
name: read_data
arguments: data_tag: D53
type_infered: string
name: read_data
arguments: data_tag: D82
type_infered: string
name: read_data
arguments: data_tag: D18
type_infered: string
name: read_data
arguments: data_tag: D26
type_infered: string
name: read_data
arguments: data_tag: D60
type_infered: string

tool: D45: Enter thresholds for A, B, C, D
in that order, decreasing percentages > 

tool: D50: %f%f%f%f

tool: D44: Thank you. Now enter student score (percent) >

tool: D49: %lf

tool: D53: Student has a A grade


tool: D82: Student has a B grade


tool: D18: Student has a C grade


tool: D26: Student has a D grade


tool: D60: Student has failed the course


assistant: ```c
int main(void) {
  float a, b, c, d;
  double score;
  printf("Enter thresholds for A, B, C, D\nin that order, decreasing percentages > ");
  scanf("%f%f%f%f", &a, &b, &c, &d);
  printf("Thank you. Now enter student score (percent) >");
  scanf("%lf", &score);
  if (score >= a)
    printf("Student has a A grade\n");
  else if (score >= b)
    printf("Student has a B grade\n");
  else if (score >= c)
    printf("Student has a C grade\n");
  else if (score >= d)
    printf("Student has a D grade\n");
  else
    printf("Student has failed the course\n");
  return (0);
}
```