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

```asm
<format_table_change>:
  endbr64
  push   %r15
  mov    %edi,%ecx
  mov    %rdx,%r8
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %esi,-0x4(%rsp)
  test   %esi,%esi
  jle    L10
  movslq %esi,%rbp
  lea    -0x2(%rdi),%ebx
  xor    %r10d,%r10d
  shl    $0x2,%rbp
  add    $0x2,%rbx
  nopl   0x0(%rax)
L89:
  mov    $0x1,%r11d
  cmp    $0x1,%ecx
  jle    L179
  nopl   0x0(%rax,%rax,1)
L219:
  cmp    %r11d,%ecx
  jle    L231
  mov    -0x8(%r8,%r11,8),%r9
  mov    %r11,%rax
  add    %r10,%r9
L97:
  mov    (%r8,%rax,8),%rdx
  mov    (%r9),%esi
  add    %r10,%rdx
  mov    (%rdx),%edi
  cmp    %edi,%esi
  jle    L91
  mov    %edi,(%r9)
  mov    %esi,(%rdx)
L91:
  add    $0x1,%rax
  cmp    %eax,%ecx
  jg     L97
L231:
  add    $0x1,%r11
  cmp    %rbx,%r11
  jne    L219
L179:
  add    $0x4,%r10
  cmp    %rbp,%r10
  jne    L89
L10:
  mov    -0x4(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x8(%rsp)
  test   %eax,%eax
  jle    L151
  lea    0x8(%r8),%rbx
  lea    -0x1(%rcx),%eax
  xor    %r10d,%r10d
  xor    %r14d,%r14d
  mov    %rbx,-0x10(%rsp)
  lea    (%rbx,%rax,8),%r11
  xor    %r13d,%r13d
  nopl   0x0(%rax,%rax,1)
L241:
  add    $0x1,%r13d
  cmp    %r13d,-0x4(%rsp)
  jle    L223
  mov    -0x8(%rsp),%eax
  mov    (%r8),%rbx
  lea    0x4(%r10),%r15
  mov    %r15,%rdx
  sub    %r13d,%eax
  lea    (%rbx,%r10,1),%rbp
  lea    0x2(%r14,%rax,1),%r12
  shl    $0x2,%r12
  jmp    L61
  nop
L235:
  add    $0x4,%rdx
  cmp    %rdx,%r12
  je     L54
L61:
  mov    0x0(%rbp),%esi
  mov    (%rbx,%rdx,1),%edi
  cmp    %edi,%esi
  jg     L118
L119:
  cmp    %edi,%esi
  jne    L235
  mov    0x8(%r8),%rax
  mov    (%rax,%rdx,1),%r9d
  cmp    %r9d,(%rax,%r10,1)
  jle    L235
  test   %ecx,%ecx
  jle    L235
  mov    -0x10(%rsp),%r9
  mov    %rbx,%rax
  jmp    L44
  nopl   0x0(%rax,%rax,1)
L107:
  mov    (%r9),%rax
  add    $0x8,%r9
  mov    (%rax,%rdx,1),%edi
  mov    (%rax,%r10,1),%esi
L44:
  mov    %edi,(%rax,%r10,1)
  mov    %esi,(%rax,%rdx,1)
  cmp    %r11,%r9
  jne    L107
  add    $0x4,%rdx
  cmp    %rdx,%r12
  jne    L61
  nopl   0x0(%rax,%rax,1)
L54:
  add    $0x1,%r14
  mov    %r15,%r10
  cmp    -0x8(%rsp),%r13d
  jne    L241
L151:
  pop    %rbx
  mov    %r8,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L118:
  test   %ecx,%ecx
  jle    L235
  mov    -0x10(%rsp),%r9
  mov    %rbx,%rax
  jmp    L200
  nopw   0x0(%rax,%rax,1)
L8:
  mov    (%r9),%rax
  add    $0x8,%r9
  mov    (%rax,%rdx,1),%edi
  mov    (%rax,%r10,1),%esi
L200:
  mov    %edi,(%rax,%r10,1)
  mov    %esi,(%rax,%rdx,1)
  cmp    %r9,%r11
  jne    L8
  mov    0x0(%rbp),%esi
  mov    (%rbx,%rdx,1),%edi
  jmp    L119
L223:
  lea    0x4(%r10),%r15
  add    $0x1,%r14
  mov    %r15,%r10
  cmp    -0x8(%rsp),%r13d
  jne    L241
  jmp    L151
```

assistant: ```c
*format_table_change(int n, int p, int **tab) {
  int i, j, k, tmp;
  for (j = 0; j < p; j++) {
    for (i = 0; i < n - 1; i++) {
      for (k = i + 1; k < n; k++) {
        if (tab[i][j] > tab[k][j]) {
          tmp = tab[i][j];
          tab[i][j] = tab[k][j];
          tab[k][j] = tmp;
        }
      }
    }
  }
  for (j = 0; j < p - 1; j++) {
    for (k = j + 1; k < p; k++) {
      if (tab[0][j] > tab[0][k]) {
        for (i = 0; i < n; i++) {
          tmp = tab[i][j];
          tab[i][j] = tab[i][k];
          tab[i][k] = tmp;
        }
      }
      if (tab[0][j] == tab[0][k]) {
        if (tab[1][j] > tab[1][k]) {
          for (i = 0; i < n; i++) {
            tmp = tab[i][j];
            tab[i][j] = tab[i][k];
            tab[i][k] = tmp;
          }
        }
      }
    }
  }
  return tab;
}
```