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

```asm
<main>:
  endbr64
  push   %r15
  lea    D18(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  lea    0x18(%rsp),%rsi
  call   <scanf@plt>
  mov    0x18(%rsp),%edi
  test   %edi,%edi
  jle    L45
  lea    0x34(%rsp),%rax
  mov    $0x1,%ebx
  lea    0x2c(%rsp),%r15
  mov    %rax,0x8(%rsp)
  lea    0x30(%rsp),%rax
  lea    0x28(%rsp),%r14
  mov    %rax,(%rsp)
  lea    0x24(%rsp),%r13
  lea    0x20(%rsp),%r12
  lea    0x1c(%rsp),%rbp
  jmp    L88
  nopw   0x0(%rax,%rax,1)
L52:
  lea    -0x50(%rax),%edx
  cmp    $0x9,%edx
  jbe    L84
  lea    -0x46(%rax),%edx
  cmp    $0x9,%edx
  jbe    L11
  sub    $0x3c,%eax
  mov    %ebx,%esi
  cmp    $0x9,%eax
  ja     L17
  lea    D60(%rip),%rdi
  call   <printf@plt>
L100:
  add    $0x1,%ebx
  cmp    %ebx,0x18(%rsp)
  jl     L45
L88:
  push   0x8(%rsp)
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    %rbp,%rsi
  push   0x8(%rsp)
  mov    %r15,%r9
  mov    %r14,%r8
  xor    %eax,%eax
  lea    D38(%rip),%rdi
  call   <scanf@plt>
  mov    0x3c(%rsp),%eax
  mov    0x40(%rsp),%ecx
  pop    %rdx
  pop    %rsi
  cmp    %ecx,%eax
  jle    L66
  mov    %eax,%edx
  mov    %eax,0x30(%rsp)
  mov    %ecx,%eax
  mov    %ecx,0x2c(%rsp)
  mov    %edx,%ecx
L66:
  mov    0x34(%rsp),%edx
  cmp    %eax,%edx
  jge    L27
  mov    %eax,0x34(%rsp)
  mov    %edx,0x2c(%rsp)
  mov    %eax,%edx
L27:
  cmp    %edx,%ecx
  jle    L41
  mov    %edx,%eax
  mov    %ecx,0x34(%rsp)
  mov    %edx,0x30(%rsp)
  mov    %ecx,%edx
  mov    %eax,%ecx
L41:
  add    %ecx,%edx
  mov    0x20(%rsp),%eax
  add    0x1c(%rsp),%eax
  mov    %edx,%ecx
  add    0x24(%rsp),%eax
  add    0x28(%rsp),%eax
  shr    $0x1f,%ecx
  add    %ecx,%edx
  sar    %edx
  add    %edx,%eax
  cmp    $0x59,%eax
  jle    L52
  mov    %ebx,%esi
  lea    D68(%rip),%rdi
  add    $0x1,%ebx
  call   <printf@plt>
  cmp    %ebx,0x18(%rsp)
  jge    L88
L45:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L29
  add    $0x48,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L84:
  mov    %ebx,%esi
  lea    D4(%rip),%rdi
  call   <printf@plt>
  jmp    L100
  nopl   0x0(%rax,%rax,1)
L17:
  lea    D34(%rip),%rdi
  call   <printf@plt>
  jmp    L100
  nopl   0x0(%rax)
L11:
  mov    %ebx,%esi
  lea    D65(%rip),%rdi
  call   <printf@plt>
  jmp    L100
L29:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D18
type: string
name: retrieve_data
arguments: data_tag: D60
type: string
name: retrieve_data
arguments: data_tag: D38
type: string
name: retrieve_data
arguments: data_tag: D68
type: string
name: retrieve_data
arguments: data_tag: D4
type: string
name: retrieve_data
arguments: data_tag: D34
type: string
name: retrieve_data
arguments: data_tag: D65
type: string

tool: D18: %d

tool: D60: Case %d: D


tool: D38: %d%d%d%d%d%d%d

tool: D68: Case %d: A


tool: D4: Case %d: B


tool: D34: Case %d: F


tool: D65: Case %d: C


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;
}
```