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