#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*/ printf(char *, ...);
int ErrorMsgs(int errorId, int printFlag) {
  if (printFlag == 0) {
    printf("<ERROR %d>: ", errorId);
    switch (errorId) {
    case 101:
      printf("Relation does not exist! Please check the name and try again.\n");
      break;
    case 102:
      printf("The attribute with given name is not present in the relation.\n");
      break;
    case 103:
      printf("Out of bound relation number encountered\n");
      break;
    case 105:
      printf("Null pointer exception!\n");
      break;
    case 106:
      printf("Invalid attribute type! Attribute type should be i, f or s.\n");
      break;
    case 107:
      printf("Invalid comparison operator!\n");
      break;
    case 108:
      printf("Error while seeking in file!\n");
      break;
    case 110:
      printf("A NULL argument was received where non-NULL was required!\n");
      break;
    case 112:
      printf("Error occurred while writing data to disk!\n");
      break;
    case 113:
      printf("Error occurred while reading data from disk!\n");
      break;
    case 104:
      printf("No attributes found for the relation!\n");
      break;
    case 109:
      printf("No catalog found in the database!\n");
      break;
    case 111:
      printf("Catalog file(s) already exist in the database!\n");
      break;
    case 115:
      printf("A DB with the given name already exists! Please provide a "
             "different name and try again\n");
      break;
    case 116:
      printf("Argument(s) missing! The number of arguments received is less "
             "than required number of arguments!\n");
      break;
    case 114:
      printf("Error occurred while trying to create file/directory. Please "
             "check file system permissions and try again.\n");
      break;
    case 117:
      printf("Database not found with given name! Please check the database "
             "name.\n");
      break;
    case 118:
      printf("A relation with given name already exists! Please try again with "
             "a different name.\n");
      break;
    case 119:
      printf("An attribute or relation name is invalid! Names should start "
             "with alphabet and can be at most 20 characters long.\n");
      break;
    case 121:
      printf("Please call opendb <DBNAME> to open a database first.\n");
      break;
    case 120:
      printf("Database not closed! Please call CloseDB() before open/create a "
             "db \n");
      break;
    case 122:
      printf("Insert has no attribute-value pairs to be inserted into the "
             "relation!\n");
      break;
    case 123:
      printf("Attribute with the given name is not found in relation! Please "
             "checkif all attributes are named correctly.\n");
      break;
    case 124:
      printf("Tuple already exists in this relation! All tuples must be "
             "unique.\n");
      break;
    case 125:
      printf(
          "Permission denied! Meta data tables cannot be modified directly.\n");
      break;
    case 127:
      printf("Integer value was expected but got string instead.\n");
      break;
    case 128:
      printf("Float value was expected but got string instead.\n");
      break;
    case 129:
      printf("Exceeded the maximum allowed string size of %d\n", 50);
      break;
    case 130:
      printf("Trying to read a page which is greater than the number of pages "
             "in the relation.\n");
      break;
    case 126:
      printf("Database Name exceeded the limit! Enter name within 20 "
             "characters.\n");
      break;
    case 131:
      printf("Type Mismatch while performing Join! Please try similar "
             "attributes.\n");
      break;
    case 132:
      printf(
          "Relation is not empty! One can load only on to empty relations.\n");
      break;
    case 133:
      printf("Cannot open file! Please check the path given and try again.\n");
      break;
    case 134:
      printf(
          "MINIREL cannot handle a record of size > %d. Please try again with "
          "lesser number of attributes or arguments with smaller size.\n",
          508);
      break;
    case 135:
      printf("Number of attributes mismatch! Please pass all the attributes "
             "present and its values to insert a new record. Use \n\t select "
             "into <some_name> from attrcat where (relName = \"<RELNAME>\");\n "
             "to find the attributes for a relation\n");
      break;
    case 136:
      printf("Attribute repeated! Please check the insert query and remove the "
             "duplicate entry.\n");
      break;
    default:
      printf("Congratulations! You just won 500 million GBP! Please send your "
             "bank details to developer to claim the price. :)\n");
      break;
    }
  }
  return -1;
}


x86 assembly (clang, -O0):
<ErrorMsgs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    142b <ErrorMsgs+0x31b>
mov    -0x4(%rbp),%esi
lea    0xf5e(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0xffffff9b,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x23,%eax
ja     1418 <ErrorMsgs+0x308>
mov    -0x10(%rbp),%rax
lea    0xea7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf34(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0xf60(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0xf8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0xfa3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0xfa9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0xfd3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0xfde(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0xfe9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x1011(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x102a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x1045(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x1059(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x1069(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x1086(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x10cb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x111a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x1172(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x11a4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x11e5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x1245(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x1269(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x129b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x12cf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x1328(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x1358(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x1387(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x13a8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x13c7(%rip),%rdi
mov    $0x32,%esi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x13df(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x141e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x144f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x1481(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x14af(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x14da(%rip),%rdi
mov    $0x1fc,%esi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x1542(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x160f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1426 <ErrorMsgs+0x316>
lea    0x164f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    142b <ErrorMsgs+0x31b>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ErrorMsgs>:
push   %rbx
test   %esi,%esi
jne    12fc <ErrorMsgs+0x1dc>
mov    %edi,%ebx
lea    0xf5e(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffff9b,%ebx
cmp    $0x23,%ebx
ja     115f <ErrorMsgs+0x3f>
lea    0xeb6(%rip),%rax
movslq (%rax,%rbx,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0x18b4(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x18e6(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x185e(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x1829(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x16d7(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x17f9(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x17b1(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x1788(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x175f(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x1679(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x170d(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x1632(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x16ca(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x1691(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x14ec(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x15ab(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x153e(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x1484(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x1425(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x13a7(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x1321(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x1359(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x12c3(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x124c(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x11fe(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x11b4(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x10b3(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x116f(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x1135(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0xdf6(%rip),%rdi
mov    $0x32,%esi
jmp    12de <ErrorMsgs+0x1be>
lea    0x10cd(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0x103d(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0xff4(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0xfae(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0xdf4(%rip),%rdi
mov    $0x1fc,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    12fc <ErrorMsgs+0x1dc>
lea    0xeb1(%rip),%rdi
jmp    12f7 <ErrorMsgs+0x1d7>
lea    0xe56(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"<ERROR %d>: \00"
@.str.1 = [63 x i8] c"Relation does not exist! Please check the name and try again.\0A\00"
@.str.2 = [63 x i8] c"The attribute with given name is not present in the relation.\0A\00"
@.str.3 = [42 x i8] c"Out of bound relation number encountered\0A\00"
@.str.4 = [25 x i8] c"Null pointer exception!\0A\00"
@.str.5 = [61 x i8] c"Invalid attribute type! Attribute type should be i, f or s.\0A\00"
@.str.6 = [30 x i8] c"Invalid comparison operator!\0A\00"
@.str.7 = [30 x i8] c"Error while seeking in file!\0A\00"
@.str.8 = [59 x i8] c"A NULL argument was received where non-NULL was required!\0A\00"
@.str.9 = [44 x i8] c"Error occurred while writing data to disk!\0A\00"
@.str.10 = [46 x i8] c"Error occurred while reading data from disk!\0A\00"
@.str.11 = [39 x i8] c"No attributes found for the relation!\0A\00"
@.str.12 = [35 x i8] c"No catalog found in the database!\0A\00"
@.str.13 = [48 x i8] c"Catalog file(s) already exist in the database!\0A\00"
@.str.14 = [88 x i8] c"A DB with the given name already exists! Please provide a different name and try again\0A\00"
@.str.15 = [98 x i8] c"Argument(s) missing! The number of arguments received is less than required number of arguments!\0A\00"
@.str.16 = [107 x i8] c"Error occurred while trying to create file/directory. Please check file system permissions and try again.\0A\00"
@.str.17 = [69 x i8] c"Database not found with given name! Please check the database name.\0A\00"
@.str.18 = [84 x i8] c"A relation with given name already exists! Please try again with a different name.\0A\00"
@.str.19 = [115 x i8] c"An attribute or relation name is invalid! Names should start with alphabet and can be at most 20 characters long.\0A\00"
@.str.20 = [55 x i8] c"Please call opendb <DBNAME> to open a database first.\0A\00"
@.str.21 = [69 x i8] c"Database not closed! Please call CloseDB() before open/create a db \0A\00"
@.str.22 = [71 x i8] c"Insert has no attribute-value pairs to be inserted into the relation!\0A\00"
@.str.23 = [108 x i8] c"Attribute with the given name is not found in relation! Please checkif all attributes are named correctly.\0A\00"
@.str.24 = [67 x i8] c"Tuple already exists in this relation! All tuples must be unique.\0A\00"
@.str.25 = [66 x i8] c"Permission denied! Meta data tables cannot be modified directly.\0A\00"
@.str.26 = [52 x i8] c"Integer value was expected but got string instead.\0A\00"
@.str.27 = [50 x i8] c"Float value was expected but got string instead.\0A\00"
@.str.28 = [48 x i8] c"Exceeded the maximum allowed string size of %d\0A\00"
@.str.29 = [82 x i8] c"Trying to read a page which is greater than the number of pages in the relation.\0A\00"
@.str.30 = [68 x i8] c"Database Name exceeded the limit! Enter name within 20 characters.\0A\00"
@.str.31 = [69 x i8] c"Type Mismatch while performing Join! Please try similar attributes.\0A\00"
@.str.32 = [65 x i8] c"Relation is not empty! One can load only on to empty relations.\0A\00"
@.str.33 = [62 x i8] c"Cannot open file! Please check the path given and try again.\0A\00"
@.str.34 = [128 x i8] c"MINIREL cannot handle a record of size > %d. Please try again with lesser number of attributes or arguments with smaller size.\0A\00"
@.str.35 = [224 x i8] c"Number of attributes mismatch! Please pass all the attributes present and its values to insert a new record. Use \0A\09 select into <some_name> from attrcat where (relName = \22<RELNAME>\22);\0A to find the attributes for a relation\0A\00"
@.str.36 = [83 x i8] c"Attribute repeated! Please check the insert query and remove the duplicate entry.\0A\00"
@.str.37 = [114 x i8] c"Congratulations! You just won 500 million GBP! Please send your bank details to developer to claim the price. :)\0A\00"
define i32 @ErrorMsgs(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %86
7: ; preds = %2
%8 = load i32, i32* %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %3
switch i32 %10, label %83 [
i32 101, label %11
i32 102, label %13
i32 103, label %15
i32 105, label %17
i32 106, label %19
i32 107, label %21
i32 108, label %23
i32 110, label %25
i32 112, label %27
i32 113, label %29
i32 104, label %31
i32 109, label %33
i32 111, label %35
i32 115, label %37
i32 116, label %39
i32 114, label %41
i32 117, label %43
i32 118, label %45
i32 119, label %47
i32 121, label %49
i32 120, label %51
i32 122, label %53
i32 123, label %55
i32 124, label %57
i32 125, label %59
i32 127, label %61
i32 128, label %63
i32 129, label %65
i32 130, label %67
i32 126, label %69
i32 131, label %71
i32 132, label %73
i32 133, label %75
i32 134, label %77
i32 135, label %79
i32 136, label %81
]
11: ; preds = %7
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0))
br label %85
13: ; preds = %7
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0))
br label %85
15: ; preds = %7
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0))
br label %85
17: ; preds = %7
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
br label %85
19: ; preds = %7
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.5, i64 0, i64 0))
br label %85
21: ; preds = %7
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0))
br label %85
23: ; preds = %7
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0))
br label %85
25: ; preds = %7
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.8, i64 0, i64 0))
br label %85
27: ; preds = %7
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.9, i64 0, i64 0))
br label %85
29: ; preds = %7
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.10, i64 0, i64 0))
br label %85
31: ; preds = %7
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.11, i64 0, i64 0))
br label %85
33: ; preds = %7
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.12, i64 0, i64 0))
br label %85
35: ; preds = %7
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.13, i64 0, i64 0))
br label %85
37: ; preds = %7
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str.14, i64 0, i64 0))
br label %85
39: ; preds = %7
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([98 x i8], [98 x i8]* @.str.15, i64 0, i64 0))
br label %85
41: ; preds = %7
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str.16, i64 0, i64 0))
br label %85
43: ; preds = %7
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.17, i64 0, i64 0))
br label %85
45: ; preds = %7
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str.18, i64 0, i64 0))
br label %85
47: ; preds = %7
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([115 x i8], [115 x i8]* @.str.19, i64 0, i64 0))
br label %85
49: ; preds = %7
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.20, i64 0, i64 0))
br label %85
51: ; preds = %7
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.21, i64 0, i64 0))
br label %85
53: ; preds = %7
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.22, i64 0, i64 0))
br label %85
55: ; preds = %7
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([108 x i8], [108 x i8]* @.str.23, i64 0, i64 0))
br label %85
57: ; preds = %7
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.24, i64 0, i64 0))
br label %85
59: ; preds = %7
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.25, i64 0, i64 0))
br label %85
61: ; preds = %7
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.26, i64 0, i64 0))
br label %85
63: ; preds = %7
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.27, i64 0, i64 0))
br label %85
65: ; preds = %7
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.28, i64 0, i64 0), i32 50)
br label %85
67: ; preds = %7
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.29, i64 0, i64 0))
br label %85
69: ; preds = %7
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.30, i64 0, i64 0))
br label %85
71: ; preds = %7
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.31, i64 0, i64 0))
br label %85
73: ; preds = %7
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.32, i64 0, i64 0))
br label %85
75: ; preds = %7
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.33, i64 0, i64 0))
br label %85
77: ; preds = %7
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str.34, i64 0, i64 0), i32 508)
br label %85
79: ; preds = %7
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([224 x i8], [224 x i8]* @.str.35, i64 0, i64 0))
br label %85
81: ; preds = %7
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.36, i64 0, i64 0))
br label %85
83: ; preds = %7
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([114 x i8], [114 x i8]* @.str.37, i64 0, i64 0))
br label %85
85: ; preds = %83, %81, %79, %77, %75, %73, %71, %69, %67, %65, %63, %61, %59, %57, %55, %53, %51, %49, %47, %45, %43, %41, %39, %37, %35, %33, %31, %29, %27, %25, %23, %21, %19, %17, %15, %13, %11
br label %86
86: ; preds = %85, %2
ret i32 -1
}

LLVM IR (-O2):
@.str = [13 x i8] c"<ERROR %d>: \00"
@.str.28 = [48 x i8] c"Exceeded the maximum allowed string size of %d\0A\00"
@.str.34 = [128 x i8] c"MINIREL cannot handle a record of size > %d. Please try again with lesser number of attributes or arguments with smaller size.\0A\00"
@str = [82 x i8] c"Attribute repeated! Please check the insert query and remove the duplicate entry.\00"
@str.38 = [223 x i8] c"Number of attributes mismatch! Please pass all the attributes present and its values to insert a new record. Use \0A\09 select into <some_name> from attrcat where (relName = \22<RELNAME>\22);\0A to find the attributes for a relation\00"
@str.39 = [61 x i8] c"Cannot open file! Please check the path given and try again.\00"
@str.40 = [64 x i8] c"Relation is not empty! One can load only on to empty relations.\00"
@str.41 = [68 x i8] c"Type Mismatch while performing Join! Please try similar attributes.\00"
@str.42 = [67 x i8] c"Database Name exceeded the limit! Enter name within 20 characters.\00"
@str.43 = [81 x i8] c"Trying to read a page which is greater than the number of pages in the relation.\00"
@str.44 = [49 x i8] c"Float value was expected but got string instead.\00"
@str.45 = [51 x i8] c"Integer value was expected but got string instead.\00"
@str.46 = [65 x i8] c"Permission denied! Meta data tables cannot be modified directly.\00"
@str.47 = [66 x i8] c"Tuple already exists in this relation! All tuples must be unique.\00"
@str.48 = [107 x i8] c"Attribute with the given name is not found in relation! Please checkif all attributes are named correctly.\00"
@str.49 = [70 x i8] c"Insert has no attribute-value pairs to be inserted into the relation!\00"
@str.50 = [68 x i8] c"Database not closed! Please call CloseDB() before open/create a db \00"
@str.51 = [54 x i8] c"Please call opendb <DBNAME> to open a database first.\00"
@str.52 = [114 x i8] c"An attribute or relation name is invalid! Names should start with alphabet and can be at most 20 characters long.\00"
@str.53 = [83 x i8] c"A relation with given name already exists! Please try again with a different name.\00"
@str.54 = [68 x i8] c"Database not found with given name! Please check the database name.\00"
@str.55 = [106 x i8] c"Error occurred while trying to create file/directory. Please check file system permissions and try again.\00"
@str.56 = [97 x i8] c"Argument(s) missing! The number of arguments received is less than required number of arguments!\00"
@str.57 = [87 x i8] c"A DB with the given name already exists! Please provide a different name and try again\00"
@str.58 = [47 x i8] c"Catalog file(s) already exist in the database!\00"
@str.59 = [34 x i8] c"No catalog found in the database!\00"
@str.60 = [38 x i8] c"No attributes found for the relation!\00"
@str.61 = [45 x i8] c"Error occurred while reading data from disk!\00"
@str.62 = [43 x i8] c"Error occurred while writing data to disk!\00"
@str.63 = [58 x i8] c"A NULL argument was received where non-NULL was required!\00"
@str.64 = [29 x i8] c"Error while seeking in file!\00"
@str.65 = [29 x i8] c"Invalid comparison operator!\00"
@str.66 = [60 x i8] c"Invalid attribute type! Attribute type should be i, f or s.\00"
@str.67 = [24 x i8] c"Null pointer exception!\00"
@str.68 = [41 x i8] c"Out of bound relation number encountered\00"
@str.69 = [62 x i8] c"The attribute with given name is not present in the relation.\00"
@str.70 = [62 x i8] c"Relation does not exist! Please check the name and try again.\00"
@str.71 = [113 x i8] c"Congratulations! You just won 500 million GBP! Please send your bank details to developer to claim the price. :)\00"
define i32 @ErrorMsgs(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %4, label %80
4: ; preds = %2
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %0)
switch i32 %0, label %78 [
i32 101, label %6
i32 102, label %8
i32 103, label %10
i32 105, label %12
i32 106, label %14
i32 107, label %16
i32 108, label %18
i32 110, label %20
i32 112, label %22
i32 113, label %24
i32 104, label %26
i32 109, label %28
i32 111, label %30
i32 115, label %32
i32 116, label %34
i32 114, label %36
i32 117, label %38
i32 118, label %40
i32 119, label %42
i32 121, label %44
i32 120, label %46
i32 122, label %48
i32 123, label %50
i32 124, label %52
i32 125, label %54
i32 127, label %56
i32 128, label %58
i32 129, label %60
i32 130, label %62
i32 126, label %64
i32 131, label %66
i32 132, label %68
i32 133, label %70
i32 134, label %72
i32 135, label %74
i32 136, label %76
]
6: ; preds = %4
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.70, i64 0, i64 0))
br label %80
8: ; preds = %4
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.69, i64 0, i64 0))
br label %80
10: ; preds = %4
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.68, i64 0, i64 0))
br label %80
12: ; preds = %4
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.67, i64 0, i64 0))
br label %80
14: ; preds = %4
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.66, i64 0, i64 0))
br label %80
16: ; preds = %4
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.65, i64 0, i64 0))
br label %80
18: ; preds = %4
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.64, i64 0, i64 0))
br label %80
20: ; preds = %4
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.63, i64 0, i64 0))
br label %80
22: ; preds = %4
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.62, i64 0, i64 0))
br label %80
24: ; preds = %4
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.61, i64 0, i64 0))
br label %80
26: ; preds = %4
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.60, i64 0, i64 0))
br label %80
28: ; preds = %4
%29 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.59, i64 0, i64 0))
br label %80
30: ; preds = %4
%31 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.58, i64 0, i64 0))
br label %80
32: ; preds = %4
%33 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([87 x i8], [87 x i8]* @str.57, i64 0, i64 0))
br label %80
34: ; preds = %4
%35 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([97 x i8], [97 x i8]* @str.56, i64 0, i64 0))
br label %80
36: ; preds = %4
%37 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @str.55, i64 0, i64 0))
br label %80
38: ; preds = %4
%39 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str.54, i64 0, i64 0))
br label %80
40: ; preds = %4
%41 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([83 x i8], [83 x i8]* @str.53, i64 0, i64 0))
br label %80
42: ; preds = %4
%43 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([114 x i8], [114 x i8]* @str.52, i64 0, i64 0))
br label %80
44: ; preds = %4
%45 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.51, i64 0, i64 0))
br label %80
46: ; preds = %4
%47 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str.50, i64 0, i64 0))
br label %80
48: ; preds = %4
%49 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @str.49, i64 0, i64 0))
br label %80
50: ; preds = %4
%51 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([107 x i8], [107 x i8]* @str.48, i64 0, i64 0))
br label %80
52: ; preds = %4
%53 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str.47, i64 0, i64 0))
br label %80
54: ; preds = %4
%55 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.46, i64 0, i64 0))
br label %80
56: ; preds = %4
%57 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.45, i64 0, i64 0))
br label %80
58: ; preds = %4
%59 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.44, i64 0, i64 0))
br label %80
60: ; preds = %4
%61 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.28, i64 0, i64 0), i32 50)
br label %80
62: ; preds = %4
%63 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.43, i64 0, i64 0))
br label %80
64: ; preds = %4
%65 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.42, i64 0, i64 0))
br label %80
66: ; preds = %4
%67 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str.41, i64 0, i64 0))
br label %80
68: ; preds = %4
%69 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.40, i64 0, i64 0))
br label %80
70: ; preds = %4
%71 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.39, i64 0, i64 0))
br label %80
72: ; preds = %4
%73 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([128 x i8], [128 x i8]* @.str.34, i64 0, i64 0), i32 508)
br label %80
74: ; preds = %4
%75 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([223 x i8], [223 x i8]* @str.38, i64 0, i64 0))
br label %80
76: ; preds = %4
%77 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @str, i64 0, i64 0))
br label %80
78: ; preds = %4
%79 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([113 x i8], [113 x i8]* @str.71, i64 0, i64 0))
br label %80
80: ; preds = %6, %8, %10, %12, %14, %16, %18, %20, %22, %24, %26, %28, %30, %32, %34, %36, %38, %40, %42, %44, %46, %48, %50, %52, %54, %56, %58, %60, %62, %64, %66, %68, %70, %72, %74, %76, %78, %2
ret i32 -1
}