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