clarify the purpose of this project
[nyanglibc.git] / inet / gethstent.shared.s
blob127ca17e127ee07324a3dee0f74786831dbc1eb0
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 .section __libc_freeres_ptrs, "aw", %nobits
7 .previous
8 #NO_APP
9 .p2align 4,,15
10 .globl gethostent
11 .type gethostent, @function
12 gethostent:
13 .LFB70:
14 pushq %rbx
15 #APP
16 # 81 "../nss/getXXent.c" 1
17 movl %fs:24,%eax
18 # 0 "" 2
19 #NO_APP
20 testl %eax, %eax
21 jne .L2
22 movl $1, %edx
23 #APP
24 # 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
25 cmpxchgl %edx, lock(%rip)
26 # 0 "" 2
27 #NO_APP
28 .L3:
29 movq __libc_h_errno@gottpoff(%rip), %r9
30 addq %fs:0, %r9
31 leaq buffer_size.11497(%rip), %r8
32 leaq buffer(%rip), %rdx
33 leaq resbuf.11501(%rip), %rsi
34 leaq __gethostent_r(%rip), %rdi
35 movl $1024, %ecx
36 call __nss_getent
37 movq __libc_errno@gottpoff(%rip), %r8
38 movq %rax, %r9
39 movl %fs:(%r8), %ebx
40 #APP
41 # 89 "../nss/getXXent.c" 1
42 movl %fs:24,%eax
43 # 0 "" 2
44 #NO_APP
45 testl %eax, %eax
46 jne .L4
47 subl $1, lock(%rip)
48 .L5:
49 movl %ebx, %fs:(%r8)
50 movq %r9, %rax
51 popq %rbx
52 ret
53 .p2align 4,,10
54 .p2align 3
55 .L2:
56 xorl %eax, %eax
57 movl $1, %edx
58 lock cmpxchgl %edx, lock(%rip)
59 je .L3
60 leaq lock(%rip), %rdi
61 call __lll_lock_wait_private
62 jmp .L3
63 .p2align 4,,10
64 .p2align 3
65 .L4:
66 xorl %eax, %eax
67 #APP
68 # 89 "../nss/getXXent.c" 1
69 xchgl %eax, lock(%rip)
70 # 0 "" 2
71 #NO_APP
72 cmpl $1, %eax
73 jle .L5
74 xorl %r10d, %r10d
75 movl $1, %edx
76 movl $129, %esi
77 leaq lock(%rip), %rdi
78 movl $202, %eax
79 #APP
80 # 89 "../nss/getXXent.c" 1
81 syscall
83 # 0 "" 2
84 #NO_APP
85 jmp .L5
86 .LFE70:
87 .size gethostent, .-gethostent
88 .local buffer_size.11497
89 .comm buffer_size.11497,8,8
90 .local resbuf.11501
91 .comm resbuf.11501,32,32
92 .section __libc_freeres_ptrs
93 #,"aw",@progbits
94 .align 8
95 .type buffer, @object
96 .size buffer, 8
97 buffer:
98 .zero 8
99 .local lock
100 .comm lock,4,4
101 .hidden __lll_lock_wait_private
102 .hidden __nss_getent
103 .hidden __gethostent_r