clarify the purpose of this project
[nyanglibc.git] / elf / dl-close.s
blobddd651dfc4e256e2dac65a60e1fd788ab3bd9e6b
1 .text
2 .p2align 4,,15
3 .type call_destructors, @function
4 call_destructors:
5 movq 272(%rdi), %rax
6 pushq %r12
7 movq %rdi, %r12
8 pushq %rbp
9 pushq %rbx
10 testq %rax, %rax
11 je .L2
12 movq 8(%rax), %rbp
13 movq 288(%rdi), %rax
14 addq (%rdi), %rbp
15 movq 8(%rax), %rax
16 shrq $3, %rax
17 testl %eax, %eax
18 leal -1(%rax), %edx
19 je .L2
20 leaq 0(%rbp,%rdx,8), %rbx
21 subq $8, %rbp
22 .p2align 4,,10
23 .p2align 3
24 .L3:
25 call *(%rbx)
26 subq $8, %rbx
27 cmpq %rbx, %rbp
28 jne .L3
29 .L2:
30 movq 168(%r12), %rdx
31 testq %rdx, %rdx
32 je .L1
33 movq (%r12), %rax
34 addq 8(%rdx), %rax
35 popq %rbx
36 popq %rbp
37 popq %r12
38 jmp *%rax
39 .p2align 4,,10
40 .p2align 3
41 .L1:
42 popq %rbx
43 popq %rbp
44 popq %r12
45 ret
46 .size call_destructors, .-call_destructors
47 .section .rodata.str1.1,"aMS",@progbits,1
48 .LC0:
49 .string "dl-close.c"
50 .LC1:
51 .string "! should_be_there"
52 .LC2:
53 .string "old_map->l_tls_modid == idx"
54 .text
55 .p2align 4,,15
56 .type remove_slotinfo, @function
57 remove_slotinfo:
58 pushq %rbp
59 pushq %rbx
60 movq %rdi, %rax
61 subq %rdx, %rax
62 movq %rdx, %rbx
63 movq %rsi, %rbp
64 subq $8, %rsp
65 movq (%rsi), %rdx
66 cmpq %rdx, %rax
67 jb .L12
68 movq 8(%rsi), %rsi
69 testq %rsi, %rsi
70 jne .L13
71 testb %cl, %cl
72 jne .L29
73 .L17:
74 movq _dl_tls_static_nelem(%rip), %rax
75 testq %rbx, %rbx
76 leaq 1(%rax), %rcx
77 movl $0, %eax
78 cmovne %rax, %rcx
79 movq %rdi, %rax
80 subq %rbx, %rax
81 salq $4, %rax
82 leaq 8(%rbp,%rax), %rax
83 jmp .L21
84 .p2align 4,,10
85 .p2align 3
86 .L22:
87 subq $16, %rax
88 subq $1, %rdi
89 cmpq $0, 16(%rax)
90 jne .L30
91 .L21:
92 movq %rdi, %rdx
93 subq %rbx, %rdx
94 cmpq %rcx, %rdx
95 ja .L22
96 addq $8, %rsp
97 xorl %eax, %eax
98 popq %rbx
99 popq %rbp
101 .p2align 4,,10
102 .p2align 3
103 .L12:
104 salq $4, %rax
105 addq %rsi, %rax
106 movq 24(%rax), %rdx
107 testq %rdx, %rdx
108 je .L18
109 cmpq %rdi, 1120(%rdx)
110 jne .L31
111 movq _dl_tls_generation(%rip), %rsi
112 movq $0, 24(%rax)
113 leaq 1(%rsi), %rdx
114 movq %rdx, 16(%rax)
115 .L18:
116 cmpq %rdi, _dl_tls_max_dtv_idx(%rip)
117 je .L17
118 .L28:
119 addq $8, %rsp
120 movl $1, %eax
121 popq %rbx
122 popq %rbp
124 .p2align 4,,10
125 .p2align 3
126 .L30:
127 movq %rdi, _dl_tls_max_dtv_idx(%rip)
128 jmp .L28
129 .p2align 4,,10
130 .p2align 3
131 .L13:
132 addq %rbx, %rdx
133 movzbl %cl, %ecx
134 call remove_slotinfo
135 testb %al, %al
136 jne .L28
137 movq 0(%rbp), %rdi
138 addq %rbx, %rdi
139 jmp .L17
140 .L29:
141 leaq __PRETTY_FUNCTION__.11020(%rip), %rcx
142 leaq .LC0(%rip), %rsi
143 leaq .LC1(%rip), %rdi
144 movl $59, %edx
145 call __assert_fail
146 .L31:
147 leaq __PRETTY_FUNCTION__.11020(%rip), %rcx
148 leaq .LC0(%rip), %rsi
149 leaq .LC2(%rip), %rdi
150 movl $80, %edx
151 call __assert_fail
152 .size remove_slotinfo, .-remove_slotinfo
153 .section .rodata.str1.8,"aMS",@progbits,1
154 .align 8
155 .LC3:
156 .string "\nclosing file=%s; direct_opencount=%u\n"
157 .section .rodata.str1.1
158 .LC4:
159 .string "idx == nloaded"
160 .section .rodata.str1.8
161 .align 8
162 .LC5:
163 .string "(*lp)->l_idx >= 0 && (*lp)->l_idx < nloaded"
164 .align 8
165 .LC6:
166 .string "jmap->l_idx >= 0 && jmap->l_idx < nloaded"
167 .section .rodata.str1.1
168 .LC7:
169 .string "imap->l_ns == nsid"
170 .section .rodata.str1.8
171 .align 8
172 .LC8:
173 .string "imap->l_type == lt_loaded && !imap->l_nodelete_active"
174 .section .rodata.str1.1
175 .LC9:
176 .string "\ncalling fini: %s [%lu]\n\n"
177 .LC10:
178 .string "tmap->l_ns == nsid"
179 .LC11:
180 .string "cannot create scope list"
181 .LC12:
182 .string "dlclose"
183 .LC13:
184 .string "imap->l_type == lt_loaded"
185 .LC14:
186 .string "nsid == LM_ID_BASE"
187 .LC15:
188 .string "imap->l_prev != NULL"
189 .section .rodata.str1.8
190 .align 8
191 .LC16:
192 .string "\nfile=%s [%lu]; destroying link map\n"
193 .align 8
194 .LC17:
195 .string "TLS generation counter wrapped! Please report as described in <https://www.gnu.org/software/libc/bugs.html>.\n"
196 .text
197 .p2align 4,,15
198 .globl _dl_close_worker
199 .hidden _dl_close_worker
200 .type _dl_close_worker, @function
201 _dl_close_worker:
202 pushq %rbp
203 movabsq $8589934592, %rcx
204 movq %rsp, %rbp
205 pushq %r15
206 pushq %r14
207 pushq %r13
208 pushq %r12
209 pushq %rbx
210 subq $168, %rsp
211 movl 792(%rdi), %eax
212 movb %sil, -114(%rbp)
213 leal -1(%rax), %edx
214 movabsq $17179869183, %rax
215 movl %edx, 792(%rdi)
216 movq 792(%rdi), %rsi
217 andq %rax, %rsi
218 cmpq %rcx, %rsi
219 je .L266
220 testb $64, _dl_debug_mask(%rip)
221 jne .L267
222 .L32:
223 leaq -40(%rbp), %rsp
224 popq %rbx
225 popq %r12
226 popq %r13
227 popq %r14
228 popq %r15
229 popq %rbp
231 .L266:
232 movl dl_close_state.11042(%rip), %r9d
233 testl %r9d, %r9d
234 jne .L268
235 movq 48(%rdi), %r15
236 movq %rax, -80(%rbp)
237 cmpq $1, %r15
238 leaq (%r15,%r15,8), %rdx
239 sbbq %rcx, %rcx
240 andl $8, %ecx
241 leaq (%r15,%rdx,2), %rdx
242 movq %rcx, -192(%rbp)
243 leaq _dl_ns(%rip), %rcx
244 salq $3, %rdx
245 leaq 40(%rcx,%rdx), %rbx
246 addq %rdx, %rcx
247 movq %rcx, -144(%rbp)
248 movq %rbx, -200(%rbp)
249 .L36:
250 movq -144(%rbp), %rcx
251 movq %rsp, -152(%rbp)
252 movl $1, dl_close_state.11042(%rip)
253 movl 8(%rcx), %r14d
254 leaq 15(%r14), %rax
255 movq %r14, %r11
256 shrq $4, %rax
257 salq $4, %rax
258 subq %rax, %rsp
259 movq %rsp, %rbx
260 subq %rax, %rsp
261 leaq 22(,%r14,8), %rax
262 movq %rsp, %r13
263 shrq $4, %rax
264 salq $4, %rax
265 subq %rax, %rsp
266 movq (%rcx), %rax
267 leaq 7(%rsp), %r12
268 shrq $3, %r12
269 testq %rax, %rax
270 leaq 0(,%r12,8), %r9
271 je .L144
272 movq %r9, %rcx
273 xorl %edx, %edx
274 .p2align 4,,10
275 .p2align 3
276 .L38:
277 movl %edx, 1012(%rax)
278 movq %rax, (%rcx)
279 addl $1, %edx
280 movq 24(%rax), %rax
281 addq $8, %rcx
282 testq %rax, %rax
283 jne .L38
284 .L37:
285 cmpl %edx, %r11d
286 jne .L269
287 movq %r14, %rdx
288 xorl %esi, %esi
289 movq %rbx, %rdi
290 movq %r9, -64(%rbp)
291 movl %r11d, -56(%rbp)
292 call memset@PLT
293 movq %r13, %rdi
294 movq %r14, %rdx
295 xorl %esi, %esi
296 call memset@PLT
297 movl -56(%rbp), %r11d
298 movq -64(%rbp), %r9
299 movl $-1, %edi
300 movabsq $8589934592, %r10
301 .p2align 4,,10
302 .p2align 3
303 .L40:
304 addl $1, %edi
305 cmpl %edi, %r11d
306 jbe .L270
307 .L54:
308 movslq %edi, %rax
309 cmpb $0, 0(%r13,%rax)
310 jne .L40
311 movq (%r9,%rax,8), %rcx
312 movq -80(%rbp), %rdx
313 andq 792(%rcx), %rdx
314 cmpq %r10, %rdx
315 je .L42
316 .L45:
317 movb $1, (%rbx,%rax)
318 movb $1, 0(%r13,%rax)
319 movq 976(%rcx), %rax
320 movl $-1, 1012(%rcx)
321 testq %rax, %rax
322 je .L44
323 leaq 8(%rax), %rdx
324 movq 8(%rax), %rax
325 testq %rax, %rax
326 je .L44
327 .p2align 4,,10
328 .p2align 3
329 .L49:
330 movslq 1012(%rax), %rax
331 cmpl $-1, %eax
332 je .L46
333 testl %eax, %eax
334 js .L47
335 cmpl %eax, %r11d
336 jbe .L47
337 cmpb $0, (%rbx,%rax)
338 jne .L46
339 movb $1, (%rbx,%rax)
340 movq (%rdx), %rax
341 movl 1012(%rax), %eax
342 leal -1(%rax), %esi
343 cmpl %edi, %eax
344 cmovle %esi, %edi
345 .L46:
346 addq $8, %rdx
347 movq (%rdx), %rax
348 testq %rax, %rax
349 jne .L49
350 .L44:
351 movq 984(%rcx), %rsi
352 testq %rsi, %rsi
353 je .L40
354 movl (%rsi), %r8d
355 testl %r8d, %r8d
356 je .L40
357 xorl %edx, %edx
358 jmp .L53
359 .p2align 4,,10
360 .p2align 3
361 .L271:
362 cmpl %eax, %r11d
363 jbe .L51
364 cmpb $0, (%rbx,%rax)
365 jne .L50
366 movb $1, (%rbx,%rax)
367 movl 1012(%r8), %eax
368 cmpl %edi, %eax
369 jg .L262
370 leal -1(%rax), %edi
371 .L262:
372 movq 984(%rcx), %rsi
373 .L50:
374 addl $1, %edx
375 cmpl (%rsi), %edx
376 jnb .L40
377 .L53:
378 movl %edx, %eax
379 movq 8(%rsi,%rax,8), %r8
380 movslq 1012(%r8), %rax
381 cmpl $-1, %eax
382 je .L50
383 testl %eax, %eax
384 jns .L271
385 .L51:
386 leaq __PRETTY_FUNCTION__.11056(%rip), %rcx
387 leaq .LC0(%rip), %rsi
388 leaq .LC6(%rip), %rdi
389 movl $248, %edx
390 call __assert_fail
391 .L268:
392 testb $64, _dl_debug_mask(%rip)
393 movl $2, dl_close_state.11042(%rip)
394 je .L32
395 .L267:
396 movq 8(%rdi), %rsi
397 leaq .LC3(%rip), %rdi
398 xorl %eax, %eax
399 call _dl_debug_printf
400 jmp .L32
401 .p2align 4,,10
402 .p2align 3
403 .L42:
404 cmpb $0, 799(%rcx)
405 jne .L45
406 movq 1128(%rcx), %rdx
407 testq %rdx, %rdx
408 jne .L45
409 cmpb $0, (%rbx,%rax)
410 jne .L45
411 addl $1, %edi
412 cmpl %edi, %r11d
413 ja .L54
414 .L270:
415 testq %r15, %r15
416 movl %r11d, %esi
417 movl $1, %ecx
418 sete %al
419 movl %r11d, -56(%rbp)
420 movq %r9, -64(%rbp)
421 movzbl %al, %edx
422 movzbl %al, %eax
423 subl %eax, %esi
424 movq -192(%rbp), %rax
425 addq %rbx, %rdx
426 leaq (%r9,%rax), %rdi
427 call _dl_sort_maps
428 movl -56(%rbp), %r11d
429 testl %r11d, %r11d
430 je .L56
431 movq 0(,%r12,8), %r13
432 cmpq 48(%r13), %r15
433 jne .L57
434 leal -1(%r11), %eax
435 xorl %r8d, %r8d
436 movl $-1, %r10d
437 movq %r8, %r12
438 movb $0, -72(%rbp)
439 movq %rbx, %r8
440 movl %eax, -180(%rbp)
441 movq %rax, -56(%rbp)
442 movl %r10d, %ebx
443 movb $0, -113(%rbp)
444 movl $0, -88(%rbp)
445 movl %r11d, -120(%rbp)
446 jmp .L58
447 .p2align 4,,10
448 .p2align 3
449 .L275:
450 cmpb $2, %dl
451 jne .L60
452 cmpb $0, 799(%r13)
453 jne .L60
454 testb $8, %al
455 je .L62
456 testb $2, _dl_debug_mask(%rip)
457 jne .L272
458 .L63:
459 cmpq $0, 272(%r13)
460 je .L273
461 .L64:
462 leaq call_destructors(%rip), %rsi
463 movq %r13, %rdx
464 xorl %edi, %edi
465 movq %r8, -72(%rbp)
466 call _dl_catch_exception
467 movzbl 796(%r13), %eax
468 movq -72(%rbp), %r8
469 .L62:
470 orb $32, 797(%r13)
471 andl $16, %eax
472 movb $1, -72(%rbp)
473 cmpb $1, %al
474 sbbl $-1, -88(%rbp)
475 cmpl %r14d, %ebx
476 cmova %r14d, %ebx
477 .L66:
478 cmpq %r12, -56(%rbp)
479 je .L274
480 .L86:
481 movq -64(%rbp), %rax
482 movq 8(%rax,%r12,8), %r13
483 addq $1, %r12
484 cmpq 48(%r13), %r15
485 jne .L57
486 .L58:
487 movzbl 796(%r13), %eax
488 movl %r12d, %r14d
489 movl %eax, %edx
490 andl $3, %edx
491 cmpb $0, (%r8,%r12)
492 je .L275
493 cmpb $2, %dl
494 jne .L66
495 cmpq $0, 704(%r13)
496 je .L67
497 .L263:
498 movq 920(%r13), %rax
499 movl $1, %edi
500 movq (%rax), %rcx
501 movq %rax, -96(%rbp)
502 movq $0, -104(%rbp)
503 testq %rcx, %rcx
504 je .L69
505 .L68:
506 movq -96(%rbp), %rax
507 leaq 720(%r13), %rdx
508 xorl %r10d, %r10d
509 leaq 8(%rax), %rsi
510 movq %rcx, %rax
511 movq %rsi, %r9
512 jmp .L77
513 .p2align 4,,10
514 .p2align 3
515 .L278:
516 cmpq -656(%rax), %r15
517 jne .L276
518 cmpl $-1, 308(%rax)
519 je .L74
520 addq $8, %r9
521 movq -8(%r9), %rax
522 movl $1, %r10d
523 testq %rax, %rax
524 je .L277
525 .L77:
526 cmpq %rax, %rdx
527 jne .L278
528 .L74:
529 addq $8, %r9
530 movq -8(%r9), %rax
531 addq $1, %rdi
532 testq %rax, %rax
533 jne .L77
534 .L277:
535 testb %r10b, %r10b
536 je .L78
537 leaq 880(%r13), %rax
538 cmpq %rax, -96(%rbp)
539 movq %rax, -128(%rbp)
540 je .L158
541 cmpq $3, %rdi
542 movq $4, -112(%rbp)
543 ja .L158
544 .L79:
545 movq %r8, -136(%rbp)
546 xorl %r9d, %r9d
547 movq -104(%rbp), %r8
548 jmp .L83
549 .p2align 4,,10
550 .p2align 3
551 .L280:
552 testq %r8, %r8
553 je .L82
554 movq %r8, (%rdi)
555 leaq 8(%rax,%r11), %rdi
556 addq $1, %r9
557 xorl %r8d, %r8d
558 .L82:
559 addq $8, %rsi
560 movq -8(%rsi), %rcx
561 testq %rcx, %rcx
562 je .L279
563 .L83:
564 leaq 0(,%r9,8), %r11
565 cmpq %rcx, %rdx
566 leaq (%rax,%r11), %rdi
567 je .L81
568 cmpl $-1, 308(%rcx)
569 jne .L280
570 .L81:
571 addq $8, %rsi
572 movq %rcx, (%rdi)
573 addq $1, %r9
574 movq -8(%rsi), %rcx
575 leaq 8(%rax,%r11), %rdi
576 testq %rcx, %rcx
577 jne .L83
578 .L279:
579 movq $0, (%rdi)
580 movq %rax, 920(%r13)
581 movq -96(%rbp), %rdi
582 movq -128(%rbp), %rax
583 movq -136(%rbp), %r8
584 cmpq %rax, %rdi
585 je .L151
586 movq %r8, -96(%rbp)
587 call _dl_scope_free
588 testl %eax, %eax
589 movzbl -113(%rbp), %eax
590 movl $0, %ecx
591 movq -96(%rbp), %r8
592 cmovne %ecx, %eax
593 movb %al, -113(%rbp)
594 .L84:
595 movq -112(%rbp), %rax
596 movq %rax, 912(%r13)
597 .L69:
598 movq 736(%r13), %rax
599 testq %rax, %rax
600 je .L85
601 cmpl $-1, 1012(%rax)
602 je .L85
603 movq $0, 736(%r13)
604 .L85:
605 cmpl %r14d, %ebx
606 cmova %r14d, %ebx
607 cmpq %r12, -56(%rbp)
608 jne .L86
609 .L274:
610 cmpb $0, -72(%rbp)
611 movl %ebx, %r10d
612 movl -120(%rbp), %r11d
613 movq %r8, %rbx
614 movq -64(%rbp), %r9
615 je .L56
616 xorl %edi, %edi
617 movq %r15, %rsi
618 movq %r9, -96(%rbp)
619 movl %r10d, -64(%rbp)
620 movl %r11d, -56(%rbp)
621 call _dl_debug_initialize
622 movl $2, 24(%rax)
623 movq %rax, -104(%rbp)
624 call _dl_debug_state@PLT
625 movl -88(%rbp), %ecx
626 movl -56(%rbp), %r11d
627 movl -64(%rbp), %r10d
628 movq -96(%rbp), %r9
629 testl %ecx, %ecx
630 jne .L281
631 .L88:
632 #APP
633 # 530 "dl-close.c" 1
634 movl %fs:24,%eax
635 # 0 "" 2
636 #NO_APP
637 testl %eax, %eax
638 jne .L96
639 .L100:
640 cmpq $0, __pthread_mutex_lock@GOTPCREL(%rip)
641 je .L98
642 leaq _dl_load_write_lock(%rip), %rdi
643 movq %r9, -88(%rbp)
644 movl %r10d, -64(%rbp)
645 movl %r11d, -56(%rbp)
646 call __pthread_mutex_lock@PLT
647 movl -56(%rbp), %r11d
648 movl -64(%rbp), %r10d
649 movq -88(%rbp), %r9
650 .L98:
651 cmpl %r10d, %r11d
652 jbe .L282
653 movl %r10d, %eax
654 movb $0, -56(%rbp)
655 movq $0, -64(%rbp)
656 leaq (%rbx,%rax), %r12
657 leaq (%r9,%rax,8), %r13
658 leaq 1(%rbx,%rax), %rax
659 movl -180(%rbp), %ebx
660 movq $0, -96(%rbp)
661 movq %r15, -88(%rbp)
662 subl %r10d, %ebx
663 addq %rax, %rbx
664 jmp .L132
665 .p2align 4,,10
666 .p2align 3
667 .L102:
668 addq $1, %r12
669 addq $8, %r13
670 cmpq %r12, %rbx
671 je .L283
672 .L132:
673 cmpb $0, (%r12)
674 jne .L102
675 movq 0(%r13), %r14
676 movzbl 796(%r14), %eax
677 movl %eax, %edx
678 andl $3, %edx
679 cmpb $2, %dl
680 jne .L284
681 cmpq $0, 1088(%r14)
682 jne .L285
683 .L104:
684 cmpb $0, -114(%rbp)
685 je .L112
686 cmpq $0, __pthread_mutex_lock@GOTPCREL(%rip)
687 je .L113
688 movq -200(%rbp), %rdi
689 call __pthread_mutex_lock@PLT
690 .L113:
691 movq -144(%rbp), %rax
692 movq 80(%rax), %rax
693 testq %rax, %rax
694 je .L117
695 movq -144(%rbp), %rcx
696 movq 88(%rcx), %rdx
697 testq %rdx, %rdx
698 je .L117
699 salq $5, %rdx
700 addq %rax, %rdx
701 jmp .L119
702 .L118:
703 addq $32, %rax
704 cmpq %rax, %rdx
705 je .L117
706 .L119:
707 cmpq $0, 8(%rax)
708 je .L118
709 cmpq 24(%rax), %r14
710 jne .L118
711 movq $0, 8(%rax)
712 movl $0, (%rax)
713 addq $32, %rax
714 subq $1, 96(%rcx)
715 cmpq %rax, %rdx
716 jne .L119
717 .L117:
718 cmpq $0, __pthread_mutex_unlock@GOTPCREL(%rip)
719 je .L112
720 movq -200(%rbp), %rdi
721 call __pthread_mutex_unlock@PLT
722 .L112:
723 movq %r14, %rdi
724 call _dl_unmap
725 cmpq $0, -88(%rbp)
726 jne .L286
727 movq 32(%r14), %rax
728 testq %rax, %rax
729 je .L287
730 movq 24(%r14), %rdx
731 subl $1, 8+_dl_ns(%rip)
732 movq %rdx, 24(%rax)
733 movq 24(%r14), %rdx
734 testq %rdx, %rdx
735 je .L122
736 movq %rax, 32(%rdx)
737 .L122:
738 movq 744(%r14), %rdi
739 call free@PLT
740 movq 848(%r14), %rdi
741 cmpq $-1, %rdi
742 je .L123
743 call free@PLT
744 .L123:
745 movq 984(%r14), %rdi
746 call free@PLT
747 testb $64, _dl_debug_mask(%rip)
748 jne .L288
749 .L124:
750 movq 8(%r14), %rdi
751 call free@PLT
752 movq 56(%r14), %rdi
753 jmp .L126
754 .p2align 4,,10
755 .p2align 3
756 .L125:
757 testq %r15, %r15
758 movq %r15, %rdi
759 je .L289
760 .L126:
761 movl 16(%rdi), %eax
762 movq 8(%rdi), %r15
763 testl %eax, %eax
764 jne .L125
765 call free@PLT
766 testq %r15, %r15
767 movq %r15, %rdi
768 jne .L126
769 .L289:
770 movq 976(%r14), %rdi
771 call free@PLT
772 movq 920(%r14), %rdi
773 leaq 880(%r14), %rax
774 cmpq %rax, %rdi
775 je .L127
776 call free@PLT
777 .L127:
778 cmpb $0, 796(%r14)
779 js .L290
780 .L128:
781 movq 816(%r14), %rdi
782 cmpq $-1, %rdi
783 je .L129
784 call free@PLT
785 .L129:
786 movq 960(%r14), %rdi
787 cmpq $-1, %rdi
788 je .L130
789 call free@PLT
790 .L130:
791 cmpq _dl_initfirst(%rip), %r14
792 je .L291
793 .L131:
794 movq %r14, %rdi
795 addq $1, %r12
796 addq $8, %r13
797 call free@PLT
798 cmpq %r12, %rbx
799 jne .L132
800 .L283:
801 cmpq $0, __pthread_mutex_unlock@GOTPCREL(%rip)
802 movq -88(%rbp), %r15
803 je .L136
804 leaq _dl_load_write_lock(%rip), %rdi
805 call __pthread_mutex_unlock@PLT
806 .L136:
807 cmpb $0, -56(%rbp)
808 je .L138
809 movq _dl_tls_generation(%rip), %rax
810 addq $1, %rax
811 testq %rax, %rax
812 movq %rax, _dl_tls_generation(%rip)
813 je .L292
814 movq -64(%rbp), %rax
815 cmpq %rax, _dl_tls_static_used(%rip)
816 je .L293
817 .L138:
818 movq -144(%rbp), %rax
819 cmpq $0, (%rax)
820 je .L294
821 .L141:
822 movq -104(%rbp), %rax
823 movl $0, 24(%rax)
824 call _dl_debug_state@PLT
825 .L56:
826 cmpl $2, dl_close_state.11042(%rip)
827 jne .L295
828 movq -152(%rbp), %rsp
829 jmp .L36
830 .p2align 4,,10
831 .p2align 3
832 .L273:
833 cmpq $0, 168(%r13)
834 jne .L64
835 movzbl 796(%r13), %eax
836 jmp .L62
837 .L78:
838 cmpq $0, -104(%rbp)
839 je .L69
840 .L73:
841 movq $0, 704(%r13)
842 movl $0, 712(%r13)
843 jmp .L69
844 .L67:
845 movq 976(%r13), %rdx
846 testq %rdx, %rdx
847 je .L263
848 cmpq $0, 8(%rdx)
849 je .L147
850 movl $1, %ecx
851 jmp .L72
852 .p2align 4,,10
853 .p2align 3
854 .L148:
855 movl %eax, %ecx
856 .L72:
857 leal 1(%rcx), %esi
858 cmpq $0, (%rdx,%rsi,8)
859 movq %rsi, %rax
860 jne .L148
861 addl $2, %ecx
862 salq $3, %rcx
863 .L71:
864 movl %eax, 712(%r13)
865 leaq 704(%r13), %rax
866 addq %rcx, %rdx
867 movq %rdx, 704(%r13)
868 movq %rax, -104(%rbp)
869 movq 920(%r13), %rax
870 movq (%rax), %rcx
871 movq %rax, -96(%rbp)
872 testq %rcx, %rcx
873 je .L73
874 movl $2, %edi
875 jmp .L68
876 .L158:
877 movq 912(%r13), %rax
878 movq %r8, -176(%rbp)
879 movb %r10b, -115(%rbp)
880 movq %rsi, -168(%rbp)
881 movq %rcx, -160(%rbp)
882 movq %rdx, -136(%rbp)
883 leaq 0(,%rax,8), %rdi
884 movq %rax, -112(%rbp)
885 call malloc@PLT
886 testq %rax, %rax
887 movq -136(%rbp), %rdx
888 movq -160(%rbp), %rcx
889 movq -168(%rbp), %rsi
890 movzbl -115(%rbp), %r10d
891 movq -176(%rbp), %r8
892 jne .L79
893 leaq .LC11(%rip), %rcx
894 leaq .LC12(%rip), %rsi
895 xorl %edx, %edx
896 movl $12, %edi
897 call _dl_signal_error
898 .p2align 4,,10
899 .p2align 3
900 .L272:
901 movq 8(%r13), %rsi
902 leaq .LC9(%rip), %rdi
903 movq %r15, %rdx
904 xorl %eax, %eax
905 movq %r8, -72(%rbp)
906 call _dl_debug_printf
907 movq -72(%rbp), %r8
908 jmp .L63
909 .L151:
910 movb %r10b, -113(%rbp)
911 jmp .L84
912 .L291:
913 movq $0, _dl_initfirst(%rip)
914 jmp .L131
915 .L290:
916 movq 680(%r14), %rdi
917 call free@PLT
918 jmp .L128
919 .L144:
920 xorl %edx, %edx
921 jmp .L37
922 .L288:
923 movq 48(%r14), %rdx
924 movq 8(%r14), %rsi
925 leaq .LC16(%rip), %rdi
926 xorl %eax, %eax
927 call _dl_debug_printf
928 jmp .L124
929 .L285:
930 movq _dl_tls_dtv_slotinfo_list(%rip), %rsi
931 testq %rsi, %rsi
932 je .L106
933 shrb $3, %al
934 movq 1120(%r14), %rdi
935 xorl %edx, %edx
936 movl %eax, %ecx
937 andl $1, %ecx
938 call remove_slotinfo
939 testb %al, %al
940 je .L296
941 .L106:
942 movq 1112(%r14), %rax
943 movzbl -72(%rbp), %ecx
944 leaq 1(%rax), %rdx
945 movb %cl, -56(%rbp)
946 cmpq $1, %rdx
947 jbe .L104
948 movq -96(%rbp), %rcx
949 movq %rax, %rdx
950 testq %rcx, %rcx
951 sete %sil
952 cmpq %rcx, %rax
953 sete %cl
954 subq 1088(%r14), %rdx
955 orb %cl, %sil
956 movb %sil, -56(%rbp)
957 je .L108
958 cmpq $0, -64(%rbp)
959 jne .L265
960 movq %rax, -64(%rbp)
961 .L265:
962 movq %rdx, -96(%rbp)
963 jmp .L104
964 .L47:
965 leaq __PRETTY_FUNCTION__.11056(%rip), %rcx
966 leaq .LC0(%rip), %rsi
967 leaq .LC5(%rip), %rdi
968 movl $223, %edx
969 call __assert_fail
970 .L147:
971 movl $16, %ecx
972 movl $1, %eax
973 jmp .L71
974 .L281:
975 movq -144(%rbp), %rax
976 movq 16(%rax), %r8
977 movl 8(%r8), %esi
978 testl %esi, %esi
979 je .L153
980 movq (%r8), %rdi
981 leal -1(%rsi), %edx
982 movq %rdx, %rax
983 movq (%rdi,%rdx,8), %rdx
984 testb $32, 797(%rdx)
985 jne .L90
986 jmp .L297
987 .p2align 4,,10
988 .p2align 3
989 .L92:
990 leal -1(%rax), %ecx
991 movq %rcx, %rdx
992 movq (%rdi,%rcx,8), %rcx
993 testb $32, 797(%rcx)
994 je .L91
995 movl %edx, %eax
996 .L90:
997 testl %eax, %eax
998 jne .L92
999 .L89:
1000 movl %eax, 8(%r8)
1001 jmp .L88
1002 .L296:
1003 movq _dl_tls_static_nelem(%rip), %rax
1004 movq %rax, _dl_tls_max_dtv_idx(%rip)
1005 jmp .L106
1006 .L108:
1007 movq -64(%rbp), %rdi
1008 cmpq %rdi, %rdx
1009 je .L156
1010 movq _dl_tls_static_used(%rip), %rcx
1011 cmpq %rdi, %rcx
1012 je .L298
1013 cmpq %rcx, %rax
1014 je .L299
1015 cmpq -64(%rbp), %rax
1016 jbe .L264
1017 movq %rax, -64(%rbp)
1018 movq %rdx, -96(%rbp)
1019 .L264:
1020 movzbl -72(%rbp), %eax
1021 movb %al, -56(%rbp)
1022 jmp .L104
1023 .p2align 4,,10
1024 .p2align 3
1025 .L156:
1026 movq %rax, -64(%rbp)
1027 movzbl -72(%rbp), %eax
1028 movb %al, -56(%rbp)
1029 jmp .L104
1030 .L294:
1031 movq _dl_nns(%rip), %rax
1032 subq $1, %rax
1033 cmpq %r15, %rax
1034 jne .L141
1035 movq %r15, _dl_nns(%rip)
1036 jmp .L141
1037 .L293:
1038 movq -96(%rbp), %rax
1039 movq %rax, _dl_tls_static_used(%rip)
1040 jmp .L138
1041 .L96:
1042 movl -88(%rbp), %edx
1043 testl %edx, %edx
1044 jne .L99
1045 cmpb $0, -113(%rbp)
1046 jne .L99
1047 movq _dl_scope_free_list(%rip), %rax
1048 testq %rax, %rax
1049 je .L100
1050 cmpq $0, (%rax)
1051 je .L100
1052 .L99:
1053 movq %r9, -88(%rbp)
1054 movl %r10d, -64(%rbp)
1055 movl %r11d, -56(%rbp)
1056 call __thread_gscope_wait
1057 movq _dl_scope_free_list(%rip), %r12
1058 movl -56(%rbp), %r11d
1059 movl -64(%rbp), %r10d
1060 movq -88(%rbp), %r9
1061 testq %r12, %r12
1062 je .L100
1063 movq (%r12), %rax
1064 testq %rax, %rax
1065 je .L100
1066 movl %r11d, %r13d
1067 movl %r10d, %r14d
1068 .L101:
1069 subq $1, %rax
1070 movq %r9, -56(%rbp)
1071 movq 8(%r12,%rax,8), %rdi
1072 movq %rax, (%r12)
1073 call free@PLT
1074 movq (%r12), %rax
1075 movq -56(%rbp), %r9
1076 testq %rax, %rax
1077 jne .L101
1078 movl %r13d, %r11d
1079 movl %r14d, %r10d
1080 jmp .L100
1081 .p2align 4,,10
1082 .p2align 3
1083 .L295:
1084 movl $0, dl_close_state.11042(%rip)
1085 movq -152(%rbp), %rsp
1086 jmp .L32
1087 .L276:
1088 leaq __PRETTY_FUNCTION__.11056(%rip), %rcx
1089 leaq .LC0(%rip), %rsi
1090 leaq .LC10(%rip), %rdi
1091 movl $372, %edx
1092 call __assert_fail
1093 .L60:
1094 leaq __PRETTY_FUNCTION__.11056(%rip), %rcx
1095 leaq .LC0(%rip), %rsi
1096 leaq .LC8(%rip), %rdi
1097 movl $282, %edx
1098 call __assert_fail
1099 .L57:
1100 leaq __PRETTY_FUNCTION__.11056(%rip), %rcx
1101 leaq .LC0(%rip), %rsi
1102 leaq .LC7(%rip), %rdi
1103 movl $278, %edx
1104 call __assert_fail
1105 .L297:
1106 movl %esi, %eax
1107 .L91:
1108 movl -88(%rbp), %ecx
1109 leal (%rax,%rcx), %edx
1110 cmpl %edx, %esi
1111 je .L89
1112 subl $1, %eax
1113 xorl %edx, %edx
1114 leaq 1(%rax), %r12
1115 xorl %eax, %eax
1116 .L95:
1117 movq (%rdi,%rdx,8), %rcx
1118 testb $32, 797(%rcx)
1119 jne .L93
1120 cmpl %eax, %edx
1121 je .L94
1122 movl %eax, %esi
1123 movq %rcx, (%rdi,%rsi,8)
1124 .L94:
1125 addl $1, %eax
1126 .L93:
1127 addq $1, %rdx
1128 cmpq %rdx, %r12
1129 jne .L95
1130 jmp .L89
1131 .L269:
1132 leaq __PRETTY_FUNCTION__.11056(%rip), %rcx
1133 leaq .LC0(%rip), %rsi
1134 leaq .LC4(%rip), %rdi
1135 movl $181, %edx
1136 call __assert_fail
1137 .L153:
1138 xorl %eax, %eax
1139 jmp .L89
1140 .L299:
1141 movzbl -72(%rbp), %eax
1142 movq %rdx, _dl_tls_static_used(%rip)
1143 movb %al, -56(%rbp)
1144 jmp .L104
1145 .L298:
1146 movq %rax, -64(%rbp)
1147 movzbl -72(%rbp), %eax
1148 movq -96(%rbp), %rcx
1149 movq %rdx, -96(%rbp)
1150 movq %rcx, _dl_tls_static_used(%rip)
1151 movb %al, -56(%rbp)
1152 jmp .L104
1153 .L287:
1154 leaq __PRETTY_FUNCTION__.11056(%rip), %rcx
1155 leaq .LC0(%rip), %rsi
1156 leaq .LC15(%rip), %rdi
1157 movl $700, %edx
1158 call __assert_fail
1159 .L286:
1160 leaq __PRETTY_FUNCTION__.11056(%rip), %rcx
1161 leaq .LC0(%rip), %rsi
1162 leaq .LC14(%rip), %rdi
1163 movl $699, %edx
1164 call __assert_fail
1165 .L284:
1166 leaq __PRETTY_FUNCTION__.11056(%rip), %rcx
1167 leaq .LC0(%rip), %rsi
1168 leaq .LC13(%rip), %rdi
1169 movl $559, %edx
1170 call __assert_fail
1171 .L282:
1172 cmpq $0, __pthread_mutex_unlock@GOTPCREL(%rip)
1173 je .L138
1174 leaq _dl_load_write_lock(%rip), %rdi
1175 call __pthread_mutex_unlock@PLT
1176 jmp .L138
1177 .L292:
1178 leaq .LC17(%rip), %rdi
1179 call _dl_fatal_printf@PLT
1180 .size _dl_close_worker, .-_dl_close_worker
1181 .section .rodata.str1.1
1182 .LC18:
1183 .string "shared object not open"
1184 .text
1185 .p2align 4,,15
1186 .globl _dl_close
1187 .hidden _dl_close
1188 .type _dl_close, @function
1189 _dl_close:
1190 cmpq $0, __pthread_mutex_lock@GOTPCREL(%rip)
1191 pushq %rbx
1192 movq %rdi, %rbx
1193 je .L301
1194 leaq _dl_load_lock(%rip), %rdi
1195 call __pthread_mutex_lock@PLT
1196 .L301:
1197 cmpb $0, 799(%rbx)
1198 jne .L315
1199 movl 792(%rbx), %eax
1200 testl %eax, %eax
1201 je .L316
1202 xorl %esi, %esi
1203 movq %rbx, %rdi
1204 call _dl_close_worker
1205 .L315:
1206 cmpq $0, __pthread_mutex_unlock@GOTPCREL(%rip)
1207 je .L317
1208 popq %rbx
1209 leaq _dl_load_lock(%rip), %rdi
1210 jmp __pthread_mutex_unlock@PLT
1211 .p2align 4,,10
1212 .p2align 3
1213 .L317:
1214 popq %rbx
1216 .p2align 4,,10
1217 .p2align 3
1218 .L316:
1219 cmpq $0, __pthread_mutex_unlock@GOTPCREL(%rip)
1220 je .L306
1221 leaq _dl_load_lock(%rip), %rdi
1222 call __pthread_mutex_unlock@PLT
1223 .L306:
1224 movq 8(%rbx), %rsi
1225 leaq .LC18(%rip), %rcx
1226 xorl %edx, %edx
1227 xorl %edi, %edi
1228 call _dl_signal_error
1229 .size _dl_close, .-_dl_close
1230 .section .rodata.str1.16,"aMS",@progbits,1
1231 .align 16
1232 .type __PRETTY_FUNCTION__.11020, @object
1233 .size __PRETTY_FUNCTION__.11020, 16
1234 __PRETTY_FUNCTION__.11020:
1235 .string "remove_slotinfo"
1236 .align 16
1237 .type __PRETTY_FUNCTION__.11056, @object
1238 .size __PRETTY_FUNCTION__.11056, 17
1239 __PRETTY_FUNCTION__.11056:
1240 .string "_dl_close_worker"
1241 .local dl_close_state.11042
1242 .comm dl_close_state.11042,4,4
1243 .weak __pthread_mutex_unlock
1244 .weak __pthread_mutex_lock
1245 .hidden __thread_gscope_wait
1246 .hidden _dl_signal_error
1247 .hidden _dl_unmap
1248 .hidden _dl_debug_initialize
1249 .hidden _dl_scope_free
1250 .hidden _dl_catch_exception
1251 .hidden _dl_sort_maps
1252 .hidden _dl_debug_printf
1253 .hidden __assert_fail