// File: /workspace/github_cpp_makefile_star2_O2/sus304[P]ForRocket/./lib/boost/numeric/odeint/integrate/detail/integrate_const.hpp
// Function: unsigned long boost::numeric::odeint::detail::integrate_const<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>, std::reference_wrapper<forrocket::DynamicsBase>, std::array<double, 14ul>, double, std::reference_wrapper<forrocket::FlightDataRecorder>>(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>, std::reference_wrapper<forrocket::DynamicsBase>, std::array<double, 14ul>&, double, double, double, std::reference_wrapper<forrocket::FlightDataRecorder>, boost::numeric::odeint::controlled_stepper_tag)
size_t integrate_const(
        Stepper stepper , System system , State &start_state ,
        Time start_time , Time end_time , Time dt ,
        Observer observer , controlled_stepper_tag
)
{
    typename odeint::unwrap_reference< Observer >::type &obs = observer;

    Time time = start_time;
    const Time time_step = dt;
    int real_steps = 0;
    int step = 0;
    
    while( less_eq_with_sign( static_cast<Time>(time+time_step) , end_time , dt ) )
    {
        obs( start_state , time );
        // integrate_adaptive_checked uses the given checker to throw if an overflow occurs
        real_steps += detail::integrate_adaptive(stepper, system, start_state, time,
                                                 static_cast<Time>(time + time_step), dt,
                                                 null_observer(), controlled_stepper_tag());
        // direct computation of the time avoids error propagation happening when using time += dt
        // we need clumsy type analysis to get boost units working here
        step++;
        time = start_time + static_cast< typename unit_value_type<Time>::type >(step) * time_step;
    }
    obs( start_state , time );

    return real_steps;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x5b8, %rsp            # imm = 0x5B8
movq %rdx, %rbx
movsd %xmm1, 0x5b0(%rsp)
movq %rsi, %r14
movq %rdi, %r15
leaq 0x5a0(%rsp), %rax
movsd %xmm2, (%rax)
xorl %r12d, %r12d
pushq $0x1
popq %r13
movsd %xmm2, 0x590(%rsp)
movapd %xmm2, %xmm1
movsd %xmm0, 0x5a8(%rsp)
movapd %xmm0, %xmm2
addsd 0x590(%rsp), %xmm2
movsd 0x5b0(%rsp), %xmm4
movapd %xmm4, %xmm3
subsd %xmm2, %xmm3
subsd %xmm4, %xmm2
xorl %eax, %eax
movsd 0xd841(%rip), %xmm4     # 0x35888
ucomisd %xmm2, %xmm4
setae %al
xorl %ebp, %ebp
ucomisd %xmm3, %xmm4
setae %bpl
ucomisd 0xa890(%rip), %xmm1     # 0x328f0
movsd %xmm0, 0x598(%rsp)
cmoval %eax, %ebp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x17126
cmpb $0x1, %bpl
jne 0x280e8
movsd 0x598(%rsp), %xmm0
addsd 0x590(%rsp), %xmm0
movl $0xb1, %ecx
movq %rsp, %rdi
leaq 0x5f0(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %r15, %rdi
movq %r14, %rsi
leaq 0x598(%rsp), %rdx
leaq 0x5a0(%rsp), %rcx
callq 0x280fd
addl %eax, %r12d
cvtsi2sd %r13d, %xmm0
mulsd 0x590(%rsp), %xmm0
addsd 0x5a8(%rsp), %xmm0
movsd 0x5a0(%rsp), %xmm1
incl %r13d
jmp 0x2801b
movslq %r12d, %rax
addq $0x5b8, %rsp            # imm = 0x5B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq