// 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)
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) {
    Reset();
    enable_gimbal = false;

    this->area_exit = area_exit;
    this->burn_duration = time_vector[time_vector.size()-1];
    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 $0x168, %rsp            # imm = 0x168
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)
leaq 0x58(%rsp), %rdi
movq %r12, %rsi
callq 0x7b00
leaq 0x40(%rsp), %rdi
movq %r13, %rsi
callq 0x7b00
leaq 0xa0(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x1ee25(%rip), %rsi     # 0x3a2d5
leaq 0x1ee22(%rip), %rdx     # 0x3a2d9
leaq 0x90(%rsp), %rdi
callq 0x92e2
leaq 0xc8(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0x40(%rsp), %rdx
leaq 0x90(%rsp), %rcx
callq 0x199a2
leaq 0xc8(%rsp), %rsi
movq (%rsp), %rdi
callq 0x19cc2
movq 0x148(%rsp), %rdi
callq 0x53d0
movq 0x130(%rsp), %rdi
testq %rdi, %rdi
je 0x1b51e
movq 0x140(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0x118(%rsp), %rdi
testq %rdi, %rdi
je 0x1b53b
movq 0x128(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0x1b558
movq 0x100(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0x1b575
movq 0xe8(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0x90(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1b592
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x5350
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1b5a9
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x1b5c0
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
leaq 0x28(%rsp), %rdi
movq %r12, %rsi
callq 0x7b00
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x7b00
leaq 0x80(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x1ece8(%rip), %rsi     # 0x3a2d5
leaq 0x1ece5(%rip), %rdx     # 0x3a2d9
leaq 0x70(%rsp), %rdi
callq 0x92e2
leaq 0xc8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x10(%rsp), %rdx
leaq 0x70(%rsp), %rcx
callq 0x199a2
leaq 0xc8(%rsp), %rsi
movq %r14, %rdi
callq 0x19cc2
movq 0x148(%rsp), %rdi
callq 0x53d0
movq 0x130(%rsp), %rdi
testq %rdi, %rdi
je 0x1b654
movq 0x140(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0x118(%rsp), %rdi
testq %rdi, %rdi
je 0x1b671
movq 0x128(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0x1b68e
movq 0x100(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0x1b6ab
movq 0xe8(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0x70(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1b6c5
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x5350
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1b6dc
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x1b6f3
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
leaq 0xb0(%rsp), %rdi
movq %r13, %rsi
callq 0x7b00
movq 0x8(%r12), %rax
movsd -0x8(%rax), %xmm0
movq 0xb0(%rsp), %rdi
movq 0xb8(%rsp), %rax
xorpd %xmm1, %xmm1
cmpq %rax, %rdi
je 0x1b736
movq %rdi, %rcx
addsd (%rcx), %xmm1
addq $0x8, %rcx
cmpq %rax, %rcx
jne 0x1b729
subq %rdi, %rax
sarq $0x3, %rax
movq %rax, %xmm2
punpckldq 0x1bb16(%rip), %xmm2 # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1]
subpd 0x1bb1e(%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 0x1b781
movq 0xc0(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1b867
movq %rax, %r15
leaq 0xc8(%rsp), %rdi
callq 0x18cce
jmp 0x1b7ad
movq %rax, %r15
movq 0x70(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1b7cc
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x5350
jmp 0x1b7cc
movq %rax, %r15
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1b7e8
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
jmp 0x1b7e8
movq %rax, %r15
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x1b86a
movq 0x38(%rsp), %rsi
jmp 0x1b85d
jmp 0x1b867
movq %rax, %r15
leaq 0xc8(%rsp), %rdi
callq 0x18cce
jmp 0x1b810
movq %rax, %r15
movq 0x90(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1b832
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x5350
jmp 0x1b832
movq %rax, %r15
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1b84e
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
jmp 0x1b84e
movq %rax, %r15
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x1b86a
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
jmp 0x1b86a
movq %rax, %r15
movq %r14, %rdi
callq 0x18cce
movq (%rsp), %rdi
callq 0x18cce
movq %r15, %rdi
callq 0x55e0
movq %rax, %r15
jmp 0x1b872