user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x14000(%rsp),%r11
L2:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L2
  sub    $0x248,%rsp
  lea    D21(%rip),%rdi
  lea    D11(%rip),%r13
  mov    %fs:0x28,%rax
  mov    %rax,0x14238(%rsp)
  xor    %eax,%eax
  lea    0x3c(%rsp),%rax
  lea    0x44(%rsp),%rcx
  mov    %rax,0x18(%rsp)
  lea    0x40(%rsp),%rdx
  mov    %rax,%rsi
  xor    %eax,%eax
  mov    %rcx,0x28(%rsp)
  lea    0x50(%rsp),%r12
  mov    %rdx,0x20(%rsp)
  call   <scanf@plt>
  jmp    L9
L88:
  mov    0x44(%rsp),%ecx
  test   %ecx,%ecx
  je     L18
  xor    %esi,%esi
  lea    0x370(%rsp),%rbp
L50:
  mov    %rbp,%rdi
  lea    0x690(%rsp),%r14
  call   <find_factors@plt>
  mov    0x3c(%rsp),%ecx
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    0x44(%rsp),%r9d
  mov    0x40(%rsp),%r8d
  mov    %r14,%rdi
  call   <build_solver@plt>
  mov    0x3c(%rsp),%esi
  imul   0x40(%rsp),%esi
  mov    %r14,%rdi
  call   <makeLowerDiag@plt>
  mov    0x3c(%rsp),%esi
  imul   0x40(%rsp),%esi
  mov    %r14,%rdi
  call   <finishSolvingmakeLowerDiag@plt>
  mov    0x40(%rsp),%edx
  mov    0x3c(%rsp),%esi
  mov    %r14,%rdi
  call   <final_print@plt>
  lea    D22(%rip),%rdi
  call   <printf@plt>
  mov    0x28(%rsp),%rcx
  xor    %eax,%eax
  mov    0x20(%rsp),%rdx
  mov    0x18(%rsp),%rsi
  lea    D21(%rip),%rdi
  call   <scanf@plt>
L9:
  mov    0x3c(%rsp),%esi
  mov    0x40(%rsp),%eax
  mov    %esi,%edx
  or     %eax,%edx
  je     L88
  test   %eax,%eax
  jle    L8
  movl   $0x0,0xc(%rsp)
  lea    0x370(%rsp),%rbp
  movq   $0x0,0x10(%rsp)
  nopl   0x0(%rax)
L38:
  mov    0x10(%rsp),%r15
  xor    %r14d,%r14d
  lea    0x48(%rsp),%rbx
  test   %esi,%esi
  jle    L33
  nopl   0x0(%rax)
L29:
  mov    %rbx,%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x1,%r14d
  call   <scanf@plt>
  movsd  0x48(%rsp),%xmm0
  mov    0x3c(%rsp),%esi
  movq   $0x0,0x0(%rbp,%r15,1)
  movsd  %xmm0,(%r12,%r15,1)
  add    $0x8,%r15
  cmp    %r14d,%esi
  jg     L29
  mov    0x40(%rsp),%eax
L33:
  addl   $0x1,0xc(%rsp)
  mov    0xc(%rsp),%ecx
  mov    %eax,%edx
  addq   $0x50,0x10(%rsp)
  cmp    %ecx,%eax
  jg     L38
  mov    0x44(%rsp),%ecx
  jmp    L50
L18:
  mov    0x14238(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L82
  add    $0x14248,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L8:
  mov    0x44(%rsp),%ecx
  mov    %eax,%edx
  lea    0x370(%rsp),%rbp
  jmp    L50
L82:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D21
type_infered: string
name: read_data
arguments: data_tag: D11
type_infered: string
name: read_data
arguments: data_tag: D22
type_infered: string

tool: D21: %d %d %d

tool: D11: %lf

tool: D22: 


assistant: ```c
int main() {
  int cols, rows, distance;
  int i, j;
  double image[10][10];
  double factors[10][10];
  double solver[10 * 10][10 * 10 + 1];
  double temp;
  scanf("%d %d %d", &cols, &rows, &distance);
  while (!(cols == 0 && rows == 0 && distance == 0)) {
    for (i = 0; i < rows; i++) {
      for (j = 0; j < cols; j++) {
        scanf("%lf", &temp);
        image[i][j] = temp;
        factors[i][j] = 0.0;
      }
    }
    find_factors(factors, cols, rows, distance);
    build_solver(solver, factors, image, cols, rows, distance);
    makeLowerDiag(solver, cols * rows);
    finishSolvingmakeLowerDiag(solver, cols * rows);
    final_print(solver, cols, rows);
    printf("\n");
    scanf("%d %d %d", &cols, &rows, &distance);
  }
  return 0;
}
```