// File: /workspace/github_cpp_makefile_star2_O1/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)
addq $0x58, %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r15)
movups %xmm0, 0x18(%r15)
movups %xmm0, 0x28(%r15)
movups %xmm0, 0x38(%r15)
movups %xmm0, 0x41(%r15)
movq %rdi, (%rsp)
callq 0x19934
leaq 0xf8(%r15), %r14
movq %r14, %rdi
callq 0x19934
leaq 0x8(%r15), %rax
movb $0x0, (%r15)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $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 0x7b00
leaq 0x50(%rsp), %rdi
movq %r13, %rsi
callq 0x7b00
leaq 0xb0(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x1e95d(%rip), %rsi     # 0x3a2d5
leaq 0x1e95a(%rip), %rdx     # 0x3a2d9
leaq 0xa0(%rsp), %rdi
callq 0x92e2
leaq 0xd8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0x50(%rsp), %rdx
leaq 0xa0(%rsp), %rcx
callq 0x199a2
leaq 0xd8(%rsp), %rsi
movq (%rsp), %rdi
callq 0x19cc2
movq 0x158(%rsp), %rdi
callq 0x53d0
movq 0x140(%rsp), %rdi
testq %rdi, %rdi
je 0x1b9e6
movq 0x150(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0x128(%rsp), %rdi
testq %rdi, %rdi
je 0x1ba03
movq 0x138(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0x1ba20
movq 0x110(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0x1ba3d
movq 0xf8(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0xa0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1ba5a
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x5350
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x1ba71
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x1ba88
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
leaq 0x38(%rsp), %rdi
movq %r12, %rsi
callq 0x7b00
leaq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0x7b00
leaq 0x90(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x1e820(%rip), %rsi     # 0x3a2d5
leaq 0x1e81d(%rip), %rdx     # 0x3a2d9
leaq 0x80(%rsp), %rdi
callq 0x92e2
leaq 0xd8(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x20(%rsp), %rdx
leaq 0x80(%rsp), %rcx
callq 0x199a2
leaq 0xd8(%rsp), %rsi
movq %r14, %rdi
callq 0x19cc2
movq 0x158(%rsp), %rdi
callq 0x53d0
movq 0x140(%rsp), %rdi
testq %rdi, %rdi
je 0x1bb22
movq 0x150(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0x128(%rsp), %rdi
testq %rdi, %rdi
je 0x1bb3f
movq 0x138(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0x1bb5c
movq 0x110(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0x1bb79
movq 0xf8(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0x80(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1bb96
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x5350
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1bbad
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x1bbc4
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
leaq 0xc0(%rsp), %rdi
movq %r13, %rsi
callq 0x7b00
movq 0x8(%r12), %rax
movsd -0x8(%rax), %xmm0
movq 0xc0(%rsp), %rdi
movq 0xc8(%rsp), %rax
xorpd %xmm1, %xmm1
cmpq %rax, %rdi
je 0x1bc07
movq %rdi, %rcx
addsd (%rcx), %xmm1
addq $0x8, %rcx
cmpq %rax, %rcx
jne 0x1bbfa
subq %rdi, %rax
sarq $0x3, %rax
movq %rax, %xmm2
punpckldq 0x1b645(%rip), %xmm2 # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1]
subpd 0x1b64d(%rip), %xmm2    # 0x37270
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
addsd %xmm2, %xmm3
divsd %xmm3, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, 0x20(%r15)
testq %rdi, %rdi
je 0x1bc52
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1bd3b
movq %rax, %r15
leaq 0xd8(%rsp), %rdi
callq 0x18cce
jmp 0x1bc7e
movq %rax, %r15
movq 0x80(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1bca0
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x5350
jmp 0x1bca0
movq %rax, %r15
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1bcbc
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
jmp 0x1bcbc
movq %rax, %r15
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x1bd3e
movq 0x48(%rsp), %rsi
jmp 0x1bd31
jmp 0x1bd3b
movq %rax, %r15
leaq 0xd8(%rsp), %rdi
callq 0x18cce
jmp 0x1bce4
movq %rax, %r15
movq 0xa0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1bd06
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x5350
jmp 0x1bd06
movq %rax, %r15
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x1bd22
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
jmp 0x1bd22
movq %rax, %r15
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x1bd3e
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
jmp 0x1bd3e
movq %rax, %r15
movq %r14, %rdi
callq 0x18cce
movq (%rsp), %rdi
callq 0x18cce
movq %r15, %rdi
callq 0x55e0
movq %rax, %r15
jmp 0x1bd46