      SUBROUTINE e2_offset_2_offset(l_a_offset,k_a_offset,
     &                              l_b_offset,k_b_offset,
     &                              l_c_offset,k_c_offset,length)
C     $Id: e2_offset_2_offset.F 19706 2010-10-29 17:52:31Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     v ( g3 g4 g1 g2 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset,l_b_offset,l_c_offset
      INTEGER k_a_offset,k_b_offset,k_c_offset
      INTEGER length
      INTEGER addr
      INTEGER g3b
      INTEGER g4b 
      INTEGER g1b
      INTEGER g2b
      INTEGER i,j,k,l
      INTEGER i1,j1,k1,l1
      INTEGER irow,icol,ires
      INTEGER INDEX_PAIR

c
c--      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
c--     &set)) CALL ERRQUIT('tce_offset_2_offset',0,MA_ERR)
c alternative approach to store l_b_offset: coding(g3b,g4b,g1b,g2b) as a 
c                                           single integer 
c declaring l_b_offset as a global array 
c--      IF (.not.MA_PUSH_GET(mt_int,4*length+1,'noname',l_b_offset,k_b_off
c--     &set)) CALL ERRQUIT('tce_offset_2_offset',0,MA_ERR)
c  here l_v2spin_offset
      IF (.not.MA_PUSH_GET(mt_int,length+1,'noname',l_c_offset,
     &k_c_offset)) CALL ERRQUIT('tce_offset_2_offset',0,MA_ERR)


c--      int_mb(k_a_offset) = length
c--      int_mb(k_b_offset) = length
      int_mb(k_c_offset) = length 
c initial  zeroing
      do i=1,length
c--        int_mb(k_a_offset+i)         = 0
c--        int_mb(k_a_offset+i+length)  = 0
c--        int_mb(k_b_offset+i)         = 0
c--        int_mb(k_b_offset+i+length)  = 0 
c--        int_mb(k_b_offset+i+2*length)= 0
c--        int_mb(k_b_offset+i+3*length)= 0
        int_mb(k_c_offset+i)         = 0
      end do
c
c
      RETURN
      END


