char *parse_error_msg(int code) {
  static char *temp;
  switch (code) {
  case 1:
    temp = "expression is const";
    break;
  case 0:
    temp = "correct syntax";
    break;
  case -1:
    temp = "stack overflow";
    break;
  case -2:
    temp = "queue overflow";
    break;
  case -3:
    temp = "delimiter error";
    break;
  case -4:
    temp = "unbalanced brackets";
    break;
  case -5:
    temp = "syntax error";
    break;
  case -6:
    temp = "operand required";
    break;
  case -7:
    temp = "not enough operands";
    break;
  case -8:
    temp = "not enough operations";
    break;
  case -9:
    temp = "too long expr";
    break;
  case -10:
    temp = "too long token";
    break;
  case -11:
    temp = "infinity reached";
    break;
  case -12:
    temp = "domain error";
    break;
  default:
    temp = "";
  }
  return temp;
}


x86 assembly (clang, -O0):
<parse_error_msg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xc,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0xd,%eax
ja     123a <parse_error_msg+0x13a>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf01(%rip),%rax
mov    %rax,0x2eea(%rip)
jmp    1248 <parse_error_msg+0x148>
lea    0xf02(%rip),%rax
mov    %rax,0x2ed7(%rip)
jmp    1248 <parse_error_msg+0x148>
lea    0xefe(%rip),%rax
mov    %rax,0x2ec4(%rip)
jmp    1248 <parse_error_msg+0x148>
lea    0xefa(%rip),%rax
mov    %rax,0x2eb1(%rip)
jmp    1248 <parse_error_msg+0x148>
lea    0xef6(%rip),%rax
mov    %rax,0x2e9e(%rip)
jmp    1248 <parse_error_msg+0x148>
lea    0xef3(%rip),%rax
mov    %rax,0x2e8b(%rip)
jmp    1248 <parse_error_msg+0x148>
lea    0xef4(%rip),%rax
mov    %rax,0x2e78(%rip)
jmp    1248 <parse_error_msg+0x148>
lea    0xeee(%rip),%rax
mov    %rax,0x2e65(%rip)
jmp    1248 <parse_error_msg+0x148>
lea    0xeec(%rip),%rax
mov    %rax,0x2e52(%rip)
jmp    1248 <parse_error_msg+0x148>
lea    0xeed(%rip),%rax
mov    %rax,0x2e3f(%rip)
jmp    1248 <parse_error_msg+0x148>
lea    0xef0(%rip),%rax
mov    %rax,0x2e2c(%rip)
jmp    1248 <parse_error_msg+0x148>
lea    0xeeb(%rip),%rax
mov    %rax,0x2e19(%rip)
jmp    1248 <parse_error_msg+0x148>
lea    0xee7(%rip),%rax
mov    %rax,0x2e06(%rip)
jmp    1248 <parse_error_msg+0x148>
lea    0xee5(%rip),%rax
mov    %rax,0x2df3(%rip)
jmp    1248 <parse_error_msg+0x148>
lea    0xed1(%rip),%rax
mov    %rax,0x2de0(%rip)
mov    0x2dd9(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_error_msg>:
add    $0xc,%edi
cmp    $0xd,%edi
ja     111a <parse_error_msg+0x1a>
movslq %edi,%rax
lea    0xfd6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
lea    0xfb9(%rip),%rax
ret

LLVM IR (-O0):
@parse_error_msg.temp = internal global i8* null
@.str = [20 x i8] c"expression is const\00"
@.str.1 = [15 x i8] c"correct syntax\00"
@.str.2 = [15 x i8] c"stack overflow\00"
@.str.3 = [15 x i8] c"queue overflow\00"
@.str.4 = [16 x i8] c"delimiter error\00"
@.str.5 = [20 x i8] c"unbalanced brackets\00"
@.str.6 = [13 x i8] c"syntax error\00"
@.str.7 = [17 x i8] c"operand required\00"
@.str.8 = [20 x i8] c"not enough operands\00"
@.str.9 = [22 x i8] c"not enough operations\00"
@.str.10 = [14 x i8] c"too long expr\00"
@.str.11 = [15 x i8] c"too long token\00"
@.str.12 = [17 x i8] c"infinity reached\00"
@.str.13 = [13 x i8] c"domain error\00"
@.str.14 = [1 x i8] zeroinitializer
define i8* @parse_error_msg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %18 [
i32 1, label %4
i32 0, label %5
i32 -1, label %6
i32 -2, label %7
i32 -3, label %8
i32 -4, label %9
i32 -5, label %10
i32 -6, label %11
i32 -7, label %12
i32 -8, label %13
i32 -9, label %14
i32 -10, label %15
i32 -11, label %16
i32 -12, label %17
]
4: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8** @parse_error_msg.temp
br label %19
5: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8** @parse_error_msg.temp
br label %19
6: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8** @parse_error_msg.temp
br label %19
7: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i8** @parse_error_msg.temp
br label %19
8: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8** @parse_error_msg.temp
br label %19
9: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i8** @parse_error_msg.temp
br label %19
10: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8** @parse_error_msg.temp
br label %19
11: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i8** @parse_error_msg.temp
br label %19
12: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0), i8** @parse_error_msg.temp
br label %19
13: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0), i8** @parse_error_msg.temp
br label %19
14: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i8** @parse_error_msg.temp
br label %19
15: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.11, i64 0, i64 0), i8** @parse_error_msg.temp
br label %19
16: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i8** @parse_error_msg.temp
br label %19
17: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0), i8** @parse_error_msg.temp
br label %19
18: ; preds = %1
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.14, i64 0, i64 0), i8** @parse_error_msg.temp
br label %19
19: ; preds = %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4
%20 = load i8*, i8** @parse_error_msg.temp
ret i8* %20
}

LLVM IR (-O2):
@.str = [20 x i8] c"expression is const\00"
@.str.1 = [15 x i8] c"correct syntax\00"
@.str.2 = [15 x i8] c"stack overflow\00"
@.str.3 = [15 x i8] c"queue overflow\00"
@.str.4 = [16 x i8] c"delimiter error\00"
@.str.5 = [20 x i8] c"unbalanced brackets\00"
@.str.6 = [13 x i8] c"syntax error\00"
@.str.7 = [17 x i8] c"operand required\00"
@.str.8 = [20 x i8] c"not enough operands\00"
@.str.9 = [22 x i8] c"not enough operations\00"
@.str.10 = [14 x i8] c"too long expr\00"
@.str.11 = [15 x i8] c"too long token\00"
@.str.12 = [17 x i8] c"infinity reached\00"
@.str.13 = [13 x i8] c"domain error\00"
@.str.14 = [1 x i8] zeroinitializer
@reltable.parse_error_msg = [14 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @.str.13 to i64), i64 ptrtoint ([14 x i32]* @reltable.parse_error_msg to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str.12 to i64), i64 ptrtoint ([14 x i32]* @reltable.parse_error_msg to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.11 to i64), i64 ptrtoint ([14 x i32]* @reltable.parse_error_msg to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([14 x i8]* @.str.10 to i64), i64 ptrtoint ([14 x i32]* @reltable.parse_error_msg to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.9 to i64), i64 ptrtoint ([14 x i32]* @reltable.parse_error_msg to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @.str.8 to i64), i64 ptrtoint ([14 x i32]* @reltable.parse_error_msg to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str.7 to i64), i64 ptrtoint ([14 x i32]* @reltable.parse_error_msg to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @.str.6 to i64), i64 ptrtoint ([14 x i32]* @reltable.parse_error_msg to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @.str.5 to i64), i64 ptrtoint ([14 x i32]* @reltable.parse_error_msg to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([16 x i8]* @.str.4 to i64), i64 ptrtoint ([14 x i32]* @reltable.parse_error_msg to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.3 to i64), i64 ptrtoint ([14 x i32]* @reltable.parse_error_msg to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.2 to i64), i64 ptrtoint ([14 x i32]* @reltable.parse_error_msg to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.1 to i64), i64 ptrtoint ([14 x i32]* @reltable.parse_error_msg to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @.str to i64), i64 ptrtoint ([14 x i32]* @reltable.parse_error_msg to i64)) to i32)]
define i8* @parse_error_msg(i32 %0) {
%2 = add i32 %0, 12
%3 = icmp ult i32 %2, 14
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = shl i64 %5, 2
%7 = call i8* @llvm.load.relative.i64(i8* bitcast ([14 x i32]* @reltable.parse_error_msg to i8*), i64 %6)
br label %8
8: ; preds = %1, %4
%9 = phi i8* [ %7, %4 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.14, i64 0, i64 0), %1 ]
ret i8* %9
}