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