#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 */
float **convert_matrix(float *, int, int, int, int);
int /*<<< orphan*/ free_convert_matrix(float **, int, int, int, int);
int /*<<< orphan*/ free_ivector(int *, int, int);
int *ivector(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ simplx(float **, int, int, int, int, int, int *, int *,
                          int *);
int main(void) {
  int i, icase, j, *izrov, *iposv;
  static float c[6][5] = {0.0,  1.0,  1.0, 3.0,  -0.5, 740.0, -1.0, 0.0,
                          -2.0, 0.0,  0.0, 0.0,  -2.0, 0.0,   7.0,  0.5,
                          0.0,  -1.0, 1.0, -2.0, 9.0,  -1.0,  -1.0, -1.0,
                          -1.0, 0.0,  0.0, 0.0,  0.0,  0.0};
  float **a;
  static char *txt[(4 + 2 + 1) + 1] = {" ",  "x1", "x2", "x3",
                                       "x4", "y1", "y2", "y3"};
  izrov = ivector(1, 4);
  iposv = ivector(1, 4);
  a = convert_matrix(&c[0][0], 1, 6, 1, 5);
  simplx(a, 4, 4, 2, 1, 1, &icase, izrov, iposv);
  if (icase == 1)
    printf("\nunbounded objective function\n");
  else if (icase == -1)
    printf("\nno solutions satisfy constraints given\n");
  else {
    printf("\n%11s", " ");
    for (i = 1; i <= 4; i++)
      if (izrov[i] <= (4 + 2 + 1))
        printf("%10s", txt[izrov[i]]);
    printf("\n");
    for (i = 1; i <= 4 + 1; i++) {
      if (i == 1 || iposv[i - 1] <= (4 + 2 + 1)) {
        if (i > 1)
          printf("%s", txt[iposv[i - 1]]);
        else
          printf("  ");
        printf("%10.2f", a[i][1]);
        for (j = 2; j <= 4 + 1; j++)
          if (izrov[j - 1] <= (4 + 2 + 1))
            printf("%10.2f", a[i][j]);
        printf("\n");
      }
    }
  }
  free_convert_matrix(a, 1, 6, 1, 5);
  free_ivector(iposv, 1, 4);
  free_ivector(izrov, 1, 4);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x4,%esi
call   1070 <ivector@plt>
mov    %rax,-0x18(%rbp)
mov    $0x1,%edi
mov    $0x4,%esi
call   1070 <ivector@plt>
mov    %rax,-0x20(%rbp)
lea    0x2ec4(%rip),%rdi
mov    $0x1,%ecx
mov    $0x6,%edx
mov    $0x5,%r8d
mov    %ecx,%esi
call   1080 <convert_matrix@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x18(%rbp),%r10
mov    -0x20(%rbp),%rax
mov    $0x4,%edx
mov    $0x2,%ecx
mov    $0x1,%r9d
lea    -0xc(%rbp),%r11
mov    %edx,%esi
mov    %r9d,%r8d
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1050 <simplx@plt>
cmpl   $0x1,-0xc(%rbp)
jne    120c <main+0xac>
lea    0xe15(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13d0 <main+0x270>
cmpl   $0xffffffff,-0xc(%rbp)
jne    1229 <main+0xc9>
lea    0xe17(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13cb <main+0x26b>
lea    0xe2d(%rip),%rdi
lea    0xe35(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jg     1299 <main+0x139>
mov    -0x18(%rbp),%rax
movslq -0x8(%rbp),%rcx
cmpl   $0x7,(%rax,%rcx,4)
jg     1286 <main+0x126>
mov    -0x18(%rbp),%rax
movslq -0x8(%rbp),%rcx
movslq (%rax,%rcx,4),%rcx
lea    0x2e6c(%rip),%rax
mov    (%rax,%rcx,8),%rsi
lea    0xde4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    128b <main+0x12b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1245 <main+0xe5>
lea    0xdbb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jg     13c6 <main+0x266>
cmpl   $0x1,-0x8(%rbp)
je     12d9 <main+0x179>
mov    -0x20(%rbp),%rax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
cmpl   $0x7,(%rax,%rcx,4)
jg     13b3 <main+0x253>
cmpl   $0x1,-0x8(%rbp)
jle    1312 <main+0x1b2>
mov    -0x20(%rbp),%rax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movslq (%rax,%rcx,4),%rcx
lea    0x2de5(%rip),%rax
mov    (%rax,%rcx,8),%rsi
lea    0xd62(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1320 <main+0x1c0>
lea    0xd52(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x28(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movss  0x4(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd32(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movl   $0x2,-0x10(%rbp)
cmpl   $0x5,-0x10(%rbp)
jg     13a5 <main+0x245>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
cmpl   $0x7,(%rax,%rcx,4)
jg     1392 <main+0x232>
mov    -0x28(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x10(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xce3(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    1397 <main+0x237>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    134a <main+0x1ea>
lea    0xcaf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13b8 <main+0x258>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12ae <main+0x14e>
jmp    13cb <main+0x26b>
jmp    13d0 <main+0x270>
mov    -0x28(%rbp),%rdi
mov    $0x1,%ecx
mov    $0x6,%edx
mov    $0x5,%r8d
mov    %ecx,%esi
call   1030 <free_convert_matrix@plt>
mov    -0x20(%rbp),%rdi
mov    $0x1,%esi
mov    $0x4,%edx
call   1060 <free_ivector@plt>
mov    -0x18(%rbp),%rdi
mov    $0x1,%esi
mov    $0x4,%edx
call   1060 <free_ivector@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0x1,%edi
mov    $0x4,%esi
call   1090 <ivector@plt>
mov    %rax,%rbx
mov    $0x1,%edi
mov    $0x4,%esi
call   1090 <ivector@plt>
mov    %rax,%r14
lea    0x2eba(%rip),%rdi
mov    $0x1,%esi
mov    $0x6,%edx
mov    $0x1,%ecx
mov    $0x5,%r8d
call   10a0 <convert_matrix@plt>
mov    %rax,%r15
sub    $0x8,%rsp
lea    0xc(%rsp),%rax
mov    %r15,%rdi
mov    $0x4,%esi
mov    $0x4,%edx
mov    $0x2,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
push   %r14
push   %rbx
push   %rax
call   1070 <simplx@plt>
add    $0x20,%rsp
mov    0x4(%rsp),%eax
cmp    $0x1,%eax
je     121e <main+0x9e>
cmp    $0xffffffff,%eax
jne    127c <main+0xfc>
lea    0xe11(%rip),%rdi
jmp    1225 <main+0xa5>
lea    0xe30(%rip),%rdi
call   1050 <puts@plt>
mov    %r15,%rdi
mov    $0x1,%esi
mov    $0x6,%edx
mov    $0x1,%ecx
mov    $0x5,%r8d
call   1040 <free_convert_matrix@plt>
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x4,%edx
call   1080 <free_ivector@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x4,%edx
call   1080 <free_ivector@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xd92(%rip),%rdi
lea    0xd9a(%rip),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
movslq 0x4(%rbx),%rax
cmp    $0x7,%rax
jg     12b4 <main+0x134>
lea    0x2b3e(%rip),%rcx
mov    (%rcx,%rax,8),%rsi
lea    0xd6e(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movslq 0x8(%rbx),%rax
cmp    $0x7,%rax
jg     12d7 <main+0x157>
lea    0x2b1b(%rip),%rcx
mov    (%rcx,%rax,8),%rsi
lea    0xd4b(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movslq 0xc(%rbx),%rax
cmp    $0x7,%rax
jg     12fa <main+0x17a>
lea    0x2af8(%rip),%rcx
mov    (%rcx,%rax,8),%rsi
lea    0xd28(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movslq 0x10(%rbx),%rax
cmp    $0x7,%rax
jg     131d <main+0x19d>
lea    0x2ad5(%rip),%rcx
mov    (%rcx,%rax,8),%rsi
lea    0xd05(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xcf5(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x8(%r15),%rax
movss  0x4(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xcdd(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
cmpl   $0x7,0x4(%rbx)
jg     13a0 <main+0x220>
mov    0x8(%r15),%rax
movss  0x8(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xcbc(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
cmpl   $0x7,0x8(%rbx)
jle    13a6 <main+0x226>
cmpl   $0x7,0xc(%rbx)
jg     13c7 <main+0x247>
mov    0x8(%r15),%rax
movss  0x10(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xc95(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
cmpl   $0x7,0x10(%rbx)
jle    13cd <main+0x24d>
jmp    13e8 <main+0x268>
cmpl   $0x7,0x8(%rbx)
jg     1377 <main+0x1f7>
mov    0x8(%r15),%rax
movss  0xc(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xc6c(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
cmpl   $0x7,0xc(%rbx)
jle    137d <main+0x1fd>
cmpl   $0x7,0x10(%rbx)
jg     13e8 <main+0x268>
mov    0x8(%r15),%rax
movss  0x14(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xc45(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xc27(%rip),%r12
lea    0xc26(%rip),%r13
xor    %ebp,%ebp
jmp    1428 <main+0x2a8>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbp
cmp    $0x4,%rbp
je     122a <main+0xaa>
movslq 0x4(%r14,%rbp,4),%rax
cmp    $0x7,%rax
jg     141a <main+0x29a>
lea    0x29a6(%rip),%rcx
mov    (%rcx,%rax,8),%rsi
mov    %r12,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x10(%r15,%rbp,8),%rax
movss  0x4(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
cmpl   $0x7,0x4(%rbx)
jg     14b0 <main+0x330>
mov    0x10(%r15,%rbp,8),%rax
movss  0x8(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
cmpl   $0x7,0x8(%rbx)
jle    14b6 <main+0x336>
cmpl   $0x7,0xc(%rbx)
jg     14d4 <main+0x354>
mov    0x10(%r15,%rbp,8),%rax
movss  0x10(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
cmpl   $0x7,0x10(%rbx)
jg     1410 <main+0x290>
jmp    14de <main+0x35e>
xchg   %ax,%ax
cmpl   $0x7,0x8(%rbx)
jg     1484 <main+0x304>
mov    0x10(%r15,%rbp,8),%rax
movss  0xc(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
cmpl   $0x7,0xc(%rbx)
jle    148a <main+0x30a>
cmpl   $0x7,0x10(%rbx)
jg     1410 <main+0x290>
mov    0x10(%r15,%rbp,8),%rax
movss  0x14(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
jmp    1410 <main+0x290>

LLVM IR (-O0):
@main.c = internal global [6 x [5 x float]] [[5 x float] [float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float 3.000000e+00, float -5.000000e-01], [5 x float] [float 7.400000e+02, float -1.000000e+00, float 0.000000e+00, float -2.000000e+00, float 0.000000e+00], [5 x float] [float 0.000000e+00, float 0.000000e+00, float -2.000000e+00, float 0.000000e+00, float 7.000000e+00], [5 x float] [float 5.000000e-01, float 0.000000e+00, float -1.000000e+00, float 1.000000e+00, float -2.000000e+00], [5 x float] [float 9.000000e+00, float -1.000000e+00, float -1.000000e+00, float -1.000000e+00, float -1.000000e+00], [5 x float] zeroinitializer]
@main.txt = internal global [8 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i32 0, i32 0)]
@.str = [2 x i8] c" \00"
@.str.1 = [3 x i8] c"x1\00"
@.str.2 = [3 x i8] c"x2\00"
@.str.3 = [3 x i8] c"x3\00"
@.str.4 = [3 x i8] c"x4\00"
@.str.5 = [3 x i8] c"y1\00"
@.str.6 = [3 x i8] c"y2\00"
@.str.7 = [3 x i8] c"y3\00"
@.str.8 = [31 x i8] c"\0Aunbounded objective function\0A\00"
@.str.9 = [41 x i8] c"\0Ano solutions satisfy constraints given\0A\00"
@.str.10 = [6 x i8] c"\0A%11s\00"
@.str.11 = [5 x i8] c"%10s\00"
@.str.12 = [2 x i8] c"\0A\00"
@.str.13 = [3 x i8] c"%s\00"
@.str.14 = [3 x i8] c" \00"
@.str.15 = [7 x i8] c"%10.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca float**
store i32 0, i32* %1
%8 = call i32* @ivector(i32 1, i32 4)
store i32* %8, i32** %5
%9 = call i32* @ivector(i32 1, i32 4)
store i32* %9, i32** %6
%10 = call float** @convert_matrix(float* getelementptr inbounds ([6 x [5 x float]], [6 x [5 x float]]* @main.c, i64 0, i64 0, i64 0), i32 1, i32 6, i32 1, i32 5)
store float** %10, float*** %7
%11 = load float**, float*** %7
%12 = load i32*, i32** %5
%13 = load i32*, i32** %6
%14 = call i32 @simplx(float** %11, i32 4, i32 4, i32 2, i32 1, i32 1, i32* %3, i32* %12, i32* %13)
%15 = load i32, i32* %3
%16 = icmp eq i32 %15, 1
br i1 %16, label %17, label %19
17: ; preds = %0
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0))
br label %127
19: ; preds = %0
%20 = load i32, i32* %3
%21 = icmp eq i32 %20, -1
br i1 %21, label %22, label %24
22: ; preds = %19
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.9, i64 0, i64 0))
br label %126
24: ; preds = %19
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %2
br label %26
26: ; preds = %47, %24
%27 = load i32, i32* %2
%28 = icmp sle i32 %27, 4
br i1 %28, label %29, label %50
29: ; preds = %26
%30 = load i32*, i32** %5
%31 = load i32, i32* %2
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i32, i32* %30, i64 %32
%34 = load i32, i32* %33
%35 = icmp sle i32 %34, 7
br i1 %35, label %36, label %46
36: ; preds = %29
%37 = load i32*, i32** %5
%38 = load i32, i32* %2
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds i32, i32* %37, i64 %39
%41 = load i32, i32* %40
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [8 x i8*], [8 x i8*]* @main.txt, i64 0, i64 %42
%44 = load i8*, i8** %43
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i8* %44)
br label %46
46: ; preds = %36, %29
br label %47
47: ; preds = %46
%48 = load i32, i32* %2
%49 = add nsw i32 %48, 1
store i32 %49, i32* %2
br label %26
50: ; preds = %26
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
store i32 1, i32* %2
br label %52
52: ; preds = %122, %50
%53 = load i32, i32* %2
%54 = icmp sle i32 %53, 5
br i1 %54, label %55, label %125
55: ; preds = %52
%56 = load i32, i32* %2
%57 = icmp eq i32 %56, 1
br i1 %57, label %66, label %58
58: ; preds = %55
%59 = load i32*, i32** %6
%60 = load i32, i32* %2
%61 = sub nsw i32 %60, 1
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds i32, i32* %59, i64 %62
%64 = load i32, i32* %63
%65 = icmp sle i32 %64, 7
br i1 %65, label %66, label %121
66: ; preds = %58, %55
%67 = load i32, i32* %2
%68 = icmp sgt i32 %67, 1
br i1 %68, label %69, label %80
69: ; preds = %66
%70 = load i32*, i32** %6
%71 = load i32, i32* %2
%72 = sub nsw i32 %71, 1
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds i32, i32* %70, i64 %73
%75 = load i32, i32* %74
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds [8 x i8*], [8 x i8*]* @main.txt, i64 0, i64 %76
%78 = load i8*, i8** %77
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i8* %78)
br label %82
80: ; preds = %66
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0))
br label %82
82: ; preds = %80, %69
%83 = load float**, float*** %7
%84 = load i32, i32* %2
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds float*, float** %83, i64 %85
%87 = load float*, float** %86
%88 = getelementptr inbounds float, float* %87, i64 1
%89 = load float, float* %88
%90 = fpext float %89 to double
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0), double %90)
store i32 2, i32* %4
br label %92
92: ; preds = %116, %82
%93 = load i32, i32* %4
%94 = icmp sle i32 %93, 5
br i1 %94, label %95, label %119
95: ; preds = %92
%96 = load i32*, i32** %5
%97 = load i32, i32* %4
%98 = sub nsw i32 %97, 1
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds i32, i32* %96, i64 %99
%101 = load i32, i32* %100
%102 = icmp sle i32 %101, 7
br i1 %102, label %103, label %115
103: ; preds = %95
%104 = load float**, float*** %7
%105 = load i32, i32* %2
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds float*, float** %104, i64 %106
%108 = load float*, float** %107
%109 = load i32, i32* %4
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds float, float* %108, i64 %110
%112 = load float, float* %111
%113 = fpext float %112 to double
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0), double %113)
br label %115
115: ; preds = %103, %95
br label %116
116: ; preds = %115
%117 = load i32, i32* %4
%118 = add nsw i32 %117, 1
store i32 %118, i32* %4
br label %92
119: ; preds = %92
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
br label %121
121: ; preds = %119, %58
br label %122
122: ; preds = %121
%123 = load i32, i32* %2
%124 = add nsw i32 %123, 1
store i32 %124, i32* %2
br label %52
125: ; preds = %52
br label %126
126: ; preds = %125, %22
br label %127
127: ; preds = %126, %17
%128 = load float**, float*** %7
%129 = call i32 @free_convert_matrix(float** %128, i32 1, i32 6, i32 1, i32 5)
%130 = load i32*, i32** %6
%131 = call i32 @free_ivector(i32* %130, i32 1, i32 4)
%132 = load i32*, i32** %5
%133 = call i32 @free_ivector(i32* %132, i32 1, i32 4)
ret i32 0
}

LLVM IR (-O2):
@main.c = internal global [6 x [5 x float]] [[5 x float] [float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float 3.000000e+00, float -5.000000e-01], [5 x float] [float 7.400000e+02, float -1.000000e+00, float 0.000000e+00, float -2.000000e+00, float 0.000000e+00], [5 x float] [float 0.000000e+00, float 0.000000e+00, float -2.000000e+00, float 0.000000e+00, float 7.000000e+00], [5 x float] [float 5.000000e-01, float 0.000000e+00, float -1.000000e+00, float 1.000000e+00, float -2.000000e+00], [5 x float] [float 9.000000e+00, float -1.000000e+00, float -1.000000e+00, float -1.000000e+00, float -1.000000e+00], [5 x float] zeroinitializer]
@main.txt = internal unnamed_addr constant [8 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i32 0, i32 0)]
@.str = [2 x i8] c" \00"
@.str.1 = [3 x i8] c"x1\00"
@.str.2 = [3 x i8] c"x2\00"
@.str.3 = [3 x i8] c"x3\00"
@.str.4 = [3 x i8] c"x4\00"
@.str.5 = [3 x i8] c"y1\00"
@.str.6 = [3 x i8] c"y2\00"
@.str.7 = [3 x i8] c"y3\00"
@.str.10 = [6 x i8] c"\0A%11s\00"
@.str.11 = [5 x i8] c"%10s\00"
@.str.13 = [3 x i8] c"%s\00"
@.str.14 = [3 x i8] c" \00"
@.str.15 = [7 x i8] c"%10.2f\00"
@str = [40 x i8] c"\0Ano solutions satisfy constraints given\00"
@str.16 = [30 x i8] c"\0Aunbounded objective function\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32* @ivector(i32 1, i32 4)
%4 = tail call i32* @ivector(i32 1, i32 4)
%5 = tail call float** @convert_matrix(float* getelementptr inbounds ([6 x [5 x float]], [6 x [5 x float]]* @main.c, i64 0, i64 0, i64 0), i32 1, i32 6, i32 1, i32 5)
%6 = call i32 @simplx(float** %5, i32 4, i32 4, i32 2, i32 1, i32 1, i32* %1, i32* %3, i32* %4)
%7 = load i32, i32* %1
switch i32 %7, label %9 [
i32 1, label %151
i32 -1, label %8
]
8: ; preds = %0
br label %151
9: ; preds = %0
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%11 = getelementptr inbounds i32, i32* %3, i64 1
%12 = load i32, i32* %11
%13 = icmp slt i32 %12, 8
br i1 %13, label %14, label %19
14: ; preds = %9
%15 = sext i32 %12 to i64
%16 = getelementptr inbounds [8 x i8*], [8 x i8*]* @main.txt, i64 0, i64 %15
%17 = load i8*, i8** %16
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i8* %17)
br label %19
19: ; preds = %9, %14
%20 = getelementptr inbounds i32, i32* %3, i64 2
%21 = load i32, i32* %20
%22 = icmp slt i32 %21, 8
br i1 %22, label %23, label %28
23: ; preds = %19
%24 = sext i32 %21 to i64
%25 = getelementptr inbounds [8 x i8*], [8 x i8*]* @main.txt, i64 0, i64 %24
%26 = load i8*, i8** %25
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i8* %26)
br label %28
28: ; preds = %23, %19
%29 = getelementptr inbounds i32, i32* %3, i64 3
%30 = load i32, i32* %29
%31 = icmp slt i32 %30, 8
br i1 %31, label %32, label %37
32: ; preds = %28
%33 = sext i32 %30 to i64
%34 = getelementptr inbounds [8 x i8*], [8 x i8*]* @main.txt, i64 0, i64 %33
%35 = load i8*, i8** %34
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i8* %35)
br label %37
37: ; preds = %32, %28
%38 = getelementptr inbounds i32, i32* %3, i64 4
%39 = load i32, i32* %38
%40 = icmp slt i32 %39, 8
br i1 %40, label %41, label %46
41: ; preds = %37
%42 = sext i32 %39 to i64
%43 = getelementptr inbounds [8 x i8*], [8 x i8*]* @main.txt, i64 0, i64 %42
%44 = load i8*, i8** %43
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i8* %44)
br label %46
46: ; preds = %41, %37
%47 = call i32 @putchar(i32 10)
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0))
%49 = getelementptr inbounds float*, float** %5, i64 1
%50 = load float*, float** %49
%51 = getelementptr inbounds float, float* %50, i64 1
%52 = load float, float* %51
%53 = fpext float %52 to double
%54 = getelementptr inbounds float*, float** %5, i64 1
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0), double %53)
%56 = load i32, i32* %11
%57 = icmp slt i32 %56, 8
br i1 %57, label %58, label %64
58: ; preds = %46
%59 = load float*, float** %54
%60 = getelementptr inbounds float, float* %59, i64 2
%61 = load float, float* %60
%62 = fpext float %61 to double
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0), double %62)
br label %64
64: ; preds = %58, %46
%65 = load i32, i32* %20
%66 = icmp slt i32 %65, 8
br i1 %66, label %67, label %73
67: ; preds = %64
%68 = load float*, float** %54
%69 = getelementptr inbounds float, float* %68, i64 3
%70 = load float, float* %69
%71 = fpext float %70 to double
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0), double %71)
br label %73
73: ; preds = %67, %64
%74 = load i32, i32* %29
%75 = icmp slt i32 %74, 8
br i1 %75, label %76, label %82
76: ; preds = %73
%77 = load float*, float** %54
%78 = getelementptr inbounds float, float* %77, i64 4
%79 = load float, float* %78
%80 = fpext float %79 to double
%81 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0), double %80)
br label %82
82: ; preds = %76, %73
%83 = load i32, i32* %38
%84 = icmp slt i32 %83, 8
br i1 %84, label %85, label %91
85: ; preds = %82
%86 = load float*, float** %54
%87 = getelementptr inbounds float, float* %86, i64 5
%88 = load float, float* %87
%89 = fpext float %88 to double
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0), double %89)
br label %91
91: ; preds = %85, %82
%92 = call i32 @putchar(i32 10)
br label %93
93: ; preds = %148, %91
%94 = phi i64 [ 2, %91 ], [ %149, %148 ]
%95 = add nsw i64 %94, -1
%96 = getelementptr inbounds i32, i32* %4, i64 %95
%97 = load i32, i32* %96
%98 = icmp slt i32 %97, 8
br i1 %98, label %99, label %148
99: ; preds = %93
%100 = sext i32 %97 to i64
%101 = getelementptr inbounds [8 x i8*], [8 x i8*]* @main.txt, i64 0, i64 %100
%102 = load i8*, i8** %101
%103 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i8* %102)
%104 = getelementptr inbounds float*, float** %5, i64 %94
%105 = load float*, float** %104
%106 = getelementptr inbounds float, float* %105, i64 1
%107 = load float, float* %106
%108 = getelementptr inbounds float*, float** %5, i64 %94
%109 = fpext float %107 to double
%110 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0), double %109)
%111 = load i32, i32* %11
%112 = icmp slt i32 %111, 8
br i1 %112, label %113, label %119
113: ; preds = %99
%114 = load float*, float** %108
%115 = getelementptr inbounds float, float* %114, i64 2
%116 = load float, float* %115
%117 = fpext float %116 to double
%118 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0), double %117)
br label %119
119: ; preds = %99, %113
%120 = load i32, i32* %20
%121 = icmp slt i32 %120, 8
br i1 %121, label %122, label %128
122: ; preds = %119
%123 = load float*, float** %108
%124 = getelementptr inbounds float, float* %123, i64 3
%125 = load float, float* %124
%126 = fpext float %125 to double
%127 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0), double %126)
br label %128
128: ; preds = %122, %119
%129 = load i32, i32* %29
%130 = icmp slt i32 %129, 8
br i1 %130, label %131, label %137
131: ; preds = %128
%132 = load float*, float** %108
%133 = getelementptr inbounds float, float* %132, i64 4
%134 = load float, float* %133
%135 = fpext float %134 to double
%136 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0), double %135)
br label %137
137: ; preds = %131, %128
%138 = load i32, i32* %38
%139 = icmp slt i32 %138, 8
br i1 %139, label %140, label %146
140: ; preds = %137
%141 = load float*, float** %108
%142 = getelementptr inbounds float, float* %141, i64 5
%143 = load float, float* %142
%144 = fpext float %143 to double
%145 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0), double %144)
br label %146
146: ; preds = %140, %137
%147 = call i32 @putchar(i32 10)
br label %148
148: ; preds = %93, %146
%149 = add nuw nsw i64 %94, 1
%150 = icmp eq i64 %149, 6
br i1 %150, label %154, label %93
151: ; preds = %0, %8
%152 = phi i8* [ getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0), %8 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @str.16, i64 0, i64 0), %0 ]
%153 = call i32 @puts(i8* dereferenceable(1) %152)
br label %154
154: ; preds = %148, %151
%155 = call i32 @free_convert_matrix(float** %5, i32 1, i32 6, i32 1, i32 5)
%156 = call i32 @free_ivector(i32* %4, i32 1, i32 4)
%157 = call i32 @free_ivector(i32* %3, i32 1, i32 4)
ret i32 0
}