// File: /workspace/github_cpp_makefile_star2_O2/istellartech[P]OpenTsiolkovsky/src/rocket.cpp
// Function: CsvObserver::operator()(std::array<double, 14ul> const&, double)
void CsvObserver::operator()(const state& x, double t){
    posECI_ << x[1], x[2], x[3];
    velECI_ << x[4], x[5], x[6];

    dcmECI2ECEF_ = dcmECI2ECEF(t);
    posECEF_ = posECEF(dcmECI2ECEF_, posECI_);
    posLLH_ = posLLH(posECEF_);

    /*
    //    It does not calculate after the rocket falls to the ground
    if ( posLLH_[2] < 0) {
        if ((int)t % 10 == 0 && (int)(t*10) % 10 == 0 ){ // progress
            progress(t);
        }
        return;
    }
    */

    //    update rocket variables
    update_from_time_and_altitude(t, posLLH_[2]);

    //    transform coordinate
    dcmECEF2NED_ = dcmECEF2NED(posLLH_);
    dcmNED2ECEF_ = dcmECEF2NED_.transpose();
    dcmECI2NED_ = dcmECI2NED(dcmECEF2NED_, dcmECI2ECEF_);
    dcmNED2ECI_ = dcmECI2NED_.transpose();
    dcmECEF2NED_init_ = dcmECEF2NED(launch_pos_LLH);
    dcmECI2NED_init_ = dcmECI2NED(dcmECEF2NED_init_, dcmECI2ECEF(0.0));
    vel_ECEF_NEDframe_ = vel_ECEF_NEDframe(dcmECI2NED_, velECI_, posECI_);
    vel_wind_NEDframe_ = vel_wind_NEDframe(wind_speed, wind_direction);
    //    air = air.altitude(posLLH_[2]);
    if (air_density_file_exist){
        air = air.altitude_with_variation_table(posLLH_[2], air_density_mat);
    } else{
        air = air.altitude_with_variation(posLLH_[2], variation_ratio_of_air_density);
    }
    //    gravity term : gravity acceleration in the north direction is not considered
    gravityECI_ = gravityECI(posECI_);

    if (is_powered){  // ---- powered flight ----
        switch (power_flight_mode) {
            case _3DoF:
                power_flight_3dof(x,t);
                break;
            case _3DoF_with_delay:  // Unimplemented
                power_flight_3dof_with_delay(x, t);
                break;
            case _6DoF:  // Unimplemented
                power_flight_6dof(x, t);
                break;
            case _6DoF_aerodynamic_stable:  // Unimplemented
                power_flight_6dof_aerodynamic_stable(x, t);
                break;
            default:
                m_dot = 0;
                accECI_ << 0.0, 0.0, 0.0;
                break;
        }
    } else {  // ---- free flight ----
        switch (free_flight_mode) {
            case aerodynamic_stable:
                free_flight_aerodynamic_stable(x, t);
                break;
            case _3DoF_defined:
                free_flight_3dof_defined(x, t);
                break;
            case ballistic_flight:
                free_flight_ballistic(x, t);
                break;
            default:
                m_dot = 0;
                accECI_ << 0.0, 0.0, 0.0;
                break;
        }
    }

    // === following code is different from RocketStage::operator() ===
    accBODY_ = dcmECI2BODY_ * (accECI_ -  gravityECI_);
    downrange = distance_surface(launch_pos_LLH, posLLH_);
    Vector3d posECEF_ = dcmECI2ECEF_ * posECI_;
    Vector3d vel_ECEF_ECEFframe_ = dcmNED2ECEF_ * vel_ECEF_NEDframe_;
    posLLH_IIP_ = posLLH_IIP(posECEF_, vel_ECEF_ECEFframe_);
    kinematic_energy = 0.5 * x[0] * vel_ECEF_NEDframe_.norm() * vel_ECEF_NEDframe_.norm();
    gravity_vector = dcmECI2NED_ * gravityECI_;

    //   ==== Calculte loss velocisy ====
    if (thrust > 0.1 || is_separated == false){
        double vel_ECEF_NEDframe_XY = sqrt(vel_ECEF_NEDframe_[0] * vel_ECEF_NEDframe_[0] +
                                           vel_ECEF_NEDframe_[1] * vel_ECEF_NEDframe_[1]);
        double path_angle_rad = atan2(-vel_ECEF_NEDframe_[2], vel_ECEF_NEDframe_XY);
        loss_gravity = gravity_vector[2] * sin(path_angle_rad);
    } else {
        loss_gravity = 0;
    }
    if (thrust > 0.1){
        loss_thrust = air.pressure * nozzle_exhaust_area / x[0];
    } else {
        loss_thrust = 0;
    }
    loss_aerodynamics = force_axial / x[0];
    loss_total = loss_gravity + loss_aerodynamics + loss_thrust;

    // ==== OUTPUT to CSV ====
    // if rocket was already impacted on the earth, NOT OUTPUT.
    if ( posLLH_[2] > 0 && !flag_duplicate) {
        fout << t << "," << x[0] << "," << thrust << ",";
        fout.precision(8);
        fout << posLLH_[0] << "," << posLLH_[1] << "," << posLLH_[2] << ","
            << x[1] << "," << x[2] << "," << x[3] << ","
            << x[4] << "," << x[5] << "," << x[6] << ","
            << vel_ECEF_NEDframe_[0] << "," << vel_ECEF_NEDframe_[1] << ","
            << vel_ECEF_NEDframe_[2] << ","
            << accECI_[0] << "," << accECI_[1] << "," << accECI_[2] << ","
            << accBODY_[0] << "," << accBODY_[1] << "," << accBODY_[2] << ","
            << Isp << "," << mach_number << ","
            << rad2deg(azimuth) << "," << rad2deg(elevation) << "," << rad2deg(roll) << ","
            << rad2deg(angle_of_attack_[0]) << "," << rad2deg(angle_of_attack_[1]) << ","
            << rad2deg(angle_of_attack_[2]) << ","
            << dynamic_pressure << ","
            << force_air_vector_BODYframe[0] << "," << force_air_vector_BODYframe[1] << ","
            << force_air_vector_BODYframe[2] << "," << force_thrust_vector[0] << ","
            << force_thrust_vector[1] << "," << force_thrust_vector[2] << ","
            << rad2deg(gimbal_angle_pitch) << "," << rad2deg(gimbal_angle_yaw) << ","
            << wind_speed << "," << wind_direction << ","
            << downrange << "," << posLLH_IIP_[0] << "," << posLLH_IIP_[1] << ","
            << dcmBODY2ECI_(0, 0) << "," << dcmBODY2ECI_(0, 1) << "," << dcmBODY2ECI_(0, 2) << ","
            << dcmBODY2ECI_(1, 0) << "," << dcmBODY2ECI_(1, 1) << "," << dcmBODY2ECI_(1, 2) << ","
            << dcmBODY2ECI_(2, 0) << "," << dcmBODY2ECI_(2, 1) << "," << dcmBODY2ECI_(2, 2) << ","
            << int(velECI_.norm()) << "," << kinematic_energy << ","
            << loss_gravity << "," << loss_aerodynamics << "," << loss_thrust << ","
            << is_powered << "," << is_separated 
            << endl;
    }
    flag_duplicate = false;

    if ((int)t % 10 == 0 && (int)(t*10) % 10 == 0 ){ // progress
       progress(t);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x478, %rsp            # imm = 0x478
movq %rdi, %rbx
leaq 0x9c0(%rdi), %rax
leaq 0xa0(%rsp), %rdi
movq %rax, 0x8(%rsp)
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movsd %xmm0, 0x10(%rsp)
movq %rsi, %r12
pushq $0x1
popq %r15
movq %r15, 0x10(%rdi)
movq %r15, 0x18(%rdi)
movsd 0x8(%rsi), %xmm0
movsd %xmm0, 0x9c0(%rbx)
addq $0x10, %rsi
callq 0xfd60
leaq 0x18(%r12), %rsi
movq %rax, %rdi
callq 0xfd60
leaq 0xa0(%rsp), %r14
movq %r14, %rdi
callq 0xfe08
leaq 0x9d8(%rbx), %rax
movq %rax, 0x28(%rsp)
movq %rax, (%r14)
andq $0x0, 0x8(%r14)
movq %r15, 0x10(%r14)
movq %r15, 0x18(%r14)
movsd 0x20(%r12), %xmm0
movsd %xmm0, 0x9d8(%rbx)
leaq 0x28(%r12), %rsi
leaq 0xa0(%rsp), %rdi
callq 0xfd60
leaq 0x30(%r12), %rsi
movq %rax, %rdi
callq 0xfd60
movq %r12, 0x20(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0xfe08
leaq 0xa0(%rsp), %r14
movq %r14, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x1cb1c
leaq 0xa20(%rbx), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x151a4
leaq 0x430(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x152a2
leaq 0x2b0(%rsp), %r13
movq %r13, %rdi
movq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0x129c6
leaq 0xa0(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x1cc47
leaq 0xa68(%rbx), %r14
movq %rbp, %rdi
movq %r14, %rsi
callq 0x15314
leaq 0x298(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x129c6
leaq 0xa0(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x1ccf4
leaq 0xa80(%rbx), %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0x15314
movsd 0xa90(%rbx), %xmm1
movq %rbx, %rdi
movsd 0x10(%rsp), %xmm0
callq 0xcbf2
leaq 0x280(%rsp), %r14
movq %r14, %rdi
movq %r13, 0x40(%rsp)
movq %r13, %rsi
callq 0x129c6
leaq 0xa0(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x1ce81
leaq 0xa98(%rbx), %r14
movq %r13, %rdi
movq %r14, %rsi
callq 0x151a4
movq %r14, (%r13)
leaq 0xae0(%rbx), %rdi
leaq 0xa0(%rsp), %rsi
movq %rdi, 0x38(%rsp)
callq 0x1536a
leaq 0x3e8(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x152a2
leaq 0x3a0(%rsp), %r14
movq %r14, %rdi
movq %r12, 0x50(%rsp)
movq %r12, %rsi
callq 0x152a2
leaq 0xa0(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x1d085
leaq 0xb28(%rbx), %rbp
movq %r12, %rdi
movq %rbp, %rsi
callq 0x151a4
movq %rbp, (%r12)
leaq 0xb70(%rbx), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x1536a
leaq 0x340(%rbx), %rsi
leaq 0x268(%rsp), %r14
movq %r14, %rdi
movq %rsi, 0x30(%rsp)
callq 0x129c6
leaq 0xa0(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x1ce81
leaq 0xd68(%rbx), %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x151a4
leaq 0x358(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x152a2
leaq 0x310(%rsp), %r14
xorps %xmm0, %xmm0
movq %r14, %rdi
callq 0x1cb1c
leaq 0xa0(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x1d085
leaq 0xdb0(%rbx), %rsi
movq %r13, %rdi
callq 0x151a4
leaq 0x2c8(%rsp), %r14
movq %r14, %rdi
movq %rbp, 0x48(%rsp)
movq %rbp, %rsi
callq 0x152a2
leaq 0x250(%rsp), %r12
movq %r12, %rdi
movq 0x28(%rsp), %rsi
callq 0x129c6
leaq 0x238(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x129c6
leaq 0xa0(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %r13, %rcx
callq 0x1d0b2
leaq 0xbb8(%rbx), %r14
movq %rbp, %rdi
movq %r14, %rsi
callq 0x15314
movsd 0x918(%rbx), %xmm0
movsd 0x920(%rbx), %xmm1
leaq 0xa0(%rsp), %r12
movq %r12, %rdi
callq 0x1d218
leaq 0xbd0(%rbx), %rsi
movq %r12, %rdi
callq 0x15314
leaq 0x7f8(%rbx), %r13
cmpb $0x1, 0x290(%rbx)
jne 0xed6e
movsd 0xa90(%rbx), %xmm0
movsd %xmm0, 0x18(%rsp)
leaq 0x2b8(%rbx), %rsi
leaq 0x88(%rsp), %r12
movq %r12, %rdi
callq 0x643a
leaq 0xa0(%rsp), %rdi
movq %r13, %rsi
movsd 0x18(%rsp), %xmm0
movq %r12, %rdx
callq 0x5e24
leaq 0xa0(%rsp), %rsi
movl $0x120, %edx            # imm = 0x120
movq %r13, %rdi
callq 0x52f0
movq 0x88(%rsp), %rdi
callq 0x5430
jmp 0xeda1
movsd 0xa90(%rbx), %xmm0
movsd 0x270(%rbx), %xmm1
leaq 0xa0(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x5ba8
movl $0x120, %edx            # imm = 0x120
movq %r13, %rdi
movq %r12, %rsi
callq 0x52f0
pushq $0x1
popq %r15
movq %r14, %r13
leaq 0x220(%rsp), %r12
movq %r12, %rdi
movq 0x8(%rsp), %rsi
callq 0x129c6
leaq 0xa0(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
callq 0x1be7c
leaq 0xe58(%rbx), %r12
movq %rbp, %rdi
movq %r12, %rsi
callq 0x15314
cmpb $0x1, 0x254(%rbx)
jne 0xee26
movl 0x278(%rbx), %eax
cmpq $0x3, %rax
movsd 0x10(%rsp), %xmm0
movq 0x20(%rsp), %r14
ja 0xeefa
leaq 0x11283(%rip), %rcx     # 0x20090
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd3d2
jmp 0xef55
movl 0x27c(%rbx), %eax
cmpl $0x2, %eax
movsd 0x10(%rsp), %xmm0
movq 0x20(%rsp), %r14
je 0xee65
cmpl $0x1, %eax
je 0xee55
testl %eax, %eax
jne 0xee72
movq %rbx, %rdi
movq %r14, %rsi
callq 0xdb4a
jmp 0xef55
movq %rbx, %rdi
movq %r14, %rsi
callq 0xdeda
jmp 0xef55
movq %rbx, %rdi
callq 0xe310
jmp 0xef55
andq $0x0, 0x790(%rbx)
leaq 0x9f0(%rbx), %rax
leaq 0xa0(%rsp), %rdi
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %r15, 0x10(%rdi)
movq %r15, 0x18(%rdi)
andq $0x0, 0x9f0(%rbx)
leaq 0x58(%rsp), %rsi
andq $0x0, (%rsi)
callq 0xfd60
leaq 0x70(%rsp), %rsi
andq $0x0, (%rsi)
movq %rax, %rdi
callq 0xfd60
jmp 0xef48
leaq 0x230(%rbx), %rdi
leaq 0x11be8(%rip), %rsi     # 0x20abb
jmp 0xeef3
leaq 0x230(%rbx), %rdi
leaq 0x11be3(%rip), %rsi     # 0x20ac6
jmp 0xeef3
leaq 0x230(%rbx), %rdi
leaq 0x11bb7(%rip), %rsi     # 0x20aaa
callq 0x56a0
jmp 0xef55
andq $0x0, 0x790(%rbx)
leaq 0x9f0(%rbx), %rax
leaq 0xa0(%rsp), %rdi
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %r15, 0x10(%rdi)
movq %r15, 0x18(%rdi)
andq $0x0, 0x9f0(%rbx)
leaq 0x58(%rsp), %rsi
andq $0x0, (%rsi)
callq 0xfd60
leaq 0x70(%rsp), %rsi
andq $0x0, (%rsi)
movq %rax, %rdi
callq 0xfd60
leaq 0xa0(%rsp), %rdi
callq 0xfe08
leaq 0xcd8(%rbx), %rax
leaq 0x9f0(%rbx), %rcx
leaq 0x58(%rsp), %rsi
movq %rcx, (%rsi)
movq %r12, 0x8(%rsi)
leaq 0xa8(%rsp), %rdi
movq %rax, -0x8(%rdi)
callq 0x15cd4
leaq 0xa08(%rbx), %rdi
movq %r12, 0x18(%rsp)
leaq 0xa0(%rsp), %r12
movq %r12, %rsi
callq 0x15e2c
leaq 0x208(%rsp), %rbp
movq %rbp, %rdi
movq 0x30(%rsp), %rsi
callq 0x129c6
leaq 0x1f0(%rsp), %r14
movq %r14, %rdi
movq 0x40(%rsp), %rsi
callq 0x129c6
movq %rbp, %rdi
movq %r14, %rsi
callq 0x1dd52
movsd %xmm0, 0xe88(%rbx)
movq 0x50(%rsp), %rax
movq %rax, (%r12)
movq 0x8(%rsp), %rax
movq %rax, 0x8(%r12)
leaq 0xa0(%rsp), %r14
movq %r14, %rdi
callq 0x10d8a
leaq 0x58(%rsp), %r12
movq %r12, %rdi
movq %rax, %rsi
callq 0x129c6
movq 0x38(%rsp), %rax
movq %rax, (%r14)
movq %r13, 0x8(%r14)
leaq 0xa0(%rsp), %rdi
callq 0x10d8a
leaq 0x70(%rsp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x129c6
leaq 0x1d8(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
callq 0x129c6
leaq 0x1c0(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x129c6
leaq 0xa0(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x1ddf4
leaq 0xe70(%rbx), %rsi
movq %r12, %rdi
callq 0x15314
movq 0x20(%rsp), %r15
movsd (%r15), %xmm0
mulsd 0x10da6(%rip), %xmm0    # 0x1fe38
movsd %xmm0, 0x8(%rsp)
movq %r13, %rdi
callq 0x10c94
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r13, %rdi
callq 0x10c94
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x960(%rbx)
movq 0x48(%rsp), %rax
movq %rax, (%r12)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%r12)
leaq 0xe40(%rbx), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x15e70
movsd 0x760(%rbx), %xmm2
ucomisd 0x10d47(%rip), %xmm2    # 0x1fe40
ja 0xf108
xorpd %xmm0, %xmm0
cmpb $0x0, 0x255(%rbx)
jne 0xf15e
movsd 0xbb8(%rbx), %xmm0
movsd 0xbc0(%rbx), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm1
movsd 0xbc8(%rbx), %xmm0
xorpd 0xfed8(%rip), %xmm0     # 0x1f010
callq 0x5090
movsd 0xe50(%rbx), %xmm1
movsd %xmm1, 0x8(%rsp)
callq 0x50e0
mulsd 0x8(%rsp), %xmm0
movsd 0x760(%rbx), %xmm2
movsd %xmm0, 0x998(%rbx)
xorpd %xmm1, %xmm1
ucomisd 0x10cce(%rip), %xmm2    # 0x1fe40
xorpd %xmm2, %xmm2
jbe 0xf18d
movsd 0x908(%rbx), %xmm2
mulsd 0x798(%rbx), %xmm2
divsd (%r15), %xmm2
movsd %xmm2, 0x9a8(%rbx)
movsd 0x7e0(%rbx), %xmm3
divsd (%r15), %xmm3
movsd %xmm3, 0x9a0(%rbx)
addsd %xmm0, %xmm3
addsd %xmm2, %xmm3
movsd %xmm3, 0x9b8(%rbx)
movsd 0xa90(%rbx), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xf8aa
cmpb $0x0, 0x2030d(%rip)     # 0x2f4e0
jne 0xf8aa
leaq 0xec0(%rbx), %r14
movq %r14, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x5570
leaq 0x11925(%rip), %r12     # 0x20b1a
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd (%r15), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0x760(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movq 0xec0(%rbx), %rax
movq -0x18(%rax), %rax
movq $0x8, 0xec8(%rbx,%rax)
movsd 0xa80(%rbx), %xmm0
movq %r14, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xa88(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xa90(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0x8(%r15), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0x10(%r15), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0x18(%r15), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0x20(%r15), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0x28(%r15), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0x30(%r15), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xbb8(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xbc0(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xbc8(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0x9f0(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0x9f8(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xa00(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xa08(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xa10(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xa18(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0x780(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0x958(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0x928(%rbx), %xmm0
mulsd 0x10996(%rip), %xmm0    # 0x1fe00
divsd 0x10996(%rip), %xmm0    # 0x1fe08
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0x930(%rbx), %xmm0
mulsd 0x1096b(%rip), %xmm0    # 0x1fe00
divsd 0x1096b(%rip), %xmm0    # 0x1fe08
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0x938(%rbx), %xmm0
mulsd 0x10940(%rip), %xmm0    # 0x1fe00
divsd 0x10940(%rip), %xmm0    # 0x1fe08
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xc30(%rbx), %xmm0
mulsd 0x10915(%rip), %xmm0    # 0x1fe00
divsd 0x10915(%rip), %xmm0    # 0x1fe08
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xc38(%rbx), %xmm0
mulsd 0x108ea(%rip), %xmm0    # 0x1fe00
divsd 0x108ea(%rip), %xmm0    # 0x1fe08
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xc40(%rbx), %xmm0
mulsd 0x108bf(%rip), %xmm0    # 0x1fe00
divsd 0x108bf(%rip), %xmm0    # 0x1fe08
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0x7d8(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xdf8(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xe00(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xe08(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xe28(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xe30(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xe38(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0x968(%rbx), %xmm0
mulsd 0x107d7(%rip), %xmm0    # 0x1fe00
divsd 0x107d7(%rip), %xmm0    # 0x1fe08
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0x107b4(%rip), %xmm0    # 0x1fe00
mulsd 0x970(%rbx), %xmm0
divsd 0x107ac(%rip), %xmm0    # 0x1fe08
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0x918(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0x920(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xe88(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xe70(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xe78(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xd20(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xd38(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xd50(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xd28(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xd40(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xd58(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xd30(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xd48(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0xd60(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movq %rax, %r14
movq 0x28(%rsp), %rdi
callq 0x10c94
cvttsd2si %xmm0, %esi
movq %r14, %rdi
callq 0x5620
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0x960(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0x998(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0x9a0(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movsd 0x9a8(%rbx), %xmm0
movq %rax, %rdi
callq 0x5570
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movzbl 0x254(%rbx), %esi
movq %rax, %rdi
callq 0x55c0
movq %rax, %rdi
movq %r12, %rsi
callq 0x5370
movzbl 0x255(%rbx), %esi
movq %rax, %rdi
callq 0x55c0
movq %rax, %rdi
callq 0x51b0
movb $0x0, 0x1fc2f(%rip)     # 0x2f4e0
movsd 0x10(%rsp), %xmm0
cvttsd2si %xmm0, %eax
pushq $0xa
popq %rcx
cltd
idivl %ecx
testl %edx, %edx
jne 0xf8e4
movsd 0x1057b(%rip), %xmm1    # 0x1fe48
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
cltd
idivl %ecx
testl %edx, %edx
jne 0xf8e4
movq %rbx, %rdi
callq 0xe8da
addq $0x478, %rsp            # imm = 0x478
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf912
jmp 0xf912
jmp 0xf912
jmp 0xf912
movq %rax, %rbx
movq 0x88(%rsp), %rdi
callq 0x5430
jmp 0xf922
jmp 0xf912
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0xfe08
movq %rbx, %rdi
callq 0x5640