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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xc0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    $0x14,%esi
  mov    $0x1,%edi
  call   <ivector@plt>
  mov    %rax,-0x98(%rbp)
  mov    $0x14,%esi
  mov    $0x1,%edi
  call   <ivector@plt>
  mov    %rax,-0x90(%rbp)
  mov    $0x14,%ecx
  mov    $0x1,%edx
  mov    $0x14,%esi
  mov    $0x1,%edi
  call   <matrix@plt>
  mov    %rax,-0x88(%rbp)
  mov    $0x14,%ecx
  mov    $0x1,%edx
  mov    $0x14,%esi
  mov    $0x1,%edi
  call   <matrix@plt>
  mov    %rax,-0x80(%rbp)
  mov    $0x14,%ecx
  mov    $0x1,%edx
  mov    $0x14,%esi
  mov    $0x1,%edi
  call   <matrix@plt>
  mov    %rax,-0x78(%rbp)
  mov    $0x14,%ecx
  mov    $0x1,%edx
  mov    $0x14,%esi
  mov    $0x1,%edi
  call   <matrix@plt>
  mov    %rax,-0x70(%rbp)
  lea    D149(%rip),%rax
  mov    %rax,%rsi
  lea    D46(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x68(%rbp)
  cmpq   $0x0,-0x68(%rbp)
  jne    L436
  lea    D152(%rip),%rax
  mov    %rax,%rdi
  call   <nrerror@plt>
  jmp    L436
L432:
  mov    -0x68(%rbp),%rdx
  lea    -0x60(%rbp),%rax
  mov    $0x50,%esi
  mov    %rax,%rdi
  call   <fgets@plt>
  mov    -0x68(%rbp),%rdx
  lea    -0x60(%rbp),%rax
  mov    $0x50,%esi
  mov    %rax,%rdi
  call   <fgets@plt>
  lea    -0xb4(%rbp),%rcx
  lea    -0xb0(%rbp),%rdx
  mov    -0x68(%rbp),%rax
  lea    D70(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  mov    -0x68(%rbp),%rdx
  lea    -0x60(%rbp),%rax
  mov    $0x50,%esi
  mov    %rax,%rdi
  call   <fgets@plt>
  movl   $0x1,-0xa4(%rbp)
  jmp    L214
L465:
  movl   $0x1,-0xa0(%rbp)
  jmp    L198
L124:
  mov    -0xa4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xa0(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%rax
  lea    D113(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  addl   $0x1,-0xa0(%rbp)
L198:
  mov    -0xb0(%rbp),%eax
  cmp    %eax,-0xa0(%rbp)
  jle    L124
  addl   $0x1,-0xa4(%rbp)
L214:
  mov    -0xb0(%rbp),%eax
  cmp    %eax,-0xa4(%rbp)
  jle    L465
  mov    -0x68(%rbp),%rdx
  lea    -0x60(%rbp),%rax
  mov    $0x50,%esi
  mov    %rax,%rdi
  call   <fgets@plt>
  movl   $0x1,-0xa0(%rbp)
  jmp    L430
L431:
  movl   $0x1,-0xa4(%rbp)
  jmp    L54
L347:
  mov    -0xa4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xa0(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%rax
  lea    D113(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  addl   $0x1,-0xa4(%rbp)
L54:
  mov    -0xb0(%rbp),%eax
  cmp    %eax,-0xa4(%rbp)
  jle    L347
  addl   $0x1,-0xa0(%rbp)
L430:
  mov    -0xb4(%rbp),%eax
  cmp    %eax,-0xa0(%rbp)
  jle    L431
  lea    D35(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x1,-0xa4(%rbp)
  jmp    L171
L194:
  movl   $0x1,-0xa0(%rbp)
  jmp    L60
L443:
  mov    -0xa4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xa0(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  pxor   %xmm3,%xmm3
  cvtss2sd %xmm0,%xmm3
  movq   %xmm3,%rax
  movq   %rax,%xmm0
  lea    D154(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  addl   $0x1,-0xa0(%rbp)
L60:
  mov    -0xb0(%rbp),%eax
  cmp    %eax,-0xa0(%rbp)
  jle    L443
  mov    $0xa,%edi
  call   <putchar@plt>
  addl   $0x1,-0xa4(%rbp)
L171:
  mov    -0xb0(%rbp),%eax
  cmp    %eax,-0xa4(%rbp)
  jle    L194
  mov    -0xb0(%rbp),%esi
  lea    -0xac(%rbp),%rcx
  mov    -0x98(%rbp),%rdx
  mov    -0x88(%rbp),%rax
  mov    %rax,%rdi
  call   <ludcmp@plt>
  movl   $0x1,-0xa4(%rbp)
  jmp    L379
L41:
  movl   $0x1,-0xa0(%rbp)
  jmp    L455
L167:
  mov    -0xa0(%rbp),%eax
  cmp    -0xa4(%rbp),%eax
  jle    L131
  mov    -0xa4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xa0(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,%rdx
  mov    -0xa4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x78(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rcx
  mov    -0xa0(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  mov    -0xa4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xa0(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movss  %xmm0,(%rax)
  jmp    L4
L131:
  mov    -0xa0(%rbp),%eax
  cmp    -0xa4(%rbp),%eax
  jge    L93
  mov    -0xa4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xa0(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movss  %xmm0,(%rax)
  mov    -0xa4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xa0(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,%rdx
  mov    -0xa4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x80(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rcx
  mov    -0xa0(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  jmp    L4
L93:
  mov    -0xa4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xa0(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,%rdx
  mov    -0xa4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x78(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rcx
  mov    -0xa0(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  mov    -0xa4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xa0(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  D45(%rip),%xmm0
  movss  %xmm0,(%rax)
L4:
  addl   $0x1,-0xa0(%rbp)
L455:
  mov    -0xb0(%rbp),%eax
  cmp    %eax,-0xa0(%rbp)
  jle    L167
  addl   $0x1,-0xa4(%rbp)
L379:
  mov    -0xb0(%rbp),%eax
  cmp    %eax,-0xa4(%rbp)
  jle    L41
  movl   $0x1,-0xa4(%rbp)
  jmp    L30
L336:
  mov    -0xa4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x90(%rbp),%rax
  add    %rax,%rdx
  mov    -0xa4(%rbp),%eax
  mov    %eax,(%rdx)
  movl   $0x1,-0xa0(%rbp)
  jmp    L395
L317:
  mov    -0xa4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xa0(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movss  %xmm0,(%rax)
  movl   $0x1,-0xa8(%rbp)
  jmp    L417
L112:
  mov    -0xa4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xa0(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  mov    -0xa4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xa8(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm2
  mov    -0xa8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xa0(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mulss  %xmm2,%xmm0
  mov    -0xa4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xa0(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0xa8(%rbp)
L417:
  mov    -0xb0(%rbp),%eax
  cmp    %eax,-0xa8(%rbp)
  jle    L112
  addl   $0x1,-0xa0(%rbp)
L395:
  mov    -0xb0(%rbp),%eax
  cmp    %eax,-0xa0(%rbp)
  jle    L317
  addl   $0x1,-0xa4(%rbp)
L30:
  mov    -0xb0(%rbp),%eax
  cmp    %eax,-0xa4(%rbp)
  jle    L336
  lea    D174(%rip),%rax
  mov    %rax,%rdx
  lea    D169(%rip),%rax
  mov    %rax,%rsi
  lea    D157(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x1,-0xa4(%rbp)
  jmp    L78
L248:
  mov    -0xa4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x98(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x9c(%rbp)
  mov    -0xa4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  mov    -0xa4(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x98(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x90(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0xa4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x90(%rbp),%rax
  add    %rax,%rdx
  mov    -0x9c(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0xa4(%rbp)
L78:
  mov    -0xb0(%rbp),%eax
  cmp    %eax,-0xa4(%rbp)
  jle    L248
  movl   $0x1,-0xa4(%rbp)
  jmp    L109
L152:
  movl   $0x1,-0xa8(%rbp)
  jmp    L354
L381:
  mov    -0xa8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0xa4(%rbp)
  jne    L422
  movl   $0x1,-0xa0(%rbp)
  jmp    L129
L377:
  mov    -0xa8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xa0(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  pxor   %xmm4,%xmm4
  cvtss2sd %xmm0,%xmm4
  movq   %xmm4,%rax
  movq   %rax,%xmm0
  lea    D154(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  addl   $0x1,-0xa0(%rbp)
L129:
  mov    -0xb0(%rbp),%eax
  cmp    %eax,-0xa0(%rbp)
  jle    L377
  mov    $0xa,%edi
  call   <putchar@plt>
L422:
  addl   $0x1,-0xa8(%rbp)
L354:
  mov    -0xb0(%rbp),%eax
  cmp    %eax,-0xa8(%rbp)
  jle    L381
  addl   $0x1,-0xa4(%rbp)
L109:
  mov    -0xb0(%rbp),%eax
  cmp    %eax,-0xa4(%rbp)
  jle    L152
  lea    D42(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x1,-0xa4(%rbp)
  jmp    L185
L392:
  movl   $0x1,-0xa0(%rbp)
  jmp    L454
L127:
  mov    -0xa4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xa0(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  pxor   %xmm5,%xmm5
  cvtss2sd %xmm0,%xmm5
  movq   %xmm5,%rax
  movq   %rax,%xmm0
  lea    D154(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  addl   $0x1,-0xa0(%rbp)
L454:
  mov    -0xb0(%rbp),%eax
  cmp    %eax,-0xa0(%rbp)
  jle    L127
  mov    $0xa,%edi
  call   <putchar@plt>
  addl   $0x1,-0xa4(%rbp)
L185:
  mov    -0xb0(%rbp),%eax
  cmp    %eax,-0xa4(%rbp)
  jle    L392
  lea    D44(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x1,-0xa4(%rbp)
  jmp    L210
L393:
  movl   $0x1,-0xa0(%rbp)
  jmp    L68
L325:
  mov    -0xa4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xa0(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  pxor   %xmm6,%xmm6
  cvtss2sd %xmm0,%xmm6
  movq   %xmm6,%rax
  movq   %rax,%xmm0
  lea    D154(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  addl   $0x1,-0xa0(%rbp)
L68:
  mov    -0xb0(%rbp),%eax
  cmp    %eax,-0xa0(%rbp)
  jle    L325
  mov    $0xa,%edi
  call   <putchar@plt>
  addl   $0x1,-0xa4(%rbp)
L210:
  mov    -0xb0(%rbp),%eax
  cmp    %eax,-0xa4(%rbp)
  jle    L393
  lea    D181(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D175(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  call   <getchar@plt>
L436:
  mov    -0x68(%rbp),%rax
  mov    %rax,%rdi
  call   <feof@plt>
  test   %eax,%eax
  je     L432
  mov    -0x68(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    -0x70(%rbp),%rax
  mov    $0x14,%r8d
  mov    $0x1,%ecx
  mov    $0x14,%edx
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <free_matrix@plt>
  mov    -0x78(%rbp),%rax
  mov    $0x14,%r8d
  mov    $0x1,%ecx
  mov    $0x14,%edx
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <free_matrix@plt>
  mov    -0x80(%rbp),%rax
  mov    $0x14,%r8d
  mov    $0x1,%ecx
  mov    $0x14,%edx
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <free_matrix@plt>
  mov    -0x88(%rbp),%rax
  mov    $0x14,%r8d
  mov    $0x1,%ecx
  mov    $0x14,%edx
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <free_matrix@plt>
  mov    -0x90(%rbp),%rax
  mov    $0x14,%edx
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <free_ivector@plt>
  mov    -0x98(%rbp),%rax
  mov    $0x14,%edx
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <free_ivector@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L153
  call   <__stack_chk_fail@plt>
L153:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D149
data_type: string
name: extract_symbolic_data
arguments: data_label: D46
data_type: string
name: extract_symbolic_data
arguments: data_label: D152
data_type: string
name: extract_symbolic_data
arguments: data_label: D70
data_type: string
name: extract_symbolic_data
arguments: data_label: D113
data_type: string
name: extract_symbolic_data
arguments: data_label: D35
data_type: string
name: extract_symbolic_data
arguments: data_label: D154
data_type: string
name: extract_symbolic_data
arguments: data_label: D45
data_type: f32
name: extract_symbolic_data
arguments: data_label: D174
data_type: string
name: extract_symbolic_data
arguments: data_label: D169
data_type: string
name: extract_symbolic_data
arguments: data_label: D157
data_type: string
name: extract_symbolic_data
arguments: data_label: D42
data_type: string
name: extract_symbolic_data
arguments: data_label: D44
data_type: string
name: extract_symbolic_data
arguments: data_label: D181
data_type: string
name: extract_symbolic_data
arguments: data_label: D175
data_type: string

tool: D149: r

tool: D46: matrx1.dat

tool: D152: Data file matrx1.dat not found


tool: D70: %d %d 

tool: D113: %f 

tool: D35: original matrix:

tool: D154: %12.6f

tool: D45: 1

tool: D174: matrices (rows unscrambled):

tool: D169: product of lower and upper 

tool: D157: 
%s%s


tool: D42: 
lower matrix of the decomposition:

tool: D44: 
upper matrix of the decomposition:

tool: D181: 
***********************************

tool: D175: press return for next problem:

assistant: ```c
int main(void) {
  int j, k, l, m, n, dum, *indx, *jndx;
  float d, **a, **xl, **xu, **x;
  char dummy[80];
  FILE *fp;
  indx = ivector(1, 20);
  jndx = ivector(1, 20);
  a = matrix(1, 20, 1, 20);
  xl = matrix(1, 20, 1, 20);
  xu = matrix(1, 20, 1, 20);
  x = matrix(1, 20, 1, 20);
  if ((fp = fopen("matrx1.dat", "r")) == NULL)
    nrerror("Data file matrx1.dat not found\n");
  while (!feof(fp)) {
    fgets(dummy, 80, fp);
    fgets(dummy, 80, fp);
    fscanf(fp, "%d %d ", &n, &m);
    fgets(dummy, 80, fp);
    for (k = 1; k <= n; k++)
      for (l = 1; l <= n; l++)
        fscanf(fp, "%f ", &a[k][l]);
    fgets(dummy, 80, fp);
    for (l = 1; l <= m; l++)
      for (k = 1; k <= n; k++)
        fscanf(fp, "%f ", &x[k][l]);
    printf("original matrix:\n");
    for (k = 1; k <= n; k++) {
      for (l = 1; l <= n; l++)
        printf("%12.6f", a[k][l]);
      printf("\n");
    }
    ludcmp(a, n, indx, &d);
    for (k = 1; k <= n; k++) {
      for (l = 1; l <= n; l++) {
        if (l > k) {
          xu[k][l] = a[k][l];
          xl[k][l] = 0.0;
        } else if (l < k) {
          xu[k][l] = 0.0;
          xl[k][l] = a[k][l];
        } else {
          xu[k][l] = a[k][l];
          xl[k][l] = 1.0;
        }
      }
    }
    for (k = 1; k <= n; k++) {
      jndx[k] = k;
      for (l = 1; l <= n; l++) {
        x[k][l] = 0.0;
        for (j = 1; j <= n; j++)
          x[k][l] += (xl[k][j] * xu[j][l]);
      }
    }
    printf("\n%s%s\n", "product of lower and upper ", "matrices (rows unscrambled):");
    for (k = 1; k <= n; k++) {
      dum = jndx[indx[k]];
      jndx[indx[k]] = jndx[k];
      jndx[k] = dum;
    }
    for (k = 1; k <= n; k++)
      for (j = 1; j <= n; j++)
        if (jndx[j] == k) {
          for (l = 1; l <= n; l++)
            printf("%12.6f", x[j][l]);
          printf("\n");
        }
    printf("\nlower matrix of the decomposition:\n");
    for (k = 1; k <= n; k++) {
      for (l = 1; l <= n; l++)
        printf("%12.6f", xl[k][l]);
      printf("\n");
    }
    printf("\nupper matrix of the decomposition:\n");
    for (k = 1; k <= n; k++) {
      for (l = 1; l <= n; l++)
        printf("%12.6f", xu[k][l]);
      printf("\n");
    }
    printf("\n***********************************\n");
    printf("press return for next problem:\n");
    (void)getchar();
  }
  fclose(fp);
  free_matrix(x, 1, 20, 1, 20);
  free_matrix(xu, 1, 20, 1, 20);
  free_matrix(xl, 1, 20, 1, 20);
  free_matrix(a, 1, 20, 1, 20);
  free_ivector(jndx, 1, 20);
  free_ivector(indx, 1, 20);
  return 0;
}
```