#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 */
long double fmod(long double, long double);
int /*<<< orphan*/ matchops(char *);
long double pow(long double, long double);
long double readnum();
long double term(int lvl) {
  long double val;
  if (lvl-- < 0)
    return readnum();
  val = term(lvl);
  while (1) {
    switch (lvl + 1) {
    case 0:
      if (matchops("**"))
        val = pow(val, term(lvl));
      else
        return val;
      break;
    case 1:
      if (matchops("*"))
        val *= term(lvl);
      else if (matchops("/"))
        val /= term(lvl);
      else if (matchops("%"))
        val = fmod(val, term(lvl));
      else
        return val;
      break;
    case 2:
      if (matchops("+"))
        val += term(lvl);
      else if (matchops("-"))
        val -= term(lvl);
      else
        return val;
      break;
    case 3:
      if (matchops("<<"))
        val = (long long)val << (long long)term(lvl);
      else if (matchops(">>"))
        val = (long long)val >> (long long)term(lvl);
      else
        return val;
      break;
    case 4:
      if (matchops("&"))
        val = (long long)val & (long long)term(lvl);
      else
        return val;
      break;
    case 5:
      if (matchops("^"))
        val = (long long)val ^ (long long)term(lvl);
      else
        return val;
      break;
    case 6:
      if (matchops("|"))
        val = (long long)val | (long long)term(lvl);
      else
        return val;
      break;
    }
  }
}


x86 assembly (clang, -O0):
<term>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
mov    %edi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
jge    1181 <term+0x31>
xor    %eax,%eax
call   1030 <readnum@plt>
fstpt  -0x10(%rbp)
jmp    168b <term+0x53b>
mov    -0x14(%rbp),%edi
call   1050 <term@plt>
fstpt  -0x30(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,%ecx
mov    %rcx,-0xd8(%rbp)
sub    $0x6,%eax
ja     1686 <term+0x536>
mov    -0xd8(%rbp),%rax
lea    0xe4e(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe5a(%rip),%rdi
call   1060 <matchops@plt>
cmp    $0x0,%eax
je     11fe <term+0xae>
fldt   -0x30(%rbp)
fstpt  -0xe4(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <term@plt>
fldt   -0xe4(%rbp)
mov    %rsp,%rax
fxch   %st(1)
fstpt  0x10(%rax)
fstpt  (%rax)
call   1070 <pow@plt>
fstpt  -0x30(%rbp)
jmp    1209 <term+0xb9>
fldt   -0x30(%rbp)
fstpt  -0x10(%rbp)
jmp    168b <term+0x53b>
jmp    1686 <term+0x536>
lea    0xe08(%rip),%rdi
call   1060 <matchops@plt>
cmp    $0x0,%eax
je     1238 <term+0xe8>
mov    -0x14(%rbp),%edi
call   1050 <term@plt>
fldt   -0x30(%rbp)
fmulp  %st,%st(1)
fstpt  -0x30(%rbp)
jmp    12ba <term+0x16a>
lea    0xde0(%rip),%rdi
call   1060 <matchops@plt>
cmp    $0x0,%eax
je     1262 <term+0x112>
mov    -0x14(%rbp),%edi
call   1050 <term@plt>
fldt   -0x30(%rbp)
fdivp  %st,%st(1)
fstpt  -0x30(%rbp)
jmp    12b5 <term+0x165>
lea    0xdb8(%rip),%rdi
call   1060 <matchops@plt>
cmp    $0x0,%eax
je     12a5 <term+0x155>
fldt   -0x30(%rbp)
fstpt  -0xf0(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <term@plt>
fldt   -0xf0(%rbp)
mov    %rsp,%rax
fxch   %st(1)
fstpt  0x10(%rax)
fstpt  (%rax)
call   1040 <fmod@plt>
fstpt  -0x30(%rbp)
jmp    12b0 <term+0x160>
fldt   -0x30(%rbp)
fstpt  -0x10(%rbp)
jmp    168b <term+0x53b>
jmp    12b5 <term+0x165>
jmp    12ba <term+0x16a>
jmp    1686 <term+0x536>
lea    0xd5d(%rip),%rdi
call   1060 <matchops@plt>
cmp    $0x0,%eax
je     12e9 <term+0x199>
mov    -0x14(%rbp),%edi
call   1050 <term@plt>
fldt   -0x30(%rbp)
faddp  %st,%st(1)
fstpt  -0x30(%rbp)
jmp    1323 <term+0x1d3>
lea    0xd35(%rip),%rdi
call   1060 <matchops@plt>
cmp    $0x0,%eax
je     1313 <term+0x1c3>
mov    -0x14(%rbp),%edi
call   1050 <term@plt>
fldt   -0x30(%rbp)
fsubp  %st,%st(1)
fstpt  -0x30(%rbp)
jmp    131e <term+0x1ce>
fldt   -0x30(%rbp)
fstpt  -0x10(%rbp)
jmp    168b <term+0x53b>
jmp    1323 <term+0x1d3>
jmp    1686 <term+0x536>
lea    0xcf8(%rip),%rdi
call   1060 <matchops@plt>
cmp    $0x0,%eax
je     13d2 <term+0x282>
fldt   -0x30(%rbp)
fnstcw -0xaa(%rbp)
movzwl -0xaa(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0xac(%rbp)
fldcw  -0xac(%rbp)
fistpll -0xa8(%rbp)
fldcw  -0xaa(%rbp)
mov    -0xa8(%rbp),%rax
mov    %rax,-0xf8(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <term@plt>
mov    -0xf8(%rbp),%rax
fnstcw -0xae(%rbp)
movzwl -0xae(%rbp),%ecx
or     $0xc00,%ecx
mov    %cx,-0xb0(%rbp)
fldcw  -0xb0(%rbp)
fistpll -0xa0(%rbp)
fldcw  -0xae(%rbp)
mov    -0xa0(%rbp),%cl
shl    %cl,%rax
mov    %rax,-0x98(%rbp)
fildll -0x98(%rbp)
fstpt  -0x30(%rbp)
jmp    1486 <term+0x336>
lea    0xc51(%rip),%rdi
call   1060 <matchops@plt>
cmp    $0x0,%eax
je     1476 <term+0x326>
fldt   -0x30(%rbp)
fnstcw -0xb2(%rbp)
movzwl -0xb2(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0xb4(%rbp)
fldcw  -0xb4(%rbp)
fistpll -0x90(%rbp)
fldcw  -0xb2(%rbp)
mov    -0x90(%rbp),%rax
mov    %rax,-0x100(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <term@plt>
mov    -0x100(%rbp),%rax
fnstcw -0xb6(%rbp)
movzwl -0xb6(%rbp),%ecx
or     $0xc00,%ecx
mov    %cx,-0xb8(%rbp)
fldcw  -0xb8(%rbp)
fistpll -0x88(%rbp)
fldcw  -0xb6(%rbp)
mov    -0x88(%rbp),%cl
sar    %cl,%rax
mov    %rax,-0x80(%rbp)
fildll -0x80(%rbp)
fstpt  -0x30(%rbp)
jmp    1481 <term+0x331>
fldt   -0x30(%rbp)
fstpt  -0x10(%rbp)
jmp    168b <term+0x53b>
jmp    1486 <term+0x336>
jmp    1686 <term+0x536>
lea    0xb9b(%rip),%rdi
call   1060 <matchops@plt>
cmp    $0x0,%eax
je     1524 <term+0x3d4>
fldt   -0x30(%rbp)
fnstcw -0xba(%rbp)
movzwl -0xba(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0xbc(%rbp)
fldcw  -0xbc(%rbp)
fistpll -0x78(%rbp)
fldcw  -0xba(%rbp)
mov    -0x78(%rbp),%rax
mov    %rax,-0x108(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <term@plt>
mov    -0x108(%rbp),%rax
fnstcw -0xbe(%rbp)
movzwl -0xbe(%rbp),%ecx
or     $0xc00,%ecx
mov    %cx,-0xc0(%rbp)
fldcw  -0xc0(%rbp)
fistpll -0x70(%rbp)
fldcw  -0xbe(%rbp)
mov    -0x70(%rbp),%rcx
and    %rcx,%rax
mov    %rax,-0x68(%rbp)
fildll -0x68(%rbp)
fstpt  -0x30(%rbp)
jmp    152f <term+0x3df>
fldt   -0x30(%rbp)
fstpt  -0x10(%rbp)
jmp    168b <term+0x53b>
jmp    1686 <term+0x536>
lea    0xaf4(%rip),%rdi
call   1060 <matchops@plt>
cmp    $0x0,%eax
je     15cd <term+0x47d>
fldt   -0x30(%rbp)
fnstcw -0xc2(%rbp)
movzwl -0xc2(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0xc4(%rbp)
fldcw  -0xc4(%rbp)
fistpll -0x60(%rbp)
fldcw  -0xc2(%rbp)
mov    -0x60(%rbp),%rax
mov    %rax,-0x110(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <term@plt>
mov    -0x110(%rbp),%rax
fnstcw -0xc6(%rbp)
movzwl -0xc6(%rbp),%ecx
or     $0xc00,%ecx
mov    %cx,-0xc8(%rbp)
fldcw  -0xc8(%rbp)
fistpll -0x58(%rbp)
fldcw  -0xc6(%rbp)
mov    -0x58(%rbp),%rcx
xor    %rcx,%rax
mov    %rax,-0x50(%rbp)
fildll -0x50(%rbp)
fstpt  -0x30(%rbp)
jmp    15d8 <term+0x488>
fldt   -0x30(%rbp)
fstpt  -0x10(%rbp)
jmp    168b <term+0x53b>
jmp    1686 <term+0x536>
lea    0xa4d(%rip),%rdi
call   1060 <matchops@plt>
cmp    $0x0,%eax
je     1676 <term+0x526>
fldt   -0x30(%rbp)
fnstcw -0xca(%rbp)
movzwl -0xca(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0xcc(%rbp)
fldcw  -0xcc(%rbp)
fistpll -0x48(%rbp)
fldcw  -0xca(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x118(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <term@plt>
mov    -0x118(%rbp),%rax
fnstcw -0xce(%rbp)
movzwl -0xce(%rbp),%ecx
or     $0xc00,%ecx
mov    %cx,-0xd0(%rbp)
fldcw  -0xd0(%rbp)
fistpll -0x40(%rbp)
fldcw  -0xce(%rbp)
mov    -0x40(%rbp),%rcx
or     %rcx,%rax
mov    %rax,-0x38(%rbp)
fildll -0x38(%rbp)
fstpt  -0x30(%rbp)
jmp    1681 <term+0x531>
fldt   -0x30(%rbp)
fstpt  -0x10(%rbp)
jmp    168b <term+0x53b>
jmp    1686 <term+0x536>
jmp    118c <term+0x3c>
fldt   -0x10(%rbp)
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<term>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
test   %edi,%edi
js     1571 <term+0x421>
mov    %edi,%ebx
lea    -0x1(%rbx),%r15d
mov    %r15d,%edi
call   1050 <term@plt>
fstpt  0x2c(%rsp)
mov    %ebx,%eax
lea    0xe7c(%rip),%rcx
movslq (%rcx,%rax,4),%r12
add    %rcx,%r12
lea    0xe8a(%rip),%rbp
lea    0xe98(%rip),%r13
jmp    1230 <term+0xe0>
lea    0xe82(%rip),%rdi
call   1060 <matchops@plt>
test   %eax,%eax
je     1459 <term+0x309>
fnstcw 0x4a(%rsp)
movzwl 0x4a(%rsp),%eax
or     $0xc00,%eax
mov    %ax,0x5e(%rsp)
fldcw  0x5e(%rsp)
fldt   0x2c(%rsp)
fistpll 0x78(%rsp)
fldcw  0x4a(%rsp)
mov    0x78(%rsp),%r14
mov    %r15d,%edi
call   1050 <term@plt>
fnstcw 0x48(%rsp)
movzwl 0x48(%rsp),%eax
or     $0xc00,%eax
mov    %ax,0x5c(%rsp)
fldcw  0x5c(%rsp)
fistpll 0x80(%rsp)
fldcw  0x48(%rsp)
movzbl 0x80(%rsp),%ecx
shl    %cl,%r14
mov    %r14,0x88(%rsp)
fildll 0x88(%rsp)
fstpt  0x2c(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmp    $0x6,%ebx
ja     1230 <term+0xe0>
jmp    *%r12
mov    %rbp,%rdi
call   1060 <matchops@plt>
test   %eax,%eax
je     155b <term+0x40b>
mov    %r15d,%edi
call   1050 <term@plt>
fstpt  0x10(%rsp)
fldt   0x2c(%rsp)
fstpt  (%rsp)
call   1070 <pow@plt>
fstpt  0x2c(%rsp)
jmp    1230 <term+0xe0>
lea    0xdb0(%rip),%rdi
call   1060 <matchops@plt>
test   %eax,%eax
je     14dc <term+0x38c>
mov    %r15d,%edi
call   1050 <term@plt>
fldt   0x2c(%rsp)
fmulp  %st,%st(1)
fstpt  0x2c(%rsp)
jmp    1230 <term+0xe0>
lea    0xd8e(%rip),%rdi
call   1060 <matchops@plt>
test   %eax,%eax
je     1503 <term+0x3b3>
mov    %r15d,%edi
call   1050 <term@plt>
fldt   0x2c(%rsp)
faddp  %st,%st(1)
fstpt  0x2c(%rsp)
jmp    1230 <term+0xe0>
lea    0xd6d(%rip),%rdi
call   1060 <matchops@plt>
test   %eax,%eax
je     155b <term+0x40b>
fnstcw 0x42(%rsp)
movzwl 0x42(%rsp),%eax
or     $0xc00,%eax
mov    %ax,0x56(%rsp)
fldcw  0x56(%rsp)
fldt   0x2c(%rsp)
fistpll 0x90(%rsp)
fldcw  0x42(%rsp)
mov    %r15d,%edi
call   1050 <term@plt>
fnstcw 0x40(%rsp)
movzwl 0x40(%rsp),%eax
or     $0xc00,%eax
mov    %ax,0x54(%rsp)
fldcw  0x54(%rsp)
fistpll 0x98(%rsp)
fldcw  0x40(%rsp)
mov    0x98(%rsp),%rax
and    0x90(%rsp),%rax
mov    %rax,0xa0(%rsp)
fildll 0xa0(%rsp)
fstpt  0x2c(%rsp)
jmp    1230 <term+0xe0>
lea    0xce3(%rip),%rdi
call   1060 <matchops@plt>
test   %eax,%eax
je     155b <term+0x40b>
fnstcw 0x3e(%rsp)
movzwl 0x3e(%rsp),%eax
or     $0xc00,%eax
mov    %ax,0x52(%rsp)
fldcw  0x52(%rsp)
fldt   0x2c(%rsp)
fistpll 0xa8(%rsp)
fldcw  0x3e(%rsp)
mov    %r15d,%edi
call   1050 <term@plt>
fnstcw 0x3c(%rsp)
movzwl 0x3c(%rsp),%eax
or     $0xc00,%eax
mov    %ax,0x50(%rsp)
fldcw  0x50(%rsp)
fistpll 0xb0(%rsp)
fldcw  0x3c(%rsp)
mov    0xb0(%rsp),%rax
xor    0xa8(%rsp),%rax
mov    %rax,0xb8(%rsp)
fildll 0xb8(%rsp)
fstpt  0x2c(%rsp)
jmp    1230 <term+0xe0>
mov    %r13,%rdi
call   1060 <matchops@plt>
test   %eax,%eax
je     155b <term+0x40b>
fnstcw 0x3a(%rsp)
movzwl 0x3a(%rsp),%eax
or     $0xc00,%eax
mov    %ax,0x4e(%rsp)
fldcw  0x4e(%rsp)
fldt   0x2c(%rsp)
fistpll 0xc0(%rsp)
fldcw  0x3a(%rsp)
mov    %r15d,%edi
call   1050 <term@plt>
fnstcw 0x38(%rsp)
movzwl 0x38(%rsp),%eax
or     $0xc00,%eax
mov    %ax,0x4c(%rsp)
fldcw  0x4c(%rsp)
fistpll 0xc8(%rsp)
fldcw  0x38(%rsp)
mov    0xc8(%rsp),%rax
or     0xc0(%rsp),%rax
mov    %rax,0xd0(%rsp)
fildll 0xd0(%rsp)
fstpt  0x2c(%rsp)
jmp    1230 <term+0xe0>
lea    0xbca(%rip),%rdi
call   1060 <matchops@plt>
test   %eax,%eax
je     155b <term+0x40b>
fnstcw 0x46(%rsp)
movzwl 0x46(%rsp),%eax
or     $0xc00,%eax
mov    %ax,0x5a(%rsp)
fldcw  0x5a(%rsp)
fldt   0x2c(%rsp)
fistpll 0x60(%rsp)
fldcw  0x46(%rsp)
mov    %rbp,%r14
mov    0x60(%rsp),%rbp
mov    %r15d,%edi
call   1050 <term@plt>
fnstcw 0x44(%rsp)
movzwl 0x44(%rsp),%eax
or     $0xc00,%eax
mov    %ax,0x58(%rsp)
fldcw  0x58(%rsp)
fistpll 0x68(%rsp)
fldcw  0x44(%rsp)
movzbl 0x68(%rsp),%ecx
sar    %cl,%rbp
mov    %rbp,0x70(%rsp)
mov    %r14,%rbp
fildll 0x70(%rsp)
fstpt  0x2c(%rsp)
jmp    1230 <term+0xe0>
lea    0xb3c(%rip),%rdi
call   1060 <matchops@plt>
test   %eax,%eax
je     152a <term+0x3da>
mov    %r15d,%edi
call   1050 <term@plt>
fldt   0x2c(%rsp)
fdivp  %st,%st(1)
fstpt  0x2c(%rsp)
jmp    1230 <term+0xe0>
lea    0xb1b(%rip),%rdi
call   1060 <matchops@plt>
test   %eax,%eax
je     155b <term+0x40b>
mov    %r15d,%edi
call   1050 <term@plt>
fldt   0x2c(%rsp)
fsubp  %st,%st(1)
fstpt  0x2c(%rsp)
jmp    1230 <term+0xe0>
lea    0xaf0(%rip),%rdi
call   1060 <matchops@plt>
test   %eax,%eax
je     155b <term+0x40b>
mov    %r15d,%edi
call   1050 <term@plt>
fstpt  0x10(%rsp)
fldt   0x2c(%rsp)
fstpt  (%rsp)
call   1040 <fmod@plt>
fstpt  0x2c(%rsp)
jmp    1230 <term+0xe0>
fldt   0x2c(%rsp)
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %eax,%eax
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <readnum@plt>

LLVM IR (-O0):
@.str = [3 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 = [2 x i8] c"+\00"
@.str.5 = [2 x i8] c"-\00"
@.str.6 = [3 x i8] c"<<\00"
@.str.7 = [3 x i8] c">>\00"
@.str.8 = [2 x i8] c"&\00"
@.str.9 = [2 x i8] c"^\00"
@.str.10 = [2 x i8] c"|\00"
define x86_fp80 @term(i32 %0) {
%2 = alloca x86_fp80
%3 = alloca i32
%4 = alloca x86_fp80
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = add nsw i32 %5, -1
store i32 %6, i32* %3
%7 = icmp slt i32 %5, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call x86_fp80 (...) @readnum()
store x86_fp80 %9, x86_fp80* %2
br label %145
10: ; preds = %1
%11 = load i32, i32* %3
%12 = call x86_fp80 @term(i32 %11)
store x86_fp80 %12, x86_fp80* %4
br label %13
13: ; preds = %10, %144
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
switch i32 %15, label %144 [
i32 0, label %16
i32 1, label %27
i32 2, label %56
i32 3, label %76
i32 4, label %102
i32 5, label %116
i32 6, label %130
]
16: ; preds = %13
%17 = call i32 @matchops(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %24
19: ; preds = %16
%20 = load x86_fp80, x86_fp80* %4
%21 = load i32, i32* %3
%22 = call x86_fp80 @term(i32 %21)
%23 = call x86_fp80 @pow(x86_fp80 %20, x86_fp80 %22)
store x86_fp80 %23, x86_fp80* %4
br label %26
24: ; preds = %16
%25 = load x86_fp80, x86_fp80* %4
store x86_fp80 %25, x86_fp80* %2
br label %145
26: ; preds = %19
br label %144
27: ; preds = %13
%28 = call i32 @matchops(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%29 = icmp ne i32 %28, 0
br i1 %29, label %30, label %35
30: ; preds = %27
%31 = load i32, i32* %3
%32 = call x86_fp80 @term(i32 %31)
%33 = load x86_fp80, x86_fp80* %4
%34 = fmul x86_fp80 %33, %32
store x86_fp80 %34, x86_fp80* %4
br label %55
35: ; preds = %27
%36 = call i32 @matchops(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%37 = icmp ne i32 %36, 0
br i1 %37, label %38, label %43
38: ; preds = %35
%39 = load i32, i32* %3
%40 = call x86_fp80 @term(i32 %39)
%41 = load x86_fp80, x86_fp80* %4
%42 = fdiv x86_fp80 %41, %40
store x86_fp80 %42, x86_fp80* %4
br label %54
43: ; preds = %35
%44 = call i32 @matchops(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%45 = icmp ne i32 %44, 0
br i1 %45, label %46, label %51
46: ; preds = %43
%47 = load x86_fp80, x86_fp80* %4
%48 = load i32, i32* %3
%49 = call x86_fp80 @term(i32 %48)
%50 = call x86_fp80 @fmod(x86_fp80 %47, x86_fp80 %49)
store x86_fp80 %50, x86_fp80* %4
br label %53
51: ; preds = %43
%52 = load x86_fp80, x86_fp80* %4
store x86_fp80 %52, x86_fp80* %2
br label %145
53: ; preds = %46
br label %54
54: ; preds = %53, %38
br label %55
55: ; preds = %54, %30
br label %144
56: ; preds = %13
%57 = call i32 @matchops(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%58 = icmp ne i32 %57, 0
br i1 %58, label %59, label %64
59: ; preds = %56
%60 = load i32, i32* %3
%61 = call x86_fp80 @term(i32 %60)
%62 = load x86_fp80, x86_fp80* %4
%63 = fadd x86_fp80 %62, %61
store x86_fp80 %63, x86_fp80* %4
br label %75
64: ; preds = %56
%65 = call i32 @matchops(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%66 = icmp ne i32 %65, 0
br i1 %66, label %67, label %72
67: ; preds = %64
%68 = load i32, i32* %3
%69 = call x86_fp80 @term(i32 %68)
%70 = load x86_fp80, x86_fp80* %4
%71 = fsub x86_fp80 %70, %69
store x86_fp80 %71, x86_fp80* %4
br label %74
72: ; preds = %64
%73 = load x86_fp80, x86_fp80* %4
store x86_fp80 %73, x86_fp80* %2
br label %145
74: ; preds = %67
br label %75
75: ; preds = %74, %59
br label %144
76: ; preds = %13
%77 = call i32 @matchops(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%78 = icmp ne i32 %77, 0
br i1 %78, label %79, label %87
79: ; preds = %76
%80 = load x86_fp80, x86_fp80* %4
%81 = fptosi x86_fp80 %80 to i64
%82 = load i32, i32* %3
%83 = call x86_fp80 @term(i32 %82)
%84 = fptosi x86_fp80 %83 to i64
%85 = shl i64 %81, %84
%86 = sitofp i64 %85 to x86_fp80
store x86_fp80 %86, x86_fp80* %4
br label %101
87: ; preds = %76
%88 = call i32 @matchops(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%89 = icmp ne i32 %88, 0
br i1 %89, label %90, label %98
90: ; preds = %87
%91 = load x86_fp80, x86_fp80* %4
%92 = fptosi x86_fp80 %91 to i64
%93 = load i32, i32* %3
%94 = call x86_fp80 @term(i32 %93)
%95 = fptosi x86_fp80 %94 to i64
%96 = ashr i64 %92, %95
%97 = sitofp i64 %96 to x86_fp80
store x86_fp80 %97, x86_fp80* %4
br label %100
98: ; preds = %87
%99 = load x86_fp80, x86_fp80* %4
store x86_fp80 %99, x86_fp80* %2
br label %145
100: ; preds = %90
br label %101
101: ; preds = %100, %79
br label %144
102: ; preds = %13
%103 = call i32 @matchops(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%104 = icmp ne i32 %103, 0
br i1 %104, label %105, label %113
105: ; preds = %102
%106 = load x86_fp80, x86_fp80* %4
%107 = fptosi x86_fp80 %106 to i64
%108 = load i32, i32* %3
%109 = call x86_fp80 @term(i32 %108)
%110 = fptosi x86_fp80 %109 to i64
%111 = and i64 %107, %110
%112 = sitofp i64 %111 to x86_fp80
store x86_fp80 %112, x86_fp80* %4
br label %115
113: ; preds = %102
%114 = load x86_fp80, x86_fp80* %4
store x86_fp80 %114, x86_fp80* %2
br label %145
115: ; preds = %105
br label %144
116: ; preds = %13
%117 = call i32 @matchops(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
%118 = icmp ne i32 %117, 0
br i1 %118, label %119, label %127
119: ; preds = %116
%120 = load x86_fp80, x86_fp80* %4
%121 = fptosi x86_fp80 %120 to i64
%122 = load i32, i32* %3
%123 = call x86_fp80 @term(i32 %122)
%124 = fptosi x86_fp80 %123 to i64
%125 = xor i64 %121, %124
%126 = sitofp i64 %125 to x86_fp80
store x86_fp80 %126, x86_fp80* %4
br label %129
127: ; preds = %116
%128 = load x86_fp80, x86_fp80* %4
store x86_fp80 %128, x86_fp80* %2
br label %145
129: ; preds = %119
br label %144
130: ; preds = %13
%131 = call i32 @matchops(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
%132 = icmp ne i32 %131, 0
br i1 %132, label %133, label %141
133: ; preds = %130
%134 = load x86_fp80, x86_fp80* %4
%135 = fptosi x86_fp80 %134 to i64
%136 = load i32, i32* %3
%137 = call x86_fp80 @term(i32 %136)
%138 = fptosi x86_fp80 %137 to i64
%139 = or i64 %135, %138
%140 = sitofp i64 %139 to x86_fp80
store x86_fp80 %140, x86_fp80* %4
br label %143
141: ; preds = %130
%142 = load x86_fp80, x86_fp80* %4
store x86_fp80 %142, x86_fp80* %2
br label %145
143: ; preds = %133
br label %144
144: ; preds = %13, %143, %129, %115, %101, %75, %55, %26
br label %13
145: ; preds = %141, %127, %113, %98, %72, %51, %24, %8
%146 = load x86_fp80, x86_fp80* %2
ret x86_fp80 %146
}

LLVM IR (-O2):
@.str = [3 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 = [2 x i8] c"+\00"
@.str.5 = [2 x i8] c"-\00"
@.str.6 = [3 x i8] c"<<\00"
@.str.7 = [3 x i8] c">>\00"
@.str.8 = [2 x i8] c"&\00"
@.str.9 = [2 x i8] c"^\00"
@.str.10 = [2 x i8] c"|\00"
define x86_fp80 @term(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = icmp slt i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call x86_fp80 (...) @readnum()
br label %93
6: ; preds = %1
%7 = tail call x86_fp80 @term(i32 %2)
br label %8
8: ; preds = %55, %6
%9 = phi x86_fp80 [ %7, %6 ], [ %56, %55 ]
switch i32 %0, label %55 [
i32 0, label %10
i32 1, label %16
i32 2, label %34
i32 3, label %46
i32 4, label %66
i32 5, label %75
i32 6, label %84
]
10: ; preds = %8
%11 = tail call i32 @matchops(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%12 = icmp eq i32 %11, 0
br i1 %12, label %93, label %13
13: ; preds = %10
%14 = tail call x86_fp80 @term(i32 %2)
%15 = tail call x86_fp80 @pow(x86_fp80 %9, x86_fp80 %14)
br label %55
16: ; preds = %8
%17 = tail call i32 @matchops(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%18 = icmp eq i32 %17, 0
br i1 %18, label %22, label %19
19: ; preds = %16
%20 = tail call x86_fp80 @term(i32 %2)
%21 = fmul x86_fp80 %9, %20
br label %55
22: ; preds = %16
%23 = tail call i32 @matchops(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%24 = icmp eq i32 %23, 0
br i1 %24, label %28, label %25
25: ; preds = %22
%26 = tail call x86_fp80 @term(i32 %2)
%27 = fdiv x86_fp80 %9, %26
br label %55
28: ; preds = %22
%29 = tail call i32 @matchops(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%30 = icmp eq i32 %29, 0
br i1 %30, label %93, label %31
31: ; preds = %28
%32 = tail call x86_fp80 @term(i32 %2)
%33 = tail call x86_fp80 @fmod(x86_fp80 %9, x86_fp80 %32)
br label %55
34: ; preds = %8
%35 = tail call i32 @matchops(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%36 = icmp eq i32 %35, 0
br i1 %36, label %40, label %37
37: ; preds = %34
%38 = tail call x86_fp80 @term(i32 %2)
%39 = fadd x86_fp80 %9, %38
br label %55
40: ; preds = %34
%41 = tail call i32 @matchops(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%42 = icmp eq i32 %41, 0
br i1 %42, label %93, label %43
43: ; preds = %40
%44 = tail call x86_fp80 @term(i32 %2)
%45 = fsub x86_fp80 %9, %44
br label %55
46: ; preds = %8
%47 = tail call i32 @matchops(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%48 = icmp eq i32 %47, 0
br i1 %48, label %57, label %49
49: ; preds = %46
%50 = fptosi x86_fp80 %9 to i64
%51 = tail call x86_fp80 @term(i32 %2)
%52 = fptosi x86_fp80 %51 to i64
%53 = shl i64 %50, %52
%54 = sitofp i64 %53 to x86_fp80
br label %55
55: ; preds = %49, %60, %37, %43, %19, %31, %25, %8, %87, %78, %69, %13
%56 = phi x86_fp80 [ %9, %8 ], [ %92, %87 ], [ %83, %78 ], [ %74, %69 ], [ %54, %49 ], [ %65, %60 ], [ %39, %37 ], [ %45, %43 ], [ %21, %19 ], [ %27, %25 ], [ %33, %31 ], [ %15, %13 ]
br label %8
57: ; preds = %46
%58 = tail call i32 @matchops(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%59 = icmp eq i32 %58, 0
br i1 %59, label %93, label %60
60: ; preds = %57
%61 = fptosi x86_fp80 %9 to i64
%62 = tail call x86_fp80 @term(i32 %2)
%63 = fptosi x86_fp80 %62 to i64
%64 = ashr i64 %61, %63
%65 = sitofp i64 %64 to x86_fp80
br label %55
66: ; preds = %8
%67 = tail call i32 @matchops(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%68 = icmp eq i32 %67, 0
br i1 %68, label %93, label %69
69: ; preds = %66
%70 = fptosi x86_fp80 %9 to i64
%71 = tail call x86_fp80 @term(i32 %2)
%72 = fptosi x86_fp80 %71 to i64
%73 = and i64 %72, %70
%74 = sitofp i64 %73 to x86_fp80
br label %55
75: ; preds = %8
%76 = tail call i32 @matchops(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
%77 = icmp eq i32 %76, 0
br i1 %77, label %93, label %78
78: ; preds = %75
%79 = fptosi x86_fp80 %9 to i64
%80 = tail call x86_fp80 @term(i32 %2)
%81 = fptosi x86_fp80 %80 to i64
%82 = xor i64 %81, %79
%83 = sitofp i64 %82 to x86_fp80
br label %55
84: ; preds = %8
%85 = tail call i32 @matchops(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
%86 = icmp eq i32 %85, 0
br i1 %86, label %93, label %87
87: ; preds = %84
%88 = fptosi x86_fp80 %9 to i64
%89 = tail call x86_fp80 @term(i32 %2)
%90 = fptosi x86_fp80 %89 to i64
%91 = or i64 %90, %88
%92 = sitofp i64 %91 to x86_fp80
br label %55
93: ; preds = %84, %75, %66, %57, %40, %28, %10, %4
%94 = phi x86_fp80 [ %5, %4 ], [ %9, %10 ], [ %9, %28 ], [ %9, %40 ], [ %9, %57 ], [ %9, %66 ], [ %9, %75 ], [ %9, %84 ]
ret x86_fp80 %94
}