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

```asm
<printmat2>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %edi,%edx
  mov    %edi,0x24(%rsp)
  mov    %rsi,0x38(%rsp)
  mov    %edi,%ecx
  movslq %edi,%rdi
  mov    %rdi,0x30(%rsp)
  lea    0xf(%rdx),%eax
  test   %edx,%edx
  cmovns %edx,%eax
  sar    $0x4,%eax
  mov    %eax,0x28(%rsp)
  sar    $0x1f,%ecx
  mov    %ecx,%eax
  shr    $0x1c,%eax
  mov    %edx,%ecx
  lea    (%rdx,%rax,1),%edx
  and    $0xf,%edx
  sub    %eax,%edx
  mov    %edx,0x2c(%rsp)
  cmp    $0xf,%ecx
  jle    L10
  lea    0x80(%rsi),%rax
  mov    %rax,0x18(%rsp)
  lea    0x0(,%rdi,8),%rax
  mov    %rax,0x8(%rsp)
  mov    $0x0,%ebp
  movq   $0x0,0x10(%rsp)
  lea    D1(%rip),%r15
  lea    D22(%rip),%r12
  jmp    L32
L98:
  mov    %r14d,%ebp
L32:
  lea    D60(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %ebp,%ebx
L52:
  mov    %ebx,%esi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x1,%ebx
  lea    0x10(%rbp),%r14d
  cmp    %r14d,%ebx
  jne    L52
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    0x18(%rsp),%rbp
  mov    $0x0,%r13d
  mov    %r14d,0x20(%rsp)
  mov    0x24(%rsp),%r14d
L39:
  mov    %r13d,%esi
  lea    D36(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x80(%rbp),%rbx
L48:
  movsd  (%rbx),%xmm0
  mov    %r12,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  add    $0x8,%rbx
  cmp    %rbp,%rbx
  jne    L48
  mov    $0xa,%edi
  call   <putchar@plt>
  add    $0x1,%r13d
  add    0x8(%rsp),%rbp
  cmp    %r13d,%r14d
  jne    L39
  mov    0x20(%rsp),%r14d
  mov    $0xa,%edi
  call   <putchar@plt>
  addq   $0x1,0x10(%rsp)
  mov    0x10(%rsp),%rax
  subq   $0xffffffffffffff80,0x18(%rsp)
  cmp    %eax,0x28(%rsp)
  jg     L98
L10:
  cmpl   $0x0,0x2c(%rsp)
  jg     L78
L76:
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L78:
  lea    D60(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x28(%rsp),%ebp
  shl    $0x4,%ebp
  mov    %ebp,%ebx
  lea    D1(%rip),%r12
  mov    0x24(%rsp),%r13d
L27:
  mov    %ebx,%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x1,%ebx
  cmp    %r13d,%ebx
  jne    L27
  mov    $0xa,%edi
  call   <putchar@plt>
  cmpl   $0x0,0x24(%rsp)
  jle    L76
  mov    0x30(%rsp),%rax
  shl    $0x3,%rax
  mov    %rax,0x8(%rsp)
  mov    0x2c(%rsp),%edx
  lea    -0x1(%rdx),%eax
  movslq %ebp,%rbp
  add    %rbp,%rax
  mov    0x38(%rsp),%rcx
  lea    0x8(%rcx,%rax,8),%rbp
  mov    $0x0,%r13d
  lea    D36(%rip),%r15
  mov    %edx,%r14d
  neg    %r14
  shl    $0x3,%r14
  lea    D22(%rip),%r12
  jmp    L67
L99:
  mov    $0xa,%edi
  call   <putchar@plt>
  add    $0x1,%r13d
  add    0x8(%rsp),%rbp
  cmp    %r13d,0x24(%rsp)
  je     L76
L67:
  mov    %r13d,%esi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    (%r14,%rbp,1),%rbx
L106:
  movsd  (%rbx),%xmm0
  mov    %r12,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  add    $0x8,%rbx
  cmp    %rbp,%rbx
  jne    L106
  jmp    L99
```

tool_calls: name: unpack_data
arguments: data_tag: D1
type_infered: string
name: unpack_data
arguments: data_tag: D22
type_infered: string
name: unpack_data
arguments: data_tag: D60
type_infered: string
name: unpack_data
arguments: data_tag: D36
type_infered: string

tool: D1: %10d

tool: D22: %+10.2e

tool: D60:     

tool: D36:  %3d

assistant: ```c
void printmat2(const int dim, double mat[][dim]) {
  const int ncols = 16;
  int i, j, k;
  int nblocks, nlast;
  nblocks = dim / ncols;
  nlast = dim % ncols;
  for (i = 0; i < nblocks; ++i) {
    printf("    ");
    for (k = 0; k < ncols; ++k)
      printf("%10d", k + i * ncols);
    printf("\n");
    for (j = 0; j < dim; ++j) {
      printf(" %3d", j);
      for (k = 0; k < ncols; ++k)
        printf("%+10.2e", mat[j][k + i * ncols]);
      printf("\n");
    }
    printf("\n");
  }
  if (nlast > 0) {
    printf("    ");
    for (k = 0; k < nlast; ++k)
      printf("%10d", k + nblocks * ncols);
    printf("\n");
    for (j = 0; j < dim; ++j) {
      printf(" %3d", j);
      for (k = 0; k < nlast; ++k)
        printf("%+10.2e", mat[j][k + nblocks * ncols]);
      printf("\n");
    }
  }
  return;
}
```