private static bool OpcodeMatches(RegisterSample sample, Opcode opcode)
        {
            var valuesAfterOpcodeApplied = sample.InitialValues.Copy();

            opcode.UpdateRegisters(valuesAfterOpcodeApplied, sample.OpcodeInstruction.Instruction);

            return(valuesAfterOpcodeApplied.AreValuesEqual(sample.UpdatedValues));
        }
 private static Opcode[] FindMatchingOpcodes(RegisterSample result, Opcode[] opcodes)
 {
     return(opcodes
            .Where(o => OpcodeMatches(result, o))
            .ToArray());
 }