// File: 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
movq %rsp, %rbp
subq $0xb40, %rsp            # imm = 0xB40
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x918(%rbp)
addq $0x9c0, %rax            # imm = 0x9C0
movq %rax, -0x910(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x20340
movq -0x910(%rbp), %rsi
movq %rax, %rdx
leaq -0x38(%rbp), %rdi
movq %rdi, -0x908(%rbp)
callq 0x1e1e0
movq -0x10(%rbp), %rdi
movl $0x2, %esi
callq 0x20340
movq -0x908(%rbp), %rdi
movq %rax, %rsi
callq 0x1e220
movq %rax, -0x900(%rbp)
jmp 0x1bb3e
movq -0x10(%rbp), %rdi
movl $0x3, %esi
callq 0x20340
movq -0x900(%rbp), %rdi
movq %rax, %rsi
callq 0x1e220
jmp 0x1bb5d
leaq -0x38(%rbp), %rdi
callq 0x1e390
movq -0x918(%rbp), %rax
addq $0x9d8, %rax            # imm = 0x9D8
movq %rax, -0x930(%rbp)
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x20340
movq -0x930(%rbp), %rsi
movq %rax, %rdx
leaq -0x68(%rbp), %rdi
movq %rdi, -0x928(%rbp)
callq 0x1e1e0
movq -0x10(%rbp), %rdi
movl $0x5, %esi
callq 0x20340
movq -0x928(%rbp), %rdi
movq %rax, %rsi
callq 0x1e220
movq %rax, -0x920(%rbp)
jmp 0x1bbc8
movq -0x10(%rbp), %rdi
movl $0x6, %esi
callq 0x20340
movq -0x920(%rbp), %rdi
movq %rax, %rsi
callq 0x1e220
jmp 0x1bbe7
leaq -0x68(%rbp), %rdi
callq 0x1e390
movsd -0x18(%rbp), %xmm0
leaq -0xb0(%rbp), %rdi
callq 0x4ab30
movq -0x918(%rbp), %rdi
addq $0xa20, %rdi            # imm = 0xA20
leaq -0xb0(%rbp), %rsi
callq 0x20370
movq -0x918(%rbp), %rsi
addq $0xa20, %rsi            # imm = 0xA20
leaq -0x110(%rbp), %rdi
callq 0x203a0
movq -0x918(%rbp), %rsi
addq $0x9c0, %rsi            # imm = 0x9C0
leaq -0x128(%rbp), %rdi
callq 0x1f0e0
leaq -0xc8(%rbp), %rdi
leaq -0x110(%rbp), %rsi
leaq -0x128(%rbp), %rdx
callq 0x4ad20
movq -0x918(%rbp), %rdi
addq $0xa68, %rdi            # imm = 0xA68
leaq -0xc8(%rbp), %rsi
callq 0x20420
movq -0x918(%rbp), %rsi
addq $0xa68, %rsi            # imm = 0xA68
leaq -0x158(%rbp), %rdi
callq 0x1f0e0
leaq -0x140(%rbp), %rdi
leaq -0x158(%rbp), %rsi
callq 0x4ae10
movq -0x918(%rbp), %rdi
addq $0xa80, %rdi            # imm = 0xA80
leaq -0x140(%rbp), %rsi
callq 0x20420
movq -0x918(%rbp), %rdi
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x938(%rbp)
addq $0xa80, %rdi            # imm = 0xA80
movl $0x2, %esi
callq 0x1de40
movsd -0x938(%rbp), %xmm0
movq -0x918(%rbp), %rdi
movsd (%rax), %xmm1
callq 0x18850
movq -0x918(%rbp), %rsi
addq $0xa80, %rsi            # imm = 0xA80
leaq -0x1b8(%rbp), %rdi
callq 0x1f0e0
leaq -0x1a0(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x4b180
movq -0x918(%rbp), %rdi
addq $0xa98, %rdi            # imm = 0xA98
leaq -0x1a0(%rbp), %rsi
callq 0x20370
movq -0x918(%rbp), %rdi
addq $0xa98, %rdi            # imm = 0xA98
callq 0x20450
movq -0x918(%rbp), %rdi
movq %rax, -0x1c0(%rbp)
addq $0xae0, %rdi            # imm = 0xAE0
leaq -0x1c0(%rbp), %rsi
callq 0x20480
movq -0x918(%rbp), %rsi
addq $0xa98, %rsi            # imm = 0xA98
leaq -0x250(%rbp), %rdi
callq 0x203a0
movq -0x918(%rbp), %rsi
addq $0xa20, %rsi            # imm = 0xA20
leaq -0x298(%rbp), %rdi
callq 0x203a0
leaq -0x208(%rbp), %rdi
leaq -0x250(%rbp), %rsi
leaq -0x298(%rbp), %rdx
callq 0x4b460
movq -0x918(%rbp), %rdi
addq $0xb28, %rdi            # imm = 0xB28
leaq -0x208(%rbp), %rsi
callq 0x20370
movq -0x918(%rbp), %rdi
addq $0xb28, %rdi            # imm = 0xB28
callq 0x20450
movq -0x918(%rbp), %rdi
movq %rax, -0x2a0(%rbp)
addq $0xb70, %rdi            # imm = 0xB70
leaq -0x2a0(%rbp), %rsi
callq 0x20480
movq -0x918(%rbp), %rsi
addq $0x340, %rsi            # imm = 0x340
leaq -0x300(%rbp), %rdi
callq 0x1f0e0
leaq -0x2e8(%rbp), %rdi
leaq -0x300(%rbp), %rsi
callq 0x4b180
movq -0x918(%rbp), %rdi
addq $0xd68, %rdi            # imm = 0xD68
leaq -0x2e8(%rbp), %rsi
callq 0x20370
movq -0x918(%rbp), %rsi
addq $0xd68, %rsi            # imm = 0xD68
leaq -0x390(%rbp), %rdi
callq 0x203a0
leaq -0x3d8(%rbp), %rdi
xorps %xmm0, %xmm0
callq 0x4ab30
leaq -0x348(%rbp), %rdi
leaq -0x390(%rbp), %rsi
leaq -0x3d8(%rbp), %rdx
callq 0x4b460
movq -0x918(%rbp), %rdi
addq $0xdb0, %rdi            # imm = 0xDB0
leaq -0x348(%rbp), %rsi
callq 0x20370
movq -0x918(%rbp), %rsi
addq $0xb28, %rsi            # imm = 0xB28
leaq -0x438(%rbp), %rdi
callq 0x203a0
movq -0x918(%rbp), %rsi
addq $0x9d8, %rsi            # imm = 0x9D8
leaq -0x450(%rbp), %rdi
callq 0x1f0e0
movq -0x918(%rbp), %rsi
addq $0x9c0, %rsi            # imm = 0x9C0
leaq -0x468(%rbp), %rdi
callq 0x1f0e0
leaq -0x3f0(%rbp), %rdi
leaq -0x438(%rbp), %rsi
leaq -0x450(%rbp), %rdx
leaq -0x468(%rbp), %rcx
callq 0x4b4b0
movq -0x918(%rbp), %rdi
addq $0xbb8, %rdi            # imm = 0xBB8
leaq -0x3f0(%rbp), %rsi
callq 0x20420
movq -0x918(%rbp), %rax
movsd 0x918(%rax), %xmm0
movsd 0x920(%rax), %xmm1
leaq -0x480(%rbp), %rdi
callq 0x4b720
movq -0x918(%rbp), %rdi
addq $0xbd0, %rdi            # imm = 0xBD0
leaq -0x480(%rbp), %rsi
callq 0x20420
movq -0x918(%rbp), %rax
testb $0x1, 0x290(%rax)
je 0x1c096
movq -0x918(%rbp), %rdi
movq %rdi, %rax
addq $0x7f8, %rax            # imm = 0x7F8
movq %rax, -0x950(%rbp)
addq $0xa80, %rdi            # imm = 0xA80
movl $0x2, %esi
callq 0x1de40
movq -0x918(%rbp), %rsi
movsd (%rax), %xmm0
movsd %xmm0, -0x948(%rbp)
addq $0x2b8, %rsi            # imm = 0x2B8
leaq -0x5b8(%rbp), %rdi
movq %rdi, -0x940(%rbp)
callq 0x8170
movq -0x950(%rbp), %rsi
movsd -0x948(%rbp), %xmm0
movq -0x940(%rbp), %rdx
leaq -0x5a0(%rbp), %rdi
callq 0x7840
jmp 0x1c015
movq -0x918(%rbp), %rdi
addq $0x7f8, %rdi            # imm = 0x7F8
leaq -0x5a0(%rbp), %rsi
movl $0x120, %edx            # imm = 0x120
callq 0x63b0
leaq -0x5b8(%rbp), %rdi
callq 0x8220
jmp 0x1c106
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x1e390
jmp 0x1d608
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x1e390
jmp 0x1d608
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x5b8(%rbp), %rdi
callq 0x8220
jmp 0x1d608
movq -0x918(%rbp), %rdi
movq %rdi, %rax
addq $0x7f8, %rax            # imm = 0x7F8
movq %rax, -0x958(%rbp)
addq $0xa80, %rdi            # imm = 0xA80
movl $0x2, %esi
callq 0x1de40
movq -0x958(%rbp), %rsi
movq %rax, %rcx
movq -0x918(%rbp), %rax
movsd (%rcx), %xmm0
movsd 0x270(%rax), %xmm1
leaq -0x6d8(%rbp), %rdi
callq 0x7190
movq -0x918(%rbp), %rdi
addq $0x7f8, %rdi            # imm = 0x7F8
leaq -0x6d8(%rbp), %rsi
movl $0x120, %edx            # imm = 0x120
callq 0x63b0
movq -0x918(%rbp), %rsi
addq $0x9c0, %rsi            # imm = 0x9C0
leaq -0x708(%rbp), %rdi
callq 0x1f0e0
leaq -0x6f0(%rbp), %rdi
leaq -0x708(%rbp), %rsi
callq 0x48a70
movq -0x918(%rbp), %rdi
addq $0xe58, %rdi            # imm = 0xE58
leaq -0x6f0(%rbp), %rsi
callq 0x20420
movq -0x918(%rbp), %rax
testb $0x1, 0x254(%rax)
je 0x1c2af
movq -0x918(%rbp), %rax
movl 0x278(%rax), %eax
movq %rax, -0x960(%rbp)
subq $0x3, %rax
ja 0x1c1fa
movq -0x960(%rbp), %rax
leaq 0x36ed7(%rip), %rcx     # 0x53060
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x918(%rbp), %rdi
movq -0x10(%rbp), %rsi
movsd -0x18(%rbp), %xmm0
callq 0x19440
jmp 0x1c2aa
movq -0x918(%rbp), %rdi
movq -0x10(%rbp), %rsi
movsd -0x18(%rbp), %xmm0
callq 0x1a230
jmp 0x1c2aa
movq -0x918(%rbp), %rdi
movq -0x10(%rbp), %rsi
movsd -0x18(%rbp), %xmm0
callq 0x1a270
jmp 0x1c2aa
movq -0x918(%rbp), %rdi
movq -0x10(%rbp), %rsi
movsd -0x18(%rbp), %xmm0
callq 0x1a2b0
jmp 0x1c2aa
movq -0x918(%rbp), %rsi
movq $0x0, 0x790(%rsi)
addq $0x9f0, %rsi            # imm = 0x9F0
movq $0x0, -0x730(%rbp)
leaq -0x728(%rbp), %rdi
movq %rdi, -0x970(%rbp)
leaq -0x730(%rbp), %rdx
callq 0x1e1e0
movq -0x970(%rbp), %rdi
movq $0x0, -0x738(%rbp)
leaq -0x738(%rbp), %rsi
callq 0x1e220
movq %rax, -0x968(%rbp)
jmp 0x1c25f
movq -0x968(%rbp), %rdi
movq $0x0, -0x740(%rbp)
leaq -0x740(%rbp), %rsi
callq 0x1e220
jmp 0x1c27f
leaq -0x728(%rbp), %rdi
callq 0x1e390
jmp 0x1c2aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x728(%rbp), %rdi
callq 0x1e390
jmp 0x1d608
jmp 0x1c3e2
movq -0x918(%rbp), %rax
movl 0x27c(%rax), %eax
movl %eax, -0x974(%rbp)
testl %eax, %eax
je 0x1c2e2
jmp 0x1c2c8
movl -0x974(%rbp), %eax
subl $0x1, %eax
je 0x1c2fc
jmp 0x1c2d5
movl -0x974(%rbp), %eax
subl $0x2, %eax
je 0x1c316
jmp 0x1c330
movq -0x918(%rbp), %rdi
movq -0x10(%rbp), %rsi
movsd -0x18(%rbp), %xmm0
callq 0x1a2f0
jmp 0x1c3e0
movq -0x918(%rbp), %rdi
movq -0x10(%rbp), %rsi
movsd -0x18(%rbp), %xmm0
callq 0x1a930
jmp 0x1c3e0
movq -0x918(%rbp), %rdi
movq -0x10(%rbp), %rsi
movsd -0x18(%rbp), %xmm0
callq 0x1b080
jmp 0x1c3e0
movq -0x918(%rbp), %rsi
movq $0x0, 0x790(%rsi)
addq $0x9f0, %rsi            # imm = 0x9F0
movq $0x0, -0x768(%rbp)
leaq -0x760(%rbp), %rdi
movq %rdi, -0x988(%rbp)
leaq -0x768(%rbp), %rdx
callq 0x1e1e0
movq -0x988(%rbp), %rdi
movq $0x0, -0x770(%rbp)
leaq -0x770(%rbp), %rsi
callq 0x1e220
movq %rax, -0x980(%rbp)
jmp 0x1c395
movq -0x980(%rbp), %rdi
movq $0x0, -0x778(%rbp)
leaq -0x778(%rbp), %rsi
callq 0x1e220
jmp 0x1c3b5
leaq -0x760(%rbp), %rdi
callq 0x1e390
jmp 0x1c3e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x760(%rbp), %rdi
callq 0x1e390
jmp 0x1d608
jmp 0x1c3e2
movq -0x918(%rbp), %rdx
movq %rdx, %rax
addq $0xcd8, %rax            # imm = 0xCD8
movq %rax, -0x9a0(%rbp)
movq %rdx, %rsi
addq $0x9f0, %rsi            # imm = 0x9F0
addq $0xe58, %rdx            # imm = 0xE58
leaq -0x7c8(%rbp), %rdi
callq 0x20e20
movq -0x9a0(%rbp), %rsi
leaq -0x7b0(%rbp), %rdi
leaq -0x7c8(%rbp), %rdx
callq 0x21000
movq -0x918(%rbp), %rdi
addq $0xa08, %rdi            # imm = 0xA08
leaq -0x7b0(%rbp), %rsi
callq 0x21050
movq -0x918(%rbp), %rsi
addq $0x340, %rsi            # imm = 0x340
leaq -0x7e0(%rbp), %rdi
callq 0x1f0e0
movq -0x918(%rbp), %rsi
addq $0xa80, %rsi            # imm = 0xA80
leaq -0x7f8(%rbp), %rdi
callq 0x1f0e0
leaq -0x7e0(%rbp), %rdi
leaq -0x7f8(%rbp), %rsi
callq 0x4cb80
movq -0x918(%rbp), %rdx
movsd %xmm0, 0xe88(%rdx)
movq %rdx, %rsi
addq $0xa20, %rsi            # imm = 0xA20
addq $0x9c0, %rdx            # imm = 0x9C0
leaq -0x838(%rbp), %rdi
callq 0x20520
leaq -0x838(%rbp), %rdi
callq 0x21080
movq %rax, %rsi
leaq -0x810(%rbp), %rdi
callq 0x1f0e0
movq -0x918(%rbp), %rdx
movq %rdx, %rsi
addq $0xae0, %rsi            # imm = 0xAE0
addq $0xbb8, %rdx            # imm = 0xBB8
leaq -0x878(%rbp), %rdi
callq 0x20520
leaq -0x878(%rbp), %rdi
callq 0x21080
movq %rax, %rsi
leaq -0x850(%rbp), %rdi
callq 0x1f0e0
leaq -0x8a8(%rbp), %rdi
leaq -0x810(%rbp), %rsi
callq 0x1f0e0
leaq -0x8c0(%rbp), %rdi
leaq -0x850(%rbp), %rsi
callq 0x1f0e0
leaq -0x890(%rbp), %rdi
leaq -0x8a8(%rbp), %rsi
leaq -0x8c0(%rbp), %rdx
callq 0x4cc50
movq -0x918(%rbp), %rdi
addq $0xe70, %rdi            # imm = 0xE70
leaq -0x890(%rbp), %rsi
callq 0x20420
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x20340
movq -0x918(%rbp), %rdi
movsd 0x368d3(%rip), %xmm0    # 0x52e60
mulsd (%rax), %xmm0
movsd %xmm0, -0x998(%rbp)
addq $0xbb8, %rdi            # imm = 0xBB8
callq 0x205d0
movq -0x918(%rbp), %rdi
movaps %xmm0, %xmm1
movsd -0x998(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x990(%rbp)
addq $0xbb8, %rdi            # imm = 0xBB8
callq 0x205d0
movq -0x918(%rbp), %rdx
movaps %xmm0, %xmm1
movsd -0x990(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x960(%rdx)
movq %rdx, %rsi
addq $0xb28, %rsi            # imm = 0xB28
addq $0xe58, %rdx            # imm = 0xE58
leaq -0x8e8(%rbp), %rdi
callq 0x20520
movq -0x918(%rbp), %rdi
addq $0xe40, %rdi            # imm = 0xE40
leaq -0x8e8(%rbp), %rsi
callq 0x210b0
movq -0x918(%rbp), %rax
movsd 0x760(%rax), %xmm0
movsd 0x3684d(%rip), %xmm1    # 0x52e88
ucomisd %xmm1, %xmm0
ja 0x1c65c
movq -0x918(%rbp), %rax
movb 0x255(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1c7a8
movq -0x918(%rbp), %rdi
addq $0xbb8, %rdi            # imm = 0xBB8
xorl %eax, %eax
movl %eax, %esi
callq 0x1de40
movq -0x918(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x9b8(%rbp)
addq $0xbb8, %rdi            # imm = 0xBB8
xorl %eax, %eax
movl %eax, %esi
callq 0x1de40
movq -0x918(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x9b0(%rbp)
addq $0xbb8, %rdi            # imm = 0xBB8
movl $0x1, %esi
callq 0x1de40
movq -0x918(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x9c0(%rbp)
addq $0xbb8, %rdi            # imm = 0xBB8
movl $0x1, %esi
callq 0x1de40
movsd -0x9c0(%rbp), %xmm1
movsd -0x9b8(%rbp), %xmm0
movsd -0x9b0(%rbp), %xmm2
mulsd (%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x6390
movq -0x918(%rbp), %rdi
movsd %xmm0, -0x8f0(%rbp)
addq $0xbb8, %rdi            # imm = 0xBB8
movl $0x2, %esi
callq 0x1de40
movsd (%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd -0x8f0(%rbp), %xmm1
callq 0x60c0
movq -0x918(%rbp), %rdi
movsd %xmm0, -0x8f8(%rbp)
addq $0xe40, %rdi            # imm = 0xE40
movl $0x2, %esi
callq 0x1de40
movsd (%rax), %xmm0
movsd %xmm0, -0x9a8(%rbp)
movsd -0x8f8(%rbp), %xmm0
callq 0x6120
movq -0x918(%rbp), %rax
movaps %xmm0, %xmm1
movsd -0x9a8(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x998(%rax)
jmp 0x1c7ba
movq -0x918(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x998(%rax)
movq -0x918(%rbp), %rax
movsd 0x760(%rax), %xmm0
movsd 0x366b7(%rip), %xmm1    # 0x52e88
ucomisd %xmm1, %xmm0
jbe 0x1c823
movq -0x918(%rbp), %rax
movsd 0x908(%rax), %xmm0
mulsd 0x798(%rax), %xmm0
movsd %xmm0, -0x9c8(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x20340
movsd -0x9c8(%rbp), %xmm0
movq %rax, %rcx
movq -0x918(%rbp), %rax
divsd (%rcx), %xmm0
movsd %xmm0, 0x9a8(%rax)
jmp 0x1c835
movq -0x918(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x9a8(%rax)
movq -0x918(%rbp), %rax
movsd 0x7e0(%rax), %xmm0
movsd %xmm0, -0x9d0(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x20340
movsd -0x9d0(%rbp), %xmm0
movq -0x918(%rbp), %rdi
divsd (%rax), %xmm0
movsd %xmm0, 0x9a0(%rdi)
movsd 0x998(%rdi), %xmm0
addsd 0x9a0(%rdi), %xmm0
addsd 0x9a8(%rdi), %xmm0
movsd %xmm0, 0x9b8(%rdi)
addq $0xa80, %rdi            # imm = 0xA80
movl $0x2, %esi
callq 0x1de40
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x1d5b7
testb $0x1, 0x5cd63(%rip)     # 0x79620
jne 0x1d5b7
movq -0x918(%rbp), %rdi
addq $0xec0, %rdi            # imm = 0xEC0
movsd -0x18(%rbp), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x373c5(%rip), %rsi     # 0x53caa
callq 0x6460
movq %rax, -0xb38(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x20340
movq -0xb38(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x37392(%rip), %rsi     # 0x53caa
callq 0x6460
movq %rax, %rdi
movq -0x918(%rbp), %rax
movsd 0x760(%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x3736c(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rax
movq %rax, %rdi
addq $0xec0, %rdi            # imm = 0xEC0
movq 0xec0(%rax), %rax
addq -0x18(%rax), %rdi
movl $0x8, %esi
callq 0x210e0
movq -0x918(%rbp), %rdi
movq %rdi, %rax
addq $0xec0, %rax            # imm = 0xEC0
movq %rax, -0xb30(%rbp)
addq $0xa80, %rdi            # imm = 0xA80
xorl %eax, %eax
movl %eax, %esi
callq 0x1de40
movq -0xb30(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x37300(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xb28(%rbp)
addq $0xa80, %rdi            # imm = 0xA80
movl $0x1, %esi
callq 0x1de40
movq -0xb28(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x372c2(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xb20(%rbp)
addq $0xa80, %rdi            # imm = 0xA80
movl $0x2, %esi
callq 0x1de40
movq -0xb20(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x37284(%rip), %rsi     # 0x53caa
callq 0x6460
movq %rax, -0xb18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x20340
movq -0xb18(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x37250(%rip), %rsi     # 0x53caa
callq 0x6460
movq %rax, -0xb10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x2, %esi
callq 0x20340
movq -0xb10(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x3721c(%rip), %rsi     # 0x53caa
callq 0x6460
movq %rax, -0xb08(%rbp)
movq -0x10(%rbp), %rdi
movl $0x3, %esi
callq 0x20340
movq -0xb08(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x371e8(%rip), %rsi     # 0x53caa
callq 0x6460
movq %rax, -0xb00(%rbp)
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x20340
movq -0xb00(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x371b4(%rip), %rsi     # 0x53caa
callq 0x6460
movq %rax, -0xaf8(%rbp)
movq -0x10(%rbp), %rdi
movl $0x5, %esi
callq 0x20340
movq -0xaf8(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x37180(%rip), %rsi     # 0x53caa
callq 0x6460
movq %rax, -0xaf0(%rbp)
movq -0x10(%rbp), %rdi
movl $0x6, %esi
callq 0x20340
movq -0xaf0(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x3714c(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xae8(%rbp)
addq $0xbb8, %rdi            # imm = 0xBB8
xorl %eax, %eax
movl %eax, %esi
callq 0x1de40
movq -0xae8(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x3710f(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xae0(%rbp)
addq $0xbb8, %rdi            # imm = 0xBB8
movl $0x1, %esi
callq 0x1de40
movq -0xae0(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x370d1(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xad8(%rbp)
addq $0xbb8, %rdi            # imm = 0xBB8
movl $0x2, %esi
callq 0x1de40
movq -0xad8(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x37093(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xad0(%rbp)
addq $0x9f0, %rdi            # imm = 0x9F0
xorl %eax, %eax
movl %eax, %esi
callq 0x1de40
movq -0xad0(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x37056(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xac8(%rbp)
addq $0x9f0, %rdi            # imm = 0x9F0
movl $0x1, %esi
callq 0x1de40
movq -0xac8(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x37018(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xac0(%rbp)
addq $0x9f0, %rdi            # imm = 0x9F0
movl $0x2, %esi
callq 0x1de40
movq -0xac0(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x36fda(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xab8(%rbp)
addq $0xa08, %rdi            # imm = 0xA08
xorl %eax, %eax
movl %eax, %esi
callq 0x1de40
movq -0xab8(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x36f9d(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xab0(%rbp)
addq $0xa08, %rdi            # imm = 0xA08
movl $0x1, %esi
callq 0x1de40
movq -0xab0(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x36f5f(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xaa8(%rbp)
addq $0xa08, %rdi            # imm = 0xA08
movl $0x2, %esi
callq 0x1de40
movq -0xaa8(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x36f21(%rip), %rsi     # 0x53caa
callq 0x6460
movq %rax, %rdi
movq -0x918(%rbp), %rax
movsd 0x780(%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x36efb(%rip), %rsi     # 0x53caa
callq 0x6460
movq %rax, %rdi
movq -0x918(%rbp), %rax
movsd 0x958(%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x36ed5(%rip), %rsi     # 0x53caa
callq 0x6460
movq %rax, %rcx
movq -0x918(%rbp), %rax
movq %rcx, -0xaa0(%rbp)
movsd 0x928(%rax), %xmm0
callq 0x205a0
movq -0xaa0(%rbp), %rdi
callq 0x6830
movq %rax, %rdi
leaq 0x36e9c(%rip), %rsi     # 0x53caa
callq 0x6460
movq %rax, %rcx
movq -0x918(%rbp), %rax
movq %rcx, -0xa98(%rbp)
movsd 0x930(%rax), %xmm0
callq 0x205a0
movq -0xa98(%rbp), %rdi
callq 0x6830
movq %rax, %rdi
leaq 0x36e63(%rip), %rsi     # 0x53caa
callq 0x6460
movq %rax, %rcx
movq -0x918(%rbp), %rax
movq %rcx, -0xa90(%rbp)
movsd 0x938(%rax), %xmm0
callq 0x205a0
movq -0xa90(%rbp), %rdi
callq 0x6830
movq %rax, %rdi
leaq 0x36e2a(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xa88(%rbp)
addq $0xc30, %rdi            # imm = 0xC30
xorl %eax, %eax
movl %eax, %esi
callq 0x1de40
movsd (%rax), %xmm0
callq 0x205a0
movq -0xa88(%rbp), %rdi
callq 0x6830
movq %rax, %rdi
leaq 0x36de8(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xa80(%rbp)
addq $0xc30, %rdi            # imm = 0xC30
movl $0x1, %esi
callq 0x1de40
movsd (%rax), %xmm0
callq 0x205a0
movq -0xa80(%rbp), %rdi
callq 0x6830
movq %rax, %rdi
leaq 0x36da5(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xa78(%rbp)
addq $0xc30, %rdi            # imm = 0xC30
movl $0x2, %esi
callq 0x1de40
movsd (%rax), %xmm0
callq 0x205a0
movq -0xa78(%rbp), %rdi
callq 0x6830
movq %rax, %rdi
leaq 0x36d62(%rip), %rsi     # 0x53caa
callq 0x6460
movq %rax, %rdi
movq -0x918(%rbp), %rax
movsd 0x7d8(%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x36d3c(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xa70(%rbp)
addq $0xdf8, %rdi            # imm = 0xDF8
xorl %eax, %eax
movl %eax, %esi
callq 0x1de40
movq -0xa70(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x36cff(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xa68(%rbp)
addq $0xdf8, %rdi            # imm = 0xDF8
movl $0x1, %esi
callq 0x1de40
movq -0xa68(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x36cc1(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xa60(%rbp)
addq $0xdf8, %rdi            # imm = 0xDF8
movl $0x2, %esi
callq 0x1de40
movq -0xa60(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x36c83(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xa58(%rbp)
addq $0xe28, %rdi            # imm = 0xE28
xorl %eax, %eax
movl %eax, %esi
callq 0x1de40
movq -0xa58(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x36c46(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xa50(%rbp)
addq $0xe28, %rdi            # imm = 0xE28
movl $0x1, %esi
callq 0x1de40
movq -0xa50(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x36c08(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xa48(%rbp)
addq $0xe28, %rdi            # imm = 0xE28
movl $0x2, %esi
callq 0x1de40
movq -0xa48(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x36bca(%rip), %rsi     # 0x53caa
callq 0x6460
movq %rax, %rcx
movq -0x918(%rbp), %rax
movq %rcx, -0xa40(%rbp)
movsd 0x968(%rax), %xmm0
callq 0x205a0
movq -0xa40(%rbp), %rdi
callq 0x6830
movq %rax, %rdi
leaq 0x36b91(%rip), %rsi     # 0x53caa
callq 0x6460
movq %rax, %rcx
movq -0x918(%rbp), %rax
movq %rcx, -0xa38(%rbp)
movsd 0x970(%rax), %xmm0
callq 0x205a0
movq -0xa38(%rbp), %rdi
callq 0x6830
movq %rax, %rdi
leaq 0x36b58(%rip), %rsi     # 0x53caa
callq 0x6460
movq %rax, %rdi
movq -0x918(%rbp), %rax
movsd 0x918(%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x36b32(%rip), %rsi     # 0x53caa
callq 0x6460
movq %rax, %rdi
movq -0x918(%rbp), %rax
movsd 0x920(%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x36b0c(%rip), %rsi     # 0x53caa
callq 0x6460
movq %rax, %rdi
movq -0x918(%rbp), %rax
movsd 0xe88(%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x36ae6(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xa30(%rbp)
addq $0xe70, %rdi            # imm = 0xE70
xorl %eax, %eax
movl %eax, %esi
callq 0x1de40
movq -0xa30(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x36aa9(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xa28(%rbp)
addq $0xe70, %rdi            # imm = 0xE70
movl $0x1, %esi
callq 0x1de40
movq -0xa28(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x36a6b(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xa20(%rbp)
addq $0xd20, %rdi            # imm = 0xD20
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x21110
movq -0xa20(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x36a2b(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xa18(%rbp)
addq $0xd20, %rdi            # imm = 0xD20
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x21110
movq -0xa18(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x369e9(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xa10(%rbp)
addq $0xd20, %rdi            # imm = 0xD20
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x21110
movq -0xa10(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x369a7(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xa08(%rbp)
addq $0xd20, %rdi            # imm = 0xD20
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x21110
movq -0xa08(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x36965(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0xa00(%rbp)
addq $0xd20, %rdi            # imm = 0xD20
movl $0x1, %edx
movq %rdx, %rsi
callq 0x21110
movq -0xa00(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x36924(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0x9f8(%rbp)
addq $0xd20, %rdi            # imm = 0xD20
movl $0x1, %esi
movl $0x2, %edx
callq 0x21110
movq -0x9f8(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x368e1(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0x9f0(%rbp)
addq $0xd20, %rdi            # imm = 0xD20
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x21110
movq -0x9f0(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x3689f(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0x9e8(%rbp)
addq $0xd20, %rdi            # imm = 0xD20
movl $0x2, %esi
movl $0x1, %edx
callq 0x21110
movq -0x9e8(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x3685c(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0x9e0(%rbp)
addq $0xd20, %rdi            # imm = 0xD20
movl $0x2, %edx
movq %rdx, %rsi
callq 0x21110
movq -0x9e0(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x3681b(%rip), %rsi     # 0x53caa
callq 0x6460
movq -0x918(%rbp), %rdi
movq %rax, -0x9d8(%rbp)
addq $0x9d8, %rdi            # imm = 0x9D8
callq 0x205d0
movq -0x9d8(%rbp), %rdi
cvttsd2si %xmm0, %esi
callq 0x6780
movq %rax, %rdi
leaq 0x367e2(%rip), %rsi     # 0x53caa
callq 0x6460
movq %rax, %rdi
movq -0x918(%rbp), %rax
movsd 0x960(%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x367bc(%rip), %rsi     # 0x53caa
callq 0x6460
movq %rax, %rdi
movq -0x918(%rbp), %rax
movsd 0x998(%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x36796(%rip), %rsi     # 0x53caa
callq 0x6460
movq %rax, %rdi
movq -0x918(%rbp), %rax
movsd 0x9a0(%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x36770(%rip), %rsi     # 0x53caa
callq 0x6460
movq %rax, %rdi
movq -0x918(%rbp), %rax
movsd 0x9a8(%rax), %xmm0
callq 0x6830
movq %rax, %rdi
leaq 0x3674a(%rip), %rsi     # 0x53caa
callq 0x6460
movq %rax, %rdi
movq -0x918(%rbp), %rax
movb 0x254(%rax), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x67c0
movq %rax, %rdi
leaq 0x36721(%rip), %rsi     # 0x53caa
callq 0x6460
movq %rax, %rdi
movq -0x918(%rbp), %rax
movb 0x255(%rax), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x67c0
movq %rax, %rdi
movq 0x5b9a6(%rip), %rsi     # 0x78f58
callq 0x64c0
movb $0x0, 0x5c062(%rip)     # 0x79620
cvttsd2si -0x18(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x1d5ff
movsd 0x358b8(%rip), %xmm0    # 0x52e90
mulsd -0x18(%rbp), %xmm0
cvttsd2si %xmm0, %eax
movl $0xa, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x1d5ff
movq -0x918(%rbp), %rdi
movsd -0x18(%rbp), %xmm0
callq 0x1b9f0
addq $0xb40, %rsp            # imm = 0xB40
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x67a0
nopw %cs:(%rax,%rax)