OsIf_MicrosToTicks (uint32 Micros, OsIf_CounterType SelectedCounter)
{
  uint32 Value;
  int _1;
  uint32 _12;

  <bb 2> :
  # DEBUG BEGIN_STMT
  Value_4 = 0;
  # DEBUG Value => Value_4
  # DEBUG BEGIN_STMT
  _1 = (int) SelectedCounter_5(D);
  switch (_1) <default: <L5> [INV], case 0: <L0> [INV], case 1: <L1> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  Value_11 = OsIf_Timer_Dummy_MicrosToTicks (Micros_7(D));
  # DEBUG Value => Value_11
  # DEBUG BEGIN_STMT
  goto <bb 5>; [INV]

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  Value_9 = OsIf_Timer_System_MicrosToTicks (Micros_7(D));
  # DEBUG Value => Value_9
  # DEBUG BEGIN_STMT

  <bb 5> :
  # Value_2 = PHI <Value_11(3), Value_9(4), Value_4(2)>
<L5>:
  # DEBUG Value => Value_2
  # DEBUG BEGIN_STMT
  _12 = Value_2;
  return _12;

}


OsIf_SetTimerFrequency (uint32 Freq, OsIf_CounterType SelectedCounter)
{
  int _1;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = (int) SelectedCounter_3(D);
  switch (_1) <default: <L4> [INV], case 0: <L0> [INV], case 1: <L1> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  OsIf_Timer_Dummy_SetTimerFrequency (Freq_5(D));
  # DEBUG BEGIN_STMT
  goto <bb 5>; [INV]

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  OsIf_Timer_System_SetTimerFrequency (Freq_5(D));
  # DEBUG BEGIN_STMT

  <bb 5> :
<L4>:
  return;

}


OsIf_GetElapsed (uint32 * const CurrentRef, OsIf_CounterType SelectedCounter)
{
  uint32 Value;
  int _1;
  uint32 _12;

  <bb 2> :
  # DEBUG BEGIN_STMT
  Value_4 = 0;
  # DEBUG Value => Value_4
  # DEBUG BEGIN_STMT
  _1 = (int) SelectedCounter_5(D);
  switch (_1) <default: <L5> [INV], case 0: <L0> [INV], case 1: <L1> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  Value_11 = OsIf_Timer_Dummy_GetElapsed (CurrentRef_7(D));
  # DEBUG Value => Value_11
  # DEBUG BEGIN_STMT
  goto <bb 5>; [INV]

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  Value_9 = OsIf_Timer_System_GetElapsed (CurrentRef_7(D));
  # DEBUG Value => Value_9
  # DEBUG BEGIN_STMT

  <bb 5> :
  # Value_2 = PHI <Value_11(3), Value_9(4), Value_4(2)>
<L5>:
  # DEBUG Value => Value_2
  # DEBUG BEGIN_STMT
  _12 = Value_2;
  return _12;

}


OsIf_GetCounter (OsIf_CounterType SelectedCounter)
{
  uint32 Value;
  int _1;
  uint32 _11;

  <bb 2> :
  # DEBUG BEGIN_STMT
  Value_4 = 0;
  # DEBUG Value => Value_4
  # DEBUG BEGIN_STMT
  _1 = (int) SelectedCounter_5(D);
  switch (_1) <default: <L5> [INV], case 0: <L0> [INV], case 1: <L1> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  Value_10 = OsIf_Timer_Dummy_GetCounter ();
  # DEBUG Value => Value_10
  # DEBUG BEGIN_STMT
  goto <bb 5>; [INV]

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  Value_8 = OsIf_Timer_System_GetCounter ();
  # DEBUG Value => Value_8
  # DEBUG BEGIN_STMT

  <bb 5> :
  # Value_2 = PHI <Value_10(3), Value_8(4), Value_4(2)>
<L5>:
  # DEBUG Value => Value_2
  # DEBUG BEGIN_STMT
  _11 = Value_2;
  return _11;

}


OsIf_Init (const void * Config)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  if (Config_2(D) != 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  DevAssert (0);

  <bb 4> :
  # DEBUG BEGIN_STMT
  OsIf_Timer_Dummy_Init ();
  # DEBUG BEGIN_STMT
  OsIf_Timer_System_Init ();
  return;

}


OsIf_Timer_Dummy_MicrosToTicks (uint32 Micros)
{
  uint32 _2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _2 = Micros_1(D);
  return _2;

}


OsIf_Timer_Dummy_SetTimerFrequency (uint32 Freq)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  return;

}


OsIf_Timer_Dummy_GetElapsed (const uint32 * const CurrentRef)
{
  uint32 _1;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = 1;
  return _1;

}


OsIf_Timer_Dummy_GetCounter ()
{
  uint32 _1;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = 0;
  return _1;

}


OsIf_Timer_Dummy_Init ()
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  return;

}


DevAssert (volatile boolean x)
{
  _Bool x.0_1;

  <bb 2> :
  # DEBUG BEGIN_STMT
  x.0_1 ={v} x;
  if (x.0_1 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 3>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  goto <bb 3>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  return;

}


