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

```asm
<main>:
  endbr64
  push   %r13
  lea    D53(%rip),%r13
  push   %r12
  mov    %r13,%rdi
  push   %rbp
  lea    D25(%rip),%rbp
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%r12
  call   <printf@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  mov    0x4(%rsp),%eax
  cmp    $0x64,%eax
  jg     L82
  cmp    $0x59,%eax
  jle    L129
  lea    D120(%rip),%rdi
  call   <printf@plt>
L71:
  mov    %r13,%rdi
  call   <printf@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  mov    0x4(%rsp),%eax
  sub    $0x50,%eax
  cmp    $0x9,%eax
  ja     L40
  lea    D98(%rip),%rdi
  call   <printf@plt>
L46:
  mov    %r13,%rdi
  call   <printf@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  mov    0x4(%rsp),%eax
  sub    $0x46,%eax
  cmp    $0x9,%eax
  ja     L84
  lea    D34(%rip),%rdi
  call   <printf@plt>
L68:
  mov    %r13,%rdi
  call   <printf@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  mov    0x4(%rsp),%eax
  sub    $0x3c,%eax
  cmp    $0x9,%eax
  ja     L124
  lea    D52(%rip),%rdi
  call   <printf@plt>
L62:
  mov    %r13,%rdi
  call   <printf@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  cmpl   $0x3b,0x4(%rsp)
  ja     L26
  lea    D126(%rip),%rdi
  call   <printf@plt>
L7:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L48
  add    $0x10,%rsp
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L129:
  lea    D109(%rip),%rdi
  call   <printf@plt>
  jmp    L71
L124:
  lea    D94(%rip),%rdi
  call   <printf@plt>
  jmp    L62
L84:
  lea    D48(%rip),%rdi
  call   <printf@plt>
  jmp    L68
L40:
  lea    D102(%rip),%rdi
  call   <printf@plt>
  jmp    L46
L26:
  lea    D24(%rip),%rdi
  call   <printf@plt>
  jmp    L7
L82:
  lea    D35(%rip),%rdi
  call   <printf@plt>
  jmp    L71
L48:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D53
datatype: string
name: retrieve_data
arguments: data_tag: D25
datatype: string
name: retrieve_data
arguments: data_tag: D120
datatype: string
name: retrieve_data
arguments: data_tag: D98
datatype: string
name: retrieve_data
arguments: data_tag: D34
datatype: string
name: retrieve_data
arguments: data_tag: D52
datatype: string
name: retrieve_data
arguments: data_tag: D126
datatype: string
name: retrieve_data
arguments: data_tag: D109
datatype: string
name: retrieve_data
arguments: data_tag: D94
datatype: string
name: retrieve_data
arguments: data_tag: D48
datatype: string
name: retrieve_data
arguments: data_tag: D102
datatype: string
name: retrieve_data
arguments: data_tag: D24
datatype: string
name: retrieve_data
arguments: data_tag: D35
datatype: string

tool: D53: Enter the student's grade: 

tool: D25: %d

tool: D120: Letter grade is: A


tool: D98: Letter grade is: B


tool: D34: Letter grade is: C


tool: D52: Letter grade is: D


tool: D126: Letter grade is: F


tool: D109: Invalid grade entered.  Expected 90 <= grade <= 100


tool: D94: Invalid grade entered. Expected 60 <= grade <= 69


tool: D48: Invalid grade entered. Expected 70 <= grade <= 79


tool: D102: Invalid grade entered. Expected 80 <= grade <= 89


tool: D24: Invalid grade entered. Expected 0 <= grade <= 59


tool: D35: Invalid grade entered.Expected 0 <= grade <= 100


assistant: ```c
int main() {
  int grade;
  printf("Enter the student's grade: ");
  scanf("%d", &grade);
  if (grade > 100) {
    printf("Invalid grade entered.Expected 0 <= grade <= 100\n");
  } else if (grade < 90) {
    printf("Invalid grade entered.  Expected 90 <= grade <= 100\n");
  } else if (grade >= 90) {
    printf("Letter grade is: A\n");
  }
  printf("Enter the student's grade: ");
  scanf("%d", &grade);
  if (grade > 89) {
    printf("Invalid grade entered. Expected 80 <= grade <= 89\n");
  } else if (grade < 80) {
    printf("Invalid grade entered. Expected 80 <= grade <= 89\n");
  } else if (grade >= 80) {
    printf("Letter grade is: B\n");
  }
  printf("Enter the student's grade: ");
  scanf("%d", &grade);
  if (grade > 79) {
    printf("Invalid grade entered. Expected 70 <= grade <= 79\n");
  } else if (grade < 70) {
    printf("Invalid grade entered. Expected 70 <= grade <= 79\n");
  } else if (grade >= 70) {
    printf("Letter grade is: C\n");
  }
  printf("Enter the student's grade: ");
  scanf("%d", &grade);
  if (grade > 69) {
    printf("Invalid grade entered. Expected 60 <= grade <= 69\n");
  } else if (grade < 60) {
    printf("Invalid grade entered. Expected 60 <= grade <= 69\n");
  } else if (grade >= 60) {
    printf("Letter grade is: D\n");
  }
  printf("Enter the student's grade: ");
  scanf("%d", &grade);
  if (grade > 59) {
    printf("Invalid grade entered. Expected 0 <= grade <= 59\n");
  } else if (grade < 0) {
    printf("Invalid grade entered. Expected 0 <= grade <= 59\n");
  } else if (grade >= 0) {
    printf("Letter grade is: F\n");
  }
  return 0;
}
```