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