// File: /workspace/github_cpp_makefile_star2_O2/istellartech[P]OpenTsiolkovsky/./boost/numeric/odeint/integrate/detail/integrate_const.hpp
// Function: unsigned long boost::numeric::odeint::detail::integrate_const<boost::numeric::odeint::dense_output_runge_kutta<boost::numeric::odeint::controlled_runge_kutta<boost::numeric::odeint::runge_kutta_dopri5<std::array<double, 14ul>, double, std::array<double, 14ul>, double, boost::numeric::odeint::array_algebra, boost::numeric::odeint::default_operations, boost::numeric::odeint::initially_resizer>, boost::numeric::odeint::default_error_checker<double, boost::numeric::odeint::array_algebra, boost::numeric::odeint::default_operations>, boost::numeric::odeint::default_step_adjuster<double, double>, boost::numeric::odeint::initially_resizer, boost::numeric::odeint::explicit_error_stepper_fsal_tag>, boost::numeric::odeint::explicit_controlled_stepper_fsal_tag>, RocketStage, std::array<double, 14ul>, double, std::reference_wrapper<CsvObserver>>(boost::numeric::odeint::dense_output_runge_kutta<boost::numeric::odeint::controlled_runge_kutta<boost::numeric::odeint::runge_kutta_dopri5<std::array<double, 14ul>, double, std::array<double, 14ul>, double, boost::numeric::odeint::array_algebra, boost::numeric::odeint::default_operations, boost::numeric::odeint::initially_resizer>, boost::numeric::odeint::default_error_checker<double, boost::numeric::odeint::array_algebra, boost::numeric::odeint::default_operations>, boost::numeric::odeint::default_step_adjuster<double, double>, boost::numeric::odeint::initially_resizer, boost::numeric::odeint::explicit_error_stepper_fsal_tag>, boost::numeric::odeint::explicit_controlled_stepper_fsal_tag>, RocketStage, std::array<double, 14ul>&, double, double, double, std::reference_wrapper<CsvObserver>, boost::numeric::odeint::dense_output_stepper_tag)
size_t integrate_const(
        Stepper stepper , System system , State &start_state ,
        Time start_time , Time end_time , Time dt ,
        Observer observer , dense_output_stepper_tag
)
{
    typename odeint::unwrap_reference< Observer >::type &obs = observer;
    typename odeint::unwrap_reference< Stepper >::type &st = stepper;

    Time time = start_time;
    
    st.initialize( start_state , time , dt );
    obs( start_state , time );
    time += dt;

    int obs_step( 1 );
    int real_step( 0 );
    
    while( less_eq_with_sign( static_cast<Time>(time+dt) , end_time , dt ) )
    {
        while( less_eq_with_sign( time , st.current_time() , dt ) )
        {
            st.calc_state( time , start_state );
            obs( start_state , time );
            ++obs_step;
            // direct computation of the time avoids error propagation happening when using time += dt
            // we need clumsy type analysis to get boost units working here
            time = start_time + static_cast< typename unit_value_type<Time>::type >(obs_step) * dt;
        }
        // we have not reached the end, do another real step
        if( less_with_sign( static_cast<Time>(st.current_time()+st.current_time_step()) ,
                            end_time ,
                            st.current_time_step() ) )
        {
            while( less_eq_with_sign( st.current_time() , time , dt ) )
            {
                st.do_step( system );
                ++real_step;
            }
        }
        else if( less_with_sign( st.current_time() , end_time , st.current_time_step() ) )
        { // do the last step ending exactly on the end point
            st.initialize( st.current_state() , st.current_time() , end_time - st.current_time() );
            st.do_step( system );
            ++real_step;
        }
        
    }
    // last observation, if we are still in observation interval
    // might happen due to finite precision problems when computing the the time
    if( less_eq_with_sign( time , end_time , dt ) )
    {
        st.calc_state( time , start_state );
        obs( start_state , time );
    }
    
    return real_step;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1dc0, %rsp           # imm = 0x1DC0
movq %rdx, %rbx
movsd %xmm2, 0x10(%rsp)
movsd %xmm1, 0x28(%rsp)
movsd %xmm0, 0x18(%rsp)
movq %rsi, %r14
movq %rdi, 0x20(%rsp)
leaq 0x1df0(%rsp), %r15
movq %r15, %rdi
movapd %xmm2, %xmm1
callq 0x13ba4
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
movsd 0x18(%rsp), %xmm0
callq *0x8(%rax)
movsd 0x10(%rsp), %xmm4
movsd 0x18(%rsp), %xmm5
addsd %xmm4, %xmm5
pushq $0x1
popq %r12
movl $0x0, 0x4(%rsp)
movsd 0xc572(%rip), %xmm7     # 0x1fe50
xorpd %xmm8, %xmm8
leaq 0xf00(%rsp), %r13
leaq 0x600(%r15), %rax
movq %rax, 0x38(%rsp)
leaq 0x590(%r15), %rax
movq %rax, 0x30(%rsp)
movsd 0x28(%rsp), %xmm6
movapd %xmm5, %xmm0
addsd %xmm4, %xmm0
movapd %xmm6, %xmm1
subsd %xmm0, %xmm1
subsd %xmm6, %xmm0
xorl %eax, %eax
ucomisd %xmm0, %xmm7
setae %al
xorl %ecx, %ecx
ucomisd %xmm1, %xmm7
setae %cl
ucomisd %xmm8, %xmm4
cmoval %eax, %ecx
cmpb $0x1, %cl
jne 0x13b1b
movsd 0x750(%r15), %xmm0
movapd %xmm5, %xmm1
subsd %xmm0, %xmm1
xorl %eax, %eax
ucomisd %xmm1, %xmm7
setae %al
movapd %xmm0, %xmm1
subsd %xmm5, %xmm1
xorl %ecx, %ecx
ucomisd %xmm1, %xmm7
setae %cl
ucomisd %xmm8, %xmm4
cmoval %eax, %ecx
cmpb $0x1, %cl
movsd %xmm5, 0x8(%rsp)
jne 0x139c9
movq %r15, %rdi
movapd %xmm5, %xmm0
movq %r14, %rsi
callq 0x13c32
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
movsd 0x8(%rsp), %xmm0
callq *0x8(%rax)
xorpd %xmm8, %xmm8
movsd 0xc4a4(%rip), %xmm7     # 0x1fe50
movsd 0x10(%rsp), %xmm4
incl %r12d
cvtsi2sd %r12d, %xmm5
mulsd %xmm4, %xmm5
addsd 0x18(%rsp), %xmm5
jmp 0x13940
movsd 0x760(%r15), %xmm2
movapd %xmm0, %xmm1
addsd %xmm2, %xmm1
movsd 0x28(%rsp), %xmm6
movapd %xmm6, %xmm3
subsd %xmm1, %xmm3
xorl %eax, %eax
ucomisd %xmm7, %xmm3
seta %al
subsd %xmm6, %xmm1
xorl %ecx, %ecx
ucomisd %xmm7, %xmm1
seta %cl
ucomisd %xmm8, %xmm2
cmoval %eax, %ecx
cmpb $0x1, %cl
je 0x13aeb
movapd %xmm6, %xmm1
subsd %xmm0, %xmm1
xorl %eax, %eax
ucomisd %xmm7, %xmm1
seta %al
movapd %xmm0, %xmm3
subsd %xmm6, %xmm3
xorl %ecx, %ecx
ucomisd %xmm7, %xmm3
seta %cl
ucomisd %xmm8, %xmm2
cmoval %eax, %ecx
cmpb $0x1, %cl
jne 0x13909
cmpb $0x0, 0x589(%r15)
movq 0x38(%rsp), %rsi
cmovneq 0x30(%rsp), %rsi
movq %r15, %rdi
callq 0x13ba4
leaq 0x40(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x105ec
movq %r15, %rdi
leaq 0x40(%rsp), %rsi
callq 0x13c80
leaq 0x40(%rsp), %rdi
callq 0x6e12
incl 0x4(%rsp)
movsd 0x10(%rsp), %xmm4
movsd 0x8(%rsp), %xmm5
movsd 0xc3b5(%rip), %xmm7     # 0x1fe50
xorpd %xmm8, %xmm8
jmp 0x13903
movq %r13, %rdi
movq 0x20(%rsp), %rsi
callq 0x105ec
movq %r15, %rdi
movq %r13, %rsi
callq 0x13c80
movq %r13, %rdi
callq 0x6e12
incl 0x4(%rsp)
movsd 0x750(%r15), %xmm0
movsd 0x10(%rsp), %xmm4
movsd 0x8(%rsp), %xmm5
movsd 0xc36a(%rip), %xmm7     # 0x1fe50
xorpd %xmm8, %xmm8
movapd %xmm5, %xmm1
subsd %xmm0, %xmm1
subsd %xmm5, %xmm0
xorl %eax, %eax
ucomisd %xmm0, %xmm7
setae %al
xorl %ecx, %ecx
ucomisd %xmm1, %xmm7
setae %cl
ucomisd %xmm8, %xmm4
cmoval %eax, %ecx
cmpb $0x1, %cl
je 0x13aa5
jmp 0x13903
movapd %xmm5, %xmm0
subsd %xmm6, %xmm0
xorl %eax, %eax
ucomisd %xmm0, %xmm7
setae %al
subsd %xmm5, %xmm6
xorl %ecx, %ecx
ucomisd %xmm6, %xmm7
setae %cl
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm4
cmoval %eax, %ecx
cmpb $0x1, %cl
jne 0x13b70
movq %r15, %rdi
movapd %xmm5, %xmm0
movq %r14, %rsi
movsd %xmm5, 0x8(%rsp)
callq 0x13c32
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
movsd 0x8(%rsp), %xmm0
callq *0x8(%rax)
movslq 0x4(%rsp), %rax
addq $0x1dc0, %rsp           # imm = 0x1DC0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x40(%rsp), %r13
jmp 0x13b93
movq %rax, %rbx
movq %r13, %rdi
callq 0x6e12
movq %rbx, %rdi
callq 0x5640
nop