int dual_simplex_method(double **T, int no_of_eqns, int no_of_variables,
                        int *column, int *row) {
  int flag = 0, mp = 0, i;
  double **A;
  A = (double **)malloc((no_of_eqns + 1) * sizeof(double *));
  for (i = 0; i < no_of_eqns + 1; i++) {
    A[i] = (double *)malloc((no_of_variables + 1) * sizeof(double));
  }
  double min = 100;
  for (i = 0; i < no_of_eqns; i++) {
    if (T[i][no_of_variables] < min && T[i][no_of_variables] < 0) {
      flag = 1;
      min = T[i][no_of_variables];
      mp = i;
    }
  }
  int most_negative_row = mp, pivot_column;
  double most_negative_value = min, pivot_value;
  if (flag == 0) {
    return 1;
  } else {
    int min_ratio_column = 0;
    double min_ratio = 10000;
    flag = 0;
    for (i = 0; i < no_of_variables; i++) {
      if (fabs(T[no_of_eqns][i] / T[most_negative_row][i]) < min_ratio &&
          T[most_negative_row][i] < 0) {
        min_ratio = fabs(T[no_of_eqns][i] / T[most_negative_row][i]);
        min_ratio_column = i;
      }
    }
    if (min_ratio == 10000) {
      printf("The solution is unbounded\n");
      return 2;
    } else {
      pivot_column = min_ratio_column;
      pivot_value = T[most_negative_row][min_ratio_column];
      int temp1 = row[most_negative_row];
      row[most_negative_row] = column[min_ratio_column];
      column[min_ratio_column] = temp1;
      for (i = 0; i < no_of_eqns + 1; i++) {
        int j;
        for (j = 0; j < no_of_variables + 1; j++) {
          if (i == most_negative_row && j == min_ratio_column) {
            A[i][j] = 1 / T[i][j];
          } else if (i == most_negative_row && j != min_ratio_column) {
            A[i][j] = T[i][j] / pivot_value;
          } else if (j == min_ratio_column && i != most_negative_row) {
            A[i][j] = -T[i][j] / pivot_value;
          } else if (j != min_ratio_column && i != most_negative_row) {
            double temp = T[i][j] * pivot_value -
                          T[most_negative_row][j] * T[i][min_ratio_column];
            A[i][j] = temp / ((double)pivot_value);
          }
        }
      }
    }
  }
  for (i = 0; i < no_of_eqns + 1; i++) {
    int j;
    for (j = 0; j < no_of_variables + 1; j++) {
      T[i][j] = A[i][j];
    }
  }
  printf("\nTable: \n");
  int k, l;
  for (l = 0; l < no_of_variables; l++) {
    if (column[l] / 10 == 1) {
      printf("X%d\t\t", (column[l] % 10) + 1);
    } else if (column[l] / 10 == 2) {
      printf("Z%d\t\t", (column[l] % 10) + 1);
    }
  }
  printf("1\n");
  for (k = 0; k < no_of_eqns + 1; k++) {
    for (l = 0; l < no_of_variables + 1; l++) {
      printf("%lf\t", T[k][l]);
    }
    if (k == no_of_eqns) {
      printf("Z\n");
    } else {
      switch (row[k] / 10) {
      case 1:
        printf("X%d\n", (row[k] % 10) + 1);
        break;
      case 2:
        printf("Z%d\n", (row[k] % 10) + 1);
        break;
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<dual_simplex_method>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x40(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    11a8 <dual_simplex_method+0x88>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,%rdx
mov    -0x40(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1168 <dual_simplex_method+0x48>
movsd  0xe50(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1244 <dual_simplex_method+0x124>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x48(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1231 <dual_simplex_method+0x111>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
xorps  %xmm0,%xmm0
ucomisd (%rax,%rcx,8),%xmm0
jbe    1231 <dual_simplex_method+0x111>
movl   $0x1,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x30(%rbp)
jmp    1236 <dual_simplex_method+0x116>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11bc <dual_simplex_method+0x9c>
mov    -0x30(%rbp),%eax
mov    %eax,-0x4c(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
cmpl   $0x0,-0x2c(%rbp)
jne    126a <dual_simplex_method+0x14a>
movl   $0x1,-0x4(%rbp)
jmp    18b9 <dual_simplex_method+0x799>
movl   $0x0,-0x64(%rbp)
movsd  0xd8f(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    134d <dual_simplex_method+0x22d>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm1
movaps 0xd57(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    133a <dual_simplex_method+0x21a>
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
xorps  %xmm0,%xmm0
ucomisd (%rax,%rcx,8),%xmm0
jbe    133a <dual_simplex_method+0x21a>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
movaps 0xcf5(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x64(%rbp)
jmp    133f <dual_simplex_method+0x21f>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    128c <dual_simplex_method+0x16c>
movsd  -0x70(%rbp),%xmm0
movsd  0xcae(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1384 <dual_simplex_method+0x264>
jp     1384 <dual_simplex_method+0x264>
lea    0xcbf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x2,-0x4(%rbp)
jmp    18b9 <dual_simplex_method+0x799>
mov    -0x64(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x74(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x64(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x74(%rbp),%edx
mov    -0x20(%rbp),%rax
movslq -0x64(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    15d8 <dual_simplex_method+0x4b8>
movl   $0x0,-0x78(%rbp)
mov    -0x78(%rbp),%eax
mov    -0x18(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    15c5 <dual_simplex_method+0x4a5>
mov    -0x34(%rbp),%eax
cmp    -0x4c(%rbp),%eax
jne    1455 <dual_simplex_method+0x335>
mov    -0x78(%rbp),%eax
cmp    -0x64(%rbp),%eax
jne    1455 <dual_simplex_method+0x335>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x78(%rbp),%rcx
movsd  0xbda(%rip),%xmm0
divsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x78(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    15b2 <dual_simplex_method+0x492>
mov    -0x34(%rbp),%eax
cmp    -0x4c(%rbp),%eax
jne    14a1 <dual_simplex_method+0x381>
mov    -0x78(%rbp),%eax
cmp    -0x64(%rbp),%eax
je     14a1 <dual_simplex_method+0x381>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x78(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x60(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x78(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    15ad <dual_simplex_method+0x48d>
mov    -0x78(%rbp),%eax
cmp    -0x64(%rbp),%eax
jne    1504 <dual_simplex_method+0x3e4>
mov    -0x34(%rbp),%eax
cmp    -0x4c(%rbp),%eax
je     1504 <dual_simplex_method+0x3e4>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x78(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x60(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x78(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    15a8 <dual_simplex_method+0x488>
mov    -0x78(%rbp),%eax
cmp    -0x64(%rbp),%eax
je     15a3 <dual_simplex_method+0x483>
mov    -0x34(%rbp),%eax
cmp    -0x4c(%rbp),%eax
je     15a3 <dual_simplex_method+0x483>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x78(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x60(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x78(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x64(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
divsd  -0x60(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x78(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    15a8 <dual_simplex_method+0x488>
jmp    15ad <dual_simplex_method+0x48d>
jmp    15b2 <dual_simplex_method+0x492>
jmp    15b7 <dual_simplex_method+0x497>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    13f5 <dual_simplex_method+0x2d5>
jmp    15ca <dual_simplex_method+0x4aa>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    13dd <dual_simplex_method+0x2bd>
jmp    15dd <dual_simplex_method+0x4bd>
jmp    15e2 <dual_simplex_method+0x4c2>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    166f <dual_simplex_method+0x54f>
movl   $0x0,-0x84(%rbp)
mov    -0x84(%rbp),%eax
mov    -0x18(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    165c <dual_simplex_method+0x53c>
mov    -0x40(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x84(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x84(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    1604 <dual_simplex_method+0x4e4>
jmp    1661 <dual_simplex_method+0x541>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    15e9 <dual_simplex_method+0x4c9>
lea    0x9d5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1749 <dual_simplex_method+0x629>
mov    -0x20(%rbp),%rax
movslq -0x8c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x1,%eax
jne    16e3 <dual_simplex_method+0x5c3>
mov    -0x20(%rbp),%rax
movslq -0x8c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1,%esi
lea    0x97e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1730 <dual_simplex_method+0x610>
mov    -0x20(%rbp),%rax
movslq -0x8c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x2,%eax
jne    172b <dual_simplex_method+0x60b>
mov    -0x20(%rbp),%rax
movslq -0x8c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1,%esi
lea    0x937(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1730 <dual_simplex_method+0x610>
jmp    1735 <dual_simplex_method+0x615>
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    1687 <dual_simplex_method+0x567>
lea    0x911(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x88(%rbp)
mov    -0x88(%rbp),%eax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    18b2 <dual_simplex_method+0x792>
movl   $0x0,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
mov    -0x18(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    17d0 <dual_simplex_method+0x6b0>
mov    -0x10(%rbp),%rax
movslq -0x88(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x8c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0x8af(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    177f <dual_simplex_method+0x65f>
mov    -0x88(%rbp),%eax
cmp    -0x14(%rbp),%eax
jne    17f2 <dual_simplex_method+0x6d2>
lea    0x883(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1899 <dual_simplex_method+0x779>
mov    -0x28(%rbp),%rax
movslq -0x88(%rbp),%rcx
movslq (%rax,%rcx,4),%rax
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
mov    %eax,-0x90(%rbp)
sub    $0x1,%eax
je     183d <dual_simplex_method+0x71d>
jmp    1829 <dual_simplex_method+0x709>
mov    -0x90(%rbp),%eax
sub    $0x2,%eax
je     186b <dual_simplex_method+0x74b>
jmp    1894 <dual_simplex_method+0x774>
mov    -0x28(%rbp),%rax
movslq -0x88(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1,%esi
lea    0x80d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1894 <dual_simplex_method+0x774>
mov    -0x28(%rbp),%rax
movslq -0x88(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1,%esi
lea    0x7e4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1899 <dual_simplex_method+0x779>
jmp    189e <dual_simplex_method+0x77e>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    1761 <dual_simplex_method+0x641>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dual_simplex_method>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r8,0x20(%rsp)
mov    %rcx,0x18(%rsp)
mov    %edx,%ebp
mov    %esi,%ebx
mov    %rdi,%r12
lea    0x1(%rbx),%r14d
movslq %r14d,%rdi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,%r15
mov    $0x1,%eax
test   %ebx,%ebx
js     17d5 <dual_simplex_method+0x6a5>
mov    %rbx,0x8(%rsp)
mov    %ebp,%eax
mov    %rax,0x10(%rsp)
mov    %rbp,(%rsp)
mov    %r14d,%eax
movslq %ebp,%r14
lea    0x8(,%r14,8),%r13
mov    %eax,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r13,%rdi
call   1050 <malloc@plt>
mov    %rax,(%r15,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    11a0 <dual_simplex_method+0x70>
mov    0x8(%rsp),%rax
test   %eax,%eax
jle    12a4 <dual_simplex_method+0x174>
mov    %eax,%r11d
cmp    $0x1,%eax
mov    %rbp,%r13
jne    12ae <dual_simplex_method+0x17e>
movsd  0xe27(%rip),%xmm0
xor    %esi,%esi
xor    %edx,%edx
xor    %edi,%edi
mov    0x10(%rsp),%r9
mov    $0x1,%eax
test   $0x1,%r11b
je     1218 <dual_simplex_method+0xe8>
mov    (%r12,%rsi,8),%rcx
movsd  (%rcx,%r14,8),%xmm1
ucomisd %xmm1,%xmm0
seta   %cl
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
seta   %bl
test   %bl,%cl
cmovne %esi,%edi
mov    $0x1,%ecx
cmovne %ecx,%edx
test   %edx,%edx
je     17d5 <dual_simplex_method+0x6a5>
cmpl   $0x0,(%rsp)
jle    134e <dual_simplex_method+0x21e>
movslq 0x8(%rsp),%rax
mov    (%r12,%rax,8),%r8
movslq %edi,%r10
mov    (%r12,%r10,8),%rbp
xor    %ebx,%ebx
movsd  0xdc4(%rip),%xmm2
movapd 0xdd4(%rip),%xmm0
xorpd  %xmm1,%xmm1
xor    %esi,%esi
jmp    1271 <dual_simplex_method+0x141>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%rbx
movapd %xmm3,%xmm2
cmp    %rbx,%r9
je     1342 <dual_simplex_method+0x212>
movsd  (%r8,%rbx,8),%xmm3
movsd  0x0(%rbp,%rbx,8),%xmm4
divsd  %xmm4,%xmm3
andpd  %xmm0,%xmm3
ucomisd %xmm3,%xmm2
seta   %al
ucomisd %xmm4,%xmm1
seta   %cl
mov    %esi,%edx
mov    %ebx,%esi
test   %cl,%al
cmove  %edx,%esi
jne    1260 <dual_simplex_method+0x130>
movapd %xmm2,%xmm3
jmp    1260 <dual_simplex_method+0x130>
mov    $0x1,%eax
jmp    17d5 <dual_simplex_method+0x6a5>
mov    %r11d,%eax
and    $0xfffffffe,%eax
movsd  0xd44(%rip),%xmm0
xor    %esi,%esi
xorpd  %xmm1,%xmm1
mov    $0x1,%r8d
xor    %edx,%edx
xor    %edi,%edi
mov    0x10(%rsp),%r9
jmp    12f4 <dual_simplex_method+0x1c4>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmovne %ebp,%edi
cmovne %r8d,%edx
add    $0x2,%rsi
cmp    %rax,%rsi
je     11e4 <dual_simplex_method+0xb4>
mov    (%r12,%rsi,8),%rbp
movsd  0x0(%rbp,%r14,8),%xmm2
ucomisd %xmm2,%xmm0
seta   %bl
ucomisd %xmm2,%xmm1
seta   %cl
test   %cl,%bl
jne    1315 <dual_simplex_method+0x1e5>
movapd %xmm0,%xmm2
mov    0x8(%r12,%rsi,8),%rcx
cmovne %esi,%edi
movsd  (%rcx,%r14,8),%xmm0
cmovne %r8d,%edx
ucomisd %xmm0,%xmm2
seta   %cl
ucomisd %xmm0,%xmm1
seta   %bl
lea    0x1(%rsi),%ebp
test   %bl,%cl
jne    12e0 <dual_simplex_method+0x1b0>
movapd %xmm2,%xmm0
jmp    12e0 <dual_simplex_method+0x1b0>
ucomisd 0xcbe(%rip),%xmm3
jne    1364 <dual_simplex_method+0x234>
jp     1364 <dual_simplex_method+0x234>
lea    0xd13(%rip),%rdi
call   1030 <puts@plt>
mov    $0x2,%eax
jmp    17d5 <dual_simplex_method+0x6a5>
mov    %r11,0x40(%rsp)
mov    (%r12,%r10,8),%r8
movslq %esi,%r9
movsd  (%r8,%r9,8),%xmm0
mov    0x20(%rsp),%rdx
mov    (%rdx,%r10,4),%eax
mov    0x18(%rsp),%rbp
mov    0x0(%rbp,%r9,4),%ecx
mov    %ecx,(%rdx,%r10,4)
mov    %eax,0x0(%rbp,%r9,4)
cmpl   $0x0,0x8(%rsp)
js     1653 <dual_simplex_method+0x523>
mov    %esi,%ebp
mov    (%rsp),%r10
lea    0x1(%r10),%r11d
mov    %edi,%ecx
xor    %edx,%edx
movsd  0xc5d(%rip),%xmm1
movapd 0xc75(%rip),%xmm2
jmp    13cd <dual_simplex_method+0x29d>
nopl   (%rax)
add    $0x1,%rdx
cmp    %r13,%rdx
je     1492 <dual_simplex_method+0x362>
test   %r10d,%r10d
js     13c0 <dual_simplex_method+0x290>
cmp    %rcx,%rdx
setne  %bl
xor    %esi,%esi
nopw   0x0(%rax,%rax,1)
cmp    %rcx,%rdx
jne    1400 <dual_simplex_method+0x2d0>
cmp    %rsi,%rbp
jne    1400 <dual_simplex_method+0x2d0>
mov    (%r12,%rdx,8),%rdi
movapd %xmm1,%xmm3
divsd  (%rdi,%rbp,8),%xmm3
mov    %rbp,%rdi
jmp    1477 <dual_simplex_method+0x347>
nopl   0x0(%rax)
cmp    %rsi,%rbp
sete   %al
or     %bl,%al
je     1430 <dual_simplex_method+0x300>
cmp    %rsi,%rbp
jne    143b <dual_simplex_method+0x30b>
cmp    %rcx,%rdx
je     143b <dual_simplex_method+0x30b>
mov    (%r12,%rdx,8),%rax
movsd  (%rax,%rbp,8),%xmm3
xorpd  %xmm2,%xmm3
divsd  %xmm0,%xmm3
mov    %rbp,%rdi
jmp    1477 <dual_simplex_method+0x347>
nopw   0x0(%rax,%rax,1)
mov    (%r12,%rdx,8),%rax
movsd  (%rax,%rsi,8),%xmm3
jmp    1470 <dual_simplex_method+0x340>
cmp    %rsi,%rbp
je     1480 <dual_simplex_method+0x350>
cmp    %rcx,%rdx
je     1480 <dual_simplex_method+0x350>
mov    (%r12,%rdx,8),%rax
movsd  (%rax,%r9,8),%xmm4
mulsd  (%r8,%rsi,8),%xmm4
movsd  (%rax,%rsi,8),%xmm3
mulsd  %xmm0,%xmm3
subsd  %xmm4,%xmm3
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
divsd  %xmm0,%xmm3
mov    %rsi,%rdi
mov    (%r15,%rdx,8),%rax
movsd  %xmm3,(%rax,%rdi,8)
add    $0x1,%rsi
cmp    %rsi,%r11
jne    13e0 <dual_simplex_method+0x2b0>
jmp    13c0 <dual_simplex_method+0x290>
cmpl   $0x0,0x8(%rsp)
js     1653 <dual_simplex_method+0x523>
mov    %r13,%rbp
mov    %r11d,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rcx
mov    %rcx,0x38(%rsp)
shr    $0x2,%rcx
add    $0x1,%rcx
mov    %ecx,%r9d
and    $0x3,%r9d
and    $0xfffffffffffffffc,%rcx
mov    %rcx,0x28(%rsp)
mov    %r11d,%r14d
and    $0x3,%r14d
mov    %r9,0x30(%rsp)
shl    $0x5,%r9
xor    %r8d,%r8d
jmp    14ed <dual_simplex_method+0x3bd>
nopl   0x0(%rax)
add    $0x1,%r8
cmp    %rbp,%r8
je     1653 <dual_simplex_method+0x523>
cmpl   $0x0,(%rsp)
js     14e0 <dual_simplex_method+0x3b0>
mov    (%r15,%r8,8),%rcx
mov    (%r12,%r8,8),%rdx
cmp    $0x4,%r11d
jb     1517 <dual_simplex_method+0x3e7>
lea    (%rcx,%r11,8),%rsi
cmp    %rsi,%rdx
jae    158c <dual_simplex_method+0x45c>
lea    (%rdx,%r11,8),%rsi
cmp    %rsi,%rcx
jae    158c <dual_simplex_method+0x45c>
xor    %ebx,%ebx
mov    %rbx,%rdi
not    %rdi
add    %r11,%rdi
test   %r14,%r14
je     1544 <dual_simplex_method+0x414>
mov    %r14,%rsi
nopw   0x0(%rax,%rax,1)
movsd  (%rcx,%rbx,8),%xmm0
movsd  %xmm0,(%rdx,%rbx,8)
add    $0x1,%rbx
add    $0xffffffffffffffff,%rsi
jne    1530 <dual_simplex_method+0x400>
cmp    $0x3,%rdi
jb     14e0 <dual_simplex_method+0x3b0>
nopw   0x0(%rax,%rax,1)
movsd  (%rcx,%rbx,8),%xmm0
movsd  %xmm0,(%rdx,%rbx,8)
movsd  0x8(%rcx,%rbx,8),%xmm0
movsd  %xmm0,0x8(%rdx,%rbx,8)
movsd  0x10(%rcx,%rbx,8),%xmm0
movsd  %xmm0,0x10(%rdx,%rbx,8)
movsd  0x18(%rcx,%rbx,8),%xmm0
movsd  %xmm0,0x18(%rdx,%rbx,8)
add    $0x4,%rbx
cmp    %rbx,%r11
jne    1550 <dual_simplex_method+0x420>
jmp    14e0 <dual_simplex_method+0x3b0>
cmpq   $0xc,0x38(%rsp)
jae    1598 <dual_simplex_method+0x468>
xor    %ebx,%ebx
jmp    15fc <dual_simplex_method+0x4cc>
mov    0x28(%rsp),%r10
xor    %ebx,%ebx
nop
movups (%rcx,%rbx,8),%xmm0
movups 0x10(%rcx,%rbx,8),%xmm1
movups %xmm0,(%rdx,%rbx,8)
movups %xmm1,0x10(%rdx,%rbx,8)
movups 0x20(%rcx,%rbx,8),%xmm0
movups 0x30(%rcx,%rbx,8),%xmm1
movups %xmm0,0x20(%rdx,%rbx,8)
movups %xmm1,0x30(%rdx,%rbx,8)
movups 0x40(%rcx,%rbx,8),%xmm0
movups 0x50(%rcx,%rbx,8),%xmm1
movups %xmm0,0x40(%rdx,%rbx,8)
movups %xmm1,0x50(%rdx,%rbx,8)
movupd 0x60(%rcx,%rbx,8),%xmm0
movupd 0x70(%rcx,%rbx,8),%xmm1
movupd %xmm0,0x60(%rdx,%rbx,8)
movupd %xmm1,0x70(%rdx,%rbx,8)
add    $0x10,%rbx
add    $0xfffffffffffffffc,%r10
jne    15a0 <dual_simplex_method+0x470>
cmpq   $0x0,0x30(%rsp)
je     163f <dual_simplex_method+0x50f>
lea    (%rdx,%rbx,8),%rdi
add    $0x10,%rdi
lea    (%rcx,%rbx,8),%rsi
add    $0x10,%rsi
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
movupd -0x10(%rsi,%rbp,1),%xmm0
movupd (%rsi,%rbp,1),%xmm1
movupd %xmm0,-0x10(%rdi,%rbp,1)
movupd %xmm1,(%rdi,%rbp,1)
add    $0x20,%rbp
cmp    %rbp,%r9
jne    1620 <dual_simplex_method+0x4f0>
mov    %rax,%rbx
cmp    %r11,%rax
mov    %r13,%rbp
je     14e0 <dual_simplex_method+0x3b0>
jmp    1519 <dual_simplex_method+0x3e9>
lea    0xa01(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x0,(%rsp)
mov    0x10(%rsp),%rdx
mov    0x18(%rsp),%rbx
jle    16d9 <dual_simplex_method+0x5a9>
lea    0x9ca(%rip),%r15
lea    0x9c9(%rip),%r14
xor    %ebp,%ebp
jmp    16be <dual_simplex_method+0x58e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl %al,%eax
imul   $0xcd,%eax,%ecx
shr    $0xa,%ecx
and    $0xfffffffe,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %cl,%al
add    $0x1,%al
movzbl %al,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%rdx
add    $0x1,%rbp
cmp    %rbp,%rdx
je     16d9 <dual_simplex_method+0x5a9>
mov    (%rbx,%rbp,4),%eax
lea    -0xa(%rax),%ecx
mov    %r15,%rdi
cmp    $0xa,%ecx
jb     1690 <dual_simplex_method+0x560>
lea    -0x14(%rax),%ecx
mov    %r14,%rdi
cmp    $0x9,%ecx
jbe    1690 <dual_simplex_method+0x560>
jmp    16b5 <dual_simplex_method+0x585>
lea    0x984(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x0,0x8(%rsp)
js     17d3 <dual_simplex_method+0x6a3>
mov    (%rsp),%rax
add    $0x1,%eax
mov    %rax,(%rsp)
lea    0x94a(%rip),%rbp
xor    %r14d,%r14d
mov    (%rsp),%r15
jmp    1729 <dual_simplex_method+0x5f9>
nopl   0x0(%rax,%rax,1)
lea    0x94f(%rip),%rdi
call   1030 <puts@plt>
add    $0x1,%r14
cmp    %r13,%r14
je     17d3 <dual_simplex_method+0x6a3>
cmpl   $0x0,0x10(%rsp)
js     175c <dual_simplex_method+0x62c>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r12,%r14,8),%rax
movsd  (%rax,%rbx,8),%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1740 <dual_simplex_method+0x610>
cmp    0x40(%rsp),%r14
je     1710 <dual_simplex_method+0x5e0>
mov    0x20(%rsp),%rax
movslq (%rax,%r14,4),%rsi
imul   $0x66666667,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
cmp    $0x2,%eax
je     17b6 <dual_simplex_method+0x686>
cmp    $0x1,%eax
jne    171c <dual_simplex_method+0x5ec>
movslq %esi,%rax
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
neg    %eax
add    %eax,%esi
add    $0x1,%esi
lea    0x89d(%rip),%rdi
jmp    17c7 <dual_simplex_method+0x697>
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%esi
add    $0x1,%esi
lea    0x88f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    171c <dual_simplex_method+0x5ec>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [27 x i8] c"The solution is unbounded\0A\00"
@.str.1 = [10 x i8] c"\0ATable: \0A\00"
@.str.2 = [6 x i8] c"X%d\09\09\00"
@.str.3 = [6 x i8] c"Z%d\09\09\00"
@.str.4 = [3 x i8] c"1\0A\00"
@.str.5 = [5 x i8] c"%lf\09\00"
@.str.6 = [3 x i8] c"Z\0A\00"
@.str.7 = [5 x i8] c"X%d\0A\00"
@.str.8 = [5 x i8] c"Z%d\0A\00"
define i32 @dual_simplex_method(double** %0, i32 %1, i32 %2, i32* %3, i32* %4) {
%6 = alloca i32
%7 = alloca double**
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca double**
%16 = alloca double
%17 = alloca i32
%18 = alloca i32
%19 = alloca double
%20 = alloca double
%21 = alloca i32
%22 = alloca double
%23 = alloca i32
%24 = alloca i32
%25 = alloca double
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
store double** %0, double*** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32* %3, i32** %10
store i32* %4, i32** %11
store i32 0, i32* %12
store i32 0, i32* %13
%29 = load i32, i32* %8
%30 = add nsw i32 %29, 1
%31 = sext i32 %30 to i64
%32 = mul i64 %31, 8
%33 = call i8* @malloc(i64 %32)
%34 = bitcast i8* %33 to double**
store double** %34, double*** %15
store i32 0, i32* %14
br label %35
35: ; preds = %51, %5
%36 = load i32, i32* %14
%37 = load i32, i32* %8
%38 = add nsw i32 %37, 1
%39 = icmp slt i32 %36, %38
br i1 %39, label %40, label %54
40: ; preds = %35
%41 = load i32, i32* %9
%42 = add nsw i32 %41, 1
%43 = sext i32 %42 to i64
%44 = mul i64 %43, 8
%45 = call i8* @malloc(i64 %44)
%46 = bitcast i8* %45 to double*
%47 = load double**, double*** %15
%48 = load i32, i32* %14
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds double*, double** %47, i64 %49
store double* %46, double** %50
br label %51
51: ; preds = %40
%52 = load i32, i32* %14
%53 = add nsw i32 %52, 1
store i32 %53, i32* %14
br label %35
54: ; preds = %35
store double 1.000000e+02, double* %16
store i32 0, i32* %14
br label %55
55: ; preds = %94, %54
%56 = load i32, i32* %14
%57 = load i32, i32* %8
%58 = icmp slt i32 %56, %57
br i1 %58, label %59, label %97
59: ; preds = %55
%60 = load double**, double*** %7
%61 = load i32, i32* %14
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds double*, double** %60, i64 %62
%64 = load double*, double** %63
%65 = load i32, i32* %9
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds double, double* %64, i64 %66
%68 = load double, double* %67
%69 = load double, double* %16
%70 = fcmp olt double %68, %69
br i1 %70, label %71, label %93
71: ; preds = %59
%72 = load double**, double*** %7
%73 = load i32, i32* %14
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds double*, double** %72, i64 %74
%76 = load double*, double** %75
%77 = load i32, i32* %9
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds double, double* %76, i64 %78
%80 = load double, double* %79
%81 = fcmp olt double %80, 0.000000e+00
br i1 %81, label %82, label %93
82: ; preds = %71
store i32 1, i32* %12
%83 = load double**, double*** %7
%84 = load i32, i32* %14
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds double*, double** %83, i64 %85
%87 = load double*, double** %86
%88 = load i32, i32* %9
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds double, double* %87, i64 %89
%91 = load double, double* %90
store double %91, double* %16
%92 = load i32, i32* %14
store i32 %92, i32* %13
br label %93
93: ; preds = %82, %71, %59
br label %94
94: ; preds = %93
%95 = load i32, i32* %14
%96 = add nsw i32 %95, 1
store i32 %96, i32* %14
br label %55
97: ; preds = %55
%98 = load i32, i32* %13
store i32 %98, i32* %17
%99 = load double, double* %16
store double %99, double* %19
%100 = load i32, i32* %12
%101 = icmp eq i32 %100, 0
br i1 %101, label %102, label %103
102: ; preds = %97
store i32 1, i32* %6
br label %508
103: ; preds = %97
store i32 0, i32* %21
store double 1.000000e+04, double* %22
store i32 0, i32* %12
store i32 0, i32* %14
br label %104
104: ; preds = %165, %103
%105 = load i32, i32* %14
%106 = load i32, i32* %9
%107 = icmp slt i32 %105, %106
br i1 %107, label %108, label %168
108: ; preds = %104
%109 = load double**, double*** %7
%110 = load i32, i32* %8
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds double*, double** %109, i64 %111
%113 = load double*, double** %112
%114 = load i32, i32* %14
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds double, double* %113, i64 %115
%117 = load double, double* %116
%118 = load double**, double*** %7
%119 = load i32, i32* %17
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds double*, double** %118, i64 %120
%122 = load double*, double** %121
%123 = load i32, i32* %14
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds double, double* %122, i64 %124
%126 = load double, double* %125
%127 = fdiv double %117, %126
%128 = call double @llvm.fabs.f64(double %127)
%129 = load double, double* %22
%130 = fcmp olt double %128, %129
br i1 %130, label %131, label %164
131: ; preds = %108
%132 = load double**, double*** %7
%133 = load i32, i32* %17
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds double*, double** %132, i64 %134
%136 = load double*, double** %135
%137 = load i32, i32* %14
%138 = sext i32 %137 to i64
%139 = getelementptr inbounds double, double* %136, i64 %138
%140 = load double, double* %139
%141 = fcmp olt double %140, 0.000000e+00
br i1 %141, label %142, label %164
142: ; preds = %131
%143 = load double**, double*** %7
%144 = load i32, i32* %8
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds double*, double** %143, i64 %145
%147 = load double*, double** %146
%148 = load i32, i32* %14
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds double, double* %147, i64 %149
%151 = load double, double* %150
%152 = load double**, double*** %7
%153 = load i32, i32* %17
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds double*, double** %152, i64 %154
%156 = load double*, double** %155
%157 = load i32, i32* %14
%158 = sext i32 %157 to i64
%159 = getelementptr inbounds double, double* %156, i64 %158
%160 = load double, double* %159
%161 = fdiv double %151, %160
%162 = call double @llvm.fabs.f64(double %161)
store double %162, double* %22
%163 = load i32, i32* %14
store i32 %163, i32* %21
br label %164
164: ; preds = %142, %131, %108
br label %165
165: ; preds = %164
%166 = load i32, i32* %14
%167 = add nsw i32 %166, 1
store i32 %167, i32* %14
br label %104
168: ; preds = %104
%169 = load double, double* %22
%170 = fcmp oeq double %169, 1.000000e+04
br i1 %170, label %171, label %173
171: ; preds = %168
%172 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
store i32 2, i32* %6
br label %508
173: ; preds = %168
%174 = load i32, i32* %21
store i32 %174, i32* %18
%175 = load double**, double*** %7
%176 = load i32, i32* %17
%177 = sext i32 %176 to i64
%178 = getelementptr inbounds double*, double** %175, i64 %177
%179 = load double*, double** %178
%180 = load i32, i32* %21
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds double, double* %179, i64 %181
%183 = load double, double* %182
store double %183, double* %20
%184 = load i32*, i32** %11
%185 = load i32, i32* %17
%186 = sext i32 %185 to i64
%187 = getelementptr inbounds i32, i32* %184, i64 %186
%188 = load i32, i32* %187
store i32 %188, i32* %23
%189 = load i32*, i32** %10
%190 = load i32, i32* %21
%191 = sext i32 %190 to i64
%192 = getelementptr inbounds i32, i32* %189, i64 %191
%193 = load i32, i32* %192
%194 = load i32*, i32** %11
%195 = load i32, i32* %17
%196 = sext i32 %195 to i64
%197 = getelementptr inbounds i32, i32* %194, i64 %196
store i32 %193, i32* %197
%198 = load i32, i32* %23
%199 = load i32*, i32** %10
%200 = load i32, i32* %21
%201 = sext i32 %200 to i64
%202 = getelementptr inbounds i32, i32* %199, i64 %201
store i32 %198, i32* %202
store i32 0, i32* %14
br label %203
203: ; preds = %357, %173
%204 = load i32, i32* %14
%205 = load i32, i32* %8
%206 = add nsw i32 %205, 1
%207 = icmp slt i32 %204, %206
br i1 %207, label %208, label %360
208: ; preds = %203
store i32 0, i32* %24
br label %209
209: ; preds = %353, %208
%210 = load i32, i32* %24
%211 = load i32, i32* %9
%212 = add nsw i32 %211, 1
%213 = icmp slt i32 %210, %212
br i1 %213, label %214, label %356
214: ; preds = %209
%215 = load i32, i32* %14
%216 = load i32, i32* %17
%217 = icmp eq i32 %215, %216
br i1 %217, label %218, label %241
218: ; preds = %214
%219 = load i32, i32* %24
%220 = load i32, i32* %21
%221 = icmp eq i32 %219, %220
br i1 %221, label %222, label %241
222: ; preds = %218
%223 = load double**, double*** %7
%224 = load i32, i32* %14
%225 = sext i32 %224 to i64
%226 = getelementptr inbounds double*, double** %223, i64 %225
%227 = load double*, double** %226
%228 = load i32, i32* %24
%229 = sext i32 %228 to i64
%230 = getelementptr inbounds double, double* %227, i64 %229
%231 = load double, double* %230
%232 = fdiv double 1.000000e+00, %231
%233 = load double**, double*** %15
%234 = load i32, i32* %14
%235 = sext i32 %234 to i64
%236 = getelementptr inbounds double*, double** %233, i64 %235
%237 = load double*, double** %236
%238 = load i32, i32* %24
%239 = sext i32 %238 to i64
%240 = getelementptr inbounds double, double* %237, i64 %239
store double %232, double* %240
br label %352
241: ; preds = %218, %214
%242 = load i32, i32* %14
%243 = load i32, i32* %17
%244 = icmp eq i32 %242, %243
br i1 %244, label %245, label %269
245: ; preds = %241
%246 = load i32, i32* %24
%247 = load i32, i32* %21
%248 = icmp ne i32 %246, %247
br i1 %248, label %249, label %269
249: ; preds = %245
%250 = load double**, double*** %7
%251 = load i32, i32* %14
%252 = sext i32 %251 to i64
%253 = getelementptr inbounds double*, double** %250, i64 %252
%254 = load double*, double** %253
%255 = load i32, i32* %24
%256 = sext i32 %255 to i64
%257 = getelementptr inbounds double, double* %254, i64 %256
%258 = load double, double* %257
%259 = load double, double* %20
%260 = fdiv double %258, %259
%261 = load double**, double*** %15
%262 = load i32, i32* %14
%263 = sext i32 %262 to i64
%264 = getelementptr inbounds double*, double** %261, i64 %263
%265 = load double*, double** %264
%266 = load i32, i32* %24
%267 = sext i32 %266 to i64
%268 = getelementptr inbounds double, double* %265, i64 %267
store double %260, double* %268
br label %351
269: ; preds = %245, %241
%270 = load i32, i32* %24
%271 = load i32, i32* %21
%272 = icmp eq i32 %270, %271
br i1 %272, label %273, label %298
273: ; preds = %269
%274 = load i32, i32* %14
%275 = load i32, i32* %17
%276 = icmp ne i32 %274, %275
br i1 %276, label %277, label %298
277: ; preds = %273
%278 = load double**, double*** %7
%279 = load i32, i32* %14
%280 = sext i32 %279 to i64
%281 = getelementptr inbounds double*, double** %278, i64 %280
%282 = load double*, double** %281
%283 = load i32, i32* %24
%284 = sext i32 %283 to i64
%285 = getelementptr inbounds double, double* %282, i64 %284
%286 = load double, double* %285
%287 = fneg double %286
%288 = load double, double* %20
%289 = fdiv double %287, %288
%290 = load double**, double*** %15
%291 = load i32, i32* %14
%292 = sext i32 %291 to i64
%293 = getelementptr inbounds double*, double** %290, i64 %292
%294 = load double*, double** %293
%295 = load i32, i32* %24
%296 = sext i32 %295 to i64
%297 = getelementptr inbounds double, double* %294, i64 %296
store double %289, double* %297
br label %350
298: ; preds = %273, %269
%299 = load i32, i32* %24
%300 = load i32, i32* %21
%301 = icmp ne i32 %299, %300
br i1 %301, label %302, label %349
302: ; preds = %298
%303 = load i32, i32* %14
%304 = load i32, i32* %17
%305 = icmp ne i32 %303, %304
br i1 %305, label %306, label %349
306: ; preds = %302
%307 = load double**, double*** %7
%308 = load i32, i32* %14
%309 = sext i32 %308 to i64
%310 = getelementptr inbounds double*, double** %307, i64 %309
%311 = load double*, double** %310
%312 = load i32, i32* %24
%313 = sext i32 %312 to i64
%314 = getelementptr inbounds double, double* %311, i64 %313
%315 = load double, double* %314
%316 = load double, double* %20
%317 = load double**, double*** %7
%318 = load i32, i32* %17
%319 = sext i32 %318 to i64
%320 = getelementptr inbounds double*, double** %317, i64 %319
%321 = load double*, double** %320
%322 = load i32, i32* %24
%323 = sext i32 %322 to i64
%324 = getelementptr inbounds double, double* %321, i64 %323
%325 = load double, double* %324
%326 = load double**, double*** %7
%327 = load i32, i32* %14
%328 = sext i32 %327 to i64
%329 = getelementptr inbounds double*, double** %326, i64 %328
%330 = load double*, double** %329
%331 = load i32, i32* %21
%332 = sext i32 %331 to i64
%333 = getelementptr inbounds double, double* %330, i64 %332
%334 = load double, double* %333
%335 = fmul double %325, %334
%336 = fneg double %335
%337 = call double @llvm.fmuladd.f64(double %315, double %316, double %336)
store double %337, double* %25
%338 = load double, double* %25
%339 = load double, double* %20
%340 = fdiv double %338, %339
%341 = load double**, double*** %15
%342 = load i32, i32* %14
%343 = sext i32 %342 to i64
%344 = getelementptr inbounds double*, double** %341, i64 %343
%345 = load double*, double** %344
%346 = load i32, i32* %24
%347 = sext i32 %346 to i64
%348 = getelementptr inbounds double, double* %345, i64 %347
store double %340, double* %348
br label %349
349: ; preds = %306, %302, %298
br label %350
350: ; preds = %349, %277
br label %351
351: ; preds = %350, %249
br label %352
352: ; preds = %351, %222
br label %353
353: ; preds = %352
%354 = load i32, i32* %24
%355 = add nsw i32 %354, 1
store i32 %355, i32* %24
br label %209
356: ; preds = %209
br label %357
357: ; preds = %356
%358 = load i32, i32* %14
%359 = add nsw i32 %358, 1
store i32 %359, i32* %14
br label %203
360: ; preds = %203
br label %361
361: ; preds = %360
br label %362
362: ; preds = %361
store i32 0, i32* %14
br label %363
363: ; preds = %396, %362
%364 = load i32, i32* %14
%365 = load i32, i32* %8
%366 = add nsw i32 %365, 1
%367 = icmp slt i32 %364, %366
br i1 %367, label %368, label %399
368: ; preds = %363
store i32 0, i32* %26
br label %369
369: ; preds = %392, %368
%370 = load i32, i32* %26
%371 = load i32, i32* %9
%372 = add nsw i32 %371, 1
%373 = icmp slt i32 %370, %372
br i1 %373, label %374, label %395
374: ; preds = %369
%375 = load double**, double*** %15
%376 = load i32, i32* %14
%377 = sext i32 %376 to i64
%378 = getelementptr inbounds double*, double** %375, i64 %377
%379 = load double*, double** %378
%380 = load i32, i32* %26
%381 = sext i32 %380 to i64
%382 = getelementptr inbounds double, double* %379, i64 %381
%383 = load double, double* %382
%384 = load double**, double*** %7
%385 = load i32, i32* %14
%386 = sext i32 %385 to i64
%387 = getelementptr inbounds double*, double** %384, i64 %386
%388 = load double*, double** %387
%389 = load i32, i32* %26
%390 = sext i32 %389 to i64
%391 = getelementptr inbounds double, double* %388, i64 %390
store double %383, double* %391
br label %392
392: ; preds = %374
%393 = load i32, i32* %26
%394 = add nsw i32 %393, 1
store i32 %394, i32* %26
br label %369
395: ; preds = %369
br label %396
396: ; preds = %395
%397 = load i32, i32* %14
%398 = add nsw i32 %397, 1
store i32 %398, i32* %14
br label %363
399: ; preds = %363
%400 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %28
br label %401
401: ; preds = %441, %399
%402 = load i32, i32* %28
%403 = load i32, i32* %9
%404 = icmp slt i32 %402, %403
br i1 %404, label %405, label %444
405: ; preds = %401
%406 = load i32*, i32** %10
%407 = load i32, i32* %28
%408 = sext i32 %407 to i64
%409 = getelementptr inbounds i32, i32* %406, i64 %408
%410 = load i32, i32* %409
%411 = sdiv i32 %410, 10
%412 = icmp eq i32 %411, 1
br i1 %412, label %413, label %422
413: ; preds = %405
%414 = load i32*, i32** %10
%415 = load i32, i32* %28
%416 = sext i32 %415 to i64
%417 = getelementptr inbounds i32, i32* %414, i64 %416
%418 = load i32, i32* %417
%419 = srem i32 %418, 10
%420 = add nsw i32 %419, 1
%421 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %420)
br label %440
422: ; preds = %405
%423 = load i32*, i32** %10
%424 = load i32, i32* %28
%425 = sext i32 %424 to i64
%426 = getelementptr inbounds i32, i32* %423, i64 %425
%427 = load i32, i32* %426
%428 = sdiv i32 %427, 10
%429 = icmp eq i32 %428, 2
br i1 %429, label %430, label %439
430: ; preds = %422
%431 = load i32*, i32** %10
%432 = load i32, i32* %28
%433 = sext i32 %432 to i64
%434 = getelementptr inbounds i32, i32* %431, i64 %433
%435 = load i32, i32* %434
%436 = srem i32 %435, 10
%437 = add nsw i32 %436, 1
%438 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 %437)
br label %439
439: ; preds = %430, %422
br label %440
440: ; preds = %439, %413
br label %441
441: ; preds = %440
%442 = load i32, i32* %28
%443 = add nsw i32 %442, 1
store i32 %443, i32* %28
br label %401
444: ; preds = %401
%445 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %27
br label %446
446: ; preds = %504, %444
%447 = load i32, i32* %27
%448 = load i32, i32* %8
%449 = add nsw i32 %448, 1
%450 = icmp slt i32 %447, %449
br i1 %450, label %451, label %507
451: ; preds = %446
store i32 0, i32* %28
br label %452
452: ; preds = %468, %451
%453 = load i32, i32* %28
%454 = load i32, i32* %9
%455 = add nsw i32 %454, 1
%456 = icmp slt i32 %453, %455
br i1 %456, label %457, label %471
457: ; preds = %452
%458 = load double**, double*** %7
%459 = load i32, i32* %27
%460 = sext i32 %459 to i64
%461 = getelementptr inbounds double*, double** %458, i64 %460
%462 = load double*, double** %461
%463 = load i32, i32* %28
%464 = sext i32 %463 to i64
%465 = getelementptr inbounds double, double* %462, i64 %464
%466 = load double, double* %465
%467 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), double %466)
br label %468
468: ; preds = %457
%469 = load i32, i32* %28
%470 = add nsw i32 %469, 1
store i32 %470, i32* %28
br label %452
471: ; preds = %452
%472 = load i32, i32* %27
%473 = load i32, i32* %8
%474 = icmp eq i32 %472, %473
br i1 %474, label %475, label %477
475: ; preds = %471
%476 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
br label %503
477: ; preds = %471
%478 = load i32*, i32** %11
%479 = load i32, i32* %27
%480 = sext i32 %479 to i64
%481 = getelementptr inbounds i32, i32* %478, i64 %480
%482 = load i32, i32* %481
%483 = sdiv i32 %482, 10
switch i32 %483, label %502 [
i32 1, label %484
i32 2, label %493
]
484: ; preds = %477
%485 = load i32*, i32** %11
%486 = load i32, i32* %27
%487 = sext i32 %486 to i64
%488 = getelementptr inbounds i32, i32* %485, i64 %487
%489 = load i32, i32* %488
%490 = srem i32 %489, 10
%491 = add nsw i32 %490, 1
%492 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 %491)
br label %502
493: ; preds = %477
%494 = load i32*, i32** %11
%495 = load i32, i32* %27
%496 = sext i32 %495 to i64
%497 = getelementptr inbounds i32, i32* %494, i64 %496
%498 = load i32, i32* %497
%499 = srem i32 %498, 10
%500 = add nsw i32 %499, 1
%501 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i32 %500)
br label %502
502: ; preds = %477, %493, %484
br label %503
503: ; preds = %502, %475
br label %504
504: ; preds = %503
%505 = load i32, i32* %27
%506 = add nsw i32 %505, 1
store i32 %506, i32* %27
br label %446
507: ; preds = %446
store i32 0, i32* %6
br label %508
508: ; preds = %507, %171, %102
%509 = load i32, i32* %6
ret i32 %509
}

LLVM IR (-O2):
@.str.2 = [6 x i8] c"X%d\09\09\00"
@.str.3 = [6 x i8] c"Z%d\09\09\00"
@.str.5 = [5 x i8] c"%lf\09\00"
@.str.7 = [5 x i8] c"X%d\0A\00"
@.str.8 = [5 x i8] c"Z%d\0A\00"
@str = [9 x i8] c"\0ATable: \00"
@str.9 = [2 x i8] c"1\00"
@str.10 = [2 x i8] c"Z\00"
@str.11 = [26 x i8] c"The solution is unbounded\00"
define i32 @dual_simplex_method(double** nocapture %0, i32 %1, i32 %2, i32* nocapture %3, i32* nocapture %4) {
%6 = add i32 %1, 1
%7 = sext i32 %6 to i64
%8 = shl nsw i64 %7, 3
%9 = tail call i8* @malloc(i64 %8)
%10 = bitcast i8* %9 to double**
%11 = icmp slt i32 %1, 0
br i1 %11, label %396, label %12
12: ; preds = %5
%13 = add nsw i32 %2, 1
%14 = sext i32 %13 to i64
%15 = shl nsw i64 %14, 3
%16 = zext i32 %6 to i64
br label %26
17: ; preds = %26
%18 = icmp sgt i32 %1, 0
br i1 %18, label %19, label %396
19: ; preds = %17
%20 = sext i32 %2 to i64
%21 = zext i32 %1 to i64
%22 = and i64 %21, 1
%23 = icmp eq i32 %1, 1
br i1 %23, label %65, label %24
24: ; preds = %19
%25 = and i64 %21, 4294967294
br label %33
26: ; preds = %12, %26
%27 = phi i64 [ 0, %12 ], [ %31, %26 ]
%28 = tail call i8* @malloc(i64 %15)
%29 = getelementptr inbounds double*, double** %10, i64 %27
%30 = bitcast double** %29 to i8**
store i8* %28, i8** %30
%31 = add nuw nsw i64 %27, 1
%32 = icmp eq i64 %31, %16
br i1 %32, label %17, label %26
33: ; preds = %33, %24
%34 = phi i64 [ 0, %24 ], [ %62, %33 ]
%35 = phi i32 [ 0, %24 ], [ %61, %33 ]
%36 = phi i32 [ 0, %24 ], [ %59, %33 ]
%37 = phi double [ 1.000000e+02, %24 ], [ %57, %33 ]
%38 = phi i64 [ 0, %24 ], [ %63, %33 ]
%39 = getelementptr inbounds double*, double** %0, i64 %34
%40 = load double*, double** %39
%41 = getelementptr inbounds double, double* %40, i64 %20
%42 = load double, double* %41
%43 = fcmp olt double %42, %37
%44 = fcmp olt double %42, 0.000000e+00
%45 = and i1 %43, %44
%46 = select i1 %45, double %42, double %37
%47 = trunc i64 %34 to i32
%48 = select i1 %45, i32 %47, i32 %36
%49 = or i64 %34, 1
%50 = getelementptr inbounds double*, double** %0, i64 %49
%51 = load double*, double** %50
%52 = getelementptr inbounds double, double* %51, i64 %20
%53 = load double, double* %52
%54 = fcmp olt double %53, %46
%55 = fcmp olt double %53, 0.000000e+00
%56 = and i1 %54, %55
%57 = select i1 %56, double %53, double %46
%58 = trunc i64 %49 to i32
%59 = select i1 %56, i32 %58, i32 %48
%60 = select i1 %56, i1 true, i1 %45
%61 = select i1 %60, i32 1, i32 %35
%62 = add nuw nsw i64 %34, 2
%63 = add i64 %38, 2
%64 = icmp eq i64 %63, %25
br i1 %64, label %65, label %33
65: ; preds = %33, %19
%66 = phi i32 [ undef, %19 ], [ %59, %33 ]
%67 = phi i32 [ undef, %19 ], [ %61, %33 ]
%68 = phi i64 [ 0, %19 ], [ %62, %33 ]
%69 = phi i32 [ 0, %19 ], [ %61, %33 ]
%70 = phi i32 [ 0, %19 ], [ %59, %33 ]
%71 = phi double [ 1.000000e+02, %19 ], [ %57, %33 ]
%72 = icmp eq i64 %22, 0
br i1 %72, label %84, label %73
73: ; preds = %65
%74 = getelementptr inbounds double*, double** %0, i64 %68
%75 = load double*, double** %74
%76 = getelementptr inbounds double, double* %75, i64 %20
%77 = load double, double* %76
%78 = fcmp olt double %77, %71
%79 = fcmp olt double %77, 0.000000e+00
%80 = and i1 %78, %79
%81 = trunc i64 %68 to i32
%82 = select i1 %80, i32 %81, i32 %70
%83 = select i1 %80, i32 1, i32 %69
br label %84
84: ; preds = %65, %73
%85 = phi i32 [ %66, %65 ], [ %82, %73 ]
%86 = phi i32 [ %67, %65 ], [ %83, %73 ]
%87 = icmp eq i32 %86, 0
br i1 %87, label %396, label %88
88: ; preds = %84
%89 = icmp sgt i32 %2, 0
br i1 %89, label %90, label %118
90: ; preds = %88
%91 = sext i32 %1 to i64
%92 = getelementptr inbounds double*, double** %0, i64 %91
%93 = load double*, double** %92
%94 = sext i32 %85 to i64
%95 = getelementptr inbounds double*, double** %0, i64 %94
%96 = load double*, double** %95
%97 = zext i32 %2 to i64
br label %98
98: ; preds = %90, %98
%99 = phi i64 [ 0, %90 ], [ %114, %98 ]
%100 = phi double [ 1.000000e+04, %90 ], [ %113, %98 ]
%101 = phi i32 [ 0, %90 ], [ %112, %98 ]
%102 = getelementptr inbounds double, double* %93, i64 %99
%103 = load double, double* %102
%104 = getelementptr inbounds double, double* %96, i64 %99
%105 = load double, double* %104
%106 = fdiv double %103, %105
%107 = tail call double @llvm.fabs.f64(double %106)
%108 = fcmp olt double %107, %100
%109 = fcmp olt double %105, 0.000000e+00
%110 = select i1 %108, i1 %109, i1 false
%111 = trunc i64 %99 to i32
%112 = select i1 %110, i32 %111, i32 %101
%113 = select i1 %110, double %107, double %100
%114 = add nuw nsw i64 %99, 1
%115 = icmp eq i64 %114, %97
br i1 %115, label %116, label %98
116: ; preds = %98
%117 = fcmp oeq double %113, 1.000000e+04
br i1 %117, label %118, label %120
118: ; preds = %88, %116
%119 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.11, i64 0, i64 0))
br label %396
120: ; preds = %116
%121 = sext i32 %85 to i64
%122 = getelementptr inbounds double*, double** %0, i64 %121
%123 = load double*, double** %122
%124 = sext i32 %112 to i64
%125 = getelementptr inbounds double, double* %123, i64 %124
%126 = load double, double* %125
%127 = getelementptr inbounds i32, i32* %4, i64 %121
%128 = load i32, i32* %127
%129 = getelementptr inbounds i32, i32* %3, i64 %124
%130 = load i32, i32* %129
store i32 %130, i32* %127
store i32 %128, i32* %129
br i1 %11, label %334, label %131
131: ; preds = %120
%132 = icmp slt i32 %2, 0
%133 = zext i32 %112 to i64
%134 = add i32 %2, 1
%135 = zext i32 %85 to i64
%136 = zext i32 %6 to i64
%137 = zext i32 %134 to i64
br label %138
138: ; preds = %131, %192
%139 = phi i64 [ 0, %131 ], [ %193, %192 ]
br i1 %132, label %192, label %140
140: ; preds = %138
%141 = icmp eq i64 %139, %135
%142 = xor i1 %141, true
%143 = getelementptr inbounds double*, double** %0, i64 %139
%144 = getelementptr inbounds double*, double** %10, i64 %139
br label %145
145: ; preds = %140, %189
%146 = phi i64 [ 0, %140 ], [ %190, %189 ]
%147 = icmp eq i64 %146, %133
%148 = select i1 %141, i1 %147, i1 false
br i1 %148, label %149, label %154
149: ; preds = %145
%150 = load double*, double** %143
%151 = getelementptr inbounds double, double* %150, i64 %133
%152 = load double, double* %151
%153 = fdiv double 1.000000e+00, %152
br label %184
154: ; preds = %145
%155 = select i1 %142, i1 true, i1 %147
br i1 %155, label %161, label %156
156: ; preds = %154
%157 = load double*, double** %143
%158 = getelementptr inbounds double, double* %157, i64 %146
%159 = load double, double* %158
%160 = fdiv double %159, %126
br label %184
161: ; preds = %154
%162 = icmp ne i64 %146, %133
%163 = select i1 %162, i1 true, i1 %141
br i1 %163, label %170, label %164
164: ; preds = %161
%165 = load double*, double** %143
%166 = getelementptr inbounds double, double* %165, i64 %133
%167 = load double, double* %166
%168 = fneg double %167
%169 = fdiv double %168, %126
br label %184
170: ; preds = %161
%171 = select i1 %147, i1 true, i1 %141
br i1 %171, label %189, label %172
172: ; preds = %170
%173 = load double*, double** %143
%174 = getelementptr inbounds double, double* %173, i64 %146
%175 = load double, double* %174
%176 = getelementptr inbounds double, double* %123, i64 %146
%177 = load double, double* %176
%178 = getelementptr inbounds double, double* %173, i64 %124
%179 = load double, double* %178
%180 = fneg double %177
%181 = fmul double %179, %180
%182 = tail call double @llvm.fmuladd.f64(double %175, double %126, double %181)
%183 = fdiv double %182, %126
br label %184
184: ; preds = %156, %172, %164, %149
%185 = phi i64 [ %133, %149 ], [ %133, %164 ], [ %146, %172 ], [ %146, %156 ]
%186 = phi double [ %153, %149 ], [ %169, %164 ], [ %183, %172 ], [ %160, %156 ]
%187 = load double*, double** %144
%188 = getelementptr inbounds double, double* %187, i64 %185
store double %186, double* %188
br label %189
189: ; preds = %184, %170
%190 = add nuw nsw i64 %146, 1
%191 = icmp eq i64 %190, %137
br i1 %191, label %192, label %145
192: ; preds = %189, %138
%193 = add nuw nsw i64 %139, 1
%194 = icmp eq i64 %193, %136
br i1 %194, label %195, label %138
195: ; preds = %192
br i1 %11, label %334, label %196
196: ; preds = %195
%197 = icmp slt i32 %2, 0
%198 = add i32 %2, 1
%199 = zext i32 %6 to i64
%200 = zext i32 %198 to i64
%201 = and i64 %137, 4294967292
%202 = add nsw i64 %201, -4
%203 = lshr exact i64 %202, 2
%204 = add nuw nsw i64 %203, 1
%205 = icmp ult i32 %134, 4
%206 = and i64 %137, 4294967292
%207 = and i64 %204, 3
%208 = icmp ult i64 %202, 12
%209 = and i64 %204, 9223372036854775804
%210 = icmp eq i64 %207, 0
%211 = icmp eq i64 %206, %137
%212 = and i64 %137, 3
%213 = icmp eq i64 %212, 0
br label %214
214: ; preds = %196, %331
%215 = phi i64 [ 0, %196 ], [ %332, %331 ]
br i1 %197, label %331, label %216
216: ; preds = %214
%217 = getelementptr inbounds double*, double** %10, i64 %215
%218 = load double*, double** %217
%219 = getelementptr inbounds double*, double** %0, i64 %215
%220 = load double*, double** %219
br i1 %205, label %296, label %221
221: ; preds = %216
%222 = getelementptr double, double* %220, i64 %137
%223 = getelementptr double, double* %218, i64 %137
%224 = icmp ult double* %220, %223
%225 = icmp ult double* %218, %222
%226 = and i1 %224, %225
br i1 %226, label %296, label %227
227: ; preds = %221
br i1 %208, label %277, label %228
228: ; preds = %227, %228
%229 = phi i64 [ %274, %228 ], [ 0, %227 ]
%230 = phi i64 [ %275, %228 ], [ 0, %227 ]
%231 = getelementptr inbounds double, double* %218, i64 %229
%232 = bitcast double* %231 to <2 x double>*
%233 = load <2 x double>, <2 x double>* %232
%234 = getelementptr inbounds double, double* %231, i64 2
%235 = bitcast double* %234 to <2 x double>*
%236 = load <2 x double>, <2 x double>* %235
%237 = getelementptr inbounds double, double* %220, i64 %229
%238 = bitcast double* %237 to <2 x double>*
store <2 x double> %233, <2 x double>* %238
%239 = getelementptr inbounds double, double* %237, i64 2
%240 = bitcast double* %239 to <2 x double>*
store <2 x double> %236, <2 x double>* %240
%241 = or i64 %229, 4
%242 = getelementptr inbounds double, double* %218, i64 %241
%243 = bitcast double* %242 to <2 x double>*
%244 = load <2 x double>, <2 x double>* %243
%245 = getelementptr inbounds double, double* %242, i64 2
%246 = bitcast double* %245 to <2 x double>*
%247 = load <2 x double>, <2 x double>* %246
%248 = getelementptr inbounds double, double* %220, i64 %241
%249 = bitcast double* %248 to <2 x double>*
store <2 x double> %244, <2 x double>* %249
%250 = getelementptr inbounds double, double* %248, i64 2
%251 = bitcast double* %250 to <2 x double>*
store <2 x double> %247, <2 x double>* %251
%252 = or i64 %229, 8
%253 = getelementptr inbounds double, double* %218, i64 %252
%254 = bitcast double* %253 to <2 x double>*
%255 = load <2 x double>, <2 x double>* %254
%256 = getelementptr inbounds double, double* %253, i64 2
%257 = bitcast double* %256 to <2 x double>*
%258 = load <2 x double>, <2 x double>* %257
%259 = getelementptr inbounds double, double* %220, i64 %252
%260 = bitcast double* %259 to <2 x double>*
store <2 x double> %255, <2 x double>* %260
%261 = getelementptr inbounds double, double* %259, i64 2
%262 = bitcast double* %261 to <2 x double>*
store <2 x double> %258, <2 x double>* %262
%263 = or i64 %229, 12
%264 = getelementptr inbounds double, double* %218, i64 %263
%265 = bitcast double* %264 to <2 x double>*
%266 = load <2 x double>, <2 x double>* %265
%267 = getelementptr inbounds double, double* %264, i64 2
%268 = bitcast double* %267 to <2 x double>*
%269 = load <2 x double>, <2 x double>* %268
%270 = getelementptr inbounds double, double* %220, i64 %263
%271 = bitcast double* %270 to <2 x double>*
store <2 x double> %266, <2 x double>* %271
%272 = getelementptr inbounds double, double* %270, i64 2
%273 = bitcast double* %272 to <2 x double>*
store <2 x double> %269, <2 x double>* %273
%274 = add nuw i64 %229, 16
%275 = add nuw i64 %230, 4
%276 = icmp eq i64 %275, %209
br i1 %276, label %277, label %228
277: ; preds = %228, %227
%278 = phi i64 [ 0, %227 ], [ %274, %228 ]
br i1 %210, label %295, label %279
279: ; preds = %277, %279
%280 = phi i64 [ %292, %279 ], [ %278, %277 ]
%281 = phi i64 [ %293, %279 ], [ 0, %277 ]
%282 = getelementptr inbounds double, double* %218, i64 %280
%283 = bitcast double* %282 to <2 x double>*
%284 = load <2 x double>, <2 x double>* %283
%285 = getelementptr inbounds double, double* %282, i64 2
%286 = bitcast double* %285 to <2 x double>*
%287 = load <2 x double>, <2 x double>* %286
%288 = getelementptr inbounds double, double* %220, i64 %280
%289 = bitcast double* %288 to <2 x double>*
store <2 x double> %284, <2 x double>* %289
%290 = getelementptr inbounds double, double* %288, i64 2
%291 = bitcast double* %290 to <2 x double>*
store <2 x double> %287, <2 x double>* %291
%292 = add nuw i64 %280, 4
%293 = add i64 %281, 1
%294 = icmp eq i64 %293, %207
br i1 %294, label %295, label %279
295: ; preds = %279, %277
br i1 %211, label %331, label %296
296: ; preds = %221, %216, %295
%297 = phi i64 [ 0, %221 ], [ 0, %216 ], [ %206, %295 ]
%298 = xor i64 %297, -1
%299 = add nsw i64 %298, %137
br i1 %213, label %309, label %300
300: ; preds = %296, %300
%301 = phi i64 [ %306, %300 ], [ %297, %296 ]
%302 = phi i64 [ %307, %300 ], [ 0, %296 ]
%303 = getelementptr inbounds double, double* %218, i64 %301
%304 = load double, double* %303
%305 = getelementptr inbounds double, double* %220, i64 %301
store double %304, double* %305
%306 = add nuw nsw i64 %301, 1
%307 = add i64 %302, 1
%308 = icmp eq i64 %307, %212
br i1 %308, label %309, label %300
309: ; preds = %300, %296
%310 = phi i64 [ %297, %296 ], [ %306, %300 ]
%311 = icmp ult i64 %299, 3
br i1 %311, label %331, label %312
312: ; preds = %309, %312
%313 = phi i64 [ %329, %312 ], [ %310, %309 ]
%314 = getelementptr inbounds double, double* %218, i64 %313
%315 = load double, double* %314
%316 = getelementptr inbounds double, double* %220, i64 %313
store double %315, double* %316
%317 = add nuw nsw i64 %313, 1
%318 = getelementptr inbounds double, double* %218, i64 %317
%319 = load double, double* %318
%320 = getelementptr inbounds double, double* %220, i64 %317
store double %319, double* %320
%321 = add nuw nsw i64 %313, 2
%322 = getelementptr inbounds double, double* %218, i64 %321
%323 = load double, double* %322
%324 = getelementptr inbounds double, double* %220, i64 %321
store double %323, double* %324
%325 = add nuw nsw i64 %313, 3
%326 = getelementptr inbounds double, double* %218, i64 %325
%327 = load double, double* %326
%328 = getelementptr inbounds double, double* %220, i64 %325
store double %327, double* %328
%329 = add nuw nsw i64 %313, 4
%330 = icmp eq i64 %329, %200
br i1 %330, label %331, label %312
331: ; preds = %309, %312, %295, %214
%332 = add nuw nsw i64 %215, 1
%333 = icmp eq i64 %332, %199
br i1 %333, label %334, label %214
334: ; preds = %331, %120, %195
%335 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
br i1 %89, label %336, label %357
336: ; preds = %334
%337 = zext i32 %2 to i64
br label %338
338: ; preds = %336, %354
%339 = phi i64 [ 0, %336 ], [ %355, %354 ]
%340 = getelementptr inbounds i32, i32* %3, i64 %339
%341 = load i32, i32* %340
%342 = add i32 %341, -10
%343 = icmp ult i32 %342, 10
br i1 %343, label %347, label %344
344: ; preds = %338
%345 = add i32 %341, -20
%346 = icmp ult i32 %345, 10
br i1 %346, label %347, label %354
347: ; preds = %344, %338
%348 = phi i8* [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), %338 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), %344 ]
%349 = trunc i32 %341 to i8
%350 = urem i8 %349, 10
%351 = add nuw nsw i8 %350, 1
%352 = zext i8 %351 to i32
%353 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %348, i32 %352)
br label %354
354: ; preds = %347, %344
%355 = add nuw nsw i64 %339, 1
%356 = icmp eq i64 %355, %337
br i1 %356, label %357, label %338
357: ; preds = %354, %334
%358 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.9, i64 0, i64 0))
br i1 %11, label %396, label %359
359: ; preds = %357
%360 = icmp slt i32 %2, 0
%361 = add i32 %2, 1
%362 = zext i32 %1 to i64
%363 = zext i32 %6 to i64
%364 = zext i32 %361 to i64
br label %365
365: ; preds = %359, %393
%366 = phi i64 [ 0, %359 ], [ %394, %393 ]
br i1 %360, label %377, label %367
367: ; preds = %365
%368 = getelementptr inbounds double*, double** %0, i64 %366
br label %369
369: ; preds = %367, %369
%370 = phi i64 [ 0, %367 ], [ %375, %369 ]
%371 = load double*, double** %368
%372 = getelementptr inbounds double, double* %371, i64 %370
%373 = load double, double* %372
%374 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), double %373)
%375 = add nuw nsw i64 %370, 1
%376 = icmp eq i64 %375, %364
br i1 %376, label %377, label %369
377: ; preds = %369, %365
%378 = icmp eq i64 %366, %362
br i1 %378, label %379, label %381
379: ; preds = %377
%380 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.10, i64 0, i64 0))
br label %393
381: ; preds = %377
%382 = getelementptr inbounds i32, i32* %4, i64 %366
%383 = load i32, i32* %382
%384 = sdiv i32 %383, 10
%385 = srem i32 %383, 10
switch i32 %384, label %393 [
i32 1, label %386
i32 2, label %390
]
386: ; preds = %381
%387 = srem i32 %383, 10
%388 = add nsw i32 %387, 1
%389 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 %388)
br label %393
390: ; preds = %381
%391 = add nsw i32 %385, 1
%392 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i32 %391)
br label %393
393: ; preds = %379, %381, %390, %386
%394 = add nuw nsw i64 %366, 1
%395 = icmp eq i64 %394, %363
br i1 %395, label %396, label %365
396: ; preds = %393, %5, %17, %357, %118, %84
%397 = phi i32 [ 1, %84 ], [ 2, %118 ], [ 0, %357 ], [ 1, %17 ], [ 1, %5 ], [ 0, %393 ]
ret i32 %397
}