clarify the purpose of this project
[nyanglibc.git] / intl / textdomain.shared.s
blob59ab7183da505e7afababa27cd86862808591098
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 #NO_APP
7 .p2align 4,,15
8 .globl __textdomain
9 .type __textdomain, @function
10 __textdomain:
11 pushq %rbp
12 pushq %rbx
13 subq $8, %rsp
14 testq %rdi, %rdi
15 movq _nl_current_default_domain(%rip), %rbx
16 je .L1
17 movl __libc_pthread_functions_init(%rip), %edx
18 movq %rdi, %rbx
19 testl %edx, %edx
20 je .L4
21 movq 144+__libc_pthread_functions(%rip), %rax
22 leaq _nl_state_lock(%rip), %rdi
23 #APP
24 # 73 "textdomain.c" 1
25 ror $2*8+1, %rax
26 xor %fs:48, %rax
27 # 0 "" 2
28 #NO_APP
29 call *%rax
30 .L4:
31 cmpb $0, (%rbx)
32 movq _nl_current_default_domain(%rip), %rbp
33 jne .L20
34 .L5:
35 leaq _nl_default_default_domain(%rip), %rax
36 movq %rax, _nl_current_default_domain(%rip)
37 movq %rax, %rbx
38 .L7:
39 movq _nl_msg_cat_cntr@GOTPCREL(%rip), %rdx
40 addl $1, (%rdx)
41 cmpq %rax, %rbp
42 je .L9
43 cmpq %rbx, %rbp
44 je .L9
45 movq %rbp, %rdi
46 call free@PLT
47 .L9:
48 movl __libc_pthread_functions_init(%rip), %eax
49 testl %eax, %eax
50 je .L1
51 movq 152+__libc_pthread_functions(%rip), %rax
52 leaq _nl_state_lock(%rip), %rdi
53 #APP
54 # 117 "textdomain.c" 1
55 ror $2*8+1, %rax
56 xor %fs:48, %rax
57 # 0 "" 2
58 #NO_APP
59 call *%rax
60 .L1:
61 addq $8, %rsp
62 movq %rbx, %rax
63 popq %rbx
64 popq %rbp
65 ret
66 .p2align 4,,10
67 .p2align 3
68 .L20:
69 leaq _nl_default_default_domain(%rip), %rsi
70 movq %rbx, %rdi
71 call __GI_strcmp
72 testl %eax, %eax
73 je .L5
74 movq %rbp, %rsi
75 movq %rbx, %rdi
76 call __GI_strcmp
77 testl %eax, %eax
78 jne .L21
79 movq _nl_msg_cat_cntr@GOTPCREL(%rip), %rax
80 movq %rbp, %rbx
81 addl $1, (%rax)
82 jmp .L9
83 .p2align 4,,10
84 .p2align 3
85 .L21:
86 movq %rbx, %rdi
87 call __GI___strdup
88 testq %rax, %rax
89 movq %rax, %rbx
90 je .L9
91 movq %rax, _nl_current_default_domain(%rip)
92 leaq _nl_default_default_domain(%rip), %rax
93 jmp .L7
94 .size __textdomain, .-__textdomain
95 .weak textdomain
96 .set textdomain,__textdomain
97 .hidden _nl_default_default_domain
98 .hidden _nl_state_lock
99 .hidden __libc_pthread_functions
100 .hidden __libc_pthread_functions_init
101 .hidden _nl_current_default_domain