!        Generated by TAPENADE     (INRIA, Ecuador team)
!  tapenade 3.x
!
!  Differentiation of dxyz in forward (tangent) mode:
!   variations   of useful results: z
!   with respect to varying inputs: x y z
!>    @brief BLAS adapting : z=x*y
!>    @param[in] N length of vectors [z],[x],[y]
!>    @param[in] x vector [x]
!>    @param[in] y vector [y]
!>    @param[out] z vector [z]
SUBROUTINE g_DXYZ(n, x, g_x, y, g_y, z, g_z)
  IMPLICIT NONE
  INTEGER :: n, i, m
  DOUBLE PRECISION :: x(n), y(n), z(n)
  DOUBLE PRECISION :: g_x(n), g_y(n), g_z(n)
  INTRINSIC MOD
  m = MOD(n, 4)
  DO i=1,m
    g_z(i) = y(i)*g_x(i) + x(i)*g_y(i)
    z(i) = x(i)*y(i)
  END DO
  m = m + 1
  DO i=m,n,4
    g_z(i+0) = y(i+0)*g_x(i+0) + x(i+0)*g_y(i+0)
    z(i+0) = x(i+0)*y(i+0)
    g_z(i+1) = y(i+1)*g_x(i+1) + x(i+1)*g_y(i+1)
    z(i+1) = x(i+1)*y(i+1)
    g_z(i+2) = y(i+2)*g_x(i+2) + x(i+2)*g_y(i+2)
    z(i+2) = x(i+2)*y(i+2)
    g_z(i+3) = y(i+3)*g_x(i+3) + x(i+3)*g_y(i+3)
    z(i+3) = x(i+3)*y(i+3)
  END DO
  RETURN
END SUBROUTINE g_DXYZ

