/* matloc.f -- translated by f2c (version of 3 February 1990  3:36:42).
   You must link the resulting object file with the libraries:
	-lF77 -lI77 -lm -lc   (in that order)
*/

#include "f2c.h"

/* Common Block Declarations */

struct {
    integer ielmnt, isbckt, nsbckt, iunsat, nunsat, itemps, numtem, isens, 
	    nsens, ifour, nfour, ifield, icode, idelim, icolum, insize, 
	    junode, lsbkpt, numbkp, iorder, jmnode, iur, iuc, ilc, ilr, 
	    numoff, isr, nmoffc, iseq, iseq1, neqn, nodevs, ndiag, iswap, 
	    iequa, macins, lvnim1, lx0, lvn, lynl, lyu, lyl, lx1, lx2, lx3, 
	    lx4, lx5, lx6, lx7, ld0, ld1, ltd, imynl, imvn, lcvn, nsnod, 
	    nsmat, nsval, icnod, icmat, icval, loutpt, lpol, lzer, irswpf, 
	    irswpr, icswpf, icswpr, irpt, jcpt, irowno, jcolno, nttbr, nttar, 
	    lvntmp;
} tabinf_;

#define tabinf_1 tabinf_

struct {
    integer locate[50], jelcnt[50], nunods, ncnods, numnod, nstop, nut, nlt, 
	    nxtrm, ndist, ntlin, ibr, numvs, numalt, numcyc;
} cirdat_;

#define cirdat_1 cirdat_

struct {
    doublereal omega, time, delta, delold[7], ag[7], vt, xni, egfet, xmu, 
	    sfactr;
    integer mode, modedc, icalc, initf, method, iord, maxord, noncon, iterno, 
	    itemno, nosolv, modac, ipiv, ivmflg, ipostp, iscrch, iofile;
} status_;

#define status_1 status_

struct {
    doublereal fstart, fstop, fincr, skw2, refprl, spw2;
    integer jacflg, idfreq, inoise, nosprt, nosout, nosin, idist, idprt;
} ac_;

#define ac_1 ac_

struct {
    doublereal value[200000];
} blank_;

#define blank_1 blank_

/*<       subroutine matloc >*/
/* Subroutine */ int matloc_()
{
    /* System generated locals */
    integer i_1;

    /* Local variables */
    static integer ndim, lnod, lmat, iptr, node1, node2, node3, node4, node5, 
	    node6, node7, i;
    extern integer indxx_();
    static integer locvs;
#define nodplc ((integer *)&blank_1)
#define cvalue ((complex *)&blank_1)
    static integer nl1, nl2, locvst, ni1, ni2, loc, kbr, ibr1, ibr2;

/*<       implicit double precision (a-h,o-z) >*/

/*     this routine stores the locations of the various matrix terms to */

/* which the different circuit elements contribute. */

/* spice version 2g.6  sccsid=tabinf 3/15/83 */
/*<       common /tabinf/ ielmnt,isbckt,nsbckt,iunsat,nunsat,itemps,numtem, >*/
/*<      1   isens,nsens,ifour,nfour,ifield,icode,idelim,icolum,insize, >*/
/*<      2   junode,lsbkpt,numbkp,iorder,jmnode,iur,iuc,ilc,ilr,numoff,isr, >*/
/*<      3   nmoffc,iseq,iseq1,neqn,nodevs,ndiag,iswap,iequa,macins,lvnim1, >*/
/*<      4   lx0,lvn,lynl,lyu,lyl,lx1,lx2,lx3,lx4,lx5,lx6,lx7,ld0,ld1,ltd, >*/
/*<      5   imynl,imvn,lcvn,nsnod,nsmat,nsval,icnod,icmat,icval, >*/
/*<      6   loutpt,lpol,lzer,irswpf,irswpr,icswpf,icswpr,irpt,jcpt, >*/
/*<      7   irowno,jcolno,nttbr,nttar,lvntmp >*/
/* spice version 2g.6  sccsid=cirdat 3/15/83 */
/*<       common /cirdat/ locate(50),jelcnt(50),nunods,ncnods,numnod,nstop, >*/
/*<      1   nut,nlt,nxtrm,ndist,ntlin,ibr,numvs,numalt,numcyc >*/
/* spice version 2g.6  sccsid=status 3/15/83 */
/*<       common /status/ omega,time,delta,delold(7),ag(7),vt,xni,egfet, >*/
/*<      1   xmu,sfactr,mode,modedc,icalc,initf,method,iord,maxord,noncon, >*/
/*<      2   iterno,itemno,nosolv,modac,ipiv,ivmflg,ipostp,iscrch,iofile >*/
/* spice version 2g.6  sccsid=ac 3/15/83 */
/*<       common /ac/ fstart,fstop,fincr,skw2,refprl,spw2,jacflg,idfreq, >*/
/*<      1   inoise,nosprt,nosout,nosin,idist,idprt >*/
/* spice version 2g.6  sccsid=blank 3/15/83 */
/*<       common /blank/ value(200000) >*/
/*<       integer nodplc(64) >*/
/*<       complex cvalue(32) >*/
/*<       equivalence (value(1),nodplc(1),cvalue(1)) >*/

/*  resistors */

/*<       loc=locate(1) >*/
    loc = cirdat_1.locate[0];
/*<   690 if ((loc.eq.0).or.(nodplc(loc+8).ne.0)) go to 700 >*/
L690:
    if (loc == 0 || nodplc[loc + 7] != 0) {
	goto L700;
    }
/*<       node1=nodplc(loc+2) >*/
    node1 = nodplc[loc + 1];
/*<       node2=nodplc(loc+3) >*/
    node2 = nodplc[loc + 2];
/*<       nodplc(loc+4)=indxx(node1,node2) >*/
    nodplc[loc + 3] = indxx_(&node1, &node2);
/*<       nodplc(loc+5)=indxx(node2,node1) >*/
    nodplc[loc + 4] = indxx_(&node2, &node1);
/*<       nodplc(loc+6)=indxx(node1,node1) >*/
    nodplc[loc + 5] = indxx_(&node1, &node1);
/*<       nodplc(loc+7)=indxx(node2,node2) >*/
    nodplc[loc + 6] = indxx_(&node2, &node2);
/*<       loc=nodplc(loc) >*/
    loc = nodplc[loc - 1];
/*<       go to 690 >*/
    goto L690;

/*  capacitors */

/*<   700 loc=locate(2) >*/
L700:
    loc = cirdat_1.locate[1];
/*<   710 if ((loc.eq.0).or.(nodplc(loc+12).ne.0)) go to 720 >*/
L710:
    if (loc == 0 || nodplc[loc + 11] != 0) {
	goto L720;
    }
/*<       node1=nodplc(loc+2) >*/
    node1 = nodplc[loc + 1];
/*<       node2=nodplc(loc+3) >*/
    node2 = nodplc[loc + 2];
/*<       nodplc(loc+5)=indxx(node1,node2) >*/
    nodplc[loc + 4] = indxx_(&node1, &node2);
/*<       nodplc(loc+6)=indxx(node2,node1) >*/
    nodplc[loc + 5] = indxx_(&node2, &node1);
/*<       nodplc(loc+10)=indxx(node1,node1) >*/
    nodplc[loc + 9] = indxx_(&node1, &node1);
/*<       nodplc(loc+11)=indxx(node2,node2) >*/
    nodplc[loc + 10] = indxx_(&node2, &node2);
/*<       loc=nodplc(loc) >*/
    loc = nodplc[loc - 1];
/*<       go to 710 >*/
    goto L710;

/*  inductors */

/*<   720 loc=locate(3) >*/
L720:
    loc = cirdat_1.locate[2];
/*<   730 if ((loc.eq.0).or.(nodplc(loc+14).ne.0)) go to 740 >*/
L730:
    if (loc == 0 || nodplc[loc + 13] != 0) {
	goto L740;
    }
/*<       node1=nodplc(loc+2) >*/
    node1 = nodplc[loc + 1];
/*<       node2=nodplc(loc+3) >*/
    node2 = nodplc[loc + 2];
/*<       ibr=nodplc(loc+5) >*/
    cirdat_1.ibr = nodplc[loc + 4];
/*<       nodplc(loc+6)=indxx(node1,ibr) >*/
    nodplc[loc + 5] = indxx_(&node1, &cirdat_1.ibr);
/*<       nodplc(loc+7)=indxx(node2,ibr) >*/
    nodplc[loc + 6] = indxx_(&node2, &cirdat_1.ibr);
/*<       nodplc(loc+8)=indxx(ibr,node1) >*/
    nodplc[loc + 7] = indxx_(&cirdat_1.ibr, &node1);
/*<       nodplc(loc+9)=indxx(ibr,node2) >*/
    nodplc[loc + 8] = indxx_(&cirdat_1.ibr, &node2);
/*<       nodplc(loc+13)=indxx(ibr,ibr) >*/
    nodplc[loc + 12] = indxx_(&cirdat_1.ibr, &cirdat_1.ibr);
/*<       loc=nodplc(loc) >*/
    loc = nodplc[loc - 1];
/*<       go to 730 >*/
    goto L730;

/*  mutual inductances */

/*<   740 loc=locate(4) >*/
L740:
    loc = cirdat_1.locate[3];
/*<   750 if ((loc.eq.0).or.(nodplc(loc+6).ne.0)) go to 760 >*/
L750:
    if (loc == 0 || nodplc[loc + 5] != 0) {
	goto L760;
    }
/*<       nl1=nodplc(loc+2) >*/
    nl1 = nodplc[loc + 1];
/*<       nl2=nodplc(loc+3) >*/
    nl2 = nodplc[loc + 2];
/*<       ibr1=nodplc(nl1+5) >*/
    ibr1 = nodplc[nl1 + 4];
/*<       ibr2=nodplc(nl2+5) >*/
    ibr2 = nodplc[nl2 + 4];
/*<       nodplc(loc+4)=indxx(ibr1,ibr2) >*/
    nodplc[loc + 3] = indxx_(&ibr1, &ibr2);
/*<       nodplc(loc+5)=indxx(ibr2,ibr1) >*/
    nodplc[loc + 4] = indxx_(&ibr2, &ibr1);
/*<       loc=nodplc(loc) >*/
    loc = nodplc[loc - 1];
/*<       go to 750 >*/
    goto L750;

/*  nonlinear voltage controlled current sources */

/*<   760 loc=locate(5) >*/
L760:
    loc = cirdat_1.locate[4];
/*<   762 if ((loc.eq.0).or.(nodplc(loc+13).ne.0)) go to 764 >*/
L762:
    if (loc == 0 || nodplc[loc + 12] != 0) {
	goto L764;
    }
/*<       node1=nodplc(loc+2) >*/
    node1 = nodplc[loc + 1];
/*<       node2=nodplc(loc+3) >*/
    node2 = nodplc[loc + 2];
/*<       ndim=nodplc(loc+4) >*/
    ndim = nodplc[loc + 3];
/*<       lnod=nodplc(loc+6) >*/
    lnod = nodplc[loc + 5];
/*<       lmat=nodplc(loc+7) >*/
    lmat = nodplc[loc + 6];
/*<       do 763 i=1,ndim >*/
    i_1 = ndim;
    for (i = 1; i <= i_1; ++i) {
/*<       node3=nodplc(lnod+1) >*/
	node3 = nodplc[lnod];
/*<       node4=nodplc(lnod+2) >*/
	node4 = nodplc[lnod + 1];
/*<       lnod=lnod+2 >*/
	lnod += 2;
/*<       nodplc(lmat+1)=indxx(node1,node3) >*/
	nodplc[lmat] = indxx_(&node1, &node3);
/*<       nodplc(lmat+2)=indxx(node1,node4) >*/
	nodplc[lmat + 1] = indxx_(&node1, &node4);
/*<       nodplc(lmat+3)=indxx(node2,node3) >*/
	nodplc[lmat + 2] = indxx_(&node2, &node3);
/*<       nodplc(lmat+4)=indxx(node2,node4) >*/
	nodplc[lmat + 3] = indxx_(&node2, &node4);
/*<       lmat=lmat+4 >*/
	lmat += 4;
/*<   763 continue >*/
/* L763: */
    }
/*<       loc=nodplc(loc) >*/
    loc = nodplc[loc - 1];
/*<       go to 762 >*/
    goto L762;

/*  nonlinear voltage controlled voltage sources */

/*<   764 loc=locate(6) >*/
L764:
    loc = cirdat_1.locate[5];
/*<   766 if ((loc.eq.0).or.(nodplc(loc+14).ne.0)) go to 768 >*/
L766:
    if (loc == 0 || nodplc[loc + 13] != 0) {
	goto L768;
    }
/*<       node1=nodplc(loc+2) >*/
    node1 = nodplc[loc + 1];
/*<       node2=nodplc(loc+3) >*/
    node2 = nodplc[loc + 2];
/*<       ndim=nodplc(loc+4) >*/
    ndim = nodplc[loc + 3];
/*<       ibr=nodplc(loc+6) >*/
    cirdat_1.ibr = nodplc[loc + 5];
/*<       lnod=nodplc(loc+7) >*/
    lnod = nodplc[loc + 6];
/*<       lmat=nodplc(loc+8) >*/
    lmat = nodplc[loc + 7];
/*<       nodplc(lmat+1)=indxx(node1,ibr) >*/
    nodplc[lmat] = indxx_(&node1, &cirdat_1.ibr);
/*<       nodplc(lmat+2)=indxx(node2,ibr) >*/
    nodplc[lmat + 1] = indxx_(&node2, &cirdat_1.ibr);
/*<       nodplc(lmat+3)=indxx(ibr,node1) >*/
    nodplc[lmat + 2] = indxx_(&cirdat_1.ibr, &node1);
/*<       nodplc(lmat+4)=indxx(ibr,node2) >*/
    nodplc[lmat + 3] = indxx_(&cirdat_1.ibr, &node2);
/*<       lmat=lmat+4 >*/
    lmat += 4;
/*<       do 767 i=1,ndim >*/
    i_1 = ndim;
    for (i = 1; i <= i_1; ++i) {
/*<       node3=nodplc(lnod+1) >*/
	node3 = nodplc[lnod];
/*<       node4=nodplc(lnod+2) >*/
	node4 = nodplc[lnod + 1];
/*<       lnod=lnod+2 >*/
	lnod += 2;
/*<       nodplc(lmat+1)=indxx(ibr,node3) >*/
	nodplc[lmat] = indxx_(&cirdat_1.ibr, &node3);
/*<       nodplc(lmat+2)=indxx(ibr,node4) >*/
	nodplc[lmat + 1] = indxx_(&cirdat_1.ibr, &node4);
/*<       lmat=lmat+2 >*/
	lmat += 2;
/*<   767 continue >*/
/* L767: */
    }
/*<       loc=nodplc(loc) >*/
    loc = nodplc[loc - 1];
/*<       go to 766 >*/
    goto L766;

/*  nonlinear current controlled current sources */

/*<   768 loc=locate(7) >*/
L768:
    loc = cirdat_1.locate[6];
/*<   770 if ((loc.eq.0).or.(nodplc(loc+13).ne.0)) go to 772 >*/
L770:
    if (loc == 0 || nodplc[loc + 12] != 0) {
	goto L772;
    }
/*<       node1=nodplc(loc+2) >*/
    node1 = nodplc[loc + 1];
/*<       node2=nodplc(loc+3) >*/
    node2 = nodplc[loc + 2];
/*<       ndim=nodplc(loc+4) >*/
    ndim = nodplc[loc + 3];
/*<       locvs=nodplc(loc+6) >*/
    locvs = nodplc[loc + 5];
/*<       lmat=nodplc(loc+7) >*/
    lmat = nodplc[loc + 6];
/*<       do 771 i=1,ndim >*/
    i_1 = ndim;
    for (i = 1; i <= i_1; ++i) {
/*<       locvst=nodplc(locvs+i) >*/
	locvst = nodplc[locvs + i - 1];
/*<       ibr=nodplc(locvst+6) >*/
	cirdat_1.ibr = nodplc[locvst + 5];
/*<       nodplc(lmat+1)=indxx(node1,ibr) >*/
	nodplc[lmat] = indxx_(&node1, &cirdat_1.ibr);
/*<       nodplc(lmat+2)=indxx(node2,ibr) >*/
	nodplc[lmat + 1] = indxx_(&node2, &cirdat_1.ibr);
/*<       lmat=lmat+2 >*/
	lmat += 2;
/*<   771 continue >*/
/* L771: */
    }
/*<       loc=nodplc(loc) >*/
    loc = nodplc[loc - 1];
/*<       go to 770 >*/
    goto L770;

/*  nonlinear current controlled voltage sources */

/*<   772 loc=locate(8) >*/
L772:
    loc = cirdat_1.locate[7];
/*<   774 if ((loc.eq.0).or.(nodplc(loc+14).ne.0)) go to 780 >*/
L774:
    if (loc == 0 || nodplc[loc + 13] != 0) {
	goto L780;
    }
/*<       node1=nodplc(loc+2) >*/
    node1 = nodplc[loc + 1];
/*<       node2=nodplc(loc+3) >*/
    node2 = nodplc[loc + 2];
/*<       ndim=nodplc(loc+4) >*/
    ndim = nodplc[loc + 3];
/*<       ibr=nodplc(loc+6) >*/
    cirdat_1.ibr = nodplc[loc + 5];
/*<       locvs=nodplc(loc+7) >*/
    locvs = nodplc[loc + 6];
/*<       lmat=nodplc(loc+8) >*/
    lmat = nodplc[loc + 7];
/*<       nodplc(lmat+1)=indxx(node1,ibr) >*/
    nodplc[lmat] = indxx_(&node1, &cirdat_1.ibr);
/*<       nodplc(lmat+2)=indxx(node2,ibr) >*/
    nodplc[lmat + 1] = indxx_(&node2, &cirdat_1.ibr);
/*<       nodplc(lmat+3)=indxx(ibr,node1) >*/
    nodplc[lmat + 2] = indxx_(&cirdat_1.ibr, &node1);
/*<       nodplc(lmat+4)=indxx(ibr,node2) >*/
    nodplc[lmat + 3] = indxx_(&cirdat_1.ibr, &node2);
/*<       lmat=lmat+4 >*/
    lmat += 4;
/*<       do 775 i=1,ndim >*/
    i_1 = ndim;
    for (i = 1; i <= i_1; ++i) {
/*<       locvst=nodplc(locvs+i) >*/
	locvst = nodplc[locvs + i - 1];
/*<       kbr=nodplc(locvst+6) >*/
	kbr = nodplc[locvst + 5];
/*<       nodplc(lmat+i)=indxx(ibr,kbr) >*/
	nodplc[lmat + i - 1] = indxx_(&cirdat_1.ibr, &kbr);
/*<   775 continue >*/
/* L775: */
    }
/*<       loc=nodplc(loc) >*/
    loc = nodplc[loc - 1];
/*<       go to 774 >*/
    goto L774;

/*  voltage sources */

/*<   780 loc=locate(9) >*/
L780:
    loc = cirdat_1.locate[8];
/*<   790 if ((loc.eq.0).or.(nodplc(loc+11).ne.0)) go to 800 >*/
L790:
    if (loc == 0 || nodplc[loc + 10] != 0) {
	goto L800;
    }
/*<       node1=nodplc(loc+2) >*/
    node1 = nodplc[loc + 1];
/*<       node2=nodplc(loc+3) >*/
    node2 = nodplc[loc + 2];
/*<       iptr=nodplc(loc+6) >*/
    iptr = nodplc[loc + 5];
/*<       nodplc(loc+7)=indxx(node1,iptr) >*/
    nodplc[loc + 6] = indxx_(&node1, &iptr);
/*<       nodplc(loc+8)=indxx(node2,iptr) >*/
    nodplc[loc + 7] = indxx_(&node2, &iptr);
/*<       nodplc(loc+9)=indxx(iptr,node1) >*/
    nodplc[loc + 8] = indxx_(&iptr, &node1);
/*<       nodplc(loc+10)=indxx(iptr,node2) >*/
    nodplc[loc + 9] = indxx_(&iptr, &node2);
/*<       loc=nodplc(loc) >*/
    loc = nodplc[loc - 1];
/*<       go to 790 >*/
    goto L790;

/*  diodes */

/*<   800 loc=locate(11) >*/
L800:
    loc = cirdat_1.locate[10];
/*<   810 if ((loc.eq.0).or.(nodplc(loc+16).ne.0)) go to 820 >*/
L810:
    if (loc == 0 || nodplc[loc + 15] != 0) {
	goto L820;
    }
/*<       node1=nodplc(loc+2) >*/
    node1 = nodplc[loc + 1];
/*<       node2=nodplc(loc+3) >*/
    node2 = nodplc[loc + 2];
/*<       node3=nodplc(loc+4) >*/
    node3 = nodplc[loc + 3];
/*<       nodplc(loc+7)=indxx(node1,node3) >*/
    nodplc[loc + 6] = indxx_(&node1, &node3);
/*<       nodplc(loc+8)=indxx(node2,node3) >*/
    nodplc[loc + 7] = indxx_(&node2, &node3);
/*<       nodplc(loc+9)=indxx(node3,node1) >*/
    nodplc[loc + 8] = indxx_(&node3, &node1);
/*<       nodplc(loc+10)=indxx(node3,node2) >*/
    nodplc[loc + 9] = indxx_(&node3, &node2);
/*<       nodplc(loc+13)=indxx(node1,node1) >*/
    nodplc[loc + 12] = indxx_(&node1, &node1);
/*<       nodplc(loc+14)=indxx(node2,node2) >*/
    nodplc[loc + 13] = indxx_(&node2, &node2);
/*<       nodplc(loc+15)=indxx(node3,node3) >*/
    nodplc[loc + 14] = indxx_(&node3, &node3);
/*<       loc=nodplc(loc) >*/
    loc = nodplc[loc - 1];
/*<       go to 810 >*/
    goto L810;

/*  transistors */

/*<   820 loc=locate(12) >*/
L820:
    loc = cirdat_1.locate[11];
/*<   830 if ((loc.eq.0).or.(nodplc(loc+36).ne.0)) go to 840 >*/
L830:
    if (loc == 0 || nodplc[loc + 35] != 0) {
	goto L840;
    }
/*<       node1=nodplc(loc+2) >*/
    node1 = nodplc[loc + 1];
/*<       node2=nodplc(loc+3) >*/
    node2 = nodplc[loc + 2];
/*<       node3=nodplc(loc+4) >*/
    node3 = nodplc[loc + 3];
/*<       node4=nodplc(loc+5) >*/
    node4 = nodplc[loc + 4];
/*<       node5=nodplc(loc+6) >*/
    node5 = nodplc[loc + 5];
/*<       node6=nodplc(loc+7) >*/
    node6 = nodplc[loc + 6];
/*<       node7=nodplc(loc+30) >*/
    node7 = nodplc[loc + 29];
/*<       nodplc(loc+10)=indxx(node1,node4) >*/
    nodplc[loc + 9] = indxx_(&node1, &node4);
/*<       nodplc(loc+11)=indxx(node2,node5) >*/
    nodplc[loc + 10] = indxx_(&node2, &node5);
/*<       nodplc(loc+12)=indxx(node3,node6) >*/
    nodplc[loc + 11] = indxx_(&node3, &node6);
/*<       nodplc(loc+13)=indxx(node4,node1) >*/
    nodplc[loc + 12] = indxx_(&node4, &node1);
/*<       nodplc(loc+14)=indxx(node4,node5) >*/
    nodplc[loc + 13] = indxx_(&node4, &node5);
/*<       nodplc(loc+15)=indxx(node4,node6) >*/
    nodplc[loc + 14] = indxx_(&node4, &node6);
/*<       nodplc(loc+16)=indxx(node5,node2) >*/
    nodplc[loc + 15] = indxx_(&node5, &node2);
/*<       nodplc(loc+17)=indxx(node5,node4) >*/
    nodplc[loc + 16] = indxx_(&node5, &node4);
/*<       nodplc(loc+18)=indxx(node5,node6) >*/
    nodplc[loc + 17] = indxx_(&node5, &node6);
/*<       nodplc(loc+19)=indxx(node6,node3) >*/
    nodplc[loc + 18] = indxx_(&node6, &node3);
/*<       nodplc(loc+20)=indxx(node6,node4) >*/
    nodplc[loc + 19] = indxx_(&node6, &node4);
/*<       nodplc(loc+21)=indxx(node6,node5) >*/
    nodplc[loc + 20] = indxx_(&node6, &node5);
/*<       nodplc(loc+24)=indxx(node1,node1) >*/
    nodplc[loc + 23] = indxx_(&node1, &node1);
/*<       nodplc(loc+25)=indxx(node2,node2) >*/
    nodplc[loc + 24] = indxx_(&node2, &node2);
/*<       nodplc(loc+26)=indxx(node3,node3) >*/
    nodplc[loc + 25] = indxx_(&node3, &node3);
/*<       nodplc(loc+27)=indxx(node4,node4) >*/
    nodplc[loc + 26] = indxx_(&node4, &node4);
/*<       nodplc(loc+28)=indxx(node5,node5) >*/
    nodplc[loc + 27] = indxx_(&node5, &node5);
/*<       nodplc(loc+29)=indxx(node6,node6) >*/
    nodplc[loc + 28] = indxx_(&node6, &node6);
/*<       nodplc(loc+31)=indxx(node7,node7) >*/
    nodplc[loc + 30] = indxx_(&node7, &node7);
/*<       nodplc(loc+32)=indxx(node4,node7) >*/
    nodplc[loc + 31] = indxx_(&node4, &node7);
/*<       nodplc(loc+33)=indxx(node7,node4) >*/
    nodplc[loc + 32] = indxx_(&node7, &node4);
/*<       nodplc(loc+34)=indxx(node2,node4) >*/
    nodplc[loc + 33] = indxx_(&node2, &node4);
/*<       nodplc(loc+35)=indxx(node4,node2) >*/
    nodplc[loc + 34] = indxx_(&node4, &node2);
/*<       loc=nodplc(loc) >*/
    loc = nodplc[loc - 1];
/*<       go to 830 >*/
    goto L830;

/*  jfets */

/*<   840 loc=locate(13) >*/
L840:
    loc = cirdat_1.locate[12];
/*<   850 if ((loc.eq.0).or.(nodplc(loc+25).ne.0)) go to 860 >*/
L850:
    if (loc == 0 || nodplc[loc + 24] != 0) {
	goto L860;
    }
/*<       node1=nodplc(loc+2) >*/
    node1 = nodplc[loc + 1];
/*<       node2=nodplc(loc+3) >*/
    node2 = nodplc[loc + 2];
/*<       node3=nodplc(loc+4) >*/
    node3 = nodplc[loc + 3];
/*<       node4=nodplc(loc+5) >*/
    node4 = nodplc[loc + 4];
/*<       node5=nodplc(loc+6) >*/
    node5 = nodplc[loc + 5];
/*<       nodplc(loc+9)=indxx(node1,node4) >*/
    nodplc[loc + 8] = indxx_(&node1, &node4);
/*<       nodplc(loc+10)=indxx(node2,node4) >*/
    nodplc[loc + 9] = indxx_(&node2, &node4);
/*<       nodplc(loc+11)=indxx(node2,node5) >*/
    nodplc[loc + 10] = indxx_(&node2, &node5);
/*<       nodplc(loc+12)=indxx(node3,node5) >*/
    nodplc[loc + 11] = indxx_(&node3, &node5);
/*<       nodplc(loc+13)=indxx(node4,node1) >*/
    nodplc[loc + 12] = indxx_(&node4, &node1);
/*<       nodplc(loc+14)=indxx(node4,node2) >*/
    nodplc[loc + 13] = indxx_(&node4, &node2);
/*<       nodplc(loc+15)=indxx(node4,node5) >*/
    nodplc[loc + 14] = indxx_(&node4, &node5);
/*<       nodplc(loc+16)=indxx(node5,node2) >*/
    nodplc[loc + 15] = indxx_(&node5, &node2);
/*<       nodplc(loc+17)=indxx(node5,node3) >*/
    nodplc[loc + 16] = indxx_(&node5, &node3);
/*<       nodplc(loc+18)=indxx(node5,node4) >*/
    nodplc[loc + 17] = indxx_(&node5, &node4);
/*<       nodplc(loc+20)=indxx(node1,node1) >*/
    nodplc[loc + 19] = indxx_(&node1, &node1);
/*<       nodplc(loc+21)=indxx(node2,node2) >*/
    nodplc[loc + 20] = indxx_(&node2, &node2);
/*<       nodplc(loc+22)=indxx(node3,node3) >*/
    nodplc[loc + 21] = indxx_(&node3, &node3);
/*<       nodplc(loc+23)=indxx(node4,node4) >*/
    nodplc[loc + 22] = indxx_(&node4, &node4);
/*<       nodplc(loc+24)=indxx(node5,node5) >*/
    nodplc[loc + 23] = indxx_(&node5, &node5);
/*<       loc=nodplc(loc) >*/
    loc = nodplc[loc - 1];
/*<       go to 850 >*/
    goto L850;

/*  mosfets */

/*<   860 loc=locate(14) >*/
L860:
    loc = cirdat_1.locate[13];
/*<   870 if ((loc.eq.0).or.(nodplc(loc+33).ne.0)) go to 900 >*/
L870:
    if (loc == 0 || nodplc[loc + 32] != 0) {
	goto L900;
    }
/*<       node1=nodplc(loc+2) >*/
    node1 = nodplc[loc + 1];
/*<       node2=nodplc(loc+3) >*/
    node2 = nodplc[loc + 2];
/*<       node3=nodplc(loc+4) >*/
    node3 = nodplc[loc + 3];
/*<       node4=nodplc(loc+5) >*/
    node4 = nodplc[loc + 4];
/*<       node5=nodplc(loc+6) >*/
    node5 = nodplc[loc + 5];
/*<       node6=nodplc(loc+7) >*/
    node6 = nodplc[loc + 6];
/*<       nodplc(loc+10)=indxx(node1,node5) >*/
    nodplc[loc + 9] = indxx_(&node1, &node5);
/*<       nodplc(loc+11)=indxx(node2,node4) >*/
    nodplc[loc + 10] = indxx_(&node2, &node4);
/*<       nodplc(loc+12)=indxx(node2,node5) >*/
    nodplc[loc + 11] = indxx_(&node2, &node5);
/*<       nodplc(loc+13)=indxx(node2,node6) >*/
    nodplc[loc + 12] = indxx_(&node2, &node6);
/*<       nodplc(loc+14)=indxx(node3,node6) >*/
    nodplc[loc + 13] = indxx_(&node3, &node6);
/*<       nodplc(loc+15)=indxx(node4,node2) >*/
    nodplc[loc + 14] = indxx_(&node4, &node2);
/*<       nodplc(loc+16)=indxx(node4,node5) >*/
    nodplc[loc + 15] = indxx_(&node4, &node5);
/*<       nodplc(loc+17)=indxx(node4,node6) >*/
    nodplc[loc + 16] = indxx_(&node4, &node6);
/*<       nodplc(loc+18)=indxx(node5,node1) >*/
    nodplc[loc + 17] = indxx_(&node5, &node1);
/*<       nodplc(loc+19)=indxx(node5,node2) >*/
    nodplc[loc + 18] = indxx_(&node5, &node2);
/*<       nodplc(loc+20)=indxx(node5,node4) >*/
    nodplc[loc + 19] = indxx_(&node5, &node4);
/*<       nodplc(loc+21)=indxx(node5,node6) >*/
    nodplc[loc + 20] = indxx_(&node5, &node6);
/*<       nodplc(loc+22)=indxx(node6,node2) >*/
    nodplc[loc + 21] = indxx_(&node6, &node2);
/*<       nodplc(loc+23)=indxx(node6,node3) >*/
    nodplc[loc + 22] = indxx_(&node6, &node3);
/*<       nodplc(loc+24)=indxx(node6,node4) >*/
    nodplc[loc + 23] = indxx_(&node6, &node4);
/*<       nodplc(loc+25)=indxx(node6,node5) >*/
    nodplc[loc + 24] = indxx_(&node6, &node5);
/*<       nodplc(loc+27)=indxx(node1,node1) >*/
    nodplc[loc + 26] = indxx_(&node1, &node1);
/*<       nodplc(loc+28)=indxx(node2,node2) >*/
    nodplc[loc + 27] = indxx_(&node2, &node2);
/*<       nodplc(loc+29)=indxx(node3,node3) >*/
    nodplc[loc + 28] = indxx_(&node3, &node3);
/*<       nodplc(loc+30)=indxx(node4,node4) >*/
    nodplc[loc + 29] = indxx_(&node4, &node4);
/*<       nodplc(loc+31)=indxx(node5,node5) >*/
    nodplc[loc + 30] = indxx_(&node5, &node5);
/*<       nodplc(loc+32)=indxx(node6,node6) >*/
    nodplc[loc + 31] = indxx_(&node6, &node6);
/*<       loc=nodplc(loc) >*/
    loc = nodplc[loc - 1];
/*<       go to 870 >*/
    goto L870;

/*  transmission lines */

/*<   900 loc=locate(17) >*/
L900:
    loc = cirdat_1.locate[16];
/*<   910 if ((loc.eq.0).or.(nodplc(loc+33).ne.0)) go to 1000 >*/
L910:
    if (loc == 0 || nodplc[loc + 32] != 0) {
	goto L1000;
    }
/*<       node1=nodplc(loc+2) >*/
    node1 = nodplc[loc + 1];
/*<       node2=nodplc(loc+3) >*/
    node2 = nodplc[loc + 2];
/*<       node3=nodplc(loc+4) >*/
    node3 = nodplc[loc + 3];
/*<       node4=nodplc(loc+5) >*/
    node4 = nodplc[loc + 4];
/*<       ni1=nodplc(loc+6) >*/
    ni1 = nodplc[loc + 5];
/*<       ni2=nodplc(loc+7) >*/
    ni2 = nodplc[loc + 6];
/*<       ibr1=nodplc(loc+8) >*/
    ibr1 = nodplc[loc + 7];
/*<       ibr2=nodplc(loc+9) >*/
    ibr2 = nodplc[loc + 8];
/*<       nodplc(loc+10)=indxx(node1,node1) >*/
    nodplc[loc + 9] = indxx_(&node1, &node1);
/*<       nodplc(loc+11)=indxx(node1,ni1) >*/
    nodplc[loc + 10] = indxx_(&node1, &ni1);
/*<       nodplc(loc+12)=indxx(node2,ibr1) >*/
    nodplc[loc + 11] = indxx_(&node2, &ibr1);
/*<       nodplc(loc+13)=indxx(node3,node3) >*/
    nodplc[loc + 12] = indxx_(&node3, &node3);
/*<       nodplc(loc+14)=indxx(node4,ibr2) >*/
    nodplc[loc + 13] = indxx_(&node4, &ibr2);
/*<       nodplc(loc+15)=indxx(ni1,node1) >*/
    nodplc[loc + 14] = indxx_(&ni1, &node1);
/*<       nodplc(loc+16)=indxx(ni1,ni1) >*/
    nodplc[loc + 15] = indxx_(&ni1, &ni1);
/*<       nodplc(loc+17)=indxx(ni1,ibr1) >*/
    nodplc[loc + 16] = indxx_(&ni1, &ibr1);
/*<       nodplc(loc+18)=indxx(ni2,ni2) >*/
    nodplc[loc + 17] = indxx_(&ni2, &ni2);
/*<       nodplc(loc+19)=indxx(ni2,ibr2) >*/
    nodplc[loc + 18] = indxx_(&ni2, &ibr2);
/*<       nodplc(loc+20)=indxx(ibr1,node2) >*/
    nodplc[loc + 19] = indxx_(&ibr1, &node2);
/*<       nodplc(loc+21)=indxx(ibr1,node3) >*/
    nodplc[loc + 20] = indxx_(&ibr1, &node3);
/*<       nodplc(loc+22)=indxx(ibr1,node4) >*/
    nodplc[loc + 21] = indxx_(&ibr1, &node4);
/*<       nodplc(loc+23)=indxx(ibr1,ni1) >*/
    nodplc[loc + 22] = indxx_(&ibr1, &ni1);
/*<       nodplc(loc+24)=indxx(ibr1,ibr2) >*/
    nodplc[loc + 23] = indxx_(&ibr1, &ibr2);
/*<       nodplc(loc+25)=indxx(ibr2,node1) >*/
    nodplc[loc + 24] = indxx_(&ibr2, &node1);
/*<       nodplc(loc+26)=indxx(ibr2,node2) >*/
    nodplc[loc + 25] = indxx_(&ibr2, &node2);
/*<       nodplc(loc+27)=indxx(ibr2,node4) >*/
    nodplc[loc + 26] = indxx_(&ibr2, &node4);
/*<       nodplc(loc+28)=indxx(ibr2,ni2) >*/
    nodplc[loc + 27] = indxx_(&ibr2, &ni2);
/*<       nodplc(loc+29)=indxx(ibr2,ibr1) >*/
    nodplc[loc + 28] = indxx_(&ibr2, &ibr1);
/*<       nodplc(loc+31)=indxx(node3,ni2) >*/
    nodplc[loc + 30] = indxx_(&node3, &ni2);
/*<       nodplc(loc+32)=indxx(ni2,node3) >*/
    nodplc[loc + 31] = indxx_(&ni2, &node3);
/*<       loc=nodplc(loc) >*/
    loc = nodplc[loc - 1];
/*<       go to 910 >*/
    goto L910;

/*  finished */

/*<  1000 return >*/
L1000:
    return 0;
/*<       end >*/
} /* matloc_ */

#undef cvalue
#undef nodplc


