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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x38(%rbp),%rax
  mov    %rax,%rsi
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movl   $0x1,-0x18(%rbp)
  jmp    L10
L41:
  lea    -0x24(%rbp),%r8
  lea    -0x28(%rbp),%rdi
  lea    -0x2c(%rbp),%rcx
  lea    -0x30(%rbp),%rdx
  lea    -0x34(%rbp),%rax
  lea    -0x1c(%rbp),%rsi
  push   %rsi
  lea    -0x20(%rbp),%rsi
  push   %rsi
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %rax,%rsi
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  add    $0x10,%rsp
  mov    -0x24(%rbp),%edx
  mov    -0x20(%rbp),%eax
  cmp    %eax,%edx
  jle    L150
  mov    -0x20(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x24(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,-0x24(%rbp)
L150:
  mov    -0x24(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jle    L69
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x24(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,-0x24(%rbp)
L69:
  mov    -0x20(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jle    L19
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x20(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,-0x20(%rbp)
L19:
  mov    -0x1c(%rbp),%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x10(%rbp)
  mov    -0x34(%rbp),%edx
  mov    -0x30(%rbp),%eax
  add    %eax,%edx
  mov    -0x2c(%rbp),%eax
  add    %eax,%edx
  mov    -0x28(%rbp),%eax
  add    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0xc(%rbp)
  cmpl   $0x59,-0xc(%rbp)
  jle    L15
  mov    -0x18(%rbp),%eax
  mov    %eax,%esi
  lea    D14(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L145
L15:
  cmpl   $0x4f,-0xc(%rbp)
  jle    L121
  cmpl   $0x59,-0xc(%rbp)
  jg     L121
  mov    -0x18(%rbp),%eax
  mov    %eax,%esi
  lea    D49(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L145
L121:
  cmpl   $0x45,-0xc(%rbp)
  jle    L72
  cmpl   $0x4f,-0xc(%rbp)
  jg     L72
  mov    -0x18(%rbp),%eax
  mov    %eax,%esi
  lea    D43(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L145
L72:
  cmpl   $0x3b,-0xc(%rbp)
  jle    L167
  cmpl   $0x45,-0xc(%rbp)
  jg     L167
  mov    -0x18(%rbp),%eax
  mov    %eax,%esi
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L145
L167:
  mov    -0x18(%rbp),%eax
  mov    %eax,%esi
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L145:
  addl   $0x1,-0x18(%rbp)
L10:
  mov    -0x38(%rbp),%eax
  cmp    %eax,-0x18(%rbp)
  jle    L41
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L90
  call   <__stack_chk_fail@plt>
L90:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D15
type_infered: string
name: retrieve_data
arguments: data_label: D39
type_infered: string
name: retrieve_data
arguments: data_label: D14
type_infered: string
name: retrieve_data
arguments: data_label: D49
type_infered: string
name: retrieve_data
arguments: data_label: D43
type_infered: string
name: retrieve_data
arguments: data_label: D6
type_infered: string
name: retrieve_data
arguments: data_label: D24
type_infered: string

tool: D15: %d

tool: D39: %d%d%d%d%d%d%d

tool: D14: Case %d: A


tool: D49: Case %d: B


tool: D43: Case %d: C


tool: D6: Case %d: D


tool: D24: Case %d: F


assistant: ```c
int main() {
  int t, i;
  scanf("%d", &t);
  for (i = 1; i <= t; i++) {
    int t1, t2, f, a, ct1, ct2, ct3, c, T, temp;
    scanf("%d%d%d%d%d%d%d", &t1, &t2, &f, &a, &ct1, &ct2, &ct3);
    if (ct1 > ct2) {
      temp = ct2;
      ct2 = ct1;
      ct1 = temp;
    }
    if (ct1 > ct3) {
      temp = ct3;
      ct3 = ct1;
      ct1 = temp;
    }
    if (ct2 > ct3) {
      temp = ct3;
      ct3 = ct2;
      ct2 = temp;
    }
    c = (ct3 + ct2) / 2;
    T = t1 + t2 + f + a + c;
    if (T >= 90)
      printf("Case %d: A\n", i);
    else if (T >= 80 && T < 90)
      printf("Case %d: B\n", i);
    else if (T >= 70 && T < 80)
      printf("Case %d: C\n", i);
    else if (T >= 60 && T < 70)
      printf("Case %d: D\n", i);
    else
      printf("Case %d: F\n", i);
  }
  return 0;
}
```