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