/* Amsterdam_Utrecht_Lijn1_balises1 */
void Amsterdam_Utrecht_Lijn1_b(
  /* Amsterdam_Utrecht_Lijn1_balises1::TrainPosSim_in */kcg_real TrainPosSim_in,
  outC_Amsterdam_Utrecht_Lijn1_b *outC)
{
  outC->_L16 = TrainPosSim_in;
  /* 1 */ TrackInit_InfraLib(outC->_L16, 0, &outC->Context_1);
  kcg_copy_TrackSectionData_T_InfraLib(
    &outC->_L15,
    &outC->Context_1.SectionData_out);
  /* 1 */
  TrackDiscontinuity_InfraLib(&outC->_L15, 104775, 105650, &outC->_1_Context_1);
  kcg_copy_TrackSectionData_T_InfraLib(
    &outC->_L13,
    &outC->_1_Context_1.SectionData_out);
  /* 1 */
  Balises0001_Amstel_UB_Sig_AmsterdamUtrechtL2_Sheet05_Amstel_Balises(
    &outC->_L13,
    &outC->_2_Context_1);
  kcg_copy_TrackSectionData_T_InfraLib(
    &outC->_L1,
    &outC->_2_Context_1.SectionData_out);
  /* 1 */ TrackClose_InfraLib(&outC->_L1, &outC->_3_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L17,
    &outC->_3_Context_1.BaliseMessage);
  kcg_copy_CompressedBaliseMessage_TM(&outC->BaliseMessage, &outC->_L17);
}
/* Internal_Tests::DriveAllBGs */
void DriveAllBGs_Internal_Tests(void)
{
  static NID_BG noname;
  
  Ctxt_DriveAllBGs_Internal_Tests._L1 = reset;
  /* 1 */
  TriggerAllBalisesInSequence_Internal_Tests(
    Ctxt_DriveAllBGs_Internal_Tests._L1,
    &Ctxt_DriveAllBGs_Internal_Tests.Context_1);
  Ctxt_DriveAllBGs_Internal_Tests._L2 =
    Ctxt_DriveAllBGs_Internal_Tests.Context_1.TrainPos;
  Ctxt_DriveAllBGs_Internal_Tests._L3 =
    Ctxt_DriveAllBGs_Internal_Tests.Context_1.nid_BG;
  /* 1 */
  Amsterdam_Utrecht_Lijn1_b_AmsterdamUtrechtL2_AmsterdamUtrechtTrack1(
    Ctxt_DriveAllBGs_Internal_Tests._L2,
    &Ctxt_DriveAllBGs_Internal_Tests._1_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &Ctxt_DriveAllBGs_Internal_Tests._L4,
    &Ctxt_DriveAllBGs_Internal_Tests._1_Context_1.BaliseMessage);
  noname = Ctxt_DriveAllBGs_Internal_Tests._L3;
  kcg_copy_CompressedBaliseMessage_TM(
    &BG_data,
    &Ctxt_DriveAllBGs_Internal_Tests._L4);
}
/* InfraLib::TrackClose */
void TrackClose_InfraLib(
  /* InfraLib::TrackClose::SectionData_in */TrackSectionData_T_InfraLib *SectionData_in,
  outC_TrackClose_InfraLib *outC)
{
  kcg_copy_TrackSectionData_T_InfraLib(&outC->_L1, SectionData_in);
  kcg_copy_CompressedBaliseMessage_TM(&outC->_L6, &outC->_L1.BG_Message);
  kcg_copy_CompressedBaliseMessage_TM(&outC->BaliseMessage, &outC->_L6);
}
/* AmsterdamUtrechtL2::Sheet15_MaarssenUtrechtCS_Balises::Balise_Group_439 */
void Balise_Group_439_AmsterdamUtrechtL2_Sheet15_MaarssenUtrechtCS_Balises(
  /* AmsterdamUtrechtL2::Sheet15_MaarssenUtrechtCS_Balises::Balise_Group_439::BG_message_in */CompressedBaliseMessage_TM *BG_message_in,
  /* AmsterdamUtrechtL2::Sheet15_MaarssenUtrechtCS_Balises::Balise_Group_439::TrainPos */kcg_real _1_TrainPos,
  /* AmsterdamUtrechtL2::Sheet15_MaarssenUtrechtCS_Balises::Balise_Group_439::Engineering_Data */BaliseGroupData_TM *Engineering_Data,
  outC_Balise_Group_439_AmsterdamUtrechtL2_Sheet15_MaarssenUtrechtCS_Balises *outC)
{
  static kcg_bool noname;
  
  kcg_copy_CompressedBaliseMessage_TM(&outC->_L29, BG_message_in);
  outC->_L28 = _1_TrainPos;
  kcg_copy_BaliseGroupData_TM(&outC->_L19, Engineering_Data);
  /* 1 */ Balise_Group_Init_InfraLib(outC->_L28, &outC->_L19, &outC->Context_1);
  kcg_copy_B_data_internal_T_InfraLib(
    &outC->_L11,
    &outC->Context_1.BG_internal_out);
  kcg_copy_B_data_internal_T_InfraLib(&outC->BaliseDataIn, &outC->_L11);
  kcg_copy_B_data_internal_T_InfraLib(&outC->_L9, &outC->BaliseDataIn);
  outC->_L20 = 0;
  /* 1 */
  Balise_439_1_AmsterdamUtrechtL2_Sheet15_MaarssenUtrechtCS_Balises(
    &outC->_L9,
    (BaliseTelegramHeader_int_T_TM *) &BG439_header_B1_Balises426,
    outC->_L20,
    &outC->_1_Context_1);
  kcg_copy_B_data_internal_T_InfraLib(
    &outC->_L8,
    &outC->_1_Context_1.B_data_out);
  outC->_L21 = 1;
  /* 1 */
  Balise_439_0_AmsterdamUtrechtL2_Sheet15_MaarssenUtrechtCS_Balises(
    &outC->_L8,
    (BaliseTelegramHeader_int_T_TM *) &BG439_header_B0_Balises426,
    outC->_L21,
    &outC->_2_Context_1);
  kcg_copy_B_data_internal_T_InfraLib(
    &outC->_L7,
    &outC->_2_Context_1.B_data_out);
  kcg_copy_B_data_internal_T_InfraLib(&outC->BaliseDataOut, &outC->_L7);
  kcg_copy_B_data_internal_T_InfraLib(&outC->_L16, &outC->BaliseDataOut);
  /* 1 */
  Balise_Group_Close_InfraLib(&outC->_L16, &outC->_L29, &outC->_3_Context_1);
  outC->_L14 = outC->_3_Context_1.Error_out;
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L13,
    &outC->_3_Context_1.BG_message_out);
  noname = outC->_L14;
  kcg_copy_CompressedBaliseMessage_TM(&outC->BG_message_out, &outC->_L13);
}
/* InfraLib::TrackClose */
void TrackClose_InfraLib(
  /* InfraLib::TrackClose::SectionData_in */TrackSectionData_T_InfraLib *SectionData_in,
  /* InfraLib::TrackClose::BaliseMessage */CompressedBaliseMessage_TM *BaliseMessage)
{
  kcg_copy_CompressedBaliseMessage_TM(
    BaliseMessage,
    &(*SectionData_in).BG_Message);
}
/* US_Integration_June::Amsterdam_Utrecht */
void Amsterdam_Utrecht_US_Integration_June(void)
{
  Ctxt_Amsterdam_Utrecht_US_Integration_June._L2 = TrainPos;
  /* 1 */
  Amsterdam_Utrecht_Lijn1_b_AmsterdamUtrechtL2_AmsterdamUtrechtTrack1(
    Ctxt_Amsterdam_Utrecht_US_Integration_June._L2,
    &Ctxt_Amsterdam_Utrecht_US_Integration_June.Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &Ctxt_Amsterdam_Utrecht_US_Integration_June._L1,
    &Ctxt_Amsterdam_Utrecht_US_Integration_June.Context_1.BaliseMessage);
  kcg_copy_CompressedPackets_T_Common_Types_Pkg(
    &Ctxt_Amsterdam_Utrecht_US_Integration_June._L6,
    &Ctxt_Amsterdam_Utrecht_US_Integration_June._L1.Messages);
  Ctxt_Amsterdam_Utrecht_US_Integration_June._L13 = Trigger_in;
  /* 1 */
  Amsterdam_Utrecht_RBC_Int_US_Integration_June(
    Ctxt_Amsterdam_Utrecht_US_Integration_June._L13,
    &Ctxt_Amsterdam_Utrecht_US_Integration_June._1_Context_1);
  kcg_copy_Radio_TrackTrain_Header_T_Radio_Types_Pkg(
    &Ctxt_Amsterdam_Utrecht_US_Integration_June._L8,
    &Ctxt_Amsterdam_Utrecht_US_Integration_June._1_Context_1.RadioTrackTrainHeader_out);
  kcg_copy_CompressedPackets_T_Common_Types_Pkg(
    &Ctxt_Amsterdam_Utrecht_US_Integration_June._L9,
    &Ctxt_Amsterdam_Utrecht_US_Integration_June._1_Context_1.Compressed_Packets_out);
  kcg_copy_CompressedRadioMessage_TM(
    &Ctxt_Amsterdam_Utrecht_US_Integration_June._L10,
    &Ctxt_Amsterdam_Utrecht_US_Integration_June._1_Context_1.Compressed_Radio_Message_out);
  kcg_copy_CompressedRadioMessage_TM(
    &Compressed_Radio_Message_out,
    &Ctxt_Amsterdam_Utrecht_US_Integration_June._L10);
  kcg_copy_CompressedPackets_T_Common_Types_Pkg(
    &Compressed_Packets_out,
    &Ctxt_Amsterdam_Utrecht_US_Integration_June._L9);
  kcg_copy_Radio_TrackTrain_Header_T_Radio_Types_Pkg(
    &RadioTrackTrainHeader_out,
    &Ctxt_Amsterdam_Utrecht_US_Integration_June._L8);
  kcg_copy_BaliseTelegramHeader_int_T_TM(
    &Ctxt_Amsterdam_Utrecht_US_Integration_June._L5,
    &Ctxt_Amsterdam_Utrecht_US_Integration_June._L1.Header);
  /* 1 */
  CASTLIB_BaliseHeaders_TM_conversions(
    &Ctxt_Amsterdam_Utrecht_US_Integration_June._L5,
    &Ctxt_Amsterdam_Utrecht_US_Integration_June._2_Context_1);
  kcg_copy_TelegramHeader_T_BG_Types_Pkg(
    &Ctxt_Amsterdam_Utrecht_US_Integration_June._L7,
    &Ctxt_Amsterdam_Utrecht_US_Integration_June._2_Context_1.Out);
  kcg_copy_TelegramHeader_T_BG_Types_Pkg(
    &Balise_Header,
    &Ctxt_Amsterdam_Utrecht_US_Integration_June._L7);
  kcg_copy_CompressedPackets_T_Common_Types_Pkg(
    &Balise_Packets,
    &Ctxt_Amsterdam_Utrecht_US_Integration_June._L6);
}
/* InfraLib::TrackInit */
void TrackInit_InfraLib(
  /* InfraLib::TrackInit::TrainPosIn */kcg_real TrainPosIn,
  /* InfraLib::TrackInit::InitialOffset */kcg_int InitialOffset,
  /* InfraLib::TrackInit::SectionData_out */TrackSectionData_T_InfraLib *SectionData_out)
{
  (*SectionData_out).TrainPosRaw.TrainPos_in = TrainPosIn;
  (*SectionData_out).TrainPosRaw.OffsetTotal = InitialOffset;
  (*SectionData_out).TrainPosRaw.TrainPosCalibrated = 0.0;
  kcg_copy_CompressedBaliseMessage_TM(
    &(*SectionData_out).BG_Message,
    (CompressedBaliseMessage_TM *) &DEFAULT_BTMMessage_TM);
}
/* AmsterdamUtrechtL2::Sheet07_BijlmerAbcoude_Balises::Balises0004_BijlmerAbcoude */
void Balises0004_BijlmerAbcoude_AmsterdamUtrechtL2_Sheet07_BijlmerAbcoude_Balises(
  /* AmsterdamUtrechtL2::Sheet07_BijlmerAbcoude_Balises::Balises0004_BijlmerAbcoude::SectionData_in */TrackSectionData_T_InfraLib *SectionData_in,
  outC_Balises0004_BijlmerAbcoude_AmsterdamUtrechtL2_Sheet07_BijlmerAbcoude_Balises *outC)
{
  kcg_copy_TrackSectionData_T_InfraLib(&outC->_L6, SectionData_in);
  kcg_copy_CompressedBaliseMessage_TM(&outC->_L3, &outC->_L6.BG_Message);
  outC->_L2 = outC->_L6.TrainPosRaw.TrainPosCalibrated;
  /* 1 */
  Balise_Group_371_AmsterdamUtrechtL2_Sheet07_BijlmerAbcoude_Balises(
    &outC->_L3,
    outC->_L2,
    (BaliseGroupData_TM *) &BG371_Balises426,
    &outC->Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L1,
    &outC->Context_1.BG_message_out);
  /* 1 */
  Balise_Group_372_AmsterdamUtrechtL2_Sheet07_BijlmerAbcoude_Balises(
    &outC->_L1,
    outC->_L2,
    (BaliseGroupData_TM *) &BG372_Balises426,
    &outC->_1_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L7,
    &outC->_1_Context_1.BG_message_out);
  /* 2 */
  Balise_Group_373_AmsterdamUtrechtL2_Sheet07_BijlmerAbcoude_Balises(
    &outC->_L7,
    outC->_L2,
    (BaliseGroupData_TM *) &BG373_Balises426,
    &outC->Context_2);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L8,
    &outC->Context_2.BG_message_out);
  kcg_copy_TrackSectionData_T_InfraLib(&outC->_L4, &outC->_L6);
  if (kcg_true) {
    kcg_copy_CompressedBaliseMessage_TM(&outC->_L4.BG_Message, &outC->_L8);
  }
  kcg_copy_TrackSectionData_T_InfraLib(&outC->SectionData_out, &outC->_L4);
}
/* AmsterdamUtrechtL2::Sheet05_Amstel_Balises::Balises0002_Amstel_UB_Signal_613_to_617 */
void Balises0002_Amstel_UB_Sig_AmsterdamUtrechtL2_Sheet05_Amstel_Balises(
  /* AmsterdamUtrechtL2::Sheet05_Amstel_Balises::Balises0002_Amstel_UB_Signal_613_to_617::SectionData_in */TrackSectionData_T_InfraLib *SectionData_in,
  outC_Balises0002_Amstel_UB_Sig_AmsterdamUtrechtL2_Sheet05_Amstel_Balises *outC)
{
  kcg_copy_TrackSectionData_T_InfraLib(&outC->_L6, SectionData_in);
  kcg_copy_CompressedBaliseMessage_TM(&outC->_L3, &outC->_L6.BG_Message);
  outC->_L2 = outC->_L6.TrainPosRaw.TrainPosCalibrated;
  /* 2 */
  Balise_Group_353_AmsterdamUtrechtL2_Sheet05_Amstel_Balises(
    &outC->_L3,
    outC->_L2,
    (BaliseGroupData_TM *) &BG353_Balises426,
    &outC->Context_2);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L1,
    &outC->Context_2.BG_message_out);
  kcg_copy_TrackSectionData_T_InfraLib(&outC->_L4, &outC->_L6);
  if (kcg_true) {
    kcg_copy_CompressedBaliseMessage_TM(&outC->_L4.BG_Message, &outC->_L1);
  }
  kcg_copy_TrackSectionData_T_InfraLib(&outC->SectionData_out, &outC->_L4);
}
/* AmsterdamUtrechtL2::Sheet05_Amstel_Balises::Balises0001_Amstel_UB_Signal_611_to_613 */
void Balises0001_Amstel_UB_Sig_AmsterdamUtrechtL2_Sheet05_Amstel_Balises(
  /* AmsterdamUtrechtL2::Sheet05_Amstel_Balises::Balises0001_Amstel_UB_Signal_611_to_613::SectionData_in */TrackSectionData_T_InfraLib *SectionData_in,
  outC_Balises0001_Amstel_UB_Sig_AmsterdamUtrechtL2_Sheet05_Amstel_Balises *outC)
{
  kcg_copy_TrackSectionData_T_InfraLib(&outC->_L3, SectionData_in);
  kcg_copy_CompressedBaliseMessage_TM(&outC->_L13, &outC->_L3.BG_Message);
  outC->_L14 = outC->_L3.TrainPosRaw.TrainPosCalibrated;
  /* 1 */
  Balise_Group_352_AmsterdamUtrechtL2_Sheet05_Amstel_Balises(
    &outC->_L13,
    outC->_L14,
    (BaliseGroupData_TM *) &BG352_Balises426,
    &outC->Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L1,
    &outC->Context_1.BG_message_out);
  kcg_copy_TrackSectionData_T_InfraLib(&outC->_L15, &outC->_L3);
  if (kcg_true) {
    kcg_copy_CompressedBaliseMessage_TM(&outC->_L15.BG_Message, &outC->_L1);
  }
  kcg_copy_TrackSectionData_T_InfraLib(&outC->SectionData_out, &outC->_L15);
}
/* AmsterdamUtrechtL2::Sheet13_Breukelen_Maarssen_Balises::Balises0010_Breukelen_Maarssen */
void Balises0010_Breukelen_Maa_AmsterdamUtrechtL2_Sheet13_Breukelen_Maarssen_Balises(
  /* AmsterdamUtrechtL2::Sheet13_Breukelen_Maarssen_Balises::Balises0010_Breukelen_Maarssen::SectionData_in */TrackSectionData_T_InfraLib *SectionData_in,
  outC_Balises0010_Breukelen_Maa_AmsterdamUtrechtL2_Sheet13_Breukelen_Maarssen_Balises *outC)
{
  kcg_copy_TrackSectionData_T_InfraLib(&outC->_L6, SectionData_in);
  kcg_copy_CompressedBaliseMessage_TM(&outC->_L3, &outC->_L6.BG_Message);
  outC->_L2 = outC->_L6.TrainPosRaw.TrainPosCalibrated;
  /* 1 */
  Balise_Group_420_AmsterdamUtrechtL2_Sheet13_Breukelen_Maarssen_Balises(
    &outC->_L3,
    outC->_L2,
    (BaliseGroupData_TM *) &BG420_Balises426,
    &outC->Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L1,
    &outC->Context_1.BG_message_out);
  /* 1 */
  Balise_Group_421_AmsterdamUtrechtL2_Sheet13_Breukelen_Maarssen_Balises(
    &outC->_L1,
    outC->_L2,
    (BaliseGroupData_TM *) &BG421_Balises426,
    &outC->_1_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L7,
    &outC->_1_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_422_AmsterdamUtrechtL2_Sheet13_Breukelen_Maarssen_Balises(
    &outC->_L7,
    outC->_L2,
    (BaliseGroupData_TM *) &BG422_Balises426,
    &outC->_2_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L8,
    &outC->_2_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_423_AmsterdamUtrechtL2_Sheet13_Breukelen_Maarssen_Balises(
    &outC->_L8,
    outC->_L2,
    (BaliseGroupData_TM *) &BG423_Balises426,
    &outC->_3_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L9,
    &outC->_3_Context_1.BG_message_out);
  kcg_copy_TrackSectionData_T_InfraLib(&outC->_L4, &outC->_L6);
  if (kcg_true) {
    kcg_copy_CompressedBaliseMessage_TM(&outC->_L4.BG_Message, &outC->_L9);
  }
  kcg_copy_TrackSectionData_T_InfraLib(&outC->SectionData_out, &outC->_L4);
}
/* UNISIG_Validation_Scenarios::Test_Track_Elements::Test_Balises::Test_BG022_200_8BT */
void Test_BG022_200_8BT_UNISIG_Validation_Scenarios_Test_Track_Elements_Test_Balises(
    /* UNISIG_Validation_Scenarios::Test_Track_Elements::Test_Balises::Test_BG022_200_8BT::BG_message_in */ CompressedBaliseMessage_TM *BG_message_in,
    /* UNISIG_Validation_Scenarios::Test_Track_Elements::Test_Balises::Test_BG022_200_8BT::TrainPos */ kcg_real TrainPos,
    /* UNISIG_Validation_Scenarios::Test_Track_Elements::Test_Balises::Test_BG022_200_8BT::Engineering_Data */ BaliseGroupData_TM *Engineering_Data,
    outC_Test_BG022_200_8BT_UNISIG_Validation_Scenarios_Test_Track_Elements_Test_Balises *outC)
{
    kcg_bool noname;

    outC->_L28 = TrainPos;
    kcg_copy_BaliseGroupData_TM(&outC->_L19, Engineering_Data);
    /* 1 */
    Balise_Group_Init_UNISIG_Validation_Scenarios_test_InfraLibInt(
        outC->_L28,
        &outC->_L19,
        &outC->Context_1);
    kcg_copy_B_data_internal_T_UNISIG_Validation_Scenarios_test_InfraLibInt(
        &outC->_L11,
        &outC->Context_1.BG_internal_out);
    kcg_copy_B_data_internal_T_UNISIG_Validation_Scenarios_test_InfraLibInt(
        &outC->BaliseDataIn,
        &outC->_L11);
    kcg_copy_B_data_internal_T_UNISIG_Validation_Scenarios_test_InfraLibInt(
        &outC->_L9,
        &outC->BaliseDataIn);
    outC->_L20 = 0;
    /* 2 */
    Test_Balise_Sent_P072_UNISIG_Validation_Scenarios_Test_Track_Elements_Test_Balises(
        &outC->_L9,
        (BaliseTelegramHeader_int_T_TM *)
        &test_BG022_header_B7of7_nlink_UNISIG_Validation_Scenarios_Test_Track_Elements_Test_Balises,
        outC->_L20,
        &outC->Context_2);
    kcg_copy_B_data_internal_T_UNISIG_Validation_Scenarios_test_InfraLibInt(
        &outC->_L8,
        &outC->Context_2.B_data_out);
    outC->_L21 = 1;
    /* 5 */
    TEMPLATE_Balise_modified_UNISIG_Validation_Scenarios_test_InfraLibInt(
        &outC->_L8,
        (BaliseTelegramHeader_int_T_TM *)
        &test_BG022_header_B6of7_nlink_UNISIG_Validation_Scenarios_Test_Track_Elements_Test_Balises,
        outC->_L21,
        &outC->Context_5);
    kcg_copy_B_data_internal_T_UNISIG_Validation_Scenarios_test_InfraLibInt(
        &outC->_L7,
        &outC->Context_5.B_data_out);
    outC->_L22 = 2;
    /* 6 */
    TEMPLATE_Balise_modified_UNISIG_Validation_Scenarios_test_InfraLibInt(
        &outC->_L7,
        (BaliseTelegramHeader_int_T_TM *)
        &test_BG022_header_B5of7_nlink_UNISIG_Validation_Scenarios_Test_Track_Elements_Test_Balises,
        outC->_L22,
        &outC->Context_6);
    kcg_copy_B_data_internal_T_UNISIG_Validation_Scenarios_test_InfraLibInt(
        &outC->_L6,
        &outC->Context_6.B_data_out);
    outC->_L23 = 3;
    /* 1 */
    TEMPLATE_Balise_modified_UNISIG_Validation_Scenarios_test_InfraLibInt(
        &outC->_L6,
        (BaliseTelegramHeader_int_T_TM *)
        &test_BG022_header_B4of7_nlink_UNISIG_Validation_Scenarios_Test_Track_Elements_Test_Balises,
        outC->_L23,
        &outC->_1_Context_1);
    kcg_copy_B_data_internal_T_UNISIG_Validation_Scenarios_test_InfraLibInt(
        &outC->_L5,
        &outC->_1_Context_1.B_data_out);
    outC->_L24 = 4;
    /* 7 */
    TEMPLATE_Balise_modified_UNISIG_Validation_Scenarios_test_InfraLibInt(
        &outC->_L5,
        (BaliseTelegramHeader_int_T_TM *)
        &test_BG022_header_B3of7_nlink_UNISIG_Validation_Scenarios_Test_Track_Elements_Test_Balises,
        outC->_L24,
        &outC->Context_7);
    kcg_copy_B_data_internal_T_UNISIG_Validation_Scenarios_test_InfraLibInt(
        &outC->_L4,
        &outC->Context_7.B_data_out);
    outC->_L25 = 5;
    /* 2 */
    TEMPLATE_Balise_modified_UNISIG_Validation_Scenarios_test_InfraLibInt(
        &outC->_L4,
        (BaliseTelegramHeader_int_T_TM *)
        &test_BG022_header_B2of7_nlink_UNISIG_Validation_Scenarios_Test_Track_Elements_Test_Balises,
        outC->_L25,
        &outC->_2_Context_2);
    kcg_copy_B_data_internal_T_UNISIG_Validation_Scenarios_test_InfraLibInt(
        &outC->_L3,
        &outC->_2_Context_2.B_data_out);
    outC->_L26 = 6;
    /* 3 */
    TEMPLATE_Balise_modified_UNISIG_Validation_Scenarios_test_InfraLibInt(
        &outC->_L3,
        (BaliseTelegramHeader_int_T_TM *)
        &test_BG022_header_B1of7_nlink_UNISIG_Validation_Scenarios_Test_Track_Elements_Test_Balises,
        outC->_L26,
        &outC->Context_3);
    kcg_copy_B_data_internal_T_UNISIG_Validation_Scenarios_test_InfraLibInt(
        &outC->_L2,
        &outC->Context_3.B_data_out);
    outC->_L27 = 7;
    /* 8 */
    TEMPLATE_Balise_modified_UNISIG_Validation_Scenarios_test_InfraLibInt(
        &outC->_L2,
        (BaliseTelegramHeader_int_T_TM *)
        &test_BG022_header_B0of7_nlink_UNISIG_Validation_Scenarios_Test_Track_Elements_Test_Balises,
        outC->_L27,
        &outC->Context_8);
    kcg_copy_B_data_internal_T_UNISIG_Validation_Scenarios_test_InfraLibInt(
        &outC->_L1,
        &outC->Context_8.B_data_out);
    kcg_copy_B_data_internal_T_UNISIG_Validation_Scenarios_test_InfraLibInt(
        &outC->BaliseDataOut,
        &outC->_L1);
    kcg_copy_B_data_internal_T_UNISIG_Validation_Scenarios_test_InfraLibInt(
        &outC->_L16,
        &outC->BaliseDataOut);
    kcg_copy_CompressedBaliseMessage_TM(&outC->_L29, BG_message_in);
    /* 1 */
    Balise_Group_Close_UNISIG_Validation_Scenarios_test_InfraLibInt(
        &outC->_L16,
        &outC->_L29,
        &outC->_3_Context_1);
    outC->_L14 = outC->_3_Context_1.Error_out;
    kcg_copy_CompressedBaliseMessage_TM(
        &outC->_L13,
        &outC->_3_Context_1.BG_message_out);
    kcg_copy_CompressedBaliseMessage_TM(&outC->BG_message_out, &outC->_L13);
    noname = outC->_L14;
}
/* AmsterdamUtrechtL2::Sheet14_Maarssen_Balises::Balise_Group_435 */
void Balise_Group_435_AmsterdamUtrechtL2_Sheet14_Maarssen_Balises(
  /* AmsterdamUtrechtL2::Sheet14_Maarssen_Balises::Balise_Group_435::BG_message_in */CompressedBaliseMessage_TM *BG_message_in,
  /* AmsterdamUtrechtL2::Sheet14_Maarssen_Balises::Balise_Group_435::TrainPos */kcg_real _7_TrainPos,
  /* AmsterdamUtrechtL2::Sheet14_Maarssen_Balises::Balise_Group_435::Engineering_Data */BaliseGroupData_TM *Engineering_Data,
  outC_Balise_Group_435_AmsterdamUtrechtL2_Sheet14_Maarssen_Balises *outC)
{
  static kcg_int _6_noname_6;
  static BaliseTelegramHeader_int_T_TM noname_6;
  static kcg_int _5_noname_5;
  static BaliseTelegramHeader_int_T_TM noname_5;
  static kcg_int _4_noname_4;
  static BaliseTelegramHeader_int_T_TM noname_4;
  static kcg_int _3_noname_3;
  static BaliseTelegramHeader_int_T_TM noname_3;
  static kcg_int _2_noname_2;
  static BaliseTelegramHeader_int_T_TM noname_2;
  static kcg_int _1_noname_1;
  static BaliseTelegramHeader_int_T_TM noname_1;
  static kcg_bool noname;
  
  outC->_L27 = 7;
  outC->PIG_nom_6 = outC->_L27;
  kcg_copy_BaliseTelegramHeader_int_T_TM(
    &outC->Header_6,
    (BaliseTelegramHeader_int_T_TM *) &DEFAULT_BaliseTelegramHd_InfraLib);
  outC->_L26 = 6;
  outC->PIG_nom_5 = outC->_L26;
  kcg_copy_BaliseTelegramHeader_int_T_TM(
    &outC->Header_5,
    (BaliseTelegramHeader_int_T_TM *) &DEFAULT_BaliseTelegramHd_InfraLib);
  outC->_L25 = 5;
  outC->PIG_nom_4 = outC->_L25;
  kcg_copy_BaliseTelegramHeader_int_T_TM(
    &outC->Header_4,
    (BaliseTelegramHeader_int_T_TM *) &DEFAULT_BaliseTelegramHd_InfraLib);
  outC->_L24 = 4;
  outC->PIG_nom_3 = outC->_L24;
  kcg_copy_BaliseTelegramHeader_int_T_TM(
    &outC->Header_3,
    (BaliseTelegramHeader_int_T_TM *) &DEFAULT_BaliseTelegramHd_InfraLib);
  outC->_L23 = 3;
  outC->PIG_nom_2 = outC->_L23;
  kcg_copy_BaliseTelegramHeader_int_T_TM(
    &outC->Header_2,
    (BaliseTelegramHeader_int_T_TM *) &DEFAULT_BaliseTelegramHd_InfraLib);
  outC->_L22 = 2;
  outC->PIG_nom_1 = outC->_L22;
  kcg_copy_BaliseTelegramHeader_int_T_TM(
    &outC->Header_1,
    (BaliseTelegramHeader_int_T_TM *) &DEFAULT_BaliseTelegramHd_InfraLib);
  kcg_copy_CompressedBaliseMessage_TM(&outC->_L29, BG_message_in);
  outC->_L28 = _7_TrainPos;
  kcg_copy_BaliseGroupData_TM(&outC->_L19, Engineering_Data);
  /* 1 */ Balise_Group_Init_InfraLib(outC->_L28, &outC->_L19, &outC->Context_1);
  kcg_copy_B_data_internal_T_InfraLib(
    &outC->_L11,
    &outC->Context_1.BG_internal_out);
  kcg_copy_B_data_internal_T_InfraLib(&outC->BaliseDataIn, &outC->_L11);
  kcg_copy_B_data_internal_T_InfraLib(&outC->_L9, &outC->BaliseDataIn);
  outC->_L20 = 0;
  /* 1 */
  Balise_435_0_AmsterdamUtrechtL2_Sheet14_Maarssen_Balises(
    &outC->_L9,
    (BaliseTelegramHeader_int_T_TM *) &BG435_header_B0_Balises426,
    outC->_L20,
    &outC->_1_Context_1);
  kcg_copy_B_data_internal_T_InfraLib(
    &outC->_L8,
    &outC->_1_Context_1.B_data_out);
  outC->_L21 = 1;
  /* 1 */
  Balise_435_1_AmsterdamUtrechtL2_Sheet14_Maarssen_Balises(
    &outC->_L8,
    (BaliseTelegramHeader_int_T_TM *) &BG435_header_B1_Balises426,
    outC->_L21,
    &outC->_2_Context_1);
  kcg_copy_B_data_internal_T_InfraLib(
    &outC->_L7,
    &outC->_2_Context_1.B_data_out);
  kcg_copy_B_data_internal_T_InfraLib(&outC->B_data_in_1, &outC->_L7);
  kcg_copy_B_data_internal_T_InfraLib(&outC->_L1_1, &outC->B_data_in_1);
  kcg_copy_B_data_internal_T_InfraLib(&outC->B_data_out_1, &outC->_L1_1);
  kcg_copy_B_data_internal_T_InfraLib(&outC->_L6, &outC->B_data_out_1);
  kcg_copy_B_data_internal_T_InfraLib(&outC->B_data_in_2, &outC->_L6);
  kcg_copy_B_data_internal_T_InfraLib(&outC->_L1_2, &outC->B_data_in_2);
  kcg_copy_B_data_internal_T_InfraLib(&outC->B_data_out_2, &outC->_L1_2);
  kcg_copy_B_data_internal_T_InfraLib(&outC->_L5, &outC->B_data_out_2);
  kcg_copy_B_data_internal_T_InfraLib(&outC->B_data_in_3, &outC->_L5);
  kcg_copy_B_data_internal_T_InfraLib(&outC->_L1_3, &outC->B_data_in_3);
  kcg_copy_B_data_internal_T_InfraLib(&outC->B_data_out_3, &outC->_L1_3);
  kcg_copy_B_data_internal_T_InfraLib(&outC->_L4, &outC->B_data_out_3);
  kcg_copy_B_data_internal_T_InfraLib(&outC->B_data_in_4, &outC->_L4);
  kcg_copy_B_data_internal_T_InfraLib(&outC->_L1_4, &outC->B_data_in_4);
  kcg_copy_B_data_internal_T_InfraLib(&outC->B_data_out_4, &outC->_L1_4);
  kcg_copy_B_data_internal_T_InfraLib(&outC->_L3, &outC->B_data_out_4);
  kcg_copy_B_data_internal_T_InfraLib(&outC->B_data_in_5, &outC->_L3);
  kcg_copy_B_data_internal_T_InfraLib(&outC->_L1_5, &outC->B_data_in_5);
  kcg_copy_B_data_internal_T_InfraLib(&outC->B_data_out_5, &outC->_L1_5);
  kcg_copy_B_data_internal_T_InfraLib(&outC->_L2, &outC->B_data_out_5);
  kcg_copy_B_data_internal_T_InfraLib(&outC->B_data_in_6, &outC->_L2);
  kcg_copy_B_data_internal_T_InfraLib(&outC->_L1_6, &outC->B_data_in_6);
  kcg_copy_B_data_internal_T_InfraLib(&outC->B_data_out_6, &outC->_L1_6);
  kcg_copy_B_data_internal_T_InfraLib(&outC->_L1, &outC->B_data_out_6);
  kcg_copy_B_data_internal_T_InfraLib(&outC->BaliseDataOut, &outC->_L1);
  kcg_copy_B_data_internal_T_InfraLib(&outC->_L16, &outC->BaliseDataOut);
  /* 1 */
  Balise_Group_Close_InfraLib(&outC->_L16, &outC->_L29, &outC->_3_Context_1);
  outC->_L14 = outC->_3_Context_1.Error_out;
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L13,
    &outC->_3_Context_1.BG_message_out);
  noname = outC->_L14;
  kcg_copy_CompressedBaliseMessage_TM(&outC->BG_message_out, &outC->_L13);
  kcg_copy_BaliseTelegramHeader_int_T_TM(&outC->_L3_1, &outC->Header_1);
  kcg_copy_BaliseTelegramHeader_int_T_TM(&noname_1, &outC->_L3_1);
  outC->_L2_1 = outC->PIG_nom_1;
  _1_noname_1 = outC->_L2_1;
  kcg_copy_BaliseTelegramHeader_int_T_TM(&outC->_L3_2, &outC->Header_2);
  kcg_copy_BaliseTelegramHeader_int_T_TM(&noname_2, &outC->_L3_2);
  outC->_L2_2 = outC->PIG_nom_2;
  _2_noname_2 = outC->_L2_2;
  kcg_copy_BaliseTelegramHeader_int_T_TM(&outC->_L3_3, &outC->Header_3);
  kcg_copy_BaliseTelegramHeader_int_T_TM(&noname_3, &outC->_L3_3);
  outC->_L2_3 = outC->PIG_nom_3;
  _3_noname_3 = outC->_L2_3;
  kcg_copy_BaliseTelegramHeader_int_T_TM(&outC->_L3_4, &outC->Header_4);
  kcg_copy_BaliseTelegramHeader_int_T_TM(&noname_4, &outC->_L3_4);
  outC->_L2_4 = outC->PIG_nom_4;
  _4_noname_4 = outC->_L2_4;
  kcg_copy_BaliseTelegramHeader_int_T_TM(&outC->_L3_5, &outC->Header_5);
  kcg_copy_BaliseTelegramHeader_int_T_TM(&noname_5, &outC->_L3_5);
  outC->_L2_5 = outC->PIG_nom_5;
  _5_noname_5 = outC->_L2_5;
  kcg_copy_BaliseTelegramHeader_int_T_TM(&outC->_L3_6, &outC->Header_6);
  kcg_copy_BaliseTelegramHeader_int_T_TM(&noname_6, &outC->_L3_6);
  outC->_L2_6 = outC->PIG_nom_6;
  _6_noname_6 = outC->_L2_6;
}
/* AmsterdamUtrechtL2::Sheet12_Breukelen_Balises::Balises0009_Breukelen */
void Balises0009_Breukelen_AmsterdamUtrechtL2_Sheet12_Breukelen_Balises(
  /* AmsterdamUtrechtL2::Sheet12_Breukelen_Balises::Balises0009_Breukelen::SectionData_in */TrackSectionData_T_InfraLib *SectionData_in,
  outC_Balises0009_Breukelen_AmsterdamUtrechtL2_Sheet12_Breukelen_Balises *outC)
{
  kcg_copy_TrackSectionData_T_InfraLib(&outC->_L6, SectionData_in);
  kcg_copy_CompressedBaliseMessage_TM(&outC->_L3, &outC->_L6.BG_Message);
  outC->_L2 = outC->_L6.TrainPosRaw.TrainPosCalibrated;
  /* 1 */
  Balise_Group_410_AmsterdamUtrechtL2_Sheet12_Breukelen_Balises(
    &outC->_L3,
    outC->_L2,
    (BaliseGroupData_TM *) &BG410_Balises426,
    &outC->Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L1,
    &outC->Context_1.BG_message_out);
  /* 1 */
  Balise_Group_476_AmsterdamUtrechtL2_Sheet12_Breukelen_Balises(
    &outC->_L1,
    outC->_L2,
    (BaliseGroupData_TM *) &BG476_Balises426,
    &outC->_1_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L7,
    &outC->_1_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_411_AmsterdamUtrechtL2_Sheet12_Breukelen_Balises(
    &outC->_L7,
    outC->_L2,
    (BaliseGroupData_TM *) &BG411_Balises426,
    &outC->_2_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L8,
    &outC->_2_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_412_AmsterdamUtrechtL2_Sheet12_Breukelen_Balises(
    &outC->_L8,
    outC->_L2,
    (BaliseGroupData_TM *) &BG412_Balises426,
    &outC->_3_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L9,
    &outC->_3_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_413_AmsterdamUtrechtL2_Sheet12_Breukelen_Balises(
    &outC->_L9,
    outC->_L2,
    (BaliseGroupData_TM *) &BG413_Balises426,
    &outC->_4_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L10,
    &outC->_4_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_414_AmsterdamUtrechtL2_Sheet12_Breukelen_Balises(
    &outC->_L10,
    outC->_L2,
    (BaliseGroupData_TM *) &BG414_Balises426,
    &outC->_5_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L11,
    &outC->_5_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_415_AmsterdamUtrechtL2_Sheet12_Breukelen_Balises(
    &outC->_L11,
    outC->_L2,
    (BaliseGroupData_TM *) &BG415_Balises426,
    &outC->_6_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L12,
    &outC->_6_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_416_AmsterdamUtrechtL2_Sheet12_Breukelen_Balises(
    &outC->_L12,
    outC->_L2,
    (BaliseGroupData_TM *) &BG416_Balises426,
    &outC->_7_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L13,
    &outC->_7_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_417_AmsterdamUtrechtL2_Sheet12_Breukelen_Balises(
    &outC->_L13,
    outC->_L2,
    (BaliseGroupData_TM *) &BG417_Balises426,
    &outC->_8_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L14,
    &outC->_8_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_418_AmsterdamUtrechtL2_Sheet12_Breukelen_Balises(
    &outC->_L14,
    outC->_L2,
    (BaliseGroupData_TM *) &BG418_Balises426,
    &outC->_9_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L15,
    &outC->_9_Context_1.BG_message_out);
  /* 2 */
  Balise_Group_419_AmsterdamUtrechtL2_Sheet12_Breukelen_Balises(
    &outC->_L15,
    outC->_L2,
    (BaliseGroupData_TM *) &BG419_Balises426,
    &outC->Context_2);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L25,
    &outC->Context_2.BG_message_out);
  kcg_copy_TrackSectionData_T_InfraLib(&outC->_L4, &outC->_L6);
  if (kcg_true) {
    kcg_copy_CompressedBaliseMessage_TM(&outC->_L4.BG_Message, &outC->_L25);
  }
  kcg_copy_TrackSectionData_T_InfraLib(&outC->SectionData_out, &outC->_L4);
}
/* AmsterdamUtrechtL2::Sheet14_Maarssen_Balises::Balises0011_Maarssen */
void Balises0011_Maarssen_AmsterdamUtrechtL2_Sheet14_Maarssen_Balises(
  /* AmsterdamUtrechtL2::Sheet14_Maarssen_Balises::Balises0011_Maarssen::SectionData_in */TrackSectionData_T_InfraLib *SectionData_in,
  outC_Balises0011_Maarssen_AmsterdamUtrechtL2_Sheet14_Maarssen_Balises *outC)
{
  kcg_copy_TrackSectionData_T_InfraLib(&outC->_L6, SectionData_in);
  kcg_copy_CompressedBaliseMessage_TM(&outC->_L3, &outC->_L6.BG_Message);
  outC->_L2 = outC->_L6.TrainPosRaw.TrainPosCalibrated;
  /* 1 */
  Balise_Group_424_AmsterdamUtrechtL2_Sheet14_Maarssen_Balises(
    &outC->_L3,
    outC->_L2,
    (BaliseGroupData_TM *) &BG424_Balises426,
    &outC->Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L1,
    &outC->Context_1.BG_message_out);
  /* 1 */
  Balise_Group_425_AmsterdamUtrechtL2_Sheet14_Maarssen_Balises(
    &outC->_L1,
    outC->_L2,
    (BaliseGroupData_TM *) &BG425_Balises426,
    &outC->_1_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L7,
    &outC->_1_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_426_AmsterdamUtrechtL2_Sheet14_Maarssen_Balises(
    &outC->_L7,
    outC->_L2,
    (BaliseGroupData_TM *) &BG426_Balises426,
    &outC->_2_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L8,
    &outC->_2_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_427_AmsterdamUtrechtL2_Sheet14_Maarssen_Balises(
    &outC->_L8,
    outC->_L2,
    (BaliseGroupData_TM *) &BG427_Balises426,
    &outC->_3_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L9,
    &outC->_3_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_428_AmsterdamUtrechtL2_Sheet14_Maarssen_Balises(
    &outC->_L9,
    outC->_L2,
    (BaliseGroupData_TM *) &BG428_Balises426,
    &outC->_4_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L10,
    &outC->_4_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_429_AmsterdamUtrechtL2_Sheet14_Maarssen_Balises(
    &outC->_L10,
    outC->_L2,
    (BaliseGroupData_TM *) &BG429_Balises426,
    &outC->_5_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L11,
    &outC->_5_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_477_AmsterdamUtrechtL2_Sheet14_Maarssen_Balises(
    &outC->_L11,
    outC->_L2,
    (BaliseGroupData_TM *) &BG477_Balises426,
    &outC->_6_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L12,
    &outC->_6_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_430_AmsterdamUtrechtL2_Sheet14_Maarssen_Balises(
    &outC->_L12,
    outC->_L2,
    (BaliseGroupData_TM *) &BG430_Balises426,
    &outC->_7_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L13,
    &outC->_7_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_431_AmsterdamUtrechtL2_Sheet14_Maarssen_Balises(
    &outC->_L13,
    outC->_L2,
    (BaliseGroupData_TM *) &BG431_Balises426,
    &outC->_8_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L14,
    &outC->_8_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_432_AmsterdamUtrechtL2_Sheet14_Maarssen_Balises(
    &outC->_L14,
    outC->_L2,
    (BaliseGroupData_TM *) &BG432_Balises426,
    &outC->_9_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L15,
    &outC->_9_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_433_AmsterdamUtrechtL2_Sheet14_Maarssen_Balises(
    &outC->_L15,
    outC->_L2,
    (BaliseGroupData_TM *) &BG433_Balises426,
    &outC->_10_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L16,
    &outC->_10_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_434_AmsterdamUtrechtL2_Sheet14_Maarssen_Balises(
    &outC->_L16,
    outC->_L2,
    (BaliseGroupData_TM *) &BG434_Balises426,
    &outC->_11_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L17,
    &outC->_11_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_435_AmsterdamUtrechtL2_Sheet14_Maarssen_Balises(
    &outC->_L17,
    outC->_L2,
    (BaliseGroupData_TM *) &BG435_Balises426,
    &outC->_12_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L18,
    &outC->_12_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_436_AmsterdamUtrechtL2_Sheet14_Maarssen_Balises(
    &outC->_L18,
    outC->_L2,
    (BaliseGroupData_TM *) &BG436_Balises426,
    &outC->_13_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L19,
    &outC->_13_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_437_AmsterdamUtrechtL2_Sheet14_Maarssen_Balises(
    &outC->_L19,
    outC->_L2,
    (BaliseGroupData_TM *) &BG437_Balises426,
    &outC->_14_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L20,
    &outC->_14_Context_1.BG_message_out);
  kcg_copy_TrackSectionData_T_InfraLib(&outC->_L4, &outC->_L6);
  if (kcg_true) {
    kcg_copy_CompressedBaliseMessage_TM(&outC->_L4.BG_Message, &outC->_L20);
  }
  kcg_copy_TrackSectionData_T_InfraLib(&outC->SectionData_out, &outC->_L4);
}
/* AmsterdamUtrechtL2::Sheet06_Bijlmer_Balises::Balises0003_Bijlmer */
void Balises0003_Bijlmer_AmsterdamUtrechtL2_Sheet06_Bijlmer_Balises(
  /* AmsterdamUtrechtL2::Sheet06_Bijlmer_Balises::Balises0003_Bijlmer::SectionData_in */TrackSectionData_T_InfraLib *SectionData_in,
  outC_Balises0003_Bijlmer_AmsterdamUtrechtL2_Sheet06_Bijlmer_Balises *outC)
{
  kcg_copy_TrackSectionData_T_InfraLib(&outC->_L6, SectionData_in);
  kcg_copy_CompressedBaliseMessage_TM(&outC->_L3, &outC->_L6.BG_Message);
  outC->_L2 = outC->_L6.TrainPosRaw.TrainPosCalibrated;
  /* 1 */
  Balise_Group_354_AmsterdamUtrechtL2_Sheet06_Bijlmer_Balises(
    &outC->_L3,
    outC->_L2,
    (BaliseGroupData_TM *) &BG354_Balises426,
    &outC->Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L1,
    &outC->Context_1.BG_message_out);
  /* 1 */
  Balise_Group_351_AmsterdamUtrechtL2_Sheet06_Bijlmer_Balises(
    &outC->_L1,
    outC->_L2,
    (BaliseGroupData_TM *) &BG351_Balises426,
    &outC->_1_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L7,
    &outC->_1_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_355_AmsterdamUtrechtL2_Sheet06_Bijlmer_Balises(
    &outC->_L7,
    outC->_L2,
    (BaliseGroupData_TM *) &BG355_Balises426,
    &outC->_2_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L8,
    &outC->_2_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_356_AmsterdamUtrechtL2_Sheet06_Bijlmer_Balises(
    &outC->_L8,
    outC->_L2,
    (BaliseGroupData_TM *) &BG356_Balises426,
    &outC->_3_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L9,
    &outC->_3_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_357_AmsterdamUtrechtL2_Sheet06_Bijlmer_Balises(
    &outC->_L9,
    outC->_L2,
    (BaliseGroupData_TM *) &BG357_Balises426,
    &outC->_4_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L10,
    &outC->_4_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_358_AmsterdamUtrechtL2_Sheet06_Bijlmer_Balises(
    &outC->_L10,
    outC->_L2,
    (BaliseGroupData_TM *) &BG358_Balises426,
    &outC->_5_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L11,
    &outC->_5_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_359_AmsterdamUtrechtL2_Sheet06_Bijlmer_Balises(
    &outC->_L11,
    outC->_L2,
    (BaliseGroupData_TM *) &BG359_Balises426,
    &outC->_6_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L12,
    &outC->_6_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_360_AmsterdamUtrechtL2_Sheet06_Bijlmer_Balises(
    &outC->_L12,
    outC->_L2,
    (BaliseGroupData_TM *) &BG360_Balises426,
    &outC->_7_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L13,
    &outC->_7_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_361_AmsterdamUtrechtL2_Sheet06_Bijlmer_Balises(
    &outC->_L13,
    outC->_L2,
    (BaliseGroupData_TM *) &BG361_Balises426,
    &outC->_8_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L14,
    &outC->_8_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_362_AmsterdamUtrechtL2_Sheet06_Bijlmer_Balises(
    &outC->_L14,
    outC->_L2,
    (BaliseGroupData_TM *) &BG362_Balises426,
    &outC->_9_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L15,
    &outC->_9_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_363_AmsterdamUtrechtL2_Sheet06_Bijlmer_Balises(
    &outC->_L15,
    outC->_L2,
    (BaliseGroupData_TM *) &BG363_Balises426,
    &outC->_10_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L16,
    &outC->_10_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_364_AmsterdamUtrechtL2_Sheet06_Bijlmer_Balises(
    &outC->_L16,
    outC->_L2,
    (BaliseGroupData_TM *) &BG364_Balises426,
    &outC->_11_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L17,
    &outC->_11_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_365_AmsterdamUtrechtL2_Sheet06_Bijlmer_Balises(
    &outC->_L17,
    outC->_L2,
    (BaliseGroupData_TM *) &BG365_Balises426,
    &outC->_12_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L18,
    &outC->_12_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_366_AmsterdamUtrechtL2_Sheet06_Bijlmer_Balises(
    &outC->_L18,
    outC->_L2,
    (BaliseGroupData_TM *) &BG366_Balises426,
    &outC->_13_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L19,
    &outC->_13_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_367_AmsterdamUtrechtL2_Sheet06_Bijlmer_Balises(
    &outC->_L19,
    outC->_L2,
    (BaliseGroupData_TM *) &BG367_Balises426,
    &outC->_14_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L20,
    &outC->_14_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_368_AmsterdamUtrechtL2_Sheet06_Bijlmer_Balises(
    &outC->_L20,
    outC->_L2,
    (BaliseGroupData_TM *) &BG368_Balises426,
    &outC->_15_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L21,
    &outC->_15_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_369_AmsterdamUtrechtL2_Sheet06_Bijlmer_Balises(
    &outC->_L21,
    outC->_L2,
    (BaliseGroupData_TM *) &BG369_Balises426,
    &outC->_16_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L22,
    &outC->_16_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_341_AmsterdamUtrechtL2_Sheet06_Bijlmer_Balises(
    &outC->_L22,
    outC->_L2,
    (BaliseGroupData_TM *) &BG341_Balises426,
    &outC->_17_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L23,
    &outC->_17_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_370_AmsterdamUtrechtL2_Sheet06_Bijlmer_Balises(
    &outC->_L23,
    outC->_L2,
    (BaliseGroupData_TM *) &BG370_Balises426,
    &outC->_18_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L24,
    &outC->_18_Context_1.BG_message_out);
  kcg_copy_TrackSectionData_T_InfraLib(&outC->_L4, &outC->_L6);
  if (kcg_true) {
    kcg_copy_CompressedBaliseMessage_TM(&outC->_L4.BG_Message, &outC->_L24);
  }
  kcg_copy_TrackSectionData_T_InfraLib(&outC->SectionData_out, &outC->_L4);
}
/* AmsterdamUtrechtL2::AmsterdamUtrechtTrack1::Amsterdam_Utrecht_Lijn1_balises */
void Amsterdam_Utrecht_Lijn1_b_AmsterdamUtrechtL2_AmsterdamUtrechtTrack1(
  /* AmsterdamUtrechtL2::AmsterdamUtrechtTrack1::Amsterdam_Utrecht_Lijn1_balises::TrainPosSim_in */kcg_real TrainPosSim_in,
  outC_Amsterdam_Utrecht_Lijn1_b_AmsterdamUtrechtL2_AmsterdamUtrechtTrack1 *outC)
{
  outC->_L16 = TrainPosSim_in;
  /* 1 */ TrackInit_InfraLib(outC->_L16, 0, &outC->Context_1);
  kcg_copy_TrackSectionData_T_InfraLib(
    &outC->_L15,
    &outC->Context_1.SectionData_out);
  /* 1 */
  TrackDiscontinuity_InfraLib(&outC->_L15, 104775, 105650, &outC->_1_Context_1);
  kcg_copy_TrackSectionData_T_InfraLib(
    &outC->_L13,
    &outC->_1_Context_1.SectionData_out);
  /* 1 */
  Balises0001_Amstel_UB_Sig_AmsterdamUtrechtL2_Sheet05_Amstel_Balises(
    &outC->_L13,
    &outC->_2_Context_1);
  kcg_copy_TrackSectionData_T_InfraLib(
    &outC->_L1,
    &outC->_2_Context_1.SectionData_out);
  /* 2 */
  TrackDiscontinuity_InfraLib(&outC->_L1, 1659 - 400, 32962, &outC->Context_2);
  kcg_copy_TrackSectionData_T_InfraLib(
    &outC->_L14,
    &outC->Context_2.SectionData_out);
  /* 1 */
  Balises0002_Amstel_UB_Sig_AmsterdamUtrechtL2_Sheet05_Amstel_Balises(
    &outC->_L14,
    &outC->_3_Context_1);
  kcg_copy_TrackSectionData_T_InfraLib(
    &outC->_L2,
    &outC->_3_Context_1.SectionData_out);
  /* 1 */
  Balises0003_Bijlmer_AmsterdamUtrechtL2_Sheet06_Bijlmer_Balises(
    &outC->_L2,
    &outC->_4_Context_1);
  kcg_copy_TrackSectionData_T_InfraLib(
    &outC->_L3,
    &outC->_4_Context_1.SectionData_out);
  /* 1 */
  Balises0004_BijlmerAbcoude_AmsterdamUtrechtL2_Sheet07_BijlmerAbcoude_Balises(
    &outC->_L3,
    &outC->_5_Context_1);
  kcg_copy_TrackSectionData_T_InfraLib(
    &outC->_L4,
    &outC->_5_Context_1.SectionData_out);
  /* 1 */
  Balises0005_Abcoude_AmsterdamUtrechtL2_Sheet08A_Abcoude_Balises(
    &outC->_L4,
    &outC->_6_Context_1);
  kcg_copy_TrackSectionData_T_InfraLib(
    &outC->_L5,
    &outC->_6_Context_1.SectionData_out);
  /* 1 */
  Balises0006_Abcoude_AmsterdamUtrechtL2_Sheet08B_Abcoude_Balises(
    &outC->_L5,
    &outC->_7_Context_1);
  kcg_copy_TrackSectionData_T_InfraLib(
    &outC->_L6,
    &outC->_7_Context_1.SectionData_out);
  /* 1 */
  Balises0007_AbcoudeBreukelen_AmsterdamUtrechtL2_Sheet09_AbcoudeBreukelen_Balises(
    &outC->_L6,
    &outC->_8_Context_1);
  kcg_copy_TrackSectionData_T_InfraLib(
    &outC->_L7,
    &outC->_8_Context_1.SectionData_out);
  /* 1 */
  Balises0008_BreukelenKeer_AmsterdamUtrechtL2_Sheet11_BreukelenKeerspoor_Balises(
    &outC->_L7,
    &outC->_9_Context_1);
  kcg_copy_TrackSectionData_T_InfraLib(
    &outC->_L8,
    &outC->_9_Context_1.SectionData_out);
  /* 1 */
  Balises0009_Breukelen_AmsterdamUtrechtL2_Sheet12_Breukelen_Balises(
    &outC->_L8,
    &outC->_10_Context_1);
  kcg_copy_TrackSectionData_T_InfraLib(
    &outC->_L9,
    &outC->_10_Context_1.SectionData_out);
  /* 1 */
  Balises0010_Breukelen_Maa_AmsterdamUtrechtL2_Sheet13_Breukelen_Maarssen_Balises(
    &outC->_L9,
    &outC->_11_Context_1);
  kcg_copy_TrackSectionData_T_InfraLib(
    &outC->_L10,
    &outC->_11_Context_1.SectionData_out);
  /* 1 */
  Balises0011_Maarssen_AmsterdamUtrechtL2_Sheet14_Maarssen_Balises(
    &outC->_L10,
    &outC->_12_Context_1);
  kcg_copy_TrackSectionData_T_InfraLib(
    &outC->_L11,
    &outC->_12_Context_1.SectionData_out);
  /* 1 */
  Balises0012_MaarssenUtrechtCS_AmsterdamUtrechtL2_Sheet15_MaarssenUtrechtCS_Balises(
    &outC->_L11,
    &outC->_13_Context_1);
  kcg_copy_TrackSectionData_T_InfraLib(
    &outC->_L12,
    &outC->_13_Context_1.SectionData_out);
  /* 1 */ TrackClose_InfraLib(&outC->_L12, &outC->_14_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L17,
    &outC->_14_Context_1.BaliseMessage);
  kcg_copy_CompressedBaliseMessage_TM(&outC->BaliseMessage, &outC->_L17);
}
/* AmsterdamUtrechtL2::Sheet11_BreukelenKeerspoor_Balises::Balises0008_BreukelenKeerspoor */
void Balises0008_BreukelenKeer_AmsterdamUtrechtL2_Sheet11_BreukelenKeerspoor_Balises(
  /* AmsterdamUtrechtL2::Sheet11_BreukelenKeerspoor_Balises::Balises0008_BreukelenKeerspoor::SectionData_in */TrackSectionData_T_InfraLib *SectionData_in,
  outC_Balises0008_BreukelenKeer_AmsterdamUtrechtL2_Sheet11_BreukelenKeerspoor_Balises *outC)
{
  kcg_copy_TrackSectionData_T_InfraLib(&outC->_L6, SectionData_in);
  kcg_copy_CompressedBaliseMessage_TM(&outC->_L3, &outC->_L6.BG_Message);
  outC->_L2 = outC->_L6.TrainPosRaw.TrainPosCalibrated;
  /* 1 */
  Balise_Group_397_AmsterdamUtrechtL2_Sheet11_BreukelenKeerspoor_Balises(
    &outC->_L3,
    outC->_L2,
    (BaliseGroupData_TM *) &BG397_Balises426,
    &outC->Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L1,
    &outC->Context_1.BG_message_out);
  /* 1 */
  Balise_Group_398_AmsterdamUtrechtL2_Sheet11_BreukelenKeerspoor_Balises(
    &outC->_L1,
    outC->_L2,
    (BaliseGroupData_TM *) &BG398_Balises426,
    &outC->_1_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L7,
    &outC->_1_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_399_AmsterdamUtrechtL2_Sheet11_BreukelenKeerspoor_Balises(
    &outC->_L7,
    outC->_L2,
    (BaliseGroupData_TM *) &BG399_Balises426,
    &outC->_2_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L8,
    &outC->_2_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_400_AmsterdamUtrechtL2_Sheet11_BreukelenKeerspoor_Balises(
    &outC->_L8,
    outC->_L2,
    (BaliseGroupData_TM *) &BG400_Balises426,
    &outC->_3_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L9,
    &outC->_3_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_401_AmsterdamUtrechtL2_Sheet11_BreukelenKeerspoor_Balises(
    &outC->_L9,
    outC->_L2,
    (BaliseGroupData_TM *) &BG401_Balises426,
    &outC->_4_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L10,
    &outC->_4_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_402_AmsterdamUtrechtL2_Sheet11_BreukelenKeerspoor_Balises(
    &outC->_L10,
    outC->_L2,
    (BaliseGroupData_TM *) &BG402_Balises426,
    &outC->_5_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L11,
    &outC->_5_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_403_AmsterdamUtrechtL2_Sheet11_BreukelenKeerspoor_Balises(
    &outC->_L11,
    outC->_L2,
    (BaliseGroupData_TM *) &BG403_Balises426,
    &outC->_6_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L12,
    &outC->_6_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_404_AmsterdamUtrechtL2_Sheet11_BreukelenKeerspoor_Balises(
    &outC->_L12,
    outC->_L2,
    (BaliseGroupData_TM *) &BG404_Balises426,
    &outC->_7_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L13,
    &outC->_7_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_405_AmsterdamUtrechtL2_Sheet11_BreukelenKeerspoor_Balises(
    &outC->_L13,
    outC->_L2,
    (BaliseGroupData_TM *) &BG405_Balises426,
    &outC->_8_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L14,
    &outC->_8_Context_1.BG_message_out);
  /* 2 */
  Balise_Group_406_AmsterdamUtrechtL2_Sheet11_BreukelenKeerspoor_Balises(
    &outC->_L14,
    outC->_L2,
    (BaliseGroupData_TM *) &BG406_Balises426,
    &outC->Context_2);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L15,
    &outC->Context_2.BG_message_out);
  /* 2 */
  Balise_Group_407_AmsterdamUtrechtL2_Sheet11_BreukelenKeerspoor_Balises(
    &outC->_L15,
    outC->_L2,
    (BaliseGroupData_TM *) &BG407_Balises426,
    &outC->_9_Context_2);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L16,
    &outC->_9_Context_2.BG_message_out);
  /* 1 */
  Balise_Group_408_AmsterdamUtrechtL2_Sheet11_BreukelenKeerspoor_Balises(
    &outC->_L16,
    outC->_L2,
    (BaliseGroupData_TM *) &BG408_Balises426,
    &outC->_10_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L17,
    &outC->_10_Context_1.BG_message_out);
  /* 1 */
  Balise_Group_409_AmsterdamUtrechtL2_Sheet11_BreukelenKeerspoor_Balises(
    &outC->_L17,
    outC->_L2,
    (BaliseGroupData_TM *) &BG409_Balises426,
    &outC->_11_Context_1);
  kcg_copy_CompressedBaliseMessage_TM(
    &outC->_L18,
    &outC->_11_Context_1.BG_message_out);
  kcg_copy_TrackSectionData_T_InfraLib(&outC->_L4, &outC->_L6);
  if (kcg_true) {
    kcg_copy_CompressedBaliseMessage_TM(&outC->_L4.BG_Message, &outC->_L18);
  }
  kcg_copy_TrackSectionData_T_InfraLib(&outC->SectionData_out, &outC->_L4);
}