clarify the purpose of this project
[nyanglibc.git] / crypt / md5.s
blob3d0e04d1c9f400a2773b4e8f11bc61516f95adaa
1 .text
2 .p2align 4,,15
3 .globl __md5_init_ctx
4 .type __md5_init_ctx, @function
5 __md5_init_ctx:
6 movabsq $-1167088121787636991, %rax
7 movq $0, 16(%rdi)
8 movl $0, 24(%rdi)
9 movq %rax, (%rdi)
10 movabsq $1167088121787636990, %rax
11 movq %rax, 8(%rdi)
12 ret
13 .size __md5_init_ctx, .-__md5_init_ctx
14 .p2align 4,,15
15 .globl __md5_read_ctx
16 .type __md5_read_ctx, @function
17 __md5_read_ctx:
18 movl (%rdi), %edx
19 movq %rsi, %rax
20 movl %edx, (%rsi)
21 movl 4(%rdi), %edx
22 movl %edx, 4(%rsi)
23 movl 8(%rdi), %edx
24 movl %edx, 8(%rsi)
25 movl 12(%rdi), %edx
26 movl %edx, 12(%rsi)
27 ret
28 .size __md5_read_ctx, .-__md5_read_ctx
29 .p2align 4,,15
30 .globl __md5_process_block
31 .type __md5_process_block, @function
32 __md5_process_block:
33 movq %rsi, %rax
34 pushq %r15
35 pushq %r14
36 andq $-4, %rax
37 pushq %r13
38 pushq %r12
39 pushq %rbp
40 pushq %rbx
41 movq %rdi, %rbx
42 leaq (%rbx,%rax), %rcx
43 movl (%rdx), %eax
44 movq %rdx, %rdi
45 movl 4(%rdx), %r11d
46 movl 8(%rdx), %r10d
47 movq %rdx, -8(%rsp)
48 movq %rcx, -16(%rsp)
49 movl %eax, -24(%rsp)
50 movl 12(%rdx), %eax
51 movl %esi, %edx
52 movl %eax, -32(%rsp)
53 xorl %eax, %eax
54 addl 16(%rdi), %edx
55 setc %al
56 shrq $32, %rsi
57 addl 20(%rdi), %esi
58 movl %edx, 16(%rdi)
59 addl %eax, %esi
60 cmpq %rcx, %rbx
61 movl %esi, 20(%rdi)
62 jnb .L7
63 movl %r10d, %r15d
64 .p2align 4,,10
65 .p2align 3
66 .L8:
67 movl (%rbx), %r14d
68 movl -32(%rsp), %edi
69 movl -24(%rsp), %eax
70 movl 4(%rbx), %esi
71 movl 12(%rbx), %r8d
72 movl 20(%rbx), %r10d
73 movl 24(%rbx), %ebp
74 movl 28(%rbx), %r13d
75 leal -680876936(%r14,%rax), %edx
76 movl %edi, %eax
77 leal -389564586(%rsi,%rdi), %ecx
78 xorl %r15d, %eax
79 movl %esi, -68(%rsp)
80 movl %r10d, -52(%rsp)
81 andl %r11d, %eax
82 movl 36(%rbx), %r12d
83 movl %r8d, -60(%rsp)
84 xorl %edi, %eax
85 leal -1044525330(%r8,%r11), %edi
86 movl 44(%rbx), %r8d
87 addl %edx, %eax
88 movl %r11d, %edx
89 roll $7, %eax
90 xorl %r15d, %edx
91 movl %r12d, -44(%rsp)
92 addl %r11d, %eax
93 movl %r8d, -36(%rsp)
94 andl %eax, %edx
95 movl %eax, %r9d
96 xorl %r15d, %edx
97 xorl %r11d, %r9d
98 addl %ecx, %edx
99 movl 8(%rbx), %ecx
100 roll $12, %edx
101 addl %eax, %edx
102 leal 606105819(%rcx,%r15), %esi
103 movl %ecx, -64(%rsp)
104 movl %r9d, %ecx
105 andl %edx, %ecx
106 movl %eax, %r9d
107 xorl %r11d, %ecx
108 xorl %edx, %r9d
109 addl %esi, %ecx
110 movl %r9d, %esi
111 movl 16(%rbx), %r9d
112 rorl $15, %ecx
113 addl %edx, %ecx
114 andl %ecx, %esi
115 movl %r9d, -56(%rsp)
116 xorl %eax, %esi
117 addl %edi, %esi
118 leal -176418897(%r9,%rax), %edi
119 movl %edx, %eax
120 rorl $10, %esi
121 xorl %ecx, %eax
122 movl 60(%rbx), %r9d
123 addl %ecx, %esi
124 andl %esi, %eax
125 xorl %edx, %eax
126 addl %edi, %eax
127 leal 1200080426(%r10,%rdx), %edi
128 movl %ecx, %edx
129 roll $7, %eax
130 xorl %esi, %edx
131 movl %ebp, %r10d
132 addl %esi, %eax
133 movl %r10d, -28(%rsp)
134 andl %eax, %edx
135 xorl %ecx, %edx
136 addl %edi, %edx
137 leal -1473231341(%rbp,%rcx), %edi
138 movl %esi, %ebp
139 xorl %eax, %ebp
140 roll $12, %edx
141 addl %eax, %edx
142 movl %ebp, %ecx
143 movl %eax, %ebp
144 andl %edx, %ecx
145 xorl %edx, %ebp
146 xorl %esi, %ecx
147 addl %edi, %ecx
148 leal -45705983(%r13,%rsi), %edi
149 movl %ebp, %esi
150 rorl $15, %ecx
151 movl 32(%rbx), %ebp
152 addl %edx, %ecx
153 andl %ecx, %esi
154 xorl %eax, %esi
155 movl %ebp, -48(%rsp)
156 addl %edi, %esi
157 leal 1770035416(%rbp,%rax), %edi
158 movl %edx, %eax
159 rorl $10, %esi
160 xorl %ecx, %eax
161 movl 48(%rbx), %ebp
162 addl %ecx, %esi
163 andl %esi, %eax
164 xorl %edx, %eax
165 addl %edi, %eax
166 leal -1958414417(%r12,%rdx), %edi
167 movl %ecx, %edx
168 roll $7, %eax
169 xorl %esi, %edx
170 movl 56(%rbx), %r12d
171 addl %esi, %eax
172 andl %eax, %edx
173 xorl %ecx, %edx
174 addl %edi, %edx
175 movl 40(%rbx), %edi
176 roll $12, %edx
177 addl %eax, %edx
178 movl %edi, -40(%rsp)
179 leal -42063(%rdi,%rcx), %edi
180 movl %esi, %ecx
181 xorl %eax, %ecx
182 andl %edx, %ecx
183 xorl %esi, %ecx
184 addl %edi, %ecx
185 leal -1990404162(%r8,%rsi), %edi
186 movl %eax, %esi
187 rorl $15, %ecx
188 xorl %edx, %esi
189 movl 52(%rbx), %r8d
190 addl %edx, %ecx
191 addq $64, %rbx
192 andl %ecx, %esi
193 xorl %eax, %esi
194 addl %edi, %esi
195 leal 1804603682(%rbp,%rax), %edi
196 movl %edx, %eax
197 rorl $10, %esi
198 xorl %ecx, %eax
199 addl %ecx, %esi
200 andl %esi, %eax
201 xorl %edx, %eax
202 addl %edi, %eax
203 leal -40341101(%r8,%rdx), %edi
204 movl %ecx, %edx
205 roll $7, %eax
206 xorl %esi, %edx
207 addl %esi, %eax
208 andl %eax, %edx
209 xorl %ecx, %edx
210 addl %edi, %edx
211 leal -1502002290(%r12,%rcx), %edi
212 movl %esi, %ecx
213 roll $12, %edx
214 xorl %eax, %ecx
215 addl %eax, %edx
216 andl %edx, %ecx
217 xorl %esi, %ecx
218 addl %edi, %ecx
219 leal 1236535329(%r9,%rsi), %edi
220 movl %eax, %esi
221 rorl $15, %ecx
222 xorl %edx, %esi
223 addl %edx, %ecx
224 andl %ecx, %esi
225 xorl %eax, %esi
226 addl %edi, %esi
227 movl -68(%rsp), %edi
228 rorl $10, %esi
229 addl %ecx, %esi
230 leal -165796510(%rdi,%rax), %edi
231 movl %ecx, %eax
232 xorl %esi, %eax
233 andl %edx, %eax
234 xorl %ecx, %eax
235 addl %edi, %eax
236 leal -1069501632(%r10,%rdx), %edi
237 movl %esi, %edx
238 roll $5, %eax
239 addl %esi, %eax
240 xorl %eax, %edx
241 andl %ecx, %edx
242 xorl %esi, %edx
243 addl %edi, %edx
244 movl -36(%rsp), %edi
245 roll $9, %edx
246 addl %eax, %edx
247 leal 643717713(%rdi,%rcx), %edi
248 movl %eax, %ecx
249 xorl %edx, %ecx
250 andl %esi, %ecx
251 xorl %eax, %ecx
252 addl %edi, %ecx
253 leal -373897302(%r14,%rsi), %edi
254 movl %edx, %esi
255 roll $14, %ecx
256 addl %edx, %ecx
257 xorl %ecx, %esi
258 andl %eax, %esi
259 xorl %edx, %esi
260 addl %edi, %esi
261 movl -52(%rsp), %edi
262 rorl $12, %esi
263 addl %ecx, %esi
264 leal -701558691(%rdi,%rax), %edi
265 movl %ecx, %eax
266 xorl %esi, %eax
267 andl %edx, %eax
268 xorl %ecx, %eax
269 addl %edi, %eax
270 movl -40(%rsp), %edi
271 roll $5, %eax
272 addl %esi, %eax
273 leal 38016083(%rdi,%rdx), %edi
274 movl %esi, %edx
275 xorl %eax, %edx
276 andl %ecx, %edx
277 xorl %esi, %edx
278 addl %edi, %edx
279 leal -660478335(%r9,%rcx), %edi
280 movl %eax, %ecx
281 roll $9, %edx
282 addl %eax, %edx
283 xorl %edx, %ecx
284 andl %esi, %ecx
285 xorl %eax, %ecx
286 addl %edi, %ecx
287 movl -56(%rsp), %edi
288 movl -44(%rsp), %r10d
289 roll $14, %ecx
290 addl %edx, %ecx
291 leal -405537848(%rdi,%rsi), %edi
292 movl %edx, %esi
293 xorl %ecx, %esi
294 andl %eax, %esi
295 xorl %edx, %esi
296 addl %edi, %esi
297 leal 568446438(%r10,%rax), %edi
298 movl %ecx, %eax
299 rorl $12, %esi
300 movl -48(%rsp), %r10d
301 addl %ecx, %esi
302 xorl %esi, %eax
303 andl %edx, %eax
304 xorl %ecx, %eax
305 addl %edi, %eax
306 leal -1019803690(%r12,%rdx), %edi
307 movl %esi, %edx
308 roll $5, %eax
309 addl %esi, %eax
310 xorl %eax, %edx
311 andl %ecx, %edx
312 xorl %esi, %edx
313 addl %edi, %edx
314 movl -60(%rsp), %edi
315 roll $9, %edx
316 addl %eax, %edx
317 leal -187363961(%rdi,%rcx), %edi
318 movl %eax, %ecx
319 xorl %edx, %ecx
320 andl %esi, %ecx
321 leal 1163531501(%r10,%rsi), %esi
322 movl %edx, %r10d
323 xorl %eax, %ecx
324 addl %edi, %ecx
325 roll $14, %ecx
326 addl %edx, %ecx
327 xorl %ecx, %r10d
328 movl %r10d, %edi
329 andl %eax, %edi
330 xorl %edx, %edi
331 addl %esi, %edi
332 leal -1444681467(%r8,%rax), %esi
333 movl %ecx, %eax
334 rorl $12, %edi
335 addl %ecx, %edi
336 xorl %edi, %eax
337 leal -1926607734(%rbp,%rdi), %r10d
338 andl %edx, %eax
339 xorl %ecx, %eax
340 movl %r10d, -20(%rsp)
341 addl %esi, %eax
342 movl -64(%rsp), %esi
343 roll $5, %eax
344 addl %edi, %eax
345 leal -51403784(%rsi,%rdx), %esi
346 movl %edi, %edx
347 xorl %eax, %edx
348 andl %ecx, %edx
349 leal 1735328473(%r13,%rcx), %ecx
350 xorl %edi, %edx
351 addl %esi, %edx
352 movl %eax, %esi
353 roll $9, %edx
354 addl %eax, %edx
355 xorl %edx, %esi
356 andl %edi, %esi
357 xorl %eax, %esi
358 addl %ecx, %esi
359 movl %edx, %ecx
360 roll $14, %esi
361 addl %edx, %esi
362 xorl %esi, %ecx
363 movl %ecx, %r10d
364 andl %eax, %r10d
365 movl %r10d, %edi
366 movl -52(%rsp), %r10d
367 xorl %edx, %edi
368 addl -20(%rsp), %edi
369 leal -378558(%r10,%rax), %eax
370 rorl $12, %edi
371 addl %esi, %edi
372 xorl %edi, %ecx
373 addl %eax, %ecx
374 movl -48(%rsp), %eax
375 roll $4, %ecx
376 addl %edi, %ecx
377 leal -2022574463(%rax,%rdx), %eax
378 movl %esi, %edx
379 xorl %edi, %edx
380 xorl %ecx, %edx
381 addl %eax, %edx
382 movl -36(%rsp), %eax
383 roll $11, %edx
384 addl %ecx, %edx
385 leal 1839030562(%rax,%rsi), %eax
386 movl %edi, %esi
387 leal -35309556(%r12,%rdi), %edi
388 xorl %ecx, %esi
389 xorl %edx, %esi
390 addl %eax, %esi
391 movl %ecx, %eax
392 roll $16, %esi
393 xorl %edx, %eax
394 addl %edx, %esi
395 xorl %esi, %eax
396 movl %esi, %r10d
397 addl %edi, %eax
398 movl -68(%rsp), %edi
399 rorl $9, %eax
400 addl %esi, %eax
401 leal -1530992060(%rdi,%rcx), %edi
402 movl %edx, %ecx
403 xorl %eax, %r10d
404 xorl %esi, %ecx
405 leal -155497632(%r13,%rsi), %esi
406 xorl %eax, %ecx
407 addl %edi, %ecx
408 movl -56(%rsp), %edi
409 roll $4, %ecx
410 addl %eax, %ecx
411 leal 1272893353(%rdi,%rdx), %edx
412 movl %r10d, %edi
413 xorl %ecx, %edi
414 addl %edx, %edi
415 movl %eax, %edx
416 roll $11, %edi
417 xorl %ecx, %edx
418 addl %ecx, %edi
419 xorl %edi, %edx
420 addl %esi, %edx
421 movl -40(%rsp), %esi
422 roll $16, %edx
423 addl %edi, %edx
424 leal -1094730640(%rsi,%rax), %eax
425 movl %ecx, %esi
426 xorl %edi, %esi
427 xorl %edx, %esi
428 addl %eax, %esi
429 leal 681279174(%r8,%rcx), %eax
430 movl %edi, %ecx
431 rorl $9, %esi
432 xorl %edx, %ecx
433 leal -358537222(%r14,%rdi), %edi
434 addl %edx, %esi
435 xorl %esi, %ecx
436 movl %esi, %r10d
437 addl %eax, %ecx
438 movl %edx, %eax
439 roll $4, %ecx
440 xorl %esi, %eax
441 addl %esi, %ecx
442 xorl %ecx, %eax
443 xorl %ecx, %r10d
444 addl %edi, %eax
445 movl -60(%rsp), %edi
446 roll $11, %eax
447 addl %ecx, %eax
448 leal -722521979(%rdi,%rdx), %edx
449 movl %r10d, %edi
450 xorl %eax, %edi
451 addl %edx, %edi
452 movl -28(%rsp), %edx
453 roll $16, %edi
454 addl %eax, %edi
455 leal 76029189(%rdx,%rsi), %edx
456 movl %ecx, %esi
457 xorl %eax, %esi
458 xorl %edi, %esi
459 addl %edx, %esi
460 movl -44(%rsp), %edx
461 rorl $9, %esi
462 addl %edi, %esi
463 leal -640364487(%rdx,%rcx), %ecx
464 movl %eax, %edx
465 leal -421815835(%rbp,%rax), %eax
466 xorl %edi, %edx
467 movl %esi, %r10d
468 xorl %esi, %edx
469 addl %ecx, %edx
470 movl %edi, %ecx
471 roll $4, %edx
472 addl %esi, %edx
473 xorl %esi, %ecx
474 xorl %edx, %ecx
475 xorl %edx, %r10d
476 addl %eax, %ecx
477 leal 530742520(%r9,%rdi), %eax
478 movl %r10d, %edi
479 roll $11, %ecx
480 movl -52(%rsp), %r10d
481 addl %edx, %ecx
482 xorl %ecx, %edi
483 addl %eax, %edi
484 movl -64(%rsp), %eax
485 roll $16, %edi
486 addl %ecx, %edi
487 leal -995338651(%rax,%rsi), %esi
488 movl %edx, %eax
489 xorl %ecx, %eax
490 xorl %edi, %eax
491 addl %esi, %eax
492 leal -198630844(%r14,%rdx), %esi
493 movl %ecx, %edx
494 rorl $9, %eax
495 notl %edx
496 movl -68(%rsp), %r14d
497 addl %edi, %eax
498 orl %eax, %edx
499 xorl %edi, %edx
500 addl %esi, %edx
501 leal 1126891415(%r13,%rcx), %esi
502 movl %edi, %r13d
503 roll $6, %edx
504 notl %r13d
505 leal -1416354905(%r12,%rdi), %edi
506 addl %eax, %edx
507 movl %r13d, %ecx
508 orl %edx, %ecx
509 movl %edx, %r13d
510 xorl %eax, %ecx
511 notl %r13d
512 addl %esi, %ecx
513 movl %eax, %esi
514 roll $10, %ecx
515 notl %esi
516 addl %edx, %ecx
517 orl %ecx, %esi
518 movl %ecx, %r12d
519 xorl %edx, %esi
520 notl %r12d
521 addl %edi, %esi
522 leal -57434055(%r10,%rax), %edi
523 movl %r13d, %eax
524 roll $15, %esi
525 movl -28(%rsp), %r10d
526 addl %ecx, %esi
527 orl %esi, %eax
528 xorl %ecx, %eax
529 addl %edi, %eax
530 leal 1700485571(%rbp,%rdx), %edi
531 movl -60(%rsp), %ebp
532 rorl $11, %eax
533 movl %r12d, %edx
534 addl %esi, %eax
535 orl %eax, %edx
536 xorl %esi, %edx
537 addl %edi, %edx
538 leal -1894986606(%rbp,%rcx), %edi
539 movl %esi, %ebp
540 roll $6, %edx
541 notl %ebp
542 addl %eax, %edx
543 movl %ebp, %ecx
544 orl %edx, %ecx
545 movl %edx, %ebp
546 xorl %eax, %ecx
547 notl %ebp
548 addl %edi, %ecx
549 movl -40(%rsp), %edi
550 roll $10, %ecx
551 addl %edx, %ecx
552 leal -1051523(%rdi,%rsi), %edi
553 movl %eax, %esi
554 notl %esi
555 orl %ecx, %esi
556 xorl %edx, %esi
557 addl %edi, %esi
558 leal -2054922799(%r14,%rax), %edi
559 movl %ebp, %eax
560 roll $15, %esi
561 movl -48(%rsp), %r14d
562 movl %ecx, %ebp
563 addl %ecx, %esi
564 notl %ebp
565 orl %esi, %eax
566 xorl %ecx, %eax
567 addl %edi, %eax
568 leal 1873313359(%r14,%rdx), %edi
569 movl %ebp, %edx
570 rorl $11, %eax
571 movl %esi, %ebp
572 movl -36(%rsp), %r14d
573 addl %esi, %eax
574 notl %ebp
575 orl %eax, %edx
576 xorl %esi, %edx
577 addl %edi, %edx
578 leal -30611744(%r9,%rcx), %edi
579 movl %ebp, %ecx
580 roll $6, %edx
581 movl -56(%rsp), %r9d
582 addl %eax, %edx
583 orl %edx, %ecx
584 xorl %eax, %ecx
585 addl %edi, %ecx
586 leal -1560198380(%r10,%rsi), %edi
587 movl %eax, %esi
588 roll $10, %ecx
589 notl %esi
590 leal 1309151649(%r8,%rax), %eax
591 addl %edx, %ecx
592 movl %edx, %r8d
593 movl -44(%rsp), %r10d
594 orl %ecx, %esi
595 notl %r8d
596 xorl %edx, %esi
597 leal -145523070(%r9,%rdx), %edx
598 movl %ecx, %r9d
599 addl %edi, %esi
600 movl %r8d, %edi
601 notl %r9d
602 roll $15, %esi
603 addl %ecx, %esi
604 orl %esi, %edi
605 xorl %ecx, %edi
606 leal -1120210379(%r14,%rcx), %ecx
607 addl %eax, %edi
608 movl %r9d, %eax
609 rorl $11, %edi
610 addl %esi, %edi
611 orl %edi, %eax
612 xorl %esi, %eax
613 addl %edx, %eax
614 movl %esi, %edx
615 roll $6, %eax
616 notl %edx
617 addl %edi, %eax
618 orl %eax, %edx
619 xorl %edi, %edx
620 addl %ecx, %edx
621 movl -64(%rsp), %ecx
622 roll $10, %edx
623 addl %eax, %edx
624 leal 718787259(%rcx,%rsi), %esi
625 movl %edi, %ecx
626 leal -343485551(%r10,%rdi), %edi
627 notl %ecx
628 orl %edx, %ecx
629 xorl %eax, %ecx
630 addl %esi, %ecx
631 movl %eax, %esi
632 roll $15, %ecx
633 notl %esi
634 addl %edx, %ecx
635 orl %ecx, %esi
636 xorl %edx, %esi
637 addl %edi, %esi
638 rorl $11, %esi
639 addl %ecx, %esi
640 addl %eax, -24(%rsp)
641 addl %ecx, %r15d
642 addl %esi, %r11d
643 addl %edx, -32(%rsp)
644 cmpq %rbx, -16(%rsp)
645 ja .L8
646 movl %r15d, %r10d
647 .L7:
648 movq -8(%rsp), %rax
649 movl -24(%rsp), %ebx
650 movl %ebx, (%rax)
651 movl -32(%rsp), %ebx
652 movl %r11d, 4(%rax)
653 movl %r10d, 8(%rax)
654 movl %ebx, 12(%rax)
655 popq %rbx
656 popq %rbp
657 popq %r12
658 popq %r13
659 popq %r14
660 popq %r15
662 .size __md5_process_block, .-__md5_process_block
663 .p2align 4,,15
664 .globl __md5_finish_ctx
665 .type __md5_finish_ctx, @function
666 __md5_finish_ctx:
667 pushq %r13
668 pushq %r12
669 xorl %edx, %edx
670 pushq %rbp
671 pushq %rbx
672 movq %rsi, %r13
673 movq %rdi, %rbx
674 subq $8, %rsp
675 movl 24(%rdi), %eax
676 movl %eax, %ecx
677 addl 16(%rdi), %ecx
678 setc %dl
679 movl %ecx, 16(%rdi)
680 testl %edx, %edx
681 je .L14
682 addl $1, 20(%rdi)
683 .L14:
684 cmpl $55, %eax
685 ja .L21
686 movl $56, %esi
687 movl %esi, %ebp
688 subl %eax, %ebp
689 .L16:
690 movl %eax, %r12d
691 leaq fillbuf(%rip), %rsi
692 movq %rbp, %rdx
693 leaq 28(%rbx,%r12), %rdi
694 call memcpy@PLT
695 movl 16(%rbx), %edx
696 leaq 0(%rbp,%r12), %rsi
697 leaq 28(%rbx), %rdi
698 movq %rsi, %rax
699 leal 0(,%rdx,8), %ecx
700 shrq $2, %rax
701 shrl $29, %edx
702 movl %ecx, 28(%rbx,%rax,4)
703 movl 20(%rbx), %eax
704 leaq 4(%rsi), %rcx
705 addq $8, %rsi
706 shrq $2, %rcx
707 sall $3, %eax
708 orl %edx, %eax
709 movq %rbx, %rdx
710 movl %eax, 28(%rbx,%rcx,4)
711 call __md5_process_block
712 movl (%rbx), %eax
713 movl %eax, 0(%r13)
714 movl 4(%rbx), %eax
715 movl %eax, 4(%r13)
716 movl 8(%rbx), %eax
717 movl %eax, 8(%r13)
718 movl 12(%rbx), %eax
719 movl %eax, 12(%r13)
720 addq $8, %rsp
721 movq %r13, %rax
722 popq %rbx
723 popq %rbp
724 popq %r12
725 popq %r13
727 .p2align 4,,10
728 .p2align 3
729 .L21:
730 movl $120, %esi
731 movl %esi, %ebp
732 subl %eax, %ebp
733 jmp .L16
734 .size __md5_finish_ctx, .-__md5_finish_ctx
735 .p2align 4,,15
736 .globl __md5_process_bytes
737 .type __md5_process_bytes, @function
738 __md5_process_bytes:
739 pushq %r15
740 pushq %r14
741 pushq %r13
742 pushq %r12
743 movq %rdi, %r12
744 pushq %rbp
745 pushq %rbx
746 movq %rdx, %rbp
747 movq %rsi, %rbx
748 subq $8, %rsp
749 movl 24(%rdx), %eax
750 testl %eax, %eax
751 jne .L61
752 .L23:
753 cmpq $63, %rbx
754 ja .L62
755 .L31:
756 testq %rbx, %rbx
757 jne .L63
758 addq $8, %rsp
759 popq %rbx
760 popq %rbp
761 popq %r12
762 popq %r13
763 popq %r14
764 popq %r15
766 .p2align 4,,10
767 .p2align 3
768 .L63:
769 movl 24(%rbp), %esi
770 cmpl $8, %ebx
771 movl %ebx, %eax
772 leaq 28(%rbp,%rsi), %rcx
773 jnb .L33
774 testb $4, %bl
775 jne .L64
776 testl %ebx, %ebx
777 je .L34
778 movzbl (%r12), %edx
779 testb $2, %al
780 movb %dl, (%rcx)
781 jne .L65
782 .L34:
783 addq %rsi, %rbx
784 cmpq $63, %rbx
785 jbe .L39
786 leaq 28(%rbp), %r12
787 movq %rbp, %rdx
788 movl $64, %esi
789 subq $64, %rbx
790 movq %r12, %rdi
791 call __md5_process_block
792 leaq 92(%rbp), %rsi
793 movq %rbx, %rdx
794 movq %r12, %rdi
795 call memcpy@PLT
796 .L39:
797 movl %ebx, 24(%rbp)
798 addq $8, %rsp
799 popq %rbx
800 popq %rbp
801 popq %r12
802 popq %r13
803 popq %r14
804 popq %r15
806 .p2align 4,,10
807 .p2align 3
808 .L62:
809 movq %rbx, %r13
810 movq %r12, %rdi
811 movq %rbp, %rdx
812 andq $-64, %r13
813 andl $63, %ebx
814 movq %r13, %rsi
815 addq %r13, %r12
816 call __md5_process_block
817 jmp .L31
818 .p2align 4,,10
819 .p2align 3
820 .L61:
821 movl %eax, %r13d
822 movl $128, %edx
823 subq %r13, %rdx
824 leaq 28(%rbp,%r13), %rdi
825 cmpq %rsi, %rdx
826 cmova %rsi, %rdx
827 movq %r12, %rsi
828 movq %rdx, %r14
829 call memcpy@PLT
830 movl 24(%rbp), %esi
831 addl %r14d, %esi
832 cmpl $64, %esi
833 movl %esi, 24(%rbp)
834 ja .L66
835 .L24:
836 addq %r14, %r12
837 subq %r14, %rbx
838 jmp .L23
839 .p2align 4,,10
840 .p2align 3
841 .L33:
842 movq (%r12), %rax
843 movq %rax, (%rcx)
844 movl %ebx, %eax
845 movq -8(%r12,%rax), %rdx
846 movq %rdx, -8(%rcx,%rax)
847 leaq 8(%rcx), %rdx
848 andq $-8, %rdx
849 subq %rdx, %rcx
850 leal (%rbx,%rcx), %eax
851 subq %rcx, %r12
852 andl $-8, %eax
853 cmpl $8, %eax
854 jb .L34
855 andl $-8, %eax
856 xorl %ecx, %ecx
857 .L37:
858 movl %ecx, %edi
859 addl $8, %ecx
860 movq (%r12,%rdi), %r8
861 cmpl %eax, %ecx
862 movq %r8, (%rdx,%rdi)
863 jb .L37
864 jmp .L34
865 .p2align 4,,10
866 .p2align 3
867 .L66:
868 leaq 28(%rbp), %r15
869 andl $-64, %esi
870 movq %rbp, %rdx
871 movq %r15, %rdi
872 call __md5_process_block
873 movl 24(%rbp), %ecx
874 leaq 0(%r13,%r14), %rax
875 andq $-64, %rax
876 movl %ecx, %edx
877 leaq 28(%rbp,%rax), %rax
878 andl $63, %edx
879 cmpl $8, %edx
880 movl %edx, 24(%rbp)
881 jnb .L25
882 testb $4, %cl
883 jne .L67
884 testl %edx, %edx
885 je .L24
886 movzbl (%rax), %esi
887 andl $2, %ecx
888 movb %sil, 28(%rbp)
889 je .L24
890 movzwl -2(%rax,%rdx), %eax
891 movw %ax, -2(%r15,%rdx)
892 jmp .L24
893 .p2align 4,,10
894 .p2align 3
895 .L25:
896 movq (%rax), %rcx
897 movq %rcx, 28(%rbp)
898 movl %edx, %ecx
899 movq -8(%rax,%rcx), %rsi
900 movq %rsi, -8(%r15,%rcx)
901 leaq 36(%rbp), %rcx
902 andq $-8, %rcx
903 subq %rcx, %r15
904 addl %r15d, %edx
905 subq %r15, %rax
906 andl $-8, %edx
907 cmpl $8, %edx
908 jb .L24
909 andl $-8, %edx
910 xorl %esi, %esi
911 .L29:
912 movl %esi, %edi
913 addl $8, %esi
914 movq (%rax,%rdi), %r8
915 cmpl %edx, %esi
916 movq %r8, (%rcx,%rdi)
917 jb .L29
918 jmp .L24
919 .L67:
920 movl (%rax), %ecx
921 movl %ecx, 28(%rbp)
922 movl -4(%rax,%rdx), %eax
923 movl %eax, -4(%r15,%rdx)
924 jmp .L24
925 .p2align 4,,10
926 .p2align 3
927 .L64:
928 movl (%r12), %edx
929 movl %edx, (%rcx)
930 movl %ebx, %edx
931 movl -4(%r12,%rdx), %eax
932 movl %eax, -4(%rcx,%rdx)
933 jmp .L34
934 .L65:
935 movl %ebx, %edx
936 movzwl -2(%r12,%rdx), %eax
937 movw %ax, -2(%rcx,%rdx)
938 jmp .L34
939 .size __md5_process_bytes, .-__md5_process_bytes
940 .p2align 4,,15
941 .globl __md5_buffer
942 .type __md5_buffer, @function
943 __md5_buffer:
944 pushq %rbp
945 pushq %rbx
946 movabsq $-1167088121787636991, %rax
947 movq %rdx, %rbp
948 subq $168, %rsp
949 movq %rsp, %rbx
950 movq %rax, (%rsp)
951 movabsq $1167088121787636990, %rax
952 movq %rbx, %rdx
953 movq %rax, 8(%rsp)
954 movq $0, 16(%rsp)
955 movl $0, 24(%rsp)
956 call __md5_process_bytes
957 movq %rbp, %rsi
958 movq %rbx, %rdi
959 call __md5_finish_ctx
960 addq $168, %rsp
961 popq %rbx
962 popq %rbp
964 .size __md5_buffer, .-__md5_buffer
965 .p2align 4,,15
966 .globl __md5_stream
967 .type __md5_stream, @function
968 __md5_stream:
969 pushq %r15
970 pushq %r14
971 movabsq $-1167088121787636991, %rax
972 pushq %r13
973 pushq %r12
974 movq %rdi, %r13
975 pushq %rbp
976 pushq %rbx
977 movq %rsi, %r15
978 subq $4344, %rsp
979 movq %rax, (%rsp)
980 leaq 160(%rsp), %rbp
981 movabsq $1167088121787636990, %rax
982 movq %rax, 8(%rsp)
983 movq $0, 16(%rsp)
984 movq %rsp, %r14
985 movl $0, 24(%rsp)
986 .p2align 4,,10
987 .p2align 3
988 .L76:
989 xorl %ebx, %ebx
990 movl $4096, %r12d
991 jmp .L71
992 .p2align 4,,10
993 .p2align 3
994 .L87:
995 testq %rax, %rax
996 je .L80
997 .L71:
998 leaq 0(%rbp,%rbx), %rdi
999 movq %r12, %rdx
1000 movq %r13, %rcx
1001 subq %rbx, %rdx
1002 movl $1, %esi
1003 call fread@PLT
1004 addq %rax, %rbx
1005 cmpq $4095, %rbx
1006 jbe .L87
1007 .L80:
1008 testq %rax, %rax
1009 je .L88
1010 movq %r14, %rdx
1011 movl $4096, %esi
1012 movq %rbp, %rdi
1013 call __md5_process_block
1014 jmp .L76
1015 .p2align 4,,10
1016 .p2align 3
1017 .L88:
1018 movq %r13, %rdi
1019 call ferror@PLT
1020 testl %eax, %eax
1021 movl %eax, %r12d
1022 jne .L89
1023 testq %rbx, %rbx
1024 movq %rsp, %r13
1025 jne .L77
1026 .L78:
1027 movq %r15, %rsi
1028 movq %r13, %rdi
1029 call __md5_finish_ctx
1030 .L70:
1031 addq $4344, %rsp
1032 movl %r12d, %eax
1033 popq %rbx
1034 popq %rbp
1035 popq %r12
1036 popq %r13
1037 popq %r14
1038 popq %r15
1040 .L89:
1041 movl $1, %r12d
1042 jmp .L70
1043 .p2align 4,,10
1044 .p2align 3
1045 .L77:
1046 movq %r13, %rdx
1047 movq %rbx, %rsi
1048 movq %rbp, %rdi
1049 call __md5_process_bytes
1050 jmp .L78
1051 .size __md5_stream, .-__md5_stream
1052 .section .rodata
1053 .align 32
1054 .type fillbuf, @object
1055 .size fillbuf, 64
1056 fillbuf:
1057 .byte -128
1058 .byte 0
1059 .zero 62