user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    -0xc(%rbp),%rsi
  lea    -0x10(%rbp),%rcx
  lea    -0x14(%rbp),%rdx
  lea    -0x18(%rbp),%rax
  mov    %rsi,%r8
  mov    %rax,%rsi
  lea    D25(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    D73(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    -0x1c(%rbp),%rax
  mov    %rax,%rsi
  lea    D55(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movss  -0x1c(%rbp),%xmm0
  movss  -0x18(%rbp),%xmm1
  comiss %xmm1,%xmm0
  jb     L43
  lea    D62(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L30
L43:
  movss  -0x1c(%rbp),%xmm0
  movss  -0x14(%rbp),%xmm1
  comiss %xmm1,%xmm0
  jb     L53
  movss  -0x1c(%rbp),%xmm1
  movss  -0x18(%rbp),%xmm0
  comiss %xmm1,%xmm0
  jbe    L53
  lea    D42(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L30
L53:
  movss  -0x1c(%rbp),%xmm0
  movss  -0x10(%rbp),%xmm1
  comiss %xmm1,%xmm0
  jb     L99
  movss  -0x1c(%rbp),%xmm1
  movss  -0x14(%rbp),%xmm0
  comiss %xmm1,%xmm0
  jbe    L99
  lea    D49(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L30
L99:
  movss  -0x1c(%rbp),%xmm0
  movss  -0xc(%rbp),%xmm1
  comiss %xmm1,%xmm0
  jb     L80
  movss  -0x1c(%rbp),%xmm1
  movss  -0x10(%rbp),%xmm0
  comiss %xmm1,%xmm0
  jbe    L80
  lea    D43(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L30
L80:
  movss  -0x1c(%rbp),%xmm1
  movss  -0xc(%rbp),%xmm0
  comiss %xmm1,%xmm0
  jbe    L30
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L30:
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L108
  call   <__stack_chk_fail@plt>
L108:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D39
type: string
name: read_data
arguments: data_label: D25
type: string
name: read_data
arguments: data_label: D73
type: string
name: read_data
arguments: data_label: D55
type: string
name: read_data
arguments: data_label: D62
type: string
name: read_data
arguments: data_label: D42
type: string
name: read_data
arguments: data_label: D49
type: string
name: read_data
arguments: data_label: D43
type: string
name: read_data
arguments: data_label: D5
type: string

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

tool: D25: %f%f%f%f

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

tool: D55: %f

tool: D62: Student has an A grade


tool: D42: Student has an B grade


tool: D49: Studnet has an C grade


tool: D43: Student has an D grade


tool: D5: Studnet has failed the course


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