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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  lea    D19(%rip),%r14
  push   %r13
  mov    %r14,%rdi
  push   %r12
  lea    D9(%rip),%r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rbx
  lea    0x30(%rsp),%r13
  call   <puts@plt>
  mov    %rbx,%rbp
L33:
  mov    %rbp,%rsi
  mov    %r12,%rdi
  add    $0x8,%rbp
  call   <scanf@plt>
  cmp    %rbp,%r13
  jne    L33
  mov    %r14,%rdi
  lea    D36(%rip),%rbp
  call   <puts@plt>
  mov    %r12,%rdi
  lea    0x14(%rsp),%rsi
  call   <scanf@plt>
  mov    %r12,%rdi
  lea    0x1c(%rsp),%rsi
  call   <scanf@plt>
  mov    %r12,%rdi
  lea    0x24(%rsp),%rsi
  call   <scanf@plt>
  lea    0x2c(%rsp),%rsi
  mov    %r12,%rdi
  mov    $0x0,%r12d
  call   <scanf@plt>
  lea    D72(%rip),%rdi
  call   <puts@plt>
  mov    0x20(%rsp),%edx
  mov    0x10(%rsp),%esi
  mov    %rbp,%rdi
  add    0x18(%rsp),%edx
  add    0x28(%rsp),%edx
  cmovns %edx,%r12d
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x24(%rsp),%edx
  add    0x1c(%rsp),%edx
  movl   $0x0,0xc(%rsp)
  add    0x2c(%rsp),%edx
  cmp    %edx,%r12d
  jge    L25
  movl   $0x1,0xc(%rsp)
  mov    %edx,%r12d
L25:
  mov    0x14(%rsp),%esi
  mov    %rbp,%rdi
  xor    %eax,%eax
  mov    $0x1,%r13d
  xor    %ebp,%ebp
  lea    D14(%rip),%r15
  lea    D30(%rip),%r14
  call   <printf@plt>
  lea    D23(%rip),%rdi
  call   <puts@plt>
L59:
  mov    %r13d,%esi
  mov    %r15,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    (%rbx,%r13,8),%edx
  test   %edx,%edx
  jle    L46
  xor    %ebp,%ebp
L40:
  mov    0x4(%rbx,%r13,8),%eax
  cmp    %eax,%edx
  jge    L36
  mov    %eax,%edx
  mov    $0x1,%ebp
L36:
  movslq %ebp,%rax
  mov    %r14,%rdi
  add    $0x1,%r13
  mov    0x10(%rsp,%rax,4),%esi
  xor    %eax,%eax
  call   <printf@plt>
  cmp    $0x4,%r13
  jne    L59
  movslq 0xc(%rsp),%r13
  xor    %eax,%eax
  mov    %r12d,%edx
  lea    D54(%rip),%rdi
  mov    0x10(%rsp,%r13,4),%esi
  call   <printf@plt>
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L50
  add    $0x48,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L46:
  xor    %edx,%edx
  jmp    L40
L50:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D19
type: string
name: parse_data
arguments: label: D9
type: string
name: parse_data
arguments: label: D36
type: string
name: parse_data
arguments: label: D72
type: string
name: parse_data
arguments: label: D14
type: string
name: parse_data
arguments: label: D30
type: string
name: parse_data
arguments: label: D23
type: string
name: parse_data
arguments: label: D54
type: string

tool: D19: Enter data in form of Roll No. Sub1 Sub2 Sub3 

tool: D9: %d

tool: D36: Student %d: %d 


tool: D72: Total Marks Scored: 

tool: D14: Subject %d: 


tool: D30: Student: %d Marks: %d 


tool: D23: MAX MARKS: 

tool: D54: Max. Total By Student: %d and Marks: %d 


assistant: ```c
int main() {
  int data[4][2];
  int i, j;
  for (i = 0; i < 2; i++) {
    printf("Enter data in form of Roll No. Sub1 Sub2 Sub3 \n");
    for (j = 0; j < 4; j++) {
      scanf("%d", &data[j][i]);
    }
  }
  printf("Total Marks Scored: \n");
  int sum;
  int tmax = 0, idmax;
  for (i = 0; i < 2; i++) {
    sum = 0;
    for (j = 1; j < 4; j++) {
      sum += data[j][i];
    }
    if (tmax < sum) {
      tmax = sum;
      idmax = i;
    }
    printf("Student %d: %d \n", data[0][i], sum);
  }
  printf("MAX MARKS: \n");
  int id = 0;
  int max;
  for (j = 1; j < 4; j++) {
    max = 0;
    printf("Subject %d: \n", j);
    for (i = 0; i < 2; i++) {
      if (max < data[j][i]) {
        max = data[j][i];
        id = i;
      }
    }
    printf("Student: %d Marks: %d \n", data[0][id], max);
  }
  printf("Max. Total By Student: %d and Marks: %d \n", data[0][idmax], tmax);
  return 0;
}
```