docs: def rs_correct_msg_nofsynd(msg_in, nsym, fcr=0, generator=2, erase_pos=None, only_erasures=False):
      '''Reed-Solomon main decoding function, without using the modified Forney syndromes'''
      global field_charac
      if len(msg_in) > field_charac:
          raise ValueError("Message is too long (%i when max is %i)" % (len(msg_in), field_charac))
  
      msg_out = bytearray(msg_in)     # copy of message
      # erasures: set them to null bytes for easier decoding (but this is not necessary, they will be corrected anyway, but debugging will be easier with null bytes because the error locator polynomial values will only depend on the errors locations, not their values)
      if erase_pos is None:
          erase_pos = []
      else:
          for e_pos in erase_pos:
              msg_out[e_pos] = 0
      # check if there are too many erasures
      if len(erase_pos) > nsym: raise ReedSolomonError("Too many erasures to correct")
      # prepare the syndrome polynomial using only errors (ie: errors = characters that were either replaced by null byte or changed to another character, but we don't know their positions)
      synd = rs_calc_syndromes(msg_out, nsym, fcr, generator)
      # check if there's any error/erasure in the input codeword. If not (all syndromes coefficients are 0), then just return the codeword as-is.
      if max(synd) == 0:
          return msg_out[:-nsym], msg_out[-nsym:]  # no errors
  
      # prepare erasures locator and evaluator polynomials
      erase_loc = None
      #erase_eval = None
      erase_count = 0
      if erase_pos:
          erase_count = len(erase_pos)
          erase_pos_reversed = [len(msg_out)-1-eras for eras in erase_pos]
          erase_loc = rs_find_errata_locator(erase_pos_reversed, generator=generator)
          #erase_eval = rs_find_error_evaluator(synd[::-1], erase_loc, len(erase_loc)-1)
  
      # prepare errors/errata locator polynomial
      if only_erasures:
          err_loc = erase_loc[::-1]
          #err_eval = erase_eval[::-1]
      else:
          err_loc = rs_find_error_locator(synd, nsym, erase_loc=erase_loc, erase_count=erase_count)
          err_loc = err_loc[::-1]
          #err_eval = rs_find_error_evaluator(synd[::-1], err_loc[::-1], len(err_loc)-1)[::-1] # find error/errata evaluator polynomial (not really necessary since we already compute it at the same time as the error locator poly in BM)
  
      # locate the message errors
      err_pos = rs_find_errors(err_loc, len(msg_out), generator) # find the roots of the errata locator polynomial (ie: the positions of the errors/errata)
      if err_pos is None:
          raise ReedSolomonError("Could not locate error")
  
      # compute errata evaluator and errata magnitude polynomials, then correct errors and erasures
      msg_out = rs_correct_errata(msg_out, synd, err_pos, fcr=fcr, generator=generator)
      # check if the final message is fully repaired
      synd = rs_calc_syndromes(msg_out, nsym, fcr, generator)
      if max(synd) > 0:
          raise ReedSolomonError("Could not correct message")
      # return the successfully decoded message
      return msg_out[:-nsym], msg_out[-nsym:]