/* TargetManagement_pkg::internalOperators::extractTargetsFromMRSP */
void extractTargetsFromMRSP_TargetManagement_pkg_internalOperators(
  /* TargetManagement_pkg::internalOperators::extractTargetsFromMRSP::MRSP */ MRSP_internal_T_TargetManagement_types *MRSP,
  /* TargetManagement_pkg::internalOperators::extractTargetsFromMRSP::TargetsOfMRSP */ extractTargetsMRSPACC_TargetManagement_pkg *TargetsOfMRSP)
{
  kcg_int i;
  extractTargetsMRSPACC_TargetManagement_pkg tmp1;
  kcg_bool tmp;
  /* TargetManagement_pkg::internalOperators::extractTargetsFromMRSP::_L24 */ Target_list_MRSP_real_T_TargetManagement_types _L24;
  
  (*TargetsOfMRSP).lastInsertedTargetIndex = - 1;
  for (i = 0; i < 200; i++) {
    kcg_copy_Target_real_T_TargetManagement_types(
      &_L24[i],
      (Target_real_T_TargetManagement_types *)
        &emptyTargetMRSP_TargetManagement_pkg);
  }
  kcg_copy_Target_list_MRSP_real_T_TargetManagement_types(
    &(*TargetsOfMRSP).targetList,
    &_L24);
  if ((*MRSP)[0].valid) {
    for (i = 0; i < 200; i++) {
      kcg_copy_extractTargetsMRSPACC_TargetManagement_pkg(&tmp1, TargetsOfMRSP);
      /* 1 */
      extractTargetsFromMRSPInt_TargetManagement_pkg_internalOperators(
        i,
        &tmp1,
        MRSP,
        &tmp,
        TargetsOfMRSP);
      if (!tmp) {
        break;
      }
    }
  }
}
/* TargetManagement_pkg::internalOperators::extractTargetsFromMRSP */
void extractTargetsFromMRSP_TargetManagement_pkg_internalOperators(
  /* TargetManagement_pkg::internalOperators::extractTargetsFromMRSP::MRSP */ MRSP_internal_T_TargetManagement_types *MRSP,
  /* TargetManagement_pkg::internalOperators::extractTargetsFromMRSP::TargetsOfMRSP */ extractTargetsMRSPACC_TargetManagement_pkg *TargetsOfMRSP)
{
  /* TargetManagement_pkg::internalOperators::extractTargetsFromMRSP */
  static extractTargetsMRSPACC_TargetManagement_pkg acc;
  /* TargetManagement_pkg::internalOperators::extractTargetsFromMRSP */
  static kcg_bool cond_iterw;
  static kcg_int i;
  
  (*TargetsOfMRSP).lastInsertedTargetIndex = - 1;
  for (i = 0; i < 200; i++) {
    kcg_copy_Target_real_T_TargetManagement_types(
      &(*TargetsOfMRSP).targetList[i],
      (Target_real_T_TargetManagement_types *)
        &emptyTarget_TargetManagement_pkg);
  }
  if ((*MRSP)[0].valid) {
    for (i = 0; i < 200; i++) {
      kcg_copy_extractTargetsMRSPACC_TargetManagement_pkg(&acc, TargetsOfMRSP);
      /* 1 */
      extractTargetsFromMRSPInt_TargetManagement_pkg_internalOperators(
        i,
        &acc,
        MRSP,
        &cond_iterw,
        TargetsOfMRSP);
      if (!cond_iterw) {
        break;
      }
    }
  }
}