#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 *);
int main() {
  int i, j, c;
  do {
    printf("************\n");
    printf("enter the value of c\n");
    scanf("%d", &c);
    printf("************\n");
    for (j = 0; j < 13; j++) {
      i = j + c;
      switch (i) {
      case 1:
        printf("the value of i is %d\n", i);
        break;
      case 2:
        printf("the value of i is %d\n", i);
        break;
      case 3:
        printf("the value of i is %d\n", i);
        break;
      case 4:
        printf("the value of i is %d\n", i);
        break;
      case 5:
        printf("the value of i is %d\n", i);
        break;
      case 6:
        printf("the value of i is %d\n", i);
        break;
      case 7:
        printf("the value of i is %d\n", i);
        break;
      case 8:
        printf("the value of i is %d\n", i);
        break;
      case 9:
        printf("the value of i is %d\n", i);
        break;
      case 10:
        printf("the value of i is %d\n", i);
        break;
      default:
        printf("the value of i is exceed 10\n");
      }
    }
  } while (i <= 30);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xef2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefa(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0xd,-0xc(%rbp)
jge    12ab <main+0x18b>
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x9,%eax
ja     128a <main+0x16a>
mov    -0x18(%rbp),%rax
lea    0xe5b(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%esi
lea    0xe97(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1298 <main+0x178>
mov    -0x8(%rbp),%esi
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1298 <main+0x178>
mov    -0x8(%rbp),%esi
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1298 <main+0x178>
mov    -0x8(%rbp),%esi
lea    0xe55(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1298 <main+0x178>
mov    -0x8(%rbp),%esi
lea    0xe3f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1298 <main+0x178>
mov    -0x8(%rbp),%esi
lea    0xe29(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1298 <main+0x178>
mov    -0x8(%rbp),%esi
lea    0xe13(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1298 <main+0x178>
mov    -0x8(%rbp),%esi
lea    0xdfd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1298 <main+0x178>
mov    -0x8(%rbp),%esi
lea    0xde7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1298 <main+0x178>
mov    -0x8(%rbp),%esi
lea    0xdd1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1298 <main+0x178>
lea    0xdd4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    129d <main+0x17d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1170 <main+0x50>
jmp    12b0 <main+0x190>
cmpl   $0x1e,-0x8(%rbp)
jle    112f <main+0xf>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xf14(%rip),%r13
lea    0xf1a(%rip),%rbx
lea    0xeb0(%rip),%r14
lea    0xed4(%rip),%rbp
nopw   0x0(%rax,%rax,1)
mov    %r13,%rdi
call   1030 <puts@plt>
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
lea    0xead(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    %r13,%rdi
call   1030 <puts@plt>
xor    %r15d,%r15d
mov    0x4(%rsp),%r12d
lea    (%r15,%r12,1),%eax
add    $0xffffffff,%eax
cmp    $0x9,%eax
ja     11b4 <main+0x84>
movslq (%r14,%rax,4),%rax
add    %r14,%rax
jmp    *%rax
mov    %rbp,%rdi
mov    $0x1,%esi
jmp    1220 <main+0xf0>
mov    %rbx,%rdi
call   1030 <puts@plt>
jmp    1227 <main+0xf7>
mov    %rbp,%rdi
mov    $0x2,%esi
jmp    1220 <main+0xf0>
mov    %rbp,%rdi
mov    $0x3,%esi
jmp    1220 <main+0xf0>
mov    %rbp,%rdi
mov    $0x4,%esi
jmp    1220 <main+0xf0>
mov    %rbp,%rdi
mov    $0x5,%esi
jmp    1220 <main+0xf0>
mov    %rbp,%rdi
mov    $0x6,%esi
jmp    1220 <main+0xf0>
mov    %rbp,%rdi
mov    $0x7,%esi
jmp    1220 <main+0xf0>
mov    %rbp,%rdi
mov    $0x8,%esi
jmp    1220 <main+0xf0>
mov    %rbp,%rdi
mov    $0x9,%esi
jmp    1220 <main+0xf0>
mov    %rbp,%rdi
mov    $0xa,%esi
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r15d
cmp    $0xd,%r15d
jne    1190 <main+0x60>
lea    (%r12,%r15,1),%eax
add    $0xffffffff,%eax
cmp    $0x1f,%eax
jl     1160 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"************\0A\00"
@.str.1 = [22 x i8] c"enter the value of c\0A\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [22 x i8] c"the value of i is %d\0A\00"
@.str.4 = [29 x i8] c"the value of i is exceed 10\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
br label %5
5: ; preds = %55, %0
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %10
10: ; preds = %51, %5
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 13
br i1 %12, label %13, label %54
13: ; preds = %10
%14 = load i32, i32* %3
%15 = load i32, i32* %4
%16 = add nsw i32 %14, %15
store i32 %16, i32* %2
%17 = load i32, i32* %2
switch i32 %17, label %48 [
i32 1, label %18
i32 2, label %21
i32 3, label %24
i32 4, label %27
i32 5, label %30
i32 6, label %33
i32 7, label %36
i32 8, label %39
i32 9, label %42
i32 10, label %45
]
18: ; preds = %13
%19 = load i32, i32* %2
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %19)
br label %50
21: ; preds = %13
%22 = load i32, i32* %2
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %22)
br label %50
24: ; preds = %13
%25 = load i32, i32* %2
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %25)
br label %50
27: ; preds = %13
%28 = load i32, i32* %2
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %28)
br label %50
30: ; preds = %13
%31 = load i32, i32* %2
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %31)
br label %50
33: ; preds = %13
%34 = load i32, i32* %2
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %34)
br label %50
36: ; preds = %13
%37 = load i32, i32* %2
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %37)
br label %50
39: ; preds = %13
%40 = load i32, i32* %2
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %40)
br label %50
42: ; preds = %13
%43 = load i32, i32* %2
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %43)
br label %50
45: ; preds = %13
%46 = load i32, i32* %2
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %46)
br label %50
48: ; preds = %13
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
br label %50
50: ; preds = %48, %45, %42, %39, %36, %33, %30, %27, %24, %21, %18
br label %51
51: ; preds = %50
%52 = load i32, i32* %3
%53 = add nsw i32 %52, 1
store i32 %53, i32* %3
br label %10
54: ; preds = %10
br label %55
55: ; preds = %54
%56 = load i32, i32* %2
%57 = icmp sle i32 %56, 30
br i1 %57, label %5, label %58
58: ; preds = %55
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [22 x i8] c"the value of i is %d\0A\00"
@str.5 = [21 x i8] c"enter the value of c\00"
@str.6 = [13 x i8] c"************\00"
@str.7 = [28 x i8] c"the value of i is exceed 10\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %37, %0
%4 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.6, i64 0, i64 0))
%5 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.5, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.6, i64 0, i64 0))
br label %8
8: ; preds = %3, %34
%9 = phi i32 [ 0, %3 ], [ %35, %34 ]
%10 = load i32, i32* %1
%11 = add nsw i32 %10, %9
switch i32 %11, label %32 [
i32 1, label %12
i32 2, label %14
i32 3, label %16
i32 4, label %18
i32 5, label %20
i32 6, label %22
i32 7, label %24
i32 8, label %26
i32 9, label %28
i32 10, label %30
]
12: ; preds = %8
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 1)
br label %34
14: ; preds = %8
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 2)
br label %34
16: ; preds = %8
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 3)
br label %34
18: ; preds = %8
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 4)
br label %34
20: ; preds = %8
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 5)
br label %34
22: ; preds = %8
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 6)
br label %34
24: ; preds = %8
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 7)
br label %34
26: ; preds = %8
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 8)
br label %34
28: ; preds = %8
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 9)
br label %34
30: ; preds = %8
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 10)
br label %34
32: ; preds = %8
%33 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.7, i64 0, i64 0))
br label %34
34: ; preds = %12, %14, %16, %18, %20, %22, %24, %26, %28, %30, %32
%35 = add nuw nsw i32 %9, 1
%36 = icmp eq i32 %35, 13
br i1 %36, label %37, label %8
37: ; preds = %34
%38 = icmp slt i32 %11, 31
br i1 %38, label %3, label %39
39: ; preds = %37
ret i32 0
}