#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 */
scalar_t__ feasible_p(unsigned int, unsigned int, float *, float **);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ solution(unsigned int, unsigned int, float *, float **);
void print_tableaux(unsigned int D, unsigned int N, float A[D + 1][N + 1]) {
  float x[N];
  solution(D, N, x, A);
  float y[D];
  for (unsigned int j = 0; j < D; j++) {
    y[j] = 0.;
    for (unsigned int i = 0; i < N; i++)
      y[j] += A[1 + j][i] * x[i];
  }
  printf("           ");
  for (unsigned int i = 0; i < N; i++)
    printf("x%d    ", i);
  printf("\nSolution: ");
  for (unsigned int i = 0; i < N; i++)
    printf(" %0.2f ", x[i]);
  printf("(%s)\n", (feasible_p(D, N, x, A)) ? "feasible" : "infeasible");
  printf("      Max ");
  for (unsigned int i = 0; i < N; i++)
    printf("%+0.2f ", A[0][i]);
  printf("  %+0.2f s.t.:\n", A[0][N]);
  for (unsigned int j = 0; j < D; j++) {
    printf("          ");
    for (unsigned int i = 0; i < N; i++)
      printf("%+0.2f ", A[1 + j][i]);
    printf("= %+0.2f | %+0.2f\n", A[1 + j][N], y[j]);
  }
  printf("Objective: %0.2f\n", A[0][N]);
}


x86 assembly (clang, -O0):
<print_tableaux>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %rcx,-0x60(%rbp)
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdx
sub    %rcx,%rdx
mov    %rdx,-0x58(%rbp)
mov    %rdx,%rsp
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rcx
call   1030 <solution@plt>
mov    -0x4(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x50(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    123f <print_tableaux+0x10f>
mov    -0x50(%rbp),%rax
mov    -0x2c(%rbp),%ecx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    122c <print_tableaux+0xfc>
mov    -0x50(%rbp),%rax
mov    -0x58(%rbp),%rcx
mov    -0x60(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x2c(%rbp),%esi
add    $0x1,%esi
mov    %esi,%esi
imul   %rdi,%rsi
shl    $0x2,%rsi
add    %rsi,%rdx
mov    -0x30(%rbp),%esi
movss  (%rdx,%rsi,4),%xmm0
mov    -0x30(%rbp),%edx
movss  (%rcx,%rdx,4),%xmm2
mov    -0x2c(%rbp),%ecx
movss  (%rax,%rcx,4),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11ca <print_tableaux+0x9a>
jmp    1231 <print_tableaux+0x101>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11a8 <print_tableaux+0x78>
lea    0xdba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    127f <print_tableaux+0x14f>
mov    -0x34(%rbp),%esi
lea    0xda2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1254 <print_tableaux+0x124>
lea    0xd8e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    12cc <print_tableaux+0x19c>
mov    -0x58(%rbp),%rax
mov    -0x38(%rbp),%ecx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd69(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1294 <print_tableaux+0x164>
mov    -0x58(%rbp),%rdx
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rcx
call   1050 <feasible_p@plt>
mov    %rax,%rcx
lea    0xd45(%rip),%rsi
lea    0xd40(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rsi
lea    0xd29(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd2c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    1362 <print_tableaux+0x232>
mov    -0x60(%rbp),%rcx
mov    -0x10(%rbp),%rax
imul   $0x0,%rcx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    -0x3c(%rbp),%ecx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xcf7(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    131b <print_tableaux+0x1eb>
mov    -0x60(%rbp),%rcx
mov    -0x10(%rbp),%rax
imul   $0x0,%rcx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    -0x8(%rbp),%ecx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xcc4(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    1459 <print_tableaux+0x329>
lea    0xc58(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    1406 <print_tableaux+0x2d6>
mov    -0x60(%rbp),%rdx
mov    -0x10(%rbp),%rax
mov    -0x40(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,%ecx
imul   %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    -0x44(%rbp),%ecx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xc53(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    13b7 <print_tableaux+0x287>
mov    -0x50(%rbp),%rax
mov    -0x60(%rbp),%rsi
mov    -0x10(%rbp),%rcx
mov    -0x40(%rbp),%edx
add    $0x1,%edx
mov    %edx,%edx
imul   %rsi,%rdx
shl    $0x2,%rdx
add    %rdx,%rcx
mov    -0x8(%rbp),%edx
movss  (%rcx,%rdx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x40(%rbp),%ecx
movss  (%rax,%rcx,4),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xc18(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1396 <print_tableaux+0x266>
mov    -0x60(%rbp),%rcx
mov    -0x10(%rbp),%rax
imul   $0x0,%rcx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    -0x8(%rbp),%ecx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xbf0(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_tableaux>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rdx,%r12
mov    %esi,%r13d
mov    %edi,%r14d
lea    0x1(%r13),%eax
mov    %rax,-0x40(%rbp)
mov    %esi,%eax
mov    %rsp,%rbx
mov    %rax,-0x30(%rbp)
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdx
mov    %r12,%rcx
call   1030 <solution@plt>
mov    %r14d,%eax
mov    %rsp,%rcx
mov    %rax,-0x60(%rbp)
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,-0x48(%rbp)
mov    %rcx,%rsp
mov    %r14d,-0x38(%rbp)
test   %r14d,%r14d
je     129c <print_tableaux+0x16c>
mov    -0x30(%rbp),%r15
lea    -0x1(%r15),%r8
mov    %r15d,%ecx
and    $0x3,%ecx
and    $0xfffffffc,%r15d
mov    -0x40(%rbp),%rax
lea    (%r12,%rax,4),%rsi
add    $0xc,%rsi
lea    0x0(,%rax,4),%r9
lea    (%r12,%rax,4),%r14
xor    %r11d,%r11d
jmp    11fd <print_tableaux+0xcd>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    -0x48(%rbp),%rax
movss  %xmm0,(%rax,%r11,4)
add    %r9,%rsi
add    %r9,%r14
mov    %r10,%r11
cmp    -0x60(%rbp),%r10
je     129c <print_tableaux+0x16c>
lea    0x1(%r11),%r10
mov    -0x48(%rbp),%rax
movl   $0x0,(%rax,%r11,4)
test   %r13d,%r13d
je     11ea <print_tableaux+0xba>
xorps  %xmm0,%xmm0
xor    %edi,%edi
cmp    $0x3,%r8
jb     1267 <print_tableaux+0x137>
nopl   (%rax)
movss  -0xc(%rsi,%rdi,4),%xmm1
movss  -0x8(%rsi,%rdi,4),%xmm2
mulss  (%rbx,%rdi,4),%xmm1
mulss  0x4(%rbx,%rdi,4),%xmm2
addss  %xmm0,%xmm1
movss  -0x4(%rsi,%rdi,4),%xmm3
mulss  0x8(%rbx,%rdi,4),%xmm3
addss  %xmm1,%xmm2
movss  (%rsi,%rdi,4),%xmm0
mulss  0xc(%rbx,%rdi,4),%xmm0
addss  %xmm2,%xmm3
addss  %xmm3,%xmm0
add    $0x4,%rdi
cmp    %rdi,%r15
jne    1220 <print_tableaux+0xf0>
test   %rcx,%rcx
je     11e0 <print_tableaux+0xb0>
lea    (%rbx,%rdi,4),%rax
lea    (%r14,%rdi,4),%rdi
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
movss  (%rdi,%rdx,4),%xmm1
mulss  (%rax,%rdx,4),%xmm1
addss  %xmm1,%xmm0
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    1280 <print_tableaux+0x150>
jmp    11e0 <print_tableaux+0xb0>
lea    0xd5d(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   %r13d,%r13d
mov    %r13,-0x58(%rbp)
je     131f <print_tableaux+0x1ef>
mov    %r13,%r14
lea    0xd4f(%rip),%r13
xor    %r15d,%r15d
mov    %r13,%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r15d
cmp    %r15d,%r14d
jne    12c0 <print_tableaux+0x190>
lea    0xd37(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   %r14d,%r14d
je     13af <print_tableaux+0x27f>
xor    %r14d,%r14d
lea    0xd29(%rip),%r13
mov    -0x30(%rbp),%r15
nopl   0x0(%rax,%rax,1)
movss  (%rbx,%r14,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x1,%r14
cmp    %r14,%r15
jne    1300 <print_tableaux+0x1d0>
jmp    1331 <print_tableaux+0x201>
lea    0xcee(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x30(%rbp),%r15
mov    -0x38(%rbp),%r13d
mov    %r13d,%edi
mov    -0x58(%rbp),%r14
mov    %r14d,%esi
mov    %rbx,%rdx
mov    %r12,%rcx
call   1050 <feasible_p@plt>
test   %rax,%rax
lea    0xcda(%rip),%rax
lea    0xcd5(%rip),%rsi
cmove  %rax,%rsi
lea    0xcc2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xcc5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   %r14d,%r14d
je     13f9 <print_tableaux+0x2c9>
xor    %ebx,%ebx
lea    0xcbb(%rip),%r14
nopl   0x0(%rax)
movss  (%r12,%rbx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1390 <print_tableaux+0x260>
jmp    13f9 <print_tableaux+0x2c9>
mov    %r14,%rsi
mov    -0x38(%rbp),%r13d
mov    %r13d,%edi
mov    %rbx,%rdx
mov    %r12,%rcx
call   1050 <feasible_p@plt>
test   %rax,%rax
lea    0xc60(%rip),%rax
lea    0xc5b(%rip),%rsi
cmove  %rax,%rsi
lea    0xc48(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xc4b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x30(%rbp),%r15
mov    %r12,-0x50(%rbp)
movss  (%r12,%r15,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xc3e(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
test   %r13d,%r13d
je     14f3 <print_tableaux+0x3c3>
mov    -0x50(%rbp),%rax
mov    -0x30(%rbp),%rcx
lea    (%rax,%rcx,4),%rcx
mov    %rcx,-0x70(%rbp)
mov    -0x40(%rbp),%rcx
lea    (%rax,%rcx,4),%r13
lea    0x0(,%rcx,4),%rax
mov    %rax,-0x68(%rbp)
lea    0xbfb(%rip),%r12
xor    %ebx,%ebx
mov    -0x30(%rbp),%r15
jmp    149d <print_tableaux+0x36d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    -0x70(%rbp),%rax
movss  (%rax,%rbx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x48(%rbp),%rax
mov    -0x38(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xbd7(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
add    -0x68(%rbp),%r13
mov    -0x78(%rbp),%rax
mov    %rax,%rbx
cmp    -0x60(%rbp),%rax
je     14f3 <print_tableaux+0x3c3>
lea    0xb5d(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rax
mov    %rbx,-0x38(%rbp)
add    $0x1,%rbx
mov    %rbx,-0x78(%rbp)
imul   -0x40(%rbp),%rbx
cmpl   $0x0,-0x58(%rbp)
je     1460 <print_tableaux+0x330>
xor    %r14d,%r14d
nopl   0x0(%rax,%rax,1)
movss  0x0(%r13,%r14,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r12,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x1,%r14
cmp    %r14,%r15
jne    14d0 <print_tableaux+0x3a0>
jmp    1460 <print_tableaux+0x330>
mov    -0x50(%rbp),%rax
mov    -0x30(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xb64(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [12 x i8] c" \00"
@.str.1 = [8 x i8] c"x%d \00"
@.str.2 = [12 x i8] c"\0ASolution: \00"
@.str.3 = [8 x i8] c" %0.2f \00"
@.str.4 = [6 x i8] c"(%s)\0A\00"
@.str.5 = [9 x i8] c"feasible\00"
@.str.6 = [11 x i8] c"infeasible\00"
@.str.7 = [11 x i8] c" Max \00"
@.str.8 = [8 x i8] c"%+0.2f \00"
@.str.9 = [16 x i8] c" %+0.2f s.t.:\0A\00"
@.str.10 = [11 x i8] c" \00"
@.str.11 = [19 x i8] c"= %+0.2f | %+0.2f\0A\00"
@.str.12 = [18 x i8] c"Objective: %0.2f\0A\00"
define void @print_tableaux(i32 %0, i32 %1, float* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca float*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store float* %2, float** %6
%17 = load i32, i32* %4
%18 = add i32 %17, 1
%19 = zext i32 %18 to i64
%20 = load i32, i32* %5
%21 = add i32 %20, 1
%22 = zext i32 %21 to i64
%23 = load i32, i32* %5
%24 = zext i32 %23 to i64
%25 = call i8* @llvm.stacksave()
store i8* %25, i8** %7
%26 = alloca float, i64 %24
store i64 %24, i64* %8
%27 = load i32, i32* %4
%28 = load i32, i32* %5
%29 = load float*, float** %6
%30 = bitcast float* %29 to float**
%31 = call i32 @solution(i32 %27, i32 %28, float* %26, float** %30)
%32 = load i32, i32* %4
%33 = zext i32 %32 to i64
%34 = alloca float, i64 %33
store i64 %33, i64* %9
store i32 0, i32* %10
br label %35
35: ; preds = %71, %3
%36 = load i32, i32* %10
%37 = load i32, i32* %4
%38 = icmp ult i32 %36, %37
br i1 %38, label %39, label %74
39: ; preds = %35
%40 = load i32, i32* %10
%41 = zext i32 %40 to i64
%42 = getelementptr inbounds float, float* %34, i64 %41
store float 0.000000e+00, float* %42
store i32 0, i32* %11
br label %43
43: ; preds = %67, %39
%44 = load i32, i32* %11
%45 = load i32, i32* %5
%46 = icmp ult i32 %44, %45
br i1 %46, label %47, label %70
47: ; preds = %43
%48 = load float*, float** %6
%49 = load i32, i32* %10
%50 = add i32 1, %49
%51 = zext i32 %50 to i64
%52 = mul nsw i64 %51, %22
%53 = getelementptr inbounds float, float* %48, i64 %52
%54 = load i32, i32* %11
%55 = zext i32 %54 to i64
%56 = getelementptr inbounds float, float* %53, i64 %55
%57 = load float, float* %56
%58 = load i32, i32* %11
%59 = zext i32 %58 to i64
%60 = getelementptr inbounds float, float* %26, i64 %59
%61 = load float, float* %60
%62 = load i32, i32* %10
%63 = zext i32 %62 to i64
%64 = getelementptr inbounds float, float* %34, i64 %63
%65 = load float, float* %64
%66 = call float @llvm.fmuladd.f32(float %57, float %61, float %65)
store float %66, float* %64
br label %67
67: ; preds = %47
%68 = load i32, i32* %11
%69 = add i32 %68, 1
store i32 %69, i32* %11
br label %43
70: ; preds = %43
br label %71
71: ; preds = %70
%72 = load i32, i32* %10
%73 = add i32 %72, 1
store i32 %73, i32* %10
br label %35
74: ; preds = %35
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %12
br label %76
76: ; preds = %83, %74
%77 = load i32, i32* %12
%78 = load i32, i32* %5
%79 = icmp ult i32 %77, %78
br i1 %79, label %80, label %86
80: ; preds = %76
%81 = load i32, i32* %12
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %81)
br label %83
83: ; preds = %80
%84 = load i32, i32* %12
%85 = add i32 %84, 1
store i32 %85, i32* %12
br label %76
86: ; preds = %76
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %13
br label %88
88: ; preds = %99, %86
%89 = load i32, i32* %13
%90 = load i32, i32* %5
%91 = icmp ult i32 %89, %90
br i1 %91, label %92, label %102
92: ; preds = %88
%93 = load i32, i32* %13
%94 = zext i32 %93 to i64
%95 = getelementptr inbounds float, float* %26, i64 %94
%96 = load float, float* %95
%97 = fpext float %96 to double
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double %97)
br label %99
99: ; preds = %92
%100 = load i32, i32* %13
%101 = add i32 %100, 1
store i32 %101, i32* %13
br label %88
102: ; preds = %88
%103 = load i32, i32* %4
%104 = load i32, i32* %5
%105 = load float*, float** %6
%106 = bitcast float* %105 to float**
%107 = call i64 @feasible_p(i32 %103, i32 %104, float* %26, float** %106)
%108 = icmp ne i64 %107, 0
%109 = zext i1 %108 to i64
%110 = select i1 %108, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0)
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* %110)
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0))
store i32 0, i32* %14
br label %113
113: ; preds = %127, %102
%114 = load i32, i32* %14
%115 = load i32, i32* %5
%116 = icmp ult i32 %114, %115
br i1 %116, label %117, label %130
117: ; preds = %113
%118 = load float*, float** %6
%119 = mul nsw i64 0, %22
%120 = getelementptr inbounds float, float* %118, i64 %119
%121 = load i32, i32* %14
%122 = zext i32 %121 to i64
%123 = getelementptr inbounds float, float* %120, i64 %122
%124 = load float, float* %123
%125 = fpext float %124 to double
%126 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), double %125)
br label %127
127: ; preds = %117
%128 = load i32, i32* %14
%129 = add i32 %128, 1
store i32 %129, i32* %14
br label %113
130: ; preds = %113
%131 = load float*, float** %6
%132 = mul nsw i64 0, %22
%133 = getelementptr inbounds float, float* %131, i64 %132
%134 = load i32, i32* %5
%135 = zext i32 %134 to i64
%136 = getelementptr inbounds float, float* %133, i64 %135
%137 = load float, float* %136
%138 = fpext float %137 to double
%139 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0), double %138)
store i32 0, i32* %15
br label %140
140: ; preds = %184, %130
%141 = load i32, i32* %15
%142 = load i32, i32* %4
%143 = icmp ult i32 %141, %142
br i1 %143, label %144, label %187
144: ; preds = %140
%145 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
store i32 0, i32* %16
br label %146
146: ; preds = %163, %144
%147 = load i32, i32* %16
%148 = load i32, i32* %5
%149 = icmp ult i32 %147, %148
br i1 %149, label %150, label %166
150: ; preds = %146
%151 = load float*, float** %6
%152 = load i32, i32* %15
%153 = add i32 1, %152
%154 = zext i32 %153 to i64
%155 = mul nsw i64 %154, %22
%156 = getelementptr inbounds float, float* %151, i64 %155
%157 = load i32, i32* %16
%158 = zext i32 %157 to i64
%159 = getelementptr inbounds float, float* %156, i64 %158
%160 = load float, float* %159
%161 = fpext float %160 to double
%162 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), double %161)
br label %163
163: ; preds = %150
%164 = load i32, i32* %16
%165 = add i32 %164, 1
store i32 %165, i32* %16
br label %146
166: ; preds = %146
%167 = load float*, float** %6
%168 = load i32, i32* %15
%169 = add i32 1, %168
%170 = zext i32 %169 to i64
%171 = mul nsw i64 %170, %22
%172 = getelementptr inbounds float, float* %167, i64 %171
%173 = load i32, i32* %5
%174 = zext i32 %173 to i64
%175 = getelementptr inbounds float, float* %172, i64 %174
%176 = load float, float* %175
%177 = fpext float %176 to double
%178 = load i32, i32* %15
%179 = zext i32 %178 to i64
%180 = getelementptr inbounds float, float* %34, i64 %179
%181 = load float, float* %180
%182 = fpext float %181 to double
%183 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0), double %177, double %182)
br label %184
184: ; preds = %166
%185 = load i32, i32* %15
%186 = add i32 %185, 1
store i32 %186, i32* %15
br label %140
187: ; preds = %140
%188 = load float*, float** %6
%189 = mul nsw i64 0, %22
%190 = getelementptr inbounds float, float* %188, i64 %189
%191 = load i32, i32* %5
%192 = zext i32 %191 to i64
%193 = getelementptr inbounds float, float* %190, i64 %192
%194 = load float, float* %193
%195 = fpext float %194 to double
%196 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0), double %195)
%197 = load i8*, i8** %7
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c" \00"
@.str.1 = [8 x i8] c"x%d \00"
@.str.2 = [12 x i8] c"\0ASolution: \00"
@.str.3 = [8 x i8] c" %0.2f \00"
@.str.4 = [6 x i8] c"(%s)\0A\00"
@.str.5 = [9 x i8] c"feasible\00"
@.str.6 = [11 x i8] c"infeasible\00"
@.str.7 = [11 x i8] c" Max \00"
@.str.8 = [8 x i8] c"%+0.2f \00"
@.str.9 = [16 x i8] c" %+0.2f s.t.:\0A\00"
@.str.10 = [11 x i8] c" \00"
@.str.11 = [19 x i8] c"= %+0.2f | %+0.2f\0A\00"
@.str.12 = [18 x i8] c"Objective: %0.2f\0A\00"
define void @print_tableaux(i32 %0, i32 %1, float* %2) {
%4 = add i32 %1, 1
%5 = zext i32 %4 to i64
%6 = zext i32 %1 to i64
%7 = alloca float, i64 %6
%8 = bitcast float* %2 to float**
%9 = call i32 @solution(i32 %0, i32 %1, float* %7, float** %8)
%10 = zext i32 %0 to i64
%11 = alloca float, i64 %10
%12 = icmp eq i32 %0, 0
br i1 %12, label %20, label %13
13: ; preds = %3
%14 = icmp eq i32 %1, 0
%15 = add nsw i64 %6, -1
%16 = and i64 %6, 3
%17 = icmp ult i64 %15, 3
%18 = and i64 %6, 4294967292
%19 = icmp eq i64 %16, 0
br label %25
20: ; preds = %50, %3
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%22 = icmp eq i32 %1, 0
br i1 %22, label %23, label %84
23: ; preds = %20
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
br label %89
25: ; preds = %13, %50
%26 = phi i64 [ 0, %13 ], [ %28, %50 ]
%27 = getelementptr inbounds float, float* %11, i64 %26
store float 0.000000e+00, float* %27
%28 = add nuw nsw i64 %26, 1
br i1 %14, label %50, label %29
29: ; preds = %25
%30 = mul nuw nsw i64 %28, %5
%31 = getelementptr inbounds float, float* %2, i64 %30
br i1 %17, label %32, label %52
32: ; preds = %52, %29
%33 = phi float [ undef, %29 ], [ %78, %52 ]
%34 = phi i64 [ 0, %29 ], [ %79, %52 ]
%35 = phi float [ 0.000000e+00, %29 ], [ %78, %52 ]
br i1 %19, label %48, label %36
36: ; preds = %32, %36
%37 = phi i64 [ %45, %36 ], [ %34, %32 ]
%38 = phi float [ %44, %36 ], [ %35, %32 ]
%39 = phi i64 [ %46, %36 ], [ 0, %32 ]
%40 = getelementptr inbounds float, float* %31, i64 %37
%41 = load float, float* %40
%42 = getelementptr inbounds float, float* %7, i64 %37
%43 = load float, float* %42
%44 = call float @llvm.fmuladd.f32(float %41, float %43, float %38)
%45 = add nuw nsw i64 %37, 1
%46 = add i64 %39, 1
%47 = icmp eq i64 %46, %16
br i1 %47, label %48, label %36
48: ; preds = %36, %32
%49 = phi float [ %33, %32 ], [ %44, %36 ]
store float %49, float* %27
br label %50
50: ; preds = %25, %48
%51 = icmp eq i64 %28, %10
br i1 %51, label %20, label %25
52: ; preds = %29, %52
%53 = phi i64 [ %79, %52 ], [ 0, %29 ]
%54 = phi float [ %78, %52 ], [ 0.000000e+00, %29 ]
%55 = phi i64 [ %80, %52 ], [ 0, %29 ]
%56 = getelementptr inbounds float, float* %31, i64 %53
%57 = load float, float* %56
%58 = getelementptr inbounds float, float* %7, i64 %53
%59 = load float, float* %58
%60 = call float @llvm.fmuladd.f32(float %57, float %59, float %54)
%61 = or i64 %53, 1
%62 = getelementptr inbounds float, float* %31, i64 %61
%63 = load float, float* %62
%64 = getelementptr inbounds float, float* %7, i64 %61
%65 = load float, float* %64
%66 = call float @llvm.fmuladd.f32(float %63, float %65, float %60)
%67 = or i64 %53, 2
%68 = getelementptr inbounds float, float* %31, i64 %67
%69 = load float, float* %68
%70 = getelementptr inbounds float, float* %7, i64 %67
%71 = load float, float* %70
%72 = call float @llvm.fmuladd.f32(float %69, float %71, float %66)
%73 = or i64 %53, 3
%74 = getelementptr inbounds float, float* %31, i64 %73
%75 = load float, float* %74
%76 = getelementptr inbounds float, float* %7, i64 %73
%77 = load float, float* %76
%78 = call float @llvm.fmuladd.f32(float %75, float %77, float %72)
%79 = add nuw nsw i64 %53, 4
%80 = add i64 %55, 4
%81 = icmp eq i64 %80, %18
br i1 %81, label %32, label %52
82: ; preds = %84
%83 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
br i1 %22, label %103, label %95
84: ; preds = %20, %84
%85 = phi i32 [ %87, %84 ], [ 0, %20 ]
%86 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %85)
%87 = add nuw i32 %85, 1
%88 = icmp eq i32 %87, %1
br i1 %88, label %82, label %84
89: ; preds = %95, %23
%90 = call i64 @feasible_p(i32 %0, i32 %1, float* %7, float** %8)
%91 = icmp eq i64 %90, 0
%92 = select i1 %91, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0)
%93 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* %92)
%94 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0))
br i1 %22, label %109, label %116
95: ; preds = %82, %95
%96 = phi i64 [ %101, %95 ], [ 0, %82 ]
%97 = getelementptr inbounds float, float* %7, i64 %96
%98 = load float, float* %97
%99 = fpext float %98 to double
%100 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double %99)
%101 = add nuw nsw i64 %96, 1
%102 = icmp eq i64 %101, %6
br i1 %102, label %89, label %95
103: ; preds = %82
%104 = call i64 @feasible_p(i32 %0, i32 %1, float* %7, float** %8)
%105 = icmp eq i64 %104, 0
%106 = select i1 %105, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0)
%107 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* %106)
%108 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0))
br label %109
109: ; preds = %116, %103, %89
%110 = getelementptr inbounds float, float* %2, i64 %6
%111 = load float, float* %110
%112 = fpext float %111 to double
%113 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0), double %112)
br i1 %12, label %124, label %114
114: ; preds = %109
%115 = getelementptr inbounds float, float* %2, i64 %6
br label %128
116: ; preds = %89, %116
%117 = phi i64 [ %122, %116 ], [ 0, %89 ]
%118 = getelementptr inbounds float, float* %2, i64 %117
%119 = load float, float* %118
%120 = fpext float %119 to double
%121 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), double %120)
%122 = add nuw nsw i64 %117, 1
%123 = icmp eq i64 %122, %6
br i1 %123, label %109, label %116
124: ; preds = %135, %109
%125 = load float, float* %110
%126 = fpext float %125 to double
%127 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0), double %126)
ret void
128: ; preds = %114, %135
%129 = phi i64 [ 0, %114 ], [ %131, %135 ]
%130 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
%131 = add nuw nsw i64 %129, 1
%132 = mul nuw nsw i64 %131, %5
br i1 %22, label %135, label %133
133: ; preds = %128
%134 = getelementptr inbounds float, float* %2, i64 %132
br label %144
135: ; preds = %144, %128
%136 = getelementptr inbounds float, float* %115, i64 %132
%137 = load float, float* %136
%138 = fpext float %137 to double
%139 = getelementptr inbounds float, float* %11, i64 %129
%140 = load float, float* %139
%141 = fpext float %140 to double
%142 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0), double %138, double %141)
%143 = icmp eq i64 %131, %10
br i1 %143, label %124, label %128
144: ; preds = %133, %144
%145 = phi i64 [ 0, %133 ], [ %150, %144 ]
%146 = getelementptr inbounds float, float* %134, i64 %145
%147 = load float, float* %146
%148 = fpext float %147 to double
%149 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), double %148)
%150 = add nuw nsw i64 %145, 1
%151 = icmp eq i64 %150, %6
br i1 %151, label %135, label %144
}