TD1:=C;
TD2:=IF(TD1=1 AND REF(TD1,-1)=1 AND REF(TD1,-2)=1 AND REF(TD1,-3)=1 AND
REF(TD1,-4)=1 AND REF(TD1,-5)=1 AND REF(TD1,-6)=1 AND REF(TD1,-7)=1 AND
REF(TD1,-8)=1, 1,0);
TD3:=IF(REF(C,-9)>=REF(C,-13),1,0);
TD4:=IF(TD2=1 AND TD3=1,1,0);
TD5:=IF(H>=REF(LLV(L,5),-3),1,0);
D8:=IF(REF(TD4,1)=1 AND TD5=1,1,0);