#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*/ sprintf(char *, char *, ...);
int /*<<< orphan*/ strcpy(char *, char *);
char *geterrmsg(int errcode, char *Msg) {
  switch (errcode) {
  case 101:
    strcpy(Msg, "System Error 101: insufficient memory available.");
    break;
  case 102:
    strcpy(Msg, "System Error 102: no network data available.");
    break;
  case 103:
    strcpy(Msg, "System Error 103: hydraulics not initialized.");
    break;
  case 104:
    strcpy(Msg, "System Error 104: no hydraulics for water quality analysis.");
    break;
  case 105:
    strcpy(Msg, "System Error 105: water quality not initialized.");
    break;
  case 106:
    strcpy(Msg, "System Error 106: no results saved to report on.");
    break;
  case 107:
    strcpy(Msg, "System Error 107: hydraulics supplied from external file.");
    break;
  case 108:
    strcpy(Msg, "System Error 108: cannot use external file while hydraulics "
                "solver is active.");
    break;
  case 109:
    strcpy(Msg, "System Error 109: cannot change time parameter when solver is "
                "active.");
    break;
  case 110:
    strcpy(Msg, "System Error 110: cannot solve network hydraulic equations.");
    break;
  case 120:
    strcpy(Msg,
           "System Error 120: cannot solve water quality transport equations.");
    break;
  case 200:
    strcpy(Msg, "Input Error 200: one or more errors in input file.");
    break;
  case 223:
    strcpy(Msg, "Input Error 223: not enough nodes in network");
    break;
  case 224:
    strcpy(Msg, "Input Error 224: no tanks or reservoirs in network.");
    break;
  case 202:
    sprintf(Msg, "Input Error 202: %s %s contains illegal numeric value.",
            "function call", "");
    break;
  case 203:
    sprintf(Msg, "Input Error 203: %s %s refers to undefined node.",
            "function call", "");
    break;
  case 204:
    sprintf(Msg, "Input Error 204: %s %s refers to undefined link.",
            "function call", "");
    break;
  case 205:
    sprintf(Msg, "Input Error 205: %s %s refers to undefined time pattern.",
            "function call", "");
    break;
  case 207:
    sprintf(Msg, "Input Error 207: %s %s attempts to control a CV.",
            "function call", "");
    break;
  case 240:
    sprintf(Msg, "Input Error 240: %s %s refers to undefined source.",
            "function call", "");
    break;
  case 241:
    sprintf(Msg, "Input Error 241: %s %s refers to undefined control.",
            "function call", "");
    break;
  case 250:
    sprintf(Msg, "Input Error 250: function call contains invalid format.");
    break;
  case 251:
    sprintf(Msg,
            "Input Error 251: function call contains invalid parameter code.");
    break;
  case 253:
    sprintf(Msg, "Input Error 253: Function call error - No such demand "
                 "category index.");
    break;
  case 254:
    sprintf(Msg,
            "Input Error 254: Function call error - Node have no coordinates.");
    break;
  case 255:
    sprintf(
        Msg,
        "Input Error 255: Function call error - Coordinates were not loaded.");
    break;
  case 301:
    strcpy(Msg, "File Error 301: identical file names.");
    break;
  case 302:
    strcpy(Msg, "File Error 302: cannot open input file.");
    break;
  case 303:
    strcpy(Msg, "File Error 303: cannot open report file.");
    break;
  case 304:
    strcpy(Msg, "File Error 304: cannot open binary output file.");
    break;
  case 305:
    strcpy(Msg, "File Error 305: cannot open hydraulics file.");
    break;
  case 306:
    strcpy(Msg, "File Error 306: hydraulics file does not match network data.");
    break;
  case 307:
    strcpy(Msg, "File Error 307: cannot read hydraulics file.");
    break;
  case 308:
    strcpy(Msg, "File Error 308: cannot save results to file.");
    break;
  case 309:
    strcpy(Msg, "File Error 309: cannot save results to report file.");
    break;
  case 401:
    strcpy(Msg, "Sync Error 401: Qstep is not dividable by Hstep. Can't sync.");
    break;
  default:
    strcpy(Msg, "");
  }
  return (Msg);
}


x86 assembly (clang, -O0):
<geterrmsg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffff9b,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x12c,%eax
ja     14c8 <geterrmsg+0x3a8>
mov    -0x18(%rbp),%rax
lea    0xeaf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rdi
lea    0x134f(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x136b(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x1383(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x139c(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x13c3(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x13df(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x13fb(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x1420(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x1459(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x148a(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x14b1(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x14de(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x14fc(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x1514(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x1533(%rip),%rsi
lea    0x1563(%rip),%rdx
lea    0x1635(%rip),%rcx
mov    $0x0,%al
call   1040 <sprintf@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x1553(%rip),%rsi
lea    0x153e(%rip),%rdx
lea    0x1610(%rip),%rcx
mov    $0x0,%al
call   1040 <sprintf@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x155f(%rip),%rsi
lea    0x1519(%rip),%rdx
lea    0x15eb(%rip),%rcx
mov    $0x0,%al
call   1040 <sprintf@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x156b(%rip),%rsi
lea    0x14f4(%rip),%rdx
lea    0x15c6(%rip),%rcx
mov    $0x0,%al
call   1040 <sprintf@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x157f(%rip),%rsi
lea    0x14cf(%rip),%rdx
lea    0x15a1(%rip),%rcx
mov    $0x0,%al
call   1040 <sprintf@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x158b(%rip),%rsi
lea    0x14aa(%rip),%rdx
lea    0x157c(%rip),%rcx
mov    $0x0,%al
call   1040 <sprintf@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x1599(%rip),%rsi
lea    0x1485(%rip),%rdx
lea    0x1557(%rip),%rcx
mov    $0x0,%al
call   1040 <sprintf@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x15a8(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x15c9(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x15f2(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x1621(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x164b(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x1678(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x1689(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x169c(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x16b0(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x16cb(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x16e3(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x170b(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x1723(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x173b(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x175a(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14d8 <geterrmsg+0x3b8>
mov    -0x10(%rbp),%rdi
lea    0x13fb(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<geterrmsg>:
push   %rbx
mov    %rsi,%rbx
add    $0xffffff9b,%edi
cmp    $0x12c,%edi
ja     11bb <geterrmsg+0x9b>
lea    0xec6(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0x136a(%rip),%rsi
jmp    13b2 <geterrmsg+0x292>
lea    0x138f(%rip),%rsi
jmp    13b2 <geterrmsg+0x292>
lea    0x13b0(%rip),%rsi
jmp    13b2 <geterrmsg+0x292>
lea    0x13d2(%rip),%rsi
jmp    13b2 <geterrmsg+0x292>
lea    0x1402(%rip),%rsi
jmp    13b2 <geterrmsg+0x292>
lea    0x1427(%rip),%rsi
jmp    13b2 <geterrmsg+0x292>
lea    0x144c(%rip),%rsi
jmp    13b2 <geterrmsg+0x292>
lea    0x147a(%rip),%rsi
jmp    13b2 <geterrmsg+0x292>
lea    0x14bc(%rip),%rsi
jmp    13b2 <geterrmsg+0x292>
lea    0x14f6(%rip),%rsi
jmp    13b2 <geterrmsg+0x292>
lea    0x170c(%rip),%rsi
jmp    13b2 <geterrmsg+0x292>
lea    0x151a(%rip),%rsi
jmp    13b2 <geterrmsg+0x292>
lea    0x1550(%rip),%rsi
jmp    13b2 <geterrmsg+0x292>
lea    0x15d8(%rip),%rsi
jmp    1234 <geterrmsg+0x114>
lea    0x1614(%rip),%rsi
jmp    1234 <geterrmsg+0x114>
lea    0x163c(%rip),%rsi
jmp    1234 <geterrmsg+0x114>
lea    0x1664(%rip),%rsi
jmp    1234 <geterrmsg+0x114>
lea    0x1694(%rip),%rsi
jmp    1234 <geterrmsg+0x114>
lea    0x154a(%rip),%rsi
jmp    13b2 <geterrmsg+0x292>
lea    0x156b(%rip),%rsi
jmp    13b2 <geterrmsg+0x292>
lea    0x16a4(%rip),%rsi
jmp    1234 <geterrmsg+0x114>
lea    0x16ce(%rip),%rsi
lea    0x15ba(%rip),%rdx
lea    0x168c(%rip),%rcx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <sprintf@plt>
jmp    13ba <geterrmsg+0x29a>
movups 0x16fe(%rip),%xmm0
movups %xmm0,0x20(%rbx)
movups 0x16e3(%rip),%xmm0
movups %xmm0,0x10(%rbx)
movups 0x16c8(%rip),%xmm0
movups %xmm0,(%rbx)
movabs $0x2e74616d726f66,%rax
mov    %rax,0x30(%rbx)
jmp    13ba <geterrmsg+0x29a>
movups 0x1713(%rip),%xmm0
movups %xmm0,0x30(%rbx)
movups 0x16f8(%rip),%xmm0
movups %xmm0,0x20(%rbx)
movups 0x16dd(%rip),%xmm0
movups %xmm0,0x10(%rbx)
movups 0x16c2(%rip),%xmm0
movups %xmm0,(%rbx)
jmp    13ba <geterrmsg+0x29a>
movups 0x1723(%rip),%xmm0
movups %xmm0,0x30(%rbx)
movups 0x1708(%rip),%xmm0
movups %xmm0,0x20(%rbx)
movups 0x16ed(%rip),%xmm0
movups %xmm0,0x10(%rbx)
movups 0x16d2(%rip),%xmm0
movups %xmm0,(%rbx)
movabs $0x2e7865646e6920,%rax
mov    %rax,0x3e(%rbx)
jmp    13ba <geterrmsg+0x29a>
movups 0x172b(%rip),%xmm0
movups %xmm0,0x30(%rbx)
movups 0x1710(%rip),%xmm0
movups %xmm0,0x20(%rbx)
movups 0x16f5(%rip),%xmm0
movups %xmm0,0x10(%rbx)
movups 0x16da(%rip),%xmm0
movups %xmm0,(%rbx)
movb   $0x0,0x40(%rbx)
jmp    13ba <geterrmsg+0x29a>
movups 0x1738(%rip),%xmm0
movups %xmm0,0x30(%rbx)
movups 0x171d(%rip),%xmm0
movups %xmm0,0x20(%rbx)
movups 0x1702(%rip),%xmm0
movups %xmm0,0x10(%rbx)
movups 0x16e7(%rip),%xmm0
movups %xmm0,(%rbx)
movl   $0x2e6465,0x40(%rbx)
jmp    13ba <geterrmsg+0x29a>
lea    0x1718(%rip),%rsi
jmp    13b2 <geterrmsg+0x292>
lea    0x1735(%rip),%rsi
jmp    13b2 <geterrmsg+0x292>
lea    0x1754(%rip),%rsi
jmp    13b2 <geterrmsg+0x292>
lea    0x1774(%rip),%rsi
jmp    13b2 <geterrmsg+0x292>
lea    0x179b(%rip),%rsi
jmp    13b2 <geterrmsg+0x292>
lea    0x17bf(%rip),%rsi
jmp    13b2 <geterrmsg+0x292>
lea    0x17f3(%rip),%rsi
jmp    13b2 <geterrmsg+0x292>
lea    0x1817(%rip),%rsi
jmp    13b2 <geterrmsg+0x292>
lea    0x183b(%rip),%rsi
jmp    13b2 <geterrmsg+0x292>
lea    0x1866(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [49 x i8] c"System Error 101: insufficient memory available.\00"
@.str.1 = [45 x i8] c"System Error 102: no network data available.\00"
@.str.2 = [46 x i8] c"System Error 103: hydraulics not initialized.\00"
@.str.3 = [60 x i8] c"System Error 104: no hydraulics for water quality analysis.\00"
@.str.4 = [49 x i8] c"System Error 105: water quality not initialized.\00"
@.str.5 = [49 x i8] c"System Error 106: no results saved to report on.\00"
@.str.6 = [58 x i8] c"System Error 107: hydraulics supplied from external file.\00"
@.str.7 = [78 x i8] c"System Error 108: cannot use external file while hydraulics solver is active.\00"
@.str.8 = [70 x i8] c"System Error 109: cannot change time parameter when solver is active.\00"
@.str.9 = [60 x i8] c"System Error 110: cannot solve network hydraulic equations.\00"
@.str.10 = [66 x i8] c"System Error 120: cannot solve water quality transport equations.\00"
@.str.11 = [51 x i8] c"Input Error 200: one or more errors in input file.\00"
@.str.12 = [45 x i8] c"Input Error 223: not enough nodes in network\00"
@.str.13 = [52 x i8] c"Input Error 224: no tanks or reservoirs in network.\00"
@.str.14 = [55 x i8] c"Input Error 202: %s %s contains illegal numeric value.\00"
@.str.15 = [14 x i8] c"function call\00"
@.str.16 = [1 x i8] zeroinitializer
@.str.17 = [49 x i8] c"Input Error 203: %s %s refers to undefined node.\00"
@.str.18 = [49 x i8] c"Input Error 204: %s %s refers to undefined link.\00"
@.str.19 = [57 x i8] c"Input Error 205: %s %s refers to undefined time pattern.\00"
@.str.20 = [49 x i8] c"Input Error 207: %s %s attempts to control a CV.\00"
@.str.21 = [51 x i8] c"Input Error 240: %s %s refers to undefined source.\00"
@.str.22 = [52 x i8] c"Input Error 241: %s %s refers to undefined control.\00"
@.str.23 = [56 x i8] c"Input Error 250: function call contains invalid format.\00"
@.str.24 = [64 x i8] c"Input Error 251: function call contains invalid parameter code.\00"
@.str.25 = [70 x i8] c"Input Error 253: Function call error - No such demand category index.\00"
@.str.26 = [65 x i8] c"Input Error 254: Function call error - Node have no coordinates.\00"
@.str.27 = [68 x i8] c"Input Error 255: Function call error - Coordinates were not loaded.\00"
@.str.28 = [38 x i8] c"File Error 301: identical file names.\00"
@.str.29 = [40 x i8] c"File Error 302: cannot open input file.\00"
@.str.30 = [41 x i8] c"File Error 303: cannot open report file.\00"
@.str.31 = [48 x i8] c"File Error 304: cannot open binary output file.\00"
@.str.32 = [45 x i8] c"File Error 305: cannot open hydraulics file.\00"
@.str.33 = [61 x i8] c"File Error 306: hydraulics file does not match network data.\00"
@.str.34 = [45 x i8] c"File Error 307: cannot read hydraulics file.\00"
@.str.35 = [45 x i8] c"File Error 308: cannot save results to file.\00"
@.str.36 = [52 x i8] c"File Error 309: cannot save results to report file.\00"
@.str.37 = [61 x i8] c"Sync Error 401: Qstep is not dividable by Hstep. Can't sync.\00"
define i8* @geterrmsg(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
switch i32 %5, label %114 [
i32 101, label %6
i32 102, label %9
i32 103, label %12
i32 104, label %15
i32 105, label %18
i32 106, label %21
i32 107, label %24
i32 108, label %27
i32 109, label %30
i32 110, label %33
i32 120, label %36
i32 200, label %39
i32 223, label %42
i32 224, label %45
i32 202, label %48
i32 203, label %51
i32 204, label %54
i32 205, label %57
i32 207, label %60
i32 240, label %63
i32 241, label %66
i32 250, label %69
i32 251, label %72
i32 253, label %75
i32 254, label %78
i32 255, label %81
i32 301, label %84
i32 302, label %87
i32 303, label %90
i32 304, label %93
i32 305, label %96
i32 306, label %99
i32 307, label %102
i32 308, label %105
i32 309, label %108
i32 401, label %111
]
6: ; preds = %2
%7 = load i8*, i8** %4
%8 = call i32 @strcpy(i8* %7, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
br label %117
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = call i32 @strcpy(i8* %10, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0))
br label %117
12: ; preds = %2
%13 = load i8*, i8** %4
%14 = call i32 @strcpy(i8* %13, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
br label %117
15: ; preds = %2
%16 = load i8*, i8** %4
%17 = call i32 @strcpy(i8* %16, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.3, i64 0, i64 0))
br label %117
18: ; preds = %2
%19 = load i8*, i8** %4
%20 = call i32 @strcpy(i8* %19, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.4, i64 0, i64 0))
br label %117
21: ; preds = %2
%22 = load i8*, i8** %4
%23 = call i32 @strcpy(i8* %22, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.5, i64 0, i64 0))
br label %117
24: ; preds = %2
%25 = load i8*, i8** %4
%26 = call i32 @strcpy(i8* %25, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.6, i64 0, i64 0))
br label %117
27: ; preds = %2
%28 = load i8*, i8** %4
%29 = call i32 @strcpy(i8* %28, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.7, i64 0, i64 0))
br label %117
30: ; preds = %2
%31 = load i8*, i8** %4
%32 = call i32 @strcpy(i8* %31, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.8, i64 0, i64 0))
br label %117
33: ; preds = %2
%34 = load i8*, i8** %4
%35 = call i32 @strcpy(i8* %34, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.9, i64 0, i64 0))
br label %117
36: ; preds = %2
%37 = load i8*, i8** %4
%38 = call i32 @strcpy(i8* %37, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.10, i64 0, i64 0))
br label %117
39: ; preds = %2
%40 = load i8*, i8** %4
%41 = call i32 @strcpy(i8* %40, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.11, i64 0, i64 0))
br label %117
42: ; preds = %2
%43 = load i8*, i8** %4
%44 = call i32 @strcpy(i8* %43, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.12, i64 0, i64 0))
br label %117
45: ; preds = %2
%46 = load i8*, i8** %4
%47 = call i32 @strcpy(i8* %46, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.13, i64 0, i64 0))
br label %117
48: ; preds = %2
%49 = load i8*, i8** %4
%50 = call i32 (i8*, i8*, ...) @sprintf(i8* %49, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.16, i64 0, i64 0))
br label %117
51: ; preds = %2
%52 = load i8*, i8** %4
%53 = call i32 (i8*, i8*, ...) @sprintf(i8* %52, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.16, i64 0, i64 0))
br label %117
54: ; preds = %2
%55 = load i8*, i8** %4
%56 = call i32 (i8*, i8*, ...) @sprintf(i8* %55, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.16, i64 0, i64 0))
br label %117
57: ; preds = %2
%58 = load i8*, i8** %4
%59 = call i32 (i8*, i8*, ...) @sprintf(i8* %58, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.16, i64 0, i64 0))
br label %117
60: ; preds = %2
%61 = load i8*, i8** %4
%62 = call i32 (i8*, i8*, ...) @sprintf(i8* %61, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.16, i64 0, i64 0))
br label %117
63: ; preds = %2
%64 = load i8*, i8** %4
%65 = call i32 (i8*, i8*, ...) @sprintf(i8* %64, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.21, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.16, i64 0, i64 0))
br label %117
66: ; preds = %2
%67 = load i8*, i8** %4
%68 = call i32 (i8*, i8*, ...) @sprintf(i8* %67, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.16, i64 0, i64 0))
br label %117
69: ; preds = %2
%70 = load i8*, i8** %4
%71 = call i32 (i8*, i8*, ...) @sprintf(i8* %70, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.23, i64 0, i64 0))
br label %117
72: ; preds = %2
%73 = load i8*, i8** %4
%74 = call i32 (i8*, i8*, ...) @sprintf(i8* %73, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.24, i64 0, i64 0))
br label %117
75: ; preds = %2
%76 = load i8*, i8** %4
%77 = call i32 (i8*, i8*, ...) @sprintf(i8* %76, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.25, i64 0, i64 0))
br label %117
78: ; preds = %2
%79 = load i8*, i8** %4
%80 = call i32 (i8*, i8*, ...) @sprintf(i8* %79, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.26, i64 0, i64 0))
br label %117
81: ; preds = %2
%82 = load i8*, i8** %4
%83 = call i32 (i8*, i8*, ...) @sprintf(i8* %82, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.27, i64 0, i64 0))
br label %117
84: ; preds = %2
%85 = load i8*, i8** %4
%86 = call i32 @strcpy(i8* %85, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.28, i64 0, i64 0))
br label %117
87: ; preds = %2
%88 = load i8*, i8** %4
%89 = call i32 @strcpy(i8* %88, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.29, i64 0, i64 0))
br label %117
90: ; preds = %2
%91 = load i8*, i8** %4
%92 = call i32 @strcpy(i8* %91, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.30, i64 0, i64 0))
br label %117
93: ; preds = %2
%94 = load i8*, i8** %4
%95 = call i32 @strcpy(i8* %94, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.31, i64 0, i64 0))
br label %117
96: ; preds = %2
%97 = load i8*, i8** %4
%98 = call i32 @strcpy(i8* %97, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.32, i64 0, i64 0))
br label %117
99: ; preds = %2
%100 = load i8*, i8** %4
%101 = call i32 @strcpy(i8* %100, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.33, i64 0, i64 0))
br label %117
102: ; preds = %2
%103 = load i8*, i8** %4
%104 = call i32 @strcpy(i8* %103, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.34, i64 0, i64 0))
br label %117
105: ; preds = %2
%106 = load i8*, i8** %4
%107 = call i32 @strcpy(i8* %106, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.35, i64 0, i64 0))
br label %117
108: ; preds = %2
%109 = load i8*, i8** %4
%110 = call i32 @strcpy(i8* %109, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.36, i64 0, i64 0))
br label %117
111: ; preds = %2
%112 = load i8*, i8** %4
%113 = call i32 @strcpy(i8* %112, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.37, i64 0, i64 0))
br label %117
114: ; preds = %2
%115 = load i8*, i8** %4
%116 = call i32 @strcpy(i8* %115, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.16, i64 0, i64 0))
br label %117
117: ; preds = %114, %111, %108, %105, %102, %99, %96, %93, %90, %87, %84, %81, %78, %75, %72, %69, %66, %63, %60, %57, %54, %51, %48, %45, %42, %39, %36, %33, %30, %27, %24, %21, %18, %15, %12, %9, %6
%118 = load i8*, i8** %4
ret i8* %118
}

LLVM IR (-O2):
@.str = [49 x i8] c"System Error 101: insufficient memory available.\00"
@.str.1 = [45 x i8] c"System Error 102: no network data available.\00"
@.str.2 = [46 x i8] c"System Error 103: hydraulics not initialized.\00"
@.str.3 = [60 x i8] c"System Error 104: no hydraulics for water quality analysis.\00"
@.str.4 = [49 x i8] c"System Error 105: water quality not initialized.\00"
@.str.5 = [49 x i8] c"System Error 106: no results saved to report on.\00"
@.str.6 = [58 x i8] c"System Error 107: hydraulics supplied from external file.\00"
@.str.7 = [78 x i8] c"System Error 108: cannot use external file while hydraulics solver is active.\00"
@.str.8 = [70 x i8] c"System Error 109: cannot change time parameter when solver is active.\00"
@.str.9 = [60 x i8] c"System Error 110: cannot solve network hydraulic equations.\00"
@.str.10 = [66 x i8] c"System Error 120: cannot solve water quality transport equations.\00"
@.str.11 = [51 x i8] c"Input Error 200: one or more errors in input file.\00"
@.str.12 = [45 x i8] c"Input Error 223: not enough nodes in network\00"
@.str.13 = [52 x i8] c"Input Error 224: no tanks or reservoirs in network.\00"
@.str.14 = [55 x i8] c"Input Error 202: %s %s contains illegal numeric value.\00"
@.str.15 = [14 x i8] c"function call\00"
@.str.16 = [1 x i8] zeroinitializer
@.str.17 = [49 x i8] c"Input Error 203: %s %s refers to undefined node.\00"
@.str.18 = [49 x i8] c"Input Error 204: %s %s refers to undefined link.\00"
@.str.19 = [57 x i8] c"Input Error 205: %s %s refers to undefined time pattern.\00"
@.str.20 = [49 x i8] c"Input Error 207: %s %s attempts to control a CV.\00"
@.str.21 = [51 x i8] c"Input Error 240: %s %s refers to undefined source.\00"
@.str.22 = [52 x i8] c"Input Error 241: %s %s refers to undefined control.\00"
@.str.23 = [56 x i8] c"Input Error 250: function call contains invalid format.\00"
@.str.24 = [64 x i8] c"Input Error 251: function call contains invalid parameter code.\00"
@.str.25 = [70 x i8] c"Input Error 253: Function call error - No such demand category index.\00"
@.str.26 = [65 x i8] c"Input Error 254: Function call error - Node have no coordinates.\00"
@.str.27 = [68 x i8] c"Input Error 255: Function call error - Coordinates were not loaded.\00"
@.str.28 = [38 x i8] c"File Error 301: identical file names.\00"
@.str.29 = [40 x i8] c"File Error 302: cannot open input file.\00"
@.str.30 = [41 x i8] c"File Error 303: cannot open report file.\00"
@.str.31 = [48 x i8] c"File Error 304: cannot open binary output file.\00"
@.str.32 = [45 x i8] c"File Error 305: cannot open hydraulics file.\00"
@.str.33 = [61 x i8] c"File Error 306: hydraulics file does not match network data.\00"
@.str.34 = [45 x i8] c"File Error 307: cannot read hydraulics file.\00"
@.str.35 = [45 x i8] c"File Error 308: cannot save results to file.\00"
@.str.36 = [52 x i8] c"File Error 309: cannot save results to report file.\00"
@.str.37 = [61 x i8] c"Sync Error 401: Qstep is not dividable by Hstep. Can't sync.\00"
define i8* @geterrmsg(i32 %0, i8* returned %1) {
switch i32 %0, label %70 [
i32 101, label %3
i32 102, label %5
i32 103, label %7
i32 104, label %9
i32 105, label %11
i32 106, label %13
i32 107, label %15
i32 108, label %17
i32 109, label %19
i32 110, label %21
i32 120, label %23
i32 200, label %25
i32 223, label %27
i32 224, label %29
i32 202, label %31
i32 203, label %33
i32 204, label %35
i32 205, label %37
i32 207, label %39
i32 240, label %41
i32 241, label %43
i32 250, label %45
i32 251, label %46
i32 253, label %47
i32 254, label %48
i32 255, label %49
i32 301, label %50
i32 302, label %52
i32 303, label %54
i32 304, label %56
i32 305, label %58
i32 306, label %60
i32 307, label %62
i32 308, label %64
i32 309, label %66
i32 401, label %68
]
3: ; preds = %2
%4 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
br label %72
5: ; preds = %2
%6 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0))
br label %72
7: ; preds = %2
%8 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
br label %72
9: ; preds = %2
%10 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.3, i64 0, i64 0))
br label %72
11: ; preds = %2
%12 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.4, i64 0, i64 0))
br label %72
13: ; preds = %2
%14 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.5, i64 0, i64 0))
br label %72
15: ; preds = %2
%16 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.6, i64 0, i64 0))
br label %72
17: ; preds = %2
%18 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.7, i64 0, i64 0))
br label %72
19: ; preds = %2
%20 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.8, i64 0, i64 0))
br label %72
21: ; preds = %2
%22 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.9, i64 0, i64 0))
br label %72
23: ; preds = %2
%24 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.10, i64 0, i64 0))
br label %72
25: ; preds = %2
%26 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.11, i64 0, i64 0))
br label %72
27: ; preds = %2
%28 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.12, i64 0, i64 0))
br label %72
29: ; preds = %2
%30 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.13, i64 0, i64 0))
br label %72
31: ; preds = %2
%32 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.16, i64 0, i64 0))
br label %72
33: ; preds = %2
%34 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.16, i64 0, i64 0))
br label %72
35: ; preds = %2
%36 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.16, i64 0, i64 0))
br label %72
37: ; preds = %2
%38 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.16, i64 0, i64 0))
br label %72
39: ; preds = %2
%40 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.16, i64 0, i64 0))
br label %72
41: ; preds = %2
%42 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.21, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.16, i64 0, i64 0))
br label %72
43: ; preds = %2
%44 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.16, i64 0, i64 0))
br label %72
45: ; preds = %2
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(56) %1, i8* align 1 dereferenceable(56) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.23, i64 0, i64 0), i64 56, i1 false)
br label %72
46: ; preds = %2
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(64) %1, i8* align 1 dereferenceable(64) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.24, i64 0, i64 0), i64 64, i1 false)
br label %72
47: ; preds = %2
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(70) %1, i8* align 1 dereferenceable(70) getelementptr inbounds ([70 x i8], [70 x i8]* @.str.25, i64 0, i64 0), i64 70, i1 false)
br label %72
48: ; preds = %2
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(65) %1, i8* align 1 dereferenceable(65) getelementptr inbounds ([65 x i8], [65 x i8]* @.str.26, i64 0, i64 0), i64 65, i1 false)
br label %72
49: ; preds = %2
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(68) %1, i8* align 1 dereferenceable(68) getelementptr inbounds ([68 x i8], [68 x i8]* @.str.27, i64 0, i64 0), i64 68, i1 false)
br label %72
50: ; preds = %2
%51 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.28, i64 0, i64 0))
br label %72
52: ; preds = %2
%53 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.29, i64 0, i64 0))
br label %72
54: ; preds = %2
%55 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.30, i64 0, i64 0))
br label %72
56: ; preds = %2
%57 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.31, i64 0, i64 0))
br label %72
58: ; preds = %2
%59 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.32, i64 0, i64 0))
br label %72
60: ; preds = %2
%61 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.33, i64 0, i64 0))
br label %72
62: ; preds = %2
%63 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.34, i64 0, i64 0))
br label %72
64: ; preds = %2
%65 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.35, i64 0, i64 0))
br label %72
66: ; preds = %2
%67 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.36, i64 0, i64 0))
br label %72
68: ; preds = %2
%69 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.37, i64 0, i64 0))
br label %72
70: ; preds = %2
%71 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.16, i64 0, i64 0))
br label %72
72: ; preds = %70, %68, %66, %64, %62, %60, %58, %56, %54, %52, %50, %49, %48, %47, %46, %45, %43, %41, %39, %37, %35, %33, %31, %29, %27, %25, %23, %21, %19, %17, %15, %13, %11, %9, %7, %5, %3
ret i8* %1
}