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