
Marking local functions: OsIf_Timer_System_Internal_GetElapsed OsIf_Timer_System_Internal_GetCounter OsIf_Timer_System_Internal_Init DevAssert


Marking externally visible functions: OsIf_Timer_System_MicrosToTicks OsIf_Timer_System_SetTimerFrequency OsIf_Timer_System_GetElapsed OsIf_Timer_System_GetCounter OsIf_Timer_System_Init


Marking externally visible variables:


Reclaiming functions:
Reclaiming variables:
Clearing address taken flags:
Symbol table:

OsIf_apxPredefinedConfig/12 (OsIf_apxPredefinedConfig) @06ac33f0
  Type: variable
  Body removed by symtab_remove_unreachable_nodes
  Visibility: external public
  References: 
  Referring: OsIf_Timer_System_Init/7 (read)OsIf_Timer_System_Init/7 (read)
  Availability: not_available
  Varpool flags: read-only
OsIf_Timer_System_MicrosToTicks/11 (OsIf_Timer_System_MicrosToTicks) @06ac1460
  Type: function definition analyzed
  Visibility: externally_visible public
  References: OsIf_abMdlInit/4 (read)OsIf_apxInternalCfg/5 (read)OsIf_au32InternalFrequencies/6 (read)
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: DevAssert/0 DevAssert/0 DevAssert/0 
OsIf_Timer_System_SetTimerFrequency/10 (OsIf_Timer_System_SetTimerFrequency) @06ac11c0
  Type: function definition analyzed
  Visibility: externally_visible public
  References: OsIf_abMdlInit/4 (read)OsIf_apxInternalCfg/5 (read)OsIf_au32InternalFrequencies/6 (write)
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: DevAssert/0 DevAssert/0 
OsIf_Timer_System_GetElapsed/9 (OsIf_Timer_System_GetElapsed) @06abee00
  Type: function definition analyzed
  Visibility: externally_visible public
  References: OsIf_abMdlInit/4 (read)OsIf_apxInternalCfg/5 (read)
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: OsIf_Timer_System_Internal_GetElapsed/3 DevAssert/0 DevAssert/0 
OsIf_Timer_System_GetCounter/8 (OsIf_Timer_System_GetCounter) @06abe9a0
  Type: function definition analyzed
  Visibility: externally_visible public
  References: OsIf_abMdlInit/4 (read)OsIf_apxInternalCfg/5 (read)
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: OsIf_Timer_System_Internal_GetCounter/2 DevAssert/0 DevAssert/0 
OsIf_Timer_System_Init/7 (OsIf_Timer_System_Init) @06abed20
  Type: function definition analyzed
  Visibility: externally_visible public
  References: OsIf_apxPredefinedConfig/12 (read)OsIf_abMdlInit/4 (write)OsIf_apxPredefinedConfig/12 (read)OsIf_apxInternalCfg/5 (write)OsIf_apxInternalCfg/5 (read)OsIf_au32InternalFrequencies/6 (write)
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: OsIf_Timer_System_Internal_Init/1 DevAssert/0 
OsIf_au32InternalFrequencies/6 (OsIf_au32InternalFrequencies) @06a5fab0
  Type: variable definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: OsIf_Timer_System_Init/7 (write)OsIf_Timer_System_SetTimerFrequency/10 (write)OsIf_Timer_System_MicrosToTicks/11 (read)
  Availability: available
  Varpool flags:
OsIf_apxInternalCfg/5 (OsIf_apxInternalCfg) @06a5fa20
  Type: variable definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: OsIf_Timer_System_Init/7 (write)OsIf_Timer_System_Init/7 (read)OsIf_Timer_System_GetCounter/8 (read)OsIf_Timer_System_GetElapsed/9 (read)OsIf_Timer_System_SetTimerFrequency/10 (read)OsIf_Timer_System_MicrosToTicks/11 (read)
  Availability: available
  Varpool flags:
OsIf_abMdlInit/4 (OsIf_abMdlInit) @06a5f990
  Type: variable definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: OsIf_Timer_System_Init/7 (write)OsIf_Timer_System_GetCounter/8 (read)OsIf_Timer_System_GetElapsed/9 (read)OsIf_Timer_System_SetTimerFrequency/10 (read)OsIf_Timer_System_MicrosToTicks/11 (read)
  Availability: available
  Varpool flags:
OsIf_Timer_System_Internal_GetElapsed/3 (OsIf_Timer_System_Internal_GetElapsed) @06a61ee0
  Type: function definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: 
  Availability: local
  Function flags: body local optimize_size
  Called by: OsIf_Timer_System_GetElapsed/9 
  Calls: 
OsIf_Timer_System_Internal_GetCounter/2 (OsIf_Timer_System_Internal_GetCounter) @06a61c40
  Type: function definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: 
  Availability: local
  Function flags: body local optimize_size
  Called by: OsIf_Timer_System_GetCounter/8 
  Calls: 
OsIf_Timer_System_Internal_Init/1 (OsIf_Timer_System_Internal_Init) @06a619a0
  Type: function definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: 
  Availability: local
  Function flags: body local optimize_size
  Called by: OsIf_Timer_System_Init/7 
  Calls: 
DevAssert/0 (DevAssert) @06a77540
  Type: function definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: 
  Availability: local
  Function flags: body local optimize_size
  Called by: OsIf_Timer_System_MicrosToTicks/11 OsIf_Timer_System_MicrosToTicks/11 OsIf_Timer_System_MicrosToTicks/11 OsIf_Timer_System_SetTimerFrequency/10 OsIf_Timer_System_SetTimerFrequency/10 OsIf_Timer_System_GetElapsed/9 OsIf_Timer_System_GetElapsed/9 OsIf_Timer_System_GetCounter/8 OsIf_Timer_System_GetCounter/8 OsIf_Timer_System_Init/7 
  Calls: 
OsIf_Timer_System_MicrosToTicks (uint32 Micros)
{
  uint32 CoreId;
  uint32 ticks;
  uint64 interim;
  uint32 D.4355;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ticks = 0;
  # DEBUG BEGIN_STMT
  CoreId = 0;
  # DEBUG BEGIN_STMT
  _1 = OsIf_abMdlInit[CoreId];
  _2 = ~_1;
  if (_2 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  DevAssert (0);
  goto <bb 8>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  if (CoreId != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 5> :
  _3 = OsIf_apxInternalCfg[CoreId];
  if (_3 == 0B)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  DevAssert (0);
  goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _4 = (long long unsigned int) Micros;
  _5 = OsIf_au32InternalFrequencies[CoreId];
  _6 = (long long unsigned int) _5;
  interim = _4 * _6;
  # DEBUG BEGIN_STMT
  interim = interim / 1000000;
  # DEBUG BEGIN_STMT
  _7 = interim <= 4294967295;
  DevAssert (_7);
  # DEBUG BEGIN_STMT
  ticks = (uint32) interim;

  <bb 8> :
  # DEBUG BEGIN_STMT
  D.4355 = ticks;
  return D.4355;

}


OsIf_Timer_System_SetTimerFrequency (uint32 Freq)
{
  uint32 CoreId;

  <bb 2> :
  # DEBUG BEGIN_STMT
  CoreId = 0;
  # DEBUG BEGIN_STMT
  _1 = OsIf_abMdlInit[CoreId];
  _2 = ~_1;
  if (_2 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  DevAssert (0);
  goto <bb 8>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  if (CoreId != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 5> :
  _3 = OsIf_apxInternalCfg[CoreId];
  if (_3 == 0B)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  DevAssert (0);
  goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  OsIf_au32InternalFrequencies[CoreId] = Freq;

  <bb 8> :
  return;

}


OsIf_Timer_System_GetElapsed (uint32 * const CurrentRef)
{
  uint32 CoreId;
  uint32 Elapsed;
  uint32 D.4334;

  <bb 2> :
  # DEBUG BEGIN_STMT
  Elapsed = 0;
  # DEBUG BEGIN_STMT
  CoreId = 0;
  # DEBUG BEGIN_STMT
  _1 = OsIf_abMdlInit[CoreId];
  _2 = ~_1;
  if (_2 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  DevAssert (0);
  goto <bb 8>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  if (CoreId != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 5> :
  _3 = OsIf_apxInternalCfg[CoreId];
  if (_3 == 0B)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  DevAssert (0);
  goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  Elapsed = OsIf_Timer_System_Internal_GetElapsed (CurrentRef);

  <bb 8> :
  # DEBUG BEGIN_STMT
  D.4334 = Elapsed;
  return D.4334;

}


OsIf_Timer_System_GetCounter ()
{
  uint32 CoreId;
  uint32 Counter;
  uint32 D.4323;

  <bb 2> :
  # DEBUG BEGIN_STMT
  Counter = 0;
  # DEBUG BEGIN_STMT
  CoreId = 0;
  # DEBUG BEGIN_STMT
  _1 = OsIf_abMdlInit[CoreId];
  _2 = ~_1;
  if (_2 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  DevAssert (0);
  goto <bb 8>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  if (CoreId != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 5> :
  _3 = OsIf_apxInternalCfg[CoreId];
  if (_3 == 0B)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  DevAssert (0);
  goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  Counter = OsIf_Timer_System_Internal_GetCounter ();

  <bb 8> :
  # DEBUG BEGIN_STMT
  D.4323 = Counter;
  return D.4323;

}


OsIf_Timer_System_Init ()
{
  uint32 CoreId;

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

  <bb 3> :
  _1 = OsIf_apxPredefinedConfig[CoreId];
  if (_1 == 0B)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

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

  <bb 5> :
  # DEBUG BEGIN_STMT
  OsIf_abMdlInit[CoreId] = 1;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _2 = OsIf_apxPredefinedConfig[CoreId];
  OsIf_apxInternalCfg[CoreId] = _2;
  # DEBUG BEGIN_STMT
  _3 = OsIf_apxInternalCfg[CoreId];
  _4 = _3->counterFrequency;
  OsIf_au32InternalFrequencies[CoreId] = _4;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  OsIf_Timer_System_Internal_Init ();
  return;

}


OsIf_Timer_System_Internal_GetElapsed (uint32 * const CurrentRef)
{
  uint32 dif;
  uint32 CurrentVal;
  uint32 D.4339;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = 3758153744B;
  _2 = _1->CVR;
  CurrentVal = _2 & 16777215;
  # DEBUG BEGIN_STMT
  dif = 0;
  # DEBUG BEGIN_STMT
  _3 = *CurrentRef;
  if (CurrentVal > _3)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _4 = 3758153744B;
  _5 = _4->RVR;
  _6 = *CurrentRef;
  _7 = _6 - CurrentVal;
  dif = _5 + _7;
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _8 = *CurrentRef;
  dif = _8 - CurrentVal;

  <bb 5> :
  # DEBUG BEGIN_STMT
  *CurrentRef = CurrentVal;
  # DEBUG BEGIN_STMT
  D.4339 = dif;
  return D.4339;

}


OsIf_Timer_System_Internal_GetCounter ()
{
  uint32 D.4325;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = 3758153744B;
  _2 = _1->CVR;
  D.4325 = _2 & 16777215;
  return D.4325;

}


OsIf_Timer_System_Internal_Init ()
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = 3758153744B;
  _1->CSRr = 0;
  # DEBUG BEGIN_STMT
  _2 = 3758153744B;
  _2->RVR = 16777215;
  # DEBUG BEGIN_STMT
  _3 = 3758153744B;
  _3->CVR = 0;
  # DEBUG BEGIN_STMT
  _4 = 3758153744B;
  _4->CSRr = 5;
  return;

}


DevAssert (volatile boolean x)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  x.0_1 = 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;

}


