#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*/ generate(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
main() {
  char str[50];
  char c;
  do {
    printf("ENTER EXP\t:");
    scanf("%s", str);
    generate(str);
    scanf("%c", &c);
    printf("DO U WANT TO CONTINUE (y/n)\t:");
    scanf("%c", &c);
  } while (c == 'Y' || c == 'y');
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    -0x40(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x40(%rbp),%rdi
call   1050 <generate@plt>
lea    0xea4(%rip),%rdi
lea    -0x41(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
lea    0xe88(%rip),%rdi
lea    -0x41(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x41(%rbp),%ecx
mov    $0x1,%al
cmp    $0x59,%ecx
mov    %al,-0x42(%rbp)
je     11af <main+0x7f>
movsbl -0x41(%rbp),%eax
cmp    $0x79,%eax
sete   %al
mov    %al,-0x42(%rbp)
mov    -0x42(%rbp),%al
test   $0x1,%al
jne    113f <main+0xf>
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
lea    0xebb(%rip),%r14
lea    0xec0(%rip),%r15
lea    0x10(%rsp),%r12
lea    0xeb7(%rip),%r13
lea    0xf(%rsp),%rbx
lea    0xeae(%rip),%rbp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <scanf@plt>
mov    %r12,%rdi
call   1050 <generate@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    %rbp,%rdi
call   1030 <printf@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movzbl 0xf(%rsp),%eax
and    $0xdf,%al
cmp    $0x59,%al
je     1170 <main+0x40>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"ENTER EXP\09:\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [3 x i8] c"%c\00"
@.str.3 = [30 x i8] c"DO U WANT TO CONTINUE (y/n)\09:\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [50 x i8]
%3 = alloca i8
store i32 0, i32* %1
br label %4
4: ; preds = %21, %0
%5 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%9 = call i32 @generate(i8* %8)
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %3)
%11 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %3)
br label %13
13: ; preds = %4
%14 = load i8, i8* %3
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 89
br i1 %16, label %21, label %17
17: ; preds = %13
%18 = load i8, i8* %3
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 121
br label %21
21: ; preds = %17, %13
%22 = phi i1 [ true, %13 ], [ %20, %17 ]
br i1 %22, label %4, label %23
23: ; preds = %21
%24 = load i32, i32* %1
ret i32 %24
}

LLVM IR (-O2):
@.str = [12 x i8] c"ENTER EXP\09:\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [3 x i8] c"%c\00"
@.str.3 = [30 x i8] c"DO U WANT TO CONTINUE (y/n)\09:\00"
define i32 @main() {
%1 = alloca [50 x i8]
%2 = alloca i8
%3 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
br label %4
4: ; preds = %4, %0
%5 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%7 = call i32 @generate(i8* %3)
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %2)
%9 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %2)
%11 = load i8, i8* %2
%12 = and i8 %11, -33
%13 = icmp eq i8 %12, 89
br i1 %13, label %4, label %14
14: ; preds = %4
ret i32 0
}