/*
 * File: DSMR_FaultLvlCalc.c
 *
 * Code generated for Simulink model 'DSMR_FaultLvlCalc'.
 *
 * Model version                  : 1.64
 * Simulink Coder version         : 8.13 (R2017b) 24-Jul-2017
 * C/C++ source code generated on : Mon Aug  2 17:27:36 2021
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: Infineon->TriCore
 * Code generation objectives:
 *    1. MISRA C:2012 guidelines
 *    2. Execution efficiency
 * Validation result: Not run
 */

#include "DSMR_FaultLvlCalc.h"
#include "DSMR_FaultLvlCalc_private.h"

/* Exported data definition */
#define ASW1_OEM_START_SEC_DEFAULT_RAM2_CLEARED_UNSPECIFIED
#include "Asw1_OEM_MemMap.h"

/* Definition for custom storage class: OutputSignal */
volatile uint8_T DSMR_stFaultRank;
volatile uint8_T DSMR_stFaultRankRaw;

#define ASW1_OEM_STOP_SEC_DEFAULT_RAM2_CLEARED_UNSPECIFIED
#include "Asw1_OEM_MemMap.h"

/* Block states (auto storage) */
DW_DSMR_FaultLvlCalc_T DSMR_FaultLvlCalc_DW;
void DSMR_FaultLvlCalc_Clear(void)
{
  DSMR_FaultLvlCalc_DW.UnitDelay_DSTATE = false;
  DSMR_FaultLvlCalc_DW.UnitDelay1_DSTATE = 0U;
}

/* Model step function */
void DSMR_FaultLvlCalc_step(void)
{
  uint8_T rtb_DFC_BattUNpl_applied181;
  uint8_T rtb_DFC_BattUNpl_applied182;
  uint8_T rtb_DFC_BattUNpl_applied183;
  uint8_T rtb_DFC_BattUNpl_applied184;
  uint8_T rtb_DFC_BattUNpl_applied185;
  uint8_T rtb_DFC_BattUNpl_applied186;
  uint8_T rtb_DFC_BattUNpl_applied187;
  uint8_T rtb_DFC_BattUNpl_applied188;
  uint32_T tmp;
  uint8_T rtb_DFC_BattUNpl_applied189;
  boolean_T rtb_LogicalOperator_b;
  int8_T rtb_DataTypeConversion8[8];
  int32_T i;
  uint8_T u0;
  uint8_T u1;
  uint8_T u1_0;
  uint8_T u1_1;
  uint8_T u1_2;
  uint8_T u1_3;
  uint8_T u1_4;
  uint8_T u1_5;
  uint8_T u1_6;
  uint8_T u1_7;
  uint8_T u1_8;
  uint8_T u1_9;
  uint8_T u1_a;
  uint8_T u1_b;
  uint8_T u1_c;
  uint8_T u1_d;
  uint8_T u1_e;
  uint8_T u1_f;
  uint8_T u1_g;
  uint8_T u1_h;
  uint8_T u1_i;
  uint8_T u1_j;
  uint8_T u1_k;
  uint8_T u1_l;
  uint8_T u1_m;
  uint8_T u1_n;
  uint8_T u1_o;
  uint8_T u1_p;
  uint8_T u1_q;
  uint8_T u1_r;
  uint8_T u1_s;
  uint8_T u1_t;
  uint8_T u1_u;
  uint8_T u1_v;
  uint8_T u1_w;
  uint8_T u1_x;
  uint8_T u1_y;
  uint8_T u1_z;
  uint8_T u1_10;
  uint8_T u1_11;
  uint8_T u1_12;
  uint8_T u1_13;
  uint8_T u1_14;
  uint8_T u1_15;
  uint8_T u1_16;
  uint8_T u1_17;
  uint8_T u1_18;
  uint8_T u1_19;
  uint8_T u1_1a;
  uint8_T u1_1b;
  uint8_T u1_1c;
  uint8_T u1_1d;
  uint8_T u1_1e;
  uint8_T u1_1f;
  uint8_T u1_1g;
  uint8_T u1_1h;
  uint8_T u1_1i;
  uint8_T u1_1j;
  uint8_T u1_1k;
  uint8_T u1_1l;
  uint8_T u1_1m;
  uint8_T u1_1n;
  uint8_T u1_1o;
  uint8_T u1_1p;
  uint8_T u1_1q;
  uint8_T u1_1r;
  uint8_T u1_1s;
  uint8_T u1_1t;
  uint8_T u1_1u;
  uint8_T u1_1v;
  uint8_T u1_1w;
  uint8_T u1_1x;
  uint8_T u1_1y;
  uint8_T u1_1z;
  uint8_T u1_20;
  uint8_T u1_21;
  uint8_T u1_22;
  uint8_T u1_23;
  uint8_T u1_24;
  uint8_T u1_25;
  uint8_T u1_26;
  uint8_T u1_27;
  uint8_T u1_28;
  uint8_T u1_29;
  uint8_T u1_2a;
  uint8_T u1_2b;
  uint8_T u1_2c;
  uint8_T u1_2d;
  uint8_T u1_2e;
  uint8_T u1_2f;
  uint8_T u1_2g;
  uint8_T u1_2h;
  uint8_T u1_2i;
  uint8_T u1_2j;
  uint8_T u1_2k;
  uint8_T u1_2l;
  uint8_T u1_2m;
  uint8_T u1_2n;
  uint8_T u1_2o;
  uint8_T u1_2p;
  uint8_T u1_2q;
  uint8_T u1_2r;
  uint8_T u1_2s;
  uint8_T u1_2t;
  uint8_T u1_2u;
  uint8_T u1_2v;
  uint8_T u1_2w;
  uint8_T u1_2x;
  uint8_T u1_2y;
  uint8_T u1_2z;
  uint8_T u1_30;
  uint8_T u1_31;
  uint8_T u1_32;
  uint8_T u1_33;
  uint8_T u1_34;
  uint8_T u1_35;
  uint8_T u1_36;
  uint8_T u1_37;
  uint8_T u1_38;
  uint8_T u1_39;
  uint8_T u1_3a;
  uint8_T u1_3b;
  uint8_T u1_3c;
  uint8_T u1_3d;
  uint8_T u1_3e;
  uint8_T u1_3f;
  uint8_T u1_3g;
  uint8_T u1_3h;
  uint8_T u1_3i;
  uint8_T u1_3j;
  uint8_T u1_3k;
  uint8_T u1_3l;
  uint8_T u1_3m;
  uint8_T u1_3n;
  uint8_T u1_3o;
  uint8_T u1_3p;
  uint8_T u1_3q;
  uint8_T u1_3r;
  uint8_T u1_3s;
  uint8_T u1_3t;
  uint8_T u1_3u;
  uint8_T u1_3v;
  uint8_T u1_3w;
  uint8_T u1_3x;
  uint8_T u1_3y;
  uint8_T u1_3z;
  uint8_T u1_40;
  uint8_T u1_41;
  uint8_T u1_42;
  uint8_T u1_43;
  uint8_T u1_44;
  uint8_T u1_45;
  uint8_T u1_46;
  uint8_T u1_47;
  uint8_T u1_48;
  uint8_T u1_49;
  uint8_T u1_4a;
  uint8_T u1_4b;
  uint8_T u1_4c;
  uint8_T u1_4d;
  uint8_T u1_4e;
  uint8_T u1_4f;
  uint8_T u1_4g;
  uint8_T u1_4h;
  uint8_T u1_4i;
  uint8_T u1_4j;
  uint8_T u1_4k;
  uint8_T u1_4l;
  uint8_T u1_4m;
  uint8_T u1_4n;
  uint8_T u1_4o;
  uint8_T u1_4p;
  uint8_T u1_4q;
  uint8_T u1_4r;
  uint8_T u1_4s;
  uint8_T u1_4t;
  uint8_T u1_4u;
  uint8_T u1_4v;
  uint8_T u1_4w;
  uint8_T u1_4x;
  uint8_T u1_4y;
  uint8_T u1_4z;
  uint8_T u1_50;
  uint8_T u1_51;
  uint8_T u1_52;
  uint8_T u1_53;
  uint8_T u1_54;
  uint8_T u1_55;
  uint8_T u1_56;
  uint8_T u1_57;
  uint8_T u1_58;
  uint8_T u1_59;
  uint8_T u1_5a;
  uint8_T u1_5b;
  uint8_T u1_5c;
  uint8_T u1_5d;
  uint8_T u1_5e;
  uint8_T u1_5f;
  uint8_T u1_5g;
  uint8_T u1_5h;
  uint8_T u1_5i;
  uint8_T u1_5j;
  uint8_T u1_5k;
  uint8_T u1_5l;
  uint8_T u1_5m;
  uint8_T u1_5n;
  uint8_T u1_5o;
  uint8_T u1_5p;
  uint8_T u1_5q;
  uint8_T u1_5r;
  uint8_T u1_5s;
  uint8_T u1_5t;
  uint8_T u1_5u;
  uint8_T u1_5v;
  uint8_T u1_5w;
  uint8_T u1_5x;
  uint8_T u1_5y;
  uint8_T u1_5z;
  uint8_T u1_60;
  uint8_T u1_61;
  uint8_T u1_62;
  uint8_T u1_63;
  uint8_T u1_64;
  uint8_T u1_65;
  uint8_T u1_66;
  uint8_T u1_67;
  uint8_T u1_68;
  uint8_T u1_69;
  uint8_T u1_6a;
  uint8_T u1_6b;
  uint8_T u1_6c;
  uint8_T u1_6d;
  uint8_T u1_6e;
  uint8_T u1_6f;
  uint8_T u1_6g;
  tmp = GaCFM_AFEComLost_flg[0];
  rtb_DataTypeConversion8[0] = (int8_T)GaCFM_AFECellVoltUpdErr_flg[0];
  for (i = 0; i < 7; i++) {
    tmp += GaCFM_AFEComLost_flg[i + 1];
    rtb_DataTypeConversion8[i + 1] = (int8_T)GaCFM_AFECellVoltUpdErr_flg[i + 1];
  }

  rtb_DFC_BattUNpl_applied181 = (uint8_T)tmp;
  tmp = (uint32_T)rtb_DataTypeConversion8[0];
  for (i = 0; i < 7; i++) {
    tmp += rtb_DataTypeConversion8[i + 1];
  }

  rtb_DFC_BattUNpl_applied182 = (uint8_T)tmp;
  if (rtb_DFC_BattUNpl_applied182 != 0) {
    rtb_DFC_BattUNpl_applied182 = DFES_Cls_DFC_AFECellVoltUpdErr_C;
  }

  tmp = GaCFM_AFECellTempUpdErr_flg[0];
  for (i = 0; i < 7; i++) {
    tmp += GaCFM_AFECellTempUpdErr_flg[i + 1];
  }

  rtb_DFC_BattUNpl_applied183 = (uint8_T)tmp;
  if (rtb_DFC_BattUNpl_applied183 != 0) {
    rtb_DFC_BattUNpl_applied183 = DFES_Cls_DFC_AFECellTempUpdErr_C;
  }

  tmp = GaCFM_AFESampleErr_flg[0];
  for (i = 0; i < 7; i++) {
    tmp += GaCFM_AFESampleErr_flg[i + 1];
  }

  rtb_DFC_BattUNpl_applied184 = (uint8_T)tmp;
  if (rtb_DFC_BattUNpl_applied184 != 0) {
    rtb_DFC_BattUNpl_applied184 = DFES_Cls_DFC_AFESampleErr_C;
  }

  tmp = GaCFM_AFECellVoltLineOpen_flg[0];
  for (i = 0; i < 7; i++) {
    tmp += GaCFM_AFECellVoltLineOpen_flg[i + 1];
  }

  rtb_DFC_BattUNpl_applied185 = (uint8_T)tmp;
  if (rtb_DFC_BattUNpl_applied185 != 0) {
    rtb_DFC_BattUNpl_applied185 = DFES_Cls_DFC_AFECellVoltLineOpen_C;
  }

  tmp = GaCFM_AFEGpioLineOpen_flg[0];
  for (i = 0; i < 7; i++) {
    tmp += GaCFM_AFEGpioLineOpen_flg[i + 1];
  }

  rtb_DFC_BattUNpl_applied186 = (uint8_T)tmp;
  if (rtb_DFC_BattUNpl_applied186 != 0) {
    rtb_DFC_BattUNpl_applied186 = DFES_Cls_DFC_AFEGpioLineOpen_C;
  }

  tmp = GaCFM_AFEAdcRelatedErr_flg[0];
  for (i = 0; i < 7; i++) {
    tmp += GaCFM_AFEAdcRelatedErr_flg[i + 1];
  }

  rtb_DFC_BattUNpl_applied187 = (uint8_T)tmp;
  if (rtb_DFC_BattUNpl_applied187 != 0) {
    rtb_DFC_BattUNpl_applied187 = DFES_Cls_DFC_AFEAdcRelatedErr_C;
  }

  tmp = GaCFM_AFEDiagModeExitErr_flg[0];
  for (i = 0; i < 7; i++) {
    tmp += GaCFM_AFEDiagModeExitErr_flg[i + 1];
  }

  rtb_DFC_BattUNpl_applied188 = (uint8_T)tmp;
  if (rtb_DFC_BattUNpl_applied188 != 0) {
    rtb_DFC_BattUNpl_applied188 = DFES_Cls_DFC_AFEDiagModeExitErr_C;
  }

  tmp = GaCFM_AFEOtherErr_flg[0];
  for (i = 0; i < 7; i++) {
    tmp += GaCFM_AFEOtherErr_flg[i + 1];
  }

  rtb_DFC_BattUNpl_applied189 = (uint8_T)tmp;
  if (rtb_DFC_BattUNpl_applied189 != 0) {
    rtb_DFC_BattUNpl_applied189 = DFES_Cls_DFC_AFEOtherErr_C;
  }

  if ((DFC_CurrRngErr_ASW & 24) == 24) {
    u0 = DFES_Cls_DFC_CurrRngErr_C;
  } else {
    u0 = 0U;
  }

  if ((DFC_BattVoltRngErr_ASW & 24) == 24) {
    u1 = DFES_Cls_DFC_BattVoltRngErr_C;
  } else {
    u1 = 0U;
  }

  if ((DFC_BattHVMsgTmt_ASW & 24) == 24) {
    u1_0 = DFES_Cls_DFC_BattHVMsgTmt_C;
  } else {
    u1_0 = 0U;
  }

  if ((DFC_BusHVMsgTmt_ASW & 24) == 24) {
    u1_1 = DFES_Cls_DFC_BusHVMsgTmt_C;
  } else {
    u1_1 = 0U;
  }

  if ((DFC_638LinCommErr_ASW & 24) == 24) {
    u1_2 = DFES_Cls_DFC_638LinCommErr_C;
  } else {
    u1_2 = 0U;
  }

  if ((DFC_CellTempTmt_ASW & 24) == 24) {
    u1_3 = DFES_Cls_DFC_CellTempTmt_C;
  } else {
    u1_3 = 0U;
  }

  if ((DFC_CellVoltTmt_ASW & 24) == 24) {
    u1_4 = DFES_Cls_DFC_CellVoltTmt_C;
  } else {
    u1_4 = 0U;
  }

  if ((DFC_InCanBusOff_ASW & 24) == 24) {
    u1_5 = DFES_Cls_DFC_InCanBusOff_C;
  } else {
    u1_5 = 0U;
  }

  if ((DFC_VeCanBusOff_ASW & 24) == 24) {
    u1_6 = DFES_Cls_DFC_VeCanBusOff_C;
  } else {
    u1_6 = 0U;
  }

  if ((DFC_Msg2A3Tmt_ASW & 24) == 24) {
    u1_7 = DFES_Cls_DFC_Msg2A3Tmt_C;
  } else {
    u1_7 = 0U;
  }

  if ((DFC_RcMsg2A3Mis_ASW & 24) == 24) {
    u1_8 = DFES_Cls_DFC_RcMsg2A3Mis_C;
  } else {
    u1_8 = 0U;
  }

  if ((DFC_ChkSumMsg2A3Err_ASW & 24) == 24) {
    u1_9 = DFES_Cls_DFC_ChkSumMsg2A3Err_C;
  } else {
    u1_9 = 0U;
  }

  if ((DFC_RcMsg2A5Mis_ASW & 24) == 24) {
    u1_a = DFES_Cls_DFC_RcMsg2A5Mis_C;
  } else {
    u1_a = 0U;
  }

  if ((DFC_RcMsg2A7Mis_ASW & 24) == 24) {
    u1_b = DFES_Cls_DFC_RcMsg2A7Mis_C;
  } else {
    u1_b = 0U;
  }

  if ((DFC_CrashNpl_ASW & 24) == 24) {
    u1_c = DFES_Cls_DFC_CrashNpl_C;
  } else {
    u1_c = 0U;
  }

  if ((DFC_FuseNpl_ASW & 24) == 24) {
    u1_d = DFES_Cls_DFC_FuseNpl_C;
  } else {
    u1_d = 0U;
  }

  if ((DFC_Kl30cVoltLoErr_ASW & 24) == 24) {
    u1_e = DFES_Cls_DFC_Kl30cVoltLoErr_C;
  } else {
    u1_e = 0U;
  }

  if ((DFC_PosStuckMax_ASW & 24) == 24) {
    u1_f = DFES_Cls_DFC_PosStuckMax_C;
  } else {
    u1_f = 0U;
  }

  if ((DFC_MPosStuckMin_ASW & 24) == 24) {
    u1_g = DFES_Cls_DFC_MPosStuckMin_C;
  } else {
    u1_g = 0U;
  }

  if ((DFC_MNegStuckMax_ASW & 24) == 24) {
    u1_h = DFES_Cls_DFC_MNegStuckMax_C;
  } else {
    u1_h = 0U;
  }

  if ((DFC_MNegStuckMin_ASW & 24) == 24) {
    u1_i = DFES_Cls_DFC_MNegStuckMin_C;
  } else {
    u1_i = 0U;
  }

  if ((DFC_PrStuckMin_ASW & 24) == 24) {
    u1_j = DFES_Cls_DFC_PrStuckMin_C;
  } else {
    u1_j = 0U;
  }

  if ((DFC_DChrgPosStuckMax_ASW & 24) == 24) {
    u1_k = DFES_Cls_DFC_DChrgPosStuckMax_C;
  } else {
    u1_k = 0U;
  }

  if ((DFC_DChrgPosStuckMin_ASW & 24) == 24) {
    u1_l = DFES_Cls_DFC_DChrgPosStuckMin_C;
  } else {
    u1_l = 0U;
  }

  if ((DFC_DChrgNegStuckMax_ASW & 24) == 24) {
    u1_m = DFES_Cls_DFC_DChrgNegStuckMax_C;
  } else {
    u1_m = 0U;
  }

  if ((DFC_DChrgNegStuckMin_ASW & 24) == 24) {
    u1_n = DFES_Cls_DFC_DChrgNegStuckMin_C;
  } else {
    u1_n = 0U;
  }

  if ((DFC_HvPwrUpFail_ASW & 24) == 24) {
    u1_o = DFES_Cls_DFC_HvPwrUpFail_C;
  } else {
    u1_o = 0U;
  }

  if ((DFC_DChrgPwrUpFail_ASW & 24) == 24) {
    u1_p = DFES_Cls_DFC_DChrgPwrUpFail_C;
  } else {
    u1_p = 0U;
  }

  if ((DFC_BattTAlrmMax_ASW & 24) == 24) {
    u1_q = DFES_Cls_DFC_BattTAlrmMax_C;
  } else {
    u1_q = 0U;
  }

  if ((DFC_BattTFaultMax_ASW & 24) == 24) {
    u1_r = DFES_Cls_DFC_BattTFaultMax_C;
  } else {
    u1_r = 0U;
  }

  if ((DFC_BattTAlrmMin_ASW & 24) == 24) {
    u1_s = DFES_Cls_DFC_BattTAlrmMin_C;
  } else {
    u1_s = 0U;
  }

  if ((DFC_BattTFaultMin_ASW & 24) == 24) {
    u1_t = DFES_Cls_DFC_BattTFaultMin_C;
  } else {
    u1_t = 0U;
  }

  if ((DFC_BattTempVldMin_ASW & 24) == 24) {
    u1_u = DFES_Cls_DFC_BattTempVldMin_C;
  } else {
    u1_u = 0U;
  }

  if ((DFC_BattTCnstMax_ASW & 24) == 24) {
    u1_v = DFES_Cls_DFC_BattTCnstMax_C;
  } else {
    u1_v = 0U;
  }

  if ((DFC_BattTGradtMax_ASW & 24) == 24) {
    u1_w = DFES_Cls_DFC_BattTGradtMax_C;
  } else {
    u1_w = 0U;
  }

  if ((DFC_CellVoltAlrmMax_ASW & 24) == 24) {
    u1_x = DFES_Cls_DFC_CellVoltAlrmMax_C;
  } else {
    u1_x = 0U;
  }

  if ((DFC_CellVoltFaultMax_ASW & 24) == 24) {
    u1_y = DFES_Cls_DFC_CellVoltFaultMax_C;
  } else {
    u1_y = 0U;
  }

  if ((DFC_CellVoltFusfMax_ASW & 24) == 24) {
    u1_z = DFES_Cls_DFC_CellVoltFusfMax_C;
  } else {
    u1_z = 0U;
  }

  if ((DFC_CellVoltAlrmMin_ASW & 24) == 24) {
    u1_10 = DFES_Cls_DFC_CellVoltAlrmMin_C;
  } else {
    u1_10 = 0U;
  }

  if ((DFC_CellVoltFusfMin_ASW & 24) == 24) {
    u1_11 = DFES_Cls_DFC_CellVoltFusfMin_C;
  } else {
    u1_11 = 0U;
  }

  if ((DFC_CellVoltFaultMin_ASW & 24) == 24) {
    u1_12 = DFES_Cls_DFC_CellVoltFaultMin_C;
  } else {
    u1_12 = 0U;
  }

  if ((DFC_CellVoltVldMin_ASW & 24) == 24) {
    u1_13 = DFES_Cls_DFC_CellVoltVldMin_C;
  } else {
    u1_13 = 0U;
  }

  if ((DFC_CellVoltNpl_ASW & 24) == 24) {
    u1_14 = DFES_Cls_DFC_CellVoltNpl_C;
  } else {
    u1_14 = 0U;
  }

  if ((DFC_Msg2E6Tmt_ASW & 24) == 24) {
    u1_15 = DFES_Cls_DFC_Msg2E6Tmt_C;
  } else {
    u1_15 = 0U;
  }

  if ((DFC_RcMsg2E0Mis_ASW & 24) == 24) {
    u1_16 = DFES_Cls_DFC_RcMsg2E6Mis_C;
  } else {
    u1_16 = 0U;
  }

  if ((DFC_ChkSumMsg2E0Err_ASW & 24) == 24) {
    u1_17 = DFES_Cls_DFC_ChkSumMsg2E6Err_C;
  } else {
    u1_17 = 0U;
  }

  if ((DFC_RcMsg2E1Mis_ASW & 24) == 24) {
    u1_18 = DFES_Cls_DFC_RcMsg2E1Mis_C;
  } else {
    u1_18 = 0U;
  }

  if ((DFC_ChkSumMsg2E1Err_ASW & 24) == 24) {
    u1_19 = DFES_Cls_DFC_ChkSumMsg2E1Err_C;
  } else {
    u1_19 = 0U;
  }

  if ((DFC_DcCanBusOff_ASW & 24) == 24) {
    u1_1a = DFES_Cls_DFC_DcCanBusOff_C;
  } else {
    u1_1a = 0U;
  }

  if ((DFC_DChrgTCnntMax_ASW & 24) == 24) {
    u1_1b = DFES_Cls_DFC_DChrgTCnntMax_C;
  } else {
    u1_1b = 0U;
  }

  if ((DFC_ChrgOCNpl_ASW & 24) == 24) {
    u1_1c = DFES_Cls_DFC_ChrgOCNpl_C;
  } else {
    u1_1c = 0U;
  }

  if ((DFC_DisChOCNpl_ASW & 24) == 24) {
    u1_1d = DFES_Cls_DFC_DisChOCNpl_C;
  } else {
    u1_1d = 0U;
  }

  if ((DFC_BattVoltHiMax_ASW & 24) == 24) {
    u1_1e = DFES_Cls_DFC_BattVoltHiMax_C;
  } else {
    u1_1e = 0U;
  }

  if ((DFC_BattVoltLoMin_ASW & 24) == 24) {
    u1_1f = DFES_Cls_DFC_BattVoltLoMin_C;
  } else {
    u1_1f = 0U;
  }

  if ((DFC_ThmRnwy_ASW & 24) == 24) {
    u1_1g = DFES_Cls_DFC_ThmRnwy_C;
  } else {
    u1_1g = 0U;
  }

  if ((DFC_AChrgPortOvrTemp_ASW & 24) == 24) {
    u1_1h = DFES_Cls_DFC_AChrgPortOvrTemp_C;
  } else {
    u1_1h = 0U;
  }

  if ((DFC_CurrOffsPlaus_ASW & 24) == 24) {
    u1_1i = DFES_Cls_DFC_CurrOffsPlaus_C;
  } else {
    u1_1i = 0U;
  }

  if ((DFC_CurrStukPlaus_ASW & 24) == 24) {
    u1_1j = DFES_Cls_DFC_CurrStukPlaus_C;
  } else {
    u1_1j = 0U;
  }

  if ((DFC_CurrChrgPlaus_ASW & 24) == 24) {
    u1_1k = DFES_Cls_DFC_CurrChrgPlaus_C;
  } else {
    u1_1k = 0U;
  }

  if ((DFC_BattUNpl_ASW & 24) == 24) {
    u1_1l = DFES_Cls_DFC_BattUNpl_C;
  } else {
    u1_1l = 0U;
  }

  if ((DFC_BattVoltVld_ASW & 24) == 24) {
    u1_1m = DFES_Cls_DFC_BattVoltVld_C;
  } else {
    u1_1m = 0U;
  }

  if ((DFC_PackUNpl_ASW & 24) == 24) {
    u1_1n = DFES_Cls_DFC_PackUNpl_C;
  } else {
    u1_1n = 0U;
  }

  if ((DFC_PackVoltVld_ASW & 24) == 24) {
    u1_1o = DFES_Cls_DFC_PackVoltVld_C;
  } else {
    u1_1o = 0U;
  }

  if ((DFC_DChrgUNpl_ASW & 24) == 24) {
    u1_1p = DFES_Cls_DFC_DChrgUNpl_C;
  } else {
    u1_1p = 0U;
  }

  if ((DFC_DChrgVoltVld_ASW & 24) == 24) {
    u1_1q = DFES_Cls_DFC_DChrgVoltVld_C;
  } else {
    u1_1q = 0U;
  }

  if ((DFC_BoardTempTmt_ASW & 24) == 24) {
    u1_1r = DFES_Cls_DFC_BoardTempTmt_C;
  } else {
    u1_1r = 0U;
  }

  if ((DFC_HvilMax_ASW & 24) == 24) {
    u1_1s = DFES_Cls_DFC_HvilMax_C;
  } else {
    u1_1s = 0U;
  }

  if ((DFC_HvilMin_ASW & 24) == 24) {
    u1_1t = DFES_Cls_DFC_HvilMin_C;
  } else {
    u1_1t = 0U;
  }

  if ((DFC_HvilSig_ASW & 24) == 24) {
    u1_1u = DFES_Cls_DFC_HvilSig_C;
  } else {
    u1_1u = 0U;
  }

  if ((DFC_ChkSumMsg050Err_ASW & 24) == 24) {
    u1_1v = DFES_Cls_DFC_ChkSumMsg050Err_C;
  } else {
    u1_1v = 0U;
  }

  if ((DFC_RcMsg050Mis_ASW & 24) == 24) {
    u1_1w = DFES_Cls_DFC_RcMsg050Mis_C;
  } else {
    u1_1w = 0U;
  }

  if ((DFC_CrashHwNpl_ASW & 24) == 24) {
    u1_1x = DFES_Cls_DFC_CrashHwNpl_C;
  } else {
    u1_1x = 0U;
  }

  if ((DFC_IsoChkLv1_ASW & 24) == 24) {
    u1_1y = DFES_Cls_DFC_IsoChkLv1_C;
  } else {
    u1_1y = 0U;
  }

  if ((DFC_IsoChkLv2_ASW & 24) == 24) {
    u1_1z = DFES_Cls_DFC_IsoChkLv2_C;
  } else {
    u1_1z = 0U;
  }

  if ((DFC_InsResValdFault_ASW & 24) == 24) {
    u1_20 = DFES_Cls_DFC_InsResValdFault_C;
  } else {
    u1_20 = 0U;
  }

  if ((DFC_Kl30OutRngErr_ASW & 24) == 24) {
    u1_21 = DFES_Cls_DFC_Kl30OutRngErr_C;
  } else {
    u1_21 = 0U;
  }

  if ((DFC_Kl30VoltLoErr_ASW & 24) == 24) {
    u1_22 = DFES_Cls_DFC_Kl30VoltLoErr_C;
  } else {
    u1_22 = 0U;
  }

  if ((DFC_Kl30VoltHiErr_ASW & 24) == 24) {
    u1_23 = DFES_Cls_DFC_Kl30VoltHiErr_C;
  } else {
    u1_23 = 0U;
  }

  if ((DFC_EepReadErr_ASW & 24) == 24) {
    u1_24 = DFES_Cls_DFC_EepReadErr_C;
  } else {
    u1_24 = 0U;
  }

  if ((DFC_BalStuckMax_ASW & 24) == 24) {
    u1_25 = DFES_Cls_DFC_BalStuckMax_C;
  } else {
    u1_25 = 0U;
  }

  if ((DFC_BalStuckMin_ASW & 24) == 24) {
    u1_26 = DFES_Cls_DFC_BalStuckMin_C;
  } else {
    u1_26 = 0U;
  }

  if ((DFC_CSCPwrSpyHiErr_ASW & 24) == 24) {
    u1_27 = DFES_Cls_DFC_CSCPwrSpyHiErr_C;
  } else {
    u1_27 = 0U;
  }

  if ((DFC_CSCPwrSpyLoErr_ASW & 24) == 24) {
    u1_28 = DFES_Cls_DFC_CSCPwrSpyLoErr_C;
  } else {
    u1_28 = 0U;
  }

  if ((DFC_CmcBordOTMax_ASW & 24) == 24) {
    u1_29 = DFES_Cls_DFC_CmcBordOTMax_C;
  } else {
    u1_29 = 0U;
  }

  if ((DFC_BattTWarnMax_ASW & 24) == 24) {
    u1_2a = DFES_Cls_DFC_BattTWarnMax_C;
  } else {
    u1_2a = 0U;
  }

  if ((DFC_BattTWarnMin_ASW & 24) == 24) {
    u1_2b = DFES_Cls_DFC_BattTWarnMin_C;
  } else {
    u1_2b = 0U;
  }

  if ((DFC_BattTempVldMax_ASW & 24) == 24) {
    u1_2c = DFES_Cls_DFC_BattTempVldMax_C;
  } else {
    u1_2c = 0U;
  }

  if ((DFC_BattTHopMax_ASW & 24) == 24) {
    u1_2d = DFES_Cls_DFC_BattTHopMax_C;
  } else {
    u1_2d = 0U;
  }

  if ((DFC_CellVoltRngHiErr_ASW & 24) == 24) {
    u1_2e = DFES_Cls_DFC_CellVoltRngHiErr_C;
  } else {
    u1_2e = 0U;
  }

  if ((DFC_CellVoltRngLoErr_ASW & 24) == 24) {
    u1_2f = DFES_Cls_DFC_CellVoltRngLoErr_C;
  } else {
    u1_2f = 0U;
  }

  if ((DFC_CellVoltWarnMax_ASW & 24) == 24) {
    u1_2g = DFES_Cls_DFC_CellVoltWarnMax_C;
  } else {
    u1_2g = 0U;
  }

  if ((DFC_CellVoltWarnMin_ASW & 24) == 24) {
    u1_2h = DFES_Cls_DFC_CellVoltWarnMin_C;
  } else {
    u1_2h = 0U;
  }

  if ((DFC_CellVoltVldMax_ASW & 24) == 24) {
    u1_2i = DFES_Cls_DFC_CellVoltVldMax_C;
  } else {
    u1_2i = 0U;
  }

  if ((DFC_AChrgCurrMish_ASW & 24) == 24) {
    u1_2j = DFES_Cls_DFC_AChrgCurrMish_C;
  } else {
    u1_2j = 0U;
  }

  if ((DFC_DChrgCurrMish_ASW & 24) == 24) {
    u1_2k = DFES_Cls_DFC_DChrgCurrMish_C;
  } else {
    u1_2k = 0U;
  }

  if ((DFC_DChrgLowTempCurrMish_ASW & 24) == 24) {
    u1_2l = DFES_Cls_DFC_DChrgLowTempCurrMish_C;
  } else {
    u1_2l = 0U;
  }

  if ((DFC_AChrgVoltMish_ASW & 24) == 24) {
    u1_2m = DFES_Cls_DFC_AChrgVoltMish_C;
  } else {
    u1_2m = 0U;
  }

  if ((DFC_DChrgVoltMish_ASW & 24) == 24) {
    u1_2n = DFES_Cls_DFC_DChrgVoltMish_C;
  } else {
    u1_2n = 0U;
  }

  if ((DFC_DChrgBattTMin_ASW & 24) == 24) {
    u1_2o = DFES_Cls_DFC_DChrgBattTMin_C;
  } else {
    u1_2o = 0U;
  }

  if ((DFC_CC2Chk_ASW & 24) == 24) {
    u1_2p = DFES_Cls_DFC_CC2Chk_C;
  } else {
    u1_2p = 0U;
  }

  if ((DFC_APlusChk_ASW & 24) == 24) {
    u1_2q = DFES_Cls_DFC_APlusChk_C;
  } else {
    u1_2q = 0U;
  }

  if ((DFC_DChrgMsgTmt_ASW & 24) == 24) {
    u1_2r = DFES_Cls_DFC_DChrgMsgTmt_C;
  } else {
    u1_2r = 0U;
  }

  if ((DFC_DChrgTNegElecMax_ASW & 24) == 24) {
    u1_2s = DFES_Cls_DFC_DChrgTNegElecMax_C;
  } else {
    u1_2s = 0U;
  }

  if ((DFC_DChrgTNegElecMin_ASW & 24) == 24) {
    u1_2t = DFES_Cls_DFC_DChrgTNegElecMin_C;
  } else {
    u1_2t = 0U;
  }

  if ((DFC_DChrgTNegElecSig_ASW & 24) == 24) {
    u1_2u = DFES_Cls_DFC_DChrgTNegElecSig_C;
  } else {
    u1_2u = 0U;
  }

  if ((DFC_DChrgTPosElecMax_ASW & 24) == 24) {
    u1_2v = DFES_Cls_DFC_DChrgTPosElecMax_C;
  } else {
    u1_2v = 0U;
  }

  if ((DFC_DChrgTPosElecMin_ASW & 24) == 24) {
    u1_2w = DFES_Cls_DFC_DChrgTPosElecMin_C;
  } else {
    u1_2w = 0U;
  }

  if ((DFC_DChrgTPosElecSig_ASW & 24) == 24) {
    u1_2x = DFES_Cls_DFC_DChrgTPosElecSig_C;
  } else {
    u1_2x = 0U;
  }

  if ((DFC_CcuSelfChkErr_ASW & 24) == 24) {
    u1_2y = DFES_Cls_DFC_CcuSelfChkErr_C;
  } else {
    u1_2y = 0U;
  }

  if ((DFC_ChrgOCMin_ASW & 24) == 24) {
    u1_2z = DFES_Cls_DFC_ChrgOCMin_C;
  } else {
    u1_2z = 0U;
  }

  if ((DFC_ChrgOCMax_ASW & 24) == 24) {
    u1_30 = DFES_Cls_DFC_ChrgOCMax_C;
  } else {
    u1_30 = 0U;
  }

  if ((DFC_DisChOCMin_ASW & 24) == 24) {
    u1_31 = DFES_Cls_DFC_DisChOCMin_C;
  } else {
    u1_31 = 0U;
  }

  if ((DFC_DisChOCMax_ASW & 24) == 24) {
    u1_32 = DFES_Cls_DFC_DisChOCMax_C;
  } else {
    u1_32 = 0U;
  }

  if ((DFC_SocRngLoMax_ASW & 24) == 24) {
    u1_33 = DFES_Cls_DFC_SocRngLoMax_C;
  } else {
    u1_33 = 0U;
  }

  if ((DFC_SocRngLoMin_ASW & 24) == 24) {
    u1_34 = DFES_Cls_DFC_SocRngLoMin_C;
  } else {
    u1_34 = 0U;
  }

  if ((DFC_SocRngHiMax_ASW & 24) == 24) {
    u1_35 = DFES_Cls_DFC_SocRngHiMax_C;
  } else {
    u1_35 = 0U;
  }

  if ((DFC_SocRngHiMin_ASW & 24) == 24) {
    u1_36 = DFES_Cls_DFC_SocRngHiMin_C;
  } else {
    u1_36 = 0U;
  }

  if ((DFC_InClntOverTmp_ASW & 24) == 24) {
    u1_37 = DFES_Cls_DFC_InClntOverTmp_C;
  } else {
    u1_37 = 0U;
  }

  if ((DFC_OutClntOverTmp_ASW & 24) == 24) {
    u1_38 = DFES_Cls_DFC_OutClntOverTmp_C;
  } else {
    u1_38 = 0U;
  }

  if ((DFC_ClntDsTElecMax_ASW & 24) == 24) {
    u1_39 = DFES_Cls_DFC_ClntDsTElecMax_C;
  } else {
    u1_39 = 0U;
  }

  if ((DFC_ClntDsTElecMin_ASW & 24) == 24) {
    u1_3a = DFES_Cls_DFC_ClntDsTElecMin_C;
  } else {
    u1_3a = 0U;
  }

  if ((DFC_ClntDsTElecSig_ASW & 24) == 24) {
    u1_3b = DFES_Cls_DFC_ClntDsTElecSig_C;
  } else {
    u1_3b = 0U;
  }

  if ((DFC_ClntUsTElecMax_ASW & 24) == 24) {
    u1_3c = DFES_Cls_DFC_ClntUsTElecMax_C;
  } else {
    u1_3c = 0U;
  }

  if ((DFC_ClntUsTElecMin_ASW & 24) == 24) {
    u1_3d = DFES_Cls_DFC_ClntUsTElecMin_C;
  } else {
    u1_3d = 0U;
  }

  if ((DFC_ClntUsTElecSig_ASW & 24) == 24) {
    u1_3e = DFES_Cls_DFC_ClntUsTElecSig_C;
  } else {
    u1_3e = 0U;
  }

  if ((DFC_CoolPerfPlaus_ASW & 24) == 24) {
    u1_3f = DFES_Cls_DFC_CoolPerfPlaus_C;
  } else {
    u1_3f = 0U;
  }

  if ((DFC_HtgPerfPlaus_ASW & 24) == 24) {
    u1_3g = DFES_Cls_DFC_HtgPerfPlaus_C;
  } else {
    u1_3g = 0U;
  }

  if ((DFC_DChrgFobd_ASW & 24) == 24) {
    u1_3h = DFES_Cls_DFC_DChrgFobd_C;
  } else {
    u1_3h = 0U;
  }

  if ((DFC_DChrgHvOnFail_ASW & 24) == 24) {
    u1_3i = DFES_Cls_DFC_DChrgHvOnFail_C;
  } else {
    u1_3i = 0U;
  }

  if ((DFC_AChgHVOnTmt_ASW & 24) == 24) {
    u1_3j = DFES_Cls_DFC_AChgHVOnTmt_C;
  } else {
    u1_3j = 0U;
  }

  if ((DFC_AChgHVOffTmt_ASW & 24) == 24) {
    u1_3k = DFES_Cls_DFC_AChgHVOffTmt_C;
  } else {
    u1_3k = 0U;
  }

  if ((DFC_AChgS2ClsdTmt_ASW & 24) == 24) {
    u1_3l = DFES_Cls_DFC_AChgS2ClsdTmt_C;
  } else {
    u1_3l = 0U;
  }

  if ((DFC_DChrgStakeErr_ASW & 24) == 24) {
    u1_3m = DFES_Cls_DFC_DChrgStakeErr_C;
  } else {
    u1_3m = 0U;
  }

  if ((DFC_DChrgStkVoltErr_ASW & 24) == 24) {
    u1_3n = DFES_Cls_DFC_DChrgStkVoltErr_C;
  } else {
    u1_3n = 0U;
  }

  if ((DFC_DChrgStkCurrErr_ASW & 24) == 24) {
    u1_3o = DFES_Cls_DFC_DChrgStkCurrErr_C;
  } else {
    u1_3o = 0U;
  }

  if ((DFC_AChgPileRdyTmt_ASW & 24) == 24) {
    u1_3p = DFES_Cls_DFC_AChgPileRdyTmt_C;
  } else {
    u1_3p = 0U;
  }

  if ((DFC_DChrgCHMTmt_ASW & 24) == 24) {
    u1_3q = DFES_Cls_DFC_DChrgCHMTmt_C;
  } else {
    u1_3q = 0U;
  }

  if ((DFC_DChrgCRMTmt_ASW & 24) == 24) {
    u1_3r = DFES_Cls_DFC_DChrgCRMTmt_C;
  } else {
    u1_3r = 0U;
  }

  if ((DFC_DChrgCMLTmt_ASW & 24) == 24) {
    u1_3s = DFES_Cls_DFC_DChrgCMLTmt_C;
  } else {
    u1_3s = 0U;
  }

  if ((DFC_DChrgCROTmt_ASW & 24) == 24) {
    u1_3t = DFES_Cls_DFC_DChrgCROTmt_C;
  } else {
    u1_3t = 0U;
  }

  if ((DFC_DChrgCCSTmt_ASW & 24) == 24) {
    u1_3u = DFES_Cls_DFC_DChrgCCSTmt_C;
  } else {
    u1_3u = 0U;
  }

  if ((DFC_DChrgCSTTmt_ASW & 24) == 24) {
    u1_3v = DFES_Cls_DFC_DChrgCSTTmt_C;
  } else {
    u1_3v = 0U;
  }

  if ((DFC_DChrgCSDTmt_ASW & 24) == 24) {
    u1_3w = DFES_Cls_DFC_DChrgCSDTmt_C;
  } else {
    u1_3w = 0U;
  }

  if ((DFC_DChrgParaChk_ASW & 24) == 24) {
    u1_3x = DFES_Cls_DFC_DChrgParaChk_C;
  } else {
    u1_3x = 0U;
  }

  if ((DFC_DChrgCableChk_ASW & 24) == 24) {
    u1_3y = DFES_Cls_DFC_DChrgCableChk_C;
  } else {
    u1_3y = 0U;
  }

  if ((DFC_DChrgSLACTOut_ASW & 24) == 24) {
    u1_3z = DFES_Cls_DFC_DChrgSLACTOut_C;
  } else {
    u1_3z = 0U;
  }

  if ((DFC_DChrgCnntErr_ASW & 24) == 24) {
    u1_40 = DFES_Cls_DFC_DChrgCnntErr_C;
  } else {
    u1_40 = 0U;
  }

  if ((DFC_DChrgLckErr_ASW & 24) == 24) {
    u1_41 = DFES_Cls_DFC_DChrgLckErr_C;
  } else {
    u1_41 = 0U;
  }

  if ((DFC_AChrgCnntErr_ASW & 24) == 24) {
    u1_42 = DFES_Cls_DFC_AChrgCnntErr_C;
  } else {
    u1_42 = 0U;
  }

  if ((DFC_AChgLckTmt_ASW & 24) == 24) {
    u1_43 = DFES_Cls_DFC_AChgLckTmt_C;
  } else {
    u1_43 = 0U;
  }

  if ((DFC_AChgRdyPndiTmt_ASW & 24) == 24) {
    u1_44 = DFES_Cls_DFC_AChgRdyPndiTmt_C;
  } else {
    u1_44 = 0U;
  }

  if ((DFC_AChgRdyTmt_ASW & 24) == 24) {
    u1_45 = DFES_Cls_DFC_AChgRdyTmt_C;
  } else {
    u1_45 = 0U;
  }

  if ((DFC_AChgingErr_ASW & 24) == 24) {
    u1_46 = DFES_Cls_DFC_AChgingErr_C;
  } else {
    u1_46 = 0U;
  }

  if ((DFC_AChgUnlckTmt_ASW & 24) == 24) {
    u1_47 = DFES_Cls_DFC_AChgUnlckTmt_C;
  } else {
    u1_47 = 0U;
  }

  if ((DFC_AChgFobd_ASW & 24) == 24) {
    u1_48 = DFES_Cls_DFC_AChgFobd_C;
  } else {
    u1_48 = 0U;
  }

  if ((DFC_SocValJmp_ASW & 24) == 24) {
    u1_49 = DFES_Cls_DFC_SocValJmp_C;
  } else {
    u1_49 = 0U;
  }

  if ((DFC_ChrgCmuLost_ASW & 24) == 24) {
    u1_4a = DFES_Cls_DFC_ChrgCmuLost_C;
  } else {
    u1_4a = 0U;
  }

  if ((DFC_DisChrgCmuLost_ASW & 24) == 24) {
    u1_4b = DFES_Cls_DFC_DisChrgCmuLost_C;
  } else {
    u1_4b = 0U;
  }

  if ((DFC_Msg130Tmt_ASW & 24) == 24) {
    u1_4c = DFES_Cls_DFC_Msg130Tmt_C;
  } else {
    u1_4c = 0U;
  }

  if ((DFC_Msg2E1Tmt_ASW & 24) == 24) {
    u1_4d = DFES_Cls_DFC_Msg2E1Tmt_C;
  } else {
    u1_4d = 0U;
  }

  if ((DFC_Msg2EBTmt_ASW & 24) == 24) {
    u1_4e = DFES_Cls_DFC_Msg2EBTmt_C;
  } else {
    u1_4e = 0U;
  }

  if ((DFC_MsgCABTmt_ASW & 24) == 24) {
    u1_4f = DFES_Cls_DFC_MsgCABTmt_C;
  } else {
    u1_4f = 0U;
  }

  if ((DFC_Msg0B5Tmt_ASW & 24) == 24) {
    u1_4g = DFES_Cls_DFC_Msg0B5Tmt_C;
  } else {
    u1_4g = 0U;
  }

  if ((DFC_ObcTmt_ASW & 24) == 24) {
    u1_4h = DFES_Cls_DFC_ObcTmt_C;
  } else {
    u1_4h = 0U;
  }

  if ((DFC_VcuTmt_ASW & 24) == 24) {
    u1_4i = DFES_Cls_DFC_VcuTmt_C;
  } else {
    u1_4i = 0U;
  }

  if ((DFC_Msg2A7Tmt_ASW & 24) == 24) {
    u1_4j = DFES_Cls_DFC_Msg2A7Tmt_C;
  } else {
    u1_4j = 0U;
  }

  if ((DFC_Msg2A5Tmt_ASW & 24) == 24) {
    u1_4k = DFES_Cls_DFC_Msg2A5Tmt_C;
  } else {
    u1_4k = 0U;
  }

  if ((DFC_Msg2ADTmt_ASW & 24) == 24) {
    u1_4l = DFES_Cls_DFC_Msg2ADTmt_C;
  } else {
    u1_4l = 0U;
  }

  if ((DFC_Msg2BBTmt_ASW & 24) == 24) {
    u1_4m = DFES_Cls_DFC_Msg2BBTmt_C;
  } else {
    u1_4m = 0U;
  }

  if ((DFC_Msg2DFTmt_ASW & 24) == 24) {
    u1_4n = DFES_Cls_DFC_Msg2DFTmt_C;
  } else {
    u1_4n = 0U;
  }

  if ((DFC_Msg3AATmt_ASW & 24) == 24) {
    u1_4o = DFES_Cls_DFC_Msg3AATmt_C;
  } else {
    u1_4o = 0U;
  }

  if ((DFC_Msg050Tmt_ASW & 24) == 24) {
    u1_4p = DFES_Cls_DFC_Msg050Tmt_C;
  } else {
    u1_4p = 0U;
  }

  if ((DFC_Msg2F1Tmt_ASW & 24) == 24) {
    u1_4q = DFES_Cls_DFC_Msg2F1Tmt_C;
  } else {
    u1_4q = 0U;
  }

  if ((DFC_Msg37FTmt_ASW & 24) == 24) {
    u1_4r = DFES_Cls_DFC_Msg37FTmt_C;
  } else {
    u1_4r = 0U;
  }

  if ((DFC_Msg28CTmt_ASW & 24) == 24) {
    u1_4s = DFES_Cls_DFC_Msg28CTmt_C;
  } else {
    u1_4s = 0U;
  }

  if ((DFC_Msg17DTmt_ASW & 24) == 24) {
    u1_4t = DFES_Cls_DFC_Msg17DTmt_C;
  } else {
    u1_4t = 0U;
  }

  if ((DFC_HwCurrElecSCG_ASW & 24) == 24) {
    u1_4u = DFES_Cls_DFC_HwCurrElecSCG_C;
  } else {
    u1_4u = 0U;
  }

  if ((DFC_HwCurrElecSCP_ASW & 24) == 24) {
    u1_4v = DFES_Cls_DFC_HwCurrElecSCP_C;
  } else {
    u1_4v = 0U;
  }

  if ((DFC_CABErr_ASW & 24) == 24) {
    u1_4w = DFES_Cls_DFC_CABErr_C;
  } else {
    u1_4w = 0U;
  }

  if ((DFC_BattCurrMismatchErr_ASW & 24) == 24) {
    u1_4x = DFES_Cls_DFC_BattCurrMismatchErr_C;
  } else {
    u1_4x = 0U;
  }

  if ((DFC_Msg195Tmt_ASW & 24) == 24) {
    u1_4y = DFES_Cls_DFC_Msg195Tmt_C;
  } else {
    u1_4y = 0U;
  }

  if (rtb_DFC_BattUNpl_applied181 != 0) {
    rtb_DFC_BattUNpl_applied181 = DFES_Cls_DFC_AFEComLost_C;
  } else {
    rtb_DFC_BattUNpl_applied181 = 0U;
  }

  if ((DFC_AcDischgFobd_ASW & 24) == 24) {
    u1_4z = DFES_Cls_DFC_AcDischgFobd_C;
  } else {
    u1_4z = 0U;
  }

  if ((DFC_BalCirOpenFlt_ASW & 24) == 24) {
    u1_50 = DFES_Cls_DFC_BalCirOpenFlt_C;
  } else {
    u1_50 = 0U;
  }

  if ((DFC_BalCirShortFlt_ASW & 24) == 24) {
    u1_51 = DFES_Cls_DFC_BalCirShortFlt_C;
  } else {
    u1_51 = 0U;
  }

  if ((DFC_BalTempHighFlt_ASW & 24) == 24) {
    u1_52 = DFES_Cls_DFC_BalTempHighFlt_C;
  } else {
    u1_52 = 0U;
  }

  if ((DFC_HVSmplComFlt_ASW & 24) == 24) {
    u1_53 = DFES_Cls_DFC_HVSmplComFlt_C;
  } else {
    u1_53 = 0U;
  }

  if ((DFC_HVSmplSigErr_ASW & 24) == 24) {
    u1_54 = DFES_Cls_DFC_HVSmplSigErr_C;
  } else {
    u1_54 = 0U;
  }

  if ((DFC_HVSmplSplyFlt_ASW & 24) == 24) {
    u1_55 = DFES_Cls_DFC_HVSmplSplyFlt_C;
  } else {
    u1_55 = 0U;
  }

  if ((DFC_CABVoltOutOfRng_ASW & 24) == 24) {
    u1_56 = DFES_Cls_DFC_CABVoltOutOfRng_C;
  } else {
    u1_56 = 0U;
  }

  if ((DFC_CABDevFlt_ASW & 24) == 24) {
    u1_57 = DFES_Cls_DFC_CABDevFlt_C;
  } else {
    u1_57 = 0U;
  }

  if ((DFC_BMSSplyPwrAbnToLem_ASW & 24) == 24) {
    u1_58 = DFES_Cls_DFC_BMSSplyPwrAbnToLem_C;
  } else {
    u1_58 = 0U;
  }

  if ((DFC_BMSSplyPwrAbnToCAB_ASW & 24) == 24) {
    u1_59 = DFES_Cls_DFC_BMSSplyPwrAbnToCAB_C;
  } else {
    u1_59 = 0U;
  }

  if ((DFC_NVMReadError_ASW & 24) == 24) {
    u1_5a = DFES_Cls_DFC_NVMReadError_C;
  } else {
    u1_5a = 0U;
  }

  if ((DFC_KL30Shutdown_ASW & 24) == 24) {
    u1_5b = DFES_Cls_DFC_KL30Shutdown_C;
  } else {
    u1_5b = 0U;
  }

  if ((DFC_MCUResetFlt_ASW & 24) == 24) {
    u1_5c = DFES_Cls_DFC_MCUResetFlt_C;
  } else {
    u1_5c = 0U;
  }

  if ((DFC_BattSohChk_ASW & 24) == 24) {
    u1_5d = DFES_Cls_DFC_BattSohChk_C;
  } else {
    u1_5d = 0U;
  }

  if ((DFC_CalCANBusOff_ASW & 24) == 24) {
    u1_5e = DFES_Cls_DFC_CalCANBusOff_C;
  } else {
    u1_5e = 0U;
  }

  if ((DFC_ThmRnwyWarn_ASW & 24) == 24) {
    u1_5f = DFES_Cls_DFC_ThmRnwyWarn_C;
  } else {
    u1_5f = 0U;
  }

  if ((DFC_PchgOvrCurrFlt_ASW & 24) == 24) {
    u1_5g = DFES_Cls_DFC_PchgOvrCurrFlt_C;
  } else {
    u1_5g = 0U;
  }

  if ((DFC_SBCSplyPwrOvrVolt_ASW & 24) == 24) {
    u1_5h = DFES_Cls_DFC_SBCSplyPwrOvrVolt_C;
  } else {
    u1_5h = 0U;
  }

  if ((DFC_SBCSplyPwrUnderVolt_ASW & 24) == 24) {
    u1_5i = DFES_Cls_DFC_SBCSplyPwrUnderVolt_C;
  } else {
    u1_5i = 0U;
  }

  if ((DFC_SBCSplyPwrOvrCurr_ASW & 24) == 24) {
    u1_5j = DFES_Cls_DFC_SBCSplyPwrOvrCurr_C;
  } else {
    u1_5j = 0U;
  }

  if ((DFC_CrashChkHwFrqAbnorm_ASW & 24) == 24) {
    u1_5k = DFES_Cls_DFC_CrashChkHwFrqAbnorm_C;
  } else {
    u1_5k = 0U;
  }

  if ((DFC_CrashChkHwDutyAbnorm_ASW & 24) == 24) {
    u1_5l = DFES_Cls_DFC_CrashChkHwDutyAbnorm_C;
  } else {
    u1_5l = 0U;
  }

  if ((DFC_AFETempHighFlt_ASW & 24) == 24) {
    u1_5m = DFES_Cls_DFC_AFETempHighFlt_C;
  } else {
    u1_5m = 0U;
  }

  if ((DFC_AFEResetFlt_ASW & 24) == 24) {
    u1_5n = DFES_Cls_DFC_AFEResetFlt_C;
  } else {
    u1_5n = 0U;
  }

  if ((DFC_AFESplyFlt_ASW & 24) == 24) {
    u1_5o = DFES_Cls_DFC_AFESplyFlt_C;
  } else {
    u1_5o = 0U;
  }

  if ((DFC_CellTAlrmMax_ASW & 24) == 24) {
    u1_5p = DFES_Cls_DFC_CellTAlrmMax_C;
  } else {
    u1_5p = 0U;
  }

  if ((DFC_CellTFaultMax_ASW & 24) == 24) {
    u1_5q = DFES_Cls_DFC_CellTFaultMax_C;
  } else {
    u1_5q = 0U;
  }

  if ((DFC_CellTAlrmMin_ASW & 24) == 24) {
    u1_5r = DFES_Cls_DFC_CellTAlrmMin_C;
  } else {
    u1_5r = 0U;
  }

  if ((DFC_CellTFaultMin_ASW & 24) == 24) {
    u1_5s = DFES_Cls_DFC_CellTFaultMin_C;
  } else {
    u1_5s = 0U;
  }

  if ((DFC_CellTempVldMin_ASW & 24) == 24) {
    u1_5t = DFES_Cls_DFC_CellTempVldMin_C;
  } else {
    u1_5t = 0U;
  }

  if ((DFC_CellTCnstMax_ASW & 24) == 24) {
    u1_5u = DFES_Cls_DFC_CellTCnstMax_C;
  } else {
    u1_5u = 0U;
  }

  if ((DFC_CellTGradtMax_ASW & 24) == 24) {
    u1_5v = DFES_Cls_DFC_CellTGradtMax_C;
  } else {
    u1_5v = 0U;
  }

  if ((DFC_CellTWarnMax_ASW & 24) == 24) {
    u1_5w = DFES_Cls_DFC_CellTWarnMax_C;
  } else {
    u1_5w = 0U;
  }

  if ((DFC_CellTWarnMin_ASW & 24) == 24) {
    u1_5x = DFES_Cls_DFC_CellTWarnMin_C;
  } else {
    u1_5x = 0U;
  }

  if ((DFC_CellTempVldMax_ASW & 24) == 24) {
    u1_5y = DFES_Cls_DFC_CellTempVldMax_C;
  } else {
    u1_5y = 0U;
  }

  if ((DFC_CellTHopMax_ASW & 24) == 24) {
    u1_5z = DFES_Cls_DFC_CellTHopMax_C;
  } else {
    u1_5z = 0U;
  }

  if (((DFC_EVCCDevFlt_ASW & 24) == 24) || ((DFC_EVCCSplyPwrFlt_ASW & 24) == 24) ||
      ((DFC_EVCCVehComFlt_ASW & 24) == 24) || ((DFC_EVCCPileComFlt_ASW & 24) == 24) ||
      ((DFC_EVCCVehHwFlt_ASW & 24) == 24) || ((DFC_EVCCPileHwFlt_ASW & 24) == 24)) {
    u1_60 = DFES_Cls_DFC_EVCCFlt_C;
  } else {
    u1_60 = 0U;
  }

  if (((DFC_IsoS1SwStuckOpen_ASW & 24) == 24) || ((DFC_IsoS1SwStuckClsd_ASW & 24) == 24)
      || ((DFC_IsoS2SwStuckOpen_ASW & 24) == 24) || ((DFC_IsoS2SwStuckClsd_ASW & 24) ==
       24) || ((DFC_IsoS3SwStuckOpen_ASW & 24) == 24) || ((DFC_IsoS3SwStuckClsd_ASW & 24)
       == 24)) {
    u1_61 = DFES_Cls_DFC_IsoSwFlt_C;
  } else {
    u1_61 = 0U;
  }

  if (((DFC_PreHeatErr_ASW & 24) == 24) || ((DFC_PreHeatVcuReqTmt_ASW & 24) == 24) ||
      ((DFC_PreHeatObcStatusErr_ASW & 24) == 24) || ((DFC_PreHeatPtcErr_ASW & 24) == 24))
  {
    u1_62 = DFES_Cls_DFC_PreHeatFlt_C;
  } else {
    u1_62 = 0U;
  }

  if (((DFC_MPosRlyDrvScb_ASW & 24) == 24) || ((DFC_MPosRlyDrvScg_ASW & 24) == 24) ||
      ((DFC_MPosRlyDrvOL_ASW & 24) == 24) || ((DFC_MposRlyDrvOvrCurr_ASW & 24) == 24) ||
      ((DFC_MPosRlyDrvFault_ASW & 24) == 24)) {
    u1_63 = DFES_Cls_DFC_MPosRlyDrv_C;
  } else {
    u1_63 = 0U;
  }

  if (((DFC_MNegRlyDrvScb_ASW & 24) == 24) || ((DFC_MNegRlyDrvScg_ASW & 24) == 24) ||
      ((DFC_MNegRlyDrvOL_ASW & 24) == 24) || ((DFC_MNegRlyDrvOvrCurr_ASW & 24) == 24) ||
      ((DFC_MNegRlyDrvFault_ASW & 24) == 24)) {
    u1_64 = DFES_Cls_DFC_MNegRlyDrv_C;
  } else {
    u1_64 = 0U;
  }

  if (((DFC_DcPosRlyDrvScb_ASW & 24) == 24) || ((DFC_DcPosRlyDrvScg_ASW & 24) == 24) ||
      ((DFC_DcPosRlyDrvOL_ASW & 24) == 24) || ((DFC_DChrgPosRlyDrvOvrCurr_ASW & 24) ==
       24) || ((DFC_DcPosRlyDrvFault_ASW & 24) == 24)) {
    u1_65 = DFES_Cls_DFC_DCPosRlyDrv_C;
  } else {
    u1_65 = 0U;
  }

  if (((DFC_DcNegRlyDrvScb_ASW & 24) == 24) || ((DFC_DcNegRlyDrvScg_ASW & 24) == 24) ||
      ((DFC_DcNegRlyDrvOL_ASW & 24) == 24) || ((DFC_DChrgNegRlyDrvOvrCurr_ASW & 24) ==
       24) || ((DFC_DcNegRlyDrvFault_ASW & 24) == 24)) {
    u1_66 = DFES_Cls_DFC_DCNegRlyDrv_C;
  } else {
    u1_66 = 0U;
  }

  if (((DFC_PreRlyDrvScb_ASW & 24) == 24) || ((DFC_PreRlyDrvScg_ASW & 24) == 24) ||
      ((DFC_PreRlyDrvOL_ASW & 24) == 24) || ((DFC_PrRlyDrvOvrCurr_ASW & 24) == 24)) {
    u1_67 = DFES_Cls_DFC_PrRlyDrv_C;
  } else {
    u1_67 = 0U;
  }

  if ((DFC_TwoCurrSnsrFlt_ASW & 24) == 24) {
    u1_68 = DFES_Cls_DFC_TwoCurrSnsrFlt_C;
  } else {
    u1_68 = 0U;
  }

  if ((DFC_ThmRnwyAlarm_ASW & 24) == 24) {
    u1_69 = DFES_Cls_DFC_ThmRnwyAlarm_C;
  } else {
    u1_69 = 0U;
  }

  if ((DFC_ChkSumMsg2A5Err_ASW & 24) == 24) {
    u1_6a = DFES_Cls_DFC_ChkSumMsg2A5Err_C;
  } else {
    u1_6a = 0U;
  }

  if ((DFC_ChkSumMsg2A7Err_ASW & 24) == 24) {
    u1_6b = DFES_Cls_DFC_ChkSumMsg2A7Err_C;
  } else {
    u1_6b = 0U;
  }

  if ((DFC_DchrgIsoChkLv1_ASW & 24) == 24) {
    u1_6c = DFES_Cls_DFC_DchrgIsoChkLv1_C;
  } else {
    u1_6c = 0U;
  }

  if ((DFC_DchrgIsoChkLv2_ASW & 24) == 24) {
    u1_6d = DFES_Cls_DFC_DchrgIsoChkLv2_C;
  } else {
    u1_6d = 0U;
  }

  if ((DFC_HVOffIsoChkLv1_ASW & 24) == 24) {
    u1_6e = DFES_Cls_DFC_HVOffIsoChkLv1_C;
  } else {
    u1_6e = 0U;
  }

  if ((DFC_HVOffIsoChkLv2_ASW & 24) == 24) {
    u1_6f = DFES_Cls_DFC_HVOffIsoChkLv2_C;
  } else {
    u1_6f = 0U;
  }

  if ((DFC_PackCrntSaf_ASW & 24) == 24) {
    u1_6g = DFES_Cls_DFC_PackCrntSaf_C;
  } else {
    u1_6g = 0U;
  }

  if (u0 > u1) {
    u1 = u0;
  }

  if (u1 > u1_0) {
    u1_0 = u1;
  }

  if (u1_0 > u1_1) {
    u1_1 = u1_0;
  }

  if (u1_1 > u1_2) {
    u1_2 = u1_1;
  }

  if (u1_2 > u1_3) {
    u1_3 = u1_2;
  }

  if (u1_3 > u1_4) {
    u1_4 = u1_3;
  }

  if (u1_4 > u1_5) {
    u1_5 = u1_4;
  }

  if (u1_5 > u1_6) {
    u1_6 = u1_5;
  }

  if (u1_6 > u1_7) {
    u1_7 = u1_6;
  }

  if (u1_7 > u1_8) {
    u1_8 = u1_7;
  }

  if (u1_8 > u1_9) {
    u1_9 = u1_8;
  }

  if (u1_9 > u1_a) {
    u1_a = u1_9;
  }

  if (u1_a > u1_b) {
    u1_b = u1_a;
  }

  if (u1_b > u1_c) {
    u1_c = u1_b;
  }

  if (u1_c > u1_d) {
    u1_d = u1_c;
  }

  if (u1_d > u1_e) {
    u1_e = u1_d;
  }

  if (u1_e > u1_f) {
    u1_f = u1_e;
  }

  if (u1_f > u1_g) {
    u1_g = u1_f;
  }

  if (u1_g > u1_h) {
    u1_h = u1_g;
  }

  if (u1_h > u1_i) {
    u1_i = u1_h;
  }

  if (u1_i > u1_j) {
    u1_j = u1_i;
  }

  if (u1_j > u1_k) {
    u1_k = u1_j;
  }

  if (u1_k > u1_l) {
    u1_l = u1_k;
  }

  if (u1_l > u1_m) {
    u1_m = u1_l;
  }

  if (u1_m > u1_n) {
    u1_n = u1_m;
  }

  if (u1_n > u1_o) {
    u1_o = u1_n;
  }

  if (u1_o > u1_p) {
    u1_p = u1_o;
  }

  if (u1_p > u1_q) {
    u1_q = u1_p;
  }

  if (u1_q > u1_r) {
    u1_r = u1_q;
  }

  if (u1_r > u1_s) {
    u1_s = u1_r;
  }

  if (u1_s > u1_t) {
    u1_t = u1_s;
  }

  if (u1_t > u1_u) {
    u1_u = u1_t;
  }

  if (u1_u > u1_v) {
    u1_v = u1_u;
  }

  if (u1_v > u1_w) {
    u1_w = u1_v;
  }

  if (u1_w > u1_x) {
    u1_x = u1_w;
  }

  if (u1_x > u1_y) {
    u1_y = u1_x;
  }

  if (u1_y > u1_z) {
    u1_z = u1_y;
  }

  if (u1_z > u1_10) {
    u1_10 = u1_z;
  }

  if (u1_10 > u1_11) {
    u1_11 = u1_10;
  }

  if (u1_11 > u1_12) {
    u1_12 = u1_11;
  }

  if (u1_12 > u1_13) {
    u1_13 = u1_12;
  }

  if (u1_13 > u1_14) {
    u1_14 = u1_13;
  }

  if (u1_14 > u1_15) {
    u1_15 = u1_14;
  }

  if (u1_15 > u1_16) {
    u1_16 = u1_15;
  }

  if (u1_16 > u1_17) {
    u1_17 = u1_16;
  }

  if (u1_17 > u1_18) {
    u1_18 = u1_17;
  }

  if (u1_18 > u1_19) {
    u1_19 = u1_18;
  }

  if (u1_19 > u1_1a) {
    u1_1a = u1_19;
  }

  if (u1_1a > u1_1b) {
    u1_1b = u1_1a;
  }

  if (u1_1b > u1_1c) {
    u1_1c = u1_1b;
  }

  if (u1_1c > u1_1d) {
    u1_1d = u1_1c;
  }

  if (u1_1d > u1_1e) {
    u1_1e = u1_1d;
  }

  if (u1_1e > u1_1f) {
    u1_1f = u1_1e;
  }

  if (u1_1f > u1_1g) {
    u1_1g = u1_1f;
  }

  if (u1_1g > u1_1h) {
    u1_1h = u1_1g;
  }

  if (u1_1h > u1_1i) {
    u1_1i = u1_1h;
  }

  if (u1_1i > u1_1j) {
    u1_1j = u1_1i;
  }

  if (u1_1j > u1_1k) {
    u1_1k = u1_1j;
  }

  if (u1_1k > u1_1l) {
    u1_1l = u1_1k;
  }

  if (u1_1l > u1_1m) {
    u1_1m = u1_1l;
  }

  if (u1_1m > u1_1n) {
    u1_1n = u1_1m;
  }

  if (u1_1n > u1_1o) {
    u1_1o = u1_1n;
  }

  if (u1_1o > u1_1p) {
    u1_1p = u1_1o;
  }

  if (u1_1p > u1_1q) {
    u1_1q = u1_1p;
  }

  if (u1_1q > u1_1r) {
    u1_1r = u1_1q;
  }

  if (u1_1r > u1_1s) {
    u1_1s = u1_1r;
  }

  if (u1_1s > u1_1t) {
    u1_1t = u1_1s;
  }

  if (u1_1t > u1_1u) {
    u1_1u = u1_1t;
  }

  if (u1_1u > u1_1v) {
    u1_1v = u1_1u;
  }

  if (u1_1v > u1_1w) {
    u1_1w = u1_1v;
  }

  if (u1_1w > u1_1x) {
    u1_1x = u1_1w;
  }

  if (u1_1x > u1_1y) {
    u1_1y = u1_1x;
  }

  if (u1_1y > u1_1z) {
    u1_1z = u1_1y;
  }

  if (u1_1z > u1_20) {
    u1_20 = u1_1z;
  }

  if (u1_20 > u1_21) {
    u1_21 = u1_20;
  }

  if (u1_21 > u1_22) {
    u1_22 = u1_21;
  }

  if (u1_22 > u1_23) {
    u1_23 = u1_22;
  }

  if (u1_23 > u1_24) {
    u1_24 = u1_23;
  }

  if (u1_24 > u1_25) {
    u1_25 = u1_24;
  }

  if (u1_25 > u1_26) {
    u1_26 = u1_25;
  }

  if (u1_26 > u1_27) {
    u1_27 = u1_26;
  }

  if (u1_27 > u1_28) {
    u1_28 = u1_27;
  }

  if (u1_28 > u1_29) {
    u1_29 = u1_28;
  }

  if (u1_29 > u1_2a) {
    u1_2a = u1_29;
  }

  if (u1_2a > u1_2b) {
    u1_2b = u1_2a;
  }

  if (u1_2b > u1_2c) {
    u1_2c = u1_2b;
  }

  if (u1_2c > u1_2d) {
    u1_2d = u1_2c;
  }

  if (u1_2d > u1_2e) {
    u1_2e = u1_2d;
  }

  if (u1_2e > u1_2f) {
    u1_2f = u1_2e;
  }

  if (u1_2f > u1_2g) {
    u1_2g = u1_2f;
  }

  if (u1_2g > u1_2h) {
    u1_2h = u1_2g;
  }

  if (u1_2h > u1_2i) {
    u1_2i = u1_2h;
  }

  if (u1_2i > u1_2j) {
    u1_2j = u1_2i;
  }

  if (u1_2j > u1_2k) {
    u1_2k = u1_2j;
  }

  if (u1_2k > u1_2l) {
    u1_2l = u1_2k;
  }

  if (u1_2l > u1_2m) {
    u1_2m = u1_2l;
  }

  if (u1_2m > u1_2n) {
    u1_2n = u1_2m;
  }

  if (u1_2n > u1_2o) {
    u1_2o = u1_2n;
  }

  if (u1_2o > u1_2p) {
    u1_2p = u1_2o;
  }

  if (u1_2p > u1_2q) {
    u1_2q = u1_2p;
  }

  if (u1_2q > u1_2r) {
    u1_2r = u1_2q;
  }

  if (u1_2r > u1_2s) {
    u1_2s = u1_2r;
  }

  if (u1_2s > u1_2t) {
    u1_2t = u1_2s;
  }

  if (u1_2t > u1_2u) {
    u1_2u = u1_2t;
  }

  if (u1_2u > u1_2v) {
    u1_2v = u1_2u;
  }

  if (u1_2v > u1_2w) {
    u1_2w = u1_2v;
  }

  if (u1_2w > u1_2x) {
    u1_2x = u1_2w;
  }

  if (u1_2x > u1_2y) {
    u1_2y = u1_2x;
  }

  if (u1_2y > u1_2z) {
    u1_2z = u1_2y;
  }

  if (u1_2z > u1_30) {
    u1_30 = u1_2z;
  }

  if (u1_30 > u1_31) {
    u1_31 = u1_30;
  }

  if (u1_31 > u1_32) {
    u1_32 = u1_31;
  }

  if (u1_32 > u1_33) {
    u1_33 = u1_32;
  }

  if (u1_33 > u1_34) {
    u1_34 = u1_33;
  }

  if (u1_34 > u1_35) {
    u1_35 = u1_34;
  }

  if (u1_35 > u1_36) {
    u1_36 = u1_35;
  }

  if (u1_36 > u1_37) {
    u1_37 = u1_36;
  }

  if (u1_37 > u1_38) {
    u1_38 = u1_37;
  }

  if (u1_38 > u1_39) {
    u1_39 = u1_38;
  }

  if (u1_39 > u1_3a) {
    u1_3a = u1_39;
  }

  if (u1_3a > u1_3b) {
    u1_3b = u1_3a;
  }

  if (u1_3b > u1_3c) {
    u1_3c = u1_3b;
  }

  if (u1_3c > u1_3d) {
    u1_3d = u1_3c;
  }

  if (u1_3d > u1_3e) {
    u1_3e = u1_3d;
  }

  if (u1_3e > u1_3f) {
    u1_3f = u1_3e;
  }

  if (u1_3f > u1_3g) {
    u1_3g = u1_3f;
  }

  if (u1_3g > u1_3h) {
    u1_3h = u1_3g;
  }

  if (u1_3h > u1_3i) {
    u1_3i = u1_3h;
  }

  if (u1_3i > u1_3j) {
    u1_3j = u1_3i;
  }

  if (u1_3j > u1_3k) {
    u1_3k = u1_3j;
  }

  if (u1_3k > u1_3l) {
    u1_3l = u1_3k;
  }

  if (u1_3l > u1_3m) {
    u1_3m = u1_3l;
  }

  if (u1_3m > u1_3n) {
    u1_3n = u1_3m;
  }

  if (u1_3n > u1_3o) {
    u1_3o = u1_3n;
  }

  if (u1_3o > u1_3p) {
    u1_3p = u1_3o;
  }

  if (u1_3p > u1_3q) {
    u1_3q = u1_3p;
  }

  if (u1_3q > u1_3r) {
    u1_3r = u1_3q;
  }

  if (u1_3r > u1_3s) {
    u1_3s = u1_3r;
  }

  if (u1_3s > u1_3t) {
    u1_3t = u1_3s;
  }

  if (u1_3t > u1_3u) {
    u1_3u = u1_3t;
  }

  if (u1_3u > u1_3v) {
    u1_3v = u1_3u;
  }

  if (u1_3v > u1_3w) {
    u1_3w = u1_3v;
  }

  if (u1_3w > u1_3x) {
    u1_3x = u1_3w;
  }

  if (u1_3x > u1_3y) {
    u1_3y = u1_3x;
  }

  if (u1_3y > u1_3z) {
    u1_3z = u1_3y;
  }

  if (u1_3z > u1_40) {
    u1_40 = u1_3z;
  }

  if (u1_40 > u1_41) {
    u1_41 = u1_40;
  }

  if (u1_41 > u1_42) {
    u1_42 = u1_41;
  }

  if (u1_42 > u1_43) {
    u1_43 = u1_42;
  }

  if (u1_43 > u1_44) {
    u1_44 = u1_43;
  }

  if (u1_44 > u1_45) {
    u1_45 = u1_44;
  }

  if (u1_45 > u1_46) {
    u1_46 = u1_45;
  }

  if (u1_46 > u1_47) {
    u1_47 = u1_46;
  }

  if (u1_47 > u1_48) {
    u1_48 = u1_47;
  }

  if (u1_48 > u1_49) {
    u1_49 = u1_48;
  }

  if (u1_49 > u1_4a) {
    u1_4a = u1_49;
  }

  if (u1_4a > u1_4b) {
    u1_4b = u1_4a;
  }

  if (u1_4b > u1_4c) {
    u1_4c = u1_4b;
  }

  if (u1_4c > u1_4d) {
    u1_4d = u1_4c;
  }

  if (u1_4d > u1_4e) {
    u1_4e = u1_4d;
  }

  if (u1_4e > u1_4f) {
    u1_4f = u1_4e;
  }

  if (u1_4f > u1_4g) {
    u1_4g = u1_4f;
  }

  if (u1_4g > u1_4h) {
    u1_4h = u1_4g;
  }

  if (u1_4h > u1_4i) {
    u1_4i = u1_4h;
  }

  if (u1_4i > u1_4j) {
    u1_4j = u1_4i;
  }

  if (u1_4j > u1_4k) {
    u1_4k = u1_4j;
  }

  if (u1_4k > u1_4l) {
    u1_4l = u1_4k;
  }

  if (u1_4l > u1_4m) {
    u1_4m = u1_4l;
  }

  if (u1_4m > u1_4n) {
    u1_4n = u1_4m;
  }

  if (u1_4n > u1_4o) {
    u1_4o = u1_4n;
  }

  if (u1_4o > u1_4p) {
    u1_4p = u1_4o;
  }

  if (u1_4p > u1_4q) {
    u1_4q = u1_4p;
  }

  if (u1_4q > u1_4r) {
    u1_4r = u1_4q;
  }

  if (u1_4r > u1_4s) {
    u1_4s = u1_4r;
  }

  if (u1_4s > u1_4t) {
    u1_4t = u1_4s;
  }

  if (u1_4t > u1_4u) {
    u1_4u = u1_4t;
  }

  if (u1_4u > u1_4v) {
    u1_4v = u1_4u;
  }

  if (u1_4v > u1_4w) {
    u1_4w = u1_4v;
  }

  if (u1_4w > u1_4x) {
    u1_4x = u1_4w;
  }

  if (u1_4x > u1_4y) {
    u1_4y = u1_4x;
  }

  if (u1_4y > rtb_DFC_BattUNpl_applied181) {
    rtb_DFC_BattUNpl_applied181 = u1_4y;
  }

  if (rtb_DFC_BattUNpl_applied181 > rtb_DFC_BattUNpl_applied182) {
    rtb_DFC_BattUNpl_applied182 = rtb_DFC_BattUNpl_applied181;
  }

  if (rtb_DFC_BattUNpl_applied182 > rtb_DFC_BattUNpl_applied183) {
    rtb_DFC_BattUNpl_applied183 = rtb_DFC_BattUNpl_applied182;
  }

  if (rtb_DFC_BattUNpl_applied183 > rtb_DFC_BattUNpl_applied184) {
    rtb_DFC_BattUNpl_applied184 = rtb_DFC_BattUNpl_applied183;
  }

  if (rtb_DFC_BattUNpl_applied184 > rtb_DFC_BattUNpl_applied185) {
    rtb_DFC_BattUNpl_applied185 = rtb_DFC_BattUNpl_applied184;
  }

  if (rtb_DFC_BattUNpl_applied185 > rtb_DFC_BattUNpl_applied186) {
    rtb_DFC_BattUNpl_applied186 = rtb_DFC_BattUNpl_applied185;
  }

  if (rtb_DFC_BattUNpl_applied186 > rtb_DFC_BattUNpl_applied187) {
    rtb_DFC_BattUNpl_applied187 = rtb_DFC_BattUNpl_applied186;
  }

  if (rtb_DFC_BattUNpl_applied187 > rtb_DFC_BattUNpl_applied188) {
    rtb_DFC_BattUNpl_applied188 = rtb_DFC_BattUNpl_applied187;
  }

  if (rtb_DFC_BattUNpl_applied188 > rtb_DFC_BattUNpl_applied189) {
    rtb_DFC_BattUNpl_applied189 = rtb_DFC_BattUNpl_applied188;
  }

  if (rtb_DFC_BattUNpl_applied189 > u1_4z) {
    u1_4z = rtb_DFC_BattUNpl_applied189;
  }

  if (u1_4z > u1_50) {
    u1_50 = u1_4z;
  }

  if (u1_50 > u1_51) {
    u1_51 = u1_50;
  }

  if (u1_51 > u1_52) {
    u1_52 = u1_51;
  }

  if (u1_52 > u1_53) {
    u1_53 = u1_52;
  }

  if (u1_53 > u1_54) {
    u1_54 = u1_53;
  }

  if (u1_54 > u1_55) {
    u1_55 = u1_54;
  }

  if (u1_55 > u1_56) {
    u1_56 = u1_55;
  }

  if (u1_56 > u1_57) {
    u1_57 = u1_56;
  }

  if (u1_57 > u1_58) {
    u1_58 = u1_57;
  }

  if (u1_58 > u1_59) {
    u1_59 = u1_58;
  }

  if (u1_59 > u1_5a) {
    u1_5a = u1_59;
  }

  if (u1_5a > u1_5b) {
    u1_5b = u1_5a;
  }

  if (u1_5b > u1_5c) {
    u1_5c = u1_5b;
  }

  if (u1_5c > u1_5d) {
    u1_5d = u1_5c;
  }

  if (u1_5d > u1_5e) {
    u1_5e = u1_5d;
  }

  if (u1_5e > u1_5f) {
    u1_5f = u1_5e;
  }

  if (u1_5f > u1_5g) {
    u1_5g = u1_5f;
  }

  if (u1_5g > u1_5h) {
    u1_5h = u1_5g;
  }

  if (u1_5h > u1_5i) {
    u1_5i = u1_5h;
  }

  if (u1_5i > u1_5j) {
    u1_5j = u1_5i;
  }

  if (u1_5j > u1_5k) {
    u1_5k = u1_5j;
  }

  if (u1_5k > u1_5l) {
    u1_5l = u1_5k;
  }

  if (u1_5l > u1_5m) {
    u1_5m = u1_5l;
  }

  if (u1_5m > u1_5n) {
    u1_5n = u1_5m;
  }

  if (u1_5n > u1_5o) {
    u1_5o = u1_5n;
  }

  if (u1_5o > u1_5p) {
    u1_5p = u1_5o;
  }

  if (u1_5p > u1_5q) {
    u1_5q = u1_5p;
  }

  if (u1_5q > u1_5r) {
    u1_5r = u1_5q;
  }

  if (u1_5r > u1_5s) {
    u1_5s = u1_5r;
  }

  if (u1_5s > u1_5t) {
    u1_5t = u1_5s;
  }

  if (u1_5t > u1_5u) {
    u1_5u = u1_5t;
  }

  if (u1_5u > u1_5v) {
    u1_5v = u1_5u;
  }

  if (u1_5v > u1_5w) {
    u1_5w = u1_5v;
  }

  if (u1_5w > u1_5x) {
    u1_5x = u1_5w;
  }

  if (u1_5x > u1_5y) {
    u1_5y = u1_5x;
  }

  if (u1_5y > u1_5z) {
    u1_5z = u1_5y;
  }

  if (u1_5z > u1_60) {
    u1_60 = u1_5z;
  }

  if (u1_60 > u1_61) {
    u1_61 = u1_60;
  }

  if (u1_61 > u1_62) {
    u1_62 = u1_61;
  }

  if (u1_62 > u1_63) {
    u1_63 = u1_62;
  }

  if (u1_63 > u1_64) {
    u1_64 = u1_63;
  }

  if (u1_64 > u1_65) {
    u1_65 = u1_64;
  }

  if (u1_65 > u1_66) {
    u1_66 = u1_65;
  }

  if (u1_66 > u1_67) {
    u1_67 = u1_66;
  }

  if (u1_67 > u1_68) {
    u1_68 = u1_67;
  }

  if (u1_68 > u1_69) {
    u1_69 = u1_68;
  }

  if (u1_69 > u1_6a) {
    u1_6a = u1_69;
  }

  if (u1_6a > u1_6b) {
    u1_6b = u1_6a;
  }

  if (u1_6b > u1_6c) {
    u1_6c = u1_6b;
  }

  if (u1_6c > u1_6d) {
    u1_6d = u1_6c;
  }

  if (u1_6d > u1_6e) {
    u1_6e = u1_6d;
  }

  if (u1_6e > u1_6f) {
    u1_6f = u1_6e;
  }

  if (u1_6f > u1_6g) {
    DSMR_stFaultRankRaw = u1_6f;
  } else {
    DSMR_stFaultRankRaw = u1_6g;
  }

  rtb_LogicalOperator_b = ((DSMR_stFaultRankRaw >= 3) ||
    DSMR_FaultLvlCalc_DW.UnitDelay_DSTATE);
  if (rtb_LogicalOperator_b) {
    if (DSMR_FaultLvlCalc_DW.UnitDelay1_DSTATE > DSMR_stFaultRankRaw) {
      rtb_DFC_BattUNpl_applied182 = DSMR_FaultLvlCalc_DW.UnitDelay1_DSTATE;
    } else {
      rtb_DFC_BattUNpl_applied182 = DSMR_stFaultRankRaw;
    }
  } else {
    rtb_DFC_BattUNpl_applied182 = DSMR_stFaultRankRaw;
  }

  if (rtb_DFC_BattUNpl_applied182 < 4) {
    DSMR_stFaultRank = rtb_DFC_BattUNpl_applied182;
  } else {
    DSMR_stFaultRank = 4U;
  }

  DSMR_FaultLvlCalc_DW.UnitDelay1_DSTATE = DSMR_stFaultRank;
  DSMR_FaultLvlCalc_DW.UnitDelay_DSTATE = rtb_LogicalOperator_b;
}

/* Model initialize function */
void DSMR_FaultLvlCalc_initialize(void)
{
  /* Registration code */

  /* block I/O */

  /* custom signals */
  DSMR_stFaultRank = ((uint8_T)0U);
}

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
