#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*/ strcpy(void *, char *);
void check_str_codes(int strmsgid, void *bufadr, void *smsg) {
  switch (strmsgid) {
  case 1:
    strcpy(bufadr, "Successfull");
    break;
  case 36:
    strcpy(bufadr, "Error facility  ");
    break;
  case 2392132:
    strcpy(bufadr, "Internal consistency check");
    break;
  case 2392140:
    strcpy(bufadr, "Divide by zero");
    break;
  case 2392148:
    strcpy(bufadr, "Illegal String Class");
    break;
  case 2392156:
    strcpy(bufadr, "String is Interlocked");
    break;
  case 2392164:
    strcpy(bufadr, "Wrong number of arguments");
    break;
  case 2392172:
    strcpy(bufadr, "Insufficient Virtual Memory");
    break;
  case 2392180:
    strcpy(bufadr, "String too long");
    break;
  case 2392188:
    strcpy(bufadr, "Error Freeing dynamic string");
    break;
  case 2392576:
    strcpy(bufadr, "String truncation");
    break;
  case 2392584:
    strcpy(bufadr, "No strings matched");
    break;
  case 2392592:
    strcpy(bufadr, "Invalid delimiter");
    break;
  case 2392600:
    strcpy(bufadr, "No element");
    break;
  case 2393089:
    strcpy(bufadr, "Negative string length");
    break;
  case 2393097:
    strcpy(bufadr, "End position less than start");
    break;
  case 2393105:
    strcpy(bufadr, "Illegal string specification");
    break;
  case 2393113:
    strcpy(bufadr, "More than one match");
    break;
  }
  return;
}


x86 assembly (clang, -O0):
<check_str_codes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
sub    $0x1,%eax
je     1278 <check_str_codes+0x168>
jmp    1137 <check_str_codes+0x27>
mov    -0x1c(%rbp),%eax
sub    $0x24,%eax
je     128d <check_str_codes+0x17d>
jmp    1148 <check_str_codes+0x38>
mov    -0x1c(%rbp),%eax
sub    $0x248044,%eax
je     12a2 <check_str_codes+0x192>
jmp    115b <check_str_codes+0x4b>
mov    -0x1c(%rbp),%eax
sub    $0x24804c,%eax
je     12b7 <check_str_codes+0x1a7>
jmp    116e <check_str_codes+0x5e>
mov    -0x1c(%rbp),%eax
sub    $0x248054,%eax
je     12cc <check_str_codes+0x1bc>
jmp    1181 <check_str_codes+0x71>
mov    -0x1c(%rbp),%eax
sub    $0x24805c,%eax
je     12e1 <check_str_codes+0x1d1>
jmp    1194 <check_str_codes+0x84>
mov    -0x1c(%rbp),%eax
sub    $0x248064,%eax
je     12f6 <check_str_codes+0x1e6>
jmp    11a7 <check_str_codes+0x97>
mov    -0x1c(%rbp),%eax
sub    $0x24806c,%eax
je     130b <check_str_codes+0x1fb>
jmp    11ba <check_str_codes+0xaa>
mov    -0x1c(%rbp),%eax
sub    $0x248074,%eax
je     1320 <check_str_codes+0x210>
jmp    11cd <check_str_codes+0xbd>
mov    -0x1c(%rbp),%eax
sub    $0x24807c,%eax
je     1335 <check_str_codes+0x225>
jmp    11e0 <check_str_codes+0xd0>
mov    -0x1c(%rbp),%eax
sub    $0x248200,%eax
je     134a <check_str_codes+0x23a>
jmp    11f3 <check_str_codes+0xe3>
mov    -0x1c(%rbp),%eax
sub    $0x248208,%eax
je     135f <check_str_codes+0x24f>
jmp    1206 <check_str_codes+0xf6>
mov    -0x1c(%rbp),%eax
sub    $0x248210,%eax
je     1374 <check_str_codes+0x264>
jmp    1219 <check_str_codes+0x109>
mov    -0x1c(%rbp),%eax
sub    $0x248218,%eax
je     1389 <check_str_codes+0x279>
jmp    122c <check_str_codes+0x11c>
mov    -0x1c(%rbp),%eax
sub    $0x248401,%eax
je     139e <check_str_codes+0x28e>
jmp    123f <check_str_codes+0x12f>
mov    -0x1c(%rbp),%eax
sub    $0x248409,%eax
je     13b3 <check_str_codes+0x2a3>
jmp    1252 <check_str_codes+0x142>
mov    -0x1c(%rbp),%eax
sub    $0x248411,%eax
je     13c8 <check_str_codes+0x2b8>
jmp    1265 <check_str_codes+0x155>
mov    -0x1c(%rbp),%eax
sub    $0x248419,%eax
je     13dd <check_str_codes+0x2cd>
jmp    13ed <check_str_codes+0x2dd>
mov    -0x10(%rbp),%rdi
lea    0xd7d(%rip),%rsi
call   1030 <strcpy@plt>
jmp    13ed <check_str_codes+0x2dd>
mov    -0x10(%rbp),%rdi
lea    0xd74(%rip),%rsi
call   1030 <strcpy@plt>
jmp    13ed <check_str_codes+0x2dd>
mov    -0x10(%rbp),%rdi
lea    0xd70(%rip),%rsi
call   1030 <strcpy@plt>
jmp    13ed <check_str_codes+0x2dd>
mov    -0x10(%rbp),%rdi
lea    0xd76(%rip),%rsi
call   1030 <strcpy@plt>
jmp    13ed <check_str_codes+0x2dd>
mov    -0x10(%rbp),%rdi
lea    0xd70(%rip),%rsi
call   1030 <strcpy@plt>
jmp    13ed <check_str_codes+0x2dd>
mov    -0x10(%rbp),%rdi
lea    0xd70(%rip),%rsi
call   1030 <strcpy@plt>
jmp    13ed <check_str_codes+0x2dd>
mov    -0x10(%rbp),%rdi
lea    0xd71(%rip),%rsi
call   1030 <strcpy@plt>
jmp    13ed <check_str_codes+0x2dd>
mov    -0x10(%rbp),%rdi
lea    0xd76(%rip),%rsi
call   1030 <strcpy@plt>
jmp    13ed <check_str_codes+0x2dd>
mov    -0x10(%rbp),%rdi
lea    0xd7d(%rip),%rsi
call   1030 <strcpy@plt>
jmp    13ed <check_str_codes+0x2dd>
mov    -0x10(%rbp),%rdi
lea    0xd78(%rip),%rsi
call   1030 <strcpy@plt>
jmp    13ed <check_str_codes+0x2dd>
mov    -0x10(%rbp),%rdi
lea    0xd80(%rip),%rsi
call   1030 <strcpy@plt>
jmp    13ed <check_str_codes+0x2dd>
mov    -0x10(%rbp),%rdi
lea    0xd7d(%rip),%rsi
call   1030 <strcpy@plt>
jmp    13ed <check_str_codes+0x2dd>
mov    -0x10(%rbp),%rdi
lea    0xd7b(%rip),%rsi
call   1030 <strcpy@plt>
jmp    13ed <check_str_codes+0x2dd>
mov    -0x10(%rbp),%rdi
lea    0xd78(%rip),%rsi
call   1030 <strcpy@plt>
jmp    13ed <check_str_codes+0x2dd>
mov    -0x10(%rbp),%rdi
lea    0xd6e(%rip),%rsi
call   1030 <strcpy@plt>
jmp    13ed <check_str_codes+0x2dd>
mov    -0x10(%rbp),%rdi
lea    0xd70(%rip),%rsi
call   1030 <strcpy@plt>
jmp    13ed <check_str_codes+0x2dd>
mov    -0x10(%rbp),%rdi
lea    0xd78(%rip),%rsi
call   1030 <strcpy@plt>
jmp    13ed <check_str_codes+0x2dd>
mov    -0x10(%rbp),%rdi
lea    0xd80(%rip),%rsi
call   1030 <strcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_str_codes>:
cmp    $0x2481ff,%edi
jg     113f <check_str_codes+0x2f>
lea    -0x248044(%rdi),%eax
cmp    $0x38,%eax
ja     1191 <check_str_codes+0x81>
lea    0xed6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x108f(%rip),%rax
jmp    1228 <check_str_codes+0x118>
lea    -0x248200(%rdi),%eax
cmp    $0x18,%eax
jbe    1175 <check_str_codes+0x65>
add    $0xffdb7bff,%edi
cmp    $0x18,%edi
ja     1233 <check_str_codes+0x123>
lea    0xfe8(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0x1153(%rip),%rax
jmp    1228 <check_str_codes+0x118>
lea    0xf68(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x10f5(%rip),%rax
jmp    1228 <check_str_codes+0x118>
cmp    $0x1,%edi
je     1221 <check_str_codes+0x111>
cmp    $0x24,%edi
jne    1233 <check_str_codes+0x123>
lea    0x100e(%rip),%rax
jmp    1228 <check_str_codes+0x118>
lea    0x1031(%rip),%rax
jmp    1228 <check_str_codes+0x118>
lea    0x1037(%rip),%rax
jmp    1228 <check_str_codes+0x118>
lea    0x1043(%rip),%rax
jmp    1228 <check_str_codes+0x118>
lea    0x1050(%rip),%rax
jmp    1228 <check_str_codes+0x118>
lea    0x1061(%rip),%rax
jmp    1228 <check_str_codes+0x118>
lea    0x1074(%rip),%rax
jmp    1228 <check_str_codes+0x118>
lea    0x107b(%rip),%rax
jmp    1228 <check_str_codes+0x118>
lea    0x10a1(%rip),%rax
jmp    1228 <check_str_codes+0x118>
lea    0x10ab(%rip),%rax
jmp    1228 <check_str_codes+0x118>
lea    0x10b4(%rip),%rax
jmp    1228 <check_str_codes+0x118>
lea    0x10cd(%rip),%rax
jmp    1228 <check_str_codes+0x118>
lea    0x10e1(%rip),%rax
jmp    1228 <check_str_codes+0x118>
lea    0x10f5(%rip),%rax
jmp    1228 <check_str_codes+0x118>
lea    0xf84(%rip),%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <strcpy@plt>
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Successfull\00"
@.str.1 = [17 x i8] c"Error facility \00"
@.str.2 = [27 x i8] c"Internal consistency check\00"
@.str.3 = [15 x i8] c"Divide by zero\00"
@.str.4 = [21 x i8] c"Illegal String Class\00"
@.str.5 = [22 x i8] c"String is Interlocked\00"
@.str.6 = [26 x i8] c"Wrong number of arguments\00"
@.str.7 = [28 x i8] c"Insufficient Virtual Memory\00"
@.str.8 = [16 x i8] c"String too long\00"
@.str.9 = [29 x i8] c"Error Freeing dynamic string\00"
@.str.10 = [18 x i8] c"String truncation\00"
@.str.11 = [19 x i8] c"No strings matched\00"
@.str.12 = [18 x i8] c"Invalid delimiter\00"
@.str.13 = [11 x i8] c"No element\00"
@.str.14 = [23 x i8] c"Negative string length\00"
@.str.15 = [29 x i8] c"End position less than start\00"
@.str.16 = [29 x i8] c"Illegal string specification\00"
@.str.17 = [20 x i8] c"More than one match\00"
define void @check_str_codes(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
switch i32 %7, label %62 [
i32 1, label %8
i32 36, label %11
i32 2392132, label %14
i32 2392140, label %17
i32 2392148, label %20
i32 2392156, label %23
i32 2392164, label %26
i32 2392172, label %29
i32 2392180, label %32
i32 2392188, label %35
i32 2392576, label %38
i32 2392584, label %41
i32 2392592, label %44
i32 2392600, label %47
i32 2393089, label %50
i32 2393097, label %53
i32 2393105, label %56
i32 2393113, label %59
]
8: ; preds = %3
%9 = load i8*, i8** %5
%10 = call i32 @strcpy(i8* %9, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %62
11: ; preds = %3
%12 = load i8*, i8** %5
%13 = call i32 @strcpy(i8* %12, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %62
14: ; preds = %3
%15 = load i8*, i8** %5
%16 = call i32 @strcpy(i8* %15, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
br label %62
17: ; preds = %3
%18 = load i8*, i8** %5
%19 = call i32 @strcpy(i8* %18, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
br label %62
20: ; preds = %3
%21 = load i8*, i8** %5
%22 = call i32 @strcpy(i8* %21, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
br label %62
23: ; preds = %3
%24 = load i8*, i8** %5
%25 = call i32 @strcpy(i8* %24, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0))
br label %62
26: ; preds = %3
%27 = load i8*, i8** %5
%28 = call i32 @strcpy(i8* %27, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
br label %62
29: ; preds = %3
%30 = load i8*, i8** %5
%31 = call i32 @strcpy(i8* %30, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0))
br label %62
32: ; preds = %3
%33 = load i8*, i8** %5
%34 = call i32 @strcpy(i8* %33, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
br label %62
35: ; preds = %3
%36 = load i8*, i8** %5
%37 = call i32 @strcpy(i8* %36, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0))
br label %62
38: ; preds = %3
%39 = load i8*, i8** %5
%40 = call i32 @strcpy(i8* %39, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0))
br label %62
41: ; preds = %3
%42 = load i8*, i8** %5
%43 = call i32 @strcpy(i8* %42, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0))
br label %62
44: ; preds = %3
%45 = load i8*, i8** %5
%46 = call i32 @strcpy(i8* %45, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0))
br label %62
47: ; preds = %3
%48 = load i8*, i8** %5
%49 = call i32 @strcpy(i8* %48, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0))
br label %62
50: ; preds = %3
%51 = load i8*, i8** %5
%52 = call i32 @strcpy(i8* %51, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0))
br label %62
53: ; preds = %3
%54 = load i8*, i8** %5
%55 = call i32 @strcpy(i8* %54, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.15, i64 0, i64 0))
br label %62
56: ; preds = %3
%57 = load i8*, i8** %5
%58 = call i32 @strcpy(i8* %57, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.16, i64 0, i64 0))
br label %62
59: ; preds = %3
%60 = load i8*, i8** %5
%61 = call i32 @strcpy(i8* %60, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.17, i64 0, i64 0))
br label %62
62: ; preds = %3, %59, %56, %53, %50, %47, %44, %41, %38, %35, %32, %29, %26, %23, %20, %17, %14, %11, %8
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Successfull\00"
@.str.1 = [17 x i8] c"Error facility \00"
@.str.2 = [27 x i8] c"Internal consistency check\00"
@.str.3 = [15 x i8] c"Divide by zero\00"
@.str.4 = [21 x i8] c"Illegal String Class\00"
@.str.5 = [22 x i8] c"String is Interlocked\00"
@.str.6 = [26 x i8] c"Wrong number of arguments\00"
@.str.7 = [28 x i8] c"Insufficient Virtual Memory\00"
@.str.8 = [16 x i8] c"String too long\00"
@.str.9 = [29 x i8] c"Error Freeing dynamic string\00"
@.str.10 = [18 x i8] c"String truncation\00"
@.str.11 = [19 x i8] c"No strings matched\00"
@.str.12 = [18 x i8] c"Invalid delimiter\00"
@.str.13 = [11 x i8] c"No element\00"
@.str.14 = [23 x i8] c"Negative string length\00"
@.str.15 = [29 x i8] c"End position less than start\00"
@.str.16 = [29 x i8] c"Illegal string specification\00"
@.str.17 = [20 x i8] c"More than one match\00"
define void @check_str_codes(i32 %0, i8* %1, i8* nocapture readnone %2) {
switch i32 %0, label %24 [
i32 1, label %21
i32 36, label %4
i32 2392132, label %5
i32 2392140, label %6
i32 2392148, label %7
i32 2392156, label %8
i32 2392164, label %9
i32 2392172, label %10
i32 2392180, label %11
i32 2392188, label %12
i32 2392576, label %13
i32 2392584, label %14
i32 2392592, label %15
i32 2392600, label %16
i32 2393089, label %17
i32 2393097, label %18
i32 2393105, label %19
i32 2393113, label %20
]
4: ; preds = %3
br label %21
5: ; preds = %3
br label %21
6: ; preds = %3
br label %21
7: ; preds = %3
br label %21
8: ; preds = %3
br label %21
9: ; preds = %3
br label %21
10: ; preds = %3
br label %21
11: ; preds = %3
br label %21
12: ; preds = %3
br label %21
13: ; preds = %3
br label %21
14: ; preds = %3
br label %21
15: ; preds = %3
br label %21
16: ; preds = %3
br label %21
17: ; preds = %3
br label %21
18: ; preds = %3
br label %21
19: ; preds = %3
br label %21
20: ; preds = %3
br label %21
21: ; preds = %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14, %15, %16, %17, %18, %19, %20
%22 = phi i8* [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.17, i64 0, i64 0), %20 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.16, i64 0, i64 0), %19 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.15, i64 0, i64 0), %18 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0), %17 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0), %16 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0), %15 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0), %14 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), %13 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0), %12 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), %11 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), %10 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0), %9 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), %8 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), %7 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), %6 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), %5 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), %4 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), %3 ]
%23 = tail call i32 @strcpy(i8* %1, i8* %22)
br label %24
24: ; preds = %21, %3
ret void
}