clarify the purpose of this project
[nyanglibc.git] / gshadow / getsgent_r.s
blob9646a71d1775df4befeb13bdf5514c54877f6e32
1 .text
2 #APP
3 .section .gnu.warning.setsgent
4 .previous
5 .section .gnu.warning.endsgent
6 .previous
7 .section .gnu.warning.getsgent_r
8 .previous
9 .section .rodata.str1.1,"aMS",@progbits,1
10 .LC0:
11 .string "setsgent"
12 #NO_APP
13 .text
14 .p2align 4,,15
15 .globl setsgent
16 .type setsgent, @function
17 setsgent:
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_gshadow_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 setsgent, .-setsgent
94 .section .rodata.str1.1
95 .LC1:
96 .string "endsgent"
97 .text
98 .p2align 4,,15
99 .globl endsgent
100 .type endsgent, @function
101 endsgent:
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_gshadow_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 endsgent, .-endsgent
180 .section .rodata.str1.1
181 .LC2:
182 .string "getsgent_r"
183 .text
184 .p2align 4,,15
185 .globl __getsgent_r
186 .type __getsgent_r, @function
187 __getsgent_r:
188 .LFB72:
189 pushq %rbx
190 movq %rdi, %rbx
191 subq $32, %rsp
192 #APP
193 # 159 "../nss/getXXent_r.c" 1
194 movl %fs:24,%eax
195 # 0 "" 2
196 #NO_APP
197 testl %eax, %eax
198 jne .L19
199 movl $1, %edi
200 #APP
201 # 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
202 cmpxchgl %edi, lock(%rip)
203 # 0 "" 2
204 #NO_APP
205 .L20:
206 subq $8, %rsp
207 leaq last_nip(%rip), %r9
208 leaq startp(%rip), %r8
209 pushq $0
210 leaq .LC2(%rip), %rdi
211 pushq %rcx
212 leaq nip(%rip), %rcx
213 pushq %rdx
214 leaq __nss_gshadow_lookup2(%rip), %rdx
215 pushq %rsi
216 leaq .LC0(%rip), %rsi
217 pushq %rbx
218 pushq $0
219 pushq $0
220 call __nss_getent_r
221 movq __libc_errno@gottpoff(%rip), %r8
222 movl %eax, %r9d
223 movl %fs:(%r8), %ebx
224 #APP
225 # 165 "../nss/getXXent_r.c" 1
226 movl %fs:24,%eax
227 # 0 "" 2
228 #NO_APP
229 addq $64, %rsp
230 testl %eax, %eax
231 jne .L21
232 subl $1, lock(%rip)
233 .L22:
234 movl %ebx, %fs:(%r8)
235 addq $32, %rsp
236 movl %r9d, %eax
237 popq %rbx
239 .p2align 4,,10
240 .p2align 3
241 .L19:
242 xorl %eax, %eax
243 movl $1, %edi
244 lock cmpxchgl %edi, lock(%rip)
245 je .L20
246 leaq lock(%rip), %rdi
247 movq %rcx, 24(%rsp)
248 movq %rdx, 16(%rsp)
249 movq %rsi, 8(%rsp)
250 call __lll_lock_wait_private
251 movq 24(%rsp), %rcx
252 movq 16(%rsp), %rdx
253 movq 8(%rsp), %rsi
254 jmp .L20
255 .p2align 4,,10
256 .p2align 3
257 .L21:
258 xorl %eax, %eax
259 #APP
260 # 165 "../nss/getXXent_r.c" 1
261 xchgl %eax, lock(%rip)
262 # 0 "" 2
263 #NO_APP
264 cmpl $1, %eax
265 jle .L22
266 xorl %r10d, %r10d
267 movl $1, %edx
268 movl $129, %esi
269 leaq lock(%rip), %rdi
270 movl $202, %eax
271 #APP
272 # 165 "../nss/getXXent_r.c" 1
273 syscall
275 # 0 "" 2
276 #NO_APP
277 jmp .L22
278 .LFE72:
279 .size __getsgent_r, .-__getsgent_r
280 .globl getsgent_r
281 .set getsgent_r,__getsgent_r
282 .section .gnu.warning.getsgent_r
283 #,"a",@progbits
284 .align 32
285 .type __evoke_link_warning_getsgent_r, @object
286 .size __evoke_link_warning_getsgent_r, 134
287 __evoke_link_warning_getsgent_r:
288 .string "Using 'getsgent_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking"
289 .section .gnu.warning.endsgent
290 #,"a",@progbits
291 .align 32
292 .type __evoke_link_warning_endsgent, @object
293 .size __evoke_link_warning_endsgent, 132
294 __evoke_link_warning_endsgent:
295 .string "Using 'endsgent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking"
296 .section .gnu.warning.setsgent
297 #,"a",@progbits
298 .align 32
299 .type __evoke_link_warning_setsgent, @object
300 .size __evoke_link_warning_setsgent, 132
301 __evoke_link_warning_setsgent:
302 .string "Using 'setsgent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking"
303 .local lock
304 .comm lock,4,4
305 .local startp
306 .comm startp,8,8
307 .local last_nip
308 .comm last_nip,8,8
309 .local nip
310 .comm nip,8,8
311 .hidden __nss_getent_r
312 .hidden __nss_endent
313 .hidden __lll_lock_wait_private
314 .hidden __nss_setent
315 .hidden __nss_gshadow_lookup2