clarify the purpose of this project
[nyanglibc.git] / locale / loadlocale.shared.s
blob9ac073128b9d3f9730bb535ae22a78a9871ca1ce
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 .section .rodata.str1.1,"aMS",@progbits,1
7 .LC0:
8 .string "loadlocale.c"
9 .LC1:
10 .string "category == LC_CTYPE"
11 #NO_APP
12 .text
13 .p2align 4,,15
14 .globl _nl_intern_locale_data
15 .hidden _nl_intern_locale_data
16 .type _nl_intern_locale_data, @function
17 _nl_intern_locale_data:
18 pushq %r15
19 pushq %r14
20 pushq %r13
21 pushq %r12
22 pushq %rbp
23 pushq %rbx
24 subq $8, %rsp
25 cmpq $7, %rdx
26 jbe .L37
27 cmpl $3, %edi
28 movl (%rsi), %ecx
29 movl $537202711, %eax
30 je .L3
31 movl %edi, %eax
32 movl $537462560, %r8d
33 xorl $537071893, %eax
34 testl %edi, %edi
35 cmove %r8d, %eax
36 .L3:
37 cmpl %eax, %ecx
38 jne .L37
39 leaq _nl_category_num_items(%rip), %rax
40 movl 4(%rsi), %r13d
41 movslq %edi, %r14
42 cmpq (%rax,%r14,8), %r13
43 jb .L37
44 leaq 8(,%r13,4), %rax
45 cmpq %rdx, %rax
46 jnb .L37
47 movl %edi, %ebx
48 leaq 64(,%r13,8), %rdi
49 movq %rdx, %r12
50 movq %rsi, %rbp
51 call malloc@PLT
52 testq %rax, %rax
53 jne .L39
54 .L1:
55 addq $8, %rsp
56 popq %rbx
57 popq %rbp
58 popq %r12
59 popq %r13
60 popq %r14
61 popq %r15
62 ret
63 .p2align 4,,10
64 .p2align 3
65 .L14:
66 cmpq $4, %rdx
67 jbe .L20
68 .L6:
69 movq %rax, %rdi
70 call free@PLT
71 .L37:
72 movq __libc_errno@gottpoff(%rip), %rax
73 movl $22, %fs:(%rax)
74 addq $8, %rsp
75 xorl %eax, %eax
76 popq %rbx
77 popq %rbp
78 popq %r12
79 popq %r13
80 popq %r14
81 popq %r15
82 ret
83 .p2align 4,,10
84 .p2align 3
85 .L39:
86 testq %r13, %r13
87 movq %rbp, 8(%rax)
88 movq %r12, 16(%rax)
89 movq $0, 32(%rax)
90 movq $0, 40(%rax)
91 movq $0, 48(%rax)
92 movl %r13d, 56(%rax)
93 je .L1
94 movl 8(%rbp), %ecx
95 cmpq %r12, %rcx
96 movq %rcx, %rdi
97 ja .L6
98 leaq _nl_value_types(%rip), %r10
99 leaq .L10(%rip), %r8
100 xorl %edx, %edx
101 movl %ebx, %r9d
102 .L7:
103 cmpl $12, %ebx
104 ja .L8
105 movslq (%r8,%r9,4), %rsi
106 addq %r8, %rsi
107 jmp *%rsi
108 .section .rodata
109 .align 4
110 .align 4
111 .L10:
112 .long .L8-.L10
113 .long .L9-.L10
114 .long .L11-.L10
115 .long .L12-.L10
116 .long .L13-.L10
117 .long .L14-.L10
118 .long .L8-.L10
119 .long .L15-.L10
120 .long .L16-.L10
121 .long .L17-.L10
122 .long .L14-.L10
123 .long .L18-.L10
124 .long .L19-.L10
125 .text
126 .p2align 4,,10
127 .p2align 3
128 .L11:
129 cmpq $158, %rdx
130 ja .L6
131 .p2align 4,,10
132 .p2align 3
133 .L20:
134 movq (%r10,%r14,8), %rsi
135 cmpl $5, (%rsi,%rdx,4)
136 je .L23
137 .L22:
138 addq %rbp, %rcx
139 movq %rcx, 64(%rax,%rdx,8)
140 .L24:
141 addq $1, %rdx
142 cmpq %rdx, %r13
143 je .L1
144 movl 8(%rbp,%rdx,4), %ecx
145 cmpq %rcx, %r12
146 movq %rcx, %rdi
147 jnb .L7
148 jmp .L6
149 .p2align 4,,10
150 .p2align 3
151 .L18:
152 cmpq $1, %rdx
153 jbe .L20
154 jmp .L6
155 .p2align 4,,10
156 .p2align 3
157 .L17:
158 cmpq $12, %rdx
159 jbe .L20
160 jmp .L6
161 .p2align 4,,10
162 .p2align 3
163 .L16:
164 cmpq $6, %rdx
165 jbe .L20
166 jmp .L6
167 .p2align 4,,10
168 .p2align 3
169 .L15:
170 cmpq $2, %rdx
171 jbe .L20
172 jmp .L6
173 .p2align 4,,10
174 .p2align 3
175 .L19:
176 cmpq $15, %rdx
177 jbe .L20
178 jmp .L6
179 .p2align 4,,10
180 .p2align 3
181 .L13:
182 cmpq $45, %rdx
183 jbe .L20
184 jmp .L6
185 .p2align 4,,10
186 .p2align 3
187 .L12:
188 cmpq $18, %rdx
189 jbe .L20
190 jmp .L6
191 .p2align 4,,10
192 .p2align 3
193 .L9:
194 cmpq $5, %rdx
195 jbe .L20
196 jmp .L6
197 .p2align 4,,10
198 .p2align 3
199 .L8:
200 testl %ebx, %ebx
201 jne .L40
202 cmpq $85, %rdx
203 ja .L22
204 jmp .L20
205 .p2align 4,,10
206 .p2align 3
207 .L23:
208 andl $3, %edi
209 jne .L6
210 movl 0(%rbp,%rcx), %ecx
211 movl %ecx, 64(%rax,%rdx,8)
212 jmp .L24
213 .L40:
214 leaq __PRETTY_FUNCTION__.9350(%rip), %rcx
215 leaq .LC0(%rip), %rsi
216 leaq .LC1(%rip), %rdi
217 movl $144, %edx
218 call __GI___assert_fail
219 .size _nl_intern_locale_data, .-_nl_intern_locale_data
220 .p2align 4,,15
221 .globl _nl_load_locale
222 .hidden _nl_load_locale
223 .type _nl_load_locale, @function
224 _nl_load_locale:
225 pushq %rbp
226 xorl %eax, %eax
227 movq %rsp, %rbp
228 pushq %r15
229 pushq %r14
230 pushq %r13
231 pushq %r12
232 movl %esi, %r13d
233 pushq %rbx
234 movq %rdi, %rbx
235 movl $524288, %esi
236 subq $168, %rsp
237 movl $1, 8(%rdi)
238 movq $0, 16(%rdi)
239 movq (%rdi), %rdi
240 call __GI___open_nocancel
241 testl %eax, %eax
242 js .L41
243 leaq -192(%rbp), %r12
244 movl %eax, %edi
245 movl %eax, %r14d
246 movq %r12, %rsi
247 call __GI___fstat64
248 testl %eax, %eax
249 js .L53
250 .L44:
251 movl -168(%rbp), %eax
252 andl $61440, %eax
253 cmpl $16384, %eax
254 je .L77
255 .L46:
256 movq __libc_errno@gottpoff(%rip), %rax
257 movq -144(%rbp), %rsi
258 xorl %r9d, %r9d
259 xorl %edi, %edi
260 movl %r14d, %r8d
261 movl $2, %ecx
262 movl $1, %edx
263 movl %fs:(%rax), %r15d
264 call __GI___mmap
265 cmpq $-1, %rax
266 movq %rax, %r12
267 je .L78
268 movl %r14d, %edi
269 call __GI___close_nocancel
270 testq %r12, %r12
271 je .L41
272 movq -144(%rbp), %rdx
273 movq %r12, %rsi
274 movl %r13d, %edi
275 call _nl_intern_locale_data
276 testq %rax, %rax
277 je .L60
278 movl $1, %edx
279 .L57:
280 movq $0, (%rax)
281 movl %edx, 24(%rax)
282 movq %rax, 16(%rbx)
283 .L41:
284 leaq -40(%rbp), %rsp
285 popq %rbx
286 popq %r12
287 popq %r13
288 popq %r14
289 popq %r15
290 popq %rbp
292 .p2align 4,,10
293 .p2align 3
294 .L78:
295 movq __libc_errno@gottpoff(%rip), %rax
296 cmpl $38, %fs:(%rax)
297 jne .L53
298 movq -144(%rbp), %r12
299 movq %r12, %rdi
300 call malloc@PLT
301 testq %rax, %rax
302 movq %rax, -208(%rbp)
303 je .L53
304 testq %r12, %r12
305 jle .L54
306 movq %rax, %rcx
307 jmp .L56
308 .p2align 4,,10
309 .p2align 3
310 .L55:
311 subq %rax, %r12
312 addq %rax, %rcx
313 testq %r12, %r12
314 jle .L54
315 .L56:
316 movq %rcx, %rsi
317 movq %r12, %rdx
318 movl %r14d, %edi
319 movq %rcx, -200(%rbp)
320 call __GI___read_nocancel
321 testq %rax, %rax
322 movq -200(%rbp), %rcx
323 jg .L55
324 movq -208(%rbp), %rdi
325 movq %rax, -200(%rbp)
326 call free@PLT
327 movq -200(%rbp), %rax
328 testq %rax, %rax
329 jne .L53
330 movq __libc_errno@gottpoff(%rip), %rax
331 movl $22, %fs:(%rax)
332 .L53:
333 movl %r14d, %edi
334 call __GI___close_nocancel
335 leaq -40(%rbp), %rsp
336 popq %rbx
337 popq %r12
338 popq %r13
339 popq %r14
340 popq %r15
341 popq %rbp
343 .p2align 4,,10
344 .p2align 3
345 .L77:
346 movl %r14d, %edi
347 call __GI___close_nocancel
348 movq (%rbx), %rsi
349 movq %rsi, %rdi
350 movq %rsi, -208(%rbp)
351 call __GI_strlen
352 leaq _nl_category_name_sizes(%rip), %rdx
353 movslq %r13d, %rcx
354 movq -208(%rbp), %rsi
355 movzbl (%rdx,%rcx), %edx
356 leaq 36(%rax,%rdx), %rdi
357 movq %rdx, %r14
358 leaq _nl_category_name_idxs(%rip), %rdx
359 andq $-16, %rdi
360 movzbl (%rdx,%rcx), %r8d
361 leaq _nl_category_names(%rip), %rdx
362 subq %rdi, %rsp
363 leaq 15(%rsp), %r15
364 andq $-16, %r15
365 addq %rdx, %r8
366 movq %rax, %rdx
367 movq %r15, %rdi
368 movq %r8, -200(%rbp)
369 call __GI_mempcpy@PLT
370 leal 1(%r14), %edx
371 movl $1398362927, (%rax)
372 movb $95, 4(%rax)
373 leaq 5(%rax), %rcx
374 movq -200(%rbp), %r8
375 cmpl $8, %edx
376 jnb .L47
377 testb $4, %dl
378 jne .L79
379 testl %edx, %edx
380 je .L48
381 movzbl (%r8), %esi
382 testb $2, %dl
383 movb %sil, 5(%rax)
384 jne .L80
385 .L48:
386 xorl %eax, %eax
387 movl $524288, %esi
388 movq %r15, %rdi
389 call __GI___open_nocancel
390 testl %eax, %eax
391 movl %eax, %r14d
392 js .L41
393 movq %r12, %rsi
394 movl %eax, %edi
395 call __GI___fstat64
396 testl %eax, %eax
397 jns .L46
398 jmp .L53
399 .p2align 4,,10
400 .p2align 3
401 .L47:
402 movq (%r8), %rsi
403 movq %rsi, 5(%rax)
404 movl %edx, %esi
405 movq -8(%r8,%rsi), %rdi
406 movq %rdi, -8(%rcx,%rsi)
407 leaq 13(%rax), %rdi
408 movq %r8, %rsi
409 andq $-8, %rdi
410 subq %rdi, %rcx
411 subq %rcx, %rsi
412 addl %edx, %ecx
413 shrl $3, %ecx
414 movl %ecx, %ecx
415 rep movsq
416 jmp .L48
417 .p2align 4,,10
418 .p2align 3
419 .L54:
420 movq __libc_errno@gottpoff(%rip), %rax
421 movl %r14d, %edi
422 movl %r15d, %fs:(%rax)
423 call __GI___close_nocancel
424 movq -144(%rbp), %rdx
425 movq -208(%rbp), %rsi
426 movl %r13d, %edi
427 call _nl_intern_locale_data
428 testq %rax, %rax
429 je .L41
430 xorl %edx, %edx
431 jmp .L57
432 .p2align 4,,10
433 .p2align 3
434 .L60:
435 movq -144(%rbp), %rsi
436 movq %r12, %rdi
437 call __GI___munmap
438 jmp .L41
439 .L79:
440 movl (%r8), %esi
441 movl %esi, 5(%rax)
442 movl -4(%r8,%rdx), %eax
443 movl %eax, -4(%rcx,%rdx)
444 jmp .L48
445 .L80:
446 movzwl -2(%r8,%rdx), %eax
447 movw %ax, -2(%rcx,%rdx)
448 jmp .L48
449 .size _nl_load_locale, .-_nl_load_locale
450 .p2align 4,,15
451 .globl _nl_unload_locale
452 .hidden _nl_unload_locale
453 .type _nl_unload_locale, @function
454 _nl_unload_locale:
455 pushq %rbx
456 movq 32(%rdi), %rax
457 movq %rdi, %rbx
458 testq %rax, %rax
459 je .L82
460 call *%rax
461 .L82:
462 movl 24(%rbx), %eax
463 testl %eax, %eax
464 je .L84
465 cmpl $1, %eax
466 je .L85
467 .L83:
468 cmpl $2, %eax
469 je .L86
470 movq (%rbx), %rdi
471 call free@PLT
472 .L86:
473 movq %rbx, %rdi
474 popq %rbx
475 jmp free@PLT
476 .p2align 4,,10
477 .p2align 3
478 .L85:
479 movq 16(%rbx), %rsi
480 movq 8(%rbx), %rdi
481 call __GI___munmap
482 movl 24(%rbx), %eax
483 jmp .L83
484 .p2align 4,,10
485 .p2align 3
486 .L84:
487 movq 8(%rbx), %rdi
488 call free@PLT
489 movl 24(%rbx), %eax
490 jmp .L83
491 .size _nl_unload_locale, .-_nl_unload_locale
492 .section .rodata.str1.16,"aMS",@progbits,1
493 .align 16
494 .type __PRETTY_FUNCTION__.9350, @object
495 .size __PRETTY_FUNCTION__.9350, 23
496 __PRETTY_FUNCTION__.9350:
497 .string "_nl_intern_locale_data"
498 .section .data.rel.ro.local,"aw",@progbits
499 .align 32
500 .type _nl_value_types, @object
501 .size _nl_value_types, 104
502 _nl_value_types:
503 .quad _nl_value_type_LC_CTYPE
504 .quad _nl_value_type_LC_NUMERIC
505 .quad _nl_value_type_LC_TIME
506 .quad _nl_value_type_LC_COLLATE
507 .quad _nl_value_type_LC_MONETARY
508 .quad _nl_value_type_LC_MESSAGES
509 .zero 8
510 .quad _nl_value_type_LC_PAPER
511 .quad _nl_value_type_LC_NAME
512 .quad _nl_value_type_LC_ADDRESS
513 .quad _nl_value_type_LC_TELEPHONE
514 .quad _nl_value_type_LC_MEASUREMENT
515 .quad _nl_value_type_LC_IDENTIFICATION
516 .section .rodata
517 .align 32
518 .type _nl_value_type_LC_IDENTIFICATION, @object
519 .size _nl_value_type_LC_IDENTIFICATION, 64
520 _nl_value_type_LC_IDENTIFICATION:
521 .long 1
522 .long 1
523 .long 1
524 .long 1
525 .long 1
526 .long 1
527 .long 1
528 .long 1
529 .long 1
530 .long 1
531 .long 1
532 .long 1
533 .long 1
534 .long 1
535 .long 2
536 .long 1
537 .section .rodata.cst8,"aM",@progbits,8
538 .align 8
539 .type _nl_value_type_LC_MEASUREMENT, @object
540 .size _nl_value_type_LC_MEASUREMENT, 8
541 _nl_value_type_LC_MEASUREMENT:
542 .long 3
543 .long 1
544 .section .rodata
545 .align 32
546 .type _nl_value_type_LC_ADDRESS, @object
547 .size _nl_value_type_LC_ADDRESS, 52
548 _nl_value_type_LC_ADDRESS:
549 .long 1
550 .long 1
551 .long 1
552 .long 1
553 .long 1
554 .long 1
555 .long 5
556 .long 1
557 .long 1
558 .long 1
559 .long 1
560 .long 1
561 .long 1
562 .align 16
563 .type _nl_value_type_LC_NAME, @object
564 .size _nl_value_type_LC_NAME, 28
565 _nl_value_type_LC_NAME:
566 .long 1
567 .long 1
568 .long 1
569 .long 1
570 .long 1
571 .long 1
572 .long 1
573 .align 8
574 .type _nl_value_type_LC_PAPER, @object
575 .size _nl_value_type_LC_PAPER, 12
576 _nl_value_type_LC_PAPER:
577 .long 5
578 .long 5
579 .long 1
580 .align 16
581 .type _nl_value_type_LC_MESSAGES, @object
582 .size _nl_value_type_LC_MESSAGES, 20
583 _nl_value_type_LC_MESSAGES:
584 .long 1
585 .long 1
586 .long 1
587 .long 1
588 .long 1
589 .set _nl_value_type_LC_TELEPHONE,_nl_value_type_LC_MESSAGES
590 .align 32
591 .type _nl_value_type_LC_TIME, @object
592 .size _nl_value_type_LC_TIME, 636
593 _nl_value_type_LC_TIME:
594 .long 2
595 .zero 24
596 .long 2
597 .zero 24
598 .long 2
599 .zero 44
600 .long 2
601 .zero 44
602 .long 2
603 .zero 4
604 .long 1
605 .long 1
606 .long 1
607 .long 1
608 .long 6
609 .long 1
610 .long 1
611 .long 6
612 .long 1
613 .long 1
614 .long 5
615 .long 1
616 .long 9
617 .zero 24
618 .long 9
619 .zero 24
620 .long 9
621 .zero 44
622 .long 9
623 .zero 44
624 .long 9
625 .zero 4
626 .long 8
627 .long 8
628 .long 8
629 .long 8
630 .long 8
631 .long 8
632 .long 10
633 .long 8
634 .long 8
635 .long 3
636 .long 5
637 .long 3
638 .long 3
639 .long 3
640 .long 3
641 .long 1
642 .long 1
643 .long 8
644 .long 1
645 .long 2
646 .zero 44
647 .long 9
648 .zero 44
649 .long 2
650 .zero 44
651 .long 9
652 .zero 44
653 .align 16
654 .type _nl_value_type_LC_NUMERIC, @object
655 .size _nl_value_type_LC_NUMERIC, 24
656 _nl_value_type_LC_NUMERIC:
657 .long 1
658 .long 1
659 .long 4
660 .long 5
661 .long 5
662 .long 1
663 .align 32
664 .type _nl_value_type_LC_MONETARY, @object
665 .size _nl_value_type_LC_MONETARY, 184
666 _nl_value_type_LC_MONETARY:
667 .long 1
668 .long 1
669 .long 1
670 .long 1
671 .long 4
672 .long 1
673 .long 1
674 .long 3
675 .long 3
676 .long 3
677 .long 3
678 .long 3
679 .long 3
680 .long 3
681 .long 3
682 .long 1
683 .long 3
684 .long 3
685 .long 3
686 .long 3
687 .long 3
688 .long 3
689 .long 1
690 .long 1
691 .long 3
692 .long 3
693 .long 3
694 .long 3
695 .long 3
696 .long 3
697 .long 3
698 .long 3
699 .long 3
700 .long 3
701 .long 3
702 .long 3
703 .long 3
704 .long 3
705 .long 5
706 .long 5
707 .long 5
708 .long 5
709 .long 7
710 .long 5
711 .long 5
712 .long 1
713 .align 32
714 .type _nl_value_type_LC_CTYPE, @object
715 .size _nl_value_type_LC_CTYPE, 344
716 _nl_value_type_LC_CTYPE:
717 .long 8
718 .long 8
719 .zero 4
720 .long 8
721 .zero 4
722 .long 8
723 .zero 16
724 .long 6
725 .long 6
726 .long 4
727 .long 5
728 .long 1
729 .long 8
730 .long 8
731 .long 5
732 .long 5
733 .long 5
734 .long 1
735 .long 1
736 .long 1
737 .long 1
738 .long 1
739 .long 1
740 .long 1
741 .long 1
742 .long 1
743 .long 1
744 .long 5
745 .long 8
746 .long 8
747 .long 8
748 .long 8
749 .long 8
750 .long 8
751 .long 8
752 .long 8
753 .long 8
754 .long 8
755 .long 1
756 .long 1
757 .long 1
758 .long 1
759 .long 1
760 .long 1
761 .long 1
762 .long 1
763 .long 1
764 .long 1
765 .long 5
766 .long 5
767 .long 5
768 .long 5
769 .long 5
770 .long 5
771 .long 5
772 .long 5
773 .long 5
774 .long 5
775 .long 5
776 .long 8
777 .long 8
778 .long 8
779 .long 8
780 .long 5
781 .long 8
782 .long 5
783 .long 1
784 .long 5
785 .long 5
786 .zero 56
787 .align 32
788 .type _nl_value_type_LC_COLLATE, @object
789 .size _nl_value_type_LC_COLLATE, 76
790 _nl_value_type_LC_COLLATE:
791 .long 5
792 .long 1
793 .long 8
794 .long 8
795 .long 8
796 .long 8
797 .zero 12
798 .long 8
799 .long 8
800 .long 8
801 .long 8
802 .long 5
803 .long 8
804 .long 8
805 .long 8
806 .long 8
807 .long 1
808 .align 32
809 .type _nl_category_num_items, @object
810 .size _nl_category_num_items, 104
811 _nl_category_num_items:
812 .quad 86
813 .quad 6
814 .quad 159
815 .quad 19
816 .quad 46
817 .quad 5
818 .zero 8
819 .quad 3
820 .quad 7
821 .quad 13
822 .quad 5
823 .quad 2
824 .quad 16
825 .hidden _nl_category_names
826 .hidden _nl_category_name_idxs
827 .hidden _nl_category_name_sizes