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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x2c(%rbp)
  movl   $0x0,-0x28(%rbp)
  movl   $0x0,-0x24(%rbp)
  movl   $0x0,-0x20(%rbp)
  movl   $0x0,-0x1c(%rbp)
  movl   $0x0,-0x18(%rbp)
  movl   $0x0,-0x14(%rbp)
  movl   $0x0,-0x10(%rbp)
  movl   $0x0,-0xc(%rbp)
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x30(%rbp),%rax
  mov    %rax,%rsi
  lea    D21(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  jmp    L8
L48:
  mov    -0x30(%rbp),%eax
  cmp    $0x50,%eax
  jle    L75
  addl   $0x1,-0x28(%rbp)
L75:
  mov    -0x30(%rbp),%eax
  cmp    $0x3c,%eax
  jle    L21
  addl   $0x1,-0x24(%rbp)
L21:
  mov    -0x30(%rbp),%eax
  cmp    $0x28,%eax
  jle    L46
  addl   $0x1,-0x20(%rbp)
L46:
  mov    -0x30(%rbp),%eax
  cmp    $0x27,%eax
  jg     L111
  addl   $0x1,-0x1c(%rbp)
L111:
  mov    -0x30(%rbp),%eax
  cmp    $0x50,%eax
  jle    L36
  mov    -0x30(%rbp),%eax
  cmp    $0x64,%eax
  jg     L36
  addl   $0x1,-0x18(%rbp)
L36:
  mov    -0x30(%rbp),%eax
  cmp    $0x3c,%eax
  jle    L57
  mov    -0x30(%rbp),%eax
  cmp    $0x50,%eax
  jg     L57
  addl   $0x1,-0x14(%rbp)
L57:
  mov    -0x30(%rbp),%eax
  cmp    $0x28,%eax
  jle    L98
  mov    -0x30(%rbp),%eax
  cmp    $0x3c,%eax
  jg     L98
  addl   $0x1,-0x10(%rbp)
L98:
  mov    -0x30(%rbp),%eax
  cmp    $0x28,%eax
  jg     L26
  addl   $0x1,-0xc(%rbp)
L26:
  lea    D50(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x30(%rbp),%rax
  mov    %rax,%rsi
  lea    D21(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  addl   $0x1,-0x2c(%rbp)
L8:
  mov    -0x30(%rbp),%eax
  test   %eax,%eax
  js     L44
  cmpl   $0x63,-0x2c(%rbp)
  jle    L48
L44:
  cmpl   $0x0,-0x2c(%rbp)
  jle    L0
  mov    -0x2c(%rbp),%eax
  mov    %eax,%esi
  lea    D28(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x18(%rbp),%r8d
  mov    -0x1c(%rbp),%edi
  mov    -0x20(%rbp),%ecx
  mov    -0x24(%rbp),%edx
  mov    -0x28(%rbp),%eax
  sub    $0x8,%rsp
  mov    -0xc(%rbp),%esi
  push   %rsi
  mov    -0x10(%rbp),%esi
  push   %rsi
  mov    -0x14(%rbp),%esi
  push   %rsi
  mov    %r8d,%r9d
  mov    %edi,%r8d
  mov    %eax,%esi
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x20,%rsp
L0:
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L96
  call   <__stack_chk_fail@plt>
L96:
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D24
type: string
name: read_data
arguments: label: D21
type: string
name: read_data
arguments: label: D50
type: string
name: read_data
arguments: label: D28
type: string
name: read_data
arguments: label: D3
type: string

tool: D24: Enter the List of Marks (-1 to finish) 

tool: D21: %d

tool: D50: Got That!!.. Next 

tool: D28: No of Students: %d 


tool: D3:  A= %d 
 B= %d 
 C= %d 
 D= %d 
 E= %d 
 F= %d 
 G= %d 
 H= %d 


assistant: ```c
int main() {
  int len = 0, n, a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0;
  printf("Enter the List of Marks (-1 to finish) \n");
  scanf("%d", &n);
  while (n >= 0 && len < 100) {
    if (n > 80)
      a++;
    if (n > 60)
      b++;
    if (n > 40)
      c++;
    if (n < 40)
      d++;
    if (n > 80 && n <= 100)
      e++;
    if (n > 60 && n <= 80)
      f++;
    if (n > 40 && n <= 60)
      g++;
    if (n <= 40)
      h++;
    printf("Got That!!.. Next \n");
    scanf("%d", &n);
    len++;
  }
  if (len > 0) {
    printf("No of Students: %d \n", len);
    printf(" A= %d \n B= %d \n C= %d \n D= %d \n "
           "E= %d \n F= %d \n G= %d \n H= %d \n",
           a, b, c, d, e, f, g, h);
  }
  return 0;
}
```