// File: /workspace/github_cpp_makefile_star2_O1/wo3kie[P]calc/calc.cpp
// Function: double calc<float, float, float, float, float, float, float, float, float>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, float, float, float, float, float, float, float, float, float)
double calc(
    std::string const & expr,
    TDoubles... ds
)
{
    std::string::const_iterator iter = expr.begin();
    std::string::const_iterator end = expr.end();

    Calculator< std::string::const_iterator > calc;
    
    boost::spirit::ascii::space_type space;

    ast::Expression expression;

    bool const r = phrase_parse( iter, end, calc, space, expression );

    if( r && iter == end )
    {
        ast::Calc calc( std::forward< TDoubles >( ds )... );
        return calc( expression );
    }
    
    throw std::runtime_error( "Parsing failed: " + std::string( iter, end ) );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x380, %rsp            # imm = 0x380
movss %xmm7, 0x10(%rsp)
movss %xmm6, 0x34(%rsp)
movss %xmm5, 0x30(%rsp)
movss %xmm4, 0x2c(%rsp)
movss %xmm3, 0x28(%rsp)
movss %xmm2, 0x24(%rsp)
movss %xmm1, 0x20(%rsp)
movss %xmm0, 0x1c(%rsp)
movq (%rdi), %r15
movq %r15, 0x8(%rsp)
addq 0x8(%rdi), %r15
leaq 0xd0(%rsp), %r14
movq %r14, %rdi
callq 0x8cbe
leaq 0x68(%rsp), %rbx
movl $0x0, -0x10(%rbx)
movq %rbx, 0x8(%rbx)
movq %rbx, (%rbx)
movq $0x0, 0x10(%rbx)
movq %r15, 0x38(%rsp)
movq (%r14), %rdi
cmpq $0x0, 0x28(%rdi)
je 0x8a08
addq $0x28, %rdi
leaq 0x58(%rsp), %rax
leaq 0x80(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x8(%rsp), %rsi
leaq 0x38(%rsp), %rdx
leaq 0x7(%rsp), %r8
callq 0xa1fc
movb $0x1, %cl
testb %al, %al
jne 0x8a0a
xorl %ecx, %ecx
testb %cl, %cl
je 0x8a40
movq 0x8(%rsp), %rax
movq 0x38(%rsp), %rdx
cmpq %rdx, %rax
je 0x8a40
leaq 0xa6ec(%rip), %rsi      # 0x13110
movsbq (%rax), %rdi
testq %rdi, %rdi
js 0x8a40
testb $0x40, (%rdi,%rsi)
je 0x8a40
incq %rax
movq %rax, 0x8(%rsp)
cmpq %rdx, %rax
jne 0x8a24
cmpq %r15, 0x8(%rsp)
sete %al
andb %al, %cl
cmpb $0x1, %cl
jne 0x8b2f
movss 0x3b0(%rsp), %xmm0
movabsq $0x4022000000000000, %rax # imm = 0x4022000000000000
leaq 0x80(%rsp), %rdi
movq %rax, (%rdi)
xorps %xmm1, %xmm1
cvtss2sd 0x1c(%rsp), %xmm1
movsd %xmm1, 0x8(%rdi)
xorps %xmm1, %xmm1
cvtss2sd 0x20(%rsp), %xmm1
movsd %xmm1, 0x10(%rdi)
xorps %xmm1, %xmm1
cvtss2sd 0x24(%rsp), %xmm1
movsd %xmm1, 0x18(%rdi)
xorps %xmm1, %xmm1
cvtss2sd 0x28(%rsp), %xmm1
movsd %xmm1, 0x20(%rdi)
xorps %xmm1, %xmm1
cvtss2sd 0x2c(%rsp), %xmm1
movsd %xmm1, 0x28(%rdi)
xorps %xmm1, %xmm1
cvtss2sd 0x30(%rsp), %xmm1
movsd %xmm1, 0x30(%rdi)
xorps %xmm1, %xmm1
cvtss2sd 0x34(%rsp), %xmm1
movsd %xmm1, 0x38(%rdi)
xorps %xmm1, %xmm1
cvtss2sd 0x10(%rsp), %xmm1
movsd %xmm1, 0x40(%rdi)
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x48(%rdi)
leaq 0x58(%rsp), %rsi
callq 0x9a28
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
callq 0xab70
leaq 0x58(%rsp), %rdi
callq 0xacfc
leaq 0xd0(%rsp), %rdi
callq 0x9ad2
movsd 0x10(%rsp), %xmm0
addq $0x380, %rsp            # imm = 0x380
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x30d0
movq %rax, %r14
movq 0x8(%rsp), %rsi
leaq 0x48(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x38(%rsp), %rdi
movq %r15, %rdx
callq 0x12dec
leaq 0xb0c3(%rip), %rsi      # 0x13c22
leaq 0x80(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x9a62
movb $0x1, %bpl
leaq 0x80(%rsp), %rsi
movq %r14, %rdi
callq 0x3320
xorl %ebp, %ebp
movq 0x15463(%rip), %rsi     # 0x1dff0
movq 0x1542c(%rip), %rdx     # 0x1dfc0
movq %r14, %rdi
callq 0x3370
movq %rax, %r15
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8bc8
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x3220
jmp 0x8bc8
movq %rax, %r15
movb $0x1, %bpl
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x8be7
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3220
jmp 0x8be7
movq %rax, %r15
movb $0x1, %bpl
testb %bpl, %bpl
je 0x8bfb
movq %r14, %rdi
callq 0x3190
jmp 0x8bfb
jmp 0x8bf8
movq %rax, %r15
movq %rbx, %rdi
callq 0xab70
leaq 0x58(%rsp), %rdi
callq 0xacfc
leaq 0xd0(%rsp), %rdi
callq 0x9ad2
movq %r15, %rdi
callq 0x3390