clarify the purpose of this project
[nyanglibc.git] / nss / libnss_files / files-ethers.shared.s
blob9eb3ea130ab1ce629f8023e5ee8bc0e4e8fd61d3
1 .text
2 .section .rodata.str1.1,"aMS",@progbits,1
3 .LC0:
4 .string "/etc/ethers"
5 .text
6 .p2align 4,,15
7 .type internal_setent, @function
8 internal_setent:
9 pushq %rbx
10 movq %rdi, %rbx
11 movq (%rdi), %rdi
12 testq %rdi, %rdi
13 je .L8
14 call rewind@PLT
15 movl $1, %eax
16 .L1:
17 popq %rbx
18 ret
19 .p2align 4,,10
20 .p2align 3
21 .L8:
22 leaq .LC0(%rip), %rdi
23 call __nss_files_fopen@PLT
24 movq %rax, %rdx
25 movq %rax, (%rbx)
26 movl $1, %eax
27 testq %rdx, %rdx
28 jne .L1
29 movq errno@gottpoff(%rip), %rax
30 popq %rbx
31 cmpl $11, %fs:(%rax)
32 setne %al
33 movzbl %al, %eax
34 subl $2, %eax
35 ret
36 .size internal_setent, .-internal_setent
37 .section .rodata.str1.1
38 .LC1:
39 .string "#\n"
40 .text
41 .p2align 4,,15
42 .globl __GI__nss_files_parse_etherent
43 .hidden __GI__nss_files_parse_etherent
44 .type __GI__nss_files_parse_etherent, @function
45 __GI__nss_files_parse_etherent:
46 pushq %r15
47 pushq %r14
48 movq %rdi, %r15
49 pushq %r13
50 pushq %r12
51 movq %rsi, %r13
52 pushq %rbp
53 pushq %rbx
54 leaq .LC1(%rip), %rsi
55 subq $24, %rsp
56 call strpbrk@PLT
57 testq %rax, %rax
58 je .L10
59 movb $0, (%rax)
60 .L10:
61 leaq 8(%rsp), %r14
62 xorl %ebx, %ebx
63 movl $4294967295, %r12d
64 .L22:
65 movl $16, %edx
66 movq %r14, %rsi
67 movq %r15, %rdi
68 call strtoul@PLT
69 movq 8(%rsp), %rbp
70 cmpq %r12, %rax
71 movq %r12, %rcx
72 cmovbe %rax, %rcx
73 cmpq %r15, %rbp
74 je .L16
75 movzbl 0(%rbp), %edx
76 cmpb $58, %dl
77 je .L43
78 testb %dl, %dl
79 jne .L16
80 .L13:
81 cmpq $255, %rax
82 ja .L16
83 movb %cl, 8(%r13,%rbx)
84 addq $1, %rbx
85 movq %rbp, %r15
86 cmpq $5, %rbx
87 jne .L22
88 movq %r14, %rsi
89 movl $16, %edx
90 movq %rbp, %rdi
91 call strtoul@PLT
92 movq 8(%rsp), %rbx
93 movq %rax, %r14
94 movl $4294967295, %eax
95 cmpq %rax, %r14
96 cmovbe %r14, %rax
97 cmpq %rbp, %rbx
98 movq %rax, %r12
99 je .L16
100 call __ctype_b_loc@PLT
101 movsbq (%rbx), %rcx
102 movq (%rax), %rdi
103 testb $32, 1(%rdi,%rcx,2)
104 jne .L44
105 testb %cl, %cl
106 jne .L16
107 .L19:
108 cmpq $255, %r14
109 ja .L16
110 movb %r12b, 13(%r13)
111 movq %rbx, 0(%r13)
112 movzbl (%rbx), %edx
113 testb %dl, %dl
114 jne .L29
115 jmp .L24
116 .p2align 4,,10
117 .p2align 3
118 .L25:
119 testb %dl, %dl
120 movq %rcx, %rbx
121 je .L24
122 .L29:
123 movsbq %dl, %rsi
124 leaq 1(%rbx), %rcx
125 movsbq 1(%rbx), %rdx
126 testb $32, 1(%rdi,%rsi,2)
127 je .L25
128 movb $0, (%rbx)
129 movq (%rax), %rax
130 jmp .L28
131 .p2align 4,,10
132 .p2align 3
133 .L27:
134 movsbq 1(%rcx), %rdx
135 addq $1, %rcx
136 .L28:
137 testb $32, 1(%rax,%rdx,2)
138 jne .L27
139 .L24:
140 addq $24, %rsp
141 movl $1, %eax
142 popq %rbx
143 popq %rbp
144 popq %r12
145 popq %r13
146 popq %r14
147 popq %r15
149 .p2align 4,,10
150 .p2align 3
151 .L43:
152 addq $1, %rbp
153 jmp .L13
154 .p2align 4,,10
155 .p2align 3
156 .L44:
157 leaq 1(%rbx), %rdx
158 .p2align 4,,10
159 .p2align 3
160 .L18:
161 movq %rdx, %rbx
162 movq %rdx, 8(%rsp)
163 addq $1, %rdx
164 movsbq (%rbx), %rcx
165 testb $32, 1(%rdi,%rcx,2)
166 jne .L18
167 jmp .L19
168 .p2align 4,,10
169 .p2align 3
170 .L16:
171 addq $24, %rsp
172 xorl %eax, %eax
173 popq %rbx
174 popq %rbp
175 popq %r12
176 popq %r13
177 popq %r14
178 popq %r15
180 .size __GI__nss_files_parse_etherent, .-__GI__nss_files_parse_etherent
181 .globl _nss_files_parse_etherent
182 .set _nss_files_parse_etherent,__GI__nss_files_parse_etherent
183 .p2align 4,,15
184 .type internal_getent, @function
185 internal_getent:
186 pushq %r15
187 pushq %r14
188 pushq %r13
189 pushq %r12
190 pushq %rbp
191 pushq %rbx
192 subq $40, %rsp
193 movq errno@gottpoff(%rip), %rax
194 cmpq $1, %rcx
195 movl %fs:(%rax), %eax
196 movl %eax, 12(%rsp)
197 jbe .L54
198 leaq 24(%rsp), %r15
199 movq %rcx, %r14
200 movq %r8, %r13
201 movq %rcx, %rbp
202 movq %rdx, %rbx
203 movq %rsi, (%rsp)
204 movq %rdi, %r12
205 .L46:
206 movq %r15, %rcx
207 movq %r14, %rdx
208 movq %rbx, %rsi
209 movq %r12, %rdi
210 call __nss_readline@PLT
211 cmpl $2, %eax
212 je .L56
213 testl %eax, %eax
214 jne .L50
215 movq (%rsp), %rsi
216 movq %r13, %r8
217 movq %rbp, %rcx
218 movq %rbx, %rdx
219 movq %rbx, %rdi
220 call __GI__nss_files_parse_etherent
221 movq 24(%rsp), %rsi
222 movl %eax, %edx
223 movq %r12, %rdi
224 call __nss_parse_line_result@PLT
225 testl %eax, %eax
226 je .L57
227 cmpl $22, %eax
228 je .L46
229 .L50:
230 cmpl $34, %eax
231 movl %eax, 0(%r13)
232 setne %al
233 movzbl %al, %eax
234 subl $2, %eax
235 .L45:
236 addq $40, %rsp
237 popq %rbx
238 popq %rbp
239 popq %r12
240 popq %r13
241 popq %r14
242 popq %r15
244 .p2align 4,,10
245 .p2align 3
246 .L56:
247 movq errno@gottpoff(%rip), %rax
248 movl 12(%rsp), %ebx
249 movl %ebx, %fs:(%rax)
250 xorl %eax, %eax
251 jmp .L45
252 .p2align 4,,10
253 .p2align 3
254 .L57:
255 movq errno@gottpoff(%rip), %rax
256 movl 12(%rsp), %ebx
257 movl %ebx, %fs:(%rax)
258 movl $1, %eax
259 jmp .L45
260 .L54:
261 movl $34, (%r8)
262 movl $-2, %eax
263 jmp .L45
264 .size internal_getent, .-internal_getent
265 .p2align 4,,15
266 .globl _nss_files_setetherent
267 .type _nss_files_setetherent, @function
268 _nss_files_setetherent:
269 cmpq $0, __pthread_mutex_lock@GOTPCREL(%rip)
270 pushq %rbx
271 je .L59
272 leaq lock(%rip), %rdi
273 call __pthread_mutex_lock@PLT
274 .L59:
275 leaq stream(%rip), %rdi
276 call internal_setent
277 cmpq $0, __pthread_mutex_unlock@GOTPCREL(%rip)
278 movl %eax, %ebx
279 je .L58
280 leaq lock(%rip), %rdi
281 call __pthread_mutex_unlock@PLT
282 .L58:
283 movl %ebx, %eax
284 popq %rbx
286 .size _nss_files_setetherent, .-_nss_files_setetherent
287 .p2align 4,,15
288 .globl _nss_files_endetherent
289 .type _nss_files_endetherent, @function
290 _nss_files_endetherent:
291 subq $8, %rsp
292 cmpq $0, __pthread_mutex_lock@GOTPCREL(%rip)
293 je .L69
294 leaq lock(%rip), %rdi
295 call __pthread_mutex_lock@PLT
296 .L69:
297 movq stream(%rip), %rdi
298 testq %rdi, %rdi
299 je .L70
300 call fclose@PLT
301 movq $0, stream(%rip)
302 .L70:
303 cmpq $0, __pthread_mutex_unlock@GOTPCREL(%rip)
304 je .L71
305 leaq lock(%rip), %rdi
306 call __pthread_mutex_unlock@PLT
307 .L71:
308 movl $1, %eax
309 addq $8, %rsp
311 .size _nss_files_endetherent, .-_nss_files_endetherent
312 .p2align 4,,15
313 .globl _nss_files_getetherent_r
314 .type _nss_files_getetherent_r, @function
315 _nss_files_getetherent_r:
316 pushq %r15
317 pushq %r14
318 movq %rcx, %r14
319 pushq %r13
320 pushq %r12
321 movq %rdx, %r13
322 pushq %rbp
323 pushq %rbx
324 movq %rdi, %rbp
325 movq %rsi, %r12
326 subq $8, %rsp
327 cmpq $0, __pthread_mutex_lock@GOTPCREL(%rip)
328 je .L83
329 leaq lock(%rip), %rdi
330 call __pthread_mutex_lock@PLT
331 .L83:
332 movq stream(%rip), %rdi
333 testq %rdi, %rdi
334 je .L94
335 .L84:
336 movq %r14, %r8
337 movq %r13, %rcx
338 movq %r12, %rdx
339 movq %rbp, %rsi
340 call internal_getent
341 movl %eax, %ebx
342 .L85:
343 cmpq $0, __pthread_mutex_unlock@GOTPCREL(%rip)
344 je .L82
345 leaq lock(%rip), %rdi
346 call __pthread_mutex_unlock@PLT
347 .L82:
348 addq $8, %rsp
349 movl %ebx, %eax
350 popq %rbx
351 popq %rbp
352 popq %r12
353 popq %r13
354 popq %r14
355 popq %r15
357 .p2align 4,,10
358 .p2align 3
359 .L94:
360 movq errno@gottpoff(%rip), %rax
361 leaq stream(%rip), %rdi
362 movl %fs:(%rax), %r15d
363 call internal_setent
364 movl %eax, %ebx
365 movq errno@gottpoff(%rip), %rax
366 cmpl $1, %ebx
367 movl %r15d, %fs:(%rax)
368 jne .L85
369 movq stream(%rip), %rdi
370 jmp .L84
371 .size _nss_files_getetherent_r, .-_nss_files_getetherent_r
372 .p2align 4,,15
373 .globl _nss_files_gethostton_r
374 .type _nss_files_gethostton_r, @function
375 _nss_files_gethostton_r:
376 pushq %r15
377 pushq %r14
378 movq %rdi, %r15
379 pushq %r13
380 pushq %r12
381 movq %rcx, %r13
382 pushq %rbp
383 pushq %rbx
384 movq %rsi, %rbp
385 movq %rdx, %r12
386 movq %r8, %r14
387 subq $24, %rsp
388 leaq 8(%rsp), %rdi
389 movq $0, 8(%rsp)
390 call internal_setent
391 cmpl $1, %eax
392 movl %eax, %ebx
393 je .L96
394 .L95:
395 addq $24, %rsp
396 movl %ebx, %eax
397 popq %rbx
398 popq %rbp
399 popq %r12
400 popq %r13
401 popq %r14
402 popq %r15
404 .p2align 4,,10
405 .p2align 3
406 .L99:
407 movq 0(%rbp), %rdi
408 movq %r15, %rsi
409 call __strcasecmp@PLT
410 testl %eax, %eax
411 je .L98
412 .L96:
413 movq 8(%rsp), %rdi
414 movq %r14, %r8
415 movq %r13, %rcx
416 movq %r12, %rdx
417 movq %rbp, %rsi
418 call internal_getent
419 cmpl $1, %eax
420 movl %eax, %ebx
421 je .L99
422 .L98:
423 movq 8(%rsp), %rdi
424 testq %rdi, %rdi
425 je .L95
426 call fclose@PLT
427 jmp .L95
428 .size _nss_files_gethostton_r, .-_nss_files_gethostton_r
429 .p2align 4,,15
430 .globl _nss_files_getntohost_r
431 .type _nss_files_getntohost_r, @function
432 _nss_files_getntohost_r:
433 pushq %r15
434 pushq %r14
435 movq %r8, %r15
436 pushq %r13
437 pushq %r12
438 movq %rdi, %r12
439 pushq %rbp
440 pushq %rbx
441 movq %rdx, %r13
442 movq %rsi, %rbx
443 movq %rcx, %r14
444 subq $24, %rsp
445 leaq 8(%rsp), %rdi
446 movq $0, 8(%rsp)
447 call internal_setent
448 cmpl $1, %eax
449 movl %eax, %ebp
450 je .L110
451 .L109:
452 addq $24, %rsp
453 movl %ebp, %eax
454 popq %rbx
455 popq %rbp
456 popq %r12
457 popq %r13
458 popq %r14
459 popq %r15
461 .p2align 4,,10
462 .p2align 3
463 .L124:
464 movzwl 4(%r12), %ecx
465 cmpw %cx, 12(%rbx)
466 je .L114
467 .L110:
468 movq 8(%rsp), %rdi
469 movq %r15, %r8
470 movq %r14, %rcx
471 movq %r13, %rdx
472 movq %rbx, %rsi
473 call internal_getent
474 cmpl $1, %eax
475 movl %eax, %ebp
476 jne .L114
477 movl (%r12), %edx
478 cmpl %edx, 8(%rbx)
479 jne .L110
480 jmp .L124
481 .p2align 4,,10
482 .p2align 3
483 .L114:
484 movq 8(%rsp), %rdi
485 testq %rdi, %rdi
486 je .L109
487 call fclose@PLT
488 jmp .L109
489 .size _nss_files_getntohost_r, .-_nss_files_getntohost_r
490 .local stream
491 .comm stream,8,8
492 .local lock
493 .comm lock,40,32
494 .weak __pthread_mutex_unlock
495 .weak __pthread_mutex_lock