user: What is the c source code of the assembly code below:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x7a1000(%rsp),%r11
L161:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L161
  sub    $0x258,%rsp
  lea    D16(%rip),%r12
  mov    %r12,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x7a1248(%rsp)
  xor    %eax,%eax
  lea    0x28(%rsp),%rsi
  call   <scanf@plt>
  cmpq   $0x0,0x28(%rsp)
  jle    L52
  lea    0x38(%rsp),%rax
  lea    0x40(%rsp),%r15
  movq   $0x1,0x8(%rsp)
  mov    %rax,0x18(%rsp)
  lea    0x30(%rsp),%rax
  lea    D21(%rip),%rbx
  mov    %rax,0x10(%rsp)
  nopw   0x0(%rax,%rax,1)
L80:
  mov    0x18(%rsp),%rdx
  mov    0x10(%rsp),%rsi
  xor    %eax,%eax
  lea    D8(%rip),%rdi
  call   <scanf@plt>
  cmpq   $0x0,0x30(%rsp)
  jle    L125
  mov    0x38(%rsp),%rax
  mov    %r15,(%rsp)
  xor    %r14d,%r14d
  xor    %ebp,%ebp
  test   %rax,%rax
  jle    L57
  nopl   0x0(%rax,%rax,1)
L100:
  mov    (%rsp),%rax
  xor    %r13d,%r13d
  lea    (%rax,%r14,8),%r15
  nopl   0x0(%rax,%rax,1)
L106:
  mov    %r15,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  add    $0x1,%r13
  call   <scanf@plt>
  mov    0x38(%rsp),%rax
  add    $0x8,%r15
  cmp    %r13,%rax
  jg     L106
  add    $0x1,%rbp
  cmp    %rbp,0x30(%rsp)
  jle    L57
  add    $0x3e8,%r14
  test   %rax,%rax
  jg     L100
L57:
  mov    (%rsp),%r15
L125:
  lea    D1(%rip),%rdi
  call   <puts@plt>
  cmpq   $0x0,0x30(%rsp)
  jle    L147
  mov    %r15,(%rsp)
  mov    %r15,%rbp
  xor    %r14d,%r14d
  nopl   0x0(%rax)
L53:
  xor    %r13d,%r13d
  cmpq   $0x0,0x38(%rsp)
  jle    L46
  nopl   0x0(%rax,%rax,1)
L186:
  mov    0x0(%rbp,%r13,8),%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  add    $0x1,%r13
  call   <printf@plt>
  cmp    %r13,0x38(%rsp)
  jg     L186
L46:
  mov    $0xa,%edi
  add    $0x1,%r14
  add    $0x1f40,%rbp
  call   <putchar@plt>
  mov    0x30(%rsp),%rdx
  cmp    %r14,%rdx
  jg     L53
  mov    (%rsp),%r13
  test   %rdx,%rdx
  jle    L147
  xor    %ebp,%ebp
  mov    %rdx,%r14
  nop
L77:
  mov    0x38(%rsp),%rsi
  mov    %r13,%rdi
  add    $0x1,%rbp
  add    $0x1f40,%r13
  call   <sort_rows@plt>
  cmp    %rbp,%r14
  jne    L77
L147:
  mov    0x38(%rsp),%r13
  xor    %ebp,%ebp
  test   %r13,%r13
  jle    L159
  nopl   0x0(%rax)
L84:
  mov    %r13,%rsi
  mov    %r15,%rdi
  add    $0x1,%rbp
  call   <sort_cols@plt>
  cmp    %rbp,%r13
  jne    L84
L159:
  lea    D14(%rip),%rdi
  call   <puts@plt>
  cmpq   $0x0,0x30(%rsp)
  jle    L2
  mov    %r15,%rbp
  xor    %r13d,%r13d
  xchg   %ax,%ax
L75:
  xor    %r14d,%r14d
  cmpq   $0x0,0x38(%rsp)
  jle    L9
  nopl   0x0(%rax,%rax,1)
L188:
  mov    0x0(%rbp,%r14,8),%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  add    $0x1,%r14
  call   <printf@plt>
  cmp    %r14,0x38(%rsp)
  jg     L188
L9:
  mov    $0xa,%edi
  add    $0x1,%r13
  add    $0x1f40,%rbp
  call   <putchar@plt>
  cmp    %r13,0x30(%rsp)
  jg     L75
L2:
  mov    $0xa,%edi
  call   <putchar@plt>
  addq   $0x1,0x8(%rsp)
  mov    0x8(%rsp),%rax
  cmp    %rax,0x28(%rsp)
  jge    L80
L52:
  mov    0x7a1248(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L85
  add    $0x7a1258,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L85:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D16
type_guessed: string
name: retrieve_data
arguments: data_label: D21
type_guessed: string
name: retrieve_data
arguments: data_label: D8
type_guessed: string
name: retrieve_data
arguments: data_label: D1
type_guessed: string
name: retrieve_data
arguments: data_label: D14
type_guessed: string

tool: D16: %lld

tool: D21: %lld 

tool: D8: %lld %lld

tool: D1: Original array:

tool: D14: Sorted Array:

assistant: ```c
int main() {
  long long int arr[1000][1000];
  long long int i, j, row_size, col_size;
  long long int k, x, y, z, t, n, m;
  scanf("%lld", &t);
  for (k = 1; k <= t; k++) {
    scanf("%lld %lld", &n, &m);
    for (x = 0; x < n; x++) {
      for (y = 0; y < m; y++) {
        scanf("%lld", &arr[x][y]);
      }
    }
    printf("Original array:\n");
    for (i = 0; i < n; i++) {
      for (j = 0; j < m; j++) {
        printf("%lld ", arr[i][j]);
      }
      printf("\n");
    }
    row_size = n;
    for (i = 0; i < row_size; i++) {
      sort_rows(arr[i], m);
    }
    col_size = m;
    for (i = 0; i < col_size; i++) {
      sort_cols(arr, col_size);
    }
    printf("Sorted Array:\n");
    for (i = 0; i < n; i++) {
      for (j = 0; j < m; j++) {
        printf("%lld ", arr[i][j]);
      }
      printf("\n");
    }
    printf("\n");
  }
  return 0;
}
```