Correct PPTP server firewall rules chain.
[tomato/davidwu.git] / release / src / router / nettle / x86 / sha1-compress.asm
blob777615dc13b1cbd32e80477b1e2c0cdf08cf4dd6
1 C nettle, low-level cryptographics library
2 C
3 C Copyright (C) 2004, Niels Möller
4 C
5 C The nettle library is free software; you can redistribute it and/or modify
6 C it under the terms of the GNU Lesser General Public License as published by
7 C the Free Software Foundation; either version 2.1 of the License, or (at your
8 C option) any later version.
9 C
10 C The nettle library is distributed in the hope that it will be useful, but
11 C WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 C or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
13 C License for more details.
15 C You should have received a copy of the GNU Lesser General Public License
16 C along with the nettle library; see the file COPYING.LIB. If not, write to
17 C the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 C MA 02111-1301, USA.
20 C Register usage
21 define(<SA>,<%eax>)
22 define(<SB>,<%ebx>)
23 define(<SC>,<%ecx>)
24 define(<SD>,<%edx>)
25 define(<SE>,<%ebp>)
26 define(<DATA>,<%esp>)
27 define(<T1>,<%edi>)
28 define(<T2>,<%esi>)
30 C Constants
31 define(<K1VALUE>, <0x5A827999>) C Rounds 0-19
32 define(<K2VALUE>, <0x6ED9EBA1>) C Rounds 20-39
33 define(<K3VALUE>, <0x8F1BBCDC>) C Rounds 40-59
34 define(<K4VALUE>, <0xCA62C1D6>) C Rounds 60-79
36 C Reads the input via T2 into register, byteswaps it, and stores it in the DATA array.
37 C SWAP(index, register)
38 define(<SWAP>, <
39 movl OFFSET($1)(T2), $2
40 bswap $2
41 movl $2, OFFSET($1) (DATA)
42 >)dnl
44 C The f functions,
46 C f1(x,y,z) = z ^ (x & (y ^ z))
47 C f2(x,y,z) = x ^ y ^ z
48 C f3(x,y,z) = (x & (y ^ z)) + (y & z)
49 C f4 = f2
51 C This form for f3 was suggested by George Spelvin. The terms can be
52 C added into the result one at a time, saving one temporary.
54 C The form of one sha1 round is
56 C a' = e + a <<< 5 + f( b, c, d ) + k + w;
57 C b' = a;
58 C c' = b <<< 30;
59 C d' = c;
60 C e' = d;
62 C where <<< denotes rotation. We permute our variables, so that we
63 C instead get
65 C e += a <<< 5 + f( b, c, d ) + k + w;
66 C b <<<= 30
68 dnl ROUND_F1(a, b, c, d, e, i)
69 define(<ROUND_F1>, <
70 mov OFFSET(eval($6 % 16)) (DATA), T1
71 xor OFFSET(eval(($6 + 2) % 16)) (DATA), T1
72 xor OFFSET(eval(($6 + 8) % 16)) (DATA), T1
73 xor OFFSET(eval(($6 + 13) % 16)) (DATA), T1
74 rol <$>1, T1
75 mov T1, OFFSET(eval($6 % 16)) (DATA)
76 mov $4, T2
77 xor $3, T2
78 and $2, T2
79 xor $4, T2
80 rol <$>30, $2
81 lea K1VALUE (T1, $5), $5
82 mov $1, T1
83 rol <$>5, T1
84 add T1, $5
85 add T2, $5
88 dnl ROUND_F1_NOEXP(a, b, c, d, e, i)
89 define(<ROUND_F1_NOEXP>, <
90 mov $4, T2
91 xor $3, T2
92 mov $1, T1
93 and $2, T2
94 add OFFSET($6) (DATA), $5
95 xor $4, T2
96 add T2, $5
97 rol <$>30, $2
98 rol <$>5, T1
99 lea K1VALUE (T1, $5), $5
102 dnl ROUND_F2(a, b, c, d, e, i, k)
103 define(<ROUND_F2>, <
104 mov OFFSET(eval($6 % 16)) (DATA), T1
105 xor OFFSET(eval(($6 + 2) % 16)) (DATA), T1
106 xor OFFSET(eval(($6 + 8) % 16)) (DATA), T1
107 xor OFFSET(eval(($6 + 13) % 16)) (DATA), T1
108 rol <$>1, T1
109 mov T1, OFFSET(eval($6 % 16)) (DATA)
110 mov $4, T2
111 xor $3, T2
112 xor $2, T2
113 rol <$>30, $2
114 lea $7 (T1, $5), $5
115 mov $1, T1
116 rol <$>5, T1
117 add T1, $5
118 add T2, $5
121 dnl ROUND_F3(a, b, c, d, e, i)
122 define(<ROUND_F3>, <
123 mov OFFSET(eval($6 % 16)) (DATA), T1
124 xor OFFSET(eval(($6 + 2) % 16)) (DATA), T1
125 xor OFFSET(eval(($6 + 8) % 16)) (DATA), T1
126 xor OFFSET(eval(($6 + 13) % 16)) (DATA), T1
127 rol <$>1, T1
128 mov T1, OFFSET(eval($6 % 16)) (DATA)
129 mov $4, T2
130 and $3, T2
131 lea K3VALUE (T1, $5), $5
132 mov $4, T1
133 xor $3, T1
134 and $2, T1
135 add T2, $5
136 rol <$>30, $2
137 mov $1, T2
138 rol <$>5, T2
139 add T1, $5
140 add T2, $5
143 .file "sha1-compress.asm"
145 C _nettle_sha1_compress(uint32_t *state, uint8_t *data)
147 .text
149 PROLOGUE(_nettle_sha1_compress)
150 C save all registers that need to be saved
151 C 88(%esp) data
152 C 84(%esp) state
153 C 80(%esp) Return address
154 pushl %ebx C 76(%esp)
155 pushl %ebp C 72(%esp)
156 pushl %esi C 68(%esp)
157 pushl %edi C 64(%esp)
159 subl $64, %esp C %esp = W
161 C Loop-mixed to 520 cycles (for the complete function call) on
162 C AMD K7.
163 ALIGN(32)
164 mov 88(%esp), T2
165 mov OFFSET(2)(T2), %ecx
166 mov OFFSET(0)(T2), %eax
167 bswap %ecx
168 bswap %eax
169 mov %ecx, OFFSET(2) (DATA)
170 mov %eax, OFFSET(0) (DATA)
171 mov OFFSET(3)(T2), %edx
172 mov OFFSET(6)(T2), %ecx
173 mov OFFSET(4)(T2), %eax
174 mov OFFSET(1)(T2), %ebx
175 bswap %ebx
176 bswap %eax
177 bswap %ecx
178 mov %ecx, OFFSET(6) (DATA)
179 mov %eax, OFFSET(4) (DATA)
180 bswap %edx
181 mov %edx, OFFSET(3) (DATA)
182 mov %ebx, OFFSET(1) (DATA)
183 mov OFFSET(10)(T2), %ecx
184 mov OFFSET(8)(T2), %eax
185 mov OFFSET(7)(T2), %edx
186 bswap %eax
187 bswap %edx
188 mov %edx, OFFSET(7) (DATA)
189 mov OFFSET(5)(T2), %ebx
190 mov %eax, OFFSET(8) (DATA)
191 mov OFFSET(11)(T2), %edx
192 bswap %ecx
193 bswap %edx
194 mov OFFSET(12)(T2), %eax
195 bswap %ebx
196 mov %ecx, OFFSET(10) (DATA)
197 mov %ebx, OFFSET(5) (DATA)
198 mov %edx, OFFSET(11) (DATA)
199 mov OFFSET(15)(T2), %edx
200 mov 84(%esp),T1
201 mov OFFSET(9)(T2), %ebx
202 bswap %edx
203 bswap %ebx
204 bswap %eax
205 mov OFFSET(14)(T2), %ecx
206 mov %edx, OFFSET(15) (DATA)
207 bswap %ecx
208 mov %ecx, OFFSET(14) (DATA)
209 mov %ebx, OFFSET(9) (DATA)
210 mov OFFSET(13)(T2), %ebx
211 mov 12(T1), SD
212 bswap %ebx
213 mov %ebx, OFFSET(13) (DATA)
214 mov 8(T1), SC
215 mov 16(T1), SE
216 mov 4(T1), SB
217 mov SD, T2
218 add OFFSET(0) (DATA), SE
219 xor SC, T2
220 mov %eax, OFFSET(12) (DATA)
221 mov (T1), SA
222 and SB, T2
223 xor SD, T2
224 rol $30, SB
225 add T2, SE
226 mov SA, T1
227 mov SC, T2
228 add OFFSET(1) (DATA), SD
229 rol $5, T1
230 xor SB, T2
231 and SA, T2
232 xor SC, T2
233 lea K1VALUE (T1, SE), SE
234 add T2, SD
235 mov SB, T2
236 rol $30, SA
237 xor SA, T2
238 and SE, T2
239 mov SE, T1
240 add OFFSET(2) (DATA), SC
241 rol $30, SE
242 xor SB, T2
243 rol $5, T1
244 lea K1VALUE (T1, SD), SD
245 mov SD, T1
246 rol $5, T1
247 add T2, SC
248 mov SA, T2
249 xor SE, T2
250 lea K1VALUE (T1, SC), SC
251 and SD, T2
252 xor SA, T2
253 add OFFSET(3) (DATA), SB
254 mov SC, T1
255 add T2, SB
256 mov SE, T2
257 rol $30, SD
258 xor SD, T2
259 and SC, T2
260 rol $5, T1
261 xor SE, T2
262 add OFFSET(4) (DATA), SA
263 lea K1VALUE (T1, SB), SB
264 add T2, SA
265 rol $30, SC
266 mov SD, T2
267 xor SC, T2
268 and SB, T2
269 mov SB, T1
270 rol $5, T1
271 add OFFSET(5) (DATA), SE
272 rol $30, SB
273 xor SD, T2
274 add T2, SE
275 mov SC, T2
276 xor SB, T2
277 lea K1VALUE (T1, SA), SA
278 mov SA, T1
279 add OFFSET(6) (DATA), SD
280 and SA, T2
281 rol $5, T1
282 xor SC, T2
283 lea K1VALUE (T1, SE), SE
284 rol $30, SA
285 add T2, SD
286 mov SB, T2
287 mov SE, T1
288 xor SA, T2
289 and SE, T2
290 rol $5, T1
291 lea K1VALUE (T1, SD), SD
292 xor SB, T2
293 add OFFSET(7) (DATA), SC
294 rol $30, SE
295 add OFFSET(8) (DATA), SB
296 mov SD, T1
297 add T2, SC
298 mov SA, T2
299 xor SE, T2
300 rol $5, T1
301 and SD, T2
302 lea K1VALUE (T1, SC), SC
303 xor SA, T2
304 add T2, SB
305 mov SE, T2
306 mov SC, T1
307 rol $30, SD
308 xor SD, T2
309 rol $5, T1
310 lea K1VALUE (T1, SB), SB
311 and SC, T2
312 xor SE, T2
313 add OFFSET(10) (DATA), SE
314 add OFFSET(9) (DATA), SA
315 mov SB, T1
316 add T2, SA
317 rol $5, T1
318 lea K1VALUE (T1, SA), SA
319 mov SD, T2
320 rol $30, SC
321 xor SC, T2
322 and SB, T2
323 xor SD, T2
324 rol $30, SB
325 add T2, SE
326 mov SC, T2
327 mov SA, T1
328 xor SB, T2
329 add OFFSET(11) (DATA), SD
330 and SA, T2
331 rol $30, SA
332 rol $5, T1
333 xor SC, T2
334 lea K1VALUE (T1, SE), SE
335 add T2, SD
336 mov SB, T2
337 xor SA, T2
338 mov SE, T1
339 rol $5, T1
340 and SE, T2
341 lea K1VALUE (T1, SD), SD
342 xor SB, T2
343 add OFFSET(12) (DATA), SC
344 add T2, SC
345 rol $30, SE
346 mov SA, T2
347 xor SE, T2
348 mov SD, T1
349 rol $5, T1
350 and SD, T2
351 add OFFSET(13) (DATA), SB
352 lea K1VALUE (T1, SC), SC
353 xor SA, T2
354 add T2, SB
355 mov SE, T2
356 rol $30, SD
357 xor SD, T2
358 and SC, T2
359 mov SC, T1
360 rol $5, T1
361 rol $30, SC
362 add OFFSET(14) (DATA), SA
363 xor SE, T2
364 add T2, SA
365 mov SD, T2
366 xor SC, T2
367 lea K1VALUE (T1, SB), SB
368 and SB, T2
369 mov SB, T1
370 rol $5, T1
371 lea K1VALUE (T1, SA), SA
372 mov SA, T1
373 xor SD, T2
374 add OFFSET(15) (DATA), SE
375 add T2, SE
376 rol $5, T1
377 lea K1VALUE (T1, SE), SE
378 mov OFFSET(0) (DATA), T1
379 xor OFFSET(2) (DATA), T1
380 mov SC, T2
381 xor OFFSET(8) (DATA), T1
382 xor OFFSET(13) (DATA), T1
383 rol $30, SB
384 xor SB, T2
385 and SA, T2
386 xor SC, T2
387 rol $1, T1
388 lea K1VALUE (T1, T2), T2
389 mov T1, OFFSET(0) (DATA)
390 mov SE, T1
391 rol $5, T1
392 add T1, SD
393 mov OFFSET(1) (DATA), T1
394 xor OFFSET(3) (DATA), T1
395 rol $30, SA
396 add T2, SD
397 mov SB, T2
398 xor SA, T2
399 and SE, T2
400 xor OFFSET(9) (DATA), T1
401 xor OFFSET(14) (DATA), T1
402 xor SB, T2
403 rol $1, T1
404 mov T1, OFFSET(1) (DATA)
405 lea K1VALUE (T1, T2), T2
406 mov SD, T1
407 rol $5, T1
408 add T1, SC
409 mov OFFSET(2) (DATA), T1
410 xor OFFSET(4) (DATA), T1
411 rol $30, SE
412 add T2, SC
413 mov SA, T2
414 xor SE, T2
415 xor OFFSET(10) (DATA), T1
416 xor OFFSET(15) (DATA), T1
417 and SD, T2
418 rol $1, T1
419 xor SA, T2
420 mov T1, OFFSET(2) (DATA)
421 lea K1VALUE (T1, T2), T2
422 mov SC, T1
423 rol $30, SD
424 rol $5, T1
425 add T1, SB
426 add T2, SB
427 mov SE, T2
428 mov OFFSET(3) (DATA), T1
429 xor SD, T2
430 xor OFFSET(5) (DATA), T1
431 and SC, T2
432 xor SE, T2
433 xor OFFSET(11) (DATA), T1
434 xor OFFSET(0) (DATA), T1
435 rol $1, T1
436 mov T1, OFFSET(3) (DATA)
437 lea K1VALUE (T1, T2), T2
438 mov SB, T1
439 rol $5, T1
440 add T1, SA
441 mov OFFSET(4) (DATA), T1
442 xor OFFSET(6) (DATA), T1
443 rol $30, SC
444 xor OFFSET(12) (DATA), T1
445 add T2, SA
446 xor OFFSET(1) (DATA), T1
447 mov SD, T2
448 xor SC, T2
449 rol $1, T1
450 xor SB, T2
451 lea K2VALUE (T1, T2), T2
452 mov T1, OFFSET(4) (DATA)
453 mov SA, T1
454 rol $5, T1
455 add T1, SE
456 mov OFFSET(5) (DATA), T1
457 add T2, SE
458 mov SC, T2
459 xor OFFSET(7) (DATA), T1
460 rol $30, SB
461 xor OFFSET(13) (DATA), T1
462 xor SB, T2
463 xor OFFSET(2) (DATA), T1
464 xor SA, T2
465 rol $1, T1
466 mov T1, OFFSET(5) (DATA)
467 lea K2VALUE (T1, T2), T2
468 mov SE, T1
469 rol $5, T1
470 add T1, SD
471 mov OFFSET(6) (DATA), T1
472 xor OFFSET(8) (DATA), T1
473 add T2, SD
474 rol $30, SA
475 xor OFFSET(14) (DATA), T1
476 mov SB, T2
477 xor OFFSET(3) (DATA), T1
478 xor SA, T2
479 rol $1, T1
480 xor SE, T2
481 lea K2VALUE (T1, T2), T2
482 mov T1, OFFSET(6) (DATA)
483 mov SD, T1
484 rol $5, T1
485 add T1, SC
486 add T2, SC
487 mov SA, T2
488 rol $30, SE
489 mov OFFSET(7) (DATA), T1
490 xor OFFSET(9) (DATA), T1
491 xor SE, T2
492 xor OFFSET(15) (DATA), T1
493 xor OFFSET(4) (DATA), T1
494 xor SD, T2
495 rol $1, T1
496 lea K2VALUE (T1, T2), T2
497 mov T1, OFFSET(7) (DATA)
498 mov SC, T1
499 rol $5, T1
500 add T1, SB
501 mov OFFSET(8) (DATA), T1
502 xor OFFSET(10) (DATA), T1
503 add T2, SB
504 rol $30, SD
505 mov SE, T2
506 xor OFFSET(0) (DATA), T1
507 xor OFFSET(5) (DATA), T1
508 xor SD, T2
509 xor SC, T2
510 rol $1, T1
511 mov T1, OFFSET(8) (DATA)
512 lea K2VALUE (T1, T2), T2
513 mov SB, T1
514 rol $5, T1
515 add T1, SA
516 mov OFFSET(9) (DATA), T1
517 xor OFFSET(11) (DATA), T1
518 xor OFFSET(1) (DATA), T1
519 add T2, SA
520 xor OFFSET(6) (DATA), T1
521 mov SD, T2
522 rol $1, T1
523 rol $30, SC
524 xor SC, T2
525 mov T1, OFFSET(9) (DATA)
526 xor SB, T2
527 lea K2VALUE (T1, T2), T2
528 mov SA, T1
529 rol $5, T1
530 add T1, SE
531 mov OFFSET(10) (DATA), T1
532 xor OFFSET(12) (DATA), T1
533 xor OFFSET(2) (DATA), T1
534 add T2, SE
535 mov SC, T2
536 rol $30, SB
537 xor OFFSET(7) (DATA), T1
538 xor SB, T2
539 rol $1, T1
540 xor SA, T2
541 lea K2VALUE (T1, T2), T2
542 mov T1, OFFSET(10) (DATA)
543 mov SE, T1
544 rol $5, T1
545 add T1, SD
546 mov OFFSET(11) (DATA), T1
547 xor OFFSET(13) (DATA), T1
548 rol $30, SA
549 xor OFFSET(3) (DATA), T1
550 add T2, SD
551 xor OFFSET(8) (DATA), T1
552 mov SB, T2
553 xor SA, T2
554 rol $1, T1
555 mov T1, OFFSET(11) (DATA)
556 xor SE, T2
557 lea K2VALUE (T1, T2), T2
558 mov SD, T1
559 rol $5, T1
560 add T1, SC
561 mov OFFSET(12) (DATA), T1
562 xor OFFSET(14) (DATA), T1
563 rol $30, SE
564 add T2, SC
565 xor OFFSET(4) (DATA), T1
566 mov SA, T2
567 xor OFFSET(9) (DATA), T1
568 xor SE, T2
569 rol $1, T1
570 xor SD, T2
571 mov T1, OFFSET(12) (DATA)
572 lea K2VALUE (T1, T2), T2
573 mov SC, T1
574 rol $5, T1
575 add T1, SB
576 rol $30, SD
577 mov OFFSET(13) (DATA), T1
578 xor OFFSET(15) (DATA), T1
579 add T2, SB
580 mov SE, T2
581 xor OFFSET(5) (DATA), T1
582 xor SD, T2
583 xor OFFSET(10) (DATA), T1
584 xor SC, T2
585 rol $1, T1
586 lea K2VALUE (T1, T2), T2
587 mov T1, OFFSET(13) (DATA)
588 mov SB, T1
589 rol $5, T1
590 add T1, SA
591 add T2, SA
592 mov SD, T2
593 mov OFFSET(14) (DATA), T1
594 xor OFFSET(0) (DATA), T1
595 rol $30, SC
596 xor OFFSET(6) (DATA), T1
597 xor OFFSET(11) (DATA), T1
598 xor SC, T2
599 xor SB, T2
600 rol $1, T1
601 lea K2VALUE (T1, T2), T2
602 mov T1, OFFSET(14) (DATA)
603 mov SA, T1
604 rol $5, T1
605 add T1, SE
606 mov OFFSET(15) (DATA), T1
607 xor OFFSET(1) (DATA), T1
608 add T2, SE
609 mov SC, T2
610 rol $30, SB
611 xor SB, T2
612 xor OFFSET(7) (DATA), T1
613 xor OFFSET(12) (DATA), T1
614 xor SA, T2
615 rol $1, T1
616 mov T1, OFFSET(15) (DATA)
617 lea K2VALUE (T1, T2), T2
618 mov SE, T1
619 rol $5, T1
620 add T1, SD
621 mov OFFSET(0) (DATA), T1
622 xor OFFSET(2) (DATA), T1
623 xor OFFSET(8) (DATA), T1
624 add T2, SD
625 mov SB, T2
626 rol $30, SA
627 xor SA, T2
628 xor OFFSET(13) (DATA), T1
629 rol $1, T1
630 xor SE, T2
631 mov T1, OFFSET(0) (DATA)
632 lea K2VALUE (T1, T2), T2
633 mov SD, T1
634 rol $5, T1
635 add T1, SC
636 mov OFFSET(1) (DATA), T1
637 xor OFFSET(3) (DATA), T1
638 add T2, SC
639 mov SA, T2
640 rol $30, SE
641 xor SE, T2
642 xor OFFSET(9) (DATA), T1
643 xor OFFSET(14) (DATA), T1
644 rol $1, T1
645 xor SD, T2
646 lea K2VALUE (T1, T2), T2
647 mov T1, OFFSET(1) (DATA)
648 mov SC, T1
649 rol $5, T1
650 add T1, SB
651 mov OFFSET(2) (DATA), T1
652 rol $30, SD
653 xor OFFSET(4) (DATA), T1
654 add T2, SB
655 mov SE, T2
656 xor OFFSET(10) (DATA), T1
657 xor OFFSET(15) (DATA), T1
658 xor SD, T2
659 xor SC, T2
660 rol $1, T1
661 mov T1, OFFSET(2) (DATA)
662 lea K2VALUE (T1, T2), T2
663 mov SB, T1
664 rol $5, T1
665 add T1, SA
666 mov OFFSET(3) (DATA), T1
667 xor OFFSET(5) (DATA), T1
668 xor OFFSET(11) (DATA), T1
669 xor OFFSET(0) (DATA), T1
670 add T2, SA
671 rol $30, SC
672 mov SD, T2
673 xor SC, T2
674 rol $1, T1
675 xor SB, T2
676 lea K2VALUE (T1, T2), T2
677 mov T1, OFFSET(3) (DATA)
678 mov SA, T1
679 rol $5, T1
680 rol $30, SB
681 add T1, SE
682 mov OFFSET(4) (DATA), T1
683 add T2, SE
684 xor OFFSET(6) (DATA), T1
685 xor OFFSET(12) (DATA), T1
686 xor OFFSET(1) (DATA), T1
687 mov SC, T2
688 xor SB, T2
689 rol $1, T1
690 xor SA, T2
691 lea K2VALUE (T1, T2), T2
692 mov T1, OFFSET(4) (DATA)
693 mov SE, T1
694 rol $5, T1
695 add T1, SD
696 add T2, SD
697 mov OFFSET(5) (DATA), T1
698 mov SB, T2
699 rol $30, SA
700 xor SA, T2
701 xor SE, T2
702 xor OFFSET(7) (DATA), T1
703 xor OFFSET(13) (DATA), T1
704 xor OFFSET(2) (DATA), T1
705 rol $1, T1
706 mov T1, OFFSET(5) (DATA)
707 lea K2VALUE (T1, T2), T2
708 mov SD, T1
709 rol $5, T1
710 add T1, SC
711 mov OFFSET(6) (DATA), T1
712 xor OFFSET(8) (DATA), T1
713 add T2, SC
714 xor OFFSET(14) (DATA), T1
715 xor OFFSET(3) (DATA), T1
716 rol $1, T1
717 mov T1, OFFSET(6) (DATA)
718 mov SA, T2
719 rol $30, SE
720 xor SE, T2
721 xor SD, T2
722 lea K2VALUE (T1, T2), T2
723 mov SC, T1
724 rol $5, T1
725 add T1, SB
726 add T2, SB
727 mov OFFSET(7) (DATA), T1
728 mov SE, T2
729 rol $30, SD
730 xor OFFSET(9) (DATA), T1
731 xor SD, T2
732 xor SC, T2
733 xor OFFSET(15) (DATA), T1
734 xor OFFSET(4) (DATA), T1
735 rol $1, T1
736 mov T1, OFFSET(7) (DATA)
737 lea K2VALUE (T1, T2), T2
738 mov SB, T1
739 rol $5, T1
740 add T1, SA
741 mov OFFSET(8) (DATA), T1
742 xor OFFSET(10) (DATA), T1
743 rol $30, SC
744 xor OFFSET(0) (DATA), T1
745 add T2, SA
746 mov SD, T2
747 xor OFFSET(5) (DATA), T1
748 rol $1, T1
749 and SC, T2
750 mov T1, OFFSET(8) (DATA)
751 lea K3VALUE (T1, T2), T1
752 add T1, SE
753 mov SA, T1
754 mov SD, T2
755 xor SC, T2
756 and SB, T2
757 rol $30, SB
758 rol $5, T1
759 add T1, SE
760 mov OFFSET(9) (DATA), T1
761 xor OFFSET(11) (DATA), T1
762 xor OFFSET(1) (DATA), T1
763 add T2, SE
764 mov SC, T2
765 xor OFFSET(6) (DATA), T1
766 rol $1, T1
767 and SB, T2
768 mov T1, OFFSET(9) (DATA)
769 lea K3VALUE (T1, T2), T1
770 add T1, SD
771 mov SC, T2
772 xor SB, T2
773 mov SE, T1
774 rol $5, T1
775 add T1, SD
776 mov OFFSET(10) (DATA), T1
777 and SA, T2
778 add T2, SD
779 xor OFFSET(12) (DATA), T1
780 xor OFFSET(2) (DATA), T1
781 rol $30, SA
782 mov SB, T2
783 and SA, T2
784 xor OFFSET(7) (DATA), T1
785 rol $1, T1
786 mov T1, OFFSET(10) (DATA)
787 lea K3VALUE (T1, T2), T1
788 add T1, SC
789 mov SD, T1
790 rol $5, T1
791 mov SB, T2
792 add T1, SC
793 mov OFFSET(11) (DATA), T1
794 xor SA, T2
795 xor OFFSET(13) (DATA), T1
796 xor OFFSET(3) (DATA), T1
797 and SE, T2
798 xor OFFSET(8) (DATA), T1
799 add T2, SC
800 rol $1, T1
801 mov SA, T2
802 mov T1, OFFSET(11) (DATA)
803 rol $30, SE
804 and SE, T2
805 lea K3VALUE (T1, T2), T1
806 add T1, SB
807 mov SA, T2
808 mov SC, T1
809 xor SE, T2
810 rol $5, T1
811 add T1, SB
812 mov OFFSET(12) (DATA), T1
813 xor OFFSET(14) (DATA), T1
814 xor OFFSET(4) (DATA), T1
815 xor OFFSET(9) (DATA), T1
816 and SD, T2
817 rol $30, SD
818 add T2, SB
819 rol $1, T1
820 mov T1, OFFSET(12) (DATA)
821 mov SE, T2
822 and SD, T2
823 lea K3VALUE (T1, T2), T1
824 add T1, SA
825 mov SB, T1
826 rol $5, T1
827 add T1, SA
828 mov OFFSET(13) (DATA), T1
829 xor OFFSET(15) (DATA), T1
830 mov SE, T2
831 xor OFFSET(5) (DATA), T1
832 xor SD, T2
833 and SC, T2
834 xor OFFSET(10) (DATA), T1
835 add T2, SA
836 rol $1, T1
837 rol $30, SC
838 mov T1, OFFSET(13) (DATA)
839 mov SD, T2
840 and SC, T2
841 lea K3VALUE (T1, T2), T1
842 mov SD, T2
843 add T1, SE
844 mov SA, T1
845 rol $5, T1
846 add T1, SE
847 mov OFFSET(14) (DATA), T1
848 xor OFFSET(0) (DATA), T1
849 xor SC, T2
850 and SB, T2
851 xor OFFSET(6) (DATA), T1
852 rol $30, SB
853 xor OFFSET(11) (DATA), T1
854 rol $1, T1
855 add T2, SE
856 mov SC, T2
857 mov T1, OFFSET(14) (DATA)
858 and SB, T2
859 lea K3VALUE (T1, T2), T1
860 mov SC, T2
861 add T1, SD
862 mov SE, T1
863 xor SB, T2
864 rol $5, T1
865 add T1, SD
866 mov OFFSET(15) (DATA), T1
867 xor OFFSET(1) (DATA), T1
868 and SA, T2
869 xor OFFSET(7) (DATA), T1
870 xor OFFSET(12) (DATA), T1
871 add T2, SD
872 rol $30, SA
873 mov SB, T2
874 rol $1, T1
875 mov T1, OFFSET(15) (DATA)
876 and SA, T2
877 lea K3VALUE (T1, T2), T1
878 add T1, SC
879 mov SD, T1
880 mov SB, T2
881 rol $5, T1
882 add T1, SC
883 mov OFFSET(0) (DATA), T1
884 xor SA, T2
885 xor OFFSET(2) (DATA), T1
886 xor OFFSET(8) (DATA), T1
887 xor OFFSET(13) (DATA), T1
888 and SE, T2
889 add T2, SC
890 rol $30, SE
891 rol $1, T1
892 mov T1, OFFSET(0) (DATA)
893 mov SA, T2
894 and SE, T2
895 lea K3VALUE (T1, T2), T1
896 add T1, SB
897 mov SC, T1
898 mov SA, T2
899 xor SE, T2
900 rol $5, T1
901 add T1, SB
902 mov OFFSET(1) (DATA), T1
903 xor OFFSET(3) (DATA), T1
904 xor OFFSET(9) (DATA), T1
905 and SD, T2
906 xor OFFSET(14) (DATA), T1
907 add T2, SB
908 rol $30, SD
909 mov SE, T2
910 rol $1, T1
911 and SD, T2
912 mov T1, OFFSET(1) (DATA)
913 lea K3VALUE (T1, T2), T1
914 add T1, SA
915 mov SB, T1
916 rol $5, T1
917 add T1, SA
918 mov SE, T2
919 mov OFFSET(2) (DATA), T1
920 xor SD, T2
921 xor OFFSET(4) (DATA), T1
922 xor OFFSET(10) (DATA), T1
923 and SC, T2
924 add T2, SA
925 xor OFFSET(15) (DATA), T1
926 rol $30, SC
927 mov SD, T2
928 rol $1, T1
929 mov T1, OFFSET(2) (DATA)
930 and SC, T2
931 lea K3VALUE (T1, T2), T1
932 add T1, SE
933 mov SA, T1
934 rol $5, T1
935 add T1, SE
936 mov OFFSET(3) (DATA), T1
937 xor OFFSET(5) (DATA), T1
938 xor OFFSET(11) (DATA), T1
939 xor OFFSET(0) (DATA), T1
940 mov SD, T2
941 rol $1, T1
942 xor SC, T2
943 and SB, T2
944 mov T1, OFFSET(3) (DATA)
945 rol $30, SB
946 add T2, SE
947 mov SC, T2
948 and SB, T2
949 lea K3VALUE (T1, T2), T1
950 add T1, SD
951 mov SE, T1
952 mov SC, T2
953 rol $5, T1
954 add T1, SD
955 mov OFFSET(4) (DATA), T1
956 xor OFFSET(6) (DATA), T1
957 xor SB, T2
958 and SA, T2
959 add T2, SD
960 mov SB, T2
961 xor OFFSET(12) (DATA), T1
962 rol $30, SA
963 and SA, T2
964 xor OFFSET(1) (DATA), T1
965 rol $1, T1
966 mov T1, OFFSET(4) (DATA)
967 lea K3VALUE (T1, T2), T1
968 add T1, SC
969 mov SD, T1
970 rol $5, T1
971 add T1, SC
972 mov OFFSET(5) (DATA), T1
973 xor OFFSET(7) (DATA), T1
974 mov SB, T2
975 xor OFFSET(13) (DATA), T1
976 xor SA, T2
977 xor OFFSET(2) (DATA), T1
978 and SE, T2
979 rol $30, SE
980 add T2, SC
981 rol $1, T1
982 mov SA, T2
983 mov T1, OFFSET(5) (DATA)
984 and SE, T2
985 lea K3VALUE (T1, T2), T1
986 add T1, SB
987 mov SA, T2
988 mov SC, T1
989 rol $5, T1
990 add T1, SB
991 xor SE, T2
992 and SD, T2
993 mov OFFSET(6) (DATA), T1
994 xor OFFSET(8) (DATA), T1
995 xor OFFSET(14) (DATA), T1
996 xor OFFSET(3) (DATA), T1
997 rol $1, T1
998 add T2, SB
999 rol $30, SD
1000 mov SE, T2
1001 and SD, T2
1002 mov T1, OFFSET(6) (DATA)
1003 lea K3VALUE (T1, T2), T1
1004 add T1, SA
1005 mov SB, T1
1006 rol $5, T1
1007 add T1, SA
1008 mov OFFSET(7) (DATA), T1
1009 xor OFFSET(9) (DATA), T1
1010 mov SE, T2
1011 xor SD, T2
1012 xor OFFSET(15) (DATA), T1
1013 and SC, T2
1014 rol $30, SC
1015 add T2, SA
1016 mov SD, T2
1017 xor OFFSET(4) (DATA), T1
1018 rol $1, T1
1019 and SC, T2
1020 mov T1, OFFSET(7) (DATA)
1021 lea K3VALUE (T1, T2), T1
1022 add T1, SE
1023 mov SA, T1
1024 rol $5, T1
1025 mov SD, T2
1026 add T1, SE
1027 mov OFFSET(8) (DATA), T1
1028 xor OFFSET(10) (DATA), T1
1029 xor SC, T2
1030 xor OFFSET(0) (DATA), T1
1031 and SB, T2
1032 add T2, SE
1033 xor OFFSET(5) (DATA), T1
1034 rol $30, SB
1035 mov SC, T2
1036 and SB, T2
1037 rol $1, T1
1038 mov T1, OFFSET(8) (DATA)
1039 lea K3VALUE (T1, T2), T1
1040 add T1, SD
1041 mov SE, T1
1042 rol $5, T1
1043 mov SC, T2
1044 xor SB, T2
1045 add T1, SD
1046 and SA, T2
1047 mov OFFSET(9) (DATA), T1
1048 rol $30, SA
1049 xor OFFSET(11) (DATA), T1
1050 xor OFFSET(1) (DATA), T1
1051 add T2, SD
1052 mov SB, T2
1053 and SA, T2
1054 xor OFFSET(6) (DATA), T1
1055 rol $1, T1
1056 mov T1, OFFSET(9) (DATA)
1057 lea K3VALUE (T1, T2), T1
1058 add T1, SC
1059 mov SD, T1
1060 rol $5, T1
1061 mov SB, T2
1062 xor SA, T2
1063 and SE, T2
1064 add T1, SC
1065 mov OFFSET(10) (DATA), T1
1066 xor OFFSET(12) (DATA), T1
1067 xor OFFSET(2) (DATA), T1
1068 add T2, SC
1069 mov SA, T2
1070 rol $30, SE
1071 xor OFFSET(7) (DATA), T1
1072 rol $1, T1
1073 and SE, T2
1074 mov T1, OFFSET(10) (DATA)
1075 lea K3VALUE (T1, T2), T1
1076 mov SA, T2
1077 xor SE, T2
1078 add T1, SB
1079 mov SC, T1
1080 rol $5, T1
1081 add T1, SB
1082 mov OFFSET(11) (DATA), T1
1083 xor OFFSET(13) (DATA), T1
1084 xor OFFSET(3) (DATA), T1
1085 xor OFFSET(8) (DATA), T1
1086 and SD, T2
1087 add T2, SB
1088 mov SE, T2
1089 rol $1, T1
1090 mov T1, OFFSET(11) (DATA)
1091 rol $30, SD
1092 and SD, T2
1093 lea K3VALUE (T1, T2), T1
1094 mov SE, T2
1095 add T1, SA
1096 xor SD, T2
1097 mov SB, T1
1098 and SC, T2
1099 rol $30, SC
1100 rol $5, T1
1101 add T1, SA
1102 mov OFFSET(12) (DATA), T1
1103 xor OFFSET(14) (DATA), T1
1104 add T2, SA
1105 mov SD, T2
1106 xor OFFSET(4) (DATA), T1
1107 xor OFFSET(9) (DATA), T1
1108 rol $1, T1
1109 mov T1, OFFSET(12) (DATA)
1110 xor SC, T2
1111 xor SB, T2
1112 lea K4VALUE (T1, T2), T2
1113 mov SA, T1
1114 rol $5, T1
1115 add T1, SE
1116 mov OFFSET(13) (DATA), T1
1117 xor OFFSET(15) (DATA), T1
1118 add T2, SE
1119 rol $30, SB
1120 mov SC, T2
1121 xor OFFSET(5) (DATA), T1
1122 xor SB, T2
1123 xor OFFSET(10) (DATA), T1
1124 rol $1, T1
1125 mov T1, OFFSET(13) (DATA)
1126 xor SA, T2
1127 lea K4VALUE (T1, T2), T2
1128 mov SE, T1
1129 rol $5, T1
1130 add T1, SD
1131 mov OFFSET(14) (DATA), T1
1132 xor OFFSET(0) (DATA), T1
1133 rol $30, SA
1134 add T2, SD
1135 mov SB, T2
1136 xor SA, T2
1137 xor SE, T2
1138 xor OFFSET(6) (DATA), T1
1139 xor OFFSET(11) (DATA), T1
1140 rol $1, T1
1141 lea K4VALUE (T1, T2), T2
1142 mov T1, OFFSET(14) (DATA)
1143 mov SD, T1
1144 rol $5, T1
1145 add T1, SC
1146 add T2, SC
1147 mov OFFSET(15) (DATA), T1
1148 mov SA, T2
1149 rol $30, SE
1150 xor OFFSET(1) (DATA), T1
1151 xor OFFSET(7) (DATA), T1
1152 xor SE, T2
1153 xor SD, T2
1154 xor OFFSET(12) (DATA), T1
1155 rol $1, T1
1156 mov T1, OFFSET(15) (DATA)
1157 lea K4VALUE (T1, T2), T2
1158 mov SC, T1
1159 rol $5, T1
1160 add T1, SB
1161 mov OFFSET(0) (DATA), T1
1162 add T2, SB
1163 xor OFFSET(2) (DATA), T1
1164 mov SE, T2
1165 rol $30, SD
1166 xor OFFSET(8) (DATA), T1
1167 xor SD, T2
1168 xor OFFSET(13) (DATA), T1
1169 xor SC, T2
1170 rol $1, T1
1171 lea K4VALUE (T1, T2), T2
1172 mov T1, OFFSET(0) (DATA)
1173 mov SB, T1
1174 rol $5, T1
1175 add T1, SA
1176 mov OFFSET(1) (DATA), T1
1177 rol $30, SC
1178 xor OFFSET(3) (DATA), T1
1179 xor OFFSET(9) (DATA), T1
1180 xor OFFSET(14) (DATA), T1
1181 add T2, SA
1182 mov SD, T2
1183 xor SC, T2
1184 rol $1, T1
1185 xor SB, T2
1186 lea K4VALUE (T1, T2), T2
1187 mov T1, OFFSET(1) (DATA)
1188 mov SA, T1
1189 rol $5, T1
1190 add T1, SE
1191 mov OFFSET(2) (DATA), T1
1192 rol $30, SB
1193 xor OFFSET(4) (DATA), T1
1194 add T2, SE
1195 mov SC, T2
1196 xor SB, T2
1197 xor OFFSET(10) (DATA), T1
1198 xor OFFSET(15) (DATA), T1
1199 xor SA, T2
1200 rol $1, T1
1201 lea K4VALUE (T1, T2), T2
1202 mov T1, OFFSET(2) (DATA)
1203 mov SE, T1
1204 rol $5, T1
1205 add T1, SD
1206 mov OFFSET(3) (DATA), T1
1207 xor OFFSET(5) (DATA), T1
1208 xor OFFSET(11) (DATA), T1
1209 xor OFFSET(0) (DATA), T1
1210 rol $30, SA
1211 add T2, SD
1212 mov SB, T2
1213 rol $1, T1
1214 mov T1, OFFSET(3) (DATA)
1215 xor SA, T2
1216 xor SE, T2
1217 lea K4VALUE (T1, T2), T2
1218 mov SD, T1
1219 rol $5, T1
1220 add T1, SC
1221 mov OFFSET(4) (DATA), T1
1222 add T2, SC
1223 rol $30, SE
1224 xor OFFSET(6) (DATA), T1
1225 mov SA, T2
1226 xor OFFSET(12) (DATA), T1
1227 xor SE, T2
1228 xor OFFSET(1) (DATA), T1
1229 rol $1, T1
1230 xor SD, T2
1231 lea K4VALUE (T1, T2), T2
1232 mov T1, OFFSET(4) (DATA)
1233 mov SC, T1
1234 rol $5, T1
1235 add T1, SB
1236 rol $30, SD
1237 mov OFFSET(5) (DATA), T1
1238 add T2, SB
1239 xor OFFSET(7) (DATA), T1
1240 xor OFFSET(13) (DATA), T1
1241 mov SE, T2
1242 xor SD, T2
1243 xor OFFSET(2) (DATA), T1
1244 xor SC, T2
1245 rol $1, T1
1246 mov T1, OFFSET(5) (DATA)
1247 lea K4VALUE (T1, T2), T2
1248 mov SB, T1
1249 rol $5, T1
1250 add T1, SA
1251 mov OFFSET(6) (DATA), T1
1252 xor OFFSET(8) (DATA), T1
1253 xor OFFSET(14) (DATA), T1
1254 add T2, SA
1255 xor OFFSET(3) (DATA), T1
1256 mov SD, T2
1257 rol $30, SC
1258 rol $1, T1
1259 xor SC, T2
1260 mov T1, OFFSET(6) (DATA)
1261 xor SB, T2
1262 lea K4VALUE (T1, T2), T2
1263 mov SA, T1
1264 rol $5, T1
1265 add T1, SE
1266 add T2, SE
1267 mov OFFSET(7) (DATA), T1
1268 xor OFFSET(9) (DATA), T1
1269 xor OFFSET(15) (DATA), T1
1270 rol $30, SB
1271 xor OFFSET(4) (DATA), T1
1272 mov SC, T2
1273 rol $1, T1
1274 mov T1, OFFSET(7) (DATA)
1275 xor SB, T2
1276 xor SA, T2
1277 lea K4VALUE (T1, T2), T2
1278 mov SE, T1
1279 rol $5, T1
1280 add T1, SD
1281 rol $30, SA
1282 mov OFFSET(8) (DATA), T1
1283 xor OFFSET(10) (DATA), T1
1284 add T2, SD
1285 xor OFFSET(0) (DATA), T1
1286 xor OFFSET(5) (DATA), T1
1287 rol $1, T1
1288 mov SB, T2
1289 mov T1, OFFSET(8) (DATA)
1290 xor SA, T2
1291 xor SE, T2
1292 lea K4VALUE (T1, T2), T2
1293 mov SD, T1
1294 rol $5, T1
1295 add T1, SC
1296 add T2, SC
1297 mov SA, T2
1298 mov OFFSET(9) (DATA), T1
1299 rol $30, SE
1300 xor OFFSET(11) (DATA), T1
1301 xor OFFSET(1) (DATA), T1
1302 xor OFFSET(6) (DATA), T1
1303 xor SE, T2
1304 xor SD, T2
1305 rol $1, T1
1306 lea K4VALUE (T1, T2), T2
1307 mov T1, OFFSET(9) (DATA)
1308 mov SC, T1
1309 rol $5, T1
1310 add T1, SB
1311 rol $30, SD
1312 mov OFFSET(10) (DATA), T1
1313 xor OFFSET(12) (DATA), T1
1314 xor OFFSET(2) (DATA), T1
1315 add T2, SB
1316 mov SE, T2
1317 xor SD, T2
1318 xor SC, T2
1319 xor OFFSET(7) (DATA), T1
1320 rol $1, T1
1321 mov T1, OFFSET(10) (DATA)
1322 lea K4VALUE (T1, T2), T2
1323 mov SB, T1
1324 rol $5, T1
1325 add T1, SA
1326 mov OFFSET(11) (DATA), T1
1327 xor OFFSET(13) (DATA), T1
1328 xor OFFSET(3) (DATA), T1
1329 add T2, SA
1330 mov SD, T2
1331 rol $30, SC
1332 xor SC, T2
1333 xor OFFSET(8) (DATA), T1
1334 rol $1, T1
1335 xor SB, T2
1336 lea K4VALUE (T1, T2), T2
1337 mov T1, OFFSET(11) (DATA)
1338 mov SA, T1
1339 rol $5, T1
1340 add T1, SE
1341 mov OFFSET(12) (DATA), T1
1342 add T2, SE
1343 xor OFFSET(14) (DATA), T1
1344 rol $30, SB
1345 mov SC, T2
1346 xor OFFSET(4) (DATA), T1
1347 xor SB, T2
1348 xor SA, T2
1349 xor OFFSET(9) (DATA), T1
1350 rol $1, T1
1351 lea K4VALUE (T1, T2), T2
1352 mov T1, OFFSET(12) (DATA)
1353 mov SE, T1
1354 rol $5, T1
1355 add T1, SD
1356 add T2, SD
1357 rol $30, SA
1358 mov OFFSET(13) (DATA), T1
1359 xor OFFSET(15) (DATA), T1
1360 mov SB, T2
1361 xor OFFSET(5) (DATA), T1
1362 xor SA, T2
1363 xor OFFSET(10) (DATA), T1
1364 xor SE, T2
1365 rol $1, T1
1366 lea K4VALUE (T1, T2), T2
1367 mov T1, OFFSET(13) (DATA)
1368 mov SD, T1
1369 rol $5, T1
1370 add T1, SC
1371 mov OFFSET(14) (DATA), T1
1372 xor OFFSET(0) (DATA), T1
1373 xor OFFSET(6) (DATA), T1
1374 add T2, SC
1375 rol $30, SE
1376 mov SA, T2
1377 xor SE, T2
1378 xor OFFSET(11) (DATA), T1
1379 xor SD, T2
1380 rol $1, T1
1381 lea K4VALUE (T1, T2), T2
1382 mov T1, OFFSET(14) (DATA)
1383 mov SC, T1
1384 rol $5, T1
1385 add T1, SB
1386 mov OFFSET(15) (DATA), T1
1387 xor OFFSET(1) (DATA), T1
1388 xor OFFSET(7) (DATA), T1
1389 rol $30, SD
1390 add T2, SB
1391 xor OFFSET(12) (DATA), T1
1392 mov SE, T2
1393 xor SD, T2
1394 rol $1, T1
1395 xor SC, T2
1396 lea K4VALUE (T1, T2), T2
1397 rol $30, SC
1398 mov T1, OFFSET(15) (DATA)
1399 mov SB, T1
1400 rol $5, T1
1401 add T1, SA
1402 add T2, SA
1404 C C Load and byteswap data
1405 C movl 88(%esp), T2
1407 C SWAP( 0, %eax) SWAP( 1, %ebx) SWAP( 2, %ecx) SWAP( 3, %edx)
1408 C SWAP( 4, %eax) SWAP( 5, %ebx) SWAP( 6, %ecx) SWAP( 7, %edx)
1409 C SWAP( 8, %eax) SWAP( 9, %ebx) SWAP(10, %ecx) SWAP(11, %edx)
1410 C SWAP(12, %eax) SWAP(13, %ebx) SWAP(14, %ecx) SWAP(15, %edx)
1412 C C load the state vector
1413 C movl 84(%esp),T1
1414 C movl (T1), SA
1415 C movl 4(T1), SB
1416 C movl 8(T1), SC
1417 C movl 12(T1), SD
1418 C movl 16(T1), SE
1420 C ROUND_F1_NOEXP(SA, SB, SC, SD, SE, 0)
1421 C ROUND_F1_NOEXP(SE, SA, SB, SC, SD, 1)
1422 C ROUND_F1_NOEXP(SD, SE, SA, SB, SC, 2)
1423 C ROUND_F1_NOEXP(SC, SD, SE, SA, SB, 3)
1424 C ROUND_F1_NOEXP(SB, SC, SD, SE, SA, 4)
1426 C ROUND_F1_NOEXP(SA, SB, SC, SD, SE, 5)
1427 C ROUND_F1_NOEXP(SE, SA, SB, SC, SD, 6)
1428 C ROUND_F1_NOEXP(SD, SE, SA, SB, SC, 7)
1429 C ROUND_F1_NOEXP(SC, SD, SE, SA, SB, 8)
1430 C ROUND_F1_NOEXP(SB, SC, SD, SE, SA, 9)
1432 C ROUND_F1_NOEXP(SA, SB, SC, SD, SE, 10)
1433 C ROUND_F1_NOEXP(SE, SA, SB, SC, SD, 11)
1434 C ROUND_F1_NOEXP(SD, SE, SA, SB, SC, 12)
1435 C ROUND_F1_NOEXP(SC, SD, SE, SA, SB, 13)
1436 C ROUND_F1_NOEXP(SB, SC, SD, SE, SA, 14)
1438 C ROUND_F1_NOEXP(SA, SB, SC, SD, SE, 15)
1439 C ROUND_F1(SE, SA, SB, SC, SD, 16)
1440 C ROUND_F1(SD, SE, SA, SB, SC, 17)
1441 C ROUND_F1(SC, SD, SE, SA, SB, 18)
1442 C ROUND_F1(SB, SC, SD, SE, SA, 19)
1444 C ROUND_F2(SA, SB, SC, SD, SE, 20, K2VALUE)
1445 C ROUND_F2(SE, SA, SB, SC, SD, 21, K2VALUE)
1446 C ROUND_F2(SD, SE, SA, SB, SC, 22, K2VALUE)
1447 C ROUND_F2(SC, SD, SE, SA, SB, 23, K2VALUE)
1448 C ROUND_F2(SB, SC, SD, SE, SA, 24, K2VALUE)
1450 C ROUND_F2(SA, SB, SC, SD, SE, 25, K2VALUE)
1451 C ROUND_F2(SE, SA, SB, SC, SD, 26, K2VALUE)
1452 C ROUND_F2(SD, SE, SA, SB, SC, 27, K2VALUE)
1453 C ROUND_F2(SC, SD, SE, SA, SB, 28, K2VALUE)
1454 C ROUND_F2(SB, SC, SD, SE, SA, 29, K2VALUE)
1456 C ROUND_F2(SA, SB, SC, SD, SE, 30, K2VALUE)
1457 C ROUND_F2(SE, SA, SB, SC, SD, 31, K2VALUE)
1458 C ROUND_F2(SD, SE, SA, SB, SC, 32, K2VALUE)
1459 C ROUND_F2(SC, SD, SE, SA, SB, 33, K2VALUE)
1460 C ROUND_F2(SB, SC, SD, SE, SA, 34, K2VALUE)
1462 C ROUND_F2(SA, SB, SC, SD, SE, 35, K2VALUE)
1463 C ROUND_F2(SE, SA, SB, SC, SD, 36, K2VALUE)
1464 C ROUND_F2(SD, SE, SA, SB, SC, 37, K2VALUE)
1465 C ROUND_F2(SC, SD, SE, SA, SB, 38, K2VALUE)
1466 C ROUND_F2(SB, SC, SD, SE, SA, 39, K2VALUE)
1468 C ROUND_F3(SA, SB, SC, SD, SE, 40)
1469 C ROUND_F3(SE, SA, SB, SC, SD, 41)
1470 C ROUND_F3(SD, SE, SA, SB, SC, 42)
1471 C ROUND_F3(SC, SD, SE, SA, SB, 43)
1472 C ROUND_F3(SB, SC, SD, SE, SA, 44)
1474 C ROUND_F3(SA, SB, SC, SD, SE, 45)
1475 C ROUND_F3(SE, SA, SB, SC, SD, 46)
1476 C ROUND_F3(SD, SE, SA, SB, SC, 47)
1477 C ROUND_F3(SC, SD, SE, SA, SB, 48)
1478 C ROUND_F3(SB, SC, SD, SE, SA, 49)
1480 C ROUND_F3(SA, SB, SC, SD, SE, 50)
1481 C ROUND_F3(SE, SA, SB, SC, SD, 51)
1482 C ROUND_F3(SD, SE, SA, SB, SC, 52)
1483 C ROUND_F3(SC, SD, SE, SA, SB, 53)
1484 C ROUND_F3(SB, SC, SD, SE, SA, 54)
1486 C ROUND_F3(SA, SB, SC, SD, SE, 55)
1487 C ROUND_F3(SE, SA, SB, SC, SD, 56)
1488 C ROUND_F3(SD, SE, SA, SB, SC, 57)
1489 C ROUND_F3(SC, SD, SE, SA, SB, 58)
1490 C ROUND_F3(SB, SC, SD, SE, SA, 59)
1492 C ROUND_F2(SA, SB, SC, SD, SE, 60, K4VALUE)
1493 C ROUND_F2(SE, SA, SB, SC, SD, 61, K4VALUE)
1494 C ROUND_F2(SD, SE, SA, SB, SC, 62, K4VALUE)
1495 C ROUND_F2(SC, SD, SE, SA, SB, 63, K4VALUE)
1496 C ROUND_F2(SB, SC, SD, SE, SA, 64, K4VALUE)
1498 C ROUND_F2(SA, SB, SC, SD, SE, 65, K4VALUE)
1499 C ROUND_F2(SE, SA, SB, SC, SD, 66, K4VALUE)
1500 C ROUND_F2(SD, SE, SA, SB, SC, 67, K4VALUE)
1501 C ROUND_F2(SC, SD, SE, SA, SB, 68, K4VALUE)
1502 C ROUND_F2(SB, SC, SD, SE, SA, 69, K4VALUE)
1504 C ROUND_F2(SA, SB, SC, SD, SE, 70, K4VALUE)
1505 C ROUND_F2(SE, SA, SB, SC, SD, 71, K4VALUE)
1506 C ROUND_F2(SD, SE, SA, SB, SC, 72, K4VALUE)
1507 C ROUND_F2(SC, SD, SE, SA, SB, 73, K4VALUE)
1508 C ROUND_F2(SB, SC, SD, SE, SA, 74, K4VALUE)
1510 C ROUND_F2(SA, SB, SC, SD, SE, 75, K4VALUE)
1511 C ROUND_F2(SE, SA, SB, SC, SD, 76, K4VALUE)
1512 C ROUND_F2(SD, SE, SA, SB, SC, 77, K4VALUE)
1513 C ROUND_F2(SC, SD, SE, SA, SB, 78, K4VALUE)
1514 C ROUND_F2(SB, SC, SD, SE, SA, 79, K4VALUE)
1516 C Update the state vector
1517 movl 84(%esp),T1
1518 addl SA, (T1)
1519 addl SB, 4(T1)
1520 addl SC, 8(T1)
1521 addl SD, 12(T1)
1522 addl SE, 16(T1)
1524 addl $64, %esp
1525 popl %edi
1526 popl %esi
1527 popl %ebp
1528 popl %ebx
1530 EPILOGUE(_nettle_sha1_compress)
1532 C TODO:
1534 C * Extend loopmixer so that it can exploit associativity, and for
1535 C example reorder
1537 C add %eax, %ebx
1538 C add %ecx, %ebx
1540 C * Use mmx instructions for the data expansion, doing two words at a
1541 C time.