Lin_Ip_MakeChecksumByte (const uint8 * pBuffer, const uint8 u8SizeBuffer, const uint8 u8Pid)
{
  uint16 checksum;
  uint8 length;
  sizetype _1;
  const uint8 * _2;
  unsigned char _3;
  short unsigned int _4;
  unsigned char length.1_5;
  unsigned char _6;
  uint8 _17;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  checksum_11 = 0;
  # DEBUG checksum => checksum_11
  # DEBUG BEGIN_STMT
  if (u8Pid_12(D) != 60)
    goto <bb 3>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 3> :
  if (u8Pid_12(D) != 125)
    goto <bb 4>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 4> :
  if (u8Pid_12(D) != 254)
    goto <bb 5>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 5> :
  if (u8Pid_12(D) != 191)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  checksum_13 = (uint16) u8Pid_12(D);
  # DEBUG checksum => checksum_13
  goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  checksum_14 = 0;
  # DEBUG checksum => checksum_14

  <bb 8> :
  # checksum_8 = PHI <checksum_13(6), checksum_14(7)>
  # DEBUG checksum => checksum_8
  # DEBUG BEGIN_STMT
  length_15 = 0;
  # DEBUG length => length_15
  goto <bb 12>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  _1 = (sizetype) length_7;
  _2 = pBuffer_19(D) + _1;
  _3 = *_2;
  _4 = (short unsigned int) _3;
  checksum_20 = checksum_10 + _4;
  # DEBUG checksum => checksum_20
  # DEBUG BEGIN_STMT
  if (checksum_20 > 255)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  checksum_21 = checksum_20 + 65281;
  # DEBUG checksum => checksum_21

  <bb 11> :
  # checksum_9 = PHI <checksum_20(9), checksum_21(10)>
  # DEBUG checksum => checksum_9
  # DEBUG BEGIN_STMT
  length.1_5 = length_7;
  length_22 = length.1_5 + 1;
  # DEBUG length => length_22

  <bb 12> :
  # length_7 = PHI <length_15(8), length_22(11)>
  # checksum_10 = PHI <checksum_8(8), checksum_9(11)>
  # DEBUG checksum => checksum_10
  # DEBUG length => length_7
  # DEBUG BEGIN_STMT
  if (length_7 < u8SizeBuffer_16(D))
    goto <bb 9>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  _6 = (unsigned char) checksum_10;
  _17 = ~_6;
  return _17;

}


Lin_Ip_ProcessParity (const uint8 u8Pid, const Lin_Ip_ParityActionType eTypeAction)
{
  uint8 retVal;
  uint8 u8CalPid;
  unsigned char _1;
  unsigned char _2;
  unsigned char _3;
  unsigned char _4;
  unsigned char _5;
  unsigned char _6;
  unsigned char _7;
  unsigned char _8;
  unsigned char _9;
  unsigned char _10;
  unsigned char _11;
  unsigned char _12;
  unsigned char _13;
  unsigned char _14;
  unsigned char _15;
  unsigned char _16;
  unsigned char iftmp.0_18;
  unsigned char iftmp.0_31;
  unsigned char iftmp.0_32;
  unsigned char _33;
  uint8 _39;

  <bb 2> :
  # DEBUG BEGIN_STMT
  u8CalPid_20 = u8Pid_19(D) & 63;
  # DEBUG u8CalPid => u8CalPid_20
  # DEBUG BEGIN_STMT
  retVal_21 = 255;
  # DEBUG retVal => retVal_21
  # DEBUG BEGIN_STMT
  _1 = BIT (u8Pid_19(D), 0);
  _2 = BIT (u8Pid_19(D), 1);
  _3 = _1 ^ _2;
  _4 = BIT (u8Pid_19(D), 2);
  _5 = _3 ^ _4;
  _6 = BIT (u8Pid_19(D), 4);
  _7 = _5 ^ _6;
  _8 = _7 << 6;
  _9 = BIT (u8Pid_19(D), 1);
  _10 = BIT (u8Pid_19(D), 3);
  _11 = _9 ^ _10;
  _12 = BIT (u8Pid_19(D), 4);
  _13 = _11 ^ _12;
  _14 = BIT (u8Pid_19(D), 5);
  _15 = _13 ^ _14;
  _16 = _15 & 1;
  if (_16 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  iftmp.0_32 = 128;
  goto <bb 5>; [INV]

  <bb 4> :
  iftmp.0_31 = 0;

  <bb 5> :
  # iftmp.0_18 = PHI <iftmp.0_32(3), iftmp.0_31(4)>
  _33 = iftmp.0_18 | _8;
  u8CalPid_34 = _33 | u8CalPid_20;
  # DEBUG u8CalPid => u8CalPid_34
  # DEBUG BEGIN_STMT
  if (eTypeAction_35(D) == 0)
    goto <bb 6>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  if (u8Pid_19(D) != u8CalPid_34)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  retVal_38 = 255;
  # DEBUG retVal => retVal_38
  goto <bb 11>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  retVal_37 = u8Pid_19(D) & 63;
  # DEBUG retVal => retVal_37
  goto <bb 11>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  if (eTypeAction_35(D) == 1)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  retVal_36 = u8CalPid_34;
  # DEBUG retVal => retVal_36

  <bb 11> :
  # retVal_17 = PHI <retVal_37(8), retVal_21(9), retVal_36(10), retVal_38(7)>
  # DEBUG retVal => retVal_17
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _39 = retVal_17;
  return _39;

}


BIT (uint8 A, uint8 B)
{
  int _1;
  int _2;
  int _3;
  unsigned char _4;
  uint8 _7;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = (int) A_5(D);
  _2 = (int) B_6(D);
  _3 = _1 >> _2;
  _4 = (unsigned char) _3;
  _7 = _4 & 1;
  return _7;

}


