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