      subroutine adri(kk,ii,jj,iadr)
c
c--------------------------------------------------------------
c     adressage des integrales <ii,kk,jj,kk>
c--------------------------------------------------------------
c
      parameter(maxsym=8)
      include 'maxorb.prm'
      IMPLICIT REAL*8(A-H,O-X,Z),logical*1(y)
      common/dim/iadri ; integer(8) iadri
      common/adr/iadr0(maxsym),nbint
      common /orb/ enuc,eref,norb,noca,nocb
     *,iorb(2*maxorb),ninac,nvirt,noca0
      common/sy2/nts(maxsym),ncs(maxsym),nps(maxsym)
     *,norbs(maxsym)
      common/sy3/itorbi(maxorb),isbrot(maxorb),itorbc(maxorb)
     *,itorbs(maxorb)
      common/sym/ itsym(maxorb*2),its(maxsym,maxsym),nsym
      yw=.false.
      if(yw)write(75,*)'adri kk,ii,jj',kk,ii,jj,'$'
      if(yw)call scril
      i=iorb(ii)
      j=iorb(jj)
      k=iorb(kk)
      if(yw)write(75,*)'itorbi',itorbi(k),itorbi(i),itorbi(j),'$'
      if(yw)call scril
      isi=itsym(i)
      iadr=iadr0(isi)+((itorbi(j)-2)*(itorbi(j)-1)/2+itorbi(i)-1)*norb+k
      if(yw)write(75,*)'adri k,i,j,isi,iadr0(isi)',k,i,j,isi,
     *iadr0(isi),'iadr',iadr,'$'
      if(yw)call scril
      return
      end
