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

```asm
<main>:
  endbr64
  push   %r14
  xor    %edi,%edi
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x50,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rbp
  mov    %rsp,%r12
  lea    0x50(%rsp),%r13
  call   <time@plt>
  mov    %rbp,%rbx
  mov    %eax,%edi
  call   <srand@plt>
L143:
  lea    -0x10(%rbx),%r14
L189:
  xor    %eax,%eax
  add    $0x4,%r14
  call   <rand@plt>
  movslq %eax,%rdx
  mov    %eax,%ecx
  imul   $0x51eb851f,%rdx,%rdx
  sar    $0x1f,%ecx
  sar    $0x25,%rdx
  sub    %ecx,%edx
  imul   $0x64,%edx,%edx
  sub    %edx,%eax
  mov    %eax,-0x4(%r14)
  cmp    %r14,%rbx
  jne    L189
  add    $0x10,%rbx
  cmp    %rbx,%r13
  jne    L143
  lea    D12(%rip),%r14
L28:
  lea    -0x10(%rbp),%rbx
L184:
  mov    (%rbx),%esi
  mov    %r14,%rdi
  xor    %eax,%eax
  add    $0x4,%rbx
  call   <printf@plt>
  cmp    %rbp,%rbx
  jne    L184
  mov    $0xa,%edi
  lea    0x10(%rbx),%rbp
  call   <putchar@plt>
  cmp    %r13,%rbp
  jne    L28
  mov    %r12,%rbx
  xor    %ebp,%ebp
  lea    D8(%rip),%r13
L136:
  mov    (%rbx),%esi
  mov    0x4(%rbx),%eax
  xor    %ecx,%ecx
  cmp    %eax,%esi
  jge    L2
  mov    %eax,%esi
  mov    $0x1,%ecx
L2:
  mov    0x8(%rbx),%eax
  cmp    %eax,%esi
  jge    L63
  mov    %eax,%esi
  mov    $0x2,%ecx
L63:
  mov    0xc(%rbx),%eax
  cmp    %eax,%esi
  jge    L138
  mov    %eax,%esi
  mov    $0x3,%ecx
L138:
  mov    %ebp,%edx
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x1,%ebp
  call   <printf@plt>
  add    $0x10,%rbx
  cmp    $0x4,%ebp
  jne    L136
  xor    %ebx,%ebx
L158:
  mov    (%r12),%esi
  mov    0x10(%r12),%eax
  xor    %edx,%edx
  cmp    %eax,%esi
  jge    L144
  mov    %eax,%esi
  mov    $0x1,%edx
L144:
  mov    0x20(%r12),%eax
  cmp    %eax,%esi
  jge    L32
  mov    %eax,%esi
  mov    $0x2,%edx
L32:
  mov    0x30(%r12),%eax
  cmp    %eax,%esi
  jge    L148
  mov    %eax,%esi
  mov    $0x3,%edx
L148:
  mov    %ebx,%ecx
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x1,%ebx
  call   <printf@plt>
  add    $0x4,%r12
  cmp    $0x4,%ebx
  jne    L158
  mov    (%rsp),%esi
  mov    0x14(%rsp),%eax
  xor    %edx,%edx
  cmp    %eax,%esi
  jge    L107
  mov    %eax,%esi
  mov    $0x1,%edx
L107:
  mov    0x28(%rsp),%eax
  cmp    %eax,%esi
  jge    L43
  mov    %eax,%esi
  mov    $0x2,%edx
L43:
  mov    0x3c(%rsp),%eax
  cmp    %eax,%esi
  jge    L162
  mov    %eax,%esi
  mov    $0x3,%edx
L162:
  lea    D28(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0xc(%rsp),%esi
  mov    0x18(%rsp),%eax
  xor    %edx,%edx
  cmp    %eax,%esi
  jge    L188
  mov    %eax,%esi
  mov    $0x1,%edx
L188:
  mov    0x24(%rsp),%eax
  cmp    %eax,%esi
  jge    L169
  mov    %eax,%esi
  mov    $0x2,%edx
L169:
  mov    0x30(%rsp),%eax
  cmp    %eax,%esi
  jge    L182
  mov    %eax,%esi
  mov    $0x3,%edx
L182:
  mov    $0x3,%ecx
  xor    %eax,%eax
  mov    %r13,%rdi
  sub    %edx,%ecx
  call   <printf@plt>
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L38
  add    $0x50,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L38:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D12
type: string
name: retrieve_data
arguments: data_label: D8
type: string
name: retrieve_data
arguments: data_label: D28
type: string

tool: D12: %6d

tool: D8: max:%d, row:%d, column:%d


tool: D28: max:%d, row=column:%d


assistant: ```c
int main() {
  int a[4][4];
  int i, j, k, max, m, n;
  srand(time(NULL));
  for (i = 0; i < 4; i++) {
    for (j = 0; j < 4; j++)
      a[i][j] = rand() % 100;
  }
  for (i = 0; i < 4; i++) {
    for (j = 0; j < 4; j++)
      printf("%6d", a[i][j]);
    putchar('\n');
  }
  for (i = 0; i < 4; i++) {
    max = a[i][0];
    n = 0;
    for (j = 1; j < 4; j++) {
      if (a[i][j] > max) {
        max = a[i][j];
        n = j;
      }
    }
    printf("max:%d, row:%d, column:%d\n", max, i, n);
  }
  for (i = 0; i < 4; i++) {
    max = a[0][i];
    n = 0;
    for (j = 1; j < 4; j++) {
      if (a[j][i] > max) {
        max = a[j][i];
        n = j;
      }
    }
    printf("max:%d, row:%d, column:%d\n", max, n, i);
  }
  max = a[0][0];
  n = 0;
  for (i = 1; i < 4; i++) {
    if (a[i][i] > max) {
      max = a[i][i];
      n = i;
    }
  }
  printf("max:%d, row=column:%d\n", max, n);
  max = a[0][3];
  n = 0;
  for (i = 1; i < 4; i++) {
    if (a[i][3 - i] > max) {
      max = a[i][3 - i];
      n = i;
    }
  }
  printf("max:%d, row:%d, column:%d\n", max, n, 3 - n);
}
```