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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ ConstPic(float *, char **);
int /*<<< orphan*/ buildFrame(float, float, char **);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printPic(float, float, char **);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdin;
float strtod(char *, char **);
char *strtok(char *, char *);
int main() {
  char inputString[256];
  float inputsFloat[12];
  int countInput = 0;
  fgets(inputString, 256, stdin);
  char *separatedInput, *tail;
  separatedInput = strtok(inputString, " ");
  while (separatedInput != NULL) {
    if (countInput == 12) {
      printf("Too many inputs! Redundant inputs will be ignored\n");
      break;
    }
    inputsFloat[countInput] = strtod(separatedInput, &tail);
    if (*tail != '\0' && *tail != '\n') {
      printf("Error in the input! Terminating\n");
      return 0;
    }
    separatedInput = strtok(NULL, " ");
    countInput++;
  }
  if (countInput < 11) {
    printf("%d\n", countInput);
    printf("Please enter all 12 inputs to calculate!\n");
    return -1;
  }
  char str[1000][1000] = {};
  if (inputsFloat[4] < inputsFloat[2] || inputsFloat[5] < inputsFloat[3]) {
    printf("Minimum value cannot exceed the maximum value!\n");
  } else if (inputsFloat[0] <= 0 || inputsFloat[1] <= 0) {
    printf("Row and column numbers should be non-zero positive values!\n");
  } else if (inputsFloat[4] < inputsFloat[6] ||
             inputsFloat[4] < inputsFloat[8] ||
             inputsFloat[4] < inputsFloat[10] ||
             inputsFloat[5] < inputsFloat[7] ||
             inputsFloat[5] < inputsFloat[9] ||
             inputsFloat[5] < inputsFloat[11]) {
    printf("The value given is out of range");
  } else if (inputsFloat[2] > inputsFloat[6] ||
             inputsFloat[2] > inputsFloat[8] ||
             inputsFloat[2] > inputsFloat[10] ||
             inputsFloat[3] > inputsFloat[7] ||
             inputsFloat[3] > inputsFloat[9] ||
             inputsFloat[3] > inputsFloat[11]) {
    printf("The value given is out of range");
  } else {
    buildFrame(inputsFloat[0], inputsFloat[1], str);
    ConstPic(inputsFloat, str);
    printPic(inputsFloat[0], inputsFloat[1], str);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf43a0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x144(%rbp)
lea    -0x110(%rbp),%rdi
mov    0x2e3e(%rip),%rax
mov    (%rax),%edx
mov    $0x100,%esi
call   1070 <fgets@plt>
lea    -0x110(%rbp),%rdi
lea    0xe3c(%rip),%rsi
call   1090 <strtok@plt>
mov    %rax,-0x150(%rbp)
cmpq   $0x0,-0x150(%rbp)
je     128c <main+0x10c>
cmpl   $0xc,-0x144(%rbp)
jne    11fe <main+0x7e>
lea    0xe10(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    128c <main+0x10c>
mov    -0x150(%rbp),%rdi
lea    -0x158(%rbp),%rsi
call   1040 <strtod@plt>
movslq -0x144(%rbp),%rax
movss  %xmm0,-0x140(%rbp,%rax,4)
ff ff
mov    -0x158(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1261 <main+0xe1>
mov    -0x158(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     1261 <main+0xe1>
lea    0xde7(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    14ed <main+0x36d>
xor    %eax,%eax
mov    %eax,%edi
lea    0xd94(%rip),%rsi
call   1090 <strtok@plt>
mov    %rax,-0x150(%rbp)
mov    -0x144(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x144(%rbp)
jmp    11d0 <main+0x50>
cmpl   $0xb,-0x144(%rbp)
jge    12c7 <main+0x147>
mov    -0x144(%rbp),%esi
lea    0xdb0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xda6(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    14ed <main+0x36d>
lea    -0xf43a0(%rbp),%rdi
xor    %esi,%esi
mov    $0xf4240,%edx
call   1060 <memset@plt>
movss  -0x130(%rbp),%xmm1
ff
movss  -0x138(%rbp),%xmm0
ff
ucomiss %xmm1,%xmm0
ja     130c <main+0x18c>
movss  -0x12c(%rbp),%xmm1
ff
movss  -0x134(%rbp),%xmm0
ff
ucomiss %xmm1,%xmm0
jbe    131f <main+0x19f>
lea    0xd71(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    14e6 <main+0x366>
xorps  %xmm0,%xmm0
ucomiss -0x140(%rbp),%xmm0
jae    133f <main+0x1bf>
xorps  %xmm0,%xmm0
ucomiss -0x13c(%rbp),%xmm0
jb     1352 <main+0x1d2>
lea    0xd6e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    14e1 <main+0x361>
movss  -0x130(%rbp),%xmm1
ff
movss  -0x128(%rbp),%xmm0
ff
ucomiss %xmm1,%xmm0
ja     13e8 <main+0x268>
movss  -0x130(%rbp),%xmm1
ff
movss  -0x120(%rbp),%xmm0
ff
ucomiss %xmm1,%xmm0
ja     13e8 <main+0x268>
movss  -0x130(%rbp),%xmm1
ff
movss  -0x118(%rbp),%xmm0
ff
ucomiss %xmm1,%xmm0
ja     13e8 <main+0x268>
movss  -0x12c(%rbp),%xmm1
ff
movss  -0x124(%rbp),%xmm0
ff
ucomiss %xmm1,%xmm0
ja     13e8 <main+0x268>
movss  -0x12c(%rbp),%xmm1
ff
movss  -0x11c(%rbp),%xmm0
ff
ucomiss %xmm1,%xmm0
ja     13e8 <main+0x268>
movss  -0x12c(%rbp),%xmm1
ff
movss  -0x114(%rbp),%xmm0
ff
ucomiss %xmm1,%xmm0
jbe    13fb <main+0x27b>
lea    0xd01(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    14dc <main+0x35c>
movss  -0x138(%rbp),%xmm0
ff
ucomiss -0x128(%rbp),%xmm0
ja     1479 <main+0x2f9>
movss  -0x138(%rbp),%xmm0
ff
ucomiss -0x120(%rbp),%xmm0
ja     1479 <main+0x2f9>
movss  -0x138(%rbp),%xmm0
ff
ucomiss -0x118(%rbp),%xmm0
ja     1479 <main+0x2f9>
movss  -0x134(%rbp),%xmm0
ff
ucomiss -0x124(%rbp),%xmm0
ja     1479 <main+0x2f9>
movss  -0x134(%rbp),%xmm0
ff
ucomiss -0x11c(%rbp),%xmm0
ja     1479 <main+0x2f9>
movss  -0x134(%rbp),%xmm0
ff
ucomiss -0x114(%rbp),%xmm0
jbe    148c <main+0x30c>
lea    0xc70(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    14d7 <main+0x357>
movss  -0x140(%rbp),%xmm0
ff
movss  -0x13c(%rbp),%xmm1
ff
lea    -0xf43a0(%rbp),%rdi
call   1080 <buildFrame@plt>
lea    -0x140(%rbp),%rdi
lea    -0xf43a0(%rbp),%rsi
call   1030 <ConstPic@plt>
movss  -0x140(%rbp),%xmm0
ff
movss  -0x13c(%rbp),%xmm1
ff
lea    -0xf43a0(%rbp),%rdi
call   10a0 <printPic@plt>
jmp    14dc <main+0x35c>
jmp    14e1 <main+0x361>
jmp    14e6 <main+0x366>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xf43a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0xf4380,%rsp
mov    0x2e45(%rip),%rax
mov    (%rax),%edx
lea    0x40(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x100,%esi
call   1080 <fgets@plt>
lea    0xe42(%rip),%rsi
mov    %rbx,%rdi
call   10a0 <strtok@plt>
xor    %ebx,%ebx
test   %rax,%rax
je     1235 <main+0xa5>
lea    0x38(%rsp),%r14
lea    0xe27(%rip),%r15
jmp    11f3 <main+0x63>
nopl   0x0(%rax,%rax,1)
xor    %edi,%edi
mov    %r15,%rsi
call   10a0 <strtok@plt>
add    $0x1,%rbx
test   %rax,%rax
je     1230 <main+0xa0>
cmp    $0xc,%rbx
je     1222 <main+0x92>
mov    %rax,%rdi
mov    %r14,%rsi
call   1050 <strtod@plt>
movss  %xmm0,(%rsp,%rbx,4)
mov    0x38(%rsp),%rax
movzbl (%rax),%eax
test   %al,%al
je     11e0 <main+0x50>
cmp    $0xa,%al
je     11e0 <main+0x50>
lea    0xe99(%rip),%rdi
jmp    1295 <main+0x105>
lea    0xeb0(%rip),%rdi
call   1030 <puts@plt>
jmp    1258 <main+0xc8>
cmp    $0xa,%ebx
ja     1258 <main+0xc8>
lea    0xdc6(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe44(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%eax
jmp    129c <main+0x10c>
lea    0x140(%rsp),%rdi
mov    $0xf4240,%edx
xor    %esi,%esi
call   1070 <memset@plt>
movss  0x8(%rsp),%xmm3
movss  0x10(%rsp),%xmm5
ucomiss %xmm5,%xmm3
ja     128e <main+0xfe>
movss  0xc(%rsp),%xmm2
movss  0x14(%rsp),%xmm4
ucomiss %xmm4,%xmm2
jbe    12a9 <main+0x119>
lea    0xdcc(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0xf4380,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret
movss  (%rsp),%xmm0
xorps  %xmm6,%xmm6
ucomiss %xmm0,%xmm6
jae    1371 <main+0x1e1>
movss  0x4(%rsp),%xmm1
ucomiss %xmm1,%xmm6
jae    1371 <main+0x1e1>
movss  0x18(%rsp),%xmm6
ucomiss %xmm5,%xmm6
ja     137d <main+0x1ed>
movss  0x20(%rsp),%xmm7
ucomiss %xmm5,%xmm7
ja     137d <main+0x1ed>
movss  0x28(%rsp),%xmm8
ucomiss %xmm5,%xmm8
ja     137d <main+0x1ed>
movss  0x1c(%rsp),%xmm5
ucomiss %xmm4,%xmm5
ja     137d <main+0x1ed>
movss  0x24(%rsp),%xmm9
ucomiss %xmm4,%xmm9
ja     137d <main+0x1ed>
movss  0x2c(%rsp),%xmm10
ucomiss %xmm4,%xmm10
ja     137d <main+0x1ed>
ucomiss %xmm6,%xmm3
ja     137d <main+0x1ed>
ucomiss %xmm7,%xmm3
ja     137d <main+0x1ed>
ucomiss %xmm8,%xmm3
ja     137d <main+0x1ed>
ucomiss %xmm5,%xmm2
ja     137d <main+0x1ed>
ucomiss %xmm9,%xmm2
ja     137d <main+0x1ed>
ucomiss %xmm10,%xmm2
ja     137d <main+0x1ed>
lea    0x140(%rsp),%rbx
mov    %rbx,%rdi
call   1090 <buildFrame@plt>
mov    %rsp,%rdi
mov    %rbx,%rsi
call   1040 <ConstPic@plt>
movss  (%rsp),%xmm0
movss  0x4(%rsp),%xmm1
mov    %rbx,%rdi
call   10b0 <printPic@plt>
jmp    129a <main+0x10a>
lea    0xcae(%rip),%rdi
jmp    1295 <main+0x105>
lea    0xc82(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    129a <main+0x10a>

LLVM IR (-O0):
@stdin = global i32 0
@.str = [2 x i8] c" \00"
@.str.1 = [51 x i8] c"Too many inputs! Redundant inputs will be ignored\0A\00"
@.str.2 = [33 x i8] c"Error in the input! Terminating\0A\00"
@.str.3 = [4 x i8] c"%d\0A\00"
@.str.4 = [42 x i8] c"Please enter all 12 inputs to calculate!\0A\00"
@.str.5 = [48 x i8] c"Minimum value cannot exceed the maximum value!\0A\00"
@.str.6 = [60 x i8] c"Row and column numbers should be non-zero positive values!\0A\00"
@.str.7 = [32 x i8] c"The value given is out of range\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [256 x i8]
%3 = alloca [12 x float]
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [1000 x [1000 x i8]]
store i32 0, i32* %1
store i32 0, i32* %4
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%9 = load i32, i32* @stdin
%10 = call i32 @fgets(i8* %8, i32 256, i32 %9)
%11 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%12 = call i8* @strtok(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %12, i8** %5
br label %13
13: ; preds = %38, %0
%14 = load i8*, i8** %5
%15 = icmp ne i8* %14, null
br i1 %15, label %16, label %42
16: ; preds = %13
%17 = load i32, i32* %4
%18 = icmp eq i32 %17, 12
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0))
br label %42
21: ; preds = %16
%22 = load i8*, i8** %5
%23 = call float @strtod(i8* %22, i8** %6)
%24 = load i32, i32* %4
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 %25
store float %23, float* %26
%27 = load i8*, i8** %6
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %38
31: ; preds = %21
%32 = load i8*, i8** %6
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = icmp ne i32 %34, 10
br i1 %35, label %36, label %38
36: ; preds = %31
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %1
br label %173
38: ; preds = %31, %21
%39 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %39, i8** %5
%40 = load i32, i32* %4
%41 = add nsw i32 %40, 1
store i32 %41, i32* %4
br label %13
42: ; preds = %19, %13
%43 = load i32, i32* %4
%44 = icmp slt i32 %43, 11
br i1 %44, label %45, label %49
45: ; preds = %42
%46 = load i32, i32* %4
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %46)
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.4, i64 0, i64 0))
store i32 -1, i32* %1
br label %173
49: ; preds = %42
%50 = bitcast [1000 x [1000 x i8]]* %7 to i8*
%51 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 4
%52 = load float, float* %51
%53 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 2
%54 = load float, float* %53
%55 = fcmp olt float %52, %54
br i1 %55, label %62, label %56
56: ; preds = %49
%57 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 5
%58 = load float, float* %57
%59 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 3
%60 = load float, float* %59
%61 = fcmp olt float %58, %60
br i1 %61, label %62, label %64
62: ; preds = %56, %49
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.5, i64 0, i64 0))
br label %172
64: ; preds = %56
%65 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 0
%66 = load float, float* %65
%67 = fcmp ole float %66, 0.000000e+00
br i1 %67, label %72, label %68
68: ; preds = %64
%69 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 1
%70 = load float, float* %69
%71 = fcmp ole float %70, 0.000000e+00
br i1 %71, label %72, label %74
72: ; preds = %68, %64
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.6, i64 0, i64 0))
br label %171
74: ; preds = %68
%75 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 4
%76 = load float, float* %75
%77 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 6
%78 = load float, float* %77
%79 = fcmp olt float %76, %78
br i1 %79, label %110, label %80
80: ; preds = %74
%81 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 4
%82 = load float, float* %81
%83 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 8
%84 = load float, float* %83
%85 = fcmp olt float %82, %84
br i1 %85, label %110, label %86
86: ; preds = %80
%87 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 4
%88 = load float, float* %87
%89 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 10
%90 = load float, float* %89
%91 = fcmp olt float %88, %90
br i1 %91, label %110, label %92
92: ; preds = %86
%93 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 5
%94 = load float, float* %93
%95 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 7
%96 = load float, float* %95
%97 = fcmp olt float %94, %96
br i1 %97, label %110, label %98
98: ; preds = %92
%99 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 5
%100 = load float, float* %99
%101 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 9
%102 = load float, float* %101
%103 = fcmp olt float %100, %102
br i1 %103, label %110, label %104
104: ; preds = %98
%105 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 5
%106 = load float, float* %105
%107 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 11
%108 = load float, float* %107
%109 = fcmp olt float %106, %108
br i1 %109, label %110, label %112
110: ; preds = %104, %98, %92, %86, %80, %74
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0))
br label %170
112: ; preds = %104
%113 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 2
%114 = load float, float* %113
%115 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 6
%116 = load float, float* %115
%117 = fcmp ogt float %114, %116
br i1 %117, label %148, label %118
118: ; preds = %112
%119 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 2
%120 = load float, float* %119
%121 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 8
%122 = load float, float* %121
%123 = fcmp ogt float %120, %122
br i1 %123, label %148, label %124
124: ; preds = %118
%125 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 2
%126 = load float, float* %125
%127 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 10
%128 = load float, float* %127
%129 = fcmp ogt float %126, %128
br i1 %129, label %148, label %130
130: ; preds = %124
%131 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 3
%132 = load float, float* %131
%133 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 7
%134 = load float, float* %133
%135 = fcmp ogt float %132, %134
br i1 %135, label %148, label %136
136: ; preds = %130
%137 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 3
%138 = load float, float* %137
%139 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 9
%140 = load float, float* %139
%141 = fcmp ogt float %138, %140
br i1 %141, label %148, label %142
142: ; preds = %136
%143 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 3
%144 = load float, float* %143
%145 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 11
%146 = load float, float* %145
%147 = fcmp ogt float %144, %146
br i1 %147, label %148, label %150
148: ; preds = %142, %136, %130, %124, %118, %112
%149 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0))
br label %169
150: ; preds = %142
%151 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 0
%152 = load float, float* %151
%153 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 1
%154 = load float, float* %153
%155 = getelementptr inbounds [1000 x [1000 x i8]], [1000 x [1000 x i8]]* %7, i64 0, i64 0
%156 = bitcast [1000 x i8]* %155 to i8**
%157 = call i32 @buildFrame(float %152, float %154, i8** %156)
%158 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 0
%159 = getelementptr inbounds [1000 x [1000 x i8]], [1000 x [1000 x i8]]* %7, i64 0, i64 0
%160 = bitcast [1000 x i8]* %159 to i8**
%161 = call i32 @ConstPic(float* %158, i8** %160)
%162 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 0
%163 = load float, float* %162
%164 = getelementptr inbounds [12 x float], [12 x float]* %3, i64 0, i64 1
%165 = load float, float* %164
%166 = getelementptr inbounds [1000 x [1000 x i8]], [1000 x [1000 x i8]]* %7, i64 0, i64 0
%167 = bitcast [1000 x i8]* %166 to i8**
%168 = call i32 @printPic(float %163, float %165, i8** %167)
br label %169
169: ; preds = %150, %148
br label %170
170: ; preds = %169, %110
br label %171
171: ; preds = %170, %72
br label %172
172: ; preds = %171, %62
store i32 0, i32* %1
br label %173
173: ; preds = %172, %45, %36
%174 = load i32, i32* %1
ret i32 %174
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [2 x i8] c" \00"
@.str.3 = [4 x i8] c"%d\0A\00"
@.str.7 = [32 x i8] c"The value given is out of range\00"
@str = [59 x i8] c"Row and column numbers should be non-zero positive values!\00"
@str.8 = [47 x i8] c"Minimum value cannot exceed the maximum value!\00"
@str.9 = [41 x i8] c"Please enter all 12 inputs to calculate!\00"
@str.10 = [32 x i8] c"Error in the input! Terminating\00"
@str.11 = [50 x i8] c"Too many inputs! Redundant inputs will be ignored\00"
define i32 @main() {
%1 = alloca [256 x i8]
%2 = alloca [12 x float]
%3 = alloca i8*
%4 = alloca [1000 x [1000 x i8]]
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%6 = bitcast [12 x float]* %2 to i8*
%7 = load i32, i32* @stdin
%8 = call i32 @fgets(i8* %5, i32 256, i32 %7)
%9 = bitcast i8** %3 to i8*
%10 = call i8* @strtok(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%11 = icmp eq i8* %10, null
br i1 %11, label %32, label %12
12: ; preds = %0, %25
%13 = phi i64 [ %27, %25 ], [ 0, %0 ]
%14 = phi i8* [ %26, %25 ], [ %10, %0 ]
%15 = icmp eq i64 %13, 12
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.11, i64 0, i64 0))
br label %36
18: ; preds = %12
%19 = call float @strtod(i8* %14, i8** %3)
%20 = getelementptr inbounds [12 x float], [12 x float]* %2, i64 0, i64 %13
store float %19, float* %20
%21 = load i8*, i8** %3
%22 = load i8, i8* %21
switch i8 %22, label %23 [
i8 0, label %25
i8 10, label %25
]
23: ; preds = %18
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.10, i64 0, i64 0))
br label %109
25: ; preds = %18, %18
%26 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%27 = add nuw nsw i64 %13, 1
%28 = icmp eq i8* %26, null
br i1 %28, label %29, label %12
29: ; preds = %25
%30 = trunc i64 %27 to i32
%31 = icmp ult i32 %30, 11
br i1 %31, label %32, label %36
32: ; preds = %0, %29
%33 = phi i32 [ %30, %29 ], [ 0, %0 ]
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %33)
%35 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.9, i64 0, i64 0))
br label %109
36: ; preds = %16, %29
%37 = getelementptr inbounds [1000 x [1000 x i8]], [1000 x [1000 x i8]]* %4, i64 0, i64 0, i64 0
%38 = getelementptr inbounds [12 x float], [12 x float]* %2, i64 0, i64 4
%39 = load float, float* %38
%40 = getelementptr inbounds [12 x float], [12 x float]* %2, i64 0, i64 2
%41 = load float, float* %40
%42 = fcmp olt float %39, %41
br i1 %42, label %49, label %43
43: ; preds = %36
%44 = getelementptr inbounds [12 x float], [12 x float]* %2, i64 0, i64 5
%45 = load float, float* %44
%46 = getelementptr inbounds [12 x float], [12 x float]* %2, i64 0, i64 3
%47 = load float, float* %46
%48 = fcmp olt float %45, %47
br i1 %48, label %49, label %51
49: ; preds = %43, %36
%50 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.8, i64 0, i64 0))
br label %108
51: ; preds = %43
%52 = getelementptr inbounds [12 x float], [12 x float]* %2, i64 0, i64 0
%53 = load float, float* %52
%54 = fcmp ole float %53, 0.000000e+00
%55 = getelementptr inbounds [12 x float], [12 x float]* %2, i64 0, i64 1
%56 = load float, float* %55
%57 = fcmp ole float %56, 0.000000e+00
%58 = select i1 %54, i1 true, i1 %57
br i1 %58, label %59, label %61
59: ; preds = %51
%60 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str, i64 0, i64 0))
br label %108
61: ; preds = %51
%62 = getelementptr inbounds [12 x float], [12 x float]* %2, i64 0, i64 6
%63 = load float, float* %62
%64 = fcmp olt float %39, %63
br i1 %64, label %85, label %65
65: ; preds = %61
%66 = getelementptr inbounds [12 x float], [12 x float]* %2, i64 0, i64 8
%67 = load float, float* %66
%68 = fcmp olt float %39, %67
br i1 %68, label %85, label %69
69: ; preds = %65
%70 = getelementptr inbounds [12 x float], [12 x float]* %2, i64 0, i64 10
%71 = load float, float* %70
%72 = fcmp olt float %39, %71
br i1 %72, label %85, label %73
73: ; preds = %69
%74 = getelementptr inbounds [12 x float], [12 x float]* %2, i64 0, i64 7
%75 = load float, float* %74
%76 = fcmp olt float %45, %75
br i1 %76, label %85, label %77
77: ; preds = %73
%78 = getelementptr inbounds [12 x float], [12 x float]* %2, i64 0, i64 9
%79 = load float, float* %78
%80 = fcmp olt float %45, %79
br i1 %80, label %85, label %81
81: ; preds = %77
%82 = getelementptr inbounds [12 x float], [12 x float]* %2, i64 0, i64 11
%83 = load float, float* %82
%84 = fcmp olt float %45, %83
br i1 %84, label %85, label %87
85: ; preds = %81, %77, %73, %69, %65, %61
%86 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0))
br label %108
87: ; preds = %81
%88 = fcmp ogt float %41, %63
%89 = fcmp ogt float %41, %67
%90 = select i1 %88, i1 true, i1 %89
%91 = fcmp ogt float %41, %71
%92 = select i1 %90, i1 true, i1 %91
%93 = fcmp ogt float %47, %75
%94 = select i1 %92, i1 true, i1 %93
%95 = fcmp ogt float %47, %79
%96 = select i1 %94, i1 true, i1 %95
%97 = fcmp ogt float %47, %83
%98 = select i1 %96, i1 true, i1 %97
br i1 %98, label %99, label %101
99: ; preds = %87
%100 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0))
br label %108
101: ; preds = %87
%102 = bitcast [1000 x [1000 x i8]]* %4 to i8**
%103 = call i32 @buildFrame(float %53, float %56, i8** %102)
%104 = call i32 @ConstPic(float* %52, i8** %102)
%105 = load float, float* %52
%106 = load float, float* %55
%107 = call i32 @printPic(float %105, float %106, i8** %102)
br label %108
108: ; preds = %59, %99, %101, %85, %49
br label %109
109: ; preds = %108, %32, %23
%110 = phi i32 [ -1, %32 ], [ 0, %108 ], [ 0, %23 ]
ret i32 %110
}