#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 verificaN(int *n) {
  if (*n < 1 || *n > 100) {
    while (*n < 1 || *n > 100) {
      printf("Valor invalido. Informe uma valor entre 1 e 100:\n");
      scanf("%d", &*n);
    }
  }
}


x86 assembly (clang, -O0):
<verificaN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x1,(%rax)
jl     1146 <verificaN+0x26>
mov    -0x8(%rbp),%rax
cmpl   $0x64,(%rax)
jle    11a0 <verificaN+0x80>
jmp    114b <verificaN+0x2b>
mov    -0x8(%rbp),%rcx
mov    $0x1,%al
cmpl   $0x1,(%rcx)
mov    %al,-0x9(%rbp)
jl     116a <verificaN+0x4a>
mov    -0x8(%rbp),%rax
cmpl   $0x64,(%rax)
setg   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    117a <verificaN+0x5a>
jmp    119b <verificaN+0x7b>
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xea1(%rip),%rdi
call   1040 <scanf@plt>
jmp    114b <verificaN+0x2b>
jmp    11a0 <verificaN+0x80>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verificaN>:
push   %r15
push   %r14
push   %rbx
mov    (%rdi),%eax
add    $0xffffff9b,%eax
cmp    $0xffffff9b,%eax
ja     115d <verificaN+0x3d>
mov    %rdi,%rbx
lea    0xeca(%rip),%r14
lea    0xec0(%rip),%r15
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    (%rbx),%eax
add    $0xffffff9b,%eax
cmp    $0xffffff9c,%eax
jb     1140 <verificaN+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [50 x i8] c"Valor invalido. Informe uma valor entre 1 e 100:\0A\00"
@.str.1 = [3 x i8] c"%d\00"
define void @verificaN(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 1
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32*, i32** %2
%8 = load i32, i32* %7
%9 = icmp sgt i32 %8, 100
br i1 %9, label %10, label %26
10: ; preds = %6, %1
br label %11
11: ; preds = %21, %10
%12 = load i32*, i32** %2
%13 = load i32, i32* %12
%14 = icmp slt i32 %13, 1
br i1 %14, label %19, label %15
15: ; preds = %11
%16 = load i32*, i32** %2
%17 = load i32, i32* %16
%18 = icmp sgt i32 %17, 100
br label %19
19: ; preds = %15, %11
%20 = phi i1 [ true, %11 ], [ %18, %15 ]
br i1 %20, label %21, label %25
21: ; preds = %19
%22 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%23 = load i32*, i32** %2
%24 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %23)
br label %11
25: ; preds = %19
br label %26
26: ; preds = %25, %6
ret void
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [49 x i8] c"Valor invalido. Informe uma valor entre 1 e 100:\00"
define void @verificaN(i32* %0) {
%2 = load i32, i32* %0
%3 = add i32 %2, -101
%4 = icmp ult i32 %3, -100
br i1 %4, label %5, label %11
5: ; preds = %1, %5
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %0)
%8 = load i32, i32* %0
%9 = add i32 %8, -101
%10 = icmp ult i32 %9, -100
br i1 %10, label %5, label %11
11: ; preds = %5, %1
ret void
}