anchor.diff:                call clorb(dp1)
                 call betalf(dp1,qw)
                 call phasad(dp1,qwc)
  -#ifdef DEBUG
  -!     call dumpbin('abetphas',1,1)
  -!     call abend('after  abetphas                                   ')
  -#endif
                 dp1=zero
   !--beam-beam element
  -#ifdef DEBUG
  -!     call dumpbin('bbeam',1,1)
  -!     call abend('after bbeam                                       ')
  -!     write(*,*) 'call qmodda at beam-beam'
  -#endif
                 dp1=dps(1)
                 ncorru=ncorruo
                 if(nvar2.le.5) then
  
positive.code:     end if
    end do
  
  #ifdef DEBUG
  !     call dumpbin('ado 150',150,150)
  !     call abend('ado 150                                           ')
  #endif
          dp1=zero
          if(ichrom > 1) then
            itiono=ition
  
negative.code:               enddo
              endif
  
              do i=1,napx
                clo6v(1,i)  = clo(1)
                clop6v(1,i) = clop(1)
                clo6v(2,i)  = clo(2)
                clop6v(2,i) = clop(2)
                di0xs(i)    = di0(1)
                di0zs(i)    = di0(2)
                dip0xs(i)   = dip0(1)
                dip0zs(i)   = dip0(2)
                qwcs(i,1)   = qwc(1)
                qwcs(i,2)   = qwc(2)
                qwcs(i,3)   = zero
  
                do i2=1,4
                  do j2=1,4
                    tas(i,i2,j2)=tasm(i2,j2)
                  end do
                end do
              end do
            endif
            iar=1
  
  ! save tas matrix and closed orbit for later dumping of the beam
  ! distribution at the first element (i=-1)
  