#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 */
typedef int /*<<< orphan*/ numBuf;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
void printError(FILE *outFile, int errorCode, int lineNum) {
  char numBuf[20];
  numBuf[0] = '\0';
  if (lineNum >= 0)
    snprintf(numBuf, sizeof(numBuf), " in line %d", lineNum);
  switch (errorCode) {
  case 0x401:
    fprintf(outFile, "ERROR%s: Invalid syntax\n", numBuf);
    break;
  case 0x301:
    fprintf(outFile, "ERROR%s: Undefined symbol\n", numBuf);
    break;
  case 0x302:
    fprintf(outFile, "ERROR%s: Division by zero attempted\n", numBuf);
    break;
  case 0x102:
    fprintf(outFile, "WARNING%s: Numeric constant exceeds 32 bits\n", numBuf);
    break;
  case 0x101:
    fprintf(outFile, "WARNING%s: ASCII constant exceeds 4 characters\n",
            numBuf);
    break;
  case 0x402:
    fprintf(outFile, "ERROR%s: Invalid opcode\n", numBuf);
    break;
  case 0x201:
    fprintf(outFile, "WARNING%s: Invalid size code\n", numBuf);
    break;
  case 0x403:
    fprintf(outFile, "ERROR%s: Invalid addressing mode\n", numBuf);
    break;
  case 0x303:
    fprintf(outFile, "ERROR%s: Symbol multiply defined\n", numBuf);
    break;
  case 0x405:
    fprintf(outFile,
            "ERROR%s: Symbol value differs between first and second pass\n",
            numBuf);
    break;
  case 0x202:
    fprintf(outFile, "ERROR%s: MOVEQ instruction constant out of range\n",
            numBuf);
    break;
  case 0x203:
    fprintf(outFile, "ERROR%s: Invalid vector number\n", numBuf);
    break;
  case 0x204:
    fprintf(
        outFile,
        "ERROR%s: Branch instruction displacement is out of range or invalid\n",
        numBuf);
    break;
  case 0x404:
    fprintf(outFile, "ERROR%s: Label required with this directive\n", numBuf);
    break;
  case 0x205:
    fprintf(outFile, "ERROR%s: Displacement out of range\n", numBuf);
    break;
  case 0x206:
    fprintf(outFile, "ERROR%s: Absolute address exceeds 16 bits\n", numBuf);
    break;
  case 0x207:
    fprintf(outFile, "ERROR%s: Immediate data exceeds 8 bits\n", numBuf);
    break;
  case 0x208:
    fprintf(outFile, "ERROR%s: Immediate data exceeds 16 bits\n", numBuf);
    break;
  case 0x103:
    fprintf(outFile,
            "WARNING%s: Evaluation of expression could not be completed\n",
            numBuf);
    break;
  case 0x20A:
    fprintf(outFile,
            "ERROR%s: The symbol specified is not a register list symbol\n",
            numBuf);
    break;
  case 0x20B:
    fprintf(outFile, "ERROR%s: Register list symbol used in an expression\n",
            numBuf);
    break;
  case 0x305:
    fprintf(outFile, "ERROR%s: Register list symbol not previously defined\n",
            numBuf);
    break;
  case 0x20C:
    fprintf(outFile, "ERROR%s: Invalid constant shift count\n", numBuf);
    break;
  case 0x306:
    fprintf(outFile,
            "ERROR%s: Forward references not allowed with this directive\n",
            numBuf);
    break;
  case 0x307:
    fprintf(outFile, "ERROR%s: Block length is less that zero\n", numBuf);
    break;
  case 0x209:
    fprintf(outFile,
            "ERROR%s: Origin value is odd (Location counter set to next "
            "highest address)\n",
            numBuf);
    break;
  default:
    if (errorCode > 0x300)
      fprintf(outFile, "ERROR%s: No message defined\n", numBuf);
    else if (errorCode > 0x100)
      fprintf(outFile, "WARNING%s: No message defined\n", numBuf);
  }
}


x86 assembly (clang, -O0):
<printError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movb   $0x0,-0x30(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1158 <printError+0x38>
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%ecx
mov    $0x14,%esi
lea    0xead(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x34(%rbp)
sub    $0x101,%eax
je     13ad <printError+0x28d>
jmp    116e <printError+0x4e>
mov    -0x34(%rbp),%eax
sub    $0x102,%eax
je     1394 <printError+0x274>
jmp    1181 <printError+0x61>
mov    -0x34(%rbp),%eax
sub    $0x103,%eax
je     150b <printError+0x3eb>
jmp    1194 <printError+0x74>
mov    -0x34(%rbp),%eax
sub    $0x201,%eax
je     13df <printError+0x2bf>
jmp    11a7 <printError+0x87>
mov    -0x34(%rbp),%eax
sub    $0x202,%eax
je     1443 <printError+0x323>
jmp    11ba <printError+0x9a>
mov    -0x34(%rbp),%eax
sub    $0x203,%eax
je     145c <printError+0x33c>
jmp    11cd <printError+0xad>
mov    -0x34(%rbp),%eax
sub    $0x204,%eax
je     1475 <printError+0x355>
jmp    11e0 <printError+0xc0>
mov    -0x34(%rbp),%eax
sub    $0x205,%eax
je     14a7 <printError+0x387>
jmp    11f3 <printError+0xd3>
mov    -0x34(%rbp),%eax
sub    $0x206,%eax
je     14c0 <printError+0x3a0>
jmp    1206 <printError+0xe6>
mov    -0x34(%rbp),%eax
sub    $0x207,%eax
je     14d9 <printError+0x3b9>
jmp    1219 <printError+0xf9>
mov    -0x34(%rbp),%eax
sub    $0x208,%eax
je     14f2 <printError+0x3d2>
jmp    122c <printError+0x10c>
mov    -0x34(%rbp),%eax
sub    $0x209,%eax
je     15ba <printError+0x49a>
jmp    123f <printError+0x11f>
mov    -0x34(%rbp),%eax
sub    $0x20a,%eax
je     1524 <printError+0x404>
jmp    1252 <printError+0x132>
mov    -0x34(%rbp),%eax
sub    $0x20b,%eax
je     153d <printError+0x41d>
jmp    1265 <printError+0x145>
mov    -0x34(%rbp),%eax
sub    $0x20c,%eax
je     156f <printError+0x44f>
jmp    1278 <printError+0x158>
mov    -0x34(%rbp),%eax
sub    $0x301,%eax
je     1362 <printError+0x242>
jmp    128b <printError+0x16b>
mov    -0x34(%rbp),%eax
sub    $0x302,%eax
je     137b <printError+0x25b>
jmp    129e <printError+0x17e>
mov    -0x34(%rbp),%eax
sub    $0x303,%eax
je     1411 <printError+0x2f1>
jmp    12b1 <printError+0x191>
mov    -0x34(%rbp),%eax
sub    $0x305,%eax
je     1556 <printError+0x436>
jmp    12c4 <printError+0x1a4>
mov    -0x34(%rbp),%eax
sub    $0x306,%eax
je     1588 <printError+0x468>
jmp    12d7 <printError+0x1b7>
mov    -0x34(%rbp),%eax
sub    $0x307,%eax
je     15a1 <printError+0x481>
jmp    12ea <printError+0x1ca>
mov    -0x34(%rbp),%eax
sub    $0x401,%eax
je     1349 <printError+0x229>
jmp    12fd <printError+0x1dd>
mov    -0x34(%rbp),%eax
sub    $0x402,%eax
je     13c6 <printError+0x2a6>
jmp    1310 <printError+0x1f0>
mov    -0x34(%rbp),%eax
sub    $0x403,%eax
je     13f8 <printError+0x2d8>
jmp    1323 <printError+0x203>
mov    -0x34(%rbp),%eax
sub    $0x404,%eax
je     148e <printError+0x36e>
jmp    1336 <printError+0x216>
mov    -0x34(%rbp),%eax
sub    $0x405,%eax
je     142a <printError+0x30a>
jmp    15d3 <printError+0x4b3>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xcb4(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1624 <printError+0x504>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xcb4(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1624 <printError+0x504>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xcb6(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1624 <printError+0x504>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xcc2(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1624 <printError+0x504>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xcd6(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1624 <printError+0x504>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xced(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1624 <printError+0x504>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xced(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1624 <printError+0x504>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xcf2(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1624 <printError+0x504>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xcfb(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1624 <printError+0x504>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xd04(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1624 <printError+0x504>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xd28(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1624 <printError+0x504>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xd41(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1624 <printError+0x504>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xd48(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1624 <printError+0x504>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xd74(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1624 <printError+0x504>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xd88(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1624 <printError+0x504>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xd93(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1624 <printError+0x504>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xda5(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1624 <printError+0x504>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xdb4(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1624 <printError+0x504>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xdc4(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1624 <printError+0x504>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xde7(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1624 <printError+0x504>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xe0b(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1624 <printError+0x504>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xe27(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1624 <printError+0x504>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xe44(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1624 <printError+0x504>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xe52(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1624 <printError+0x504>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xe76(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1624 <printError+0x504>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xe86(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1624 <printError+0x504>
cmpl   $0x300,-0xc(%rbp)
jle    15f9 <printError+0x4d9>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xead(%rip),%rsi
call   1040 <fprintf@plt>
jmp    161f <printError+0x4ff>
cmpl   $0x100,-0xc(%rbp)
jle    161a <printError+0x4fa>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xea4(%rip),%rsi
call   1040 <fprintf@plt>
jmp    161f <printError+0x4ff>
jmp    1624 <printError+0x504>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printError>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %esi,%ebx
mov    %rdi,%r14
movb   $0x0,(%rsp)
test   %edx,%edx
js     114a <printError+0x2a>
mov    %edx,%ecx
lea    0xf23(%rip),%rdx
mov    %rsp,%rdi
mov    $0x14,%esi
call   1030 <snprintf@plt>
cmp    $0x200,%ebx
jg     117a <printError+0x5a>
cmp    $0x101,%ebx
je     11c8 <printError+0xa8>
cmp    $0x102,%ebx
je     11d4 <printError+0xb4>
cmp    $0x103,%ebx
jne    120e <printError+0xee>
lea    0x11c9(%rip),%rsi
jmp    12ef <printError+0x1cf>
lea    -0x201(%rbx),%eax
cmp    $0xb,%eax
ja     11a1 <printError+0x81>
lea    0xe74(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf9f(%rip),%rsi
jmp    12ef <printError+0x1cf>
lea    -0x301(%rbx),%eax
cmp    $0x6,%eax
ja     11e0 <printError+0xc0>
lea    0xe7d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xec2(%rip),%rsi
jmp    12ef <printError+0x1cf>
lea    0xf23(%rip),%rsi
jmp    12ef <printError+0x1cf>
lea    0xeea(%rip),%rsi
jmp    12ef <printError+0x1cf>
lea    -0x401(%rbx),%eax
cmp    $0x4,%eax
ja     120e <printError+0xee>
lea    0xe7a(%rip),%rsi
lea    0xe53(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf19(%rip),%rsi
jmp    12ef <printError+0x1cf>
cmp    $0x300,%ebx
jle    1222 <printError+0x102>
lea    0x12df(%rip),%rsi
jmp    12ef <printError+0x1cf>
cmp    $0x101,%ebx
jl     12fa <printError+0x1da>
lea    0x12e4(%rip),%rsi
jmp    12ef <printError+0x1cf>
lea    0xf99(%rip),%rsi
jmp    12ef <printError+0x1cf>
lea    0xfbf(%rip),%rsi
jmp    12ef <printError+0x1cf>
lea    0xfd3(%rip),%rsi
jmp    12ef <printError+0x1cf>
lea    0x1039(%rip),%rsi
jmp    12ef <printError+0x1cf>
lea    0x1051(%rip),%rsi
jmp    12ef <printError+0x1cf>
lea    0x1073(%rip),%rsi
jmp    12ef <printError+0x1cf>
lea    0x1092(%rip),%rsi
jmp    12ef <printError+0x1cf>
lea    0x1223(%rip),%rsi
jmp    12ef <printError+0x1cf>
lea    0x10e5(%rip),%rsi
jmp    12ef <printError+0x1cf>
lea    0x1119(%rip),%rsi
jmp    12ef <printError+0x1cf>
lea    0x117b(%rip),%rsi
jmp    12ef <printError+0x1cf>
lea    0xdf0(%rip),%rsi
jmp    12ef <printError+0x1cf>
lea    0xec2(%rip),%rsi
jmp    12ef <printError+0x1cf>
lea    0x112a(%rip),%rsi
jmp    12ef <printError+0x1cf>
lea    0x117e(%rip),%rsi
jmp    12ef <printError+0x1cf>
lea    0x11b2(%rip),%rsi
jmp    12ef <printError+0x1cf>
lea    0xe7c(%rip),%rsi
jmp    12ef <printError+0x1cf>
lea    0xf8b(%rip),%rsi
jmp    12ef <printError+0x1cf>
lea    0xeae(%rip),%rsi
mov    %rsp,%rdx
mov    %r14,%rdi
call   1040 <fprintf@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [12 x i8] c" in line %d\00"
@.str.1 = [25 x i8] c"ERROR%s: Invalid syntax\0A\00"
@.str.2 = [27 x i8] c"ERROR%s: Undefined symbol\0A\00"
@.str.3 = [37 x i8] c"ERROR%s: Division by zero attempted\0A\00"
@.str.4 = [45 x i8] c"WARNING%s: Numeric constant exceeds 32 bits\0A\00"
@.str.5 = [48 x i8] c"WARNING%s: ASCII constant exceeds 4 characters\0A\00"
@.str.6 = [25 x i8] c"ERROR%s: Invalid opcode\0A\00"
@.str.7 = [30 x i8] c"WARNING%s: Invalid size code\0A\00"
@.str.8 = [34 x i8] c"ERROR%s: Invalid addressing mode\0A\00"
@.str.9 = [34 x i8] c"ERROR%s: Symbol multiply defined\0A\00"
@.str.10 = [61 x i8] c"ERROR%s: Symbol value differs between first and second pass\0A\00"
@.str.11 = [50 x i8] c"ERROR%s: MOVEQ instruction constant out of range\0A\00"
@.str.12 = [32 x i8] c"ERROR%s: Invalid vector number\0A\00"
@.str.13 = [69 x i8] c"ERROR%s: Branch instruction displacement is out of range or invalid\0A\00"
@.str.14 = [45 x i8] c"ERROR%s: Label required with this directive\0A\00"
@.str.15 = [36 x i8] c"ERROR%s: Displacement out of range\0A\00"
@.str.16 = [43 x i8] c"ERROR%s: Absolute address exceeds 16 bits\0A\00"
@.str.17 = [40 x i8] c"ERROR%s: Immediate data exceeds 8 bits\0A\00"
@.str.18 = [41 x i8] c"ERROR%s: Immediate data exceeds 16 bits\0A\00"
@.str.19 = [60 x i8] c"WARNING%s: Evaluation of expression could not be completed\0A\00"
@.str.20 = [61 x i8] c"ERROR%s: The symbol specified is not a register list symbol\0A\00"
@.str.21 = [53 x i8] c"ERROR%s: Register list symbol used in an expression\0A\00"
@.str.22 = [54 x i8] c"ERROR%s: Register list symbol not previously defined\0A\00"
@.str.23 = [39 x i8] c"ERROR%s: Invalid constant shift count\0A\00"
@.str.24 = [61 x i8] c"ERROR%s: Forward references not allowed with this directive\0A\00"
@.str.25 = [41 x i8] c"ERROR%s: Block length is less that zero\0A\00"
@.str.26 = [77 x i8] c"ERROR%s: Origin value is odd (Location counter set to next highest address)\0A\00"
@.str.27 = [29 x i8] c"ERROR%s: No message defined\0A\00"
@.str.28 = [31 x i8] c"WARNING%s: No message defined\0A\00"
define void @printError(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca [20 x i8]
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
store i8 0, i8* %8
%9 = load i32, i32* %6
%10 = icmp sge i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %3
%12 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%13 = load i32, i32* %6
%14 = call i32 @snprintf(i8* %12, i32 20, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %13)
br label %15
15: ; preds = %11, %3
%16 = load i32, i32* %5
switch i32 %16, label %121 [
i32 1025, label %17
i32 769, label %21
i32 770, label %25
i32 258, label %29
i32 257, label %33
i32 1026, label %37
i32 513, label %41
i32 1027, label %45
i32 771, label %49
i32 1029, label %53
i32 514, label %57
i32 515, label %61
i32 516, label %65
i32 1028, label %69
i32 517, label %73
i32 518, label %77
i32 519, label %81
i32 520, label %85
i32 259, label %89
i32 522, label %93
i32 523, label %97
i32 773, label %101
i32 524, label %105
i32 774, label %109
i32 775, label %113
i32 521, label %117
]
17: ; preds = %15
%18 = load i32*, i32** %4
%19 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%20 = call i32 @fprintf(i32* %18, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* %19)
br label %137
21: ; preds = %15
%22 = load i32*, i32** %4
%23 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%24 = call i32 @fprintf(i32* %22, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i8* %23)
br label %137
25: ; preds = %15
%26 = load i32*, i32** %4
%27 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%28 = call i32 @fprintf(i32* %26, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), i8* %27)
br label %137
29: ; preds = %15
%30 = load i32*, i32** %4
%31 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%32 = call i32 @fprintf(i32* %30, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0), i8* %31)
br label %137
33: ; preds = %15
%34 = load i32*, i32** %4
%35 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%36 = call i32 @fprintf(i32* %34, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.5, i64 0, i64 0), i8* %35)
br label %137
37: ; preds = %15
%38 = load i32*, i32** %4
%39 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%40 = call i32 @fprintf(i32* %38, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i8* %39)
br label %137
41: ; preds = %15
%42 = load i32*, i32** %4
%43 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%44 = call i32 @fprintf(i32* %42, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0), i8* %43)
br label %137
45: ; preds = %15
%46 = load i32*, i32** %4
%47 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%48 = call i32 @fprintf(i32* %46, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.8, i64 0, i64 0), i8* %47)
br label %137
49: ; preds = %15
%50 = load i32*, i32** %4
%51 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%52 = call i32 @fprintf(i32* %50, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0), i8* %51)
br label %137
53: ; preds = %15
%54 = load i32*, i32** %4
%55 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%56 = call i32 @fprintf(i32* %54, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.10, i64 0, i64 0), i8* %55)
br label %137
57: ; preds = %15
%58 = load i32*, i32** %4
%59 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%60 = call i32 @fprintf(i32* %58, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.11, i64 0, i64 0), i8* %59)
br label %137
61: ; preds = %15
%62 = load i32*, i32** %4
%63 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%64 = call i32 @fprintf(i32* %62, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.12, i64 0, i64 0), i8* %63)
br label %137
65: ; preds = %15
%66 = load i32*, i32** %4
%67 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%68 = call i32 @fprintf(i32* %66, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.13, i64 0, i64 0), i8* %67)
br label %137
69: ; preds = %15
%70 = load i32*, i32** %4
%71 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%72 = call i32 @fprintf(i32* %70, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.14, i64 0, i64 0), i8* %71)
br label %137
73: ; preds = %15
%74 = load i32*, i32** %4
%75 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%76 = call i32 @fprintf(i32* %74, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.15, i64 0, i64 0), i8* %75)
br label %137
77: ; preds = %15
%78 = load i32*, i32** %4
%79 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%80 = call i32 @fprintf(i32* %78, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.16, i64 0, i64 0), i8* %79)
br label %137
81: ; preds = %15
%82 = load i32*, i32** %4
%83 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%84 = call i32 @fprintf(i32* %82, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.17, i64 0, i64 0), i8* %83)
br label %137
85: ; preds = %15
%86 = load i32*, i32** %4
%87 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%88 = call i32 @fprintf(i32* %86, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.18, i64 0, i64 0), i8* %87)
br label %137
89: ; preds = %15
%90 = load i32*, i32** %4
%91 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%92 = call i32 @fprintf(i32* %90, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.19, i64 0, i64 0), i8* %91)
br label %137
93: ; preds = %15
%94 = load i32*, i32** %4
%95 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%96 = call i32 @fprintf(i32* %94, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.20, i64 0, i64 0), i8* %95)
br label %137
97: ; preds = %15
%98 = load i32*, i32** %4
%99 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%100 = call i32 @fprintf(i32* %98, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.21, i64 0, i64 0), i8* %99)
br label %137
101: ; preds = %15
%102 = load i32*, i32** %4
%103 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%104 = call i32 @fprintf(i32* %102, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.22, i64 0, i64 0), i8* %103)
br label %137
105: ; preds = %15
%106 = load i32*, i32** %4
%107 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%108 = call i32 @fprintf(i32* %106, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.23, i64 0, i64 0), i8* %107)
br label %137
109: ; preds = %15
%110 = load i32*, i32** %4
%111 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%112 = call i32 @fprintf(i32* %110, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.24, i64 0, i64 0), i8* %111)
br label %137
113: ; preds = %15
%114 = load i32*, i32** %4
%115 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%116 = call i32 @fprintf(i32* %114, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.25, i64 0, i64 0), i8* %115)
br label %137
117: ; preds = %15
%118 = load i32*, i32** %4
%119 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%120 = call i32 @fprintf(i32* %118, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.26, i64 0, i64 0), i8* %119)
br label %137
121: ; preds = %15
%122 = load i32, i32* %5
%123 = icmp sgt i32 %122, 768
br i1 %123, label %124, label %128
124: ; preds = %121
%125 = load i32*, i32** %4
%126 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%127 = call i32 @fprintf(i32* %125, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.27, i64 0, i64 0), i8* %126)
br label %136
128: ; preds = %121
%129 = load i32, i32* %5
%130 = icmp sgt i32 %129, 256
br i1 %130, label %131, label %135
131: ; preds = %128
%132 = load i32*, i32** %4
%133 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%134 = call i32 @fprintf(i32* %132, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.28, i64 0, i64 0), i8* %133)
br label %135
135: ; preds = %131, %128
br label %136
136: ; preds = %135, %124
br label %137
137: ; preds = %136, %117, %113, %109, %105, %101, %97, %93, %89, %85, %81, %77, %73, %69, %65, %61, %57, %53, %49, %45, %41, %37, %33, %29, %25, %21, %17
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c" in line %d\00"
@.str.1 = [25 x i8] c"ERROR%s: Invalid syntax\0A\00"
@.str.2 = [27 x i8] c"ERROR%s: Undefined symbol\0A\00"
@.str.3 = [37 x i8] c"ERROR%s: Division by zero attempted\0A\00"
@.str.4 = [45 x i8] c"WARNING%s: Numeric constant exceeds 32 bits\0A\00"
@.str.5 = [48 x i8] c"WARNING%s: ASCII constant exceeds 4 characters\0A\00"
@.str.6 = [25 x i8] c"ERROR%s: Invalid opcode\0A\00"
@.str.7 = [30 x i8] c"WARNING%s: Invalid size code\0A\00"
@.str.8 = [34 x i8] c"ERROR%s: Invalid addressing mode\0A\00"
@.str.9 = [34 x i8] c"ERROR%s: Symbol multiply defined\0A\00"
@.str.10 = [61 x i8] c"ERROR%s: Symbol value differs between first and second pass\0A\00"
@.str.11 = [50 x i8] c"ERROR%s: MOVEQ instruction constant out of range\0A\00"
@.str.12 = [32 x i8] c"ERROR%s: Invalid vector number\0A\00"
@.str.13 = [69 x i8] c"ERROR%s: Branch instruction displacement is out of range or invalid\0A\00"
@.str.14 = [45 x i8] c"ERROR%s: Label required with this directive\0A\00"
@.str.15 = [36 x i8] c"ERROR%s: Displacement out of range\0A\00"
@.str.16 = [43 x i8] c"ERROR%s: Absolute address exceeds 16 bits\0A\00"
@.str.17 = [40 x i8] c"ERROR%s: Immediate data exceeds 8 bits\0A\00"
@.str.18 = [41 x i8] c"ERROR%s: Immediate data exceeds 16 bits\0A\00"
@.str.19 = [60 x i8] c"WARNING%s: Evaluation of expression could not be completed\0A\00"
@.str.20 = [61 x i8] c"ERROR%s: The symbol specified is not a register list symbol\0A\00"
@.str.21 = [53 x i8] c"ERROR%s: Register list symbol used in an expression\0A\00"
@.str.22 = [54 x i8] c"ERROR%s: Register list symbol not previously defined\0A\00"
@.str.23 = [39 x i8] c"ERROR%s: Invalid constant shift count\0A\00"
@.str.24 = [61 x i8] c"ERROR%s: Forward references not allowed with this directive\0A\00"
@.str.25 = [41 x i8] c"ERROR%s: Block length is less that zero\0A\00"
@.str.26 = [77 x i8] c"ERROR%s: Origin value is odd (Location counter set to next highest address)\0A\00"
@.str.27 = [29 x i8] c"ERROR%s: No message defined\0A\00"
@.str.28 = [31 x i8] c"WARNING%s: No message defined\0A\00"
define void @printError(i32* %0, i32 %1, i32 %2) {
%4 = alloca [20 x i8]
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
store i8 0, i8* %5
%6 = icmp sgt i32 %2, -1
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = call i32 @snprintf(i8* %5, i32 20, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %9
9: ; preds = %7, %3
switch i32 %1, label %35 [
i32 1025, label %39
i32 769, label %10
i32 770, label %11
i32 258, label %12
i32 257, label %13
i32 1026, label %14
i32 513, label %15
i32 1027, label %16
i32 771, label %17
i32 1029, label %18
i32 514, label %19
i32 515, label %20
i32 516, label %21
i32 1028, label %22
i32 517, label %23
i32 518, label %24
i32 519, label %25
i32 520, label %26
i32 259, label %27
i32 522, label %28
i32 523, label %29
i32 773, label %30
i32 524, label %31
i32 774, label %32
i32 775, label %33
i32 521, label %34
]
10: ; preds = %9
br label %39
11: ; preds = %9
br label %39
12: ; preds = %9
br label %39
13: ; preds = %9
br label %39
14: ; preds = %9
br label %39
15: ; preds = %9
br label %39
16: ; preds = %9
br label %39
17: ; preds = %9
br label %39
18: ; preds = %9
br label %39
19: ; preds = %9
br label %39
20: ; preds = %9
br label %39
21: ; preds = %9
br label %39
22: ; preds = %9
br label %39
23: ; preds = %9
br label %39
24: ; preds = %9
br label %39
25: ; preds = %9
br label %39
26: ; preds = %9
br label %39
27: ; preds = %9
br label %39
28: ; preds = %9
br label %39
29: ; preds = %9
br label %39
30: ; preds = %9
br label %39
31: ; preds = %9
br label %39
32: ; preds = %9
br label %39
33: ; preds = %9
br label %39
34: ; preds = %9
br label %39
35: ; preds = %9
%36 = icmp sgt i32 %1, 768
br i1 %36, label %39, label %37
37: ; preds = %35
%38 = icmp sgt i32 %1, 256
br i1 %38, label %39, label %42
39: ; preds = %37, %35, %9, %10, %11, %12, %13, %14, %15, %16, %17, %18, %19, %20, %21, %22, %23, %24, %25, %26, %27, %28, %29, %30, %31, %32, %33, %34
%40 = phi i8* [ getelementptr inbounds ([77 x i8], [77 x i8]* @.str.26, i64 0, i64 0), %34 ], [ getelementptr inbounds ([41 x i8], [41 x i8]* @.str.25, i64 0, i64 0), %33 ], [ getelementptr inbounds ([61 x i8], [61 x i8]* @.str.24, i64 0, i64 0), %32 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @.str.23, i64 0, i64 0), %31 ], [ getelementptr inbounds ([54 x i8], [54 x i8]* @.str.22, i64 0, i64 0), %30 ], [ getelementptr inbounds ([53 x i8], [53 x i8]* @.str.21, i64 0, i64 0), %29 ], [ getelementptr inbounds ([61 x i8], [61 x i8]* @.str.20, i64 0, i64 0), %28 ], [ getelementptr inbounds ([60 x i8], [60 x i8]* @.str.19, i64 0, i64 0), %27 ], [ getelementptr inbounds ([41 x i8], [41 x i8]* @.str.18, i64 0, i64 0), %26 ], [ getelementptr inbounds ([40 x i8], [40 x i8]* @.str.17, i64 0, i64 0), %25 ], [ getelementptr inbounds ([43 x i8], [43 x i8]* @.str.16, i64 0, i64 0), %24 ], [ getelementptr inbounds ([36 x i8], [36 x i8]* @.str.15, i64 0, i64 0), %23 ], [ getelementptr inbounds ([45 x i8], [45 x i8]* @.str.14, i64 0, i64 0), %22 ], [ getelementptr inbounds ([69 x i8], [69 x i8]* @.str.13, i64 0, i64 0), %21 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @.str.12, i64 0, i64 0), %20 ], [ getelementptr inbounds ([50 x i8], [50 x i8]* @.str.11, i64 0, i64 0), %19 ], [ getelementptr inbounds ([61 x i8], [61 x i8]* @.str.10, i64 0, i64 0), %18 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0), %17 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.8, i64 0, i64 0), %16 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0), %15 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), %14 ], [ getelementptr inbounds ([48 x i8], [48 x i8]* @.str.5, i64 0, i64 0), %13 ], [ getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0), %12 ], [ getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), %11 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), %10 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), %9 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.27, i64 0, i64 0), %35 ], [ getelementptr inbounds ([31 x i8], [31 x i8]* @.str.28, i64 0, i64 0), %37 ]
%41 = call i32 @fprintf(i32* %0, i8* %40, i8* %5)
br label %42
42: ; preds = %39, %37
ret void
}