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

```asm
<insert_student>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  movl   $0x0,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  jmp    L20
L46:
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%esi
  lea    D144(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movl   $0x0,-0x8(%rbp)
  jmp    L107
L112:
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%edx
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rcx
  mov    -0x18(%rbp),%rax
  add    %rax,%rcx
  mov    -0x4(%rbp),%eax
  cltq
  mov    (%rcx,%rax,4),%eax
  cmp    %eax,%edx
  jne    L98
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%esi
  lea    D113(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  jmp    L107
L98:
  addl   $0x1,-0x8(%rbp)
L107:
  mov    -0x8(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jl     L112
  addl   $0x1,-0x4(%rbp)
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%esi
  lea    D38(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  jmp    L96
L25:
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%esi
  lea    D35(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
L96:
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    $0x11,%eax
  jle    L25
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    $0x23,%eax
  jg     L25
  addl   $0x1,-0x4(%rbp)
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%esi
  lea    D11(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  jmp    L106
L132:
  lea    D99(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
L106:
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  test   %eax,%eax
  jle    L132
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    $0x2,%eax
  jg     L132
  addl   $0x1,-0x4(%rbp)
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%esi
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  jmp    L118
L68:
  lea    D150(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
L118:
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  test   %eax,%eax
  jle    L68
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    $0xa,%eax
  jg     L68
  movl   $0x0,-0x4(%rbp)
  addl   $0x1,-0xc(%rbp)
L20:
  cmpl   $0x2,-0xc(%rbp)
  jg     L95
  cmpl   $0x3,-0x4(%rbp)
  jle    L46
L95:
  nop
  leave
  ret
```

tool_calls: name: parse_data
arguments: tag: D144
type_infered: string
name: parse_data
arguments: tag: D22
type_infered: string
name: parse_data
arguments: tag: D113
type_infered: string
name: parse_data
arguments: tag: D38
type_infered: string
name: parse_data
arguments: tag: D35
type_infered: string
name: parse_data
arguments: tag: D11
type_infered: string
name: parse_data
arguments: tag: D99
type_infered: string
name: parse_data
arguments: tag: D15
type_infered: string
name: parse_data
arguments: tag: D150
type_infered: string

tool: D144: 
Give the ID, between 0 to 500 ,of the %d student:


tool: D22: %d

tool: D113: 
Already given.Give another ID, between 0 to 500 ,of the %d student:


tool: D38: 
Give the age ,between 18 and 35, of the %d student:


tool: D35: 
Age out of range, between 18 and 35, of the %d student:


tool: D11: 
Give the sex  ,1 for male and 2 for female,of the %d student:


tool: D99: 
Wrong,1 for male and 2 for female:

tool: D15: 
Give the degree , between 1 to 10,of the %d student:


tool: D150: 
Wrong degree,1 to N:

assistant: ```c
void insert_student(int a[3][4]) {
  int i, k, j;
  i = j = k = 0;
  while (i < 3 && j < 4) {
    printf("\nGive the ID, between 0 to 500 ,of the %d student:\n", i + 1);
    scanf("%d", &a[i][j]);
    k = 0;
    while (k < i) {
      if (a[i][j] == a[k][j]) {
        printf("\nAlready given.Give another ID, between 0 to 500 ,of the %d student:\n", i + 1);
        scanf("%d", &a[i][j]);
      } else
        k++;
    }
    j++;
    printf("\nGive the age ,between 18 and 35, of the %d student:\n", i + 1);
    scanf("%d", &a[i][j]);
    while (a[i][j] < 18 || a[i][j] > 35) {
      printf("\nAge out of range, between 18 and 35, of the %d student:\n", i + 1);
      scanf("%d", &a[i][j]);
    }
    j++;
    printf("\nGive the sex  ,1 for male and 2 for female,of the %d student:\n", i + 1);
    scanf("%d", &a[i][j]);
    while (a[i][j] < 1 || a[i][j] > 2) {
      printf("\nWrong,1 for male and 2 for female:\n");
      scanf("%d", &a[i][j]);
    }
    j++;
    printf("\nGive the degree , between 1 to 10,of the %d student:\n", i + 1);
    scanf("%d", &a[i][j]);
    while (a[i][j] < 1 || a[k][j] > 10) {
      printf("\nWrong degree,1 to N:\n");
      scanf("%d", &a[i][j]);
    }
    j = 0;
    i++;
  }
}
```