user: Converte this assembly snippet into its equivalent C code:

```asm
<insert_student>:
  endbr64
  push   %r15
  mov    $0x1,%esi
  xor    %eax,%eax
  lea    D76(%rip),%r15
  push   %r14
  xor    %r14d,%r14d
  push   %r13
  push   %r12
  mov    $0x1,%r12d
  push   %rbp
  lea    D108(%rip),%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x28,%rsp
  mov    %rdi,0x18(%rsp)
  lea    D51(%rip),%rdi
  call   <printf@plt>
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  add    $0x4,%rbx
  call   <scanf@plt>
L54:
  mov    %r12d,0x8(%rsp)
  mov    %r12d,%esi
  lea    D15(%rip),%rdi
  jmp    L116
  nopl   0x0(%rax)
L105:
  lea    D31(%rip),%rdi
L116:
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  mov    (%rbx),%eax
  mov    %r12d,%esi
  sub    $0x12,%eax
  cmp    $0x11,%eax
  ja     L105
  lea    D37(%rip),%rdi
  xor    %eax,%eax
  lea    0x4(%rbx),%r13
  call   <printf@plt>
  jmp    L35
  nopw   0x0(%rax,%rax,1)
L93:
  lea    D52(%rip),%rdi
  call   <puts@plt>
L35:
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  mov    0x4(%rbx),%eax
  sub    $0x1,%eax
  cmp    $0x1,%eax
  ja     L93
  mov    %r12d,%esi
  lea    D88(%rip),%rdi
  xor    %eax,%eax
  shl    $0x4,%r14
  call   <printf@plt>
  lea    0x8(%rbx),%r13
  mov    %rbp,%rdi
  mov    %r13,%rsi
  call   <scanf@plt>
  add    0x18(%rsp),%r14
  jmp    L121
  nopl   (%rax)
L123:
  mov    %r15,%rdi
  call   <puts@plt>
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
L121:
  mov    0x8(%rbx),%eax
  test   %eax,%eax
  jle    L123
  cmpl   $0xa,0xc(%r14)
  jg     L123
  cmp    $0x3,%r12d
  je     L122
  add    $0x1,%r12d
  lea    0xc(%rbx),%r13
  xor    %eax,%eax
  xor    %r14d,%r14d
  mov    %r12d,%esi
  lea    D51(%rip),%rdi
  call   <printf@plt>
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  xor    %edx,%edx
  mov    %r12d,%r9d
  mov    0x18(%rsp),%r8
  mov    %rbx,%r12
  lea    D86(%rip),%rcx
  mov    %r13,%rbx
  mov    %edx,%r13d
  mov    0x8(%rsp),%edx
  jmp    L41
  nopw   0x0(%rax,%rax,1)
L106:
  add    $0x1,%r13d
  movslq %r13d,%r14
  cmp    %edx,%r13d
  jge    L92
L41:
  mov    %r14,%rax
  shl    $0x4,%rax
  mov    (%r8,%rax,1),%eax
  cmp    %eax,0xc(%r12)
  jne    L106
  mov    %r9d,%esi
  mov    %rcx,%rdi
  xor    %eax,%eax
  mov    %r8,0x10(%rsp)
  mov    %edx,0xc(%rsp)
  mov    %r9d,0x8(%rsp)
  call   <printf@plt>
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  mov    0xc(%rsp),%edx
  mov    0x8(%rsp),%r9d
  lea    D86(%rip),%rcx
  mov    0x10(%rsp),%r8
  cmp    %edx,%r13d
  jl     L41
L92:
  mov    %r12,%rbx
  mov    %r9d,%r12d
  add    $0x10,%rbx
  jmp    L54
  nopl   (%rax)
L122:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D76
data_type: string
name: extract_symbolic_data
arguments: data_label: D108
data_type: string
name: extract_symbolic_data
arguments: data_label: D51
data_type: string
name: extract_symbolic_data
arguments: data_label: D15
data_type: string
name: extract_symbolic_data
arguments: data_label: D31
data_type: string
name: extract_symbolic_data
arguments: data_label: D37
data_type: string
name: extract_symbolic_data
arguments: data_label: D52
data_type: string
name: extract_symbolic_data
arguments: data_label: D88
data_type: string
name: extract_symbolic_data
arguments: data_label: D86
data_type: string

tool: D76: 
Wrong degree,1 to N:

tool: D108: %d

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


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


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


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


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

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


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


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