user: What would the C source look like for the assembly code provided here?

```asm
<main>:
  endbr64
  push   %rbp
  lea    D0(%rip),%rdi
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  lea    -0x3c(%rbp),%rdx
  lea    -0x40(%rbp),%rsi
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x48,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  call   <scanf@plt>
  movslq -0x3c(%rbp),%rax
  movslq -0x40(%rbp),%rdi
  mov    %rsp,%r8
  mov    %rax,%rsi
  lea    0x0(,%rax,4),%rbx
  mov    %rdi,%rcx
  imul   %rdi,%rax
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%r8
  and    $0xfffffffffffffff0,%rdx
  cmp    %r8,%rsp
  je     L96
L76:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %r8,%rsp
  jne    L76
L96:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L48
L186:
  lea    0xf(,%rdi,4),%rax
  mov    %rsp,%rdi
  mov    %rsp,%r15
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  and    $0xfffffffffffffff0,%rdx
  sub    %rax,%rdi
L152:
  cmp    %rdi,%rsp
  je     L113
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L152
L48:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L186
L113:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L5
L3:
  lea    0xf(%rbx),%rdx
  mov    %rsp,-0x68(%rbp)
  mov    %rsp,%rdi
  mov    %rdx,%rax
  and    $0xfffffffffffff000,%rdx
  and    $0xfffffffffffffff0,%rax
  sub    %rdx,%rdi
L64:
  cmp    %rdi,%rsp
  je     L131
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L64
L5:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L3
L131:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L117
  orq    $0x0,-0x8(%rsp,%rax,1)
L117:
  mov    %rsp,-0x48(%rbp)
  lea    D5(%rip),%r14
  test   %ecx,%ecx
  jle    L25
  mov    -0x68(%rbp),%rax
  movq   $0x0,-0x60(%rbp)
  shr    $0x2,%rbx
  movl   $0x0,-0x4c(%rbp)
  mov    %rax,-0x58(%rbp)
  test   %esi,%esi
  jle    L134
L109:
  mov    -0x60(%rbp),%rax
  xor    %r12d,%r12d
  lea    (%r15,%rax,4),%r13
  nopl   0x0(%rax,%rax,1)
L177:
  mov    %r13,%rsi
  mov    %r14,%rdi
  xor    %eax,%eax
  add    $0x4,%r13
  call   <scanf@plt>
  movslq %r12d,%rax
  mov    -0x48(%rbp),%rcx
  mov    -0x3c(%rbp),%esi
  imul   %rbx,%rax
  mov    (%r15,%rax,4),%eax
  mov    %eax,(%rcx,%r12,4)
  add    $0x1,%r12
  cmp    %r12d,%esi
  jg     L177
  movslq -0x4c(%rbp),%rax
  mov    -0x58(%rbp),%rdi
  mov    -0x40(%rbp),%ecx
  mov    %rax,%rdx
  imul   %rbx,%rax
  add    $0x1,%edx
  mov    %edx,-0x4c(%rbp)
  mov    (%r15,%rax,4),%eax
  mov    %eax,(%rdi)
  cmp    %ecx,%edx
  jge    L25
  addq   $0x4,-0x58(%rbp)
  add    %rbx,-0x60(%rbp)
  test   %esi,%esi
  jg     L109
L134:
  movslq -0x4c(%rbp),%rax
  mov    -0x58(%rbp),%rdx
  mov    %rax,%rdi
  imul   %rbx,%rax
  mov    (%r15,%rax,4),%eax
  mov    %eax,(%rdx)
  lea    0x1(%rdi),%eax
  cmp    %eax,%ecx
  jle    L25
  cltq
  nopl   (%rax)
L137:
  movslq %eax,%rdx
  mov    -0x68(%rbp),%rdi
  imul   %rbx,%rdx
  mov    (%r15,%rdx,4),%edx
  mov    %edx,(%rdi,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%ecx
  jg     L137
L25:
  mov    -0x48(%rbp),%rdi
  call   <selection_sort@plt>
  mov    -0x40(%rbp),%esi
  mov    -0x68(%rbp),%rdi
  mov    %rax,%rbx
  call   <selection_sort@plt>
  mov    %r14,%rdi
  lea    (%rbx,%rax,1),%esi
  call   <printf@plt>
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L102
  lea    -0x28(%rbp),%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L102:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D0
type: string
name: unpack_data
arguments: data_tag: D5
type: string

tool: D0: %d %d

tool: D5: %d

assistant: ```c
int main(int argc, char const *argv[]) {
  int a, b, i, j, count = 0;
  scanf("%d %d", &a, &b);
  int c[a][b], d[a], e[b];
  for (i = 0; i < a; ++i) {
    for (j = 0; j < b; ++j) {
      scanf("%d", &c[i][j]);
      e[j] = c[j][0];
    }
    d[i] = c[i][0];
  }
  count += selection_sort(e, b) + selection_sort(d, a);
  printf("%d", count);
  return 0;
}
```