clarify the purpose of this project
[nyanglibc.git] / inet / getnetent_r.s
blob5de4dd1f11cf3f44a70853ab4bd50914bd20cd73
1 .text
2 #APP
3 .section .gnu.warning.setnetent
4 .previous
5 .section .gnu.warning.endnetent
6 .previous
7 .section .gnu.warning.getnetent_r
8 .previous
9 .section .rodata.str1.1,"aMS",@progbits,1
10 .LC0:
11 .string "setnetent"
12 #NO_APP
13 .text
14 .p2align 4,,15
15 .globl setnetent
16 .type setnetent, @function
17 setnetent:
18 .LFB70:
19 subq $24, %rsp
20 movl %edi, %r9d
21 #APP
22 # 124 "../nss/getXXent_r.c" 1
23 movl %fs:24,%eax
24 # 0 "" 2
25 #NO_APP
26 testl %eax, %eax
27 jne .L2
28 movl $1, %edx
29 #APP
30 # 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
31 cmpxchgl %edx, lock(%rip)
32 # 0 "" 2
33 #NO_APP
34 .L3:
35 leaq stayopen_tmp(%rip), %rax
36 pushq $1
37 leaq last_nip(%rip), %r8
38 leaq startp(%rip), %rcx
39 leaq nip(%rip), %rdx
40 leaq __nss_networks_lookup2(%rip), %rsi
41 pushq %rax
42 leaq .LC0(%rip), %rdi
43 call __nss_setent
44 movq __libc_errno@gottpoff(%rip), %r8
45 movl %fs:(%r8), %r9d
46 #APP
47 # 129 "../nss/getXXent_r.c" 1
48 movl %fs:24,%eax
49 # 0 "" 2
50 #NO_APP
51 testl %eax, %eax
52 popq %rdx
53 popq %rcx
54 jne .L4
55 subl $1, lock(%rip)
56 .L5:
57 movl %r9d, %fs:(%r8)
58 addq $24, %rsp
59 ret
60 .p2align 4,,10
61 .p2align 3
62 .L2:
63 xorl %eax, %eax
64 movl $1, %edx
65 lock cmpxchgl %edx, lock(%rip)
66 je .L3
67 movl %edi, 12(%rsp)
68 leaq lock(%rip), %rdi
69 call __lll_lock_wait_private
70 movl 12(%rsp), %r9d
71 jmp .L3
72 .p2align 4,,10
73 .p2align 3
74 .L4:
75 xorl %eax, %eax
76 #APP
77 # 129 "../nss/getXXent_r.c" 1
78 xchgl %eax, lock(%rip)
79 # 0 "" 2
80 #NO_APP
81 cmpl $1, %eax
82 jle .L5
83 xorl %r10d, %r10d
84 movl $1, %edx
85 movl $129, %esi
86 leaq lock(%rip), %rdi
87 movl $202, %eax
88 #APP
89 # 129 "../nss/getXXent_r.c" 1
90 syscall
92 # 0 "" 2
93 #NO_APP
94 jmp .L5
95 .LFE70:
96 .size setnetent, .-setnetent
97 .section .rodata.str1.1
98 .LC1:
99 .string "endnetent"
100 .text
101 .p2align 4,,15
102 .globl endnetent
103 .type endnetent, @function
104 endnetent:
105 .LFB71:
106 cmpq $0, startp(%rip)
107 je .L15
108 subq $8, %rsp
109 #APP
110 # 142 "../nss/getXXent_r.c" 1
111 movl %fs:24,%eax
112 # 0 "" 2
113 #NO_APP
114 testl %eax, %eax
115 jne .L10
116 movl $1, %edx
117 #APP
118 # 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
119 cmpxchgl %edx, lock(%rip)
120 # 0 "" 2
121 #NO_APP
122 .L11:
123 leaq last_nip(%rip), %r8
124 leaq startp(%rip), %rcx
125 leaq nip(%rip), %rdx
126 leaq __nss_networks_lookup2(%rip), %rsi
127 leaq .LC1(%rip), %rdi
128 movl $1, %r9d
129 call __nss_endent
130 movq __libc_errno@gottpoff(%rip), %r8
131 movl %fs:(%r8), %r9d
132 #APP
133 # 146 "../nss/getXXent_r.c" 1
134 movl %fs:24,%eax
135 # 0 "" 2
136 #NO_APP
137 testl %eax, %eax
138 jne .L12
139 subl $1, lock(%rip)
140 .L13:
141 movl %r9d, %fs:(%r8)
142 addq $8, %rsp
144 .p2align 4,,10
145 .p2align 3
146 .L15:
147 rep ret
148 .p2align 4,,10
149 .p2align 3
150 .L12:
151 xorl %eax, %eax
152 #APP
153 # 146 "../nss/getXXent_r.c" 1
154 xchgl %eax, lock(%rip)
155 # 0 "" 2
156 #NO_APP
157 cmpl $1, %eax
158 jle .L13
159 xorl %r10d, %r10d
160 movl $1, %edx
161 movl $129, %esi
162 leaq lock(%rip), %rdi
163 movl $202, %eax
164 #APP
165 # 146 "../nss/getXXent_r.c" 1
166 syscall
168 # 0 "" 2
169 #NO_APP
170 jmp .L13
171 .p2align 4,,10
172 .p2align 3
173 .L10:
174 xorl %eax, %eax
175 movl $1, %edx
176 lock cmpxchgl %edx, lock(%rip)
177 je .L11
178 leaq lock(%rip), %rdi
179 call __lll_lock_wait_private
180 jmp .L11
181 .LFE71:
182 .size endnetent, .-endnetent
183 .section .rodata.str1.1
184 .LC2:
185 .string "getnetent_r"
186 .text
187 .p2align 4,,15
188 .globl __getnetent_r
189 .hidden __getnetent_r
190 .type __getnetent_r, @function
191 __getnetent_r:
192 .LFB72:
193 pushq %rbx
194 movq %rdi, %rbx
195 subq $32, %rsp
196 #APP
197 # 159 "../nss/getXXent_r.c" 1
198 movl %fs:24,%eax
199 # 0 "" 2
200 #NO_APP
201 testl %eax, %eax
202 jne .L19
203 movl $1, %edi
204 #APP
205 # 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
206 cmpxchgl %edi, lock(%rip)
207 # 0 "" 2
208 #NO_APP
209 .L20:
210 movq __libc_h_errno@gottpoff(%rip), %rax
211 addq %fs:0, %rax
212 subq $8, %rsp
213 leaq last_nip(%rip), %r9
214 leaq startp(%rip), %r8
215 leaq .LC2(%rip), %rdi
216 pushq %rax
217 leaq stayopen_tmp(%rip), %rax
218 pushq %rcx
219 leaq nip(%rip), %rcx
220 pushq %rdx
221 leaq __nss_networks_lookup2(%rip), %rdx
222 pushq %rsi
223 leaq .LC0(%rip), %rsi
224 pushq %rbx
225 pushq $1
226 pushq %rax
227 call __nss_getent_r
228 movq __libc_errno@gottpoff(%rip), %r8
229 movl %eax, %r9d
230 movl %fs:(%r8), %ebx
231 #APP
232 # 165 "../nss/getXXent_r.c" 1
233 movl %fs:24,%eax
234 # 0 "" 2
235 #NO_APP
236 addq $64, %rsp
237 testl %eax, %eax
238 jne .L21
239 subl $1, lock(%rip)
240 .L22:
241 movl %ebx, %fs:(%r8)
242 addq $32, %rsp
243 movl %r9d, %eax
244 popq %rbx
246 .p2align 4,,10
247 .p2align 3
248 .L19:
249 xorl %eax, %eax
250 movl $1, %edi
251 lock cmpxchgl %edi, lock(%rip)
252 je .L20
253 leaq lock(%rip), %rdi
254 movq %rcx, 24(%rsp)
255 movq %rdx, 16(%rsp)
256 movq %rsi, 8(%rsp)
257 call __lll_lock_wait_private
258 movq 24(%rsp), %rcx
259 movq 16(%rsp), %rdx
260 movq 8(%rsp), %rsi
261 jmp .L20
262 .p2align 4,,10
263 .p2align 3
264 .L21:
265 xorl %eax, %eax
266 #APP
267 # 165 "../nss/getXXent_r.c" 1
268 xchgl %eax, lock(%rip)
269 # 0 "" 2
270 #NO_APP
271 cmpl $1, %eax
272 jle .L22
273 xorl %r10d, %r10d
274 movl $1, %edx
275 movl $129, %esi
276 leaq lock(%rip), %rdi
277 movl $202, %eax
278 #APP
279 # 165 "../nss/getXXent_r.c" 1
280 syscall
282 # 0 "" 2
283 #NO_APP
284 jmp .L22
285 .LFE72:
286 .size __getnetent_r, .-__getnetent_r
287 .globl __new_getnetent_r
288 .set __new_getnetent_r,__getnetent_r
289 .weak getnetent_r
290 .set getnetent_r,__new_getnetent_r
291 .section .gnu.warning.getnetent_r
292 #,"a",@progbits
293 .align 32
294 .type __evoke_link_warning_getnetent_r, @object
295 .size __evoke_link_warning_getnetent_r, 135
296 __evoke_link_warning_getnetent_r:
297 .string "Using 'getnetent_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking"
298 .section .gnu.warning.endnetent
299 #,"a",@progbits
300 .align 32
301 .type __evoke_link_warning_endnetent, @object
302 .size __evoke_link_warning_endnetent, 133
303 __evoke_link_warning_endnetent:
304 .string "Using 'endnetent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking"
305 .section .gnu.warning.setnetent
306 #,"a",@progbits
307 .align 32
308 .type __evoke_link_warning_setnetent, @object
309 .size __evoke_link_warning_setnetent, 133
310 __evoke_link_warning_setnetent:
311 .string "Using 'setnetent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking"
312 .local lock
313 .comm lock,4,4
314 .local stayopen_tmp
315 .comm stayopen_tmp,4,4
316 .local startp
317 .comm startp,8,8
318 .local last_nip
319 .comm last_nip,8,8
320 .local nip
321 .comm nip,8,8
322 .hidden __nss_getent_r
323 .hidden __nss_endent
324 .hidden __lll_lock_wait_private
325 .hidden __nss_setent
326 .hidden __nss_networks_lookup2