#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 /*<<< orphan*/ scanf(char *, int *);
void main() {
  int i, a, j = 0;
  for (a = 1; a <= 6; a += 1) {
    printf("Please enter an integer: ");
    scanf("%d", &i);
    switch (i) {
    case 7:
      printf("You entered an 8!\tJust kidding...\tOr am I???\n");
      break;
    case 44:
      printf("Best number ever!\n");
      j += 1;
      break;
    case -4:
      printf("This is a negative four.\n");
      break;
    case 3:
      printf("The number of counting shall be three, and three shall be the "
             "number to which thou shalt count.\n");
      break;
    default:
      printf("Happy Tuesday!!\n");
      break;
    }
  }
  printf("You entered 44 %d times.", j);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x6,-0x8(%rbp)
jg     121b <main+0xfb>
lea    0xeb9(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0xfffffffc,%eax
je     11d4 <main+0xb4>
jmp    1172 <main+0x52>
mov    -0x10(%rbp),%eax
sub    $0x3,%eax
je     11e7 <main+0xc7>
jmp    1183 <main+0x63>
mov    -0x10(%rbp),%eax
sub    $0x7,%eax
je     11a5 <main+0x85>
jmp    1194 <main+0x74>
mov    -0x10(%rbp),%eax
sub    $0x2c,%eax
je     11b8 <main+0x98>
jmp    11fa <main+0xda>
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1208 <main+0xe8>
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1208 <main+0xe8>
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1208 <main+0xe8>
lea    0xe8a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1208 <main+0xe8>
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    120d <main+0xed>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
mov    -0xc(%rbp),%esi
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xece(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    $0x6,%eax
jg     1172 <main+0x42>
cmp    $0xfffffffc,%eax
je     1193 <main+0x63>
cmp    $0x3,%eax
jne    118a <main+0x5a>
lea    0xec6(%rip),%rdi
jmp    11a3 <main+0x73>
cmp    $0x7,%eax
je     119c <main+0x6c>
cmp    $0x2c,%eax
jne    118a <main+0x5a>
mov    $0x1,%ebx
lea    0xf27(%rip),%rdi
jmp    11a3 <main+0x73>
lea    0xf5d(%rip),%rdi
jmp    11a3 <main+0x73>
lea    0xefc(%rip),%rdi
jmp    11a3 <main+0x73>
lea    0xf1e(%rip),%rdi
call   1030 <puts@plt>
lea    0xe51(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe5d(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    $0x6,%eax
jg     11e3 <main+0xb3>
cmp    $0xfffffffc,%eax
je     1207 <main+0xd7>
cmp    $0x3,%eax
jne    11fe <main+0xce>
lea    0xe55(%rip),%rdi
jmp    1217 <main+0xe7>
cmp    $0x7,%eax
je     1210 <main+0xe0>
cmp    $0x2c,%eax
jne    11fe <main+0xce>
lea    0xebb(%rip),%rdi
call   1030 <puts@plt>
add    $0x1,%ebx
jmp    121c <main+0xec>
lea    0xee9(%rip),%rdi
jmp    1217 <main+0xe7>
lea    0xe88(%rip),%rdi
jmp    1217 <main+0xe7>
lea    0xeaa(%rip),%rdi
call   1030 <puts@plt>
lea    0xddd(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xde9(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    $0x6,%eax
jg     1257 <main+0x127>
cmp    $0xfffffffc,%eax
je     127b <main+0x14b>
cmp    $0x3,%eax
jne    1272 <main+0x142>
lea    0xde1(%rip),%rdi
jmp    128b <main+0x15b>
cmp    $0x7,%eax
je     1284 <main+0x154>
cmp    $0x2c,%eax
jne    1272 <main+0x142>
lea    0xe47(%rip),%rdi
call   1030 <puts@plt>
add    $0x1,%ebx
jmp    1290 <main+0x160>
lea    0xe75(%rip),%rdi
jmp    128b <main+0x15b>
lea    0xe14(%rip),%rdi
jmp    128b <main+0x15b>
lea    0xe36(%rip),%rdi
call   1030 <puts@plt>
lea    0xd69(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xd75(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    $0x6,%eax
jg     12cb <main+0x19b>
cmp    $0xfffffffc,%eax
je     12ef <main+0x1bf>
cmp    $0x3,%eax
jne    12e6 <main+0x1b6>
lea    0xd6d(%rip),%rdi
jmp    12ff <main+0x1cf>
cmp    $0x7,%eax
je     12f8 <main+0x1c8>
cmp    $0x2c,%eax
jne    12e6 <main+0x1b6>
lea    0xdd3(%rip),%rdi
call   1030 <puts@plt>
add    $0x1,%ebx
jmp    1304 <main+0x1d4>
lea    0xe01(%rip),%rdi
jmp    12ff <main+0x1cf>
lea    0xda0(%rip),%rdi
jmp    12ff <main+0x1cf>
lea    0xdc2(%rip),%rdi
call   1030 <puts@plt>
lea    0xcf5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xd01(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    $0x6,%eax
jg     133f <main+0x20f>
cmp    $0xfffffffc,%eax
je     1363 <main+0x233>
cmp    $0x3,%eax
jne    135a <main+0x22a>
lea    0xcf9(%rip),%rdi
jmp    1373 <main+0x243>
cmp    $0x7,%eax
je     136c <main+0x23c>
cmp    $0x2c,%eax
jne    135a <main+0x22a>
lea    0xd5f(%rip),%rdi
call   1030 <puts@plt>
add    $0x1,%ebx
jmp    1378 <main+0x248>
lea    0xd8d(%rip),%rdi
jmp    1373 <main+0x243>
lea    0xd2c(%rip),%rdi
jmp    1373 <main+0x243>
lea    0xd4e(%rip),%rdi
call   1030 <puts@plt>
lea    0xc81(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xc8d(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    $0x6,%eax
jg     13b3 <main+0x283>
cmp    $0xfffffffc,%eax
je     13d7 <main+0x2a7>
cmp    $0x3,%eax
jne    13ce <main+0x29e>
lea    0xc85(%rip),%rdi
jmp    13e7 <main+0x2b7>
cmp    $0x7,%eax
je     13e0 <main+0x2b0>
cmp    $0x2c,%eax
jne    13ce <main+0x29e>
lea    0xceb(%rip),%rdi
call   1030 <puts@plt>
add    $0x1,%ebx
jmp    13ec <main+0x2bc>
lea    0xd19(%rip),%rdi
jmp    13e7 <main+0x2b7>
lea    0xcb8(%rip),%rdi
jmp    13e7 <main+0x2b7>
lea    0xcda(%rip),%rdi
call   1030 <puts@plt>
lea    0xc2a(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Please enter an integer: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [46 x i8] c"You entered an 8!\09Just kidding...\09Or am I???\0A\00"
@.str.3 = [19 x i8] c"Best number ever!\0A\00"
@.str.4 = [26 x i8] c"This is a negative four.\0A\00"
@.str.5 = [97 x i8] c"The number of counting shall be three, and three shall be the number to which thou shalt count.\0A\00"
@.str.6 = [17 x i8] c"Happy Tuesday!!\0A\00"
@.str.7 = [25 x i8] c"You entered 44 %d times.\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %3
store i32 1, i32* %2
br label %4
4: ; preds = %24, %0
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 6
br i1 %6, label %7, label %27
7: ; preds = %4
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%10 = load i32, i32* %1
switch i32 %10, label %21 [
i32 7, label %11
i32 44, label %13
i32 -4, label %17
i32 3, label %19
]
11: ; preds = %7
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
br label %23
13: ; preds = %7
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %23
17: ; preds = %7
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
br label %23
19: ; preds = %7
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str.5, i64 0, i64 0))
br label %23
21: ; preds = %7
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0))
br label %23
23: ; preds = %21, %19, %17, %13, %11
br label %24
24: ; preds = %23
%25 = load i32, i32* %2
%26 = add nsw i32 %25, 1
store i32 %26, i32* %2
br label %4
27: ; preds = %4
%28 = load i32, i32* %3
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i32 %28)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"Please enter an integer: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.7 = [25 x i8] c"You entered 44 %d times.\00"
@str = [96 x i8] c"The number of counting shall be three, and three shall be the number to which thou shalt count.\00"
@str.8 = [25 x i8] c"This is a negative four.\00"
@str.9 = [18 x i8] c"Best number ever!\00"
@str.10 = [45 x i8] c"You entered an 8!\09Just kidding...\09Or am I???\00"
@str.11 = [16 x i8] c"Happy Tuesday!!\00"
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
switch i32 %5, label %9 [
i32 7, label %10
i32 44, label %6
i32 -4, label %7
i32 3, label %8
]
6: ; preds = %0
br label %10
7: ; preds = %0
br label %10
8: ; preds = %0
br label %10
9: ; preds = %0
br label %10
10: ; preds = %0, %6, %7, %8, %9
%11 = phi i8* [ getelementptr inbounds ([18 x i8], [18 x i8]* @str.9, i64 0, i64 0), %6 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @str.8, i64 0, i64 0), %7 ], [ getelementptr inbounds ([96 x i8], [96 x i8]* @str, i64 0, i64 0), %8 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @str.11, i64 0, i64 0), %9 ], [ getelementptr inbounds ([45 x i8], [45 x i8]* @str.10, i64 0, i64 0), %0 ]
%12 = phi i32 [ 1, %6 ], [ 0, %7 ], [ 0, %8 ], [ 0, %9 ], [ 0, %0 ]
%13 = call i32 @puts(i8* dereferenceable(1) %11)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%16 = load i32, i32* %1
switch i32 %16, label %26 [
i32 7, label %24
i32 44, label %21
i32 -4, label %19
i32 3, label %17
]
17: ; preds = %10
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([96 x i8], [96 x i8]* @str, i64 0, i64 0))
br label %28
19: ; preds = %10
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.8, i64 0, i64 0))
br label %28
21: ; preds = %10
%22 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.9, i64 0, i64 0))
%23 = add nuw nsw i32 %12, 1
br label %28
24: ; preds = %10
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.10, i64 0, i64 0))
br label %28
26: ; preds = %10
%27 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.11, i64 0, i64 0))
br label %28
28: ; preds = %26, %24, %21, %19, %17
%29 = phi i32 [ %12, %26 ], [ %12, %17 ], [ %12, %19 ], [ %23, %21 ], [ %12, %24 ]
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%31 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%32 = load i32, i32* %1
switch i32 %32, label %42 [
i32 7, label %40
i32 44, label %37
i32 -4, label %35
i32 3, label %33
]
33: ; preds = %28
%34 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([96 x i8], [96 x i8]* @str, i64 0, i64 0))
br label %44
35: ; preds = %28
%36 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.8, i64 0, i64 0))
br label %44
37: ; preds = %28
%38 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.9, i64 0, i64 0))
%39 = add nuw nsw i32 %29, 1
br label %44
40: ; preds = %28
%41 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.10, i64 0, i64 0))
br label %44
42: ; preds = %28
%43 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.11, i64 0, i64 0))
br label %44
44: ; preds = %42, %40, %37, %35, %33
%45 = phi i32 [ %29, %42 ], [ %29, %33 ], [ %29, %35 ], [ %39, %37 ], [ %29, %40 ]
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%47 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%48 = load i32, i32* %1
switch i32 %48, label %58 [
i32 7, label %56
i32 44, label %53
i32 -4, label %51
i32 3, label %49
]
49: ; preds = %44
%50 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([96 x i8], [96 x i8]* @str, i64 0, i64 0))
br label %60
51: ; preds = %44
%52 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.8, i64 0, i64 0))
br label %60
53: ; preds = %44
%54 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.9, i64 0, i64 0))
%55 = add nuw nsw i32 %45, 1
br label %60
56: ; preds = %44
%57 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.10, i64 0, i64 0))
br label %60
58: ; preds = %44
%59 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.11, i64 0, i64 0))
br label %60
60: ; preds = %58, %56, %53, %51, %49
%61 = phi i32 [ %45, %58 ], [ %45, %49 ], [ %45, %51 ], [ %55, %53 ], [ %45, %56 ]
%62 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%63 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%64 = load i32, i32* %1
switch i32 %64, label %74 [
i32 7, label %72
i32 44, label %69
i32 -4, label %67
i32 3, label %65
]
65: ; preds = %60
%66 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([96 x i8], [96 x i8]* @str, i64 0, i64 0))
br label %76
67: ; preds = %60
%68 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.8, i64 0, i64 0))
br label %76
69: ; preds = %60
%70 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.9, i64 0, i64 0))
%71 = add nuw nsw i32 %61, 1
br label %76
72: ; preds = %60
%73 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.10, i64 0, i64 0))
br label %76
74: ; preds = %60
%75 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.11, i64 0, i64 0))
br label %76
76: ; preds = %74, %72, %69, %67, %65
%77 = phi i32 [ %61, %74 ], [ %61, %65 ], [ %61, %67 ], [ %71, %69 ], [ %61, %72 ]
%78 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%79 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%80 = load i32, i32* %1
switch i32 %80, label %90 [
i32 7, label %88
i32 44, label %85
i32 -4, label %83
i32 3, label %81
]
81: ; preds = %76
%82 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([96 x i8], [96 x i8]* @str, i64 0, i64 0))
br label %92
83: ; preds = %76
%84 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.8, i64 0, i64 0))
br label %92
85: ; preds = %76
%86 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.9, i64 0, i64 0))
%87 = add nuw nsw i32 %77, 1
br label %92
88: ; preds = %76
%89 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.10, i64 0, i64 0))
br label %92
90: ; preds = %76
%91 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.11, i64 0, i64 0))
br label %92
92: ; preds = %90, %88, %85, %83, %81
%93 = phi i32 [ %77, %90 ], [ %77, %81 ], [ %77, %83 ], [ %87, %85 ], [ %77, %88 ]
%94 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i32 %93)
ret void
}