clarify the purpose of this project
[nyanglibc.git] / shadow / sgetspent_r.shared.s
blobf1732ed62ce63632b92ecb24f32406ad777a9470
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 #NO_APP
7 .p2align 4,,15
8 .globl __GI__nss_files_parse_spent
9 .hidden __GI__nss_files_parse_spent
10 .type __GI__nss_files_parse_spent, @function
11 __GI__nss_files_parse_spent:
12 pushq %r13
13 pushq %r12
14 pushq %rbp
15 pushq %rbx
16 movq %rsi, %rbp
17 movl $10, %esi
18 movq %rdi, %rbx
19 subq $24, %rsp
20 call __GI_strchr@PLT
21 testq %rax, %rax
22 je .L2
23 movb $0, (%rax)
24 .L2:
25 movq %rbx, 0(%rbp)
26 movzbl (%rbx), %eax
27 testb %al, %al
28 jne .L84
29 jmp .L3
30 .p2align 4,,10
31 .p2align 3
32 .L87:
33 addq $1, %rbx
34 movzbl (%rbx), %eax
35 testb %al, %al
36 je .L3
37 .L84:
38 cmpb $58, %al
39 jne .L87
40 .L3:
41 testb %al, %al
42 je .L6
43 movb $0, (%rbx)
44 addq $1, %rbx
45 .L6:
46 cmpb $0, (%rbx)
47 jne .L7
48 movq 0(%rbp), %rax
49 movzbl (%rax), %eax
50 subl $43, %eax
51 testb $-3, %al
52 je .L88
53 .L7:
54 movq %rbx, 8(%rbp)
55 movzbl (%rbx), %eax
56 cmpb $58, %al
57 je .L9
58 testb %al, %al
59 jne .L10
60 jmp .L9
61 .p2align 4,,10
62 .p2align 3
63 .L89:
64 cmpb $58, %al
65 je .L9
66 .L10:
67 addq $1, %rbx
68 movzbl (%rbx), %eax
69 testb %al, %al
70 jne .L89
71 .L9:
72 testb %al, %al
73 je .L12
74 movb $0, (%rbx)
75 addq $1, %rbx
76 .L12:
77 cmpb $0, (%rbx)
78 jne .L90
79 .L39:
80 xorl %eax, %eax
81 .L1:
82 addq $24, %rsp
83 popq %rbx
84 popq %rbp
85 popq %r12
86 popq %r13
87 ret
88 .p2align 4,,10
89 .p2align 3
90 .L90:
91 leaq 8(%rsp), %r12
92 movl $10, %edx
93 movq %rbx, %rdi
94 movq %r12, %rsi
95 call __GI_strtoul
96 movl $4294967295, %edx
97 movq 8(%rsp), %r13
98 cmpq %rdx, %rax
99 cmova %rdx, %rax
100 cltq
101 cmpq %rbx, %r13
102 movq %rax, 16(%rbp)
103 je .L91
104 .L14:
105 movzbl 0(%r13), %eax
106 cmpb $58, %al
107 je .L92
108 testb %al, %al
109 jne .L39
110 .L16:
111 cmpb $0, 0(%r13)
112 je .L39
113 movl $10, %edx
114 movq %r12, %rsi
115 movq %r13, %rdi
116 call __GI_strtoul
117 movl $4294967295, %edx
118 movq 8(%rsp), %rbx
119 cmpq %rdx, %rax
120 cmova %rdx, %rax
121 cltq
122 cmpq %r13, %rbx
123 movq %rax, 24(%rbp)
124 je .L93
125 .L19:
126 movzbl (%rbx), %eax
127 cmpb $58, %al
128 je .L94
129 testb %al, %al
130 jne .L39
131 .L21:
132 cmpb $0, (%rbx)
133 je .L39
134 movl $10, %edx
135 movq %r12, %rsi
136 movq %rbx, %rdi
137 call __GI_strtoul
138 movl $4294967295, %edx
139 movq 8(%rsp), %r13
140 cmpq %rdx, %rax
141 cmova %rdx, %rax
142 cltq
143 cmpq %rbx, %r13
144 movq %rax, 32(%rbp)
145 je .L95
146 .L24:
147 movzbl 0(%r13), %eax
148 cmpb $58, %al
149 je .L96
150 testb %al, %al
151 jne .L39
152 .L26:
153 movq __libc_tsd_CTYPE_B@gottpoff(%rip), %rax
154 movsbq 0(%r13), %rdx
155 movq %fs:(%rax), %rcx
156 movq %rdx, %rax
157 testb $32, 1(%rcx,%rdx,2)
158 je .L28
159 .p2align 4,,10
160 .p2align 3
161 .L27:
162 addq $1, %r13
163 movsbq 0(%r13), %rdx
164 testb $32, 1(%rcx,%rdx,2)
165 movq %rdx, %rax
166 jne .L27
167 .L28:
168 testb %al, %al
169 je .L85
170 movl $10, %edx
171 movq %r12, %rsi
172 movq %r13, %rdi
173 call __GI_strtoul
174 movl $4294967295, %edx
175 movq 8(%rsp), %rbx
176 cmpq %rdx, %rax
177 cmova %rdx, %rax
178 cltq
179 cmpq %r13, %rbx
180 movq %rax, 40(%rbp)
181 je .L97
182 .L30:
183 movzbl (%rbx), %edx
184 cmpb $58, %dl
185 je .L98
186 xorl %eax, %eax
187 testb %dl, %dl
188 jne .L1
189 .L32:
190 cmpb $0, (%rbx)
191 je .L39
192 movl $10, %edx
193 movq %r12, %rsi
194 movq %rbx, %rdi
195 call __GI_strtoul
196 movl $4294967295, %edx
197 movq 8(%rsp), %r13
198 cmpq %rdx, %rax
199 cmova %rdx, %rax
200 cltq
201 cmpq %rbx, %r13
202 movq %rax, 48(%rbp)
203 jne .L36
204 movq $-1, 48(%rbp)
205 .L36:
206 movzbl 0(%r13), %eax
207 cmpb $58, %al
208 je .L99
209 testb %al, %al
210 jne .L39
211 .L38:
212 cmpb $0, 0(%r13)
213 je .L39
214 movl $10, %edx
215 movq %r12, %rsi
216 movq %r13, %rdi
217 call __GI_strtoul
218 movl $4294967295, %edx
219 movq 8(%rsp), %rbx
220 cmpq %rdx, %rax
221 cmova %rdx, %rax
222 cltq
223 cmpq %r13, %rbx
224 movq %rax, 56(%rbp)
225 jne .L41
226 movq $-1, 56(%rbp)
227 .L41:
228 movzbl (%rbx), %eax
229 cmpb $58, %al
230 je .L100
231 testb %al, %al
232 jne .L39
233 .L43:
234 cmpb $0, (%rbx)
235 jne .L101
236 movq $-1, 64(%rbp)
237 movl $1, %eax
238 jmp .L1
239 .p2align 4,,10
240 .p2align 3
241 .L88:
242 movq $0, 8(%rbp)
243 movq $0, 16(%rbp)
244 movq $0, 24(%rbp)
245 movq $0, 32(%rbp)
246 .L85:
247 movq $-1, %rax
248 movq %rax, 40(%rbp)
249 movq %rax, 48(%rbp)
250 movq %rax, 56(%rbp)
251 movq %rax, 64(%rbp)
252 addq $24, %rsp
253 popq %rbx
254 movl $1, %eax
255 popq %rbp
256 popq %r12
257 popq %r13
259 .p2align 4,,10
260 .p2align 3
261 .L92:
262 addq $1, %r13
263 jmp .L16
264 .p2align 4,,10
265 .p2align 3
266 .L91:
267 movq $-1, 16(%rbp)
268 jmp .L14
269 .L94:
270 addq $1, %rbx
271 jmp .L21
272 .L93:
273 movq $-1, 24(%rbp)
274 jmp .L19
275 .L96:
276 addq $1, %r13
277 jmp .L26
278 .L95:
279 movq $-1, 32(%rbp)
280 jmp .L24
281 .L97:
282 movq $-1, 40(%rbp)
283 jmp .L30
284 .L98:
285 addq $1, %rbx
286 jmp .L32
287 .L99:
288 addq $1, %r13
289 movq %r13, 8(%rsp)
290 jmp .L38
291 .L101:
292 movl $10, %edx
293 movq %r12, %rsi
294 movq %rbx, %rdi
295 call __GI_strtoul
296 movl $4294967295, %edx
297 cmpq %rdx, %rax
298 cmova %rdx, %rax
299 movq %rax, 64(%rbp)
300 movq 8(%rsp), %rax
301 cmpq %rbx, %rax
302 jne .L46
303 movq $-1, 64(%rbp)
304 .L46:
305 cmpb $0, (%rax)
306 sete %al
307 movzbl %al, %eax
308 jmp .L1
309 .L100:
310 addq $1, %rbx
311 movq %rbx, 8(%rsp)
312 jmp .L43
313 .size __GI__nss_files_parse_spent, .-__GI__nss_files_parse_spent
314 .globl _nss_files_parse_spent
315 .set _nss_files_parse_spent,__GI__nss_files_parse_spent
316 .p2align 4,,15
317 .globl __sgetspent_r
318 .hidden __sgetspent_r
319 .type __sgetspent_r, @function
320 __sgetspent_r:
321 movq %rdi, %rax
322 movq %rdx, %rdi
323 pushq %r12
324 pushq %rbp
325 pushq %rbx
326 leaq -1(%rdi,%rcx), %rbx
327 movq %rcx, %rdx
328 movq %rsi, %rbp
329 movq %rax, %rsi
330 movb $0, (%rbx)
331 movq %r8, %r12
332 call __GI_strncpy
333 cmpb $0, (%rbx)
334 movl $34, %edx
335 jne .L102
336 movq __libc_errno@gottpoff(%rip), %rbx
337 xorl %ecx, %ecx
338 xorl %edx, %edx
339 movq %rbp, %rsi
340 movq %rax, %rdi
341 movq %rbx, %r8
342 addq %fs:0, %r8
343 call __GI__nss_files_parse_spent
344 testl %eax, %eax
345 jle .L109
346 xorl %edx, %edx
347 testq %rbp, %rbp
348 movq %rbp, (%r12)
349 je .L105
350 .L102:
351 popq %rbx
352 movl %edx, %eax
353 popq %rbp
354 popq %r12
356 .p2align 4,,10
357 .p2align 3
358 .L109:
359 movq $0, (%r12)
360 .L105:
361 movl %fs:(%rbx), %edx
362 popq %rbx
363 popq %rbp
364 movl %edx, %eax
365 popq %r12
367 .size __sgetspent_r, .-__sgetspent_r
368 .weak sgetspent_r
369 .set sgetspent_r,__sgetspent_r