#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*/ strcmp(char *, char *);
int /*<<< orphan*/ strncmp(char *, char *, int);
int wcscsys(char *wcstring) {
  if (wcstring[0] == 'J' || wcstring[0] == 'j' || !strcmp(wcstring, "2000") ||
      !strcmp(wcstring, "2000.0") || !strcmp(wcstring, "ICRS") ||
      !strcmp(wcstring, "icrs") || !strncmp(wcstring, "FK5", 3) ||
      !strncmp(wcstring, "fk5", 3))
    return 1;
  if (wcstring[0] == 'B' || wcstring[0] == 'b' || !strcmp(wcstring, "1950") ||
      !strcmp(wcstring, "1950.0") || !strncmp(wcstring, "FK4", 3) ||
      !strncmp(wcstring, "fk4", 3))
    return 2;
  else if (wcstring[0] == 'G' || wcstring[0] == 'g')
    return 3;
  else if (wcstring[0] == 'E' || wcstring[0] == 'e')
    return 4;
  else if (wcstring[0] == 'A' || wcstring[0] == 'a')
    return 5;
  else if (wcstring[0] == 'N' || wcstring[0] == 'n')
    return 7;
  else if (wcstring[0] == 'L' || wcstring[0] == 'l')
    return 6;
  else
    return -1;
}


x86 assembly (clang, -O0):
<wcscsys>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x4a,%eax
je     11ec <wcscsys+0xcc>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x6a,%eax
je     11ec <wcscsys+0xcc>
mov    -0x10(%rbp),%rdi
lea    0xea9(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     11ec <wcscsys+0xcc>
mov    -0x10(%rbp),%rdi
lea    0xe95(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     11ec <wcscsys+0xcc>
mov    -0x10(%rbp),%rdi
lea    0xe83(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     11ec <wcscsys+0xcc>
mov    -0x10(%rbp),%rdi
lea    0xe6f(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     11ec <wcscsys+0xcc>
mov    -0x10(%rbp),%rdi
lea    0xe5b(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
je     11ec <wcscsys+0xcc>
mov    -0x10(%rbp),%rdi
lea    0xe41(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    11f8 <wcscsys+0xd8>
movl   $0x1,-0x4(%rbp)
jmp    1375 <wcscsys+0x255>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x42,%eax
je     1286 <wcscsys+0x166>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x62,%eax
je     1286 <wcscsys+0x166>
mov    -0x10(%rbp),%rdi
lea    0xdfb(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     1286 <wcscsys+0x166>
mov    -0x10(%rbp),%rdi
lea    0xde7(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     1286 <wcscsys+0x166>
mov    -0x10(%rbp),%rdi
lea    0xdd5(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
je     1286 <wcscsys+0x166>
mov    -0x10(%rbp),%rdi
lea    0xdbb(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1292 <wcscsys+0x172>
movl   $0x2,-0x4(%rbp)
jmp    1375 <wcscsys+0x255>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x47,%eax
je     12b2 <wcscsys+0x192>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x67,%eax
jne    12be <wcscsys+0x19e>
movl   $0x3,-0x4(%rbp)
jmp    1375 <wcscsys+0x255>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x45,%eax
je     12de <wcscsys+0x1be>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x65,%eax
jne    12ea <wcscsys+0x1ca>
movl   $0x4,-0x4(%rbp)
jmp    1375 <wcscsys+0x255>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
je     130a <wcscsys+0x1ea>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x61,%eax
jne    1316 <wcscsys+0x1f6>
movl   $0x5,-0x4(%rbp)
jmp    1375 <wcscsys+0x255>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x4e,%eax
je     1336 <wcscsys+0x216>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x6e,%eax
jne    1342 <wcscsys+0x222>
movl   $0x7,-0x4(%rbp)
jmp    1375 <wcscsys+0x255>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x4c,%eax
je     1362 <wcscsys+0x242>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x6c,%eax
jne    136e <wcscsys+0x24e>
movl   $0x6,-0x4(%rbp)
jmp    1375 <wcscsys+0x255>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcscsys>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebp
or     $0x20,%al
cmp    $0x6a,%al
jne    1139 <wcscsys+0x19>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %rdi,%rbx
lea    0xf75(%rip),%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1130 <wcscsys+0x10>
lea    0xf6a(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1130 <wcscsys+0x10>
lea    0xf5e(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1130 <wcscsys+0x10>
lea    0xf50(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1130 <wcscsys+0x10>
lea    0xf42(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1130 <wcscsys+0x10>
lea    0xf2e(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1130 <wcscsys+0x10>
mov    (%rbx),%al
mov    $0x2,%ebp
or     $0x20,%al
cmp    $0x62,%al
je     1130 <wcscsys+0x10>
lea    0xf05(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1130 <wcscsys+0x10>
lea    0xef3(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1130 <wcscsys+0x10>
lea    0xee3(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1130 <wcscsys+0x10>
lea    0xecb(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1130 <wcscsys+0x10>
mov    (%rbx),%al
add    $0xbf,%al
cmp    $0x2d,%al
ja     1278 <wcscsys+0x158>
movzbl %al,%eax
lea    0xdbe(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
mov    $0x3,%ebp
jmp    *%rax
mov    $0x5,%ebp
jmp    1130 <wcscsys+0x10>
mov    $0x4,%ebp
jmp    1130 <wcscsys+0x10>
mov    $0x6,%ebp
jmp    1130 <wcscsys+0x10>
mov    $0x7,%ebp
jmp    1130 <wcscsys+0x10>
mov    $0xffffffff,%ebp
jmp    1130 <wcscsys+0x10>

LLVM IR (-O0):
@.str = [5 x i8] c"2000\00"
@.str.1 = [7 x i8] c"2000.0\00"
@.str.2 = [5 x i8] c"ICRS\00"
@.str.3 = [5 x i8] c"icrs\00"
@.str.4 = [4 x i8] c"FK5\00"
@.str.5 = [4 x i8] c"fk5\00"
@.str.6 = [5 x i8] c"1950\00"
@.str.7 = [7 x i8] c"1950.0\00"
@.str.8 = [4 x i8] c"FK4\00"
@.str.9 = [4 x i8] c"fk4\00"
define i32 @wcscsys(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 74
br i1 %8, label %39, label %9
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 106
br i1 %14, label %39, label %15
15: ; preds = %9
%16 = load i8*, i8** %3
%17 = call i32 @strcmp(i8* %16, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %39
19: ; preds = %15
%20 = load i8*, i8** %3
%21 = call i32 @strcmp(i8* %20, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %39
23: ; preds = %19
%24 = load i8*, i8** %3
%25 = call i32 @strcmp(i8* %24, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%26 = icmp ne i32 %25, 0
br i1 %26, label %27, label %39
27: ; preds = %23
%28 = load i8*, i8** %3
%29 = call i32 @strcmp(i8* %28, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %39
31: ; preds = %27
%32 = load i8*, i8** %3
%33 = call i32 @strncmp(i8* %32, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 3)
%34 = icmp ne i32 %33, 0
br i1 %34, label %35, label %39
35: ; preds = %31
%36 = load i8*, i8** %3
%37 = call i32 @strncmp(i8* %36, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 3)
%38 = icmp ne i32 %37, 0
br i1 %38, label %40, label %39
39: ; preds = %35, %31, %27, %23, %19, %15, %9, %1
store i32 1, i32* %2
br label %135
40: ; preds = %35
%41 = load i8*, i8** %3
%42 = getelementptr inbounds i8, i8* %41, i64 0
%43 = load i8, i8* %42
%44 = sext i8 %43 to i32
%45 = icmp eq i32 %44, 66
br i1 %45, label %68, label %46
46: ; preds = %40
%47 = load i8*, i8** %3
%48 = getelementptr inbounds i8, i8* %47, i64 0
%49 = load i8, i8* %48
%50 = sext i8 %49 to i32
%51 = icmp eq i32 %50, 98
br i1 %51, label %68, label %52
52: ; preds = %46
%53 = load i8*, i8** %3
%54 = call i32 @strcmp(i8* %53, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%55 = icmp ne i32 %54, 0
br i1 %55, label %56, label %68
56: ; preds = %52
%57 = load i8*, i8** %3
%58 = call i32 @strcmp(i8* %57, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%59 = icmp ne i32 %58, 0
br i1 %59, label %60, label %68
60: ; preds = %56
%61 = load i8*, i8** %3
%62 = call i32 @strncmp(i8* %61, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 3)
%63 = icmp ne i32 %62, 0
br i1 %63, label %64, label %68
64: ; preds = %60
%65 = load i8*, i8** %3
%66 = call i32 @strncmp(i8* %65, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 3)
%67 = icmp ne i32 %66, 0
br i1 %67, label %69, label %68
68: ; preds = %64, %60, %56, %52, %46, %40
store i32 2, i32* %2
br label %135
69: ; preds = %64
%70 = load i8*, i8** %3
%71 = getelementptr inbounds i8, i8* %70, i64 0
%72 = load i8, i8* %71
%73 = sext i8 %72 to i32
%74 = icmp eq i32 %73, 71
br i1 %74, label %81, label %75
75: ; preds = %69
%76 = load i8*, i8** %3
%77 = getelementptr inbounds i8, i8* %76, i64 0
%78 = load i8, i8* %77
%79 = sext i8 %78 to i32
%80 = icmp eq i32 %79, 103
br i1 %80, label %81, label %82
81: ; preds = %75, %69
store i32 3, i32* %2
br label %135
82: ; preds = %75
%83 = load i8*, i8** %3
%84 = getelementptr inbounds i8, i8* %83, i64 0
%85 = load i8, i8* %84
%86 = sext i8 %85 to i32
%87 = icmp eq i32 %86, 69
br i1 %87, label %94, label %88
88: ; preds = %82
%89 = load i8*, i8** %3
%90 = getelementptr inbounds i8, i8* %89, i64 0
%91 = load i8, i8* %90
%92 = sext i8 %91 to i32
%93 = icmp eq i32 %92, 101
br i1 %93, label %94, label %95
94: ; preds = %88, %82
store i32 4, i32* %2
br label %135
95: ; preds = %88
%96 = load i8*, i8** %3
%97 = getelementptr inbounds i8, i8* %96, i64 0
%98 = load i8, i8* %97
%99 = sext i8 %98 to i32
%100 = icmp eq i32 %99, 65
br i1 %100, label %107, label %101
101: ; preds = %95
%102 = load i8*, i8** %3
%103 = getelementptr inbounds i8, i8* %102, i64 0
%104 = load i8, i8* %103
%105 = sext i8 %104 to i32
%106 = icmp eq i32 %105, 97
br i1 %106, label %107, label %108
107: ; preds = %101, %95
store i32 5, i32* %2
br label %135
108: ; preds = %101
%109 = load i8*, i8** %3
%110 = getelementptr inbounds i8, i8* %109, i64 0
%111 = load i8, i8* %110
%112 = sext i8 %111 to i32
%113 = icmp eq i32 %112, 78
br i1 %113, label %120, label %114
114: ; preds = %108
%115 = load i8*, i8** %3
%116 = getelementptr inbounds i8, i8* %115, i64 0
%117 = load i8, i8* %116
%118 = sext i8 %117 to i32
%119 = icmp eq i32 %118, 110
br i1 %119, label %120, label %121
120: ; preds = %114, %108
store i32 7, i32* %2
br label %135
121: ; preds = %114
%122 = load i8*, i8** %3
%123 = getelementptr inbounds i8, i8* %122, i64 0
%124 = load i8, i8* %123
%125 = sext i8 %124 to i32
%126 = icmp eq i32 %125, 76
br i1 %126, label %133, label %127
127: ; preds = %121
%128 = load i8*, i8** %3
%129 = getelementptr inbounds i8, i8* %128, i64 0
%130 = load i8, i8* %129
%131 = sext i8 %130 to i32
%132 = icmp eq i32 %131, 108
br i1 %132, label %133, label %134
133: ; preds = %127, %121
store i32 6, i32* %2
br label %135
134: ; preds = %127
store i32 -1, i32* %2
br label %135
135: ; preds = %134, %133, %120, %107, %94, %81, %68, %39
%136 = load i32, i32* %2
ret i32 %136
}

LLVM IR (-O2):
@.str = [5 x i8] c"2000\00"
@.str.1 = [7 x i8] c"2000.0\00"
@.str.2 = [5 x i8] c"ICRS\00"
@.str.3 = [5 x i8] c"icrs\00"
@.str.4 = [4 x i8] c"FK5\00"
@.str.5 = [4 x i8] c"fk5\00"
@.str.6 = [5 x i8] c"1950\00"
@.str.7 = [7 x i8] c"1950.0\00"
@.str.8 = [4 x i8] c"FK4\00"
@.str.9 = [4 x i8] c"fk4\00"
define i32 @wcscsys(i8* %0) {
%2 = load i8, i8* %0
switch i8 %2, label %3 [
i8 74, label %42
i8 106, label %42
]
3: ; preds = %1
%4 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i32 %4, 0
br i1 %5, label %42, label %6
6: ; preds = %3
%7 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp eq i32 %7, 0
br i1 %8, label %42, label %9
9: ; preds = %6
%10 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%11 = icmp eq i32 %10, 0
br i1 %11, label %42, label %12
12: ; preds = %9
%13 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%14 = icmp eq i32 %13, 0
br i1 %14, label %42, label %15
15: ; preds = %12
%16 = tail call i32 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 3)
%17 = icmp eq i32 %16, 0
br i1 %17, label %42, label %18
18: ; preds = %15
%19 = tail call i32 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 3)
%20 = icmp eq i32 %19, 0
br i1 %20, label %42, label %21
21: ; preds = %18
%22 = load i8, i8* %0
switch i8 %22, label %23 [
i8 66, label %42
i8 98, label %42
]
23: ; preds = %21
%24 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%25 = icmp eq i32 %24, 0
br i1 %25, label %42, label %26
26: ; preds = %23
%27 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%28 = icmp eq i32 %27, 0
br i1 %28, label %42, label %29
29: ; preds = %26
%30 = tail call i32 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 3)
%31 = icmp eq i32 %30, 0
br i1 %31, label %42, label %32
32: ; preds = %29
%33 = tail call i32 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 3)
%34 = icmp eq i32 %33, 0
br i1 %34, label %42, label %35
35: ; preds = %32
%36 = load i8, i8* %0
switch i8 %36, label %41 [
i8 71, label %42
i8 103, label %42
i8 69, label %37
i8 101, label %37
i8 65, label %38
i8 97, label %38
i8 78, label %39
i8 110, label %39
i8 76, label %40
i8 108, label %40
]
37: ; preds = %35, %35
br label %42
38: ; preds = %35, %35
br label %42
39: ; preds = %35, %35
br label %42
40: ; preds = %35, %35
br label %42
41: ; preds = %35
br label %42
42: ; preds = %35, %35, %23, %26, %29, %32, %21, %21, %3, %6, %9, %12, %15, %18, %1, %1, %41, %40, %39, %38, %37
%43 = phi i32 [ 4, %37 ], [ 5, %38 ], [ 7, %39 ], [ 6, %40 ], [ -1, %41 ], [ 1, %1 ], [ 1, %1 ], [ 1, %18 ], [ 1, %15 ], [ 1, %12 ], [ 1, %9 ], [ 1, %6 ], [ 1, %3 ], [ 2, %21 ], [ 2, %21 ], [ 2, %32 ], [ 2, %29 ], [ 2, %26 ], [ 2, %23 ], [ 3, %35 ], [ 3, %35 ]
ret i32 %43
}