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

  <bb 3> :
  # DEBUG BEGIN_STMT
  Dma_Ip_xHwState.ptHwChV2StateArray[LocHwInst][LocHwCh] = StatePointer;

  <bb 4> :
  return;

}


Dma_Ip_GetHwChannelStatePointer (uint32 LocHwVers, uint32 LocHwInst, uint32 LocHwCh)
{
  struct Dma_Ip_HwChannelStateType * ptStatePtr;
  struct Dma_Ip_HwChannelStateType * D.6048;

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

  <bb 3> :
  # DEBUG BEGIN_STMT
  ptStatePtr = Dma_Ip_xHwState.ptHwChV2StateArray[LocHwInst][LocHwCh];

  <bb 4> :
  # DEBUG BEGIN_STMT
  D.6048 = ptStatePtr;
  return D.6048;

}


Dma_Ip_GetHwChannelState (uint32 LocHwVers, uint32 LocHwInst, uint32 LocHwCh)
{
  Dma_Ip_HwChannelStateValueType StateValue;
  Dma_Ip_HwChannelStateValueType D.6044;

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

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = Dma_Ip_xHwState.ptHwChV2StateArray[LocHwInst][LocHwCh];
  StateValue = _1->StateValue;

  <bb 4> :
  # DEBUG BEGIN_STMT
  D.6044 = StateValue;
  return D.6044;

}


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}};

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

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = Dma_Ip_xHwState.ptHwChV2StateArray[LocHwInst][LocHwCh];
  StateValue = _1->StateValue;
  # DEBUG BEGIN_STMT
  _2 = fpa_Dma_Ip_HwChannelState[StateValue][EventValue];
  _2 (LocHwVers, LocHwInst, LocHwCh);

  <bb 4> :
  return;

}


Dma_Ip_SetHwChannel_ErrorEvent (const uint32 LocHwVers, const uint32 LocHwInst, const uint32 LocHwCh)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  if (LocHwVers == 2)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = Dma_Ip_xHwState.ptHwChV2StateArray[LocHwInst][LocHwCh];
  _1->StateValue = 4;

  <bb 4> :
  return;

}


Dma_Ip_SetHwChannel_ScatterGatherEvent (const uint32 LocHwVers, const uint32 LocHwInst, const uint32 LocHwCh)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  if (LocHwVers == 2)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = Dma_Ip_xHwState.ptHwChV2StateArray[LocHwInst][LocHwCh];
  _1->StateValue = 3;

  <bb 4> :
  return;

}


Dma_Ip_SetHwChannel_TransferEvent (const uint32 LocHwVers, const uint32 LocHwInst, const uint32 LocHwCh)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  if (LocHwVers == 2)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = Dma_Ip_xHwState.ptHwChV2StateArray[LocHwInst][LocHwCh];
  _1->StateValue = 2;

  <bb 4> :
  return;

}


Dma_Ip_SetHwChannel_ReadyEvent (const uint32 LocHwVers, const uint32 LocHwInst, const uint32 LocHwCh)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  if (LocHwVers == 2)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = Dma_Ip_xHwState.ptHwChV2StateArray[LocHwInst][LocHwCh];
  _1->StateValue = 1;

  <bb 4> :
  return;

}


Dma_Ip_SetHwChannel_ResetEvent (const uint32 LocHwVers, const uint32 LocHwInst, const uint32 LocHwCh)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  if (LocHwVers == 2)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = Dma_Ip_xHwState.ptHwChV2StateArray[LocHwInst][LocHwCh];
  _1->StateValue = 0;

  <bb 4> :
  return;

}


