// File: istellartech[P]OpenTsiolkovsky/src/rocket.cpp
// Function: RocketStage::operator()(std::array<double, 14ul> const&, std::array<double, 14ul>&, double)
void RocketStage::operator()(const RocketStage::state& x, RocketStage::state& dx, 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) {
        dx = {0, 0, 0, 0, 0, 0, 0};
        /*
        if ((int)t % 10 == 0 && (int)(t*10) % 10 == 0 ){ // progress
            progress(t);
        }
        */
        if ( flag_impact_g == false ) {
            impact_point_g << posLLH_[0], posLLH_[1];
            flag_impact_g = true;
        }
        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;
        }
    }

    dx[0] = -m_dot;
    dx[1] = x[4];
    dx[2] = x[5];
    dx[3] = x[6];
    dx[4] = accECI_[0];
    dx[5] = accECI_[1];
    dx[6] = accECI_[2];

    //    separation
    if (flag_separation_g == false && t >= later_stage_separation_time){
        flag_separation_g = true;
        posECI_init_g = posECI_;
        velECI_init_g = velECI_;
    }

    // dumping product
    if (flag_dump_g == false && t >= dump_separation_time){
        flag_dump_g = true;
        posECI_dump_init_g = posECI_;
        velECI_dump_init_g = velECI_ + dcmNED2ECI_ * vel_dump_additional_NEDframe;
    }

    if (max_alt_g < posLLH_[2]){  // update maximum altitude[m]
        max_alt_g = posLLH_[2];
    }
    downrange = distance_surface(launch_pos_LLH, posLLH_);
    if (max_downrange_g < downrange){  // update maximum downrange
        max_downrange_g = downrange;
    }

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x980, %rsp            # imm = 0x980
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x8b0(%rbp)
addq $0x9c0, %rax            # imm = 0x9C0
movq %rax, -0x8a8(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x20340
movq -0x8a8(%rbp), %rsi
movq %rax, %rdx
leaq -0x40(%rbp), %rdi
movq %rdi, -0x8a0(%rbp)
callq 0x1e1e0
movq -0x10(%rbp), %rdi
movl $0x2, %esi
callq 0x20340
movq -0x8a0(%rbp), %rdi
movq %rax, %rsi
callq 0x1e220
movq %rax, -0x898(%rbp)
jmp 0x17af2
movq -0x10(%rbp), %rdi
movl $0x3, %esi
callq 0x20340
movq -0x898(%rbp), %rdi
movq %rax, %rsi
callq 0x1e220
jmp 0x17b11
leaq -0x40(%rbp), %rdi
callq 0x1e390
movq -0x8b0(%rbp), %rax
addq $0x9d8, %rax            # imm = 0x9D8
movq %rax, -0x8c8(%rbp)
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x20340
movq -0x8c8(%rbp), %rsi
movq %rax, %rdx
leaq -0x70(%rbp), %rdi
movq %rdi, -0x8c0(%rbp)
callq 0x1e1e0
movq -0x10(%rbp), %rdi
movl $0x5, %esi
callq 0x20340
movq -0x8c0(%rbp), %rdi
movq %rax, %rsi
callq 0x1e220
movq %rax, -0x8b8(%rbp)
jmp 0x17b7c
movq -0x10(%rbp), %rdi
movl $0x6, %esi
callq 0x20340
movq -0x8b8(%rbp), %rdi
movq %rax, %rsi
callq 0x1e220
jmp 0x17b9b
leaq -0x70(%rbp), %rdi
callq 0x1e390
movsd -0x20(%rbp), %xmm0
leaq -0xb8(%rbp), %rdi
callq 0x4ab30
movq -0x8b0(%rbp), %rdi
addq $0xa20, %rdi            # imm = 0xA20
leaq -0xb8(%rbp), %rsi
callq 0x20370
movq -0x8b0(%rbp), %rsi
addq $0xa20, %rsi            # imm = 0xA20
leaq -0x118(%rbp), %rdi
callq 0x203a0
movq -0x8b0(%rbp), %rsi
addq $0x9c0, %rsi            # imm = 0x9C0
leaq -0x130(%rbp), %rdi
callq 0x1f0e0
leaq -0xd0(%rbp), %rdi
leaq -0x118(%rbp), %rsi
leaq -0x130(%rbp), %rdx
callq 0x4ad20
movq -0x8b0(%rbp), %rdi
addq $0xa68, %rdi            # imm = 0xA68
leaq -0xd0(%rbp), %rsi
callq 0x20420
movq -0x8b0(%rbp), %rsi
addq $0xa68, %rsi            # imm = 0xA68
leaq -0x160(%rbp), %rdi
callq 0x1f0e0
leaq -0x148(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x4ae10
movq -0x8b0(%rbp), %rdi
addq $0xa80, %rdi            # imm = 0xA80
leaq -0x148(%rbp), %rsi
callq 0x20420
movq -0x8b0(%rbp), %rdi
addq $0xa80, %rdi            # imm = 0xA80
movl $0x2, %esi
callq 0x1de40
xorps %xmm0, %xmm0
ucomisd (%rax), %xmm0
jbe 0x17dc5
leaq -0x1d0(%rbp), %rdi
xorl %esi, %esi
movl $0x70, %edx
callq 0x62a0
leaq -0x1d0(%rbp), %rdi
leaq 0x3b3ac(%rip), %rsi     # 0x53070
movl $0x70, %edx
callq 0x63b0
movq -0x18(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
movl $0x70, %edx
callq 0x63b0
movb 0x618e2(%rip), %al      # 0x795cb
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x17dc0
movq -0x8b0(%rbp), %rdi
addq $0xa80, %rdi            # imm = 0xA80
movq %rdi, -0x8d8(%rbp)
xorl %eax, %eax
movl %eax, %esi
callq 0x1de40
movq %rax, %rdx
leaq 0x618c1(%rip), %rsi     # 0x795e0
leaq -0x1f0(%rbp), %rdi
callq 0x200e0
movq -0x8d8(%rbp), %rdi
movl $0x1, %esi
callq 0x1de40
movq %rax, -0x8d0(%rbp)
jmp 0x17d45
movq -0x8d0(%rbp), %rsi
leaq -0x1f0(%rbp), %rdi
callq 0x20120
jmp 0x17d5a
leaq -0x1f0(%rbp), %rdi
callq 0x20290
movb $0x1, 0x6185e(%rip)     # 0x795cb
jmp 0x17dc0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x1e390
jmp 0x18840
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x1e390
jmp 0x18840
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x1f0(%rbp), %rdi
callq 0x20290
jmp 0x18840
jmp 0x18837
movq -0x8b0(%rbp), %rdi
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x8e0(%rbp)
addq $0xa80, %rdi            # imm = 0xA80
movl $0x2, %esi
callq 0x1de40
movsd -0x8e0(%rbp), %xmm0
movq -0x8b0(%rbp), %rdi
movsd (%rax), %xmm1
callq 0x18850
movq -0x8b0(%rbp), %rsi
addq $0xa80, %rsi            # imm = 0xA80
leaq -0x250(%rbp), %rdi
callq 0x1f0e0
leaq -0x238(%rbp), %rdi
leaq -0x250(%rbp), %rsi
callq 0x4b180
movq -0x8b0(%rbp), %rdi
addq $0xa98, %rdi            # imm = 0xA98
leaq -0x238(%rbp), %rsi
callq 0x20370
movq -0x8b0(%rbp), %rdi
addq $0xa98, %rdi            # imm = 0xA98
callq 0x20450
movq -0x8b0(%rbp), %rdi
movq %rax, -0x258(%rbp)
addq $0xae0, %rdi            # imm = 0xAE0
leaq -0x258(%rbp), %rsi
callq 0x20480
movq -0x8b0(%rbp), %rsi
addq $0xa98, %rsi            # imm = 0xA98
leaq -0x2e8(%rbp), %rdi
callq 0x203a0
movq -0x8b0(%rbp), %rsi
addq $0xa20, %rsi            # imm = 0xA20
leaq -0x330(%rbp), %rdi
callq 0x203a0
leaq -0x2a0(%rbp), %rdi
leaq -0x2e8(%rbp), %rsi
leaq -0x330(%rbp), %rdx
callq 0x4b460
movq -0x8b0(%rbp), %rdi
addq $0xb28, %rdi            # imm = 0xB28
leaq -0x2a0(%rbp), %rsi
callq 0x20370
movq -0x8b0(%rbp), %rdi
addq $0xb28, %rdi            # imm = 0xB28
callq 0x20450
movq -0x8b0(%rbp), %rdi
movq %rax, -0x338(%rbp)
addq $0xb70, %rdi            # imm = 0xB70
leaq -0x338(%rbp), %rsi
callq 0x20480
movq -0x8b0(%rbp), %rsi
addq $0x340, %rsi            # imm = 0x340
leaq -0x398(%rbp), %rdi
callq 0x1f0e0
leaq -0x380(%rbp), %rdi
leaq -0x398(%rbp), %rsi
callq 0x4b180
movq -0x8b0(%rbp), %rdi
addq $0xd68, %rdi            # imm = 0xD68
leaq -0x380(%rbp), %rsi
callq 0x20370
movq -0x8b0(%rbp), %rsi
addq $0xd68, %rsi            # imm = 0xD68
leaq -0x428(%rbp), %rdi
callq 0x203a0
leaq -0x470(%rbp), %rdi
xorps %xmm0, %xmm0
callq 0x4ab30
leaq -0x3e0(%rbp), %rdi
leaq -0x428(%rbp), %rsi
leaq -0x470(%rbp), %rdx
callq 0x4b460
movq -0x8b0(%rbp), %rdi
addq $0xdb0, %rdi            # imm = 0xDB0
leaq -0x3e0(%rbp), %rsi
callq 0x20370
movq -0x8b0(%rbp), %rsi
addq $0xb28, %rsi            # imm = 0xB28
leaq -0x4d0(%rbp), %rdi
callq 0x203a0
movq -0x8b0(%rbp), %rsi
addq $0x9d8, %rsi            # imm = 0x9D8
leaq -0x4e8(%rbp), %rdi
callq 0x1f0e0
movq -0x8b0(%rbp), %rsi
addq $0x9c0, %rsi            # imm = 0x9C0
leaq -0x500(%rbp), %rdi
callq 0x1f0e0
leaq -0x488(%rbp), %rdi
leaq -0x4d0(%rbp), %rsi
leaq -0x4e8(%rbp), %rdx
leaq -0x500(%rbp), %rcx
callq 0x4b4b0
movq -0x8b0(%rbp), %rdi
addq $0xbb8, %rdi            # imm = 0xBB8
leaq -0x488(%rbp), %rsi
callq 0x20420
movq -0x8b0(%rbp), %rax
movsd 0x918(%rax), %xmm0
movsd 0x920(%rax), %xmm1
leaq -0x518(%rbp), %rdi
callq 0x4b720
movq -0x8b0(%rbp), %rdi
addq $0xbd0, %rdi            # imm = 0xBD0
leaq -0x518(%rbp), %rsi
callq 0x20420
movq -0x8b0(%rbp), %rax
testb $0x1, 0x290(%rax)
je 0x1815d
movq -0x8b0(%rbp), %rdi
movq %rdi, %rax
addq $0x7f8, %rax            # imm = 0x7F8
movq %rax, -0x8f8(%rbp)
addq $0xa80, %rdi            # imm = 0xA80
movl $0x2, %esi
callq 0x1de40
movq -0x8b0(%rbp), %rsi
movsd (%rax), %xmm0
movsd %xmm0, -0x8f0(%rbp)
addq $0x2b8, %rsi            # imm = 0x2B8
leaq -0x650(%rbp), %rdi
movq %rdi, -0x8e8(%rbp)
callq 0x8170
movq -0x8f8(%rbp), %rsi
movsd -0x8f0(%rbp), %xmm0
movq -0x8e8(%rbp), %rdx
leaq -0x638(%rbp), %rdi
callq 0x7840
jmp 0x18110
movq -0x8b0(%rbp), %rdi
addq $0x7f8, %rdi            # imm = 0x7F8
leaq -0x638(%rbp), %rsi
movl $0x120, %edx            # imm = 0x120
callq 0x63b0
leaq -0x650(%rbp), %rdi
callq 0x8220
jmp 0x181cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x650(%rbp), %rdi
callq 0x8220
jmp 0x18840
movq -0x8b0(%rbp), %rdi
movq %rdi, %rax
addq $0x7f8, %rax            # imm = 0x7F8
movq %rax, -0x900(%rbp)
addq $0xa80, %rdi            # imm = 0xA80
movl $0x2, %esi
callq 0x1de40
movq -0x900(%rbp), %rsi
movq %rax, %rcx
movq -0x8b0(%rbp), %rax
movsd (%rcx), %xmm0
movsd 0x270(%rax), %xmm1
leaq -0x770(%rbp), %rdi
callq 0x7190
movq -0x8b0(%rbp), %rdi
addq $0x7f8, %rdi            # imm = 0x7F8
leaq -0x770(%rbp), %rsi
movl $0x120, %edx            # imm = 0x120
callq 0x63b0
movq -0x8b0(%rbp), %rsi
addq $0x9c0, %rsi            # imm = 0x9C0
leaq -0x7a0(%rbp), %rdi
callq 0x1f0e0
leaq -0x788(%rbp), %rdi
leaq -0x7a0(%rbp), %rsi
callq 0x48a70
movq -0x8b0(%rbp), %rdi
addq $0xe58, %rdi            # imm = 0xE58
leaq -0x788(%rbp), %rsi
callq 0x20420
movq -0x8b0(%rbp), %rax
testb $0x1, 0x254(%rax)
je 0x18376
movq -0x8b0(%rbp), %rax
movl 0x278(%rax), %eax
movq %rax, -0x908(%rbp)
subq $0x3, %rax
ja 0x182c1
movq -0x908(%rbp), %rax
leaq 0x3ae00(%rip), %rcx     # 0x53050
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8b0(%rbp), %rdi
movq -0x10(%rbp), %rsi
movsd -0x20(%rbp), %xmm0
callq 0x19440
jmp 0x18371
movq -0x8b0(%rbp), %rdi
movq -0x10(%rbp), %rsi
movsd -0x20(%rbp), %xmm0
callq 0x1a230
jmp 0x18371
movq -0x8b0(%rbp), %rdi
movq -0x10(%rbp), %rsi
movsd -0x20(%rbp), %xmm0
callq 0x1a270
jmp 0x18371
movq -0x8b0(%rbp), %rdi
movq -0x10(%rbp), %rsi
movsd -0x20(%rbp), %xmm0
callq 0x1a2b0
jmp 0x18371
movq -0x8b0(%rbp), %rsi
movq $0x0, 0x790(%rsi)
addq $0x9f0, %rsi            # imm = 0x9F0
movq $0x0, -0x7c8(%rbp)
leaq -0x7c0(%rbp), %rdi
movq %rdi, -0x918(%rbp)
leaq -0x7c8(%rbp), %rdx
callq 0x1e1e0
movq -0x918(%rbp), %rdi
movq $0x0, -0x7d0(%rbp)
leaq -0x7d0(%rbp), %rsi
callq 0x1e220
movq %rax, -0x910(%rbp)
jmp 0x18326
movq -0x910(%rbp), %rdi
movq $0x0, -0x7d8(%rbp)
leaq -0x7d8(%rbp), %rsi
callq 0x1e220
jmp 0x18346
leaq -0x7c0(%rbp), %rdi
callq 0x1e390
jmp 0x18371
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x7c0(%rbp), %rdi
callq 0x1e390
jmp 0x18840
jmp 0x184a9
movq -0x8b0(%rbp), %rax
movl 0x27c(%rax), %eax
movl %eax, -0x91c(%rbp)
testl %eax, %eax
je 0x183a9
jmp 0x1838f
movl -0x91c(%rbp), %eax
subl $0x1, %eax
je 0x183c3
jmp 0x1839c
movl -0x91c(%rbp), %eax
subl $0x2, %eax
je 0x183dd
jmp 0x183f7
movq -0x8b0(%rbp), %rdi
movq -0x10(%rbp), %rsi
movsd -0x20(%rbp), %xmm0
callq 0x1a2f0
jmp 0x184a7
movq -0x8b0(%rbp), %rdi
movq -0x10(%rbp), %rsi
movsd -0x20(%rbp), %xmm0
callq 0x1a930
jmp 0x184a7
movq -0x8b0(%rbp), %rdi
movq -0x10(%rbp), %rsi
movsd -0x20(%rbp), %xmm0
callq 0x1b080
jmp 0x184a7
movq -0x8b0(%rbp), %rsi
movq $0x0, 0x790(%rsi)
addq $0x9f0, %rsi            # imm = 0x9F0
movq $0x0, -0x800(%rbp)
leaq -0x7f8(%rbp), %rdi
movq %rdi, -0x930(%rbp)
leaq -0x800(%rbp), %rdx
callq 0x1e1e0
movq -0x930(%rbp), %rdi
movq $0x0, -0x808(%rbp)
leaq -0x808(%rbp), %rsi
callq 0x1e220
movq %rax, -0x928(%rbp)
jmp 0x1845c
movq -0x928(%rbp), %rdi
movq $0x0, -0x810(%rbp)
leaq -0x810(%rbp), %rsi
callq 0x1e220
jmp 0x1847c
leaq -0x7f8(%rbp), %rdi
callq 0x1e390
jmp 0x184a7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x7f8(%rbp), %rdi
callq 0x1e390
jmp 0x18840
jmp 0x184a9
movq -0x8b0(%rbp), %rax
movsd 0x790(%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x968(%rbp)
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1ff80
movsd -0x968(%rbp), %xmm0
movsd %xmm0, (%rax)
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x20340
movsd (%rax), %xmm0
movsd %xmm0, -0x960(%rbp)
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0x1ff80
movsd -0x960(%rbp), %xmm0
movsd %xmm0, (%rax)
movq -0x10(%rbp), %rdi
movl $0x5, %esi
callq 0x20340
movsd (%rax), %xmm0
movsd %xmm0, -0x958(%rbp)
movq -0x18(%rbp), %rdi
movl $0x2, %esi
callq 0x1ff80
movsd -0x958(%rbp), %xmm0
movsd %xmm0, (%rax)
movq -0x10(%rbp), %rdi
movl $0x6, %esi
callq 0x20340
movsd (%rax), %xmm0
movsd %xmm0, -0x950(%rbp)
movq -0x18(%rbp), %rdi
movl $0x3, %esi
callq 0x1ff80
movsd -0x950(%rbp), %xmm0
movq -0x8b0(%rbp), %rdi
movsd %xmm0, (%rax)
addq $0x9f0, %rdi            # imm = 0x9F0
xorl %eax, %eax
movl %eax, %esi
callq 0x1de40
movsd (%rax), %xmm0
movsd %xmm0, -0x948(%rbp)
movq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x1ff80
movsd -0x948(%rbp), %xmm0
movq -0x8b0(%rbp), %rdi
movsd %xmm0, (%rax)
addq $0x9f0, %rdi            # imm = 0x9F0
movl $0x1, %esi
callq 0x1de40
movsd (%rax), %xmm0
movsd %xmm0, -0x940(%rbp)
movq -0x18(%rbp), %rdi
movl $0x5, %esi
callq 0x1ff80
movsd -0x940(%rbp), %xmm0
movq -0x8b0(%rbp), %rdi
movsd %xmm0, (%rax)
addq $0x9f0, %rdi            # imm = 0x9F0
movl $0x2, %esi
callq 0x1de40
movsd (%rax), %xmm0
movsd %xmm0, -0x938(%rbp)
movq -0x18(%rbp), %rdi
movl $0x6, %esi
callq 0x1ff80
movsd -0x938(%rbp), %xmm0
movsd %xmm0, (%rax)
movb 0x60f7d(%rip), %al      # 0x795c8
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x186a6
movq -0x8b0(%rbp), %rax
movsd -0x20(%rbp), %xmm0
ucomisd 0x750(%rax), %xmm0
jb 0x186a6
movq -0x8b0(%rbp), %rsi
movb $0x1, 0x60f4f(%rip)     # 0x795c8
addq $0x9c0, %rsi            # imm = 0x9C0
leaq 0x60f11(%rip), %rdi     # 0x79598
callq 0x1ef80
movq -0x8b0(%rbp), %rsi
addq $0x9d8, %rsi            # imm = 0x9D8
leaq 0x60f0f(%rip), %rdi     # 0x795b0
callq 0x1ef80
movb 0x60f1e(%rip), %al      # 0x795ca
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x18756
movq -0x8b0(%rbp), %rax
movsd -0x20(%rbp), %xmm0
ucomisd 0x650(%rax), %xmm0
jb 0x18756
movq -0x8b0(%rbp), %rsi
movb $0x1, 0x60ee8(%rip)     # 0x795ca
addq $0x9c0, %rsi            # imm = 0x9C0
leaq 0x60f00(%rip), %rdi     # 0x795f0
callq 0x1ef80
movq -0x8b0(%rbp), %rdx
movq %rdx, %rax
addq $0x9d8, %rax            # imm = 0x9D8
movq %rax, -0x970(%rbp)
movq %rdx, %rsi
addq $0xb70, %rsi            # imm = 0xB70
addq $0x668, %rdx            # imm = 0x668
leaq -0x860(%rbp), %rdi
callq 0x20520
movq -0x970(%rbp), %rsi
leaq -0x838(%rbp), %rdi
leaq -0x860(%rbp), %rdx
callq 0x204b0
leaq 0x60ebe(%rip), %rdi     # 0x79608
leaq -0x838(%rbp), %rsi
callq 0x20570
movq -0x8b0(%rbp), %rdi
movsd 0x60e73(%rip), %xmm0    # 0x795d8
movsd %xmm0, -0x978(%rbp)
addq $0xa80, %rdi            # imm = 0xA80
movl $0x2, %esi
callq 0x1de40
movsd -0x978(%rbp), %xmm1
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x187b4
movq -0x8b0(%rbp), %rdi
addq $0xa80, %rdi            # imm = 0xA80
movl $0x2, %esi
callq 0x1de40
movsd (%rax), %xmm0
movsd %xmm0, 0x60e24(%rip)    # 0x795d8
movq -0x8b0(%rbp), %rsi
addq $0x340, %rsi            # imm = 0x340
leaq -0x878(%rbp), %rdi
callq 0x1f0e0
movq -0x8b0(%rbp), %rsi
addq $0xa80, %rsi            # imm = 0xA80
leaq -0x890(%rbp), %rdi
callq 0x1f0e0
leaq -0x878(%rbp), %rdi
leaq -0x890(%rbp), %rsi
callq 0x4cb80
movq -0x8b0(%rbp), %rax
movsd %xmm0, 0xe88(%rax)
movsd 0x60dbe(%rip), %xmm1    # 0x795d0
movsd 0xe88(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x18837
movq -0x8b0(%rbp), %rax
movsd 0xe88(%rax), %xmm0
movsd %xmm0, 0x60d99(%rip)    # 0x795d0
addq $0x980, %rsp            # imm = 0x980
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x67a0
nopl (%rax)