
Marking local functions: Siul2_Port_Ip_GetMSCRConfiguration Siul2_Port_Ip_PinInit


Marking externally visible functions: Siul2_Port_Ip_GetPinConfiguration Siul2_Port_Ip_RevertPinConfiguration Siul2_Port_Ip_SetPinDirection Siul2_Port_Ip_SetInputBuffer Siul2_Port_Ip_SetOutputBuffer Siul2_Port_Ip_SetPullSel Siul2_Port_Ip_Init Siul2_Port_Ip_SetGPDO Siul2_Port_Ip_SetIMCR Siul2_Port_Ip_ReadMSCR Siul2_Port_Ip_SetMSCR


Marking externally visible variables:


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

Siul2_Port_Ip_GetPinConfiguration/16 (Siul2_Port_Ip_GetPinConfiguration) @06d5e2a0
  Type: function definition analyzed
  Visibility: externally_visible public
  References: pPort_Setting/2 (read)u32MaxPinConfigured/3 (read)
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: Siul2_Port_Ip_GetMSCRConfiguration/5 
Siul2_Port_Ip_RevertPinConfiguration/15 (Siul2_Port_Ip_RevertPinConfiguration) @06d5ed20
  Type: function definition analyzed
  Visibility: externally_visible public
  References: pPort_Setting/2 (read)u32MaxPinConfigured/3 (read)
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: Siul2_Port_Ip_PinInit/4 
Siul2_Port_Ip_SetPinDirection/14 (Siul2_Port_Ip_SetPinDirection) @06d5ea80
  Type: function definition analyzed
  Visibility: externally_visible public
  References: 
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: 
Siul2_Port_Ip_SetInputBuffer/13 (Siul2_Port_Ip_SetInputBuffer) @06d5e620
  Type: function definition analyzed
  Visibility: externally_visible public
  References: 
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: 
Siul2_Port_Ip_SetOutputBuffer/12 (Siul2_Port_Ip_SetOutputBuffer) @06d5e1c0
  Type: function definition analyzed
  Visibility: externally_visible public
  References: 
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: 
Siul2_Port_Ip_SetPullSel/11 (Siul2_Port_Ip_SetPullSel) @06d4fa80
  Type: function definition analyzed
  Visibility: externally_visible public
  References: 
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: 
Siul2_Port_Ip_Init/10 (Siul2_Port_Ip_Init) @06d4f540
  Type: function definition analyzed
  Visibility: externally_visible public
  References: pPort_Setting/2 (write)u32MaxPinConfigured/3 (write)
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: Siul2_Port_Ip_PinInit/4 
Siul2_Port_Ip_SetGPDO/9 (Siul2_Port_Ip_SetGPDO) @06d4fee0
  Type: function definition analyzed
  Visibility: externally_visible public
  References: 
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: Siul2_Port_Ip_PinInit/4 
  Calls: 
Siul2_Port_Ip_SetIMCR/8 (Siul2_Port_Ip_SetIMCR) @06d4fc40
  Type: function definition analyzed
  Visibility: externally_visible public
  References: 
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: 
Siul2_Port_Ip_ReadMSCR/7 (Siul2_Port_Ip_ReadMSCR) @06d4f9a0
  Type: function definition analyzed
  Visibility: externally_visible public
  References: 
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: 
Siul2_Port_Ip_SetMSCR/6 (Siul2_Port_Ip_SetMSCR) @06d4f700
  Type: function definition analyzed
  Visibility: externally_visible public
  References: 
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: 
Siul2_Port_Ip_GetMSCRConfiguration/5 (Siul2_Port_Ip_GetMSCRConfiguration) @06d4f460
  Type: function definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: 
  Availability: local
  Function flags: body local optimize_size
  Called by: Siul2_Port_Ip_GetPinConfiguration/16 
  Calls: 
Siul2_Port_Ip_PinInit/4 (Siul2_Port_Ip_PinInit) @06d4f1c0
  Type: function definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: 
  Availability: local
  Function flags: body local optimize_size
  Called by: Siul2_Port_Ip_RevertPinConfiguration/15 Siul2_Port_Ip_Init/10 
  Calls: Siul2_Port_Ip_SetGPDO/9 
u32MaxPinConfigured/3 (u32MaxPinConfigured) @06d48ee8
  Type: variable definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: Siul2_Port_Ip_Init/10 (write)Siul2_Port_Ip_RevertPinConfiguration/15 (read)Siul2_Port_Ip_GetPinConfiguration/16 (read)
  Availability: available
  Varpool flags:
pPort_Setting/2 (pPort_Setting) @06d48e58
  Type: variable definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: Siul2_Port_Ip_Init/10 (write)Siul2_Port_Ip_RevertPinConfiguration/15 (read)Siul2_Port_Ip_GetPinConfiguration/16 (read)
  Availability: available
  Varpool flags:
Siul2_Port_Ip_GetPinConfiguration (const struct Siul2_Port_Ip_PortType * const base, struct Siul2_Port_Ip_PinSettingsConfig * config, uint16 pin)
{
  uint8 inputMuxIterator;
  uint16 u16PinIdx;
  uint32 u32MscrBase;
  uint32 u32MscrId;
  uint32 portNumber;
  uint32 MaxPinConfigured;
  const struct Siul2_Port_Ip_PinSettingsConfig * ConfigPtr;

  <bb 2> :
  # DEBUG BEGIN_STMT
  ConfigPtr = pPort_Setting;
  # DEBUG BEGIN_STMT
  MaxPinConfigured = u32MaxPinConfigured;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  u32MscrBase = 1076429376;
  # DEBUG BEGIN_STMT
  base.5_1 = (long unsigned int) base;
  _2 = base.5_1 - u32MscrBase;
  portNumber = _2 / 64;
  # DEBUG BEGIN_STMT
  _3 = portNumber << 4;
  _4 = (long unsigned int) pin;
  u32MscrId = _3 + _4;
  # DEBUG BEGIN_STMT
  u16PinIdx = 0;
  goto <bb 9>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _5 = (unsigned int) u16PinIdx;
  _6 = _5 * 64;
  _7 = ConfigPtr + _6;
  _8 = _7->pinPortIdx;
  if (u32MscrId == _8)
    goto <bb 4>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _9 = (unsigned int) u16PinIdx;
  _10 = _9 * 64;
  _11 = ConfigPtr + _10;
  _12 = _11->base;
  config->base = _12;
  # DEBUG BEGIN_STMT
  _13 = (unsigned int) u16PinIdx;
  _14 = _13 * 64;
  _15 = ConfigPtr + _14;
  _16 = _15->pinPortIdx;
  config->pinPortIdx = _16;
  # DEBUG BEGIN_STMT
  _17 = (unsigned int) u16PinIdx;
  _18 = _17 * 64;
  _19 = ConfigPtr + _18;
  _20 = _19->initValue;
  config->initValue = _20;
  # DEBUG BEGIN_STMT
  inputMuxIterator = 0;
  goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _21 = (unsigned int) u16PinIdx;
  _22 = _21 * 64;
  _23 = ConfigPtr + _22;
  _24 = (int) inputMuxIterator;
  _25 = (int) inputMuxIterator;
  _26 = _23->inputMuxReg[_24];
  config->inputMuxReg[_25] = _26;
  # DEBUG BEGIN_STMT
  _27 = (unsigned int) u16PinIdx;
  _28 = _27 * 64;
  _29 = ConfigPtr + _28;
  _30 = (int) inputMuxIterator;
  _31 = (int) inputMuxIterator;
  _32 = _29->inputMux[_30];
  config->inputMux[_31] = _32;
  # DEBUG BEGIN_STMT
  inputMuxIterator.6_33 = inputMuxIterator;
  inputMuxIterator = inputMuxIterator.6_33 + 1;

  <bb 6> :
  # DEBUG BEGIN_STMT
  if (inputMuxIterator <= 7)
    goto <bb 5>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  Siul2_Port_Ip_GetMSCRConfiguration (config, base, pin);
  # DEBUG BEGIN_STMT
  goto <bb 10>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  u16PinIdx.7_34 = u16PinIdx;
  u16PinIdx = u16PinIdx.7_34 + 1;

  <bb 9> :
  # DEBUG BEGIN_STMT
  _35 = (long unsigned int) u16PinIdx;
  if (MaxPinConfigured > _35)
    goto <bb 3>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 10> :
  return;

}


Siul2_Port_Ip_RevertPinConfiguration (const struct Siul2_Port_Ip_PortType * const base, uint16 pin)
{
  uint32 u32MscrId;
  uint32 portNumber;
  uint32 MaxPinConfigured;
  const struct Siul2_Port_Ip_PinSettingsConfig * ConfigPtr;
  uint32 u32RegVal;
  uint16 u16PinIdx;
  uint32 D.5032;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  u32RegVal = 4294967295;
  # DEBUG BEGIN_STMT
  ConfigPtr = pPort_Setting;
  # DEBUG BEGIN_STMT
  MaxPinConfigured = u32MaxPinConfigured;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  base.3_1 = (long unsigned int) base;
  _2 = base.3_1 + 3218537920;
  portNumber = _2 >> 6;
  # DEBUG BEGIN_STMT
  _3 = portNumber << 4;
  _4 = (long unsigned int) pin;
  u32MscrId = _3 + _4;
  # DEBUG BEGIN_STMT
  u16PinIdx = 0;
  goto <bb 6>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _5 = (unsigned int) u16PinIdx;
  _6 = _5 * 64;
  _7 = ConfigPtr + _6;
  _8 = _7->pinPortIdx;
  if (u32MscrId == _8)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _9 = (unsigned int) u16PinIdx;
  _10 = _9 * 64;
  _11 = ConfigPtr + _10;
  Siul2_Port_Ip_PinInit (_11);
  # DEBUG BEGIN_STMT
  _12 = (int) pin;
  u32RegVal = base->MSCR[_12];
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  u16PinIdx.4_13 = u16PinIdx;
  u16PinIdx = u16PinIdx.4_13 + 1;

  <bb 6> :
  # DEBUG BEGIN_STMT
  _14 = (long unsigned int) u16PinIdx;
  if (MaxPinConfigured > _14)
    goto <bb 3>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  D.5032 = u32RegVal;
  return D.5032;

}


Siul2_Port_Ip_SetPinDirection (struct Siul2_Port_Ip_PortType * const base, uint16 pin, Siul2_Port_Ip_PortDirectionType direction)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = (int) direction;
  switch (_1) <default: <L6> [INV], case 0: <L0> [INV], case 1: <L1> [INV], case 2: <L2> [INV], case 3: <L3> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  _2 = (int) pin;
  _3 = base->MSCR[_2];
  _4 = (int) pin;
  _5 = _3 & 4292870143;
  base->MSCR[_4] = _5;
  # DEBUG BEGIN_STMT
  _6 = (int) pin;
  _7 = base->MSCR[_6];
  _8 = (int) pin;
  _9 = _7 | 524288;
  base->MSCR[_8] = _9;
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  _10 = (int) pin;
  _11 = base->MSCR[_10];
  _12 = (int) pin;
  _13 = _11 & 4294443007;
  base->MSCR[_12] = _13;
  # DEBUG BEGIN_STMT
  _14 = (int) pin;
  _15 = base->MSCR[_14];
  _16 = (int) pin;
  _17 = _15 | 2097152;
  base->MSCR[_16] = _17;
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 5> :
<L2>:
  # DEBUG BEGIN_STMT
  _18 = (int) pin;
  _19 = base->MSCR[_18];
  _20 = (int) pin;
  _21 = _19 | 2621440;
  base->MSCR[_20] = _21;
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 6> :
<L3>:
  # DEBUG BEGIN_STMT
  _22 = (int) pin;
  _23 = base->MSCR[_22];
  _24 = (int) pin;
  _25 = _23 & 4292345855;
  base->MSCR[_24] = _25;
  # DEBUG BEGIN_STMT

  <bb 7> :
<L6>:
  return;

}


Siul2_Port_Ip_SetInputBuffer (struct Siul2_Port_Ip_PortType * const base, uint16 pin, boolean enable, uint32 inputMuxReg, Siul2_Port_Ip_PortInputMux inputMux)
{
  uint32 imcrVal;
  uint32 imcrRegIdx;
  struct SIUL2_Type * siul2Base;
  long unsigned int iftmp.2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  siul2Base = 4294967295B;
  # DEBUG BEGIN_STMT
  imcrRegIdx = inputMuxReg;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (base != 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = (int) pin;
  _2 = base->MSCR[_1];
  _3 = (int) pin;
  _4 = _2 & 4294443007;
  base->MSCR[_3] = _4;
  # DEBUG BEGIN_STMT
  _5 = (int) pin;
  _6 = base->MSCR[_5];
  if (enable != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  iftmp.2 = 524288;
  goto <bb 6>; [INV]

  <bb 5> :
  iftmp.2 = 0;

  <bb 6> :
  _7 = (int) pin;
  _8 = iftmp.2 | _6;
  base->MSCR[_7] = _8;

  <bb 7> :
  # DEBUG BEGIN_STMT
  if (inputMux != 16)
    goto <bb 8>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  if (imcrRegIdx <= 511)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  siul2Base = 1076428800B;

  <bb 10> :
  # DEBUG BEGIN_STMT
  _9 = imcrRegIdx & 511;
  imcrVal = siul2Base->IMCR[_9];
  # DEBUG BEGIN_STMT
  imcrVal = imcrVal & 4294967280;
  # DEBUG BEGIN_STMT
  _10 = (long unsigned int) inputMux;
  _11 = _10 & 15;
  imcrVal = imcrVal | _11;
  # DEBUG BEGIN_STMT
  _12 = imcrRegIdx & 511;
  siul2Base->IMCR[_12] = imcrVal;

  <bb 11> :
  return;

}


Siul2_Port_Ip_SetOutputBuffer (struct Siul2_Port_Ip_PortType * const base, uint16 pin, boolean enable, Siul2_Port_Ip_PortMux mux)
{
  long unsigned int iftmp.1;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = (int) pin;
  _2 = base->MSCR[_1];
  _3 = (int) pin;
  _4 = _2 & 4292870143;
  base->MSCR[_3] = _4;
  # DEBUG BEGIN_STMT
  _5 = (int) pin;
  _6 = base->MSCR[_5];
  if (enable != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  iftmp.1 = 2097152;
  goto <bb 5>; [INV]

  <bb 4> :
  iftmp.1 = 0;

  <bb 5> :
  _7 = (int) pin;
  _8 = iftmp.1 | _6;
  base->MSCR[_7] = _8;
  # DEBUG BEGIN_STMT
  _9 = (int) pin;
  _10 = base->MSCR[_9];
  _11 = (int) pin;
  _12 = _10 & 4294967288;
  base->MSCR[_11] = _12;
  # DEBUG BEGIN_STMT
  _13 = (int) pin;
  _14 = base->MSCR[_13];
  _15 = (long unsigned int) mux;
  _16 = _15 & 7;
  _17 = (int) pin;
  _18 = _14 | _16;
  base->MSCR[_17] = _18;
  return;

}


Siul2_Port_Ip_SetPullSel (struct Siul2_Port_Ip_PortType * const base, uint16 pin, Siul2_Port_Ip_PortPullConfig pullConfig)
{
  uint32 pusVal;
  uint32 pueVal;
  uint32 regVal;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pueVal = 8192;
  # DEBUG BEGIN_STMT
  pusVal = 2048;
  # DEBUG BEGIN_STMT
  _1 = (int) pullConfig;
  switch (_1) <default: <L5> [INV], case 0: <L1> [INV], case 1: <L2> [INV], case 2: <L0> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  _2 = (int) pin;
  _3 = base->MSCR[_2];
  _4 = ~pueVal;
  _5 = (int) pin;
  _6 = _3 & _4;
  base->MSCR[_5] = _6;
  # DEBUG BEGIN_STMT
  goto <bb 6>; [INV]

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  _7 = (int) pin;
  regVal = base->MSCR[_7];
  # DEBUG BEGIN_STMT
  regVal = regVal | pueVal;
  # DEBUG BEGIN_STMT
  _8 = ~pusVal;
  regVal = regVal & _8;
  # DEBUG BEGIN_STMT
  _9 = (int) pin;
  base->MSCR[_9] = regVal;
  # DEBUG BEGIN_STMT
  goto <bb 6>; [INV]

  <bb 5> :
<L2>:
  # DEBUG BEGIN_STMT
  _10 = (int) pin;
  regVal = base->MSCR[_10];
  # DEBUG BEGIN_STMT
  regVal = regVal | pueVal;
  # DEBUG BEGIN_STMT
  regVal = regVal | pusVal;
  # DEBUG BEGIN_STMT
  _11 = (int) pin;
  base->MSCR[_11] = regVal;
  # DEBUG BEGIN_STMT

  <bb 6> :
<L5>:
  return;

}


Siul2_Port_Ip_Init (uint32 pinCount, const struct Siul2_Port_Ip_PinSettingsConfig * config)
{
  uint32 i;
  Siul2_Port_Ip_PortStatusType D.4998;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pPort_Setting = config;
  # DEBUG BEGIN_STMT
  u32MaxPinConfigured = pinCount;
  # DEBUG BEGIN_STMT
  i = 0;
  goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = i * 64;
  _2 = config + _1;
  Siul2_Port_Ip_PinInit (_2);
  # DEBUG BEGIN_STMT
  i = i + 1;

  <bb 4> :
  # DEBUG BEGIN_STMT
  if (i < pinCount)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  D.4998 = 0;
  return D.4998;

}


Siul2_Port_Ip_SetGPDO (uint8 SiulInstance, uint16 GpdoInstance, uint8 value)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  if (value != 2)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = (int) SiulInstance;
  _2 = 1076428800;
  _3 = GpdoInstance ^ 3;
  _4 = (long unsigned int) _3;
  _5 = _2 + _4;
  _6 = _5 + 4864;
  _7 = (volatile uint8 *) _6;
  *_7 = value;

  <bb 4> :
  return;

}


Siul2_Port_Ip_SetIMCR (uint8 SiulInstance, uint16 ImcrInstance, uint32 value)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = (int) SiulInstance;
  _2 = 1076428800;
  _3 = (long unsigned int) ImcrInstance;
  _4 = _3 << 2;
  _5 = _2 + _4;
  _6 = _5 + 2624;
  _7 = (volatile uint32 *) _6;
  *_7 = value;
  return;

}


Siul2_Port_Ip_ReadMSCR (uint8 SiulInstance, uint16 MscrInstance)
{
  uint32 D.4994;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = (int) SiulInstance;
  _2 = 1076428800;
  _3 = (long unsigned int) MscrInstance;
  _4 = _3 << 2;
  _5 = _2 + _4;
  _6 = _5 + 576;
  _7 = (volatile uint32 *) _6;
  D.4994 = *_7;
  return D.4994;

}


Siul2_Port_Ip_SetMSCR (uint8 SiulInstance, uint16 MscrInstance, uint32 value)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = (int) SiulInstance;
  _2 = 1076428800;
  _3 = (long unsigned int) MscrInstance;
  _4 = _3 << 2;
  _5 = _2 + _4;
  _6 = _5 + 576;
  _7 = (volatile uint32 *) _6;
  *_7 = value;
  return;

}


Siul2_Port_Ip_GetMSCRConfiguration (struct Siul2_Port_Ip_PinSettingsConfig * config, const struct Siul2_Port_Ip_PortType * const base, uint16 pin)
{
  Siul2_Port_Ip_PortPullConfig pullValue;
  uint32 u32RegVal;

  <bb 2> :
  # DEBUG BEGIN_STMT
  u32RegVal = 4294967295;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = (int) pin;
  u32RegVal = base->MSCR[_1];
  # DEBUG BEGIN_STMT
  _2 = (unsigned char) u32RegVal;
  _3 = _2 & 7;
  config->mux = _3;
  # DEBUG BEGIN_STMT
  _4 = u32RegVal >> 5;
  _5 = _4 & 1;
  _6 = (<unnamed type>) _5;
  config->safeMode = _6;
  # DEBUG BEGIN_STMT
  _7 = u32RegVal & 8192;
  if (_7 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  pullValue = 2;
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _8 = u32RegVal >> 11;
  _9 = _8 & 1;
  pullValue = (Siul2_Port_Ip_PortPullConfig) _9;

  <bb 5> :
  # DEBUG BEGIN_STMT
  config->pullConfig = pullValue;
  # DEBUG BEGIN_STMT
  _10 = u32RegVal >> 14;
  _11 = _10 & 1;
  _12 = (<unnamed type>) _11;
  config->slewRateCtrlSel = _12;
  # DEBUG BEGIN_STMT
  _13 = u32RegVal >> 8;
  _14 = _13 & 1;
  _15 = (<unnamed type>) _14;
  config->driveStrength = _15;
  # DEBUG BEGIN_STMT
  _16 = u32RegVal >> 6;
  _17 = _16 & 1;
  _18 = (<unnamed type>) _17;
  config->inputFilter = _18;
  # DEBUG BEGIN_STMT
  _19 = u32RegVal >> 17;
  _20 = _19 & 1;
  _21 = (<unnamed type>) _20;
  config->invert = _21;
  # DEBUG BEGIN_STMT
  _22 = u32RegVal >> 16;
  _23 = _22 & 1;
  _24 = (<unnamed type>) _23;
  config->pullKeep = _24;
  # DEBUG BEGIN_STMT
  _25 = u32RegVal >> 19;
  _26 = _25 & 1;
  _27 = (<unnamed type>) _26;
  config->inputBuffer = _27;
  # DEBUG BEGIN_STMT
  _28 = u32RegVal >> 21;
  _29 = _28 & 1;
  _30 = (<unnamed type>) _29;
  config->outputBuffer = _30;
  return;

}


Siul2_Port_Ip_PinInit (const struct Siul2_Port_Ip_PinSettingsConfig * config)
{
  struct SIUL2_Type * imcrBase;
  uint8 siulInstance;
  uint32 imcrRegIdx;
  uint8 inputMuxIterator;
  uint32 pinsValues;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pinsValues = 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  siulInstance = 0;
  # DEBUG BEGIN_STMT
  imcrBase = 1076428800B;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = config->base;
  if (_1 == 1076428800B)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  siulInstance = 0;

  <bb 4> :
  # DEBUG BEGIN_STMT
  _2 = config->pullConfig;
  if (_2 != 2)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  pinsValues = pinsValues | 8192;
  # DEBUG BEGIN_STMT
  _3 = config->pullConfig;
  _4 = (long unsigned int) _3;
  _5 = _4 << 11;
  _6 = _5 & 2048;
  pinsValues = pinsValues | _6;

  <bb 6> :
  # DEBUG BEGIN_STMT
  _7 = config->outputBuffer;
  _8 = (long unsigned int) _7;
  _9 = _8 << 21;
  _10 = _9 & 2097152;
  pinsValues = pinsValues | _10;
  # DEBUG BEGIN_STMT
  _11 = config->invert;
  _12 = (long unsigned int) _11;
  _13 = _12 << 17;
  _14 = _13 & 131072;
  pinsValues = pinsValues | _14;
  # DEBUG BEGIN_STMT
  _15 = config->pullKeep;
  _16 = (long unsigned int) _15;
  _17 = _16 << 16;
  _18 = _17 & 65536;
  pinsValues = pinsValues | _18;
  # DEBUG BEGIN_STMT
  _19 = config->driveStrength;
  _20 = (long unsigned int) _19;
  _21 = _20 << 8;
  _22 = _21 & 256;
  pinsValues = pinsValues | _22;
  # DEBUG BEGIN_STMT
  _23 = config->inputBuffer;
  _24 = (long unsigned int) _23;
  _25 = _24 << 19;
  _26 = _25 & 524288;
  pinsValues = pinsValues | _26;
  # DEBUG BEGIN_STMT
  _27 = config->slewRateCtrlSel;
  _28 = (long unsigned int) _27;
  _29 = _28 << 14;
  _30 = _29 & 16384;
  pinsValues = pinsValues | _30;
  # DEBUG BEGIN_STMT
  _31 = config->safeMode;
  _32 = (long unsigned int) _31;
  _33 = _32 << 5;
  _34 = _33 & 32;
  pinsValues = pinsValues | _34;
  # DEBUG BEGIN_STMT
  _35 = config->mux;
  _36 = (long unsigned int) _35;
  _37 = _36 & 7;
  pinsValues = pinsValues | _37;
  # DEBUG BEGIN_STMT
  _38 = config->mux;
  if (_38 == 0)
    goto <bb 7>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 7> :
  _39 = config->outputBuffer;
  if (_39 == 1)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _40 = config->pinPortIdx;
  _41 = (short unsigned int) _40;
  _42 = config->initValue;
  Siul2_Port_Ip_SetGPDO (siulInstance, _41, _42);

  <bb 9> :
  # DEBUG BEGIN_STMT
  _43 = config->base;
  _44 = config->pinPortIdx;
  _43->MSCR[_44] = pinsValues;
  # DEBUG BEGIN_STMT
  _45 = config->inputBuffer;
  if (_45 == 1)
    goto <bb 10>; [INV]
  else
    goto <bb 17>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  inputMuxIterator = 0;
  goto <bb 16>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  _46 = (int) inputMuxIterator;
  _47 = config->inputMux[_46];
  if (_47 != 16)
    goto <bb 12>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  _48 = (int) inputMuxIterator;
  imcrRegIdx = config->inputMuxReg[_48];
  # DEBUG BEGIN_STMT
  if (imcrRegIdx <= 511)
    goto <bb 13>; [INV]
  else
    goto <bb 14>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  imcrBase = 1076428800B;

  <bb 14> :
  # DEBUG BEGIN_STMT
  _49 = (int) inputMuxIterator;
  _50 = config->inputMux[_49];
  _51 = (long unsigned int) _50;
  _52 = imcrRegIdx & 511;
  _53 = _51 & 15;
  imcrBase->IMCR[_52] = _53;

  <bb 15> :
  # DEBUG BEGIN_STMT
  inputMuxIterator.0_54 = inputMuxIterator;
  inputMuxIterator = inputMuxIterator.0_54 + 1;

  <bb 16> :
  # DEBUG BEGIN_STMT
  if (inputMuxIterator <= 7)
    goto <bb 11>; [INV]
  else
    goto <bb 17>; [INV]

  <bb 17> :
  return;

}


