clarify the purpose of this project
[nyanglibc.git] / grp / putgrent.shared.s
blobf39a9f4812006a1e55cd662c1562da83e0ab8915
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 .section .rodata.str1.1,"aMS",@progbits,1
7 .LC0:
8 .string ""
9 .LC1:
10 .string "%s"
11 .LC2:
12 .string ",%s"
13 .LC3:
14 .string "%s:%s::"
15 .LC4:
16 .string "%s:%s:%lu:"
17 #NO_APP
18 .text
19 .p2align 4,,15
20 .globl putgrent
21 .type putgrent, @function
22 putgrent:
23 .LFB64:
24 testq %rdi, %rdi
25 pushq %r14
26 pushq %r13
27 pushq %r12
28 pushq %rbp
29 pushq %rbx
30 je .L5
31 testq %rsi, %rsi
32 je .L5
33 movq %rdi, %rbp
34 movq (%rdi), %rdi
35 testq %rdi, %rdi
36 je .L5
37 movq %rsi, %r12
38 call __nss_valid_field
39 testb %al, %al
40 je .L5
41 movq 8(%rbp), %rdi
42 call __nss_valid_field
43 testb %al, %al
44 je .L5
45 movq 24(%rbp), %rdi
46 call __nss_valid_list_field
47 testb %al, %al
48 je .L5
49 movl (%r12), %edx
50 andl $32768, %edx
51 jne .L6
52 movq 136(%r12), %rdi
53 movq %fs:16, %rbx
54 cmpq %rbx, 8(%rdi)
55 je .L7
56 #APP
57 # 45 "putgrent.c" 1
58 movl %fs:24,%eax
59 # 0 "" 2
60 #NO_APP
61 testl %eax, %eax
62 jne .L8
63 movl $1, %edx
64 #APP
65 # 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
66 cmpxchgl %edx, (%rdi)
67 # 0 "" 2
68 #NO_APP
69 .L9:
70 movq 136(%r12), %rdi
71 movq %rbx, 8(%rdi)
72 .L7:
73 addl $1, 4(%rdi)
74 .L6:
75 movq 0(%rbp), %rdx
76 movq 8(%rbp), %rcx
77 movzbl (%rdx), %eax
78 subl $43, %eax
79 testb $-3, %al
80 je .L60
81 movl 16(%rbp), %r8d
82 leaq .LC0(%rip), %rax
83 testq %rcx, %rcx
84 leaq .LC4(%rip), %rsi
85 movq %r12, %rdi
86 cmove %rax, %rcx
87 xorl %eax, %eax
88 call __GI_fprintf
89 .L12:
90 testl %eax, %eax
91 js .L58
92 movq 24(%rbp), %rax
93 testq %rax, %rax
94 je .L18
95 movq (%rax), %rdx
96 testq %rdx, %rdx
97 je .L18
98 xorl %ebx, %ebx
99 leaq .LC2(%rip), %r14
100 leaq .LC1(%rip), %r13
101 jmp .L22
102 .p2align 4,,10
103 .p2align 3
104 .L20:
105 movq 24(%rbp), %rax
106 addq $1, %rbx
107 movq (%rax,%rbx,8), %rdx
108 testq %rdx, %rdx
109 je .L18
110 .L22:
111 testq %rbx, %rbx
112 movq %r13, %rsi
113 movq %r12, %rdi
114 cmovne %r14, %rsi
115 xorl %eax, %eax
116 call __GI_fprintf
117 testl %eax, %eax
118 jns .L20
119 .L58:
120 testl $32768, (%r12)
121 jne .L50
122 movq 136(%r12), %rdi
123 movl 4(%rdi), %eax
124 subl $1, %eax
125 testl %eax, %eax
126 movl %eax, 4(%rdi)
127 jne .L50
128 movq $0, 8(%rdi)
129 #APP
130 # 56 "putgrent.c" 1
131 movl %fs:24,%edx
132 # 0 "" 2
133 #NO_APP
134 testl %edx, %edx
135 jne .L21
136 subl $1, (%rdi)
137 .L50:
138 movl $-1, %r8d
139 .L1:
140 popq %rbx
141 movl %r8d, %eax
142 popq %rbp
143 popq %r12
144 popq %r13
145 popq %r14
147 .p2align 4,,10
148 .p2align 3
149 .L60:
150 leaq .LC0(%rip), %rax
151 testq %rcx, %rcx
152 leaq .LC3(%rip), %rsi
153 movq %r12, %rdi
154 cmove %rax, %rcx
155 xorl %eax, %eax
156 call __GI_fprintf
157 jmp .L12
158 .p2align 4,,10
159 .p2align 3
160 .L18:
161 movq 40(%r12), %rax
162 cmpq 48(%r12), %rax
163 jnb .L61
164 leaq 1(%rax), %rdx
165 movq %rdx, 40(%r12)
166 movb $10, (%rax)
167 movl (%r12), %r8d
168 andl $32768, %r8d
169 jne .L29
170 .L26:
171 movq 136(%r12), %rdi
172 movl 4(%rdi), %eax
173 subl $1, %eax
174 testl %eax, %eax
175 movl %eax, 4(%rdi)
176 jne .L1
177 movq $0, 8(%rdi)
178 #APP
179 # 73 "putgrent.c" 1
180 movl %fs:24,%edx
181 # 0 "" 2
182 #NO_APP
183 testl %edx, %edx
184 jne .L27
185 subl $1, (%rdi)
186 jmp .L1
187 .p2align 4,,10
188 .p2align 3
189 .L5:
190 movq __libc_errno@gottpoff(%rip), %rax
191 movl $-1, %r8d
192 movl $22, %fs:(%rax)
193 movl %r8d, %eax
194 popq %rbx
195 popq %rbp
196 popq %r12
197 popq %r13
198 popq %r14
200 .p2align 4,,10
201 .p2align 3
202 .L29:
203 xorl %r8d, %r8d
204 popq %rbx
205 movl %r8d, %eax
206 popq %rbp
207 popq %r12
208 popq %r13
209 popq %r14
211 .p2align 4,,10
212 .p2align 3
213 .L61:
214 movl $10, %esi
215 movq %r12, %rdi
216 call __GI___overflow
217 sarl $31, %eax
218 testl $32768, (%r12)
219 movl %eax, %r8d
220 jne .L1
221 jmp .L26
222 .L21:
223 #APP
224 # 66 "putgrent.c" 1
225 xchgl %eax, (%rdi)
226 # 0 "" 2
227 #NO_APP
228 cmpl $1, %eax
229 jle .L50
230 xorl %r10d, %r10d
231 movl $1, %edx
232 movl $129, %esi
233 movl $202, %eax
234 #APP
235 # 66 "putgrent.c" 1
236 syscall
238 # 0 "" 2
239 #NO_APP
240 movl $-1, %r8d
241 jmp .L1
242 .L8:
243 movl $1, %ecx
244 movl %edx, %eax
245 lock cmpxchgl %ecx, (%rdi)
246 je .L9
247 call __lll_lock_wait_private
248 jmp .L9
249 .L27:
250 #APP
251 # 73 "putgrent.c" 1
252 xchgl %eax, (%rdi)
253 # 0 "" 2
254 #NO_APP
255 cmpl $1, %eax
256 jle .L1
257 xorl %r10d, %r10d
258 movl $1, %edx
259 movl $129, %esi
260 movl $202, %eax
261 #APP
262 # 73 "putgrent.c" 1
263 syscall
265 # 0 "" 2
266 #NO_APP
267 jmp .L1
268 .LFE64:
269 .size putgrent, .-putgrent
270 .hidden __lll_lock_wait_private
271 .hidden __nss_valid_list_field
272 .hidden __nss_valid_field