#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ make_pivit_notzero(int, int, double **, int, int);
int /*<<< orphan*/ pirnt_matrix(int, int, double **);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ wipe_below(int, int, double **, int, int);
int /*<<< orphan*/ wipe_up(int, int, double **, int, int);
int main(int argc, char const *argv[]) {
  double a[10][11 - 1] = {
      0.638796, 0.736510, 0.827915, 0.714243, 0.580313, 0.502711, 0.320619,
      0.381693, 0.829783, 0.090271, 0.086381, 0.012368, 0.926026, 0.685283,
      0.442655, 0.771235, 0.161726, 0.373213, 0.314419, 0.017243, 0.230404,
      0.583643, 0.539237, 0.362877, 0.574665, 0.587253, 0.052889, 0.797725,
      0.540768, 0.231177, 0.321209, 0.695746, 0.469330, 0.033947, 0.543901,
      0.688743, 0.981675, 0.360366, 0.065075, 0.064145, 0.409384, 0.006006,
      0.511788, 0.898087, 0.630414, 0.134535, 0.695637, 0.556015, 0.267766,
      0.504105, 0.106553, 0.521463, 0.941638, 0.001127, 0.889229, 0.985234,
      0.710775, 0.408030, 0.355768, 0.233783, 0.716173, 0.837311, 0.067652,
      0.918376, 0.541687, 0.839058, 0.234658, 0.968085, 0.053723, 0.984997,
      0.834031, 0.057627, 0.162390, 0.344131, 0.976396, 0.034571, 0.785434,
      0.697810, 0.443574, 0.605635, 0.706559, 0.381556, 0.773771, 0.226483,
      0.392380, 0.071833, 0.798492, 0.754875, 0.561998, 0.478654, 0.744680,
      0.519814, 0.721342, 0.365413, 0.330053, 0.084206, 0.169013, 0.143299,
      0.970202, 0.799632};
  double b[10] = {0.368936, 0.651629, 0.072565, 0.125020, 0.177600,
                  0.299796, 0.822566, 0.687749, 0.946997, 0.731359};
  double x[10] = {2.496575, -0.639090, 1.453365, -0.661451, -0.029772,
                  0.233489, -1.001369, 0.120202, -1.591228, 0.104728};
  double matrix[10][11];
  for (int i = 0; i < 10; ++i) {
    for (int j = 0; j < 11; ++j) {
      matrix[i][j] = j != 11 - 1 ? a[i][j] : b[i];
    }
  }
  pirnt_matrix(10, 11, matrix);
  printf("==========turn into a upper triangular matrix============\n");
  for (int i = 0; i < 10; ++i) {
    make_pivit_notzero(10, 11, matrix, i, i);
    wipe_below(10, 11, matrix, i, i);
  }
  pirnt_matrix(10, 11, matrix);
  printf("==========echelon_form============\n");
  double solution[10];
  for (int i = 10 - 1; i >= 0; --i) {
    wipe_up(10, 11, matrix, i, i);
  }
  pirnt_matrix(10, 11, matrix);
  printf("==========solution============\n");
  for (int i = 0; i < 10; ++i) {
    solution[i] = matrix[i][11 - 1] / matrix[i][i];
    printf("%10lf, ", solution[i]);
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7b0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x330(%rbp),%rdi
lea    0xe79(%rip),%rsi
mov    $0x320,%edx
call   1060 <memcpy@plt>
lea    -0x380(%rbp),%rdi
lea    0x1181(%rip),%rsi
mov    $0x50,%edx
call   1060 <memcpy@plt>
lea    -0x3d0(%rbp),%rdi
lea    0x11b9(%rip),%rsi
mov    $0x50,%edx
call   1060 <memcpy@plt>
movl   $0x0,-0x744(%rbp)
cmpl   $0xa,-0x744(%rbp)
jge    1298 <main+0x138>
movl   $0x0,-0x748(%rbp)
cmpl   $0xb,-0x748(%rbp)
jge    127f <main+0x11f>
cmpl   $0xa,-0x748(%rbp)
je     122a <main+0xca>
movslq -0x744(%rbp),%rcx
lea    -0x330(%rbp),%rax
imul   $0x50,%rcx,%rcx
add    %rcx,%rax
movslq -0x748(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x7b0(%rbp)
ff
jmp    1242 <main+0xe2>
movslq -0x744(%rbp),%rax
movsd  -0x380(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x7b0(%rbp)
ff
movsd  -0x7b0(%rbp),%xmm0
ff
movslq -0x744(%rbp),%rcx
lea    -0x740(%rbp),%rax
imul   $0x58,%rcx,%rcx
add    %rcx,%rax
movslq -0x748(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x748(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x748(%rbp)
jmp    11e2 <main+0x82>
jmp    1284 <main+0x124>
mov    -0x744(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x744(%rbp)
jmp    11cb <main+0x6b>
lea    -0x740(%rbp),%rdx
mov    $0xa,%edi
mov    $0xb,%esi
call   1080 <pirnt_matrix@plt>
lea    0x110b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x74c(%rbp)
cmpl   $0xa,-0x74c(%rbp)
jge    132d <main+0x1cd>
lea    -0x740(%rbp),%rdx
mov    -0x74c(%rbp),%ecx
mov    -0x74c(%rbp),%r8d
mov    $0xa,%edi
mov    $0xb,%esi
call   1070 <make_pivit_notzero@plt>
lea    -0x740(%rbp),%rdx
mov    -0x74c(%rbp),%ecx
mov    -0x74c(%rbp),%r8d
mov    $0xa,%edi
mov    $0xb,%esi
call   1040 <wipe_below@plt>
mov    -0x74c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74c(%rbp)
jmp    12c6 <main+0x166>
lea    -0x740(%rbp),%rdx
mov    $0xa,%edi
mov    $0xb,%esi
call   1080 <pirnt_matrix@plt>
lea    0x10b1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x9,-0x7a4(%rbp)
cmpl   $0x0,-0x7a4(%rbp)
jl     139f <main+0x23f>
lea    -0x740(%rbp),%rdx
mov    -0x7a4(%rbp),%ecx
mov    -0x7a4(%rbp),%r8d
mov    $0xa,%edi
mov    $0xb,%esi
call   1030 <wipe_up@plt>
mov    -0x7a4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x7a4(%rbp)
jmp    135b <main+0x1fb>
lea    -0x740(%rbp),%rdx
mov    $0xa,%edi
mov    $0xb,%esi
call   1080 <pirnt_matrix@plt>
lea    0x1063(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x7a8(%rbp)
cmpl   $0xa,-0x7a8(%rbp)
jge    1457 <main+0x2f7>
movslq -0x7a8(%rbp),%rcx
lea    -0x740(%rbp),%rax
imul   $0x58,%rcx,%rcx
add    %rcx,%rax
movsd  0x50(%rax),%xmm0
movslq -0x7a8(%rbp),%rcx
lea    -0x740(%rbp),%rax
imul   $0x58,%rcx,%rcx
add    %rcx,%rax
movslq -0x7a8(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
movslq -0x7a8(%rbp),%rax
movsd  %xmm0,-0x7a0(%rbp,%rax,8)
ff ff
movslq -0x7a8(%rbp),%rax
movsd  -0x7a0(%rbp,%rax,8),%xmm0
ff ff
lea    0x1003(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    -0x7a8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7a8(%rbp)
jmp    13cd <main+0x26d>
lea    0xfbf(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x7b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x370,%rsp
lea    0x50(%rsp),%rax
lea    0xebc(%rip),%rcx
xor    %edx,%edx
lea    0x1193(%rip),%rsi
nopl   (%rax)
movaps -0x40(%rcx),%xmm0
movups %xmm0,-0x50(%rax)
movaps -0x30(%rcx),%xmm0
movups %xmm0,-0x40(%rax)
movaps -0x20(%rcx),%xmm0
movups %xmm0,-0x30(%rax)
movaps -0x10(%rcx),%xmm0
movups %xmm0,-0x20(%rax)
movaps (%rcx),%xmm0
movups %xmm0,-0x10(%rax)
movsd  (%rdx,%rsi,1),%xmm0
movsd  %xmm0,(%rax)
add    $0x50,%rcx
add    $0x8,%rdx
add    $0x58,%rax
cmp    $0x50,%rdx
jne    1190 <main+0x20>
mov    %rsp,%rbx
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
call   1090 <pirnt_matrix@plt>
lea    0x118a(%rip),%rdi
call   1060 <puts@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1080 <make_pivit_notzero@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1050 <wipe_below@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x1,%ecx
mov    $0x1,%r8d
call   1080 <make_pivit_notzero@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x1,%ecx
mov    $0x1,%r8d
call   1050 <wipe_below@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x2,%ecx
mov    $0x2,%r8d
call   1080 <make_pivit_notzero@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x2,%ecx
mov    $0x2,%r8d
call   1050 <wipe_below@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x3,%ecx
mov    $0x3,%r8d
call   1080 <make_pivit_notzero@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x3,%ecx
mov    $0x3,%r8d
call   1050 <wipe_below@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x4,%ecx
mov    $0x4,%r8d
call   1080 <make_pivit_notzero@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x4,%ecx
mov    $0x4,%r8d
call   1050 <wipe_below@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x5,%ecx
mov    $0x5,%r8d
call   1080 <make_pivit_notzero@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x5,%ecx
mov    $0x5,%r8d
call   1050 <wipe_below@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x6,%ecx
mov    $0x6,%r8d
call   1080 <make_pivit_notzero@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x6,%ecx
mov    $0x6,%r8d
call   1050 <wipe_below@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x7,%ecx
mov    $0x7,%r8d
call   1080 <make_pivit_notzero@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x7,%ecx
mov    $0x7,%r8d
call   1050 <wipe_below@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x8,%ecx
mov    $0x8,%r8d
call   1080 <make_pivit_notzero@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x8,%ecx
mov    $0x8,%r8d
call   1050 <wipe_below@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x9,%ecx
mov    $0x9,%r8d
call   1080 <make_pivit_notzero@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x9,%ecx
mov    $0x9,%r8d
call   1050 <wipe_below@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
call   1090 <pirnt_matrix@plt>
lea    0xf6e(%rip),%rdi
call   1060 <puts@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x9,%ecx
mov    $0x9,%r8d
call   1040 <wipe_up@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x8,%ecx
mov    $0x8,%r8d
call   1040 <wipe_up@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x7,%ecx
mov    $0x7,%r8d
call   1040 <wipe_up@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x6,%ecx
mov    $0x6,%r8d
call   1040 <wipe_up@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x5,%ecx
mov    $0x5,%r8d
call   1040 <wipe_up@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x4,%ecx
mov    $0x4,%r8d
call   1040 <wipe_up@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x3,%ecx
mov    $0x3,%r8d
call   1040 <wipe_up@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x2,%ecx
mov    $0x2,%r8d
call   1040 <wipe_up@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    $0x1,%ecx
mov    $0x1,%r8d
call   1040 <wipe_up@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1040 <wipe_up@plt>
mov    $0xa,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
call   1090 <pirnt_matrix@plt>
lea    0xe57(%rip),%rdi
call   1060 <puts@plt>
movsd  0x50(%rsp),%xmm0
divsd  (%rsp),%xmm0
lea    0xddb(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movsd  0xa8(%rsp),%xmm0
divsd  0x60(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movsd  0x100(%rsp),%xmm0
divsd  0xc0(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movsd  0x158(%rsp),%xmm0
divsd  0x120(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movsd  0x1b0(%rsp),%xmm0
divsd  0x180(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movsd  0x208(%rsp),%xmm0
divsd  0x1e0(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movsd  0x260(%rsp),%xmm0
divsd  0x240(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movsd  0x2b8(%rsp),%xmm0
divsd  0x2a0(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movsd  0x310(%rsp),%xmm0
divsd  0x300(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movsd  0x368(%rsp),%xmm0
divsd  0x360(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1070 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x370,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.a = [10 x [10 x double]] [[10 x double] [double 6.387960e-01, double 7.365100e-01, double 8.279150e-01, double 0x3FE6DB1422CCB3A2, double 5.803130e-01, double 5.027110e-01, double 3.206190e-01, double 3.816930e-01, double 8.297830e-01, double 9.027100e-02], [10 x double] [double 0x3FB61D10B1FEEB2D, double 1.236800e-02, double 9.260260e-01, double 6.852830e-01, double 4.426550e-01, double 7.712350e-01, double 1.617260e-01, double 3.732130e-01, double 3.144190e-01, double 1.724300e-02], [10 x double] [double 2.304040e-01, double 5.836430e-01, double 5.392370e-01, double 3.628770e-01, double 5.746650e-01, double 5.872530e-01, double 5.288900e-02, double 7.977250e-01, double 5.407680e-01, double 2.311770e-01], [10 x double] [double 3.212090e-01, double 0x3FE6438D1D8A5482, double 4.693300e-01, double 3.394700e-02, double 5.439010e-01, double 6.887430e-01, double 0x3FEF69E1B089A027, double 3.603660e-01, double 6.507500e-02, double 0x3FB06BCE8533B107], [10 x double] [double 4.093840e-01, double 6.006000e-03, double 5.117880e-01, double 8.980870e-01, double 6.304140e-01, double 1.345350e-01, double 6.956370e-01, double 5.560150e-01, double 2.677660e-01, double 5.041050e-01], [10 x double] [double 1.065530e-01, double 5.214630e-01, double 0x3FEE21E603D57796, double 1.127000e-03, double 8.892290e-01, double 9.852340e-01, double 7.107750e-01, double 4.080300e-01, double 3.557680e-01, double 2.337830e-01], [10 x double] [double 7.161730e-01, double 8.373110e-01, double 6.765200e-02, double 9.183760e-01, double 5.416870e-01, double 8.390580e-01, double 2.346580e-01, double 0x3FEEFA8D64D7F0ED, double 5.372300e-02, double 9.849970e-01], [10 x double] [double 0x3FEAB061C79B34A4, double 5.762700e-02, double 1.623900e-01, double 3.441310e-01, double 9.763960e-01, double 3.457100e-02, double 0x3FE922467BE553AC, double 6.978100e-01, double 4.435740e-01, double 6.056350e-01], [10 x double] [double 7.065590e-01, double 3.815560e-01, double 0x3FE8C2BB6672FBA0, double 2.264830e-01, double 3.923800e-01, double 0x3FB263A5C1C6088D, double 0x3FE98D3F1843C3A4, double 0x3FE827EF9DB22D0E, double 5.619980e-01, double 4.786540e-01], [10 x double] [double 7.446800e-01, double 5.198140e-01, double 7.213420e-01, double 3.654130e-01, double 3.300530e-01, double 8.420600e-02, double 1.690130e-01, double 1.432990e-01, double 9.702020e-01, double 7.996320e-01]]
@__const.main.b = [10 x double] [double 3.689360e-01, double 6.516290e-01, double 7.256500e-02, double 1.250200e-01, double 1.776000e-01, double 2.997960e-01, double 8.225660e-01, double 6.877490e-01, double 9.469970e-01, double 7.313590e-01]
@__const.main.x = [10 x double] [double 0x4003F8FC504816F0, double -6.390900e-01, double 0x3FF740FBA8826AA9, double -6.614510e-01, double -2.977200e-02, double 2.334890e-01, double 0xBFF0059B8023A6CE, double 1.202020e-01, double 0xBFF975AB7DC7ABFC, double 1.047280e-01]
@.str = [59 x i8] c"==========turn into a upper triangular matrix============\0A\00"
@.str.1 = [36 x i8] c"==========echelon_form============\0A\00"
@.str.2 = [32 x i8] c"==========solution============\0A\00"
@.str.3 = [8 x i8] c"%10lf, \00"
@.str.4 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x [10 x double]]
%7 = alloca [10 x double]
%8 = alloca [10 x double]
%9 = alloca [10 x [11 x double]]
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca [10 x double]
%14 = alloca i32
%15 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = bitcast [10 x [10 x double]]* %6 to i8*
%17 = bitcast [10 x double]* %7 to i8*
%18 = bitcast [10 x double]* %8 to i8*
store i32 0, i32* %10
br label %19
19: ; preds = %54, %2
%20 = load i32, i32* %10
%21 = icmp slt i32 %20, 10
br i1 %21, label %22, label %57
22: ; preds = %19
store i32 0, i32* %11
br label %23
23: ; preds = %50, %22
%24 = load i32, i32* %11
%25 = icmp slt i32 %24, 11
br i1 %25, label %26, label %53
26: ; preds = %23
%27 = load i32, i32* %11
%28 = icmp ne i32 %27, 10
br i1 %28, label %29, label %37
29: ; preds = %26
%30 = load i32, i32* %10
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [10 x [10 x double]], [10 x [10 x double]]* %6, i64 0, i64 %31
%33 = load i32, i32* %11
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [10 x double], [10 x double]* %32, i64 0, i64 %34
%36 = load double, double* %35
br label %42
37: ; preds = %26
%38 = load i32, i32* %10
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [10 x double], [10 x double]* %7, i64 0, i64 %39
%41 = load double, double* %40
br label %42
42: ; preds = %37, %29
%43 = phi double [ %36, %29 ], [ %41, %37 ]
%44 = load i32, i32* %10
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %9, i64 0, i64 %45
%47 = load i32, i32* %11
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [11 x double], [11 x double]* %46, i64 0, i64 %48
store double %43, double* %49
br label %50
50: ; preds = %42
%51 = load i32, i32* %11
%52 = add nsw i32 %51, 1
store i32 %52, i32* %11
br label %23
53: ; preds = %23
br label %54
54: ; preds = %53
%55 = load i32, i32* %10
%56 = add nsw i32 %55, 1
store i32 %56, i32* %10
br label %19
57: ; preds = %19
%58 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %9, i64 0, i64 0
%59 = bitcast [11 x double]* %58 to double**
%60 = call i32 @pirnt_matrix(i32 10, i32 11, double** %59)
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %12
br label %62
62: ; preds = %76, %57
%63 = load i32, i32* %12
%64 = icmp slt i32 %63, 10
br i1 %64, label %65, label %79
65: ; preds = %62
%66 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %9, i64 0, i64 0
%67 = bitcast [11 x double]* %66 to double**
%68 = load i32, i32* %12
%69 = load i32, i32* %12
%70 = call i32 @make_pivit_notzero(i32 10, i32 11, double** %67, i32 %68, i32 %69)
%71 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %9, i64 0, i64 0
%72 = bitcast [11 x double]* %71 to double**
%73 = load i32, i32* %12
%74 = load i32, i32* %12
%75 = call i32 @wipe_below(i32 10, i32 11, double** %72, i32 %73, i32 %74)
br label %76
76: ; preds = %65
%77 = load i32, i32* %12
%78 = add nsw i32 %77, 1
store i32 %78, i32* %12
br label %62
79: ; preds = %62
%80 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %9, i64 0, i64 0
%81 = bitcast [11 x double]* %80 to double**
%82 = call i32 @pirnt_matrix(i32 10, i32 11, double** %81)
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
store i32 9, i32* %14
br label %84
84: ; preds = %93, %79
%85 = load i32, i32* %14
%86 = icmp sge i32 %85, 0
br i1 %86, label %87, label %96
87: ; preds = %84
%88 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %9, i64 0, i64 0
%89 = bitcast [11 x double]* %88 to double**
%90 = load i32, i32* %14
%91 = load i32, i32* %14
%92 = call i32 @wipe_up(i32 10, i32 11, double** %89, i32 %90, i32 %91)
br label %93
93: ; preds = %87
%94 = load i32, i32* %14
%95 = add nsw i32 %94, -1
store i32 %95, i32* %14
br label %84
96: ; preds = %84
%97 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %9, i64 0, i64 0
%98 = bitcast [11 x double]* %97 to double**
%99 = call i32 @pirnt_matrix(i32 10, i32 11, double** %98)
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %15
br label %101
101: ; preds = %126, %96
%102 = load i32, i32* %15
%103 = icmp slt i32 %102, 10
br i1 %103, label %104, label %129
104: ; preds = %101
%105 = load i32, i32* %15
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %9, i64 0, i64 %106
%108 = getelementptr inbounds [11 x double], [11 x double]* %107, i64 0, i64 10
%109 = load double, double* %108
%110 = load i32, i32* %15
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %9, i64 0, i64 %111
%113 = load i32, i32* %15
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds [11 x double], [11 x double]* %112, i64 0, i64 %114
%116 = load double, double* %115
%117 = fdiv double %109, %116
%118 = load i32, i32* %15
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds [10 x double], [10 x double]* %13, i64 0, i64 %119
store double %117, double* %120
%121 = load i32, i32* %15
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds [10 x double], [10 x double]* %13, i64 0, i64 %122
%124 = load double, double* %123
%125 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double %124)
br label %126
126: ; preds = %104
%127 = load i32, i32* %15
%128 = add nsw i32 %127, 1
store i32 %128, i32* %15
br label %101
129: ; preds = %101
%130 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [10 x [10 x double]] [[10 x double] [double 6.387960e-01, double 7.365100e-01, double 8.279150e-01, double 0x3FE6DB1422CCB3A2, double 5.803130e-01, double 5.027110e-01, double 3.206190e-01, double 3.816930e-01, double 8.297830e-01, double 9.027100e-02], [10 x double] [double 0x3FB61D10B1FEEB2D, double 1.236800e-02, double 9.260260e-01, double 6.852830e-01, double 4.426550e-01, double 7.712350e-01, double 1.617260e-01, double 3.732130e-01, double 3.144190e-01, double 1.724300e-02], [10 x double] [double 2.304040e-01, double 5.836430e-01, double 5.392370e-01, double 3.628770e-01, double 5.746650e-01, double 5.872530e-01, double 5.288900e-02, double 7.977250e-01, double 5.407680e-01, double 2.311770e-01], [10 x double] [double 3.212090e-01, double 0x3FE6438D1D8A5482, double 4.693300e-01, double 3.394700e-02, double 5.439010e-01, double 6.887430e-01, double 0x3FEF69E1B089A027, double 3.603660e-01, double 6.507500e-02, double 0x3FB06BCE8533B107], [10 x double] [double 4.093840e-01, double 6.006000e-03, double 5.117880e-01, double 8.980870e-01, double 6.304140e-01, double 1.345350e-01, double 6.956370e-01, double 5.560150e-01, double 2.677660e-01, double 5.041050e-01], [10 x double] [double 1.065530e-01, double 5.214630e-01, double 0x3FEE21E603D57796, double 1.127000e-03, double 8.892290e-01, double 9.852340e-01, double 7.107750e-01, double 4.080300e-01, double 3.557680e-01, double 2.337830e-01], [10 x double] [double 7.161730e-01, double 8.373110e-01, double 6.765200e-02, double 9.183760e-01, double 5.416870e-01, double 8.390580e-01, double 2.346580e-01, double 0x3FEEFA8D64D7F0ED, double 5.372300e-02, double 9.849970e-01], [10 x double] [double 0x3FEAB061C79B34A4, double 5.762700e-02, double 1.623900e-01, double 3.441310e-01, double 9.763960e-01, double 3.457100e-02, double 0x3FE922467BE553AC, double 6.978100e-01, double 4.435740e-01, double 6.056350e-01], [10 x double] [double 7.065590e-01, double 3.815560e-01, double 0x3FE8C2BB6672FBA0, double 2.264830e-01, double 3.923800e-01, double 0x3FB263A5C1C6088D, double 0x3FE98D3F1843C3A4, double 0x3FE827EF9DB22D0E, double 5.619980e-01, double 4.786540e-01], [10 x double] [double 7.446800e-01, double 5.198140e-01, double 7.213420e-01, double 3.654130e-01, double 3.300530e-01, double 8.420600e-02, double 1.690130e-01, double 1.432990e-01, double 9.702020e-01, double 7.996320e-01]]
@__const.main.b = [10 x double] [double 3.689360e-01, double 6.516290e-01, double 7.256500e-02, double 1.250200e-01, double 1.776000e-01, double 2.997960e-01, double 8.225660e-01, double 6.877490e-01, double 9.469970e-01, double 7.313590e-01]
@.str.3 = [8 x i8] c"%10lf, \00"
@str = [58 x i8] c"==========turn into a upper triangular matrix============\00"
@str.5 = [35 x i8] c"==========echelon_form============\00"
@str.6 = [31 x i8] c"==========solution============\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [10 x [11 x double]]
%4 = bitcast [10 x [11 x double]]* %3 to i8*
br label %5
5: ; preds = %2, %5
%6 = phi i64 [ 0, %2 ], [ %35, %5 ]
%7 = getelementptr inbounds [10 x double], [10 x double]* @__const.main.b, i64 0, i64 %6
%8 = getelementptr inbounds [10 x [10 x double]], [10 x [10 x double]]* @__const.main.a, i64 0, i64 %6, i64 0
%9 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %3, i64 0, i64 %6, i64 0
%10 = bitcast double* %8 to <2 x double>*
%11 = load <2 x double>, <2 x double>* %10
%12 = bitcast double* %9 to <2 x double>*
store <2 x double> %11, <2 x double>* %12
%13 = getelementptr inbounds [10 x [10 x double]], [10 x [10 x double]]* @__const.main.a, i64 0, i64 %6, i64 2
%14 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %3, i64 0, i64 %6, i64 2
%15 = bitcast double* %13 to <2 x double>*
%16 = load <2 x double>, <2 x double>* %15
%17 = bitcast double* %14 to <2 x double>*
store <2 x double> %16, <2 x double>* %17
%18 = getelementptr inbounds [10 x [10 x double]], [10 x [10 x double]]* @__const.main.a, i64 0, i64 %6, i64 4
%19 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %3, i64 0, i64 %6, i64 4
%20 = bitcast double* %18 to <2 x double>*
%21 = load <2 x double>, <2 x double>* %20
%22 = bitcast double* %19 to <2 x double>*
store <2 x double> %21, <2 x double>* %22
%23 = getelementptr inbounds [10 x [10 x double]], [10 x [10 x double]]* @__const.main.a, i64 0, i64 %6, i64 6
%24 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %3, i64 0, i64 %6, i64 6
%25 = bitcast double* %23 to <2 x double>*
%26 = load <2 x double>, <2 x double>* %25
%27 = bitcast double* %24 to <2 x double>*
store <2 x double> %26, <2 x double>* %27
%28 = getelementptr inbounds [10 x [10 x double]], [10 x [10 x double]]* @__const.main.a, i64 0, i64 %6, i64 8
%29 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %3, i64 0, i64 %6, i64 8
%30 = bitcast double* %28 to <2 x double>*
%31 = load <2 x double>, <2 x double>* %30
%32 = bitcast double* %29 to <2 x double>*
store <2 x double> %31, <2 x double>* %32
%33 = load double, double* %7
%34 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %3, i64 0, i64 %6, i64 10
store double %33, double* %34
%35 = add nuw nsw i64 %6, 1
%36 = icmp eq i64 %35, 10
br i1 %36, label %37, label %5
37: ; preds = %5
%38 = bitcast [10 x [11 x double]]* %3 to double**
%39 = call i32 @pirnt_matrix(i32 10, i32 11, double** %38)
%40 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str, i64 0, i64 0))
%41 = call i32 @make_pivit_notzero(i32 10, i32 11, double** %38, i32 0, i32 0)
%42 = call i32 @wipe_below(i32 10, i32 11, double** %38, i32 0, i32 0)
%43 = call i32 @make_pivit_notzero(i32 10, i32 11, double** %38, i32 1, i32 1)
%44 = call i32 @wipe_below(i32 10, i32 11, double** %38, i32 1, i32 1)
%45 = call i32 @make_pivit_notzero(i32 10, i32 11, double** %38, i32 2, i32 2)
%46 = call i32 @wipe_below(i32 10, i32 11, double** %38, i32 2, i32 2)
%47 = call i32 @make_pivit_notzero(i32 10, i32 11, double** %38, i32 3, i32 3)
%48 = call i32 @wipe_below(i32 10, i32 11, double** %38, i32 3, i32 3)
%49 = call i32 @make_pivit_notzero(i32 10, i32 11, double** %38, i32 4, i32 4)
%50 = call i32 @wipe_below(i32 10, i32 11, double** %38, i32 4, i32 4)
%51 = call i32 @make_pivit_notzero(i32 10, i32 11, double** %38, i32 5, i32 5)
%52 = call i32 @wipe_below(i32 10, i32 11, double** %38, i32 5, i32 5)
%53 = call i32 @make_pivit_notzero(i32 10, i32 11, double** %38, i32 6, i32 6)
%54 = call i32 @wipe_below(i32 10, i32 11, double** %38, i32 6, i32 6)
%55 = call i32 @make_pivit_notzero(i32 10, i32 11, double** %38, i32 7, i32 7)
%56 = call i32 @wipe_below(i32 10, i32 11, double** %38, i32 7, i32 7)
%57 = call i32 @make_pivit_notzero(i32 10, i32 11, double** %38, i32 8, i32 8)
%58 = call i32 @wipe_below(i32 10, i32 11, double** %38, i32 8, i32 8)
%59 = call i32 @make_pivit_notzero(i32 10, i32 11, double** %38, i32 9, i32 9)
%60 = call i32 @wipe_below(i32 10, i32 11, double** %38, i32 9, i32 9)
%61 = call i32 @pirnt_matrix(i32 10, i32 11, double** %38)
%62 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.5, i64 0, i64 0))
%63 = call i32 @wipe_up(i32 10, i32 11, double** %38, i32 9, i32 9)
%64 = call i32 @wipe_up(i32 10, i32 11, double** %38, i32 8, i32 8)
%65 = call i32 @wipe_up(i32 10, i32 11, double** %38, i32 7, i32 7)
%66 = call i32 @wipe_up(i32 10, i32 11, double** %38, i32 6, i32 6)
%67 = call i32 @wipe_up(i32 10, i32 11, double** %38, i32 5, i32 5)
%68 = call i32 @wipe_up(i32 10, i32 11, double** %38, i32 4, i32 4)
%69 = call i32 @wipe_up(i32 10, i32 11, double** %38, i32 3, i32 3)
%70 = call i32 @wipe_up(i32 10, i32 11, double** %38, i32 2, i32 2)
%71 = call i32 @wipe_up(i32 10, i32 11, double** %38, i32 1, i32 1)
%72 = call i32 @wipe_up(i32 10, i32 11, double** %38, i32 0, i32 0)
%73 = call i32 @pirnt_matrix(i32 10, i32 11, double** %38)
%74 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.6, i64 0, i64 0))
%75 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %3, i64 0, i64 0, i64 10
%76 = load double, double* %75
%77 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %3, i64 0, i64 0, i64 0
%78 = load double, double* %77
%79 = fdiv double %76, %78
%80 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double %79)
%81 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %3, i64 0, i64 1, i64 10
%82 = load double, double* %81
%83 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %3, i64 0, i64 1, i64 1
%84 = load double, double* %83
%85 = fdiv double %82, %84
%86 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double %85)
%87 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %3, i64 0, i64 2, i64 10
%88 = load double, double* %87
%89 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %3, i64 0, i64 2, i64 2
%90 = load double, double* %89
%91 = fdiv double %88, %90
%92 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double %91)
%93 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %3, i64 0, i64 3, i64 10
%94 = load double, double* %93
%95 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %3, i64 0, i64 3, i64 3
%96 = load double, double* %95
%97 = fdiv double %94, %96
%98 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double %97)
%99 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %3, i64 0, i64 4, i64 10
%100 = load double, double* %99
%101 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %3, i64 0, i64 4, i64 4
%102 = load double, double* %101
%103 = fdiv double %100, %102
%104 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double %103)
%105 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %3, i64 0, i64 5, i64 10
%106 = load double, double* %105
%107 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %3, i64 0, i64 5, i64 5
%108 = load double, double* %107
%109 = fdiv double %106, %108
%110 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double %109)
%111 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %3, i64 0, i64 6, i64 10
%112 = load double, double* %111
%113 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %3, i64 0, i64 6, i64 6
%114 = load double, double* %113
%115 = fdiv double %112, %114
%116 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double %115)
%117 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %3, i64 0, i64 7, i64 10
%118 = load double, double* %117
%119 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %3, i64 0, i64 7, i64 7
%120 = load double, double* %119
%121 = fdiv double %118, %120
%122 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double %121)
%123 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %3, i64 0, i64 8, i64 10
%124 = load double, double* %123
%125 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %3, i64 0, i64 8, i64 8
%126 = load double, double* %125
%127 = fdiv double %124, %126
%128 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double %127)
%129 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %3, i64 0, i64 9, i64 10
%130 = load double, double* %129
%131 = getelementptr inbounds [10 x [11 x double]], [10 x [11 x double]]* %3, i64 0, i64 9, i64 9
%132 = load double, double* %131
%133 = fdiv double %130, %132
%134 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double %133)
%135 = call i32 @putchar(i32 10)
ret i32 0
}