8 &function_begin
($name,"");
15 &mov
($r,&wparam
(0)); #
16 &mov
($a,&wparam
(1)); #
17 &mov
($num,&wparam
(2)); #
19 &and($num,0xfffffff8); # num / 8
20 &jz
(&label
("sw_finish"));
22 &set_label
("sw_loop",0);
23 for ($i=0; $i<32; $i+=4)
26 &mov
("eax",&DWP
($i,$a,"",0)); # *a
28 &mul
("eax"); # *a * *a
29 &mov
(&DWP
($i*2,$r,"",0),"eax"); #
30 &mov
(&DWP
($i*2+4,$r,"",0),"edx");#
37 &jnz
(&label
("sw_loop"));
39 &set_label
("sw_finish",0);
40 &mov
($num,&wparam
(2)); # get num
42 &jz
(&label
("sw_end"));
44 for ($i=0; $i<7; $i++)
46 &comment
("Tail Round $i");
47 &mov
("eax",&DWP
($i*4,$a,"",0)); # *a
49 &mul
("eax"); # *a * *a
50 &mov
(&DWP
($i*8,$r,"",0),"eax"); #
51 &dec
($num) if ($i != 7-1);
52 &mov
(&DWP
($i*8+4,$r,"",0),"edx");
53 &jz
(&label
("sw_end")) if ($i != 7-1);
55 &set_label
("sw_end",0);