oal_mutex_unlock.isra.0 (const oal_mutex_t ISRA.28)
{
  errno_t retval;
  short unsigned int _2;
  int _3;
  unsigned char _4;
  void (*<T4e7>) (void) _5;

  <bb 6> [local count: 1073741824]:
  # DEBUG mutex s=> mutex

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG retval => 22
  # DEBUG BEGIN_STMT
  _2 = ISRA.28_10(D);
  if (_2 <= 255)
    goto <bb 3>; [65.00%]
  else
    goto <bb 5>; [35.00%]

  <bb 3> [local count: 697932186]:
  # DEBUG BEGIN_STMT
  _3 = (int) _2;
  _4 = mutex_alloc[_3];
  if (_4 != 0)
    goto <bb 4>; [65.00%]
  else
    goto <bb 5>; [35.00%]

  <bb 4> [local count: 453655921]:
  # DEBUG BEGIN_STMT
  _5 = SchM_Exit_Eth_43_PFE_ETH_EXCLUSIVE_AREA_ID[_3];
  _5 ();
  # DEBUG BEGIN_STMT
  # DEBUG retval => 0

  <bb 5> [local count: 1073741824]:
  # retval_6 = PHI <22(2), 22(3), 0(4)>
  # DEBUG retval => retval_6
  # DEBUG BEGIN_STMT
  return retval_6;

}


oal_mutex_lock.isra.0 (const oal_mutex_t ISRA.26)
{
  errno_t retval;
  short unsigned int _2;
  int _3;
  unsigned char _4;
  void (*<T4e7>) (void) _5;

  <bb 6> [local count: 1073741824]:
  # DEBUG mutex s=> mutex

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG retval => 22
  # DEBUG BEGIN_STMT
  _2 = ISRA.26_10(D);
  if (_2 <= 255)
    goto <bb 3>; [65.00%]
  else
    goto <bb 5>; [35.00%]

  <bb 3> [local count: 697932186]:
  # DEBUG BEGIN_STMT
  _3 = (int) _2;
  _4 = mutex_alloc[_3];
  if (_4 != 0)
    goto <bb 4>; [65.00%]
  else
    goto <bb 5>; [35.00%]

  <bb 4> [local count: 453655921]:
  # DEBUG BEGIN_STMT
  _5 = SchM_Enter_Eth_43_PFE_ETH_EXCLUSIVE_AREA_ID[_3];
  _5 ();
  # DEBUG BEGIN_STMT
  # DEBUG retval => 0

  <bb 5> [local count: 1073741824]:
  # retval_6 = PHI <22(2), 22(3), 0(4)>
  # DEBUG retval => retval_6
  # DEBUG BEGIN_STMT
  return retval_6;

}


oal_util_rand ()
{
  long unsigned int u32RandVal.22_1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  int32_t _9;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  u32RandVal.22_1 = u32RandVal;
  _2 = u32RandVal.22_1 >> 1;
  _3 = u32RandVal.22_1 & 1;
  _4 = -_3;
  _5 = _4 & 2149580803;
  _6 = _2 ^ _5;
  u32RandVal = _6;
  # DEBUG BEGIN_STMT
  _9 = (int32_t) _6;
  return _9;

}


__attribute__((nothrow, leaf))
strcpy (char_t * pszDest, const char_t * pcoszSrc)
{
  uint32_t u32Ctr;
  const char_t * _1;
  char_t * _2;
  char _3;
  char _4;

  <bb 2> [local count: 118111600]:
  # DEBUG BEGIN_STMT
  # DEBUG u32Ctr => 0

  <bb 3> [local count: 1073741824]:
  # u32Ctr_5 = PHI <0(2), u32Ctr_11(5)>
  # DEBUG u32Ctr => u32Ctr_5
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pcoszSrc_8(D) + u32Ctr_5;
  _2 = pszDest_9(D) + u32Ctr_5;
  _3 = *_1;
  *_2 = _3;
  # DEBUG BEGIN_STMT
  u32Ctr_11 = u32Ctr_5 + 1;
  # DEBUG u32Ctr => u32Ctr_11
  _4 = *_1;
  if (_4 != 0)
    goto <bb 5>; [89.00%]
  else
    goto <bb 4>; [11.00%]

  <bb 5> [local count: 955630223]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 118111601]:
  # DEBUG BEGIN_STMT
  return pszDest_9(D);

}


oal_util_get_unique_seqnum32 ()
{
  uint32_t val;
  unsigned char init.18_1;
  unsigned char init.19_2;
  long unsigned int _3;
  short unsigned int _15;
  short unsigned int _16;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  init.18_1 = init;
  if (init.18_1 == 0)
    goto <bb 3>; [33.00%]
  else
    goto <bb 4>; [67.00%]

  <bb 3> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  mux = 183;
  # DEBUG BEGIN_STMT
  oal_mutex_init (&mux);
  # DEBUG BEGIN_STMT
  init = 1;

  <bb 4> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  init.19_2 = init;
  if (init.19_2 != 0)
    goto <bb 5>; [33.00%]
  else
    goto <bb 6>; [67.00%]

  <bb 5> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  _15 = mux;
  # DEBUG D#1 => &mux
  oal_mutex_lock.isra.0 (_15);
  # DEBUG BEGIN_STMT
  val_12 = base;
  # DEBUG val => val_12
  # DEBUG BEGIN_STMT
  _3 = val_12 + 1;
  base = _3;
  # DEBUG BEGIN_STMT
  _16 = mux;
  # DEBUG D#2 => &mux
  oal_mutex_unlock.isra.0 (_16);

  <bb 6> [local count: 1073741824]:
  # val_4 = PHI <val_12(5), 0(4)>
  # DEBUG val => val_4
  # DEBUG BEGIN_STMT
  return val_4;

}


oal_util_parse_ptp (uint8_t * buffer, size_t len, struct oal_util_ptp_header_t * * ptph)
{
  errno_t ret;
  addr_t hdr_addr;
  uint8_t l3_len;
  uint8_t l2_len;
  unsigned int buffer.9_1;
  unsigned int _2;
  uint16_t * _3;
  short unsigned int _4;
  short unsigned int _5;
  short unsigned int _6;
  unsigned int _7;
  unsigned int _8;
  uint16_t * _9;
  short unsigned int _10;
  short unsigned int _11;
  short unsigned int _12;
  unsigned int _13;
  unsigned int _14;
  struct oal_util_ptp_header_t * _15;
  unsigned int _16;
  unsigned int _17;
  unsigned char l3_len.15_18;
  unsigned int _19;
  sizetype _20;
  uint16_t * _21;
  short unsigned int _22;
  short unsigned int _23;
  short unsigned int _24;
  unsigned int _25;
  unsigned int _26;
  unsigned int _27;
  struct oal_util_ptp_header_t * _28;
  uint8_t iftmp.8_29;
  errno_t _30;
  short unsigned int _32;
  short unsigned int _33;
  short unsigned int _35;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG off => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  if (len_34(D) > 13)
    goto <bb 3>; [78.28%]
  else
    goto <bb 10>; [21.72%]

  <bb 3> [local count: 840525101]:
  # DEBUG BEGIN_STMT
  buffer.9_1 = (unsigned int) buffer_37(D);
  _2 = buffer.9_1 + 12;
  _3 = (uint16_t *) _2;
  _4 = *_3;
  _5 = _4 >> 8;
  _6 = _4 << 8;
  _32 = _5 | _6;
  if (_32 == 33024)
    goto <bb 5>; [34.00%]
  else
    goto <bb 4>; [66.00%]

  <bb 4> [local count: 554746567]:

  <bb 5> [local count: 840525101]:
  # iftmp.8_29 = PHI <16(3), 12(4)>
  # DEBUG off => iftmp.8_29
  # DEBUG BEGIN_STMT
  l2_len_38 = iftmp.8_29 + 2;
  # DEBUG l2_len => l2_len_38
  # DEBUG BEGIN_STMT
  _7 = (unsigned int) iftmp.8_29;
  _8 = buffer.9_1 + _7;
  _9 = (uint16_t *) _8;
  _10 = *_9;
  _11 = _10 >> 8;
  _12 = _10 << 8;
  _33 = _11 | _12;
  if (_33 == 35063)
    goto <bb 6>; [35.01%]
  else
    goto <bb 7>; [64.99%]

  <bb 6> [local count: 294267838]:
  # DEBUG BEGIN_STMT
  _13 = (unsigned int) l2_len_38;
  _14 = buffer.9_1 + _13;
  _15 = (struct oal_util_ptp_header_t *) _14;
  *ptph_42(D) = _15;
  # DEBUG BEGIN_STMT
  goto <bb 10>; [100.00%]

  <bb 7> [local count: 546257263]:
  # DEBUG BEGIN_STMT
  ret_40 = oal_util_parse_ptp_l3 (buffer_37(D), len_34(D), l2_len_38, &l3_len, iftmp.8_29);
  # DEBUG ret => ret_40
  # DEBUG BEGIN_STMT
  if (ret_40 == 0)
    goto <bb 8>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 8> [local count: 273128631]:
  # DEBUG BEGIN_STMT
  _16 = (unsigned int) l2_len_38;
  _17 = buffer.9_1 + _16;
  l3_len.15_18 = l3_len;
  _19 = (unsigned int) l3_len.15_18;
  hdr_addr_41 = _17 + _19;
  # DEBUG hdr_addr => hdr_addr_41
  # DEBUG BEGIN_STMT
  # DEBUG l4_len => 8
  # DEBUG BEGIN_STMT
  _20 = hdr_addr_41 + 2;
  _21 = (uint16_t *) _20;
  _22 = *_21;
  _23 = _22 >> 8;
  _24 = _22 << 8;
  _35 = _23 | _24;
  _25 = (unsigned int) _35;
  _26 = _25 + 4294966977;
  if (_26 <= 1)
    goto <bb 9>; [56.34%]
  else
    goto <bb 10>; [43.66%]

  <bb 9> [local count: 153880671]:
  # DEBUG BEGIN_STMT
  _27 = hdr_addr_41 + 8;
  _28 = (struct oal_util_ptp_header_t *) _27;
  *ptph_42(D) = _28;
  # DEBUG BEGIN_STMT

  <bb 10> [local count: 1073741824]:
  # _30 = PHI <0(6), 2(2), 0(9), 2(8), ret_40(7)>
  l3_len ={v} {CLOBBER};
  return _30;

}


oal_util_parse_ptp_l3 (uint8_t * buffer, size_t len, uint8_t l2_len, uint8_t * l3_len, uint8_t off)
{
  errno_t ret;
  addr_t hdr_addr;
  unsigned int _1;
  unsigned int buffer.0_2;
  unsigned int _3;
  unsigned int _4;
  uint16_t * _5;
  short unsigned int _6;
  short unsigned int _7;
  short unsigned int _8;
  unsigned int _9;
  sizetype _10;
  uint8_t * _11;
  unsigned char _12;
  uint8_t * hdr_addr.3_13;
  unsigned char _14;
  unsigned char _15;
  sizetype _16;
  uint32_t * _17;
  long unsigned int _18;
  long unsigned int _19;
  long unsigned int _20;
  long unsigned int _21;
  long unsigned int _22;
  long unsigned int _23;
  long unsigned int _24;
  long unsigned int _25;
  long unsigned int _26;
  long unsigned int _27;
  long unsigned int _28;
  unsigned int _29;
  sizetype _30;
  uint8_t * _31;
  unsigned char _32;
  uint8_t * hdr_addr.7_33;
  unsigned char _34;
  unsigned char _35;
  sizetype _36;
  const void * _37;
  int _38;
  sizetype _39;
  uint8_t * _40;
  unsigned char _41;
  unsigned char _42;
  sizetype _43;
  const void * _44;
  int _45;
  short unsigned int _48;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  _1 = (unsigned int) l2_len_49(D);
  buffer.0_2 = (unsigned int) buffer_50(D);
  hdr_addr_51 = _1 + buffer.0_2;
  # DEBUG hdr_addr => hdr_addr_51
  # DEBUG BEGIN_STMT
  _3 = (unsigned int) off_52(D);
  _4 = buffer.0_2 + _3;
  _5 = (uint16_t *) _4;
  _6 = *_5;
  _7 = _6 >> 8;
  _8 = _6 << 8;
  _48 = _7 | _8;
  if (_48 == 2048)
    goto <bb 3>; [34.00%]
  else
    goto <bb 10>; [66.00%]

  <bb 3> [local count: 365072220]:
  _9 = _1 + 20;
  if (_9 <= len_54(D))
    goto <bb 4>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 4> [local count: 182536110]:
  # DEBUG BEGIN_STMT
  *l3_len_55(D) = 20;
  # DEBUG BEGIN_STMT
  _10 = hdr_addr_51 + 9;
  _11 = (uint8_t *) _10;
  _12 = *_11;
  if (_12 == 17)
    goto <bb 5>; [48.89%]
  else
    goto <bb 9>; [51.11%]

  <bb 5> [local count: 89241904]:
  hdr_addr.3_13 = (uint8_t *) hdr_addr_51;
  _14 = *hdr_addr.3_13;
  _15 = _14 >> 4;
  if (_15 == 4)
    goto <bb 6>; [48.89%]
  else
    goto <bb 9>; [51.11%]

  <bb 6> [local count: 43630367]:
  _42 = _14 & 15;
  if (_42 == 5)
    goto <bb 7>; [48.89%]
  else
    goto <bb 9>; [51.11%]

  <bb 7> [local count: 21330886]:
  _16 = hdr_addr_51 + 16;
  _17 = (uint32_t *) _16;
  _18 = *_17;
  _19 = _18 >> 24;
  _20 = _18 >> 8;
  _21 = _20 & 65280;
  _22 = _19 | _21;
  _23 = _18 << 8;
  _24 = _23 & 16711680;
  _25 = _22 | _24;
  _26 = _18 << 24;
  _27 = _25 | _26;
  _28 = _27 + 536870527;
  if (_28 <= 3)
    goto <bb 18>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 8> [local count: 10665443]:
  if (_27 == 3758096488)
    goto <bb 18>; [48.89%]
  else
    goto <bb 9>; [51.11%]

  <bb 9> [local count: 166656332]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 2
  goto <bb 18>; [100.00%]

  <bb 10> [local count: 891205715]:
  # DEBUG BEGIN_STMT
  if (_48 == 34525)
    goto <bb 11>; [48.89%]
  else
    goto <bb 18>; [51.11%]

  <bb 11> [local count: 435710474]:
  _29 = _1 + 40;
  if (_29 <= len_54(D))
    goto <bb 12>; [65.00%]
  else
    goto <bb 18>; [35.00%]

  <bb 12> [local count: 283211808]:
  # DEBUG BEGIN_STMT
  *l3_len_55(D) = 40;
  # DEBUG BEGIN_STMT
  _30 = hdr_addr_51 + 6;
  _31 = (uint8_t *) _30;
  _32 = *_31;
  if (_32 == 17)
    goto <bb 13>; [48.89%]
  else
    goto <bb 18>; [51.11%]

  <bb 13> [local count: 138462253]:
  hdr_addr.7_33 = (uint8_t *) hdr_addr_51;
  _34 = *hdr_addr.7_33;
  _35 = _34 >> 4;
  if (_35 == 6)
    goto <bb 14>; [48.89%]
  else
    goto <bb 18>; [51.11%]

  <bb 14> [local count: 67694195]:
  # DEBUG BEGIN_STMT
  _36 = hdr_addr_51 + 26;
  _37 = (const void *) _36;
  _38 = memcmp (_37, &primary_mcast[2], 14);
  if (_38 == 0)
    goto <bb 15>; [50.00%]
  else
    goto <bb 16>; [50.00%]

  <bb 15> [local count: 33847098]:
  _39 = hdr_addr_51 + 24;
  _40 = (uint8_t *) _39;
  _41 = *_40;
  if (_41 == 255)
    goto <bb 18>; [34.00%]
  else
    goto <bb 16>; [66.00%]

  <bb 16> [local count: 56186182]:
  # DEBUG BEGIN_STMT
  _43 = hdr_addr_51 + 24;
  _44 = (const void *) _43;
  _45 = memcmp (_44, &pdelay_mcast, 16);
  if (_45 == 0)
    goto <bb 18>; [65.00%]
  else
    goto <bb 17>; [35.00%]

  <bb 17> [local count: 19665164]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 2

  <bb 18> [local count: 1073741824]:
  # ret_46 = PHI <2(9), 2(13), 2(11), 0(8), 0(7), 0(16), 2(17), 0(15), 2(12), 2(10)>
  # DEBUG ret => ret_46
  # DEBUG BEGIN_STMT
  return ret_46;

}


