Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:29:53

0001 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

0002 c...first,second,third,fourth: get the matrix elements for four      c

0003 c...              group of basic helicity states.                    c

0004 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

0005 c copyright (c) z.x zhang, chafik driouich, paula eerola and x.g. wu c

0006 c reference: hep-ph/0309120                                          c

0007 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

0008 
0009 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

0010 c             nine basic functions from cb and cc sets.              c

0011 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

0012         subroutine bfirst
0013         implicit double precision (a-h,o-z)
0014         implicit integer (i-n)
0015         double complex bfun,colmat,yup,xup,inpup,bundamp
0016       common/upcom/ecm,pmbc,pmb,pmc,fbcc,pmomup(5,8),
0017      &  colmat(10,64),bundamp(4),pmomzero(5,8)
0018       common/tryup/bfun(9,4,64),yup(100),xup(2),idp,idq0,idk1,idk2,
0019      &  idb1,idb2,idc1,idc2
0020       common/counter/ibcstate,nev
0021 c...for transform the subprocess information, i.e.,  whether using

0022 c...the subprocess q\bar{q}->bc+b+\bar{c} to generate events.

0023       common/qqbar/iqqbar,iqcode
0024 
0025 c...(l1,l2,l3,l4=+\-) corresponding to the two helicity states of the particle.

0026        ii=1
0027 c...if (l1.eq.l2 .and. l3.eq.l4) then

0028 c...helicity(-l1,-l2,-l3,-l4,-l5,-l6)=dconjg(helicity(l1,l2,l3,l4,l5,l6))

0029 c...if (l1.eq.l2 .and. l3.ne.l4) then

0030 c...helicity(-l1,-l2,-l3,-l4,-l5,-l6)=-dconjg(helicity(l1,l2,l3,l4,l5,l6))

0031 c...if (l1.ne.l2 .and. l3.eq.l4) then

0032 c...helicity(-l1,-l2,-l3,-l4,-l5,-l6)=-dconjg(helicity(l1,l2,l3,l4,l5,l6))

0033 c...if (l1.ne.l2 .and. l3.ne.l4) then

0034 c...helicity(-l1,-l2,-l3,-l4,-l5,-l6)=dconjg(helicity(l1,l2,l3,l4,l5,l6))

0035 
0036 c...for short, we take the notation: helicity(q_b1,q_b2,q_c1,q_c2,k_1,k_2)=

0037 c...helicity(l1,l2,l3,l4,l5,l6)=m(l1,l2,l3,l4,l5,l6). 

0038 c...and helicity(kk)=helicity(kk,1) (kk=1-64).

0039 
0040 c...helicity(1)=m(+,+,+,+,+,+)

0041         kk=1
0042           if(iqqbar.eq.0) then
0043         bfun(1,ii,kk)=(4*yup(1)*(dotup(idb1,idb1)*((yup(11) - yup(12))
0044      -     *yup(19)*yup(27) +yup(10)*(-(dconjg(yup(5))*yup(5)) + 
0045      -     dconjg(yup(34))*yup(34))) + yup(10)*((-(dconjg(yup(24))*
0046      -     dconjg(yup(34))) +dconjg(yup(5))*yup(2))*yup(20) + 
0047      -     dconjg(yup(35))*dotup(idc1,idc1)*yup(35))))/xup(1)
0048         bfun(2,ii,kk)=(-4*(dotup(idb1,idb1)*yup(9)*(yup(11)*yup(19)*
0049      -     yup(27) + dconjg(yup(34))*yup(10)*yup(34)) +yup(10)* 
0050      -     (-(dconjg(yup(24))*dconjg(yup(34))*yup(9)*yup(20)) + 
0051      -     dotup(idc1,idc1)*(yup(2)*yup(29)*yup(31) + 
0052      -     dconjg(yup(35))*yup(9)*yup(35)))))/xup(1)
0053           bfun(3,ii,kk)=(4*yup(1)*yup(16)*((dconjg(yup(24))*
0054      -     dconjg(yup(34))+dconjg(yup(5))*(-yup(2)+yup(7)))*yup(20) + 
0055      -     dconjg(yup(17))*(dotup(idc1,idc1)*yup(17)-yup(11)*yup(32))+ 
0056      -     dotup(idb1,idb1)*(dconjg(yup(5))*yup(5) -dconjg(yup(34)) 
0057      -     *yup(34))-dconjg(yup(35))*dotup(idc1,idc1)*yup(35)))/xup(1)
0058           bfun(4,ii,kk)=(4*yup(16)*(yup(9)*(dconjg(yup(17))*yup(11)*
0059      -     yup(32) + dconjg(yup(34))*(-(dconjg(yup(24))*yup(20)) + 
0060      -     dotup(idb1,idb1)*yup(34))) +dotup(idc1,idc1)*((yup(2) -
0061      -     yup(7))*yup(29)*yup(31) +yup(9)*(-(dconjg(yup(17))*yup(17))+ 
0062      -     dconjg(yup(35))*yup(35)))))/xup(1)
0063           bfun(5,ii,kk)=(2*yup(1)*yup(16)*yup(27)*yup(29))/xup(1)
0064           bfun(8,ii,kk)=(-4*dotup(idc1,idc1)*yup(29)*(yup(9)*yup(16)*
0065      -     yup(19)+(yup(7)*yup(16) + yup(2)*(-yup(12) + yup(18)))*
0066      -     yup(31)) +4*dconjg(yup(34))*yup(9)*(yup(12) - yup(18))*
0067      -     (-(dconjg(yup(24))*yup(20)) +dotup(idb1,idb1)*yup(34))+ 
0068      -     4*dconjg(yup(35))*(dotup(idc1,idc1)*yup(9)*(yup(12)-yup(18))*
0069      -     yup(35) + 2*dconjg(inpup(idk2,idk1))*dotup(idc1,idk1)*
0070      -     inpup(idq0,idb1)*yup(27)*yup(36)))/xup(1)
0071           bfun(9,ii,kk)=0.0d0
0072 c...helicity(17)=(-,-,-,-,-,-)

0073         do mm=1,9
0074            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
0075      &     dconjg(bfun(mm,ii,kk))
0076         end do
0077           end if
0078 
0079 c***********************************************************************

0080           if(iqqbar.eq.1) then
0081           bfun(1,ii,kk)=-4*(dotup(idb1,idb1)*(dotup(idc1,idc1)*yup(8)*
0082      -    yup(30) +dconjg(yup(34))*(-(dconjg(inpup(idq0,idk1))*
0083      -    dconjg(yup(24))*inpup(idc1,idk2))+dconjg(inpup(idc2,idk1))
0084      -    *inpup(idb1,idk2)*yup(43) + yup(5)*(yup(44) - yup(45)))) + 
0085      -    (-(dconjg(yup(24))*dconjg(yup(34))*yup(20)) +dconjg(yup(35)) 
0086      -    *dotup(idc1,idc1)*yup(35))*yup(46) + dconjg(yup(35))*
0087      -    (dconjg(yup(13))*dotup(idc1,idc1) -dconjg(yup(18))*yup(36))
0088      -    *yup(47))
0089         bfun(2,ii,kk)=4*(dconjg(yup(35))*(-(dconjg(inpup(idc2,idk1))
0090      -    *dconjg(yup(34))*inpup(idc1,idb1)) + dotup(idc1,idc1)*yup(6))
0091      -    *yup(48) + dotup(idb1,idb1)*(dconjg(yup(18))*yup(7)*yup(28) + 
0092      -    dotup(idc1,idc1)*yup(8)*yup(29) - dconjg(yup(34))*
0093      -    (dconjg(inpup(idq0,idc2))*inpup(idc1,idk2)* yup(2) + 
0094      -    dconjg(inpup(idc2,idk1))*inpup(idq0,idk2)*yup(20) - 
0095      -    dconjg(yup(14))*yup(49))) + (-(dconjg(yup(24))*dconjg(yup(34))
0096      -    *yup(20)) +dconjg(yup(35))*dotup(idc1,idc1)*yup(35))*yup(50))
0097         bfun(3,ii,kk)=-4*(-((-(dconjg(yup(10))*yup(2))+dotup(idb1,idb1)*
0098      -    yup(8))*(dconjg(yup(9))*yup(1) +dconjg(yup(18))*yup(11))) + 
0099      -    dconjg(yup(34))*(dconjg(inpup(idc2,idk1))*inpup(idc1,idk2)*
0100      -    (-(dconjg(yup(10))*yup(16))-yup(2)*yup(25)+dotup(idb1,idb1)*
0101      -    (yup(19)+yup(31)))+(-(dconjg(yup(24))*yup(20))+
0102      -    dotup(idb1,idb1) *yup(34))*(yup(46) + yup(50))) + 
0103      -    dotup(idc1,idc1)* (yup(2)*yup(8)*yup(25) + dconjg(yup(10))*
0104      -    (yup(8)*yup(16) - yup(2)*(yup(19) + yup(31)))
0105      -     + dconjg(yup(35))*yup(35)*(yup(46) + yup(50))))
0106         bfun(4,ii,kk)=4*(dotup(idb1,idb1)*(-(dotup(idc1,idc1)*
0107      -    (dconjg(inpup(idq0,idk1))**2*inpup(idq0,idk1)*inpup(idq0,idk2) 
0108      -    - dconjg(yup(13))*yup(3) -dconjg(yup(17))*yup(6))) + 
0109      -    dconjg(yup(34))*inpup(idc1,idk2)*(-(dconjg(inpup(idq0,idk1))*
0110      -    (dconjg(yup(23))+dconjg(yup(24)))) + dconjg(inpup(idc2,idk1))
0111      -    *yup(31))) +dconjg(yup(35))*(dotup(idc1,idc1)*
0112      -    (dconjg(inpup(idb2,idk1))*inpup(idq0,idk2)*yup(21) + 
0113      -    dconjg(yup(13))*yup(82)) +dconjg(yup(34))*inpup(idc1,idk2)*
0114      -    (-(dconjg(inpup(idc2,idk1))*yup(51))+dconjg(inpup(idb2,idk1))
0115      -    *yup(83))))
0116 c...helicity(17)=(-,-,-,-,-,-)

0117         do mm=1,4
0118             bfun(mm,ii,kk+16)=dconjg(bfun(mm,ii,kk))
0119         end do
0120           end if
0121 
0122 c...helicity(2)=m(+,+,+,+,+,-)

0123         kk=2
0124           if(iqqbar.eq.0) then
0125         bfun(1,ii,kk)=(4*dconjg(yup(10))*yup(1)*((-(dconjg(yup(24))
0126      -     *dconjg(yup(34))) +dconjg(yup(5))*yup(2))*yup(20) + 
0127      -     dotup(idb1,idb1)*(-(dconjg(yup(5))*yup(5))+dconjg(yup(34)) 
0128      -     *yup(34)) + dotup(idc1,idc1)*(-(dconjg(yup(13))*yup(13)) + 
0129      -     dconjg(yup(35))*yup(35)) + dconjg(yup(18))*yup(13)*
0130      -     (-dconjg(yup(38)) + yup(36))))/dconjg(yup(8))
0131         bfun(2,ii,kk)=(-4*dconjg(yup(10))*(dotup(idc1,idc1)*
0132      -     (yup(2)*(-yup(19)+yup(29))*yup(31)+yup(9)*(-(dconjg(yup(13))
0133      -     *yup(13))+dconjg(yup(35))*yup(35)))+yup(9)*(dconjg(yup(34))*
0134      -     (-(dconjg(yup(24))*yup(20)) +dotup(idb1,idb1)*yup(34)) + 
0135      -     dconjg(yup(18))*yup(13)*yup(36))))/dconjg(yup(8))
0136           bfun(3,ii,kk)=(-4*yup(1)*(dotup(idb1,idb1)*(dconjg(yup(18))
0137      -     *yup(19)*(yup(28) - yup(31)) + dconjg(yup(16))*
0138      -     (-(dconjg(yup(5))*yup(5)) + dconjg(yup(34))*yup(34))) + 
0139      -     dconjg(yup(16))*((-(dconjg(yup(24))*dconjg(yup(34))) + 
0140      -     dconjg(yup(5))*yup(2))*yup(20) + dconjg(yup(35))* 
0141      -     dotup(idc1,idc1)*yup(35))))/dconjg(yup(8))
0142           bfun(4,ii,kk)=(4*(dotup(idb1,idb1)*(dotup(idc1,idc1)
0143      -     *yup(8)*yup(19)*yup(31)+yup(9)*(dconjg(yup(18))*yup(19)
0144      -     *yup(28) +dconjg(yup(16))*dconjg(yup(34))*yup(34)))
0145      -     +dconjg(yup(16))*(-(dconjg(yup(24))*dconjg(yup(34))*yup(9)*
0146      -     yup(20)) +dotup(idc1,idc1)*(yup(2)*yup(29)*yup(31) + 
0147      -     dconjg(yup(35))*yup(9)*yup(35)))))/dconjg(yup(8))
0148           bfun(5,ii,kk)=(2*dconjg(yup(10))*yup(1)*yup(27)*yup(30))/
0149      -   dconjg(yup(8))
0150           bfun(8,ii,kk)=(4*((-(dconjg(yup(10))*dconjg(yup(24))) + 
0151      -     dconjg(yup(14))*dotup(idb1,idb1))*(dconjg(yup(18))*yup(9)
0152      -     *yup(14)+2*dotup(idc1,idk1)*yup(4)*yup(27))+(dconjg(yup(12)) 
0153      -     - dconjg(yup(18)))*dconjg(yup(34))*yup(9)*(-(dconjg(yup(24))
0154      -     *yup(20)) +dotup(idb1,idb1)*yup(34)) +dotup(idc1,idc1)*
0155      -     (2*dconjg(yup(35))*dotup(idc1,idk1)*yup(8)*yup(35) + 
0156      -     (dconjg(yup(12))-dconjg(yup(18)))*(yup(2)*yup(29)*yup(31)+ 
0157      -     dconjg(yup(35))*yup(9)*yup(35)))))/dconjg(yup(8))
0158           bfun(9,ii,kk)=(4*dconjg(yup(15))*(dotup(idb1,idb1)*yup(5)
0159      -     -yup(2)*yup(20))*yup(28)+4*dconjg(yup(35))*dotup(idc1,idc1)*
0160      -     yup(8)*yup(35))/dconjg(yup(8))
0161 c...helicity(18)=m(-,-,-,-,-,+)

0162         do mm=1,9
0163            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
0164      &     dconjg(bfun(mm,ii,kk))
0165         end do
0166           end if
0167 
0168 c...helicity(3)=(+,+,+,+,-,+)

0169         kk=3
0170           if(iqqbar.eq.0) then
0171         bfun(1,ii,kk)=(4*(dconjg(yup(1))*(dotup(idb1,idb1)*yup(11)*
0172      -     yup(19)*yup(27)+dconjg(yup(34))*yup(10)*(-(dconjg(yup(24))
0173      -     *yup(20)) + dotup(idb1,idb1)*yup(34))) +dotup(idc1,idc1)*
0174      -     (dconjg(yup(8))*dotup(idb1,idb1)*yup(19)*yup(31) + yup(10)*
0175      -     (yup(25)*yup(30)*yup(31) + dconjg(yup(1))*dconjg(yup(35))
0176      -     *yup(35)))))/yup(8)
0177         bfun(2,ii,kk)=(-4*dconjg(yup(9))*(dotup(idb1,idb1)*(yup(4)
0178      -     *(dconjg(yup(8))*dconjg(yup(33))-dconjg(yup(4))*yup(10))+ 
0179      -     yup(11)*yup(19)*yup(27) +dconjg(yup(34))*yup(10)*yup(34))+ 
0180      -     yup(10)*(dconjg(yup(24))*(-(dconjg(yup(34))*yup(20))+yup(4) 
0181      -     *yup(25))+dconjg(yup(35))*dotup(idc1,idc1)*yup(35))))/yup(8)
0182           bfun(3,ii,kk)=(-4*yup(16)*(dconjg(yup(1))*(dconjg(yup(17))*
0183      -     yup(11)*yup(32)+dconjg(yup(34))*(-(dconjg(yup(24))*yup(20))+ 
0184      -     dotup(idb1,idb1)*yup(34))) +dotup(idc1,idc1)*(yup(25)*
0185      -     (-yup(19)+yup(30))*yup(31)+dconjg(yup(1))*(-(dconjg(yup(17))
0186      -     *yup(17))+dconjg(yup(35))*yup(35)))))/yup(8)
0187           bfun(4,ii,kk)=(4*dconjg(yup(9))*yup(16)*(-(yup(4)*
0188      -     (dconjg(yup(4))*dotup(idb1,idb1) + (-dconjg(yup(24)) +
0189      -     dconjg(yup(33)))*yup(25))) +dconjg(yup(17))*
0190      -     (-(dotup(idc1,idc1)*yup(17)) + yup(11)*yup(32))
0191      -     + dconjg(yup(34))*(-(dconjg(yup(24))*yup(20)) + 
0192      -     dotup(idb1,idb1)*yup(34)) + dconjg(yup(35))*dotup(idc1,idc1)
0193      -     *yup(35)))/yup(8)
0194         bfun(5,ii,kk)=(2*dconjg(yup(9))*yup(16)*yup(28)*yup(29))/yup(8)
0195         bfun(8,ii,kk)=(4*dconjg(yup(9))*(dconjg(yup(24))*((yup(12)
0196      -     - yup(18))*(-(dconjg(yup(34))*yup(20)) +yup(4)*yup(25)) + 
0197      -     2*dotup(idc1,idk1)*yup(14)*yup(29))+dotup(idb1,idb1)*(yup(12) 
0198      -     -yup(18))*(-(dconjg(yup(4))*yup(4))+dconjg(yup(34))*yup(34))+ 
0199      -     dotup(idc1,idc1)*(-(yup(16)*yup(19)*yup(29)) +dconjg(yup(35)) 
0200      -     *(yup(12) - yup(18))*yup(35))))/yup(8)
0201         bfun(9,ii,kk)=(4*dconjg(yup(5))*yup(11)*yup(20)*yup(30))/yup(8)
0202 c...helicity(19)=(-,-,-,-,+,-)

0203         do mm=1,9
0204            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
0205      &     dconjg(bfun(mm,ii,kk))
0206         end do
0207           end if
0208 
0209 c...helicity(4)=(+,+,+,+,-,-)

0210         kk=4
0211         if(iqqbar.eq.0) then
0212           bfun(1,ii,kk)=(4*dconjg(yup(10))*(dotup(idc1,idc1)*
0213      -     ((dconjg(yup(3))*dconjg(yup(12)) - dconjg(yup(1))
0214      -     *dconjg(yup(13)))*yup(13)+yup(25)*yup(30)*yup(31)+ 
0215      -     dconjg(yup(1))*dconjg(yup(35))*yup(35)) +dconjg(yup(1))*
0216      -     (dconjg(yup(34))*(-(dconjg(yup(24))*yup(20)) + 
0217      -     dotup(idb1,idb1)*yup(34)) +dconjg(yup(18))*yup(13) 
0218      -     *yup(36))))/xup(2)
0219         bfun(2,ii,kk)=(4*dconjg(yup(9))*dconjg(yup(10))*(dconjg(yup(24))
0220      -     *(dconjg(yup(34))*yup(20)+yup(4)*(dconjg(yup(7))-yup(25)))+ 
0221      -     dotup(idb1,idb1)*(dconjg(yup(4))*yup(4) - dconjg(yup(34))
0222      -     *yup(34)) + dotup(idc1,idc1)*(dconjg(yup(13))*yup(13) - 
0223      -     dconjg(yup(35))*yup(35)) - dconjg(yup(18))*yup(13)
0224      -     *yup(36)))/xup(2)
0225           bfun(3,ii,kk)=(-4*(dconjg(yup(1))*dconjg(yup(18))*
0226      -     dotup(idb1,idb1)*yup(19)*yup(28) +dconjg(yup(16))*
0227      -     (dconjg(yup(1))*dconjg(yup(34))*(-(dconjg(yup(24))
0228      -     *yup(20)) +dotup(idb1,idb1)*yup(34)) +dotup(idc1,idc1)*
0229      -     (yup(25)*yup(30)*yup(31) + dconjg(yup(1))*dconjg(yup(35))
0230      -     *yup(35)))))/xup(2)
0231           bfun(4,ii,kk)=(4*dconjg(yup(9))*(dotup(idb1,idb1)*
0232      -     ((dconjg(yup(7))*dconjg(yup(14)) - dconjg(yup(4))
0233      -     *dconjg(yup(16)))*yup(4) +dconjg(yup(18))*yup(19)*yup(28)+ 
0234      -     dconjg(yup(16))*dconjg(yup(34))*yup(34)) +dconjg(yup(16))*
0235      -     (dconjg(yup(24))*(-(dconjg(yup(34))*yup(20))+yup(4)*yup(25))+ 
0236      -     dconjg(yup(35))*dotup(idc1,idc1)*yup(35))))/xup(2)
0237         bfun(5,ii,kk)=(2*dconjg(yup(9))*dconjg(yup(10))*yup(28)*yup(30))
0238      -   /xup(2)
0239           bfun(8,ii,kk)=(4*dconjg(yup(9))*(dconjg(yup(12))-
0240      -     dconjg(yup(18)))*(dconjg(yup(24))*(dconjg(yup(10))
0241      -     *yup(14) -dconjg(yup(34))*yup(20) + yup(4)*yup(25)) - 
0242      -     dotup(idb1,idb1)*(dconjg(yup(4))*yup(4) + dconjg(yup(14))
0243      -     *yup(14) -dconjg(yup(34))*yup(34)) +dconjg(yup(35))* 
0244      -     dotup(idc1,idc1)*yup(35)))/xup(2)
0245         bfun(9,ii,kk)=(-4*dconjg(inpup(idb2,idq0))*dconjg(yup(35))*
0246      -    inpup(idk1,idk2)*yup(28)*yup(32))/xup(2)
0247 c...helicity(20)=(-,-,-,-,+,+)

0248         do mm=1,9
0249            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
0250      &     dconjg(bfun(mm,ii,kk))
0251         end do
0252           end if
0253 
0254 c**********************************************************************

0255           if(iqqbar.eq.1) then
0256         bfun(1,ii,kk)=-4*(-(dconjg(yup(24))*dconjg(yup(34))*
0257      -    (yup(20)*yup(53) - yup(25)*yup(54))) +dotup(idb1,idb1)*
0258      -    (dconjg(yup(8))*dotup(idc1,idc1)*yup(30) +dconjg(yup(34))*
0259      -    (-(dconjg(inpup(idq0,idk2))*dconjg(yup(24))*inpup(idc1,idk1))+
0260      -    dconjg(inpup(idc2,idk2))*inpup(idb1,idk1)*yup(43) + yup(15)*
0261      -    (yup(55) - yup(56)))) +dconjg(yup(35))*dotup(idc1,idc1)*
0262      -    (yup(35)*yup(53) + dconjg(yup(3))*yup(57)))
0263         bfun(2,ii,kk)=-4*(dotup(idb1,idb1)*(-(dconjg(yup(8))
0264      -    *dotup(idc1,idc1)*yup(29)) +dconjg(yup(34))*
0265      -    (dconjg(inpup(idq0,idc2))*inpup(idc1,idk1)*yup(16) + 
0266      -    dconjg(inpup(idc2,idk2))*inpup(idq0,idk1)*yup(20) + 
0267      -    dconjg(yup(4))*(yup(54) - yup(58)))) +dconjg(yup(35))*
0268      -    (-(dotup(idc1,idc1)*yup(17)) + yup(11)*yup(32))*yup(59) +
0269      -    (dconjg(yup(24))*dconjg(yup(34))*yup(20) - dconjg(yup(35))
0270      -    *dotup(idc1,idc1)*yup(35))*yup(60))
0271           bfun(3,ii,kk)=-4*((dconjg(yup(9))*yup(1) + dconjg(yup(18))*
0272      -    yup(11))*(-(dconjg(yup(8))*dotup(idb1,idb1))+yup(16)*yup(25))+ 
0273      -    dconjg(yup(34))*(dconjg(inpup(idc2,idk2))*inpup(idc1,idk1)*
0274      -    (-(dconjg(yup(10))*yup(16))-yup(2)*yup(25)+dotup(idb1,idb1)*
0275      -    (yup(19) + yup(31))) +(-(dconjg(yup(24))*yup(20)) + 
0276      -    dotup(idb1,idb1)*yup(34))*(yup(53) + yup(60))) + 
0277      -    dotup(idc1,idc1)*(dconjg(yup(8))*yup(2)*yup(25) + 
0278      -    yup(16)*(dconjg(yup(8))*dconjg(yup(10)) -yup(25)*(yup(19) + 
0279      -    yup(31))) +dconjg(yup(35))*yup(35)*(yup(53) + yup(60))))
0280           bfun(4,ii,kk)=-4*(dconjg(inpup(idq0,idk1))*
0281      -    dconjg(inpup(idq0,idk2))*dotup(idb1,idb1)*dotup(idc1,idc1)*
0282      -    inpup(idq0,idk1)**2 +dotup(idb1,idb1)*(-(dotup(idc1,idc1)*
0283      -    (dconjg(yup(3))*yup(13) +dconjg(yup(6))*yup(17))) + 
0284      -    dconjg(inpup(idc2,idk2))*dconjg(yup(34))*(dconjg(yup(3))*
0285      -    inpup(idc1,idb2) -inpup(idc1,idk1)*yup(31))+ dconjg(yup(6))
0286      -    *yup(11)*yup(32))+dconjg(yup(35))*(-(dconjg(inpup(idq0,idk2))
0287      -    *dconjg(yup(38))*dotup(idc1,idc1)*inpup(idb1,idk1)) + 
0288      -    dconjg(inpup(idq0,idk2))*dotup(idc1,idc1)*inpup(idb1,idk1)
0289      -    *yup(61) - dconjg(inpup(idc2,idk2))*dconjg(yup(34))*
0290      -    (-(inpup(idc1,idk1)*yup(51)) + inpup(idb1,idk1)*yup(62))))
0291 c...helicity(20)=(-,-,-,-,+,+)

0292         do mm=1,4
0293            bfun(mm,ii,kk+16)=dconjg(bfun(mm,ii,kk))
0294         end do
0295           end if
0296 
0297 c...helicity(5)=(+,+,+,-,+,+)

0298         kk=5
0299         if(iqqbar.eq.0) then
0300           bfun(1,ii,kk)=(4*pmomup(5,idc1)*(dotup(idb1,idb1)*
0301      -     (-(yup(1)*(dconjg(inpup(idq0,idc2))*yup(14) - 
0302      -     dconjg(inpup(idc1,idq0))*yup(15))*yup(19)) - 
0303      -     (dconjg(inpup(idc1,idq0))*yup(5)*yup(10) - 
0304      -     dconjg(inpup(idk2,idk1))*yup(19)*yup(27))*yup(31)) - 
0305      -     dconjg(yup(35))*yup(10)*(dconjg(inpup(idb2,idk1))
0306      -     *yup(31)*yup(32) + dconjg(inpup(idb2,idq0))*yup(1)*
0307      -     (yup(22) + yup(32)))))/xup(1)
0308         bfun(2,ii,kk)=(4*pmomup(5,idc1)*(dotup(idb1,idb1)*
0309      -     (yup(9)*(dconjg(inpup(idq0,idc2))*yup(14) - 
0310      -     dconjg(inpup(idc1,idq0))*yup(15))*yup(19)+dconjg(yup(4))
0311      -     *yup(4)*(-(dconjg(inpup(idq0,idk1))*yup(10)) - 
0312      -     dconjg(inpup(idk2,idk1))*yup(19)))+dconjg(yup(35))*yup(10)*
0313      -     (dconjg(inpup(idb2,idk1))*yup(22)*yup(31) + 
0314      -     dconjg(inpup(idb2,idq0))*yup(9)*(yup(22)+yup(32)))))/xup(1)
0315           bfun(3,ii,kk)=(4*pmomup(5,idc1)*yup(16)*
0316      -     (dconjg(inpup(idc1,idq0))*dotup(idb1,idb1)*yup(5)*
0317      -     yup(31)+ dconjg(yup(35))*(dconjg(inpup(idb2,idk1))*yup(31)
0318      -     *yup(32) +dconjg(inpup(idb2,idq0))*yup(1)*(yup(22) +
0319      -     yup(32))) +dconjg(yup(17))*(-(dconjg(inpup(idk2,idk1))
0320      -     *yup(31)*yup(32)) +dconjg(inpup(idq0,idk2))*yup(1)*
0321      -     (yup(22) + yup(32)))))/xup(1)
0322           bfun(4,ii,kk)=(-4*pmomup(5,idc1)*yup(16)*
0323      -     (-(dconjg(inpup(idq0,idk1))*dconjg(yup(4))*dotup(idb1,idb1)
0324      -     *yup(4)) +dconjg(yup(35))*(dconjg(inpup(idb2,idk1))
0325      -     *yup(22)*yup(31) +dconjg(inpup(idb2,idq0))*yup(9)*(yup(22)+
0326      -     yup(32))) +dconjg(yup(17))*(-(dconjg(inpup(idk2,idk1))
0327      -     *yup(22)*yup(31)) +dconjg(inpup(idq0,idk2))*yup(9)*
0328      -     (yup(22) + yup(32)))))/xup(1)
0329         bfun(5,ii,kk)=(2*dconjg(inpup(idk1,idq0))*pmomup(5,idc1)*yup(16)
0330      -    *(yup(27) + yup(28))*yup(29))/xup(1)
0331           bfun(8,ii,kk)=(4*pmomup(5,idc1)*(-(dconjg(inpup(idq0,idk2))
0332      -     *dconjg(yup(14))*yup(9)*(dotup(idb1,idb1)*yup(14) - yup(16)
0333      -     *yup(23))) -dconjg(inpup(idq0,idk1))*(-(dconjg(yup(4))
0334      -     *dotup(idb1,idb1)*yup(4)*(yup(12)-yup(18)))-dconjg(yup(14)) 
0335      -     *yup(12)*(dotup(idb1,idb1)*yup(14) - yup(16)*yup(23)))-
0336      -     dconjg(yup(35))*((yup(12)-yup(18))*(dconjg(inpup(idb2,idk1))
0337      -     *yup(22)*yup(31)+dconjg(inpup(idb2,idq0))*yup(9)*(yup(22) +
0338      -     yup(32))) +2*dconjg(inpup(idk2,idk1))*dotup(idc1,idk1)*
0339      -     yup(27)*yup(35))))/xup(1)
0340           bfun(9,ii,kk)=(4*dconjg(inpup(idk2,idk1))*dconjg(yup(35))*
0341      -     pmomup(5,idc1)*yup(28)*yup(35))/xup(1)
0342 c...helicity(21)=(-,-,-,+,-,-)

0343         do mm=1,9
0344            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
0345      &     -dconjg(bfun(mm,ii,kk))
0346         end do
0347           end if
0348 
0349 c*******************************************************************

0350           if(iqqbar.eq.1) then
0351         bfun(1,ii,kk)=4*pmomup(5,idc1)*(-(dconjg(inpup(idq0,idk1))*
0352      -     dotup(idb1,idb1)*((dconjg(yup(10))-dconjg(inpup(idq0,idk1)
0353      -     )*inpup(idk2,idk1))*(yup(27) + yup(28))+ (dconjg(yup(11))
0354      -     + dconjg(yup(18)))*yup(30) +inpup(idb1,idk2)*
0355      -     (dconjg(inpup(idq0,idc2))*yup(37)-dconjg(inpup(idc1,idq0))
0356      -     *yup(43)))) +dconjg(inpup(idb2,idq0))*dconjg(yup(35))*
0357      -     ((yup(22) + yup(32))*yup(46) + (dconjg(yup(11)) + 
0358      -     dconjg(yup(18)))*yup(47)))
0359         bfun(2,ii,kk)=4*pmomup(5,idc1)*(-(dotup(idb1,idb1)*yup(8)*
0360      -     (-(dconjg(inpup(idc1,idq0))*yup(20))+dconjg(inpup(idq0,idc2))
0361      -     *yup(23))) -dconjg(yup(35))*(yup(22) + yup(32))*
0362      -     (-(dconjg(inpup(idb2,idk1))*dconjg(yup(12))) + 
0363      -     dconjg(inpup(idb2,idq0))*yup(50)))
0364           bfun(3,ii,kk)=4*pmomup(5,idc1)*(dconjg(inpup(idq0,idk1))
0365      -    *dconjg(yup(1))*dconjg(yup(10))*yup(2) - 
0366      -    dconjg(inpup(idq0,idk1))*dconjg(yup(1))*dotup(idb1,idb1)*
0367      -    yup(8) -dconjg(inpup(idq0,idk2))*dconjg(yup(11))*
0368      -    dotup(idb1,idb1)*yup(8) - dconjg(inpup(idq0,idk1))*
0369      -    dconjg(yup(10))*dconjg(yup(11))*yup(16) - 
0370      -    dconjg(inpup(idq0,idk1))*dconjg(yup(10))*dconjg(yup(18))*
0371      -    yup(16) +dconjg(inpup(idq0,idk1))*dconjg(yup(11))*
0372      -    dotup(idb1,idb1)*yup(19) + dconjg(inpup(idq0,idk1))*
0373      -    dconjg(yup(18))*dotup(idb1,idb1)*yup(19) - 
0374      -    dconjg(inpup(idq0,idk1))*dconjg(yup(11))*yup(2)*yup(25) - 
0375      -    dconjg(inpup(idq0,idk1))*dconjg(yup(18))*yup(2)*yup(25) + 
0376      -    dconjg(inpup(idq0,idk1))*dconjg(yup(11))*dotup(idb1,idb1)
0377      -    *yup(31) +dconjg(inpup(idq0,idk1))*dconjg(yup(18))*
0378      -    dotup(idb1,idb1)*yup(31) + dconjg(inpup(idc1,idq0))*
0379      -    (dconjg(yup(10))*yup(2)-dotup(idb1,idb1)*yup(8))*yup(40)+ 
0380      -    dconjg(yup(35))*(dconjg(inpup(idb2,idk1))*dconjg(yup(11))*
0381      -    yup(26) + dconjg(inpup(idb2,idq0))*(yup(22) + yup(32))*
0382      -    (yup(46) + yup(50))) +dconjg(inpup(idc1,idq0))*
0383      -    (dconjg(yup(10))*yup(2) -dotup(idb1,idb1)*yup(8))*yup(79))
0384           bfun(4,ii,kk)=-4*pmomup(5,idc1)*(dotup(idb1,idb1)*
0385      -    (-(dconjg(inpup(idq0,idk1))**2*(dconjg(yup(5))*
0386      -    inpup(idc1,idk2) +dconjg(yup(4))*inpup(idc2,idk2))) + 
0387      -    (dconjg(yup(11))+dconjg(yup(18)))*(dconjg(inpup(idb2,idq0))*
0388      -    yup(3)+dconjg(inpup(idb1,idq0))*yup(6)))+ (dconjg(yup(11))
0389      -    + dconjg(yup(18)))*dconjg(yup(35))*(-(dconjg(inpup(idb2,idk1)
0390      -    )*yup(21)) +dconjg(inpup(idb2,idq0))*yup(82)))
0391 c...helicity(21)=(-,-,-,+,-,-)

0392         do mm=1,4
0393            bfun(mm,ii,kk+16)=-dconjg(bfun(mm,ii,kk))
0394         end do
0395           end if
0396 
0397 c...helicity(6)=(+,+,+,-,+,-)

0398         kk=6
0399         if(iqqbar.eq.0) then
0400           bfun(1,ii,kk)=(-4*dconjg(yup(10))*pmomup(5,idc1)*
0401      -     (dconjg(inpup(idb2,idq0))*yup(1)*(-((dconjg(yup(11))
0402      -     + dconjg(yup(18)))*yup(13)) +dconjg(yup(35))*(yup(22) 
0403      -     + yup(32))) +yup(31)*(dconjg(inpup(idc1,idq0))*
0404      -     dotup(idb1,idb1)*yup(5) +dconjg(inpup(idb2,idk1))*
0405      -     (-(dconjg(yup(18))*yup(13)) +dconjg(yup(35))*yup(32) 
0406      -     ))))/dconjg(yup(8))
0407         bfun(2,ii,kk)=(4*dconjg(yup(10))*pmomup(5,idc1)*
0408      -     (-(dconjg(inpup(idq0,idk1))*dconjg(yup(4))*dotup(idb1,idb1)
0409      -     *yup(4)) +dconjg(inpup(idb2,idk1))*(-(dconjg(yup(11))
0410      -     *yup(13)) +dconjg(yup(35))*yup(22))*yup(31) + 
0411      -     dconjg(inpup(idb2,idq0))*yup(9)*(-((dconjg(yup(11)) +
0412      -     dconjg(yup(18)))*yup(13)) + dconjg(yup(35))*(yup(22) + 
0413      -     yup(32)))))/dconjg(yup(8))
0414           bfun(3,ii,kk)=(4*pmomup(5,idc1)*(dotup(idb1,idb1)*
0415      -     (dconjg(inpup(idc1,idq0))*dconjg(yup(16))*yup(5) - 
0416      -     dconjg(inpup(idq0,idk1))*dconjg(yup(18))*yup(19))*yup(31)+ 
0417      -     dconjg(yup(16))*dconjg(yup(35))*(dconjg(inpup(idb2,idk1))
0418      -     *yup(31)*yup(32) +dconjg(inpup(idb2,idq0))*yup(1)*
0419      -     (yup(22) + yup(32)))))/dconjg(yup(8))
0420           bfun(4,ii,kk)=(4*pmomup(5,idc1)*(dconjg(inpup(idq0,idk1))
0421      -     *dconjg(yup(11))*dotup(idb1,idb1)*yup(19)*yup(31) - 
0422      -     dconjg(yup(16))*(-(dconjg(inpup(idq0,idk1))*dconjg(yup(4))*
0423      -     dotup(idb1,idb1)*yup(4)) +dconjg(yup(35))*
0424      -     (dconjg(inpup(idb2,idk1))*yup(22)*yup(31) + 
0425      -     dconjg(inpup(idb2,idq0))*yup(9)*(yup(22)+yup(32))))))/
0426      -     dconjg(yup(8))
0427           bfun(5,ii,kk)=(2*dconjg(inpup(idk1,idq0))*dconjg(yup(10))*
0428      -     pmomup(5,idc1)*(yup(27) + yup(28))*yup(30))/dconjg(yup(8))
0429           bfun(8,ii,kk)=(4*pmomup(5,idc1)*(-(dconjg(inpup(idq0,idk1))
0430      -     *dconjg(yup(4))*(-dconjg(yup(12)) + dconjg(yup(18)))*
0431      -     dotup(idb1,idb1)*yup(4)) - 2*dotup(idc1,idk1)*
0432      -     (dconjg(inpup(idb2,idq0))*dconjg(yup(35))*yup(8)*yup(22)+ 
0433      -     dconjg(inpup(idq0,idk1))*dconjg(yup(10))*yup(27)*yup(30)) - 
0434      -     dconjg(yup(35))*(dconjg(inpup(idb2,idk1))*(dconjg(yup(12))-
0435      -     dconjg(yup(18)))*yup(22)*yup(31) + dconjg(inpup(idb2,idq0))
0436      -     *yup(9)*(dconjg(yup(12))*(yup(22)+yup(32))-dconjg(yup(18))*
0437      -     (yup(22) - yup(26) + yup(32))))))/dconjg(yup(8))
0438           bfun(9,ii,kk)=(4*dconjg(inpup(idq0,idk1))*dconjg(yup(11))*
0439      -     dconjg(yup(35))*pmomup(5,idc1)*yup(35))/dconjg(yup(8))
0440 c...helicity(22)=(-,-,-,+,-,+)

0441         do mm=1,9
0442            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
0443      &     -dconjg(bfun(mm,ii,kk))
0444         end do
0445         end if
0446 
0447 c...helicity(7)=(+,+,+,-,-,+)

0448         kk=7
0449         if(iqqbar.eq.0) then
0450           bfun(1,ii,kk)=(4*dconjg(yup(1))*pmomup(5,idc1)*
0451      -     (-(dotup(idb1,idb1)*(-(dconjg(inpup(idq0,idk1))*
0452      -     dconjg(yup(8))) +dconjg(inpup(idq0,idc2))*yup(14) - 
0453      -     dconjg(inpup(idc1,idq0))*yup(15))*yup(19))+ yup(10)*
0454      -     (dconjg(inpup(idq0,idk1))*yup(25)*yup(30) - 
0455      -     dconjg(inpup(idb2,idq0))*dconjg(yup(35))*
0456      -     (yup(22) + yup(32)))))/yup(8)
0457         bfun(2,ii,kk)=(4*dconjg(yup(9))*pmomup(5,idc1)*(dotup(idb1,idb1)
0458      -     *yup(19)*(dconjg(inpup(idq0,idc2))*yup(14) - 
0459      -     dconjg(inpup(idc1,idq0))*yup(15)-dconjg(inpup(idq0,idk2)) 
0460      -     *yup(31)) + dconjg(inpup(idb2,idq0))*dconjg(yup(35))*
0461      -     yup(10)*(-yup(21) + yup(22) + yup(32))))/yup(8)
0462           bfun(3,ii,kk)=(4*dconjg(yup(1))*pmomup(5,idc1)*yup(16)*
0463      -     (dconjg(inpup(idq0,idk1))*yup(25)*(yup(19) - yup(30)) + 
0464      -     (dconjg(inpup(idq0,idk2))*dconjg(yup(17)) + 
0465      -     dconjg(inpup(idb2,idq0))*dconjg(yup(35)))*
0466      -     (yup(22) + yup(32))))/yup(8)
0467           bfun(4,ii,kk)=(4*dconjg(yup(9))*(dconjg(inpup(idq0,idk2))
0468      -     *dconjg(yup(17))+dconjg(inpup(idb2,idq0))*dconjg(yup(35)))*
0469      -     pmomup(5,idc1)*yup(16)*(yup(21) - yup(22) - yup(32)))/yup(8)
0470           bfun(5,ii,kk)=0.0d0
0471           bfun(8,ii,kk)=(4*dconjg(yup(9))*pmomup(5,idc1)*
0472      -     (-(dconjg(inpup(idq0,idk2))*dconjg(yup(14))*(dotup(idb1,idb1)
0473      -     *yup(14) - yup(16)*yup(23)))+ dconjg(inpup(idb2,idq0))
0474      -     *dconjg(yup(35))*(-2*dotup(idc1,idk1)*yup(17)+(yup(12)-
0475      -     yup(18))*(yup(21)- yup(22) - yup(32)))))/yup(8)
0476           bfun(9,ii,kk)=(4*dconjg(inpup(idk2,idq0))*pmomup(5,idc1)*
0477      -     (dconjg(yup(5))*yup(20) + yup(25)*yup(28))*yup(30))/yup(8)
0478 c...helicity(23)=(-,-,-,+,+,-)

0479         do mm=1,9
0480            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
0481      &     -dconjg(bfun(mm,ii,kk))
0482         end do
0483           end if
0484 
0485 c...helicity(8)=(+,+,+,-,-,-)

0486         kk=8
0487         if (iqqbar.eq.0) then
0488         bfun(1,ii,kk)=(-4*dconjg(yup(1))*dconjg(yup(10))*pmomup(5,idc1)*
0489      -     (dconjg(inpup(idb2,idq0))*dconjg(inpup(idq0,idk1))
0490      -     *inpup(idk2,idk1)*yup(13) - dconjg(inpup(idq0,idk1))*yup(25)*
0491      -     yup(30) + dconjg(inpup(idb2,idq0))*(-((dconjg(yup(11)) +
0492      -     dconjg(yup(18)))*yup(13)) +dconjg(yup(35))*(yup(22) 
0493      -     + yup(32)))))/xup(2)
0494         bfun(2,ii,kk)=(-4*dconjg(inpup(idb2,idq0))*dconjg(yup(9))*
0495      -     dconjg(yup(10))*pmomup(5,idc1)*((dconjg(yup(11)) -
0496      -     dconjg(yup(12)) +dconjg(yup(18)))*yup(13) + 
0497      -      dconjg(yup(35))*(yup(21) - yup(22) - yup(32))))/xup(2)
0498         bfun(3,ii,kk)=(4*dconjg(yup(1))*dconjg(yup(16))*pmomup(5,idc1)*
0499      -     (-(dconjg(inpup(idq0,idk1))*yup(25)*yup(30)) + 
0500      -     dconjg(inpup(idb2,idq0))*dconjg(yup(35))*
0501      -     (yup(22) + yup(32))))/xup(2)
0502           bfun(4,ii,kk)=(4*dconjg(inpup(idb2,idq0))*dconjg(yup(9))*
0503      -     dconjg(yup(16))*dconjg(yup(35))*pmomup(5,idc1)*
0504      -     (yup(21) - yup(22) - yup(32)))/xup(2)
0505           bfun(5,ii,kk)=0.0d0
0506           bfun(8,ii,kk)=(4*dconjg(inpup(idb2,idq0))*dconjg(yup(9))*
0507      -     (dconjg(yup(12)) - dconjg(yup(18)))*dconjg(yup(35))
0508      -     *pmomup(5,idc1)*(yup(21)-yup(22)+yup(26)-yup(32)))/xup(2)
0509           bfun(9,ii,kk)=0.0d0
0510 c...helicity(24)=(-,-,-,+,+,+)

0511         do mm=1,9
0512            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
0513      &     -dconjg(bfun(mm,ii,kk))
0514         end do
0515           end if
0516 
0517 c*********************************************************************

0518           if(iqqbar.eq.1) then
0519         bfun(1,ii,kk)=4*pmomup(5,idc1)*(-(dconjg(inpup(idq0,idk2))
0520      -     *dotup(idb1,idb1)*((dconjg(inpup(idq0,idk2))*
0521      -     inpup(idk2,idk1) +yup(25))*(yup(27) + yup(28)) + 
0522      -     (dconjg(yup(1))+dconjg(yup(9)))*yup(30)+inpup(idb1,idk1)*
0523      -     (dconjg(inpup(idq0,idc2))*yup(37)-dconjg(inpup(idc1,idq0))
0524      -     *yup(43)))) +dconjg(inpup(idb2,idq0))*dconjg(yup(35))*
0525      -     ((yup(22) + yup(32))*yup(53) + (dconjg(yup(1)) + 
0526      -     dconjg(yup(9)))*yup(57)))
0527         bfun(2,ii,kk)=4*pmomup(5,idc1)*(-(dconjg(yup(8))*
0528      -     dotup(idb1,idb1)*(-(dconjg(inpup(idc1,idq0))*yup(20))+ 
0529      -     dconjg(inpup(idq0,idc2))*yup(23)))-dconjg(yup(35))*(yup(22)
0530      -     + yup(32))*(-(dconjg(inpup(idb2,idk2))*dconjg(yup(7))) + 
0531      -     dconjg(inpup(idb2,idq0))*yup(60)))
0532           bfun(3,ii,kk)=4*pmomup(5,idc1)*(-(dconjg(inpup(idq0,idk1))
0533      -     *dconjg(yup(1))*dconjg(yup(8))*dotup(idb1,idb1)) - 
0534      -     dconjg(inpup(idq0,idk2))*dconjg(yup(8))*dconjg(yup(11))*
0535      -     dotup(idb1,idb1) -dconjg(inpup(idq0,idk2))*dconjg(yup(1))*
0536      -     dconjg(yup(10))*yup(16) - dconjg(inpup(idq0,idk2))*
0537      -     dconjg(yup(9))*dconjg(yup(10))*yup(16) + 
0538      -     dconjg(inpup(idq0,idk2))*dconjg(yup(1))*dotup(idb1,idb1)*
0539      -     yup(19) +dconjg(inpup(idq0,idk2))*dconjg(yup(9))*
0540      -     dotup(idb1,idb1)*yup(19) - dconjg(inpup(idq0,idk2))*
0541      -     dconjg(yup(1))*yup(2)* yup(25) - dconjg(inpup(idq0,idk2))*
0542      -     dconjg(yup(9))*yup(2)*yup(25) + dconjg(inpup(idq0,idk2))
0543      -     *dconjg(yup(11))*yup(16)*yup(25)+ dconjg(inpup(idq0,idk2))*
0544      -     dconjg(yup(1))*dotup(idb1,idb1)*yup(31) + 
0545      -     dconjg(inpup(idq0,idk2))*dconjg(yup(9))*dotup(idb1,idb1)
0546      -     *yup(31) +dconjg(inpup(idc1,idq0))*(-(dconjg(yup(8))
0547      -     *dotup(idb1,idb1)) + yup(16)*yup(25))*yup(40) + 
0548      -     dconjg(yup(35))*(dconjg(inpup(idb2,idk2))*dconjg(yup(1))*
0549      -     yup(21) + dconjg(inpup(idb2,idq0))*(yup(22) + yup(32))
0550      -     *(yup(53) + yup(60))) +dconjg(inpup(idc1,idq0))*
0551      -     (-(dconjg(yup(8))*dotup(idb1,idb1)) + yup(16)*yup(25))
0552      -     *yup(79))
0553           bfun(4,ii,kk)=4*dconjg(inpup(idq0,idk2))*pmomup(5,idc1)*
0554      -    (dotup(idb1,idb1)*(-((dconjg(yup(1))+dconjg(yup(9)))*yup(31))+
0555      -    dconjg(yup(6))*(yup(22) + yup(32)) + dconjg(yup(3))*
0556      -    (dconjg(yup(36)) + yup(42))) + dconjg(yup(35))*
0557      -    ((dconjg(yup(1)) + dconjg(yup(9)))*yup(51) +inpup(idb1,idk1)*
0558      -    (-(dconjg(inpup(idc1,idq0))*yup(62))+dconjg(inpup(idq0,idc2))
0559      -    *yup(64))))
0560 c...helicity(24)=(-,-,-,+,+,+)

0561         do mm=1,4
0562            bfun(mm,ii,kk+16)=-dconjg(bfun(mm,ii,kk))
0563         end do
0564         end if
0565 
0566 c...helicity(9)=(+,-,-,+,+,+)

0567         kk=9
0568         if(iqqbar.eq.0) then
0569           bfun(1,ii,kk)=(-4*pmomup(5,idb1)*pmomup(5,idc1)*yup(1)*
0570      -     (dconjg(yup(13))*yup(13)*(yup(11)+ yup(18)) +dconjg(yup(8))
0571      -     *yup(7)*yup(30) +yup(10)*(yup(29) + yup(30))*
0572      -     (yup(27) + yup(28) - yup(31))))/xup(1)
0573         bfun(2,ii,kk)=(4*pmomup(5,idb1)*pmomup(5,idc1)*yup(9)*
0574      -     (yup(13)*(dconjg(yup(3))*yup(7) +dconjg(yup(13))*(yup(11) 
0575      -     +yup(18)))+yup(10)*(-(dconjg(yup(3))*yup(3))-dconjg(yup(6)) 
0576      -     *yup(6) +(yup(27) + yup(28))*(yup(29) + yup(30)))))/xup(1)
0577           bfun(3,ii,kk)=(4*pmomup(5,idb1)*pmomup(5,idc1)*yup(1)*
0578      -     (dconjg(yup(6))*yup(7)*yup(17) +yup(11)*yup(19)*yup(29) + 
0579      -     yup(18)*yup(19)*yup(29) +yup(16)*(yup(29) + yup(30))*
0580      -     (yup(27) + yup(28) - yup(31))))/xup(1)
0581           bfun(4,ii,kk)=(4*pmomup(5,idb1)*pmomup(5,idc1)*yup(9)*
0582      -     (-((yup(11) - yup(12) + yup(18))*yup(19)*yup(29)) + 
0583      -     yup(16)*(dconjg(yup(3))*yup(3)- dconjg(inpup(idb1,idq0))
0584      -     *inpup(idq0,idk1)*yup(6) - (yup(27) + yup(28))*(yup(29)
0585      -     + yup(30)))))/xup(1)
0586           bfun(5,ii,kk)=0.0d0
0587           bfun(8,ii,kk)=(4*pmomup(5,idb1)*pmomup(5,idc1)*yup(9)*
0588      -     (yup(12)-yup(18))*(yup(29)+yup(30))*(yup(19)-yup(27)
0589      -     -yup(28)+yup(31)))/xup(1)
0590           bfun(9,ii,kk)=0.0d0
0591 c...helicity(25)=(-,+,+,-,-,-)

0592         do mm=1,9
0593            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
0594      &     dconjg(bfun(mm,ii,kk))
0595         end do
0596           end if
0597 
0598 c**************************************************************

0599           if(iqqbar.eq.1) then
0600           bfun(1,ii,kk)=4*pmomup(5,idb1)*pmomup(5,idc1)*
0601      -     (dotup(idb1,idb1)*yup(8)*(yup(27) + yup(28)) + 
0602      -     dconjg(inpup(idq0,idk1))*dconjg(yup(22))*inpup(idb1,idk2)
0603      -     *yup(30) +dconjg(inpup(idq0,idk1))*dconjg(yup(32))*
0604      -     inpup(idb1,idk2)*yup(30) +dconjg(yup(12))*yup(1)*yup(30) + 
0605      -     dconjg(yup(12))*yup(9)*yup(30) + dconjg(inpup(idq0,idc2))
0606      -     *inpup(idb1,idk2)*yup(7)*yup(37)+dconjg(inpup(idc2,idk1))*
0607      -     inpup(idb1,idk2)*yup(30)*yup(37) +inpup(idb1,idk2)*
0608      -     (-(dconjg(inpup(idc1,idq0))*yup(7))+dconjg(inpup(idc1,idk1)) 
0609      -     *yup(30))*yup(43) +yup(46)*(dconjg(yup(37))*yup(37) + 
0610      -     yup(43)*yup(65)))
0611         bfun(2,ii,kk)=-4*pmomup(5,idb1)*pmomup(5,idc1)*((yup(27)+ 
0612      -     yup(28))*(dotup(idb1,idb1)*yup(8) + yup(30)*yup(50) + 
0613      -     dconjg(yup(13))*yup(66))+yup(43)*(dconjg(inpup(idc1,idk1))*
0614      -     inpup(idb2,idk2)*yup(35)+yup(6)*(-dconjg(yup(54))+yup(67)))+ 
0615      -     yup(37)*(dconjg(inpup(idc2,idk1))*inpup(idb2,idk2)*yup(35) + 
0616      -     yup(6)*(-yup(45) + yup(68))))
0617           bfun(3,ii,kk)=4*pmomup(5,idb1)*pmomup(5,idc1)*(-(
0618      -     (dconjg(yup(10)) +dconjg(yup(16)))*((dconjg(yup(40))
0619      -     + dconjg(yup(79)))*yup(5)-yup(8)*yup(11)-yup(1)*yup(31))) + 
0620      -     inpup(idq0,idk2)*(dconjg(inpup(idc1,idk1))*
0621      -     (dconjg(yup(2))*yup(5) +dconjg(yup(16))*yup(15)) + 
0622      -     dconjg(inpup(idc2,idk1))*(dconjg(yup(2))*yup(4) + 
0623      -     dconjg(yup(16))*yup(14) -(yup(21) + yup(26))*yup(37))) - 
0624      -     dconjg(inpup(idc1,idk1))*inpup(idq0,idk2)*(yup(21)+ yup(26))
0625      -     *yup(43) + (yup(27) + yup(28))*(yup(29) + yup(30))*
0626      -     (yup(46) + yup(50)))
0627         bfun(4,ii,kk)=4*pmomup(5,idb1)*pmomup(5,idc1)*(-((yup(1)+yup(9))
0628      -     *(dconjg(yup(17))*yup(21) +dconjg(yup(13))*yup(38))) - 
0629      -     yup(8)*(yup(69)*yup(70) + yup(37)*yup(83) + yup(43)*yup(84)
0630      -     + yup(71)*yup(85)))
0631 c...helicity(25)=(-,+,+,-,-,-)

0632         do mm=1,4
0633            bfun(mm,ii,kk+16)=dconjg(bfun(mm,ii,kk))
0634         end do
0635           end if
0636 
0637 c...helicity(10)=(+,-,-,+,+,-)

0638         kk=10
0639         if(iqqbar.eq.0) then
0640           bfun(1,ii,kk)=(4*dconjg(yup(10))*pmomup(5,idb1)*pmomup(5,idc1)*
0641      -     yup(1)*(-(dconjg(yup(8))*yup(8))+yup(19)*(yup(27)+yup(28))- 
0642      -     (yup(29)+yup(30))*(yup(27)+yup(28)-yup(31))))/dconjg(yup(8))
0643         bfun(2,ii,kk)=(-4*dconjg(yup(10))*pmomup(5,idb1)*pmomup(5,idc1)*
0644      -     yup(9)*(dconjg(yup(3))*yup(3)+dconjg(yup(6))*yup(6)+(yup(27) 
0645      -     + yup(28))*(yup(19) - yup(29) - yup(30)) - yup(19)*yup(31)
0646      -     ))/dconjg(yup(8))
0647         bfun(3,ii,kk)=(-4*dconjg(yup(16))*pmomup(5,idb1)*pmomup(5,idc1)*
0648      -     yup(1)*(yup(19) - yup(29) - yup(30))*(yup(27) + yup(28)
0649      -     - yup(31)))/dconjg(yup(8))
0650         bfun(4,ii,kk)=(-4*dconjg(yup(16))*pmomup(5,idb1)*pmomup(5,idc1)*
0651      -     yup(9)*(-(dconjg(yup(3))*yup(3)) -dconjg(yup(6))*yup(6) + 
0652      -     dconjg(inpup(idq0,idk2))*inpup(idq0,idk1)*yup(8) - (yup(27)
0653      -     + yup(28))*(yup(19) - yup(29) - yup(30))))/dconjg(yup(8))
0654         bfun(5,ii,kk)=0.0d0
0655         bfun(8,ii,kk)=(4*pmomup(5,idb1)*pmomup(5,idc1)*yup(9)*
0656      -     (dconjg(yup(14))*(dconjg(yup(10))+dconjg(yup(16)))*yup(14)- 
0657      -     (dconjg(yup(12)) - dconjg(yup(18)))*(yup(29) + yup(30))*
0658      -     (yup(27) + yup(28) - yup(31))))/dconjg(yup(8))
0659         bfun(9,ii,kk)=(-4*pmomup(5,idb1)*pmomup(5,idc1)*(dconjg(yup(15))
0660      -     *yup(5) + yup(8)*yup(28))*(yup(29) + yup(30)))/dconjg(yup(8))
0661 c...helicity(26)=(-,+,+,-,-,+)

0662         do mm=1,9
0663            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
0664      &     dconjg(bfun(mm,ii,kk))
0665         end do
0666           end if
0667 
0668 c...helicity(11)=(+,-,-,+,-,+)

0669         kk=11
0670         if(iqqbar.eq.0) then
0671         bfun(1,ii,kk)=(4*pmomup(5,idb1)*pmomup(5,idc1)*(-(dconjg(yup(1))
0672      -     *dconjg(yup(13))*yup(13)*(yup(11)+yup(18)))-dconjg(yup(2))*
0673      -     (yup(18)*yup(19) + yup(10)*yup(27))*yup(31) + yup(10)*(
0674      -     -(dconjg(yup(1))*(yup(27) + yup(28))*(yup(29) + yup(30))) - 
0675      -     yup(25)*yup(27)*yup(31))))/yup(8)
0676         bfun(2,ii,kk)=(4*pmomup(5,idb1)*pmomup(5,idc1)*(yup(4)*
0677      -     (-(dconjg(inpup(idc2,idk2))*dconjg(yup(8))*dconjg(yup(13))*
0678      -     inpup(idk1,idb2)) +dconjg(yup(4))*yup(10)*(dconjg(yup(2))
0679      -     + yup(25))) + dconjg(yup(9))*(dconjg(yup(13))*yup(13)
0680      -     *(yup(11) + yup(18)) +yup(10)*(yup(27) + yup(28))*
0681      -     (yup(29) + yup(30)))))/yup(8)
0682         bfun(3,ii,kk)=(4*pmomup(5,idb1)*pmomup(5,idc1)*(dconjg(yup(1))*
0683      -     yup(11)*yup(19)*yup(29) +yup(18)*yup(19)*(dconjg(yup(1))
0684      -     *yup(29)+yup(25)*yup(31))+yup(16)*(dconjg(yup(1))*(yup(27) 
0685      -     + yup(28))*(yup(29) + yup(30)) + dconjg(yup(2))*yup(27)*
0686      -     yup(31) +yup(25)*yup(27)*yup(31))))/yup(8)
0687           bfun(4,ii,kk)=(4*pmomup(5,idb1)*pmomup(5,idc1)*
0688      -     (dconjg(inpup(idc2,idk2))*inpup(idq0,idk1)*yup(4)*yup(19)
0689      -     *yup(25) -dconjg(yup(9))*(yup(11) + yup(18))*yup(19)*
0690      -     yup(29)+yup(16)*(-(dconjg(yup(4))*yup(4)*(dconjg(yup(2))
0691      -     + yup(25))) -dconjg(yup(9))*(yup(27) + yup(28))*
0692      -     (yup(29) + yup(30)))))/yup(8)
0693         bfun(5,ii,kk)=(-2*dconjg(yup(8))*pmomup(5,idb1)*pmomup(5,idc1)*
0694      -     (yup(27) + yup(28))*(yup(29) + yup(30)))/yup(8)
0695         bfun(8,ii,kk)=(-4*pmomup(5,idb1)*pmomup(5,idc1)*(dconjg(yup(4))
0696      -     *yup(4)*(yup(12) - yup(18))*(dconjg(yup(2)) + yup(25)) + 
0697      -     (dconjg(yup(9))*yup(18)*yup(19) + (2*dconjg(yup(8))
0698      -     *dotup(idc1,idk1)+dconjg(yup(9))*(yup(12) - yup(18)))*
0699      -     (yup(27) + yup(28)))*(yup(29) + yup(30))))/yup(8)
0700           bfun(9,ii,kk)=0.0d0
0701 c...helicity(27)=(-,+,+,-,+,-)

0702         do mm=1,9
0703            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
0704      &     dconjg(bfun(mm,ii,kk))
0705         end do
0706           end if
0707 
0708 c...helicity(12)=(+,-,-,+,-,-)

0709         kk=12
0710         if(iqqbar.eq.0) then
0711         bfun(1,ii,kk)=(-4*dconjg(yup(10))*pmomup(5,idb1)*pmomup(5,idc1)*
0712      -     (-(dconjg(yup(1))*yup(19)*(yup(27)+yup(28))) +dconjg(yup(1)) 
0713      -     *yup(27)*yup(29) +dconjg(yup(1))*yup(28)*yup(29) + 
0714      -     dconjg(yup(1))*yup(27)*yup(30)+dconjg(yup(1))*yup(28)*yup(30)
0715      -     +dconjg(yup(2))*yup(27)*yup(31) - dconjg(yup(7))*yup(27)*
0716      -     yup(31) +yup(25)*yup(27)*yup(31)))/xup(2)
0717         bfun(2,ii,kk)=(4*dconjg(yup(10))*pmomup(5,idb1)*pmomup(5,idc1)*
0718      -     (dconjg(yup(4))*yup(4)*(dconjg(yup(2))-dconjg(yup(7))
0719      -     + yup(25)) -dconjg(yup(9))*(yup(27) + yup(28))*(yup(19) -
0720      -     yup(29) - yup(30))))/xup(2)
0721         bfun(3,ii,kk)=(4*dconjg(yup(16))*pmomup(5,idb1)*pmomup(5,idc1)*
0722      -     (-(dconjg(yup(1))*yup(19)*(yup(27)+yup(28)))+dconjg(yup(1))* 
0723      -     yup(27)*yup(29)+dconjg(yup(1))*yup(28)*yup(29)+dconjg(yup(1))
0724      -     *yup(27)*yup(30)+dconjg(yup(1))*yup(28)*yup(30)+
0725      -     dconjg(yup(2))*yup(27)*yup(31)-dconjg(yup(7))*yup(27)*yup(31) 
0726      -     +yup(25)*yup(27)*yup(31)))/xup(2)
0727         bfun(4,ii,kk)=(-4*dconjg(yup(16))*pmomup(5,idb1)*pmomup(5,idc1)*
0728      -     (dconjg(yup(4))*yup(4)*(dconjg(yup(2)) - dconjg(yup(7))
0729      -     + yup(25)) - dconjg(yup(9))*(yup(27) + yup(28))*
0730      -     (yup(19) - yup(29) - yup(30))))/xup(2)
0731         bfun(5,ii,kk)=0.0d0
0732         bfun(8,ii,kk)=(-4*pmomup(5,idb1)*pmomup(5,idc1)*(dconjg(yup(4))
0733      -     *dconjg(yup(10))*dconjg(yup(12))*yup(14) - dconjg(yup(9))
0734      -     *dconjg(yup(10))*dconjg(yup(14))*yup(14) + (dconjg(yup(4))
0735      -     *dconjg(yup(12)) -dconjg(yup(9))*dconjg(yup(14)))*
0736      -     dconjg(yup(16))*yup(14) + dconjg(yup(4))*dconjg(yup(12))
0737      -     *yup(4)*(dconjg(yup(2)) + yup(25)) + dconjg(yup(9))*
0738      -     dconjg(yup(12))*yup(28)*yup(29) + dconjg(yup(9))*
0739      -     dconjg(yup(12))*yup(28)*yup(30) + dconjg(yup(9))*
0740      -     dconjg(yup(12))*yup(27)*(yup(29)+yup(30)))+4*dconjg(yup(18)) 
0741      -     *pmomup(5,idb1)*pmomup(5,idc1)*(dconjg(yup(4))
0742      -     *yup(4)*(dconjg(yup(2))+yup(25))+dconjg(yup(9))*(yup(27)
0743      -     + yup(28))*(yup(29) + yup(30))))/xup(2)
0744         bfun(9,ii,kk)=0.0d0
0745 c...helicity(28)=(-,+,+,-,+,+)

0746         do mm=1,9
0747            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
0748      &     dconjg(bfun(mm,ii,kk))
0749         end do
0750           end if
0751 
0752 c*****************************************************************

0753           if(iqqbar.eq.1) then
0754           bfun(1,ii,kk)=4*pmomup(5,idb1)*pmomup(5,idc1)*
0755      -     (dconjg(yup(8))*dotup(idb1,idb1)*(yup(27) + yup(28)) + 
0756      -     dconjg(inpup(idq0,idk2))*dconjg(yup(22))*
0757      -     inpup(idb1,idk1)*yup(30) +dconjg(inpup(idq0,idk2))* 
0758      -     dconjg(yup(32))*inpup(idb1,idk1)*yup(30) + 
0759      -     dconjg(yup(7))*yup(11)*yup(30) + dconjg(yup(7))*yup(18)
0760      -     *yup(30)-dconjg(inpup(idq0,idc2))*inpup(idk1,idb1)*yup(12)*
0761      -     yup(37) + dconjg(inpup(idc2,idk2))*inpup(idb1,idk1)*yup(30)
0762      -     *yup(37) + (dconjg(inpup(idc1,idq0))*inpup(idk1,idb1)*
0763      -     yup(12)+ dconjg(inpup(idc1,idk2))*inpup(idb1,idk1)*yup(30))
0764      -     *yup(43)+yup(53)*(dconjg(yup(37))*yup(37)+yup(43)*yup(65)))
0765         bfun(2,ii,kk)=-4*pmomup(5,idb1)*pmomup(5,idc1)*((yup(27) +
0766      -     yup(28))* (dconjg(yup(8))*dotup(idb1,idb1) - 
0767      -     dconjg(yup(2))*yup(12) + yup(30)*yup(60)) + yup(43)*(-
0768      -     (dconjg(inpup(idc1,idk2))*inpup(idk1,idb2)*yup(35)) + 
0769      -     yup(17)*(dconjg(yup(49)) - yup(72))) + yup(37)*
0770      -     (-(dconjg(inpup(idc2,idk2))*inpup(idk1,idb2)*yup(35)) + 
0771      -     yup(17)*(-yup(56) + yup(73))))
0772           bfun(3,ii,kk)=4*pmomup(5,idb1)*pmomup(5,idc1)*
0773      -     (-(dconjg(yup(79))*yup(15)*(dconjg(yup(2)) + yup(25))) + 
0774      -     (dconjg(yup(8))*yup(1) - dconjg(yup(40))*yup(15) +
0775      -     yup(11)*yup(19))*(dconjg(yup(2))+yup(25))+inpup(idq0,idk1)*
0776      -     (dconjg(inpup(idc1,idk2))* (dconjg(yup(2))*yup(5) + 
0777      -     dconjg(yup(16))*yup(15)) + dconjg(inpup(idc2,idk2))*
0778      -     (dconjg(yup(2))*yup(4) +dconjg(yup(16))*yup(14) - 
0779      -     (yup(21) + yup(26))*yup(37))) - dconjg(inpup(idc1,idk2))
0780      -     *inpup(idq0,idk1)*(yup(21) + yup(26))*yup(43) + 
0781      -     (yup(27) + yup(28))*(yup(29)+yup(30))* (yup(53)+yup(60)))
0782           bfun(4,ii,kk)=4*pmomup(5,idb1)*pmomup(5,idc1)*(dconjg(yup(2))
0783      -     + yup(25))*((yup(11) + yup(18))*yup(31) + 
0784      -     dconjg(inpup(idc1,idk2))*inpup(idq0,idb1)*yup(43) + 
0785      -     dconjg(inpup(idc1,idk2))*inpup(idq0,idb2)*yup(69) + 
0786      -     dconjg(inpup(idc2,idk2))* (inpup(idq0,idb1)*yup(37) + 
0787      -     inpup(idq0,idb2)*yup(71)))
0788 c...helicity(28)=(-,+,+,-,+,+)

0789         do mm=1,4
0790              bfun(mm,ii,kk+16)=dconjg(bfun(mm,ii,kk))
0791         end do
0792           end if
0793 
0794 c...helicity(13)=(+,-,-,-,+,+)

0795         kk=13
0796         if(iqqbar.eq.0) then
0797           bfun(1,ii,kk)=(4*pmomup(5,idb1)*(-(dotup(idc1,idc1)*
0798      -     (-(dconjg(inpup(idb2,idq0))*yup(3)) - 
0799      -     dconjg(inpup(idb1,idq0))*yup(6))*yup(10)*yup(31)) - 
0800      -     dconjg(yup(13))*dotup(idc1,idc1)*yup(13)*
0801      -     (-(dconjg(inpup(idq0,idk2))*yup(1)) + dconjg(
0802      -     inpup(idk2,idk1))*yup(31)) -yup(1)*( dconjg(
0803      -     inpup(idc1,idk2))*yup(19)*yup(24)+dconjg(inpup(idc1,idq0))
0804      -     *yup(10)*(yup(23)+yup(24)))*yup(34)))/xup(1)
0805         bfun(2,ii,kk)=(4*pmomup(5,idb1)*yup(9)*
0806      -     (-(dconjg(inpup(idq0,idk2))*dconjg(yup(13))*dotup(idc1,idc1)
0807      -     *yup(13)) + dconjg(yup(4))*(dconjg(inpup(idk2,idk1))*yup(19)
0808      -     *yup(24)+dconjg(inpup(idq0,idk1))*yup(10)*(yup(23)+yup(24)))
0809      -     +(dconjg(inpup(idc1,idk2))*yup(19)*yup(24) + 
0810      -     dconjg(inpup(idc1,idq0))*yup(10)*(yup(23)+yup(24)))*yup(34)))
0811      -     /xup(1)
0812           bfun(3,ii,kk)=(4*pmomup(5,idb1)*(dotup(idc1,idc1)*
0813      -     (dconjg(inpup(idb1,idq0))*yup(1)*yup(17)*yup(19) + 
0814      -     ((-(dconjg(inpup(idb2,idq0))*yup(3)) - 
0815      -     dconjg(inpup(idb1,idq0))*yup(6))*yup(16) + 
0816      -     dconjg(inpup(idk2,idk1))*yup(19)*yup(29))*yup(31)) + 
0817      -     yup(1)*(dconjg(inpup(idc1,idk2))*yup(19)*yup(23) + 
0818      -     dconjg(inpup(idc1,idq0))*yup(16)*(yup(23) + yup(24)))
0819      -     *yup(34)))/xup(1)
0820           bfun(4,ii,kk)=(-4*pmomup(5,idb1)*yup(9)*
0821      -     (dconjg(inpup(idb1,idq0))*dotup(idc1,idc1)*yup(17)*yup(19) + 
0822      -     dconjg(yup(4))*(dconjg(inpup(idk2,idk1))*yup(19)*yup(23) + 
0823      -     dconjg(inpup(idq0,idk1))*yup(16)*(yup(23) + yup(24))) + 
0824      -     (dconjg(inpup(idc1,idk2))*yup(19)*yup(23) + 
0825      -     dconjg(inpup(idc1,idq0))*yup(16)*(yup(23) + yup(24)))*
0826      -     yup(34)))/xup(1)
0827         bfun(5,ii,kk)=(-2*dconjg(inpup(idq0,idk2))*pmomup(5,idb1)*yup(9)
0828      -     *yup(28)*(yup(29) + yup(30)))/xup(1)
0829           bfun(8,ii,kk)=(-4*pmomup(5,idb1)*yup(9)*(yup(12) - yup(18))*
0830      -     (yup(23)+yup(24))*(dconjg(inpup(idq0,idk1))*dconjg(yup(4))+ 
0831      -     dconjg(inpup(idq0,idk2))*dconjg(yup(14)) + 
0832      -     dconjg(inpup(idc1,idq0))*yup(34)))/xup(1)
0833           bfun(9,ii,kk)=(-4*dconjg(inpup(idk2,idk1))*pmomup(5,idb1)*
0834      -     yup(27)*yup(28)*(yup(29) + yup(30)))/xup(1)
0835 c...helicity(29)=(-,+,+,+,-,-)

0836         do mm=1,9
0837            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
0838      &     -dconjg(bfun(mm,ii,kk))
0839         end do
0840           end if
0841 
0842 c*********************************************************************

0843           if(iqqbar.eq.1) then
0844         bfun(1,ii,kk)=-4*pmomup(5,idb1)*(-(dconjg(inpup(idb2,idq0))*
0845      -     dconjg(inpup(idq0,idk1))*dconjg(yup(35))*dotup(idc1,idc1)
0846      -     *inpup(idb1,idk2))+dconjg(inpup(idq0,idk1))*dconjg(yup(10))*
0847      -     dotup(idc1,idc1)*yup(30) + dconjg(inpup(idq0,idk1))**2
0848      -     *dotup(idc1,idc1)*inpup(idk2,idk1)*yup(30) + 
0849      -     dconjg(inpup(idc1,idq0))*dconjg(yup(10))*dconjg(yup(56))
0850      -     *yup(34)- dconjg(inpup(idc1,idq0))*dconjg(inpup(idq0,idk1))*
0851      -     dotup(idb1,idb1)*inpup(idc2,idk2)*yup(34) - 
0852      -     dconjg(inpup(idc1,idk1))*dconjg(yup(10))*yup(24)*yup(34) - 
0853      -     dconjg(inpup(idc1,idk1))*dconjg(yup(12))*yup(24)*yup(34) - 
0854      -     dconjg(inpup(idc1,idq0))*yup(23)*yup(34)*yup(46) + 
0855      -     dconjg(inpup(idq0,idk1))*yup(24)*yup(34)*yup(74))
0856         bfun(2,ii,kk)=4*pmomup(5,idb1)*(dconjg(inpup(idq0,idk1))**2
0857      -     *dotup(idc1,idc1)*inpup(idk2,idk1)*yup(29)-dconjg(yup(16))*
0858      -     (dotup(idc1,idc1)*(dconjg(inpup(idb1,idq0))*yup(6) + 
0859      -     dconjg(inpup(idq0,idk1))*yup(29))+ dconjg(inpup(idc1,idk1))
0860      -     *yup(23)*yup(34)) - yup(34)*(dconjg(inpup(idc1,idk1))*
0861      -     dconjg(yup(12))*yup(23)+ dconjg(inpup(idc1,idq0))*yup(24)*
0862      -     yup(50) - dconjg(inpup(idb2,idq0))*dconjg(inpup(idc1,idq0))
0863      -     *inpup(idc2,idk2)*yup(66) - dconjg(inpup(idq0,idk1))*
0864      -     (-(dconjg(inpup(idc1,idq0))*dotup(idb1,idb1)*
0865      -     inpup(idc2,idk2)) + yup(23)*yup(67))))
0866           bfun(3,ii,kk)=4*pmomup(5,idb1)*(dconjg(inpup(idq0,idk1))
0867      -     *dconjg(yup(2))*dotup(idc1,idc1)*yup(8) - dconjg(yup(16))
0868      -     *dotup(idc1,idc1)*(-(dconjg(inpup(idq0,idk2))*yup(8)) + 
0869      -     dconjg(inpup(idq0,idk1))*(yup(19) + yup(31)))
0870      -     - dconjg(inpup(idq0,idk1))*dconjg(yup(10))*(-(dconjg(yup(1))
0871      -     *yup(9)) -dconjg(yup(11))*yup(18) + dotup(idc1,idc1)
0872      -     *(yup(19) + yup(31))) + dconjg(inpup(idb1,idq0))*(yup(21)
0873      -     + yup(26))*(dotup(idc1,idc1)*yup(8)-dconjg(inpup(idc1,idk1)) 
0874      -     *inpup(idc2,idk2)*yup(34)) - dconjg(yup(16))*
0875      -     (-(dconjg(inpup(idq0,idk1))*(dconjg(yup(1))*yup(9) + 
0876      -     dconjg(yup(11))*yup(18))) +dconjg(inpup(idc1,idk1)) 
0877      -     *yup(33)*yup(34)) + yup(34)*(-(dconjg(inpup(idc1,idk1))*
0878      -     dconjg(inpup(idq0,idk1))*dconjg(yup(2))*inpup(idc2,idk2)) + 
0879      -     dconjg(inpup(idc1,idq0))*(yup(23) + yup(24))*
0880      -     (yup(46) + yup(50))))
0881           bfun(4,ii,kk)=4*pmomup(5,idb1)*(-(dconjg(inpup(idc1,idk1))
0882      -     *inpup(idc2,idk2)*yup(34)*(-(dconjg(inpup(idb1,idq0))*
0883      -     yup(21)) - dconjg(inpup(idb2,idq0))*yup(38))) - 
0884      -     dconjg(inpup(idb2,idq0))*dconjg(inpup(idq0,idk1))*
0885      -     inpup(idc2,idk2)*yup(34)*yup(70) + dconjg(inpup(idq0,idk1))
0886      -     *dotup(idc1,idc1)*(dconjg(yup(13))*(dconjg(yup(61)) - 
0887      -     dconjg(inpup(idq0,idk1))*inpup(idk1,idb2))+dconjg(yup(17))*
0888      -     (dconjg(inpup(idq0,idk1))*inpup(idb1,idk1) + yup(75))) - 
0889      -     dconjg(inpup(idb1,idq0))*dconjg(inpup(idq0,idk1))*
0890      -     inpup(idc2,idk2)*yup(34)*yup(84))
0891 c...helicity(29)=(-,+,+,+,-,-)

0892         do mm=1,4
0893            bfun(mm,ii,kk+16)=-dconjg(bfun(mm,ii,kk))
0894         end do
0895           end if
0896 
0897 c...helicity(14)=(+,-,-,-,+,-)

0898         kk=14
0899         if(iqqbar.eq.0) then
0900           bfun(1,ii,kk)=(-4*dconjg(yup(10))*pmomup(5,idb1)*
0901      -     (dotup(idc1,idc1)*(-(dconjg(inpup(idb2,idq0))*yup(3)) - 
0902      -     dconjg(inpup(idb1,idq0))*yup(6)-dconjg(inpup(idq0,idk1)) 
0903      -     *yup(19))*yup(31) +dconjg(inpup(idc1,idq0))*yup(1)*
0904      -     (yup(23) + yup(24) - yup(33))*yup(34)))/dconjg(yup(8))
0905         bfun(2,ii,kk)=(4*dconjg(yup(10))*pmomup(5,idb1)*yup(9)*
0906      -     (yup(23) + yup(24) - yup(33))*(dconjg(inpup(idq0,idk1))
0907      -     *dconjg(yup(4))+dconjg(inpup(idc1,idq0))*yup(34)))/
0908      -     dconjg(yup(8))
0909           bfun(3,ii,kk)=(4*dconjg(yup(16))*pmomup(5,idb1)*
0910      -     (dotup(idc1,idc1)*(-(dconjg(inpup(idb2,idq0))*yup(3)) - 
0911      -     dconjg(inpup(idb1,idq0))*yup(6)-dconjg(inpup(idq0,idk2)) 
0912      -     *yup(8))*yup(31) -dconjg(inpup(idc1,idq0))*yup(1)*
0913      -     (dconjg(inpup(idq0,idk2))*inpup(idc2,idk2) - yup(23)
0914      -     - yup(24))*yup(34)))/dconjg(yup(8))
0915           bfun(4,ii,kk)=(-4*dconjg(yup(16))*pmomup(5,idb1)*yup(9)*
0916      -     (-(dconjg(inpup(idq0,idk2))*dconjg(yup(11))*yup(27)) + 
0917      -     dconjg(inpup(idq0,idk1))*dconjg(yup(4))*(yup(23)+yup(24)
0918      -     - yup(33)) +dconjg(inpup(idc1,idq0))*(yup(23) + yup(24))*
0919      -     yup(34)))/dconjg(yup(8))
0920           bfun(5,ii,kk)=0.0d0
0921           bfun(8,ii,kk)=(-4*(dconjg(yup(12)) - dconjg(yup(18)))*
0922      -     pmomup(5,idb1)*yup(9)*(yup(23) + yup(24))*
0923      -     (dconjg(inpup(idq0,idk1))*dconjg(yup(4)) + 
0924      -     dconjg(inpup(idc1,idq0))*yup(34)))/dconjg(yup(8))
0925           bfun(9,ii,kk)=(4*dconjg(inpup(idc1,idq0))*dconjg(yup(11))*
0926      -     pmomup(5,idb1)*yup(5)*(yup(29) + yup(30)))/dconjg(yup(8))
0927 c...helicity(30)=(-,+,+,+,-,+)

0928         do mm=1,9
0929            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
0930      &     -dconjg(bfun(mm,ii,kk))
0931         end do
0932           end if
0933 
0934 c...helicity(15)=(+,-,-,-,-,+)

0935         kk=15
0936         if(iqqbar.eq.0) then
0937           bfun(1,ii,kk)=(-4*dconjg(yup(1))*pmomup(5,idb1)*
0938      -     (-(dconjg(inpup(idq0,idk2))*dconjg(yup(13))*
0939      -     dotup(idc1,idc1)*yup(13)) +dconjg(inpup(idc1,idk2)) 
0940      -     *yup(19)*(-(dconjg(yup(2))*yup(5))+yup(24)*yup(34)) + 
0941      -     dconjg(inpup(idc1,idq0))*yup(10)*(-(yup(5)*(dconjg(yup(2))
0942      -     + yup(25))) +(yup(23) + yup(24))*yup(34))))/yup(8)
0943         bfun(2,ii,kk)=(-4*pmomup(5,idb1)*(dconjg(inpup(idq0,idk2))
0944      -     *dconjg(yup(2))*dotup(idc1,idc1)*yup(19)*yup(31) - 
0945      -     dconjg(yup(9))*(-(dconjg(inpup(idq0,idk2))*dconjg(yup(13))
0946      -     *dotup(idc1,idc1)*yup(13)) +(dconjg(inpup(idc1,idk2)) 
0947      -     *yup(19)*yup(24) +dconjg(inpup(idc1,idq0))*yup(10)*
0948      -     (yup(23) + yup(24)))*yup(34))))/yup(8)
0949           bfun(3,ii,kk)=(4*dconjg(yup(1))*pmomup(5,idb1)*
0950      -     (dconjg(inpup(idb1,idq0))*dotup(idc1,idc1)*yup(17)*yup(19) + 
0951      -     dconjg(inpup(idc1,idk2))*yup(19)*(-(yup(5)*yup(25)) +
0952      -     yup(23)*yup(34)) +dconjg(inpup(idc1,idq0))*yup(16)*
0953      -     (-(yup(5)*(dconjg(yup(2)) + yup(25))) +(yup(23) + yup(24)) 
0954      -     *yup(34))))/yup(8)
0955           bfun(4,ii,kk)=(4*pmomup(5,idb1)*(dconjg(inpup(idq0,idk2))
0956      -     *dotup(idc1,idc1)*yup(19)*yup(25)*yup(31) - 
0957      -     dconjg(yup(9))*(dconjg(inpup(idb1,idq0))*dotup(idc1,idc1)*
0958      -     yup(17)*yup(19) + (dconjg(inpup(idc1,idk2))*yup(19)*yup(23)+ 
0959      -     dconjg(inpup(idc1,idq0))*yup(16)*(yup(23) + yup(24)))
0960      -     *yup(34))))/yup(8)
0961           bfun(5,ii,kk)=(-2*dconjg(inpup(idq0,idk2))*dconjg(yup(1))*
0962      -     pmomup(5,idb1)*yup(27)*(yup(29) + yup(30)))/yup(8)
0963           bfun(8,ii,kk)=(4*pmomup(5,idb1)*(yup(23) + yup(24))*
0964      -     (dconjg(inpup(idq0,idk2))*(dconjg(yup(9))*dconjg(yup(14))
0965      -     *yup(18) +2*dconjg(yup(4))*dotup(idc1,idk1)*yup(27)) + 
0966      -     dconjg(inpup(idc1,idq0))*dconjg(yup(9))*(-yup(12)+yup(18))
0967      -     *yup(34)))/yup(8)
0968           bfun(9,ii,kk)=(-4*dconjg(inpup(idc1,idq0))*pmomup(5,idb1)
0969      -    *yup(15)*(dconjg(yup(2))+yup(25))*yup(28))/yup(8)
0970 c...helicity(31)=(-,+,+,+,+,-)

0971         do mm=1,9
0972            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
0973      &     -dconjg(bfun(mm,ii,kk))
0974         end do
0975           end if
0976 
0977 c...helicity(16)=(+,-,-,-,-,-)

0978         kk=16
0979         if(iqqbar.eq.0) then
0980           bfun(1,ii,kk)=(4*dconjg(inpup(idc1,idq0))*dconjg(yup(1))*
0981      -     dconjg(yup(10))*pmomup(5,idb1)*(yup(5)*(dconjg(yup(2))
0982      -     - dconjg(yup(7)) +yup(25)) - (yup(23) + yup(24)-yup(33))
0983      -     *yup(34)))/xup(2)
0984         bfun(2,ii,kk)=(4*dconjg(inpup(idc1,idq0))*dconjg(yup(9))*
0985      -     dconjg(yup(10))*pmomup(5,idb1)*(yup(23) + yup(24) 
0986      -     - yup(33))*yup(34))/xup(2)
0987           bfun(3,ii,kk)=(4*dconjg(inpup(idc1,idq0))*dconjg(yup(1))*
0988      -     dconjg(yup(16))*pmomup(5,idb1)*(-(dconjg(inpup(idq0,idk2))
0989      -     *inpup(idk2,idk1)*yup(5)) -yup(5)*(dconjg(yup(2)) + 
0990      -     yup(25)) +(-(dconjg(inpup(idq0,idk2))*inpup(idc2,idk2)) + 
0991      -     yup(23) + yup(24))*yup(34)))/xup(2)
0992           bfun(4,ii,kk)=(4*dconjg(inpup(idc1,idq0))*dconjg(yup(9))*
0993      -     dconjg(yup(16))*pmomup(5,idb1)*(dconjg(inpup(idq0,idk2))
0994      -     *inpup(idc2,idk2) -yup(23) - yup(24))*yup(34))/xup(2)
0995           bfun(5,ii,kk)=0.0d0
0996           bfun(8,ii,kk)=(-4*dconjg(inpup(idc1,idq0))*dconjg(yup(9))*
0997      -    (dconjg(yup(12))-dconjg(yup(18)))*pmomup(5,idb1)*(yup(23)+
0998      -    yup(24))*yup(34))/xup(2)
0999           bfun(9,ii,kk)=0.0d0
1000 c...helicity(32)=(-,+,+,+,+,+)

1001         do mm=1,9
1002            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
1003      &     -dconjg(bfun(mm,ii,kk))
1004         end do
1005           end if
1006 
1007 c****************************************************************

1008           if(iqqbar.eq.1) then
1009         bfun(1,ii,kk)=-4*pmomup(5,idb1)*(-(dconjg(inpup(idq0,idk2))**2
1010      -     *dotup(idc1,idc1)*inpup(idk2,idk1)*yup(30)) - yup(34)*(-
1011      -     (dconjg(inpup(idc1,idq0))*dconjg(yup(45))*yup(25)) + 
1012      -     dconjg(inpup(idc1,idk2))*yup(24)*(dconjg(yup(7)) + 
1013      -     yup(25)) +dconjg(inpup(idc1,idq0))*yup(23)*yup(53)) + 
1014      -     dconjg(inpup(idq0,idk2))*(dotup(idc1,idc1)*
1015      -     (-(dconjg(inpup(idb2,idq0))*dconjg(yup(35))*inpup(idb1,idk1))
1016      -     + yup(25)*yup(30)) +yup(34)*(-(dconjg(inpup(idc1,idq0))*
1017      -     dotup(idb1,idb1)*inpup(idc2,idk1)) +yup(24)*yup(81))))
1018         bfun(2,ii,kk)=4*pmomup(5,idb1)*(-(dconjg(inpup(idb1,idq0))
1019      -     *dconjg(yup(2))* dotup(idc1,idc1)*yup(17)) - 
1020      -     dconjg(inpup(idq0,idk2))*dconjg(yup(2))*dotup(idc1,idc1)
1021      -     *yup(29) -dconjg(inpup(idq0,idk2))**2*dotup(idc1,idc1)*
1022      -     inpup(idk2,idk1)*yup(29) + dconjg(inpup(idc1,idq0))*
1023      -     dconjg(yup(2))*dconjg(yup(45))*yup(34) - 
1024      -     dconjg(inpup(idc1,idq0))*dconjg(inpup(idq0,idk2))*
1025      -     dotup(idb1,idb1)*inpup(idc2,idk1)*yup(34) - 
1026      -     dconjg(inpup(idc1,idk2))*dconjg(yup(2))*yup(23)*
1027      -     yup(34) - dconjg(inpup(idc1,idk2))*dconjg(yup(7))*
1028      -     yup(23)*yup(34) + dconjg(inpup(idq0,idk2))*dconjg(yup(49))
1029      -     *yup(23)*yup(34) - dconjg(inpup(idc1,idq0))*yup(24)*
1030      -     yup(34)*yup(60))
1031         bfun(3,ii,kk)=4*pmomup(5,idb1)*(dconjg(yup(8))*dotup(idc1,idc1)*
1032      -     (dconjg(inpup(idq0,idk1))*dconjg(yup(2)) + 
1033      -     dconjg(inpup(idb1,idq0))*(yup(21) + yup(26)))
1034      -     + dconjg(inpup(idq0,idk2))*(dconjg(yup(2)) + yup(25))*
1035      -     (dconjg(yup(1))*yup(9) +dconjg(yup(11))*yup(18) - 
1036      -     dotup(idc1,idc1)*(yup(19)+yup(31)))-dconjg(inpup(idq0,idk2))
1037      -     *dconjg(yup(16))*(-(dconjg(yup(8))*dotup(idc1,idc1)) + 
1038      -     dconjg(inpup(idc1,idk2))*inpup(idc2,idk1)*yup(34)) + 
1039      -     yup(34)*(-(dconjg(inpup(idb1,idq0))*
1040      -     dconjg(inpup(idc1,idk2))*inpup(idc2,idk1)*(yup(21)+yup(26)))+ 
1041      -     dconjg(inpup(idc1,idq0))*(yup(23) + yup(24))*(yup(53) + 
1042      -     yup(60))) -dconjg(inpup(idc1,idk2))*dconjg(yup(2))*yup(34)*
1043      -     yup(80))
1044           bfun(4,ii,kk)=-4*pmomup(5,idb1)*(dconjg(inpup(idb2,idq0))
1045      -     *dotup(idc1,idc1)*yup(13)*(dconjg(yup(2)) + yup(25)) + 
1046      -     dconjg(inpup(idb1,idq0))*dotup(idc1,idc1)*yup(17)*
1047      -     (dconjg(yup(2)) + yup(25)) + dconjg(inpup(idq0,idk2))
1048      -     *dotup(idc1,idc1)*yup(25)*yup(31)-dconjg(inpup(idb1,idq0))*
1049      -     dconjg(inpup(idc1,idk2))*inpup(idc2,idk1)*yup(21)*yup(34)+ 
1050      -     dconjg(inpup(idc1,idk2))*yup(23)*yup(25)*yup(34) +
1051      -     dconjg(inpup(idc1,idk2))*yup(24)*yup(25)*yup(34) + 
1052      -     dconjg(yup(2))*(dconjg(inpup(idq0,idk2))*dotup(idc1,idc1)*
1053      -     yup(31) + dconjg(inpup(idc1,idk2))*(yup(23) + yup(24))
1054      -     *yup(34))-dconjg(inpup(idb2,idq0))*dconjg(inpup(idc1,idk2))*
1055      -     inpup(idc2,idk1)*yup(34)*yup(38))
1056 c...helicity(32)=(-,+,+,+,+,+)

1057         do mm=1,4
1058              bfun(mm,ii,kk+16)=-dconjg(bfun(mm,ii,kk))
1059         end do
1060           end if
1061       
1062         if(ibcstate.eq.1) go to 1211
1063 
1064 c...helicity(33)=(+,+,-,+,+,+)

1065         kk=33
1066         if(iqqbar.eq.0) then
1067           bfun(1,ii,kk)=(-4*dconjg(yup(35))*pmomup(5,idc1)*yup(1)*yup(10)
1068      -     *(-(dconjg(yup(38))*inpup(idq0,idb1)) + inpup(idq0,idb1)*
1069      -     (dconjg(yup(42)) + yup(36))))/xup(1)
1070         bfun(2,ii,kk)=(4*pmomup(5,idc1)*yup(9)*yup(10)*
1071      -     (inpup(idq0,idk1)*yup(2)*yup(29) + dconjg(yup(35))*
1072      -     inpup(idq0,idb1)*(dconjg(yup(42)) + yup(36))))/xup(1)
1073           bfun(3,ii,kk)=(-4*pmomup(5,idc1)*yup(1)*yup(16)*
1074      -     (-(inpup(idq0,idb1)*(-(dconjg(yup(35))*dconjg(yup(38))) + 
1075      -     dconjg(yup(17))*yup(12))) +inpup(idq0,idb1)*
1076      -     (dconjg(yup(17))*(yup(11) + yup(18)) -dconjg(yup(35))* 
1077      -     (dconjg(yup(42)) + yup(36)))))/xup(1)
1078           bfun(4,ii,kk)=(-4*pmomup(5,idc1)*yup(9)*yup(16)*
1079      -     (inpup(idq0,idk1)*(yup(2)-yup(7))*yup(29)+inpup(idq0,idb1)*
1080      -     (-(dconjg(yup(17))*(yup(11) + yup(18))) +dconjg(yup(35)) 
1081      -     *(dconjg(yup(42)) + yup(36)))))/xup(1)
1082           bfun(5,ii,kk)=0.0d0
1083           bfun(8,ii,kk)=(-4*dconjg(yup(35))*pmomup(5,idc1)*yup(9)*
1084      -     (yup(12)-yup(18))*(-((dconjg(yup(38))+dconjg(yup(41)))*
1085      -     inpup(idq0,idb1)) + inpup(idq0,idb1)*(dconjg(yup(42)) +
1086      -     yup(36))))/xup(1)
1087           bfun(9,ii,kk)=0.0d0
1088 c...helicity(49)=(-,-,+,-,-,-)

1089         do mm=1,9
1090            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
1091      &     -dconjg(bfun(mm,ii,kk))
1092         end do
1093           end if
1094 
1095 c*****************************************************************

1096           if(iqqbar.eq.1) then
1097         bfun(1,ii,kk)=4*pmomup(5,idc1)*(dotup(idb1,idb1)*
1098      -     (dconjg(yup(39))*inpup(idc1,idq0) +dconjg(yup(24))* 
1099      -     inpup(idc2,idq0))*yup(8)+dconjg(yup(35))*(dconjg(yup(42))
1100      -     +yup(36))*(inpup(idb1,idk2)*yup(7)+inpup(idq0,idb1)* 
1101      -     yup(46)))
1102         bfun(2,ii,kk)=-4*pmomup(5,idc1)*(dotup(idb1,idb1)*
1103      -     (dconjg(yup(15))*inpup(idc1,idq0) + dconjg(yup(14))*
1104      -     inpup(idc2,idq0))*yup(2) + dconjg(inpup(idk2,idk1))*
1105      -     dotup(idb1,idb1)*inpup(idq0,idk2)**2*(yup(27)+yup(28)) + 
1106      -     dotup(idb1,idb1)*inpup(idq0,idk2)*(yup(2)*(yup(27) +
1107      -     yup(28)) -dconjg(inpup(idc2,idk1))*inpup(idq0,idb1)*
1108      -     yup(37)) -dconjg(inpup(idc1,idk1))*dotup(idb1,idb1)*
1109      -     inpup(idq0,idb1)*inpup(idq0,idk2)*yup(43)+dconjg(yup(35))
1110      -     *inpup(idq0,idb1)*((yup(1) + yup(9))*yup(48) + 
1111      -     (dconjg(yup(42)) + yup(36))*yup(50)))
1112           bfun(3,ii,kk)=4*pmomup(5,idc1)*(dconjg(yup(40))*
1113      -     inpup(idq0,idc1)*(dconjg(yup(10))*yup(2) - dotup(idb1,idb1)
1114      -     *yup(8))+dconjg(yup(79))*inpup(idq0,idc1)*(dconjg(yup(10))
1115      -     *yup(2) -dotup(idb1,idb1)*yup(8))+dconjg(inpup(idq0,idk1))
1116      -     *dotup(idb1,idb1)*inpup(idq0,idk2)**2*yup(11) + 
1117      -     inpup(idq0,idk2)* (-(dconjg(yup(10))*(yup(2)*yup(11) 
1118      -     - (yup(1) + yup(9))*yup(16))) + yup(2)*(yup(1) + yup(9))
1119      -     *yup(25) -dotup(idb1,idb1)*((yup(1) + yup(9)) *yup(19) +
1120      -     yup(9)*yup(31)))+ dconjg(yup(35))*(-(dconjg(yup(38))*
1121      -     inpup(idb1,idk2)*yup(1))+inpup(idq0,idb1)*(dconjg(yup(42))
1122      -     + yup(36))*(yup(46) + yup(50))))
1123           bfun(4,ii,kk)=-4*pmomup(5,idc1)*(dotup(idb1,idb1)*
1124      -     ((dconjg(yup(20)) + dconjg(yup(39)))*inpup(idc1,idq0) + 
1125      -     (dconjg(yup(23))+dconjg(yup(24)))*inpup(idc2,idq0))*yup(8)- 
1126      -     inpup(idq0,idk2)*((yup(1)+yup(9))*(dotup(idb1,idb1)*yup(31)- 
1127      -     dconjg(yup(35))*yup(51)) + dconjg(inpup(idb2,idk1))*
1128      -     dconjg(yup(35))*(inpup(idc2,idq0)*yup(83) + 
1129      -     inpup(idc1,idq0)*yup(84))))
1130 c...helicity(49)=(-,-,+,-,-,-)

1131         do mm=1,4
1132            bfun(mm,ii,kk+16)=-dconjg(bfun(mm,ii,kk))
1133         end do
1134           end if
1135 
1136 c...helicity(34)=(+,+,-,+,+,-)

1137         kk=34
1138         if(iqqbar.eq.0) then
1139           bfun(1,ii,kk)=(4*dconjg(yup(10))*pmomup(5,idc1)*yup(1)*
1140      -     (-(dconjg(yup(38))*inpup(idq0,idk2)*yup(13)) + 
1141      -     inpup(idq0,idk2)*yup(13)*(dconjg(yup(42))+yup(36)) - 
1142      -     dconjg(yup(35))*(-(dconjg(yup(38))*inpup(idq0,idb1)) + 
1143      -     inpup(idq0,idb1)*(dconjg(yup(42))+yup(36)))))/dconjg(yup(8))
1144         bfun(2,ii,kk)=(-4*dconjg(yup(10))*pmomup(5,idc1)*yup(9)*
1145      -     (inpup(idq0,idk1)*yup(2)*(yup(19) - yup(29)) + 
1146      -     (-(dconjg(yup(35))*inpup(idq0,idb1)) + inpup(idq0,idk2)
1147      -     *yup(13))*(dconjg(yup(42)) + yup(36))))/dconjg(yup(8))
1148           bfun(3,ii,kk)=(-4*pmomup(5,idc1)*yup(1)*(dotup(idb1,idb1)
1149      -     *yup(19)*(inpup(idq0,idk2)*(yup(27) + yup(28)) - 
1150      -     inpup(idq0,idk2)*yup(31))-dconjg(yup(16))*dconjg(yup(35))*
1151      -     (-(dconjg(yup(38))*inpup(idq0,idb1)) + inpup(idq0,idb1)*
1152      -     (dconjg(yup(42)) + yup(36)))))/dconjg(yup(8))
1153           bfun(4,ii,kk)=(-4*pmomup(5,idc1)*yup(9)*
1154      -     (-(dotup(idb1,idb1)*inpup(idq0,idk2)*yup(19)*(yup(27) + 
1155      -     yup(28))) +inpup(idq0,idk1)*(dotup(idb1,idb1)
1156      -     *yup(8)*yup(19) +dconjg(yup(16))*yup(2)*yup(29)) + 
1157      -     dconjg(yup(16))*dconjg(yup(35))*inpup(idq0,idb1)
1158      -     *(dconjg(yup(42)) + yup(36))))/dconjg(yup(8))
1159           bfun(5,ii,kk)=0.0d0
1160           bfun(8,ii,kk)=(-4*pmomup(5,idc1)*yup(9)*(inpup(idq0,idk2)*
1161      -     ((dconjg(yup(10))*dconjg(yup(24)) - dconjg(yup(14))
1162      -     *dotup(idb1,idb1))*yup(14)+2*dconjg(yup(35))*dotup(idc1,idk1)
1163      -     *yup(35))+(dconjg(yup(12))-dconjg(yup(18)))*dconjg(yup(35))*
1164      -     (-(dconjg(yup(38))*inpup(idq0,idb1)) +inpup(idq0,idb1) 
1165      -     *(dconjg(yup(42)) + yup(36)))))/dconjg(yup(8))
1166           bfun(9,ii,kk)=(4*inpup(idq0,idk2)*pmomup(5,idc1)*
1167      -     (dconjg(inpup(idc1,idb2))*dconjg(yup(35))*inpup(idq0,idb1)
1168      -     *yup(5) +yup(2)*yup(28)*yup(29)))/dconjg(yup(8))
1169 c...helicity(50)=(-,-,+,-,-,+)

1170         do mm=1,9
1171            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
1172      &     -dconjg(bfun(mm,ii,kk))
1173         end do
1174           end if
1175 
1176 c...helicity(35)=(+,+,-,+,-,+)

1177         kk=35
1178         if(iqqbar.eq.0) then
1179           bfun(1,ii,kk)=(4*pmomup(5,idc1)*(-(dotup(idb1,idb1)*
1180      -     inpup(idq0,idk1)*yup(18)*yup(19)*yup(31)) - 
1181      -     yup(10)*(dconjg(yup(5))*dotup(idb1,idb1)*
1182      -     inpup(idq0,idc1)*yup(31) + dconjg(yup(35))*
1183      -     (dconjg(yup(42))*inpup(idk1,idb1)*yup(31) + 
1184      -     dconjg(yup(1))*inpup(idq0,idb1)*
1185      -     (dconjg(yup(42)) + yup(36))))))/yup(8)
1186         bfun(2,ii,kk)=(4*pmomup(5,idc1)*(inpup(idq0,idk1)*yup(4)*
1187      -     (dotup(idb1,idb1)*(-(dconjg(yup(8))*dconjg(yup(33))) + 
1188      -     dconjg(yup(4))*yup(10))-dconjg(yup(24))*yup(10)*yup(25))+ 
1189      -     dconjg(yup(9))*dconjg(yup(35))*inpup(idq0,idb1)*
1190      -     yup(10)*(dconjg(yup(42)) + yup(36))))/yup(8)
1191           bfun(3,ii,kk)=(4*pmomup(5,idc1)*yup(16)*
1192      -     (dconjg(yup(5))*dotup(idb1,idb1)*inpup(idq0,idc1)*
1193      -     yup(31)+inpup(idk1,idb1)*(dconjg(yup(35))*dconjg(yup(42)) - 
1194      -     dconjg(yup(17))*yup(18))*yup(31) + dconjg(yup(1))*
1195      -     inpup(idq0,idb1)*(-(dconjg(yup(17))*(yup(11) + yup(18))) + 
1196      -     dconjg(yup(35))*(dconjg(yup(42)) + yup(36)))))/yup(8)
1197           bfun(4,ii,kk)=(-4*pmomup(5,idc1)*yup(16)*(inpup(idq0,idk1)
1198      -     *yup(4)*(dconjg(yup(4))*dotup(idb1,idb1) + 
1199      -     (-dconjg(yup(24))+dconjg(yup(33)))*yup(25))+dconjg(yup(9))
1200      -     *inpup(idq0,idb1)*(-(dconjg(yup(17))*(yup(11) + yup(18))) + 
1201      -     dconjg(yup(35))*(dconjg(yup(42)) + yup(36)))))/yup(8)
1202           bfun(5,ii,kk)=(2*inpup(idq0,idk1)*pmomup(5,idc1)*yup(16)*
1203      -     (yup(27) + yup(28))*yup(29))/yup(8)
1204           bfun(8,ii,kk)=(-4*pmomup(5,idc1)*(inpup(idq0,idk1)*yup(4)
1205      -     *(yup(12) - yup(18))*(dconjg(yup(4))*dotup(idb1,idb1) - 
1206      -     dconjg(yup(24))*yup(25)) +2*dotup(idc1,idk1)*
1207      -     (-(inpup(idq0,idk1)*yup(16)*yup(27)*yup(29)) + 
1208      -     dconjg(yup(8))*dconjg(yup(35))*inpup(idq0,idb1)*yup(36)) + 
1209      -     dconjg(yup(9))*dconjg(yup(35))*(dconjg(yup(41))*
1210      -     inpup(idq0,idb1)*yup(18)+inpup(idq0,idb1)*(yup(12)-yup(18))*
1211      -     (dconjg(yup(42)) + yup(36)))))/yup(8)
1212           bfun(9,ii,kk)=(-4*dconjg(yup(3))*dconjg(yup(35))*
1213      -    inpup(idq0,idb1)*pmomup(5,idc1)*yup(11))/yup(8)
1214 c...helicity(51)=(-,-,+,-,+,-)

1215         do mm=1,9
1216            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
1217      &     -dconjg(bfun(mm,ii,kk))
1218         end do
1219           end if
1220 
1221 c...helicity(36)=(+,+,-,+,-,-)

1222         kk=36
1223         if(iqqbar.eq.0) then
1224           bfun(1,ii,kk)=(4*dconjg(yup(10))*pmomup(5,idc1)*
1225      -     (-(dconjg(yup(5))*dotup(idb1,idb1)*inpup(idq0,idc1)
1226      -     *yup(31)) +dconjg(yup(42))*(-(dconjg(yup(35))*
1227      -     inpup(idk1,idb1)) -inpup(idk2,idk1)*yup(13))*yup(31) - 
1228      -     dconjg(yup(1))*dconjg(yup(35))*inpup(idq0,idb1)*
1229      -     (dconjg(yup(42))+yup(36))+dconjg(yup(1))*inpup(idq0,idk2)
1230      -     *yup(13)*(dconjg(yup(42)) + yup(36))))/xup(2)
1231         bfun(2,ii,kk)=(4*dconjg(yup(10))*pmomup(5,idc1)*
1232      -     (inpup(idq0,idk1)*yup(4)*(dconjg(yup(4))*dotup(idb1,idb1)+ 
1233      -     dconjg(yup(24))*(dconjg(yup(7)) - yup(25)))- dconjg(yup(9))*
1234      -     (-(dconjg(yup(35))*inpup(idq0,idb1)) +inpup(idq0,idk2) 
1235      -     *yup(13))*(dconjg(yup(42)) + yup(36))))/xup(2)
1236           bfun(3,ii,kk)=(-4*pmomup(5,idc1)*(dconjg(yup(1))*
1237      -     dotup(idb1,idb1)*inpup(idq0,idk2)*yup(19)*(yup(27)
1238      -     + yup(28)) -dotup(idb1,idb1)*inpup(idk2,idk1)*yup(19)*
1239      -     yup(27)*yup(31) - dconjg(yup(16))*(dconjg(yup(5))*
1240      -     dotup(idb1,idb1)*inpup(idq0,idc1)*yup(31) +dconjg(yup(35))*
1241      -     (dconjg(yup(42))*inpup(idk1,idb1)*yup(31) + dconjg(yup(1))
1242      -     *inpup(idq0,idb1)*(dconjg(yup(42))+yup(36))))))/xup(2)
1243           bfun(4,ii,kk)=(4*pmomup(5,idc1)*(-(dconjg(yup(4))
1244      -     *dotup(idb1,idb1)*inpup(idk2,idk1)*yup(4)*yup(19)) + 
1245      -     dconjg(yup(9))*dotup(idb1,idb1)*inpup(idq0,idk2)*yup(19)
1246      -     *(yup(27)+yup(28))-dconjg(yup(16))*(inpup(idq0,idk1)*yup(4)*
1247      -     (dconjg(yup(4))*dotup(idb1,idb1) -dconjg(yup(24))*yup(25)) + 
1248      -     dconjg(yup(9))*dconjg(yup(35))*inpup(idq0,idb1)*
1249      -     (dconjg(yup(42)) + yup(36)))))/xup(2)
1250         bfun(5,ii,kk)=(2*dconjg(yup(10))*inpup(idq0,idk1)*pmomup(5,idc1)
1251      -     *(yup(27) + yup(28))*yup(30))/xup(2)
1252           bfun(8,ii,kk)=(-4*pmomup(5,idc1)*(dconjg(yup(9))*
1253      -     (dconjg(yup(10))*dconjg(yup(24)) -dconjg(yup(14))* 
1254      -     dotup(idb1,idb1))*inpup(idq0,idk2)*yup(14) +inpup(idq0,idk1)*
1255      -     (dotup(idb1,idb1)*(dconjg(yup(4))*(dconjg(yup(12)) -
1256      -     dconjg(yup(18)))*yup(4) + dconjg(yup(12))*dconjg(yup(14))
1257      -     *yup(14)) - dconjg(yup(24))*(dconjg(yup(10))*dconjg(yup(12))
1258      -     *yup(14)+(dconjg(yup(12))-dconjg(yup(18)))*yup(4)*yup(25)))+ 
1259      -     dconjg(yup(35))*(-2*dotup(idc1,idk1)*inpup(idk2,idk1)*yup(27)
1260      -     * yup(35) +dconjg(yup(9))*(dconjg(yup(12))-dconjg(yup(18)))*
1261      -     inpup(idq0,idb1)*(dconjg(yup(42)) + yup(36)))))/xup(2)
1262           bfun(9,ii,kk)=(-4*dconjg(yup(35))*inpup(idk2,idk1)
1263      -     *pmomup(5,idc1)*yup(28)*yup(35))/xup(2)
1264 c...helicity(52)=(-,-,+,-,+,+)

1265         do mm=1,9
1266            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
1267      &     -dconjg(bfun(mm,ii,kk))
1268         end do
1269           end if
1270 
1271 c*********************************************************

1272           if(iqqbar.eq.1) then
1273         bfun(1,ii,kk)=4*pmomup(5,idc1)*(dconjg(yup(8))*
1274      -     dotup(idb1,idb1)*(dconjg(yup(39))*inpup(idc1,idq0) + 
1275      -     dconjg(yup(24))*inpup(idc2,idq0)) + dconjg(yup(35))*
1276      -     (dconjg(yup(42))+ yup(36))*(-(inpup(idk1,idb1)*yup(12)) + 
1277      -     inpup(idq0,idb1)*yup(53)))
1278         bfun(2,ii,kk)=-4*pmomup(5,idc1)*(dotup(idb1,idb1)*
1279      -     (dconjg(yup(5))*inpup(idc1,idq0) + dconjg(yup(4))*
1280      -     inpup(idc2,idq0))*(yup(12) + yup(16)) + 
1281      -     dotup(idb1,idb1)*inpup(idq0,idk1)*(yup(16)*(yup(27) + 
1282      -     yup(28)) -dconjg(inpup(idc2,idk2))*inpup(idq0,idb1)*
1283      -     yup(37)) -dconjg(inpup(idc1,idk2))*dotup(idb1,idb1)*
1284      -     inpup(idq0,idb1)*inpup(idq0,idk1)*yup(43)+dconjg(yup(35))
1285      -     *inpup(idq0,idb1)*((yup(11) + yup(18))*yup(59) + 
1286      -     (dconjg(yup(42)) + yup(36))*yup(60)))
1287           bfun(3,ii,kk)=4*pmomup(5,idc1)*(dconjg(inpup(idq0,idk2))
1288      -     *dotup(idb1,idb1)*inpup(idq0,idk1)**2*yup(1) + 
1289      -     (dconjg(yup(40)) + dconjg(yup(79)))*inpup(idq0,idc1)*
1290      -     (-(dconjg(yup(8))*dotup(idb1,idb1)) +yup(16)*yup(25)) + 
1291      -     inpup(idq0,idk1)*(dconjg(yup(10))*yup(16)*(yup(11)+yup(18))+ 
1292      -     (-(yup(1)*yup(16)) + yup(2)*(yup(11) + yup(18)))*yup(25) - 
1293      -     dotup(idb1,idb1)* (yup(18)*yup(19) + (yup(11) + yup(18))*
1294      -     yup(31))) +dconjg(yup(35))*(-(dconjg(yup(41))*
1295      -     inpup(idb1,idk1)*yup(11)) + inpup(idq0,idb1)*
1296      -     (dconjg(yup(42)) + yup(36))*(yup(53) + yup(60))))
1297           bfun(4,ii,kk)=4*pmomup(5,idc1)*(yup(11) + yup(18))*
1298      -     (dotup(idb1,idb1)*(-(dconjg(yup(6))*inpup(idq0,idb1)) - 
1299      -     dconjg(yup(3))*inpup(idq0,idb2) + dconjg(inpup(idq0,idk1))
1300      -     *inpup(idq0,idk1)**2)+ dconjg(yup(35))*inpup(idb1,idk1)*
1301      -     (-dconjg(yup(38)) + yup(61)))
1302 c...helicity(52)=(-,-,+,-,+,+)

1303         do mm=1,4
1304              bfun(mm,ii,kk+16)=-dconjg(bfun(mm,ii,kk))
1305         end do
1306           end if
1307 
1308 c...helicity(37)=(+,+,-,-,+,+)

1309         kk=37
1310         if(iqqbar.eq.0) then
1311           bfun(1,ii,kk)=(4*(yup(1)*(-(dconjg(inpup(idc1,idb2))*
1312      -     dconjg(yup(35))*inpup(idc2,idb1)*yup(10))+dotup(idb1,idb1)*
1313      -     (dconjg(yup(34))*yup(10) + dconjg(inpup(idc1,idk2))*
1314      -     inpup(idc2,idq0)*yup(19)))*yup(34) +dotup(idc1,idc1)*yup(10)*
1315      -     (yup(2)*yup(29)*yup(31)+dconjg(yup(35))*yup(1)*yup(35))))
1316      -     /xup(1)
1317         bfun(2,ii,kk)=(4*yup(9)*(-(dotup(idb1,idb1)*(-(dconjg(yup(4))*
1318      -     (yup(4)*yup(10) -dconjg(inpup(idk2,idk1))*
1319      -     inpup(idc2,idq0)*yup(19))) +dconjg(yup(34))*yup(10)*yup(34) + 
1320      -     dconjg(inpup(idc1,idk2))*inpup(idc2,idq0)*yup(19)*yup(34))) + 
1321      -     dconjg(yup(35))*yup(10)*(dconjg(inpup(idb2,idk1))*
1322      -     dconjg(yup(4))*inpup(idc2,idb1) + dconjg(inpup(idc1,idb2))
1323      -     *inpup(idc2,idb1)*yup(34)-dotup(idc1,idc1)*yup(35))))/xup(1)
1324           bfun(3,ii,kk)=(4*yup(16)*(-((dconjg(yup(34))*dotup(idb1,idb1) + 
1325      -     (dconjg(inpup(idc1,idk2))*dconjg(yup(17)) - 
1326      -     dconjg(inpup(idc1,idb2))*dconjg(yup(35)))*inpup(idc2,idb1))
1327      -     *yup(1)*yup(34))+dotup(idc1,idc1)*((-yup(2)+yup(7))*yup(29)
1328      -     *yup(31) +yup(1)*(dconjg(yup(17))*yup(17) - dconjg(yup(35))
1329      -     *yup(35)))))/xup(1)
1330           bfun(4,ii,kk)=(-4*yup(9)*yup(16)*(dotup(idb1,idb1)*
1331      -     (dconjg(yup(4))*yup(4) - dconjg(yup(34))*yup(34)) + 
1332      -     dconjg(yup(17))*(-(dconjg(inpup(idk2,idk1))*dconjg(yup(4))*
1333      -     inpup(idc2,idb1)) +dotup(idc1,idc1)*yup(17) - 
1334      -     dconjg(inpup(idc1,idk2))*inpup(idc2,idb1)*yup(34)) + 
1335      -     dconjg(yup(35))*(dconjg(inpup(idb2,idk1))*dconjg(yup(4))*
1336      -     inpup(idc2,idb1) +dconjg(inpup(idc1,idb2))*inpup(idc2,idb1)*
1337      -     yup(34) - dotup(idc1,idc1)*yup(35))))/xup(1)
1338           bfun(5,ii,kk)=(2*yup(9)*yup(16)*yup(28)*yup(29))/xup(1)
1339           bfun(8,ii,kk)=(4*yup(9)*(yup(12) - yup(18))*
1340      -     (dconjg(yup(14))*yup(16)*yup(23) -dotup(idb1,idb1)*
1341      -     (dconjg(yup(4))*yup(4) + dconjg(yup(14))*yup(14) - 
1342      -     dconjg(yup(34))*yup(34)) +dconjg(yup(35))*
1343      -     (-(dconjg(inpup(idb2,idk1))*dconjg(yup(4))*inpup(idc2,idb1))- 
1344      -     dconjg(inpup(idc1,idb2))*inpup(idc2,idb1)*
1345      -     yup(34) + dotup(idc1,idc1)*yup(35))))/xup(1)
1346           bfun(9,ii,kk)=(-4*dconjg(inpup(idk2,idk1))*dconjg(yup(35))*
1347      -     dconjg(yup(42))*inpup(idq0,idb1)*yup(28))/xup(1)
1348 c...helicity(53)=(-,-,+,+,-,-)

1349         do mm=1,9
1350            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
1351      &     dconjg(bfun(mm,ii,kk))
1352         end do
1353           end if
1354 
1355 c****************************************************************

1356           if(iqqbar.eq.1) then
1357         bfun(1,ii,kk)=4*(dconjg(yup(35))*((dconjg(inpup(idc1,idb2))
1358      -     *inpup(idc2,idb1)*yup(34) - dotup(idc1,idc1)*yup(35))
1359      -     *yup(46)+ (-(dconjg(yup(13))*dotup(idc1,idc1)) + 
1360      -     dconjg(inpup(idc1,idb2))*inpup(idc2,idk2)*yup(34))*yup(47))- 
1361      -     dotup(idb1,idb1)*(dotup(idc1,idc1)*yup(8)*yup(30) + 
1362      -     yup(34)*(-(dconjg(inpup(idq0,idk1))*dconjg(yup(39))
1363      -     *inpup(idc2,idk2))+dconjg(inpup(idc1,idk1))*inpup(idb1,idk2)*
1364      -     yup(37) +yup(4)*(-dconjg(yup(54)) + yup(74)))))
1365         bfun(2,ii,kk)=4*(dconjg(yup(35))*((dotup(idc1,idc1)*yup(6) - 
1366      -     dconjg(inpup(idc1,idk1))*inpup(idc2,idb1)*yup(34))*yup(48)+ 
1367      -     (-(dconjg(inpup(idc1,idb2))*inpup(idc2,idb1)*yup(34)) + 
1368      -     dotup(idc1,idc1)*yup(35))*yup(50)) +dotup(idb1,idb1)*
1369      -     (dotup(idc1,idc1)*yup(8)*yup(29) + yup(34)*
1370      -     (inpup(idc2,idk2)*(dconjg(inpup(idc1,idq0))*yup(2) + 
1371      -     dconjg(inpup(idc1,idq0))*yup(7)) - dconjg(inpup(idc1,idk1))
1372      -     *inpup(idq0,idk2)*yup(23) + dconjg(yup(15))*yup(86))))
1373           bfun(3,ii,kk)=4*(-(dconjg(yup(1))*dconjg(yup(10))*yup(2)*
1374      -     yup(9)) + dconjg(yup(1))*dotup(idb1,idb1)*yup(8)*yup(9) - 
1375      -     dconjg(yup(10))*dconjg(yup(11))*yup(2)*yup(18) + 
1376      -     dconjg(yup(11))*dotup(idb1,idb1)*yup(8)*yup(18) + 
1377      -     dconjg(inpup(idc1,idk1))*inpup(idc2,idk2)*(dconjg(yup(10))
1378      -     *yup(16) + yup(2)*yup(25) - dotup(idb1,idb1)*(yup(19) +
1379      -     yup(31)))*yup(34)-dconjg(yup(34))*dotup(idb1,idb1)*yup(34)*
1380      -     yup(46) - dconjg(yup(34))*dotup(idb1,idb1)*yup(34)*yup(50) + 
1381      -     dconjg(inpup(idc1,idb2))*dconjg(yup(35))*inpup(idc2,idb1)
1382      -     *yup(34)*(yup(46)+yup(50))+dotup(idc1,idc1)*(-(yup(2)*yup(8)
1383      -     *yup(25)) - dconjg(yup(10))*(yup(8)*yup(16)- yup(2)*(yup(19)
1384      -     + yup(31)))- dconjg(yup(35))*yup(35)*(yup(46) + yup(50))))
1385         bfun(4,ii,kk)=4*(-(dconjg(inpup(idq0,idk1))**2*dotup(idb1,idb1)*
1386      -     dotup(idc1,idc1)*inpup(idq0,idk1)*inpup(idq0,idk2)) + 
1387      -     dotup(idc1,idc1)* (dotup(idb1,idb1)*(dconjg(yup(13))*yup(3)+ 
1388      -     dconjg(yup(17))*yup(6)) +  dconjg(yup(35))*
1389      -     (dconjg(inpup(idb2,idk1))*inpup(idq0,idk2)*yup(21) + 
1390      -     dconjg(yup(13))*yup(82))) + inpup(idc2,idk2)*yup(34)*
1391      -     (-(dconjg(inpup(idq0,idk1))*(dconjg(yup(20)) +
1392      -     dconjg(yup(39)))*dotup(idb1,idb1))+dconjg(inpup(idc1,idk1))*
1393      -     (dotup(idb1,idb1)*yup(31) -dconjg(yup(35))*yup(51)) + 
1394      -     dconjg(inpup(idb2,idk1))*dconjg(yup(35))*yup(84)))
1395 c...helicity(53)=(-,-,+,+,-,-)

1396         do mm=1,4
1397              bfun(mm,ii,kk+16)=dconjg(bfun(mm,ii,kk))
1398         end do
1399           end if
1400 
1401 c...helicity(38)=(+,+,-,-,+,-)

1402         kk=38
1403         if(iqqbar.eq.0) then
1404           bfun(1,ii,kk)=(4*dconjg(yup(10))*(yup(1)*(dconjg(yup(34))
1405      -     *dotup(idb1,idb1) +dconjg(inpup(idc1,idb2))*
1406      -     (-(dconjg(yup(35))*inpup(idc2,idb1)) + inpup(idc2,idk2)
1407      -     *yup(13)))*yup(34) +dotup(idc1,idc1)*(yup(2)*(-yup(19)
1408      -     + yup(29))*yup(31) +yup(1)*(-(dconjg(yup(13))*yup(13)) + 
1409      -     dconjg(yup(35))*yup(35)))))/dconjg(yup(8))
1410         bfun(2,ii,kk)=(-4*dconjg(yup(10))*yup(9)*(-((dconjg(yup(13))
1411      -     *dotup(idc1,idc1)-dconjg(inpup(idb2,idk1))*dconjg(yup(4))*
1412      -     inpup(idc2,idk2))*yup(13)) +dconjg(inpup(idc1,idb2))* 
1413      -     inpup(idc2,idk2)*yup(13)*yup(34) + dotup(idb1,idb1)*
1414      -     (-(dconjg(yup(4))*yup(4)) + dconjg(yup(34))*yup(34)) - 
1415      -     dconjg(yup(35))*(dconjg(inpup(idb2,idk1))*dconjg(yup(4))*
1416      -     inpup(idc2,idb1) +dconjg(inpup(idc1,idb2))*inpup(idc2,idb1)*
1417      -     yup(34) - dotup(idc1,idc1)*yup(35))))/dconjg(yup(8))
1418           bfun(3,ii,kk)=(-4*dotup(idb1,idb1)*(dotup(idc1,idc1)*yup(8)
1419      -     *yup(19)*yup(31)+yup(1)*(dconjg(yup(16))*dconjg(yup(34)) + 
1420      -     dconjg(inpup(idc1,idq0))*inpup(idc2,idk2)*yup(19))*yup(34))+ 
1421      -     4*dconjg(yup(16))*(-(dotup(idc1,idc1)*yup(2)*yup(29)
1422      -     *yup(31)) +dconjg(yup(35))*yup(1)*
1423      -     (dconjg(inpup(idc1,idb2))*inpup(idc2,idb1)*
1424      -     yup(34) - dotup(idc1,idc1)*yup(35))))/dconjg(yup(8))
1425           bfun(4,ii,kk)=(4*yup(9)*(dotup(idb1,idb1)*(-(dconjg(yup(4))*
1426      -     (dconjg(yup(16))*yup(4) -dconjg(inpup(idq0,idk1))*
1427      -     inpup(idc2,idk2)*yup(19)))+dconjg(yup(16))*dconjg(yup(34))
1428      -     *yup(34) +dconjg(inpup(idc1,idq0))*inpup(idc2,idk2)*
1429      -     yup(19)*yup(34)) -dconjg(yup(16))*dconjg(yup(35))*
1430      -     (dconjg(inpup(idb2,idk1))*dconjg(yup(4))*inpup(idc2,idb1) + 
1431      -     dconjg(inpup(idc1,idb2))*inpup(idc2,idb1)*
1432      -     yup(34) - dotup(idc1,idc1)*yup(35))))/dconjg(yup(8))
1433           bfun(5,ii,kk)=(2*dconjg(yup(10))*yup(9)*yup(28)*yup(30))
1434      &   /dconjg(yup(8))
1435           bfun(8,ii,kk)=(-4*yup(9)*((dconjg(yup(12)) - dconjg(yup(18)))*
1436      -     dotup(idb1,idb1)*(dconjg(yup(4))*yup(4) - dconjg(yup(34))
1437      -     *yup(34)) +dconjg(yup(35))*(-((dconjg(inpup(idb2,idk1))
1438      -     *dconjg(yup(4))*(-dconjg(yup(12)) + dconjg(yup(18))) - 
1439      -     2*dconjg(inpup(idb2,idq0))*dconjg(yup(14))*dotup(idc1,idk1))*
1440      -     inpup(idc2,idb1)) +dconjg(inpup(idc1,idb2))*(dconjg(yup(12))
1441      -     -dconjg(yup(18)))*inpup(idc2,idb1)*yup(34))+dotup(idc1,idc1)*
1442      -     (dconjg(yup(10))*yup(19)*yup(30) + (-dconjg(yup(12)) +
1443      -     dconjg(yup(18)))*dconjg(yup(35))*yup(35))))/dconjg(yup(8))
1444           bfun(9,ii,kk)=(4*dconjg(inpup(idc1,idb2))*dconjg(yup(11))*
1445      -     dconjg(yup(35))*inpup(idq0,idb1)*yup(5))/dconjg(yup(8))
1446 c...helicity(54)=(-,-,+,+,-,+)

1447         do mm=1,9
1448            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
1449      &     dconjg(bfun(mm,ii,kk))
1450         end do
1451           end if
1452 
1453 c...helicity(39)=(+,+,-,-,-,+)

1454         kk=39
1455         if(iqqbar.eq.0) then
1456           bfun(1,ii,kk)=(4*dconjg(yup(1))* (-(dotup(idb1,idb1)*
1457      -     (dconjg(yup(5))*yup(5)*yup(10) -dconjg(inpup(idc1,idk2))*
1458      -     inpup(idq0,idk1)*yup(5)*yup(19) -(dconjg(yup(34))*yup(10)+ 
1459      -     dconjg(inpup(idc1,idk2))*inpup(idc2,idq0)*yup(19))*yup(34)))+ 
1460      -     dconjg(yup(35))*yup(10)*(dconjg(inpup(idc1,idb2))*
1461      -     (inpup(idk1,idb1)*yup(5) - inpup(idc2,idb1)*yup(34)) + 
1462      -     dotup(idc1,idc1)*yup(35))))/yup(8)
1463         bfun(2,ii,kk)=(-4*(dotup(idc1,idc1)*(dconjg(yup(8))*
1464      -     dotup(idb1,idb1)*yup(19)+yup(10)*yup(25)*yup(30))*yup(31)+ 
1465      -     dconjg(yup(9))*dotup(idb1,idb1)*(dconjg(yup(34))*yup(10) + 
1466      -     dconjg(inpup(idc1,idk2))*inpup(idc2,idq0)*yup(19))*yup(34)) + 
1467      -     4*dconjg(yup(9))*dconjg(yup(35))*yup(10)*
1468      -     (dconjg(inpup(idc1,idb2))*inpup(idc2,idb1)*
1469      -     yup(34) - dotup(idc1,idc1)*yup(35)))/yup(8)
1470           bfun(3,ii,kk)=(4*dconjg(yup(1))*yup(16)*(dotup(idb1,idb1)*
1471      -     (dconjg(yup(5))*yup(5) - dconjg(yup(34))*yup(34)) + 
1472      -     dconjg(yup(17))*(dotup(idc1,idc1)*yup(17) + 
1473      -     dconjg(inpup(idc1,idk2))*(inpup(idk1,idb1)*yup(5) - 
1474      -     inpup(idc2,idb1)*yup(34))) - dconjg(yup(35))*
1475      -     (dconjg(inpup(idc1,idb2))*(inpup(idk1,idb1)*yup(5) - 
1476      -     inpup(idc2,idb1)*yup(34))+dotup(idc1,idc1)*yup(35))))/yup(8)
1477           bfun(4,ii,kk)=(4*yup(16)*(dconjg(yup(9))*(dconjg(yup(34))
1478      -     *dotup(idb1,idb1)+(dconjg(inpup(idc1,idk2))*dconjg(yup(17))- 
1479      -     dconjg(inpup(idc1,idb2))*dconjg(yup(35)))*inpup(idc2,idb1))
1480      -     *yup(34)+dotup(idc1,idc1)*(yup(25)*(-yup(19)+yup(30))*yup(31) 
1481      -     +dconjg(yup(9))*(-(dconjg(yup(17))*yup(17)) + 
1482      -     dconjg(yup(35))*yup(35)))))/yup(8)
1483           bfun(5,ii,kk)=(2*dconjg(yup(1))*yup(16)*yup(27)*yup(29))/yup(8)
1484           bfun(8,ii,kk)=(4*(2*dconjg(yup(4))*dotup(idc1,idk1)*
1485      -     (dotup(idb1,idb1)*yup(14) - yup(16)*yup(23))*yup(27) +
1486      -     dconjg(yup(9))*(-(dconjg(yup(14))*yup(16)*yup(18)*yup(23)) + 
1487      -     dconjg(inpup(idc1,idb2))*dconjg(yup(35))*inpup(idc2,idb1)*
1488      -     (-yup(12) + yup(18))*yup(34) + dotup(idb1,idb1)*
1489      -     (dconjg(yup(14))*yup(14)*yup(18) +dconjg(yup(34))*(yup(12) 
1490      -     - yup(18))*yup(34))) + dotup(idc1,idc1)*(2*dconjg(yup(8))
1491      -     *dconjg(yup(35))*dotup(idc1,idk1)*yup(35)+(yup(12)-yup(18))*
1492      -     (yup(25)*yup(30)*yup(31) + dconjg(yup(9))*dconjg(yup(35))
1493      -     *yup(35)))))/yup(8)
1494           bfun(9,ii,kk)=(4*(dconjg(yup(5))*dotup(idb1,idb1)*yup(15)*
1495      -     yup(28) + dconjg(yup(35))*(-(dconjg(inpup(idc1,idb2))*
1496      -     inpup(idk1,idb1)*yup(15)*yup(28)) + 
1497      -     dconjg(yup(8))*dotup(idc1,idc1)*yup(35))))/yup(8)
1498 c...helicity(55)=(-,-,+,+,+,-)

1499         do mm=1,9
1500            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
1501      &     dconjg(bfun(mm,ii,kk))
1502         end do
1503           end if
1504 
1505 c...helicity(40)=(+,+,-,-,-,-)

1506         kk=40
1507         if(iqqbar.eq.0) then
1508           bfun(1,ii,kk)=(4*dconjg(yup(1))*dconjg(yup(10))*
1509      -     (-(dconjg(yup(13))*dotup(idc1,idc1)*yup(13)) + 
1510      -     dconjg(inpup(idc1,idb2))*inpup(idk2,idk1)*yup(5)*yup(13) + 
1511      -     dconjg(inpup(idc1,idb2))*inpup(idc2,idk2)*yup(13)*yup(34) - 
1512      -     dotup(idb1,idb1)*(dconjg(yup(5))*yup(5) - dconjg(yup(34))
1513      -     *yup(34)) +dconjg(yup(35))*(dconjg(inpup(idc1,idb2))*
1514      -     (inpup(idk1,idb1)*yup(5) -inpup(idc2,idb1)*yup(34)) + 
1515      -     dotup(idc1,idc1)*yup(35))))/xup(2)
1516         bfun(2,ii,kk)=(4*dconjg(yup(10))*(-(dconjg(yup(9))*
1517      -     (dconjg(yup(34))*dotup(idb1,idb1)+dconjg(inpup(idc1,idb2))*
1518      -     (-(dconjg(yup(35))*inpup(idc2,idb1)) + inpup(idc2,idk2)
1519      -     *yup(13)))*yup(34)) - dotup(idc1,idc1)*((dconjg(yup(3))*
1520      -     dconjg(yup(12)) -dconjg(yup(9))*dconjg(yup(13)))*yup(13) + 
1521      -     yup(25)*yup(30)*yup(31) + dconjg(yup(9))*dconjg(yup(35))
1522      -     *yup(35))))/xup(2)
1523           bfun(3,ii,kk)=(4*dconjg(yup(1))*(dotup(idb1,idb1)*
1524      -     (-(dconjg(inpup(idc1,idq0))*inpup(idk2,idk1)*yup(5)*yup(19))- 
1525      -     dconjg(inpup(idc1,idq0))*inpup(idc2,idk2)*yup(19)*yup(34) + 
1526      -     dconjg(yup(16))*(dconjg(yup(5))*yup(5) - dconjg(yup(34))*
1527      -     yup(34))) - dconjg(yup(16))*dconjg(yup(35))*
1528      -     (dconjg(inpup(idc1,idb2))*(inpup(idk1,idb1)*yup(5) - 
1529      -     inpup(idc2,idb1)*yup(34))+dotup(idc1,idc1)*yup(35))))/xup(2)
1530           bfun(4,ii,kk)=(4*(dconjg(yup(16))*dotup(idc1,idc1)*yup(25)*
1531      -     yup(30)*yup(31) + dconjg(yup(9))*(dotup(idb1,idb1)*
1532      -     (dconjg(yup(16))*dconjg(yup(34)) + dconjg(inpup(idc1,idq0))
1533      -     *inpup(idc2,idk2)*yup(19))*yup(34) - dconjg(yup(16))*
1534      -     dconjg(yup(35))*(dconjg(inpup(idc1,idb2))*inpup(idc2,idb1)*
1535      -     yup(34) - dotup(idc1,idc1)*yup(35)))))/xup(2)
1536         bfun(5,ii,kk)=(2*dconjg(yup(1))*dconjg(yup(10))*yup(27)*yup(30))
1537      &    /xup(2)
1538           bfun(8,ii,kk)=(-4*dotup(idc1,idc1)*yup(30)*(dconjg(yup(9))*
1539      -     dconjg(yup(10))*yup(19) + (dconjg(yup(7))*dconjg(yup(10)) + 
1540      -     (-dconjg(yup(12)) + dconjg(yup(18)))*yup(25))*yup(31)) + 
1541      -     4*dconjg(yup(9))*(dconjg(yup(12)) - dconjg(yup(18)))*
1542      -     dconjg(yup(34))*dotup(idb1,idb1)*yup(34)+4*dconjg(yup(35))*
1543      -     (-2*dconjg(inpup(idb2,idq0))*dotup(idc1,idk1)*
1544      -     inpup(idk2,idk1)*yup(22)*yup(27) + dconjg(yup(9))*
1545      -     (-dconjg(yup(12)) + dconjg(yup(18)))*
1546      -     (dconjg(inpup(idc1,idb2))*inpup(idc2,idb1)*
1547      -     yup(34) - dotup(idc1,idc1)*yup(35))))/xup(2)
1548           bfun(9,ii,kk)=0.0d0
1549 c...helicity(56)=(-,-,+,+,+,+)

1550         do mm=1,9
1551            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
1552      &     dconjg(bfun(mm,ii,kk))
1553         end do
1554           end if
1555 
1556 c**********************************************************

1557           if(iqqbar.eq.1) then
1558         bfun(1,ii,kk)=-4*(dconjg(yup(8))*dotup(idb1,idb1)*
1559      -    dotup(idc1,idc1)*yup(30) - dconjg(inpup(idq0,idk2))
1560      -    *dconjg(yup(39))*dotup(idb1,idb1)*inpup(idc2,idk1)*yup(34)+ 
1561      -    dconjg(inpup(idc1,idb2))*dconjg(yup(35))*dconjg(yup(45))
1562      -    *inpup(idk1,idb1)*yup(34) + dconjg(inpup(idc1,idk2))
1563      -    *dotup(idb1,idb1)*inpup(idb1,idk1)*yup(34)*yup(37) - 
1564      -    dconjg(inpup(idc1,idb2))*dconjg(yup(35))*inpup(idc2,idb1)
1565      -    *yup(34)*yup(53) +dconjg(yup(35))*dotup(idc1,idc1)*yup(35)*
1566      -    yup(53) + dconjg(yup(3))*dconjg(yup(35))*dotup(idc1,idc1)
1567      -    *yup(57) -dotup(idb1,idb1)*yup(14)*yup(34)*yup(72) + 
1568      -    dotup(idb1,idb1)*yup(14)*yup(34)*yup(81))
1569         bfun(2,ii,kk)=4*dotup(idb1,idb1)*(dconjg(yup(8))
1570      -    *dotup(idc1,idc1)*yup(29) - (dconjg(yup(5))*
1571      -    (dconjg(yup(45))- dconjg(yup(68)))- dconjg(inpup(idc1,idq0))
1572      -    *inpup(idc2,idk1)*yup(16) + dconjg(inpup(idc1,idk2))*
1573      -    inpup(idq0,idk1)*yup(23))*yup(34)) +4*dconjg(yup(35))*
1574      -    ((dotup(idc1,idc1)*yup(17) -dconjg(inpup(idc1,idk2))* 
1575      -    inpup(idc2,idb1)*yup(34))*yup(59)+(-(dconjg(inpup(idc1,idb2)) 
1576      -    *inpup(idc2,idb1)*yup(34))+dotup(idc1,idc1)*yup(35))*yup(60))
1577         bfun(3,ii,kk)=4*(dconjg(yup(1))*dconjg(yup(8))*dotup(idb1,idb1)*
1578      -    yup(9) + dconjg(yup(8))*dconjg(yup(11))*dotup(idb1,idb1)
1579      -    *yup(18) -dconjg(yup(1))*yup(9)*yup(16)*yup(25) - 
1580      -    dconjg(yup(11))*yup(16)*yup(18)*yup(25) + 
1581      -    dconjg(inpup(idc1,idk2))*inpup(idc2,idk1)*(dconjg(yup(10))
1582      -    *yup(16) + yup(2)*yup(25) - dotup(idb1,idb1)*(yup(19) + 
1583      -    yup(31)))*yup(34)- dconjg(yup(34))*dotup(idb1,idb1)*yup(34)*
1584      -    yup(53) - dconjg(yup(34))*dotup(idb1,idb1)*yup(34)*yup(60) + 
1585      -    dconjg(inpup(idc1,idb2))*dconjg(yup(35))*inpup(idc2,idb1)*
1586      -    yup(34)*(yup(53)+yup(60))+dotup(idc1,idc1)*(-(dconjg(yup(8))
1587      -    *yup(2)*yup(25))+yup(16)*(-(dconjg(yup(8))*dconjg(yup(10)))+ 
1588      -    yup(25)*(yup(19) + yup(31))) - dconjg(yup(35))*yup(35)
1589      -    *(yup(53) + yup(60))))
1590           bfun(4,ii,kk)=-4*(-(dconjg(inpup(idq0,idk2))*dconjg(yup(35))*
1591      -    dconjg(yup(38))*dotup(idc1,idc1)*inpup(idb1,idk1)) + 
1592      -    dconjg(inpup(idq0,idk1))*dconjg(inpup(idq0,idk2))*
1593      -    dotup(idb1,idb1)*dotup(idc1,idc1)*inpup(idq0,idk1)**2 - 
1594      -    dconjg(yup(3))*dotup(idb1,idb1)*dotup(idc1,idc1)*
1595      -    yup(13) - dconjg(yup(6))*dotup(idb1,idb1)*dotup(idc1,idc1)
1596      -    *yup(17) +dconjg(inpup(idc1,idk2))*dconjg(yup(6))*
1597      -    dotup(idb1,idb1)*inpup(idc2,idb1)*yup(34) + 
1598      -    dconjg(inpup(idc1,idk2))*dconjg(yup(3))*
1599      -    dotup(idb1,idb1)*inpup(idc2,idb2)*yup(34) + 
1600      -    dconjg(inpup(idc1,idk2))*inpup(idc2,idk1)*yup(34)*
1601      -    (-(dotup(idb1,idb1)*yup(31)) +dconjg(yup(35))*yup(51)) + 
1602      -    dconjg(inpup(idq0,idk2))*dconjg(yup(35))*
1603      -    dotup(idc1,idc1)*inpup(idb1,idk1)*yup(61) - 
1604      -    dconjg(inpup(idc1,idk2))*dconjg(yup(35))*
1605      -    inpup(idb1,idk1)*yup(34)*yup(64))
1606 c...helicity(56)=(-,-,+,+,+,+)

1607         do mm=1,4
1608             bfun(mm,ii,kk+16)=dconjg(bfun(mm,ii,kk))
1609         end do
1610           end if
1611 
1612 c...helicity(41)=(+,-,+,+,+,+)

1613         kk=41
1614         if(iqqbar.eq.0) then
1615           bfun(1,ii,kk)=(-4*pmomup(5,idb1)*yup(1)*
1616      -     (-(dconjg(inpup(idq0,idk2))*dconjg(yup(13))*
1617      -     (-(dconjg(inpup(idk2,idk1))*dconjg(yup(5))*inpup(idc1,idb2))- 
1618      -     dconjg(inpup(idc2,idk2))*dconjg(yup(34))*inpup(idc1,idb2) + 
1619      -     dotup(idc1,idc1)*yup(13))) +dconjg(inpup(idq0,idk1))* 
1620      -     dconjg(yup(5))*yup(10)*(yup(20) + yup(39)) - 
1621      -     dconjg(inpup(idq0,idc2))*dconjg(yup(34))*
1622      -     yup(10)*(yup(20) + yup(39))))/xup(1)
1623         bfun(2,ii,kk)=(4*pmomup(5,idb1)*(dotup(idc1,idc1)*
1624      -     ((-(dconjg(inpup(idb2,idq0))*yup(3))-dconjg(inpup(idb1,idq0))
1625      -     *yup(6))*yup(10)*yup(31) + dconjg(yup(13))*yup(13)*
1626      -     (-(dconjg(inpup(idq0,idk2))*yup(9))+dconjg(inpup(idk2,idk1))
1627      -     *yup(31)))+dconjg(yup(34))*yup(9)*(dconjg(inpup(idc2,idk2))*
1628      -     dconjg(inpup(idq0,idk2))*dconjg(yup(13))*inpup(idc1,idb2) - 
1629      -     dconjg(inpup(idq0,idc2))*yup(10)*(yup(20)+yup(39)))))/xup(1)
1630         bfun(3,ii,kk)=(4*pmomup(5,idb1)*yup(1)*(dconjg(inpup(idb1,idq0))
1631      -     *dotup(idc1,idc1)*yup(17)*yup(19) +dconjg(yup(34))*
1632      -     (dconjg(inpup(idc2,idk2))*yup(19)*yup(20) - 
1633      -     dconjg(inpup(idq0,idc2))*yup(16)*(yup(20) + yup(39))) + 
1634      -     dconjg(yup(5))*(dconjg(inpup(idk2,idk1))*yup(19)*yup(20) + 
1635      -     dconjg(inpup(idq0,idk1))*yup(16)*(yup(20)+yup(39)))))/xup(1)
1636           bfun(4,ii,kk)=(4*pmomup(5,idb1)*(-(dotup(idc1,idc1)*
1637      -     (dconjg(inpup(idb1,idq0))*yup(9)*yup(17)*yup(19) + 
1638      -     ((-(dconjg(inpup(idb2,idq0))*yup(3))-dconjg(inpup(idb1,idq0))
1639      -     *yup(6))*yup(16) +dconjg(inpup(idk2,idk1))*yup(19)*yup(29)
1640      -     )*yup(31)))-dconjg(yup(34))*yup(9)*(dconjg(inpup(idc2,idk2))
1641      -     *yup(19)*yup(20) - dconjg(inpup(idq0,idc2))*yup(16)*
1642      -     (yup(20) + yup(39)))))/xup(1)
1643           bfun(5,ii,kk)=(-2*dconjg(inpup(idq0,idk2))*pmomup(5,idb1)
1644      -     *yup(1)*yup(27)*(yup(29) + yup(30)))/xup(1)
1645           bfun(8,ii,kk)=(4*pmomup(5,idb1)*(2*dconjg(inpup(idk2,idk1))
1646      -     *dotup(idc1,idk1)*yup(27)*yup(28)*(yup(29) + yup(30)) + 
1647      -     dotup(idc1,idc1)*(-(dconjg(inpup(idb2,idq0))*(yup(9)*yup(13)
1648      -     *yup(19)+(yup(7)*yup(13)+yup(3)*(-yup(12)+yup(18)))*yup(31))
1649      -     ) - dconjg(inpup(idb1,idq0))*(yup(9)*yup(17)*yup(19) + 
1650      -     (yup(7)*yup(17) +yup(6)*(-yup(12) + yup(18)))*yup(31)))
1651      -     + dconjg(inpup(idq0,idc2))*dconjg(yup(34))*
1652      -     yup(9)*(yup(12) - yup(18))*(yup(20) + yup(39))))/xup(1)
1653           bfun(9,ii,kk)=0.0d0
1654 c...helicity(57)=(-,+,-,-,-,-)

1655         do mm=1,9
1656            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
1657      &     -dconjg(bfun(mm,ii,kk))
1658         end do
1659           end if
1660 
1661 c****************************************************

1662           if(iqqbar.eq.1) then
1663         bfun(1,ii,kk)=-4*pmomup(5,idb1)*(dconjg(inpup(idq0,idk1))**2
1664      -     *dotup(idc1,idc1)*inpup(idk2,idk1)*yup(30) + 
1665      -     dconjg(inpup(idq0,idk1))* (dotup(idc1,idc1)*
1666      -     (-(dconjg(inpup(idb2,idq0))*dconjg(yup(35))*inpup(idb1,idk2))
1667      -     + dconjg(yup(10))*yup(30)) + dconjg(yup(34))*
1668      -     (dconjg(inpup(idq0,idc2))*dotup(idb1,idb1)*inpup(idc1,idk2) +
1669      -     yup(39)*yup(44))) - dconjg(yup(34))*(dconjg(inpup(idq0,idc2))
1670      -     *dconjg(yup(10))* dconjg(yup(72)) + dconjg(inpup(idc2,idk1))*
1671      -     (dconjg(yup(10)) + dconjg(yup(12)))*yup(39) - 
1672      -     dconjg(inpup(idq0,idc2))*yup(20)*yup(46)))
1673         bfun(2,ii,kk)=4*pmomup(5,idb1)*(-(dotup(idc1,idc1)*
1674      -    (dconjg(inpup(idb1,idq0))*dconjg(yup(16))*yup(6) + 
1675      -    dconjg(inpup(idq0,idk1))*(dconjg(yup(16)) - 
1676      -    dconjg(inpup(idq0,idk1))*inpup(idk2,idk1))*yup(29))) + 
1677      -    dconjg(inpup(idb2,idq0))*dconjg(yup(18))*yup(28)*
1678      -    yup(66) + dconjg(yup(34))*(dconjg(inpup(idq0,idc2))*
1679      -    dconjg(inpup(idq0,idk1))*dotup(idb1,idb1)*inpup(idc1,idk2) + 
1680      -    dconjg(inpup(idq0,idc2))*yup(39)*yup(50) +  yup(20)*
1681      -    (-(dconjg(inpup(idc2,idk1))*(dconjg(yup(12)) +
1682      -    dconjg(yup(16)))) + dconjg(inpup(idq0,idk1))*yup(68))))
1683           bfun(3,ii,kk)=4*pmomup(5,idb1)*(dconjg(inpup(idq0,idk1))
1684      -    *dconjg(yup(9))*dconjg(yup(10))*yup(1) + 
1685      -    dconjg(inpup(idq0,idk1))*dconjg(yup(9))*dconjg(yup(16))
1686      -    *yup(1) + dconjg(inpup(idq0,idk1))*dconjg(yup(2))*
1687      -    dotup(idc1,idc1)*yup(8) + dconjg(inpup(idq0,idk2)) 
1688      -    *dconjg(yup(16))*dotup(idc1,idc1)*yup(8) + 
1689      -    dconjg(inpup(idq0,idk1))*dconjg(yup(10))*dconjg(yup(18))
1690      -    *yup(11) +dconjg(inpup(idq0,idk1))*dconjg(yup(16))*
1691      -    dconjg(yup(18))*yup(11) - dconjg(inpup(idq0,idk1))
1692      -    *dconjg(yup(10))*dotup(idc1,idc1)*yup(19) - 
1693      -    dconjg(inpup(idq0,idk1))*dconjg(yup(16))*
1694      -    dotup(idc1,idc1)*yup(19) +dconjg(inpup(idb1,idq0))*
1695      -    (-(dconjg(inpup(idc2,idk1))*dconjg(yup(34))*
1696      -    inpup(idc1,idk2))+dotup(idc1,idc1)*yup(8))*(yup(21)+yup(26))- 
1697      -    dconjg(inpup(idq0,idk1))*dconjg(yup(10))*dotup(idc1,idc1)
1698      -    *yup(31) -dconjg(inpup(idq0,idk1))*dconjg(yup(16))*
1699      -    dotup(idc1,idc1)*yup(31) +dconjg(yup(34))*
1700      -    (dconjg(inpup(idc2,idk1))*(-(dconjg(inpup(idq0,idk1))
1701      -    *dconjg(yup(2))*inpup(idc1,idk2)) -dconjg(yup(16)) 
1702      -    *yup(40)) -dconjg(inpup(idq0,idc2))*(yup(20) + yup(39))*
1703      -    (yup(46) + yup(50))))
1704           bfun(4,ii,kk)=4*pmomup(5,idb1)*(dconjg(inpup(idq0,idk1))*
1705      -    dotup(idc1,idc1)*(dconjg(yup(13))*(dconjg(yup(61)) - 
1706      -    dconjg(inpup(idq0,idk1))*inpup(idk1,idb2))+dconjg(yup(17))*
1707      -    (dconjg(inpup(idq0,idk1))*inpup(idb1,idk1) +yup(75))) + 
1708      -    dconjg(yup(34))*inpup(idc1,idk2)*(-(dconjg(inpup(idc2,idk1))*
1709      -    (-(dconjg(inpup(idb1,idq0))*yup(21))-dconjg(inpup(idb2,idq0))*
1710      -    yup(38))) -dconjg(inpup(idb1,idq0))*dconjg(inpup(idq0,idk1))
1711      -    *yup(83) -dconjg(inpup(idb2,idq0))*dconjg(inpup(idq0,idk1))
1712      -    *yup(85)))
1713 c...helicity(57)=(-,+,-,-,-,-)

1714         do mm=1,4
1715              bfun(mm,ii,kk+16)=-dconjg(bfun(mm,ii,kk))
1716         end do
1717           end if
1718 
1719 c...helicity(42)=(+,-,+,+,+,-)

1720         kk=42
1721         if(iqqbar.eq.0) then
1722           bfun(1,ii,kk)=(-4*dconjg(yup(10))*(dconjg(inpup(idq0,idk1))
1723      -     *dconjg(yup(5)) -dconjg(inpup(idq0,idc2))*dconjg(yup(34)))*
1724      -     pmomup(5,idb1)*yup(1)*(yup(20) + yup(39) - yup(40)))
1725      -     /dconjg(yup(8))
1726         bfun(2,ii,kk)=(4*dconjg(yup(10))*pmomup(5,idb1)*
1727      -     (dotup(idc1,idc1)*(-(dconjg(inpup(idb2,idq0))*yup(3)) - 
1728      -     dconjg(inpup(idb1,idq0))*yup(6)-dconjg(inpup(idq0,idk1))
1729      -     *yup(19))*yup(31)-dconjg(inpup(idq0,idc2))*dconjg(yup(34))
1730      -     *yup(9)*(yup(20)+yup(39)-yup(40))))/dconjg(yup(8))
1731           bfun(3,ii,kk)=(4*dconjg(yup(16))*pmomup(5,idb1)*yup(1)*
1732      -     (dconjg(inpup(idq0,idk2))*dconjg(yup(18))*(-yup(28)+yup(31))+ 
1733      -     (dconjg(inpup(idq0,idk1))*dconjg(yup(5)) - 
1734      -     dconjg(inpup(idq0,idc2))*dconjg(yup(34)))*
1735      -     (yup(20) + yup(39))))/dconjg(yup(8))
1736           bfun(4,ii,kk)=(4*dconjg(yup(16))*pmomup(5,idb1)*
1737      -     (dconjg(inpup(idb2,idq0))*dotup(idc1,idc1)*yup(3)*
1738      -     yup(31) + dconjg(inpup(idb1,idq0))*dotup(idc1,idc1)
1739      -     *yup(6)*yup(31) +dconjg(inpup(idq0,idk2))*
1740      -     (dconjg(yup(18))*yup(9)*yup(28)+dotup(idc1,idc1)*yup(8) 
1741      -     *yup(31))+dconjg(inpup(idq0,idc2))*dconjg(yup(34))*yup(9)*
1742      -     (yup(20) + yup(39))))/dconjg(yup(8))
1743           bfun(5,ii,kk)=0.0d0
1744           bfun(8,ii,kk)=(4*pmomup(5,idb1)*((-dconjg(yup(12)) 
1745      -     + dconjg(yup(18)))*dotup(idc1,idc1)*
1746      -     (-(dconjg(inpup(idb2,idq0))*yup(3)) - 
1747      -     dconjg(inpup(idb1,idq0))*yup(6))*yup(31) - 
1748      -     dconjg(inpup(idq0,idc2))*(-((dconjg(yup(10)) +
1749      -     dconjg(yup(16)))*(dconjg(yup(18))*yup(9)*yup(14) + 
1750      -     2*dotup(idc1,idk1)*yup(4)*yup(27))) +(-dconjg(yup(12)) 
1751      -     + dconjg(yup(18)))*dconjg(yup(34))*yup(9)*(yup(20) 
1752      -     + yup(39)))))/dconjg(yup(8))
1753           bfun(9,ii,kk)=(4*dconjg(inpup(idq0,idk1))*dconjg(yup(15))*
1754      -     pmomup(5,idb1)*yup(28)*(yup(20)+yup(39)))/dconjg(yup(8))
1755 c...helicity(58)=(-,+,-,-,-,+)

1756         do mm=1,9
1757            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
1758      &     -dconjg(bfun(mm,ii,kk))
1759         end do
1760           end if
1761 
1762 c...helicity(43)=(+,-,+,+,-,+)

1763         kk=43
1764         if(iqqbar.eq.0) then
1765           bfun(1,ii,kk)=(4*pmomup(5,idb1)*(dconjg(inpup(idq0,idk2))
1766      -     *dconjg(yup(2))*dotup(idc1,idc1)*yup(19)*yup(31) + 
1767      -     dconjg(yup(1))*(-(dconjg(inpup(idq0,idk2))*dconjg(yup(13))*
1768      -     (dconjg(inpup(idc2,idk2))*dconjg(yup(34))*inpup(idc1,idb2) - 
1769      -     dotup(idc1,idc1)*yup(13))) + dconjg(inpup(idq0,idc2))
1770      -     *dconjg(yup(34))*yup(10)*(yup(20) + yup(39)))))/yup(8)
1771         bfun(2,ii,kk)=(4*dconjg(yup(9))*pmomup(5,idb1)*
1772      -     (-(dconjg(inpup(idq0,idk2))*dconjg(yup(13))*
1773      -     dotup(idc1,idc1)*yup(13)) - dconjg(inpup(idc2,idk2))*
1774      -     (-(dconjg(inpup(idq0,idk2))*dconjg(yup(13))*
1775      -     dconjg(yup(34))*inpup(idc1,idb2)) + dconjg(yup(2))*yup(4)
1776      -     *yup(19)) -dconjg(inpup(idq0,idc2))*yup(10)*
1777      -     (-(yup(4)*(dconjg(yup(2)) + yup(25))) + 
1778      -     dconjg(yup(34))*(yup(20) + yup(39)))))/yup(8)
1779           bfun(3,ii,kk)=(4*pmomup(5,idb1)*(-(dotup(idc1,idc1)*yup(19)*
1780      -     (-(dconjg(inpup(idb1,idq0))*dconjg(yup(1))*yup(17)) + 
1781      -     dconjg(inpup(idq0,idk2))*yup(25)*yup(31)))+dconjg(yup(1))
1782      -     *dconjg(yup(34))*(dconjg(inpup(idc2,idk2))*yup(19)*yup(20) - 
1783      -     dconjg(inpup(idq0,idc2))*yup(16)*
1784      -     (yup(20) + yup(39)))))/yup(8)
1785           bfun(4,ii,kk)=(-4*dconjg(yup(9))*pmomup(5,idb1)*
1786      -     (dconjg(inpup(idb1,idq0))*dotup(idc1,idc1)*yup(17)*yup(19) + 
1787      -     dconjg(inpup(idc2,idk2))*yup(19)*(dconjg(yup(34))*yup(20)
1788      -     - yup(4)*yup(25)) -dconjg(inpup(idq0,idc2))*yup(16)*
1789      -     (-(yup(4)*(dconjg(yup(2)) + yup(25))) + 
1790      -     dconjg(yup(34))*(yup(20) + yup(39)))))/yup(8)
1791           bfun(5,ii,kk)=(-2*dconjg(inpup(idq0,idk2))*dconjg(yup(9))*
1792      -     pmomup(5,idb1)*yup(28)*(yup(29) + yup(30)))/yup(8)
1793         bfun(8,ii,kk)=(4*dconjg(yup(9))*pmomup(5,idb1)*(dotup(idc1,idc1)
1794      -     *(-(dconjg(inpup(idb2,idq0))*yup(13))-dconjg(inpup(idb1,idq0) 
1795      -     )*yup(17))*yup(19) - dconjg(inpup(idq0,idc2))*
1796      -     (2*dotup(idc1,idk1)*yup(14)*(yup(29)+yup(30))+(yup(12)-
1797      -     yup(18))*(yup(4)*(dconjg(yup(2)) + yup(25)) - 
1798      -     dconjg(yup(34))*(yup(20) + yup(39))))))/yup(8)
1799           bfun(9,ii,kk)=0.0d0
1800 c...helicity(59)=(-,+,-,-,+,-)

1801         do mm=1,9
1802            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
1803      &     -dconjg(bfun(mm,ii,kk))
1804         end do
1805           end if
1806 
1807 c...helicity(44)=(+,-,+,+,-,-)

1808         kk=44
1809         if(iqqbar.eq.0) then
1810           bfun(1,ii,kk)=(4*dconjg(inpup(idq0,idc2))*dconjg(yup(1))*
1811      -     dconjg(yup(10))*dconjg(yup(34))*pmomup(5,idb1)*
1812      -     (yup(20) + yup(39) - yup(40)))/xup(2)
1813         bfun(2,ii,kk)=(4*dconjg(inpup(idq0,idc2))*dconjg(yup(9))*
1814      -     dconjg(yup(10))*pmomup(5,idb1)*(yup(4)*(dconjg(yup(2))
1815      -     - dconjg(yup(7)) +yup(25)) - dconjg(yup(34))*(yup(20) + 
1816      -     yup(39) - yup(40))))/xup(2)
1817           bfun(3,ii,kk)=(4*dconjg(yup(1))*dconjg(yup(16))*pmomup(5,idb1)*
1818      -     (-(dconjg(inpup(idq0,idk2))*dconjg(yup(18))*
1819      -     yup(28)) -  dconjg(inpup(idq0,idc2))*dconjg(yup(34))*
1820      -     (yup(20) + yup(39))))/xup(2)
1821         bfun(4,ii,kk)=(-4*dconjg(yup(9))*dconjg(yup(16))*pmomup(5,idb1)*
1822      -     (dconjg(inpup(idq0,idc2))*dconjg(inpup(idq0,idk2))
1823      -     *inpup(idk2,idk1)*yup(4) - dconjg(inpup(idq0,idk2))*
1824      -     dconjg(yup(18))*yup(28) -dconjg(inpup(idq0,idc2))*
1825      -     (-(yup(4)*(dconjg(yup(2)) + yup(25))) + 
1826      -     dconjg(yup(34))*(yup(20) + yup(39)))))/xup(2)
1827           bfun(5,ii,kk)=0.0d0
1828           bfun(8,ii,kk)=(-4*dconjg(inpup(idq0,idc2))*dconjg(yup(9))*
1829      -     (dconjg(yup(12)) - dconjg(yup(18)))*pmomup(5,idb1)*
1830      -     ((dconjg(yup(10)) + dconjg(yup(16)))*yup(14) + 
1831      -     yup(4)*(dconjg(yup(2)) + yup(25)) - 
1832      -     dconjg(yup(34))*(yup(20) + yup(39))))/xup(2)
1833           bfun(9,ii,kk)=0.0d0
1834 c...helicity(60)=(-,+,-,-,+,+)

1835         do mm=1,9
1836            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
1837      &     -dconjg(bfun(mm,ii,kk))
1838         end do
1839           end if
1840 
1841 c****************************************************************

1842           if(iqqbar.eq.1) then
1843         bfun(1,ii,kk)=-4*pmomup(5,idb1)*(-(dconjg(inpup(idq0,idk2))**2
1844      -     *dotup(idc1,idc1)*inpup(idk2,idk1)*yup(30))-dconjg(yup(34))*
1845      -     (dconjg(inpup(idc2,idk2))*(dconjg(yup(7))+yup(25))*yup(39) - 
1846      -     dconjg(inpup(idq0,idc2))*yup(20)*yup(53) + 
1847      -     dconjg(inpup(idq0,idc2))*yup(25)*yup(54)) + 
1848      -     dconjg(inpup(idq0,idk2))* (dotup(idc1,idc1)* (-
1849      -    (dconjg(inpup(idb2,idq0))*dconjg(yup(35))*inpup(idb1,idk1))+ 
1850      -    yup(25)*yup(30)) +dconjg(yup(34))*(dconjg(inpup(idq0,idc2))
1851      -    *dotup(idb1,idb1)*inpup(idc1,idk1) + yup(39)*yup(55))))
1852         bfun(2,ii,kk)=4*pmomup(5,idb1)*(-(dotup(idc1,idc1)*
1853      -    (dconjg(inpup(idb1,idq0))*dconjg(yup(2))*yup(17) + 
1854      -    dconjg(inpup(idq0,idk2))*(dconjg(yup(2)) + 
1855      -    dconjg(inpup(idq0,idk2))*inpup(idk2,idk1))*yup(29))) + 
1856      -    dconjg(yup(34))*(dconjg(inpup(idq0,idc2))*
1857      -    dconjg(inpup(idq0,idk2))*dotup(idb1,idb1)*inpup(idc1,idk1)- 
1858      -    dconjg(inpup(idq0,idc2))*(dconjg(yup(2))*yup(54) -
1859      -    yup(39)*yup(60)) +yup(20)*(-(dconjg(inpup(idc2,idk2))*
1860      -    (dconjg(yup(2)) + dconjg(yup(7))))+ dconjg(inpup(idq0,idk2))
1861      -    *yup(73))))
1862         bfun(3,ii,kk)=4*pmomup(5,idb1)*(dconjg(yup(8))*dotup(idc1,idc1)*
1863      -     (dconjg(inpup(idq0,idk1))*dconjg(yup(2)) + 
1864      -     dconjg(inpup(idq0,idk2))*dconjg(yup(16)) + 
1865      -     dconjg(inpup(idb1,idq0))*(yup(21) + yup(26)))
1866      -     + dconjg(inpup(idq0,idk2))*(dconjg(yup(2)) + yup(25))*
1867      -     (dconjg(yup(9))*yup(1) +dconjg(yup(18))*yup(11) - 
1868      -     dotup(idc1,idc1)*(yup(19) + yup(31))) + dconjg(yup(34))*
1869      -     (-(dconjg(inpup(idq0,idc2))*(yup(20) + yup(39))*
1870      -     (yup(53) + yup(60))) -  dconjg(inpup(idc2,idk2))*
1871      -     (inpup(idc1,idk1)*(dconjg(inpup(idq0,idk2))*dconjg(yup(16)) + 
1872      -     dconjg(inpup(idb1,idq0))*(yup(21) + yup(26))) + 
1873      -     dconjg(yup(2))*yup(79))))
1874           bfun(4,ii,kk)=4*pmomup(5,idb1)*(-(dotup(idc1,idc1)*
1875      -     (dconjg(yup(2)) + yup(25))*(dconjg(inpup(idb2,idq0))
1876      -     *yup(13) +dconjg(inpup(idb1,idq0))*yup(17) + 
1877      -     dconjg(inpup(idq0,idk2))*yup(31)))-dconjg(inpup(idc2,idk2)) 
1878      -     *dconjg(yup(34))*(inpup(idc1,idk1)*
1879      -     (-(dconjg(inpup(idb1,idq0))*yup(21))-dconjg(inpup(idb2,idq0))
1880      -     *yup(38)) +(dconjg(yup(2))+ yup(25))*(yup(20) + yup(39))))
1881 c...helicity(60)=(-,+,-,-,+,+)

1882         do mm=1,9
1883              bfun(mm,ii,kk+16)=-dconjg(bfun(mm,ii,kk))
1884         end do
1885           end if
1886 
1887 c...helicity(45)=(+,-,+,-,+,+)

1888         kk=45
1889         if(iqqbar.eq.0) then
1890           bfun(1,ii,kk)=(-4*pmomup(5,idb1)*pmomup(5,idc1)*
1891      -     (dconjg(inpup(idq0,idk1))*yup(10)*yup(31)*
1892      -     (-(dconjg(inpup(idb1,idq0))*yup(32)) - 
1893      -     dconjg(inpup(idb2,idq0))*yup(42)) - 
1894      -     dconjg(inpup(idq0,idk2))*dconjg(yup(13))*
1895      -     (-(dconjg(inpup(idk2,idk1))*yup(31)*yup(42)) + 
1896      -     dconjg(inpup(idq0,idk2))*yup(1)*
1897      -     (dconjg(yup(36)) + yup(42)))))/xup(1)
1898         bfun(2,ii,kk)=(4*pmomup(5,idb1)*pmomup(5,idc1)*
1899      -     (-(dconjg(inpup(idq0,idk1))*dconjg(yup(4))*
1900      -     (dconjg(inpup(idk2,idk1))*yup(19)*yup(24) + 
1901      -     dconjg(inpup(idq0,idk1))*yup(10)*(yup(23)+yup(24))))- 
1902      -     dconjg(inpup(idq0,idk2))**2*dconjg(yup(13))*
1903      -     yup(9)*(dconjg(yup(36)) + yup(42))))/xup(1)
1904           bfun(3,ii,kk)=(4*pmomup(5,idb1)*pmomup(5,idc1)*
1905      -     (dconjg(inpup(idq0,idk2))*yup(1)*yup(19)*
1906      -     (-(dconjg(inpup(idc1,idq0))*yup(20)) + 
1907      -     dconjg(inpup(idq0,idc2))*yup(23)) +yup(31)* 
1908      -     (dconjg(inpup(idc1,idq0))*dconjg(inpup(idk2,idk1))
1909      -     *yup(19)*yup(20) +dconjg(inpup(idq0,idk1))*yup(16)*
1910      -     (-(dconjg(inpup(idb1,idq0))*yup(32)) - 
1911      -     dconjg(inpup(idb2,idq0))*yup(42)))))/xup(1)
1912           bfun(4,ii,kk)=(-4*pmomup(5,idb1)*pmomup(5,idc1)*
1913      -     (dconjg(inpup(idq0,idk2))*yup(9)*yup(19)*
1914      -     (-(dconjg(inpup(idc1,idq0))*yup(20)) + 
1915      -     dconjg(inpup(idq0,idc2))*yup(23)) - 
1916      -     dconjg(inpup(idq0,idk1))*dconjg(yup(4))*
1917      -     (dconjg(inpup(idk2,idk1))*yup(19)*yup(23) + 
1918      -     dconjg(inpup(idq0,idk1))*yup(16)*
1919      -     (yup(23) + yup(24)))))/xup(1)
1920           bfun(5,ii,kk)=(2*dconjg(inpup(idq0,idk1))*
1921      -     dconjg(inpup(idq0,idk2))*pmomup(5,idb1)*
1922      -     pmomup(5,idc1)*(yup(27) + yup(28))*
1923      -     (yup(29) + yup(30)))/xup(1)
1924           bfun(8,ii,kk)=(4*pmomup(5,idb1)*pmomup(5,idc1)*
1925      -     (dconjg(inpup(idq0,idk2))*dconjg(yup(14))*
1926      -     (-(dconjg(inpup(idq0,idk2))*yup(9)) + 
1927      -     dconjg(inpup(idq0,idk1))*yup(12)) + 
1928      -     dconjg(inpup(idq0,idk1))**2*dconjg(yup(4))*
1929      -     (yup(12) - yup(18)))*(yup(23) + yup(24)))/xup(1)
1930           bfun(9,ii,kk)=0.0d0
1931 c...helicity(61)=(-,+,-,+,-,-)

1932         do mm=1,9
1933            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
1934      &     dconjg(bfun(mm,ii,kk))
1935         end do
1936           end if
1937 
1938 c***********************************************************

1939           if(iqqbar.eq.1) then
1940         bfun(1,ii,kk)=4*dconjg(inpup(idq0,idk1))*pmomup(5,idb1)*
1941      -     pmomup(5,idc1)*(dconjg(inpup(idq0,idk1))*inpup(idk2,idk1)*
1942      -     (dconjg(inpup(idq0,idc2))*yup(24)-dconjg(inpup(idc1,idq0)) 
1943      -     *yup(39)) +dconjg(yup(10))*(dconjg(inpup(idq0,idc2))*
1944      -     yup(24) -dconjg(inpup(idc1,idq0))*yup(39) - 
1945      -     dconjg(inpup(idb2,idq0))*(dconjg(yup(36)) + yup(42))))
1946         bfun(2,ii,kk)=4*dconjg(inpup(idq0,idk1))*pmomup(5,idb1)*
1947      -     pmomup(5,idc1)*(-(dconjg(inpup(idq0,idk1))*inpup(idk2,idk1)*
1948      -     (-(dconjg(inpup(idc1,idq0))*yup(20))+dconjg(inpup(idq0,idc2))
1949      -     *yup(23))) + dconjg(yup(16))*(dconjg(inpup(idc1,idq0))*
1950      -     yup(20) - dconjg(inpup(idq0,idc2))*yup(23) + 
1951      -     dconjg(inpup(idb1,idq0))*(yup(22) + yup(32))))
1952           bfun(3,ii,kk)=-4*dconjg(inpup(idq0,idk1))*pmomup(5,idb1)*
1953      -     pmomup(5,idc1)*(-(dconjg(inpup(idq0,idk1))*(-(dconjg(yup(1))*
1954      -     (dconjg(yup(10)) + dconjg(yup(16)))) +dconjg(yup(2))*
1955      -     (dconjg(yup(11))+dconjg(yup(18)))))-dconjg(inpup(idb1,idq0))*
1956      -     (dconjg(yup(11)) + dconjg(yup(18)))*(yup(21) + yup(26)) + 
1957      -     dconjg(inpup(idc1,idq0))*(dconjg(yup(10)) + 
1958      -     dconjg(yup(16)))*yup(40) + dconjg(yup(16))*
1959      -     (dconjg(inpup(idq0,idc2))*yup(33) -dconjg(inpup(idc1,idq0))* 
1960      -     yup(40)) - dconjg(yup(11))*(-(dconjg(inpup(idb1,idq0))*
1961      -     yup(26)) - dconjg(inpup(idb2,idq0))*yup(41)) + 
1962      -     dconjg(inpup(idc1,idq0))*(dconjg(yup(10)) + 
1963      -     dconjg(yup(16)))*yup(79))
1964           bfun(4,ii,kk)=-4*dconjg(inpup(idq0,idk1))*
1965      -    (dconjg(yup(11)) + dconjg(yup(18)))*pmomup(5,idb1)*
1966      -    pmomup(5,idc1)*(-(dconjg(inpup(idb2,idq0))*dconjg(yup(61)))+ 
1967      -    dconjg(inpup(idq0,idk1))*(dconjg(yup(2)) + yup(25)) - 
1968      -    dconjg(inpup(idb1,idq0))*yup(75))
1969 c...helicity(61)=(-,+,-,+,-,-)

1970         do mm=1,4
1971              bfun(mm,ii,kk+16)=dconjg(bfun(mm,ii,kk))
1972         end do
1973           end if
1974 
1975 c...helicity(46)=(+,-,+,-,+,-)

1976         kk=46
1977         if(iqqbar.eq.0) then
1978           bfun(1,ii,kk)=(-4*dconjg(inpup(idq0,idk1))*dconjg(yup(10))*
1979      -     pmomup(5,idb1)*pmomup(5,idc1)*yup(31)*
1980      -    (-(dconjg(inpup(idb1,idq0))*yup(32))-dconjg(inpup(idc1,idq0))
1981      -     *yup(40) -dconjg(inpup(idb2,idq0))*yup(42)))/dconjg(yup(8))
1982         bfun(2,ii,kk)=(-4*dconjg(inpup(idq0,idk1))**2*dconjg(yup(4))*
1983      -     dconjg(yup(10))*pmomup(5,idb1)*pmomup(5,idc1)*
1984      -     (yup(23) + yup(24) - yup(33)))/dconjg(yup(8))
1985           bfun(3,ii,kk)=(4*dconjg(inpup(idq0,idk1))*dconjg(yup(16))*
1986      -     pmomup(5,idb1)*pmomup(5,idc1)*yup(31)*
1987      -     (-(dconjg(inpup(idq0,idk2))*dconjg(yup(18))) - 
1988      -     dconjg(inpup(idb1,idq0))*yup(32) - 
1989      -     dconjg(inpup(idb2,idq0))*yup(42)))/dconjg(yup(8))
1990           bfun(4,ii,kk)=(-4*dconjg(inpup(idq0,idk1))*dconjg(yup(16))*
1991      -     pmomup(5,idb1)*pmomup(5,idc1)*(-(dconjg(inpup(idq0,idk1))
1992      -     *dconjg(yup(4))*(yup(23)+yup(24)))-dconjg(inpup(idq0,idk2))
1993      -     *dconjg(yup(11))*yup(31)))/dconjg(yup(8))
1994           bfun(5,ii,kk)=0.0d0
1995           bfun(8,ii,kk)=(4*dconjg(inpup(idq0,idk1))**2*dconjg(yup(4))*
1996      -     (dconjg(yup(12)) - dconjg(yup(18)))*pmomup(5,idb1)*
1997      -     pmomup(5,idc1)*(yup(23) + yup(24)))/dconjg(yup(8))
1998           bfun(9,ii,kk)=0.0d0
1999 c...helicity(62)=(-,+,-,+,-,+)

2000         do mm=1,9
2001            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
2002      &     dconjg(bfun(mm,ii,kk))
2003         end do
2004           end if
2005 
2006 c...helicity(47)=(+,-,+,-,-,+)

2007         kk=47
2008         if(iqqbar.eq.0) then
2009           bfun(1,ii,kk)=(4*dconjg(inpup(idq0,idk2))*dconjg(yup(1))*
2010      -     pmomup(5,idb1)*pmomup(5,idc1)*(dconjg(inpup(idq0,idk1))
2011      -     *dconjg(yup(2))*yup(19) + dconjg(inpup(idq0,idk2))*
2012      -     dconjg(yup(13))*(dconjg(yup(36)) + yup(42))))/yup(8)
2013         bfun(2,ii,kk)=(-4*dconjg(inpup(idq0,idk2))**2*dconjg(yup(9))*
2014      -     dconjg(yup(13))*pmomup(5,idb1)*pmomup(5,idc1)*
2015      -     (dconjg(yup(36)) - yup(38) + yup(42)))/yup(8)
2016           bfun(3,ii,kk)=(4*dconjg(inpup(idq0,idk2))*dconjg(yup(1))*
2017      -     pmomup(5,idb1)*pmomup(5,idc1)*yup(19)*
2018      -     (-(dconjg(inpup(idc1,idq0))*yup(20))+dconjg(inpup(idq0,idc2)) 
2019      -     *yup(23) - dconjg(inpup(idq0,idk1))*yup(25)))/yup(8)
2020           bfun(4,ii,kk)=(-4*dconjg(inpup(idq0,idk2))*dconjg(yup(9))*
2021      -     pmomup(5,idb1)*pmomup(5,idc1)*yup(19)*
2022      -     (-(dconjg(inpup(idc1,idq0))*yup(20))-dconjg(inpup(idb1,idq0)) 
2023      -     *yup(21) +dconjg(inpup(idq0,idc2))*yup(23)))/yup(8)
2024           bfun(5,ii,kk)=0.0d0
2025           bfun(8,ii,kk)=(-4*dconjg(inpup(idq0,idk2))**2*dconjg(yup(9))*
2026      -     dconjg(yup(14))*pmomup(5,idb1)*pmomup(5,idc1)*(yup(23) 
2027      -     + yup(24)))/yup(8)
2028           bfun(9,ii,kk)=0.0d0
2029 c...helicity(63)=(-,+,-,+,+,-)

2030         do mm=1,9
2031            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
2032      &     dconjg(bfun(mm,ii,kk))
2033         end do
2034           end if
2035 
2036 c...helicity(48)=(+,-,+,-,-,-)

2037         kk=48
2038         if(iqqbar.eq.0) then
2039           bfun(1,ii,kk)=0.0d0
2040         bfun(2,ii,kk)=0.0d0
2041           bfun(3,ii,kk)=0.0d0
2042           bfun(4,ii,kk)=0.0d0
2043           bfun(5,ii,kk)=0.0d0
2044           bfun(8,ii,kk)=0.0d0
2045           bfun(9,ii,kk)=0.0d0
2046 c...helicity(64)=(-,+,-,+,+,+)

2047         do mm=1,9
2048            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
2049      &     dconjg(bfun(mm,ii,kk))
2050         end do
2051           end if
2052 
2053 c******************************************************

2054           if(iqqbar.eq.1) then
2055         bfun(1,ii,kk)=4*dconjg(inpup(idq0,idk2))*pmomup(5,idb1)*
2056      -     pmomup(5,idc1)*(-(dconjg(inpup(idq0,idk2))*
2057      -     inpup(idk2,idk1)*(dconjg(inpup(idq0,idc2))*yup(24) - 
2058      -     dconjg(inpup(idc1,idq0))*yup(39))) + 
2059      -     yup(25)*(dconjg(inpup(idq0,idc2))*yup(24) - 
2060      -     dconjg(inpup(idc1,idq0))*yup(39)-dconjg(inpup(idb2,idq0))*
2061      -     (dconjg(yup(36)) + yup(42))))
2062         bfun(2,ii,kk)=4*dconjg(inpup(idq0,idk2))*pmomup(5,idb1)*
2063      -     pmomup(5,idc1)*(dconjg(inpup(idq0,idk2))*inpup(idk2,idk1)*
2064      -     (-(dconjg(inpup(idc1,idq0))*yup(20))+dconjg(inpup(idq0,idc2))
2065      -     *yup(23)) +dconjg(yup(2))*(dconjg(inpup(idc1,idq0))*yup(20) - 
2066      -     dconjg(inpup(idq0,idc2))*yup(23) + 
2067      -     dconjg(inpup(idb1,idq0))*(yup(22) + yup(32))))
2068           bfun(3,ii,kk)=-4*dconjg(inpup(idq0,idk2))*pmomup(5,idb1)*
2069      -     pmomup(5,idc1)*(-(dconjg(inpup(idq0,idk2))*(dconjg(yup(1)) 
2070      -     + dconjg(yup(9)))*dconjg(yup(16))) +dconjg(inpup(idb1,idq0)) 
2071      -     *dconjg(yup(1))*yup(21) - dconjg(inpup(idb1,idq0))*
2072      -     (dconjg(yup(1)) + dconjg(yup(9)))* (yup(21) + yup(26)) + 
2073      -     dconjg(inpup(idb2,idq0))*dconjg(yup(1))*yup(38) + 
2074      -     (dconjg(yup(2)) + yup(25))*(dconjg(inpup(idq0,idk2))*
2075      -     dconjg(yup(11)) + dconjg(inpup(idc1,idq0))*yup(40)) + 
2076      -     (-(dconjg(inpup(idc1,idq0))*dconjg(yup(2))) + 
2077      -     dconjg(inpup(idc1,idq0))*(dconjg(yup(2)) + yup(25)))
2078      -     *yup(79) + dconjg(inpup(idq0,idc2))*dconjg(yup(2))*yup(80))
2079           bfun(4,ii,kk)=-4*dconjg(inpup(idq0,idk2))*pmomup(5,idb1)*
2080      -     pmomup(5,idc1)*(-((dconjg(yup(1)) + dconjg(yup(9)))*
2081      -     (-(dconjg(inpup(idb1,idq0))*yup(21)) - 
2082      -     dconjg(inpup(idb2,idq0))*yup(38))) + 
2083      -     (dconjg(yup(2)) + yup(25))*(dconjg(inpup(idq0,idc2))*
2084      -     (yup(23) + yup(24)) - dconjg(inpup(idc1,idq0))*(yup(20)
2085      -      + yup(39))))
2086 c...helicity(64)=(-,+,-,+,+,+)

2087         do mm=1,4
2088              bfun(mm,ii,kk+16)=dconjg(bfun(mm,ii,kk))
2089         end do
2090           end if
2091 
2092 1211  continue
2093         end
2094 
2095 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

2096 c            nine basic functions from first by k1 <-> k2.           c

2097 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

2098         subroutine bsecond
2099         implicit double precision (a-h,o-z)
2100         implicit integer (i-n)
2101         double complex bfun,colmat,yup,xup,inpup,bundamp
2102       common/upcom/ecm,pmbc,pmb,pmc,fbcc,pmomup(5,8),
2103      &  colmat(10,64),bundamp(4),pmomzero(5,8)
2104       common/tryup/bfun(9,4,64),yup(100),xup(2),idp,idq0,idk1,idk2,
2105      &  idb1,idb2,idc1,idc2
2106       common/counter/ibcstate,nev
2107 c...for transform the subprocess information, i.e.,  whether using

2108 c...the subprocess q\bar{q}->bc+b+\bar{c} to generate events.

2109       common/qqbar/iqqbar,iqcode
2110 
2111          ii=2
2112 
2113 c...if (l5.ne.l6) then

2114 c...hel(i,2)(l1,l2,l3,l4,l5,l6)=hel(i,1)(l1,l2,l3,l4,-l5,-l6)

2115 c...(k_1<->k_2), where l1,...,l6 are helicities of q_b1,q_b2,

2116 c...q_c1,q_c2,k_1,k_2;

2117 c...if (l5.eq.l6) then

2118 c...hel(i,2)(l1,l2,l3,l4,l5,l6)=hel(i,1)(l1,l2,l3,l4,l5,l6)(k_1<->k_2)

2119 
2120 c...helicity(1,2)=(+,+,+,+,+,+)(k_1,k_2)=helicity(1,1)(k_2,k_1)

2121         kk=1
2122         bfun(1,ii,kk)=(4*yup(1)*(dotup(idb1,idb1)*((yup(11) - yup(12))
2123      -     *yup(19)*yup(27) +yup(10)*(-(dconjg(yup(5))*yup(5)) + 
2124      -     dconjg(yup(34))*yup(34))) + yup(10)*((-(dconjg(yup(24))*
2125      -     dconjg(yup(34))) +dconjg(yup(5))*yup(2))*yup(20) + 
2126      -     dconjg(yup(35))*dotup(idc1,idc1)*yup(35))))/xup(1)
2127         bfun(2,ii,kk)=(-4*(dotup(idb1,idb1)*yup(9)*(yup(11)*yup(19)*
2128      -     yup(27) + dconjg(yup(34))*yup(10)*yup(34)) +yup(10)* 
2129      -     (-(dconjg(yup(24))*dconjg(yup(34))*yup(9)*yup(20)) + 
2130      -     dotup(idc1,idc1)*(yup(2)*yup(29)*yup(31) + 
2131      -     dconjg(yup(35))*yup(9)*yup(35)))))/xup(1)
2132           bfun(3,ii,kk)=(4*yup(1)*yup(16)*((dconjg(yup(24))*
2133      -     dconjg(yup(34))+dconjg(yup(5))*(-yup(2)+yup(7)))*yup(20) + 
2134      -     dconjg(yup(17))*(dotup(idc1,idc1)*yup(17)-yup(11)*yup(32))+ 
2135      -     dotup(idb1,idb1)*(dconjg(yup(5))*yup(5) -dconjg(yup(34)) 
2136      -     *yup(34))-dconjg(yup(35))*dotup(idc1,idc1)*yup(35)))/xup(1)
2137           bfun(4,ii,kk)=(4*yup(16)*(yup(9)*(dconjg(yup(17))*yup(11)*
2138      -     yup(32) + dconjg(yup(34))*(-(dconjg(yup(24))*yup(20)) + 
2139      -     dotup(idb1,idb1)*yup(34))) +dotup(idc1,idc1)*((yup(2) -
2140      -     yup(7))*yup(29)*yup(31) +yup(9)*(-(dconjg(yup(17))*yup(17))+ 
2141      -     dconjg(yup(35))*yup(35)))))/xup(1)
2142           bfun(5,ii,kk)=(2*yup(1)*yup(16)*yup(27)*yup(29))/xup(1)
2143           bfun(8,ii,kk)=(-4*dotup(idc1,idc1)*yup(29)*(yup(9)*yup(16)*
2144      -     yup(19)+(yup(7)*yup(16) + yup(2)*(-yup(12) + yup(18)))*
2145      -     yup(31)) +4*dconjg(yup(34))*yup(9)*(yup(12) - yup(18))*
2146      -     (-(dconjg(yup(24))*yup(20)) +dotup(idb1,idb1)*yup(34))+ 
2147      -     4*dconjg(yup(35))*(dotup(idc1,idc1)*yup(9)*(yup(12)-yup(18))*
2148      -     yup(35) + 2*dconjg(inpup(idk2,idk1))*dotup(idc1,idk1)*
2149      -     inpup(idq0,idb1)*yup(27)*yup(36)))/xup(1)
2150           bfun(9,ii,kk)=0.0d0
2151 c...helicity(17,2)=(-,-,-,-,-,-)

2152         do mm=1,9
2153            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
2154      &     dconjg(bfun(mm,ii,kk))
2155         end do
2156 
2157 c...helicity(2,2)=m(+,+,+,+,+,-)=helicity(3,1)(k_2,k_1)

2158         kk=2
2159         bfun(1,ii,kk)=(4*(dconjg(yup(1))*(dotup(idb1,idb1)*yup(11)*
2160      -     yup(19)*yup(27)+dconjg(yup(34))*yup(10)*(-(dconjg(yup(24))
2161      -     *yup(20)) + dotup(idb1,idb1)*yup(34))) +dotup(idc1,idc1)*
2162      -     (dconjg(yup(8))*dotup(idb1,idb1)*yup(19)*yup(31) + yup(10)*
2163      -     (yup(25)*yup(30)*yup(31) + dconjg(yup(1))*dconjg(yup(35))
2164      -     *yup(35)))))/yup(8)
2165         bfun(2,ii,kk)=(-4*dconjg(yup(9))*(dotup(idb1,idb1)*(yup(4)
2166      -     *(dconjg(yup(8))*dconjg(yup(33))-dconjg(yup(4))*yup(10))+ 
2167      -     yup(11)*yup(19)*yup(27) +dconjg(yup(34))*yup(10)*yup(34))+ 
2168      -     yup(10)*(dconjg(yup(24))*(-(dconjg(yup(34))*yup(20))+yup(4) 
2169      -     *yup(25))+dconjg(yup(35))*dotup(idc1,idc1)*yup(35))))/yup(8)
2170           bfun(3,ii,kk)=(-4*yup(16)*(dconjg(yup(1))*(dconjg(yup(17))*
2171      -     yup(11)*yup(32)+dconjg(yup(34))*(-(dconjg(yup(24))*yup(20))+ 
2172      -     dotup(idb1,idb1)*yup(34))) +dotup(idc1,idc1)*(yup(25)*
2173      -     (-yup(19)+yup(30))*yup(31)+dconjg(yup(1))*(-(dconjg(yup(17))
2174      -     *yup(17))+dconjg(yup(35))*yup(35)))))/yup(8)
2175           bfun(4,ii,kk)=(4*dconjg(yup(9))*yup(16)*(-(yup(4)*
2176      -     (dconjg(yup(4))*dotup(idb1,idb1) + (-dconjg(yup(24)) +
2177      -     dconjg(yup(33)))*yup(25))) +dconjg(yup(17))*
2178      -     (-(dotup(idc1,idc1)*yup(17)) + yup(11)*yup(32))
2179      -     + dconjg(yup(34))*(-(dconjg(yup(24))*yup(20)) + 
2180      -     dotup(idb1,idb1)*yup(34)) + dconjg(yup(35))*dotup(idc1,idc1)
2181      -     *yup(35)))/yup(8)
2182           bfun(5,ii,kk)=(2*dconjg(yup(9))*yup(16)*yup(28)*yup(29))/yup(8)
2183           bfun(8,ii,kk)=(4*dconjg(yup(9))*(dconjg(yup(24))*((yup(12)
2184      -     - yup(18))*(-(dconjg(yup(34))*yup(20)) +yup(4)*yup(25)) + 
2185      -     2*dotup(idc1,idk1)*yup(14)*yup(29))+dotup(idb1,idb1)*(yup(12) 
2186      -     -yup(18))*(-(dconjg(yup(4))*yup(4))+dconjg(yup(34))*yup(34))+ 
2187      -     dotup(idc1,idc1)*(-(yup(16)*yup(19)*yup(29)) +dconjg(yup(35)) 
2188      -     *(yup(12) - yup(18))*yup(35))))/yup(8)
2189           bfun(9,ii,kk)=(4*dconjg(yup(5))*yup(11)*yup(20)*yup(30))/yup(8)
2190 c...helicity(18,2)=m(-,-,-,-,-,+)

2191         do mm=1,9
2192            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
2193      &     dconjg(bfun(mm,ii,kk))
2194         end do
2195 
2196 c...helicity(3,2)=(+,+,+,+,-,+)=helicity(2,1)(k_2,k_1)

2197         kk=3
2198         bfun(1,ii,kk)=(4*dconjg(yup(10))*yup(1)*((-(dconjg(yup(24))
2199      -     *dconjg(yup(34))) +dconjg(yup(5))*yup(2))*yup(20) + 
2200      -     dotup(idb1,idb1)*(-(dconjg(yup(5))*yup(5))+dconjg(yup(34)) 
2201      -     *yup(34)) + dotup(idc1,idc1)*(-(dconjg(yup(13))*yup(13)) + 
2202      -     dconjg(yup(35))*yup(35)) + dconjg(yup(18))*yup(13)*
2203      -     (-dconjg(yup(38)) + yup(36))))/dconjg(yup(8))
2204         bfun(2,ii,kk)=(-4*dconjg(yup(10))*(dotup(idc1,idc1)*
2205      -     (yup(2)*(-yup(19)+yup(29))*yup(31)+yup(9)*(-(dconjg(yup(13)) 
2206      -     *yup(13))+dconjg(yup(35))*yup(35)))+yup(9)*(dconjg(yup(34))*
2207      -     (-(dconjg(yup(24))*yup(20)) +dotup(idb1,idb1)*yup(34)) + 
2208      -     dconjg(yup(18))*yup(13)*yup(36))))/dconjg(yup(8))
2209           bfun(3,ii,kk)=(-4*yup(1)*(dotup(idb1,idb1)*(dconjg(yup(18))
2210      -     *yup(19)*(yup(28) - yup(31)) + dconjg(yup(16))*
2211      -     (-(dconjg(yup(5))*yup(5)) + dconjg(yup(34))*yup(34))) + 
2212      -     dconjg(yup(16))*((-(dconjg(yup(24))*dconjg(yup(34))) + 
2213      -     dconjg(yup(5))*yup(2))*yup(20) + dconjg(yup(35))* 
2214      -     dotup(idc1,idc1)*yup(35))))/dconjg(yup(8))
2215           bfun(4,ii,kk)=(4*(dotup(idb1,idb1)*(dotup(idc1,idc1)
2216      -     *yup(8)*yup(19)*yup(31)+yup(9)*(dconjg(yup(18))*yup(19)
2217      -     *yup(28) +dconjg(yup(16))*dconjg(yup(34))*yup(34)))
2218      -     +dconjg(yup(16))*(-(dconjg(yup(24))*dconjg(yup(34))*yup(9)*
2219      -     yup(20)) +dotup(idc1,idc1)*(yup(2)*yup(29)*yup(31) + 
2220      -     dconjg(yup(35))*yup(9)*yup(35)))))/dconjg(yup(8))
2221           bfun(5,ii,kk)=(2*dconjg(yup(10))*yup(1)*yup(27)*yup(30))/
2222      -   dconjg(yup(8))
2223           bfun(8,ii,kk)=(4*((-(dconjg(yup(10))*dconjg(yup(24))) + 
2224      -     dconjg(yup(14))*dotup(idb1,idb1))*(dconjg(yup(18))*yup(9)
2225      -     *yup(14)+2*dotup(idc1,idk1)*yup(4)*yup(27))+(dconjg(yup(12)) 
2226      -     - dconjg(yup(18)))*dconjg(yup(34))*yup(9)*(-(dconjg(yup(24))
2227      -     *yup(20)) +dotup(idb1,idb1)*yup(34)) +dotup(idc1,idc1)*
2228      -     (2*dconjg(yup(35))*dotup(idc1,idk1)*yup(8)*yup(35) + 
2229      -     (dconjg(yup(12))-dconjg(yup(18)))*(yup(2)*yup(29)*yup(31)+ 
2230      -     dconjg(yup(35))*yup(9)*yup(35)))))/dconjg(yup(8))
2231           bfun(9,ii,kk)=(4*dconjg(yup(15))*(dotup(idb1,idb1)*yup(5)
2232      -     -yup(2)*yup(20))*yup(28)+4*dconjg(yup(35))*dotup(idc1,idc1)*
2233      -     yup(8)*yup(35))/dconjg(yup(8))
2234 c...helicity(19,2)=(-,-,-,-,+,-)

2235         do mm=1,9
2236            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
2237      &     dconjg(bfun(mm,ii,kk))
2238         end do
2239 
2240 c...helicity(4,2)=(+,+,+,+,-,-)=helicity(4,1)(k_2,k_1)

2241         kk=4
2242         bfun(1,ii,kk)=(4*dconjg(yup(10))*(dotup(idc1,idc1)*
2243      -     ((dconjg(yup(3))*dconjg(yup(12)) - dconjg(yup(1))
2244      -     *dconjg(yup(13)))*yup(13)+yup(25)*yup(30)*yup(31)+ 
2245      -     dconjg(yup(1))*dconjg(yup(35))*yup(35)) +dconjg(yup(1))*
2246      -     (dconjg(yup(34))*(-(dconjg(yup(24))*yup(20)) + 
2247      -     dotup(idb1,idb1)*yup(34)) +dconjg(yup(18))*yup(13) 
2248      -     *yup(36))))/xup(2)
2249         bfun(2,ii,kk)=(4*dconjg(yup(9))*dconjg(yup(10))*(dconjg(yup(24))
2250      -     *(dconjg(yup(34))*yup(20)+yup(4)*(dconjg(yup(7))-yup(25)))+ 
2251      -     dotup(idb1,idb1)*(dconjg(yup(4))*yup(4) - dconjg(yup(34))
2252      -     *yup(34)) + dotup(idc1,idc1)*(dconjg(yup(13))*yup(13) - 
2253      -     dconjg(yup(35))*yup(35)) - dconjg(yup(18))*yup(13)
2254      -     *yup(36)))/xup(2)
2255           bfun(3,ii,kk)=(-4*(dconjg(yup(1))*dconjg(yup(18))*
2256      -     dotup(idb1,idb1)*yup(19)*yup(28) +dconjg(yup(16))*
2257      -     (dconjg(yup(1))*dconjg(yup(34))*(-(dconjg(yup(24))
2258      -     *yup(20)) +dotup(idb1,idb1)*yup(34)) +dotup(idc1,idc1)*
2259      -     (yup(25)*yup(30)*yup(31) + dconjg(yup(1))*dconjg(yup(35))
2260      -     *yup(35)))))/xup(2)
2261           bfun(4,ii,kk)=(4*dconjg(yup(9))*(dotup(idb1,idb1)*
2262      -     ((dconjg(yup(7))*dconjg(yup(14)) - dconjg(yup(4))
2263      -     *dconjg(yup(16)))*yup(4) +dconjg(yup(18))*yup(19)*yup(28)+ 
2264      -     dconjg(yup(16))*dconjg(yup(34))*yup(34)) +dconjg(yup(16))*
2265      -     (dconjg(yup(24))*(-(dconjg(yup(34))*yup(20))+yup(4)*yup(25))+ 
2266      -     dconjg(yup(35))*dotup(idc1,idc1)*yup(35))))/xup(2)
2267         bfun(5,ii,kk)=(2*dconjg(yup(9))*dconjg(yup(10))*yup(28)*yup(30))
2268      -   /xup(2)
2269           bfun(8,ii,kk)=(4*dconjg(yup(9))*(dconjg(yup(12))-
2270      -     dconjg(yup(18)))*(dconjg(yup(24))*(dconjg(yup(10))
2271      -     *yup(14) -dconjg(yup(34))*yup(20) + yup(4)*yup(25)) - 
2272      -     dotup(idb1,idb1)*(dconjg(yup(4))*yup(4) + dconjg(yup(14))
2273      -     *yup(14) -dconjg(yup(34))*yup(34)) +dconjg(yup(35))* 
2274      -     dotup(idc1,idc1)*yup(35)))/xup(2)
2275         bfun(9,ii,kk)=(-4*dconjg(inpup(idb2,idq0))*dconjg(yup(35))*
2276      -    inpup(idk1,idk2)*yup(28)*yup(32))/xup(2)
2277 c...helicity(20,2)=(-,-,-,-,+,+)

2278         do mm=1,9
2279            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
2280      &     dconjg(bfun(mm,ii,kk))
2281         end do
2282 
2283 c...helicity(5,2)=(+,+,+,-,+,+)=helicity(5,1)(k_2,k_1)

2284         kk=5
2285         bfun(1,ii,kk)=(4*pmomup(5,idc1)*(dotup(idb1,idb1)*
2286      -     (-(yup(1)*(dconjg(inpup(idq0,idc2))*yup(14) - 
2287      -     dconjg(inpup(idc1,idq0))*yup(15))*yup(19)) - 
2288      -     (dconjg(inpup(idc1,idq0))*yup(5)*yup(10) - 
2289      -     dconjg(inpup(idk2,idk1))*yup(19)*yup(27))*yup(31)) - 
2290      -     dconjg(yup(35))*yup(10)*(dconjg(inpup(idb2,idk1))
2291      -     *yup(31)*yup(32) + dconjg(inpup(idb2,idq0))*yup(1)*
2292      -     (yup(22) + yup(32)))))/xup(1)
2293         bfun(2,ii,kk)=(4*pmomup(5,idc1)*(dotup(idb1,idb1)*
2294      -     (yup(9)*(dconjg(inpup(idq0,idc2))*yup(14) - 
2295      -     dconjg(inpup(idc1,idq0))*yup(15))*yup(19)+dconjg(yup(4))
2296      -     *yup(4)*(-(dconjg(inpup(idq0,idk1))*yup(10)) - 
2297      -     dconjg(inpup(idk2,idk1))*yup(19)))+dconjg(yup(35))*yup(10)*
2298      -     (dconjg(inpup(idb2,idk1))*yup(22)*yup(31) + 
2299      -     dconjg(inpup(idb2,idq0))*yup(9)*(yup(22)+yup(32)))))/xup(1)
2300           bfun(3,ii,kk)=(4*pmomup(5,idc1)*yup(16)*
2301      -     (dconjg(inpup(idc1,idq0))*dotup(idb1,idb1)*yup(5)*
2302      -     yup(31)+ dconjg(yup(35))*(dconjg(inpup(idb2,idk1))*yup(31)
2303      -     *yup(32) +dconjg(inpup(idb2,idq0))*yup(1)*(yup(22) +
2304      -     yup(32))) +dconjg(yup(17))*(-(dconjg(inpup(idk2,idk1))
2305      -     *yup(31)*yup(32)) +dconjg(inpup(idq0,idk2))*yup(1)*
2306      -     (yup(22) + yup(32)))))/xup(1)
2307           bfun(4,ii,kk)=(-4*pmomup(5,idc1)*yup(16)*
2308      -     (-(dconjg(inpup(idq0,idk1))*dconjg(yup(4))*dotup(idb1,idb1)
2309      -     *yup(4)) +dconjg(yup(35))*(dconjg(inpup(idb2,idk1))
2310      -     *yup(22)*yup(31) +dconjg(inpup(idb2,idq0))*yup(9)*(yup(22)+
2311      -     yup(32))) +dconjg(yup(17))*(-(dconjg(inpup(idk2,idk1))
2312      -     *yup(22)*yup(31)) +dconjg(inpup(idq0,idk2))*yup(9)*
2313      -     (yup(22) + yup(32)))))/xup(1)
2314         bfun(5,ii,kk)=(2*dconjg(inpup(idk1,idq0))*pmomup(5,idc1)*yup(16)
2315      -    *(yup(27) + yup(28))*yup(29))/xup(1)
2316           bfun(8,ii,kk)=(4*pmomup(5,idc1)*(-(dconjg(inpup(idq0,idk2))
2317      -     *dconjg(yup(14))*yup(9)*(dotup(idb1,idb1)*yup(14) - yup(16)
2318      -     *yup(23))) -dconjg(inpup(idq0,idk1))*(-(dconjg(yup(4))
2319      -     *dotup(idb1,idb1)*yup(4)*(yup(12)-yup(18)))-dconjg(yup(14)) 
2320      -     *yup(12)*(dotup(idb1,idb1)*yup(14) - yup(16)*yup(23)))-
2321      -     dconjg(yup(35))*((yup(12)-yup(18))*(dconjg(inpup(idb2,idk1))
2322      -     *yup(22)*yup(31)+dconjg(inpup(idb2,idq0))*yup(9)*(yup(22) +
2323      -     yup(32))) +2*dconjg(inpup(idk2,idk1))*dotup(idc1,idk1)*
2324      -     yup(27)*yup(35))))/xup(1)
2325           bfun(9,ii,kk)=(4*dconjg(inpup(idk2,idk1))*dconjg(yup(35))*
2326      -    pmomup(5,idc1)*yup(28)*yup(35))/xup(1)
2327 c...helicity(21,2)=(-,-,-,+,-,-)

2328         do mm=1,9
2329            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
2330      &     -dconjg(bfun(mm,ii,kk))
2331         end do
2332 
2333 c...helicity(6,2)=(+,+,+,-,+,-)=helicity(7,1)(k_2,k_1)

2334         kk=6
2335         bfun(1,ii,kk)=(4*dconjg(yup(1))*pmomup(5,idc1)*
2336      -     (-(dotup(idb1,idb1)*(-(dconjg(inpup(idq0,idk1))*
2337      -     dconjg(yup(8))) +dconjg(inpup(idq0,idc2))*yup(14) - 
2338      -     dconjg(inpup(idc1,idq0))*yup(15))*yup(19))+ yup(10)*
2339      -     (dconjg(inpup(idq0,idk1))*yup(25)*yup(30) - 
2340      -     dconjg(inpup(idb2,idq0))*dconjg(yup(35))*
2341      -     (yup(22) + yup(32)))))/yup(8)
2342         bfun(2,ii,kk)=(4*dconjg(yup(9))*pmomup(5,idc1)*(dotup(idb1,idb1)
2343      -     *yup(19)*(dconjg(inpup(idq0,idc2))*yup(14) - 
2344      -     dconjg(inpup(idc1,idq0))*yup(15)-dconjg(inpup(idq0,idk2)) 
2345      -     *yup(31)) + dconjg(inpup(idb2,idq0))*dconjg(yup(35))*
2346      -     yup(10)*(-yup(21) + yup(22) + yup(32))))/yup(8)
2347           bfun(3,ii,kk)=(4*dconjg(yup(1))*pmomup(5,idc1)*yup(16)*
2348      -     (dconjg(inpup(idq0,idk1))*yup(25)*(yup(19) - yup(30)) + 
2349      -     (dconjg(inpup(idq0,idk2))*dconjg(yup(17)) + 
2350      -     dconjg(inpup(idb2,idq0))*dconjg(yup(35)))*
2351      -     (yup(22) + yup(32))))/yup(8)
2352           bfun(4,ii,kk)=(4*dconjg(yup(9))*(dconjg(inpup(idq0,idk2))
2353      -     *dconjg(yup(17))+dconjg(inpup(idb2,idq0))*dconjg(yup(35)))*
2354      -     pmomup(5,idc1)*yup(16)*(yup(21) - yup(22) - yup(32)))/yup(8)
2355           bfun(5,ii,kk)=0.0d0
2356           bfun(8,ii,kk)=(4*dconjg(yup(9))*pmomup(5,idc1)*
2357      -     (-(dconjg(inpup(idq0,idk2))*dconjg(yup(14))*(dotup(idb1,idb1)
2358      -     *yup(14) - yup(16)*yup(23)))+ dconjg(inpup(idb2,idq0))
2359      -     *dconjg(yup(35))*(-2*dotup(idc1,idk1)*yup(17)+(yup(12)-
2360      -     yup(18))*(yup(21)- yup(22) - yup(32)))))/yup(8)
2361           bfun(9,ii,kk)=(4*dconjg(inpup(idk2,idq0))*pmomup(5,idc1)*
2362      -     (dconjg(yup(5))*yup(20) + yup(25)*yup(28))*yup(30))/yup(8)
2363 c...helicity(22,2)=(-,-,-,+,-,+)

2364         do mm=1,9
2365            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
2366      &     -dconjg(bfun(mm,ii,kk))
2367         end do
2368 
2369 c...helicity(7,2)=(+,+,+,-,-,+)=helicity(6,1)(k_2,k_1)

2370         kk=7
2371         bfun(1,ii,kk)=(-4*dconjg(yup(10))*pmomup(5,idc1)*
2372      -     (dconjg(inpup(idb2,idq0))*yup(1)*(-((dconjg(yup(11))
2373      -     + dconjg(yup(18)))*yup(13)) +dconjg(yup(35))*(yup(22) 
2374      -     + yup(32))) +yup(31)*(dconjg(inpup(idc1,idq0))*
2375      -     dotup(idb1,idb1)*yup(5) +dconjg(inpup(idb2,idk1))*
2376      -     (-(dconjg(yup(18))*yup(13)) +dconjg(yup(35))*yup(32) 
2377      -     ))))/dconjg(yup(8))
2378         bfun(2,ii,kk)=(4*dconjg(yup(10))*pmomup(5,idc1)*
2379      -     (-(dconjg(inpup(idq0,idk1))*dconjg(yup(4))*dotup(idb1,idb1)
2380      -     *yup(4)) +dconjg(inpup(idb2,idk1))*(-(dconjg(yup(11))
2381      -     *yup(13)) +dconjg(yup(35))*yup(22))*yup(31) + 
2382      -     dconjg(inpup(idb2,idq0))*yup(9)*(-((dconjg(yup(11)) +
2383      -     dconjg(yup(18)))*yup(13)) + dconjg(yup(35))*(yup(22) + 
2384      -     yup(32)))))/dconjg(yup(8))
2385           bfun(3,ii,kk)=(4*pmomup(5,idc1)*(dotup(idb1,idb1)*
2386      -     (dconjg(inpup(idc1,idq0))*dconjg(yup(16))*yup(5) - 
2387      -     dconjg(inpup(idq0,idk1))*dconjg(yup(18))*yup(19))*yup(31)+ 
2388      -     dconjg(yup(16))*dconjg(yup(35))*(dconjg(inpup(idb2,idk1))
2389      -     *yup(31)*yup(32) +dconjg(inpup(idb2,idq0))*yup(1)*
2390      -     (yup(22) + yup(32)))))/dconjg(yup(8))
2391           bfun(4,ii,kk)=(4*pmomup(5,idc1)*(dconjg(inpup(idq0,idk1))
2392      -     *dconjg(yup(11))*dotup(idb1,idb1)*yup(19)*yup(31) - 
2393      -     dconjg(yup(16))*(-(dconjg(inpup(idq0,idk1))*dconjg(yup(4))*
2394      -     dotup(idb1,idb1)*yup(4)) +dconjg(yup(35))*
2395      -     (dconjg(inpup(idb2,idk1))*yup(22)*yup(31) + 
2396      -     dconjg(inpup(idb2,idq0))*yup(9)*(yup(22)+yup(32))))))/
2397      -     dconjg(yup(8))
2398           bfun(5,ii,kk)=(2*dconjg(inpup(idk1,idq0))*dconjg(yup(10))*
2399      -     pmomup(5,idc1)*(yup(27) + yup(28))*yup(30))/dconjg(yup(8))
2400           bfun(8,ii,kk)=(4*pmomup(5,idc1)*(-(dconjg(inpup(idq0,idk1))
2401      -     *dconjg(yup(4))*(-dconjg(yup(12)) + dconjg(yup(18)))*
2402      -     dotup(idb1,idb1)*yup(4)) - 2*dotup(idc1,idk1)*
2403      -     (dconjg(inpup(idb2,idq0))*dconjg(yup(35))*yup(8)*yup(22)+ 
2404      -     dconjg(inpup(idq0,idk1))*dconjg(yup(10))*yup(27)*yup(30)) - 
2405      -     dconjg(yup(35))*(dconjg(inpup(idb2,idk1))*(dconjg(yup(12))-
2406      -     dconjg(yup(18)))*yup(22)*yup(31) + dconjg(inpup(idb2,idq0))
2407      -     *yup(9)*(dconjg(yup(12))*(yup(22)+yup(32))-dconjg(yup(18))*
2408      -     (yup(22) - yup(26) + yup(32))))))/dconjg(yup(8))
2409           bfun(9,ii,kk)=(4*dconjg(inpup(idq0,idk1))*dconjg(yup(11))*
2410      -     dconjg(yup(35))*pmomup(5,idc1)*yup(35))/dconjg(yup(8))
2411 c...helicity(23,2)=(-,-,-,+,+,-)

2412         do mm=1,9
2413            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
2414      &     -dconjg(bfun(mm,ii,kk))
2415         end do
2416 
2417 c...helicity(8,2)=(+,+,+,-,-,-)=helicity(8,1)(k_2,k_1)

2418         kk=8
2419         bfun(1,ii,kk)=(-4*dconjg(yup(1))*dconjg(yup(10))*pmomup(5,idc1)*
2420      -     (dconjg(inpup(idb2,idq0))*dconjg(inpup(idq0,idk1))
2421      -     *inpup(idk2,idk1)*yup(13) - dconjg(inpup(idq0,idk1))*yup(25)*
2422      -     yup(30) + dconjg(inpup(idb2,idq0))*(-((dconjg(yup(11)) +
2423      -     dconjg(yup(18)))*yup(13)) +dconjg(yup(35))*(yup(22) 
2424      -     + yup(32)))))/xup(2)
2425         bfun(2,ii,kk)=(-4*dconjg(inpup(idb2,idq0))*dconjg(yup(9))*
2426      -     dconjg(yup(10))*pmomup(5,idc1)*((dconjg(yup(11)) -
2427      -     dconjg(yup(12)) +dconjg(yup(18)))*yup(13) + 
2428      -      dconjg(yup(35))*(yup(21) - yup(22) - yup(32))))/xup(2)
2429           bfun(3,ii,kk)=(4*dconjg(yup(1))*dconjg(yup(16))*pmomup(5,idc1)*
2430      -     (-(dconjg(inpup(idq0,idk1))*yup(25)*yup(30)) + 
2431      -     dconjg(inpup(idb2,idq0))*dconjg(yup(35))*
2432      -     (yup(22) + yup(32))))/xup(2)
2433           bfun(4,ii,kk)=(4*dconjg(inpup(idb2,idq0))*dconjg(yup(9))*
2434      -     dconjg(yup(16))*dconjg(yup(35))*pmomup(5,idc1)*
2435      -     (yup(21) - yup(22) - yup(32)))/xup(2)
2436           bfun(5,ii,kk)=0.0d0
2437           bfun(8,ii,kk)=(4*dconjg(inpup(idb2,idq0))*dconjg(yup(9))*
2438      -     (dconjg(yup(12)) - dconjg(yup(18)))*dconjg(yup(35))
2439      -     *pmomup(5,idc1)*(yup(21)-yup(22)+yup(26)-yup(32)))/xup(2)
2440           bfun(9,ii,kk)=0.0d0
2441 c...helicity(24,2)=(-,-,-,+,+,+)

2442         do mm=1,9
2443            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
2444      &     -dconjg(bfun(mm,ii,kk))
2445         end do
2446 
2447 c...helicity(9,2)=(+,-,-,+,+,+)=helicity(9,1)(k_2,k_1)

2448         kk=9
2449         bfun(1,ii,kk)=(-4*pmomup(5,idb1)*pmomup(5,idc1)*yup(1)*
2450      -     (dconjg(yup(13))*yup(13)*(yup(11)+ yup(18)) +dconjg(yup(8))
2451      -     *yup(7)*yup(30) +yup(10)*(yup(29) + yup(30))*
2452      -     (yup(27) + yup(28) - yup(31))))/xup(1)
2453         bfun(2,ii,kk)=(4*pmomup(5,idb1)*pmomup(5,idc1)*yup(9)*
2454      -     (yup(13)*(dconjg(yup(3))*yup(7) +dconjg(yup(13))*(yup(11) 
2455      -     +yup(18)))+yup(10)*(-(dconjg(yup(3))*yup(3))-dconjg(yup(6)) 
2456      -     *yup(6) +(yup(27) + yup(28))*(yup(29) + yup(30)))))/xup(1)
2457           bfun(3,ii,kk)=(4*pmomup(5,idb1)*pmomup(5,idc1)*yup(1)*
2458      -     (dconjg(yup(6))*yup(7)*yup(17) +yup(11)*yup(19)*yup(29) + 
2459      -     yup(18)*yup(19)*yup(29) +yup(16)*(yup(29) + yup(30))*
2460      -     (yup(27) + yup(28) - yup(31))))/xup(1)
2461           bfun(4,ii,kk)=(4*pmomup(5,idb1)*pmomup(5,idc1)*yup(9)*
2462      -     (-((yup(11) - yup(12) + yup(18))*yup(19)*yup(29)) + 
2463      -     yup(16)*(dconjg(yup(3))*yup(3)- dconjg(inpup(idb1,idq0))
2464      -     *inpup(idq0,idk1)*yup(6) - (yup(27) + yup(28))*(yup(29)
2465      -     + yup(30)))))/xup(1)
2466           bfun(5,ii,kk)=0.0d0
2467           bfun(8,ii,kk)=(4*pmomup(5,idb1)*pmomup(5,idc1)*yup(9)*
2468      -     (yup(12)-yup(18))*(yup(29)+yup(30))*(yup(19)-yup(27)
2469      -     -yup(28)+yup(31)))/xup(1)
2470           bfun(9,ii,kk)=0.0d0
2471 c...helicity(25,2)=(-,+,+,-,-,-)

2472         do mm=1,9
2473            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
2474      &     dconjg(bfun(mm,ii,kk))
2475         end do
2476 
2477 c...helicity(10,2)=(+,-,-,+,+,-)=helicity(11,1)(k_2,k_1)

2478         kk=10
2479         bfun(1,ii,kk)=(4*pmomup(5,idb1)*pmomup(5,idc1)*(-(dconjg(yup(1))
2480      -     *dconjg(yup(13))*yup(13)*(yup(11)+yup(18)))-dconjg(yup(2))*
2481      -     (yup(18)*yup(19) + yup(10)*yup(27))*yup(31) + yup(10)*(
2482      -     -(dconjg(yup(1))*(yup(27) + yup(28))*(yup(29) + yup(30))) - 
2483      -     yup(25)*yup(27)*yup(31))))/yup(8)
2484         bfun(2,ii,kk)=(4*pmomup(5,idb1)*pmomup(5,idc1)*(yup(4)*
2485      -     (-(dconjg(inpup(idc2,idk2))*dconjg(yup(8))*dconjg(yup(13))*
2486      -     inpup(idk1,idb2)) +dconjg(yup(4))*yup(10)*(dconjg(yup(2))
2487      -     + yup(25))) + dconjg(yup(9))*(dconjg(yup(13))*yup(13)
2488      -     *(yup(11) + yup(18)) +yup(10)*(yup(27) + yup(28))*
2489      -     (yup(29) + yup(30)))))/yup(8)
2490           bfun(3,ii,kk)=(4*pmomup(5,idb1)*pmomup(5,idc1)*(dconjg(yup(1))*
2491      -     yup(11)*yup(19)*yup(29) +yup(18)*yup(19)*(dconjg(yup(1))
2492      -     *yup(29)+yup(25)*yup(31))+yup(16)*(dconjg(yup(1))*(yup(27) 
2493      -     + yup(28))*(yup(29) + yup(30)) + dconjg(yup(2))*yup(27)*
2494      -     yup(31) +yup(25)*yup(27)*yup(31))))/yup(8)
2495           bfun(4,ii,kk)=(4*pmomup(5,idb1)*pmomup(5,idc1)*
2496      -     (dconjg(inpup(idc2,idk2))*inpup(idq0,idk1)*yup(4)*yup(19)
2497      -     *yup(25) -dconjg(yup(9))*(yup(11) + yup(18))*yup(19)*
2498      -     yup(29)+yup(16)*(-(dconjg(yup(4))*yup(4)*(dconjg(yup(2))
2499      -     + yup(25))) -dconjg(yup(9))*(yup(27) + yup(28))*
2500      -     (yup(29) + yup(30)))))/yup(8)
2501           bfun(5,ii,kk)=(-2*dconjg(yup(8))*pmomup(5,idb1)*pmomup(5,idc1)*
2502      -     (yup(27) + yup(28))*(yup(29) + yup(30)))/yup(8)
2503           bfun(8,ii,kk)=(-4*pmomup(5,idb1)*pmomup(5,idc1)*(dconjg(yup(4))
2504      -     *yup(4)*(yup(12) - yup(18))*(dconjg(yup(2)) + yup(25)) + 
2505      -     (dconjg(yup(9))*yup(18)*yup(19) + (2*dconjg(yup(8))
2506      -     *dotup(idc1,idk1)+dconjg(yup(9))*(yup(12) - yup(18)))*
2507      -     (yup(27) + yup(28)))*(yup(29) + yup(30))))/yup(8)
2508           bfun(9,ii,kk)=0.0d0
2509 c...helicity(26,2)=(-,+,+,-,-,+)

2510         do mm=1,9
2511            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
2512      &     dconjg(bfun(mm,ii,kk))
2513         end do
2514 
2515 c...helicity(11,2)=(+,-,-,+,-,+)=helicity(10,1)(k_2,k_1)

2516         kk=11
2517         bfun(1,ii,kk)=(4*dconjg(yup(10))*pmomup(5,idb1)*pmomup(5,idc1)*
2518      -     yup(1)*(-(dconjg(yup(8))*yup(8))+yup(19)*(yup(27)+yup(28))- 
2519      -     (yup(29)+yup(30))*(yup(27)+yup(28)-yup(31))))/dconjg(yup(8))
2520         bfun(2,ii,kk)=(-4*dconjg(yup(10))*pmomup(5,idb1)*pmomup(5,idc1)*
2521      -     yup(9)*(dconjg(yup(3))*yup(3)+dconjg(yup(6))*yup(6)+(yup(27) 
2522      -     + yup(28))*(yup(19) - yup(29) - yup(30)) - yup(19)*yup(31)
2523      -     ))/dconjg(yup(8))
2524         bfun(3,ii,kk)=(-4*dconjg(yup(16))*pmomup(5,idb1)*pmomup(5,idc1)*
2525      -     yup(1)*(yup(19) - yup(29) - yup(30))*(yup(27) + yup(28)
2526      -     - yup(31)))/dconjg(yup(8))
2527         bfun(4,ii,kk)=(-4*dconjg(yup(16))*pmomup(5,idb1)*pmomup(5,idc1)*
2528      -     yup(9)*(-(dconjg(yup(3))*yup(3)) -dconjg(yup(6))*yup(6) + 
2529      -     dconjg(inpup(idq0,idk2))*inpup(idq0,idk1)*yup(8) - (yup(27)
2530      -     + yup(28))*(yup(19) - yup(29) - yup(30))))/dconjg(yup(8))
2531           bfun(5,ii,kk)=0.0d0
2532           bfun(8,ii,kk)=(4*pmomup(5,idb1)*pmomup(5,idc1)*yup(9)*
2533      -     (dconjg(yup(14))*(dconjg(yup(10))+dconjg(yup(16)))*yup(14)- 
2534      -     (dconjg(yup(12)) - dconjg(yup(18)))*(yup(29) + yup(30))*
2535      -     (yup(27) + yup(28) - yup(31))))/dconjg(yup(8))
2536         bfun(9,ii,kk)=(-4*pmomup(5,idb1)*pmomup(5,idc1)*(dconjg(yup(15))
2537      -     *yup(5) + yup(8)*yup(28))*(yup(29) + yup(30)))/dconjg(yup(8))
2538 c...helicity(27,2)=(-,+,+,-,+,-)

2539         do mm=1,9
2540            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
2541      &     dconjg(bfun(mm,ii,kk))
2542         end do
2543 
2544 c...helicity(12,2)=(+,-,-,+,-,-)=helicity(12,1)(k_2,k_1)

2545         kk=12
2546         bfun(1,ii,kk)=(-4*dconjg(yup(10))*pmomup(5,idb1)*pmomup(5,idc1)*
2547      -     (-(dconjg(yup(1))*yup(19)*(yup(27)+yup(28))) +dconjg(yup(1)) 
2548      -     *yup(27)*yup(29) +dconjg(yup(1))*yup(28)*yup(29) + 
2549      -     dconjg(yup(1))*yup(27)*yup(30)+dconjg(yup(1))*yup(28)*yup(30) 
2550      -     +dconjg(yup(2))*yup(27)*yup(31) - dconjg(yup(7))*yup(27)*
2551      -     yup(31) +yup(25)*yup(27)*yup(31)))/xup(2)
2552         bfun(2,ii,kk)=(4*dconjg(yup(10))*pmomup(5,idb1)*pmomup(5,idc1)*
2553      -     (dconjg(yup(4))*yup(4)*(dconjg(yup(2))-dconjg(yup(7))
2554      -     + yup(25)) -dconjg(yup(9))*(yup(27) + yup(28))*(yup(19) -
2555      -     yup(29) - yup(30))))/xup(2)
2556           bfun(3,ii,kk)=(4*dconjg(yup(16))*pmomup(5,idb1)*pmomup(5,idc1)*
2557      -     (-(dconjg(yup(1))*yup(19)*(yup(27)+yup(28)))+dconjg(yup(1))* 
2558      -     yup(27)*yup(29)+dconjg(yup(1))*yup(28)*yup(29)+dconjg(yup(1))
2559      -     *yup(27)*yup(30)+dconjg(yup(1))*yup(28)*yup(30)+
2560      -     dconjg(yup(2))*yup(27)*yup(31)-dconjg(yup(7))*yup(27)*yup(31) 
2561      -     +yup(25)*yup(27)*yup(31)))/xup(2)
2562         bfun(4,ii,kk)=(-4*dconjg(yup(16))*pmomup(5,idb1)*pmomup(5,idc1)*
2563      -     (dconjg(yup(4))*yup(4)*(dconjg(yup(2)) - dconjg(yup(7))
2564      -     + yup(25)) - dconjg(yup(9))*(yup(27) + yup(28))*
2565      -     (yup(19) - yup(29) - yup(30))))/xup(2)
2566           bfun(5,ii,kk)=0.0d0
2567           bfun(8,ii,kk)=(-4*pmomup(5,idb1)*pmomup(5,idc1)*(dconjg(yup(4))
2568      -     *dconjg(yup(10))*dconjg(yup(12))*yup(14) - dconjg(yup(9))
2569      -     *dconjg(yup(10))*dconjg(yup(14))*yup(14) + (dconjg(yup(4))
2570      -     *dconjg(yup(12)) -dconjg(yup(9))*dconjg(yup(14)))*
2571      -     dconjg(yup(16))*yup(14) + dconjg(yup(4))*dconjg(yup(12))
2572      -     *yup(4)*(dconjg(yup(2)) + yup(25)) + dconjg(yup(9))*
2573      -     dconjg(yup(12))*yup(28)*yup(29) + dconjg(yup(9))*
2574      -     dconjg(yup(12))*yup(28)*yup(30) + dconjg(yup(9))*
2575      -     dconjg(yup(12))*yup(27)*(yup(29)+yup(30)))+4*dconjg(yup(18)) 
2576      -     *pmomup(5,idb1)*pmomup(5,idc1)*(dconjg(yup(4))
2577      -     *yup(4)*(dconjg(yup(2))+yup(25))+dconjg(yup(9))*(yup(27)
2578      -     + yup(28))*(yup(29) + yup(30))))/xup(2)
2579           bfun(9,ii,kk)=0.0d0
2580 c...helicity(28,2)=(-,+,+,-,+,+)

2581         do mm=1,9
2582            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
2583      &     dconjg(bfun(mm,ii,kk))
2584         end do
2585 
2586 c...helicity(13,2)=(+,-,-,-,+,+)=helicity(13,1)(k_2,k_1)

2587         kk=13
2588         bfun(1,ii,kk)=(4*pmomup(5,idb1)*(-(dotup(idc1,idc1)*
2589      -     (-(dconjg(inpup(idb2,idq0))*yup(3)) - 
2590      -     dconjg(inpup(idb1,idq0))*yup(6))*yup(10)*yup(31)) - 
2591      -     dconjg(yup(13))*dotup(idc1,idc1)*yup(13)*
2592      -     (-(dconjg(inpup(idq0,idk2))*yup(1)) + 
2593      -     dconjg(inpup(idk2,idk1))*yup(31)) -yup(1)*( 
2594      -     dconjg(inpup(idc1,idk2))*yup(19)*yup(24) + 
2595      -     dconjg(inpup(idc1,idq0))*yup(10)*
2596      -     (yup(23) + yup(24)))*yup(34)))/xup(1)
2597         bfun(2,ii,kk)=(4*pmomup(5,idb1)*yup(9)*
2598      -     (-(dconjg(inpup(idq0,idk2))*dconjg(yup(13))*dotup(idc1,idc1)
2599      -     *yup(13)) + dconjg(yup(4))*(dconjg(inpup(idk2,idk1))*yup(19)
2600      -     *yup(24) +dconjg(inpup(idq0,idk1))*yup(10)*(yup(23) +
2601      -     yup(24))) +(dconjg(inpup(idc1,idk2))*yup(19)*yup(24) + 
2602      -     dconjg(inpup(idc1,idq0))*yup(10)*(yup(23) + yup(24)))*
2603      -     yup(34)))/xup(1)
2604           bfun(3,ii,kk)=(4*pmomup(5,idb1)*(dotup(idc1,idc1)*
2605      -     (dconjg(inpup(idb1,idq0))*yup(1)*yup(17)*yup(19) + 
2606      -     ((-(dconjg(inpup(idb2,idq0))*yup(3)) - 
2607      -     dconjg(inpup(idb1,idq0))*yup(6))*yup(16) + 
2608      -     dconjg(inpup(idk2,idk1))*yup(19)*yup(29))*yup(31)) + 
2609      -     yup(1)*(dconjg(inpup(idc1,idk2))*yup(19)*yup(23) + 
2610      -     dconjg(inpup(idc1,idq0))*yup(16)*(yup(23) + yup(24)))
2611      -     *yup(34)))/xup(1)
2612           bfun(4,ii,kk)=(-4*pmomup(5,idb1)*yup(9)*
2613      -     (dconjg(inpup(idb1,idq0))*dotup(idc1,idc1)*yup(17)*yup(19) + 
2614      -     dconjg(yup(4))*(dconjg(inpup(idk2,idk1))*yup(19)*yup(23) + 
2615      -     dconjg(inpup(idq0,idk1))*yup(16)*(yup(23) + yup(24))) + 
2616      -     (dconjg(inpup(idc1,idk2))*yup(19)*yup(23) + 
2617      -     dconjg(inpup(idc1,idq0))*yup(16)*(yup(23) + yup(24)))*
2618      -     yup(34)))/xup(1)
2619         bfun(5,ii,kk)=(-2*dconjg(inpup(idq0,idk2))*pmomup(5,idb1)*yup(9)
2620      -     *yup(28)*(yup(29) + yup(30)))/xup(1)
2621           bfun(8,ii,kk)=(-4*pmomup(5,idb1)*yup(9)*(yup(12) - yup(18))*
2622      -     (yup(23)+yup(24))*(dconjg(inpup(idq0,idk1))*dconjg(yup(4))+ 
2623      -     dconjg(inpup(idq0,idk2))*dconjg(yup(14)) + 
2624      -     dconjg(inpup(idc1,idq0))*yup(34)))/xup(1)
2625           bfun(9,ii,kk)=(-4*dconjg(inpup(idk2,idk1))*pmomup(5,idb1)*
2626      -     yup(27)*yup(28)*(yup(29) + yup(30)))/xup(1)
2627 c...helicity(29,2)=(-,+,+,+,-,-)

2628         do mm=1,9
2629            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
2630      &     -dconjg(bfun(mm,ii,kk))
2631         end do
2632 
2633 c...helicity(14,2)=(+,-,-,-,+,-)=helicity(15,1)(k_2,k_1)

2634         kk=14
2635         bfun(1,ii,kk)=(-4*dconjg(yup(1))*pmomup(5,idb1)*
2636      -     (-(dconjg(inpup(idq0,idk2))*dconjg(yup(13))*
2637      -     dotup(idc1,idc1)*yup(13)) +dconjg(inpup(idc1,idk2)) 
2638      -     *yup(19)*(-(dconjg(yup(2))*yup(5))+yup(24)*yup(34)) + 
2639      -     dconjg(inpup(idc1,idq0))*yup(10)*(-(yup(5)*(dconjg(yup(2))
2640      -     + yup(25))) +(yup(23) + yup(24))*yup(34))))/yup(8)
2641         bfun(2,ii,kk)=(-4*pmomup(5,idb1)*(dconjg(inpup(idq0,idk2))
2642      -     *dconjg(yup(2))*dotup(idc1,idc1)*yup(19)*yup(31) - 
2643      -     dconjg(yup(9))*(-(dconjg(inpup(idq0,idk2))*dconjg(yup(13))
2644      -     *dotup(idc1,idc1)*yup(13)) +(dconjg(inpup(idc1,idk2)) 
2645      -     *yup(19)*yup(24) +dconjg(inpup(idc1,idq0))*yup(10)*
2646      -     (yup(23) + yup(24)))*yup(34))))/yup(8)
2647           bfun(3,ii,kk)=(4*dconjg(yup(1))*pmomup(5,idb1)*
2648      -     (dconjg(inpup(idb1,idq0))*dotup(idc1,idc1)*yup(17)*yup(19) + 
2649      -     dconjg(inpup(idc1,idk2))*yup(19)*(-(yup(5)*yup(25)) +
2650      -     yup(23)*yup(34)) +dconjg(inpup(idc1,idq0))*yup(16)*
2651      -     (-(yup(5)*(dconjg(yup(2)) + yup(25))) +(yup(23) + yup(24)) 
2652      -     *yup(34))))/yup(8)
2653           bfun(4,ii,kk)=(4*pmomup(5,idb1)*(dconjg(inpup(idq0,idk2))
2654      -     *dotup(idc1,idc1)*yup(19)*yup(25)*yup(31) - 
2655      -     dconjg(yup(9))*(dconjg(inpup(idb1,idq0))*dotup(idc1,idc1)*
2656      -     yup(17)*yup(19) + (dconjg(inpup(idc1,idk2))*yup(19)*yup(23)+ 
2657      -     dconjg(inpup(idc1,idq0))*yup(16)*(yup(23) + yup(24)))
2658      -     *yup(34))))/yup(8)
2659           bfun(5,ii,kk)=(-2*dconjg(inpup(idq0,idk2))*dconjg(yup(1))*
2660      -     pmomup(5,idb1)*yup(27)*(yup(29) + yup(30)))/yup(8)
2661           bfun(8,ii,kk)=(4*pmomup(5,idb1)*(yup(23) + yup(24))*
2662      -     (dconjg(inpup(idq0,idk2))*(dconjg(yup(9))*dconjg(yup(14))
2663      -     *yup(18) +2*dconjg(yup(4))*dotup(idc1,idk1)*yup(27)) + 
2664      -     dconjg(inpup(idc1,idq0))*dconjg(yup(9))*(-yup(12)+yup(18))
2665      -     *yup(34)))/yup(8)
2666         bfun(9,ii,kk)=(-4*dconjg(inpup(idc1,idq0))*pmomup(5,idb1)
2667      -   *yup(15)*(dconjg(yup(2)) + yup(25))*yup(28))/yup(8)
2668 c...helicity(30,2)=(-,+,+,+,-,+)

2669         do mm=1,9
2670            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
2671      &     -dconjg(bfun(mm,ii,kk))
2672         end do
2673 
2674 c...helicity(15,2)=(+,-,-,-,-,+)=helicity(14,1)(k_2,k_1)

2675         kk=15
2676         bfun(1,ii,kk)=(-4*dconjg(yup(10))*pmomup(5,idb1)*
2677      -     (dotup(idc1,idc1)*(-(dconjg(inpup(idb2,idq0))*yup(3)) - 
2678      -     dconjg(inpup(idb1,idq0))*yup(6)-dconjg(inpup(idq0,idk1)) 
2679      -     *yup(19))*yup(31) +dconjg(inpup(idc1,idq0))*yup(1)*
2680      -     (yup(23) + yup(24) - yup(33))*yup(34)))/dconjg(yup(8))
2681         bfun(2,ii,kk)=(4*dconjg(yup(10))*pmomup(5,idb1)*yup(9)*
2682      -     (yup(23) + yup(24) - yup(33))*(dconjg(inpup(idq0,idk1))
2683      -     *dconjg(yup(4))+dconjg(inpup(idc1,idq0))*yup(34)))/
2684      -     dconjg(yup(8))
2685           bfun(3,ii,kk)=(4*dconjg(yup(16))*pmomup(5,idb1)*
2686      -     (dotup(idc1,idc1)*(-(dconjg(inpup(idb2,idq0))*yup(3)) - 
2687      -     dconjg(inpup(idb1,idq0))*yup(6)-dconjg(inpup(idq0,idk2)) 
2688      -     *yup(8))*yup(31) -dconjg(inpup(idc1,idq0))*yup(1)*
2689      -     (dconjg(inpup(idq0,idk2))*inpup(idc2,idk2) - yup(23)
2690      -     - yup(24))*yup(34)))/dconjg(yup(8))
2691           bfun(4,ii,kk)=(-4*dconjg(yup(16))*pmomup(5,idb1)*yup(9)*
2692      -     (-(dconjg(inpup(idq0,idk2))*dconjg(yup(11))*yup(27)) + 
2693      -     dconjg(inpup(idq0,idk1))*dconjg(yup(4))*(yup(23)+yup(24)
2694      -     - yup(33)) +dconjg(inpup(idc1,idq0))*(yup(23) + yup(24))*
2695      -     yup(34)))/dconjg(yup(8))
2696           bfun(5,ii,kk)=0.0d0
2697           bfun(8,ii,kk)=(-4*(dconjg(yup(12)) - dconjg(yup(18)))*
2698      -     pmomup(5,idb1)*yup(9)*(yup(23) + yup(24))*
2699      -     (dconjg(inpup(idq0,idk1))*dconjg(yup(4)) + 
2700      -     dconjg(inpup(idc1,idq0))*yup(34)))/dconjg(yup(8))
2701           bfun(9,ii,kk)=(4*dconjg(inpup(idc1,idq0))*dconjg(yup(11))*
2702      -     pmomup(5,idb1)*yup(5)*(yup(29) + yup(30)))/dconjg(yup(8))
2703 c...helicity(31,2)=(-,+,+,+,+,-)

2704         do mm=1,9
2705            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
2706      &     -dconjg(bfun(mm,ii,kk))
2707         end do
2708 
2709 c...helicity(16,2)=(+,-,-,-,-,-)=helicity(16,1)(k_2,k_1)

2710         kk=16
2711         bfun(1,ii,kk)=(4*dconjg(inpup(idc1,idq0))*dconjg(yup(1))*
2712      -     dconjg(yup(10))*pmomup(5,idb1)*(yup(5)*(dconjg(yup(2))
2713      -     - dconjg(yup(7)) +yup(25)) - (yup(23) + yup(24)-yup(33))
2714      -     *yup(34)))/xup(2)
2715         bfun(2,ii,kk)=(4*dconjg(inpup(idc1,idq0))*dconjg(yup(9))*
2716      -     dconjg(yup(10))*pmomup(5,idb1)*(yup(23) + yup(24) 
2717      -     - yup(33))*yup(34))/xup(2)
2718           bfun(3,ii,kk)=(4*dconjg(inpup(idc1,idq0))*dconjg(yup(1))*
2719      -     dconjg(yup(16))*pmomup(5,idb1)*(-(dconjg(inpup(idq0,idk2))
2720      -     *inpup(idk2,idk1)*yup(5)) -yup(5)*(dconjg(yup(2)) + 
2721      -     yup(25)) +(-(dconjg(inpup(idq0,idk2))*inpup(idc2,idk2)) + 
2722      -     yup(23) + yup(24))*yup(34)))/xup(2)
2723           bfun(4,ii,kk)=(4*dconjg(inpup(idc1,idq0))*dconjg(yup(9))*
2724      -     dconjg(yup(16))*pmomup(5,idb1)*(dconjg(inpup(idq0,idk2))
2725      -     *inpup(idc2,idk2) -yup(23) - yup(24))*yup(34))/xup(2)
2726           bfun(5,ii,kk)=0.0d0
2727           bfun(8,ii,kk)=(-4*dconjg(inpup(idc1,idq0))*dconjg(yup(9))*
2728      -    (dconjg(yup(12)) - dconjg(yup(18)))*
2729      -    pmomup(5,idb1)*(yup(23) + yup(24))*yup(34))/xup(2)
2730           bfun(9,ii,kk)=0.0d0
2731 c...helicity(32,2)=(-,+,+,+,+,+)

2732         do mm=1,9
2733            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
2734      &     -dconjg(bfun(mm,ii,kk))
2735         end do
2736 
2737         if (ibcstate.eq.1) go to 1222
2738 
2739 c...helicity(33,2)=(+,+,-,+,+,+)=helicity(33,1)(k_2,k_1)

2740         kk=33
2741         bfun(1,ii,kk)=(-4*dconjg(yup(35))*pmomup(5,idc1)*yup(1)*yup(10)
2742      -     *(-(dconjg(yup(38))*inpup(idq0,idb1)) + inpup(idq0,idb1)*
2743      -     (dconjg(yup(42)) + yup(36))))/xup(1)
2744         bfun(2,ii,kk)=(4*pmomup(5,idc1)*yup(9)*yup(10)*
2745      -     (inpup(idq0,idk1)*yup(2)*yup(29) + dconjg(yup(35))*
2746      -     inpup(idq0,idb1)*(dconjg(yup(42)) + yup(36))))/xup(1)
2747           bfun(3,ii,kk)=(-4*pmomup(5,idc1)*yup(1)*yup(16)*
2748      -     (-(inpup(idq0,idb1)*(-(dconjg(yup(35))*dconjg(yup(38))) + 
2749      -     dconjg(yup(17))*yup(12))) +inpup(idq0,idb1)*
2750      -     (dconjg(yup(17))*(yup(11) + yup(18)) -dconjg(yup(35))* 
2751      -     (dconjg(yup(42)) + yup(36)))))/xup(1)
2752           bfun(4,ii,kk)=(-4*pmomup(5,idc1)*yup(9)*yup(16)*
2753      -     (inpup(idq0,idk1)*(yup(2)-yup(7))*yup(29)+inpup(idq0,idb1)*
2754      -     (-(dconjg(yup(17))*(yup(11) + yup(18))) +dconjg(yup(35)) 
2755      -     *(dconjg(yup(42)) + yup(36)))))/xup(1)
2756           bfun(5,ii,kk)=0.0d0
2757           bfun(8,ii,kk)=(-4*dconjg(yup(35))*pmomup(5,idc1)*yup(9)*
2758      -     (yup(12)-yup(18))*(-((dconjg(yup(38))+dconjg(yup(41)))*
2759      -     inpup(idq0,idb1)) + inpup(idq0,idb1)*(dconjg(yup(42)) +
2760      -     yup(36))))/xup(1)
2761           bfun(9,ii,kk)=0.0d0
2762 c...helicity(49,2)=(-,-,+,-,-,-)

2763         do mm=1,9
2764            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
2765      &     -dconjg(bfun(mm,ii,kk))
2766         end do
2767 
2768 c...helicity(34,2)=(+,+,-,+,+,-)=helicity(35,1)(k2,k1)

2769         kk=34
2770         bfun(1,ii,kk)=(4*pmomup(5,idc1)*(-(dotup(idb1,idb1)*
2771      -     inpup(idq0,idk1)*yup(18)*yup(19)*yup(31)) - 
2772      -     yup(10)*(dconjg(yup(5))*dotup(idb1,idb1)*
2773      -     inpup(idq0,idc1)*yup(31) + dconjg(yup(35))*
2774      -     (dconjg(yup(42))*inpup(idk1,idb1)*yup(31) + 
2775      -     dconjg(yup(1))*inpup(idq0,idb1)*
2776      -     (dconjg(yup(42)) + yup(36))))))/yup(8)
2777         bfun(2,ii,kk)=(4*pmomup(5,idc1)*(inpup(idq0,idk1)*yup(4)*
2778      -     (dotup(idb1,idb1)*(-(dconjg(yup(8))*dconjg(yup(33))) + 
2779      -     dconjg(yup(4))*yup(10))-dconjg(yup(24))*yup(10)*yup(25))+ 
2780      -     dconjg(yup(9))*dconjg(yup(35))*inpup(idq0,idb1)*
2781      -     yup(10)*(dconjg(yup(42)) + yup(36))))/yup(8)
2782           bfun(3,ii,kk)=(4*pmomup(5,idc1)*yup(16)*
2783      -     (dconjg(yup(5))*dotup(idb1,idb1)*inpup(idq0,idc1)*
2784      -     yup(31)+inpup(idk1,idb1)*(dconjg(yup(35))*dconjg(yup(42)) - 
2785      -     dconjg(yup(17))*yup(18))*yup(31) + dconjg(yup(1))*
2786      -     inpup(idq0,idb1)*(-(dconjg(yup(17))*(yup(11) + yup(18))) + 
2787      -     dconjg(yup(35))*(dconjg(yup(42)) + yup(36)))))/yup(8)
2788           bfun(4,ii,kk)=(-4*pmomup(5,idc1)*yup(16)*(inpup(idq0,idk1)
2789      -     *yup(4)*(dconjg(yup(4))*dotup(idb1,idb1) + 
2790      -     (-dconjg(yup(24))+dconjg(yup(33)))*yup(25))+dconjg(yup(9))
2791      -     *inpup(idq0,idb1)*(-(dconjg(yup(17))*(yup(11) + yup(18))) + 
2792      -     dconjg(yup(35))*(dconjg(yup(42)) + yup(36)))))/yup(8)
2793           bfun(5,ii,kk)=(2*inpup(idq0,idk1)*pmomup(5,idc1)*yup(16)*
2794      -     (yup(27) + yup(28))*yup(29))/yup(8)
2795           bfun(8,ii,kk)=(-4*pmomup(5,idc1)*(inpup(idq0,idk1)*yup(4)
2796      -     *(yup(12) - yup(18))*(dconjg(yup(4))*dotup(idb1,idb1) - 
2797      -     dconjg(yup(24))*yup(25)) +2*dotup(idc1,idk1)*
2798      -     (-(inpup(idq0,idk1)*yup(16)*yup(27)*yup(29)) + 
2799      -     dconjg(yup(8))*dconjg(yup(35))*inpup(idq0,idb1)*yup(36)) + 
2800      -     dconjg(yup(9))*dconjg(yup(35))*(dconjg(yup(41))*
2801      -     inpup(idq0,idb1)*yup(18)+inpup(idq0,idb1)*(yup(12)-yup(18))*
2802      -     (dconjg(yup(42)) + yup(36)))))/yup(8)
2803           bfun(9,ii,kk)=(-4*dconjg(yup(3))*dconjg(yup(35))*
2804      -    inpup(idq0,idb1)*pmomup(5,idc1)*yup(11))/yup(8)
2805 c...helicity(50,2)=(-,-,+,-,-,+)

2806         do mm=1,9
2807            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
2808      &     -dconjg(bfun(mm,ii,kk))
2809         end do
2810 
2811 c...helicity(35,2)=(+,+,-,+,-,+)=helicity(34,1)(k2,k1)

2812         kk=35
2813         bfun(1,ii,kk)=(4*dconjg(yup(10))*pmomup(5,idc1)*yup(1)*
2814      -     (-(dconjg(yup(38))*inpup(idq0,idk2)*yup(13)) + 
2815      -     inpup(idq0,idk2)*yup(13)*(dconjg(yup(42))+yup(36)) - 
2816      -     dconjg(yup(35))*(-(dconjg(yup(38))*inpup(idq0,idb1)) + 
2817      -     inpup(idq0,idb1)*(dconjg(yup(42))+yup(36)))))/dconjg(yup(8))
2818         bfun(2,ii,kk)=(-4*dconjg(yup(10))*pmomup(5,idc1)*yup(9)*
2819      -     (inpup(idq0,idk1)*yup(2)*(yup(19) - yup(29)) + 
2820      -     (-(dconjg(yup(35))*inpup(idq0,idb1)) + inpup(idq0,idk2)
2821      -     *yup(13))*(dconjg(yup(42)) + yup(36))))/dconjg(yup(8))
2822           bfun(3,ii,kk)=(-4*pmomup(5,idc1)*yup(1)*(dotup(idb1,idb1)
2823      -     *yup(19)*(inpup(idq0,idk2)*(yup(27) + yup(28)) - 
2824      -     inpup(idq0,idk2)*yup(31))-dconjg(yup(16))*dconjg(yup(35))*
2825      -     (-(dconjg(yup(38))*inpup(idq0,idb1)) + inpup(idq0,idb1)*
2826      -     (dconjg(yup(42)) + yup(36)))))/dconjg(yup(8))
2827           bfun(4,ii,kk)=(-4*pmomup(5,idc1)*yup(9)*
2828      -     (-(dotup(idb1,idb1)*inpup(idq0,idk2)*yup(19)*(yup(27) + 
2829      -     yup(28))) +inpup(idq0,idk1)*(dotup(idb1,idb1)
2830      -     *yup(8)*yup(19) +dconjg(yup(16))*yup(2)*yup(29)) + 
2831      -     dconjg(yup(16))*dconjg(yup(35))*inpup(idq0,idb1)
2832      -     *(dconjg(yup(42)) + yup(36))))/dconjg(yup(8))
2833           bfun(5,ii,kk)=0.0d0
2834           bfun(8,ii,kk)=(-4*pmomup(5,idc1)*yup(9)*(inpup(idq0,idk2)*
2835      -     ((dconjg(yup(10))*dconjg(yup(24)) - dconjg(yup(14))
2836      -     *dotup(idb1,idb1))*yup(14)+2*dconjg(yup(35))*dotup(idc1,idk1)
2837      -     *yup(35))+(dconjg(yup(12))-dconjg(yup(18)))*dconjg(yup(35))*
2838      -     (-(dconjg(yup(38))*inpup(idq0,idb1)) +inpup(idq0,idb1) 
2839      -     *(dconjg(yup(42)) + yup(36)))))/dconjg(yup(8))
2840           bfun(9,ii,kk)=(4*inpup(idq0,idk2)*pmomup(5,idc1)*
2841      -     (dconjg(inpup(idc1,idb2))*dconjg(yup(35))*inpup(idq0,idb1)
2842      -     *yup(5) +yup(2)*yup(28)*yup(29)))/dconjg(yup(8))
2843 c...helicity(51,2)=(-,-,+,-,+,-)

2844         do mm=1,9
2845            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
2846      &     -dconjg(bfun(mm,ii,kk))
2847         end do
2848 
2849 c...helicity(36,2)=(+,+,-,+,-,-)=helicity(36,1)(k2,k1)

2850         kk=36
2851         bfun(1,ii,kk)=(4*dconjg(yup(10))*pmomup(5,idc1)*
2852      -     (-(dconjg(yup(5))*dotup(idb1,idb1)*inpup(idq0,idc1)
2853      -     *yup(31)) +dconjg(yup(42))*(-(dconjg(yup(35))*
2854      -     inpup(idk1,idb1)) -inpup(idk2,idk1)*yup(13))*yup(31) - 
2855      -     dconjg(yup(1))*dconjg(yup(35))*inpup(idq0,idb1)*
2856      -     (dconjg(yup(42))+yup(36))+dconjg(yup(1))*inpup(idq0,idk2)
2857      -     *yup(13)*(dconjg(yup(42)) + yup(36))))/xup(2)
2858         bfun(2,ii,kk)=(4*dconjg(yup(10))*pmomup(5,idc1)*
2859      -     (inpup(idq0,idk1)*yup(4)*(dconjg(yup(4))*dotup(idb1,idb1)+ 
2860      -     dconjg(yup(24))*(dconjg(yup(7)) - yup(25)))- dconjg(yup(9))*
2861      -     (-(dconjg(yup(35))*inpup(idq0,idb1)) +inpup(idq0,idk2) 
2862      -     *yup(13))*(dconjg(yup(42)) + yup(36))))/xup(2)
2863           bfun(3,ii,kk)=(-4*pmomup(5,idc1)*(dconjg(yup(1))*
2864      -     dotup(idb1,idb1)*inpup(idq0,idk2)*yup(19)*(yup(27)
2865      -     + yup(28)) -dotup(idb1,idb1)*inpup(idk2,idk1)*yup(19)*
2866      -     yup(27)*yup(31) - dconjg(yup(16))*(dconjg(yup(5))*
2867      -     dotup(idb1,idb1)*inpup(idq0,idc1)*yup(31) +dconjg(yup(35))*
2868      -     (dconjg(yup(42))*inpup(idk1,idb1)*yup(31) + dconjg(yup(1))
2869      -     *inpup(idq0,idb1)*(dconjg(yup(42))+yup(36))))))/xup(2)
2870           bfun(4,ii,kk)=(4*pmomup(5,idc1)*(-(dconjg(yup(4))
2871      -     *dotup(idb1,idb1)*inpup(idk2,idk1)*yup(4)*yup(19)) + 
2872      -     dconjg(yup(9))*dotup(idb1,idb1)*inpup(idq0,idk2)*yup(19)
2873      -     *(yup(27)+yup(28))-dconjg(yup(16))*(inpup(idq0,idk1)*yup(4)*
2874      -     (dconjg(yup(4))*dotup(idb1,idb1) -dconjg(yup(24))*yup(25)) + 
2875      -     dconjg(yup(9))*dconjg(yup(35))*inpup(idq0,idb1)*
2876      -     (dconjg(yup(42)) + yup(36)))))/xup(2)
2877         bfun(5,ii,kk)=(2*dconjg(yup(10))*inpup(idq0,idk1)*pmomup(5,idc1)
2878      -     *(yup(27) + yup(28))*yup(30))/xup(2)
2879           bfun(8,ii,kk)=(-4*pmomup(5,idc1)*(dconjg(yup(9))*
2880      -     (dconjg(yup(10))*dconjg(yup(24)) -dconjg(yup(14))* 
2881      -     dotup(idb1,idb1))*inpup(idq0,idk2)*yup(14) +inpup(idq0,idk1)*
2882      -     (dotup(idb1,idb1)*(dconjg(yup(4))*(dconjg(yup(12)) -
2883      -     dconjg(yup(18)))*yup(4) + dconjg(yup(12))*dconjg(yup(14))
2884      -     *yup(14)) - dconjg(yup(24))*(dconjg(yup(10))*dconjg(yup(12))
2885      -     *yup(14)+(dconjg(yup(12))-dconjg(yup(18)))*yup(4)*yup(25)))+ 
2886      -     dconjg(yup(35))*(-2*dotup(idc1,idk1)*inpup(idk2,idk1)*yup(27)
2887      -     * yup(35) +dconjg(yup(9))*(dconjg(yup(12))-dconjg(yup(18)))*
2888      -     inpup(idq0,idb1)*(dconjg(yup(42)) + yup(36)))))/xup(2)
2889           bfun(9,ii,kk)=(-4*dconjg(yup(35))*inpup(idk2,idk1)
2890      -     *pmomup(5,idc1)*yup(28)*yup(35))/xup(2)
2891 c...helicity(52,2)=(-,-,+,-,+,+)

2892         do mm=1,9
2893            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
2894      &     -dconjg(bfun(mm,ii,kk))
2895         end do
2896 
2897 c...helicity(37,2)=(+,+,-,-,+,+)=helicity(37,1)(k2,k1)

2898         kk=37
2899         bfun(1,ii,kk)=(4*(yup(1)*(-(dconjg(inpup(idc1,idb2))*
2900      -     dconjg(yup(35))*inpup(idc2,idb1)*yup(10))+dotup(idb1,idb1)*
2901      -     (dconjg(yup(34))*yup(10) + dconjg(inpup(idc1,idk2))*
2902      -     inpup(idc2,idq0)*yup(19)))*yup(34) +dotup(idc1,idc1)*yup(10)*
2903      -     (yup(2)*yup(29)*yup(31)+dconjg(yup(35))*yup(1)*yup(35))))
2904      -     /xup(1)
2905         bfun(2,ii,kk)=(4*yup(9)*(-(dotup(idb1,idb1)*(-(dconjg(yup(4))*
2906      -     (yup(4)*yup(10) -dconjg(inpup(idk2,idk1))*
2907      -     inpup(idc2,idq0)*yup(19))) +dconjg(yup(34))*yup(10)*yup(34) + 
2908      -     dconjg(inpup(idc1,idk2))*inpup(idc2,idq0)*yup(19)*yup(34))) + 
2909      -     dconjg(yup(35))*yup(10)*(dconjg(inpup(idb2,idk1))*
2910      -     dconjg(yup(4))*inpup(idc2,idb1) + dconjg(inpup(idc1,idb2))
2911      -     *inpup(idc2,idb1)*yup(34)-dotup(idc1,idc1)*yup(35))))/xup(1)
2912           bfun(3,ii,kk)=(4*yup(16)*(-((dconjg(yup(34))*dotup(idb1,idb1) + 
2913      -     (dconjg(inpup(idc1,idk2))*dconjg(yup(17)) - 
2914      -     dconjg(inpup(idc1,idb2))*dconjg(yup(35)))*inpup(idc2,idb1))
2915      -     *yup(1)*yup(34))+dotup(idc1,idc1)*((-yup(2)+yup(7))*yup(29)
2916      -     *yup(31) +yup(1)*(dconjg(yup(17))*yup(17) - dconjg(yup(35))
2917      -     *yup(35)))))/xup(1)
2918           bfun(4,ii,kk)=(-4*yup(9)*yup(16)*(dotup(idb1,idb1)*
2919      -     (dconjg(yup(4))*yup(4) - dconjg(yup(34))*yup(34)) + 
2920      -     dconjg(yup(17))*(-(dconjg(inpup(idk2,idk1))*dconjg(yup(4))*
2921      -     inpup(idc2,idb1)) +dotup(idc1,idc1)*yup(17) - 
2922      -     dconjg(inpup(idc1,idk2))*inpup(idc2,idb1)*yup(34)) + 
2923      -     dconjg(yup(35))*(dconjg(inpup(idb2,idk1))*dconjg(yup(4))*
2924      -     inpup(idc2,idb1) +dconjg(inpup(idc1,idb2))*inpup(idc2,idb1)*
2925      -     yup(34) - dotup(idc1,idc1)*yup(35))))/xup(1)
2926           bfun(5,ii,kk)=(2*yup(9)*yup(16)*yup(28)*yup(29))/xup(1)
2927           bfun(8,ii,kk)=(4*yup(9)*(yup(12) - yup(18))*
2928      -     (dconjg(yup(14))*yup(16)*yup(23) -dotup(idb1,idb1)*
2929      -     (dconjg(yup(4))*yup(4) + dconjg(yup(14))*yup(14) - 
2930      -     dconjg(yup(34))*yup(34)) +dconjg(yup(35))*
2931      -     (-(dconjg(inpup(idb2,idk1))*dconjg(yup(4))*inpup(idc2,idb1))- 
2932      -     dconjg(inpup(idc1,idb2))*inpup(idc2,idb1)*
2933      -     yup(34) + dotup(idc1,idc1)*yup(35))))/xup(1)
2934           bfun(9,ii,kk)=(-4*dconjg(inpup(idk2,idk1))*dconjg(yup(35))*
2935      -     dconjg(yup(42))*inpup(idq0,idb1)*yup(28))/xup(1)
2936 c...helicity(53,2)=(-,-,+,+,-,-)

2937         do mm=1,9
2938            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
2939      &     dconjg(bfun(mm,ii,kk))
2940         end do
2941 
2942 c...helicity(38,2)=(+,+,-,-,+,-)=helicity(39,1)(k2,k1)

2943         kk=38
2944         bfun(1,ii,kk)=(4*dconjg(yup(1))* (-(dotup(idb1,idb1)*
2945      -     (dconjg(yup(5))*yup(5)*yup(10) -dconjg(inpup(idc1,idk2))*
2946      -     inpup(idq0,idk1)*yup(5)*yup(19) -(dconjg(yup(34))*yup(10)+ 
2947      -     dconjg(inpup(idc1,idk2))*inpup(idc2,idq0)*yup(19))*yup(34)))+ 
2948      -     dconjg(yup(35))*yup(10)*(dconjg(inpup(idc1,idb2))*
2949      -     (inpup(idk1,idb1)*yup(5) - inpup(idc2,idb1)*yup(34)) + 
2950      -     dotup(idc1,idc1)*yup(35))))/yup(8)
2951         bfun(2,ii,kk)=(-4*(dotup(idc1,idc1)*(dconjg(yup(8))*
2952      -     dotup(idb1,idb1)*yup(19)+yup(10)*yup(25)*yup(30))*yup(31)+ 
2953      -     dconjg(yup(9))*dotup(idb1,idb1)*(dconjg(yup(34))*yup(10) + 
2954      -     dconjg(inpup(idc1,idk2))*inpup(idc2,idq0)*yup(19))*yup(34)) + 
2955      -     4*dconjg(yup(9))*dconjg(yup(35))*yup(10)*
2956      -     (dconjg(inpup(idc1,idb2))*inpup(idc2,idb1)*
2957      -     yup(34) - dotup(idc1,idc1)*yup(35)))/yup(8)
2958           bfun(3,ii,kk)=(4*dconjg(yup(1))*yup(16)*(dotup(idb1,idb1)*
2959      -     (dconjg(yup(5))*yup(5) - dconjg(yup(34))*yup(34)) + 
2960      -     dconjg(yup(17))*(dotup(idc1,idc1)*yup(17) + 
2961      -     dconjg(inpup(idc1,idk2))*(inpup(idk1,idb1)*yup(5) - 
2962      -     inpup(idc2,idb1)*yup(34))) - dconjg(yup(35))*
2963      -     (dconjg(inpup(idc1,idb2))*(inpup(idk1,idb1)*yup(5) - 
2964      -     inpup(idc2,idb1)*yup(34))+dotup(idc1,idc1)*yup(35))))/yup(8)
2965           bfun(4,ii,kk)=(4*yup(16)*(dconjg(yup(9))*(dconjg(yup(34))
2966      -     *dotup(idb1,idb1)+(dconjg(inpup(idc1,idk2))*dconjg(yup(17))- 
2967      -     dconjg(inpup(idc1,idb2))*dconjg(yup(35)))*inpup(idc2,idb1))
2968      -     *yup(34)+dotup(idc1,idc1)*(yup(25)*(-yup(19)+yup(30))*yup(31) 
2969      -     +dconjg(yup(9))*(-(dconjg(yup(17))*yup(17)) + 
2970      -     dconjg(yup(35))*yup(35)))))/yup(8)
2971           bfun(5,ii,kk)=(2*dconjg(yup(1))*yup(16)*yup(27)*yup(29))/yup(8)
2972           bfun(8,ii,kk)=(4*(2*dconjg(yup(4))*dotup(idc1,idk1)*
2973      -     (dotup(idb1,idb1)*yup(14) - yup(16)*yup(23))*yup(27) +
2974      -     dconjg(yup(9))*(-(dconjg(yup(14))*yup(16)*yup(18)*yup(23)) + 
2975      -     dconjg(inpup(idc1,idb2))*dconjg(yup(35))*inpup(idc2,idb1)*
2976      -     (-yup(12) + yup(18))*yup(34) + dotup(idb1,idb1)*
2977      -     (dconjg(yup(14))*yup(14)*yup(18) +dconjg(yup(34))*(yup(12) 
2978      -     - yup(18))*yup(34))) + dotup(idc1,idc1)*(2*dconjg(yup(8))
2979      -     *dconjg(yup(35))*dotup(idc1,idk1)*yup(35)+(yup(12)-yup(18))*
2980      -     (yup(25)*yup(30)*yup(31) + dconjg(yup(9))*dconjg(yup(35))
2981      -     *yup(35)))))/yup(8)
2982           bfun(9,ii,kk)=(4*(dconjg(yup(5))*dotup(idb1,idb1)*yup(15)*
2983      -     yup(28) + dconjg(yup(35))*(-(dconjg(inpup(idc1,idb2))*
2984      -     inpup(idk1,idb1)*yup(15)*yup(28)) + 
2985      -     dconjg(yup(8))*dotup(idc1,idc1)*yup(35))))/yup(8)
2986 c...helicity(54,2)=(-,-,+,+,-,+)

2987         do mm=1,9
2988            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
2989      &     dconjg(bfun(mm,ii,kk))
2990         end do
2991 
2992 c...helicity(39,2)=(+,+,-,-,-,+)=helicity(38,1)(k2,k1)

2993         kk=39
2994         bfun(1,ii,kk)=(4*dconjg(yup(10))*(yup(1)*(dconjg(yup(34))
2995      -     *dotup(idb1,idb1) +dconjg(inpup(idc1,idb2))*
2996      -     (-(dconjg(yup(35))*inpup(idc2,idb1)) + inpup(idc2,idk2)
2997      -     *yup(13)))*yup(34) +dotup(idc1,idc1)*(yup(2)*(-yup(19)
2998      -     + yup(29))*yup(31) +yup(1)*(-(dconjg(yup(13))*yup(13)) + 
2999      -     dconjg(yup(35))*yup(35)))))/dconjg(yup(8))
3000         bfun(2,ii,kk)=(-4*dconjg(yup(10))*yup(9)*(-((dconjg(yup(13))
3001      -     *dotup(idc1,idc1)-dconjg(inpup(idb2,idk1))*dconjg(yup(4))*
3002      -     inpup(idc2,idk2))*yup(13)) +dconjg(inpup(idc1,idb2))* 
3003      -     inpup(idc2,idk2)*yup(13)*yup(34) + dotup(idb1,idb1)*
3004      -     (-(dconjg(yup(4))*yup(4)) + dconjg(yup(34))*yup(34)) - 
3005      -     dconjg(yup(35))*(dconjg(inpup(idb2,idk1))*dconjg(yup(4))*
3006      -     inpup(idc2,idb1) +dconjg(inpup(idc1,idb2))*inpup(idc2,idb1)*
3007      -     yup(34) - dotup(idc1,idc1)*yup(35))))/dconjg(yup(8))
3008           bfun(3,ii,kk)=(-4*dotup(idb1,idb1)*(dotup(idc1,idc1)*yup(8)
3009      -     *yup(19)*yup(31)+yup(1)*(dconjg(yup(16))*dconjg(yup(34)) + 
3010      -     dconjg(inpup(idc1,idq0))*inpup(idc2,idk2)*yup(19))*yup(34))+ 
3011      -     4*dconjg(yup(16))*(-(dotup(idc1,idc1)*yup(2)*yup(29)
3012      -     *yup(31)) +dconjg(yup(35))*yup(1)*
3013      -     (dconjg(inpup(idc1,idb2))*inpup(idc2,idb1)*
3014      -     yup(34) - dotup(idc1,idc1)*yup(35))))/dconjg(yup(8))
3015           bfun(4,ii,kk)=(4*yup(9)*(dotup(idb1,idb1)*(-(dconjg(yup(4))*
3016      -     (dconjg(yup(16))*yup(4) -dconjg(inpup(idq0,idk1))*
3017      -     inpup(idc2,idk2)*yup(19)))+dconjg(yup(16))*dconjg(yup(34))
3018      -     *yup(34) +dconjg(inpup(idc1,idq0))*inpup(idc2,idk2)*
3019      -     yup(19)*yup(34)) -dconjg(yup(16))*dconjg(yup(35))*
3020      -     (dconjg(inpup(idb2,idk1))*dconjg(yup(4))*inpup(idc2,idb1) + 
3021      -     dconjg(inpup(idc1,idb2))*inpup(idc2,idb1)*
3022      -     yup(34) - dotup(idc1,idc1)*yup(35))))/dconjg(yup(8))
3023           bfun(5,ii,kk)=(2*dconjg(yup(10))*yup(9)*yup(28)*yup(30))
3024      &   /dconjg(yup(8))
3025           bfun(8,ii,kk)=(-4*yup(9)*((dconjg(yup(12)) - dconjg(yup(18)))*
3026      -     dotup(idb1,idb1)*(dconjg(yup(4))*yup(4) - dconjg(yup(34))
3027      -     *yup(34)) +dconjg(yup(35))*(-((dconjg(inpup(idb2,idk1))
3028      -     *dconjg(yup(4))*(-dconjg(yup(12)) + dconjg(yup(18))) - 
3029      -     2*dconjg(inpup(idb2,idq0))*dconjg(yup(14))*dotup(idc1,idk1))*
3030      -     inpup(idc2,idb1)) +dconjg(inpup(idc1,idb2))*(dconjg(yup(12))
3031      -     -dconjg(yup(18)))*inpup(idc2,idb1)*yup(34))+dotup(idc1,idc1)*
3032      -     (dconjg(yup(10))*yup(19)*yup(30) + (-dconjg(yup(12)) +
3033      -     dconjg(yup(18)))*dconjg(yup(35))*yup(35))))/dconjg(yup(8))
3034           bfun(9,ii,kk)=(4*dconjg(inpup(idc1,idb2))*dconjg(yup(11))*
3035      -     dconjg(yup(35))*inpup(idq0,idb1)*yup(5))/dconjg(yup(8))
3036 c...helicity(55,2)=(-,-,+,+,+,-)

3037         do mm=1,9
3038            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
3039      &     dconjg(bfun(mm,ii,kk))
3040         end do
3041 
3042 c...helicity(40,2)=(+,+,-,-,-,-)=helicity(40,1)(k2,k1)

3043         kk=40
3044         bfun(1,ii,kk)=(4*dconjg(yup(1))*dconjg(yup(10))*
3045      -     (-(dconjg(yup(13))*dotup(idc1,idc1)*yup(13)) + 
3046      -     dconjg(inpup(idc1,idb2))*inpup(idk2,idk1)*yup(5)*yup(13) + 
3047      -     dconjg(inpup(idc1,idb2))*inpup(idc2,idk2)*yup(13)*yup(34) - 
3048      -     dotup(idb1,idb1)*(dconjg(yup(5))*yup(5) - dconjg(yup(34))
3049      -     *yup(34)) +dconjg(yup(35))*(dconjg(inpup(idc1,idb2))*
3050      -     (inpup(idk1,idb1)*yup(5) -inpup(idc2,idb1)*yup(34)) + 
3051      -     dotup(idc1,idc1)*yup(35))))/xup(2)
3052         bfun(2,ii,kk)=(4*dconjg(yup(10))*(-(dconjg(yup(9))*
3053      -     (dconjg(yup(34))*dotup(idb1,idb1)+dconjg(inpup(idc1,idb2))*
3054      -     (-(dconjg(yup(35))*inpup(idc2,idb1)) + inpup(idc2,idk2)
3055      -     *yup(13)))*yup(34)) - dotup(idc1,idc1)*((dconjg(yup(3))*
3056      -     dconjg(yup(12)) -dconjg(yup(9))*dconjg(yup(13)))*yup(13) + 
3057      -     yup(25)*yup(30)*yup(31) + dconjg(yup(9))*dconjg(yup(35))
3058      -     *yup(35))))/xup(2)
3059           bfun(3,ii,kk)=(4*dconjg(yup(1))*(dotup(idb1,idb1)*
3060      -     (-(dconjg(inpup(idc1,idq0))*inpup(idk2,idk1)*yup(5)*yup(19))- 
3061      -     dconjg(inpup(idc1,idq0))*inpup(idc2,idk2)*yup(19)*yup(34) + 
3062      -     dconjg(yup(16))*(dconjg(yup(5))*yup(5) - dconjg(yup(34))*
3063      -     yup(34))) - dconjg(yup(16))*dconjg(yup(35))*
3064      -     (dconjg(inpup(idc1,idb2))*(inpup(idk1,idb1)*yup(5) - 
3065      -     inpup(idc2,idb1)*yup(34))+dotup(idc1,idc1)*yup(35))))/xup(2)
3066           bfun(4,ii,kk)=(4*(dconjg(yup(16))*dotup(idc1,idc1)*yup(25)*
3067      -     yup(30)*yup(31) + dconjg(yup(9))*(dotup(idb1,idb1)*
3068      -     (dconjg(yup(16))*dconjg(yup(34)) + dconjg(inpup(idc1,idq0))
3069      -     *inpup(idc2,idk2)*yup(19))*yup(34) - dconjg(yup(16))*
3070      -     dconjg(yup(35))*(dconjg(inpup(idc1,idb2))*inpup(idc2,idb1)*
3071      -     yup(34) - dotup(idc1,idc1)*yup(35)))))/xup(2)
3072         bfun(5,ii,kk)=(2*dconjg(yup(1))*dconjg(yup(10))*yup(27)*yup(30))
3073      &    /xup(2)
3074           bfun(8,ii,kk)=(-4*dotup(idc1,idc1)*yup(30)*(dconjg(yup(9))*
3075      -     dconjg(yup(10))*yup(19) + (dconjg(yup(7))*dconjg(yup(10)) + 
3076      -     (-dconjg(yup(12)) + dconjg(yup(18)))*yup(25))*yup(31)) + 
3077      -     4*dconjg(yup(9))*(dconjg(yup(12)) - dconjg(yup(18)))*
3078      -     dconjg(yup(34))*dotup(idb1,idb1)*yup(34)+4*dconjg(yup(35))*
3079      -     (-2*dconjg(inpup(idb2,idq0))*dotup(idc1,idk1)*
3080      -     inpup(idk2,idk1)*yup(22)*yup(27) + dconjg(yup(9))*
3081      -     (-dconjg(yup(12)) + dconjg(yup(18)))*
3082      -     (dconjg(inpup(idc1,idb2))*inpup(idc2,idb1)*
3083      -     yup(34) - dotup(idc1,idc1)*yup(35))))/xup(2)
3084           bfun(9,ii,kk)=0.0d0
3085 c...helicity(56,2)=(-,-,+,+,+,+)

3086         do mm=1,9
3087            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
3088      &     dconjg(bfun(mm,ii,kk))
3089         end do
3090 
3091 c...helicity(41,2)=(+,-,+,+,+,+)=helicity(41,1)(k2,k1)

3092         kk=41
3093         bfun(1,ii,kk)=(-4*pmomup(5,idb1)*yup(1)*
3094      -     (-(dconjg(inpup(idq0,idk2))*dconjg(yup(13))*
3095      -     (-(dconjg(inpup(idk2,idk1))*dconjg(yup(5))*inpup(idc1,idb2))- 
3096      -     dconjg(inpup(idc2,idk2))*dconjg(yup(34))*inpup(idc1,idb2) + 
3097      -     dotup(idc1,idc1)*yup(13))) +dconjg(inpup(idq0,idk1))* 
3098      -     dconjg(yup(5))*yup(10)*(yup(20) + yup(39)) - 
3099      -     dconjg(inpup(idq0,idc2))*dconjg(yup(34))*
3100      -     yup(10)*(yup(20) + yup(39))))/xup(1)
3101         bfun(2,ii,kk)=(4*pmomup(5,idb1)*(dotup(idc1,idc1)*
3102      -     ((-(dconjg(inpup(idb2,idq0))*yup(3))-dconjg(inpup(idb1,idq0))
3103      -     *yup(6))*yup(10)*yup(31) + dconjg(yup(13))*yup(13)*
3104      -     (-(dconjg(inpup(idq0,idk2))*yup(9))+dconjg(inpup(idk2,idk1))
3105      -     *yup(31)))+dconjg(yup(34))*yup(9)*(dconjg(inpup(idc2,idk2))*
3106      -     dconjg(inpup(idq0,idk2))*dconjg(yup(13))*inpup(idc1,idb2) - 
3107      -     dconjg(inpup(idq0,idc2))*yup(10)*(yup(20)+yup(39)))))/xup(1)
3108         bfun(3,ii,kk)=(4*pmomup(5,idb1)*yup(1)*(dconjg(inpup(idb1,idq0))
3109      -     *dotup(idc1,idc1)*yup(17)*yup(19) +dconjg(yup(34))*
3110      -     (dconjg(inpup(idc2,idk2))*yup(19)*yup(20) - 
3111      -     dconjg(inpup(idq0,idc2))*yup(16)*(yup(20) + yup(39))) + 
3112      -     dconjg(yup(5))*(dconjg(inpup(idk2,idk1))*yup(19)*yup(20) + 
3113      -     dconjg(inpup(idq0,idk1))*yup(16)*(yup(20)+yup(39)))))/xup(1)
3114           bfun(4,ii,kk)=(4*pmomup(5,idb1)*(-(dotup(idc1,idc1)*
3115      -     (dconjg(inpup(idb1,idq0))*yup(9)*yup(17)*yup(19) + 
3116      -     ((-(dconjg(inpup(idb2,idq0))*yup(3))-dconjg(inpup(idb1,idq0))
3117      -     *yup(6))*yup(16) +dconjg(inpup(idk2,idk1))*yup(19)*yup(29)
3118      -     )*yup(31)))-dconjg(yup(34))*yup(9)*(dconjg(inpup(idc2,idk2))
3119      -     *yup(19)*yup(20) - dconjg(inpup(idq0,idc2))*yup(16)*
3120      -     (yup(20) + yup(39)))))/xup(1)
3121           bfun(5,ii,kk)=(-2*dconjg(inpup(idq0,idk2))*pmomup(5,idb1)
3122      -     *yup(1)*yup(27)*(yup(29) + yup(30)))/xup(1)
3123           bfun(8,ii,kk)=(4*pmomup(5,idb1)*(2*dconjg(inpup(idk2,idk1))
3124      -     *dotup(idc1,idk1)*yup(27)*yup(28)*(yup(29) + yup(30)) + 
3125      -     dotup(idc1,idc1)*(-(dconjg(inpup(idb2,idq0))*(yup(9)*yup(13)
3126      -     *yup(19)+(yup(7)*yup(13)+yup(3)*(-yup(12)+yup(18)))*yup(31))
3127      -     ) - dconjg(inpup(idb1,idq0))*(yup(9)*yup(17)*yup(19) + 
3128      -     (yup(7)*yup(17) +yup(6)*(-yup(12) + yup(18)))*yup(31)))
3129      -     + dconjg(inpup(idq0,idc2))*dconjg(yup(34))*
3130      -     yup(9)*(yup(12) - yup(18))*(yup(20) + yup(39))))/xup(1)
3131           bfun(9,ii,kk)=0.0d0
3132 c...helicity(57,2)=(-,+,-,-,-,-)

3133         do mm=1,9
3134            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
3135      &     -dconjg(bfun(mm,ii,kk))
3136         end do
3137 
3138 c...helicity(42,2)=(+,-,+,+,+,-)=helicity(43,1)(k2,k1)

3139         kk=42
3140         bfun(1,ii,kk)=(4*pmomup(5,idb1)*(dconjg(inpup(idq0,idk2))
3141      -     *dconjg(yup(2))*dotup(idc1,idc1)*yup(19)*yup(31) + 
3142      -     dconjg(yup(1))*(-(dconjg(inpup(idq0,idk2))*dconjg(yup(13))*
3143      -     (dconjg(inpup(idc2,idk2))*dconjg(yup(34))*inpup(idc1,idb2) - 
3144      -     dotup(idc1,idc1)*yup(13))) + dconjg(inpup(idq0,idc2))
3145      -     *dconjg(yup(34))*yup(10)*(yup(20) + yup(39)))))/yup(8)
3146         bfun(2,ii,kk)=(4*dconjg(yup(9))*pmomup(5,idb1)*
3147      -     (-(dconjg(inpup(idq0,idk2))*dconjg(yup(13))*
3148      -     dotup(idc1,idc1)*yup(13)) - dconjg(inpup(idc2,idk2))*
3149      -     (-(dconjg(inpup(idq0,idk2))*dconjg(yup(13))*
3150      -     dconjg(yup(34))*inpup(idc1,idb2)) + dconjg(yup(2))*yup(4)
3151      -     *yup(19)) -dconjg(inpup(idq0,idc2))*yup(10)*
3152      -     (-(yup(4)*(dconjg(yup(2)) + yup(25))) + 
3153      -     dconjg(yup(34))*(yup(20) + yup(39)))))/yup(8)
3154           bfun(3,ii,kk)=(4*pmomup(5,idb1)*(-(dotup(idc1,idc1)*yup(19)*
3155      -     (-(dconjg(inpup(idb1,idq0))*dconjg(yup(1))*yup(17)) + 
3156      -     dconjg(inpup(idq0,idk2))*yup(25)*yup(31)))+dconjg(yup(1))
3157      -     *dconjg(yup(34))*(dconjg(inpup(idc2,idk2))*yup(19)*yup(20) - 
3158      -     dconjg(inpup(idq0,idc2))*yup(16)*
3159      -     (yup(20) + yup(39)))))/yup(8)
3160           bfun(4,ii,kk)=(-4*dconjg(yup(9))*pmomup(5,idb1)*
3161      -     (dconjg(inpup(idb1,idq0))*dotup(idc1,idc1)*yup(17)*yup(19) + 
3162      -     dconjg(inpup(idc2,idk2))*yup(19)*(dconjg(yup(34))*yup(20)
3163      -     - yup(4)*yup(25)) -dconjg(inpup(idq0,idc2))*yup(16)*
3164      -     (-(yup(4)*(dconjg(yup(2)) + yup(25))) + 
3165      -     dconjg(yup(34))*(yup(20) + yup(39)))))/yup(8)
3166           bfun(5,ii,kk)=(-2*dconjg(inpup(idq0,idk2))*dconjg(yup(9))*
3167      -     pmomup(5,idb1)*yup(28)*(yup(29) + yup(30)))/yup(8)
3168         bfun(8,ii,kk)=(4*dconjg(yup(9))*pmomup(5,idb1)*(dotup(idc1,idc1)
3169      -     *(-(dconjg(inpup(idb2,idq0))*yup(13))-dconjg(inpup(idb1,idq0) 
3170      -     )*yup(17))*yup(19) - dconjg(inpup(idq0,idc2))*
3171      -     (2*dotup(idc1,idk1)*yup(14)*(yup(29)+yup(30))+(yup(12)-
3172      -     yup(18))*(yup(4)*(dconjg(yup(2)) + yup(25)) - 
3173      -     dconjg(yup(34))*(yup(20) + yup(39))))))/yup(8)
3174           bfun(9,ii,kk)=0.0d0
3175 c...helicity(58,2)=(-,+,-,-,-,+)

3176         do mm=1,9
3177            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
3178      &     -dconjg(bfun(mm,ii,kk))
3179         end do
3180 
3181 c...helicity(43,2)=(+,-,+,+,-,+)=helicity(42,1)(k2,k1)

3182         kk=43
3183         bfun(1,ii,kk)=(-4*dconjg(yup(10))*(dconjg(inpup(idq0,idk1))
3184      -     *dconjg(yup(5)) -dconjg(inpup(idq0,idc2))*dconjg(yup(34)))*
3185      -     pmomup(5,idb1)*yup(1)*(yup(20) + yup(39) - yup(40)))
3186      -     /dconjg(yup(8))
3187         bfun(2,ii,kk)=(4*dconjg(yup(10))*pmomup(5,idb1)*
3188      -     (dotup(idc1,idc1)*(-(dconjg(inpup(idb2,idq0))*yup(3)) - 
3189      -     dconjg(inpup(idb1,idq0))*yup(6)-dconjg(inpup(idq0,idk1))
3190      -     *yup(19))*yup(31)-dconjg(inpup(idq0,idc2))*dconjg(yup(34))
3191      -     *yup(9)*(yup(20)+yup(39)-yup(40))))/dconjg(yup(8))
3192           bfun(3,ii,kk)=(4*dconjg(yup(16))*pmomup(5,idb1)*yup(1)*
3193      -     (dconjg(inpup(idq0,idk2))*dconjg(yup(18))*(-yup(28)+yup(31))+ 
3194      -     (dconjg(inpup(idq0,idk1))*dconjg(yup(5)) - 
3195      -     dconjg(inpup(idq0,idc2))*dconjg(yup(34)))*
3196      -     (yup(20) + yup(39))))/dconjg(yup(8))
3197           bfun(4,ii,kk)=(4*dconjg(yup(16))*pmomup(5,idb1)*
3198      -     (dconjg(inpup(idb2,idq0))*dotup(idc1,idc1)*yup(3)*
3199      -     yup(31) + dconjg(inpup(idb1,idq0))*dotup(idc1,idc1)
3200      -     *yup(6)*yup(31) +dconjg(inpup(idq0,idk2))*
3201      -     (dconjg(yup(18))*yup(9)*yup(28)+dotup(idc1,idc1)*yup(8) 
3202      -     *yup(31))+dconjg(inpup(idq0,idc2))*dconjg(yup(34))*yup(9)*
3203      -     (yup(20) + yup(39))))/dconjg(yup(8))
3204           bfun(5,ii,kk)=0.0d0
3205           bfun(8,ii,kk)=(4*pmomup(5,idb1)*((-dconjg(yup(12)) 
3206      -     + dconjg(yup(18)))*dotup(idc1,idc1)*
3207      -     (-(dconjg(inpup(idb2,idq0))*yup(3)) - 
3208      -     dconjg(inpup(idb1,idq0))*yup(6))*yup(31) - 
3209      -     dconjg(inpup(idq0,idc2))*(-((dconjg(yup(10)) +
3210      -     dconjg(yup(16)))*(dconjg(yup(18))*yup(9)*yup(14) + 
3211      -     2*dotup(idc1,idk1)*yup(4)*yup(27))) +(-dconjg(yup(12)) 
3212      -     + dconjg(yup(18)))*dconjg(yup(34))*yup(9)*(yup(20) 
3213      -     + yup(39)))))/dconjg(yup(8))
3214           bfun(9,ii,kk)=(4*dconjg(inpup(idq0,idk1))*dconjg(yup(15))*
3215      -     pmomup(5,idb1)*yup(28)*(yup(20)+yup(39)))/dconjg(yup(8))
3216 c...helicity(59,2)=(-,+,-,-,+,-)

3217         do mm=1,9
3218            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
3219      &     -dconjg(bfun(mm,ii,kk))
3220         end do
3221 
3222 c...helicity(44,2)=(+,-,+,+,-,-)=helicity(44,1)(k2,k1)

3223         kk=44
3224         bfun(1,ii,kk)=(4*dconjg(inpup(idq0,idc2))*dconjg(yup(1))*
3225      -     dconjg(yup(10))*dconjg(yup(34))*pmomup(5,idb1)*
3226      -     (yup(20) + yup(39) - yup(40)))/xup(2)
3227         bfun(2,ii,kk)=(4*dconjg(inpup(idq0,idc2))*dconjg(yup(9))*
3228      -     dconjg(yup(10))*pmomup(5,idb1)*(yup(4)*(dconjg(yup(2))
3229      -     - dconjg(yup(7)) +yup(25)) - dconjg(yup(34))*(yup(20) + 
3230      -     yup(39) - yup(40))))/xup(2)
3231         bfun(3,ii,kk)=(4*dconjg(yup(1))*dconjg(yup(16))*pmomup(5,idb1)*
3232      -     (-(dconjg(inpup(idq0,idk2))*dconjg(yup(18))*
3233      -     yup(28)) -  dconjg(inpup(idq0,idc2))*dconjg(yup(34))*
3234      -     (yup(20) + yup(39))))/xup(2)
3235         bfun(4,ii,kk)=(-4*dconjg(yup(9))*dconjg(yup(16))*pmomup(5,idb1)*
3236      -     (dconjg(inpup(idq0,idc2))*dconjg(inpup(idq0,idk2))
3237      -     *inpup(idk2,idk1)*yup(4) - dconjg(inpup(idq0,idk2))*
3238      -     dconjg(yup(18))*yup(28) -dconjg(inpup(idq0,idc2))*
3239      -     (-(yup(4)*(dconjg(yup(2)) + yup(25))) + 
3240      -     dconjg(yup(34))*(yup(20) + yup(39)))))/xup(2)
3241           bfun(5,ii,kk)=0.0d0
3242           bfun(8,ii,kk)=(-4*dconjg(inpup(idq0,idc2))*dconjg(yup(9))*
3243      -     (dconjg(yup(12)) - dconjg(yup(18)))*pmomup(5,idb1)*
3244      -     ((dconjg(yup(10)) + dconjg(yup(16)))*yup(14) + 
3245      -     yup(4)*(dconjg(yup(2)) + yup(25)) - 
3246      -     dconjg(yup(34))*(yup(20) + yup(39))))/xup(2)
3247           bfun(9,ii,kk)=0.0d0
3248 c...helicity(60,2)=(-,+,-,-,+,+)

3249         do mm=1,9
3250            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
3251      &     -dconjg(bfun(mm,ii,kk))
3252         end do
3253 
3254 c...helicity(45,2)=(+,-,+,-,+,+)=helicity(45,1)(k2,k1)

3255         kk=45
3256         bfun(1,ii,kk)=(-4*pmomup(5,idb1)*pmomup(5,idc1)*
3257      -     (dconjg(inpup(idq0,idk1))*yup(10)*yup(31)*
3258      -     (-(dconjg(inpup(idb1,idq0))*yup(32)) - 
3259      -     dconjg(inpup(idb2,idq0))*yup(42)) - 
3260      -     dconjg(inpup(idq0,idk2))*dconjg(yup(13))*
3261      -     (-(dconjg(inpup(idk2,idk1))*yup(31)*yup(42)) + 
3262      -     dconjg(inpup(idq0,idk2))*yup(1)*
3263      -     (dconjg(yup(36)) + yup(42)))))/xup(1)
3264         bfun(2,ii,kk)=(4*pmomup(5,idb1)*pmomup(5,idc1)*
3265      -     (-(dconjg(inpup(idq0,idk1))*dconjg(yup(4))*
3266      -     (dconjg(inpup(idk2,idk1))*yup(19)*yup(24) + 
3267      -     dconjg(inpup(idq0,idk1))*yup(10)*(yup(23)+yup(24))))- 
3268      -     dconjg(inpup(idq0,idk2))**2*dconjg(yup(13))*
3269      -     yup(9)*(dconjg(yup(36)) + yup(42))))/xup(1)
3270           bfun(3,ii,kk)=(4*pmomup(5,idb1)*pmomup(5,idc1)*
3271      -     (dconjg(inpup(idq0,idk2))*yup(1)*yup(19)*
3272      -     (-(dconjg(inpup(idc1,idq0))*yup(20)) + 
3273      -     dconjg(inpup(idq0,idc2))*yup(23)) +yup(31)* 
3274      -     (dconjg(inpup(idc1,idq0))*dconjg(inpup(idk2,idk1))
3275      -     *yup(19)*yup(20) +dconjg(inpup(idq0,idk1))*yup(16)*
3276      -     (-(dconjg(inpup(idb1,idq0))*yup(32)) - 
3277      -     dconjg(inpup(idb2,idq0))*yup(42)))))/xup(1)
3278           bfun(4,ii,kk)=(-4*pmomup(5,idb1)*pmomup(5,idc1)*
3279      -     (dconjg(inpup(idq0,idk2))*yup(9)*yup(19)*
3280      -     (-(dconjg(inpup(idc1,idq0))*yup(20)) + 
3281      -     dconjg(inpup(idq0,idc2))*yup(23)) - 
3282      -     dconjg(inpup(idq0,idk1))*dconjg(yup(4))*
3283      -     (dconjg(inpup(idk2,idk1))*yup(19)*yup(23) + 
3284      -     dconjg(inpup(idq0,idk1))*yup(16)*
3285      -     (yup(23) + yup(24)))))/xup(1)
3286           bfun(5,ii,kk)=(2*dconjg(inpup(idq0,idk1))*
3287      -     dconjg(inpup(idq0,idk2))*pmomup(5,idb1)*
3288      -     pmomup(5,idc1)*(yup(27) + yup(28))*
3289      -     (yup(29) + yup(30)))/xup(1)
3290           bfun(8,ii,kk)=(4*pmomup(5,idb1)*pmomup(5,idc1)*
3291      -     (dconjg(inpup(idq0,idk2))*dconjg(yup(14))*
3292      -     (-(dconjg(inpup(idq0,idk2))*yup(9)) + 
3293      -     dconjg(inpup(idq0,idk1))*yup(12)) + 
3294      -     dconjg(inpup(idq0,idk1))**2*dconjg(yup(4))*
3295      -     (yup(12) - yup(18)))*(yup(23) + yup(24)))/xup(1)
3296           bfun(9,ii,kk)=0.0d0
3297 c...helicity(61,2)=(-,+,-,+,-,-)

3298         do mm=1,9
3299            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
3300      &     dconjg(bfun(mm,ii,kk))
3301         end do
3302 
3303 c...helicity(46,2)=(+,-,+,-,+,-)=helicity(47,1)(k2,k1)

3304         kk=46
3305         bfun(1,ii,kk)=(4*dconjg(inpup(idq0,idk2))*dconjg(yup(1))*
3306      -     pmomup(5,idb1)*pmomup(5,idc1)*(dconjg(inpup(idq0,idk1))
3307      -     *dconjg(yup(2))*yup(19) + dconjg(inpup(idq0,idk2))*
3308      -     dconjg(yup(13))*(dconjg(yup(36)) + yup(42))))/yup(8)
3309         bfun(2,ii,kk)=(-4*dconjg(inpup(idq0,idk2))**2*dconjg(yup(9))*
3310      -     dconjg(yup(13))*pmomup(5,idb1)*pmomup(5,idc1)*
3311      -     (dconjg(yup(36)) - yup(38) + yup(42)))/yup(8)
3312           bfun(3,ii,kk)=(4*dconjg(inpup(idq0,idk2))*dconjg(yup(1))*
3313      -     pmomup(5,idb1)*pmomup(5,idc1)*yup(19)*
3314      -     (-(dconjg(inpup(idc1,idq0))*yup(20))+dconjg(inpup(idq0,idc2)) 
3315      -     *yup(23) - dconjg(inpup(idq0,idk1))*yup(25)))/yup(8)
3316           bfun(4,ii,kk)=(-4*dconjg(inpup(idq0,idk2))*dconjg(yup(9))*
3317      -     pmomup(5,idb1)*pmomup(5,idc1)*yup(19)*
3318      -     (-(dconjg(inpup(idc1,idq0))*yup(20))-dconjg(inpup(idb1,idq0)) 
3319      -     *yup(21) +dconjg(inpup(idq0,idc2))*yup(23)))/yup(8)
3320           bfun(5,ii,kk)=0.0d0
3321           bfun(8,ii,kk)=(-4*dconjg(inpup(idq0,idk2))**2*dconjg(yup(9))*
3322      -     dconjg(yup(14))*pmomup(5,idb1)*pmomup(5,idc1)*(yup(23) 
3323      -     + yup(24)))/yup(8)
3324           bfun(9,ii,kk)=0.0d0
3325 c...helicity(62,2)=(-,+,-,+,-,+)

3326         do mm=1,9
3327            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
3328      &     dconjg(bfun(mm,ii,kk))
3329         end do
3330 
3331 c...helicity(47,2)=(+,-,+,-,-,+)=helicity(46)(k2,k1)

3332         kk=47
3333         bfun(1,ii,kk)=(-4*dconjg(inpup(idq0,idk1))*dconjg(yup(10))*
3334      -     pmomup(5,idb1)*pmomup(5,idc1)*yup(31)*
3335      -     (-(dconjg(inpup(idb1,idq0))*yup(32)) - 
3336      -     dconjg(inpup(idc1,idq0))*yup(40) - 
3337      -     dconjg(inpup(idb2,idq0))*yup(42)))/dconjg(yup(8))
3338         bfun(2,ii,kk)=(-4*dconjg(inpup(idq0,idk1))**2*dconjg(yup(4))*
3339      -     dconjg(yup(10))*pmomup(5,idb1)*pmomup(5,idc1)*
3340      -     (yup(23) + yup(24) - yup(33)))/dconjg(yup(8))
3341           bfun(3,ii,kk)=(4*dconjg(inpup(idq0,idk1))*dconjg(yup(16))*
3342      -     pmomup(5,idb1)*pmomup(5,idc1)*yup(31)*
3343      -     (-(dconjg(inpup(idq0,idk2))*dconjg(yup(18))) - 
3344      -     dconjg(inpup(idb1,idq0))*yup(32) - 
3345      -     dconjg(inpup(idb2,idq0))*yup(42)))/dconjg(yup(8))
3346           bfun(4,ii,kk)=(-4*dconjg(inpup(idq0,idk1))*dconjg(yup(16))*
3347      -     pmomup(5,idb1)*pmomup(5,idc1)*(-(dconjg(inpup(idq0,idk1))
3348      -     *dconjg(yup(4))*(yup(23)+yup(24)))-dconjg(inpup(idq0,idk2))
3349      -     *dconjg(yup(11))*yup(31)))/dconjg(yup(8))
3350           bfun(5,ii,kk)=0.0d0
3351           bfun(8,ii,kk)=(4*dconjg(inpup(idq0,idk1))**2*dconjg(yup(4))*
3352      -     (dconjg(yup(12)) - dconjg(yup(18)))*pmomup(5,idb1)*
3353      -     pmomup(5,idc1)*(yup(23) + yup(24)))/dconjg(yup(8))
3354           bfun(9,ii,kk)=0.0d0
3355 c...helicity(63,2)=(-,+,-,+,+,-)

3356         do mm=1,9
3357            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
3358      &     dconjg(bfun(mm,ii,kk))
3359         end do
3360 
3361 c...helicity(48,2)=(+,-,+,-,-,-)=helicity(48,1)(k2,k1)

3362         kk=48
3363         bfun(1,ii,kk)=0.0d0
3364         bfun(2,ii,kk)=0.0d0
3365           bfun(3,ii,kk)=0.0d0
3366           bfun(4,ii,kk)=0.0d0
3367           bfun(5,ii,kk)=0.0d0
3368           bfun(8,ii,kk)=0.0d0
3369           bfun(9,ii,kk)=0.0d0
3370 c...helicity(64,2)=(-,+,-,+,+,+)

3371         do mm=1,9
3372            if (mm.ne.6 .and. mm.ne.7) bfun(mm,ii,kk+16)=
3373      &     dconjg(bfun(mm,ii,kk))
3374         end do
3375 
3376 1222  continue  
3377         end
3378 
3379 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

3380 c       nine basic functions from first by b quark <-> c quark.      c

3381 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

3382         subroutine bthird
3383         implicit double precision (a-h,o-z)
3384         implicit integer (i-n)
3385         double complex bfun,colmat,yup,xup,inpup,bundamp
3386       common/upcom/ecm,pmbc,pmb,pmc,fbcc,pmomup(5,8),
3387      &  colmat(10,64),bundamp(4),pmomzero(5,8)
3388       common/tryup/bfun(9,4,64),yup(100),xup(2),idp,idq0,idk1,idk2,
3389      &  idb1,idb2,idc1,idc2
3390       common/counter/ibcstate,nev
3391 c...for transform the subprocess information, i.e.,  whether using

3392 c...the subprocess q\bar{q}->bc+b+\bar{c} to generate events.

3393       common/qqbar/iqqbar,iqcode
3394 
3395          ii=3
3396 c...if (l1.ne.l3 .and. l2.ne.l4) then

3397 c...hel(i,3)(l1,l2,l3,l4,l5,l6)=hel(i,1)(-l1,-l2,-l3,-l4,l5,l6)

3398 c...(q_b1<->q_c1,q_b2<->q_c2), where l1,...,l6 are helicities of q_b1,q_b2,

3399 c...q_c1,q_c2,k_1,k_2; (l2=l3);

3400 c...if (l1.ne.l3 .and. l2.eq.l4) then

3401 c...hel(i,3)(l1,l2,l3,l4,l5,l6)=hel(i,1)(-l1,l2,-l3,l4,l5,l6)

3402 c...(q_b1<->q_c1,q_b2<->q_c2)

3403 c...if (l1.eq.l3 .and. l2.ne.l4) then

3404 c...hel(i,3)(l1,l2,l3,l4,l5,l6)=hel(i,1)(l1,-l2,l3,-l4,l5,l6)

3405 c...(q_b1<->q_c1,q_b2<->q_c2)

3406 c...if (l1.eq.l3 .and. l2.eq.l4) then

3407 c...hel(i,3)(l1,l2,l3,l4,l5,l6)=hel(i,1)(l1,l2,l3,l4,l5,l6)

3408 c...(q_b1<->q_c1,q_b2<->q_c2)

3409 
3410        if(iqqbar.eq.0) then
3411        do kk=1,64
3412           bfun(1,ii,kk)=bfun(4,2,kk)
3413         bfun(2,ii,kk)=bfun(2,2,kk)
3414           bfun(3,ii,kk)=bfun(3,2,kk)
3415           bfun(4,ii,kk)=bfun(1,2,kk)
3416           bfun(5,ii,kk)=bfun(5,2,kk)
3417          end do
3418          end if
3419 
3420 c...helicity(1,3)=(+,+,+,+,+,+)=helicity(1,1)(q_c1,q_c2,q_b1,q_b2)

3421         kk=1
3422           if(iqqbar.eq.0) then
3423           bfun(8,ii,kk)=(-4*dotup(idc1,idc1)*yup(29)*(yup(9)*yup(16)*
3424      -     yup(19)+(yup(7)*yup(16)+yup(2)*(-yup(12) + yup(18)))*
3425      -     yup(31)) +4*dconjg(yup(34))*yup(9)*(yup(12) - yup(18))*
3426      -     (-(dconjg(yup(24))*yup(20)) +dotup(idb1,idb1)*yup(34)) + 
3427      -     4*dconjg(yup(35))*(dotup(idc1,idc1)*yup(9)*(yup(12)-yup(18))*
3428      -     yup(35) + 2*dconjg(inpup(idk2,idk1))*dotup(idc1,idk1)*
3429      -     inpup(idq0,idb1)*yup(27)*yup(36)))/xup(1)
3430           bfun(9,ii,kk)=0.0d0
3431 c...helicity(17,3)=(-,-,-,-,-,-)

3432           do mm=8,9
3433            bfun(mm,ii,kk+16)=dconjg(bfun(mm,ii,kk))
3434         end do
3435           end if
3436 
3437           if(iqqbar.eq.1) then
3438           bfun(1,ii,kk)=-4*(dotup(idb1,idb1)*(dotup(idc1,idc1)*yup(8)
3439      -     *yup(30) +dconjg(yup(34))*(-(dconjg(inpup(idq0,idk1))*
3440      -     dconjg(yup(24))*inpup(idc1,idk2))+dconjg(inpup(idc2,idk1))
3441      -     *inpup(idb1,idk2)*yup(43)+ yup(5)*(yup(44) -yup(45)))) + 
3442      -     (-(dconjg(yup(24))*dconjg(yup(34))*yup(20))+dconjg(yup(35))
3443      -     *dotup(idc1,idc1)*yup(35))*yup(46) + dconjg(yup(35))*
3444      -     (dconjg(