      INTEGER FUNCTION FINDND(K1, K2)
      INTEGER K1(2)
      INTEGER PLAT, PNODE
      LOGICAL COMPAR
      COMMON /HEAD/ LNODE, PNODE, NODE(500)
      COMMON /GRAPH/ LLAT, PLAT, LAT(6000)
C
C     FINDS SUBPROGRAM WHOSE PACKED NAME IS IN K1(2) AND
C     RETURNS INDEX OF ITS LAT ENTRY AS VALUE OF FINFND
C     RETURNS IN K2 INDEX IN NODE OF LAT INDEX
C     IGNORES ASF NODES IN LAT BY IGNORING NEGATIVE NODE
C     ENTRIES
C
      IF (PNODE-1) 40, 40, 10
   10 K = PNODE - 1
      DO 30 I=1,K
        IF (NODE(I)) 30, 30, 20
   20   FINDND = NODE(I)
        K2 = I
        IF (COMPAR(LAT(FINDND),K1)) GO TO 50
   30 CONTINUE
   40 FINDND = 0
   50 RETURN
      END
