Exp=-
@p1=
@c1=result =  CalculateEx_2(DecArray,temp_a, temp_b, c, d,KeyPath,16, 2000)
@p2=
@c2=result =  CalculateEx_2(DecArray,temp_a, temp_b, c, d,KeyPath,16, 2000)
@va=temp_a
@vb=temp_b
@vc=c
@vd=d
ext=
mgs=
@end
public function long ydecrease (  long a, long b );
//YDecrease:
//Ŀģ
//aҪı1
//bҪı2
//ؽĽ
//LastError=0ȷLastErrorΪμֲ
   Boolean b_reverse   //ֲڴ淴ת
   Boolean b_negative
	Integer temp
	b_negative = False //ֲڴǷ

	byte InArray[16]
	byte DecArray []
    int n
	//칤ɵļܺļܱʽ
	//бܵıʽΪ@exp
	InArray[1]=@ak100;InArray[2]=@ak101;InArray[3]=@ak102; InArray[4]=@ak103;
	InArray[5]=@ak104;InArray[6]=@ak105;InArray[7]=@ak106; InArray[8]=@ak107;
	InArray[9]=@ak108;InArray[10]=@ak109;InArray[11]=@ak110;InArray[12]=@ak111;
	InArray[13]=@ak112;InArray[14]=@ak113;InArray[15]=@ak114;InArray[16]=@ak115;
	//ܺıʽ͵ннܲ¼ܣʹӦȨţעת
	//Ȼ󷵻ؼܺݣüܺüӦ
	//ֻбӦȨŽתݲܱӦļܲ
	for n=1 to 16
			DecArray[n]=0
	next 
	LastError=E_Dec_6(E_HKey, E_LKey, InArray, DecArray, KeyPath)
	if  LastError<> 0 then
	  return 0
	end if
///////////////////////////////////////////////////////////////////////////////////////   

    //a,bΪΪ
    If ((a > 0 And b > 0) Or (a < 0 And b < 0)) Then
        If (a < 0 And b < 0) Then
            a = -a
		b = -b
		b_negative = True //Ϊa,bΪȻø
        End If
        //ֲ
        Integer temp_a 
        Integer temp_b 
        //a256ȡ
        //ΪʲôҪab256ȡأ
        //ΪCal_2ʽֻֽڱܳ256
        temp_a = (a - (a / 256) * 256)
        //b120ȡ
        temp_b = (b - (b / 256) * 256)
        //aȥ//bȥ
        //ΪʲôҪֱa,bȥأ
        //Ϊ׼ڼڲμ㣬a,bҪֱȥԼ
        a = a - temp_a
		  b = b - temp_b
        Integer result  //ֲ,ؽ
        Integer c 
        Integer d 
	c = rand(256)-1
	 d = rand(256)-1
        //жtemp_atemp_bĴС
        //temp_atemp_bCal_2ĵһΪtemp_a
        //temp_aСtemp_bCal_2ĵһΪtemp_b
        //ΪʲôҪأΪڲֻa>bļa<bѭ޷ʹ÷ص
        If (temp_a > temp_b) Then
            //ⲽa,bĸ͵ڲ
            //@fļе@pλдмʽ
            @1
            //ͬʱδת
            b_reverse = True
        Else
            //ⲽa,bĸ͵ڲ
            //@fļе@pλдмʽ
      		temp=temp_b
		temp_b=temp_a
		temp_a=temp
            @1
            //ͬʱѷת
            b_reverse = False
        End If
        If (result <> 0) Then
            LastError = result //ô
        End If
        //ڼĽصtemp_a
        //ٽǰȥa,bͿˡ
        //ݷתòͬ
        If (b_reverse) Then
            If (b_negative) Then
                return -(a - b + temp_a) //δתa,bΪ
            Else
                return a - b + temp_a //δתa,bΪ
            End If
        Else
            If (b_negative) Then
                return -(a - b - temp_a) //ѷתa,bΪ,
            Else
                return a - b - temp_a //ѷתa,bΪ,
            End If
       End If
		 end if
       return a - b

end function
