// File: istellartech[P]OpenTsiolkovsky/src/rocket.cpp
// Function: RocketStage::RocketStage(RocketStage const&, Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1>)
RocketStage::RocketStage(const RocketStage& rocket_stage, Vector3d posECI_init_args, Vector3d velECI_init_args){
    deep_copy(rocket_stage);
    calc_start_time = dump_separation_time;
    free_flight_mode = ballistic_flight;
    mass_init = dump_mass;
    thrust_file_exist = false;
    thrust_const = 0.0;
    burn_start_time = 0.0;
    burn_end_time = 0.0;
    forced_cutoff_time = 1.0e100; // temporary large number
    ballistic_coef = dump_ballistic_coef;
    posECI_init = posECI_init_args;
    velECI_init = velECI_init_args;

    // for calcurate speed up
    thrust_file_exist = false;
    Isp_file_exist = false;
    CA_file_exist = false;
    CN_file_exist = false;
    attitude_file_exist = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdx, -0x70(%rbp)
movq %rcx, -0x68(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
leaq 0x62f66(%rip), %rax     # 0x785a8
movq %rax, (%rdi)
addq $0x8, %rdi
movq %rdi, -0x60(%rbp)
callq 0x6540
movq -0x40(%rbp), %rdi
addq $0x210, %rdi            # imm = 0x210
movq %rdi, -0x58(%rbp)
callq 0x6610
movq -0x40(%rbp), %rdi
addq $0x230, %rdi            # imm = 0x230
movq %rdi, -0x50(%rbp)
callq 0x6610
movq -0x40(%rbp), %rdi
movl $0x0, 0x250(%rdi)
movb $0x0, 0x254(%rdi)
movb $0x0, 0x255(%rdi)
movq $0x0, 0x258(%rdi)
movq $0x0, 0x260(%rdi)
movabsq $0x3f847ae147ae147b, %rax # imm = 0x3F847AE147AE147B
movq %rax, 0x268(%rdi)
movq $0x0, 0x270(%rdi)
movq $0x0, 0x288(%rdi)
addq $0x298, %rdi            # imm = 0x298
movq %rdi, -0x48(%rbp)
callq 0x6610
movq -0x40(%rbp), %rdi
addq $0x2b8, %rdi            # imm = 0x2B8
movq %rdi, -0x38(%rbp)
callq 0x1db70
jmp 0x156f9
movq -0x40(%rbp), %rdi
addq $0x2d8, %rdi            # imm = 0x2D8
movq %rdi, -0x78(%rbp)
callq 0x6610
movq -0x40(%rbp), %rdi
addq $0x2f8, %rdi            # imm = 0x2F8
callq 0x1d670
jmp 0x1571f
movq -0x40(%rbp), %rdi
addq $0x310, %rdi            # imm = 0x310
movq %rdi, -0x80(%rbp)
callq 0x1db70
jmp 0x15735
movq -0x40(%rbp), %rdi
addq $0x328, %rdi            # imm = 0x328
movq %rdi, -0x88(%rbp)
callq 0x1db70
jmp 0x1574e
movq -0x40(%rbp), %rdi
addq $0x340, %rdi            # imm = 0x340
callq 0x1d670
jmp 0x15760
movq -0x40(%rbp), %rdi
addq $0x358, %rdi            # imm = 0x358
callq 0x1d670
jmp 0x15772
movq -0x40(%rbp), %rdi
addq $0x370, %rdi            # imm = 0x370
callq 0x1d670
jmp 0x15784
movq -0x40(%rbp), %rdi
addq $0x388, %rdi            # imm = 0x388
callq 0x1d670
jmp 0x15796
movq -0x40(%rbp), %rdi
addq $0x3a0, %rdi            # imm = 0x3A0
callq 0x1d670
jmp 0x157a8
movq -0x40(%rbp), %rdi
addq $0x3b8, %rdi            # imm = 0x3B8
callq 0x1d670
jmp 0x157ba
movq -0x40(%rbp), %rdi
addq $0x3d0, %rdi            # imm = 0x3D0
callq 0x1d670
jmp 0x157cc
movq -0x40(%rbp), %rdi
addq $0x3e8, %rdi            # imm = 0x3E8
callq 0x1d670
jmp 0x157de
movq -0x40(%rbp), %rdi
addq $0x400, %rdi            # imm = 0x400
callq 0x1d670
jmp 0x157f0
movq -0x40(%rbp), %rdi
addq $0x418, %rdi            # imm = 0x418
callq 0x1d670
jmp 0x15802
movq -0x40(%rbp), %rdi
movb $0x0, 0x430(%rdi)
addq $0x438, %rdi            # imm = 0x438
movq %rdi, -0x98(%rbp)
callq 0x6610
movq -0x40(%rbp), %rdi
addq $0x458, %rdi            # imm = 0x458
movq %rdi, -0x90(%rbp)
callq 0x1db70
jmp 0x15839
movq -0x40(%rbp), %rdi
movq $0x0, 0x478(%rdi)
addq $0x488, %rdi            # imm = 0x488
movq %rdi, -0xa8(%rbp)
callq 0x6610
movq -0x40(%rbp), %rdi
addq $0x4a8, %rdi            # imm = 0x4A8
movq %rdi, -0xa0(%rbp)
callq 0x1db70
jmp 0x15874
movq -0x40(%rbp), %rdi
movq $0x0, 0x4c8(%rdi)
movq $0x0, 0x508(%rdi)
movq $0x0, 0x510(%rdi)
movq $0x0, 0x518(%rdi)
addq $0x528, %rdi            # imm = 0x528
movq %rdi, -0xb8(%rbp)
callq 0x6610
movq -0x40(%rbp), %rdi
addq $0x550, %rdi            # imm = 0x550
movq %rdi, -0xb0(%rbp)
callq 0x1db70
jmp 0x158d0
movq -0x40(%rbp), %rdi
movq $0x0, 0x568(%rdi)
addq $0x578, %rdi            # imm = 0x578
movq %rdi, -0xc8(%rbp)
callq 0x6610
movq -0x40(%rbp), %rdi
addq $0x598, %rdi            # imm = 0x598
movq %rdi, -0xc0(%rbp)
callq 0x1db70
jmp 0x1590b
movq -0x40(%rbp), %rdi
addq $0x5c0, %rdi            # imm = 0x5C0
movq %rdi, -0xd8(%rbp)
callq 0x6610
movq -0x40(%rbp), %rdi
addq $0x5e0, %rdi            # imm = 0x5E0
movq %rdi, -0xd0(%rbp)
callq 0x1db70
jmp 0x1593b
movq -0x40(%rbp), %rdi
addq $0x610, %rdi            # imm = 0x610
callq 0x1dbc0
jmp 0x1594d
movq -0x40(%rbp), %rdi
addq $0x630, %rdi            # imm = 0x630
callq 0x1d670
jmp 0x1595f
movq -0x40(%rbp), %rdi
movb $0x0, 0x648(%rdi)
movq $0x0, 0x650(%rdi)
movq $0x0, 0x658(%rdi)
movq $0x0, 0x660(%rdi)
addq $0x668, %rdi            # imm = 0x668
callq 0x1d670
jmp 0x15999
movq -0x40(%rbp), %rdi
movb $0x0, 0x680(%rdi)
addq $0x688, %rdi            # imm = 0x688
movq %rdi, -0xf0(%rbp)
callq 0x6610
movq -0x40(%rbp), %rdi
addq $0x6a8, %rdi            # imm = 0x6A8
movq %rdi, -0xe8(%rbp)
callq 0x6610
movq -0x40(%rbp), %rdi
addq $0x710, %rdi            # imm = 0x710
movq %rdi, -0xe0(%rbp)
callq 0x1db70
jmp 0x159e7
movq -0x40(%rbp), %rdi
addq $0x728, %rdi            # imm = 0x728
movq %rdi, -0xf8(%rbp)
callq 0x1db70
jmp 0x15a00
movq -0x40(%rbp), %rdi
movb $0x0, 0x740(%rdi)
movq $0x0, 0x748(%rdi)
movabsq $0x54b249ad2594c37d, %rax # imm = 0x54B249AD2594C37D
movq %rax, 0x750(%rdi)
movabsq $0x40239d013a92a305, %rax # imm = 0x40239D013A92A305
movq %rax, 0x758(%rdi)
movq $0x0, 0x760(%rdi)
movq $0x0, 0x768(%rdi)
movq $0x0, 0x770(%rdi)
movq $0x0, 0x778(%rdi)
movabsq $0x3fb999999999999a, %rax # imm = 0x3FB999999999999A
movq %rax, 0x780(%rdi)
movabsq $0x3fc999999999999a, %rax # imm = 0x3FC999999999999A
movq %rax, 0x788(%rdi)
movq $0x0, 0x790(%rdi)
movq $0x0, 0x798(%rdi)
movq $0x0, 0x7a0(%rdi)
movq $0x0, 0x7a8(%rdi)
movq $0x0, 0x7b0(%rdi)
movq $0x0, 0x7b8(%rdi)
movq $0x0, 0x7c0(%rdi)
movq $0x0, 0x7c8(%rdi)
movq $0x0, 0x7d0(%rdi)
movq $0x0, 0x7d8(%rdi)
movq $0x0, 0x7e0(%rdi)
movq $0x0, 0x7e8(%rdi)
movq $0x0, 0x7f0(%rdi)
addq $0x7f8, %rdi            # imm = 0x7F8
callq 0x8060
movq -0x40(%rbp), %rdi
movq $0x0, 0x918(%rdi)
movq $0x0, 0x920(%rdi)
movq $0x0, 0x928(%rdi)
movabsq $0x3ff921fb54442d18, %rax # imm = 0x3FF921FB54442D18
movq %rax, 0x930(%rdi)
movq $0x0, 0x938(%rdi)
movq $0x0, 0x940(%rdi)
movq %rax, 0x948(%rdi)
movq $0x0, 0x950(%rdi)
movq $0x0, 0x958(%rdi)
movq $0x0, 0x960(%rdi)
movq $0x0, 0x968(%rdi)
movq $0x0, 0x970(%rdi)
movq $0x0, 0x998(%rdi)
movq $0x0, 0x9a0(%rdi)
movq $0x0, 0x9a8(%rdi)
movq $0x0, 0x9b0(%rdi)
movq $0x0, 0x9b8(%rdi)
addq $0x9c0, %rdi            # imm = 0x9C0
callq 0x1d670
jmp 0x15bf0
movq -0x40(%rbp), %rdi
addq $0x9d8, %rdi            # imm = 0x9D8
callq 0x1d670
jmp 0x15c02
movq -0x40(%rbp), %rdi
addq $0x9f0, %rdi            # imm = 0x9F0
callq 0x1d670
jmp 0x15c14
movq -0x40(%rbp), %rdi
addq $0xa08, %rdi            # imm = 0xA08
callq 0x1d670
jmp 0x15c26
movq -0x40(%rbp), %rdi
addq $0xa20, %rdi            # imm = 0xA20
callq 0x1dbe0
jmp 0x15c38
movq -0x40(%rbp), %rdi
addq $0xa68, %rdi            # imm = 0xA68
callq 0x1d670
jmp 0x15c4a
movq -0x40(%rbp), %rdi
addq $0xa80, %rdi            # imm = 0xA80
callq 0x1d670
jmp 0x15c5c
movq -0x40(%rbp), %rdi
addq $0xa98, %rdi            # imm = 0xA98
callq 0x1dbe0
jmp 0x15c6e
movq -0x40(%rbp), %rdi
addq $0xae0, %rdi            # imm = 0xAE0
callq 0x1dbe0
jmp 0x15c80
movq -0x40(%rbp), %rdi
addq $0xb28, %rdi            # imm = 0xB28
callq 0x1dbe0
jmp 0x15c92
movq -0x40(%rbp), %rdi
addq $0xb70, %rdi            # imm = 0xB70
callq 0x1dbe0
jmp 0x15ca4
movq -0x40(%rbp), %rdi
addq $0xbb8, %rdi            # imm = 0xBB8
callq 0x1d670
jmp 0x15cb6
movq -0x40(%rbp), %rdi
addq $0xbd0, %rdi            # imm = 0xBD0
callq 0x1d670
jmp 0x15cc8
movq -0x40(%rbp), %rdi
addq $0xbe8, %rdi            # imm = 0xBE8
callq 0x1d670
jmp 0x15cda
movq -0x40(%rbp), %rdi
addq $0xc00, %rdi            # imm = 0xC00
callq 0x1d670
jmp 0x15cec
movq -0x40(%rbp), %rdi
addq $0xc18, %rdi            # imm = 0xC18
callq 0x1d670
jmp 0x15cfe
movq -0x40(%rbp), %rdi
addq $0xc30, %rdi            # imm = 0xC30
callq 0x1d670
jmp 0x15d10
movq -0x40(%rbp), %rdi
addq $0xc48, %rdi            # imm = 0xC48
callq 0x1dbe0
jmp 0x15d22
movq -0x40(%rbp), %rdi
addq $0xc90, %rdi            # imm = 0xC90
callq 0x1dbe0
jmp 0x15d34
movq -0x40(%rbp), %rdi
addq $0xcd8, %rdi            # imm = 0xCD8
callq 0x1dbe0
jmp 0x15d46
movq -0x40(%rbp), %rdi
addq $0xd20, %rdi            # imm = 0xD20
callq 0x1dbe0
jmp 0x15d58
movq -0x40(%rbp), %rdi
addq $0xd68, %rdi            # imm = 0xD68
callq 0x1dbe0
jmp 0x15d6a
movq -0x40(%rbp), %rdi
addq $0xdb0, %rdi            # imm = 0xDB0
callq 0x1dbe0
jmp 0x15d7c
movq -0x40(%rbp), %rdi
addq $0xdf8, %rdi            # imm = 0xDF8
callq 0x1d670
jmp 0x15d8e
movq -0x40(%rbp), %rdi
addq $0xe10, %rdi            # imm = 0xE10
callq 0x1d670
jmp 0x15da0
movq -0x40(%rbp), %rdi
addq $0xe28, %rdi            # imm = 0xE28
callq 0x1d670
jmp 0x15db2
movq -0x40(%rbp), %rdi
addq $0xe40, %rdi            # imm = 0xE40
callq 0x1d670
jmp 0x15dc4
movq -0x40(%rbp), %rdi
addq $0xe58, %rdi            # imm = 0xE58
callq 0x1d670
jmp 0x15dd6
movq -0x40(%rbp), %rdi
addq $0xe70, %rdi            # imm = 0xE70
callq 0x1d670
jmp 0x15de8
movq -0x40(%rbp), %rdi
addq $0xe90, %rdi            # imm = 0xE90
movq %rdi, -0x100(%rbp)
callq 0x1dc00
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x1e460
jmp 0x15e0e
movq -0x70(%rbp), %rsi
movq -0x40(%rbp), %rdi
movsd 0x650(%rdi), %xmm0
movsd %xmm0, 0x258(%rdi)
movl $0x2, 0x27c(%rdi)
movsd 0x658(%rdi), %xmm0
movsd %xmm0, 0x280(%rdi)
movb $0x0, 0x480(%rdi)
movq $0x0, 0x4c8(%rdi)
movq $0x0, 0x4d0(%rdi)
movq $0x0, 0x4d8(%rdi)
movabsq $0x54b249ad2594c37d, %rax # imm = 0x54B249AD2594C37D
movq %rax, 0x4e8(%rdi)
movsd 0x660(%rdi), %xmm0
movsd %xmm0, 0x288(%rdi)
addq $0x3d0, %rdi            # imm = 0x3D0
callq 0x1ef80
jmp 0x15e97
movq -0x68(%rbp), %rsi
movq -0x40(%rbp), %rdi
addq $0x3e8, %rdi            # imm = 0x3E8
callq 0x1ef80
jmp 0x15ead
movq -0x40(%rbp), %rax
movb $0x0, 0x480(%rax)
movb $0x0, 0x430(%rax)
movb $0x0, 0x570(%rax)
movb $0x0, 0x520(%rax)
movb $0x0, 0x5b8(%rax)
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x16095
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x16083
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x1607a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x1606e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x16062
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x1604a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x16032
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x1601a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x16002
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x15ff6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x15fde
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x15fd2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x15fc6
movq -0x100(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0xb400
movq -0xf8(%rbp), %rdi
callq 0x8220
movq -0xe0(%rbp), %rdi
callq 0x8220
movq -0xe8(%rbp), %rdi
callq 0x68a8
movq -0xf0(%rbp), %rdi
callq 0x68a8
movq -0xd0(%rbp), %rdi
callq 0x8220
movq -0xd8(%rbp), %rdi
callq 0x68a8
movq -0xc0(%rbp), %rdi
callq 0x8220
movq -0xc8(%rbp), %rdi
callq 0x68a8
movq -0xb0(%rbp), %rdi
callq 0x8220
movq -0xb8(%rbp), %rdi
callq 0x68a8
movq -0xa0(%rbp), %rdi
callq 0x8220
movq -0xa8(%rbp), %rdi
callq 0x68a8
movq -0x90(%rbp), %rdi
callq 0x8220
movq -0x98(%rbp), %rdi
callq 0x68a8
movq -0x88(%rbp), %rdi
callq 0x8220
movq -0x80(%rbp), %rdi
callq 0x8220
movq -0x78(%rbp), %rdi
callq 0x68a8
movq -0x38(%rbp), %rdi
callq 0x8220
movq -0x48(%rbp), %rdi
callq 0x68a8
movq -0x50(%rbp), %rdi
callq 0x68a8
movq -0x58(%rbp), %rdi
callq 0x68a8
movq -0x60(%rbp), %rdi
callq 0x6140
movq -0x28(%rbp), %rdi
callq 0x67a0
nopw %cs:(%rax,%rax)