clarify the purpose of this project
[nyanglibc.git] / intl / finddomain.shared.s
blob4ae127c42e6c740141c73d7777604bdd61fd375a
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 _nl_find_domain
9 .hidden _nl_find_domain
10 .type _nl_find_domain, @function
11 _nl_find_domain:
12 pushq %r15
13 pushq %r14
14 pushq %r13
15 pushq %r12
16 movq %rcx, %r13
17 pushq %rbp
18 pushq %rbx
19 movq %rsi, %rbp
20 movq %rdi, %rbx
21 movq %rdx, %r12
22 subq $72, %rsp
23 movl __libc_pthread_functions_init(%rip), %r11d
24 testl %r11d, %r11d
25 je .L2
26 movq 136+__libc_pthread_functions(%rip), %rax
27 leaq lock.10632(%rip), %rdi
28 #APP
29 # 86 "finddomain.c" 1
30 ror $2*8+1, %rax
31 xor %fs:48, %rax
32 # 0 "" 2
33 #NO_APP
34 call *%rax
35 .L2:
36 movq %rbx, %rdi
37 call __GI_strlen
38 subq $8, %rsp
39 leaq 1(%rax), %rdx
40 leaq _nl_loaded_domains(%rip), %rdi
41 pushq $0
42 pushq %r12
43 xorl %r9d, %r9d
44 pushq $0
45 pushq $0
46 xorl %ecx, %ecx
47 pushq $0
48 movq %rbp, %r8
49 movq %rbx, %rsi
50 call _nl_make_l10nflist@PLT
51 movl __libc_pthread_functions_init(%rip), %r10d
52 addq $48, %rsp
53 movq %rax, %r14
54 testl %r10d, %r10d
55 je .L3
56 movq 152+__libc_pthread_functions(%rip), %rax
57 leaq lock.10632(%rip), %rdi
58 #APP
59 # 94 "finddomain.c" 1
60 ror $2*8+1, %rax
61 xor %fs:48, %rax
62 # 0 "" 2
63 #NO_APP
64 call *%rax
65 .L3:
66 testq %r14, %r14
67 je .L4
68 movl 8(%r14), %r9d
69 testl %r9d, %r9d
70 jle .L43
71 .L5:
72 cmpq $0, 16(%r14)
73 je .L44
74 .L1:
75 addq $72, %rsp
76 movq %r14, %rax
77 popq %rbx
78 popq %rbp
79 popq %r12
80 popq %r13
81 popq %r14
82 popq %r15
83 ret
84 .p2align 4,,10
85 .p2align 3
86 .L44:
87 movq 32(%r14), %rdi
88 testq %rdi, %rdi
89 je .L1
90 leaq 32(%r14), %rbx
91 jmp .L8
92 .p2align 4,,10
93 .p2align 3
94 .L7:
95 movq (%rbx), %rax
96 cmpq $0, 16(%rax)
97 jne .L1
98 addq $8, %rbx
99 movq (%rbx), %rdi
100 testq %rdi, %rdi
101 je .L1
102 .L8:
103 movl 8(%rdi), %r8d
104 testl %r8d, %r8d
105 jg .L7
106 movq %r13, %rsi
107 call _nl_load_domain
108 jmp .L7
109 .p2align 4,,10
110 .p2align 3
111 .L43:
112 movq %r13, %rsi
113 movq %r14, %rdi
114 call _nl_load_domain
115 jmp .L5
116 .p2align 4,,10
117 .p2align 3
118 .L4:
119 movq %rbp, %rdi
120 call _nl_expand_alias@PLT
121 testq %rax, %rax
122 movq %rax, 8(%rsp)
123 je .L9
124 movq %rax, %rdi
125 call __GI_strlen
126 leaq 1(%rax), %r15
127 movq %r15, %rdi
128 call malloc@PLT
129 testq %rax, %rax
130 movq %rax, %rbp
131 je .L1
132 movq 8(%rsp), %rsi
133 movq %r15, %rdx
134 movq %rax, %rdi
135 call __GI_memcpy@PLT
136 .L9:
137 leaq 40(%rsp), %rcx
138 leaq 32(%rsp), %rdx
139 leaq 24(%rsp), %rsi
140 leaq 56(%rsp), %r9
141 leaq 48(%rsp), %r8
142 movq %rbp, %rdi
143 call _nl_explode_name@PLT
144 cmpl $-1, %eax
145 movl %eax, %r15d
146 je .L1
147 movl __libc_pthread_functions_init(%rip), %esi
148 testl %esi, %esi
149 je .L12
150 movq 144+__libc_pthread_functions(%rip), %rax
151 leaq lock.10632(%rip), %rdi
152 #APP
153 # 143 "finddomain.c" 1
154 ror $2*8+1, %rax
155 xor %fs:48, %rax
156 # 0 "" 2
157 #NO_APP
158 call *%rax
159 .L12:
160 movq %rbx, %rdi
161 call __GI_strlen
162 subq $8, %rsp
163 leaq 1(%rax), %rdx
164 leaq _nl_loaded_domains(%rip), %rdi
165 pushq $1
166 pushq %r12
167 movl %r15d, %ecx
168 pushq 56(%rsp)
169 pushq 88(%rsp)
170 movq %rbx, %rsi
171 pushq 88(%rsp)
172 movq 88(%rsp), %r9
173 movq 72(%rsp), %r8
174 call _nl_make_l10nflist@PLT
175 movl __libc_pthread_functions_init(%rip), %ecx
176 addq $48, %rsp
177 movq %rax, %r14
178 testl %ecx, %ecx
179 je .L13
180 movq 152+__libc_pthread_functions(%rip), %rax
181 leaq lock.10632(%rip), %rdi
182 #APP
183 # 152 "finddomain.c" 1
184 ror $2*8+1, %rax
185 xor %fs:48, %rax
186 # 0 "" 2
187 #NO_APP
188 call *%rax
189 .L13:
190 testq %r14, %r14
191 je .L15
192 movl 8(%r14), %edx
193 testl %edx, %edx
194 jle .L45
195 .L16:
196 cmpq $0, 16(%r14)
197 je .L46
198 .L17:
199 cmpq $0, 8(%rsp)
200 je .L15
201 movq %rbp, %rdi
202 call free@PLT
203 .L15:
204 andl $1, %r15d
205 je .L1
206 movq 56(%rsp), %rdi
207 call free@PLT
208 jmp .L1
209 .p2align 4,,10
210 .p2align 3
211 .L46:
212 movq 32(%r14), %rdi
213 testq %rdi, %rdi
214 je .L17
215 leaq 32(%r14), %rbx
216 jmp .L19
217 .p2align 4,,10
218 .p2align 3
219 .L18:
220 movq (%rbx), %rax
221 cmpq $0, 16(%rax)
222 jne .L17
223 addq $8, %rbx
224 movq (%rbx), %rdi
225 testq %rdi, %rdi
226 je .L17
227 .L19:
228 movl 8(%rdi), %eax
229 testl %eax, %eax
230 jg .L18
231 movq %r13, %rsi
232 call _nl_load_domain
233 jmp .L18
234 .p2align 4,,10
235 .p2align 3
236 .L45:
237 movq %r13, %rsi
238 movq %r14, %rdi
239 call _nl_load_domain
240 jmp .L16
241 .size _nl_find_domain, .-_nl_find_domain
242 .section __libc_freeres_fn,"ax",@progbits
243 .p2align 4,,15
244 .globl _nl_finddomain_subfreeres
245 .hidden _nl_finddomain_subfreeres
246 .type _nl_finddomain_subfreeres, @function
247 _nl_finddomain_subfreeres:
248 pushq %rbp
249 pushq %rbx
250 subq $8, %rsp
251 movq _nl_loaded_domains(%rip), %rbx
252 testq %rbx, %rbx
253 jne .L50
254 jmp .L47
255 .p2align 4,,10
256 .p2align 3
257 .L51:
258 movq %rbp, %rbx
259 .L50:
260 movq 16(%rbx), %rdi
261 testq %rdi, %rdi
262 je .L49
263 call _nl_unload_domain
264 .L49:
265 movq (%rbx), %rdi
266 movq 24(%rbx), %rbp
267 call free@PLT
268 movq %rbx, %rdi
269 call free@PLT
270 testq %rbp, %rbp
271 jne .L51
272 .L47:
273 addq $8, %rsp
274 popq %rbx
275 popq %rbp
277 .size _nl_finddomain_subfreeres, .-_nl_finddomain_subfreeres
278 .local lock.10632
279 .comm lock.10632,56,32
280 .local _nl_loaded_domains
281 .comm _nl_loaded_domains,8,8
282 .hidden _nl_unload_domain
283 .hidden _nl_load_domain
284 .hidden __libc_pthread_functions
285 .hidden __libc_pthread_functions_init