#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 *);
int strlen(char *);
int main() {
  char a[5];
  int sz, i = 1;
  while (scanf("%s", a) == 1) {
    sz = strlen(a);
    if (sz == 1) {
      break;
    } else if (sz == 4) {
      printf("Case %d: Hajj-e-Akbar\n", i);
      i++;
    } else if (sz == 5) {
      printf("Case %d: Hajj-e-Asghar\n", i);
      i++;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x14(%rbp)
lea    -0x9(%rbp),%rsi
lea    0xeaf(%rip),%rdi
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    11d2 <main+0xa2>
lea    -0x9(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x1,-0x10(%rbp)
jne    117a <main+0x4a>
jmp    11d2 <main+0xa2>
cmpl   $0x4,-0x10(%rbp)
jne    11a1 <main+0x71>
mov    -0x14(%rbp),%esi
lea    0xe75(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11c8 <main+0x98>
cmpl   $0x5,-0x10(%rbp)
jne    11c3 <main+0x93>
mov    -0x14(%rbp),%esi
lea    0xe65(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11c8 <main+0x98>
jmp    11cd <main+0x9d>
jmp    1146 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xebc(%rip),%rdi
lea    0xb(%rsp),%rsi
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    11b7 <main+0x87>
mov    $0x1,%ebx
lea    0xb(%rsp),%r14
lea    0xe9f(%rip),%r12
lea    0xe95(%rip),%r15
lea    0xea8(%rip),%r13
jmp    119d <main+0x6d>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r13,%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
add    $0x1,%ebx
mov    %r15,%rdi
mov    %r14,%rsi
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    11b7 <main+0x87>
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %r12,%rdi
cmp    $0x4,%eax
je     1183 <main+0x53>
cmp    $0x5,%eax
je     1180 <main+0x50>
cmp    $0x1,%eax
jne    118d <main+0x5d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [23 x i8] c"Case %d: Hajj-e-Akbar\0A\00"
@.str.2 = [24 x i8] c"Case %d: Hajj-e-Asghar\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %4
br label %5
5: ; preds = %33, %0
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %34
9: ; preds = %5
%10 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%11 = call i32 @strlen(i8* %10)
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 1
br i1 %13, label %14, label %15
14: ; preds = %9
br label %34
15: ; preds = %9
%16 = load i32, i32* %3
%17 = icmp eq i32 %16, 4
br i1 %17, label %18, label %23
18: ; preds = %15
%19 = load i32, i32* %4
%20 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %19)
%21 = load i32, i32* %4
%22 = add nsw i32 %21, 1
store i32 %22, i32* %4
br label %32
23: ; preds = %15
%24 = load i32, i32* %3
%25 = icmp eq i32 %24, 5
br i1 %25, label %26, label %31
26: ; preds = %23
%27 = load i32, i32* %4
%28 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %27)
%29 = load i32, i32* %4
%30 = add nsw i32 %29, 1
store i32 %30, i32* %4
br label %31
31: ; preds = %26, %23
br label %32
32: ; preds = %31, %18
br label %33
33: ; preds = %32
br label %5
34: ; preds = %14, %5
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [23 x i8] c"Case %d: Hajj-e-Akbar\0A\00"
@.str.2 = [24 x i8] c"Case %d: Hajj-e-Asghar\0A\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 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 %17
5: ; preds = %0, %13
%6 = phi i32 [ %14, %13 ], [ 1, %0 ]
%7 = call i32 @strlen(i8* %2)
switch i32 %7, label %13 [
i32 1, label %17
i32 4, label %9
i32 5, label %8
]
8: ; preds = %5
br label %9
9: ; preds = %5, %8
%10 = phi i8* [ getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), %8 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), %5 ]
%11 = call i32 @printf(i8* %10, i32 %6)
%12 = add nsw i32 %6, 1
br label %13
13: ; preds = %9, %5
%14 = phi i32 [ %6, %5 ], [ %12, %9 ]
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%16 = icmp eq i32 %15, 1
br i1 %16, label %5, label %17
17: ; preds = %13, %5, %0
ret i32 0
}