#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 */
typedef int /*<<< orphan*/ str2;
typedef int /*<<< orphan*/ str1;
typedef int /*<<< orphan*/ ptr;
typedef int /*<<< orphan*/ array;

/* Variables and functions */
int /*<<< orphan*/ MyFunc();
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int main(void) {
  int userInput = 0;
  int error = 0;
  printf("enter one character: ");
  userInput = getchar();
  fflush(stdin);
  if (userInput < 65) {
    puts("Wrong Scope");
  } else if (userInput > 90 && userInput < 97) {
    puts("Wrong Scope");
  } else if (userInput > 122) {
    puts("Wrong Scope");
  }
  if (userInput >= 65 && userInput <= 90) {
    userInput += 32;
  } else if (userInput >= 97 && userInput <= 122) {
    userInput -= 32;
  }
  putchar(userInput);
  putchar('\n');
  char str1[50];
  char str2[50];
  char str3[50];
  int len = 0;
  puts("Enter a word");
  fgets(str1, sizeof(str1), stdin);
  len = strlen(str1);
  printf("%d\n", len);
  str1[len - 1] = 0;
  puts("Enter a word");
  fgets(str2, sizeof(str2), stdin);
  len = strlen(str2);
  str2[len - 1] = 0;
  strcpy(str3, str1);
  strcat(str3, str2);
  printf("%s", str3);
  int array[3][2] = {{1, 2}, {3, 4}, {5, 6}};
  int(*ptr)[2] = array;
  printf("%d\n", sizeof(array));
  printf("%d\n", sizeof(array[0]));
  printf("%d\n", sizeof(ptr));
  printf("%d\n", sizeof(*array[0]));
  int i;
  for (i = 0; i < 5; i++)
    MyFunc();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0x0,%al
call   1090 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e09(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
cmpl   $0x41,-0x8(%rbp)
jge    1201 <main+0x61>
lea    0xe1f(%rip),%rdi
call   1050 <puts@plt>
jmp    1246 <main+0xa6>
cmpl   $0x5a,-0x8(%rbp)
jle    1226 <main+0x86>
cmpl   $0x61,-0x8(%rbp)
jge    1226 <main+0x86>
lea    0xdfa(%rip),%rdi
call   1050 <puts@plt>
jmp    1241 <main+0xa1>
cmpl   $0x7a,-0x8(%rbp)
jle    123c <main+0x9c>
lea    0xddf(%rip),%rdi
call   1050 <puts@plt>
jmp    1241 <main+0xa1>
jmp    1246 <main+0xa6>
cmpl   $0x41,-0x8(%rbp)
jl     1268 <main+0xc8>
cmpl   $0x5a,-0x8(%rbp)
jg     1268 <main+0xc8>
mov    -0x8(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    128a <main+0xea>
cmpl   $0x61,-0x8(%rbp)
jl     1285 <main+0xe5>
cmpl   $0x7a,-0x8(%rbp)
jg     1285 <main+0xe5>
mov    -0x8(%rbp),%eax
sub    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    128a <main+0xea>
mov    -0x8(%rbp),%eax
movsbl %al,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movl   $0x0,-0xc4(%rbp)
lea    0xd72(%rip),%rdi
call   1050 <puts@plt>
lea    -0x40(%rbp),%rdi
mov    0x2d28(%rip),%rax
mov    (%rax),%edx
mov    $0x32,%esi
call   1080 <fgets@plt>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,-0xc4(%rbp)
mov    -0xc4(%rbp),%esi
lea    0xd47(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0xc4(%rbp),%eax
sub    $0x1,%eax
cltq
movb   $0x0,-0x40(%rbp,%rax,1)
lea    0xd1c(%rip),%rdi
call   1050 <puts@plt>
lea    -0x80(%rbp),%rdi
mov    0x2cd2(%rip),%rax
mov    (%rax),%edx
mov    $0x32,%esi
call   1080 <fgets@plt>
lea    -0x80(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,-0xc4(%rbp)
mov    -0xc4(%rbp),%eax
sub    $0x1,%eax
cltq
movb   $0x0,-0x80(%rbp,%rax,1)
lea    -0xc0(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0xc0(%rbp),%rdi
lea    -0x80(%rbp),%rsi
call   10c0 <strcat@plt>
lea    -0xc0(%rbp),%rsi
lea    0xcc4(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    0xcc3(%rip),%rax
mov    %rax,-0xe0(%rbp)
mov    0xcbd(%rip),%rax
mov    %rax,-0xd8(%rbp)
mov    0xcb7(%rip),%rax
mov    %rax,-0xd0(%rbp)
lea    -0xe0(%rbp),%rax
mov    %rax,-0xe8(%rbp)
lea    0xc7a(%rip),%rdi
mov    $0x18,%esi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xc67(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xc54(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xc41(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x0,-0xec(%rbp)
cmpl   $0x5,-0xec(%rbp)
jge    142c <main+0x28c>
mov    $0x0,%al
call   10b0 <MyFunc@plt>
mov    -0xec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xec(%rbp)
jmp    1404 <main+0x264>
xor    %eax,%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xb8,%rsp
lea    0xe48(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %eax,%eax
call   1090 <getchar@plt>
mov    %eax,%ebx
mov    0x2e19(%rip),%r13
mov    0x0(%r13),%edi
call   10a0 <fflush@plt>
cmp    $0x41,%ebx
jl     11f9 <main+0x59>
lea    -0x5b(%rbx),%eax
cmp    $0x6,%eax
jb     11f9 <main+0x59>
cmp    $0x7a,%ebx
ja     11f9 <main+0x59>
lea    -0x41(%rbx),%eax
cmp    $0x19,%eax
ja     1205 <main+0x65>
add    $0x20,%ebx
mov    %ebx,%eax
jmp    1211 <main+0x71>
lea    0xe16(%rip),%rdi
call   1050 <puts@plt>
lea    -0x61(%rbx),%ecx
lea    -0x20(%rbx),%eax
cmp    $0x1a,%ecx
cmovae %ebx,%eax
movsbl %al,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xdf8(%rip),%r15
mov    %r15,%rdi
call   1050 <puts@plt>
mov    0x0(%r13),%edx
lea    0x80(%rsp),%r12
mov    %r12,%rdi
mov    $0x32,%esi
call   1080 <fgets@plt>
mov    %r12,%rdi
call   1060 <strlen@plt>
mov    %eax,%ebp
lea    0xdd3(%rip),%r14
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1070 <printf@plt>
movslq %ebp,%rax
movb   $0x0,-0x1(%rax,%r12,1)
mov    %r15,%rdi
call   1050 <puts@plt>
mov    0x0(%r13),%edx
lea    0x40(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x32,%esi
call   1080 <fgets@plt>
mov    %rbp,%rdi
call   1060 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbp,1)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %r12,%rsi
call   1040 <strcpy@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   10c0 <strcat@plt>
lea    0xd75(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x18,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x8,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x8,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x4,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %eax,%eax
call   10b0 <MyFunc@plt>
xor    %eax,%eax
call   10b0 <MyFunc@plt>
xor    %eax,%eax
call   10b0 <MyFunc@plt>
xor    %eax,%eax
call   10b0 <MyFunc@plt>
xor    %eax,%eax
call   10b0 <MyFunc@plt>
xor    %eax,%eax
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [22 x i8] c"enter one character: \00"
@stdin = global i32 0
@.str.1 = [12 x i8] c"Wrong Scope\00"
@.str.2 = [13 x i8] c"Enter a word\00"
@.str.3 = [4 x i8] c"%d\0A\00"
@.str.4 = [3 x i8] c"%s\00"
@__const.main.array = [3 x [2 x i32]] [[2 x i32] [i32 1, i32 2], [2 x i32] [i32 3, i32 4], [2 x i32] [i32 5, i32 6]]
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [50 x i8]
%5 = alloca [50 x i8]
%6 = alloca [50 x i8]
%7 = alloca i32
%8 = alloca [3 x [2 x i32]]
%9 = alloca [2 x i32]*
%10 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%12 = call i32 (...) @getchar()
store i32 %12, i32* %2
%13 = load i32, i32* @stdin
%14 = call i32 @fflush(i32 %13)
%15 = load i32, i32* %2
%16 = icmp slt i32 %15, 65
br i1 %16, label %17, label %19
17: ; preds = %0
%18 = call i32 @puts(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %34
19: ; preds = %0
%20 = load i32, i32* %2
%21 = icmp sgt i32 %20, 90
br i1 %21, label %22, label %27
22: ; preds = %19
%23 = load i32, i32* %2
%24 = icmp slt i32 %23, 97
br i1 %24, label %25, label %27
25: ; preds = %22
%26 = call i32 @puts(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %33
27: ; preds = %22, %19
%28 = load i32, i32* %2
%29 = icmp sgt i32 %28, 122
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = call i32 @puts(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %32
32: ; preds = %30, %27
br label %33
33: ; preds = %32, %25
br label %34
34: ; preds = %33, %17
%35 = load i32, i32* %2
%36 = icmp sge i32 %35, 65
br i1 %36, label %37, label %43
37: ; preds = %34
%38 = load i32, i32* %2
%39 = icmp sle i32 %38, 90
br i1 %39, label %40, label %43
40: ; preds = %37
%41 = load i32, i32* %2
%42 = add nsw i32 %41, 32
store i32 %42, i32* %2
br label %53
43: ; preds = %37, %34
%44 = load i32, i32* %2
%45 = icmp sge i32 %44, 97
br i1 %45, label %46, label %52
46: ; preds = %43
%47 = load i32, i32* %2
%48 = icmp sle i32 %47, 122
br i1 %48, label %49, label %52
49: ; preds = %46
%50 = load i32, i32* %2
%51 = sub nsw i32 %50, 32
store i32 %51, i32* %2
br label %52
52: ; preds = %49, %46, %43
br label %53
53: ; preds = %52, %40
%54 = load i32, i32* %2
%55 = trunc i32 %54 to i8
%56 = call i32 @putchar(i8 signext %55)
%57 = call i32 @putchar(i8 signext 10)
store i32 0, i32* %7
%58 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%59 = getelementptr inbounds [50 x i8], [50 x i8]* %4, i64 0, i64 0
%60 = load i32, i32* @stdin
%61 = call i32 @fgets(i8* %59, i32 50, i32 %60)
%62 = getelementptr inbounds [50 x i8], [50 x i8]* %4, i64 0, i64 0
%63 = call i32 @strlen(i8* %62)
store i32 %63, i32* %7
%64 = load i32, i32* %7
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %64)
%66 = load i32, i32* %7
%67 = sub nsw i32 %66, 1
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [50 x i8], [50 x i8]* %4, i64 0, i64 %68
store i8 0, i8* %69
%70 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%71 = getelementptr inbounds [50 x i8], [50 x i8]* %5, i64 0, i64 0
%72 = load i32, i32* @stdin
%73 = call i32 @fgets(i8* %71, i32 50, i32 %72)
%74 = getelementptr inbounds [50 x i8], [50 x i8]* %5, i64 0, i64 0
%75 = call i32 @strlen(i8* %74)
store i32 %75, i32* %7
%76 = load i32, i32* %7
%77 = sub nsw i32 %76, 1
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [50 x i8], [50 x i8]* %5, i64 0, i64 %78
store i8 0, i8* %79
%80 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%81 = getelementptr inbounds [50 x i8], [50 x i8]* %4, i64 0, i64 0
%82 = call i32 @strcpy(i8* %80, i8* %81)
%83 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%84 = getelementptr inbounds [50 x i8], [50 x i8]* %5, i64 0, i64 0
%85 = call i32 @strcat(i8* %83, i8* %84)
%86 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %86)
%88 = bitcast [3 x [2 x i32]]* %8 to i8*
%89 = getelementptr inbounds [3 x [2 x i32]], [3 x [2 x i32]]* %8, i64 0, i64 0
store [2 x i32]* %89, [2 x i32]** %9
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i64 24)
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i64 8)
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i64 8)
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i64 4)
store i32 0, i32* %10
br label %94
94: ; preds = %99, %53
%95 = load i32, i32* %10
%96 = icmp slt i32 %95, 5
br i1 %96, label %97, label %102
97: ; preds = %94
%98 = call i32 (...) @MyFunc()
br label %99
99: ; preds = %97
%100 = load i32, i32* %10
%101 = add nsw i32 %100, 1
store i32 %101, i32* %10
br label %94
102: ; preds = %94
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"enter one character: \00"
@stdin = global i32 0
@.str.1 = [12 x i8] c"Wrong Scope\00"
@.str.2 = [13 x i8] c"Enter a word\00"
@.str.3 = [4 x i8] c"%d\0A\00"
@.str.4 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [50 x i8]
%2 = alloca [50 x i8]
%3 = alloca [50 x i8]
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (...) @getchar()
%6 = load i32, i32* @stdin
%7 = tail call i32 @fflush(i32 %6)
%8 = icmp slt i32 %5, 65
%9 = add nsw i32 %5, -91
%10 = icmp ult i32 %9, 6
%11 = select i1 %8, i1 true, i1 %10
%12 = icmp ugt i32 %5, 122
%13 = or i1 %11, %12
br i1 %13, label %19, label %14
14: ; preds = %0
%15 = add nsw i32 %5, -65
%16 = icmp ult i32 %15, 26
br i1 %16, label %17, label %21
17: ; preds = %14
%18 = add nuw nsw i32 %5, 32
br label %26
19: ; preds = %0
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %21
21: ; preds = %19, %14
%22 = add i32 %5, -97
%23 = icmp ult i32 %22, 26
%24 = add nsw i32 %5, -32
%25 = select i1 %23, i32 %24, i32 %5
br label %26
26: ; preds = %21, %17
%27 = phi i32 [ %18, %17 ], [ %25, %21 ]
%28 = trunc i32 %27 to i8
%29 = tail call i32 @putchar(i8 signext %28)
%30 = tail call i32 @putchar(i8 signext 10)
%31 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%32 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%33 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%34 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%35 = load i32, i32* @stdin
%36 = call i32 @fgets(i8* %31, i32 50, i32 %35)
%37 = call i32 @strlen(i8* %31)
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %37)
%39 = add nsw i32 %37, -1
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %40
store i8 0, i8* %41
%42 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%43 = load i32, i32* @stdin
%44 = call i32 @fgets(i8* %32, i32 50, i32 %43)
%45 = call i32 @strlen(i8* %32)
%46 = add nsw i32 %45, -1
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 %47
store i8 0, i8* %48
%49 = call i32 @strcpy(i8* %33, i8* %31)
%50 = call i32 @strcat(i8* %33, i8* %32)
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %33)
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i64 24)
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i64 8)
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i64 8)
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i64 4)
%56 = call i32 (...) @MyFunc()
%57 = call i32 (...) @MyFunc()
%58 = call i32 (...) @MyFunc()
%59 = call i32 (...) @MyFunc()
%60 = call i32 (...) @MyFunc()
ret i32 0
}