#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 /*<<< orphan*/ puts(char *);
scalar_t__ scanf(char *, char **);
int main() {
  int cnt = 0;
  char c[6];
  while (scanf("%s", &c)) {
    if (c[0] == '*')
      return 0;
    printf("Case %d: Hajj-e-A", ++cnt);
    if (c[0] == 'H')
      puts("kbar");
    else
      puts("sghar");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    -0xe(%rbp),%rsi
lea    0xeaf(%rip),%rdi
call   1050 <scanf@plt>
cmp    $0x0,%rax
je     11bd <main+0x8d>
movsbl -0xe(%rbp),%eax
cmp    $0x2a,%eax
jne    1179 <main+0x49>
movl   $0x0,-0x4(%rbp)
jmp    11bd <main+0x8d>
mov    -0x8(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x8(%rbp)
lea    0xe7a(%rip),%rdi
call   1040 <printf@plt>
movsbl -0xe(%rbp),%eax
cmp    $0x48,%eax
jne    11ac <main+0x7c>
lea    0xe73(%rip),%rdi
call   1030 <puts@plt>
jmp    11b8 <main+0x88>
lea    0xe67(%rip),%rdi
call   1030 <puts@plt>
jmp    1146 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xebe(%rip),%rdi
lea    0x2(%rsp),%rsi
call   1050 <scanf@plt>
test   %rax,%rax
je     11b5 <main+0x85>
cmpb   $0x2a,0x2(%rsp)
je     11b5 <main+0x85>
mov    $0x1,%ebx
lea    0xe9f(%rip),%r14
lea    0xeaa(%rip),%r13
lea    0xea8(%rip),%rbp
lea    0xe87(%rip),%r15
lea    0x2(%rsp),%r12
xchg   %ax,%ax
mov    %r14,%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
cmpb   $0x48,0x2(%rsp)
mov    %rbp,%rdi
cmove  %r13,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1050 <scanf@plt>
test   %rax,%rax
je     11b5 <main+0x85>
add    $0x1,%ebx
cmpb   $0x2a,0x2(%rsp)
jne    1180 <main+0x50>
xor    %eax,%eax
add    $0x8,%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 = [18 x i8] c"Case %d: Hajj-e-A\00"
@.str.2 = [5 x i8] c"kbar\00"
@.str.3 = [6 x i8] c"sghar\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [6 x i8]
store i32 0, i32* %1
store i32 0, i32* %2
br label %4
4: ; preds = %26, %0
%5 = bitcast [6 x i8]* %3 to i8**
%6 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %27
8: ; preds = %4
%9 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 42
br i1 %12, label %13, label %14
13: ; preds = %8
store i32 0, i32* %1
br label %27
14: ; preds = %8
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
%17 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %16)
%18 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 72
br i1 %21, label %22, label %24
22: ; preds = %14
%23 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %26
24: ; preds = %14
%25 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %26
26: ; preds = %24, %22
br label %4
27: ; preds = %13, %4
%28 = load i32, i32* %1
ret i32 %28
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [18 x i8] c"Case %d: Hajj-e-A\00"
@.str.2 = [5 x i8] c"kbar\00"
@.str.3 = [6 x i8] c"sghar\00"
define i32 @main() {
%1 = alloca [6 x i8]
%2 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%3 = bitcast [6 x i8]* %1 to i8**
%4 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %3)
%5 = icmp eq i64 %4, 0
%6 = load i8, i8* %2
%7 = icmp eq i8 %6, 42
%8 = select i1 %5, i1 true, i1 %7
br i1 %8, label %22, label %9
9: ; preds = %0, %9
%10 = phi i32 [ %11, %9 ], [ 0, %0 ]
%11 = add nuw nsw i32 %10, 1
%12 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = load i8, i8* %2
%14 = icmp eq i8 %13, 72
%15 = select i1 %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0)
%16 = call i32 @puts(i8* dereferenceable(1) %15)
%17 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %3)
%18 = icmp eq i64 %17, 0
%19 = load i8, i8* %2
%20 = icmp eq i8 %19, 42
%21 = select i1 %18, i1 true, i1 %20
br i1 %21, label %22, label %9
22: ; preds = %9, %0
ret i32 0
}