user: Translate the below assembly code into C programming language:

```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    L16
  cmp    $0x1,%edi
  jle    L16
  movslq %esi,%rbp
  lea    -0x2(%rdi),%ebx
  xor    %r10d,%r10d
  shl    $0x2,%rbp
  add    $0x2,%rbx
  nopl   0x0(%rax)
L189:
  mov    $0x1,%r11d
  xchg   %ax,%ax
L141:
  cmp    %r11d,%ecx
  jle    L65
  mov    -0x8(%r8,%r11,8),%r9
  mov    %r11,%rax
  add    %r10,%r9
L125:
  mov    (%r8,%rax,8),%rdx
  mov    (%r9),%esi
  add    %r10,%rdx
  mov    (%rdx),%edi
  cmp    %edi,%esi
  jle    L168
  mov    %edi,(%r9)
  mov    %esi,(%rdx)
L168:
  add    $0x1,%rax
  cmp    %eax,%ecx
  jg     L125
L65:
  add    $0x1,%r11
  cmp    %rbx,%r11
  jne    L141
  add    $0x4,%r10
  cmp    %rbp,%r10
  jne    L189
L16:
  mov    -0x4(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x8(%rsp)
  test   %eax,%eax
  jle    L90
  lea    -0x2(%rcx),%eax
  xor    %r9d,%r9d
  xor    %r13d,%r13d
  xor    %r12d,%r12d
  lea    0x10(%r8,%rax,8),%r10
  nopl   0x0(%rax,%rax,1)
L105:
  add    $0x1,%r12d
  cmp    %r12d,-0x4(%rsp)
  jle    L56
  mov    -0x8(%rsp),%eax
  mov    (%r8),%r11
  lea    0x4(%r9),%r14
  mov    %r14,%rsi
  sub    %r12d,%eax
  lea    (%r11,%r9,1),%rbx
  lea    0x2(%r13,%rax,1),%rbp
  shl    $0x2,%rbp
  jmp    L124
  nopw   0x0(%rax,%rax,1)
L93:
  add    $0x4,%rsi
  cmp    %rsi,%rbp
  je     L8
L124:
  mov    (%rbx),%eax
  mov    (%r11,%rsi,1),%edx
  cmp    %edx,%eax
  jg     L43
L182:
  cmp    %edx,%eax
  jne    L93
  mov    0x8(%r8),%rdx
  mov    (%rdx,%rsi,1),%edi
  cmp    %edi,(%rdx,%r9,1)
  jle    L93
  test   %ecx,%ecx
  jle    L93
  mov    %eax,(%rbx)
  mov    %eax,(%r11,%rsi,1)
  cmp    $0x1,%ecx
  je     L93
  mov    %ecx,-0xc(%rsp)
  lea    0x8(%r8),%rdx
  nopl   0x0(%rax,%rax,1)
L211:
  mov    (%rdx),%rax
  add    $0x8,%rdx
  lea    (%rax,%rsi,1),%rdi
  add    %r9,%rax
  mov    (%rax),%r15d
  mov    (%rdi),%ecx
  mov    %ecx,(%rax)
  mov    %r15d,(%rdi)
  cmp    %rdx,%r10
  jne    L211
  add    $0x4,%rsi
  mov    -0xc(%rsp),%ecx
  cmp    %rsi,%rbp
  jne    L124
  nopw   0x0(%rax,%rax,1)
L8:
  add    $0x1,%r13
  mov    %r14,%r9
  cmp    -0x8(%rsp),%r12d
  jne    L105
L90:
  pop    %rbx
  mov    %r8,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L43:
  test   %ecx,%ecx
  jle    L93
  mov    %edx,(%rbx)
  lea    0x8(%r8),%rdx
  mov    %eax,(%r11,%rsi,1)
  cmp    $0x1,%ecx
  je     L119
  mov    %ecx,-0xc(%rsp)
  nopl   0x0(%rax,%rax,1)
L132:
  mov    (%rdx),%rax
  add    $0x8,%rdx
  lea    (%rax,%rsi,1),%rdi
  add    %r9,%rax
  mov    (%rax),%r15d
  mov    (%rdi),%ecx
  mov    %ecx,(%rax)
  mov    %r15d,(%rdi)
  cmp    %rdx,%r10
  jne    L132
  mov    -0xc(%rsp),%ecx
L119:
  mov    (%rbx),%eax
  mov    (%r11,%rsi,1),%edx
  jmp    L182
L56:
  lea    0x4(%r9),%r14
  add    $0x1,%r13
  mov    %r14,%r9
  cmp    -0x8(%rsp),%r12d
  jne    L105
  jmp    L90
```

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