// File: /workspace/github_cpp_makefile_star2_O1/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
movapd %xmm0, %xmm3
movq %rsi, %r14
movapd %xmm2, %xmm0
addsd %xmm3, %xmm0
movapd %xmm1, %xmm4
subsd %xmm0, %xmm4
subsd %xmm1, %xmm0
movsd 0xd0cc(%rip), %xmm5     # 0x3d210
xorl %eax, %eax
ucomisd %xmm0, %xmm5
setae %al
xorl %ecx, %ecx
ucomisd %xmm4, %xmm5
setae %cl
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm2
cmoval %eax, %ecx
movsd %xmm2, 0x5a0(%rsp)
movsd %xmm3, 0x590(%rsp)
xorl %r15d, %r15d
cmpb $0x1, %cl
jne 0x3027d
movq %rdi, %r12
movl $0x1, %ebp
leaq 0x5a0(%rsp), %r13
movapd %xmm3, %xmm0
movsd %xmm2, 0x598(%rsp)
movsd %xmm3, 0x5b0(%rsp)
movsd %xmm1, 0x5a8(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1c004
movsd 0x590(%rsp), %xmm0
addsd 0x598(%rsp), %xmm0
movl $0xb1, %ecx
movq %rsp, %rdi
leaq 0x5f0(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %r12, %rdi
movq %r14, %rsi
leaq 0x590(%rsp), %rdx
movq %r13, %rcx
callq 0x302a1
movsd 0xd014(%rip), %xmm5     # 0x3d210
movsd 0x5a8(%rsp), %xmm1
movsd 0x5b0(%rsp), %xmm3
addl %eax, %r15d
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
movsd 0x598(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm3, %xmm0
movapd %xmm0, %xmm4
addsd %xmm2, %xmm4
movapd %xmm1, %xmm2
subsd %xmm4, %xmm2
subsd %xmm1, %xmm4
xorl %eax, %eax
ucomisd %xmm4, %xmm5
xorpd %xmm4, %xmm4
setae %al
xorl %ecx, %ecx
ucomisd %xmm2, %xmm5
movsd 0x5a0(%rsp), %xmm2
setae %cl
ucomisd %xmm4, %xmm2
cmoval %eax, %ecx
movsd %xmm0, 0x590(%rsp)
incl %ebp
testb %cl, %cl
jne 0x301ae
movslq %r15d, %r15
movapd %xmm0, %xmm3
movq %rbx, %rdi
movq %r14, %rsi
movapd %xmm3, %xmm0
callq 0x1c004
movq %r15, %rax
addq $0x5b8, %rsp            # imm = 0x5B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq