void trnmessage(n) {
  char *s;
  switch (n) {
  default:
    printf("COMPILER ERROR #%u\n", n);
    return;
  case 141:
    s = "TOO MANY CASES";
    break;
  case 104:
    s = "ILLEGAL USE OF BREAK, LOOP OR RESULTIS";
    break;
  case 101:
  case 105:
    s = "ILLEGAL USE OF case OR DEFAULT";
    break;
  case 106:
    s = "TWO caseS WITH SAME CONSTANT";
    break;
  case 144:
    s = "TOO MANY GLOBALS";
    break;
  case 142:
    s = "NAME DECLARED TWICE";
    break;
  case 143:
    s = "TOO MANY NAMES DECLARED";
    break;
  case 115:
    s = "NAME NOT DECLARED";
    break;
  case 116:
    s = "DYNAMIC FREE VARIABLE USED";
    break;
  case 117:
  case 118:
  case 119:
    s = "ERROR IN CONSTANT EXPRESSION";
    break;
  case 110:
  case 112:
    s = "LHS AND RHS DO NOT MATCH";
    break;
  case 109:
  case 113:
    s = "LTYPE EXPRESSION EXPECTED";
    break;
  }
  printf("%s\n", s);
}


x86 assembly (clang, -O0):
<trnmessage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffff9b,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x2b,%eax
ja     1144 <trnmessage+0x34>
mov    -0x18(%rbp),%rax
lea    0xec5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x4(%rbp),%esi
lea    0xf62(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1227 <trnmessage+0x117>
lea    0xf63(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1215 <trnmessage+0x105>
lea    0xf62(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1215 <trnmessage+0x105>
lea    0xf79(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1215 <trnmessage+0x105>
lea    0xf88(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1215 <trnmessage+0x105>
lea    0xf95(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1215 <trnmessage+0x105>
lea    0xf96(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1215 <trnmessage+0x105>
lea    0xf9a(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1215 <trnmessage+0x105>
lea    0xfa2(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1215 <trnmessage+0x105>
lea    0xfa4(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1215 <trnmessage+0x105>
lea    0xfaf(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1215 <trnmessage+0x105>
lea    0xfbc(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1215 <trnmessage+0x105>
lea    0xfc5(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xfd0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trnmessage>:
mov    %edi,%esi
lea    -0x65(%rsi),%eax
cmp    $0x2b,%eax
ja     1171 <trnmessage+0x51>
lea    0xf93(%rip),%rdi
lea    0xec8(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x1058(%rip),%rdi
jmp    1030 <puts@plt>
lea    0xfa6(%rip),%rdi
jmp    1030 <puts@plt>
lea    0x1076(%rip),%rdi
jmp    1030 <puts@plt>
lea    0x1051(%rip),%rdi
jmp    1030 <puts@plt>
lea    0xf38(%rip),%rdi
xor    %eax,%eax
jmp    1040 <printf@plt>
lea    0xf4d(%rip),%rdi
jmp    1030 <puts@plt>
lea    0xf87(%rip),%rdi
jmp    1030 <puts@plt>
lea    0xfd5(%rip),%rdi
jmp    1030 <puts@plt>
lea    0xfdb(%rip),%rdi
jmp    1030 <puts@plt>
lea    0xf91(%rip),%rdi
jmp    1030 <puts@plt>
lea    0xf99(%rip),%rdi
jmp    1030 <puts@plt>
lea    0xf68(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"COMPILER ERROR #%u\0A\00"
@.str.1 = [15 x i8] c"TOO MANY CASES\00"
@.str.2 = [39 x i8] c"ILLEGAL USE OF BREAK, LOOP OR RESULTIS\00"
@.str.3 = [31 x i8] c"ILLEGAL USE OF case OR DEFAULT\00"
@.str.4 = [29 x i8] c"TWO caseS WITH SAME CONSTANT\00"
@.str.5 = [17 x i8] c"TOO MANY GLOBALS\00"
@.str.6 = [20 x i8] c"NAME DECLARED TWICE\00"
@.str.7 = [24 x i8] c"TOO MANY NAMES DECLARED\00"
@.str.8 = [18 x i8] c"NAME NOT DECLARED\00"
@.str.9 = [27 x i8] c"DYNAMIC FREE VARIABLE USED\00"
@.str.10 = [29 x i8] c"ERROR IN CONSTANT EXPRESSION\00"
@.str.11 = [25 x i8] c"LHS AND RHS DO NOT MATCH\00"
@.str.12 = [26 x i8] c"LTYPE EXPRESSION EXPECTED\00"
@.str.13 = [4 x i8] c"%s\0A\00"
define void @trnmessage(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
switch i32 %4, label %5 [
i32 141, label %8
i32 104, label %9
i32 101, label %10
i32 105, label %10
i32 106, label %11
i32 144, label %12
i32 142, label %13
i32 143, label %14
i32 115, label %15
i32 116, label %16
i32 117, label %17
i32 118, label %17
i32 119, label %17
i32 110, label %18
i32 112, label %18
i32 109, label %19
i32 113, label %19
]
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %23
8: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %20
9: ; preds = %1
store i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i8** %3
br label %20
10: ; preds = %1, %1
store i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i8** %3
br label %20
11: ; preds = %1
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i8** %3
br label %20
12: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8** %3
br label %20
13: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i8** %3
br label %20
14: ; preds = %1
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), i8** %3
br label %20
15: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i8** %3
br label %20
16: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.9, i64 0, i64 0), i8** %3
br label %20
17: ; preds = %1, %1, %1
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.10, i64 0, i64 0), i8** %3
br label %20
18: ; preds = %1, %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0), i8** %3
br label %20
19: ; preds = %1, %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.12, i64 0, i64 0), i8** %3
br label %20
20: ; preds = %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8
%21 = load i8*, i8** %3
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i8* %21)
br label %23
23: ; preds = %20, %5
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"COMPILER ERROR #%u\0A\00"
@.str.1 = [15 x i8] c"TOO MANY CASES\00"
@.str.2 = [39 x i8] c"ILLEGAL USE OF BREAK, LOOP OR RESULTIS\00"
@.str.3 = [31 x i8] c"ILLEGAL USE OF case OR DEFAULT\00"
@.str.4 = [29 x i8] c"TWO caseS WITH SAME CONSTANT\00"
@.str.5 = [17 x i8] c"TOO MANY GLOBALS\00"
@.str.6 = [20 x i8] c"NAME DECLARED TWICE\00"
@.str.7 = [24 x i8] c"TOO MANY NAMES DECLARED\00"
@.str.8 = [18 x i8] c"NAME NOT DECLARED\00"
@.str.9 = [27 x i8] c"DYNAMIC FREE VARIABLE USED\00"
@.str.10 = [29 x i8] c"ERROR IN CONSTANT EXPRESSION\00"
@.str.11 = [25 x i8] c"LHS AND RHS DO NOT MATCH\00"
@.str.12 = [26 x i8] c"LTYPE EXPRESSION EXPECTED\00"
define void @trnmessage(i32 %0) {
switch i32 %0, label %2 [
i32 141, label %15
i32 104, label %4
i32 101, label %5
i32 105, label %5
i32 106, label %6
i32 144, label %7
i32 142, label %8
i32 143, label %9
i32 115, label %10
i32 116, label %11
i32 117, label %12
i32 118, label %12
i32 119, label %12
i32 110, label %13
i32 112, label %13
i32 109, label %14
i32 113, label %14
]
2: ; preds = %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %18
4: ; preds = %1
br label %15
5: ; preds = %1, %1
br label %15
6: ; preds = %1
br label %15
7: ; preds = %1
br label %15
8: ; preds = %1
br label %15
9: ; preds = %1
br label %15
10: ; preds = %1
br label %15
11: ; preds = %1
br label %15
12: ; preds = %1, %1, %1
br label %15
13: ; preds = %1, %1
br label %15
14: ; preds = %1, %1
br label %15
15: ; preds = %1, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4
%16 = phi i8* [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.12, i64 0, i64 0), %14 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0), %13 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.10, i64 0, i64 0), %12 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.9, i64 0, i64 0), %11 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), %10 ], [ getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), %9 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), %8 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), %7 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), %6 ], [ getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), %5 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), %4 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), %1 ]
%17 = tail call i32 @puts(i8* dereferenceable(1) %16)
br label %18
18: ; preds = %15, %2
ret void
}