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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x2b0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x294(%rbp)
  lea    -0x298(%rbp),%rax
  mov    %rax,%rsi
  lea    D64(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  jmp    L52
L50:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x288(%rbp)
  movl   $0x0,-0x290(%rbp)
  jmp    L80
L30:
  lea    -0x270(%rbp),%rdx
  mov    -0x290(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D64(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    -0x290(%rbp),%eax
  cltq
  mov    -0x270(%rbp,%rax,4),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  -0x288(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x288(%rbp)
  addl   $0x1,-0x290(%rbp)
L80:
  cmpl   $0x5,-0x290(%rbp)
  jle    L30
  movl   $0x0,-0x290(%rbp)
  jmp    L153
L89:
  movl   $0x0,-0x28c(%rbp)
  jmp    L73
L175:
  lea    -0x140(%rbp),%rsi
  mov    -0x28c(%rbp),%eax
  cltq
  mov    %rax,%rdx
  shl    $0x2,%rdx
  add    %rax,%rdx
  lea    (%rdx,%rdx,1),%rax
  mov    %rax,%rdx
  mov    -0x290(%rbp),%eax
  movslq %eax,%rcx
  mov    %rcx,%rax
  shl    $0x2,%rax
  add    %rcx,%rax
  lea    0x0(,%rax,4),%rcx
  add    %rcx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  add    %rsi,%rax
  mov    %rax,%rsi
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    -0x140(%rbp),%rsi
  mov    -0x28c(%rbp),%eax
  cltq
  mov    %rax,%rdx
  shl    $0x2,%rdx
  add    %rax,%rdx
  lea    (%rdx,%rdx,1),%rax
  mov    %rax,%rdx
  mov    -0x290(%rbp),%eax
  movslq %eax,%rcx
  mov    %rcx,%rax
  shl    $0x2,%rax
  add    %rcx,%rax
  lea    0x0(,%rax,4),%rcx
  add    %rcx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  add    %rsi,%rax
  lea    D5(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L13
  mov    -0x28c(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x290(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rcx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x230(%rbp,%rax,8)
  jmp    L64
L13:
  lea    -0x140(%rbp),%rsi
  mov    -0x28c(%rbp),%eax
  cltq
  mov    %rax,%rdx
  shl    $0x2,%rdx
  add    %rax,%rdx
  lea    (%rdx,%rdx,1),%rax
  mov    %rax,%rdx
  mov    -0x290(%rbp),%eax
  movslq %eax,%rcx
  mov    %rcx,%rax
  shl    $0x2,%rax
  add    %rcx,%rax
  lea    0x0(,%rax,4),%rcx
  add    %rcx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  add    %rsi,%rax
  mov    %rax,%rdi
  call   <atof@plt>
  movq   %xmm0,%rdx
  mov    -0x28c(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x290(%rbp),%eax
  movslq %eax,%rcx
  mov    %rcx,%rax
  shl    $0x2,%rax
  add    %rcx,%rax
  add    %rsi,%rax
  mov    %rdx,-0x230(%rbp,%rax,8)
L64:
  addl   $0x1,-0x28c(%rbp)
L73:
  cmpl   $0x4,-0x28c(%rbp)
  jle    L175
  addl   $0x1,-0x290(%rbp)
L153:
  cmpl   $0x5,-0x290(%rbp)
  jle    L89
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x280(%rbp)
  movl   $0x0,-0x290(%rbp)
  jmp    L162
L126:
  mov    -0x290(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  add    %rbp,%rax
  sub    $0x230,%rax
  movsd  (%rax),%xmm1
  mov    -0x290(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  add    %rbp,%rax
  sub    $0x228,%rax
  movsd  (%rax),%xmm0
  addsd  %xmm0,%xmm1
  mov    -0x290(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  add    %rbp,%rax
  sub    $0x220,%rax
  movsd  (%rax),%xmm0
  addsd  %xmm0,%xmm1
  movsd  %xmm1,-0x2a8(%rbp)
  mov    -0x290(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  add    %rbp,%rax
  sub    $0x220,%rax
  movsd  (%rax),%xmm0
  mov    -0x290(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  add    %rbp,%rax
  sub    $0x228,%rax
  mov    (%rax),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <min@plt>
  movq   %xmm0,%rcx
  mov    -0x290(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  add    %rbp,%rax
  sub    $0x230,%rax
  mov    (%rax),%rax
  movq   %rcx,%xmm1
  movq   %rax,%xmm0
  call   <min@plt>
  movsd  -0x2a8(%rbp),%xmm1
  subsd  %xmm0,%xmm1
  movsd  D21(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  D26(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  mov    -0x290(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  add    %rbp,%rax
  sub    $0x218,%rax
  movsd  (%rax),%xmm2
  movsd  D71(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  %xmm1,-0x2a8(%rbp)
  mov    -0x290(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  add    %rbp,%rax
  sub    $0x210,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <att@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  addsd  -0x2a8(%rbp),%xmm0
  cvttsd2si %xmm0,%rax
  mov    %rax,%rdi
  call   <points@plt>
  mov    -0x290(%rbp),%edx
  movslq %edx,%rdx
  mov    %eax,-0x250(%rbp,%rdx,4)
  addl   $0x1,-0x290(%rbp)
L162:
  cmpl   $0x5,-0x290(%rbp)
  jle    L126
  movl   $0x0,-0x294(%rbp)
  movl   $0x0,-0x290(%rbp)
  jmp    L179
L98:
  mov    -0x290(%rbp),%eax
  cltq
  mov    -0x250(%rbp,%rax,4),%eax
  test   %eax,%eax
  jne    L31
  movl   $0x1,-0x294(%rbp)
L31:
  mov    -0x290(%rbp),%eax
  cltq
  mov    -0x250(%rbp,%rax,4),%edx
  mov    -0x290(%rbp),%eax
  cltq
  mov    -0x270(%rbp,%rax,4),%eax
  imul   %edx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  -0x280(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x280(%rbp)
  addl   $0x1,-0x290(%rbp)
L179:
  cmpl   $0x5,-0x290(%rbp)
  jle    L98
  movsd  -0x280(%rbp),%xmm0
  divsd  -0x288(%rbp),%xmm0
  movsd  %xmm0,-0x278(%rbp)
  cmpl   $0x1,-0x294(%rbp)
  jne    L150
  mov    -0x278(%rbp),%rax
  movq   %rax,%xmm0
  lea    D44(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L52
L150:
  mov    -0x278(%rbp),%rax
  movq   %rax,%xmm0
  lea    D88(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L52:
  mov    -0x298(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x298(%rbp)
  test   %eax,%eax
  jne    L50
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L33
  call   <__stack_chk_fail@plt>
L33:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D64
type_infered: string
name: retrieve_data
arguments: data_tag: D8
type_infered: string
name: retrieve_data
arguments: data_tag: D5
type_infered: string
name: retrieve_data
arguments: data_tag: D21
type_infered: f32[2]
name: retrieve_data
arguments: data_tag: D26
type_infered: f32[2]
name: retrieve_data
arguments: data_tag: D71
type_infered: f64
name: retrieve_data
arguments: data_tag: D44
type_infered: string
name: retrieve_data
arguments: data_tag: D88
type_infered: string

tool: D64: %d

tool: D8: %s

tool: D5: ab

tool: {"D21": [0.0,3.1015625]}

tool: {"D26": [0.0,3.0625]}

tool: D71: 0.5

tool: D44: FAILED, %.2lf


tool: D88: PASSED, %.2lf


assistant: ```c
int main() {
  int n;
  int fail = 0;
  int grades[6];
  double sub[6][5];
  int i, j;
  char marks[6][5][10];
  int tot_points[6];
  double gpa;
  scanf("%d", &n);
  while (n--) {
    double total = 0;
    for (i = 0; i < 6; i++) {
      scanf("%d", &grades[i]);
      total += grades[i];
    }
    for (i = 0; i < 6; i++) {
      for (j = 0; j < 5; j++) {
        scanf("%s", marks[i][j]);
        if (strcmp(marks[i][j], "ab") == 0)
          sub[i][j] = 0;
        else
          sub[i][j] = atof(marks[i][j]);
      }
    }
    double sum = 0;
    for (i = 0; i < 6; i++) {
      tot_points[i] = points(((sub[i][0] + sub[i][1] + sub[i][2]) - min(sub[i][0], min(sub[i][1], sub[i][2]))) * 45 / 40 + sub[i][3] * 0.5 + att(sub[i][4]));
    }
    fail = 0;
    for (i = 0; i < 6; i++) {
      if (tot_points[i] == 0)
        fail = 1;
      sum += tot_points[i] * grades[i];
    }
    gpa = (sum * 1.0) / (total * 1.0);
    if (fail == 1)
      printf("FAILED, %.2lf\n", gpa);
    else
      printf("PASSED, %.2lf\n", gpa);
  }
  return 0;
}
```