anchor.diff:        T=A(KD+1)
         A(KD+1)=A(K+1)-T
   100   A(K+1)=A(K+1)+T
  -      IF (MI-1) 330,330,110
  +      if (MI-1) 330,330,110
   110   LFIRST=3
         JLAST=1
  -      GO TO 130
  +      go to 130
   120   LFIRST=2
         JLAST=0
  -130   DO 320 L=LFIRST,MI,2
  +130   do 320 L=LFIRST,MI,2
         JJDIF=KBIT
         KBIT=KBIT/4
         KL=KBIT-2
  -      DO 140 I=1,IL1,IDIF
  +      do 140 I=1,IL1,IDIF
         KLAST=I+KL
  -      DO 140 K=I,KLAST,2
  +      do 140 K=I,KLAST,2
         K1=K+KBIT
         K2=K1+KBIT
         K3=K2+KBIT
  
positive.code: C   CODED BY I. M. IDRISS 1967
  C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  C
        CHARACTER*6 ID
        DIMENSION A(1)
        COMMON /RVAL/ NND(27), ZLD(6),T(200), SA(5,200),SV(5,200)
        DIMENSION PRV(200), PAA(200), RD(200)
        DIMENSION ID(27,11)
  C .....................................................................
        zmax =0
        DO 10 K = 1, KG
        IF(zmax .GT. ABS(A(K))) GO TO 9
        zmax = ABS(A(K))
      9 A(K) = GGT*A(K)
     10 CONTINUE
        PIW = 6.283185307
        SV(NN,1) = zmax*GGT*T(1)/PIW
        SA(NN,1) = zmax
  
negative.code: 420   JJD1=NTSQ/N1
        JJ3=1
        J=1
        do 570 JPP3=1,N3VNT
        IPP3=INV(JJ3)
        do 560 JP3=1,MINN3
        go to (430,440), IGO3
  430   IP3=INV(JP3)*N3VNT
        go to 450
  440   IP3=INV(JP3)/NTVN3
  450   I3=(IPP3+IP3)*N2
        JJ2=1
        do 560 JPP2=1,N2VNT
        IPP2=INV(JJ2)+I3
        do 550 JP2=1,MINN2
        go to (460,470), IGO2
  460   IP2=INV(JP2)*N2VNT
        go to 480
  470   IP2=INV(JP2)/NTVN2
  480   I2=(IPP2+IP2)*N1
        JJ1=1
        do 550 JPP1=1,N1VNT
        IPP1=INV(JJ1)+I2
        do 540 JP1=1,MINN1
        go to (490,500), IGO1
  490   IP1=INV(JP1)*N1VNT
        go to 510
  500   IP1=INV(JP1)/NTVN1
  510   I=2*(IPP1+IP1)+1
        if (J-I) 520,530,530
  520   T=A(I)
        A(I)=A(J)
        A(J)=T
        T=A(I+1)
        A(I+1)=A(J+1)
        A(J+1)=T
  530   continue
  540   J=J+2
  550   JJ1=JJ1+JJD1
  560   JJ2=JJ2+JJD2
  570   JJ3=JJ3+JJD3
        if (IFSET) 580,600,600
  580   do 590 I=1,NX
  590   A(2*I)=-A(2*I)
  600   return
        end
  C**********************************************
        subroutine RFFT (A,M,INV,S,IFERR,IFSET)
  C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
        dimension A(1), L(3), INV(1), S(1)
  C
  C     IFSET=1
        L(1)=M
  