Dma_Ip_SetHwChannelStatePointer (uint32 LocHwVers, uint32 LocHwInst, uint32 LocHwCh, struct Dma_Ip_HwChannelStateType * StatePointer)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  if (LocHwVers_2(D) == 2)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Dma_Ip_xHwState.ptHwChV2StateArray[LocHwInst_4(D)][LocHwCh_5(D)] ={v} StatePointer_6(D);

  <bb 4> :
  return;

}


Dma_Ip_GetHwChannelStatePointer (uint32 LocHwVers, uint32 LocHwInst, uint32 LocHwCh)
{
  struct Dma_Ip_HwChannelStateType * ptStatePtr;
  struct Dma_Ip_HwChannelStateType * _8;

  <bb 2> :
  # DEBUG BEGIN_STMT
  ptStatePtr_2 = 0B;
  # DEBUG ptStatePtr => ptStatePtr_2
  # DEBUG BEGIN_STMT
  if (LocHwVers_3(D) == 2)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  ptStatePtr_7 ={v} Dma_Ip_xHwState.ptHwChV2StateArray[LocHwInst_5(D)][LocHwCh_6(D)];
  # DEBUG ptStatePtr => ptStatePtr_7

  <bb 4> :
  # ptStatePtr_1 = PHI <ptStatePtr_2(2), ptStatePtr_7(3)>
  # DEBUG ptStatePtr => ptStatePtr_1
  # DEBUG BEGIN_STMT
  _8 = ptStatePtr_1;
  return _8;

}


Dma_Ip_GetHwChannelState (uint32 LocHwVers, uint32 LocHwInst, uint32 LocHwCh)
{
  Dma_Ip_HwChannelStateValueType StateValue;
  struct Dma_Ip_HwChannelStateType * _1;
  Dma_Ip_HwChannelStateValueType _9;

  <bb 2> :
  # DEBUG BEGIN_STMT
  StateValue_3 = 0;
  # DEBUG StateValue => StateValue_3
  # DEBUG BEGIN_STMT
  if (LocHwVers_4(D) == 2)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 ={v} Dma_Ip_xHwState.ptHwChV2StateArray[LocHwInst_6(D)][LocHwCh_7(D)];
  StateValue_8 = _1->StateValue;
  # DEBUG StateValue => StateValue_8

  <bb 4> :
  # StateValue_2 = PHI <StateValue_3(2), StateValue_8(3)>
  # DEBUG StateValue => StateValue_2
  # DEBUG BEGIN_STMT
  _9 = StateValue_2;
  return _9;

}


Dma_Ip_SetHwChannelState (const uint32 LocHwVers, const uint32 LocHwInst, const uint32 LocHwCh, const Dma_Ip_HwChannelEventValueEnum EventValue)
{
  Dma_Ip_HwChannelStateValueType StateValue;
  static void (*<T585>) (const uint32, const uint32, const uint32) fpa_Dma_Ip_HwChannelState[5][5] = {{Dma_Ip_SetHwChannel_ResetEvent, Dma_Ip_SetHwChannel_ReadyEvent, Dma_Ip_SetHwChannel_ErrorEvent, Dma_Ip_SetHwChannel_ErrorEvent, Dma_Ip_SetHwChannel_ErrorEvent}, {Dma_Ip_SetHwChannel_ResetEvent, Dma_Ip_SetHwChannel_ReadyEvent, Dma_Ip_SetHwChannel_TransferEvent, Dma_Ip_SetHwChannel_ScatterGatherEvent, Dma_Ip_SetHwChannel_ErrorEvent}, {Dma_Ip_SetHwChannel_ResetEvent, Dma_Ip_SetHwChannel_ReadyEvent, Dma_Ip_SetHwChannel_TransferEvent, Dma_Ip_SetHwChannel_ScatterGatherEvent, Dma_Ip_SetHwChannel_ErrorEvent}, {Dma_Ip_SetHwChannel_ResetEvent, Dma_Ip_SetHwChannel_ReadyEvent, Dma_Ip_SetHwChannel_TransferEvent, Dma_Ip_SetHwChannel_ScatterGatherEvent, Dma_Ip_SetHwChannel_ErrorEvent}, {Dma_Ip_SetHwChannel_ResetEvent, Dma_Ip_SetHwChannel_ReadyEvent, Dma_Ip_SetHwChannel_ErrorEvent, Dma_Ip_SetHwChannel_ErrorEvent, Dma_Ip_SetHwChannel_ErrorEvent}};
  struct Dma_Ip_HwChannelStateType * _1;
  void (*<T57e>) (const uint32, const uint32, const uint32) _2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  StateValue_4 = 0;
  # DEBUG StateValue => StateValue_4
  # DEBUG BEGIN_STMT
  if (LocHwVers_5(D) == 2)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 ={v} Dma_Ip_xHwState.ptHwChV2StateArray[LocHwInst_7(D)][LocHwCh_8(D)];
  StateValue_9 = _1->StateValue;
  # DEBUG StateValue => StateValue_9
  # DEBUG BEGIN_STMT
  _2 = fpa_Dma_Ip_HwChannelState[StateValue_9][EventValue_10(D)];
  _2 (LocHwVers_5(D), LocHwInst_7(D), LocHwCh_8(D));

  <bb 4> :
  return;

}


Dma_Ip_SetHwChannel_ErrorEvent (const uint32 LocHwVers, const uint32 LocHwInst, const uint32 LocHwCh)
{
  struct Dma_Ip_HwChannelStateType * _1;

  <bb 2> :
  # DEBUG BEGIN_STMT
  if (LocHwVers_3(D) == 2)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 ={v} Dma_Ip_xHwState.ptHwChV2StateArray[LocHwInst_5(D)][LocHwCh_6(D)];
  _1->StateValue = 4;

  <bb 4> :
  return;

}


Dma_Ip_SetHwChannel_ScatterGatherEvent (const uint32 LocHwVers, const uint32 LocHwInst, const uint32 LocHwCh)
{
  struct Dma_Ip_HwChannelStateType * _1;

  <bb 2> :
  # DEBUG BEGIN_STMT
  if (LocHwVers_3(D) == 2)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 ={v} Dma_Ip_xHwState.ptHwChV2StateArray[LocHwInst_5(D)][LocHwCh_6(D)];
  _1->StateValue = 3;

  <bb 4> :
  return;

}


Dma_Ip_SetHwChannel_TransferEvent (const uint32 LocHwVers, const uint32 LocHwInst, const uint32 LocHwCh)
{
  struct Dma_Ip_HwChannelStateType * _1;

  <bb 2> :
  # DEBUG BEGIN_STMT
  if (LocHwVers_3(D) == 2)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 ={v} Dma_Ip_xHwState.ptHwChV2StateArray[LocHwInst_5(D)][LocHwCh_6(D)];
  _1->StateValue = 2;

  <bb 4> :
  return;

}


Dma_Ip_SetHwChannel_ReadyEvent (const uint32 LocHwVers, const uint32 LocHwInst, const uint32 LocHwCh)
{
  struct Dma_Ip_HwChannelStateType * _1;

  <bb 2> :
  # DEBUG BEGIN_STMT
  if (LocHwVers_3(D) == 2)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 ={v} Dma_Ip_xHwState.ptHwChV2StateArray[LocHwInst_5(D)][LocHwCh_6(D)];
  _1->StateValue = 1;

  <bb 4> :
  return;

}


Dma_Ip_SetHwChannel_ResetEvent (const uint32 LocHwVers, const uint32 LocHwInst, const uint32 LocHwCh)
{
  struct Dma_Ip_HwChannelStateType * _1;

  <bb 2> :
  # DEBUG BEGIN_STMT
  if (LocHwVers_3(D) == 2)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 ={v} Dma_Ip_xHwState.ptHwChV2StateArray[LocHwInst_5(D)][LocHwCh_6(D)];
  _1->StateValue = 0;

  <bb 4> :
  return;

}


