#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 */
double Arccoseno(double);
double ArcoTangente2(double, double);
double Arcseno(double);
double Arctangente(double);
double Ceil(double);
double Coseno(double);
double CosenoHiperbolico(double);
double Division(double, double);
double Exponencial(double);
double Floor(double);
double Fmod(double, double, double);
double Frexp(double, double);
double Idexp(double, double);
double LogB10(double);
double Logaritmo(double);
double Modf(double, double, double);
double Multiplicacion(double, double);
double Potencia(double, double);
double Raiz_cuadrada(double);
double Resta(double, double);
double Seno(double);
double SenoHiperbolico(double);
double Suma(double, double);
double Tangente(double);
double TangenteHiperbolico(double);
double ValorAbsoluto(double);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int validar_es_entero(char *, int *);
int main() {
  double a, b, resultado;
  int Opcion;
  char buffer[9];
  while (1) {
    printf("\n\t\tCALCULATOR\n\n");
    printf("\t 1.- Sum\n");
    printf("\t 2.- Subtraction\n");
    printf("\t 3.- Multiplication\n");
    printf("\t 4.- Division\n");
    printf("\t 5.- Square Root\n");
    printf("\t 6.- Pow\n");
    printf("\t 7.- Natural Logarithm\n");
    printf("\t 8.- Sine\n");
    printf("\t 9.- Cosine\n");
    printf("\t 10.-Tangent\n");
    printf("\t 11.-arc sine\n");
    printf("\t 12.-Arc Cosine\n");
    printf("\t 13.-Arc Tangent\n");
    printf("\t 14.-Ceil\n");
    printf("\t 15.-Arc Tangent (two parameters\n");
    printf("\t 16.-Hyperbolic Cosine\n");
    printf("\t 17.-Hyperbolic Sine\n");
    printf("\t 18.-Hyperbolic Tangent\n");
    printf("\t 19.-Exponential\n");
    printf("\t 20.-Frexp\n");
    printf("\t 21.-Idexp\n");
    printf("\t 22.-Logarithm base ten\n");
    printf("\t 23.-Modf\n");
    printf("\t 24.-Absolute value\n");
    printf("\t 25.-Floor\n");
    printf("\t 26.-Fmod\n");
    printf("\t\t Choose your option:");
    scanf("%s", buffer);
    if (validar_es_entero(buffer, &Opcion) != true)
      Opcion = 999;
    resultado = 0.0;
    switch (Opcion) {
    case 1:
      resultado = Suma(a, b);
      break;
    case 2:
      resultado = Resta(a, b);
      break;
    case 3:
      resultado = Multiplicacion(a, b);
      break;
    case 4:
      resultado = Division(a, b);
      break;
    case 5:
      resultado = Raiz_cuadrada(a);
      break;
    case 6:
      resultado = Potencia(a, b);
      break;
    case 7:
      resultado = Logaritmo(a);
      break;
    case 8:
      resultado = Seno(a);
      break;
    case 9:
      resultado = Coseno(a);
      break;
    case 10:
      resultado = Tangente(a);
      break;
    case 11:
      resultado = Arcseno(a);
      break;
    case 12:
      resultado = Arccoseno(a);
      break;
    case 13:
      resultado = Arctangente(a);
      break;
    case 14:
      resultado = Ceil(a);
      break;
    case 15:
      resultado = ArcoTangente2(a, b);
      break;
    case 16:
      resultado = CosenoHiperbolico(a);
      break;
    case 17:
      resultado = SenoHiperbolico(a);
      break;
    case 18:
      resultado = TangenteHiperbolico(a);
      break;
    case 19:
      resultado = Exponencial(a);
      break;
    case 20:
      resultado = Frexp(a, b);
      break;
    case 21:
      resultado = Idexp(a, b);
      break;
    case 22:
      resultado = LogB10(a);
      break;
    case 23:
      resultado = Modf(a, b, resultado);
      break;
    case 24:
      resultado = ValorAbsoluto(a);
      break;
    case 25:
      resultado = Fmod(a, b, resultado);
      break;
    case 26:
      resultado = Floor(a);
      break;
    default:
      Opcion = 999;
      printf("Invalid option , try again only digits.");
    }
    if (Opcion < 999)
      printf("\n The result of the chosen option: %lf \n", resultado);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xd82(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xd84(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xd81(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xd86(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xd8e(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xd90(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xd95(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xd92(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xd9d(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xd9b(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xd9b(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xd9c(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xd9e(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xda2(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xda7(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xda5(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xdba(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xdc5(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xdce(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xdda(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xddf(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xdde(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xddd(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xde9(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xde7(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xdef(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xdee(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xdec(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    -0x2d(%rbp),%rsi
lea    0xdf1(%rip),%rdi
call   1160 <scanf@plt>
lea    -0x2d(%rbp),%rdi
lea    -0x24(%rbp),%rsi
call   11b0 <validar_es_entero@plt>
cmp    $0x1,%eax
je     1494 <main+0x1c4>
movl   $0x3e7,-0x24(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x38(%rbp)
sub    $0x19,%eax
ja     1709 <main+0x439>
mov    -0x38(%rbp),%rax
lea    0xb44(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1050 <Suma@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    171e <main+0x44e>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   10c0 <Resta@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    171e <main+0x44e>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1100 <Multiplicacion@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    171e <main+0x44e>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1070 <Division@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    171e <main+0x44e>
movsd  -0x10(%rbp),%xmm0
call   11c0 <Raiz_cuadrada@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    171e <main+0x44e>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   10e0 <Potencia@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    171e <main+0x44e>
movsd  -0x10(%rbp),%xmm0
call   11e0 <Logaritmo@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    171e <main+0x44e>
movsd  -0x10(%rbp),%xmm0
call   1040 <Seno@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    171e <main+0x44e>
movsd  -0x10(%rbp),%xmm0
call   10f0 <Coseno@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    171e <main+0x44e>
movsd  -0x10(%rbp),%xmm0
call   1120 <Tangente@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    171e <main+0x44e>
movsd  -0x10(%rbp),%xmm0
call   10b0 <Arcseno@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    171e <main+0x44e>
movsd  -0x10(%rbp),%xmm0
call   1090 <Arccoseno@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    171e <main+0x44e>
movsd  -0x10(%rbp),%xmm0
call   1140 <Arctangente@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    171e <main+0x44e>
movsd  -0x10(%rbp),%xmm0
call   11d0 <Ceil@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    171e <main+0x44e>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1030 <ArcoTangente2@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    171e <main+0x44e>
movsd  -0x10(%rbp),%xmm0
call   1110 <CosenoHiperbolico@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    171e <main+0x44e>
movsd  -0x10(%rbp),%xmm0
call   1150 <SenoHiperbolico@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    171e <main+0x44e>
movsd  -0x10(%rbp),%xmm0
call   10d0 <TangenteHiperbolico@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    171e <main+0x44e>
movsd  -0x10(%rbp),%xmm0
call   1170 <Exponencial@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    171e <main+0x44e>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   11f0 <Frexp@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    171e <main+0x44e>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1190 <Idexp@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    171e <main+0x44e>
movsd  -0x10(%rbp),%xmm0
call   11a0 <LogB10@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    171e <main+0x44e>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   1130 <Modf@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    171e <main+0x44e>
movsd  -0x10(%rbp),%xmm0
call   1080 <ValorAbsoluto@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    171e <main+0x44e>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   1060 <Fmod@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    171e <main+0x44e>
movsd  -0x10(%rbp),%xmm0
call   1180 <Floor@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    171e <main+0x44e>
movl   $0x3e7,-0x24(%rbp)
lea    0xb4f(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
cmpl   $0x3e7,-0x24(%rbp)
jge    173e <main+0x46e>
movsd  -0x20(%rbp),%xmm0
lea    0xb57(%rip),%rdi
mov    $0x1,%al
call   10a0 <printf@plt>
jmp    12df <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xf90(%rip),%r15
lea    0xf95(%rip),%r12
lea    0xd65(%rip),%r13
lea    0xd75(%rip),%rbx
lea    0xf(%rsp),%rbp
lea    0x8(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0xdac(%rip),%rdi
call   1050 <puts@plt>
lea    0xdaf(%rip),%rdi
call   1050 <puts@plt>
lea    0xdad(%rip),%rdi
call   1050 <puts@plt>
lea    0xdb3(%rip),%rdi
call   1050 <puts@plt>
lea    0xdbc(%rip),%rdi
call   1050 <puts@plt>
lea    0xdbf(%rip),%rdi
call   1050 <puts@plt>
lea    0xdc5(%rip),%rdi
call   1050 <puts@plt>
lea    0xdc3(%rip),%rdi
call   1050 <puts@plt>
lea    0xdcf(%rip),%rdi
call   1050 <puts@plt>
lea    0xdce(%rip),%rdi
call   1050 <puts@plt>
lea    0xdcf(%rip),%rdi
call   1050 <puts@plt>
lea    0xdd1(%rip),%rdi
call   1050 <puts@plt>
lea    0xdd4(%rip),%rdi
call   1050 <puts@plt>
lea    0xdd9(%rip),%rdi
call   1050 <puts@plt>
lea    0xddf(%rip),%rdi
call   1050 <puts@plt>
lea    0xdde(%rip),%rdi
call   1050 <puts@plt>
lea    0xdf4(%rip),%rdi
call   1050 <puts@plt>
lea    0xe00(%rip),%rdi
call   1050 <puts@plt>
lea    0xe0a(%rip),%rdi
call   1050 <puts@plt>
lea    0xe17(%rip),%rdi
call   1050 <puts@plt>
lea    0xe1d(%rip),%rdi
call   1050 <puts@plt>
lea    0xe1d(%rip),%rdi
call   1050 <puts@plt>
lea    0xe1d(%rip),%rdi
call   1050 <puts@plt>
lea    0xe2a(%rip),%rdi
call   1050 <puts@plt>
lea    0xe29(%rip),%rdi
call   1050 <puts@plt>
mov    %r15,%rdi
call   1050 <puts@plt>
mov    %r12,%rdi
call   1050 <puts@plt>
mov    %r13,%rdi
xor    %eax,%eax
call   10b0 <printf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1170 <scanf@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
call   11c0 <validar_es_entero@plt>
cmp    $0x1,%eax
jne    14b0 <main+0x1d0>
mov    0x8(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0x19,%eax
ja     14b0 <main+0x1d0>
lea    0xb6c(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
call   1060 <Suma@plt>
jmp    14c9 <main+0x1e9>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movl   $0x3e7,0x8(%rsp)
lea    0xbc3(%rip),%rdi
xor    %eax,%eax
call   10b0 <printf@plt>
xorps  %xmm0,%xmm0
cmpl   $0x3e6,0x8(%rsp)
jg     1320 <main+0x40>
lea    0xbcc(%rip),%rdi
mov    $0x1,%al
call   10b0 <printf@plt>
jmp    1320 <main+0x40>
call   10d0 <Resta@plt>
jmp    14c9 <main+0x1e9>
call   1110 <Multiplicacion@plt>
jmp    14c9 <main+0x1e9>
call   1080 <Division@plt>
jmp    14c9 <main+0x1e9>
call   11d0 <Raiz_cuadrada@plt>
jmp    14c9 <main+0x1e9>
call   10f0 <Potencia@plt>
jmp    14c9 <main+0x1e9>
call   11f0 <Logaritmo@plt>
jmp    14c9 <main+0x1e9>
call   1040 <Seno@plt>
jmp    14c9 <main+0x1e9>
call   1100 <Coseno@plt>
jmp    14c9 <main+0x1e9>
call   1130 <Tangente@plt>
jmp    14c9 <main+0x1e9>
call   10c0 <Arcseno@plt>
jmp    14c9 <main+0x1e9>
call   10a0 <Arccoseno@plt>
jmp    14c9 <main+0x1e9>
call   1150 <Arctangente@plt>
jmp    14c9 <main+0x1e9>
call   11e0 <Ceil@plt>
jmp    14c9 <main+0x1e9>
call   1030 <ArcoTangente2@plt>
jmp    14c9 <main+0x1e9>
call   1120 <CosenoHiperbolico@plt>
jmp    14c9 <main+0x1e9>
call   1160 <SenoHiperbolico@plt>
jmp    14c9 <main+0x1e9>
call   10e0 <TangenteHiperbolico@plt>
jmp    14c9 <main+0x1e9>
call   1180 <Exponencial@plt>
jmp    14c9 <main+0x1e9>
call   1200 <Frexp@plt>
jmp    14c9 <main+0x1e9>
call   11a0 <Idexp@plt>
jmp    14c9 <main+0x1e9>
call   11b0 <LogB10@plt>
jmp    14c9 <main+0x1e9>
xorps  %xmm2,%xmm2
call   1140 <Modf@plt>
jmp    14c9 <main+0x1e9>
call   1090 <ValorAbsoluto@plt>
jmp    14c9 <main+0x1e9>
xorps  %xmm2,%xmm2
call   1070 <Fmod@plt>
jmp    14c9 <main+0x1e9>
call   1190 <Floor@plt>
jmp    14c9 <main+0x1e9>

LLVM IR (-O0):
@.str = [16 x i8] c"\0A\09\09CALCULATOR\0A\0A\00"
@.str.1 = [11 x i8] c"\09 1.- Sum\0A\00"
@.str.2 = [19 x i8] c"\09 2.- Subtraction\0A\00"
@.str.3 = [22 x i8] c"\09 3.- Multiplication\0A\00"
@.str.4 = [16 x i8] c"\09 4.- Division\0A\00"
@.str.5 = [19 x i8] c"\09 5.- Square Root\0A\00"
@.str.6 = [11 x i8] c"\09 6.- Pow\0A\00"
@.str.7 = [25 x i8] c"\09 7.- Natural Logarithm\0A\00"
@.str.8 = [12 x i8] c"\09 8.- Sine\0A\00"
@.str.9 = [14 x i8] c"\09 9.- Cosine\0A\00"
@.str.10 = [15 x i8] c"\09 10.-Tangent\0A\00"
@.str.11 = [16 x i8] c"\09 11.-arc sine\0A\00"
@.str.12 = [18 x i8] c"\09 12.-Arc Cosine\0A\00"
@.str.13 = [19 x i8] c"\09 13.-Arc Tangent\0A\00"
@.str.14 = [12 x i8] c"\09 14.-Ceil\0A\00"
@.str.15 = [35 x i8] c"\09 15.-Arc Tangent (two parameters\0A\00"
@.str.16 = [25 x i8] c"\09 16.-Hyperbolic Cosine\0A\00"
@.str.17 = [23 x i8] c"\09 17.-Hyperbolic Sine\0A\00"
@.str.18 = [26 x i8] c"\09 18.-Hyperbolic Tangent\0A\00"
@.str.19 = [19 x i8] c"\09 19.-Exponential\0A\00"
@.str.20 = [13 x i8] c"\09 20.-Frexp\0A\00"
@.str.21 = [13 x i8] c"\09 21.-Idexp\0A\00"
@.str.22 = [26 x i8] c"\09 22.-Logarithm base ten\0A\00"
@.str.23 = [12 x i8] c"\09 23.-Modf\0A\00"
@.str.24 = [22 x i8] c"\09 24.-Absolute value\0A\00"
@.str.25 = [13 x i8] c"\09 25.-Floor\0A\00"
@.str.26 = [12 x i8] c"\09 26.-Fmod\0A\00"
@.str.27 = [23 x i8] c"\09\09 Choose your option:\00"
@.str.28 = [3 x i8] c"%s\00"
@.str.29 = [40 x i8] c"Invalid option , try again only digits.\00"
@.str.30 = [41 x i8] c"\0A The result of the chosen option: %lf \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca i32
%6 = alloca [9 x i8]
store i32 0, i32* %1
br label %7
7: ; preds = %0, %142
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.10, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.13, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.14, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.15, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.16, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.17, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.18, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.19, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.20, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.21, i64 0, i64 0))
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.22, i64 0, i64 0))
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.23, i64 0, i64 0))
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.24, i64 0, i64 0))
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.25, i64 0, i64 0))
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.26, i64 0, i64 0))
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.27, i64 0, i64 0))
%36 = getelementptr inbounds [9 x i8], [9 x i8]* %6, i64 0, i64 0
%37 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i64 0, i64 0), i8* %36)
%38 = getelementptr inbounds [9 x i8], [9 x i8]* %6, i64 0, i64 0
%39 = call i32 @validar_es_entero(i8* %38, i32* %5)
%40 = icmp ne i32 %39, 1
br i1 %40, label %41, label %42
41: ; preds = %7
store i32 999, i32* %5
br label %42
42: ; preds = %41, %7
store double 0.000000e+00, double* %4
%43 = load i32, i32* %5
switch i32 %43, label %134 [
i32 1, label %44
i32 2, label %48
i32 3, label %52
i32 4, label %56
i32 5, label %60
i32 6, label %63
i32 7, label %67
i32 8, label %70
i32 9, label %73
i32 10, label %76
i32 11, label %79
i32 12, label %82
i32 13, label %85
i32 14, label %88
i32 15, label %91
i32 16, label %95
i32 17, label %98
i32 18, label %101
i32 19, label %104
i32 20, label %107
i32 21, label %111
i32 22, label %115
i32 23, label %118
i32 24, label %123
i32 25, label %126
i32 26, label %131
]
44: ; preds = %42
%45 = load double, double* %2
%46 = load double, double* %3
%47 = call double @Suma(double %45, double %46)
store double %47, double* %4
br label %136
48: ; preds = %42
%49 = load double, double* %2
%50 = load double, double* %3
%51 = call double @Resta(double %49, double %50)
store double %51, double* %4
br label %136
52: ; preds = %42
%53 = load double, double* %2
%54 = load double, double* %3
%55 = call double @Multiplicacion(double %53, double %54)
store double %55, double* %4
br label %136
56: ; preds = %42
%57 = load double, double* %2
%58 = load double, double* %3
%59 = call double @Division(double %57, double %58)
store double %59, double* %4
br label %136
60: ; preds = %42
%61 = load double, double* %2
%62 = call double @Raiz_cuadrada(double %61)
store double %62, double* %4
br label %136
63: ; preds = %42
%64 = load double, double* %2
%65 = load double, double* %3
%66 = call double @Potencia(double %64, double %65)
store double %66, double* %4
br label %136
67: ; preds = %42
%68 = load double, double* %2
%69 = call double @Logaritmo(double %68)
store double %69, double* %4
br label %136
70: ; preds = %42
%71 = load double, double* %2
%72 = call double @Seno(double %71)
store double %72, double* %4
br label %136
73: ; preds = %42
%74 = load double, double* %2
%75 = call double @Coseno(double %74)
store double %75, double* %4
br label %136
76: ; preds = %42
%77 = load double, double* %2
%78 = call double @Tangente(double %77)
store double %78, double* %4
br label %136
79: ; preds = %42
%80 = load double, double* %2
%81 = call double @Arcseno(double %80)
store double %81, double* %4
br label %136
82: ; preds = %42
%83 = load double, double* %2
%84 = call double @Arccoseno(double %83)
store double %84, double* %4
br label %136
85: ; preds = %42
%86 = load double, double* %2
%87 = call double @Arctangente(double %86)
store double %87, double* %4
br label %136
88: ; preds = %42
%89 = load double, double* %2
%90 = call double @Ceil(double %89)
store double %90, double* %4
br label %136
91: ; preds = %42
%92 = load double, double* %2
%93 = load double, double* %3
%94 = call double @ArcoTangente2(double %92, double %93)
store double %94, double* %4
br label %136
95: ; preds = %42
%96 = load double, double* %2
%97 = call double @CosenoHiperbolico(double %96)
store double %97, double* %4
br label %136
98: ; preds = %42
%99 = load double, double* %2
%100 = call double @SenoHiperbolico(double %99)
store double %100, double* %4
br label %136
101: ; preds = %42
%102 = load double, double* %2
%103 = call double @TangenteHiperbolico(double %102)
store double %103, double* %4
br label %136
104: ; preds = %42
%105 = load double, double* %2
%106 = call double @Exponencial(double %105)
store double %106, double* %4
br label %136
107: ; preds = %42
%108 = load double, double* %2
%109 = load double, double* %3
%110 = call double @Frexp(double %108, double %109)
store double %110, double* %4
br label %136
111: ; preds = %42
%112 = load double, double* %2
%113 = load double, double* %3
%114 = call double @Idexp(double %112, double %113)
store double %114, double* %4
br label %136
115: ; preds = %42
%116 = load double, double* %2
%117 = call double @LogB10(double %116)
store double %117, double* %4
br label %136
118: ; preds = %42
%119 = load double, double* %2
%120 = load double, double* %3
%121 = load double, double* %4
%122 = call double @Modf(double %119, double %120, double %121)
store double %122, double* %4
br label %136
123: ; preds = %42
%124 = load double, double* %2
%125 = call double @ValorAbsoluto(double %124)
store double %125, double* %4
br label %136
126: ; preds = %42
%127 = load double, double* %2
%128 = load double, double* %3
%129 = load double, double* %4
%130 = call double @Fmod(double %127, double %128, double %129)
store double %130, double* %4
br label %136
131: ; preds = %42
%132 = load double, double* %2
%133 = call double @Floor(double %132)
store double %133, double* %4
br label %136
134: ; preds = %42
store i32 999, i32* %5
%135 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.29, i64 0, i64 0))
br label %136
136: ; preds = %134, %131, %126, %123, %118, %115, %111, %107, %104, %101, %98, %95, %91, %88, %85, %82, %79, %76, %73, %70, %67, %63, %60, %56, %52, %48, %44
%137 = load i32, i32* %5
%138 = icmp slt i32 %137, 999
br i1 %138, label %139, label %142
139: ; preds = %136
%140 = load double, double* %4
%141 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.30, i64 0, i64 0), double %140)
br label %142
142: ; preds = %139, %136
br label %7
}

LLVM IR (-O2):
@.str.27 = [23 x i8] c"\09\09 Choose your option:\00"
@.str.28 = [3 x i8] c"%s\00"
@.str.29 = [40 x i8] c"Invalid option , try again only digits.\00"
@.str.30 = [41 x i8] c"\0A The result of the chosen option: %lf \0A\00"
@str = [15 x i8] c"\0A\09\09CALCULATOR\0A\00"
@str.31 = [10 x i8] c"\09 1.- Sum\00"
@str.32 = [18 x i8] c"\09 2.- Subtraction\00"
@str.33 = [21 x i8] c"\09 3.- Multiplication\00"
@str.34 = [15 x i8] c"\09 4.- Division\00"
@str.35 = [18 x i8] c"\09 5.- Square Root\00"
@str.36 = [10 x i8] c"\09 6.- Pow\00"
@str.37 = [24 x i8] c"\09 7.- Natural Logarithm\00"
@str.38 = [11 x i8] c"\09 8.- Sine\00"
@str.39 = [13 x i8] c"\09 9.- Cosine\00"
@str.40 = [14 x i8] c"\09 10.-Tangent\00"
@str.41 = [15 x i8] c"\09 11.-arc sine\00"
@str.42 = [17 x i8] c"\09 12.-Arc Cosine\00"
@str.43 = [18 x i8] c"\09 13.-Arc Tangent\00"
@str.44 = [11 x i8] c"\09 14.-Ceil\00"
@str.45 = [34 x i8] c"\09 15.-Arc Tangent (two parameters\00"
@str.46 = [24 x i8] c"\09 16.-Hyperbolic Cosine\00"
@str.47 = [22 x i8] c"\09 17.-Hyperbolic Sine\00"
@str.48 = [25 x i8] c"\09 18.-Hyperbolic Tangent\00"
@str.49 = [18 x i8] c"\09 19.-Exponential\00"
@str.50 = [12 x i8] c"\09 20.-Frexp\00"
@str.51 = [12 x i8] c"\09 21.-Idexp\00"
@str.52 = [25 x i8] c"\09 22.-Logarithm base ten\00"
@str.53 = [11 x i8] c"\09 23.-Modf\00"
@str.54 = [21 x i8] c"\09 24.-Absolute value\00"
@str.55 = [12 x i8] c"\09 25.-Floor\00"
@str.56 = [11 x i8] c"\09 26.-Fmod\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [9 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
br label %5
5: ; preds = %99, %0
%6 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.31, i64 0, i64 0))
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.32, i64 0, i64 0))
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.33, i64 0, i64 0))
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.34, i64 0, i64 0))
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.35, i64 0, i64 0))
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.36, i64 0, i64 0))
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.37, i64 0, i64 0))
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.38, i64 0, i64 0))
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.39, i64 0, i64 0))
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.40, i64 0, i64 0))
%17 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.41, i64 0, i64 0))
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.42, i64 0, i64 0))
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.43, i64 0, i64 0))
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.44, i64 0, i64 0))
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.45, i64 0, i64 0))
%22 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.46, i64 0, i64 0))
%23 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.47, i64 0, i64 0))
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.48, i64 0, i64 0))
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.49, i64 0, i64 0))
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.50, i64 0, i64 0))
%27 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.51, i64 0, i64 0))
%28 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.52, i64 0, i64 0))
%29 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.53, i64 0, i64 0))
%30 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.54, i64 0, i64 0))
%31 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.55, i64 0, i64 0))
%32 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.56, i64 0, i64 0))
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.27, i64 0, i64 0))
%34 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i64 0, i64 0), i8* %4)
%35 = call i32 @validar_es_entero(i8* %4, i32* %1)
%36 = icmp eq i32 %35, 1
br i1 %36, label %37, label %91
37: ; preds = %5
%38 = load i32, i32* %1
switch i32 %38, label %91 [
i32 1, label %39
i32 2, label %41
i32 3, label %43
i32 4, label %45
i32 5, label %47
i32 6, label %49
i32 7, label %51
i32 8, label %53
i32 9, label %55
i32 10, label %57
i32 11, label %59
i32 12, label %61
i32 13, label %63
i32 14, label %65
i32 15, label %67
i32 16, label %69
i32 17, label %71
i32 18, label %73
i32 19, label %75
i32 20, label %77
i32 21, label %79
i32 22, label %81
i32 23, label %83
i32 24, label %85
i32 25, label %87
i32 26, label %89
]
39: ; preds = %37
%40 = call double @Suma(double undef, double undef)
br label %93
41: ; preds = %37
%42 = call double @Resta(double undef, double undef)
br label %93
43: ; preds = %37
%44 = call double @Multiplicacion(double undef, double undef)
br label %93
45: ; preds = %37
%46 = call double @Division(double undef, double undef)
br label %93
47: ; preds = %37
%48 = call double @Raiz_cuadrada(double undef)
br label %93
49: ; preds = %37
%50 = call double @Potencia(double undef, double undef)
br label %93
51: ; preds = %37
%52 = call double @Logaritmo(double undef)
br label %93
53: ; preds = %37
%54 = call double @Seno(double undef)
br label %93
55: ; preds = %37
%56 = call double @Coseno(double undef)
br label %93
57: ; preds = %37
%58 = call double @Tangente(double undef)
br label %93
59: ; preds = %37
%60 = call double @Arcseno(double undef)
br label %93
61: ; preds = %37
%62 = call double @Arccoseno(double undef)
br label %93
63: ; preds = %37
%64 = call double @Arctangente(double undef)
br label %93
65: ; preds = %37
%66 = call double @Ceil(double undef)
br label %93
67: ; preds = %37
%68 = call double @ArcoTangente2(double undef, double undef)
br label %93
69: ; preds = %37
%70 = call double @CosenoHiperbolico(double undef)
br label %93
71: ; preds = %37
%72 = call double @SenoHiperbolico(double undef)
br label %93
73: ; preds = %37
%74 = call double @TangenteHiperbolico(double undef)
br label %93
75: ; preds = %37
%76 = call double @Exponencial(double undef)
br label %93
77: ; preds = %37
%78 = call double @Frexp(double undef, double undef)
br label %93
79: ; preds = %37
%80 = call double @Idexp(double undef, double undef)
br label %93
81: ; preds = %37
%82 = call double @LogB10(double undef)
br label %93
83: ; preds = %37
%84 = call double @Modf(double undef, double undef, double 0.000000e+00)
br label %93
85: ; preds = %37
%86 = call double @ValorAbsoluto(double undef)
br label %93
87: ; preds = %37
%88 = call double @Fmod(double undef, double undef, double 0.000000e+00)
br label %93
89: ; preds = %37
%90 = call double @Floor(double undef)
br label %93
91: ; preds = %5, %37
store i32 999, i32* %1
%92 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.29, i64 0, i64 0))
br label %93
93: ; preds = %91, %89, %87, %85, %83, %81, %79, %77, %75, %73, %71, %69, %67, %65, %63, %61, %59, %57, %55, %53, %51, %49, %47, %45, %43, %41, %39
%94 = phi double [ 0.000000e+00, %91 ], [ %90, %89 ], [ %88, %87 ], [ %86, %85 ], [ %84, %83 ], [ %82, %81 ], [ %80, %79 ], [ %78, %77 ], [ %76, %75 ], [ %74, %73 ], [ %72, %71 ], [ %70, %69 ], [ %68, %67 ], [ %66, %65 ], [ %64, %63 ], [ %62, %61 ], [ %60, %59 ], [ %58, %57 ], [ %56, %55 ], [ %54, %53 ], [ %52, %51 ], [ %50, %49 ], [ %48, %47 ], [ %46, %45 ], [ %44, %43 ], [ %42, %41 ], [ %40, %39 ]
%95 = load i32, i32* %1
%96 = icmp slt i32 %95, 999
br i1 %96, label %97, label %99
97: ; preds = %93
%98 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.30, i64 0, i64 0), double %94)
br label %99
99: ; preds = %97, %93
br label %5
}