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

```asm
<checkorth>:
  endbr64
  push   %r15
  xor    %eax,%eax
  push   %r14
  push   %r13
  mov    %esi,%r13d
  mov    %edx,%esi
  push   %r12
  mov    %rdi,%r12
  lea    D8(%rip),%rdi
  push   %rbp
  mov    $0x14,%ebp
  push   %rbx
  mov    %edx,%ebx
  sub    $0x28,%rsp
  call   <printf@plt>
  cmp    %ebp,%ebx
  cmovle %ebx,%ebp
  test   %ebx,%ebx
  jle    L31
  movslq %ebx,%rax
  pxor   %xmm4,%xmm4
  mov    $0x1,%r15d
  lea    (%r12,%rax,8),%r14
  movsd  %xmm4,0x8(%rsp)
  nopl   0x0(%rax,%rax,1)
L36:
  mov    (%r12,%r15,8),%rdi
  mov    (%r14),%rcx
  mov    %r13d,%edx
  mov    $0x1,%esi
  xor    %eax,%eax
  call   <dot@plt>
  mov    %r15d,%edx
  movapd %xmm0,%xmm2
  cmp    %ebp,%r15d
  jg     L39
  movsd  %xmm0,0x10(%rsp)
  andpd  D51(%rip),%xmm0
  mov    %r15d,0x1c(%rsp)
  call   <log10@plt>
  lea    D50(%rip),%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  neg    %esi
  call   <printf@plt>
  mov    0x1c(%rsp),%edx
  movsd  0x10(%rsp),%xmm2
L39:
  cmp    %ebx,%edx
  je     L21
  movsd  0x8(%rsp),%xmm3
  movapd %xmm2,%xmm0
  andpd  D51(%rip),%xmm0
  movapd %xmm3,%xmm1
  andpd  D51(%rip),%xmm1
  cmpnltsd %xmm0,%xmm1
  andpd  %xmm1,%xmm3
  andnpd %xmm2,%xmm1
  orpd   %xmm3,%xmm1
  movsd  %xmm1,0x8(%rsp)
L21:
  add    $0x1,%r15
  cmp    %r15d,%ebx
  jge    L36
L1:
  movsd  0x8(%rsp),%xmm0
  add    $0x28,%rsp
  mov    $0x1,%eax
  lea    D1(%rip),%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1080 <printf@plt>
  nopl   0x0(%rax)
L31:
  pxor   %xmm5,%xmm5
  movsd  %xmm5,0x8(%rsp)
  jmp    L1
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D8
datatype: string
name: extract_symbolic_data
arguments: data_tag: D51
datatype: qword[2]
name: extract_symbolic_data
arguments: data_tag: D50
datatype: string
name: extract_symbolic_data
arguments: data_tag: D1
datatype: string

tool: D8: %3d) 

tool: {"D51": [0x7fffffffffffffff,0x0000000000000000]}

tool: D50:  %2d

tool: D1:  worst %4.2e


assistant: ```c
void checkorth(double **mat, int n, int dim) {
  int i, j;
  double measure;
  double prod;
  double worst;
  int lim;
  int screenlim;
  int option;
  double dot();
  screenlim = 20;
  option = 3;
  if (option == 1) {
    printf("Orthogonality check:\n");
    for (i = 1; i <= dim; i++) {
      printf("%2d)", i);
      for (j = 1; j <= i; j++) {
        prod = dot(mat[i], 1, n, mat[j]);
        printf(" %2d", -(int)log10(prod));
      }
      printf("\n");
    }
  }
  if (option == 2) {
    printf("Frobenius orthogonality measure:");
    measure = 0;
    for (i = 1; i <= dim; i++) {
      for (j = i; j <= dim; j++) {
        prod = dot(mat[i], 1, n, mat[j]);
        if (i == j) {
          measure += fabs(1.0 - prod);
        } else {
          measure += 2.0 * fabs(prod);
        }
      }
    }
    printf("%g \n", measure);
  }
  if (option == 3) {
    printf("%3d) ", dim);
    lim = ((dim) < (screenlim) ? (dim) : (screenlim));
    worst = 0;
    for (i = 1; i <= dim; i++) {
      prod = dot(mat[i], 1, n, mat[dim]);
      if (i <= lim) {
        printf(" %2d", -(int)log10(fabs(prod)));
      }
      if ((i != dim) && (fabs(prod) > fabs(worst))) {
        worst = prod;
      }
    }
    printf(" worst %4.2e\n", worst);
  }
}
```