code: def _classify_no_operation(self, regs_init, regs_fini, mem_fini, written_regs, read_regs):
          
          # TODO: Flags should be taken into account
  
          matches = []
  
          # Check that registers didn't change their value.
          regs_changed = any(regs_init[r] != regs_fini[r] for r in regs_init)
  
          # Check that flags didn't change their value.
          flags_changed = False
  
          # Check that memory didn't change.
          mem_changed = mem_fini.get_write_count() != 0
  
          if not regs_changed and not flags_changed and not mem_changed:
              matches.append({
                  "op": "nop",
              })
  
          return matches
docs: Classify no-operation gadgets.