#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*/ LC_ALL;
double acoseno(double);
double aseno(double);
double atangente(double);
double atangente2(double, double);
int /*<<< orphan*/ bind_textdomain_codeset(char *, char *);
int /*<<< orphan*/ bindtextdomain(char *, char *);
double coseno(double);
double cosenoh(double);
double divi(double, double);
double exponencial(double);
double funcion_Idexp(double, double);
double funcion_fmod(double, double, double);
double funcion_frexp(double, double);
double funcion_modf(double, double, double);
int /*<<< orphan*/ getchar();
char *gettext(char *);
int /*<<< orphan*/ isnan(float);
double logBase10(double);
double logaritmo(double);
int /*<<< orphan*/ menu();
double mult(double, double);
double piso(double);
double potencia(double, double);
int /*<<< orphan*/ printf(char *, ...);
double raizCuadrada(double);
double resta(double, double);
int /*<<< orphan*/ scanf(char *, float *);
double seno(double);
double senoh(double);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
int /*<<< orphan*/ sleep(int);
double sum(double, double);
int /*<<< orphan*/ system(char *);
double tangente(double);
double tangenteh(double);
double techo(double);
int /*<<< orphan*/ textdomain(char *);
double valorAbsoluto(double);
int main() {
  bind_textdomain_codeset("calcMain", "UTF-8");
  setlocale(LC_ALL, "");
  bindtextdomain("calcMain", "idioma");
  textdomain("calcMain");
  float op;
  int salir = 0;
  double a, b, resultado;
  a = b = 0;
  while (!salir) {
    menu();
    op = 0.0;
    printf(gettext("\t\t\t:::::Type your option:::"));
    scanf("%f", &op);
    if (!isnan(op)) {
      switch ((int)op) {
      case 1:
        resultado = sum(a, b);
        break;
      case 2:
        resultado = resta(a, b);
        break;
      case 3:
        resultado = mult(a, b);
        break;
      case 4:
        resultado = divi(a, b);
        break;
      case 5:
        resultado = seno(a);
        break;
      case 6:
        resultado = coseno(a);
        break;
      case 7:
        resultado = tangente(a);
        break;
      case 8:
        resultado = aseno(a);
        break;
      case 9:
        resultado = acoseno(a);
        break;
      case 10:
        resultado = atangente(a);
        break;
      case 11:
        resultado = senoh(a);
        break;
      case 12:
        resultado = cosenoh(a);
        break;
      case 13:
        resultado = tangenteh(a);
        break;
      case 14:
        resultado = atangente2(a, b);
        break;
      case 15:
        resultado = techo(a);
        break;
      case 16:
        resultado = exponencial(a);
        break;
      case 17:
        resultado = piso(a);
        break;
      case 18:
        resultado = valorAbsoluto(a);
        break;
      case 19:
        resultado = funcion_fmod(a, b, resultado);
        break;
      case 20:
        resultado = funcion_frexp(a, b);
        break;
      case 21:
        resultado = funcion_Idexp(a, b);
        break;
      case 22:
        resultado = logaritmo(a);
        break;
      case 23:
        resultado = logBase10(a);
        break;
      case 24:
        resultado = funcion_modf(a, b, resultado);
        break;
      case 25:
        resultado = potencia(a, b);
        break;
      case 26:
        resultado = raizCuadrada(a);
        break;
      case 27:
        salir = 1;
        break;
      default:
        printf(gettext("unknown option, try again only digits"));
        getchar();
      }
      if (!salir) {
        printf(gettext("\t\t\tResult = %lf\n"), resultado);
      }
      sleep(2);
      system("clear");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xcf6(%rip),%rdi
lea    0xcf8(%rip),%rsi
call   11f0 <bind_textdomain_codeset@plt>
mov    0x2c57(%rip),%rax
mov    (%rax),%edi
lea    0xd45(%rip),%rsi
call   1210 <setlocale@plt>
lea    0xcce(%rip),%rdi
lea    0xcd6(%rip),%rsi
call   1090 <bindtextdomain@plt>
lea    0xcbb(%rip),%rdi
call   1070 <textdomain@plt>
movl   $0x0,-0xc(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    13e3 <main+0x83>
jmp    1703 <main+0x3a3>
mov    $0x0,%al
call   10a0 <menu@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
lea    0xc89(%rip),%rdi
call   10f0 <gettext@plt>
mov    %rax,%rdi
mov    $0x0,%al
call   1100 <printf@plt>
lea    0xc8f(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1220 <scanf@plt>
movss  -0x8(%rbp),%xmm0
call   1200 <isnan@plt>
cmp    $0x0,%eax
jne    16fe <main+0x39e>
cvttss2si -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x30(%rbp)
sub    $0x1a,%eax
ja     16a6 <main+0x346>
mov    -0x30(%rbp),%rax
lea    0xbb3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1190 <sum@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    16c3 <main+0x363>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1240 <resta@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    16c3 <main+0x363>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   11d0 <mult@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    16c3 <main+0x363>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   11b0 <divi@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    16c3 <main+0x363>
movsd  -0x18(%rbp),%xmm0
call   1170 <seno@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    16c3 <main+0x363>
movsd  -0x18(%rbp),%xmm0
call   10b0 <coseno@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    16c3 <main+0x363>
movsd  -0x18(%rbp),%xmm0
call   10c0 <tangente@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    16c3 <main+0x363>
movsd  -0x18(%rbp),%xmm0
call   11e0 <aseno@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    16c3 <main+0x363>
movsd  -0x18(%rbp),%xmm0
call   1270 <acoseno@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    16c3 <main+0x363>
movsd  -0x18(%rbp),%xmm0
call   1050 <atangente@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    16c3 <main+0x363>
movsd  -0x18(%rbp),%xmm0
call   1140 <senoh@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    16c3 <main+0x363>
movsd  -0x18(%rbp),%xmm0
call   1030 <cosenoh@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    16c3 <main+0x363>
movsd  -0x18(%rbp),%xmm0
call   1080 <tangenteh@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    16c3 <main+0x363>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1110 <atangente2@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    16c3 <main+0x363>
movsd  -0x18(%rbp),%xmm0
call   1120 <techo@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    16c3 <main+0x363>
movsd  -0x18(%rbp),%xmm0
call   1180 <exponencial@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    16c3 <main+0x363>
movsd  -0x18(%rbp),%xmm0
call   1130 <piso@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    16c3 <main+0x363>
movsd  -0x18(%rbp),%xmm0
call   1150 <valorAbsoluto@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    16c3 <main+0x363>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
call   10d0 <funcion_fmod@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    16c3 <main+0x363>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1250 <funcion_frexp@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    16c3 <main+0x363>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1230 <funcion_Idexp@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    16c3 <main+0x363>
movsd  -0x18(%rbp),%xmm0
call   11a0 <logaritmo@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    16c3 <main+0x363>
movsd  -0x18(%rbp),%xmm0
call   1040 <logBase10@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    16c3 <main+0x363>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
call   11c0 <funcion_modf@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    16c3 <main+0x363>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1260 <potencia@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    16c3 <main+0x363>
movsd  -0x18(%rbp),%xmm0
call   1060 <raizCuadrada@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    16c3 <main+0x363>
movl   $0x1,-0xc(%rbp)
jmp    16c3 <main+0x363>
lea    0x9f4(%rip),%rdi
call   10f0 <gettext@plt>
mov    %rax,%rdi
mov    $0x0,%al
call   1100 <printf@plt>
mov    $0x0,%al
call   1160 <getchar@plt>
cmpl   $0x0,-0xc(%rbp)
jne    16e8 <main+0x388>
lea    0x9f3(%rip),%rdi
call   10f0 <gettext@plt>
mov    %rax,%rdi
movsd  -0x28(%rbp),%xmm0
mov    $0x1,%al
call   1100 <printf@plt>
mov    $0x2,%edi
call   1280 <sleep@plt>
lea    0x9df(%rip),%rdi
call   10e0 <system@plt>
jmp    13cd <main+0x6d>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xcf7(%rip),%rbx
lea    0xcf9(%rip),%rsi
mov    %rbx,%rdi
call   11f0 <bind_textdomain_codeset@plt>
mov    0x2c55(%rip),%rax
mov    (%rax),%edi
lea    0xd43(%rip),%rsi
call   1210 <setlocale@plt>
lea    0xcdb(%rip),%rsi
mov    %rbx,%rdi
call   1090 <bindtextdomain@plt>
mov    %rbx,%rdi
call   1070 <textdomain@plt>
lea    0xccb(%rip),%r14
lea    0xce0(%rip),%r15
lea    0x14(%rsp),%rbx
lea    0xd0e(%rip),%rbp
lea    0xc2f(%rip),%r12
jmp    13ec <main+0x8c>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %r13d,%r13d
test   %r13d,%r13d
jne    1610 <main+0x2b0>
xor    %eax,%eax
call   10a0 <menu@plt>
movl   $0x0,0x14(%rsp)
mov    %r14,%rdi
call   10f0 <gettext@plt>
mov    %rax,%rdi
xor    %eax,%eax
call   1100 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1220 <scanf@plt>
movss  0x14(%rsp),%xmm0
call   1200 <isnan@plt>
test   %eax,%eax
jne    13e0 <main+0x80>
cvttss2si 0x14(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0x1a,%eax
ja     1454 <main+0xf4>
mov    $0x1,%r13d
movslq (%r12,%rax,4),%rax
add    %r12,%rax
jmp    *%rax
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   1190 <sum@plt>
jmp    15d0 <main+0x270>
lea    0xc46(%rip),%rdi
call   10f0 <gettext@plt>
mov    %rax,%rdi
xor    %eax,%eax
call   1100 <printf@plt>
xor    %eax,%eax
call   1160 <getchar@plt>
jmp    15d6 <main+0x276>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   1240 <resta@plt>
jmp    15d0 <main+0x270>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   11d0 <mult@plt>
jmp    15d0 <main+0x270>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   11b0 <divi@plt>
jmp    15d0 <main+0x270>
xorps  %xmm0,%xmm0
call   1170 <seno@plt>
jmp    15d0 <main+0x270>
xorps  %xmm0,%xmm0
call   10b0 <coseno@plt>
jmp    15d0 <main+0x270>
xorps  %xmm0,%xmm0
call   10c0 <tangente@plt>
jmp    15d0 <main+0x270>
xorps  %xmm0,%xmm0
call   11e0 <aseno@plt>
jmp    15d0 <main+0x270>
xorps  %xmm0,%xmm0
call   1270 <acoseno@plt>
jmp    15d0 <main+0x270>
xorps  %xmm0,%xmm0
call   1050 <atangente@plt>
jmp    15d0 <main+0x270>
xorps  %xmm0,%xmm0
call   1140 <senoh@plt>
jmp    15d0 <main+0x270>
xorps  %xmm0,%xmm0
call   1030 <cosenoh@plt>
jmp    15d0 <main+0x270>
xorps  %xmm0,%xmm0
call   1080 <tangenteh@plt>
jmp    15d0 <main+0x270>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   1110 <atangente2@plt>
jmp    15d0 <main+0x270>
xorps  %xmm0,%xmm0
call   1120 <techo@plt>
jmp    15d0 <main+0x270>
xorps  %xmm0,%xmm0
call   1180 <exponencial@plt>
jmp    15d0 <main+0x270>
xorps  %xmm0,%xmm0
call   1130 <piso@plt>
jmp    15d0 <main+0x270>
xorps  %xmm0,%xmm0
call   1150 <valorAbsoluto@plt>
jmp    15d0 <main+0x270>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movsd  0x8(%rsp),%xmm2
call   10d0 <funcion_fmod@plt>
jmp    15d0 <main+0x270>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   1250 <funcion_frexp@plt>
jmp    15d0 <main+0x270>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   1230 <funcion_Idexp@plt>
jmp    15d0 <main+0x270>
xorps  %xmm0,%xmm0
call   11a0 <logaritmo@plt>
jmp    15d0 <main+0x270>
xorps  %xmm0,%xmm0
call   1040 <logBase10@plt>
jmp    15d0 <main+0x270>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movsd  0x8(%rsp),%xmm2
call   11c0 <funcion_modf@plt>
jmp    15d0 <main+0x270>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   1260 <potencia@plt>
jmp    15d0 <main+0x270>
xorps  %xmm0,%xmm0
call   1060 <raizCuadrada@plt>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  %xmm0,0x8(%rsp)
lea    0xaea(%rip),%rdi
call   10f0 <gettext@plt>
mov    %rax,%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1100 <printf@plt>
xor    %r13d,%r13d
mov    $0x2,%edi
call   1280 <sleep@plt>
mov    %rbp,%rdi
call   10e0 <system@plt>
test   %r13d,%r13d
je     13ec <main+0x8c>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"calcMain\00"
@.str.1 = [6 x i8] c"UTF-8\00"
@LC_ALL = global i32 0
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [7 x i8] c"idioma\00"
@.str.4 = [28 x i8] c"\09\09\09:::::Type your option:::\00"
@.str.5 = [3 x i8] c"%f\00"
@.str.6 = [38 x i8] c"unknown option, try again only digits\00"
@.str.7 = [17 x i8] c"\09\09\09Result = %lf\0A\00"
@.str.8 = [6 x i8] c"clear\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca double
store i32 0, i32* %1
%7 = call i32 @bind_textdomain_codeset(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* @LC_ALL
%9 = call i32 @setlocale(i32 %8, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @bindtextdomain(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 @textdomain(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
store double 0.000000e+00, double* %5
store double 0.000000e+00, double* %4
br label %12
12: ; preds = %132, %0
%13 = load i32, i32* %3
%14 = icmp ne i32 %13, 0
%15 = xor i1 %14, true
br i1 %15, label %16, label %133
16: ; preds = %12
%17 = call i32 (...) @menu()
store float 0.000000e+00, float* %2
%18 = call i8* @gettext(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* %18)
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), float* %2)
%21 = load float, float* %2
%22 = call i32 @isnan(float %21)
%23 = icmp ne i32 %22, 0
br i1 %23, label %132, label %24
24: ; preds = %16
%25 = load float, float* %2
%26 = fptosi float %25 to i32
switch i32 %26, label %118 [
i32 1, label %27
i32 2, label %31
i32 3, label %35
i32 4, label %39
i32 5, label %43
i32 6, label %46
i32 7, label %49
i32 8, label %52
i32 9, label %55
i32 10, label %58
i32 11, label %61
i32 12, label %64
i32 13, label %67
i32 14, label %70
i32 15, label %74
i32 16, label %77
i32 17, label %80
i32 18, label %83
i32 19, label %86
i32 20, label %91
i32 21, label %95
i32 22, label %99
i32 23, label %102
i32 24, label %105
i32 25, label %110
i32 26, label %114
i32 27, label %117
]
27: ; preds = %24
%28 = load double, double* %4
%29 = load double, double* %5
%30 = call double @sum(double %28, double %29)
store double %30, double* %6
br label %122
31: ; preds = %24
%32 = load double, double* %4
%33 = load double, double* %5
%34 = call double @resta(double %32, double %33)
store double %34, double* %6
br label %122
35: ; preds = %24
%36 = load double, double* %4
%37 = load double, double* %5
%38 = call double @mult(double %36, double %37)
store double %38, double* %6
br label %122
39: ; preds = %24
%40 = load double, double* %4
%41 = load double, double* %5
%42 = call double @divi(double %40, double %41)
store double %42, double* %6
br label %122
43: ; preds = %24
%44 = load double, double* %4
%45 = call double @seno(double %44)
store double %45, double* %6
br label %122
46: ; preds = %24
%47 = load double, double* %4
%48 = call double @coseno(double %47)
store double %48, double* %6
br label %122
49: ; preds = %24
%50 = load double, double* %4
%51 = call double @tangente(double %50)
store double %51, double* %6
br label %122
52: ; preds = %24
%53 = load double, double* %4
%54 = call double @aseno(double %53)
store double %54, double* %6
br label %122
55: ; preds = %24
%56 = load double, double* %4
%57 = call double @acoseno(double %56)
store double %57, double* %6
br label %122
58: ; preds = %24
%59 = load double, double* %4
%60 = call double @atangente(double %59)
store double %60, double* %6
br label %122
61: ; preds = %24
%62 = load double, double* %4
%63 = call double @senoh(double %62)
store double %63, double* %6
br label %122
64: ; preds = %24
%65 = load double, double* %4
%66 = call double @cosenoh(double %65)
store double %66, double* %6
br label %122
67: ; preds = %24
%68 = load double, double* %4
%69 = call double @tangenteh(double %68)
store double %69, double* %6
br label %122
70: ; preds = %24
%71 = load double, double* %4
%72 = load double, double* %5
%73 = call double @atangente2(double %71, double %72)
store double %73, double* %6
br label %122
74: ; preds = %24
%75 = load double, double* %4
%76 = call double @techo(double %75)
store double %76, double* %6
br label %122
77: ; preds = %24
%78 = load double, double* %4
%79 = call double @exponencial(double %78)
store double %79, double* %6
br label %122
80: ; preds = %24
%81 = load double, double* %4
%82 = call double @piso(double %81)
store double %82, double* %6
br label %122
83: ; preds = %24
%84 = load double, double* %4
%85 = call double @valorAbsoluto(double %84)
store double %85, double* %6
br label %122
86: ; preds = %24
%87 = load double, double* %4
%88 = load double, double* %5
%89 = load double, double* %6
%90 = call double @funcion_fmod(double %87, double %88, double %89)
store double %90, double* %6
br label %122
91: ; preds = %24
%92 = load double, double* %4
%93 = load double, double* %5
%94 = call double @funcion_frexp(double %92, double %93)
store double %94, double* %6
br label %122
95: ; preds = %24
%96 = load double, double* %4
%97 = load double, double* %5
%98 = call double @funcion_Idexp(double %96, double %97)
store double %98, double* %6
br label %122
99: ; preds = %24
%100 = load double, double* %4
%101 = call double @logaritmo(double %100)
store double %101, double* %6
br label %122
102: ; preds = %24
%103 = load double, double* %4
%104 = call double @logBase10(double %103)
store double %104, double* %6
br label %122
105: ; preds = %24
%106 = load double, double* %4
%107 = load double, double* %5
%108 = load double, double* %6
%109 = call double @funcion_modf(double %106, double %107, double %108)
store double %109, double* %6
br label %122
110: ; preds = %24
%111 = load double, double* %4
%112 = load double, double* %5
%113 = call double @potencia(double %111, double %112)
store double %113, double* %6
br label %122
114: ; preds = %24
%115 = load double, double* %4
%116 = call double @raizCuadrada(double %115)
store double %116, double* %6
br label %122
117: ; preds = %24
store i32 1, i32* %3
br label %122
118: ; preds = %24
%119 = call i8* @gettext(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0))
%120 = call i32 (i8*, ...) @printf(i8* %119)
%121 = call i32 (...) @getchar()
br label %122
122: ; preds = %118, %117, %114, %110, %105, %102, %99, %95, %91, %86, %83, %80, %77, %74, %70, %67, %64, %61, %58, %55, %52, %49, %46, %43, %39, %35, %31, %27
%123 = load i32, i32* %3
%124 = icmp ne i32 %123, 0
br i1 %124, label %129, label %125
125: ; preds = %122
%126 = call i8* @gettext(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
%127 = load double, double* %6
%128 = call i32 (i8*, ...) @printf(i8* %126, double %127)
br label %129
129: ; preds = %125, %122
%130 = call i32 @sleep(i32 2)
%131 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
br label %132
132: ; preds = %129, %16
br label %12
133: ; preds = %12
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"calcMain\00"
@.str.1 = [6 x i8] c"UTF-8\00"
@LC_ALL = global i32 0
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [7 x i8] c"idioma\00"
@.str.4 = [28 x i8] c"\09\09\09:::::Type your option:::\00"
@.str.5 = [3 x i8] c"%f\00"
@.str.6 = [38 x i8] c"unknown option, try again only digits\00"
@.str.7 = [17 x i8] c"\09\09\09Result = %lf\0A\00"
@.str.8 = [6 x i8] c"clear\00"
define i32 @main() {
%1 = alloca float
%2 = tail call i32 @bind_textdomain_codeset(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @LC_ALL
%4 = tail call i32 @setlocale(i32 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @bindtextdomain(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 @textdomain(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%7 = bitcast float* %1 to i8*
br label %8
8: ; preds = %0, %85
%9 = phi double [ undef, %0 ], [ %87, %85 ]
%10 = call i32 (...) @menu()
store float 0.000000e+00, float* %1
%11 = call i8* @gettext(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %11)
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), float* %1)
%14 = load float, float* %1
%15 = call i32 @isnan(float %14)
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %85
17: ; preds = %8
%18 = load float, float* %1
%19 = fptosi float %18 to i32
switch i32 %19, label %72 [
i32 1, label %20
i32 2, label %22
i32 3, label %24
i32 4, label %26
i32 5, label %28
i32 6, label %30
i32 7, label %32
i32 8, label %34
i32 9, label %36
i32 10, label %38
i32 11, label %40
i32 12, label %42
i32 13, label %44
i32 14, label %46
i32 15, label %48
i32 16, label %50
i32 17, label %52
i32 18, label %54
i32 19, label %56
i32 20, label %58
i32 21, label %60
i32 22, label %62
i32 23, label %64
i32 24, label %66
i32 25, label %68
i32 26, label %70
i32 27, label %80
]
20: ; preds = %17
%21 = call double @sum(double 0.000000e+00, double 0.000000e+00)
br label %76
22: ; preds = %17
%23 = call double @resta(double 0.000000e+00, double 0.000000e+00)
br label %76
24: ; preds = %17
%25 = call double @mult(double 0.000000e+00, double 0.000000e+00)
br label %76
26: ; preds = %17
%27 = call double @divi(double 0.000000e+00, double 0.000000e+00)
br label %76
28: ; preds = %17
%29 = call double @seno(double 0.000000e+00)
br label %76
30: ; preds = %17
%31 = call double @coseno(double 0.000000e+00)
br label %76
32: ; preds = %17
%33 = call double @tangente(double 0.000000e+00)
br label %76
34: ; preds = %17
%35 = call double @aseno(double 0.000000e+00)
br label %76
36: ; preds = %17
%37 = call double @acoseno(double 0.000000e+00)
br label %76
38: ; preds = %17
%39 = call double @atangente(double 0.000000e+00)
br label %76
40: ; preds = %17
%41 = call double @senoh(double 0.000000e+00)
br label %76
42: ; preds = %17
%43 = call double @cosenoh(double 0.000000e+00)
br label %76
44: ; preds = %17
%45 = call double @tangenteh(double 0.000000e+00)
br label %76
46: ; preds = %17
%47 = call double @atangente2(double 0.000000e+00, double 0.000000e+00)
br label %76
48: ; preds = %17
%49 = call double @techo(double 0.000000e+00)
br label %76
50: ; preds = %17
%51 = call double @exponencial(double 0.000000e+00)
br label %76
52: ; preds = %17
%53 = call double @piso(double 0.000000e+00)
br label %76
54: ; preds = %17
%55 = call double @valorAbsoluto(double 0.000000e+00)
br label %76
56: ; preds = %17
%57 = call double @funcion_fmod(double 0.000000e+00, double 0.000000e+00, double %9)
br label %76
58: ; preds = %17
%59 = call double @funcion_frexp(double 0.000000e+00, double 0.000000e+00)
br label %76
60: ; preds = %17
%61 = call double @funcion_Idexp(double 0.000000e+00, double 0.000000e+00)
br label %76
62: ; preds = %17
%63 = call double @logaritmo(double 0.000000e+00)
br label %76
64: ; preds = %17
%65 = call double @logBase10(double 0.000000e+00)
br label %76
66: ; preds = %17
%67 = call double @funcion_modf(double 0.000000e+00, double 0.000000e+00, double %9)
br label %76
68: ; preds = %17
%69 = call double @potencia(double 0.000000e+00, double 0.000000e+00)
br label %76
70: ; preds = %17
%71 = call double @raizCuadrada(double 0.000000e+00)
br label %76
72: ; preds = %17
%73 = call i8* @gettext(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0))
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %73)
%75 = call i32 (...) @getchar()
br label %76
76: ; preds = %72, %70, %68, %66, %64, %62, %60, %58, %56, %54, %52, %50, %48, %46, %44, %42, %40, %38, %36, %34, %32, %30, %28, %26, %24, %22, %20
%77 = phi double [ %21, %20 ], [ %23, %22 ], [ %25, %24 ], [ %27, %26 ], [ %29, %28 ], [ %31, %30 ], [ %33, %32 ], [ %35, %34 ], [ %37, %36 ], [ %39, %38 ], [ %41, %40 ], [ %43, %42 ], [ %45, %44 ], [ %47, %46 ], [ %49, %48 ], [ %51, %50 ], [ %53, %52 ], [ %55, %54 ], [ %57, %56 ], [ %59, %58 ], [ %61, %60 ], [ %63, %62 ], [ %65, %64 ], [ %67, %66 ], [ %69, %68 ], [ %71, %70 ], [ %9, %72 ]
%78 = call i8* @gettext(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
%79 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %78, double %77)
br label %80
80: ; preds = %17, %76
%81 = phi double [ %77, %76 ], [ %9, %17 ]
%82 = phi i32 [ 0, %76 ], [ 1, %17 ]
%83 = call i32 @sleep(i32 2)
%84 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
br label %85
85: ; preds = %80, %8
%86 = phi i32 [ 0, %8 ], [ %82, %80 ]
%87 = phi double [ %9, %8 ], [ %81, %80 ]
%88 = icmp eq i32 %86, 0
br i1 %88, label %8, label %89
89: ; preds = %85
ret i32 0
}