In the subroutine of settfb, for the array tmp(3,3), it is orginal set as following:
tmp(1,1) = 0.0d0
tmp(2,2) = 0.0d0
tmp(3,3) = 0.0d0
tmp(1,2) = -x(3)*c4
tmp(2,1) = tmp(1,2)
tmp(1,3) = x(2)*c4
tmp(3,1) = tmp(1,3)
tmp(2,3) = -x(1)*c4
tmp(3,2) = tmp(2,3)
I guess those statements above set tmp as a skew-symmetric array, if it is true, then statements setting tmp(1,3) and tmp(3,1) may be a bug.