// File: sus304[P]ForRocket/src/rocket/flight_data_recorder.cpp
// Function: forrocket::FlightDataRecorder::operator()(std::array<double, 14ul> const&, double)
void forrocket::FlightDataRecorder::operator()(const DynamicsBase::state& x, const double t) {
    if (p_rocket->position.LLH(2) >= 0.0) {
        countup_time.push_back(t);
        countup_burn_time.push_back(p_rocket->burn_clock.countup_time);
        thrust.push_back(p_rocket->engine.thrust);
        mdot_prop.push_back(p_rocket->engine.mdot_prop);
        burning.push_back(p_rocket->engine.burning);
        gimbal_angle_y_axis.push_back(p_rocket->engine.gimbal_angle_y_axis);
        gimbal_angle_z_axis.push_back(p_rocket->engine.gimbal_angle_z_axis);
        mass_prop.push_back(p_rocket->mass.propellant);
        mass.push_back(p_rocket->mass.inert + p_rocket->mass.propellant);
        length_CG.push_back(p_rocket->length_CG);
        length_CP.push_back(p_rocket->length_CP);
        inertia_tensor.push_back(p_rocket->inertia_tensor);
        CA.push_back(p_rocket->CA);
        CNa.push_back(p_rocket->CNa);
        Cld.push_back(p_rocket->Cld);
        Clp.push_back(p_rocket->Clp);
        Cmq.push_back(p_rocket->Cmq);
        position.push_back(p_rocket->position);
        velocity.push_back(p_rocket->velocity);
        dynamic_pressure.push_back(p_rocket->dynamic_pressure);
        acceleration.push_back(p_rocket->acceleration);
        force.push_back(p_rocket->force);
        attitude.push_back(p_rocket->attitude);
        quaternion_dot.push_back(p_rocket->quaternion_dot);
        angular_velocity.push_back(p_rocket->angular_velocity);
        angular_acceleration.push_back(p_rocket->angular_acceleration);
        angle_of_attack.push_back(p_rocket->angle_of_attack);
        sideslip_angle.push_back(p_rocket->sideslip_angle);
        moment.push_back(p_rocket->moment);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq (%rax), %rdi
addq $0x2a0, %rdi            # imm = 0x2A0
addq $0x30, %rdi
movl $0x2, %esi
callq 0x372d0
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x44802
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
leaq -0x18(%rbp), %rsi
callq 0x4a040
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x20, %rdi
movq (%rax), %rsi
addq $0x38, %rsi
callq 0x4a040
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x38, %rdi
movq (%rax), %rsi
addq $0x48, %rsi
addq $0x10, %rsi
callq 0x4a040
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x50, %rdi
movq (%rax), %rsi
addq $0x48, %rsi
addq $0x18, %rsi
callq 0x4a040
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x68, %rdi
movq (%rax), %rax
movb 0x48(%rax), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x175b0
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x90, %rdi
movq (%rax), %rsi
addq $0x48, %rsi
addq $0x28, %rsi
callq 0x4a040
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0xa8, %rdi
movq (%rax), %rsi
addq $0x48, %rsi
addq $0x30, %rsi
callq 0x4a040
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0xc0, %rdi
movq (%rax), %rsi
addq $0x210, %rsi            # imm = 0x210
addq $0x8, %rsi
callq 0x4a040
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0xd8, %rdi
movq (%rax), %rcx
movsd 0x210(%rcx), %xmm0
movq (%rax), %rax
addsd 0x218(%rax), %xmm0
movsd %xmm0, -0x20(%rbp)
leaq -0x20(%rbp), %rsi
callq 0x77e0
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0xf0, %rdi
movq (%rax), %rsi
addq $0x200, %rsi            # imm = 0x200
callq 0x4a040
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x108, %rdi            # imm = 0x108
movq (%rax), %rsi
addq $0x208, %rsi            # imm = 0x208
callq 0x4a040
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x120, %rdi            # imm = 0x120
movq (%rax), %rsi
addq $0x220, %rsi            # imm = 0x220
callq 0x4a0b0
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x138, %rdi            # imm = 0x138
movq (%rax), %rsi
addq $0x268, %rsi            # imm = 0x268
callq 0x4a040
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x150, %rdi            # imm = 0x150
movq (%rax), %rsi
addq $0x270, %rsi            # imm = 0x270
callq 0x4a040
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x168, %rdi            # imm = 0x168
movq (%rax), %rsi
addq $0x278, %rsi            # imm = 0x278
callq 0x4a040
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x180, %rdi            # imm = 0x180
movq (%rax), %rsi
addq $0x280, %rsi            # imm = 0x280
callq 0x4a040
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x198, %rdi            # imm = 0x198
movq (%rax), %rsi
addq $0x288, %rsi            # imm = 0x288
callq 0x4a040
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x1b0, %rdi            # imm = 0x1B0
movq (%rax), %rsi
addq $0x2a0, %rsi            # imm = 0x2A0
callq 0x4a120
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x1c8, %rdi            # imm = 0x1C8
movq (%rax), %rsi
addq $0x2e8, %rsi            # imm = 0x2E8
callq 0x4a190
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x1e0, %rdi            # imm = 0x1E0
movq (%rax), %rsi
addq $0x350, %rsi            # imm = 0x350
callq 0x4a040
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x1f8, %rdi            # imm = 0x1F8
movq (%rax), %rsi
addq $0x358, %rsi            # imm = 0x358
callq 0x4a200
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x210, %rdi            # imm = 0x210
movq (%rax), %rsi
addq $0x388, %rsi            # imm = 0x388
callq 0x4a270
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x228, %rdi            # imm = 0x228
movq (%rax), %rsi
addq $0x3d0, %rsi            # imm = 0x3D0
callq 0x4a2e0
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x240, %rdi            # imm = 0x240
movq (%rax), %rsi
addq $0x410, %rsi            # imm = 0x410
callq 0x4a350
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x258, %rdi            # imm = 0x258
movq (%rax), %rsi
addq $0x430, %rsi            # imm = 0x430
callq 0x4a3c0
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x270, %rdi            # imm = 0x270
movq (%rax), %rsi
addq $0x448, %rsi            # imm = 0x448
callq 0x4a3c0
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x288, %rdi            # imm = 0x288
movq (%rax), %rsi
addq $0x460, %rsi            # imm = 0x460
callq 0x4a040
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x2a0, %rdi            # imm = 0x2A0
movq (%rax), %rsi
addq $0x468, %rsi            # imm = 0x468
callq 0x4a040
movq -0x28(%rbp), %rax
movq %rax, %rdi
addq $0x2b8, %rdi            # imm = 0x2B8
movq (%rax), %rsi
addq $0x470, %rsi            # imm = 0x470
callq 0x4a430
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)