// File: /workspace/github_cpp_makefile_star2_O2/sus304[P]ForRocket/src/rocket/engine.cpp
// Function: forrocket::Engine::Engine(std::vector<double, std::allocator<double>>, std::vector<double, std::allocator<double>>, std::vector<double, std::allocator<double>>, double, double, double)
forrocket::Engine::Engine(const std::vector<double> time_vector, const std::vector<double> thrust_vacuum_vector, const std::vector<double> mdot_prop_vector, const double area_exit,
                    const double mis_alignment_angle_y_axis, const double mis_alignment_angle_z_axis) {
    Reset();
    enable_gimbal = false;

    this->area_exit = area_exit;
    this->burn_duration = time_vector[time_vector.size()-1];
    this->mis_alignment_angle_y_axis = mis_alignment_angle_y_axis;
    this->mis_alignment_angle_z_axis = mis_alignment_angle_z_axis;

    thrust_vacuum_src = InterpolateParameter(time_vector, thrust_vacuum_vector, "zero");
    mdot_prop_src = InterpolateParameter(time_vector, mdot_prop_vector, "zero");

    getTotalImpulse(thrust_vacuum_vector, time_vector.back());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movsd %xmm2, 0x18(%rsp)
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
movq %rcx, %rbp
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %r15
movb $0x0, (%rdi)
leaq 0x58(%rdi), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x41(%rdi)
movq %rbx, %rdi
callq 0x14f9c
leaq 0xf8(%r15), %r14
movq %r14, %rdi
callq 0x14f9c
leaq 0x8(%r15), %rax
movb $0x0, (%r15)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
andq $0x0, 0x10(%rax)
movups %xmm0, 0x38(%r15)
movups %xmm0, 0x41(%r15)
movups %xmm0, 0x28(%r15)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x38(%r15)
movq 0x8(%r12), %rax
movsd -0x8(%rax), %xmm0
movsd %xmm0, 0x8(%r15)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x40(%r15)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x48(%r15)
leaq 0x68(%rsp), %rdi
movq %r12, %rsi
callq 0x614a
leaq 0x50(%rsp), %rdi
movq %r13, %rsi
callq 0x614a
leaq 0x1a7d4(%rip), %rsi     # 0x31465
leaq 0xa0(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x72de
leaq 0xd8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0x50(%rsp), %rdx
leaq 0xa0(%rsp), %rcx
callq 0x15004
leaq 0xd8(%rsp), %rsi
movq %rbx, %rdi
callq 0x15220
leaq 0xd8(%rsp), %rdi
callq 0x13f1a
leaq 0xa0(%rsp), %rdi
callq 0x5688
leaq 0x50(%rsp), %rdi
callq 0x6002
leaq 0x68(%rsp), %rdi
callq 0x6002
leaq 0x38(%rsp), %rdi
movq %r12, %rsi
callq 0x614a
leaq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0x614a
leaq 0x1a744(%rip), %rsi     # 0x31465
leaq 0x80(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x72de
leaq 0xd8(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x20(%rsp), %rdx
leaq 0x80(%rsp), %rcx
callq 0x15004
leaq 0xd8(%rsp), %rsi
movq %r14, %rdi
callq 0x15220
leaq 0xd8(%rsp), %rdi
callq 0x13f1a
leaq 0x80(%rsp), %rdi
callq 0x5688
leaq 0x20(%rsp), %rdi
callq 0x6002
leaq 0x38(%rsp), %rdi
callq 0x6002
leaq 0xc0(%rsp), %rdi
movq %r13, %rsi
callq 0x614a
movq 0x8(%r12), %rax
movsd -0x8(%rax), %xmm0
leaq 0xc0(%rsp), %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x16652
movq %rbx, %rdi
callq 0x6002
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x16e5d
movq %rax, %r15
leaq 0xd8(%rsp), %rdi
callq 0x13f1a
jmp 0x16df1
movq %rax, %r15
leaq 0x80(%rsp), %rdi
callq 0x5688
jmp 0x16e03
movq %rax, %r15
leaq 0x20(%rsp), %rdi
callq 0x6002
jmp 0x16e12
movq %rax, %r15
leaq 0x38(%rsp), %rdi
jmp 0x16e56
jmp 0x16e5d
movq %rax, %r15
leaq 0xd8(%rsp), %rdi
callq 0x13f1a
jmp 0x16e30
movq %rax, %r15
leaq 0xa0(%rsp), %rdi
callq 0x5688
jmp 0x16e42
movq %rax, %r15
leaq 0x50(%rsp), %rdi
callq 0x6002
jmp 0x16e51
movq %rax, %r15
leaq 0x68(%rsp), %rdi
callq 0x6002
jmp 0x16e60
movq %rax, %r15
movq %r14, %rdi
callq 0x13f1a
movq %rbx, %rdi
callq 0x13f1a
movq %r15, %rdi
callq 0x55b0
movq %rax, %r15
jmp 0x16e68
nop