// File: wo3kie[P]calc/calc.cpp
// Function: ast::Calc::operator()(ast::FunctionCall const&) const
double operator()( FunctionCall const & x ) const
        {
            if( x.name_ == "pi" ){
                return M_PI;
            }
            
            if( x.name_ == "e" ){
                return std::exp( 1.0 );
            }

            double const arg = boost::apply_visitor( *this, x.arg_ );

            if( x.name_ == "sin" ){
                return sin( arg );
            }
            
            if( x.name_ == "cos" ){
                return cos( arg );
            }
            
            if( x.name_ == "tan" ){
                return tan( arg );
            }
            
            if( x.name_ == "abs" ){
                return fabs( arg );
            }
            
            if( x.name_ == "rad" ){
                return arg * 2 * M_PI / 360;
            }

            if( x.name_ == "deg" ){
                return arg * 360 / 2 / M_PI;
            }

            if( x.name_ == "log" ){
                return log( arg );
            }

            if( x.name_ == "log10" ){
                return log10( arg );
            }

            if( x.name_ == "log2" ){
                return log2( arg );
            }

            return 0;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x2a78(%rip), %rsi      # 0x4b42b
callq 0x48bd0
testb $0x1, %al
jne 0x489be
jmp 0x489d0
movsd 0x167a(%rip), %xmm0     # 0x4a040
movsd %xmm0, -0x8(%rbp)
jmp 0x48bc5
movq -0x18(%rbp), %rdi
leaq 0x22ce(%rip), %rsi      # 0x4aca9
callq 0x48bd0
testb $0x1, %al
jne 0x489e6
jmp 0x489fd
movsd 0x164a(%rip), %xmm0     # 0x4a038
callq 0x4500
movsd %xmm0, -0x8(%rbp)
jmp 0x48bc5
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x20, %rsi
callq 0x47930
movsd %xmm0, -0x20(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x2a10(%rip), %rsi      # 0x4b42e
callq 0x48bd0
testb $0x1, %al
jne 0x48a29
jmp 0x48a3d
movsd -0x20(%rbp), %xmm0
callq 0x4080
movsd %xmm0, -0x8(%rbp)
jmp 0x48bc5
movq -0x18(%rbp), %rdi
leaq 0x29ea(%rip), %rsi      # 0x4b432
callq 0x48bd0
testb $0x1, %al
jne 0x48a53
jmp 0x48a67
movsd -0x20(%rbp), %xmm0
callq 0x4530
movsd %xmm0, -0x8(%rbp)
jmp 0x48bc5
movq -0x18(%rbp), %rdi
leaq 0x29c4(%rip), %rsi      # 0x4b436
callq 0x48bd0
testb $0x1, %al
jne 0x48a7d
jmp 0x48a91
movsd -0x20(%rbp), %xmm0
callq 0x4170
movsd %xmm0, -0x8(%rbp)
jmp 0x48bc5
movq -0x18(%rbp), %rdi
leaq 0x299e(%rip), %rsi      # 0x4b43a
callq 0x48bd0
testb $0x1, %al
jne 0x48aa7
jmp 0x48ac1
movsd -0x20(%rbp), %xmm0
movaps 0x15fd(%rip), %xmm1     # 0x4a0b0
pand %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x48bc5
movq -0x18(%rbp), %rdi
leaq 0x2972(%rip), %rsi      # 0x4b43e
callq 0x48bd0
testb $0x1, %al
jne 0x48ad7
jmp 0x48b06
movsd 0x1541(%rip), %xmm0     # 0x4a020
mulsd -0x20(%rbp), %xmm0
movsd 0x1554(%rip), %xmm1     # 0x4a040
mulsd %xmm1, %xmm0
movsd 0x1588(%rip), %xmm1     # 0x4a080
divsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x48bc5
movq -0x18(%rbp), %rdi
leaq 0x2931(%rip), %rsi      # 0x4b442
callq 0x48bd0
testb $0x1, %al
jne 0x48b1c
jmp 0x48b48
movsd 0x155c(%rip), %xmm0     # 0x4a080
mulsd -0x20(%rbp), %xmm0
movsd 0x14ef(%rip), %xmm1     # 0x4a020
divsd %xmm1, %xmm0
movsd 0x1503(%rip), %xmm1     # 0x4a040
divsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x48bc5
movq -0x18(%rbp), %rdi
leaq 0x28f3(%rip), %rsi      # 0x4b446
callq 0x48bd0
testb $0x1, %al
jne 0x48b5e
jmp 0x48b6f
movsd -0x20(%rbp), %xmm0
callq 0x4260
movsd %xmm0, -0x8(%rbp)
jmp 0x48bc5
movq -0x18(%rbp), %rdi
leaq 0x28d0(%rip), %rsi      # 0x4b44a
callq 0x48bd0
testb $0x1, %al
jne 0x48b85
jmp 0x48b96
movsd -0x20(%rbp), %xmm0
callq 0x4130
movsd %xmm0, -0x8(%rbp)
jmp 0x48bc5
movq -0x18(%rbp), %rdi
leaq 0x28af(%rip), %rsi      # 0x4b450
callq 0x48bd0
testb $0x1, %al
jne 0x48bac
jmp 0x48bbd
movsd -0x20(%rbp), %xmm0
callq 0x44f0
movsd %xmm0, -0x8(%rbp)
jmp 0x48bc5
xorps %xmm0, %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq