// File: /workspace/github_cpp_makefile_star2_O3/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 0x19348
leaq 0xf8(%r15), %r14
movq %r14, %rdi
callq 0x19348
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 0x7bca
leaq 0x40(%rsp), %rdi
movq %r13, %rsi
callq 0x7bca
leaq 0xa0(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x1f459(%rip), %rsi     # 0x3a2d5
leaq 0x1f456(%rip), %rdx     # 0x3a2d9
leaq 0x90(%rsp), %rdi
callq 0x9382
leaq 0xc8(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0x40(%rsp), %rdx
leaq 0x90(%rsp), %rcx
callq 0x193b6
leaq 0xc8(%rsp), %rsi
movq (%rsp), %rdi
callq 0x196d2
movq 0x148(%rsp), %rdi
callq 0x53d0
movq 0x130(%rsp), %rdi
testq %rdi, %rdi
je 0x1aeea
movq 0x140(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0x118(%rsp), %rdi
testq %rdi, %rdi
je 0x1af07
movq 0x128(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0x1af24
movq 0x100(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0x1af41
movq 0xe8(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0x90(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1af5e
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x5350
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1af75
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x1af8c
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
leaq 0x28(%rsp), %rdi
movq %r12, %rsi
callq 0x7bca
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x7bca
leaq 0x80(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x1f31c(%rip), %rsi     # 0x3a2d5
leaq 0x1f319(%rip), %rdx     # 0x3a2d9
leaq 0x70(%rsp), %rdi
callq 0x9382
leaq 0xc8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x10(%rsp), %rdx
leaq 0x70(%rsp), %rcx
callq 0x193b6
leaq 0xc8(%rsp), %rsi
movq %r14, %rdi
callq 0x196d2
movq 0x148(%rsp), %rdi
callq 0x53d0
movq 0x130(%rsp), %rdi
testq %rdi, %rdi
je 0x1b020
movq 0x140(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0x118(%rsp), %rdi
testq %rdi, %rdi
je 0x1b03d
movq 0x128(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0x1b05a
movq 0x100(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0x1b077
movq 0xe8(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0x70(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1b091
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x5350
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1b0a8
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x1b0bf
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
leaq 0xb0(%rsp), %rdi
movq %r13, %rsi
callq 0x7bca
movq 0x8(%r12), %rax
movsd -0x8(%rax), %xmm0
movq 0xb0(%rsp), %rdi
movq 0xb8(%rsp), %rax
xorpd %xmm1, %xmm1
cmpq %rax, %rdi
je 0x1b102
movq %rdi, %rcx
addsd (%rcx), %xmm1
addq $0x8, %rcx
cmpq %rax, %rcx
jne 0x1b0f5
subq %rdi, %rax
sarq $0x3, %rax
movq %rax, %xmm2
punpckldq 0x1c14a(%rip), %xmm2 # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1]
subpd 0x1c152(%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 0x1b14d
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 0x1b233
movq %rax, %r15
leaq 0xc8(%rsp), %rdi
callq 0x18702
jmp 0x1b179
movq %rax, %r15
movq 0x70(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1b198
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x5350
jmp 0x1b198
movq %rax, %r15
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1b1b4
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
jmp 0x1b1b4
movq %rax, %r15
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x1b236
movq 0x38(%rsp), %rsi
jmp 0x1b229
jmp 0x1b233
movq %rax, %r15
leaq 0xc8(%rsp), %rdi
callq 0x18702
jmp 0x1b1dc
movq %rax, %r15
movq 0x90(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1b1fe
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x5350
jmp 0x1b1fe
movq %rax, %r15
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1b21a
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
jmp 0x1b21a
movq %rax, %r15
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x1b236
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x5350
jmp 0x1b236
movq %rax, %r15
movq %r14, %rdi
callq 0x18702
movq (%rsp), %rdi
callq 0x18702
movq %r15, %rdi
callq 0x55e0
movq %rax, %r15
jmp 0x1b23e