URCmParam

decompiled_code:
__int64 __fastcall URCmParam(int a1, _QWORD *a2, __int64 a3)
{
__int64 result; // rax

switch ( a1 )
{
case 'e':
*(_QWORD *)(a3 + 32) = *a2;
*(_BYTE *)(a3 + 80) |= 1u;
result = 0LL;
break;
case 'f':
*(_QWORD *)(a3 + 40) = *a2;
*(_BYTE *)(a3 + 80) |= 2u;
result = 0LL;
break;
case 'g':
*(_QWORD *)(a3 + 48) = *a2;
*(_BYTE *)(a3 + 80) |= 4u;
result = 0LL;
break;
case 'h':
*(_QWORD *)(a3 + 56) = *a2;
*(_BYTE *)(a3 + 80) |= 8u;
result = 0LL;
break;
case 'i':
*(_QWORD *)(a3 + 64) = *a2;
*(_BYTE *)(a3 + 80) |= 0x10u;
result = 0LL;
break;
case 'j':
*(_QWORD *)(a3 + 72) = *a2;
*(_BYTE *)(a3 + 80) |= 0x20u;
result = 0LL;
break;
case 'k':
result = 0LL;
break;
default:
result = 7LL;
break;
}
return result;
}

canonical_decompiled_code:
__int64 __fastcall func0(int a1, _QWORD *a2, __int64 a3)
{
__int64 result; // rax

switch ( a1 )
{
case 'e':
*(_QWORD *)(a3 + 32) = *a2;
*(_BYTE *)(a3 + 80) |= 1u;
result = 0LL;
break;
case 'f':
*(_QWORD *)(a3 + 40) = *a2;
*(_BYTE *)(a3 + 80) |= 2u;
result = 0LL;
break;
case 'g':
*(_QWORD *)(a3 + 48) = *a2;
*(_BYTE *)(a3 + 80) |= 4u;
result = 0LL;
break;
case 'h':
*(_QWORD *)(a3 + 56) = *a2;
*(_BYTE *)(a3 + 80) |= 8u;
result = 0LL;
break;
case 'i':
*(_QWORD *)(a3 + 64) = *a2;
*(_BYTE *)(a3 + 80) |= 0x10u;
result = 0LL;
break;
case 'j':
*(_QWORD *)(a3 + 72) = *a2;
*(_BYTE *)(a3 + 80) |= 0x20u;
result = 0LL;
break;
case 'k':
result = 0LL;
break;
default:
result = 7LL;
break;
}
return result;
}

original_code:
int
URCmParam(int param, IFvalue *value, GENmodel *inModel)
{
    URCmodel *model = (URCmodel *)inModel;
    switch(param) {
        case 101:
            model->URCk = value->rValue;
            model->URCkGiven = 1;
            break;
        case 102:
            model->URCfmax = value->rValue;
            model->URCfmaxGiven = 1;
            break;
        case 103:
            model->URCrPerL = value->rValue;
            model->URCrPerLGiven = 1;
            break;
        case 104:
            model->URCcPerL = value->rValue;
            model->URCcPerLGiven = 1;
            break;
        case 105:
            model->URCisPerL = value->rValue;
            model->URCisPerLGiven = 1;
            break;
        case 106:
            model->URCrsPerL = value->rValue;
            model->URCrsPerLGiven = 1;
            break;
        case 107:
            break;
        default:
            return(7);
    }
    return(0);
}

canonical_original_code:
int URCmParam(int param, union uIFvalue *value, struct sGENmodel *inModel)
{
    struct sURCmodel *model = (URCmodel *)inModel;
    switch(param) {
        case 101:
            model->URCk = value->rValue;
            model->URCkGiven = 1;
            break;
        case 102:
            model->URCfmax = value->rValue;
            model->URCfmaxGiven = 1;
            break;
        case 103:
            model->URCrPerL = value->rValue;
            model->URCrPerLGiven = 1;
            break;
        case 104:
            model->URCcPerL = value->rValue;
            model->URCcPerLGiven = 1;
            break;
        case 105:
            model->URCisPerL = value->rValue;
            model->URCisPerLGiven = 1;
            break;
        case 106:
            model->URCrsPerL = value->rValue;
            model->URCrsPerLGiven = 1;
            break;
        case 107:
            break;
        default:
            return(7);
    }
    return(0);
}

variable_types: param int

variable_types: union uIFvalue { int iValue; double rValue; struct sIFcomplex { double real; double imag; } cValue; char *sValue; char *uValue; void *nValue; struct sIFparseTree { int numVars; int *varTypes; union uIFvalue *vars; int (*IFeval)(struct sIFparseTree *, double, double *, double *, double *); } *tValue; struct { int numValue; union { int *iVec; double *rVec; struct sIFcomplex *cVec; char **sVec; char **uVec; void **nVec; } vec; } v; } *

variable_types: struct sGENmodel { int GENmodType; struct sGENmodel *GENnextModel; struct sGENinstance { struct sGENmodel *GENmodPtr; struct sGENinstance *GENnextInstance; char *GENname; int GENowner; int GENstate; int GENnode1; int GENnode2; int GENnode3; int GENnode4; int GENnode5; int GENnode6; int GENnode7; } *GENinstances; char *GENmodName; } *

variable_types: struct sURCmodel { int URCmodType; struct sURCmodel *URCnextModel; struct sURCinstance { struct sURCmodel *URCmodPtr; struct sURCinstance *URCnextInstance; char *URCname; int URCowner; int URCstate; int URCposNode; int URCnegNode; int URCgndNode; double URClength; int URClumps; unsigned int URClenGiven; unsigned int URClumpsGiven; } *URCinstances; char *URCmodName; double URCk; double URCfmax; double URCrPerL; double URCcPerL; double URCisPerL; double URCrsPerL; unsigned int URCkGiven; unsigned int URCfmaxGiven; unsigned int URCrPerLGiven; unsigned int URCcPerLGiven; unsigned int URCisPerLGiven; unsigned int URCrsPerLGiven; } *

user_defined_types: union uIFvalue { int iValue; double rValue; struct sIFcomplex cValue; char *sValue; char *uValue; void *nValue; struct sIFparseTree *tValue; struct { int numValue; union { int *iVec; double *rVec; struct sIFcomplex *cVec; char **sVec; char **uVec; void **nVec; } vec; } v; }

user_defined_types: struct sURCmodel { int URCmodType; struct sURCmodel *URCnextModel; struct sURCinstance *URCinstances; char *URCmodName; double URCk; double URCfmax; double URCrPerL; double URCcPerL; double URCisPerL; double URCrsPerL; unsigned int URCkGiven; unsigned int URCfmaxGiven; unsigned int URCrPerLGiven; unsigned int URCcPerLGiven; unsigned int URCisPerLGiven; unsigned int URCrsPerLGiven; }


repo: gserdyuk/gnucap-a

original_code:
int
B2pzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
{
    B2model *model = (B2model*)inModel;
    B2instance *here;
    int xnrm;
    int xrev;
    double gdpr;
    double gspr;
    double gm;
    double gds;
    double gmbs;
    double gbd;
    double gbs;
    double capbd;
    double capbs;
    double xcggb;
    double xcgdb;
    double xcgsb;
    double xcbgb;
    double xcbdb;
    double xcbsb;
    double xcddb;
    double xcssb;
    double xcdgb;
    double xcsgb;
    double xcdsb;
    double xcsdb;
    double cggb;
    double cgdb;
    double cgsb;
    double cbgb;
    double cbdb;
    double cbsb;
    double cddb;
    double cdgb;
    double cdsb;
    double m;
    for( ; model != ((void *)0); model = model->B2nextModel) {
        for(here = model->B2instances; here!= ((void *)0);
                here = here->B2nextInstance) {
     if (here->B2owner != ARCHme) continue;
            if (here->B2mode >= 0) {
                xnrm=1;
                xrev=0;
            } else {
                xnrm=0;
                xrev=1;
            }
            gdpr=here->B2drainConductance;
            gspr=here->B2sourceConductance;
            gm= *(ckt->CKTstates[0] + here->B2states+ 7);
            gds= *(ckt->CKTstates[0] + here->B2states+ 8);
            gmbs= *(ckt->CKTstates[0] + here->B2states+ 9);
            gbd= *(ckt->CKTstates[0] + here->B2states+ 10);
            gbs= *(ckt->CKTstates[0] + here->B2states+ 11);
            capbd= *(ckt->CKTstates[0] + here->B2states+ 24);
            capbs= *(ckt->CKTstates[0] + here->B2states+ 26);
            cggb = *(ckt->CKTstates[0] + here->B2states+ 18);
            cgsb = *(ckt->CKTstates[0] + here->B2states+ 20);
            cgdb = *(ckt->CKTstates[0] + here->B2states+ 19);
            cbgb = *(ckt->CKTstates[0] + here->B2states+ 21);
            cbsb = *(ckt->CKTstates[0] + here->B2states+ 23);
            cbdb = *(ckt->CKTstates[0] + here->B2states+ 22);
            cdgb = *(ckt->CKTstates[0] + here->B2states+ 28);
            cdsb = *(ckt->CKTstates[0] + here->B2states+ 30);
            cddb = *(ckt->CKTstates[0] + here->B2states+ 29);
            xcdgb = (cdgb - here->pParam->B2GDoverlapCap) ;
            xcddb = (cddb + capbd + here->pParam->B2GDoverlapCap) ;
            xcdsb = cdsb ;
            xcsgb = -(cggb + cbgb + cdgb + here->pParam->B2GSoverlapCap ) ;
            xcsdb = -(cgdb + cbdb + cddb) ;
            xcssb = (capbs + here->pParam->B2GSoverlapCap - (cgsb+cbsb+cdsb)) ;
            xcggb = (cggb + here->pParam->B2GDoverlapCap
    + here->pParam->B2GSoverlapCap
    + here->pParam->B2GBoverlapCap) ;
            xcgdb = (cgdb - here->pParam->B2GDoverlapCap ) ;
            xcgsb = (cgsb - here->pParam->B2GSoverlapCap) ;
            xcbgb = (cbgb - here->pParam->B2GBoverlapCap) ;
            xcbdb = (cbdb - capbd ) ;
            xcbsb = (cbsb - capbs ) ;
            m = here->B2m;
            *(here->B2GgPtr ) += m * (xcggb * s->real);
            *(here->B2GgPtr +1) += m * (xcggb * s->imag);
            *(here->B2BbPtr ) += m * ((-xcbgb-xcbdb-xcbsb) * s->real);
            *(here->B2BbPtr +1) += m * ((-xcbgb-xcbdb-xcbsb) * s->imag);
            *(here->B2DPdpPtr ) += m * (xcddb * s->real);
            *(here->B2DPdpPtr +1) += m * (xcddb * s->imag);
            *(here->B2SPspPtr ) += m * (xcssb * s->real);
            *(here->B2SPspPtr +1) += m * (xcssb * s->imag);
            *(here->B2GbPtr ) += m * ((-xcggb-xcgdb-xcgsb) * s->real);
            *(here->B2GbPtr +1) += m * ((-xcggb-xcgdb-xcgsb) * s->imag);
            *(here->B2GdpPtr ) += m * (xcgdb * s->real);
            *(here->B2GdpPtr +1) += m * (xcgdb * s->imag);
            *(here->B2GspPtr ) += m * (xcgsb * s->real);
            *(here->B2GspPtr +1) += m * (xcgsb * s->imag);
            *(here->B2BgPtr ) += m * (xcbgb * s->real);
            *(here->B2BgPtr +1) += m * (xcbgb * s->imag);
            *(here->B2BdpPtr ) += m * (xcbdb * s->real);
            *(here->B2BdpPtr +1) += m * (xcbdb * s->imag);
            *(here->B2BspPtr ) += m * (xcbsb * s->real);
            *(here->B2BspPtr +1) += m * (xcbsb * s->imag);
            *(here->B2DPgPtr ) += m * (xcdgb * s->real);
            *(here->B2DPgPtr +1) += m * (xcdgb * s->imag);
            *(here->B2DPbPtr ) += m * ((-xcdgb-xcddb-xcdsb) * s->real);
            *(here->B2DPbPtr +1) += m * ((-xcdgb-xcddb-xcdsb) * s->imag);
            *(here->B2DPspPtr ) += m * (xcdsb * s->real);
            *(here->B2DPspPtr +1) += m * (xcdsb * s->imag);
            *(here->B2SPgPtr ) += m * (xcsgb * s->real);
            *(here->B2SPgPtr +1) += m * (xcsgb * s->imag);
            *(here->B2SPbPtr ) += m * ((-xcsgb-xcsdb-xcssb) * s->real);
            *(here->B2SPbPtr +1) += m * ((-xcsgb-xcsdb-xcssb) * s->imag);
            *(here->B2SPdpPtr ) += m * (xcsdb * s->real);
            *(here->B2SPdpPtr +1) += m * (xcsdb * s->imag);
            *(here->B2DdPtr) += m * (gdpr);
            *(here->B2SsPtr) += m * (gspr);
            *(here->B2BbPtr) += m * (gbd+gbs);
            *(here->B2DPdpPtr) += m * (gdpr+gds+gbd+xrev*(gm+gmbs));
            *(here->B2SPspPtr) += m * (gspr+gds+gbs+xnrm*(gm+gmbs));
            *(here->B2DdpPtr) -= m * (gdpr);
            *(here->B2SspPtr) -= m * (gspr);
            *(here->B2BdpPtr) -= m * (gbd);
            *(here->B2BspPtr) -= m * (gbs);
            *(here->B2DPdPtr) -= m * (gdpr);
            *(here->B2DPgPtr) += m * ((xnrm-xrev)*gm);
            *(here->B2DPbPtr) += m * (-gbd+(xnrm-xrev)*gmbs);
            *(here->B2DPspPtr) += m * (-gds-xnrm*(gm+gmbs));
            *(here->B2SPgPtr) += m * (-(xnrm-xrev)*gm);
            *(here->B2SPsPtr) -= m * (gspr);
            *(here->B2SPbPtr) += m * (-gbs-(xnrm-xrev)*gmbs);
            *(here->B2SPdpPtr) += m * (-gds-xrev*(gm+gmbs));
        }
    }
    return(0);
}

canonical_original_code:
int B2pzLoad(struct sGENmodel *inModel, struct CKTcircuit *ckt, struct SPcomplex *s)
{
    struct sBSIM2model *model = (B2model*)inModel;
    struct sBSIM2instance *here;
    int xnrm;
    int xrev;
    double gdpr;
    double gspr;
    double gm;
    double gds;
    double gmbs;
    double gbd;
    double gbs;
    double capbd;
    double capbs;
    double xcggb;
    double xcgdb;
    double xcgsb;
    double xcbgb;
    double xcbdb;
    double xcbsb;
    double xcddb;
    double xcssb;
    double xcdgb;
    double xcsgb;
    double xcdsb;
    double xcsdb;
    double cggb;
    double cgdb;
    double cgsb;
    double cbgb;
    double cbdb;
    double cbsb;
    double cddb;
    double cdgb;
    double cdsb;
    double m;
    for( ; model != ((void *)0); model = model->B2nextModel) {
        for(here = model->B2instances; here!= ((void *)0);
                here = here->B2nextInstance) {
     if (here->B2owner != ARCHme) continue;
            if (here->B2mode >= 0) {
                xnrm=1;
                xrev=0;
            } else {
                xnrm=0;
                xrev=1;
            }
            gdpr=here->B2drainConductance;
            gspr=here->B2sourceConductance;
            gm= *(ckt->CKTstates[0] + here->B2states+ 7);
            gds= *(ckt->CKTstates[0] + here->B2states+ 8);
            gmbs= *(ckt->CKTstates[0] + here->B2states+ 9);
            gbd= *(ckt->CKTstates[0] + here->B2states+ 10);
            gbs= *(ckt->CKTstates[0] + here->B2states+ 11);
            capbd= *(ckt->CKTstates[0] + here->B2states+ 24);
            capbs= *(ckt->CKTstates[0] + here->B2states+ 26);
            cggb = *(ckt->CKTstates[0] + here->B2states+ 18);
            cgsb = *(ckt->CKTstates[0] + here->B2states+ 20);
            cgdb = *(ckt->CKTstates[0] + here->B2states+ 19);
            cbgb = *(ckt->CKTstates[0] + here->B2states+ 21);
            cbsb = *(ckt->CKTstates[0] + here->B2states+ 23);
            cbdb = *(ckt->CKTstates[0] + here->B2states+ 22);
            cdgb = *(ckt->CKTstates[0] + here->B2states+ 28);
            cdsb = *(ckt->CKTstates[0] + here->B2states+ 30);
            cddb = *(ckt->CKTstates[0] + here->B2states+ 29);
            xcdgb = (cdgb - here->pParam->B2GDoverlapCap) ;
            xcddb = (cddb + capbd + here->pParam->B2GDoverlapCap) ;
            xcdsb = cdsb ;
            xcsgb = -(cggb + cbgb + cdgb + here->pParam->B2GSoverlapCap ) ;
            xcsdb = -(cgdb + cbdb + cddb) ;
            xcssb = (capbs + here->pParam->B2GSoverlapCap - (cgsb+cbsb+cdsb)) ;
            xcggb = (cggb + here->pParam->B2GDoverlapCap
    + here->pParam->B2GSoverlapCap
    + here->pParam->B2GBoverlapCap) ;
            xcgdb = (cgdb - here->pParam->B2GDoverlapCap ) ;
            xcgsb = (cgsb - here->pParam->B2GSoverlapCap) ;
            xcbgb = (cbgb - here->pParam->B2GBoverlapCap) ;
            xcbdb = (cbdb - capbd ) ;
            xcbsb = (cbsb - capbs ) ;
            m = here->B2m;
            *(here->B2GgPtr ) += m * (xcggb * s->real);
            *(here->B2GgPtr +1) += m * (xcggb * s->imag);
            *(here->B2BbPtr ) += m * ((-xcbgb-xcbdb-xcbsb) * s->real);
            *(here->B2BbPtr +1) += m * ((-xcbgb-xcbdb-xcbsb) * s->imag);
            *(here->B2DPdpPtr ) += m * (xcddb * s->real);
            *(here->B2DPdpPtr +1) += m * (xcddb * s->imag);
            *(here->B2SPspPtr ) += m * (xcssb * s->real);
            *(here->B2SPspPtr +1) += m * (xcssb * s->imag);
            *(here->B2GbPtr ) += m * ((-xcggb-xcgdb-xcgsb) * s->real);
            *(here->B2GbPtr +1) += m * ((-xcggb-xcgdb-xcgsb) * s->imag);
            *(here->B2GdpPtr ) += m * (xcgdb * s->real);
            *(here->B2GdpPtr +1) += m * (xcgdb * s->imag);
            *(here->B2GspPtr ) += m * (xcgsb * s->real);
            *(here->B2GspPtr +1) += m * (xcgsb * s->imag);
            *(here->B2BgPtr ) += m * (xcbgb * s->real);
            *(here->B2BgPtr +1) += m * (xcbgb * s->imag);
            *(here->B2BdpPtr ) += m * (xcbdb * s->real);
            *(here->B2BdpPtr +1) += m * (xcbdb * s->imag);
            *(here->B2BspPtr ) += m * (xcbsb * s->real);
            *(here->B2BspPtr +1) += m * (xcbsb * s->imag);
            *(here->B2DPgPtr ) += m * (xcdgb * s->real);
            *(here->B2DPgPtr +1) += m * (xcdgb * s->imag);
            *(here->B2DPbPtr ) += m * ((-xcdgb-xcddb-xcdsb) * s->real);
            *(here->B2DPbPtr +1) += m * ((-xcdgb-xcddb-xcdsb) * s->imag);
            *(here->B2DPspPtr ) += m * (xcdsb * s->real);
            *(here->B2DPspPtr +1) += m * (xcdsb * s->imag);
            *(here->B2SPgPtr ) += m * (xcsgb * s->real);
            *(here->B2SPgPtr +1) += m * (xcsgb * s->imag);
            *(here->B2SPbPtr ) += m * ((-xcsgb-xcsdb-xcssb) * s->real);
            *(here->B2SPbPtr +1) += m * ((-xcsgb-xcsdb-xcssb) * s->imag);
            *(here->B2SPdpPtr ) += m * (xcsdb * s->real);
            *(here->B2SPdpPtr +1) += m * (xcsdb * s->imag);
            *(here->B2DdPtr) += m * (gdpr);
            *(here->B2SsPtr) += m * (gspr);
            *(here->B2BbPtr) += m * (gbd+gbs);
            *(here->B2DPdpPtr) += m * (gdpr+gds+gbd+xrev*(gm+gmbs));
            *(here->B2SPspPtr) += m * (gspr+gds+gbs+xnrm*(gm+gmbs));
            *(here->B2DdpPtr) -= m * (gdpr);
            *(here->B2SspPtr) -= m * (gspr);
            *(here->B2BdpPtr) -= m * (gbd);
            *(here->B2BspPtr) -= m * (gbs);
            *(here->B2DPdPtr) -= m * (gdpr);
            *(here->B2DPgPtr) += m * ((xnrm-xrev)*gm);
            *(here->B2DPbPtr) += m * (-gbd+(xnrm-xrev)*gmbs);
            *(here->B2DPspPtr) += m * (-gds-xnrm*(gm+gmbs));
            *(here->B2SPgPtr) += m * (-(xnrm-xrev)*gm);
            *(here->B2SPsPtr) -= m * (gspr);
            *(here->B2SPbPtr) += m * (-gbs-(xnrm-xrev)*gmbs);
            *(here->B2SPdpPtr) += m * (-gds-xrev*(gm+gmbs));
        }
    }
    return(0);
}

variable_types: struct CKTcircuit { struct sGENmodel **CKThead; struct STATistics { int STATnumIter; int STATtranIter; int STAToldIter; int STATtimePts; int STATaccepted; int STATrejected; double STATtotAnalTime; double STATloadTime; double STATdecompTime; double STATsolveTime; double STATreorderTime; double STATcombineTime; double STATsyncTime; double STATtranTime; double STATtranDecompTime; double STATtranSolveTime; double STATtranLoadTime; double STATtranTruncTime; double STATtranCombTime; double STATtranSyncTime; double STATacTime; double STATacDecompTime; double STATacSolveTime; double STATacLoadTime; double STATacCombTime; double STATacSyncTime; } *CKTstat; double *CKTstates[8]; double CKTtime; double CKTdelta; double CKTdeltaOld[7]; double CKTtemp; double CKTnomTemp; double CKTvt; double CKTag[7]; double CKTagp[7]; int CKTorder; int CKTmaxOrder; int CKTintegrateMethod; void *CKTmatrix; int CKTniState; double *CKTrhs; double *CKTrhsOld; double *CKTrhsSpare; double *CKTirhs; double *CKTirhsOld; double *CKTirhsSpare; double *CKTpred; double *CKTsols[8]; double *CKTrhsOp; double *CKTsenRhs; double *CKTseniRhs; int CKTmaxEqNum; int CKTcurrentAnalysis; struct sCKTnode { char *name; int type; int number; double ic; double nodeset; double *ptr; struct sCKTnode *next; unsigned int icGiven; unsigned int nsGiven; } *CKTnodes; struct sCKTnode *CKTlastNode; int CKTnumStates; long CKTmode; int CKTbypass; int CKTdcMaxIter; int CKTdcTrcvMaxIter; int CKTtranMaxIter; int CKTbreakSize; int CKTbreak; double CKTsaveDelta; double CKTminBreak; double *CKTbreaks; double CKTabstol; double CKTpivotAbsTol; double CKTpivotRelTol; double CKTreltol; double CKTchgtol; double CKTvoltTol; double CKTgmin; double CKTgshunt; double CKTdelmin; double CKTtrtol; double CKTfinalTime; double CKTstep; double CKTmaxStep; double CKTinitTime; double CKTomega; double CKTsrcFact; double CKTdiagGmin; int CKTnumSrcSteps; int CKTnumGminSteps; double CKTgminFactor; int CKTnoncon; double CKTdefaultMosM; double CKTdefaultMosL; double CKTdefaultMosW; double CKTdefaultMosAD; double CKTdefaultMosAS; unsigned int CKThadNodeset; unsigned int CKTfixLimit; unsigned int CKTnoOpIter; unsigned int CKTisSetup; struct sJOB { int JOBtype; struct sJOB *JOBnextJob; char *JOBname; } *CKTcurJob; struct SENstruct { int JOBtype; struct sJOB *JOBnextJob; char *JOBname; int SENnumVal; char **SENdevices; char **SENparmNames; unsigned int SENinitflag; unsigned int SENicflag; unsigned int SENstatus; unsigned int SENacpertflag; int SENmode; int SENparms; double SENpertfac; double **SEN_Sap; double **SEN_RHS; double **SEN_iRHS; int SENsize; void *SEN_Jacmat; double *SEN_parmVal; char **SEN_parmName; } *CKTsenInfo; double *CKTtimePoints; double *CKTdeltaList; int CKTtimeListSize; int CKTtimeIndex; int CKTsizeIncr; unsigned int CKTtryToCompact; unsigned int CKTbadMos3; unsigned int CKTkeepOpInfo; unsigned int CKTcopyNodesets; unsigned int CKTnodeDamping; double CKTabsDv; double CKTrelDv; int CKTtroubleNode; struct sGENinstance *CKTtroubleElt; } *

variable_types: struct SPcomplex { double real; double imag; } *

variable_types: struct sBSIM2model { int B2modType; struct sBSIM2model *B2nextModel; struct sBSIM2instance { struct sBSIM2model *B2modPtr; struct sBSIM2instance *B2nextInstance; char *B2name; int B2owner; int B2states; int B2dNode; int B2gNode; int B2sNode; int B2bNode; int B2dNodePrime; int B2sNodePrime; double B2l; double B2w; double B2m; double B2drainArea; double B2sourceArea; double B2drainSquares; double B2sourceSquares; double B2drainPerimeter; double B2sourcePerimeter; double B2sourceConductance; double B2drainConductance; double B2icVBS; double B2icVDS; double B2icVGS; double B2von; double B2vdsat; int B2off; int B2mode; struct bsim2SizeDependParam { double Width; double Length; double B2vfb; double B2phi; double B2k1; double B2k2; double B2eta0; double B2etaB; double B2beta0; double B2beta0B; double B2betas0; double B2betasB; double B2beta20; double B2beta2B; double B2beta2G; double B2beta30; double B2beta3B; double B2beta3G; double B2beta40; double B2beta4B; double B2beta4G; double B2ua0; double B2uaB; double B2ub0; double B2ubB; double B2u10; double B2u1B; double B2u1D; double B2n0; double B2nB; double B2nD; double B2vof0; double B2vofB; double B2vofD; double B2ai0; double B2aiB; double B2bi0; double B2biB; double B2vghigh; double B2vglow; double B2GDoverlapCap; double B2GSoverlapCap; double B2GBoverlapCap; double SqrtPhi; double Phis3; double CoxWL; double One_Third_CoxWL; double Two_Third_CoxWL; double Arg; double B2vt0; struct bsim2SizeDependParam *pNext; } *pParam; unsigned int B2lGiven; unsigned int B2wGiven; unsigned int B2mGiven; unsigned int B2drainAreaGiven; unsigned int B2sourceAreaGiven; unsigned int B2drainSquaresGiven; unsigned int B2sourceSquaresGiven; unsigned int B2drainPerimeterGiven; unsigned int B2sourcePerimeterGiven; unsigned int B2dNodePrimeSet; unsigned int B2sNodePrimeSet; unsigned int B2icVBSGiven; unsigned int B2icVDSGiven; unsigned int B2icVGSGiven; unsigned int B2vonGiven; unsigned int B2vdsatGiven; double *B2DdPtr; double *B2GgPtr; double *B2SsPtr; double *B2BbPtr; double *B2DPdpPtr; double *B2SPspPtr; double *B2DdpPtr; double *B2GbPtr; double *B2GdpPtr; double *B2GspPtr; double *B2SspPtr; double *B2BdpPtr; double *B2BspPtr; double *B2DPspPtr; double *B2DPdPtr; double *B2BgPtr; double *B2DPgPtr; double *B2SPgPtr; double *B2SPsPtr; double *B2DPbPtr; double *B2SPbPtr; double *B2SPdpPtr; double B2nVar[3][5]; } *B2instances; char *B2modName; int B2type; int pad; double B2vfb0; double B2vfbL; double B2vfbW; double B2phi0; double B2phiL; double B2phiW; double B2k10; double B2k1L; double B2k1W; double B2k20; double B2k2L; double B2k2W; double B2eta00; double B2eta0L; double B2eta0W; double B2etaB0; double B2etaBL; double B2etaBW; double B2deltaL; double B2deltaW; double B2mob00; double B2mob0B0; double B2mob0BL; double B2mob0BW; double B2mobs00; double B2mobs0L; double B2mobs0W; double B2mobsB0; double B2mobsBL; double B2mobsBW; double B2mob200; double B2mob20L; double B2mob20W; double B2mob2B0; double B2mob2BL; double B2mob2BW; double B2mob2G0; double B2mob2GL; double B2mob2GW; double B2mob300; double B2mob30L; double B2mob30W; double B2mob3B0; double B2mob3BL; double B2mob3BW; double B2mob3G0; double B2mob3GL; double B2mob3GW; double B2mob400; double B2mob40L; double B2mob40W; double B2mob4B0; double B2mob4BL; double B2mob4BW; double B2mob4G0; double B2mob4GL; double B2mob4GW; double B2ua00; double B2ua0L; double B2ua0W; double B2uaB0; double B2uaBL; double B2uaBW; double B2ub00; double B2ub0L; double B2ub0W; double B2ubB0; double B2ubBL; double B2ubBW; double B2u100; double B2u10L; double B2u10W; double B2u1B0; double B2u1BL; double B2u1BW; double B2u1D0; double B2u1DL; double B2u1DW; double B2n00; double B2n0L; double B2n0W; double B2nB0; double B2nBL; double B2nBW; double B2nD0; double B2nDL; double B2nDW; double B2vof00; double B2vof0L; double B2vof0W; double B2vofB0; double B2vofBL; double B2vofBW; double B2vofD0; double B2vofDL; double B2vofDW; double B2ai00; double B2ai0L; double B2ai0W; double B2aiB0; double B2aiBL; double B2aiBW; double B2bi00; double B2bi0L; double B2bi0W; double B2biB0; double B2biBL; double B2biBW; double B2vghigh0; double B2vghighL; double B2vghighW; double B2vglow0; double B2vglowL; double B2vglowW; double B2tox; double B2Cox; double B2temp; double B2vdd; double B2vdd2; double B2vgg; double B2vgg2; double B2vbb; double B2vbb2; double B2gateSourceOverlapCap; double B2gateDrainOverlapCap; double B2gateBulkOverlapCap; double B2Vtm; double B2sheetResistance; double B2jctSatCurDensity; double B2bulkJctPotential; double B2bulkJctBotGradingCoeff; double B2bulkJctSideGradingCoeff; double B2sidewallJctPotential; double B2unitAreaJctCap; double B2unitLengthSidewallJctCap; double B2defaultWidth; double B2deltaLength; double B2fNcoef; double B2fNexp; struct bsim2SizeDependParam *pSizeDependParamKnot; unsigned int B2channelChargePartitionFlag; unsigned int B2vfb0Given; unsigned int B2vfbLGiven; unsigned int B2vfbWGiven; unsigned int B2phi0Given; unsigned int B2phiLGiven; unsigned int B2phiWGiven; unsigned int B2k10Given; unsigned int B2k1LGiven; unsigned int B2k1WGiven; unsigned int B2k20Given; unsigned int B2k2LGiven; unsigned int B2k2WGiven; unsigned int B2eta00Given; unsigned int B2eta0LGiven; unsigned int B2eta0WGiven; unsigned int B2etaB0Given; unsigned int B2etaBLGiven; unsigned int B2etaBWGiven; unsigned int B2deltaLGiven; unsigned int B2deltaWGiven; unsigned int B2mob00Given; unsigned int B2mob0B0Given; unsigned int B2mob0BLGiven; unsigned int B2mob0BWGiven; unsigned int B2mobs00Given; unsigned int B2mobs0LGiven; unsigned int B2mobs0WGiven; unsigned int B2mobsB0Given; unsigned int B2mobsBLGiven; unsigned int B2mobsBWGiven; unsigned int B2mob200Given; unsigned int B2mob20LGiven; unsigned int B2mob20WGiven; unsigned int B2mob2B0Given; unsigned int B2mob2BLGiven; unsigned int B2mob2BWGiven; unsigned int B2mob2G0Given; unsigned int B2mob2GLGiven; unsigned int B2mob2GWGiven; unsigned int B2mob300Given; unsigned int B2mob30LGiven; unsigned int B2mob30WGiven; unsigned int B2mob3B0Given; unsigned int B2mob3BLGiven; unsigned int B2mob3BWGiven; unsigned int B2mob3G0Given; unsigned int B2mob3GLGiven; unsigned int B2mob3GWGiven; unsigned int B2mob400Given; unsigned int B2mob40LGiven; unsigned int B2mob40WGiven; unsigned int B2mob4B0Given; unsigned int B2mob4BLGiven; unsigned int B2mob4BWGiven; unsigned int B2mob4G0Given; unsigned int B2mob4GLGiven; unsigned int B2mob4GWGiven; unsigned int B2ua00Given; unsigned int B2ua0LGiven; unsigned int B2ua0WGiven; unsigned int B2uaB0Given; unsigned int B2uaBLGiven; unsigned int B2uaBWGiven; unsigned int B2ub00Given; unsigned int B2ub0LGiven; unsigned int B2ub0WGiven; unsigned int B2ubB0Given; unsigned int B2ubBLGiven; unsigned int B2ubBWGiven; unsigned int B2u100Given; unsigned int B2u10LGiven; unsigned int B2u10WGiven; unsigned int B2u1B0Given; unsigned int B2u1BLGiven; unsigned int B2u1BWGiven; unsigned int B2u1D0Given; unsigned int B2u1DLGiven; unsigned int B2u1DWGiven; unsigned int B2n00Given; unsigned int B2n0LGiven; unsigned int B2n0WGiven; unsigned int B2nB0Given; unsigned int B2nBLGiven; unsigned int B2nBWGiven; unsigned int B2nD0Given; unsigned int B2nDLGiven; unsigned int B2nDWGiven; unsigned int B2vof00Given; unsigned int B2vof0LGiven; unsigned int B2vof0WGiven; unsigned int B2vofB0Given; unsigned int B2vofBLGiven; unsigned int B2vofBWGiven; unsigned int B2vofD0Given; unsigned int B2vofDLGiven; unsigned int B2vofDWGiven; unsigned int B2ai00Given; unsigned int B2ai0LGiven; unsigned int B2ai0WGiven; unsigned int B2aiB0Given; unsigned int B2aiBLGiven; unsigned int B2aiBWGiven; unsigned int B2bi00Given; unsigned int B2bi0LGiven; unsigned int B2bi0WGiven; unsigned int B2biB0Given; unsigned int B2biBLGiven; unsigned int B2biBWGiven; unsigned int B2vghigh0Given; unsigned int B2vghighLGiven; unsigned int B2vghighWGiven; unsigned int B2vglow0Given; unsigned int B2vglowLGiven; unsigned int B2vglowWGiven; unsigned int B2toxGiven; unsigned int B2tempGiven; unsigned int B2vddGiven; unsigned int B2vggGiven; unsigned int B2vbbGiven; unsigned int B2gateSourceOverlapCapGiven; unsigned int B2gateDrainOverlapCapGiven; unsigned int B2gateBulkOverlapCapGiven; unsigned int B2channelChargePartitionFlagGiven; unsigned int B2sheetResistanceGiven; unsigned int B2jctSatCurDensityGiven; unsigned int B2bulkJctPotentialGiven; unsigned int B2bulkJctBotGradingCoeffGiven; unsigned int B2sidewallJctPotentialGiven; unsigned int B2bulkJctSideGradingCoeffGiven; unsigned int B2unitAreaJctCapGiven; unsigned int B2unitLengthSidewallJctCapGiven; unsigned int B2defaultWidthGiven; unsigned int B2deltaLengthGiven; unsigned int B2fNcoefGiven; unsigned int B2fNexpGiven; unsigned int B2typeGiven; } *

variable_types: struct sBSIM2instance { struct sBSIM2model { int B2modType; struct sBSIM2model *B2nextModel; struct sBSIM2instance *B2instances; char *B2modName; int B2type; int pad; double B2vfb0; double B2vfbL; double B2vfbW; double B2phi0; double B2phiL; double B2phiW; double B2k10; double B2k1L; double B2k1W; double B2k20; double B2k2L; double B2k2W; double B2eta00; double B2eta0L; double B2eta0W; double B2etaB0; double B2etaBL; double B2etaBW; double B2deltaL; double B2deltaW; double B2mob00; double B2mob0B0; double B2mob0BL; double B2mob0BW; double B2mobs00; double B2mobs0L; double B2mobs0W; double B2mobsB0; double B2mobsBL; double B2mobsBW; double B2mob200; double B2mob20L; double B2mob20W; double B2mob2B0; double B2mob2BL; double B2mob2BW; double B2mob2G0; double B2mob2GL; double B2mob2GW; double B2mob300; double B2mob30L; double B2mob30W; double B2mob3B0; double B2mob3BL; double B2mob3BW; double B2mob3G0; double B2mob3GL; double B2mob3GW; double B2mob400; double B2mob40L; double B2mob40W; double B2mob4B0; double B2mob4BL; double B2mob4BW; double B2mob4G0; double B2mob4GL; double B2mob4GW; double B2ua00; double B2ua0L; double B2ua0W; double B2uaB0; double B2uaBL; double B2uaBW; double B2ub00; double B2ub0L; double B2ub0W; double B2ubB0; double B2ubBL; double B2ubBW; double B2u100; double B2u10L; double B2u10W; double B2u1B0; double B2u1BL; double B2u1BW; double B2u1D0; double B2u1DL; double B2u1DW; double B2n00; double B2n0L; double B2n0W; double B2nB0; double B2nBL; double B2nBW; double B2nD0; double B2nDL; double B2nDW; double B2vof00; double B2vof0L; double B2vof0W; double B2vofB0; double B2vofBL; double B2vofBW; double B2vofD0; double B2vofDL; double B2vofDW; double B2ai00; double B2ai0L; double B2ai0W; double B2aiB0; double B2aiBL; double B2aiBW; double B2bi00; double B2bi0L; double B2bi0W; double B2biB0; double B2biBL; double B2biBW; double B2vghigh0; double B2vghighL; double B2vghighW; double B2vglow0; double B2vglowL; double B2vglowW; double B2tox; double B2Cox; double B2temp; double B2vdd; double B2vdd2; double B2vgg; double B2vgg2; double B2vbb; double B2vbb2; double B2gateSourceOverlapCap; double B2gateDrainOverlapCap; double B2gateBulkOverlapCap; double B2Vtm; double B2sheetResistance; double B2jctSatCurDensity; double B2bulkJctPotential; double B2bulkJctBotGradingCoeff; double B2bulkJctSideGradingCoeff; double B2sidewallJctPotential; double B2unitAreaJctCap; double B2unitLengthSidewallJctCap; double B2defaultWidth; double B2deltaLength; double B2fNcoef; double B2fNexp; struct bsim2SizeDependParam { double Width; double Length; double B2vfb; double B2phi; double B2k1; double B2k2; double B2eta0; double B2etaB; double B2beta0; double B2beta0B; double B2betas0; double B2betasB; double B2beta20; double B2beta2B; double B2beta2G; double B2beta30; double B2beta3B; double B2beta3G; double B2beta40; double B2beta4B; double B2beta4G; double B2ua0; double B2uaB; double B2ub0; double B2ubB; double B2u10; double B2u1B; double B2u1D; double B2n0; double B2nB; double B2nD; double B2vof0; double B2vofB; double B2vofD; double B2ai0; double B2aiB; double B2bi0; double B2biB; double B2vghigh; double B2vglow; double B2GDoverlapCap; double B2GSoverlapCap; double B2GBoverlapCap; double SqrtPhi; double Phis3; double CoxWL; double One_Third_CoxWL; double Two_Third_CoxWL; double Arg; double B2vt0; struct bsim2SizeDependParam *pNext; } *pSizeDependParamKnot; unsigned int B2channelChargePartitionFlag; unsigned int B2vfb0Given; unsigned int B2vfbLGiven; unsigned int B2vfbWGiven; unsigned int B2phi0Given; unsigned int B2phiLGiven; unsigned int B2phiWGiven; unsigned int B2k10Given; unsigned int B2k1LGiven; unsigned int B2k1WGiven; unsigned int B2k20Given; unsigned int B2k2LGiven; unsigned int B2k2WGiven; unsigned int B2eta00Given; unsigned int B2eta0LGiven; unsigned int B2eta0WGiven; unsigned int B2etaB0Given; unsigned int B2etaBLGiven; unsigned int B2etaBWGiven; unsigned int B2deltaLGiven; unsigned int B2deltaWGiven; unsigned int B2mob00Given; unsigned int B2mob0B0Given; unsigned int B2mob0BLGiven; unsigned int B2mob0BWGiven; unsigned int B2mobs00Given; unsigned int B2mobs0LGiven; unsigned int B2mobs0WGiven; unsigned int B2mobsB0Given; unsigned int B2mobsBLGiven; unsigned int B2mobsBWGiven; unsigned int B2mob200Given; unsigned int B2mob20LGiven; unsigned int B2mob20WGiven; unsigned int B2mob2B0Given; unsigned int B2mob2BLGiven; unsigned int B2mob2BWGiven; unsigned int B2mob2G0Given; unsigned int B2mob2GLGiven; unsigned int B2mob2GWGiven; unsigned int B2mob300Given; unsigned int B2mob30LGiven; unsigned int B2mob30WGiven; unsigned int B2mob3B0Given; unsigned int B2mob3BLGiven; unsigned int B2mob3BWGiven; unsigned int B2mob3G0Given; unsigned int B2mob3GLGiven; unsigned int B2mob3GWGiven; unsigned int B2mob400Given; unsigned int B2mob40LGiven; unsigned int B2mob40WGiven; unsigned int B2mob4B0Given; unsigned int B2mob4BLGiven; unsigned int B2mob4BWGiven; unsigned int B2mob4G0Given; unsigned int B2mob4GLGiven; unsigned int B2mob4GWGiven; unsigned int B2ua00Given; unsigned int B2ua0LGiven; unsigned int B2ua0WGiven; unsigned int B2uaB0Given; unsigned int B2uaBLGiven; unsigned int B2uaBWGiven; unsigned int B2ub00Given; unsigned int B2ub0LGiven; unsigned int B2ub0WGiven; unsigned int B2ubB0Given; unsigned int B2ubBLGiven; unsigned int B2ubBWGiven; unsigned int B2u100Given; unsigned int B2u10LGiven; unsigned int B2u10WGiven; unsigned int B2u1B0Given; unsigned int B2u1BLGiven; unsigned int B2u1BWGiven; unsigned int B2u1D0Given; unsigned int B2u1DLGiven; unsigned int B2u1DWGiven; unsigned int B2n00Given; unsigned int B2n0LGiven; unsigned int B2n0WGiven; unsigned int B2nB0Given; unsigned int B2nBLGiven; unsigned int B2nBWGiven; unsigned int B2nD0Given; unsigned int B2nDLGiven; unsigned int B2nDWGiven; unsigned int B2vof00Given; unsigned int B2vof0LGiven; unsigned int B2vof0WGiven; unsigned int B2vofB0Given; unsigned int B2vofBLGiven; unsigned int B2vofBWGiven; unsigned int B2vofD0Given; unsigned int B2vofDLGiven; unsigned int B2vofDWGiven; unsigned int B2ai00Given; unsigned int B2ai0LGiven; unsigned int B2ai0WGiven; unsigned int B2aiB0Given; unsigned int B2aiBLGiven; unsigned int B2aiBWGiven; unsigned int B2bi00Given; unsigned int B2bi0LGiven; unsigned int B2bi0WGiven; unsigned int B2biB0Given; unsigned int B2biBLGiven; unsigned int B2biBWGiven; unsigned int B2vghigh0Given; unsigned int B2vghighLGiven; unsigned int B2vghighWGiven; unsigned int B2vglow0Given; unsigned int B2vglowLGiven; unsigned int B2vglowWGiven; unsigned int B2toxGiven; unsigned int B2tempGiven; unsigned int B2vddGiven; unsigned int B2vggGiven; unsigned int B2vbbGiven; unsigned int B2gateSourceOverlapCapGiven; unsigned int B2gateDrainOverlapCapGiven; unsigned int B2gateBulkOverlapCapGiven; unsigned int B2channelChargePartitionFlagGiven; unsigned int B2sheetResistanceGiven; unsigned int B2jctSatCurDensityGiven; unsigned int B2bulkJctPotentialGiven; unsigned int B2bulkJctBotGradingCoeffGiven; unsigned int B2sidewallJctPotentialGiven; unsigned int B2bulkJctSideGradingCoeffGiven; unsigned int B2unitAreaJctCapGiven; unsigned int B2unitLengthSidewallJctCapGiven; unsigned int B2defaultWidthGiven; unsigned int B2deltaLengthGiven; unsigned int B2fNcoefGiven; unsigned int B2fNexpGiven; unsigned int B2typeGiven; } *B2modPtr; struct sBSIM2instance *B2nextInstance; char *B2name; int B2owner; int B2states; int B2dNode; int B2gNode; int B2sNode; int B2bNode; int B2dNodePrime; int B2sNodePrime; double B2l; double B2w; double B2m; double B2drainArea; double B2sourceArea; double B2drainSquares; double B2sourceSquares; double B2drainPerimeter; double B2sourcePerimeter; double B2sourceConductance; double B2drainConductance; double B2icVBS; double B2icVDS; double B2icVGS; double B2von; double B2vdsat; int B2off; int B2mode; struct bsim2SizeDependParam *pParam; unsigned int B2lGiven; unsigned int B2wGiven; unsigned int B2mGiven; unsigned int B2drainAreaGiven; unsigned int B2sourceAreaGiven; unsigned int B2drainSquaresGiven; unsigned int B2sourceSquaresGiven; unsigned int B2drainPerimeterGiven; unsigned int B2sourcePerimeterGiven; unsigned int B2dNodePrimeSet; unsigned int B2sNodePrimeSet; unsigned int B2icVBSGiven; unsigned int B2icVDSGiven; unsigned int B2icVGSGiven; unsigned int B2vonGiven; unsigned int B2vdsatGiven; double *B2DdPtr; double *B2GgPtr; double *B2SsPtr; double *B2BbPtr; double *B2DPdpPtr; double *B2SPspPtr; double *B2DdpPtr; double *B2GbPtr; double *B2GdpPtr; double *B2GspPtr; double *B2SspPtr; double *B2BdpPtr; double *B2BspPtr; double *B2DPspPtr; double *B2DPdPtr; double *B2BgPtr; double *B2DPgPtr; double *B2SPgPtr; double *B2SPsPtr; double *B2DPbPtr; double *B2SPbPtr; double *B2SPdpPtr; double B2nVar[3][5]; } *

variable_types: xnrm int

variable_types: xrev int

variable_types: gdpr double

variable_types: gspr double

variable_types: gm double

variable_types: gds double

variable_types: gmbs double

variable_types: gbd double

variable_types: gbs double

variable_types: capbd double

variable_types: capbs double

variable_types: xcggb double

variable_types: xcgdb double

variable_types: xcgsb double

variable_types: xcbgb double

variable_types: xcbdb double

variable_types: xcbsb double

variable_types: xcddb double

variable_types: xcssb double

variable_types: xcdgb double

variable_types: xcsgb double

variable_types: xcdsb double

variable_types: xcsdb double

variable_types: cggb double

variable_types: cgdb double

variable_types: cgsb double

variable_types: cbgb double

variable_types: cbdb double

variable_types: cbsb double

variable_types: cddb double

variable_types: cdgb double

variable_types: cdsb double

variable_types: m double

return_type: int

user_defined_types: struct sGENmodel { int GENmodType; struct sGENmodel *GENnextModel; struct sGENinstance *GENinstances; char *GENmodName; }

user_defined_types: struct CKTcircuit { struct sGENmodel **CKThead; struct STATistics *CKTstat; double *CKTstates[8]; double CKTtime; double CKTdelta; double CKTdeltaOld[7]; double CKTtemp; double CKTnomTemp; double CKTvt; double CKTag[7]; double CKTagp[7]; int CKTorder; int CKTmaxOrder; int CKTintegrateMethod; void *CKTmatrix; int CKTniState; double *CKTrhs; double *CKTrhsOld; double *CKTrhsSpare; double *CKTirhs; double *CKTirhsOld; double *CKTirhsSpare; double *CKTpred; double *CKTsols[8]; double *CKTrhsOp; double *CKTsenRhs; double *CKTseniRhs; int CKTmaxEqNum; int CKTcurrentAnalysis; struct sCKTnode *CKTnodes; struct sCKTnode *CKTlastNode; int CKTnumStates; long CKTmode; int CKTbypass; int CKTdcMaxIter; int CKTdcTrcvMaxIter; int CKTtranMaxIter; int CKTbreakSize; int CKTbreak; double CKTsaveDelta; double CKTminBreak; double *CKTbreaks; double CKTabstol; double CKTpivotAbsTol; double CKTpivotRelTol; double CKTreltol; double CKTchgtol; double CKTvoltTol; double CKTgmin; double CKTgshunt; double CKTdelmin; double CKTtrtol; double CKTfinalTime; double CKTstep; double CKTmaxStep; double CKTinitTime; double CKTomega; double CKTsrcFact; double CKTdiagGmin; int CKTnumSrcSteps; int CKTnumGminSteps; double CKTgminFactor; int CKTnoncon; double CKTdefaultMosM; double CKTdefaultMosL; double CKTdefaultMosW; double CKTdefaultMosAD; double CKTdefaultMosAS; unsigned int CKThadNodeset; unsigned int CKTfixLimit; unsigned int CKTnoOpIter; unsigned int CKTisSetup; struct sJOB *CKTcurJob; struct SENstruct *CKTsenInfo; double *CKTtimePoints; double *CKTdeltaList; int CKTtimeListSize; int CKTtimeIndex; int CKTsizeIncr; unsigned int CKTtryToCompact; unsigned int CKTbadMos3; unsigned int CKTkeepOpInfo; unsigned int CKTcopyNodesets; unsigned int CKTnodeDamping; double CKTabsDv; double CKTrelDv; int CKTtroubleNode; struct sGENinstance *CKTtroubleElt; }

user_defined_types: struct sBSIM2model { int B2modType; struct sBSIM2model *B2nextModel; struct sBSIM2instance *B2instances; char *B2modName; int B2type; int pad; double B2vfb0; double B2vfbL; double B2vfbW; double B2phi0; double B2phiL; double B2phiW; double B2k10; double B2k1L; double B2k1W; double B2k20; double B2k2L; double B2k2W; double B2eta00; double B2eta0L; double B2eta0W; double B2etaB0; double B2etaBL; double B2etaBW; double B2deltaL; double B2deltaW; double B2mob00; double B2mob0B0; double B2mob0BL; double B2mob0BW; double B2mobs00; double B2mobs0L; double B2mobs0W; double B2mobsB0; double B2mobsBL; double B2mobsBW; double B2mob200; double B2mob20L; double B2mob20W; double B2mob2B0; double B2mob2BL; double B2mob2BW; double B2mob2G0; double B2mob2GL; double B2mob2GW; double B2mob300; double B2mob30L; double B2mob30W; double B2mob3B0; double B2mob3BL; double B2mob3BW; double B2mob3G0; double B2mob3GL; double B2mob3GW; double B2mob400; double B2mob40L; double B2mob40W; double B2mob4B0; double B2mob4BL; double B2mob4BW; double B2mob4G0; double B2mob4GL; double B2mob4GW; double B2ua00; double B2ua0L; double B2ua0W; double B2uaB0; double B2uaBL; double B2uaBW; double B2ub00; double B2ub0L; double B2ub0W; double B2ubB0; double B2ubBL; double B2ubBW; double B2u100; double B2u10L; double B2u10W; double B2u1B0; double B2u1BL; double B2u1BW; double B2u1D0; double B2u1DL; double B2u1DW; double B2n00; double B2n0L; double B2n0W; double B2nB0; double B2nBL; double B2nBW; double B2nD0; double B2nDL; double B2nDW; double B2vof00; double B2vof0L; double B2vof0W; double B2vofB0; double B2vofBL; double B2vofBW; double B2vofD0; double B2vofDL; double B2vofDW; double B2ai00; double B2ai0L; double B2ai0W; double B2aiB0; double B2aiBL; double B2aiBW; double B2bi00; double B2bi0L; double B2bi0W; double B2biB0; double B2biBL; double B2biBW; double B2vghigh0; double B2vghighL; double B2vghighW; double B2vglow0; double B2vglowL; double B2vglowW; double B2tox; double B2Cox; double B2temp; double B2vdd; double B2vdd2; double B2vgg; double B2vgg2; double B2vbb; double B2vbb2; double B2gateSourceOverlapCap; double B2gateDrainOverlapCap; double B2gateBulkOverlapCap; double B2Vtm; double B2sheetResistance; double B2jctSatCurDensity; double B2bulkJctPotential; double B2bulkJctBotGradingCoeff; double B2bulkJctSideGradingCoeff; double B2sidewallJctPotential; double B2unitAreaJctCap; double B2unitLengthSidewallJctCap; double B2defaultWidth; double B2deltaLength; double B2fNcoef; double B2fNexp; struct bsim2SizeDependParam *pSizeDependParamKnot; unsigned int B2channelChargePartitionFlag; unsigned int B2vfb0Given; unsigned int B2vfbLGiven; unsigned int B2vfbWGiven; unsigned int B2phi0Given; unsigned int B2phiLGiven; unsigned int B2phiWGiven; unsigned int B2k10Given; unsigned int B2k1LGiven; unsigned int B2k1WGiven; unsigned int B2k20Given; unsigned int B2k2LGiven; unsigned int B2k2WGiven; unsigned int B2eta00Given; unsigned int B2eta0LGiven; unsigned int B2eta0WGiven; unsigned int B2etaB0Given; unsigned int B2etaBLGiven; unsigned int B2etaBWGiven; unsigned int B2deltaLGiven; unsigned int B2deltaWGiven; unsigned int B2mob00Given; unsigned int B2mob0B0Given; unsigned int B2mob0BLGiven; unsigned int B2mob0BWGiven; unsigned int B2mobs00Given; unsigned int B2mobs0LGiven; unsigned int B2mobs0WGiven; unsigned int B2mobsB0Given; unsigned int B2mobsBLGiven; unsigned int B2mobsBWGiven; unsigned int B2mob200Given; unsigned int B2mob20LGiven; unsigned int B2mob20WGiven; unsigned int B2mob2B0Given; unsigned int B2mob2BLGiven; unsigned int B2mob2BWGiven; unsigned int B2mob2G0Given; unsigned int B2mob2GLGiven; unsigned int B2mob2GWGiven; unsigned int B2mob300Given; unsigned int B2mob30LGiven; unsigned int B2mob30WGiven; unsigned int B2mob3B0Given; unsigned int B2mob3BLGiven; unsigned int B2mob3BWGiven; unsigned int B2mob3G0Given; unsigned int B2mob3GLGiven; unsigned int B2mob3GWGiven; unsigned int B2mob400Given; unsigned int B2mob40LGiven; unsigned int B2mob40WGiven; unsigned int B2mob4B0Given; unsigned int B2mob4BLGiven; unsigned int B2mob4BWGiven; unsigned int B2mob4G0Given; unsigned int B2mob4GLGiven; unsigned int B2mob4GWGiven; unsigned int B2ua00Given; unsigned int B2ua0LGiven; unsigned int B2ua0WGiven; unsigned int B2uaB0Given; unsigned int B2uaBLGiven; unsigned int B2uaBWGiven; unsigned int B2ub00Given; unsigned int B2ub0LGiven; unsigned int B2ub0WGiven; unsigned int B2ubB0Given; unsigned int B2ubBLGiven; unsigned int B2ubBWGiven; unsigned int B2u100Given; unsigned int B2u10LGiven; unsigned int B2u10WGiven; unsigned int B2u1B0Given; unsigned int B2u1BLGiven; unsigned int B2u1BWGiven; unsigned int B2u1D0Given; unsigned int B2u1DLGiven; unsigned int B2u1DWGiven; unsigned int B2n00Given; unsigned int B2n0LGiven; unsigned int B2n0WGiven; unsigned int B2nB0Given; unsigned int B2nBLGiven; unsigned int B2nBWGiven; unsigned int B2nD0Given; unsigned int B2nDLGiven; unsigned int B2nDWGiven; unsigned int B2vof00Given; unsigned int B2vof0LGiven; unsigned int B2vof0WGiven; unsigned int B2vofB0Given; unsigned int B2vofBLGiven; unsigned int B2vofBWGiven; unsigned int B2vofD0Given; unsigned int B2vofDLGiven; unsigned int B2vofDWGiven; unsigned int B2ai00Given; unsigned int B2ai0LGiven; unsigned int B2ai0WGiven; unsigned int B2aiB0Given; unsigned int B2aiBLGiven; unsigned int B2aiBWGiven; unsigned int B2bi00Given; unsigned int B2bi0LGiven; unsigned int B2bi0WGiven; unsigned int B2biB0Given; unsigned int B2biBLGiven; unsigned int B2biBWGiven; unsigned int B2vghigh0Given; unsigned int B2vghighLGiven; unsigned int B2vghighWGiven; unsigned int B2vglow0Given; unsigned int B2vglowLGiven; unsigned int B2vglowWGiven; unsigned int B2toxGiven; unsigned int B2tempGiven; unsigned int B2vddGiven; unsigned int B2vggGiven; unsigned int B2vbbGiven; unsigned int B2gateSourceOverlapCapGiven; unsigned int B2gateDrainOverlapCapGiven; unsigned int B2gateBulkOverlapCapGiven; unsigned int B2channelChargePartitionFlagGiven; unsigned int B2sheetResistanceGiven; unsigned int B2jctSatCurDensityGiven; unsigned int B2bulkJctPotentialGiven; unsigned int B2bulkJctBotGradingCoeffGiven; unsigned int B2sidewallJctPotentialGiven; unsigned int B2bulkJctSideGradingCoeffGiven; unsigned int B2unitAreaJctCapGiven; unsigned int B2unitLengthSidewallJctCapGiven; unsigned int B2defaultWidthGiven; unsigned int B2deltaLengthGiven; unsigned int B2fNcoefGiven; unsigned int B2fNexpGiven; unsigned int B2typeGiven; }

user_defined_types: struct sBSIM2instance { struct sBSIM2model *B2modPtr; struct sBSIM2instance *B2nextInstance; char *B2name; int B2owner; int B2states; int B2dNode; int B2gNode; int B2sNode; int B2bNode; int B2dNodePrime; int B2sNodePrime; double B2l; double B2w; double B2m; double B2drainArea; double B2sourceArea; double B2drainSquares; double B2sourceSquares; double B2drainPerimeter; double B2sourcePerimeter; double B2sourceConductance; double B2drainConductance; double B2icVBS; double B2icVDS; double B2icVGS; double B2von; double B2vdsat; int B2off; int B2mode; struct bsim2SizeDependParam *pParam; unsigned int B2lGiven; unsigned int B2wGiven; unsigned int B2mGiven; unsigned int B2drainAreaGiven; unsigned int B2sourceAreaGiven; unsigned int B2drainSquaresGiven; unsigned int B2sourceSquaresGiven; unsigned int B2drainPerimeterGiven; unsigned int B2sourcePerimeterGiven; unsigned int B2dNodePrimeSet; unsigned int B2sNodePrimeSet; unsigned int B2icVBSGiven; unsigned int B2icVDSGiven; unsigned int B2icVGSGiven; unsigned int B2vonGiven; unsigned int B2vdsatGiven; double *B2DdPtr; double *B2GgPtr; double *B2SsPtr; double *B2BbPtr; double *B2DPdpPtr; double *B2SPspPtr; double *B2DdpPtr; double *B2GbPtr; double *B2GdpPtr; double *B2GspPtr; double *B2SspPtr; double *B2BdpPtr; double *B2BspPtr; double *B2DPspPtr; double *B2DPdPtr; double *B2BgPtr; double *B2DPgPtr; double *B2SPgPtr; double *B2SPsPtr; double *B2DPbPtr; double *B2SPbPtr; double *B2SPdpPtr; double B2nVar[3][5]; }

user_defined_types: struct sGENinstance { struct sGENmodel *GENmodPtr; struct sGENinstance *GENnextInstance; char *GENname; int GENowner; int GENstate; int GENnode1; int GENnode2; int GENnode3; int GENnode4; int GENnode5; int GENnode6; int GENnode7; }


RESparam

original_code:
int
RESparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
{
    RESinstance *here = (RESinstance *)inst;
    switch(param) {
        case 8:
            here->REStemp = value->rValue + (273.15);
            here->REStempGiven = 1;
            break;
 case 14:
            here->RESdtemp = value->rValue;
            here->RESdtempGiven = 1;
            break;
        case 1:
            here->RESresist = value->rValue;
            here->RESresGiven = 1;
            break;
        case 10:
     here->RESacResist = value->rValue;
     here->RESacresGiven = 1;
     break;
 case 2:
            here->RESwidth = value->rValue;
            here->RESwidthGiven = 1;
            break;
        case 3:
            here->RESlength = value->rValue;
            here->RESlengthGiven = 1;
            break;
 case 13:
     here->RESscale = value->rValue;
     here->RESscaleGiven = 1;
     break;
        case 5:
            here->RESsenParmNo = value->iValue;
     break;
 case 12:
     here->RESm = value->rValue;
     here->RESmGiven = 1;
            break;
 case 16:
     here->REStc1 = value->rValue;
     here->REStc1Given = 1;
            break;
 case 17:
     here->REStc2 = value->rValue;
     here->REStc2Given = 1;
            break;
 case 15:
     here->RESnoisy = value->iValue;
     here->RESnoisyGiven = 1;
     break;
        default:
            return(7);
    }
    return(0);
}

canonical_original_code:
int RESparam(int param, union uIFvalue *value, struct sGENinstance *inst, union uIFvalue *select)
{
    struct sRESinstance *here = (RESinstance *)inst;
    switch(param) {
        case 8:
            here->REStemp = value->rValue + (273.15);
            here->REStempGiven = 1;
            break;
 case 14:
            here->RESdtemp = value->rValue;
            here->RESdtempGiven = 1;
            break;
        case 1:
            here->RESresist = value->rValue;
            here->RESresGiven = 1;
            break;
        case 10:
     here->RESacResist = value->rValue;
     here->RESacresGiven = 1;
     break;
 case 2:
            here->RESwidth = value->rValue;
            here->RESwidthGiven = 1;
            break;
        case 3:
            here->RESlength = value->rValue;
            here->RESlengthGiven = 1;
            break;
 case 13:
     here->RESscale = value->rValue;
     here->RESscaleGiven = 1;
     break;
        case 5:
            here->RESsenParmNo = value->iValue;
     break;
 case 12:
     here->RESm = value->rValue;
     here->RESmGiven = 1;
            break;
 case 16:
     here->REStc1 = value->rValue;
     here->REStc1Given = 1;
            break;
 case 17:
     here->REStc2 = value->rValue;
     here->REStc2Given = 1;
            break;
 case 15:
     here->RESnoisy = value->iValue;
     here->RESnoisyGiven = 1;
     break;
        default:
            return(7);
    }
    return(0);
}

variable_types: param int

variable_types: union uIFvalue { int iValue; double rValue; struct sIFcomplex { double real; double imag; } cValue; char *sValue; char *uValue; void *nValue; struct sIFparseTree { int numVars; int *varTypes; union uIFvalue *vars; int (*IFeval)(struct sIFparseTree *, double, double *, double *, double *); } *tValue; struct { int numValue; union { int *iVec; double *rVec; struct sIFcomplex *cVec; char **sVec; char **uVec; void **nVec; } vec; } v; } *

variable_types: struct sGENinstance { struct sGENmodel { int GENmodType; struct sGENmodel *GENnextModel; struct sGENinstance *GENinstances; char *GENmodName; } *GENmodPtr; struct sGENinstance *GENnextInstance; char *GENname; int GENowner; int GENstate; int GENnode1; int GENnode2; int GENnode3; int GENnode4; int GENnode5; int GENnode6; int GENnode7; } *

variable_types:
select
union uIFvalue *

variable_types: struct sRESinstance { struct sRESmodel { int RESmodType; struct sRESmodel *RESnextModel; struct sRESinstance *RESinstances; char *RESmodName; double REStnom; double REStempCoeff1; double REStempCoeff2; double RESsheetRes; double RESdefWidth; double RESnarrow; double RESshort; double RESfNcoef; double RESfNexp; unsigned int REStnomGiven; unsigned int REStc1Given; unsigned int REStc2Given; unsigned int RESsheetResGiven; unsigned int RESdefWidthGiven; unsigned int RESnarrowGiven; unsigned int RESshortGiven; unsigned int RESfNcoefGiven; unsigned int RESfNexpGiven; } *RESmodPtr; struct sRESinstance *RESnextInstance; char *RESname; int RESowner; int RESstate; int RESposNode; int RESnegNode; double REStemp; double RESdtemp; double RESconduct; double RESresist; double REScurrent; double RESacResist; double RESacConduct; double RESwidth; double RESlength; double RESscale; double RESm; double REStc1; double REStc2; int RESnoisy; double *RESposPosptr; double *RESnegNegptr; double *RESposNegptr; double *RESnegPosptr; unsigned int RESresGiven; unsigned int RESwidthGiven; unsigned int RESlengthGiven; unsigned int RESscaleGiven; unsigned int REStempGiven; unsigned int RESdtempGiven; unsigned int RESacresGiven; unsigned int RESmGiven; unsigned int REStc1Given; unsigned int REStc2Given; unsigned int RESnoisyGiven; int RESsenParmNo; double RESnVar[3][3]; } *

user_defined_types: struct sRESinstance { struct sRESmodel *RESmodPtr; struct sRESinstance *RESnextInstance; char *RESname; int RESowner; int RESstate; int RESposNode; int RESnegNode; double REStemp; double RESdtemp; double RESconduct; double RESresist; double REScurrent; double RESacResist; double RESacConduct; double RESwidth; double RESlength; double RESscale; double RESm; double REStc1; double REStc2; int RESnoisy; double *RESposPosptr; double *RESnegNegptr; double *RESposNegptr; double *RESnegPosptr; unsigned int RESresGiven; unsigned int RESwidthGiven; unsigned int RESlengthGiven; unsigned int RESscaleGiven; unsigned int REStempGiven; unsigned int RESdtempGiven; unsigned int RESacresGiven; unsigned int RESmGiven; unsigned int REStc1Given; unsigned int REStc2Given; unsigned int RESnoisyGiven; int RESsenParmNo; double RESnVar[3][3]; }


original_code:
int
B2trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
{
    B2model *model = (B2model*)inModel;
    B2instance *here;
    for( ; model != ((void *)0); model = model->B2nextModel) {
        for(here=model->B2instances;here!=((void *)0);here = here->B2nextInstance){
     if (here->B2owner != ARCHme) continue;
            CKTterr(here->B2states+ 12,ckt,timeStep);
            CKTterr(here->B2states+ 14,ckt,timeStep);
            CKTterr(here->B2states+ 16,ckt,timeStep);
        }
    }
    return(0);
}

canonical_original_code:
int B2trunc(struct sGENmodel *inModel, struct CKTcircuit *ckt, double *timeStep)
{
    struct sBSIM2model *model = (B2model*)inModel;
    struct sBSIM2instance *here;
    for( ; model != ((void *)0); model = model->B2nextModel) {
        for(here=model->B2instances;here!=((void *)0);here = here->B2nextInstance){
     if (here->B2owner != ARCHme) continue;
            CKTterr(here->B2states+ 12,ckt,timeStep);
            CKTterr(here->B2states+ 14,ckt,timeStep);
            CKTterr(here->B2states+ 16,ckt,timeStep);
        }
    }
    return(0);
}

variable_types: struct sGENmodel { int GENmodType; struct sGENmodel *GENnextModel; struct sGENinstance { struct sGENmodel *GENmodPtr; struct sGENinstance *GENnextInstance; char *GENname; int GENowner; int GENstate; int GENnode1; int GENnode2; int GENnode3; int GENnode4; int GENnode5; int GENnode6; int GENnode7; } *GENinstances; char *GENmodName; } *

variable_types: struct CKTcircuit { struct sGENmodel **CKThead; struct STATistics { int STATnumIter; int STATtranIter; int STAToldIter; int STATtimePts; int STATaccepted; int STATrejected; double STATtotAnalTime; double STATloadTime; double STATdecompTime; double STATsolveTime; double STATreorderTime; double STATcombineTime; double STATsyncTime; double STATtranTime; double STATtranDecompTime; double STATtranSolveTime; double STATtranLoadTime; double STATtranTruncTime; double STATtranCombTime; double STATtranSyncTime; double STATacTime; double STATacDecompTime; double STATacSolveTime; double STATacLoadTime; double STATacCombTime; double STATacSyncTime; } *CKTstat; double *CKTstates[8]; double CKTtime; double CKTdelta; double CKTdeltaOld[7]; double CKTtemp; double CKTnomTemp; double CKTvt; double CKTag[7]; double CKTagp[7]; int CKTorder; int CKTmaxOrder; int CKTintegrateMethod; void *CKTmatrix; int CKTniState; double *CKTrhs; double *CKTrhsOld; double *CKTrhsSpare; double *CKTirhs; double *CKTirhsOld; double *CKTirhsSpare; double *CKTpred; double *CKTsols[8]; double *CKTrhsOp; double *CKTsenRhs; double *CKTseniRhs; int CKTmaxEqNum; int CKTcurrentAnalysis; struct sCKTnode { char *name; int type; int number; double ic; double nodeset; double *ptr; struct sCKTnode *next; unsigned int icGiven; unsigned int nsGiven; } *CKTnodes; struct sCKTnode *CKTlastNode; int CKTnumStates; long CKTmode; int CKTbypass; int CKTdcMaxIter; int CKTdcTrcvMaxIter; int CKTtranMaxIter; int CKTbreakSize; int CKTbreak; double CKTsaveDelta; double CKTminBreak; double *CKTbreaks; double CKTabstol; double CKTpivotAbsTol; double CKTpivotRelTol; double CKTreltol; double CKTchgtol; double CKTvoltTol; double CKTgmin; double CKTgshunt; double CKTdelmin; double CKTtrtol; double CKTfinalTime; double CKTstep; double CKTmaxStep; double CKTinitTime; double CKTomega; double CKTsrcFact; double CKTdiagGmin; int CKTnumSrcSteps; int CKTnumGminSteps; double CKTgminFactor; int CKTnoncon; double CKTdefaultMosM; double CKTdefaultMosL; double CKTdefaultMosW; double CKTdefaultMosAD; double CKTdefaultMosAS; unsigned int CKThadNodeset; unsigned int CKTfixLimit; unsigned int CKTnoOpIter; unsigned int CKTisSetup; struct sJOB { int JOBtype; struct sJOB *JOBnextJob; char *JOBname; } *CKTcurJob; struct SENstruct { int JOBtype; struct sJOB *JOBnextJob; char *JOBname; int SENnumVal; char **SENdevices; char **SENparmNames; unsigned int SENinitflag; unsigned int SENicflag; unsigned int SENstatus; unsigned int SENacpertflag; int SENmode; int SENparms; double SENpertfac; double **SEN_Sap; double **SEN_RHS; double **SEN_iRHS; int SENsize; void *SEN_Jacmat; double *SEN_parmVal; char **SEN_parmName; } *CKTsenInfo; double *CKTtimePoints; double *CKTdeltaList; int CKTtimeListSize; int CKTtimeIndex; int CKTsizeIncr; unsigned int CKTtryToCompact; unsigned int CKTbadMos3; unsigned int CKTkeepOpInfo; unsigned int CKTcopyNodesets; unsigned int CKTnodeDamping; double CKTabsDv; double CKTrelDv; int CKTtroubleNode; struct sGENinstance *CKTtroubleElt; } *

variable_types:
timeStep
double *

variable_types: struct sBSIM2model { int B2modType; struct sBSIM2model *B2nextModel; struct sBSIM2instance { struct sBSIM2model *B2modPtr; struct sBSIM2instance *B2nextInstance; char *B2name; int B2owner; int B2states; int B2dNode; int B2gNode; int B2sNode; int B2bNode; int B2dNodePrime; int B2sNodePrime; double B2l; double B2w; double B2m; double B2drainArea; double B2sourceArea; double B2drainSquares; double B2sourceSquares; double B2drainPerimeter; double B2sourcePerimeter; double B2sourceConductance; double B2drainConductance; double B2icVBS; double B2icVDS; double B2icVGS; double B2von; double B2vdsat; int B2off; int B2mode; struct bsim2SizeDependParam { double Width; double Length; double B2vfb; double B2phi; double B2k1; double B2k2; double B2eta0; double B2etaB; double B2beta0; double B2beta0B; double B2betas0; double B2betasB; double B2beta20; double B2beta2B; double B2beta2G; double B2beta30; double B2beta3B; double B2beta3G; double B2beta40; double B2beta4B; double B2beta4G; double B2ua0; double B2uaB; double B2ub0; double B2ubB; double B2u10; double B2u1B; double B2u1D; double B2n0; double B2nB; double B2nD; double B2vof0; double B2vofB; double B2vofD; double B2ai0; double B2aiB; double B2bi0; double B2biB; double B2vghigh; double B2vglow; double B2GDoverlapCap; double B2GSoverlapCap; double B2GBoverlapCap; double SqrtPhi; double Phis3; double CoxWL; double One_Third_CoxWL; double Two_Third_CoxWL; double Arg; double B2vt0; struct bsim2SizeDependParam *pNext; } *pParam; unsigned int B2lGiven; unsigned int B2wGiven; unsigned int B2mGiven; unsigned int B2drainAreaGiven; unsigned int B2sourceAreaGiven; unsigned int B2drainSquaresGiven; unsigned int B2sourceSquaresGiven; unsigned int B2drainPerimeterGiven; unsigned int B2sourcePerimeterGiven; unsigned int B2dNodePrimeSet; unsigned int B2sNodePrimeSet; unsigned int B2icVBSGiven; unsigned int B2icVDSGiven; unsigned int B2icVGSGiven; unsigned int B2vonGiven; unsigned int B2vdsatGiven; double *B2DdPtr; double *B2GgPtr; double *B2SsPtr; double *B2BbPtr; double *B2DPdpPtr; double *B2SPspPtr; double *B2DdpPtr; double *B2GbPtr; double *B2GdpPtr; double *B2GspPtr; double *B2SspPtr; double *B2BdpPtr; double *B2BspPtr; double *B2DPspPtr; double *B2DPdPtr; double *B2BgPtr; double *B2DPgPtr; double *B2SPgPtr; double *B2SPsPtr; double *B2DPbPtr; double *B2SPbPtr; double *B2SPdpPtr; double B2nVar[3][5]; } *B2instances; char *B2modName; int B2type; int pad; double B2vfb0; double B2vfbL; double B2vfbW; double B2phi0; double B2phiL; double B2phiW; double B2k10; double B2k1L; double B2k1W; double B2k20; double B2k2L; double B2k2W; double B2eta00; double B2eta0L; double B2eta0W; double B2etaB0; double B2etaBL; double B2etaBW; double B2deltaL; double B2deltaW; double B2mob00; double B2mob0B0; double B2mob0BL; double B2mob0BW; double B2mobs00; double B2mobs0L; double B2mobs0W; double B2mobsB0; double B2mobsBL; double B2mobsBW; double B2mob200; double B2mob20L; double B2mob20W; double B2mob2B0; double B2mob2BL; double B2mob2BW; double B2mob2G0; double B2mob2GL; double B2mob2GW; double B2mob300; double B2mob30L; double B2mob30W; double B2mob3B0; double B2mob3BL; double B2mob3BW; double B2mob3G0; double B2mob3GL; double B2mob3GW; double B2mob400; double B2mob40L; double B2mob40W; double B2mob4B0; double B2mob4BL; double B2mob4BW; double B2mob4G0; double B2mob4GL; double B2mob4GW; double B2ua00; double B2ua0L; double B2ua0W; double B2uaB0; double B2uaBL; double B2uaBW; double B2ub00; double B2ub0L; double B2ub0W; double B2ubB0; double B2ubBL; double B2ubBW; double B2u100; double B2u10L; double B2u10W; double B2u1B0; double B2u1BL; double B2u1BW; double B2u1D0; double B2u1DL; double B2u1DW; double B2n00; double B2n0L; double B2n0W; double B2nB0; double B2nBL; double B2nBW; double B2nD0; double B2nDL; double B2nDW; double B2vof00; double B2vof0L; double B2vof0W; double B2vofB0; double B2vofBL; double B2vofBW; double B2vofD0; double B2vofDL; double B2vofDW; double B2ai00; double B2ai0L; double B2ai0W; double B2aiB0; double B2aiBL; double B2aiBW; double B2bi00; double B2bi0L; double B2bi0W; double B2biB0; double B2biBL; double B2biBW; double B2vghigh0; double B2vghighL; double B2vghighW; double B2vglow0; double B2vglowL; double B2vglowW; double B2tox; double B2Cox; double B2temp; double B2vdd; double B2vdd2; double B2vgg; double B2vgg2; double B2vbb; double B2vbb2; double B2gateSourceOverlapCap; double B2gateDrainOverlapCap; double B2gateBulkOverlapCap; double B2Vtm; double B2sheetResistance; double B2jctSatCurDensity; double B2bulkJctPotential; double B2bulkJctBotGradingCoeff; double B2bulkJctSideGradingCoeff; double B2sidewallJctPotential; double B2unitAreaJctCap; double B2unitLengthSidewallJctCap; double B2defaultWidth; double B2deltaLength; double B2fNcoef; double B2fNexp; struct bsim2SizeDependParam *pSizeDependParamKnot; unsigned int B2channelChargePartitionFlag; unsigned int B2vfb0Given; unsigned int B2vfbLGiven; unsigned int B2vfbWGiven; unsigned int B2phi0Given; unsigned int B2phiLGiven; unsigned int B2phiWGiven; unsigned int B2k10Given; unsigned int B2k1LGiven; unsigned int B2k1WGiven; unsigned int B2k20Given; unsigned int B2k2LGiven; unsigned int B2k2WGiven; unsigned int B2eta00Given; unsigned int B2eta0LGiven; unsigned int B2eta0WGiven; unsigned int B2etaB0Given; unsigned int B2etaBLGiven; unsigned int B2etaBWGiven; unsigned int B2deltaLGiven; unsigned int B2deltaWGiven; unsigned int B2mob00Given; unsigned int B2mob0B0Given; unsigned int B2mob0BLGiven; unsigned int B2mob0BWGiven; unsigned int B2mobs00Given; unsigned int B2mobs0LGiven; unsigned int B2mobs0WGiven; unsigned int B2mobsB0Given; unsigned int B2mobsBLGiven; unsigned int B2mobsBWGiven; unsigned int B2mob200Given; unsigned int B2mob20LGiven; unsigned int B2mob20WGiven; unsigned int B2mob2B0Given; unsigned int B2mob2BLGiven; unsigned int B2mob2BWGiven; unsigned int B2mob2G0Given; unsigned int B2mob2GLGiven; unsigned int B2mob2GWGiven; unsigned int B2mob300Given; unsigned int B2mob30LGiven; unsigned int B2mob30WGiven; unsigned int B2mob3B0Given; unsigned int B2mob3BLGiven; unsigned int B2mob3BWGiven; unsigned int B2mob3G0Given; unsigned int B2mob3GLGiven; unsigned int B2mob3GWGiven; unsigned int B2mob400Given; unsigned int B2mob40LGiven; unsigned int B2mob40WGiven; unsigned int B2mob4B0Given; unsigned int B2mob4BLGiven; unsigned int B2mob4BWGiven; unsigned int B2mob4G0Given; unsigned int B2mob4GLGiven; unsigned int B2mob4GWGiven; unsigned int B2ua00Given; unsigned int B2ua0LGiven; unsigned int B2ua0WGiven; unsigned int B2uaB0Given; unsigned int B2uaBLGiven; unsigned int B2uaBWGiven; unsigned int B2ub00Given; unsigned int B2ub0LGiven; unsigned int B2ub0WGiven; unsigned int B2ubB0Given; unsigned int B2ubBLGiven; unsigned int B2ubBWGiven; unsigned int B2u100Given; unsigned int B2u10LGiven; unsigned int B2u10WGiven; unsigned int B2u1B0Given; unsigned int B2u1BLGiven; unsigned int B2u1BWGiven; unsigned int B2u1D0Given; unsigned int B2u1DLGiven; unsigned int B2u1DWGiven; unsigned int B2n00Given; unsigned int B2n0LGiven; unsigned int B2n0WGiven; unsigned int B2nB0Given; unsigned int B2nBLGiven; unsigned int B2nBWGiven; unsigned int B2nD0Given; unsigned int B2nDLGiven; unsigned int B2nDWGiven; unsigned int B2vof00Given; unsigned int B2vof0LGiven; unsigned int B2vof0WGiven; unsigned int B2vofB0Given; unsigned int B2vofBLGiven; unsigned int B2vofBWGiven; unsigned int B2vofD0Given; unsigned int B2vofDLGiven; unsigned int B2vofDWGiven; unsigned int B2ai00Given; unsigned int B2ai0LGiven; unsigned int B2ai0WGiven; unsigned int B2aiB0Given; unsigned int B2aiBLGiven; unsigned int B2aiBWGiven; unsigned int B2bi00Given; unsigned int B2bi0LGiven; unsigned int B2bi0WGiven; unsigned int B2biB0Given; unsigned int B2biBLGiven; unsigned int B2biBWGiven; unsigned int B2vghigh0Given; unsigned int B2vghighLGiven; unsigned int B2vghighWGiven; unsigned int B2vglow0Given; unsigned int B2vglowLGiven; unsigned int B2vglowWGiven; unsigned int B2toxGiven; unsigned int B2tempGiven; unsigned int B2vddGiven; unsigned int B2vggGiven; unsigned int B2vbbGiven; unsigned int B2gateSourceOverlapCapGiven; unsigned int B2gateDrainOverlapCapGiven; unsigned int B2gateBulkOverlapCapGiven; unsigned int B2channelChargePartitionFlagGiven; unsigned int B2sheetResistanceGiven; unsigned int B2jctSatCurDensityGiven; unsigned int B2bulkJctPotentialGiven; unsigned int B2bulkJctBotGradingCoeffGiven; unsigned int B2sidewallJctPotentialGiven; unsigned int B2bulkJctSideGradingCoeffGiven; unsigned int B2unitAreaJctCapGiven; unsigned int B2unitLengthSidewallJctCapGiven; unsigned int B2defaultWidthGiven; unsigned int B2deltaLengthGiven; unsigned int B2fNcoefGiven; unsigned int B2fNexpGiven; unsigned int B2typeGiven; } *

variable_types: struct sBSIM2instance { struct sBSIM2model { int B2modType; struct sBSIM2model *B2nextModel; struct sBSIM2instance *B2instances; char *B2modName; int B2type; int pad; double B2vfb0; double B2vfbL; double B2vfbW; double B2phi0; double B2phiL; double B2phiW; double B2k10; double B2k1L; double B2k1W; double B2k20; double B2k2L; double B2k2W; double B2eta00; double B2eta0L; double B2eta0W; double B2etaB0; double B2etaBL; double B2etaBW; double B2deltaL; double B2deltaW; double B2mob00; double B2mob0B0; double B2mob0BL; double B2mob0BW; double B2mobs00; double B2mobs0L; double B2mobs0W; double B2mobsB0; double B2mobsBL; double B2mobsBW; double B2mob200; double B2mob20L; double B2mob20W; double B2mob2B0; double B2mob2BL; double B2mob2BW; double B2mob2G0; double B2mob2GL; double B2mob2GW; double B2mob300; double B2mob30L; double B2mob30W; double B2mob3B0; double B2mob3BL; double B2mob3BW; double B2mob3G0; double B2mob3GL; double B2mob3GW; double B2mob400; double B2mob40L; double B2mob40W; double B2mob4B0; double B2mob4BL; double B2mob4BW; double B2mob4G0; double B2mob4GL; double B2mob4GW; double B2ua00; double B2ua0L; double B2ua0W; double B2uaB0; double B2uaBL; double B2uaBW; double B2ub00; double B2ub0L; double B2ub0W; double B2ubB0; double B2ubBL; double B2ubBW; double B2u100; double B2u10L; double B2u10W; double B2u1B0; double B2u1BL; double B2u1BW; double B2u1D0; double B2u1DL; double B2u1DW; double B2n00; double B2n0L; double B2n0W; double B2nB0; double B2nBL; double B2nBW; double B2nD0; double B2nDL; double B2nDW; double B2vof00; double B2vof0L; double B2vof0W; double B2vofB0; double B2vofBL; double B2vofBW; double B2vofD0; double B2vofDL; double B2vofDW; double B2ai00; double B2ai0L; double B2ai0W; double B2aiB0; double B2aiBL; double B2aiBW; double B2bi00; double B2bi0L; double B2bi0W; double B2biB0; double B2biBL; double B2biBW; double B2vghigh0; double B2vghighL; double B2vghighW; double B2vglow0; double B2vglowL; double B2vglowW; double B2tox; double B2Cox; double B2temp; double B2vdd; double B2vdd2; double B2vgg; double B2vgg2; double B2vbb; double B2vbb2; double B2gateSourceOverlapCap; double B2gateDrainOverlapCap; double B2gateBulkOverlapCap; double B2Vtm; double B2sheetResistance; double B2jctSatCurDensity; double B2bulkJctPotential; double B2bulkJctBotGradingCoeff; double B2bulkJctSideGradingCoeff; double B2sidewallJctPotential; double B2unitAreaJctCap; double B2unitLengthSidewallJctCap; double B2defaultWidth; double B2deltaLength; double B2fNcoef; double B2fNexp; struct bsim2SizeDependParam { double Width; double Length; double B2vfb; double B2phi; double B2k1; double B2k2; double B2eta0; double B2etaB; double B2beta0; double B2beta0B; double B2betas0; double B2betasB; double B2beta20; double B2beta2B; double B2beta2G; double B2beta30; double B2beta3B; double B2beta3G; double B2beta40; double B2beta4B; double B2beta4G; double B2ua0; double B2uaB; double B2ub0; double B2ubB; double B2u10; double B2u1B; double B2u1D; double B2n0; double B2nB; double B2nD; double B2vof0; double B2vofB; double B2vofD; double B2ai0; double B2aiB; double B2bi0; double B2biB; double B2vghigh; double B2vglow; double B2GDoverlapCap; double B2GSoverlapCap; double B2GBoverlapCap; double SqrtPhi; double Phis3; double CoxWL; double One_Third_CoxWL; double Two_Third_CoxWL; double Arg; double B2vt0; struct bsim2SizeDependParam *pNext; } *pSizeDependParamKnot; unsigned int B2channelChargePartitionFlag; unsigned int B2vfb0Given; unsigned int B2vfbLGiven; unsigned int B2vfbWGiven; unsigned int B2phi0Given; unsigned int B2phiLGiven; unsigned int B2phiWGiven; unsigned int B2k10Given; unsigned int B2k1LGiven; unsigned int B2k1WGiven; unsigned int B2k20Given; unsigned int B2k2LGiven; unsigned int B2k2WGiven; unsigned int B2eta00Given; unsigned int B2eta0LGiven; unsigned int B2eta0WGiven; unsigned int B2etaB0Given; unsigned int B2etaBLGiven; unsigned int B2etaBWGiven; unsigned int B2deltaLGiven; unsigned int B2deltaWGiven; unsigned int B2mob00Given; unsigned int B2mob0B0Given; unsigned int B2mob0BLGiven; unsigned int B2mob0BWGiven; unsigned int B2mobs00Given; unsigned int B2mobs0LGiven; unsigned int B2mobs0WGiven; unsigned int B2mobsB0Given; unsigned int B2mobsBLGiven; unsigned int B2mobsBWGiven; unsigned int B2mob200Given; unsigned int B2mob20LGiven; unsigned int B2mob20WGiven; unsigned int B2mob2B0Given; unsigned int B2mob2BLGiven; unsigned int B2mob2BWGiven; unsigned int B2mob2G0Given; unsigned int B2mob2GLGiven; unsigned int B2mob2GWGiven; unsigned int B2mob300Given; unsigned int B2mob30LGiven; unsigned int B2mob30WGiven; unsigned int B2mob3B0Given; unsigned int B2mob3BLGiven; unsigned int B2mob3BWGiven; unsigned int B2mob3G0Given; unsigned int B2mob3GLGiven; unsigned int B2mob3GWGiven; unsigned int B2mob400Given; unsigned int B2mob40LGiven; unsigned int B2mob40WGiven; unsigned int B2mob4B0Given; unsigned int B2mob4BLGiven; unsigned int B2mob4BWGiven; unsigned int B2mob4G0Given; unsigned int B2mob4GLGiven; unsigned int B2mob4GWGiven; unsigned int B2ua00Given; unsigned int B2ua0LGiven; unsigned int B2ua0WGiven; unsigned int B2uaB0Given; unsigned int B2uaBLGiven; unsigned int B2uaBWGiven; unsigned int B2ub00Given; unsigned int B2ub0LGiven; unsigned int B2ub0WGiven; unsigned int B2ubB0Given; unsigned int B2ubBLGiven; unsigned int B2ubBWGiven; unsigned int B2u100Given; unsigned int B2u10LGiven; unsigned int B2u10WGiven; unsigned int B2u1B0Given; unsigned int B2u1BLGiven; unsigned int B2u1BWGiven; unsigned int B2u1D0Given; unsigned int B2u1DLGiven; unsigned int B2u1DWGiven; unsigned int B2n00Given; unsigned int B2n0LGiven; unsigned int B2n0WGiven; unsigned int B2nB0Given; unsigned int B2nBLGiven; unsigned int B2nBWGiven; unsigned int B2nD0Given; unsigned int B2nDLGiven; unsigned int B2nDWGiven; unsigned int B2vof00Given; unsigned int B2vof0LGiven; unsigned int B2vof0WGiven; unsigned int B2vofB0Given; unsigned int B2vofBLGiven; unsigned int B2vofBWGiven; unsigned int B2vofD0Given; unsigned int B2vofDLGiven; unsigned int B2vofDWGiven; unsigned int B2ai00Given; unsigned int B2ai0LGiven; unsigned int B2ai0WGiven; unsigned int B2aiB0Given; unsigned int B2aiBLGiven; unsigned int B2aiBWGiven; unsigned int B2bi00Given; unsigned int B2bi0LGiven; unsigned int B2bi0WGiven; unsigned int B2biB0Given; unsigned int B2biBLGiven; unsigned int B2biBWGiven; unsigned int B2vghigh0Given; unsigned int B2vghighLGiven; unsigned int B2vghighWGiven; unsigned int B2vglow0Given; unsigned int B2vglowLGiven; unsigned int B2vglowWGiven; unsigned int B2toxGiven; unsigned int B2tempGiven; unsigned int B2vddGiven; unsigned int B2vggGiven; unsigned int B2vbbGiven; unsigned int B2gateSourceOverlapCapGiven; unsigned int B2gateDrainOverlapCapGiven; unsigned int B2gateBulkOverlapCapGiven; unsigned int B2channelChargePartitionFlagGiven; unsigned int B2sheetResistanceGiven; unsigned int B2jctSatCurDensityGiven; unsigned int B2bulkJctPotentialGiven; unsigned int B2bulkJctBotGradingCoeffGiven; unsigned int B2sidewallJctPotentialGiven; unsigned int B2bulkJctSideGradingCoeffGiven; unsigned int B2unitAreaJctCapGiven; unsigned int B2unitLengthSidewallJctCapGiven; unsigned int B2defaultWidthGiven; unsigned int B2deltaLengthGiven; unsigned int B2fNcoefGiven; unsigned int B2fNexpGiven; unsigned int B2typeGiven; } *B2modPtr; struct sBSIM2instance *B2nextInstance; char *B2name; int B2owner; int B2states; int B2dNode; int B2gNode; int B2sNode; int B2bNode; int B2dNodePrime; int B2sNodePrime; double B2l; double B2w; double B2m; double B2drainArea; double B2sourceArea; double B2drainSquares; double B2sourceSquares; double B2drainPerimeter; double B2sourcePerimeter; double B2sourceConductance; double B2drainConductance; double B2icVBS; double B2icVDS; double B2icVGS; double B2von; double B2vdsat; int B2off; int B2mode; struct bsim2SizeDependParam *pParam; unsigned int B2lGiven; unsigned int B2wGiven; unsigned int B2mGiven; unsigned int B2drainAreaGiven; unsigned int B2sourceAreaGiven; unsigned int B2drainSquaresGiven; unsigned int B2sourceSquaresGiven; unsigned int B2drainPerimeterGiven; unsigned int B2sourcePerimeterGiven; unsigned int B2dNodePrimeSet; unsigned int B2sNodePrimeSet; unsigned int B2icVBSGiven; unsigned int B2icVDSGiven; unsigned int B2icVGSGiven; unsigned int B2vonGiven; unsigned int B2vdsatGiven; double *B2DdPtr; double *B2GgPtr; double *B2SsPtr; double *B2BbPtr; double *B2DPdpPtr; double *B2SPspPtr; double *B2DdpPtr; double *B2GbPtr; double *B2GdpPtr; double *B2GspPtr; double *B2SspPtr; double *B2BdpPtr; double *B2BspPtr; double *B2DPspPtr; double *B2DPdPtr; double *B2BgPtr; double *B2DPgPtr; double *B2SPgPtr; double *B2SPsPtr; double *B2DPbPtr; double *B2SPbPtr; double *B2SPdpPtr; double B2nVar[3][5]; } *


MESmParam

original_code:
int
MESmParam(int param, IFvalue *value, GENmodel *inModel)
{
    MESmodel *model = (MESmodel*)inModel;
    switch(param) {
        case 101:
            model->MESthresholdGiven = 1;
            model->MESthreshold = value->rValue;
            break;
        case 102:
            model->MESalphaGiven = 1;
            model->MESalpha = value->rValue;
            break;
        case 103:
            model->MESbetaGiven = 1;
            model->MESbeta = value->rValue;
            break;
        case 104:
            model->MESlModulationGiven = 1;
            model->MESlModulation = value->rValue;
            break;
        case 105:
            model->MESbGiven = 1;
            model->MESb = value->rValue;
            break;
        case 106:
            model->MESdrainResistGiven = 1;
            model->MESdrainResist = value->rValue;
            break;
        case 107:
            model->MESsourceResistGiven = 1;
            model->MESsourceResist = value->rValue;
            break;
        case 108:
            model->MEScapGSGiven = 1;
            model->MEScapGS = value->rValue;
            break;
        case 109:
            model->MEScapGDGiven = 1;
            model->MEScapGD = value->rValue;
            break;
        case 110:
            model->MESgatePotentialGiven = 1;
            model->MESgatePotential = value->rValue;
            break;
        case 111:
            model->MESgateSatCurrentGiven = 1;
            model->MESgateSatCurrent = value->rValue;
            break;
        case 112:
            model->MESdepletionCapCoeffGiven = 1;
            model->MESdepletionCapCoeff = value->rValue;
            break;
        case 113:
            if(value->iValue) {
                model->MEStype = 1;
            }
            break;
        case 114:
            if(value->iValue) {
                model->MEStype = -1;
            }
            break;
 case 115:
     model->MESfNcoefGiven = 1;
     model->MESfNcoef = value->rValue;
     break;
 case 116:
     model->MESfNexpGiven = 1;
     model->MESfNexp = value->rValue;
     break;
        default:
            return(7);
    }
    return(0);
}

canonical_original_code:
int MESmParam(int param, union uIFvalue *value, struct sGENmodel *inModel)
{
    struct sMESmodel *model = (MESmodel*)inModel;
    switch(param) {
        case 101:
            model->MESthresholdGiven = 1;
            model->MESthreshold = value->rValue;
            break;
        case 102:
            model->MESalphaGiven = 1;
            model->MESalpha = value->rValue;
            break;
        case 103:
            model->MESbetaGiven = 1;
            model->MESbeta = value->rValue;
            break;
        case 104:
            model->MESlModulationGiven = 1;
            model->MESlModulation = value->rValue;
            break;
        case 105:
            model->MESbGiven = 1;
            model->MESb = value->rValue;
            break;
        case 106:
            model->MESdrainResistGiven = 1;
            model->MESdrainResist = value->rValue;
            break;
        case 107:
            model->MESsourceResistGiven = 1;
            model->MESsourceResist = value->rValue;
            break;
        case 108:
            model->MEScapGSGiven = 1;
            model->MEScapGS = value->rValue;
            break;
        case 109:
            model->MEScapGDGiven = 1;
            model->MEScapGD = value->rValue;
            break;
        case 110:
            model->MESgatePotentialGiven = 1;
            model->MESgatePotential = value->rValue;
            break;
        case 111:
            model->MESgateSatCurrentGiven = 1;
            model->MESgateSatCurrent = value->rValue;
            break;
        case 112:
            model->MESdepletionCapCoeffGiven = 1;
            model->MESdepletionCapCoeff = value->rValue;
            break;
        case 113:
            if(value->iValue) {
                model->MEStype = 1;
            }
            break;
        case 114:
            if(value->iValue) {
                model->MEStype = -1;
            }
            break;
 case 115:
     model->MESfNcoefGiven = 1;
     model->MESfNcoef = value->rValue;
     break;
 case 116:
     model->MESfNexpGiven = 1;
     model->MESfNexp = value->rValue;
     break;
        default:
            return(7);
    }
    return(0);
}

variable_types: struct sMESmodel { int MESmodType; struct sMESmodel *MESnextModel; struct sMESinstance { struct sMESmodel *MESmodPtr; struct sMESinstance *MESnextInstance; char *MESname; int MESowner; int MESstate; int MESdrainNode; int MESgateNode; int MESsourceNode; int MESdrainPrimeNode; int MESsourcePrimeNode; double MESarea; double MESm; double MESicVDS; double MESicVGS; double *MESdrainDrainPrimePtr; double *MESgateDrainPrimePtr; double *MESgateSourcePrimePtr; double *MESsourceSourcePrimePtr; double *MESdrainPrimeDrainPtr; double *MESdrainPrimeGatePtr; double *MESdrainPrimeSourcePrimePtr; double *MESsourcePrimeGatePtr; double *MESsourcePrimeSourcePtr; double *MESsourcePrimeDrainPrimePtr; double *MESdrainDrainPtr; double *MESgateGatePtr; double *MESsourceSourcePtr; double *MESdrainPrimeDrainPrimePtr; double *MESsourcePrimeSourcePrimePtr; int MESoff; unsigned int MESareaGiven; unsigned int MESmGiven; unsigned int MESicVDSGiven; unsigned int MESicVGSGiven; int MESmode; double MESdCoeffs[27]; double MESnVar[3][5]; } *MESinstances; char *MESmodName; int MEStype; double MESthreshold; double MESalpha; double MESbeta; double MESlModulation; double MESb; double MESdrainResist; double MESsourceResist; double MEScapGS; double MEScapGD; double MESgatePotential; double MESgateSatCurrent; double MESdepletionCapCoeff; double MESfNcoef; double MESfNexp; double MESdrainConduct; double MESsourceConduct; double MESdepletionCap; double MESf1; double MESf2; double MESf3; double MESvcrit; unsigned int MESthresholdGiven; unsigned int MESalphaGiven; unsigned int MESbetaGiven; unsigned int MESlModulationGiven; unsigned int MESbGiven; unsigned int MESdrainResistGiven; unsigned int MESsourceResistGiven; unsigned int MEScapGSGiven; unsigned int MEScapGDGiven; unsigned int MESgatePotentialGiven; unsigned int MESgateSatCurrentGiven; unsigned int MESdepletionCapCoeffGiven; unsigned int MESfNcoefGiven; unsigned int MESfNexpGiven; } *

user_defined_types: struct sMESmodel { int MESmodType; struct sMESmodel *MESnextModel; struct sMESinstance *MESinstances; char *MESmodName; int MEStype; double MESthreshold; double MESalpha; double MESbeta; double MESlModulation; double MESb; double MESdrainResist; double MESsourceResist; double MEScapGS; double MEScapGD; double MESgatePotential; double MESgateSatCurrent; double MESdepletionCapCoeff; double MESfNcoef; double MESfNexp; double MESdrainConduct; double MESsourceConduct; double MESdepletionCap; double MESf1; double MESf2; double MESf3; double MESvcrit; unsigned int MESthresholdGiven; unsigned int MESalphaGiven; unsigned int MESbetaGiven; unsigned int MESlModulationGiven; unsigned int MESbGiven; unsigned int MESdrainResistGiven; unsigned int MESsourceResistGiven; unsigned int MEScapGSGiven; unsigned int MEScapGDGiven; unsigned int MESgatePotentialGiven; unsigned int MESgateSatCurrentGiven; unsigned int MESdepletionCapCoeffGiven; unsigned int MESfNcoefGiven; unsigned int MESfNexpGiven; }

user_defined_types: struct sIFcomplex { double real; double imag; }

user_defined_types: struct sIFparseTree { int numVars; int *varTypes; union uIFvalue *vars; int (*IFeval)(struct sIFparseTree *, double, double *, double *, double *); }


decompiled_code:
__int64 __fastcall B2mDelete(_QWORD *a1, __int64 a2, __int64 a3)
{
__int64 v3; // rax
_QWORD *v4; // rbx
_QWORD *v6; // rdx
_QWORD *v7; // rdi
void *v8; // rdi
__int64 result; // rax
_QWORD *v10; // rbp

v3 = *a1;
if ( !*a1 )
return 4LL;
v4 = a1;
while ( *(_QWORD *)(v3 + 24) != a2 && (a3 != v3 || !a3) )
{
v6 = (_QWORD *)(v3 + 8);
v3 = *(_QWORD *)(v3 + 8);
a1 = v4;
if ( !v3 )
return 4LL;
v4 = v6;
}
*a1 = *(_QWORD *)(v3 + 8);
v7 = *(_QWORD **)(*v4 + 16LL);
if ( !v7 )
{
v8 = (void *)*v4;
LABEL_15:
free(v8);
*v4 = 0LL;
return 0LL;
}
while ( 1 )
{
v10 = (_QWORD *)v7[1];
if ( !v10 )
break;
free(v7);
v7 = v10;
}
free(v7);
v8 = (void *)*v4;
result = 0LL;
if ( *v4 )
goto LABEL_15;
return result;
}

original_code:
int
B2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
{
    B2model **model = (B2model**)inModel;
    B2model *modfast = (B2model*)kill;
    B2instance *here;
    B2instance *prev = ((void *)0);
    B2model **oldmod;
    oldmod = model;
    for( ; *model ; model = &((*model)->B2nextModel)) {
        if( (*model)->B2modName == modname ||
                (modfast && *model == modfast) ) goto delgot;
        oldmod = model;
    }
    return(4);
delgot:
    *oldmod = (*model)->B2nextModel;
    for(here = (*model)->B2instances ; here ; here = here->B2nextInstance) {
        if(prev) {if (prev) {txfree((char *)(prev));(prev) = 0;}};
        prev = here;
    }
    if(prev) {if (prev) {txfree((char *)(prev));(prev) = 0;}};
    {if (*model) {txfree((char *)(*model));(*model) = 0;}};
    return(0);
}

canonical_original_code:
int B2mDelete(struct sGENmodel **inModel, char *modname, struct sGENmodel *kill)
{
    struct sBSIM2model **model = (B2model**)inModel;
    struct sBSIM2model *modfast = (B2model*)kill;
    struct sBSIM2instance *here;
    struct sBSIM2instance *prev = ((void *)0);
    struct sBSIM2model **oldmod;
    oldmod = model;
    for( ; *model ; model = &((*model)->B2nextModel)) {
        if( (*model)->B2modName == modname ||
                (modfast && *model == modfast) ) goto delgot;
        oldmod = model;
    }
    return(4);
delgot:
    *oldmod = (*model)->B2nextModel;
    for(here = (*model)->B2instances ; here ; here = here->B2nextInstance) {
        if(prev) {if (prev) {txfree((char *)(prev));(prev) = 0;}};
        prev = here;
    }
    if(prev) {if (prev) {txfree((char *)(prev));(prev) = 0;}};
    {if (*model) {txfree((char *)(*model));(*model) = 0;}};
    return(0);
}

variable_types: struct sGENmodel { int GENmodType; struct sGENmodel *GENnextModel; struct sGENinstance { struct sGENmodel *GENmodPtr; struct sGENinstance *GENnextInstance; char *GENname; int GENowner; int GENstate; int GENnode1; int GENnode2; int GENnode3; int GENnode4; int GENnode5; int GENnode6; int GENnode7; } *GENinstances; char *GENmodName; } **

variable_types:
modname
char *

variable_types:
kill
struct sGENmodel *

variable_types: struct sBSIM2model { int B2modType; struct sBSIM2model *B2nextModel; struct sBSIM2instance { struct sBSIM2model *B2modPtr; struct sBSIM2instance *B2nextInstance; char *B2name; int B2owner; int B2states; int B2dNode; int B2gNode; int B2sNode; int B2bNode; int B2dNodePrime; int B2sNodePrime; double B2l; double B2w; double B2m; double B2drainArea; double B2sourceArea; double B2drainSquares; double B2sourceSquares; double B2drainPerimeter; double B2sourcePerimeter; double B2sourceConductance; double B2drainConductance; double B2icVBS; double B2icVDS; double B2icVGS; double B2von; double B2vdsat; int B2off; int B2mode; struct bsim2SizeDependParam { double Width; double Length; double B2vfb; double B2phi; double B2k1; double B2k2; double B2eta0; double B2etaB; double B2beta0; double B2beta0B; double B2betas0; double B2betasB; double B2beta20; double B2beta2B; double B2beta2G; double B2beta30; double B2beta3B; double B2beta3G; double B2beta40; double B2beta4B; double B2beta4G; double B2ua0; double B2uaB; double B2ub0; double B2ubB; double B2u10; double B2u1B; double B2u1D; double B2n0; double B2nB; double B2nD; double B2vof0; double B2vofB; double B2vofD; double B2ai0; double B2aiB; double B2bi0; double B2biB; double B2vghigh; double B2vglow; double B2GDoverlapCap; double B2GSoverlapCap; double B2GBoverlapCap; double SqrtPhi; double Phis3; double CoxWL; double One_Third_CoxWL; double Two_Third_CoxWL; double Arg; double B2vt0; struct bsim2SizeDependParam *pNext; } *pParam; unsigned int B2lGiven; unsigned int B2wGiven; unsigned int B2mGiven; unsigned int B2drainAreaGiven; unsigned int B2sourceAreaGiven; unsigned int B2drainSquaresGiven; unsigned int B2sourceSquaresGiven; unsigned int B2drainPerimeterGiven; unsigned int B2sourcePerimeterGiven; unsigned int B2dNodePrimeSet; unsigned int B2sNodePrimeSet; unsigned int B2icVBSGiven; unsigned int B2icVDSGiven; unsigned int B2icVGSGiven; unsigned int B2vonGiven; unsigned int B2vdsatGiven; double *B2DdPtr; double *B2GgPtr; double *B2SsPtr; double *B2BbPtr; double *B2DPdpPtr; double *B2SPspPtr; double *B2DdpPtr; double *B2GbPtr; double *B2GdpPtr; double *B2GspPtr; double *B2SspPtr; double *B2BdpPtr; double *B2BspPtr; double *B2DPspPtr; double *B2DPdPtr; double *B2BgPtr; double *B2DPgPtr; double *B2SPgPtr; double *B2SPsPtr; double *B2DPbPtr; double *B2SPbPtr; double *B2SPdpPtr; double B2nVar[3][5]; } *B2instances; char *B2modName; int B2type; int pad; double B2vfb0; double B2vfbL; double B2vfbW; double B2phi0; double B2phiL; double B2phiW; double B2k10; double B2k1L; double B2k1W; double B2k20; double B2k2L; double B2k2W; double B2eta00; double B2eta0L; double B2eta0W; double B2etaB0; double B2etaBL; double B2etaBW; double B2deltaL; double B2deltaW; double B2mob00; double B2mob0B0; double B2mob0BL; double B2mob0BW; double B2mobs00; double B2mobs0L; double B2mobs0W; double B2mobsB0; double B2mobsBL; double B2mobsBW; double B2mob200; double B2mob20L; double B2mob20W; double B2mob2B0; double B2mob2BL; double B2mob2BW; double B2mob2G0; double B2mob2GL; double B2mob2GW; double B2mob300; double B2mob30L; double B2mob30W; double B2mob3B0; double B2mob3BL; double B2mob3BW; double B2mob3G0; double B2mob3GL; double B2mob3GW; double B2mob400; double B2mob40L; double B2mob40W; double B2mob4B0; double B2mob4BL; double B2mob4BW; double B2mob4G0; double B2mob4GL; double B2mob4GW; double B2ua00; double B2ua0L; double B2ua0W; double B2uaB0; double B2uaBL; double B2uaBW; double B2ub00; double B2ub0L; double B2ub0W; double B2ubB0; double B2ubBL; double B2ubBW; double B2u100; double B2u10L; double B2u10W; double B2u1B0; double B2u1BL; double B2u1BW; double B2u1D0; double B2u1DL; double B2u1DW; double B2n00; double B2n0L; double B2n0W; double B2nB0; double B2nBL; double B2nBW; double B2nD0; double B2nDL; double B2nDW; double B2vof00; double B2vof0L; double B2vof0W; double B2vofB0; double B2vofBL; double B2vofBW; double B2vofD0; double B2vofDL; double B2vofDW; double B2ai00; double B2ai0L; double B2ai0W; double B2aiB0; double B2aiBL; double B2aiBW; double B2bi00; double B2bi0L; double B2bi0W; double B2biB0; double B2biBL; double B2biBW; double B2vghigh0; double B2vghighL; double B2vghighW; double B2vglow0; double B2vglowL; double B2vglowW; double B2tox; double B2Cox; double B2temp; double B2vdd; double B2vdd2; double B2vgg; double B2vgg2; double B2vbb; double B2vbb2; double B2gateSourceOverlapCap; double B2gateDrainOverlapCap; double B2gateBulkOverlapCap; double B2Vtm; double B2sheetResistance; double B2jctSatCurDensity; double B2bulkJctPotential; double B2bulkJctBotGradingCoeff; double B2bulkJctSideGradingCoeff; double B2sidewallJctPotential; double B2unitAreaJctCap; double B2unitLengthSidewallJctCap; double B2defaultWidth; double B2deltaLength; double B2fNcoef; double B2fNexp; struct bsim2SizeDependParam *pSizeDependParamKnot; unsigned int B2channelChargePartitionFlag; unsigned int B2vfb0Given; unsigned int B2vfbLGiven; unsigned int B2vfbWGiven; unsigned int B2phi0Given; unsigned int B2phiLGiven; unsigned int B2phiWGiven; unsigned int B2k10Given; unsigned int B2k1LGiven; unsigned int B2k1WGiven; unsigned int B2k20Given; unsigned int B2k2LGiven; unsigned int B2k2WGiven; unsigned int B2eta00Given; unsigned int B2eta0LGiven; unsigned int B2eta0WGiven; unsigned int B2etaB0Given; unsigned int B2etaBLGiven; unsigned int B2etaBWGiven; unsigned int B2deltaLGiven; unsigned int B2deltaWGiven; unsigned int B2mob00Given; unsigned int B2mob0B0Given; unsigned int B2mob0BLGiven; unsigned int B2mob0BWGiven; unsigned int B2mobs00Given; unsigned int B2mobs0LGiven; unsigned int B2mobs0WGiven; unsigned int B2mobsB0Given; unsigned int B2mobsBLGiven; unsigned int B2mobsBWGiven; unsigned int B2mob200Given; unsigned int B2mob20LGiven; unsigned int B2mob20WGiven; unsigned int B2mob2B0Given; unsigned int B2mob2BLGiven; unsigned int B2mob2BWGiven; unsigned int B2mob2G0Given; unsigned int B2mob2GLGiven; unsigned int B2mob2GWGiven; unsigned int B2mob300Given; unsigned int B2mob30LGiven; unsigned int B2mob30WGiven; unsigned int B2mob3B0Given; unsigned int B2mob3BLGiven; unsigned int B2mob3BWGiven; unsigned int B2mob3G0Given; unsigned int B2mob3GLGiven; unsigned int B2mob3GWGiven; unsigned int B2mob400Given; unsigned int B2mob40LGiven; unsigned int B2mob40WGiven; unsigned int B2mob4B0Given; unsigned int B2mob4BLGiven; unsigned int B2mob4BWGiven; unsigned int B2mob4G0Given; unsigned int B2mob4GLGiven; unsigned int B2mob4GWGiven; unsigned int B2ua00Given; unsigned int B2ua0LGiven; unsigned int B2ua0WGiven; unsigned int B2uaB0Given; unsigned int B2uaBLGiven; unsigned int B2uaBWGiven; unsigned int B2ub00Given; unsigned int B2ub0LGiven; unsigned int B2ub0WGiven; unsigned int B2ubB0Given; unsigned int B2ubBLGiven; unsigned int B2ubBWGiven; unsigned int B2u100Given; unsigned int B2u10LGiven; unsigned int B2u10WGiven; unsigned int B2u1B0Given; unsigned int B2u1BLGiven; unsigned int B2u1BWGiven; unsigned int B2u1D0Given; unsigned int B2u1DLGiven; unsigned int B2u1DWGiven; unsigned int B2n00Given; unsigned int B2n0LGiven; unsigned int B2n0WGiven; unsigned int B2nB0Given; unsigned int B2nBLGiven; unsigned int B2nBWGiven; unsigned int B2nD0Given; unsigned int B2nDLGiven; unsigned int B2nDWGiven; unsigned int B2vof00Given; unsigned int B2vof0LGiven; unsigned int B2vof0WGiven; unsigned int B2vofB0Given; unsigned int B2vofBLGiven; unsigned int B2vofBWGiven; unsigned int B2vofD0Given; unsigned int B2vofDLGiven; unsigned int B2vofDWGiven; unsigned int B2ai00Given; unsigned int B2ai0LGiven; unsigned int B2ai0WGiven; unsigned int B2aiB0Given; unsigned int B2aiBLGiven; unsigned int B2aiBWGiven; unsigned int B2bi00Given; unsigned int B2bi0LGiven; unsigned int B2bi0WGiven; unsigned int B2biB0Given; unsigned int B2biBLGiven; unsigned int B2biBWGiven; unsigned int B2vghigh0Given; unsigned int B2vghighLGiven; unsigned int B2vghighWGiven; unsigned int B2vglow0Given; unsigned int B2vglowLGiven; unsigned int B2vglowWGiven; unsigned int B2toxGiven; unsigned int B2tempGiven; unsigned int B2vddGiven; unsigned int B2vggGiven; unsigned int B2vbbGiven; unsigned int B2gateSourceOverlapCapGiven; unsigned int B2gateDrainOverlapCapGiven; unsigned int B2gateBulkOverlapCapGiven; unsigned int B2channelChargePartitionFlagGiven; unsigned int B2sheetResistanceGiven; unsigned int B2jctSatCurDensityGiven; unsigned int B2bulkJctPotentialGiven; unsigned int B2bulkJctBotGradingCoeffGiven; unsigned int B2sidewallJctPotentialGiven; unsigned int B2bulkJctSideGradingCoeffGiven; unsigned int B2unitAreaJctCapGiven; unsigned int B2unitLengthSidewallJctCapGiven; unsigned int B2defaultWidthGiven; unsigned int B2deltaLengthGiven; unsigned int B2fNcoefGiven; unsigned int B2fNexpGiven; unsigned int B2typeGiven; } **