/** 2821212894 **/
/***********************************************************************************
 ** Copyright (c) 2003 Cadence Design Systems, Inc. All rights reserved.          **
 **                                                                               **
 ** This work may not be copied, modified, re-published, uploaded, executed, or   **
 ** distributed in any way, in any medium, whether in whole or in part, without   **
 ** prior written permission from Cadence Design Systems, Inc.                    **
 **                                                                               **
 ** This file is automatically generated and will be overwritten. The interfaces  **
 ** used within this generated code are subject to change without notice.         **
 ***********************************************************************************/
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "acOpenDiff_inst_static.h"

static long   __BITWISE_LOGIC_OP_TEMP_VAR__;int acOpenDiff_DcFuncDerLoad(int anal_mode, char* instData, char* modelData, char** stringList) {

int __msgSeverity__ = 0;
double	__tmpStkVar_3 = 0.0;
double	__tmpStkVar_2 = 0.0;
double	__tmpStkVar_1 = 0.0;


/*  Pre-Anal Load Code. */_CurrState_Addr_272 = (long) 2;
_CurrState_Addr_328 = (long) 2;
_CurrState_Addr_384 = (long) 2;
memcpy ((void *) (instData + 88), (void *) (instData + 104), 16);
memcpy ((void *) (instData + 128), (void *) (instData + 144), 16);
_Static_BrAddr_256 = 0.0;
_Static_d_by_dv_inn_inp_168 = 0.0;
(*((double *) (instData + 280))) = 0.0;
_Static_BrAddr_312 = 0.0;
_Static_d_by_dv_inn_inref_184 = 0.0;
_Static_d_by_dv_inp_inref_200 = 0.0;
(*((double *) (instData + 336))) = 0.0;
_Static_BrAddr_368 = 0.0;
_Static_d_by_dv_inn_inref_216 = 0.0;
_Static_d_by_dv_inp_inref_232 = 0.0;
(*((double *) (instData + 392))) = 0.0;

/*  C Code Every Code. */{ahdlDoSetLineNum ((long) 13);ahdlDoSetLineNum ((long) 13);if (ahdlIsInitialStep (0x0, 0x29)){{ahdlDoSetLineNum ((long) 14);ahdlDoSetLineNum ((long) 14);{double __tempValueResultStatic;double __tempValueResultDynamic;
__tempValueResultStatic = ((((_gain_64) * ((getAcrossSolution2(_inn_20, _inp_12))))));__tmpStkVar_1 = (_gain_64);(_vin_88) = __tempValueResultStatic;}ahdlDoSetLineNum ((long) 15);{double __tempValueResultStatic;double __tempValueResultDynamic;
__tempValueResultStatic = ((__FLOAT_DIV((((((getAcrossSolution2(_inp_12, _inref_28))) + ((getAcrossSolution2(_inn_20, _inref_28)))))), __INT_TO_DBL((2L)))));__tmpStkVar_3 = ((__FLOAT_DIV(((1.00000000000000000000e+00)), __INT_TO_DBL((2L)))));__tmpStkVar_2 = ((__FLOAT_DIV(((1.00000000000000000000e+00)), __INT_TO_DBL((2L)))));(_vbias_128) = __tempValueResultStatic;}}}if (ahdlIsAnalysisType (0x11, 0x0)){{ahdlDoSetLineNum ((long) 18);ahdlDoSetLineNum ((long) 18);(_Static_BrAddr_256) += (_vin_88);_CurrState_Addr_272 = (long) AHDL_VAL_STATE_VAL;
_Static_d_by_dv_inn_inp_168 += (__tmpStkVar_1);ahdlDoSetLineNum ((long) 19);(_Static_BrAddr_312) += (_vbias_128);_CurrState_Addr_328 = (long) AHDL_VAL_STATE_VAL;
_Static_d_by_dv_inn_inref_184 += (__tmpStkVar_2);_Static_d_by_dv_inp_inref_200 += (__tmpStkVar_3);ahdlDoSetLineNum ((long) 20);(_Static_BrAddr_368) += (_vbias_128);_CurrState_Addr_384 = (long) AHDL_VAL_STATE_VAL;
_Static_d_by_dv_inn_inref_216 += (__tmpStkVar_2);_Static_d_by_dv_inp_inref_232 += (__tmpStkVar_3);}}else{if (ahdlIsAnalysisType (0x40000, 0x29)){{ahdlDoSetLineNum ((long) 23);ahdlDoSetLineNum ((long) 23);(_Static_BrAddr_256) += ((((_gain_64)) * (((-(getAcrossSolution2(_inn_20, _inp_12)))))));_CurrState_Addr_272 = (long) AHDL_VAL_STATE_VAL;
_Static_d_by_dv_inn_inp_168 += (((((_gain_64))) * ((((-(1.00000000000000000000e+00)))))));ahdlDoSetLineNum ((long) 24);(_Static_BrAddr_312) += (__FLOAT_DIV((((((getAcrossSolution2(_inp_12, _inref_28))) + ((getAcrossSolution2(_inn_20, _inref_28)))))), __INT_TO_DBL((2L))));_CurrState_Addr_328 = (long) AHDL_VAL_STATE_VAL;
_Static_d_by_dv_inn_inref_184 += ((__FLOAT_DIV(((1.00000000000000000000e+00)), __INT_TO_DBL((2L)))));_Static_d_by_dv_inp_inref_200 += ((__FLOAT_DIV(((1.00000000000000000000e+00)), __INT_TO_DBL((2L)))));ahdlDoSetLineNum ((long) 25);(_Static_BrAddr_368) += (__FLOAT_DIV((((((getAcrossSolution2(_inp_12, _inref_28))) + ((getAcrossSolution2(_inn_20, _inref_28)))))), __INT_TO_DBL((2L))));_CurrState_Addr_384 = (long) AHDL_VAL_STATE_VAL;
_Static_d_by_dv_inn_inref_216 += ((__FLOAT_DIV(((1.00000000000000000000e+00)), __INT_TO_DBL((2L)))));_Static_d_by_dv_inp_inref_232 += ((__FLOAT_DIV(((1.00000000000000000000e+00)), __INT_TO_DBL((2L)))));}}else{{ahdlDoSetLineNum ((long) 28);ahdlDoSetLineNum ((long) 28);(_Static_BrAddr_312) += (getAcrossSolution2(_inp_12, _inref_28));_CurrState_Addr_328 = (long) AHDL_VAL_STATE_VAL;
_Static_d_by_dv_inp_inref_200 += ((1.00000000000000000000e+00));ahdlDoSetLineNum ((long) 29);(_Static_BrAddr_368) += (getAcrossSolution2(_inn_20, _inref_28));_CurrState_Addr_384 = (long) AHDL_VAL_STATE_VAL;
_Static_d_by_dv_inn_inref_216 += ((1.00000000000000000000e+00));ahdlDoSetLineNum ((long) 30);(_Static_BrAddr_256) += __INT_TO_DBL ((0L));_CurrState_Addr_272 = (long) AHDL_VAL_STATE_VAL;
}}}}ahdlDoSetLineNum ((long) 32);   if (_CurrState_Addr_272 != AHDL_VAL_STATE_VAL)   {         ahdlInterAddStaticElement(*(void**)(instData + 248), 1.0);      if (ahdlWhatsNeeded IS devStaticFuncNeeded) {
         double __value__ = -ahdlSolution[(int) _vos_flow_240];
         ahdlStaticRHS[_vos_flow_240] += __value__;         ahdlStaticRHS_AbsSum[_vos_flow_240] += ABS(__value__);      }   }   else   {      ahdlInterSetAcrossQuan(         *(void **)(instData + 244),
         _vos_52,         *(long*)(instData + 0),         _vos_flow_240,         _Static_BrAddr_256,         1.0      );
   }   if (_CurrState_Addr_272 == AHDL_VAL_STATE_VAL)   {      /* do positive component */      ahdlInterAddStaticElement(*(void**)(instData + 164), _Static_d_by_dv_inn_inp_168);
      /* do negative component */      ahdlInterAddStaticElement(*(void**)(instData + 160), -_Static_d_by_dv_inn_inp_168);
   }
   if (ahdlWhatsNeeded IS devStaticFuncNeeded) {
      ahdlStaticRHS[_vos_52] -= *(double*)(instData + 280);
      ahdlStaticRHS[*(long*)(instData + 0)] += *(double*)(instData + 280);
      ahdlStaticRHS_AbsSum[_vos_52] += ABS(*(double*)(instData + 280));
      ahdlStaticRHS_AbsSum[*(long*)(instData + 0)] += ABS(*(double*)(instData + 280));
   }

   if (_CurrState_Addr_328 != AHDL_VAL_STATE_VAL)   {         ahdlInterAddStaticElement(*(void**)(instData + 304), 1.0);      if (ahdlWhatsNeeded IS devStaticFuncNeeded) {
         double __value__ = -ahdlSolution[(int) _outp_inref_flow_296];
         ahdlStaticRHS[_outp_inref_flow_296] += __value__;         ahdlStaticRHS_AbsSum[_outp_inref_flow_296] += ABS(__value__);      }   }   else   {      ahdlInterSetAcrossQuan(         *(void **)(instData + 300),
         _outp_36,         _inref_28,         _outp_inref_flow_296,         _Static_BrAddr_312,         1.0      );
   }   if (_CurrState_Addr_328 == AHDL_VAL_STATE_VAL)   {      /* do positive component */      ahdlInterAddStaticElement(*(void**)(instData + 180), _Static_d_by_dv_inn_inref_184);
      /* do negative component */      ahdlInterAddStaticElement(*(void**)(instData + 176), -_Static_d_by_dv_inn_inref_184);
   }
   if (_CurrState_Addr_328 == AHDL_VAL_STATE_VAL)   {      /* do positive component */      ahdlInterAddStaticElement(*(void**)(instData + 196), _Static_d_by_dv_inp_inref_200);
      /* do negative component */      ahdlInterAddStaticElement(*(void**)(instData + 192), -_Static_d_by_dv_inp_inref_200);
   }
   if (ahdlWhatsNeeded IS devStaticFuncNeeded) {
      ahdlStaticRHS[_outp_36] -= *(double*)(instData + 336);
      ahdlStaticRHS[_inref_28] += *(double*)(instData + 336);
      ahdlStaticRHS_AbsSum[_outp_36] += ABS(*(double*)(instData + 336));
      ahdlStaticRHS_AbsSum[_inref_28] += ABS(*(double*)(instData + 336));
   }

   if (_CurrState_Addr_384 != AHDL_VAL_STATE_VAL)   {         ahdlInterAddStaticElement(*(void**)(instData + 360), 1.0);      if (ahdlWhatsNeeded IS devStaticFuncNeeded) {
         double __value__ = -ahdlSolution[(int) _outn_inref_flow_352];
         ahdlStaticRHS[_outn_inref_flow_352] += __value__;         ahdlStaticRHS_AbsSum[_outn_inref_flow_352] += ABS(__value__);      }   }   else   {      ahdlInterSetAcrossQuan(         *(void **)(instData + 356),
         _outn_44,         _inref_28,         _outn_inref_flow_352,         _Static_BrAddr_368,         1.0      );
   }   if (_CurrState_Addr_384 == AHDL_VAL_STATE_VAL)   {      /* do positive component */      ahdlInterAddStaticElement(*(void**)(instData + 212), _Static_d_by_dv_inn_inref_216);
      /* do negative component */      ahdlInterAddStaticElement(*(void**)(instData + 208), -_Static_d_by_dv_inn_inref_216);
   }
   if (_CurrState_Addr_384 == AHDL_VAL_STATE_VAL)   {      /* do positive component */      ahdlInterAddStaticElement(*(void**)(instData + 228), _Static_d_by_dv_inp_inref_232);
      /* do negative component */      ahdlInterAddStaticElement(*(void**)(instData + 224), -_Static_d_by_dv_inp_inref_232);
   }
   if (ahdlWhatsNeeded IS devStaticFuncNeeded) {
      ahdlStaticRHS[_outn_44] -= *(double*)(instData + 392);
      ahdlStaticRHS[_inref_28] += *(double*)(instData + 392);
      ahdlStaticRHS_AbsSum[_outn_44] += ABS(*(double*)(instData + 392));
      ahdlStaticRHS_AbsSum[_inref_28] += ABS(*(double*)(instData + 392));
   }

   if (_CurrState_Addr_272 != _LastState_Addr_276)   {      ahdlInterNeedsOrdering ();   }   _LastState_Addr_276 = _CurrState_Addr_272;   if (_CurrState_Addr_328 != _LastState_Addr_332)   {      ahdlInterNeedsOrdering ();   }   _LastState_Addr_332 = _CurrState_Addr_328;   if (_CurrState_Addr_384 != _LastState_Addr_388)   {      ahdlInterNeedsOrdering ();   }   _LastState_Addr_388 = _CurrState_Addr_384;    return __msgSeverity__;
} /** end of acOpenDiff_DcFuncDerLoad **/

int acOpenDiff_DcFuncLoad(int anal_mode, char* instData, char* modelData, char** stringList) {

int __msgSeverity__ = 0;
double	__tmpStkVar_3 = 0.0;
double	__tmpStkVar_2 = 0.0;
double	__tmpStkVar_1 = 0.0;


/*  Pre-Anal Load Code. */_CurrState_Addr_272 = (long) 2;
_CurrState_Addr_328 = (long) 2;
_CurrState_Addr_384 = (long) 2;
memcpy ((void *) (instData + 88), (void *) (instData + 104), 16);
memcpy ((void *) (instData + 128), (void *) (instData + 144), 16);
_Static_BrAddr_256 = 0.0;
_Static_d_by_dv_inn_inp_168 = 0.0;
(*((double *) (instData + 280))) = 0.0;
_Static_BrAddr_312 = 0.0;
_Static_d_by_dv_inn_inref_184 = 0.0;
_Static_d_by_dv_inp_inref_200 = 0.0;
(*((double *) (instData + 336))) = 0.0;
_Static_BrAddr_368 = 0.0;
_Static_d_by_dv_inn_inref_216 = 0.0;
_Static_d_by_dv_inp_inref_232 = 0.0;
(*((double *) (instData + 392))) = 0.0;

/*  C Code Every Code. */{ahdlDoSetLineNum ((long) 13);ahdlDoSetLineNum ((long) 13);if (ahdlIsInitialStep (0x0, 0x29)){{ahdlDoSetLineNum ((long) 14);ahdlDoSetLineNum ((long) 14);(_vin_88) = ((((_gain_64) * ((getAcrossSolution2(_inn_20, _inp_12))))));ahdlDoSetLineNum ((long) 15);(_vbias_128) = ((__FLOAT_DIV((((((getAcrossSolution2(_inp_12, _inref_28))) + ((getAcrossSolution2(_inn_20, _inref_28)))))), __INT_TO_DBL((2L)))));}}if (ahdlIsAnalysisType (0x11, 0x0)){{ahdlDoSetLineNum ((long) 18);ahdlDoSetLineNum ((long) 18);(_Static_BrAddr_256) += (_vin_88);_CurrState_Addr_272 = (long) AHDL_VAL_STATE_VAL;
ahdlDoSetLineNum ((long) 19);(_Static_BrAddr_312) += (_vbias_128);_CurrState_Addr_328 = (long) AHDL_VAL_STATE_VAL;
ahdlDoSetLineNum ((long) 20);(_Static_BrAddr_368) += (_vbias_128);_CurrState_Addr_384 = (long) AHDL_VAL_STATE_VAL;
}}else{if (ahdlIsAnalysisType (0x40000, 0x29)){{ahdlDoSetLineNum ((long) 23);ahdlDoSetLineNum ((long) 23);(_Static_BrAddr_256) += ((((_gain_64)) * (((-(getAcrossSolution2(_inn_20, _inp_12)))))));_CurrState_Addr_272 = (long) AHDL_VAL_STATE_VAL;
ahdlDoSetLineNum ((long) 24);(_Static_BrAddr_312) += (__FLOAT_DIV((((((getAcrossSolution2(_inp_12, _inref_28))) + ((getAcrossSolution2(_inn_20, _inref_28)))))), __INT_TO_DBL((2L))));_CurrState_Addr_328 = (long) AHDL_VAL_STATE_VAL;
ahdlDoSetLineNum ((long) 25);(_Static_BrAddr_368) += (__FLOAT_DIV((((((getAcrossSolution2(_inp_12, _inref_28))) + ((getAcrossSolution2(_inn_20, _inref_28)))))), __INT_TO_DBL((2L))));_CurrState_Addr_384 = (long) AHDL_VAL_STATE_VAL;
}}else{{ahdlDoSetLineNum ((long) 28);ahdlDoSetLineNum ((long) 28);(_Static_BrAddr_312) += (getAcrossSolution2(_inp_12, _inref_28));_CurrState_Addr_328 = (long) AHDL_VAL_STATE_VAL;
ahdlDoSetLineNum ((long) 29);(_Static_BrAddr_368) += (getAcrossSolution2(_inn_20, _inref_28));_CurrState_Addr_384 = (long) AHDL_VAL_STATE_VAL;
ahdlDoSetLineNum ((long) 30);(_Static_BrAddr_256) += __INT_TO_DBL ((0L));_CurrState_Addr_272 = (long) AHDL_VAL_STATE_VAL;
}}}}ahdlDoSetLineNum ((long) 32);   if (_CurrState_Addr_272 != AHDL_VAL_STATE_VAL)   {         ahdlInterAddStaticElement(*(void**)(instData + 248), 1.0);      if (ahdlWhatsNeeded IS devStaticFuncNeeded) {
         double __value__ = -ahdlSolution[(int) _vos_flow_240];
         ahdlStaticRHS[_vos_flow_240] += __value__;         ahdlStaticRHS_AbsSum[_vos_flow_240] += ABS(__value__);      }   }   else   {      ahdlInterSetAcrossQuan(         *(void **)(instData + 244),
         _vos_52,         *(long*)(instData + 0),         _vos_flow_240,         _Static_BrAddr_256,         1.0      );
   }   if (ahdlWhatsNeeded IS devStaticFuncNeeded) {
      ahdlStaticRHS[_vos_52] -= *(double*)(instData + 280);
      ahdlStaticRHS[*(long*)(instData + 0)] += *(double*)(instData + 280);
      ahdlStaticRHS_AbsSum[_vos_52] += ABS(*(double*)(instData + 280));
      ahdlStaticRHS_AbsSum[*(long*)(instData + 0)] += ABS(*(double*)(instData + 280));
   }

   if (_CurrState_Addr_328 != AHDL_VAL_STATE_VAL)   {         ahdlInterAddStaticElement(*(void**)(instData + 304), 1.0);      if (ahdlWhatsNeeded IS devStaticFuncNeeded) {
         double __value__ = -ahdlSolution[(int) _outp_inref_flow_296];
         ahdlStaticRHS[_outp_inref_flow_296] += __value__;         ahdlStaticRHS_AbsSum[_outp_inref_flow_296] += ABS(__value__);      }   }   else   {      ahdlInterSetAcrossQuan(         *(void **)(instData + 300),
         _outp_36,         _inref_28,         _outp_inref_flow_296,         _Static_BrAddr_312,         1.0      );
   }   if (ahdlWhatsNeeded IS devStaticFuncNeeded) {
      ahdlStaticRHS[_outp_36] -= *(double*)(instData + 336);
      ahdlStaticRHS[_inref_28] += *(double*)(instData + 336);
      ahdlStaticRHS_AbsSum[_outp_36] += ABS(*(double*)(instData + 336));
      ahdlStaticRHS_AbsSum[_inref_28] += ABS(*(double*)(instData + 336));
   }

   if (_CurrState_Addr_384 != AHDL_VAL_STATE_VAL)   {         ahdlInterAddStaticElement(*(void**)(instData + 360), 1.0);      if (ahdlWhatsNeeded IS devStaticFuncNeeded) {
         double __value__ = -ahdlSolution[(int) _outn_inref_flow_352];
         ahdlStaticRHS[_outn_inref_flow_352] += __value__;         ahdlStaticRHS_AbsSum[_outn_inref_flow_352] += ABS(__value__);      }   }   else   {      ahdlInterSetAcrossQuan(         *(void **)(instData + 356),
         _outn_44,         _inref_28,         _outn_inref_flow_352,         _Static_BrAddr_368,         1.0      );
   }   if (ahdlWhatsNeeded IS devStaticFuncNeeded) {
      ahdlStaticRHS[_outn_44] -= *(double*)(instData + 392);
      ahdlStaticRHS[_inref_28] += *(double*)(instData + 392);
      ahdlStaticRHS_AbsSum[_outn_44] += ABS(*(double*)(instData + 392));
      ahdlStaticRHS_AbsSum[_inref_28] += ABS(*(double*)(instData + 392));
   }

   if (_CurrState_Addr_272 != _LastState_Addr_276)   {      ahdlInterNeedsOrdering ();   }   _LastState_Addr_276 = _CurrState_Addr_272;   if (_CurrState_Addr_328 != _LastState_Addr_332)   {      ahdlInterNeedsOrdering ();   }   _LastState_Addr_332 = _CurrState_Addr_328;   if (_CurrState_Addr_384 != _LastState_Addr_388)   {      ahdlInterNeedsOrdering ();   }   _LastState_Addr_388 = _CurrState_Addr_384;    return __msgSeverity__;
} /** end of acOpenDiff_DcFuncLoad **/

int acOpenDiff_TranFuncDerLoad(int anal_mode, char* instData, char* modelData, char** stringList) {

int __msgSeverity__ = 0;
double	__tmpStkVar_3 = 0.0;
double	__tmpStkVar_2 = 0.0;
double	__tmpStkVar_1 = 0.0;


/*  Pre-Anal Load Code. */_CurrState_Addr_272 = (long) 2;
_CurrState_Addr_328 = (long) 2;
_CurrState_Addr_384 = (long) 2;
memcpy ((void *) (instData + 88), (void *) (instData + 104), 16);
memcpy ((void *) (instData + 128), (void *) (instData + 144), 16);
_Static_BrAddr_256 = 0.0;
_Static_d_by_dv_inn_inp_168 = 0.0;
(*((double *) (instData + 280))) = 0.0;
_Static_BrAddr_312 = 0.0;
_Static_d_by_dv_inn_inref_184 = 0.0;
_Static_d_by_dv_inp_inref_200 = 0.0;
(*((double *) (instData + 336))) = 0.0;
_Static_BrAddr_368 = 0.0;
_Static_d_by_dv_inn_inref_216 = 0.0;
_Static_d_by_dv_inp_inref_232 = 0.0;
(*((double *) (instData + 392))) = 0.0;

/*  C Code Every Code. */{ahdlDoSetLineNum ((long) 13);ahdlDoSetLineNum ((long) 13);if (ahdlIsInitialStep (0x0, 0x29)){{ahdlDoSetLineNum ((long) 14);ahdlDoSetLineNum ((long) 14);{double __tempValueResultStatic;double __tempValueResultDynamic;
__tempValueResultStatic = ((((_gain_64) * ((getAcrossSolution2(_inn_20, _inp_12))))));__tmpStkVar_1 = (_gain_64);(_vin_88) = __tempValueResultStatic;}ahdlDoSetLineNum ((long) 15);{double __tempValueResultStatic;double __tempValueResultDynamic;
__tempValueResultStatic = ((__FLOAT_DIV((((((getAcrossSolution2(_inp_12, _inref_28))) + ((getAcrossSolution2(_inn_20, _inref_28)))))), __INT_TO_DBL((2L)))));__tmpStkVar_3 = ((__FLOAT_DIV(((1.00000000000000000000e+00)), __INT_TO_DBL((2L)))));__tmpStkVar_2 = ((__FLOAT_DIV(((1.00000000000000000000e+00)), __INT_TO_DBL((2L)))));(_vbias_128) = __tempValueResultStatic;}}}if (ahdlIsAnalysisType (0x11, 0x0)){{ahdlDoSetLineNum ((long) 18);ahdlDoSetLineNum ((long) 18);(_Static_BrAddr_256) += (_vin_88);_CurrState_Addr_272 = (long) AHDL_VAL_STATE_VAL;
_Static_d_by_dv_inn_inp_168 += (__tmpStkVar_1);ahdlDoSetLineNum ((long) 19);(_Static_BrAddr_312) += (_vbias_128);_CurrState_Addr_328 = (long) AHDL_VAL_STATE_VAL;
_Static_d_by_dv_inn_inref_184 += (__tmpStkVar_2);_Static_d_by_dv_inp_inref_200 += (__tmpStkVar_3);ahdlDoSetLineNum ((long) 20);(_Static_BrAddr_368) += (_vbias_128);_CurrState_Addr_384 = (long) AHDL_VAL_STATE_VAL;
_Static_d_by_dv_inn_inref_216 += (__tmpStkVar_2);_Static_d_by_dv_inp_inref_232 += (__tmpStkVar_3);}}else{if (ahdlIsAnalysisType (0x40000, 0x29)){{ahdlDoSetLineNum ((long) 23);ahdlDoSetLineNum ((long) 23);(_Static_BrAddr_256) += ((((_gain_64)) * (((-(getAcrossSolution2(_inn_20, _inp_12)))))));_CurrState_Addr_272 = (long) AHDL_VAL_STATE_VAL;
_Static_d_by_dv_inn_inp_168 += (((((_gain_64))) * ((((-(1.00000000000000000000e+00)))))));ahdlDoSetLineNum ((long) 24);(_Static_BrAddr_312) += (__FLOAT_DIV((((((getAcrossSolution2(_inp_12, _inref_28))) + ((getAcrossSolution2(_inn_20, _inref_28)))))), __INT_TO_DBL((2L))));_CurrState_Addr_328 = (long) AHDL_VAL_STATE_VAL;
_Static_d_by_dv_inn_inref_184 += ((__FLOAT_DIV(((1.00000000000000000000e+00)), __INT_TO_DBL((2L)))));_Static_d_by_dv_inp_inref_200 += ((__FLOAT_DIV(((1.00000000000000000000e+00)), __INT_TO_DBL((2L)))));ahdlDoSetLineNum ((long) 25);(_Static_BrAddr_368) += (__FLOAT_DIV((((((getAcrossSolution2(_inp_12, _inref_28))) + ((getAcrossSolution2(_inn_20, _inref_28)))))), __INT_TO_DBL((2L))));_CurrState_Addr_384 = (long) AHDL_VAL_STATE_VAL;
_Static_d_by_dv_inn_inref_216 += ((__FLOAT_DIV(((1.00000000000000000000e+00)), __INT_TO_DBL((2L)))));_Static_d_by_dv_inp_inref_232 += ((__FLOAT_DIV(((1.00000000000000000000e+00)), __INT_TO_DBL((2L)))));}}else{{ahdlDoSetLineNum ((long) 28);ahdlDoSetLineNum ((long) 28);(_Static_BrAddr_312) += (getAcrossSolution2(_inp_12, _inref_28));_CurrState_Addr_328 = (long) AHDL_VAL_STATE_VAL;
_Static_d_by_dv_inp_inref_200 += ((1.00000000000000000000e+00));ahdlDoSetLineNum ((long) 29);(_Static_BrAddr_368) += (getAcrossSolution2(_inn_20, _inref_28));_CurrState_Addr_384 = (long) AHDL_VAL_STATE_VAL;
_Static_d_by_dv_inn_inref_216 += ((1.00000000000000000000e+00));ahdlDoSetLineNum ((long) 30);(_Static_BrAddr_256) += __INT_TO_DBL ((0L));_CurrState_Addr_272 = (long) AHDL_VAL_STATE_VAL;
}}}}ahdlDoSetLineNum ((long) 32);   if (_CurrState_Addr_272 != AHDL_VAL_STATE_VAL)   {         ahdlInterAddStaticElement(*(void**)(instData + 248), 1.0);      if (ahdlWhatsNeeded IS devStaticFuncNeeded) {
         double __value__ = -ahdlSolution[(int) _vos_flow_240];
         ahdlStaticRHS[_vos_flow_240] += __value__;         ahdlStaticRHS_AbsSum[_vos_flow_240] += ABS(__value__);      }   }   else   {      ahdlInterSetAcrossQuan(         *(void **)(instData + 244),
         _vos_52,         *(long*)(instData + 0),         _vos_flow_240,         _Static_BrAddr_256,         1.0      );
   }   if (_CurrState_Addr_272 == AHDL_VAL_STATE_VAL)   {      /* do positive component */      ahdlInterAddStaticElement(*(void**)(instData + 164), _Static_d_by_dv_inn_inp_168);
      /* do negative component */      ahdlInterAddStaticElement(*(void**)(instData + 160), -_Static_d_by_dv_inn_inp_168);
   }
   if (ahdlWhatsNeeded IS devStaticFuncNeeded) {
      ahdlStaticRHS[_vos_52] -= *(double*)(instData + 280);
      ahdlStaticRHS[*(long*)(instData + 0)] += *(double*)(instData + 280);
      ahdlStaticRHS_AbsSum[_vos_52] += ABS(*(double*)(instData + 280));
      ahdlStaticRHS_AbsSum[*(long*)(instData + 0)] += ABS(*(double*)(instData + 280));
   }

   if (_CurrState_Addr_328 != AHDL_VAL_STATE_VAL)   {         ahdlInterAddStaticElement(*(void**)(instData + 304), 1.0);      if (ahdlWhatsNeeded IS devStaticFuncNeeded) {
         double __value__ = -ahdlSolution[(int) _outp_inref_flow_296];
         ahdlStaticRHS[_outp_inref_flow_296] += __value__;         ahdlStaticRHS_AbsSum[_outp_inref_flow_296] += ABS(__value__);      }   }   else   {      ahdlInterSetAcrossQuan(         *(void **)(instData + 300),
         _outp_36,         _inref_28,         _outp_inref_flow_296,         _Static_BrAddr_312,         1.0      );
   }   if (_CurrState_Addr_328 == AHDL_VAL_STATE_VAL)   {      /* do positive component */      ahdlInterAddStaticElement(*(void**)(instData + 180), _Static_d_by_dv_inn_inref_184);
      /* do negative component */      ahdlInterAddStaticElement(*(void**)(instData + 176), -_Static_d_by_dv_inn_inref_184);
   }
   if (_CurrState_Addr_328 == AHDL_VAL_STATE_VAL)   {      /* do positive component */      ahdlInterAddStaticElement(*(void**)(instData + 196), _Static_d_by_dv_inp_inref_200);
      /* do negative component */      ahdlInterAddStaticElement(*(void**)(instData + 192), -_Static_d_by_dv_inp_inref_200);
   }
   if (ahdlWhatsNeeded IS devStaticFuncNeeded) {
      ahdlStaticRHS[_outp_36] -= *(double*)(instData + 336);
      ahdlStaticRHS[_inref_28] += *(double*)(instData + 336);
      ahdlStaticRHS_AbsSum[_outp_36] += ABS(*(double*)(instData + 336));
      ahdlStaticRHS_AbsSum[_inref_28] += ABS(*(double*)(instData + 336));
   }

   if (_CurrState_Addr_384 != AHDL_VAL_STATE_VAL)   {         ahdlInterAddStaticElement(*(void**)(instData + 360), 1.0);      if (ahdlWhatsNeeded IS devStaticFuncNeeded) {
         double __value__ = -ahdlSolution[(int) _outn_inref_flow_352];
         ahdlStaticRHS[_outn_inref_flow_352] += __value__;         ahdlStaticRHS_AbsSum[_outn_inref_flow_352] += ABS(__value__);      }   }   else   {      ahdlInterSetAcrossQuan(         *(void **)(instData + 356),
         _outn_44,         _inref_28,         _outn_inref_flow_352,         _Static_BrAddr_368,         1.0      );
   }   if (_CurrState_Addr_384 == AHDL_VAL_STATE_VAL)   {      /* do positive component */      ahdlInterAddStaticElement(*(void**)(instData + 212), _Static_d_by_dv_inn_inref_216);
      /* do negative component */      ahdlInterAddStaticElement(*(void**)(instData + 208), -_Static_d_by_dv_inn_inref_216);
   }
   if (_CurrState_Addr_384 == AHDL_VAL_STATE_VAL)   {      /* do positive component */      ahdlInterAddStaticElement(*(void**)(instData + 228), _Static_d_by_dv_inp_inref_232);
      /* do negative component */      ahdlInterAddStaticElement(*(void**)(instData + 224), -_Static_d_by_dv_inp_inref_232);
   }
   if (ahdlWhatsNeeded IS devStaticFuncNeeded) {
      ahdlStaticRHS[_outn_44] -= *(double*)(instData + 392);
      ahdlStaticRHS[_inref_28] += *(double*)(instData + 392);
      ahdlStaticRHS_AbsSum[_outn_44] += ABS(*(double*)(instData + 392));
      ahdlStaticRHS_AbsSum[_inref_28] += ABS(*(double*)(instData + 392));
   }

   if (_CurrState_Addr_272 != _LastState_Addr_276)   {      ahdlInterNeedsOrdering ();   }   _LastState_Addr_276 = _CurrState_Addr_272;   if (_CurrState_Addr_328 != _LastState_Addr_332)   {      ahdlInterNeedsOrdering ();   }   _LastState_Addr_332 = _CurrState_Addr_328;   if (_CurrState_Addr_384 != _LastState_Addr_388)   {      ahdlInterNeedsOrdering ();   }   _LastState_Addr_388 = _CurrState_Addr_384;    return __msgSeverity__;
} /** end of acOpenDiff_TranFuncDerLoad **/

int acOpenDiff_TranFuncLoad(int anal_mode, char* instData, char* modelData, char** stringList) {

int __msgSeverity__ = 0;
double	__tmpStkVar_3 = 0.0;
double	__tmpStkVar_2 = 0.0;
double	__tmpStkVar_1 = 0.0;


/*  Pre-Anal Load Code. */_CurrState_Addr_272 = (long) 2;
_CurrState_Addr_328 = (long) 2;
_CurrState_Addr_384 = (long) 2;
memcpy ((void *) (instData + 88), (void *) (instData + 104), 16);
memcpy ((void *) (instData + 128), (void *) (instData + 144), 16);
_Static_BrAddr_256 = 0.0;
_Static_d_by_dv_inn_inp_168 = 0.0;
(*((double *) (instData + 280))) = 0.0;
_Static_BrAddr_312 = 0.0;
_Static_d_by_dv_inn_inref_184 = 0.0;
_Static_d_by_dv_inp_inref_200 = 0.0;
(*((double *) (instData + 336))) = 0.0;
_Static_BrAddr_368 = 0.0;
_Static_d_by_dv_inn_inref_216 = 0.0;
_Static_d_by_dv_inp_inref_232 = 0.0;
(*((double *) (instData + 392))) = 0.0;

/*  C Code Every Code. */{ahdlDoSetLineNum ((long) 13);ahdlDoSetLineNum ((long) 13);if (ahdlIsInitialStep (0x0, 0x29)){{ahdlDoSetLineNum ((long) 14);ahdlDoSetLineNum ((long) 14);(_vin_88) = ((((_gain_64) * ((getAcrossSolution2(_inn_20, _inp_12))))));ahdlDoSetLineNum ((long) 15);(_vbias_128) = ((__FLOAT_DIV((((((getAcrossSolution2(_inp_12, _inref_28))) + ((getAcrossSolution2(_inn_20, _inref_28)))))), __INT_TO_DBL((2L)))));}}if (ahdlIsAnalysisType (0x11, 0x0)){{ahdlDoSetLineNum ((long) 18);ahdlDoSetLineNum ((long) 18);(_Static_BrAddr_256) += (_vin_88);_CurrState_Addr_272 = (long) AHDL_VAL_STATE_VAL;
ahdlDoSetLineNum ((long) 19);(_Static_BrAddr_312) += (_vbias_128);_CurrState_Addr_328 = (long) AHDL_VAL_STATE_VAL;
ahdlDoSetLineNum ((long) 20);(_Static_BrAddr_368) += (_vbias_128);_CurrState_Addr_384 = (long) AHDL_VAL_STATE_VAL;
}}else{if (ahdlIsAnalysisType (0x40000, 0x29)){{ahdlDoSetLineNum ((long) 23);ahdlDoSetLineNum ((long) 23);(_Static_BrAddr_256) += ((((_gain_64)) * (((-(getAcrossSolution2(_inn_20, _inp_12)))))));_CurrState_Addr_272 = (long) AHDL_VAL_STATE_VAL;
ahdlDoSetLineNum ((long) 24);(_Static_BrAddr_312) += (__FLOAT_DIV((((((getAcrossSolution2(_inp_12, _inref_28))) + ((getAcrossSolution2(_inn_20, _inref_28)))))), __INT_TO_DBL((2L))));_CurrState_Addr_328 = (long) AHDL_VAL_STATE_VAL;
ahdlDoSetLineNum ((long) 25);(_Static_BrAddr_368) += (__FLOAT_DIV((((((getAcrossSolution2(_inp_12, _inref_28))) + ((getAcrossSolution2(_inn_20, _inref_28)))))), __INT_TO_DBL((2L))));_CurrState_Addr_384 = (long) AHDL_VAL_STATE_VAL;
}}else{{ahdlDoSetLineNum ((long) 28);ahdlDoSetLineNum ((long) 28);(_Static_BrAddr_312) += (getAcrossSolution2(_inp_12, _inref_28));_CurrState_Addr_328 = (long) AHDL_VAL_STATE_VAL;
ahdlDoSetLineNum ((long) 29);(_Static_BrAddr_368) += (getAcrossSolution2(_inn_20, _inref_28));_CurrState_Addr_384 = (long) AHDL_VAL_STATE_VAL;
ahdlDoSetLineNum ((long) 30);(_Static_BrAddr_256) += __INT_TO_DBL ((0L));_CurrState_Addr_272 = (long) AHDL_VAL_STATE_VAL;
}}}}ahdlDoSetLineNum ((long) 32);   if (_CurrState_Addr_272 != AHDL_VAL_STATE_VAL)   {         ahdlInterAddStaticElement(*(void**)(instData + 248), 1.0);      if (ahdlWhatsNeeded IS devStaticFuncNeeded) {
         double __value__ = -ahdlSolution[(int) _vos_flow_240];
         ahdlStaticRHS[_vos_flow_240] += __value__;         ahdlStaticRHS_AbsSum[_vos_flow_240] += ABS(__value__);      }   }   else   {      ahdlInterSetAcrossQuan(         *(void **)(instData + 244),
         _vos_52,         *(long*)(instData + 0),         _vos_flow_240,         _Static_BrAddr_256,         1.0      );
   }   if (ahdlWhatsNeeded IS devStaticFuncNeeded) {
      ahdlStaticRHS[_vos_52] -= *(double*)(instData + 280);
      ahdlStaticRHS[*(long*)(instData + 0)] += *(double*)(instData + 280);
      ahdlStaticRHS_AbsSum[_vos_52] += ABS(*(double*)(instData + 280));
      ahdlStaticRHS_AbsSum[*(long*)(instData + 0)] += ABS(*(double*)(instData + 280));
   }

   if (_CurrState_Addr_328 != AHDL_VAL_STATE_VAL)   {         ahdlInterAddStaticElement(*(void**)(instData + 304), 1.0);      if (ahdlWhatsNeeded IS devStaticFuncNeeded) {
         double __value__ = -ahdlSolution[(int) _outp_inref_flow_296];
         ahdlStaticRHS[_outp_inref_flow_296] += __value__;         ahdlStaticRHS_AbsSum[_outp_inref_flow_296] += ABS(__value__);      }   }   else   {      ahdlInterSetAcrossQuan(         *(void **)(instData + 300),
         _outp_36,         _inref_28,         _outp_inref_flow_296,         _Static_BrAddr_312,         1.0      );
   }   if (ahdlWhatsNeeded IS devStaticFuncNeeded) {
      ahdlStaticRHS[_outp_36] -= *(double*)(instData + 336);
      ahdlStaticRHS[_inref_28] += *(double*)(instData + 336);
      ahdlStaticRHS_AbsSum[_outp_36] += ABS(*(double*)(instData + 336));
      ahdlStaticRHS_AbsSum[_inref_28] += ABS(*(double*)(instData + 336));
   }

   if (_CurrState_Addr_384 != AHDL_VAL_STATE_VAL)   {         ahdlInterAddStaticElement(*(void**)(instData + 360), 1.0);      if (ahdlWhatsNeeded IS devStaticFuncNeeded) {
         double __value__ = -ahdlSolution[(int) _outn_inref_flow_352];
         ahdlStaticRHS[_outn_inref_flow_352] += __value__;         ahdlStaticRHS_AbsSum[_outn_inref_flow_352] += ABS(__value__);      }   }   else   {      ahdlInterSetAcrossQuan(         *(void **)(instData + 356),
         _outn_44,         _inref_28,         _outn_inref_flow_352,         _Static_BrAddr_368,         1.0      );
   }   if (ahdlWhatsNeeded IS devStaticFuncNeeded) {
      ahdlStaticRHS[_outn_44] -= *(double*)(instData + 392);
      ahdlStaticRHS[_inref_28] += *(double*)(instData + 392);
      ahdlStaticRHS_AbsSum[_outn_44] += ABS(*(double*)(instData + 392));
      ahdlStaticRHS_AbsSum[_inref_28] += ABS(*(double*)(instData + 392));
   }

   if (_CurrState_Addr_272 != _LastState_Addr_276)   {      ahdlInterNeedsOrdering ();   }   _LastState_Addr_276 = _CurrState_Addr_272;   if (_CurrState_Addr_328 != _LastState_Addr_332)   {      ahdlInterNeedsOrdering ();   }   _LastState_Addr_332 = _CurrState_Addr_328;   if (_CurrState_Addr_384 != _LastState_Addr_388)   {      ahdlInterNeedsOrdering ();   }   _LastState_Addr_388 = _CurrState_Addr_384;    return __msgSeverity__;
} /** end of acOpenDiff_TranFuncLoad **/

int acOpenDiff_NoiseLoadBiasDep(int anal_mode, char* instData, char* modelData, char** stringList) {

int __msgSeverity__ = 0;
double	__tmpStkVar_3 = 0.0;
double	__tmpStkVar_2 = 0.0;
double	__tmpStkVar_1 = 0.0;


    return __msgSeverity__;
} /** end of acOpenDiff_NoiseLoadBiasDep **/

