clarify the purpose of this project
[nyanglibc.git] / sunrpc / auth_des.shared.s
blobe4f9c9c6bd1dfae83ff1a2fcfa76c16f505f3104
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 .symver __EI_authdes_create, authdes_create@GLIBC_2.2.5
7 .symver __EI_authdes_pk_create, authdes_pk_create@GLIBC_2.2.5
8 #NO_APP
9 .p2align 4,,15
10 .type authdes_nextverf, @function
11 authdes_nextverf:
12 rep ret
13 .size authdes_nextverf, .-authdes_nextverf
14 .p2align 4,,15
15 .type authdes_destroy, @function
16 authdes_destroy:
17 pushq %rbp
18 pushq %rbx
19 movq %rdi, %rbp
20 subq $8, %rsp
21 movq 64(%rdi), %rbx
22 movq (%rbx), %rdi
23 call free@PLT
24 movq 16(%rbx), %rdi
25 call free@PLT
26 movq %rbx, %rdi
27 call free@PLT
28 addq $8, %rsp
29 movq %rbp, %rdi
30 popq %rbx
31 popq %rbp
32 jmp free@PLT
33 .size authdes_destroy, .-authdes_destroy
34 .p2align 4,,15
35 .type authdes_validate, @function
36 authdes_validate:
37 cmpl $12, 16(%rsi)
38 je .L6
39 xorl %eax, %eax
40 ret
41 .p2align 4,,10
42 .p2align 3
43 .L6:
44 pushq %rbx
45 addq $48, %rdi
46 movl $1, %ecx
47 subq $16, %rsp
48 movq 8(%rsi), %rax
49 movq 16(%rdi), %rbx
50 leaq 4(%rsp), %rsi
51 movl (%rax), %edx
52 movl %edx, 4(%rsp)
53 movl 4(%rax), %edx
54 movl 8(%rax), %eax
55 movl %edx, 8(%rsp)
56 movl $8, %edx
57 movl %eax, 12(%rsp)
58 call __GI_ecb_crypt
59 cmpl $1, %eax
60 jle .L12
61 .L8:
62 xorl %eax, %eax
63 .L5:
64 addq $16, %rsp
65 popq %rbx
66 ret
67 .p2align 4,,10
68 .p2align 3
69 .L12:
70 movl 4(%rsp), %eax
71 bswap %eax
72 addl $1, %eax
73 movl %eax, 4(%rsp)
74 movl 8(%rsp), %eax
75 bswap %eax
76 movl %eax, 8(%rsp)
77 movq 116(%rbx), %rax
78 cmpq %rax, 4(%rsp)
79 jne .L8
80 movl 12(%rsp), %eax
81 movl $1, 64(%rbx)
82 movl %eax, 60(%rbx)
83 movl $1, %eax
84 jmp .L5
85 .size authdes_validate, .-authdes_validate
86 .p2align 4,,15
87 .type authdes_marshal, @function
88 authdes_marshal:
89 pushq %r12
90 pushq %rbp
91 movq %rdi, %rbp
92 pushq %rbx
93 movq %rsi, %rbx
94 subq $48, %rsp
95 movq 64(%rdi), %r12
96 xorl %edi, %edi
97 leaq 32(%rsp), %rsi
98 call __GI___clock_gettime
99 movq 40(%rsp), %rsi
100 movabsq $2361183241434822607, %rdx
101 movl 52(%r12), %ecx
102 addl 32(%rsp), %ecx
103 movq %rsi, %rax
104 sarq $63, %rsi
105 imulq %rdx
106 movl %ecx, 116(%r12)
107 sarq $7, %rdx
108 subq %rsi, %rdx
109 addl 56(%r12), %edx
110 cmpl $999999, %edx
111 ja .L14
112 movl %edx, 120(%r12)
113 .L15:
114 bswap %edx
115 bswap %ecx
116 leaq 48(%rbp), %rdi
117 movl %edx, 20(%rsp)
118 movl 64(%r12), %edx
119 movl %ecx, 16(%rsp)
120 testl %edx, %edx
121 jne .L16
122 movl 28(%r12), %eax
123 leaq 16(%rsp), %rsi
124 leaq 8(%rsp), %r8
125 xorl %ecx, %ecx
126 movq $0, 8(%rsp)
127 movl %eax, %edx
128 subl $1, %eax
129 bswap %edx
130 bswap %eax
131 movl %edx, 24(%rsp)
132 movl $16, %edx
133 movl %eax, 28(%rsp)
134 call __GI_cbc_crypt
135 cmpl $1, %eax
136 jle .L18
137 .L24:
138 addq $48, %rsp
139 xorl %eax, %eax
140 popq %rbx
141 popq %rbp
142 popq %r12
144 .p2align 4,,10
145 .p2align 3
146 .L16:
147 leaq 16(%rsp), %rsi
148 xorl %ecx, %ecx
149 movl $8, %edx
150 call __GI_ecb_crypt
151 cmpl $1, %eax
152 jg .L24
153 .L18:
154 movq 16(%rsp), %rax
155 movq %rax, 104(%r12)
156 movl 64(%r12), %eax
157 testl %eax, %eax
158 je .L43
159 movl 60(%r12), %eax
160 movl $0, 112(%r12)
161 movl $8, 4(%rsp)
162 movl %eax, 96(%r12)
163 .L21:
164 movq 8(%rbx), %rax
165 movl $8, %esi
166 movq %rbx, %rdi
167 call *48(%rax)
168 testq %rax, %rax
169 jne .L44
170 movq 8(%rbx), %rax
171 movq %rbp, %rsi
172 movq %rbx, %rdi
173 call *72(%rax)
174 testl %eax, %eax
175 je .L24
176 movq 8(%rbx), %rax
177 leaq 4(%rsp), %rsi
178 movq %rbx, %rdi
179 call *72(%rax)
180 testl %eax, %eax
181 je .L24
182 .L23:
183 leaq 64(%r12), %rsi
184 movq %rbx, %rdi
185 call __GI_xdr_authdes_cred
186 testl %eax, %eax
187 je .L24
188 movq 8(%rbx), %rax
189 movl $12, 4(%rsp)
190 movl $8, %esi
191 movq %rbx, %rdi
192 call *48(%rax)
193 testq %rax, %rax
194 jne .L45
195 movq 8(%rbx), %rax
196 leaq 24(%rbp), %rsi
197 movq %rbx, %rdi
198 call *72(%rax)
199 testl %eax, %eax
200 je .L24
201 movq 8(%rbx), %rax
202 leaq 4(%rsp), %rsi
203 movq %rbx, %rdi
204 call *72(%rax)
205 testl %eax, %eax
206 je .L24
207 .L26:
208 leaq 104(%r12), %rsi
209 movq %rbx, %rdi
210 call __GI_xdr_authdes_verf
211 testl %eax, %eax
212 setne %al
213 addq $48, %rsp
214 popq %rbx
215 movzbl %al, %eax
216 popq %rbp
217 popq %r12
219 .p2align 4,,10
220 .p2align 3
221 .L14:
222 subl $1000000, %edx
223 addl $1, %ecx
224 movl %edx, 120(%r12)
225 movl %ecx, 116(%r12)
226 jmp .L15
227 .p2align 4,,10
228 .p2align 3
229 .L43:
230 movl 24(%rsp), %eax
231 movl %eax, 88(%r12)
232 movl 28(%rsp), %eax
233 movl %eax, 112(%r12)
234 movl 8(%r12), %eax
235 addl $20, %eax
236 movl %eax, 4(%rsp)
237 jmp .L21
238 .p2align 4,,10
239 .p2align 3
240 .L44:
241 movl $50331648, (%rax)
242 movl 4(%rsp), %edx
243 bswap %edx
244 movl %edx, 4(%rax)
245 jmp .L23
246 .p2align 4,,10
247 .p2align 3
248 .L45:
249 movl $50331648, (%rax)
250 movl 4(%rsp), %edx
251 bswap %edx
252 movl %edx, 4(%rax)
253 jmp .L26
254 .size authdes_marshal, .-authdes_marshal
255 .p2align 4,,15
256 .type authdes_refresh, @function
257 authdes_refresh:
258 pushq %r12
259 pushq %rbp
260 movq %rdi, %rbp
261 pushq %rbx
262 subq $32, %rsp
263 movq 64(%rdi), %rbx
264 leaq 16(%rsp), %r12
265 movl 32(%rbx), %eax
266 testl %eax, %eax
267 jne .L54
268 .L47:
269 movq 48(%rbp), %rax
270 leaq 132(%rbx), %rdi
271 movq %rax, 124(%rbx)
272 movq %rdi, 24(%rsp)
273 call __GI_strlen
274 movq 16(%rbx), %rdi
275 leaq 124(%rbx), %rdx
276 addl $1, %eax
277 movq %r12, %rsi
278 movl %eax, 16(%rsp)
279 call __GI_key_encryptsession_pk
280 xorl %edx, %edx
281 testl %eax, %eax
282 js .L46
283 movq 124(%rbx), %rax
284 movl $0, 64(%rbx)
285 movl $1, %edx
286 movq %rax, 80(%rbx)
287 movq (%rbx), %rax
288 movq %rax, 72(%rbx)
289 .L46:
290 addq $32, %rsp
291 movl %edx, %eax
292 popq %rbx
293 popq %rbp
294 popq %r12
296 .p2align 4,,10
297 .p2align 3
298 .L54:
299 leaq 8(%rsp), %rdx
300 leaq 52(%rbx), %rsi
301 leaq 36(%rbx), %rdi
302 movq $5, 8(%rsp)
303 call __GI_rtime
304 testl %eax, %eax
305 js .L55
306 movq %r12, %rsi
307 xorl %edi, %edi
308 call __GI___clock_gettime
309 movq 24(%rsp), %rsi
310 movabsq $2361183241434822607, %rdx
311 movl 52(%rbx), %ecx
312 subl 16(%rsp), %ecx
313 movq %rsi, %rax
314 sarq $63, %rsi
315 imulq %rdx
316 movl %ecx, 52(%rbx)
317 sarq $7, %rdx
318 subq %rsi, %rdx
319 movl 56(%rbx), %esi
320 cmpq %rsi, %rdx
321 movq %rsi, %rax
322 jle .L49
323 subl $1, %ecx
324 addl $1000000, %eax
325 movl %ecx, 52(%rbx)
326 .L49:
327 subl %edx, %eax
328 movl %eax, 56(%rbx)
329 jmp .L47
330 .p2align 4,,10
331 .p2align 3
332 .L55:
333 movq $0, 52(%rbx)
334 jmp .L47
335 .size authdes_refresh, .-authdes_refresh
336 .p2align 4,,15
337 .globl __GI_authdes_pk_create
338 .hidden __GI_authdes_pk_create
339 .type __GI_authdes_pk_create, @function
340 __GI_authdes_pk_create:
341 pushq %r15
342 pushq %r14
343 movq %rsi, %r14
344 pushq %r13
345 pushq %r12
346 movq %rcx, %r12
347 pushq %rbp
348 pushq %rbx
349 movq %rdi, %rbx
350 movl $72, %edi
351 movq %r8, %rbp
352 subq $312, %rsp
353 movl %edx, 12(%rsp)
354 call malloc@PLT
355 movl $1, %esi
356 movq %rax, %r15
357 movl $1160, %edi
358 call calloc@PLT
359 testq %r15, %r15
360 movq %rax, %r13
361 je .L57
362 testq %rax, %rax
363 jne .L84
364 .L57:
365 testq %r15, %r15
366 jne .L62
367 .L59:
368 xorl %r15d, %r15d
369 testq %r13, %r13
370 je .L56
371 movq 0(%r13), %rdi
372 testq %rdi, %rdi
373 je .L68
374 call free@PLT
375 .L68:
376 movq 16(%r13), %rdi
377 testq %rdi, %rdi
378 je .L69
379 call free@PLT
380 .L69:
381 movq %r13, %rdi
382 xorl %r15d, %r15d
383 call free@PLT
384 .L56:
385 addq $312, %rsp
386 movq %r15, %rax
387 popq %rbx
388 popq %rbp
389 popq %r12
390 popq %r13
391 popq %r14
392 popq %r15
394 .p2align 4,,10
395 .p2align 3
396 .L84:
397 movl (%r14), %edx
398 movq 8(%r14), %rsi
399 leaq 132(%rax), %rdi
400 leaq 48(%rsp), %r14
401 call __GI_memcpy@PLT
402 movq %r14, %rdi
403 call __GI_getnetname
404 testl %eax, %eax
405 jne .L58
406 .L62:
407 movq %r15, %rdi
408 call free@PLT
409 jmp .L59
410 .p2align 4,,10
411 .p2align 3
412 .L58:
413 movq %r14, %rdx
414 .L60:
415 movl (%rdx), %esi
416 addq $4, %rdx
417 leal -16843009(%rsi), %eax
418 notl %esi
419 andl %esi, %eax
420 andl $-2139062144, %eax
421 je .L60
422 movl %eax, %esi
423 shrl $16, %esi
424 testl $32896, %eax
425 cmove %esi, %eax
426 leaq 2(%rdx), %rsi
427 movl %eax, %ecx
428 cmove %rsi, %rdx
429 addb %al, %cl
430 sbbl %r14d, %edx
431 andl $-4, %edx
432 movl %edx, 8(%r13)
433 addl $1, %edx
434 movq %rdx, %rdi
435 movq %rdx, 32(%rsp)
436 call malloc@PLT
437 movq %rbx, %rdi
438 movq %rax, 0(%r13)
439 movq %rax, 40(%rsp)
440 call __GI_strlen
441 movl %eax, 24(%r13)
442 addl $1, %eax
443 movq %rax, %rdi
444 movq %rax, 16(%rsp)
445 call malloc@PLT
446 testq %rax, %rax
447 movq %rax, 16(%r13)
448 movq %rax, 24(%rsp)
449 je .L62
450 movq 40(%rsp), %r10
451 testq %r10, %r10
452 je .L62
453 movq 32(%rsp), %rdx
454 movq %r10, %rdi
455 movq %r14, %rsi
456 call __GI_memcpy@PLT
457 movq 24(%rsp), %r9
458 movq 16(%rsp), %rdx
459 movq %rbx, %rsi
460 movq %r9, %rdi
461 call __GI_memcpy@PLT
462 testq %r12, %r12
463 movq $0, 52(%r13)
464 je .L63
465 movdqu (%r12), %xmm0
466 movl $1, 32(%r13)
467 movups %xmm0, 36(%r13)
468 .L64:
469 movl 12(%rsp), %eax
470 testq %rbp, %rbp
471 movl %eax, 28(%r13)
472 je .L85
473 movq 0(%rbp), %rax
474 movq %rax, 48(%r15)
475 .L66:
476 leaq authdes_ops(%rip), %rax
477 movl $3, (%r15)
478 movl $3, 24(%r15)
479 movq %r13, 64(%r15)
480 movq %r15, %rdi
481 movq %rax, 56(%r15)
482 call authdes_refresh
483 testl %eax, %eax
484 je .L62
485 jmp .L56
486 .p2align 4,,10
487 .p2align 3
488 .L63:
489 movl $0, 32(%r13)
490 jmp .L64
491 .L85:
492 leaq 48(%r15), %rdi
493 call __GI_key_gendes
494 testl %eax, %eax
495 jns .L66
496 jmp .L62
497 .size __GI_authdes_pk_create, .-__GI_authdes_pk_create
498 .globl __EI_authdes_pk_create
499 .set __EI_authdes_pk_create,__GI_authdes_pk_create
500 .p2align 4,,15
501 .globl __GI_authdes_create
502 .hidden __GI_authdes_create
503 .type __GI_authdes_create, @function
504 __GI_authdes_create:
505 pushq %r14
506 pushq %r13
507 movq %rdi, %r14
508 pushq %r12
509 pushq %rbp
510 movq %rcx, %r12
511 pushq %rbx
512 movl %esi, %ebx
513 movq %rdx, %rbp
514 subq $1040, %rsp
515 leaq 16(%rsp), %r13
516 movq %r13, %rsi
517 call __GI_getpublickey
518 testl %eax, %eax
519 je .L90
520 movq %r13, 8(%rsp)
521 movq %r13, %rsi
522 .L88:
523 movl (%rsi), %edi
524 addq $4, %rsi
525 leal -16843009(%rdi), %eax
526 notl %edi
527 andl %edi, %eax
528 andl $-2139062144, %eax
529 je .L88
530 movl %eax, %edx
531 movq %r12, %r8
532 movq %r14, %rdi
533 shrl $16, %edx
534 testl $32896, %eax
535 cmove %edx, %eax
536 leaq 2(%rsi), %rdx
537 movl %eax, %ecx
538 cmove %rdx, %rsi
539 addb %al, %cl
540 movl %ebx, %edx
541 sbbq $3, %rsi
542 movq %rbp, %rcx
543 subq %r13, %rsi
544 addl $1, %esi
545 movl %esi, (%rsp)
546 movq %rsp, %rsi
547 call __GI_authdes_pk_create
548 addq $1040, %rsp
549 popq %rbx
550 popq %rbp
551 popq %r12
552 popq %r13
553 popq %r14
555 .p2align 4,,10
556 .p2align 3
557 .L90:
558 addq $1040, %rsp
559 xorl %eax, %eax
560 popq %rbx
561 popq %rbp
562 popq %r12
563 popq %r13
564 popq %r14
566 .size __GI_authdes_create, .-__GI_authdes_create
567 .globl __EI_authdes_create
568 .set __EI_authdes_create,__GI_authdes_create
569 .section .data.rel.ro.local,"aw",@progbits
570 .align 32
571 .type authdes_ops, @object
572 .size authdes_ops, 40
573 authdes_ops:
574 .quad authdes_nextverf
575 .quad authdes_marshal
576 .quad authdes_validate
577 .quad authdes_refresh
578 .quad authdes_destroy