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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  lea    -0x40(%rbp),%rsi
  lea    D31(%rip),%rdi
  call   <scanf@plt>
  cmpl   $0x0,-0x40(%rbp)
  jle    L77
  movl   $0x0,-0x48(%rbp)
  lea    D19(%rip),%r15
  jmp    L111
L143:
  mov    %rsi,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L183
  orq    $0x0,-0x8(%rsp,%rax,1)
L183:
  mov    %rsp,%rsi
  test   %edx,%edx
  jle    L43
  mov    -0x50(%rbp),%r8
  shr    $0x2,%r8
  mov    %edx,%r10d
  lea    -0x1(%rdx),%eax
  and    $0xfffffffe,%eax
  sub    %eax,%edx
  mov    %edx,%r14d
  mov    $0x0,%eax
  mov    $0x0,%r12d
  mov    $0xffffffff,%edi
  jmp    L149
L156:
  add    $0x1,%eax
  lea    (%rax,%rdi,1),%edx
  sub    %r11d,%edx
  movslq %edx,%rdx
  imul   %r8,%rdx
  add    %rcx,%rdx
  mov    %eax,(%rsi,%rdx,4)
  cmp    %r9d,%eax
  jne    L156
  lea    (%rbx,%r10,1),%edi
L176:
  lea    -0x1(%r10),%r13d
  test   %r13d,%r13d
  jle    L58
  movslq %edi,%rdx
  imul   %r8,%rdx
  movslq %r12d,%rcx
  add    %rcx,%rdx
  lea    (%rsi,%rdx,4),%rdx
  mov    %eax,%r9d
  lea    (%rax,%r13,1),%ecx
L196:
  add    $0x1,%eax
  mov    %eax,0x4(%rdx)
  add    $0x4,%rdx
  cmp    %ecx,%eax
  jne    L196
  add    %r10d,%r9d
  lea    -0x1(%r9),%eax
  mov    %eax,%ecx
  lea    -0x1(%r12,%r10,1),%r12d
  lea    -0x2(%r9,%r10,1),%ebx
  mov    %edi,-0x44(%rbp)
  movslq %r12d,%r11
L54:
  add    $0x1,%ecx
  mov    %edi,%edx
  sub    %ecx,%edx
  lea    -0x1(%r9,%rdx,1),%edx
  movslq %edx,%rdx
  imul   %r8,%rdx
  add    %r11,%rdx
  mov    %ecx,(%rsi,%rdx,4)
  cmp    %ebx,%ecx
  jne    L54
  add    %r13d,%eax
  mov    $0x1,%edi
  sub    %r10d,%edi
  add    -0x44(%rbp),%edi
L58:
  cmp    %r14d,%r10d
  je     L115
  movslq %edi,%rdx
  imul   %r8,%rdx
  movslq %r12d,%rcx
  add    %rcx,%rdx
  lea    (%rsi,%rdx,4),%rdx
  lea    -0x2(%rax,%r10,1),%ecx
L47:
  add    $0x1,%eax
  mov    %eax,-0x4(%rdx)
  sub    $0x4,%rdx
  cmp    %ecx,%eax
  jne    L47
  mov    $0x2,%edx
  sub    %r10d,%edx
  add    %edx,%r12d
  sub    $0x2,%r10d
L149:
  mov    %eax,%r11d
  lea    (%rax,%r10,1),%r9d
  mov    %edi,%ebx
  movslq %r12d,%rcx
  test   %r10d,%r10d
  jg     L156
  jmp    L176
L115:
  mov    %rsi,%r12
  mov    $0x0,%r13d
  mov    -0x50(%rbp),%r14
  jmp    L110
L165:
  mov    (%r12,%rbx,4),%esi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x1,%rbx
  cmp    %ebx,-0x3c(%rbp)
  jg     L165
L186:
  lea    D29(%rip),%rdi
  call   <puts@plt>
  add    $0x1,%r13d
  add    %r14,%r12
  cmp    %r13d,-0x3c(%rbp)
  jle    L43
L110:
  mov    $0x0,%ebx
  cmpl   $0x0,-0x3c(%rbp)
  jg     L165
  jmp    L186
L43:
  mov    -0x58(%rbp),%rsp
  addl   $0x1,-0x48(%rbp)
  mov    -0x48(%rbp),%eax
  cmp    %eax,-0x40(%rbp)
  jle    L77
L111:
  mov    %rsp,-0x58(%rbp)
  lea    -0x3c(%rbp),%rsi
  lea    D31(%rip),%rdi
  call   <scanf@plt>
  mov    -0x3c(%rbp),%edx
  movslq %edx,%rax
  lea    0x0(,%rax,4),%rbx
  mov    %rbx,-0x50(%rbp)
  imul   %rax,%rax
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rsi
  and    $0xfffffffffffffff0,%rsi
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rcx
  sub    %rax,%rcx
L40:
  cmp    %rcx,%rsp
  je     L143
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L40
L77:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L164
  mov    $0x0,%eax
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L164:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D31
type: string
name: retrieve_data
arguments: label: D19
type: string
name: retrieve_data
arguments: label: D29
type: string

tool: D31: %d

tool: D19: %d 

tool: D29: 


assistant: ```c
int main() {
  int n, i, j, k, row, col, val, move;
  scanf("%d", &n);
  for (j = 0; j < n; j++) {
    scanf("%d", &i);
    int arr[i][i];
    row = -1;
    col = 0;
    val = 0;
    move = i;
    while (move > 0) {
      for (k = 0; k < move; k++)
        arr[++row][col] = ++val;
      move--;
      for (k = 0; k < move; k++)
        arr[row][++col] = ++val;
      for (k = 0; k < move; k++)
        arr[--row][col] = ++val;
      move--;
      for (k = 0; k < move; k++)
        arr[row][--col] = ++val;
    }
    for (row = 0; row < i; row++) {
      for (col = 0; col < i; col++)
        printf("%d ", arr[row][col]);
      printf("\n\n");
    }
  }
  return 0;
}
```