clarify the purpose of this project
[nyanglibc.git] / hesiod / hesiod-service.shared.s
blob8f0bfe5fa0c30d6029b23ef02753217c70cf4ac0
1 .text
2 .section .rodata.str1.1,"aMS",@progbits,1
3 .LC0:
4 .string "#\n"
5 .text
6 .p2align 4,,15
7 .globl _nss_files_parse_servent
8 .type _nss_files_parse_servent, @function
9 _nss_files_parse_servent:
10 pushq %r15
11 pushq %r14
12 movq %rdx, %r15
13 pushq %r13
14 pushq %r12
15 movq %rdi, %r13
16 pushq %rbp
17 leaq (%rdx,%rcx), %rbp
18 pushq %rbx
19 movq %rsi, %r12
20 subq $40, %rsp
21 cmpq %rdi, %rbp
22 movq %r8, 8(%rsp)
23 jbe .L37
24 cmpq %rdi, %rdx
25 jbe .L95
26 .L37:
27 movq %r15, %r14
28 .L2:
29 leaq .LC0(%rip), %rsi
30 movq %r13, %rdi
31 call strpbrk@PLT
32 testq %rax, %rax
33 je .L3
34 movb $0, (%rax)
35 .L3:
36 movq %r13, (%r12)
37 movsbq 0(%r13), %rbx
38 testb %bl, %bl
39 je .L4
40 call __ctype_b_loc@PLT
41 cmpb $59, %bl
42 je .L92
43 movq (%rax), %rcx
44 jmp .L6
45 .p2align 4,,10
46 .p2align 3
47 .L7:
48 movsbq 1(%r13), %rbx
49 movq %rdx, %r13
50 testb %bl, %bl
51 je .L4
52 cmpb $59, %bl
53 je .L92
54 .L6:
55 testb $32, 1(%rcx,%rbx,2)
56 leaq 1(%r13), %rdx
57 je .L7
58 .L5:
59 movb $0, 0(%r13)
60 movq (%rax), %rcx
61 jmp .L33
62 .p2align 4,,10
63 .p2align 3
64 .L8:
65 addq $1, %rdx
66 .L33:
67 movsbq (%rdx), %rax
68 movq %rdx, %r13
69 cmpb $59, %al
70 je .L8
71 testb $32, 1(%rcx,%rax,2)
72 jne .L8
73 .L4:
74 movq %r13, 24(%r12)
75 movsbq 0(%r13), %rbx
76 testb %bl, %bl
77 je .L9
78 call __ctype_b_loc@PLT
79 cmpb $59, %bl
80 je .L93
81 movq (%rax), %rcx
82 jmp .L11
83 .p2align 4,,10
84 .p2align 3
85 .L12:
86 movsbq 1(%r13), %rbx
87 movq %rdx, %r13
88 testb %bl, %bl
89 je .L9
90 cmpb $59, %bl
91 je .L93
92 .L11:
93 testb $32, 1(%rcx,%rbx,2)
94 leaq 1(%r13), %rdx
95 je .L12
96 .L10:
97 movb $0, 0(%r13)
98 movq (%rax), %rcx
99 jmp .L34
100 .p2align 4,,10
101 .p2align 3
102 .L13:
103 addq $1, %rdx
104 .L34:
105 movsbq (%rdx), %rax
106 movq %rdx, %r13
107 cmpb $59, %al
108 je .L13
109 testb $32, 1(%rcx,%rax,2)
110 jne .L13
111 .L9:
112 leaq 24(%rsp), %rsi
113 xorl %edx, %edx
114 movq %r13, %rdi
115 call strtoul@PLT
116 movl $4294967295, %edx
117 movq 24(%rsp), %rbx
118 cmpq %rdx, %rax
119 cmova %rdx, %rax
120 rolw $8, %ax
121 cmpq %r13, %rbx
122 movzwl %ax, %eax
123 movl %eax, 16(%r12)
124 je .L14
125 movzbl (%rbx), %ecx
126 movb %cl, 7(%rsp)
127 call __ctype_b_loc@PLT
128 movzbl 7(%rsp), %ecx
129 movq %rax, %r13
130 movq (%rax), %rdx
131 cmpb $59, %cl
132 je .L17
133 movsbq %cl, %rax
134 testb $32, 1(%rdx,%rax,2)
135 jne .L17
136 testb %cl, %cl
137 jne .L14
138 testq %r14, %r14
139 je .L96
140 .p2align 4,,10
141 .p2align 3
142 .L21:
143 addq $7, %r14
144 andq $-8, %r14
145 leaq 16(%r14), %r9
146 movq %r14, %r8
147 .L23:
148 cmpq %r9, %rbp
149 jb .L97
150 .L24:
151 movzbl (%rbx), %eax
152 testb %al, %al
153 je .L25
154 movq 0(%r13), %rcx
155 jmp .L26
156 .p2align 4,,10
157 .p2align 3
158 .L27:
159 addq $1, %rbx
160 movzbl (%rbx), %eax
161 .L26:
162 movsbq %al, %rdx
163 testb $32, 1(%rcx,%rdx,2)
164 jne .L27
165 testb %al, %al
166 je .L23
167 movq %rbx, %rdx
168 jmp .L29
169 .p2align 4,,10
170 .p2align 3
171 .L90:
172 testb $32, 1(%rcx,%rax,2)
173 jne .L30
174 movq %rdi, %rdx
175 .L29:
176 movsbq 1(%rdx), %rax
177 leaq 1(%rdx), %rdi
178 testb %al, %al
179 jne .L90
180 cmpq %rdi, %rbx
181 jnb .L98
182 .L35:
183 movq %rbx, (%r8)
184 cmpb $0, 1(%rdx)
185 leaq 8(%r8), %rax
186 movq %rdi, %rbx
187 movq %rax, %r8
188 leaq 16(%rax), %r9
189 je .L23
190 leaq 16(%rax), %r9
191 jmp .L36
192 .p2align 4,,10
193 .p2align 3
194 .L17:
195 addq $1, %rbx
196 movq %rbx, 24(%rsp)
197 movsbq (%rbx), %rax
198 cmpb $59, %al
199 je .L17
200 testb $32, 1(%rdx,%rax,2)
201 jne .L17
202 testq %r14, %r14
203 jne .L21
204 jmp .L96
205 .p2align 4,,10
206 .p2align 3
207 .L30:
208 cmpq %rdi, %rbx
209 jb .L35
210 .L36:
211 cmpq %r9, %rbp
212 leaq 2(%rdx), %rbx
213 movb $0, (%rdi)
214 jnb .L24
215 .L97:
216 movq 8(%rsp), %rax
217 movl $34, (%rax)
218 addq $40, %rsp
219 movl $-1, %eax
220 popq %rbx
221 popq %rbp
222 popq %r12
223 popq %r13
224 popq %r14
225 popq %r15
227 .p2align 4,,10
228 .p2align 3
229 .L95:
230 call strlen@PLT
231 leaq 1(%r13,%rax), %r14
232 jmp .L2
233 .p2align 4,,10
234 .p2align 3
235 .L14:
236 xorl %eax, %eax
237 .L1:
238 addq $40, %rsp
239 popq %rbx
240 popq %rbp
241 popq %r12
242 popq %r13
243 popq %r14
244 popq %r15
246 .p2align 4,,10
247 .p2align 3
248 .L93:
249 leaq 1(%r13), %rdx
250 jmp .L10
251 .p2align 4,,10
252 .p2align 3
253 .L92:
254 leaq 1(%r13), %rdx
255 jmp .L5
256 .p2align 4,,10
257 .p2align 3
258 .L25:
259 testq %r14, %r14
260 movq $0, (%r8)
261 je .L44
262 movq %r14, 8(%r12)
263 addq $40, %rsp
264 movl $1, %eax
265 popq %rbx
266 popq %rbp
267 popq %r12
268 popq %r13
269 popq %r14
270 popq %r15
272 .L96:
273 cmpq %rbx, %r15
274 ja .L42
275 cmpq %rbx, %rbp
276 ja .L99
277 .L42:
278 movq %r15, %r14
279 jmp .L21
280 .L98:
281 movq %rdi, %rbx
282 jmp .L23
283 .L99:
284 movq %rbx, %rdi
285 call strlen@PLT
286 leaq 1(%rbx,%rax), %r14
287 jmp .L21
288 .L44:
289 movl $-1, %eax
290 jmp .L1
291 .size _nss_files_parse_servent, .-_nss_files_parse_servent
292 .p2align 4,,15
293 .type lookup, @function
294 lookup:
295 pushq %r15
296 pushq %r14
297 movq %rsi, %r15
298 pushq %r13
299 pushq %r12
300 movq %rdx, %r14
301 pushq %rbp
302 pushq %rbx
303 movq %rdi, %rbx
304 movq %rcx, %r12
305 movq %r8, %rbp
306 movq %r9, %r13
307 subq $56, %rsp
308 movq errno@gottpoff(%rip), %rax
309 leaq 40(%rsp), %rdi
310 movl %fs:(%rax), %eax
311 movl %eax, 28(%rsp)
312 call hesiod_init
313 testl %eax, %eax
314 js .L110
315 movq 40(%rsp), %rdi
316 movq %rbx, %rsi
317 movq %r15, %rdx
318 call hesiod_resolve
319 testq %rax, %rax
320 movq %rax, 16(%rsp)
321 movq %r13, 8(%rsp)
322 leaq 8(%rax), %rbx
323 je .L119
324 .p2align 4,,10
325 .p2align 3
326 .L103:
327 movq -8(%rbx), %r15
328 movq %r15, %rdi
329 call strlen@PLT
330 leaq 1(%rax), %rdx
331 cmpq %rdx, 8(%rsp)
332 jb .L120
333 movq %r15, %rsi
334 movq %rbp, %rdi
335 call memcpy@PLT
336 movq 112(%rsp), %r8
337 movq %r13, %rcx
338 movq %rbp, %rdx
339 movq %r12, %rsi
340 movq %rbp, %rdi
341 call _nss_files_parse_servent@PLT
342 cmpl $-1, %eax
343 je .L121
344 testl %eax, %eax
345 jle .L118
346 testq %r14, %r14
347 je .L109
348 movq 24(%r12), %rdi
349 movq %r14, %rsi
350 call strcasecmp@PLT
351 testl %eax, %eax
352 je .L109
353 .L118:
354 cmpq $0, (%rbx)
355 je .L122
356 addq $8, %rbx
357 jmp .L103
358 .p2align 4,,10
359 .p2align 3
360 .L109:
361 movq 16(%rsp), %rsi
362 movq 40(%rsp), %rdi
363 call hesiod_free_list
364 movq 40(%rsp), %rdi
365 call hesiod_end
366 movl $1, %eax
367 .L100:
368 addq $56, %rsp
369 popq %rbx
370 popq %rbp
371 popq %r12
372 popq %r13
373 popq %r14
374 popq %r15
376 .p2align 4,,10
377 .p2align 3
378 .L120:
379 movq 16(%rsp), %rsi
380 movq 40(%rsp), %rdi
381 call hesiod_free_list
382 movq 40(%rsp), %rdi
383 call hesiod_end
384 movq 112(%rsp), %rax
385 movl $34, (%rax)
386 addq $56, %rsp
387 movl $-2, %eax
388 popq %rbx
389 popq %rbp
390 popq %r12
391 popq %r13
392 popq %r14
393 popq %r15
395 .p2align 4,,10
396 .p2align 3
397 .L122:
398 movq 16(%rsp), %rsi
399 movq 40(%rsp), %rdi
400 call hesiod_free_list
401 movq 40(%rsp), %rdi
402 call hesiod_end
403 movq errno@gottpoff(%rip), %rax
404 movl 28(%rsp), %ecx
405 movl %ecx, %fs:(%rax)
406 addq $56, %rsp
407 xorl %eax, %eax
408 popq %rbx
409 popq %rbp
410 popq %r12
411 popq %r13
412 popq %r14
413 popq %r15
415 .p2align 4,,10
416 .p2align 3
417 .L121:
418 movq 16(%rsp), %rsi
419 movq 40(%rsp), %rdi
420 call hesiod_free_list
421 movq 40(%rsp), %rdi
422 call hesiod_end
423 addq $56, %rsp
424 movl $-2, %eax
425 popq %rbx
426 popq %rbp
427 popq %r12
428 popq %r13
429 popq %r14
430 popq %r15
432 .p2align 4,,10
433 .p2align 3
434 .L119:
435 movq errno@gottpoff(%rip), %rax
436 movq 40(%rsp), %rdi
437 movl %fs:(%rax), %ebx
438 call hesiod_end
439 movq errno@gottpoff(%rip), %rax
440 movl 28(%rsp), %ecx
441 movl %ecx, %fs:(%rax)
442 xorl %eax, %eax
443 cmpl $2, %ebx
444 setne %al
445 addq $56, %rsp
446 popq %rbx
447 negl %eax
448 popq %rbp
449 popq %r12
450 popq %r13
451 popq %r14
452 popq %r15
454 .L110:
455 movl $-1, %eax
456 jmp .L100
457 .size lookup, .-lookup
458 .p2align 4,,15
459 .globl _nss_hesiod_setservent
460 .type _nss_hesiod_setservent, @function
461 _nss_hesiod_setservent:
462 movl $1, %eax
464 .size _nss_hesiod_setservent, .-_nss_hesiod_setservent
465 .p2align 4,,15
466 .globl _nss_hesiod_endservent
467 .type _nss_hesiod_endservent, @function
468 _nss_hesiod_endservent:
469 movl $1, %eax
471 .size _nss_hesiod_endservent, .-_nss_hesiod_endservent
472 .section .rodata.str1.1
473 .LC1:
474 .string "service"
475 .text
476 .p2align 4,,15
477 .globl _nss_hesiod_getservbyname_r
478 .type _nss_hesiod_getservbyname_r, @function
479 _nss_hesiod_getservbyname_r:
480 subq $16, %rsp
481 pushq %r9
482 movq %r8, %r9
483 movq %rcx, %r8
484 movq %rdx, %rcx
485 movq %rsi, %rdx
486 leaq .LC1(%rip), %rsi
487 call lookup
488 addq $24, %rsp
490 .size _nss_hesiod_getservbyname_r, .-_nss_hesiod_getservbyname_r
491 .section .rodata.str1.1
492 .LC2:
493 .string "%d"
494 .LC3:
495 .string "port"
496 .text
497 .p2align 4,,15
498 .globl _nss_hesiod_getservbyport_r
499 .type _nss_hesiod_getservbyport_r, @function
500 _nss_hesiod_getservbyport_r:
501 pushq %r15
502 pushq %r14
503 rolw $8, %di
504 pushq %r13
505 pushq %r12
506 xorl %eax, %eax
507 pushq %rbp
508 pushq %rbx
509 movq %rdx, %rbp
510 leaq .LC2(%rip), %rdx
511 movq %rsi, %rbx
512 movq %rcx, %r12
513 subq $24, %rsp
514 movzwl %di, %ecx
515 movl $6, %esi
516 leaq 10(%rsp), %r14
517 movq %r8, %r13
518 movq %r9, %r15
519 movq %r14, %rdi
520 call snprintf@PLT
521 subq $8, %rsp
522 leaq .LC3(%rip), %rsi
523 movq %r13, %r9
524 pushq %r15
525 movq %r12, %r8
526 movq %rbp, %rcx
527 movq %rbx, %rdx
528 movq %r14, %rdi
529 call lookup
530 addq $40, %rsp
531 popq %rbx
532 popq %rbp
533 popq %r12
534 popq %r13
535 popq %r14
536 popq %r15
538 .size _nss_hesiod_getservbyport_r, .-_nss_hesiod_getservbyport_r
539 .hidden hesiod_end
540 .hidden hesiod_free_list
541 .hidden hesiod_resolve
542 .hidden hesiod_init