JFETparam

repo: gserdyuk/gnucap-a

original_code:
int
JFETparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
{
    JFETinstance *here = (JFETinstance *)inst;
    switch(param) {
        case 6:
            here->JFETtemp = value->rValue+(273.15);
            here->JFETtempGiven = 1;
            break;
        case 7:
            here->JFETdtemp = value->rValue;
            here->JFETdtempGiven = 1;
            break;
        case 1:
            here->JFETarea = value->rValue;
            here->JFETareaGiven = 1;
            break;
       case 8:
            here->JFETm = value->rValue;
            here->JFETmGiven = 1;
            break;
        case 2:
            here->JFETicVDS = value->rValue;
            here->JFETicVDSGiven = 1;
            break;
        case 3:
            here->JFETicVGS = value->rValue;
            here->JFETicVGSGiven = 1;
            break;
        case 5:
            here->JFEToff = value->iValue;
            break;
        case 4:
            switch(value->v.numValue) {
                case 2:
                    here->JFETicVGS = *(value->v.vec.rVec+1);
                    here->JFETicVGSGiven = 1;
                case 1:
                    here->JFETicVDS = *(value->v.vec.rVec);
                    here->JFETicVDSGiven = 1;
                    break;
                default:
                    return(7);
            }
            break;
        default:
            return(7);
    }
    return(0);
}

canonical_original_code:
int JFETparam(int param, union uIFvalue *value, struct sGENinstance *inst, union uIFvalue *select)
{
    struct sJFETinstance *here = (JFETinstance *)inst;
    switch(param) {
        case 6:
            here->JFETtemp = value->rValue+(273.15);
            here->JFETtempGiven = 1;
            break;
        case 7:
            here->JFETdtemp = value->rValue;
            here->JFETdtempGiven = 1;
            break;
        case 1:
            here->JFETarea = value->rValue;
            here->JFETareaGiven = 1;
            break;
       case 8:
            here->JFETm = value->rValue;
            here->JFETmGiven = 1;
            break;
        case 2:
            here->JFETicVDS = value->rValue;
            here->JFETicVDSGiven = 1;
            break;
        case 3:
            here->JFETicVGS = value->rValue;
            here->JFETicVGSGiven = 1;
            break;
        case 5:
            here->JFEToff = value->iValue;
            break;
        case 4:
            switch(value->v.numValue) {
                case 2:
                    here->JFETicVGS = *(value->v.vec.rVec+1);
                    here->JFETicVGSGiven = 1;
                case 1:
                    here->JFETicVDS = *(value->v.vec.rVec);
                    here->JFETicVDSGiven = 1;
                    break;
                default:
                    return(7);
            }
            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 sJFETinstance { struct sJFETmodel { int JFETmodType; struct sJFETmodel *JFETnextModel; struct sJFETinstance *JFETinstances; char *JFETmodName; int JFETtype; double JFETthreshold; double JFETbeta; double JFETlModulation; double JFETdrainResist; double JFETsourceResist; double JFETcapGS; double JFETcapGD; double JFETgatePotential; double JFETgateSatCurrent; double JFETdepletionCapCoeff; double JFETfNcoef; double JFETfNexp; double JFETdrainConduct; double JFETsourceConduct; double JFETf2; double JFETf3; double JFETb; double JFETbFac; double JFETtnom; unsigned int JFETthresholdGiven; unsigned int JFETbetaGiven; unsigned int JFETlModulationGiven; unsigned int JFETdrainResistGiven; unsigned int JFETsourceResistGiven; unsigned int JFETcapGSGiven; unsigned int JFETcapGDGiven; unsigned int JFETgatePotentialGiven; unsigned int JFETgateSatCurrentGiven; unsigned int JFETdepletionCapCoeffGiven; unsigned int JFETbGiven; unsigned int JFETtnomGiven; unsigned int JFETfNcoefGiven; unsigned int JFETfNexpGiven; } *JFETmodPtr; struct sJFETinstance *JFETnextInstance; char *JFETname; int JFETowner; int JFETstate; int JFETdrainNode; int JFETgateNode; int JFETsourceNode; int JFETdrainPrimeNode; int JFETsourcePrimeNode; double *JFETdrainDrainPrimePtr; double *JFETgateDrainPrimePtr; double *JFETgateSourcePrimePtr; double *JFETsourceSourcePrimePtr; double *JFETdrainPrimeDrainPtr; double *JFETdrainPrimeGatePtr; double *JFETdrainPrimeSourcePrimePtr; double *JFETsourcePrimeGatePtr; double *JFETsourcePrimeSourcePtr; double *JFETsourcePrimeDrainPrimePtr; double *JFETdrainDrainPtr; double *JFETgateGatePtr; double *JFETsourceSourcePtr; double *JFETdrainPrimeDrainPrimePtr; double *JFETsourcePrimeSourcePrimePtr; int JFETmode; double JFETdCoeffs[21]; double JFETnVar[3][5]; unsigned int JFEToff; unsigned int JFETareaGiven; unsigned int JFETmGiven; unsigned int JFETicVDSGiven; unsigned int JFETicVGSGiven; unsigned int JFETtempGiven; unsigned int JFETdtempGiven; double JFETarea; double JFETm; double JFETicVDS; double JFETicVGS; double JFETtemp; double JFETdtemp; double JFETtSatCur; double JFETtGatePot; double JFETtCGS; double JFETtCGD; double JFETcorDepCap; double JFETvcrit; double JFETf1; } *

return_type: int

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 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; }

user_defined_types: struct sJFETinstance { struct sJFETmodel *JFETmodPtr; struct sJFETinstance *JFETnextInstance; char *JFETname; int JFETowner; int JFETstate; int JFETdrainNode; int JFETgateNode; int JFETsourceNode; int JFETdrainPrimeNode; int JFETsourcePrimeNode; double *JFETdrainDrainPrimePtr; double *JFETgateDrainPrimePtr; double *JFETgateSourcePrimePtr; double *JFETsourceSourcePrimePtr; double *JFETdrainPrimeDrainPtr; double *JFETdrainPrimeGatePtr; double *JFETdrainPrimeSourcePrimePtr; double *JFETsourcePrimeGatePtr; double *JFETsourcePrimeSourcePtr; double *JFETsourcePrimeDrainPrimePtr; double *JFETdrainDrainPtr; double *JFETgateGatePtr; double *JFETsourceSourcePtr; double *JFETdrainPrimeDrainPrimePtr; double *JFETsourcePrimeSourcePrimePtr; int JFETmode; double JFETdCoeffs[21]; double JFETnVar[3][5]; unsigned int JFEToff; unsigned int JFETareaGiven; unsigned int JFETmGiven; unsigned int JFETicVDSGiven; unsigned int JFETicVGSGiven; unsigned int JFETtempGiven; unsigned int JFETdtempGiven; double JFETarea; double JFETm; double JFETicVDS; double JFETicVGS; double JFETtemp; double JFETdtemp; double JFETtSatCur; double JFETtGatePot; double JFETtCGS; double JFETtCGD; double JFETcorDepCap; double JFETvcrit; double JFETf1; }


JFETmParam

original_code:
int
JFETmParam(int param, IFvalue *value, GENmodel *inModels)
{
    JFETmodel *model = (JFETmodel*)inModels;
    switch(param) {
        case 113:
            model->JFETtnomGiven = 1;
            model->JFETtnom = value->rValue+(273.15);
            break;
        case 101:
            model->JFETthresholdGiven = 1;
            model->JFETthreshold = value->rValue;
            break;
        case 102:
            model->JFETbetaGiven = 1;
            model->JFETbeta = value->rValue;
            break;
        case 103:
            model->JFETlModulationGiven = 1;
            model->JFETlModulation = value->rValue;
            break;
        case 104:
            model->JFETdrainResistGiven = 1;
            model->JFETdrainResist = value->rValue;
            break;
        case 105:
            model->JFETsourceResistGiven = 1;
            model->JFETsourceResist = value->rValue;
            break;
        case 106:
            model->JFETcapGSGiven = 1;
            model->JFETcapGS = value->rValue;
            break;
        case 107:
            model->JFETcapGDGiven = 1;
            model->JFETcapGD = value->rValue;
            break;
        case 108:
            model->JFETgatePotentialGiven = 1;
            model->JFETgatePotential = value->rValue;
            break;
        case 109:
            model->JFETgateSatCurrentGiven = 1;
            model->JFETgateSatCurrent = value->rValue;
            break;
        case 110:
            model->JFETdepletionCapCoeffGiven = 1;
            model->JFETdepletionCapCoeff = value->rValue;
            break;
        case 111:
            if(value->iValue) {
                model->JFETtype = 1;
            }
            break;
        case 112:
            if(value->iValue) {
                model->JFETtype = -1;
            }
            break;
 case 114:
     model->JFETfNcoefGiven = 1;
     model->JFETfNcoef = value->rValue;
     break;
 case 115:
     model->JFETfNexpGiven = 1;
     model->JFETfNexp = value->rValue;
     break;
 case 116:
     model->JFETbGiven = 1;
     model->JFETb = value->rValue;
     return(0);
        default:
            return(7);
    }
    return(0);
}

canonical_original_code:
int JFETmParam(int param, union uIFvalue *value, struct sGENmodel *inModels)
{
    struct sJFETmodel *model = (JFETmodel*)inModels;
    switch(param) {
        case 113:
            model->JFETtnomGiven = 1;
            model->JFETtnom = value->rValue+(273.15);
            break;
        case 101:
            model->JFETthresholdGiven = 1;
            model->JFETthreshold = value->rValue;
            break;
        case 102:
            model->JFETbetaGiven = 1;
            model->JFETbeta = value->rValue;
            break;
        case 103:
            model->JFETlModulationGiven = 1;
            model->JFETlModulation = value->rValue;
            break;
        case 104:
            model->JFETdrainResistGiven = 1;
            model->JFETdrainResist = value->rValue;
            break;
        case 105:
            model->JFETsourceResistGiven = 1;
            model->JFETsourceResist = value->rValue;
            break;
        case 106:
            model->JFETcapGSGiven = 1;
            model->JFETcapGS = value->rValue;
            break;
        case 107:
            model->JFETcapGDGiven = 1;
            model->JFETcapGD = value->rValue;
            break;
        case 108:
            model->JFETgatePotentialGiven = 1;
            model->JFETgatePotential = value->rValue;
            break;
        case 109:
            model->JFETgateSatCurrentGiven = 1;
            model->JFETgateSatCurrent = value->rValue;
            break;
        case 110:
            model->JFETdepletionCapCoeffGiven = 1;
            model->JFETdepletionCapCoeff = value->rValue;
            break;
        case 111:
            if(value->iValue) {
                model->JFETtype = 1;
            }
            break;
        case 112:
            if(value->iValue) {
                model->JFETtype = -1;
            }
            break;
 case 114:
     model->JFETfNcoefGiven = 1;
     model->JFETfNcoef = value->rValue;
     break;
 case 115:
     model->JFETfNexpGiven = 1;
     model->JFETfNexp = value->rValue;
     break;
 case 116:
     model->JFETbGiven = 1;
     model->JFETb = value->rValue;
     return(0);
        default:
            return(7);
    }
    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 sJFETmodel { int JFETmodType; struct sJFETmodel *JFETnextModel; struct sJFETinstance { struct sJFETmodel *JFETmodPtr; struct sJFETinstance *JFETnextInstance; char *JFETname; int JFETowner; int JFETstate; int JFETdrainNode; int JFETgateNode; int JFETsourceNode; int JFETdrainPrimeNode; int JFETsourcePrimeNode; double *JFETdrainDrainPrimePtr; double *JFETgateDrainPrimePtr; double *JFETgateSourcePrimePtr; double *JFETsourceSourcePrimePtr; double *JFETdrainPrimeDrainPtr; double *JFETdrainPrimeGatePtr; double *JFETdrainPrimeSourcePrimePtr; double *JFETsourcePrimeGatePtr; double *JFETsourcePrimeSourcePtr; double *JFETsourcePrimeDrainPrimePtr; double *JFETdrainDrainPtr; double *JFETgateGatePtr; double *JFETsourceSourcePtr; double *JFETdrainPrimeDrainPrimePtr; double *JFETsourcePrimeSourcePrimePtr; int JFETmode; double JFETdCoeffs[21]; double JFETnVar[3][5]; unsigned int JFEToff; unsigned int JFETareaGiven; unsigned int JFETmGiven; unsigned int JFETicVDSGiven; unsigned int JFETicVGSGiven; unsigned int JFETtempGiven; unsigned int JFETdtempGiven; double JFETarea; double JFETm; double JFETicVDS; double JFETicVGS; double JFETtemp; double JFETdtemp; double JFETtSatCur; double JFETtGatePot; double JFETtCGS; double JFETtCGD; double JFETcorDepCap; double JFETvcrit; double JFETf1; } *JFETinstances; char *JFETmodName; int JFETtype; double JFETthreshold; double JFETbeta; double JFETlModulation; double JFETdrainResist; double JFETsourceResist; double JFETcapGS; double JFETcapGD; double JFETgatePotential; double JFETgateSatCurrent; double JFETdepletionCapCoeff; double JFETfNcoef; double JFETfNexp; double JFETdrainConduct; double JFETsourceConduct; double JFETf2; double JFETf3; double JFETb; double JFETbFac; double JFETtnom; unsigned int JFETthresholdGiven; unsigned int JFETbetaGiven; unsigned int JFETlModulationGiven; unsigned int JFETdrainResistGiven; unsigned int JFETsourceResistGiven; unsigned int JFETcapGSGiven; unsigned int JFETcapGDGiven; unsigned int JFETgatePotentialGiven; unsigned int JFETgateSatCurrentGiven; unsigned int JFETdepletionCapCoeffGiven; unsigned int JFETbGiven; unsigned int JFETtnomGiven; unsigned int JFETfNcoefGiven; unsigned int JFETfNexpGiven; } *

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

user_defined_types: struct sJFETmodel { int JFETmodType; struct sJFETmodel *JFETnextModel; struct sJFETinstance *JFETinstances; char *JFETmodName; int JFETtype; double JFETthreshold; double JFETbeta; double JFETlModulation; double JFETdrainResist; double JFETsourceResist; double JFETcapGS; double JFETcapGD; double JFETgatePotential; double JFETgateSatCurrent; double JFETdepletionCapCoeff; double JFETfNcoef; double JFETfNexp; double JFETdrainConduct; double JFETsourceConduct; double JFETf2; double JFETf3; double JFETb; double JFETbFac; double JFETtnom; unsigned int JFETthresholdGiven; unsigned int JFETbetaGiven; unsigned int JFETlModulationGiven; unsigned int JFETdrainResistGiven; unsigned int JFETsourceResistGiven; unsigned int JFETcapGSGiven; unsigned int JFETcapGDGiven; unsigned int JFETgatePotentialGiven; unsigned int JFETgateSatCurrentGiven; unsigned int JFETdepletionCapCoeffGiven; unsigned int JFETbGiven; unsigned int JFETtnomGiven; unsigned int JFETfNcoefGiven; unsigned int JFETfNexpGiven; }

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 *); }


original_code:
int
B1mParam(int param, IFvalue *value, GENmodel *inMod)
{
    B1model *mod = (B1model*)inMod;
    switch(param) {
        case 101 :
            mod->B1vfb0 = value->rValue;
            mod->B1vfb0Given = 1;
            break;
        case 102 :
            mod->B1vfbL = value->rValue;
            mod->B1vfbLGiven = 1;
            break;
        case 103 :
            mod->B1vfbW = value->rValue;
            mod->B1vfbWGiven = 1;
            break;
        case 104 :
            mod->B1phi0 = value->rValue;
            mod->B1phi0Given = 1;
            break;
        case 105 :
            mod->B1phiL = value->rValue;
            mod->B1phiLGiven = 1;
            break;
        case 106 :
            mod->B1phiW = value->rValue;
            mod->B1phiWGiven = 1;
            break;
        case 107 :
            mod->B1K10 = value->rValue;
            mod->B1K10Given = 1;
            break;
        case 108 :
            mod->B1K1L = value->rValue;
            mod->B1K1LGiven = 1;
            break;
        case 109 :
            mod->B1K1W = value->rValue;
            mod->B1K1WGiven = 1;
            break;
        case 110 :
            mod->B1K20 = value->rValue;
            mod->B1K20Given = 1;
            break;
        case 111 :
            mod->B1K2L = value->rValue;
            mod->B1K2LGiven = 1;
            break;
        case 112 :
            mod->B1K2W = value->rValue;
            mod->B1K2WGiven = 1;
            break;
        case 113 :
            mod->B1eta0 = value->rValue;
            mod->B1eta0Given = 1;
            break;
        case 114 :
            mod->B1etaL = value->rValue;
            mod->B1etaLGiven = 1;
            break;
        case 115 :
            mod->B1etaW = value->rValue;
            mod->B1etaWGiven = 1;
            break;
        case 116 :
            mod->B1etaB0 = value->rValue;
            mod->B1etaB0Given = 1;
            break;
        case 117 :
            mod->B1etaBl = value->rValue;
            mod->B1etaBlGiven = 1;
            break;
        case 118 :
            mod->B1etaBw = value->rValue;
            mod->B1etaBwGiven = 1;
            break;
        case 119 :
            mod->B1etaD0 = value->rValue;
            mod->B1etaD0Given = 1;
            break;
        case 120 :
            mod->B1etaDl = value->rValue;
            mod->B1etaDlGiven = 1;
            break;
        case 121 :
            mod->B1etaDw = value->rValue;
            mod->B1etaDwGiven = 1;
            break;
        case 122 :
            mod->B1deltaL = value->rValue;
            mod->B1deltaLGiven = 1;
            break;
        case 123 :
            mod->B1deltaW = value->rValue;
            mod->B1deltaWGiven = 1;
            break;
        case 124 :
            mod->B1mobZero = value->rValue;
            mod->B1mobZeroGiven = 1;
            break;
        case 125 :
            mod->B1mobZeroB0 = value->rValue;
            mod->B1mobZeroB0Given = 1;
            break;
        case 126 :
            mod->B1mobZeroBl = value->rValue;
            mod->B1mobZeroBlGiven = 1;
            break;
        case 127 :
            mod->B1mobZeroBw = value->rValue;
            mod->B1mobZeroBwGiven = 1;
            break;
        case 128 :
            mod->B1mobVdd0 = value->rValue;
            mod->B1mobVdd0Given = 1;
            break;
        case 129 :
            mod->B1mobVddl = value->rValue;
            mod->B1mobVddlGiven = 1;
            break;
        case 130 :
            mod->B1mobVddw = value->rValue;
            mod->B1mobVddwGiven = 1;
            break;
        case 131 :
            mod->B1mobVddB0 = value->rValue;
            mod->B1mobVddB0Given = 1;
            break;
        case 132 :
            mod->B1mobVddBl = value->rValue;
            mod->B1mobVddBlGiven = 1;
            break;
        case 133 :
            mod->B1mobVddBw = value->rValue;
            mod->B1mobVddBwGiven = 1;
            break;
        case 134 :
            mod->B1mobVddD0 = value->rValue;
            mod->B1mobVddD0Given = 1;
            break;
        case 135 :
            mod->B1mobVddDl = value->rValue;
            mod->B1mobVddDlGiven = 1;
            break;
        case 136 :
            mod->B1mobVddDw = value->rValue;
            mod->B1mobVddDwGiven = 1;
            break;
        case 137 :
            mod->B1ugs0 = value->rValue;
            mod->B1ugs0Given = 1;
            break;
        case 138 :
            mod->B1ugsL = value->rValue;
            mod->B1ugsLGiven = 1;
            break;
        case 139 :
            mod->B1ugsW = value->rValue;
            mod->B1ugsWGiven = 1;
            break;
        case 140 :
            mod->B1ugsB0 = value->rValue;
            mod->B1ugsB0Given = 1;
            break;
        case 141 :
            mod->B1ugsBL = value->rValue;
            mod->B1ugsBLGiven = 1;
            break;
        case 142 :
            mod->B1ugsBW = value->rValue;
            mod->B1ugsBWGiven = 1;
            break;
        case 143 :
            mod->B1uds0 = value->rValue;
            mod->B1uds0Given = 1;
            break;
        case 144 :
            mod->B1udsL = value->rValue;
            mod->B1udsLGiven = 1;
            break;
        case 145 :
            mod->B1udsW = value->rValue;
            mod->B1udsWGiven = 1;
            break;
        case 146 :
            mod->B1udsB0 = value->rValue;
            mod->B1udsB0Given = 1;
            break;
        case 147 :
            mod->B1udsBL = value->rValue;
            mod->B1udsBLGiven = 1;
            break;
        case 148 :
            mod->B1udsBW = value->rValue;
            mod->B1udsBWGiven = 1;
            break;
        case 149 :
            mod->B1udsD0 = value->rValue;
            mod->B1udsD0Given = 1;
            break;
        case 150 :
            mod->B1udsDL = value->rValue;
            mod->B1udsDLGiven = 1;
            break;
        case 151 :
            mod->B1udsDW = value->rValue;
            mod->B1udsDWGiven = 1;
            break;
        case 152 :
            mod->B1subthSlope0 = value->rValue;
            mod->B1subthSlope0Given = 1;
            break;
        case 153 :
            mod->B1subthSlopeL = value->rValue;
            mod->B1subthSlopeLGiven = 1;
            break;
        case 154 :
            mod->B1subthSlopeW = value->rValue;
            mod->B1subthSlopeWGiven = 1;
            break;
        case 155 :
            mod->B1subthSlopeB0 = value->rValue;
            mod->B1subthSlopeB0Given = 1;
            break;
        case 156 :
            mod->B1subthSlopeBL = value->rValue;
            mod->B1subthSlopeBLGiven = 1;
            break;
        case 157 :
            mod->B1subthSlopeBW = value->rValue;
            mod->B1subthSlopeBWGiven = 1;
            break;
        case 158 :
            mod->B1subthSlopeD0 = value->rValue;
            mod->B1subthSlopeD0Given = 1;
            break;
        case 159 :
            mod->B1subthSlopeDL = value->rValue;
            mod->B1subthSlopeDLGiven = 1;
            break;
        case 160 :
            mod->B1subthSlopeDW = value->rValue;
            mod->B1subthSlopeDWGiven = 1;
            break;
        case 161 :
            mod->B1oxideThickness = value->rValue;
            mod->B1oxideThicknessGiven = 1;
            break;
        case 162 :
            mod->B1temp = value->rValue;
            mod->B1tempGiven = 1;
            break;
        case 163 :
            mod->B1vdd = value->rValue;
            mod->B1vddGiven = 1;
            break;
        case 164 :
            mod->B1gateSourceOverlapCap = value->rValue;
            mod->B1gateSourceOverlapCapGiven = 1;
            break;
        case 165 :
            mod->B1gateDrainOverlapCap = value->rValue;
            mod->B1gateDrainOverlapCapGiven = 1;
            break;
        case 166 :
            mod->B1gateBulkOverlapCap = value->rValue;
            mod->B1gateBulkOverlapCapGiven = 1;
            break;
        case 167 :
            mod->B1channelChargePartitionFlag = value->rValue;
            mod->B1channelChargePartitionFlagGiven = 1;
            break;
        case 168 :
            mod->B1sheetResistance = value->rValue;
            mod->B1sheetResistanceGiven = 1;
            break;
        case 169 :
            mod->B1jctSatCurDensity = value->rValue;
            mod->B1jctSatCurDensityGiven = 1;
            break;
        case 170 :
            mod->B1bulkJctPotential = value->rValue;
            mod->B1bulkJctPotentialGiven = 1;
            break;
        case 171 :
            mod->B1bulkJctBotGradingCoeff = value->rValue;
            mod->B1bulkJctBotGradingCoeffGiven = 1;
            break;
        case 172 :
            mod->B1sidewallJctPotential = value->rValue;
            mod->B1sidewallJctPotentialGiven = 1;
            break;
        case 173 :
            mod->B1bulkJctSideGradingCoeff = value->rValue;
            mod->B1bulkJctSideGradingCoeffGiven = 1;
            break;
        case 174 :
            mod->B1unitAreaJctCap = value->rValue;
            mod->B1unitAreaJctCapGiven = 1;
            break;
        case 175 :
            mod->B1unitLengthSidewallJctCap = value->rValue;
            mod->B1unitLengthSidewallJctCapGiven = 1;
            break;
        case 176 :
            mod->B1defaultWidth = value->rValue;
            mod->B1defaultWidthGiven = 1;
            break;
        case 177 :
            mod->B1deltaLength = value->rValue;
            mod->B1deltaLengthGiven = 1;
            break;
        case 181 :
            mod->B1fNexp = value->rValue;
            mod->B1fNexpGiven = 1;
            break;
        case 180 :
            mod->B1fNcoef = value->rValue;
            mod->B1fNcoefGiven = 1;
            break;
        case 178 :
            if(value->iValue) {
                mod->B1type = 1;
                mod->B1typeGiven = 1;
            }
            break;
        case 179 :
            if(value->iValue) {
                mod->B1type = - 1;
                mod->B1typeGiven = 1;
            }
            break;
        default:
            return(7);
    }
    return(0);
}

canonical_original_code:
int B1mParam(int param, union uIFvalue *value, struct sGENmodel *inMod)
{
    struct sBSIM1model *mod = (B1model*)inMod;
    switch(param) {
        case 101 :
            mod->B1vfb0 = value->rValue;
            mod->B1vfb0Given = 1;
            break;
        case 102 :
            mod->B1vfbL = value->rValue;
            mod->B1vfbLGiven = 1;
            break;
        case 103 :
            mod->B1vfbW = value->rValue;
            mod->B1vfbWGiven = 1;
            break;
        case 104 :
            mod->B1phi0 = value->rValue;
            mod->B1phi0Given = 1;
            break;
        case 105 :
            mod->B1phiL = value->rValue;
            mod->B1phiLGiven = 1;
            break;
        case 106 :
            mod->B1phiW = value->rValue;
            mod->B1phiWGiven = 1;
            break;
        case 107 :
            mod->B1K10 = value->rValue;
            mod->B1K10Given = 1;
            break;
        case 108 :
            mod->B1K1L = value->rValue;
            mod->B1K1LGiven = 1;
            break;
        case 109 :
            mod->B1K1W = value->rValue;
            mod->B1K1WGiven = 1;
            break;
        case 110 :
            mod->B1K20 = value->rValue;
            mod->B1K20Given = 1;
            break;
        case 111 :
            mod->B1K2L = value->rValue;
            mod->B1K2LGiven = 1;
            break;
        case 112 :
            mod->B1K2W = value->rValue;
            mod->B1K2WGiven = 1;
            break;
        case 113 :
            mod->B1eta0 = value->rValue;
            mod->B1eta0Given = 1;
            break;
        case 114 :
            mod->B1etaL = value->rValue;
            mod->B1etaLGiven = 1;
            break;
        case 115 :
            mod->B1etaW = value->rValue;
            mod->B1etaWGiven = 1;
            break;
        case 116 :
            mod->B1etaB0 = value->rValue;
            mod->B1etaB0Given = 1;
            break;
        case 117 :
            mod->B1etaBl = value->rValue;
            mod->B1etaBlGiven = 1;
            break;
        case 118 :
            mod->B1etaBw = value->rValue;
            mod->B1etaBwGiven = 1;
            break;
        case 119 :
            mod->B1etaD0 = value->rValue;
            mod->B1etaD0Given = 1;
            break;
        case 120 :
            mod->B1etaDl = value->rValue;
            mod->B1etaDlGiven = 1;
            break;
        case 121 :
            mod->B1etaDw = value->rValue;
            mod->B1etaDwGiven = 1;
            break;
        case 122 :
            mod->B1deltaL = value->rValue;
            mod->B1deltaLGiven = 1;
            break;
        case 123 :
            mod->B1deltaW = value->rValue;
            mod->B1deltaWGiven = 1;
            break;
        case 124 :
            mod->B1mobZero = value->rValue;
            mod->B1mobZeroGiven = 1;
            break;
        case 125 :
            mod->B1mobZeroB0 = value->rValue;
            mod->B1mobZeroB0Given = 1;
            break;
        case 126 :
            mod->B1mobZeroBl = value->rValue;
            mod->B1mobZeroBlGiven = 1;
            break;
        case 127 :
            mod->B1mobZeroBw = value->rValue;
            mod->B1mobZeroBwGiven = 1;
            break;
        case 128 :
            mod->B1mobVdd0 = value->rValue;
            mod->B1mobVdd0Given = 1;
            break;
        case 129 :
            mod->B1mobVddl = value->rValue;
            mod->B1mobVddlGiven = 1;
            break;
        case 130 :
            mod->B1mobVddw = value->rValue;
            mod->B1mobVddwGiven = 1;
            break;
        case 131 :
            mod->B1mobVddB0 = value->rValue;
            mod->B1mobVddB0Given = 1;
            break;
        case 132 :
            mod->B1mobVddBl = value->rValue;
            mod->B1mobVddBlGiven = 1;
            break;
        case 133 :
            mod->B1mobVddBw = value->rValue;
            mod->B1mobVddBwGiven = 1;
            break;
        case 134 :
            mod->B1mobVddD0 = value->rValue;
            mod->B1mobVddD0Given = 1;
            break;
        case 135 :
            mod->B1mobVddDl = value->rValue;
            mod->B1mobVddDlGiven = 1;
            break;
        case 136 :
            mod->B1mobVddDw = value->rValue;
            mod->B1mobVddDwGiven = 1;
            break;
        case 137 :
            mod->B1ugs0 = value->rValue;
            mod->B1ugs0Given = 1;
            break;
        case 138 :
            mod->B1ugsL = value->rValue;
            mod->B1ugsLGiven = 1;
            break;
        case 139 :
            mod->B1ugsW = value->rValue;
            mod->B1ugsWGiven = 1;
            break;
        case 140 :
            mod->B1ugsB0 = value->rValue;
            mod->B1ugsB0Given = 1;
            break;
        case 141 :
            mod->B1ugsBL = value->rValue;
            mod->B1ugsBLGiven = 1;
            break;
        case 142 :
            mod->B1ugsBW = value->rValue;
            mod->B1ugsBWGiven = 1;
            break;
        case 143 :
            mod->B1uds0 = value->rValue;
            mod->B1uds0Given = 1;
            break;
        case 144 :
            mod->B1udsL = value->rValue;
            mod->B1udsLGiven = 1;
            break;
        case 145 :
            mod->B1udsW = value->rValue;
            mod->B1udsWGiven = 1;
            break;
        case 146 :
            mod->B1udsB0 = value->rValue;
            mod->B1udsB0Given = 1;
            break;
        case 147 :
            mod->B1udsBL = value->rValue;
            mod->B1udsBLGiven = 1;
            break;
        case 148 :
            mod->B1udsBW = value->rValue;
            mod->B1udsBWGiven = 1;
            break;
        case 149 :
            mod->B1udsD0 = value->rValue;
            mod->B1udsD0Given = 1;
            break;
        case 150 :
            mod->B1udsDL = value->rValue;
            mod->B1udsDLGiven = 1;
            break;
        case 151 :
            mod->B1udsDW = value->rValue;
            mod->B1udsDWGiven = 1;
            break;
        case 152 :
            mod->B1subthSlope0 = value->rValue;
            mod->B1subthSlope0Given = 1;
            break;
        case 153 :
            mod->B1subthSlopeL = value->rValue;
            mod->B1subthSlopeLGiven = 1;
            break;
        case 154 :
            mod->B1subthSlopeW = value->rValue;
            mod->B1subthSlopeWGiven = 1;
            break;
        case 155 :
            mod->B1subthSlopeB0 = value->rValue;
            mod->B1subthSlopeB0Given = 1;
            break;
        case 156 :
            mod->B1subthSlopeBL = value->rValue;
            mod->B1subthSlopeBLGiven = 1;
            break;
        case 157 :
            mod->B1subthSlopeBW = value->rValue;
            mod->B1subthSlopeBWGiven = 1;
            break;
        case 158 :
            mod->B1subthSlopeD0 = value->rValue;
            mod->B1subthSlopeD0Given = 1;
            break;
        case 159 :
            mod->B1subthSlopeDL = value->rValue;
            mod->B1subthSlopeDLGiven = 1;
            break;
        case 160 :
            mod->B1subthSlopeDW = value->rValue;
            mod->B1subthSlopeDWGiven = 1;
            break;
        case 161 :
            mod->B1oxideThickness = value->rValue;
            mod->B1oxideThicknessGiven = 1;
            break;
        case 162 :
            mod->B1temp = value->rValue;
            mod->B1tempGiven = 1;
            break;
        case 163 :
            mod->B1vdd = value->rValue;
            mod->B1vddGiven = 1;
            break;
        case 164 :
            mod->B1gateSourceOverlapCap = value->rValue;
            mod->B1gateSourceOverlapCapGiven = 1;
            break;
        case 165 :
            mod->B1gateDrainOverlapCap = value->rValue;
            mod->B1gateDrainOverlapCapGiven = 1;
            break;
        case 166 :
            mod->B1gateBulkOverlapCap = value->rValue;
            mod->B1gateBulkOverlapCapGiven = 1;
            break;
        case 167 :
            mod->B1channelChargePartitionFlag = value->rValue;
            mod->B1channelChargePartitionFlagGiven = 1;
            break;
        case 168 :
            mod->B1sheetResistance = value->rValue;
            mod->B1sheetResistanceGiven = 1;
            break;
        case 169 :
            mod->B1jctSatCurDensity = value->rValue;
            mod->B1jctSatCurDensityGiven = 1;
            break;
        case 170 :
            mod->B1bulkJctPotential = value->rValue;
            mod->B1bulkJctPotentialGiven = 1;
            break;
        case 171 :
            mod->B1bulkJctBotGradingCoeff = value->rValue;
            mod->B1bulkJctBotGradingCoeffGiven = 1;
            break;
        case 172 :
            mod->B1sidewallJctPotential = value->rValue;
            mod->B1sidewallJctPotentialGiven = 1;
            break;
        case 173 :
            mod->B1bulkJctSideGradingCoeff = value->rValue;
            mod->B1bulkJctSideGradingCoeffGiven = 1;
            break;
        case 174 :
            mod->B1unitAreaJctCap = value->rValue;
            mod->B1unitAreaJctCapGiven = 1;
            break;
        case 175 :
            mod->B1unitLengthSidewallJctCap = value->rValue;
            mod->B1unitLengthSidewallJctCapGiven = 1;
            break;
        case 176 :
            mod->B1defaultWidth = value->rValue;
            mod->B1defaultWidthGiven = 1;
            break;
        case 177 :
            mod->B1deltaLength = value->rValue;
            mod->B1deltaLengthGiven = 1;
            break;
        case 181 :
            mod->B1fNexp = value->rValue;
            mod->B1fNexpGiven = 1;
            break;
        case 180 :
            mod->B1fNcoef = value->rValue;
            mod->B1fNcoefGiven = 1;
            break;
        case 178 :
            if(value->iValue) {
                mod->B1type = 1;
                mod->B1typeGiven = 1;
            }
            break;
        case 179 :
            if(value->iValue) {
                mod->B1type = - 1;
                mod->B1typeGiven = 1;
            }
            break;
        default:
            return(7);
    }
    return(0);
}

variable_types: struct sBSIM1model { int B1modType; struct sBSIM1model *B1nextModel; struct sBSIM1instance { struct sBSIM1model *B1modPtr; struct sBSIM1instance *B1nextInstance; char *B1name; int B1owner; int B1states; int B1dNode; int B1gNode; int B1sNode; int B1bNode; int B1dNodePrime; int B1sNodePrime; double B1l; double B1w; double B1m; double B1drainArea; double B1sourceArea; double B1drainSquares; double B1sourceSquares; double B1drainPerimeter; double B1sourcePerimeter; double B1sourceConductance; double B1drainConductance; double B1icVBS; double B1icVDS; double B1icVGS; double B1von; double B1vdsat; int B1off; int B1mode; double B1vfb; double B1phi; double B1K1; double B1K2; double B1eta; double B1etaB; double B1etaD; double B1betaZero; double B1betaZeroB; double B1betaVdd; double B1betaVddB; double B1betaVddD; double B1ugs; double B1ugsB; double B1uds; double B1udsB; double B1udsD; double B1subthSlope; double B1subthSlopeB; double B1subthSlopeD; double B1GDoverlapCap; double B1GSoverlapCap; double B1GBoverlapCap; double B1vt0; double B1vdd; double B1temp; double B1oxideThickness; unsigned int B1channelChargePartitionFlag; unsigned int B1lGiven; unsigned int B1wGiven; unsigned int B1mGiven; unsigned int B1drainAreaGiven; unsigned int B1sourceAreaGiven; unsigned int B1drainSquaresGiven; unsigned int B1sourceSquaresGiven; unsigned int B1drainPerimeterGiven; unsigned int B1sourcePerimeterGiven; unsigned int B1dNodePrimeSet; unsigned int B1sNodePrimeSet; unsigned int B1icVBSGiven; unsigned int B1icVDSGiven; unsigned int B1icVGSGiven; unsigned int B1vonGiven; unsigned int B1vdsatGiven; double *B1DdPtr; double *B1GgPtr; double *B1SsPtr; double *B1BbPtr; double *B1DPdpPtr; double *B1SPspPtr; double *B1DdpPtr; double *B1GbPtr; double *B1GdpPtr; double *B1GspPtr; double *B1SspPtr; double *B1BdpPtr; double *B1BspPtr; double *B1DPspPtr; double *B1DPdPtr; double *B1BgPtr; double *B1DPgPtr; double *B1SPgPtr; double *B1SPsPtr; double *B1DPbPtr; double *B1SPbPtr; double *B1SPdpPtr; double B1dCoeffs[82]; double B1nVar[3][5]; } *B1instances; char *B1modName; int B1type; double B1vfb0; double B1vfbL; double B1vfbW; double B1phi0; double B1phiL; double B1phiW; double B1K10; double B1K1L; double B1K1W; double B1K20; double B1K2L; double B1K2W; double B1eta0; double B1etaL; double B1etaW; double B1etaB0; double B1etaBl; double B1etaBw; double B1etaD0; double B1etaDl; double B1etaDw; double B1deltaL; double B1deltaW; double B1mobZero; double B1mobZeroB0; double B1mobZeroBl; double B1mobZeroBw; double B1mobVdd0; double B1mobVddl; double B1mobVddw; double B1mobVddB0; double B1mobVddBl; double B1mobVddBw; double B1mobVddD0; double B1mobVddDl; double B1mobVddDw; double B1ugs0; double B1ugsL; double B1ugsW; double B1ugsB0; double B1ugsBL; double B1ugsBW; double B1uds0; double B1udsL; double B1udsW; double B1udsB0; double B1udsBL; double B1udsBW; double B1udsD0; double B1udsDL; double B1udsDW; double B1subthSlope0; double B1subthSlopeL; double B1subthSlopeW; double B1subthSlopeB0; double B1subthSlopeBL; double B1subthSlopeBW; double B1subthSlopeD0; double B1subthSlopeDL; double B1subthSlopeDW; double B1oxideThickness; double B1Cox; double B1temp; double B1vdd; double B1gateSourceOverlapCap; double B1gateDrainOverlapCap; double B1gateBulkOverlapCap; double B1channelChargePartitionFlag; double B1sheetResistance; double B1jctSatCurDensity; double B1bulkJctPotential; double B1bulkJctBotGradingCoeff; double B1bulkJctSideGradingCoeff; double B1sidewallJctPotential; double B1unitAreaJctCap; double B1unitLengthSidewallJctCap; double B1defaultWidth; double B1deltaLength; double B1fNcoef; double B1fNexp; unsigned int B1vfb0Given; unsigned int B1vfbLGiven; unsigned int B1vfbWGiven; unsigned int B1phi0Given; unsigned int B1phiLGiven; unsigned int B1phiWGiven; unsigned int B1K10Given; unsigned int B1K1LGiven; unsigned int B1K1WGiven; unsigned int B1K20Given; unsigned int B1K2LGiven; unsigned int B1K2WGiven; unsigned int B1eta0Given; unsigned int B1etaLGiven; unsigned int B1etaWGiven; unsigned int B1etaB0Given; unsigned int B1etaBlGiven; unsigned int B1etaBwGiven; unsigned int B1etaD0Given; unsigned int B1etaDlGiven; unsigned int B1etaDwGiven; unsigned int B1deltaLGiven; unsigned int B1deltaWGiven; unsigned int B1mobZeroGiven; unsigned int B1mobZeroB0Given; unsigned int B1mobZeroBlGiven; unsigned int B1mobZeroBwGiven; unsigned int B1mobVdd0Given; unsigned int B1mobVddlGiven; unsigned int B1mobVddwGiven; unsigned int B1mobVddB0Given; unsigned int B1mobVddBlGiven; unsigned int B1mobVddBwGiven; unsigned int B1mobVddD0Given; unsigned int B1mobVddDlGiven; unsigned int B1mobVddDwGiven; unsigned int B1ugs0Given; unsigned int B1ugsLGiven; unsigned int B1ugsWGiven; unsigned int B1ugsB0Given; unsigned int B1ugsBLGiven; unsigned int B1ugsBWGiven; unsigned int B1uds0Given; unsigned int B1udsLGiven; unsigned int B1udsWGiven; unsigned int B1udsB0Given; unsigned int B1udsBLGiven; unsigned int B1udsBWGiven; unsigned int B1udsD0Given; unsigned int B1udsDLGiven; unsigned int B1udsDWGiven; unsigned int B1subthSlope0Given; unsigned int B1subthSlopeLGiven; unsigned int B1subthSlopeWGiven; unsigned int B1subthSlopeB0Given; unsigned int B1subthSlopeBLGiven; unsigned int B1subthSlopeBWGiven; unsigned int B1subthSlopeD0Given; unsigned int B1subthSlopeDLGiven; unsigned int B1subthSlopeDWGiven; unsigned int B1oxideThicknessGiven; unsigned int B1tempGiven; unsigned int B1vddGiven; unsigned int B1gateSourceOverlapCapGiven; unsigned int B1gateDrainOverlapCapGiven; unsigned int B1gateBulkOverlapCapGiven; unsigned int B1channelChargePartitionFlagGiven; unsigned int B1sheetResistanceGiven; unsigned int B1jctSatCurDensityGiven; unsigned int B1bulkJctPotentialGiven; unsigned int B1bulkJctBotGradingCoeffGiven; unsigned int B1sidewallJctPotentialGiven; unsigned int B1bulkJctSideGradingCoeffGiven; unsigned int B1unitAreaJctCapGiven; unsigned int B1unitLengthSidewallJctCapGiven; unsigned int B1defaultWidthGiven; unsigned int B1deltaLengthGiven; unsigned int B1fNcoefGiven; unsigned int B1fNexpGiven; unsigned int B1typeGiven; } *

user_defined_types: struct sBSIM1model { int B1modType; struct sBSIM1model *B1nextModel; struct sBSIM1instance *B1instances; char *B1modName; int B1type; double B1vfb0; double B1vfbL; double B1vfbW; double B1phi0; double B1phiL; double B1phiW; double B1K10; double B1K1L; double B1K1W; double B1K20; double B1K2L; double B1K2W; double B1eta0; double B1etaL; double B1etaW; double B1etaB0; double B1etaBl; double B1etaBw; double B1etaD0; double B1etaDl; double B1etaDw; double B1deltaL; double B1deltaW; double B1mobZero; double B1mobZeroB0; double B1mobZeroBl; double B1mobZeroBw; double B1mobVdd0; double B1mobVddl; double B1mobVddw; double B1mobVddB0; double B1mobVddBl; double B1mobVddBw; double B1mobVddD0; double B1mobVddDl; double B1mobVddDw; double B1ugs0; double B1ugsL; double B1ugsW; double B1ugsB0; double B1ugsBL; double B1ugsBW; double B1uds0; double B1udsL; double B1udsW; double B1udsB0; double B1udsBL; double B1udsBW; double B1udsD0; double B1udsDL; double B1udsDW; double B1subthSlope0; double B1subthSlopeL; double B1subthSlopeW; double B1subthSlopeB0; double B1subthSlopeBL; double B1subthSlopeBW; double B1subthSlopeD0; double B1subthSlopeDL; double B1subthSlopeDW; double B1oxideThickness; double B1Cox; double B1temp; double B1vdd; double B1gateSourceOverlapCap; double B1gateDrainOverlapCap; double B1gateBulkOverlapCap; double B1channelChargePartitionFlag; double B1sheetResistance; double B1jctSatCurDensity; double B1bulkJctPotential; double B1bulkJctBotGradingCoeff; double B1bulkJctSideGradingCoeff; double B1sidewallJctPotential; double B1unitAreaJctCap; double B1unitLengthSidewallJctCap; double B1defaultWidth; double B1deltaLength; double B1fNcoef; double B1fNexp; unsigned int B1vfb0Given; unsigned int B1vfbLGiven; unsigned int B1vfbWGiven; unsigned int B1phi0Given; unsigned int B1phiLGiven; unsigned int B1phiWGiven; unsigned int B1K10Given; unsigned int B1K1LGiven; unsigned int B1K1WGiven; unsigned int B1K20Given; unsigned int B1K2LGiven; unsigned int B1K2WGiven; unsigned int B1eta0Given; unsigned int B1etaLGiven; unsigned int B1etaWGiven; unsigned int B1etaB0Given; unsigned int B1etaBlGiven; unsigned int B1etaBwGiven; unsigned int B1etaD0Given; unsigned int B1etaDlGiven; unsigned int B1etaDwGiven; unsigned int B1deltaLGiven; unsigned int B1deltaWGiven; unsigned int B1mobZeroGiven; unsigned int B1mobZeroB0Given; unsigned int B1mobZeroBlGiven; unsigned int B1mobZeroBwGiven; unsigned int B1mobVdd0Given; unsigned int B1mobVddlGiven; unsigned int B1mobVddwGiven; unsigned int B1mobVddB0Given; unsigned int B1mobVddBlGiven; unsigned int B1mobVddBwGiven; unsigned int B1mobVddD0Given; unsigned int B1mobVddDlGiven; unsigned int B1mobVddDwGiven; unsigned int B1ugs0Given; unsigned int B1ugsLGiven; unsigned int B1ugsWGiven; unsigned int B1ugsB0Given; unsigned int B1ugsBLGiven; unsigned int B1ugsBWGiven; unsigned int B1uds0Given; unsigned int B1udsLGiven; unsigned int B1udsWGiven; unsigned int B1udsB0Given; unsigned int B1udsBLGiven; unsigned int B1udsBWGiven; unsigned int B1udsD0Given; unsigned int B1udsDLGiven; unsigned int B1udsDWGiven; unsigned int B1subthSlope0Given; unsigned int B1subthSlopeLGiven; unsigned int B1subthSlopeWGiven; unsigned int B1subthSlopeB0Given; unsigned int B1subthSlopeBLGiven; unsigned int B1subthSlopeBWGiven; unsigned int B1subthSlopeD0Given; unsigned int B1subthSlopeDLGiven; unsigned int B1subthSlopeDWGiven; unsigned int B1oxideThicknessGiven; unsigned int B1tempGiven; unsigned int B1vddGiven; unsigned int B1gateSourceOverlapCapGiven; unsigned int B1gateDrainOverlapCapGiven; unsigned int B1gateBulkOverlapCapGiven; unsigned int B1channelChargePartitionFlagGiven; unsigned int B1sheetResistanceGiven; unsigned int B1jctSatCurDensityGiven; unsigned int B1bulkJctPotentialGiven; unsigned int B1bulkJctBotGradingCoeffGiven; unsigned int B1sidewallJctPotentialGiven; unsigned int B1bulkJctSideGradingCoeffGiven; unsigned int B1unitAreaJctCapGiven; unsigned int B1unitLengthSidewallJctCapGiven; unsigned int B1defaultWidthGiven; unsigned int B1deltaLengthGiven; unsigned int B1fNcoefGiven; unsigned int B1fNexpGiven; unsigned int B1typeGiven; }


CAPmAsk

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

if ( a3 == 103 )
{
result = 0LL;
*a4 = a2[6];
}
else
{
if ( a3 > 103 )
{
if ( a3 == 105 )
{
result = 0LL;
*a4 = a2[7];
return result;
}
return 7LL;
}
if ( a3 != 101 )
{
if ( a3 == 102 )
{
result = 0LL;
*a4 = a2[5];
return result;
}
return 7LL;
}
result = 0LL;
*a4 = a2[4];
}
return result;
}

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

if ( a3 == 103 )
{
result = 0LL;
*a4 = a2[6];
}
else
{
if ( a3 > 103 )
{
if ( a3 == 105 )
{
result = 0LL;
*a4 = a2[7];
return result;
}
return 7LL;
}
if ( a3 != 101 )
{
if ( a3 == 102 )
{
result = 0LL;
*a4 = a2[5];
return result;
}
return 7LL;
}
result = 0LL;
*a4 = a2[4];
}
return result;
}

original_code:
int
CAPmAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value)
{
    CAPmodel *here = (CAPmodel*)inst;
    switch(which) {
        case 109:
     value->rValue = here->CAPtnom-(273.15);
     return(0);
 case 107:
     value->rValue = here->CAPtempCoeff1;
     return(0);
 case 108:
     value->rValue = here->CAPtempCoeff2;
     return(0);
 case 112:
            value->rValue = here->CAPmCap;
            return(0);
        case 101:
            value->rValue = here->CAPcj;
            return(0);
        case 102:
            value->rValue = here->CAPcjsw;
            return(0);
        case 103:
            value->rValue = here->CAPdefWidth;
            return(0);
        case 113:
            value->rValue = here->CAPdefLength;
            return(0);
        case 105:
            value->rValue = here->CAPnarrow;
            return(0);
 case 106:
     value->rValue = here->CAPshort;
     return(0);
 case 110:
     value->rValue = here->CAPdi;
     return(0);
 case 111:
     value->rValue = here->CAPthick;
     return(0);
        default:
            return(7);
    }
}

canonical_original_code:
int CAPmAsk(struct CKTcircuit *ckt, struct sGENmodel *inst, int which, union uIFvalue *value)
{
    struct sCAPmodel *here = (CAPmodel*)inst;
    switch(which) {
        case 109:
     value->rValue = here->CAPtnom-(273.15);
     return(0);
 case 107:
     value->rValue = here->CAPtempCoeff1;
     return(0);
 case 108:
     value->rValue = here->CAPtempCoeff2;
     return(0);
 case 112:
            value->rValue = here->CAPmCap;
            return(0);
        case 101:
            value->rValue = here->CAPcj;
            return(0);
        case 102:
            value->rValue = here->CAPcjsw;
            return(0);
        case 103:
            value->rValue = here->CAPdefWidth;
            return(0);
        case 113:
            value->rValue = here->CAPdefLength;
            return(0);
        case 105:
            value->rValue = here->CAPnarrow;
            return(0);
 case 106:
     value->rValue = here->CAPshort;
     return(0);
 case 110:
     value->rValue = here->CAPdi;
     return(0);
 case 111:
     value->rValue = here->CAPthick;
     return(0);
        default:
            return(7);
    }
}

variable_types: struct CKTcircuit { 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; } **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:
inst
struct sGENmodel *

variable_types: which int

variable_types: struct sCAPmodel { int CAPmodType; struct sCAPmodel *CAPnextModel; struct sCAPinstance { struct sCAPmodel *CAPmodPtr; struct sCAPinstance *CAPnextInstance; char *CAPname; int CAPowner; int CAPstate; int CAPposNode; int CAPnegNode; double CAPtemp; double CAPdtemp; double CAPcapac; double CAPinitCond; double CAPwidth; double CAPlength; double CAPscale; double CAPm; double *CAPposPosptr; double *CAPnegNegptr; double *CAPposNegptr; double *CAPnegPosptr; unsigned int CAPcapGiven; unsigned int CAPicGiven; unsigned int CAPwidthGiven; unsigned int CAPlengthGiven; unsigned int CAPtempGiven; unsigned int CAPdtempGiven; unsigned int CAPscaleGiven; unsigned int CAPmGiven; int CAPsenParmNo; } *CAPinstances; char *CAPmodName; double CAPtnom; double CAPtempCoeff1; double CAPtempCoeff2; double CAPmCap; double CAPcj; double CAPcjsw; double CAPdefWidth; double CAPdefLength; double CAPnarrow; double CAPshort; double CAPdi; double CAPthick; unsigned int CAPmCapGiven; unsigned int CAPcjGiven; unsigned int CAPcjswGiven; unsigned int CAPdefWidthGiven; unsigned int CAPdefLengthGiven; unsigned int CAPnarrowGiven; unsigned int CAPshortGiven; unsigned int CAPtnomGiven; unsigned int CAPtc1Given; unsigned int CAPtc2Given; unsigned int CAPdiGiven; unsigned int CAPthickGiven; } *

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 sCAPmodel { int CAPmodType; struct sCAPmodel *CAPnextModel; struct sCAPinstance *CAPinstances; char *CAPmodName; double CAPtnom; double CAPtempCoeff1; double CAPtempCoeff2; double CAPmCap; double CAPcj; double CAPcjsw; double CAPdefWidth; double CAPdefLength; double CAPnarrow; double CAPshort; double CAPdi; double CAPthick; unsigned int CAPmCapGiven; unsigned int CAPcjGiven; unsigned int CAPcjswGiven; unsigned int CAPdefWidthGiven; unsigned int CAPdefLengthGiven; unsigned int CAPnarrowGiven; unsigned int CAPshortGiven; unsigned int CAPtnomGiven; unsigned int CAPtc1Given; unsigned int CAPtc2Given; unsigned int CAPdiGiven; unsigned int CAPthickGiven; }


RESpzLoad

original_code:
int
RESpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
{
    RESmodel *model = (RESmodel *)inModel;
    RESinstance *here;
    double m;
    for( ; model != ((void *)0); model = model->RESnextModel ) {
        for (here = model->RESinstances; here != ((void *)0) ;
                here=here->RESnextInstance) {
     if (here->RESowner != ARCHme) continue;
     m = here->RESm;
            *(here->RESposPosptr) += m * here->RESconduct;
            *(here->RESnegNegptr) += m * here->RESconduct;
            *(here->RESposNegptr) -= m * here->RESconduct;
            *(here->RESnegPosptr) -= m * here->RESconduct;
        }
    }
    return(0);
}

canonical_original_code:
int RESpzLoad(struct sGENmodel *inModel, struct CKTcircuit *ckt, struct SPcomplex *s)
{
    struct sRESmodel *model = (RESmodel *)inModel;
    struct sRESinstance *here;
    double m;
    for( ; model != ((void *)0); model = model->RESnextModel ) {
        for (here = model->RESinstances; here != ((void *)0) ;
                here=here->RESnextInstance) {
     if (here->RESowner != ARCHme) continue;
     m = here->RESm;
            *(here->RESposPosptr) += m * here->RESconduct;
            *(here->RESnegNegptr) += m * here->RESconduct;
            *(here->RESposNegptr) -= m * here->RESconduct;
            *(here->RESnegPosptr) -= m * here->RESconduct;
        }
    }
    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 sRESmodel { int RESmodType; struct sRESmodel *RESnextModel; 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]; } *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; } *

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]; } *

variable_types: m double


decompiled_code:
__int64 __fastcall B1temp(__int64 a1)
{
double v1; // xmm9_8
__int64 v2; // rbx
double v3; // xmm2_8
double v4; // xmm0_8
double v5; // xmm1_8
double v6; // xmm6_8
double v7; // xmm7_8
double v8; // xmm8_8
double v9; // xmm11_8
double v10; // xmm5_8
double v11; // xmm10_8
double v12; // xmm2_8
double v13; // xmm2_8
double v14; // xmm5_8
double v15; // xmm5_8
double v16; // xmm6_8
double v17; // xmm7_8
double v18; // xmm6_8
double v19; // xmm3_8
double v20; // xmm6_8
double v21; // xmm8_8
double v22; // xmm6_8
double v23; // xmm8_8
double v24; // xmm13_8
double v25; // xmm14_8
double v26; // xmm15_8
double v27; // xmm12_8
double v28; // xmm8_8
double v29; // xmm8_8
double v30; // xmm15_8
double v31; // xmm8_8
double v32; // xmm15_8
double v33; // xmm8_8
double v34; // xmm15_8
double v35; // xmm8_8
double v36; // xmm15_8
double v37; // xmm13_8
double v38; // xmm8_8
double v39; // xmm14_8
double v40; // xmm8_8
double v41; // xmm6_8
double v42; // xmm15_8
double v43; // xmm8_8
double v44; // xmm15_8
double v45; // xmm8_8
double v46; // xmm15_8
double v47; // xmm1_8
double v48; // xmm10_8
double v49; // xmm1_8
double v50; // xmm2_8
double v51; // xmm1_8
double v52; // xmm1_8
double v53; // xmm0_8
double v54; // xmm2_8
double v55; // xmm3_8
double v56; // xmm2_8
double v57; // xmm3_8
double v59; // xmm0_8
double v60; // [rsp+0h] [rbp-40h]
double v61; // [rsp+8h] [rbp-38h]
__int64 v62; // [rsp+28h] [rbp-18h] BYREF
__int64 v63; // [rsp+30h] [rbp-10h]

if ( !a1 )
return 0LL;
v1 = *(double *)&LC0;
while ( 1 )
{
if ( v1 > *(double *)(a1 + 600) )
*(double *)(a1 + 600) = v1;
if ( v1 > *(double *)(a1 + 624) )
*(double *)(a1 + 624) = v1;
v2 = *(_QWORD *)(a1 + 16);
v60 = 3.453e-13 / (0.0001 * *(double *)(a1 + 520));
*(double *)(a1 + 528) = v60;
if ( v2 )
break;
LABEL_26:
a1 = *(_QWORD *)(a1 + 8);
if ( !a1 )
return 0LL;
}
while ( 1 )
{
v52 = *(double *)(v2 + 56) - 0.000001 * *(double *)(a1 + 208);
if ( v52 <= 0.0 )
{
v62 = *(_QWORD *)(a1 + 24);
v63 = *(_QWORD *)(v2 + 16);
(*(void (__fastcall **)(__int64, const char *, __int64 *))(SPfrontEnd + 24LL))(
2LL,
"B1: mosfet %s, model %s: Effective channel length <=0",
&v62);
return 7LL;
}
v53 = *(double *)(v2 + 64) - 0.000001 * *(double *)(a1 + 216);
if ( v53 <= 0.0 )
break;
v54 = *(double *)(v2 + 56) * *(double *)(a1 + 568);
*(double *)(v2 + 344) = *(double *)(a1 + 560) * v53;
v55 = *(double *)(a1 + 552);
*(double *)(v2 + 360) = v54;
v56 = *(double *)(a1 + 584);
*(double *)(v2 + 352) = v55 * v53;
v57 = *(double *)(v2 + 88) * v56;
if ( v57 == 0.0 )
*(_QWORD *)(v2 + 128) = 0LL;
else
*(double *)(v2 + 128) = 1.0 / v57;
v3 = v56 * *(double *)(v2 + 96);
if ( v3 == 0.0 )
*(_QWORD *)(v2 + 120) = 0LL;
else
*(double *)(v2 + 120) = 1.0 / v3;
v4 = v53 * 1000000.0;
v5 = v52 * 1000000.0;
v6 = *(double *)(a1 + 104);
v7 = *(double *)(a1 + 120);
v8 = *(double *)(a1 + 152);
v9 = *(double *)(a1 + 224);
v10 = *(double *)(a1 + 80) / v4;
v11 = *(double *)(a1 + 56) / v4 + *(double *)(a1 + 48) / v5 + *(double *)(a1 + 40);
v12 = *(double *)(a1 + 72);
*(double *)(v2 + 184) = v11;
v13 = v12 / v5 + *(double *)(a1 + 64) + v10;
v14 = *(double *)(a1 + 96);
*(double *)(v2 + 192) = v13;
v15 = v14 / v5 + *(double *)(a1 + 88) + v6 / v4;
v16 = *(double *)(a1 + 128);
*(double *)(v2 + 200) = v15;
v17 = v7 / v5 + *(double *)(a1 + 112) + v16 / v4;
v18 = *(double *)(a1 + 144);
*(double *)(v2 + 208) = v17;
v19 = v60 * v4 / v5;
v20 = v18 / v5 + *(double *)(a1 + 136) + v8 / v4;
v21 = *(double *)(a1 + 176);
*(double *)(v2 + 216) = v20;
v22 = *(double *)(a1 + 168) / v5 + *(double *)(a1 + 160) + v21 / v4;
v23 = *(double *)(a1 + 200) / v4;
*(double *)(v2 + 224) = v22;
*(double *)(v2 + 232) = *(double *)(a1 + 192) / v5 + *(double *)(a1 + 184) + v23;
*(double *)(v2 + 240) = v9;
v24 = *(double *)(a1 + 272);
v25 = *(double *)(a1 + 296);
v26 = *(double *)(a1 + 336) / v5;
v27 = *(double *)(a1 + 248) / v4 + *(double *)(a1 + 240) / v5 + *(double *)(a1 + 232);
v28 = *(double *)(a1 + 344);
*(double *)(v2 + 248) = v27;
v29 = v28 / v4 + v26 + *(double *)(a1 + 328);
v30 = *(double *)(a1 + 360);
*(double *)(v2 + 280) = v29;
v31 = *(double *)(a1 + 368) / v4 + v30 / v5 + *(double *)(a1 + 352);
v32 = *(double *)(a1 + 384);
*(double *)(v2 + 288) = v31;
v33 = *(double *)(a1 + 392) / v4 + v32 / v5 + *(double *)(a1 + 376);
v34 = *(double *)(a1 + 408) / v5;
*(double *)(v2 + 296) = v33;
v35 = *(double *)(a1 + 416) / v4 + v34 + *(double *)(a1 + 400);
v36 = *(double *)(a1 + 432) / v5;
*(double *)(v2 + 304) = v35;
*(double *)(v2 + 312) = *(double *)(a1 + 440) / v4 + v36 + *(double *)(a1 + 424);
v37 = v24 / v4 + *(double *)(a1 + 264) / v5 + *(double *)(a1 + 256);
v38 = *(double *)(a1 + 288) / v5;
*(double *)(v2 + 256) = v37;
v39 = v25 / v4 + v38 + *(double *)(a1 + 280);
*(double *)(v2 + 264) = v39;
v40 = *(double *)(a1 + 456) / v5;
v41 = *(double *)(a1 + 320) / v4 + *(double *)(a1 + 312) / v5 + *(double *)(a1 + 304);
v42 = *(double *)(a1 + 464);
*(double *)(v2 + 272) = v41;
v43 = v40 + *(double *)(a1 + 448) + v42 / v4;
v44 = *(double *)(a1 + 488) / v4;
*(double *)(v2 + 320) = v43;
v45 = *(double *)(a1 + 480) / v5 + *(double *)(a1 + 472) + v44;
v46 = *(double *)(a1 + 504) / v5;
v47 = *(double *)(a1 + 512);
*(double *)(v2 + 328) = v45;
*(double *)(v2 + 336) = v47 / v4 + v46 + *(double *)(a1 + 496);
if ( v1 > v13 )
{
*(double *)(v2 + 192) = v1;
v13 = v1;
}
if ( v15 < 0.0 )
{
*(_QWORD *)(v2 + 200) = 0LL;
v15 = 0.0;
}
if ( v17 < 0.0 )
*(_QWORD *)(v2 + 208) = 0LL;
v48 = v11 + v13;
if ( v13 < 0.0 )
{
v61 = v15;
v59 = sqrt(v13);
v13 = *(double *)(v2 + 192);
v49 = v59;
v9 = *(double *)(v2 + 240);
v1 = *(double *)&LC0;
v27 = *(double *)(v2 + 248);
v41 = *(double *)(v2 + 272);
v37 = *(double *)(v2 + 256);
v15 = v61;
v39 = *(double *)(v2 + 264);
}
else
{
v49 = sqrt(v13);
}
v50 = v13 * *(double *)(v2 + 208);
*(double *)(v2 + 240) = v9 * v19;
*(double *)(v2 + 248) = v27 * v19;
v51 = v49 * v15 + v48 - v50;
*(double *)(v2 + 256) = v37 * v19;
*(double *)(v2 + 264) = v39 * v19;
*(double *)(v2 + 368) = v51;
*(double *)(v2 + 160) = v51;
*(double *)(v2 + 272) = fmax(v19 * v41, 0.0);
v2 = *(_QWORD *)(v2 + 8);
if ( !v2 )
goto LABEL_26;
}
v62 = *(_QWORD *)(a1 + 24);
v63 = *(_QWORD *)(v2 + 16);
(*(void (__fastcall **)(__int64, const char *, __int64 *))(SPfrontEnd + 24LL))(
2LL,
"B1: mosfet %s, model %s: Effective channel width <=0",
&v62);
return 7LL;
}

canonical_decompiled_code:
__int64 __fastcall func0(__int64 a1)
{
double v1; // xmm9_8
__int64 v2; // rbx
double v3; // xmm2_8
double v4; // xmm0_8
double v5; // xmm1_8
double v6; // xmm6_8
double v7; // xmm7_8
double v8; // xmm8_8
double v9; // xmm11_8
double v10; // xmm5_8
double v11; // xmm10_8
double v12; // xmm2_8
double v13; // xmm2_8
double v14; // xmm5_8
double v15; // xmm5_8
double v16; // xmm6_8
double v17; // xmm7_8
double v18; // xmm6_8
double v19; // xmm3_8
double v20; // xmm6_8
double v21; // xmm8_8
double v22; // xmm6_8
double v23; // xmm8_8
double v24; // xmm13_8
double v25; // xmm14_8
double v26; // xmm15_8
double v27; // xmm12_8
double v28; // xmm8_8
double v29; // xmm8_8
double v30; // xmm15_8
double v31; // xmm8_8
double v32; // xmm15_8
double v33; // xmm8_8
double v34; // xmm15_8
double v35; // xmm8_8
double v36; // xmm15_8
double v37; // xmm13_8
double v38; // xmm8_8
double v39; // xmm14_8
double v40; // xmm8_8
double v41; // xmm6_8
double v42; // xmm15_8
double v43; // xmm8_8
double v44; // xmm15_8
double v45; // xmm8_8
double v46; // xmm15_8
double v47; // xmm1_8
double v48; // xmm10_8
double v49; // xmm1_8
double v50; // xmm2_8
double v51; // xmm1_8
double v52; // xmm1_8
double v53; // xmm0_8
double v54; // xmm2_8
double v55; // xmm3_8
double v56; // xmm2_8
double v57; // xmm3_8
double v59; // xmm0_8
double v60; // [rsp+0h] [rbp-40h]
double v61; // [rsp+8h] [rbp-38h]
__int64 v62; // [rsp+28h] [rbp-18h] BYREF
__int64 v63; // [rsp+30h] [rbp-10h]

if ( !a1 )
return 0LL;
v1 = *(double *)&LC0;
while ( 1 )
{
if ( v1 > *(double *)(a1 + 600) )
*(double *)(a1 + 600) = v1;
if ( v1 > *(double *)(a1 + 624) )
*(double *)(a1 + 624) = v1;
v2 = *(_QWORD *)(a1 + 16);
v60 = 3.453e-13 / (0.0001 * *(double *)(a1 + 520));
*(double *)(a1 + 528) = v60;
if ( v2 )
break;
LABEL_26:
a1 = *(_QWORD *)(a1 + 8);
if ( !a1 )
return 0LL;
}
while ( 1 )
{
v52 = *(double *)(v2 + 56) - 0.000001 * *(double *)(a1 + 208);
if ( v52 <= 0.0 )
{
v62 = *(_QWORD *)(a1 + 24);
v63 = *(_QWORD *)(v2 + 16);
(*(void (__fastcall **)(__int64, const char *, __int64 *))(SPfrontEnd + 24LL))(
2LL,
"B1: mosfet %s, model %s: Effective channel length <=0",
&v62);
return 7LL;
}
v53 = *(double *)(v2 + 64) - 0.000001 * *(double *)(a1 + 216);
if ( v53 <= 0.0 )
break;
v54 = *(double *)(v2 + 56) * *(double *)(a1 + 568);
*(double *)(v2 + 344) = *(double *)(a1 + 560) * v53;
v55 = *(double *)(a1 + 552);
*(double *)(v2 + 360) = v54;
v56 = *(double *)(a1 + 584);
*(double *)(v2 + 352) = v55 * v53;
v57 = *(double *)(v2 + 88) * v56;
if ( v57 == 0.0 )
*(_QWORD *)(v2 + 128) = 0LL;
else
*(double *)(v2 + 128) = 1.0 / v57;
v3 = v56 * *(double *)(v2 + 96);
if ( v3 == 0.0 )
*(_QWORD *)(v2 + 120) = 0LL;
else
*(double *)(v2 + 120) = 1.0 / v3;
v4 = v53 * 1000000.0;
v5 = v52 * 1000000.0;
v6 = *(double *)(a1 + 104);
v7 = *(double *)(a1 + 120);
v8 = *(double *)(a1 + 152);
v9 = *(double *)(a1 + 224);
v10 = *(double *)(a1 + 80) / v4;
v11 = *(double *)(a1 + 56) / v4 + *(double *)(a1 + 48) / v5 + *(double *)(a1 + 40);
v12 = *(double *)(a1 + 72);
*(double *)(v2 + 184) = v11;
v13 = v12 / v5 + *(double *)(a1 + 64) + v10;
v14 = *(double *)(a1 + 96);
*(double *)(v2 + 192) = v13;
v15 = v14 / v5 + *(double *)(a1 + 88) + v6 / v4;
v16 = *(double *)(a1 + 128);
*(double *)(v2 + 200) = v15;
v17 = v7 / v5 + *(double *)(a1 + 112) + v16 / v4;
v18 = *(double *)(a1 + 144);
*(double *)(v2 + 208) = v17;
v19 = v60 * v4 / v5;
v20 = v18 / v5 + *(double *)(a1 + 136) + v8 / v4;
v21 = *(double *)(a1 + 176);
*(double *)(v2 + 216) = v20;
v22 = *(double *)(a1 + 168) / v5 + *(double *)(a1 + 160) + v21 / v4;
v23 = *(double *)(a1 + 200) / v4;
*(double *)(v2 + 224) = v22;
*(double *)(v2 + 232) = *(double *)(a1 + 192) / v5 + *(double *)(a1 + 184) + v23;
*(double *)(v2 + 240) = v9;
v24 = *(double *)(a1 + 272);
v25 = *(double *)(a1 + 296);
v26 = *(double *)(a1 + 336) / v5;
v27 = *(double *)(a1 + 248) / v4 + *(double *)(a1 + 240) / v5 + *(double *)(a1 + 232);
v28 = *(double *)(a1 + 344);
*(double *)(v2 + 248) = v27;
v29 = v28 / v4 + v26 + *(double *)(a1 + 328);
v30 = *(double *)(a1 + 360);
*(double *)(v2 + 280) = v29;
v31 = *(double *)(a1 + 368) / v4 + v30 / v5 + *(double *)(a1 + 352);
v32 = *(double *)(a1 + 384);
*(double *)(v2 + 288) = v31;
v33 = *(double *)(a1 + 392) / v4 + v32 / v5 + *(double *)(a1 + 376);
v34 = *(double *)(a1 + 408) / v5;
*(double *)(v2 + 296) = v33;
v35 = *(double *)(a1 + 416) / v4 + v34 + *(double *)(a1 + 400);
v36 = *(double *)(a1 + 432) / v5;
*(double *)(v2 + 304) = v35;
*(double *)(v2 + 312) = *(double *)(a1 + 440) / v4 + v36 + *(double *)(a1 + 424);
v37 = v24 / v4 + *(double *)(a1 + 264) / v5 + *(double *)(a1 + 256);
v38 = *(double *)(a1 + 288) / v5;
*(double *)(v2 + 256) = v37;
v39 = v25 / v4 + v38 + *(double *)(a1 + 280);
*(double *)(v2 + 264) = v39;
v40 = *(double *)(a1 + 456) / v5;
v41 = *(double *)(a1 + 320) / v4 + *(double *)(a1 + 312) / v5 + *(double *)(a1 + 304);
v42 = *(double *)(a1 + 464);
*(double *)(v2 + 272) = v41;
v43 = v40 + *(double *)(a1 + 448) + v42 / v4;
v44 = *(double *)(a1 + 488) / v4;
*(double *)(v2 + 320) = v43;
v45 = *(double *)(a1 + 480) / v5 + *(double *)(a1 + 472) + v44;
v46 = *(double *)(a1 + 504) / v5;
v47 = *(double *)(a1 + 512);
*(double *)(v2 + 328) = v45;
*(double *)(v2 + 336) = v47 / v4 + v46 + *(double *)(a1 + 496);
if ( v1 > v13 )
{
*(double *)(v2 + 192) = v1;
v13 = v1;
}
if ( v15 < 0.0 )
{
*(_QWORD *)(v2 + 200) = 0LL;
v15 = 0.0;
}
if ( v17 < 0.0 )
*(_QWORD *)(v2 + 208) = 0LL;
v48 = v11 + v13;
if ( v13 < 0.0 )
{
v61 = v15;
v59 = sqrt(v13);
v13 = *(double *)(v2 + 192);
v49 = v59;
v9 = *(double *)(v2 + 240);
v1 = *(double *)&LC0;
v27 = *(double *)(v2 + 248);
v41 = *(double *)(v2 + 272);
v37 = *(double *)(v2 + 256);
v15 = v61;
v39 = *(double *)(v2 + 264);
}
else
{
v49 = sqrt(v13);
}
v50 = v13 * *(double *)(v2 + 208);
*(double *)(v2 + 240) = v9 * v19;
*(double *)(v2 + 248) = v27 * v19;
v51 = v49 * v15 + v48 - v50;
*(double *)(v2 + 256) = v37 * v19;
*(double *)(v2 + 264) = v39 * v19;
*(double *)(v2 + 368) = v51;
*(double *)(v2 + 160) = v51;
*(double *)(v2 + 272) = fmax(v19 * v41, 0.0);
v2 = *(_QWORD *)(v2 + 8);
if ( !v2 )
goto LABEL_26;
}
v62 = *(_QWORD *)(a1 + 24);
v63 = *(_QWORD *)(v2 + 16);
(*(void (__fastcall **)(__int64, const char *, __int64 *))(SPfrontEnd + 24LL))(
2LL,
"B1: mosfet %s, model %s: Effective channel width <=0",
&v62);
return 7LL;
}

original_code:
int
B1temp(GENmodel *inModel, CKTcircuit *ckt)
{
    B1model *model = (B1model*) inModel;
    B1instance *here;
    double EffChanLength;
    double EffChanWidth;
    double Cox;
    double CoxWoverL ;
    double Leff;
    double Weff;
    for( ; model != ((void *)0); model = model->B1nextModel ) {
        if( model->B1bulkJctPotential < 0.1) {
            model->B1bulkJctPotential = 0.1;
        }
        if( model->B1sidewallJctPotential < 0.1) {
            model->B1sidewallJctPotential = 0.1;
        }
        Cox = 3.453e-13/(model->B1oxideThickness * 1.0e-4);
        model->B1Cox = Cox;
        for (here = model->B1instances; here != ((void *)0) ;
                here=here->B1nextInstance) {
     if (here->B1owner != ARCHme) continue;
            if( (EffChanLength = here->B1l - model->B1deltaL *1e-6 )<=0) {
                IFuid namarray[2];
                namarray[0] = model->B1modName;
                namarray[1] = here->B1name;
                (*(SPfrontEnd->IFerror))(0x2,
                    "B1: mosfet %s, model %s: Effective channel length <=0",
                    namarray);
                return(7);
            }
            if( (EffChanWidth = here->B1w - model->B1deltaW *1e-6 ) <= 0 ) {
                IFuid namarray[2];
                namarray[0] = model->B1modName;
                namarray[1] = here->B1name;
                (*(SPfrontEnd->IFerror))(0x2,
                    "B1: mosfet %s, model %s: Effective channel width <=0",
                    namarray);
                return(7);
            }
            here->B1GDoverlapCap=EffChanWidth *model->B1gateDrainOverlapCap;
            here->B1GSoverlapCap=EffChanWidth*model->B1gateSourceOverlapCap;
            here->B1GBoverlapCap=here->B1l * model->B1gateBulkOverlapCap;
            if( (here->B1drainConductance=model->B1sheetResistance *
                    here->B1drainSquares) != 0.0 ) {
                here->B1drainConductance = 1. / here->B1drainConductance ;
            }
            if( (here->B1sourceConductance=model->B1sheetResistance *
                    here->B1sourceSquares) != 0.0 ) {
                here->B1sourceConductance = 1. / here->B1sourceConductance ;
            }
            Leff = EffChanLength * 1.e6;
            Weff = EffChanWidth * 1.e6;
            CoxWoverL = Cox * Weff / Leff ;
            here->B1vfb = model->B1vfb0 +
                model->B1vfbL / Leff + model->B1vfbW / Weff;
            here->B1phi = model->B1phi0 +
                model->B1phiL / Leff + model->B1phiW / Weff;
            here->B1K1 = model->B1K10 +
                model->B1K1L / Leff + model->B1K1W / Weff;
            here->B1K2 = model->B1K20 +
                model->B1K2L / Leff + model->B1K2W / Weff;
            here->B1eta = model->B1eta0 +
                model->B1etaL / Leff + model->B1etaW / Weff;
            here->B1etaB = model->B1etaB0 +
                model->B1etaBl / Leff + model->B1etaBw / Weff;
            here->B1etaD = model->B1etaD0 +
                model->B1etaDl / Leff + model->B1etaDw / Weff;
            here->B1betaZero = model->B1mobZero;
            here->B1betaZeroB = model->B1mobZeroB0 +
                model->B1mobZeroBl / Leff + model->B1mobZeroBw / Weff;
            here->B1ugs = model->B1ugs0 +
                model->B1ugsL / Leff + model->B1ugsW / Weff;
            here->B1ugsB = model->B1ugsB0 +
                model->B1ugsBL / Leff + model->B1ugsBW / Weff;
            here->B1uds = model->B1uds0 +
                model->B1udsL / Leff + model->B1udsW / Weff;
            here->B1udsB = model->B1udsB0 +
                model->B1udsBL / Leff + model->B1udsBW / Weff;
            here->B1udsD = model->B1udsD0 +
                model->B1udsDL / Leff + model->B1udsDW / Weff;
            here->B1betaVdd = model->B1mobVdd0 +
                model->B1mobVddl / Leff + model->B1mobVddw / Weff;
            here->B1betaVddB = model->B1mobVddB0 +
                model->B1mobVddBl / Leff + model->B1mobVddBw / Weff;
            here->B1betaVddD = model->B1mobVddD0 +
                model->B1mobVddDl / Leff + model->B1mobVddDw / Weff;
            here->B1subthSlope = model->B1subthSlope0 +
                model->B1subthSlopeL / Leff + model->B1subthSlopeW / Weff;
            here->B1subthSlopeB = model->B1subthSlopeB0 +
                model->B1subthSlopeBL / Leff + model->B1subthSlopeBW / Weff;
            here->B1subthSlopeD = model->B1subthSlopeD0 +
                model->B1subthSlopeDL / Leff + model->B1subthSlopeDW / Weff;
            if(here->B1phi < 0.1 ) here->B1phi = 0.1;
            if(here->B1K1 < 0.0) here->B1K1 = 0.0;
            if(here->B1K2 < 0.0) here->B1K2 = 0.0;
            here->B1vt0 = here->B1vfb + here->B1phi + here->B1K1 *
                sqrt(here->B1phi) - here->B1K2 * here->B1phi;
            here->B1von = here->B1vt0;
            here->B1betaZero = here->B1betaZero * CoxWoverL;
            here->B1betaZeroB = here->B1betaZeroB * CoxWoverL;
            here->B1betaVdd = here->B1betaVdd * CoxWoverL;
            here->B1betaVddB = here->B1betaVddB * CoxWoverL;
            here->B1betaVddD = ((here->B1betaVddD * CoxWoverL) > (0.0) ? (here->B1betaVddD * CoxWoverL) : (0.0));
        }
    }
    return(0);
}

canonical_original_code:
int B1temp(struct sGENmodel *inModel, struct CKTcircuit *ckt)
{
    struct sBSIM1model *model = (B1model*) inModel;
    struct sBSIM1instance *here;
    double EffChanLength;
    double EffChanWidth;
    double Cox;
    double CoxWoverL;
    double Leff;
    double Weff;
    for( ; model != ((void *)0); model = model->B1nextModel ) {
        if( model->B1bulkJctPotential < 0.1) {
            model->B1bulkJctPotential = 0.1;
        }
        if( model->B1sidewallJctPotential < 0.1) {
            model->B1sidewallJctPotential = 0.1;
        }
        Cox = 3.453e-13/(model->B1oxideThickness * 1.0e-4);
        model->B1Cox = Cox;
        for (here = model->B1instances; here != ((void *)0) ;
                here=here->B1nextInstance) {
     if (here->B1owner != ARCHme) continue;
            if( (EffChanLength = here->B1l - model->B1deltaL *1e-6 )<=0) {
                char *namarray[2];
                namarray[0] = model->B1modName;
                namarray[1] = here->B1name;
                (*(SPfrontEnd->IFerror))(0x2,
                    "B1: mosfet %s, model %s: Effective channel length <=0",
                    namarray);
                return(7);
            }
            if( (EffChanWidth = here->B1w - model->B1deltaW *1e-6 ) <= 0 ) {
                char *namarray[2];
                namarray[0] = model->B1modName;
                namarray[1] = here->B1name;
                (*(SPfrontEnd->IFerror))(0x2,
                    "B1: mosfet %s, model %s: Effective channel width <=0",
                    namarray);
                return(7);
            }
            here->B1GDoverlapCap=EffChanWidth *model->B1gateDrainOverlapCap;
            here->B1GSoverlapCap=EffChanWidth*model->B1gateSourceOverlapCap;
            here->B1GBoverlapCap=here->B1l * model->B1gateBulkOverlapCap;
            if( (here->B1drainConductance=model->B1sheetResistance *
                    here->B1drainSquares) != 0.0 ) {
                here->B1drainConductance = 1. / here->B1drainConductance ;
            }
            if( (here->B1sourceConductance=model->B1sheetResistance *
                    here->B1sourceSquares) != 0.0 ) {
                here->B1sourceConductance = 1. / here->B1sourceConductance ;
            }
            Leff = EffChanLength * 1.e6;
            Weff = EffChanWidth * 1.e6;
            CoxWoverL = Cox * Weff / Leff ;
            here->B1vfb = model->B1vfb0 +
                model->B1vfbL / Leff + model->B1vfbW / Weff;
            here->B1phi = model->B1phi0 +
                model->B1phiL / Leff + model->B1phiW / Weff;
            here->B1K1 = model->B1K10 +
                model->B1K1L / Leff + model->B1K1W / Weff;
            here->B1K2 = model->B1K20 +
                model->B1K2L / Leff + model->B1K2W / Weff;
            here->B1eta = model->B1eta0 +
                model->B1etaL / Leff + model->B1etaW / Weff;
            here->B1etaB = model->B1etaB0 +
                model->B1etaBl / Leff + model->B1etaBw / Weff;
            here->B1etaD = model->B1etaD0 +
                model->B1etaDl / Leff + model->B1etaDw / Weff;
            here->B1betaZero = model->B1mobZero;
            here->B1betaZeroB = model->B1mobZeroB0 +
                model->B1mobZeroBl / Leff + model->B1mobZeroBw / Weff;
            here->B1ugs = model->B1ugs0 +
                model->B1ugsL / Leff + model->B1ugsW / Weff;
            here->B1ugsB = model->B1ugsB0 +
                model->B1ugsBL / Leff + model->B1ugsBW / Weff;
            here->B1uds = model->B1uds0 +
                model->B1udsL / Leff + model->B1udsW / Weff;
            here->B1udsB = model->B1udsB0 +
                model->B1udsBL / Leff + model->B1udsBW / Weff;
            here->B1udsD = model->B1udsD0 +
                model->B1udsDL / Leff + model->B1udsDW / Weff;
            here->B1betaVdd = model->B1mobVdd0 +
                model->B1mobVddl / Leff + model->B1mobVddw / Weff;
            here->B1betaVddB = model->B1mobVddB0 +
                model->B1mobVddBl / Leff + model->B1mobVddBw / Weff;
            here->B1betaVddD = model->B1mobVddD0 +
                model->B1mobVddDl / Leff + model->B1mobVddDw / Weff;
            here->B1subthSlope = model->B1subthSlope0 +
                model->B1subthSlopeL / Leff + model->B1subthSlopeW / Weff;
            here->B1subthSlopeB = model->B1subthSlopeB0 +
                model->B1subthSlopeBL / Leff + model->B1subthSlopeBW / Weff;
            here->B1subthSlopeD = model->B1subthSlopeD0 +
                model->B1subthSlopeDL / Leff + model->B1subthSlopeDW / Weff;
            if(here->B1phi < 0.1 ) here->B1phi = 0.1;
            if(here->B1K1 < 0.0) here->B1K1 = 0.0;
            if(here->B1K2 < 0.0) here->B1K2 = 0.0;
            here->B1vt0 = here->B1vfb + here->B1phi + here->B1K1 *
                sqrt(here->B1phi) - here->B1K2 * here->B1phi;
            here->B1von = here->B1vt0;
            here->B1betaZero = here->B1betaZero * CoxWoverL;
            here->B1betaZeroB = here->B1betaZeroB * CoxWoverL;
            here->B1betaVdd = here->B1betaVdd * CoxWoverL;
            here->B1betaVddB = here->B1betaVddB * CoxWoverL;
            here->B1betaVddD = ((here->B1betaVddD * CoxWoverL) > (0.0) ? (here->B1betaVddD * CoxWoverL) : (0.0));
        }
    }
    return(0);
}

variable_types: struct sBSIM1instance { struct sBSIM1model { int B1modType; struct sBSIM1model *B1nextModel; struct sBSIM1instance *B1instances; char *B1modName; int B1type; double B1vfb0; double B1vfbL; double B1vfbW; double B1phi0; double B1phiL; double B1phiW; double B1K10; double B1K1L; double B1K1W; double B1K20; double B1K2L; double B1K2W; double B1eta0; double B1etaL; double B1etaW; double B1etaB0; double B1etaBl; double B1etaBw; double B1etaD0; double B1etaDl; double B1etaDw; double B1deltaL; double B1deltaW; double B1mobZero; double B1mobZeroB0; double B1mobZeroBl; double B1mobZeroBw; double B1mobVdd0; double B1mobVddl; double B1mobVddw; double B1mobVddB0; double B1mobVddBl; double B1mobVddBw; double B1mobVddD0; double B1mobVddDl; double B1mobVddDw; double B1ugs0; double B1ugsL; double B1ugsW; double B1ugsB0; double B1ugsBL; double B1ugsBW; double B1uds0; double B1udsL; double B1udsW; double B1udsB0; double B1udsBL; double B1udsBW; double B1udsD0; double B1udsDL; double B1udsDW; double B1subthSlope0; double B1subthSlopeL; double B1subthSlopeW; double B1subthSlopeB0; double B1subthSlopeBL; double B1subthSlopeBW; double B1subthSlopeD0; double B1subthSlopeDL; double B1subthSlopeDW; double B1oxideThickness; double B1Cox; double B1temp; double B1vdd; double B1gateSourceOverlapCap; double B1gateDrainOverlapCap; double B1gateBulkOverlapCap; double B1channelChargePartitionFlag; double B1sheetResistance; double B1jctSatCurDensity; double B1bulkJctPotential; double B1bulkJctBotGradingCoeff; double B1bulkJctSideGradingCoeff; double B1sidewallJctPotential; double B1unitAreaJctCap; double B1unitLengthSidewallJctCap; double B1defaultWidth; double B1deltaLength; double B1fNcoef; double B1fNexp; unsigned int B1vfb0Given; unsigned int B1vfbLGiven; unsigned int B1vfbWGiven; unsigned int B1phi0Given; unsigned int B1phiLGiven; unsigned int B1phiWGiven; unsigned int B1K10Given; unsigned int B1K1LGiven; unsigned int B1K1WGiven; unsigned int B1K20Given; unsigned int B1K2LGiven; unsigned int B1K2WGiven; unsigned int B1eta0Given; unsigned int B1etaLGiven; unsigned int B1etaWGiven; unsigned int B1etaB0Given; unsigned int B1etaBlGiven; unsigned int B1etaBwGiven; unsigned int B1etaD0Given; unsigned int B1etaDlGiven; unsigned int B1etaDwGiven; unsigned int B1deltaLGiven; unsigned int B1deltaWGiven; unsigned int B1mobZeroGiven; unsigned int B1mobZeroB0Given; unsigned int B1mobZeroBlGiven; unsigned int B1mobZeroBwGiven; unsigned int B1mobVdd0Given; unsigned int B1mobVddlGiven; unsigned int B1mobVddwGiven; unsigned int B1mobVddB0Given; unsigned int B1mobVddBlGiven; unsigned int B1mobVddBwGiven; unsigned int B1mobVddD0Given; unsigned int B1mobVddDlGiven; unsigned int B1mobVddDwGiven; unsigned int B1ugs0Given; unsigned int B1ugsLGiven; unsigned int B1ugsWGiven; unsigned int B1ugsB0Given; unsigned int B1ugsBLGiven; unsigned int B1ugsBWGiven; unsigned int B1uds0Given; unsigned int B1udsLGiven; unsigned int B1udsWGiven; unsigned int B1udsB0Given; unsigned int B1udsBLGiven; unsigned int B1udsBWGiven; unsigned int B1udsD0Given; unsigned int B1udsDLGiven; unsigned int B1udsDWGiven; unsigned int B1subthSlope0Given; unsigned int B1subthSlopeLGiven; unsigned int B1subthSlopeWGiven; unsigned int B1subthSlopeB0Given; unsigned int B1subthSlopeBLGiven; unsigned int B1subthSlopeBWGiven; unsigned int B1subthSlopeD0Given; unsigned int B1subthSlopeDLGiven; unsigned int B1subthSlopeDWGiven; unsigned int B1oxideThicknessGiven; unsigned int B1tempGiven; unsigned int B1vddGiven; unsigned int B1gateSourceOverlapCapGiven; unsigned int B1gateDrainOverlapCapGiven; unsigned int B1gateBulkOverlapCapGiven; unsigned int B1channelChargePartitionFlagGiven; unsigned int B1sheetResistanceGiven; unsigned int B1jctSatCurDensityGiven; unsigned int B1bulkJctPotentialGiven; unsigned int B1bulkJctBotGradingCoeffGiven; unsigned int B1sidewallJctPotentialGiven; unsigned int B1bulkJctSideGradingCoeffGiven; unsigned int B1unitAreaJctCapGiven; unsigned int B1unitLengthSidewallJctCapGiven; unsigned int B1defaultWidthGiven; unsigned int B1deltaLengthGiven; unsigned int B1fNcoefGiven; unsigned int B1fNexpGiven; unsigned int B1typeGiven; } *B1modPtr; struct sBSIM1instance *B1nextInstance; char *B1name; int B1owner; int B1states; int B1dNode; int B1gNode; int B1sNode; int B1bNode; int B1dNodePrime; int B1sNodePrime; double B1l; double B1w; double B1m; double B1drainArea; double B1sourceArea; double B1drainSquares; double B1sourceSquares; double B1drainPerimeter; double B1sourcePerimeter; double B1sourceConductance; double B1drainConductance; double B1icVBS; double B1icVDS; double B1icVGS; double B1von; double B1vdsat; int B1off; int B1mode; double B1vfb; double B1phi; double B1K1; double B1K2; double B1eta; double B1etaB; double B1etaD; double B1betaZero; double B1betaZeroB; double B1betaVdd; double B1betaVddB; double B1betaVddD; double B1ugs; double B1ugsB; double B1uds; double B1udsB; double B1udsD; double B1subthSlope; double B1subthSlopeB; double B1subthSlopeD; double B1GDoverlapCap; double B1GSoverlapCap; double B1GBoverlapCap; double B1vt0; double B1vdd; double B1temp; double B1oxideThickness; unsigned int B1channelChargePartitionFlag; unsigned int B1lGiven; unsigned int B1wGiven; unsigned int B1mGiven; unsigned int B1drainAreaGiven; unsigned int B1sourceAreaGiven; unsigned int B1drainSquaresGiven; unsigned int B1sourceSquaresGiven; unsigned int B1drainPerimeterGiven; unsigned int B1sourcePerimeterGiven; unsigned int B1dNodePrimeSet; unsigned int B1sNodePrimeSet; unsigned int B1icVBSGiven; unsigned int B1icVDSGiven; unsigned int B1icVGSGiven; unsigned int B1vonGiven; unsigned int B1vdsatGiven; double *B1DdPtr; double *B1GgPtr; double *B1SsPtr; double *B1BbPtr; double *B1DPdpPtr; double *B1SPspPtr; double *B1DdpPtr; double *B1GbPtr; double *B1GdpPtr; double *B1GspPtr; double *B1SspPtr; double *B1BdpPtr; double *B1BspPtr; double *B1DPspPtr; double *B1DPdPtr; double *B1BgPtr; double *B1DPgPtr; double *B1SPgPtr; double *B1SPsPtr; double *B1DPbPtr; double *B1SPbPtr; double *B1SPdpPtr; double B1dCoeffs[82]; double B1nVar[3][5]; } *

variable_types: EffChanLength double

variable_types: EffChanWidth double

variable_types: Cox double

variable_types: CoxWoverL double

variable_types: Leff double

variable_types: Weff double

variable_types:
namarray
char *[2]

user_defined_types: struct sBSIM1instance { struct sBSIM1model *B1modPtr; struct sBSIM1instance *B1nextInstance; char *B1name; int B1owner; int B1states; int B1dNode; int B1gNode; int B1sNode; int B1bNode; int B1dNodePrime; int B1sNodePrime; double B1l; double B1w; double B1m; double B1drainArea; double B1sourceArea; double B1drainSquares; double B1sourceSquares; double B1drainPerimeter; double B1sourcePerimeter; double B1sourceConductance; double B1drainConductance; double B1icVBS; double B1icVDS; double B1icVGS; double B1von; double B1vdsat; int B1off; int B1mode; double B1vfb; double B1phi; double B1K1; double B1K2; double B1eta; double B1etaB; double B1etaD; double B1betaZero; double B1betaZeroB; double B1betaVdd; double B1betaVddB; double B1betaVddD; double B1ugs; double B1ugsB; double B1uds; double B1udsB; double B1udsD; double B1subthSlope; double B1subthSlopeB; double B1subthSlopeD; double B1GDoverlapCap; double B1GSoverlapCap; double B1GBoverlapCap; double B1vt0; double B1vdd; double B1temp; double B1oxideThickness; unsigned int B1channelChargePartitionFlag; unsigned int B1lGiven; unsigned int B1wGiven; unsigned int B1mGiven; unsigned int B1drainAreaGiven; unsigned int B1sourceAreaGiven; unsigned int B1drainSquaresGiven; unsigned int B1sourceSquaresGiven; unsigned int B1drainPerimeterGiven; unsigned int B1sourcePerimeterGiven; unsigned int B1dNodePrimeSet; unsigned int B1sNodePrimeSet; unsigned int B1icVBSGiven; unsigned int B1icVDSGiven; unsigned int B1icVGSGiven; unsigned int B1vonGiven; unsigned int B1vdsatGiven; double *B1DdPtr; double *B1GgPtr; double *B1SsPtr; double *B1BbPtr; double *B1DPdpPtr; double *B1SPspPtr; double *B1DdpPtr; double *B1GbPtr; double *B1GdpPtr; double *B1GspPtr; double *B1SspPtr; double *B1BdpPtr; double *B1BspPtr; double *B1DPspPtr; double *B1DPdPtr; double *B1BgPtr; double *B1DPgPtr; double *B1SPgPtr; double *B1SPsPtr; double *B1DPbPtr; double *B1SPbPtr; double *B1SPdpPtr; double B1dCoeffs[82]; double B1nVar[3][5]; }

user_defined_types: 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; }

user_defined_types: struct sCKTnode { char *name; int type; int number; double ic; double nodeset; double *ptr; struct sCKTnode *next; unsigned int icGiven; unsigned int nsGiven; }

user_defined_types: struct sJOB { int JOBtype; struct sJOB *JOBnextJob; char *JOBname; }

user_defined_types: 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; }