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