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