#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 atof(char *);
int /*<<< orphan*/ clearstack();
double exp(double);
double gettop();
scalar_t__ isnumfmt(char *);
double pop();
double pow(double, double);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ push(double);
double sin(double);
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ swap();
double calculate(char *tokens[], int len) {
  char *t;
  int i;
  for (i = 0; i < len; i++) {
    t = tokens[i];
    if (isnumfmt(t)) {
      push(atof(t));
    } else if (!strcmp(t, "+")) {
      push(pop() + pop());
    } else if (!strcmp(t, "*")) {
      push(pop() * pop());
    } else if (!strcmp(t, "-")) {
      swap();
      push(pop() - pop());
    } else if (!strcmp(t, "/")) {
      double tmp = pop();
      if (tmp != 0) {
        push(pop() / tmp);
      } else {
        pop();
        push(0.0);
        printf("Error: divisor is 0\n");
      }
    } else if (!strcmp(t, "%")) {
      double tmp = pop();
      if (tmp != 0) {
        push((int)pop() % (int)tmp);
      } else {
        pop();
        push(0.0);
        printf("Error: divisor is 0\n");
      }
    } else if (!strcmp(t, "pow")) {
      double tmp = pop();
      push(pow(pop(), tmp));
    } else if (!strcmp(t, "exp")) {
      push(exp(pop()));
    } else if (!strcmp(t, "sin")) {
      push(sin(pop()));
    } else {
      printf("Error: unknown token %s\n", t);
    }
  }
  double rt = gettop();
  clearstack();
  return rt;
}


x86 assembly (clang, -O0):
<calculate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    14cf <calculate+0x30f>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <isnumfmt@plt>
cmp    $0x0,%rax
je     1218 <calculate+0x58>
mov    -0x18(%rbp),%rdi
call   1030 <atof@plt>
call   10b0 <push@plt>
jmp    14bc <calculate+0x2fc>
mov    -0x18(%rbp),%rdi
lea    0xddd(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    125a <calculate+0x9a>
mov    $0x0,%al
call   1060 <pop@plt>
movsd  %xmm0,-0x48(%rbp)
mov    $0x0,%al
call   1060 <pop@plt>
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
addsd  %xmm1,%xmm0
call   10b0 <push@plt>
jmp    14b7 <calculate+0x2f7>
mov    -0x18(%rbp),%rdi
lea    0xd9d(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    129c <calculate+0xdc>
mov    $0x0,%al
call   1060 <pop@plt>
movsd  %xmm0,-0x50(%rbp)
mov    $0x0,%al
call   1060 <pop@plt>
movaps %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
mulsd  %xmm1,%xmm0
call   10b0 <push@plt>
jmp    14b2 <calculate+0x2f2>
mov    -0x18(%rbp),%rdi
lea    0xd5d(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    12e5 <calculate+0x125>
mov    $0x0,%al
call   10e0 <swap@plt>
mov    $0x0,%al
call   1060 <pop@plt>
movsd  %xmm0,-0x58(%rbp)
mov    $0x0,%al
call   1060 <pop@plt>
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
subsd  %xmm1,%xmm0
call   10b0 <push@plt>
jmp    14ad <calculate+0x2ed>
mov    -0x18(%rbp),%rdi
lea    0xd16(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    135f <calculate+0x19f>
mov    $0x0,%al
call   1060 <pop@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1327 <calculate+0x167>
jp     1327 <calculate+0x167>
jmp    133d <calculate+0x17d>
mov    $0x0,%al
call   1060 <pop@plt>
divsd  -0x28(%rbp),%xmm0
call   10b0 <push@plt>
jmp    135a <calculate+0x19a>
mov    $0x0,%al
call   1060 <pop@plt>
xorps  %xmm0,%xmm0
call   10b0 <push@plt>
lea    0xcb5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    14a8 <calculate+0x2e8>
mov    -0x18(%rbp),%rdi
lea    0xcb3(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    13e4 <calculate+0x224>
mov    $0x0,%al
call   1060 <pop@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    13a1 <calculate+0x1e1>
jp     13a1 <calculate+0x1e1>
jmp    13c2 <calculate+0x202>
mov    $0x0,%al
call   1060 <pop@plt>
cvttsd2si %xmm0,%eax
cvttsd2si -0x30(%rbp),%ecx
cltd
idiv   %ecx
cvtsi2sd %edx,%xmm0
call   10b0 <push@plt>
jmp    13df <calculate+0x21f>
mov    $0x0,%al
call   1060 <pop@plt>
xorps  %xmm0,%xmm0
call   10b0 <push@plt>
lea    0xc30(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    14a3 <calculate+0x2e3>
mov    -0x18(%rbp),%rdi
lea    0xc30(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    1424 <calculate+0x264>
mov    $0x0,%al
call   1060 <pop@plt>
movsd  %xmm0,-0x38(%rbp)
mov    $0x0,%al
call   1060 <pop@plt>
movsd  -0x38(%rbp),%xmm1
call   10c0 <pow@plt>
call   10b0 <push@plt>
jmp    149e <calculate+0x2de>
mov    -0x18(%rbp),%rdi
lea    0xbf4(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    1453 <calculate+0x293>
mov    $0x0,%al
call   1060 <pop@plt>
call   10a0 <exp@plt>
call   10b0 <push@plt>
jmp    1499 <calculate+0x2d9>
mov    -0x18(%rbp),%rdi
lea    0xbc9(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    1482 <calculate+0x2c2>
mov    $0x0,%al
call   1060 <pop@plt>
call   1090 <sin@plt>
call   10b0 <push@plt>
jmp    1494 <calculate+0x2d4>
mov    -0x18(%rbp),%rsi
lea    0xb9e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1499 <calculate+0x2d9>
jmp    149e <calculate+0x2de>
jmp    14a3 <calculate+0x2e3>
jmp    14a8 <calculate+0x2e8>
jmp    14ad <calculate+0x2ed>
jmp    14b2 <calculate+0x2f2>
jmp    14b7 <calculate+0x2f7>
jmp    14bc <calculate+0x2fc>
jmp    14c1 <calculate+0x301>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11d6 <calculate+0x16>
mov    $0x0,%al
call   1080 <gettop@plt>
movsd  %xmm0,-0x40(%rbp)
mov    $0x0,%al
call   10d0 <clearstack@plt>
movsd  -0x40(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1422 <calculate+0x252>
mov    %rdi,%rbx
mov    %esi,%r13d
lea    0xe18(%rip),%r14
lea    0xe13(%rip),%r15
xor    %r12d,%r12d
nopw   0x0(%rax,%rax,1)
mov    (%rbx,%r12,8),%rbp
mov    %rbp,%rdi
call   1050 <isnumfmt@plt>
test   %rax,%rax
je     1230 <calculate+0x60>
mov    %rbp,%rdi
call   1040 <atof@plt>
call   10c0 <push@plt>
add    $0x1,%r12
cmp    %r12,%r13
jne    1200 <calculate+0x30>
jmp    1422 <calculate+0x252>
nopl   0x0(%rax)
mov    %rbp,%rdi
mov    %r14,%rsi
call   1080 <strcmp@plt>
test   %eax,%eax
je     12f6 <calculate+0x126>
mov    %rbp,%rdi
mov    %r15,%rsi
call   1080 <strcmp@plt>
test   %eax,%eax
je     1313 <calculate+0x143>
mov    %rbp,%rdi
lea    0xdac(%rip),%rsi
call   1080 <strcmp@plt>
test   %eax,%eax
je     1330 <calculate+0x160>
mov    %rbp,%rdi
lea    0xd97(%rip),%rsi
call   1080 <strcmp@plt>
test   %eax,%eax
je     135c <calculate+0x18c>
mov    %rbp,%rdi
lea    0xd82(%rip),%rsi
call   1080 <strcmp@plt>
test   %eax,%eax
je     1389 <calculate+0x1b9>
mov    %rbp,%rdi
lea    0xd6d(%rip),%rsi
call   1080 <strcmp@plt>
test   %eax,%eax
je     13de <calculate+0x20e>
mov    %rbp,%rdi
lea    0xd5a(%rip),%rsi
call   1080 <strcmp@plt>
test   %eax,%eax
je     1400 <calculate+0x230>
mov    %rbp,%rdi
lea    0xd47(%rip),%rsi
call   1080 <strcmp@plt>
test   %eax,%eax
je     1411 <calculate+0x241>
lea    0xd37(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    121e <calculate+0x4e>
xor    %eax,%eax
call   1070 <pop@plt>
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1070 <pop@plt>
addsd  (%rsp),%xmm0
jmp    1219 <calculate+0x49>
xor    %eax,%eax
call   1070 <pop@plt>
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1070 <pop@plt>
mulsd  (%rsp),%xmm0
jmp    1219 <calculate+0x49>
xor    %eax,%eax
call   10f0 <swap@plt>
xor    %eax,%eax
call   1070 <pop@plt>
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1070 <pop@plt>
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
jmp    1219 <calculate+0x49>
xor    %eax,%eax
call   1070 <pop@plt>
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1070 <pop@plt>
movsd  (%rsp),%xmm1
ucomisd 0xc84(%rip),%xmm1
jne    1380 <calculate+0x1b0>
jnp    13c4 <calculate+0x1f4>
divsd  %xmm1,%xmm0
jmp    1219 <calculate+0x49>
xor    %eax,%eax
call   1070 <pop@plt>
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1070 <pop@plt>
movsd  (%rsp),%xmm1
ucomisd 0xc57(%rip),%xmm1
jne    13ad <calculate+0x1dd>
jnp    13c4 <calculate+0x1f4>
cvttsd2si %xmm0,%eax
cvttsd2si %xmm1,%ecx
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
jmp    1219 <calculate+0x49>
xorpd  %xmm0,%xmm0
call   10c0 <push@plt>
lea    0xc63(%rip),%rdi
call   1030 <puts@plt>
jmp    121e <calculate+0x4e>
xor    %eax,%eax
call   1070 <pop@plt>
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1070 <pop@plt>
movsd  (%rsp),%xmm1
call   10d0 <pow@plt>
jmp    1219 <calculate+0x49>
xor    %eax,%eax
call   1070 <pop@plt>
call   10b0 <exp@plt>
jmp    1219 <calculate+0x49>
xor    %eax,%eax
call   1070 <pop@plt>
call   10a0 <sin@plt>
jmp    1219 <calculate+0x49>
xor    %eax,%eax
call   1090 <gettop@plt>
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   10e0 <clearstack@plt>
movsd  (%rsp),%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"+\00"
@.str.1 = [2 x i8] c"*\00"
@.str.2 = [2 x i8] c"-\00"
@.str.3 = [2 x i8] c"/\00"
@.str.4 = [21 x i8] c"Error: divisor is 0\0A\00"
@.str.5 = [2 x i8] c"%\00"
@.str.6 = [4 x i8] c"pow\00"
@.str.7 = [4 x i8] c"exp\00"
@.str.8 = [4 x i8] c"sin\00"
@.str.9 = [25 x i8] c"Error: unknown token %s\0A\00"
define double @calculate(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store i8** %0, i8*** %3
store i32 %1, i32* %4
store i32 0, i32* %6
br label %11
11: ; preds = %133, %2
%12 = load i32, i32* %6
%13 = load i32, i32* %4
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %136
15: ; preds = %11
%16 = load i8**, i8*** %3
%17 = load i32, i32* %6
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8*, i8** %16, i64 %18
%20 = load i8*, i8** %19
store i8* %20, i8** %5
%21 = load i8*, i8** %5
%22 = call i64 @isnumfmt(i8* %21)
%23 = icmp ne i64 %22, 0
br i1 %23, label %24, label %28
24: ; preds = %15
%25 = load i8*, i8** %5
%26 = call double @atof(i8* %25)
%27 = call i32 @push(double %26)
br label %132
28: ; preds = %15
%29 = load i8*, i8** %5
%30 = call i32 @strcmp(i8* %29, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%31 = icmp ne i32 %30, 0
br i1 %31, label %37, label %32
32: ; preds = %28
%33 = call double (...) @pop()
%34 = call double (...) @pop()
%35 = fadd double %33, %34
%36 = call i32 @push(double %35)
br label %131
37: ; preds = %28
%38 = load i8*, i8** %5
%39 = call i32 @strcmp(i8* %38, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%40 = icmp ne i32 %39, 0
br i1 %40, label %46, label %41
41: ; preds = %37
%42 = call double (...) @pop()
%43 = call double (...) @pop()
%44 = fmul double %42, %43
%45 = call i32 @push(double %44)
br label %130
46: ; preds = %37
%47 = load i8*, i8** %5
%48 = call i32 @strcmp(i8* %47, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%49 = icmp ne i32 %48, 0
br i1 %49, label %56, label %50
50: ; preds = %46
%51 = call i32 (...) @swap()
%52 = call double (...) @pop()
%53 = call double (...) @pop()
%54 = fsub double %52, %53
%55 = call i32 @push(double %54)
br label %129
56: ; preds = %46
%57 = load i8*, i8** %5
%58 = call i32 @strcmp(i8* %57, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%59 = icmp ne i32 %58, 0
br i1 %59, label %74, label %60
60: ; preds = %56
%61 = call double (...) @pop()
store double %61, double* %7
%62 = load double, double* %7
%63 = fcmp une double %62, 0.000000e+00
br i1 %63, label %64, label %69
64: ; preds = %60
%65 = call double (...) @pop()
%66 = load double, double* %7
%67 = fdiv double %65, %66
%68 = call i32 @push(double %67)
br label %73
69: ; preds = %60
%70 = call double (...) @pop()
%71 = call i32 @push(double 0.000000e+00)
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
br label %73
73: ; preds = %69, %64
br label %128
74: ; preds = %56
%75 = load i8*, i8** %5
%76 = call i32 @strcmp(i8* %75, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%77 = icmp ne i32 %76, 0
br i1 %77, label %95, label %78
78: ; preds = %74
%79 = call double (...) @pop()
store double %79, double* %8
%80 = load double, double* %8
%81 = fcmp une double %80, 0.000000e+00
br i1 %81, label %82, label %90
82: ; preds = %78
%83 = call double (...) @pop()
%84 = fptosi double %83 to i32
%85 = load double, double* %8
%86 = fptosi double %85 to i32
%87 = srem i32 %84, %86
%88 = sitofp i32 %87 to double
%89 = call i32 @push(double %88)
br label %94
90: ; preds = %78
%91 = call double (...) @pop()
%92 = call i32 @push(double 0.000000e+00)
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
br label %94
94: ; preds = %90, %82
br label %127
95: ; preds = %74
%96 = load i8*, i8** %5
%97 = call i32 @strcmp(i8* %96, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%98 = icmp ne i32 %97, 0
br i1 %98, label %105, label %99
99: ; preds = %95
%100 = call double (...) @pop()
store double %100, double* %9
%101 = call double (...) @pop()
%102 = load double, double* %9
%103 = call double @pow(double %101, double %102)
%104 = call i32 @push(double %103)
br label %126
105: ; preds = %95
%106 = load i8*, i8** %5
%107 = call i32 @strcmp(i8* %106, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%108 = icmp ne i32 %107, 0
br i1 %108, label %113, label %109
109: ; preds = %105
%110 = call double (...) @pop()
%111 = call double @exp(double %110)
%112 = call i32 @push(double %111)
br label %125
113: ; preds = %105
%114 = load i8*, i8** %5
%115 = call i32 @strcmp(i8* %114, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%116 = icmp ne i32 %115, 0
br i1 %116, label %121, label %117
117: ; preds = %113
%118 = call double (...) @pop()
%119 = call double @sin(double %118)
%120 = call i32 @push(double %119)
br label %124
121: ; preds = %113
%122 = load i8*, i8** %5
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i8* %122)
br label %124
124: ; preds = %121, %117
br label %125
125: ; preds = %124, %109
br label %126
126: ; preds = %125, %99
br label %127
127: ; preds = %126, %94
br label %128
128: ; preds = %127, %73
br label %129
129: ; preds = %128, %50
br label %130
130: ; preds = %129, %41
br label %131
131: ; preds = %130, %32
br label %132
132: ; preds = %131, %24
br label %133
133: ; preds = %132
%134 = load i32, i32* %6
%135 = add nsw i32 %134, 1
store i32 %135, i32* %6
br label %11
136: ; preds = %11
%137 = call double (...) @gettop()
store double %137, double* %10
%138 = call i32 (...) @clearstack()
%139 = load double, double* %10
ret double %139
}

LLVM IR (-O2):
@.str = [2 x i8] c"+\00"
@.str.1 = [2 x i8] c"*\00"
@.str.2 = [2 x i8] c"-\00"
@.str.3 = [2 x i8] c"/\00"
@.str.5 = [2 x i8] c"%\00"
@.str.6 = [4 x i8] c"pow\00"
@.str.7 = [4 x i8] c"exp\00"
@.str.8 = [4 x i8] c"sin\00"
@.str.9 = [25 x i8] c"Error: unknown token %s\0A\00"
@str.10 = [20 x i8] c"Error: divisor is 0\00"
define double @calculate(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %96
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %93
%7 = phi i64 [ 0, %4 ], [ %94, %93 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i64 @isnumfmt(i8* %9)
%11 = icmp eq i64 %10, 0
br i1 %11, label %15, label %12
12: ; preds = %6
%13 = tail call double @atof(i8* %9)
%14 = tail call i32 @push(double %13)
br label %93
15: ; preds = %6
%16 = tail call i32 @strcmp(i8* dereferenceable(1) %9, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %23
18: ; preds = %15
%19 = tail call double (...) @pop()
%20 = tail call double (...) @pop()
%21 = fadd double %19, %20
%22 = tail call i32 @push(double %21)
br label %93
23: ; preds = %15
%24 = tail call i32 @strcmp(i8* dereferenceable(1) %9, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %31
26: ; preds = %23
%27 = tail call double (...) @pop()
%28 = tail call double (...) @pop()
%29 = fmul double %27, %28
%30 = tail call i32 @push(double %29)
br label %93
31: ; preds = %23
%32 = tail call i32 @strcmp(i8* dereferenceable(1) %9, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %40
34: ; preds = %31
%35 = tail call i32 (...) @swap()
%36 = tail call double (...) @pop()
%37 = tail call double (...) @pop()
%38 = fsub double %36, %37
%39 = tail call i32 @push(double %38)
br label %93
40: ; preds = %31
%41 = tail call i32 @strcmp(i8* dereferenceable(1) %9, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%42 = icmp eq i32 %41, 0
br i1 %42, label %43, label %53
43: ; preds = %40
%44 = tail call double (...) @pop()
%45 = fcmp une double %44, 0.000000e+00
%46 = tail call double (...) @pop()
br i1 %45, label %47, label %50
47: ; preds = %43
%48 = fdiv double %46, %44
%49 = tail call i32 @push(double %48)
br label %93
50: ; preds = %43
%51 = tail call i32 @push(double 0.000000e+00)
%52 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.10, i64 0, i64 0))
br label %93
53: ; preds = %40
%54 = tail call i32 @strcmp(i8* dereferenceable(1) %9, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%55 = icmp eq i32 %54, 0
br i1 %55, label %56, label %69
56: ; preds = %53
%57 = tail call double (...) @pop()
%58 = fcmp une double %57, 0.000000e+00
%59 = tail call double (...) @pop()
br i1 %58, label %60, label %66
60: ; preds = %56
%61 = fptosi double %59 to i32
%62 = fptosi double %57 to i32
%63 = srem i32 %61, %62
%64 = sitofp i32 %63 to double
%65 = tail call i32 @push(double %64)
br label %93
66: ; preds = %56
%67 = tail call i32 @push(double 0.000000e+00)
%68 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.10, i64 0, i64 0))
br label %93
69: ; preds = %53
%70 = tail call i32 @strcmp(i8* dereferenceable(1) %9, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%71 = icmp eq i32 %70, 0
br i1 %71, label %72, label %77
72: ; preds = %69
%73 = tail call double (...) @pop()
%74 = tail call double (...) @pop()
%75 = tail call double @pow(double %74, double %73)
%76 = tail call i32 @push(double %75)
br label %93
77: ; preds = %69
%78 = tail call i32 @strcmp(i8* dereferenceable(1) %9, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%79 = icmp eq i32 %78, 0
br i1 %79, label %80, label %84
80: ; preds = %77
%81 = tail call double (...) @pop()
%82 = tail call double @exp(double %81)
%83 = tail call i32 @push(double %82)
br label %93
84: ; preds = %77
%85 = tail call i32 @strcmp(i8* dereferenceable(1) %9, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%86 = icmp eq i32 %85, 0
br i1 %86, label %87, label %91
87: ; preds = %84
%88 = tail call double (...) @pop()
%89 = tail call double @sin(double %88)
%90 = tail call i32 @push(double %89)
br label %93
91: ; preds = %84
%92 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i8* %9)
br label %93
93: ; preds = %60, %66, %47, %50, %12, %26, %72, %87, %91, %80, %34, %18
%94 = add nuw nsw i64 %7, 1
%95 = icmp eq i64 %94, %5
br i1 %95, label %96, label %6
96: ; preds = %93, %2
%97 = tail call double (...) @gettop()
%98 = tail call i32 (...) @clearstack()
ret double %97
}