Some broken software wants to deal with ld.so.cache.
[nyanglibc.git] / rt / aio_misc.s
blob199d3ea2b1e161ee96cf364fac5e6fbbc6cbd0da
1 .text
2 .p2align 4,,15
3 .type add_request_to_runlist, @function
4 add_request_to_runlist:
5 movq runlist(%rip), %rdx
6 testq %rdx, %rdx
7 je .L2
8 movq 40(%rdi), %rax
9 movl 104(%rax), %esi
10 movq 40(%rdx), %rax
11 cmpl %esi, 104(%rax)
12 jge .L3
13 .L2:
14 movq %rdx, 32(%rdi)
15 movq %rdi, runlist(%rip)
16 ret
17 .p2align 4,,10
18 .p2align 3
19 .L15:
20 movq 40(%rax), %rcx
21 cmpl %esi, 104(%rcx)
22 jl .L5
23 movq %rax, %rdx
24 .L3:
25 movq 32(%rdx), %rax
26 testq %rax, %rax
27 jne .L15
28 .L5:
29 movq %rax, 32(%rdi)
30 movq %rdi, 32(%rdx)
31 ret
32 .size add_request_to_runlist, .-add_request_to_runlist
33 .section __libc_freeres_fn,"ax",@progbits
34 .p2align 4,,15
35 .type free_res, @function
36 free_res:
37 movq pool_max_size(%rip), %rax
38 pushq %r12
39 movq pool(%rip), %r12
40 pushq %rbp
41 pushq %rbx
42 testq %rax, %rax
43 je .L17
44 leaq (%r12,%rax,8), %rbp
45 movq %r12, %rbx
46 .p2align 4,,10
47 .p2align 3
48 .L18:
49 movq (%rbx), %rdi
50 addq $8, %rbx
51 call free@PLT
52 cmpq %rbp, %rbx
53 jne .L18
54 .L17:
55 popq %rbx
56 movq %r12, %rdi
57 popq %rbp
58 popq %r12
59 jmp free@PLT
60 .size free_res, .-free_res
61 .text
62 .p2align 4,,15
63 .globl __aio_free_request
64 .type __aio_free_request, @function
65 __aio_free_request:
66 movq freelist(%rip), %rax
67 movl $0, (%rdi)
68 movq %rdi, freelist(%rip)
69 movq %rax, 24(%rdi)
70 ret
71 .size __aio_free_request, .-__aio_free_request
72 .p2align 4,,15
73 .globl __aio_find_req
74 .type __aio_find_req, @function
75 __aio_find_req:
76 movq requests(%rip), %rax
77 movl (%rdi), %esi
78 testq %rax, %rax
79 jne .L42
80 jmp .L25
81 .p2align 4,,10
82 .p2align 3
83 .L43:
84 movq 16(%rax), %rax
85 testq %rax, %rax
86 je .L25
87 .L42:
88 movq 40(%rax), %rdx
89 movl (%rdx), %ecx
90 cmpl %esi, %ecx
91 jl .L43
92 cmpl %ecx, %esi
93 je .L30
94 jmp .L44
95 .p2align 4,,10
96 .p2align 3
97 .L46:
98 movq 40(%rax), %rdx
99 .L30:
100 cmpq %rdx, %rdi
101 je .L45
102 movq 24(%rax), %rax
103 testq %rax, %rax
104 jne .L46
105 .L25:
106 rep ret
107 .p2align 4,,10
108 .p2align 3
109 .L45:
110 rep ret
111 .p2align 4,,10
112 .p2align 3
113 .L44:
114 xorl %eax, %eax
116 .size __aio_find_req, .-__aio_find_req
117 .p2align 4,,15
118 .globl __aio_find_req_fd
119 .type __aio_find_req_fd, @function
120 __aio_find_req_fd:
121 movq requests(%rip), %rax
122 testq %rax, %rax
123 je .L47
124 movq 40(%rax), %rdx
125 movl (%rdx), %edx
126 cmpl %edx, %edi
127 jg .L50
128 jmp .L49
129 .p2align 4,,10
130 .p2align 3
131 .L59:
132 movq 40(%rax), %rdx
133 movl (%rdx), %edx
134 cmpl %edi, %edx
135 jge .L49
136 .L50:
137 movq 16(%rax), %rax
138 testq %rax, %rax
139 jne .L59
140 .L47:
141 rep ret
142 .p2align 4,,10
143 .p2align 3
144 .L49:
145 cmpl %edx, %edi
146 movl $0, %edx
147 cmovne %rdx, %rax
149 .size __aio_find_req_fd, .-__aio_find_req_fd
150 .section .rodata.str1.1,"aMS",@progbits,1
151 .LC0:
152 .string "../sysdeps/pthread/aio_misc.c"
153 .section .rodata.str1.8,"aMS",@progbits,1
154 .align 8
155 .LC1:
156 .string "req->running == yes || req->running == queued || req->running == done"
157 .text
158 .p2align 4,,15
159 .globl __aio_remove_request
160 .type __aio_remove_request, @function
161 __aio_remove_request:
162 movl (%rsi), %eax
163 leal -1(%rax), %ecx
164 cmpl $1, %ecx
165 jbe .L61
166 cmpl $4, %eax
167 jne .L90
168 .L61:
169 testq %rdi, %rdi
170 je .L62
171 xorl %eax, %eax
172 testl %edx, %edx
173 jne .L63
174 movq 24(%rsi), %rax
175 .L63:
176 movq %rax, 24(%rdi)
178 .p2align 4,,10
179 .p2align 3
180 .L62:
181 testl %edx, %edx
182 movq 8(%rsi), %rcx
183 jne .L65
184 movq 24(%rsi), %rdx
185 testq %rdx, %rdx
186 je .L65
187 testq %rcx, %rcx
188 je .L70
189 movq %rdx, 16(%rcx)
190 .L71:
191 movq 16(%rsi), %rax
192 testq %rax, %rax
193 je .L72
194 movq %rdx, 8(%rax)
195 movq 8(%rsi), %rcx
196 .L72:
197 movq %rax, 16(%rdx)
198 movl $2, (%rdx)
199 movl (%rsi), %eax
200 movq %rcx, 8(%rdx)
201 cmpl $2, %eax
202 je .L91
203 .L60:
204 rep ret
205 .p2align 4,,10
206 .p2align 3
207 .L65:
208 testq %rcx, %rcx
209 movq 16(%rsi), %rdx
210 je .L67
211 movq %rdx, 16(%rcx)
212 movq 16(%rsi), %rdx
213 .L68:
214 testq %rdx, %rdx
215 je .L69
216 movq %rcx, 8(%rdx)
217 .L69:
218 cmpl $2, %eax
219 jne .L60
220 .L91:
221 movq runlist(%rip), %rdx
222 testq %rdx, %rdx
223 je .L60
224 cmpq %rdx, %rsi
225 jne .L73
226 jmp .L92
227 .p2align 4,,10
228 .p2align 3
229 .L74:
230 cmpq %rax, %rsi
231 je .L93
232 movq %rax, %rdx
233 .L73:
234 movq 32(%rdx), %rax
235 testq %rax, %rax
236 jne .L74
237 rep ret
238 .p2align 4,,10
239 .p2align 3
240 .L67:
241 movq %rdx, requests(%rip)
242 jmp .L68
243 .L90:
244 leaq __PRETTY_FUNCTION__.9979(%rip), %rcx
245 leaq .LC0(%rip), %rsi
246 leaq .LC1(%rip), %rdi
247 subq $8, %rsp
248 movl $210, %edx
249 call __assert_fail@PLT
250 .p2align 4,,10
251 .p2align 3
252 .L93:
253 movq 32(%rsi), %rax
254 movq %rax, 32(%rdx)
256 .p2align 4,,10
257 .p2align 3
258 .L70:
259 movq %rdx, requests(%rip)
260 jmp .L71
261 .L92:
262 movq 32(%rsi), %rax
263 movq %rax, runlist(%rip)
265 .size __aio_remove_request, .-__aio_remove_request
266 .section .rodata.str1.1
267 .LC2:
268 .string "runp->running == allocated"
269 .LC3:
270 .string "runp->running == yes"
271 .text
272 .p2align 4,,15
273 .type handle_fildes_io, @function
274 handle_fildes_io:
275 pushq %r15
276 pushq %r14
277 pushq %r13
278 pushq %r12
279 leaq __aio_requests_mutex(%rip), %r12
280 pushq %rbp
281 pushq %rbx
282 movq %rdi, %rbx
283 subq $136, %rsp
284 leaq 40(%rsp), %r14
285 call pthread_self@PLT
286 leaq 44(%rsp), %rsi
287 movq %r14, %rdx
288 movq %rax, %rdi
289 movq %rax, %r13
290 call pthread_getschedparam@PLT
291 leaq 48(%rsp), %rax
292 testq %rbx, %rbx
293 movq %rax, 8(%rsp)
294 leaq 64(%rsp), %rax
295 movq %rax, 16(%rsp)
296 je .L163
297 .p2align 4,,10
298 .p2align 3
299 .L95:
300 cmpl $3, (%rbx)
301 jne .L164
302 movq 40(%rbx), %r15
303 movl 104(%r15), %eax
304 cmpl 40(%rsp), %eax
305 movl (%r15), %ebp
306 movl 108(%r15), %esi
307 jne .L98
308 cmpl %esi, 44(%rsp)
309 je .L99
310 .L98:
311 movq %r14, %rdx
312 movq %r13, %rdi
313 movl %eax, 40(%rsp)
314 movl %esi, 44(%rsp)
315 call pthread_setschedparam@PLT
316 .L99:
317 movl 4(%r15), %eax
318 movl %eax, %edx
319 andl $127, %edx
320 je .L102
321 cmpl $1, %edx
322 je .L109
323 cmpl $3, %eax
324 je .L115
325 cmpl $4, %eax
326 je .L118
327 movq errno@gottpoff(%rip), %rax
328 movq $-1, 120(%r15)
329 movl $22, %fs:(%rax)
330 .L106:
331 movq %r12, %rdi
332 call pthread_mutex_lock@PLT
333 cmpq $-1, 120(%r15)
334 je .L165
335 .L119:
336 movl $0, 112(%r15)
337 .L120:
338 movq %rbx, %rdi
339 call __aio_notify@PLT
340 cmpl $3, (%rbx)
341 jne .L166
342 xorl %edi, %edi
343 xorl %edx, %edx
344 movl $4, (%rbx)
345 movq %rbx, %rsi
346 call __aio_remove_request
347 movq 24(%rbx), %rdi
348 testq %rdi, %rdi
349 je .L122
350 call add_request_to_runlist
351 .L122:
352 movq freelist(%rip), %rax
353 movl $0, (%rbx)
354 movq %rbx, freelist(%rip)
355 movq %rax, 24(%rbx)
356 movq runlist(%rip), %rbx
357 testq %rbx, %rbx
358 je .L167
359 .L123:
360 cmpl $2, (%rbx)
361 jne .L168
362 movq 32(%rbx), %rax
363 movl $3, (%rbx)
364 testq %rax, %rax
365 movq %rax, runlist(%rip)
366 je .L129
367 movl idle_thread_count(%rip), %eax
368 testl %eax, %eax
369 jg .L169
370 movl nthreads(%rip), %eax
371 cmpl %eax, optim(%rip)
372 jg .L170
373 .L129:
374 movq %r12, %rdi
375 call pthread_mutex_unlock@PLT
376 testq %rbx, %rbx
377 jne .L95
378 .L163:
379 movq %r12, %rdi
380 call pthread_mutex_lock@PLT
381 movq runlist(%rip), %rbx
382 testq %rbx, %rbx
383 jne .L123
384 .p2align 4,,10
385 .p2align 3
386 .L167:
387 movl 24+optim(%rip), %edx
388 testl %edx, %edx
389 js .L127
390 movq 8(%rsp), %rsi
391 xorl %edi, %edi
392 addl $1, idle_thread_count(%rip)
393 call __clock_gettime@PLT
394 movslq 24+optim(%rip), %rax
395 addq 48(%rsp), %rax
396 movq 56(%rsp), %rdx
397 cmpq $999999999, %rdx
398 movq %rax, 64(%rsp)
399 jg .L125
400 movq %rdx, 72(%rsp)
401 .L126:
402 movq 16(%rsp), %rdx
403 leaq __aio_new_request_notification(%rip), %rdi
404 movq %r12, %rsi
405 call pthread_cond_timedwait@PLT
406 movq runlist(%rip), %rbx
407 subl $1, idle_thread_count(%rip)
408 testq %rbx, %rbx
409 jne .L123
410 .L127:
411 leaq __aio_requests_mutex(%rip), %rdi
412 subl $1, nthreads(%rip)
413 call pthread_mutex_unlock@PLT
414 addq $136, %rsp
415 xorl %eax, %eax
416 popq %rbx
417 popq %rbp
418 popq %r12
419 popq %r13
420 popq %r14
421 popq %r15
423 .p2align 4,,10
424 .p2align 3
425 .L172:
426 movq errno@gottpoff(%rip), %rcx
427 movl %fs:(%rcx), %edx
428 cmpl $4, %edx
429 jne .L171
430 .L102:
431 movq 128(%r15), %rcx
432 movq 24(%r15), %rdx
433 movl %ebp, %edi
434 movq 16(%r15), %rsi
435 call __libc_pread@PLT
436 cmpq $-1, %rax
437 je .L172
438 .L108:
439 movq %rax, 120(%r15)
440 .L176:
441 movq %r12, %rdi
442 call pthread_mutex_lock@PLT
443 cmpq $-1, 120(%r15)
444 jne .L119
445 .L165:
446 movq errno@gottpoff(%rip), %rax
447 movl %fs:(%rax), %eax
448 movl %eax, 112(%r15)
449 jmp .L120
450 .p2align 4,,10
451 .p2align 3
452 .L174:
453 movq errno@gottpoff(%rip), %rcx
454 movl %fs:(%rcx), %edx
455 cmpl $4, %edx
456 jne .L173
457 .L109:
458 movq 128(%r15), %rcx
459 movq 24(%r15), %rdx
460 movl %ebp, %edi
461 movq 16(%r15), %rsi
462 call __libc_pwrite@PLT
463 cmpq $-1, %rax
464 je .L174
465 jmp .L108
466 .p2align 4,,10
467 .p2align 3
468 .L175:
469 movq errno@gottpoff(%rip), %rdx
470 cmpl $4, %fs:(%rdx)
471 jne .L108
472 .L115:
473 movl %ebp, %edi
474 call fdatasync@PLT
475 cltq
476 cmpq $-1, %rax
477 je .L175
478 movq %rax, 120(%r15)
479 jmp .L176
480 .p2align 4,,10
481 .p2align 3
482 .L177:
483 movq errno@gottpoff(%rip), %rdx
484 cmpl $4, %fs:(%rdx)
485 jne .L108
486 .L118:
487 movl %ebp, %edi
488 call fsync@PLT
489 cltq
490 cmpq $-1, %rax
491 je .L177
492 movq %rax, 120(%r15)
493 jmp .L176
494 .p2align 4,,10
495 .p2align 3
496 .L169:
497 leaq __aio_new_request_notification(%rip), %rdi
498 call pthread_cond_signal@PLT
499 jmp .L129
500 .p2align 4,,10
501 .p2align 3
502 .L171:
503 cmpl $29, %edx
504 movq %rax, 120(%r15)
505 jne .L106
506 jmp .L105
507 .p2align 4,,10
508 .p2align 3
509 .L178:
510 movq 24(%rsp), %rcx
511 cmpl $4, %fs:(%rcx)
512 jne .L108
513 .L105:
514 movq 24(%r15), %rdx
515 movq 16(%r15), %rsi
516 movl %ebp, %edi
517 movq %rcx, 24(%rsp)
518 call read@PLT
519 cmpq $-1, %rax
520 je .L178
521 movq %rax, 120(%r15)
522 jmp .L176
523 .p2align 4,,10
524 .p2align 3
525 .L125:
526 subq $1000000000, %rdx
527 addq $1, %rax
528 movq %rdx, 72(%rsp)
529 movq %rax, 64(%rsp)
530 jmp .L126
531 .p2align 4,,10
532 .p2align 3
533 .L170:
534 movq 16(%rsp), %r15
535 movq %r15, %rdi
536 call pthread_attr_init@PLT
537 movl $1, %esi
538 movq %r15, %rdi
539 call pthread_attr_setdetachstate@PLT
540 movq 8(%rsp), %rdi
541 leaq handle_fildes_io(%rip), %rdx
542 xorl %ecx, %ecx
543 movq %r15, %rsi
544 call pthread_create@PLT
545 testl %eax, %eax
546 jne .L129
547 addl $1, nthreads(%rip)
548 jmp .L129
549 .p2align 4,,10
550 .p2align 3
551 .L173:
552 cmpl $29, %edx
553 movq %rax, 120(%r15)
554 jne .L106
555 jmp .L112
556 .p2align 4,,10
557 .p2align 3
558 .L179:
559 movq 24(%rsp), %rcx
560 cmpl $4, %fs:(%rcx)
561 jne .L108
562 .L112:
563 movq 24(%r15), %rdx
564 movq 16(%r15), %rsi
565 movl %ebp, %edi
566 movq %rcx, 24(%rsp)
567 call write@PLT
568 cmpq $-1, %rax
569 je .L179
570 movq %rax, 120(%r15)
571 jmp .L176
572 .L164:
573 leaq __PRETTY_FUNCTION__.10019(%rip), %rcx
574 leaq .LC0(%rip), %rsi
575 leaq .LC2(%rip), %rdi
576 movl $502, %edx
577 call __assert_fail@PLT
578 .L166:
579 leaq __PRETTY_FUNCTION__.10019(%rip), %rcx
580 leaq .LC0(%rip), %rsi
581 leaq .LC2(%rip), %rdi
582 movl $599, %edx
583 call __assert_fail@PLT
584 .L168:
585 leaq __PRETTY_FUNCTION__.10019(%rip), %rcx
586 leaq .LC0(%rip), %rsi
587 leaq .LC3(%rip), %rdi
588 movl $640, %edx
589 call __assert_fail@PLT
590 .size handle_fildes_io, .-handle_fildes_io
591 .p2align 4,,15
592 .globl __aio_init
593 .type __aio_init, @function
594 __aio_init:
595 pushq %rbx
596 movq %rdi, %rbx
597 leaq __aio_requests_mutex(%rip), %rdi
598 call pthread_mutex_lock@PLT
599 cmpq $0, pool(%rip)
600 je .L189
601 .L181:
602 movl 24(%rbx), %eax
603 testl %eax, %eax
604 je .L183
605 movl %eax, 24+optim(%rip)
606 .L183:
607 popq %rbx
608 leaq __aio_requests_mutex(%rip), %rdi
609 jmp pthread_mutex_unlock@PLT
610 .p2align 4,,10
611 .p2align 3
612 .L189:
613 movl (%rbx), %eax
614 movl 4(%rbx), %edx
615 testl %eax, %eax
616 movl $1, %eax
617 cmovg (%rbx), %eax
618 movl %eax, optim(%rip)
619 movl %edx, %eax
620 andl $-32, %eax
621 cmpl $31, %edx
622 movl $32, %edx
623 cmovle %edx, %eax
624 movl %eax, 4+optim(%rip)
625 jmp .L181
626 .size __aio_init, .-__aio_init
627 .weak aio_init
628 .set aio_init,__aio_init
629 .p2align 4,,15
630 .globl __aio_enqueue_request
631 .type __aio_enqueue_request, @function
632 __aio_enqueue_request:
633 pushq %r15
634 leal -3(%rsi), %eax
635 pushq %r14
636 pushq %r13
637 pushq %r12
638 pushq %rbp
639 pushq %rbx
640 subq $376, %rsp
641 cmpl $1, %eax
642 jbe .L239
643 cmpl $20, 8(%rdi)
644 ja .L240
645 .L192:
646 movq %rdi, %r13
647 movl %esi, 4(%rsp)
648 call pthread_self@PLT
649 leaq 36(%rsp), %rdx
650 leaq 32(%rsp), %rsi
651 movq %rax, %rdi
652 call pthread_getschedparam@PLT
653 movl 36(%rsp), %ecx
654 subl 8(%r13), %ecx
655 leaq __aio_requests_mutex(%rip), %rdi
656 movl %ecx, %r14d
657 call pthread_mutex_lock@PLT
658 movq requests(%rip), %r8
659 testq %r8, %r8
660 je .L213
661 movq 40(%r8), %rax
662 movl 0(%r13), %edx
663 cmpl (%rax), %edx
664 jle .L214
665 movq %r8, %r12
666 jmp .L195
667 .p2align 4,,10
668 .p2align 3
669 .L241:
670 movq 40(%rbx), %rax
671 cmpl %edx, (%rax)
672 jge .L194
673 movq %rbx, %r12
674 .L195:
675 movq 16(%r12), %rbx
676 testq %rbx, %rbx
677 jne .L241
678 .L194:
679 movq freelist(%rip), %rbp
680 testq %rbp, %rbp
681 je .L242
682 .L196:
683 movq 24(%rbp), %rax
684 movq %r13, 40(%rbp)
685 testq %rbx, %rbx
686 movq $0, 48(%rbp)
687 movl %r14d, 104(%r13)
688 movl $115, 112(%r13)
689 movq $0, 120(%r13)
690 movq %rax, freelist(%rip)
691 movl 32(%rsp), %eax
692 movl %eax, 108(%r13)
693 movl 4(%rsp), %eax
694 movl %eax, 4(%r13)
695 je .L202
696 movq 40(%rbx), %rax
697 movl 0(%r13), %ecx
698 cmpl %ecx, (%rax)
699 je .L204
700 .L202:
701 testq %r12, %r12
702 je .L243
703 movq 16(%r12), %rax
704 movq %r12, 8(%rbp)
705 movq %rax, 16(%rbp)
706 movq %rbp, 16(%r12)
707 movq 16(%rbp), %rax
708 testq %rax, %rax
709 je .L208
710 movq %rbp, 8(%rax)
711 .L208:
712 movl nthreads(%rip), %eax
713 cmpl %eax, optim(%rip)
714 movq $0, 24(%rbp)
715 movl idle_thread_count(%rip), %r8d
716 jg .L244
717 .L209:
718 movq %rbp, %rdi
719 movl $2, %ebx
720 call add_request_to_runlist
721 testl %r8d, %r8d
722 jg .L245
723 .L205:
724 movl %ebx, 0(%rbp)
725 .L212:
726 leaq __aio_requests_mutex(%rip), %rdi
727 call pthread_mutex_unlock@PLT
728 .L190:
729 addq $376, %rsp
730 movq %rbp, %rax
731 popq %rbx
732 popq %rbp
733 popq %r12
734 popq %r13
735 popq %r14
736 popq %r15
738 .p2align 4,,10
739 .p2align 3
740 .L246:
741 movq 40(%rax), %rdx
742 cmpl %r14d, 104(%rdx)
743 jl .L203
744 movq %rax, %rbx
745 .L204:
746 movq 24(%rbx), %rax
747 testq %rax, %rax
748 jne .L246
749 .L203:
750 movq %rax, 24(%rbp)
751 movq %rbp, 24(%rbx)
752 movl $1, %ebx
753 jmp .L205
754 .p2align 4,,10
755 .p2align 3
756 .L243:
757 testq %r8, %r8
758 movq $0, 8(%rbp)
759 movq %r8, 16(%rbp)
760 je .L207
761 movq %rbp, 8(%r8)
762 .L207:
763 movq %rbp, requests(%rip)
764 jmp .L208
765 .p2align 4,,10
766 .p2align 3
767 .L239:
768 movl $0, 8(%rdi)
769 jmp .L192
770 .p2align 4,,10
771 .p2align 3
772 .L244:
773 testl %r8d, %r8d
774 jne .L209
775 leaq 48(%rsp), %r12
776 movl $3, 0(%rbp)
777 leaq 112(%rsp), %rbx
778 leaq 240(%rsp), %r15
779 movl $14, %r14d
780 movq %r12, %rdi
781 call pthread_attr_init@PLT
782 movl $1, %esi
783 movq %r12, %rdi
784 call pthread_attr_setdetachstate@PLT
785 movq %r12, %rdi
786 call __pthread_get_minstack@PLT
787 movq %r12, %rdi
788 movq %rax, %rsi
789 call pthread_attr_setstacksize@PLT
790 movq %rbx, %rdi
791 call sigfillset@PLT
792 movl $8, %r10d
793 movq %r15, %rdx
794 movq %rbx, %rsi
795 movl $2, %edi
796 movl %r14d, %eax
797 #APP
798 # 56 "../sysdeps/unix/sysv/linux/aio_misc.h" 1
799 syscall
801 # 0 "" 2
802 #NO_APP
803 leaq handle_fildes_io(%rip), %rdx
804 leaq 40(%rsp), %rdi
805 movq %r12, %rsi
806 movq %rbp, %rcx
807 call pthread_create@PLT
808 movl $8, %r10d
809 movl %eax, %ebx
810 xorl %edx, %edx
811 movq %r15, %rsi
812 movl $2, %edi
813 movl %r14d, %eax
814 #APP
815 # 62 "../sysdeps/unix/sysv/linux/aio_misc.h" 1
816 syscall
818 # 0 "" 2
819 #NO_APP
820 movq %r12, %rdi
821 call pthread_attr_destroy@PLT
822 testl %ebx, %ebx
823 jne .L210
824 addl $1, nthreads(%rip)
825 movl $3, %ebx
826 jmp .L205
827 .p2align 4,,10
828 .p2align 3
829 .L242:
830 movq pool_size(%rip), %rdx
831 movq pool_max_size(%rip), %rax
832 leaq 1(%rdx), %r9
833 cmpq %rax, %r9
834 jnb .L247
835 .L197:
836 testq %rdx, %rdx
837 je .L248
838 movl $32, %edi
839 movl $32, %r15d
840 .L199:
841 movl $56, %esi
842 movq %r9, 24(%rsp)
843 movq %rdx, 16(%rsp)
844 movq %r8, 8(%rsp)
845 call calloc@PLT
846 testq %rax, %rax
847 je .L198
848 movq 16(%rsp), %rdx
849 movq 24(%rsp), %r9
850 movq %rax, %rbp
851 movq pool(%rip), %rsi
852 movq 8(%rsp), %r8
853 movq %r9, pool_size(%rip)
854 movq %rax, (%rsi,%rdx,8)
855 xorl %edx, %edx
856 jmp .L200
857 .p2align 4,,10
858 .p2align 3
859 .L217:
860 movq %rax, %rbp
861 .L200:
862 subl $1, %r15d
863 movq %rdx, 24(%rbp)
864 leaq 56(%rbp), %rax
865 testl %r15d, %r15d
866 movq %rbp, %rdx
867 jg .L217
868 jmp .L196
869 .p2align 4,,10
870 .p2align 3
871 .L245:
872 leaq __aio_new_request_notification(%rip), %rdi
873 call pthread_cond_signal@PLT
874 jmp .L205
875 .p2align 4,,10
876 .p2align 3
877 .L248:
878 movslq 4+optim(%rip), %rdi
879 movq %rdi, %r15
880 jmp .L199
881 .p2align 4,,10
882 .p2align 3
883 .L247:
884 leaq 8(%rax), %r15
885 movq pool(%rip), %rdi
886 movq %r9, 24(%rsp)
887 movq %rdx, 16(%rsp)
888 movq %r8, 8(%rsp)
889 leaq 0(,%r15,8), %rsi
890 call realloc@PLT
891 testq %rax, %rax
892 je .L198
893 movq %r15, pool_max_size(%rip)
894 movq %rax, pool(%rip)
895 movq 24(%rsp), %r9
896 movq 16(%rsp), %rdx
897 movq 8(%rsp), %r8
898 jmp .L197
899 .p2align 4,,10
900 .p2align 3
901 .L213:
902 xorl %r12d, %r12d
903 xorl %ebx, %ebx
904 jmp .L194
905 .p2align 4,,10
906 .p2align 3
907 .L214:
908 movq %r8, %rbx
909 xorl %r12d, %r12d
910 jmp .L194
911 .p2align 4,,10
912 .p2align 3
913 .L210:
914 movl nthreads(%rip), %eax
915 movl $2, 0(%rbp)
916 testl %eax, %eax
917 je .L211
918 movl idle_thread_count(%rip), %r8d
919 jmp .L209
920 .p2align 4,,10
921 .p2align 3
922 .L211:
923 movq %rbp, %rsi
924 xorl %edx, %edx
925 xorl %edi, %edi
926 call __aio_remove_request
927 movq freelist(%rip), %rax
928 movl $0, 0(%rbp)
929 movq %rbp, freelist(%rip)
930 movq %rax, 24(%rbp)
931 movq errno@gottpoff(%rip), %rax
932 xorl %ebp, %ebp
933 movl %ebx, 112(%r13)
934 movl %ebx, %fs:(%rax)
935 jmp .L212
936 .p2align 4,,10
937 .p2align 3
938 .L240:
939 movq errno@gottpoff(%rip), %rax
940 movl $22, 112(%rdi)
941 xorl %ebp, %ebp
942 movq $-1, 120(%rdi)
943 movl $22, %fs:(%rax)
944 jmp .L190
945 .L198:
946 leaq __aio_requests_mutex(%rip), %rdi
947 call pthread_mutex_unlock@PLT
948 movq errno@gottpoff(%rip), %rax
949 movl $11, %fs:(%rax)
950 jmp .L190
951 .size __aio_enqueue_request, .-__aio_enqueue_request
952 .section .rodata.str1.16,"aMS",@progbits,1
953 .align 16
954 .type __PRETTY_FUNCTION__.10019, @object
955 .size __PRETTY_FUNCTION__.10019, 17
956 __PRETTY_FUNCTION__.10019:
957 .string "handle_fildes_io"
958 .align 16
959 .type __PRETTY_FUNCTION__.9979, @object
960 .size __PRETTY_FUNCTION__.9979, 21
961 __PRETTY_FUNCTION__.9979:
962 .string "__aio_remove_request"
963 .section __libc_subfreeres,"aw",@progbits
964 .align 8
965 .type __elf_set___libc_subfreeres_element_free_res__, @object
966 .size __elf_set___libc_subfreeres_element_free_res__, 8
967 __elf_set___libc_subfreeres_element_free_res__:
968 .quad free_res
969 .globl __aio_new_request_notification
970 .bss
971 .align 32
972 .type __aio_new_request_notification, @object
973 .size __aio_new_request_notification, 48
974 __aio_new_request_notification:
975 .zero 48
976 .globl __aio_requests_mutex
977 .data
978 .align 32
979 .type __aio_requests_mutex, @object
980 .size __aio_requests_mutex, 40
981 __aio_requests_mutex:
982 .long 0
983 .long 0
984 .long 0
985 .long 0
986 .long 1
987 .value 0
988 .value 0
989 .quad 0
990 .quad 0
991 .align 32
992 .type optim, @object
993 .size optim, 32
994 optim:
995 .long 20
996 .long 64
997 .long 0
998 .long 0
999 .long 0
1000 .long 0
1001 .long 1
1002 .long 0
1003 .local idle_thread_count
1004 .comm idle_thread_count,4,4
1005 .local nthreads
1006 .comm nthreads,4,4
1007 .local requests
1008 .comm requests,8,8
1009 .local runlist
1010 .comm runlist,8,8
1011 .local freelist
1012 .comm freelist,8,8
1013 .local pool_size
1014 .comm pool_size,8,8
1015 .local pool_max_size
1016 .comm pool_max_size,8,8
1017 .local pool
1018 .comm pool,8,8