// File: /workspace/github_cpp_makefile_star2_O3/wo3kie[P]calc/calc.cpp
// Function: double calc<int, int, int, int, int, int, int, int, int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, int, int, int, int, int, int, int, int)
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 %r13
pushq %r12
pushq %rbx
subq $0x368, %rsp            # imm = 0x368
movl %r9d, 0x18(%rsp)
movl %r8d, %r14d
movl %ecx, %r12d
movl %edx, %r13d
movl %esi, %ebx
movq (%rdi), %r15
movq %r15, 0x10(%rsp)
addq 0x8(%rdi), %r15
leaq 0xb8(%rsp), %rbp
movq %rbp, %rdi
callq 0x8cf8
leaq 0x50(%rsp), %rax
movl $0x0, -0x10(%rax)
movq %rax, 0x8(%rax)
movq %rax, (%rax)
movq $0x0, 0x10(%rax)
movq %r15, 0x20(%rsp)
movq (%rbp), %rdi
cmpq $0x0, 0x28(%rdi)
je 0x6eac
addq $0x28, %rdi
leaq 0x40(%rsp), %rax
leaq 0x68(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x10(%rsp), %rsi
leaq 0x20(%rsp), %rdx
leaq 0xf(%rsp), %r8
callq 0xa218
testb %al, %al
je 0x6eac
movq 0x10(%rsp), %rax
movq 0x20(%rsp), %rcx
cmpq %rcx, %rax
je 0x6dc1
leaq 0xc36e(%rip), %rdx      # 0x13110
movsbq (%rax), %rsi
testq %rsi, %rsi
js 0x6dc1
testb $0x40, (%rsi,%rdx)
je 0x6dc1
incq %rax
movq %rax, 0x10(%rsp)
cmpq %rcx, %rax
jne 0x6da2
movq %rcx, %rax
cmpq %r15, %rax
jne 0x6eac
movabsq $0x4022000000000000, %rax # imm = 0x4022000000000000
leaq 0x68(%rsp), %rdi
movq %rax, (%rdi)
cvtsi2sd %ebx, %xmm0
movsd %xmm0, 0x8(%rdi)
xorps %xmm0, %xmm0
cvtsi2sd %r13d, %xmm0
cvtsi2sd %r12d, %xmm1
movsd %xmm0, 0x10(%rdi)
movsd %xmm1, 0x18(%rdi)
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
movl 0x3b8(%rsp), %eax
movsd %xmm0, 0x20(%rdi)
xorps %xmm0, %xmm0
cvtsi2sdl 0x18(%rsp), %xmm0
movl 0x3a0(%rsp), %ecx
movsd %xmm0, 0x28(%rdi)
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movl 0x3a8(%rsp), %ecx
movsd %xmm0, 0x30(%rdi)
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movl 0x3b0(%rsp), %ecx
movsd %xmm0, 0x38(%rdi)
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movsd %xmm0, 0x40(%rdi)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x48(%rdi)
leaq 0x40(%rsp), %rsi
callq 0x9a62
movsd %xmm0, 0x18(%rsp)
leaq 0x50(%rsp), %rdi
callq 0xab5a
leaq 0x40(%rsp), %rdi
callq 0xad0a
leaq 0xb8(%rsp), %rdi
callq 0x9b0c
movsd 0x18(%rsp), %xmm0
addq $0x368, %rsp            # imm = 0x368
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x30d0
movq %rax, %r14
movq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x20(%rsp), %rdi
movq %r15, %rdx
callq 0x12c70
leaq 0xcd47(%rip), %rsi      # 0x13c22
leaq 0x68(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x9a9c
movb $0x1, %bpl
leaq 0x68(%rsp), %rsi
movq %r14, %rdi
callq 0x3320
xorl %ebp, %ebp
movq 0x170ed(%rip), %rsi     # 0x1dff0
movq 0x170b6(%rip), %rdx     # 0x1dfc0
movq %r14, %rdi
callq 0x3370
movq %rax, %r15
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6f30
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3220
movq 0x20(%rsp), %rdi
cmpq %rbx, %rdi
je 0x6f47
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3220
testb %bpl, %bpl
jne 0x6f74
jmp 0x6f7c
movq %rax, %r15
movq 0x20(%rsp), %rdi
cmpq %rbx, %rdi
je 0x6f74
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3220
jmp 0x6f74
jmp 0x6f6c
movq %rax, %r15
jmp 0x6f7c
movq %rax, %r15
movq %r14, %rdi
callq 0x3190
leaq 0x50(%rsp), %rdi
callq 0xab5a
leaq 0x40(%rsp), %rdi
callq 0xad0a
leaq 0xb8(%rsp), %rdi
callq 0x9b0c
movq %r15, %rdi
callq 0x3390