#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 atoi(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void validaParametrosInput(int argc, char *argv[]) {
  if (argc != 2) {
    printf("\nDebe recibir el número de panel\n\n");
    exit(1);
  }
  int val = atoi(argv[1]);
  if (val < 1 || val > 3) {
    printf("\nEl nro de panel no cumple con los permitidos\n\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<validaParametrosInput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x4(%rbp)
je     115f <validaParametrosInput+0x2f>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jl     1183 <validaParametrosInput+0x53>
cmpl   $0x3,-0x14(%rbp)
jle    1199 <validaParametrosInput+0x69>
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<validaParametrosInput>:
push   %rax
cmp    $0x2,%edi
jne    1149 <validaParametrosInput+0x19>
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
add    $0xfffffffc,%eax
cmp    $0xfffffffc,%eax
jbe    1152 <validaParametrosInput+0x22>
pop    %rax
ret
lea    0xedf(%rip),%rdi
jmp    1159 <validaParametrosInput+0x29>
lea    0xea7(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"\0ADebe recibir el n\C3\BAmero de panel\0A\0A\00"
@.str.1 = [48 x i8] c"\0AEl nro de panel no cumple con los permitidos\0A\0A\00"
define void @validaParametrosInput(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 2
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %2
%12 = load i8**, i8*** %4
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i32 @atoi(i8* %14)
store i32 %15, i32* %5
%16 = load i32, i32* %5
%17 = icmp slt i32 %16, 1
br i1 %17, label %21, label %18
18: ; preds = %11
%19 = load i32, i32* %5
%20 = icmp sgt i32 %19, 3
br i1 %20, label %21, label %24
21: ; preds = %18, %11
%22 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%23 = call i32 @exit(i32 1)
unreachable
24: ; preds = %18
ret void
}

LLVM IR (-O2):
@str = [47 x i8] c"\0AEl nro de panel no cumple con los permitidos\0A\00"
@str.2 = [35 x i8] c"\0ADebe recibir el n\C3\BAmero de panel\0A\00"
define void @validaParametrosInput(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.2, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @atoi(i8* %9)
%11 = add i32 %10, -4
%12 = icmp ult i32 %11, -3
br i1 %12, label %13, label %16
13: ; preds = %7
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
%15 = tail call i32 @exit(i32 1)
unreachable
16: ; preds = %7
ret void
}