#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 setExeNumber() {
  int exeNum = 0;
  do {
    printf("\n\rInsert the number of remaning executions : ");
    scanf("%i", &exeNum);
    if ((exeNum < 0) || (exeNum > 99)) {
      printf("\n\rError! It must be a number between 1 and 99. \n\r");
    }
  } while ((exeNum <= 0) || (exeNum > 99));
  return exeNum;
}


x86 assembly (clang, -O0):
<setExeNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x4(%rbp)
jl     115f <setExeNumber+0x3f>
cmpl   $0x63,-0x4(%rbp)
jle    116b <setExeNumber+0x4b>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
jmp    1170 <setExeNumber+0x50>
mov    $0x1,%al
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1189 <setExeNumber+0x69>
cmpl   $0x63,-0x4(%rbp)
setg   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
test   $0x1,%al
jne    112f <setExeNumber+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setExeNumber>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xec9(%rip),%r14
lea    0xef0(%rip),%r15
lea    0x4(%rsp),%rbx
lea    0xee7(%rip),%r12
jmp    1158 <setExeNumber+0x38>
nopl   0x0(%rax)
lea    -0x64(%rax),%ecx
cmp    $0xffffff9d,%ecx
jae    1182 <setExeNumber+0x62>
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    $0x64,%eax
jb     1150 <setExeNumber+0x30>
mov    %r12,%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
jmp    1150 <setExeNumber+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [46 x i8] c"\0A\0DInsert the number of remaning executions : \00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [50 x i8] c"\0A\0DError! It must be a number between 1 and 99. \0A\0D\00"
define i32 @setExeNumber() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %19, %0
%3 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 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
%6 = icmp slt i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i32, i32* %1
%9 = icmp sgt i32 %8, 99
br i1 %9, label %10, label %12
10: ; preds = %7, %2
%11 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0))
br label %12
12: ; preds = %10, %7
br label %13
13: ; preds = %12
%14 = load i32, i32* %1
%15 = icmp sle i32 %14, 0
br i1 %15, label %19, label %16
16: ; preds = %13
%17 = load i32, i32* %1
%18 = icmp sgt i32 %17, 99
br label %19
19: ; preds = %16, %13
%20 = phi i1 [ true, %13 ], [ %18, %16 ]
br i1 %20, label %2, label %21
21: ; preds = %19
%22 = load i32, i32* %1
ret i32 %22
}

LLVM IR (-O2):
@.str = [46 x i8] c"\0A\0DInsert the number of remaning executions : \00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [50 x i8] c"\0A\0DError! It must be a number between 1 and 99. \0A\0D\00"
define i32 @setExeNumber() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
br label %3
3: ; preds = %11, %0
%4 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp ugt i32 %6, 99
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0))
%10 = load i32, i32* %1
br label %11
11: ; preds = %8, %3
%12 = phi i32 [ %10, %8 ], [ %6, %3 ]
%13 = add i32 %12, -100
%14 = icmp ult i32 %13, -99
br i1 %14, label %3, label %15
15: ; preds = %11
ret i32 %12
}