#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*/ printf(char *, int);
int scanf(char *, char *);
scalar_t__ strcasecmp(char *, char *);
int main() {
  int i = 1;
  char a[30];
  while (scanf("%s", a) == 1) {
    if (a[0] == '#' && a[1] == '\0') {
      break;
    } else {
      if (strcasecmp(a, "HELLO") == 0) {
        printf("Case %d: ENGLISH\n", i);
      } else if (strcasecmp(a, "HOLA") == 0) {
        printf("Case %d: SPANISH\n", i);
      } else if (strcasecmp(a, "HALLO") == 0) {
        printf("Case %d: GERMAN\n", i);
      } else if (strcasecmp(a, "BONJOUR") == 0) {
        printf("Case %d: FRENCH\n", i);
      } else if (strcasecmp(a, "CIAO") == 0) {
        printf("Case %d: ITALIAN\n", i);
      } else if (strcasecmp(a, "ZDRAVSTVUJTE") == 0) {
        printf("Case %d: RUSSIAN\n", i);
      } else {
        printf("Case %d: UNKNOWN\n", i);
      }
    }
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
lea    -0x30(%rbp),%rsi
lea    0xeaf(%rip),%rdi
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    12cd <main+0x19d>
movsbl -0x30(%rbp),%eax
cmp    $0x23,%eax
jne    117e <main+0x4e>
movsbl -0x2f(%rbp),%eax
cmp    $0x0,%eax
jne    117e <main+0x4e>
jmp    12cd <main+0x19d>
lea    -0x30(%rbp),%rdi
lea    0xe7a(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    11ac <main+0x7c>
mov    -0x8(%rbp),%esi
lea    0xe67(%rip),%rdi
call   1040 <printf@plt>
jmp    12ba <main+0x18a>
lea    -0x30(%rbp),%rdi
lea    0xe64(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    11da <main+0xaa>
mov    -0x8(%rbp),%esi
lea    0xe50(%rip),%rdi
call   1040 <printf@plt>
jmp    12b5 <main+0x185>
lea    -0x30(%rbp),%rdi
lea    0xe4d(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    1208 <main+0xd8>
mov    -0x8(%rbp),%esi
lea    0xe3a(%rip),%rdi
call   1040 <printf@plt>
jmp    12b0 <main+0x180>
lea    -0x30(%rbp),%rdi
lea    0xe36(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    1236 <main+0x106>
mov    -0x8(%rbp),%esi
lea    0xe25(%rip),%rdi
call   1040 <printf@plt>
jmp    12ab <main+0x17b>
lea    -0x30(%rbp),%rdi
lea    0xe21(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    1264 <main+0x134>
mov    -0x8(%rbp),%esi
lea    0xe0d(%rip),%rdi
call   1040 <printf@plt>
jmp    12a6 <main+0x176>
lea    -0x30(%rbp),%rdi
lea    0xe0a(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    1292 <main+0x162>
mov    -0x8(%rbp),%esi
lea    0xdfe(%rip),%rdi
call   1040 <printf@plt>
jmp    12a1 <main+0x171>
mov    -0x8(%rbp),%esi
lea    0xdfc(%rip),%rdi
call   1040 <printf@plt>
jmp    12a6 <main+0x176>
jmp    12ab <main+0x17b>
jmp    12b0 <main+0x180>
jmp    12b5 <main+0x185>
jmp    12ba <main+0x18a>
jmp    12bf <main+0x18f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x16>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0xebb(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    125d <main+0x12d>
mov    $0x1,%ebx
lea    0xea1(%rip),%r14
mov    %rsp,%r15
lea    0xe9d(%rip),%rbp
lea    0xe8d(%rip),%r12
lea    0xea6(%rip),%r13
jmp    119e <main+0x6e>
nopl   0x0(%rax)
mov    %ebx,%esi
call   1040 <printf@plt>
add    $0x1,%ebx
mov    %r12,%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    125d <main+0x12d>
cmpb   $0x23,(%rsp)
jne    11af <main+0x7f>
cmpb   $0x0,0x1(%rsp)
je     125d <main+0x12d>
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <strcasecmp@plt>
mov    %rbp,%rdi
test   %rax,%rax
je     1180 <main+0x50>
mov    %r15,%rdi
lea    0xe4f(%rip),%rsi
call   1030 <strcasecmp@plt>
mov    %r13,%rdi
test   %rax,%rax
je     1180 <main+0x50>
mov    %r15,%rdi
lea    0xe4f(%rip),%rsi
call   1030 <strcasecmp@plt>
lea    0xe49(%rip),%rdi
test   %rax,%rax
je     1180 <main+0x50>
mov    %r15,%rdi
lea    0xe4b(%rip),%rsi
call   1030 <strcasecmp@plt>
lea    0xe47(%rip),%rdi
test   %rax,%rax
je     1180 <main+0x50>
mov    %r15,%rdi
lea    0xe45(%rip),%rsi
call   1030 <strcasecmp@plt>
lea    0xe3e(%rip),%rdi
test   %rax,%rax
je     1180 <main+0x50>
mov    %r15,%rdi
lea    0xe3d(%rip),%rsi
call   1030 <strcasecmp@plt>
lea    0xe3e(%rip),%rdi
test   %rax,%rax
je     1180 <main+0x50>
lea    0xe40(%rip),%rdi
jmp    1180 <main+0x50>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [6 x i8] c"HELLO\00"
@.str.2 = [18 x i8] c"Case %d: ENGLISH\0A\00"
@.str.3 = [5 x i8] c"HOLA\00"
@.str.4 = [18 x i8] c"Case %d: SPANISH\0A\00"
@.str.5 = [6 x i8] c"HALLO\00"
@.str.6 = [17 x i8] c"Case %d: GERMAN\0A\00"
@.str.7 = [8 x i8] c"BONJOUR\00"
@.str.8 = [17 x i8] c"Case %d: FRENCH\0A\00"
@.str.9 = [5 x i8] c"CIAO\00"
@.str.10 = [18 x i8] c"Case %d: ITALIAN\0A\00"
@.str.11 = [13 x i8] c"ZDRAVSTVUJTE\00"
@.str.12 = [18 x i8] c"Case %d: RUSSIAN\0A\00"
@.str.13 = [18 x i8] c"Case %d: UNKNOWN\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [30 x i8]
store i32 0, i32* %1
store i32 1, i32* %2
br label %4
4: ; preds = %70, %0
%5 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %73
8: ; preds = %4
%9 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 35
br i1 %12, label %13, label %19
13: ; preds = %8
%14 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 1
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %13
br label %73
19: ; preds = %13, %8
%20 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%21 = call i64 @strcasecmp(i8* %20, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %19
%24 = load i32, i32* %2
%25 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %24)
br label %69
26: ; preds = %19
%27 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%28 = call i64 @strcasecmp(i8* %27, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %33
30: ; preds = %26
%31 = load i32, i32* %2
%32 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 %31)
br label %68
33: ; preds = %26
%34 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%35 = call i64 @strcasecmp(i8* %34, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%36 = icmp eq i64 %35, 0
br i1 %36, label %37, label %40
37: ; preds = %33
%38 = load i32, i32* %2
%39 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 %38)
br label %67
40: ; preds = %33
%41 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%42 = call i64 @strcasecmp(i8* %41, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%43 = icmp eq i64 %42, 0
br i1 %43, label %44, label %47
44: ; preds = %40
%45 = load i32, i32* %2
%46 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i32 %45)
br label %66
47: ; preds = %40
%48 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%49 = call i64 @strcasecmp(i8* %48, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %54
51: ; preds = %47
%52 = load i32, i32* %2
%53 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i32 %52)
br label %65
54: ; preds = %47
%55 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%56 = call i64 @strcasecmp(i8* %55, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0))
%57 = icmp eq i64 %56, 0
br i1 %57, label %58, label %61
58: ; preds = %54
%59 = load i32, i32* %2
%60 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0), i32 %59)
br label %64
61: ; preds = %54
%62 = load i32, i32* %2
%63 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0), i32 %62)
br label %64
64: ; preds = %61, %58
br label %65
65: ; preds = %64, %51
br label %66
66: ; preds = %65, %44
br label %67
67: ; preds = %66, %37
br label %68
68: ; preds = %67, %30
br label %69
69: ; preds = %68, %23
br label %70
70: ; preds = %69
%71 = load i32, i32* %2
%72 = add nsw i32 %71, 1
store i32 %72, i32* %2
br label %4
73: ; preds = %18, %4
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [6 x i8] c"HELLO\00"
@.str.2 = [18 x i8] c"Case %d: ENGLISH\0A\00"
@.str.3 = [5 x i8] c"HOLA\00"
@.str.4 = [18 x i8] c"Case %d: SPANISH\0A\00"
@.str.5 = [6 x i8] c"HALLO\00"
@.str.6 = [17 x i8] c"Case %d: GERMAN\0A\00"
@.str.7 = [8 x i8] c"BONJOUR\00"
@.str.8 = [17 x i8] c"Case %d: FRENCH\0A\00"
@.str.9 = [5 x i8] c"CIAO\00"
@.str.10 = [18 x i8] c"Case %d: ITALIAN\0A\00"
@.str.11 = [13 x i8] c"ZDRAVSTVUJTE\00"
@.str.12 = [18 x i8] c"Case %d: RUSSIAN\0A\00"
@.str.13 = [18 x i8] c"Case %d: UNKNOWN\0A\00"
define i32 @main() {
%1 = alloca [30 x i8]
%2 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %39
5: ; preds = %0
%6 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 1
br label %7
7: ; preds = %5, %33
%8 = phi i32 [ 1, %5 ], [ %36, %33 ]
%9 = load i8, i8* %2
%10 = icmp eq i8 %9, 35
%11 = load i8, i8* %6
%12 = icmp eq i8 %11, 0
%13 = select i1 %10, i1 %12, i1 false
br i1 %13, label %39, label %14
14: ; preds = %7
%15 = call i64 @strcasecmp(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp eq i64 %15, 0
br i1 %16, label %33, label %17
17: ; preds = %14
%18 = call i64 @strcasecmp(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %33, label %20
20: ; preds = %17
%21 = call i64 @strcasecmp(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %33, label %23
23: ; preds = %20
%24 = call i64 @strcasecmp(i8* %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %33, label %26
26: ; preds = %23
%27 = call i64 @strcasecmp(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%28 = icmp eq i64 %27, 0
br i1 %28, label %33, label %29
29: ; preds = %26
%30 = call i64 @strcasecmp(i8* %2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0))
%31 = icmp eq i64 %30, 0
%32 = select i1 %31, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0)
br label %33
33: ; preds = %29, %26, %23, %20, %17, %14
%34 = phi i8* [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), %14 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), %17 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), %20 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), %23 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), %26 ], [ %32, %29 ]
%35 = call i32 @printf(i8* %34, i32 %8)
%36 = add nuw nsw i32 %8, 1
%37 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%38 = icmp eq i32 %37, 1
br i1 %38, label %7, label %39
39: ; preds = %33, %7, %0
ret i32 0
}