clarify the purpose of this project
[nyanglibc.git] / nptl / pthread_getattr_np.shared.s
blob5b1e68103a204927be8cb67743e8c6e303cfe41e
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 .symver __pthread_getattr_np,pthread_getattr_np@@GLIBC_2.32
7 .symver __pthread_getattr_np_alias,pthread_getattr_np@GLIBC_2.2.5
8 .section .rodata.str1.1,"aMS",@progbits,1
9 .LC0:
10 .string "rce"
11 .LC1:
12 .string "/proc/self/maps"
13 .LC2:
14 .string "%lx-%lx"
15 #NO_APP
16 .text
17 .p2align 4,,15
18 .globl __pthread_getattr_np
19 .type __pthread_getattr_np, @function
20 __pthread_getattr_np:
21 pushq %r15
22 pushq %r14
23 pushq %r13
24 pushq %r12
25 movq %rdi, %r13
26 pushq %rbp
27 pushq %rbx
28 movq %rsi, %rdi
29 movq %rsi, %rbx
30 subq $120, %rsp
31 call __GI___pthread_attr_init
32 testl %eax, %eax
33 movl %eax, %ebp
34 jne .L1
35 #APP
36 # 44 "pthread_getattr_np.c" 1
37 movl %fs:24,%eax
38 # 0 "" 2
39 #NO_APP
40 leaq 1560(%r13), %rcx
41 testl %eax, %eax
42 movq %rcx, 8(%rsp)
43 jne .L3
44 movl %ebp, %eax
45 movl $1, %edx
46 #APP
47 # 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
48 cmpxchgl %edx, 1560(%r13)
49 # 0 "" 2
50 #NO_APP
51 .L4:
52 movl 1592(%r13), %eax
53 movl %eax, (%rbx)
54 movl 1596(%r13), %eax
55 cmpq %r13, 1576(%r13)
56 movl %eax, 4(%rbx)
57 movl 780(%r13), %eax
58 movl %eax, 8(%rbx)
59 je .L42
60 .L5:
61 movq 1704(%r13), %rax
62 movq %rax, 16(%rbx)
63 movq 1680(%r13), %rax
64 testq %rax, %rax
65 je .L6
66 movq 1688(%r13), %rdx
67 movq %rdx, %rcx
68 subq 1696(%r13), %rcx
69 orl $8, 8(%rbx)
70 addq %rdx, %rax
71 movq %rax, 24(%rbx)
72 movq %rcx, 32(%rbx)
73 .L7:
74 xorl %r15d, %r15d
75 movl $16, %r12d
76 jmp .L22
77 .p2align 4,,10
78 .p2align 3
79 .L43:
80 movq %rax, %rdx
81 movq %r12, %rsi
82 movq %r13, %rdi
83 call __GI___pthread_getaffinity_np
84 cmpl $22, %eax
85 movq %r14, %r15
86 jne .L31
87 cmpq $1048575, %r12
88 ja .L31
89 .L22:
90 addq %r12, %r12
91 movq %r15, %rdi
92 movq %r12, %rsi
93 call realloc@PLT
94 testq %rax, %rax
95 movq %rax, %r14
96 jne .L43
97 movl $12, %ebp
98 .L21:
99 movq %r15, %rdi
100 call free@PLT
101 .L20:
102 #APP
103 # 202 "pthread_getattr_np.c" 1
104 movl %fs:24,%eax
105 # 0 "" 2
106 #NO_APP
107 testl %eax, %eax
108 jne .L25
109 subl $1, 1560(%r13)
110 .L26:
111 testl %ebp, %ebp
112 je .L1
113 movq %rbx, %rdi
114 call __GI___pthread_attr_destroy
115 .L1:
116 addq $120, %rsp
117 movl %ebp, %eax
118 popq %rbx
119 popq %rbp
120 popq %r12
121 popq %r13
122 popq %r14
123 popq %r15
125 .p2align 4,,10
126 .p2align 3
127 .L3:
128 leaq 1560(%r13), %rcx
129 movl $1, %edx
130 movl %ebp, %eax
131 lock cmpxchgl %edx, (%rcx)
132 je .L4
133 movq %rcx, %rdi
134 call __lll_lock_wait_private
135 jmp .L4
136 .p2align 4,,10
137 .p2align 3
138 .L42:
139 orl $1, %eax
140 movl %eax, 8(%rbx)
141 jmp .L5
142 .p2align 4,,10
143 .p2align 3
144 .L31:
145 testl %eax, %eax
146 jne .L24
147 movq %r14, %rdx
148 movq %r12, %rsi
149 movq %rbx, %rdi
150 call __GI___pthread_attr_setaffinity_np
151 movq %r14, %r15
152 movl %eax, %ebp
153 jmp .L21
154 .p2align 4,,10
155 .p2align 3
156 .L6:
157 leaq .LC0(%rip), %rsi
158 leaq .LC1(%rip), %rdi
159 call _IO_new_fopen@PLT
160 testq %rax, %rax
161 movq %rax, %r14
162 je .L44
163 leaq 96(%rsp), %rsi
164 movl $3, %edi
165 call __GI___getrlimit
166 testl %eax, %eax
167 je .L10
168 movq __libc_errno@gottpoff(%rip), %rax
169 movl %fs:(%rax), %r12d
170 .L11:
171 movq %r14, %rdi
172 call _IO_new_fclose@PLT
173 .L9:
174 orl $8, 8(%rbx)
175 testl %r12d, %r12d
176 je .L7
177 movl %r12d, %ebp
178 jmp .L20
179 .p2align 4,,10
180 .p2align 3
181 .L25:
182 xorl %eax, %eax
183 #APP
184 # 202 "pthread_getattr_np.c" 1
185 xchgl %eax, 1560(%r13)
186 # 0 "" 2
187 #NO_APP
188 cmpl $1, %eax
189 jle .L26
190 xorl %r10d, %r10d
191 movl $1, %edx
192 movl $129, %esi
193 movq 8(%rsp), %rdi
194 movl $202, %eax
195 #APP
196 # 202 "pthread_getattr_np.c" 1
197 syscall
199 # 0 "" 2
200 #NO_APP
201 jmp .L26
202 .p2align 4,,10
203 .p2align 3
204 .L44:
205 movq __libc_errno@gottpoff(%rip), %rax
206 movl %fs:(%rax), %r12d
207 jmp .L9
208 .p2align 4,,10
209 .p2align 3
210 .L24:
211 cmpl $38, %eax
212 movq %r14, %r15
213 cmovne %eax, %ebp
214 jmp .L21
215 .L10:
216 movq _rtld_global_ro@GOTPCREL(%rip), %rax
217 movl (%r14), %r12d
218 leaq 64(%rsp), %rdx
219 leaq 80(%rsp), %rcx
220 movl %ebp, 28(%rsp)
221 movq %r13, 32(%rsp)
222 movq %rbx, 40(%rsp)
223 movq $0, 16(%rsp)
224 leaq 72(%rsp), %r15
225 movq 24(%rax), %rax
226 orl $32768, %r12d
227 movq %rdx, %rbx
228 movq %rcx, %r13
229 movq %rax, 48(%rsp)
230 movq __libc_stack_end@GOTPCREL(%rip), %rax
231 movq (%rax), %rax
232 movl %r12d, (%r14)
233 movq $0, 64(%rsp)
234 movq $0, 72(%rsp)
235 movq %rax, 56(%rsp)
236 leaq 88(%rsp), %rax
237 movq %rax, %rbp
238 jmp .L12
239 .p2align 4,,10
240 .p2align 3
241 .L19:
242 movq %r14, %rdx
243 movq %r15, %rsi
244 movq %rbx, %rdi
245 call __getline
246 testq %rax, %rax
247 jle .L40
248 movq 64(%rsp), %rdi
249 leaq .LC2(%rip), %rsi
250 xorl %eax, %eax
251 movq %rbp, %rcx
252 movq %r13, %rdx
253 call __GI___isoc99_sscanf
254 cmpl $2, %eax
255 jne .L15
256 movq __libc_stack_end@GOTPCREL(%rip), %rax
257 movq (%rax), %rdx
258 cmpq %rdx, 80(%rsp)
259 movq 88(%rsp), %rax
260 ja .L16
261 cmpq %rax, %rdx
262 jb .L45
263 .L16:
264 movq %rax, 16(%rsp)
265 .L15:
266 movl (%r14), %r12d
267 .L12:
268 andl $16, %r12d
269 je .L19
270 .L40:
271 movl 28(%rsp), %ebp
272 movq 32(%rsp), %r13
273 movl $2, %r12d
274 movq 40(%rsp), %rbx
275 .L18:
276 movq 64(%rsp), %rdi
277 call free@PLT
278 jmp .L11
279 .L45:
280 movq 48(%rsp), %rcx
281 movq 56(%rsp), %rdx
282 movq 40(%rsp), %rbx
283 movl 28(%rsp), %ebp
284 movq 32(%rsp), %r13
285 movq %rcx, %rsi
286 negq %rsi
287 andq %rsi, %rdx
288 addq %rcx, %rdx
289 movq 96(%rsp), %rcx
290 movq %rdx, 24(%rbx)
291 addq %rdx, %rcx
292 subq 16(%rsp), %rdx
293 subq %rax, %rcx
294 movq %rcx, %rax
295 andq %rsi, %rax
296 cmpq %rdx, %rax
297 cmovbe %rax, %rdx
298 movq %rdx, 32(%rbx)
299 jmp .L18
300 .size __pthread_getattr_np, .-__pthread_getattr_np
301 .globl __pthread_getattr_np_alias
302 .set __pthread_getattr_np_alias,__pthread_getattr_np
303 .hidden __getline
304 .hidden __lll_lock_wait_private