      subroutine lir(norb)
      use bas
      implicit real*8 (a-h,o-x,z),logical*1(y)
      parameter (maxsym=8)
      character*10000 namel
      character*8 progr
      character*1 o
      common/pr/nprint
      character*4 ooo
      common/version/molcas,i_rec,i_at,i_orb,i_coo
      common/sym/ nsym,isym(maxsym),isymt(0:maxsym)
      common/prog/progr
      yw=.false.
c------------------------------------------------------------------
c     lecture des atomes
c------------------------------------------------------------------
      rewind 2
      call LECNAM('&COST_AO ',namel,2,ierr,0)
      call nameli(namel,NATOM,'NATOM',4)
      call nameli(namel,NSYM,'NSYM',4)
      allocate(atom(natom*nsym))
      allocate(coor(3,natom*nsym))
      call namela(namel,atom,'ATOM')
      call nameld(namel,COOR,'COOR',8)
      call namela(namel,ORBI,'LABEL')
!      if(yw) then
         do k=1,natom
            print'(a4,2x,3f10.6)',atom(k),coor(:,k)
         enddo
!      endif
c      print*,'norb',norb
 
      if(nprint.ge.2) then
         do k=1,norb
            print'(a8)',orbi(k)
         enddo
      endif
      num=1
      ooo=orbi(1)(1:4)
      kbas=0
      kk=0
      nbast(0)=0
      do k=2,norb
         kk=kk+1
         if(ooo.ne.orbi(k)(1:4)) then
            ooo=orbi(k)(1:4)
            kbas=kbas+1
            nbas(kbas)=kk
            nbast(kbas)=nbast(kbas-1)+nbas(kbas)
            kk=0
         endif
      enddo
      nbas(kbas+1)=norb-nbast(kbas)
      nbast(kbas+1)=norb
      if(nprint.ge.2)print'(a6,20i3)','nbas ',nbas(1:natom)
      if(nprint.ge.2)print'(a6,20i3)','nbast',nbast(1:natom)
!      base=orbi
 
      return
      end
