clarify the purpose of this project
[nyanglibc.git] / nptl / pthread_cond_wait.shared.s
blob3035ccde569592cb29113daefe15f5178a06fd00
1 .text
2 #APP
3 .symver __pthread_cond_wait,pthread_cond_wait@@GLIBC_2.3.2
4 .symver __pthread_cond_timedwait,pthread_cond_timedwait@@GLIBC_2.3.2
5 .section .rodata.str1.8,"aMS",@progbits,1
6 .align 8
7 .LC0:
8 .string "The futex facility returned an unexpected error code.\n"
9 #NO_APP
10 .text
11 .p2align 4,,15
12 .type __condvar_confirm_wakeup, @function
13 __condvar_confirm_wakeup:
14 addq $36, %rdi
15 movl $-8, %eax
16 lock xaddl %eax, (%rdi)
17 shrl $2, %eax
18 cmpl $3, %eax
19 je .L9
20 .L1:
21 rep ret
22 .p2align 4,,10
23 .p2align 3
24 .L9:
25 xorb $-127, %sil
26 xorl %r10d, %r10d
27 movl $2147483647, %edx
28 movl $202, %eax
29 #APP
30 # 209 "../sysdeps/nptl/futex-internal.h" 1
31 syscall
33 # 0 "" 2
34 #NO_APP
35 cmpq $-4096, %rax
36 jbe .L1
37 cmpl $-22, %eax
38 je .L1
39 cmpl $-14, %eax
40 je .L1
41 leaq .LC0(%rip), %rdi
42 subq $8, %rsp
43 call __libc_fatal@PLT
44 .size __condvar_confirm_wakeup, .-__condvar_confirm_wakeup
45 .p2align 4,,15
46 .type __condvar_release_lock, @function
47 __condvar_release_lock:
48 movl 32(%rdi), %eax
49 leaq 32(%rdi), %rcx
50 .L11:
51 movl %eax, %edi
52 movl %eax, %edx
53 andl $-4, %edi
54 lock cmpxchgl %edi, (%rcx)
55 jne .L11
56 andl $3, %edx
57 cmpl $2, %edx
58 je .L20
59 .L10:
60 rep ret
61 .p2align 4,,10
62 .p2align 3
63 .L20:
64 xorb $-127, %sil
65 xorl %r10d, %r10d
66 movl $1, %edx
67 movq %rcx, %rdi
68 movl $202, %eax
69 #APP
70 # 209 "../sysdeps/nptl/futex-internal.h" 1
71 syscall
73 # 0 "" 2
74 #NO_APP
75 cmpq $-4096, %rax
76 jbe .L10
77 cmpl $-22, %eax
78 je .L10
79 cmpl $-14, %eax
80 je .L10
81 leaq .LC0(%rip), %rdi
82 subq $8, %rsp
83 call __libc_fatal@PLT
84 .size __condvar_release_lock, .-__condvar_release_lock
85 .p2align 4,,15
86 .type __condvar_dec_grefs, @function
87 __condvar_dec_grefs:
88 movl %esi, %esi
89 movl $-2, %eax
90 leaq 16(%rdi,%rsi,4), %rdi
91 lock xaddl %eax, (%rdi)
92 cmpl $3, %eax
93 je .L28
94 .L21:
95 rep ret
96 .p2align 4,,10
97 .p2align 3
98 .L28:
99 lock andl $-2, (%rdi)
100 xorl %r10d, %r10d
101 movl $202, %eax
102 xorb $-127, %dl
103 movl %edx, %esi
104 movl $2147483647, %edx
105 #APP
106 # 209 "../sysdeps/nptl/futex-internal.h" 1
107 syscall
109 # 0 "" 2
110 #NO_APP
111 cmpq $-4096, %rax
112 jbe .L21
113 cmpl $-22, %eax
114 je .L21
115 cmpl $-14, %eax
116 je .L21
117 leaq .LC0(%rip), %rdi
118 subq $8, %rsp
119 call __libc_fatal@PLT
120 .size __condvar_dec_grefs, .-__condvar_dec_grefs
121 .p2align 4,,15
122 .type __condvar_cancel_waiting, @function
123 __condvar_cancel_waiting:
124 pushq %r15
125 pushq %r14
126 leaq 32(%rdi), %r8
127 pushq %r13
128 pushq %r12
129 movq %rsi, %r9
130 pushq %rbp
131 pushq %rbx
132 movl %edx, %ebp
133 movq %rdi, %rbx
134 movl %ecx, %r14d
135 subq $8, %rsp
136 movl 32(%rdi), %eax
137 .L30:
138 testb $3, %al
139 jne .L54
140 movl %eax, %edx
141 orl $1, %edx
142 lock cmpxchgl %edx, (%r8)
143 jne .L30
144 .L31:
145 movq 8(%rbx), %rax
146 shrq %rax
147 cmpq %r9, %rax
148 ja .L42
149 movl 32(%rbx), %edx
150 shrl $2, %edx
151 addq %rdx, %rax
152 leaq (%rbx,%rbp,4), %rdx
153 cmpq %r9, %rax
154 movl 24(%rdx), %eax
155 ja .L40
156 cmpl $-536870912, %eax
157 je .L41
158 .L53:
159 subl $1, %eax
160 movl %r14d, %esi
161 movq %rbx, %rdi
162 movl %eax, 24(%rdx)
163 addq $8, %rsp
164 popq %rbx
165 popq %rbp
166 popq %r12
167 popq %r13
168 popq %r14
169 popq %r15
170 jmp __condvar_release_lock
171 .p2align 4,,10
172 .p2align 3
173 .L40:
174 testl %eax, %eax
175 jne .L53
176 .L42:
177 movq %rbx, %rdi
178 movl %r14d, %esi
179 call __condvar_release_lock
180 addq $8, %rsp
181 movq %rbx, %rdi
182 popq %rbx
183 popq %rbp
184 popq %r12
185 popq %r13
186 popq %r14
187 popq %r15
188 jmp __pthread_cond_signal@PLT
189 .p2align 4,,10
190 .p2align 3
191 .L54:
192 movl %r14d, %r13d
193 movl $202, %r12d
194 movl $1, %r15d
195 xorb $-128, %r13b
196 jmp .L33
197 .p2align 4,,10
198 .p2align 3
199 .L37:
200 movl (%r8), %eax
201 .L33:
202 movl %eax, %edx
203 movl %eax, %ecx
204 andl $-4, %edx
205 andl $3, %ecx
206 orl $2, %edx
207 cmpl $2, %ecx
208 je .L35
209 lock cmpxchgl %edx, (%r8)
210 jne .L33
211 testb $3, %al
212 je .L31
213 andl $-4, %eax
214 orl $2, %eax
215 movl %eax, %edx
216 .L35:
217 xorl %r10d, %r10d
218 movl %r13d, %esi
219 movq %r8, %rdi
220 movl %r12d, %eax
221 #APP
222 # 146 "../sysdeps/nptl/futex-internal.h" 1
223 syscall
225 # 0 "" 2
226 #NO_APP
227 cmpq $-4096, %rax
228 jbe .L37
229 leal 11(%rax), %ecx
230 cmpl $11, %ecx
231 ja .L38
232 movq %r15, %rax
233 salq %cl, %rax
234 testl $2177, %eax
235 jne .L37
236 .L38:
237 leaq .LC0(%rip), %rdi
238 call __libc_fatal@PLT
239 .p2align 4,,10
240 .p2align 3
241 .L41:
242 movq %rbx, %rdi
243 movl %r14d, %esi
244 call __condvar_release_lock
245 addq $8, %rsp
246 movq %rbx, %rdi
247 popq %rbx
248 popq %rbp
249 popq %r12
250 popq %r13
251 popq %r14
252 popq %r15
253 jmp __pthread_cond_broadcast@PLT
254 .size __condvar_cancel_waiting, .-__condvar_cancel_waiting
255 .p2align 4,,15
256 .type __condvar_cleanup_waiting, @function
257 __condvar_cleanup_waiting:
258 pushq %r12
259 pushq %rbp
260 pushq %rbx
261 movl (%rdi), %ebp
262 movq %rdi, %rbx
263 movq 8(%rdi), %r12
264 movl 24(%rdi), %edx
265 andl $1, %ebp
266 movl %ebp, %esi
267 movq %r12, %rdi
268 call __condvar_dec_grefs
269 movq (%rbx), %rsi
270 movl 24(%rbx), %ecx
271 movl %ebp, %edx
272 movq %r12, %rdi
273 shrq %rsi
274 call __condvar_cancel_waiting
275 movl 24(%rbx), %esi
276 leaq 40(%r12,%rbp,4), %rdi
277 xorl %r10d, %r10d
278 movl $1, %edx
279 movl $202, %eax
280 xorb $-127, %sil
281 #APP
282 # 209 "../sysdeps/nptl/futex-internal.h" 1
283 syscall
285 # 0 "" 2
286 #NO_APP
287 cmpq $-4096, %rax
288 ja .L59
289 .L56:
290 movl 24(%rbx), %esi
291 movq %r12, %rdi
292 call __condvar_confirm_wakeup
293 movq 16(%rbx), %rdi
294 popq %rbx
295 popq %rbp
296 popq %r12
297 jmp __pthread_mutex_cond_lock
298 .p2align 4,,10
299 .p2align 3
300 .L59:
301 cmpl $-22, %eax
302 je .L56
303 cmpl $-14, %eax
304 je .L56
305 leaq .LC0(%rip), %rdi
306 call __libc_fatal@PLT
307 .size __condvar_cleanup_waiting, .-__condvar_cleanup_waiting
308 .p2align 4,,15
309 .globl __pthread_cond_wait
310 .type __pthread_cond_wait, @function
311 __pthread_cond_wait:
312 pushq %r15
313 pushq %r14
314 pushq %r13
315 pushq %r12
316 movq %rsi, %r13
317 pushq %rbp
318 pushq %rbx
319 movl $2, %r12d
320 movq %rdi, %rbx
321 subq $120, %rsp
322 lock xaddq %r12, (%rdi)
323 movl $8, %ebp
324 movl %r12d, %eax
325 andl $1, %eax
326 movl %eax, 8(%rsp)
327 movq %r12, %rax
328 shrq %rax
329 movq %rax, (%rsp)
330 lock xaddl %ebp, 36(%rdi)
331 movl $128, %eax
332 andl $1, %ebp
333 movq %r13, %rdi
334 cmovne %eax, %ebp
335 xorl %esi, %esi
336 call __pthread_mutex_unlock_usercnt
337 testl %eax, %eax
338 movl %eax, %r14d
339 jne .L87
340 movl 8(%rsp), %r11d
341 leaq 80(%rsp), %rcx
342 leaq 0(,%r11,4), %r10
343 leaq 40(%rbx,%r10), %r15
344 movl (%r15), %eax
345 movq %rcx, 24(%rsp)
346 leaq 48(%rsp), %rcx
347 movl %r14d, 12(%rsp)
348 movq %r12, %r14
349 movq %r10, %r12
350 movq %rcx, 16(%rsp)
351 .L64:
352 testb $1, %al
353 jne .L85
354 testl %eax, %eax
355 je .L88
356 leal -2(%rax), %edx
357 lock cmpxchgl %edx, (%r15)
358 jne .L64
359 movl 12(%rsp), %r14d
360 movq 8(%rbx), %rdx
361 leaq 8(%rbx), %rcx
362 movq %rdx, %rax
363 shrq %rax
364 cmpq %rax, (%rsp)
365 jb .L89
366 .L72:
367 movl %ebp, %esi
368 movq %rbx, %rdi
369 call __condvar_confirm_wakeup
370 movq %r13, %rdi
371 call __pthread_mutex_cond_lock
372 testl %eax, %eax
373 cmove %r14d, %eax
374 addq $120, %rsp
375 popq %rbx
376 popq %rbp
377 popq %r12
378 popq %r13
379 popq %r14
380 popq %r15
382 .p2align 4,,10
383 .p2align 3
384 .L89:
385 movq %rdx, %rax
386 notq %rax
387 andl $1, %eax
388 cmpq %rax, %r11
389 jne .L72
390 movl (%r15), %eax
391 .L76:
392 movq (%rcx), %rsi
393 cmpq %rsi, %rdx
394 jne .L72
395 testb $1, %al
396 jne .L79
397 leal 2(%rax), %esi
398 lock cmpxchgl %esi, (%r15)
399 jne .L76
400 .L79:
401 movl %ebp, %esi
402 xorl %r10d, %r10d
403 movl $1, %edx
404 xorb $-127, %sil
405 movq %r15, %rdi
406 movl $202, %eax
407 #APP
408 # 209 "../sysdeps/nptl/futex-internal.h" 1
409 syscall
411 # 0 "" 2
412 #NO_APP
413 cmpq $-4096, %rax
414 jbe .L72
415 cmpl $-22, %eax
416 je .L72
417 cmpl $-14, %eax
418 je .L72
419 leaq .LC0(%rip), %rdi
420 call __libc_fatal@PLT
421 .p2align 4,,10
422 .p2align 3
423 .L88:
424 lock addl $2, 16(%rbx,%r12)
425 movl (%r15), %eax
426 testb $1, %al
427 jne .L68
428 movq %r11, 40(%rsp)
429 movq 8(%rbx), %rax
430 shrq %rax
431 cmpq %rax, (%rsp)
432 jb .L68
433 movq 24(%rsp), %rdx
434 movq 16(%rsp), %rdi
435 leaq __condvar_cleanup_waiting(%rip), %rsi
436 movq %r14, 80(%rsp)
437 movq %rbx, 88(%rsp)
438 movq %r13, 96(%rsp)
439 movl %ebp, 104(%rsp)
440 call __pthread_cleanup_push
441 xorl %ecx, %ecx
442 xorl %edx, %edx
443 xorl %esi, %esi
444 movl %ebp, %r8d
445 movq %r15, %rdi
446 call __GI___futex_abstimed_wait_cancelable64
447 movq 16(%rsp), %rdi
448 xorl %esi, %esi
449 movl %eax, 32(%rsp)
450 call __pthread_cleanup_pop
451 movl 32(%rsp), %eax
452 cmpl $110, %eax
453 je .L82
454 cmpl $75, %eax
455 movq 40(%rsp), %r11
456 je .L82
457 movl 8(%rsp), %esi
458 movl %ebp, %edx
459 movq %rbx, %rdi
460 movq %r11, 32(%rsp)
461 call __condvar_dec_grefs
462 movl (%r15), %eax
463 movq 32(%rsp), %r11
464 jmp .L64
465 .p2align 4,,10
466 .p2align 3
467 .L87:
468 movl 8(%rsp), %edx
469 movq (%rsp), %rsi
470 movl %ebp, %ecx
471 movq %rbx, %rdi
472 call __condvar_cancel_waiting
473 movl %ebp, %esi
474 movq %rbx, %rdi
475 call __condvar_confirm_wakeup
476 addq $120, %rsp
477 movl %r14d, %eax
478 popq %rbx
479 popq %rbp
480 popq %r12
481 popq %r13
482 popq %r14
483 popq %r15
485 .p2align 4,,10
486 .p2align 3
487 .L82:
488 movl 8(%rsp), %r14d
489 movl %ebp, %edx
490 movq %rbx, %rdi
491 movl %eax, 12(%rsp)
492 movl %r14d, %esi
493 call __condvar_dec_grefs
494 movq (%rsp), %rsi
495 movl %r14d, %edx
496 movl %ebp, %ecx
497 movq %rbx, %rdi
498 call __condvar_cancel_waiting
499 movl 12(%rsp), %eax
500 movl %eax, %r14d
501 jmp .L72
502 .p2align 4,,10
503 .p2align 3
504 .L85:
505 movl 12(%rsp), %r14d
506 jmp .L72
507 .p2align 4,,10
508 .p2align 3
509 .L68:
510 movl 8(%rsp), %esi
511 movl %ebp, %edx
512 movq %rbx, %rdi
513 movl 12(%rsp), %r14d
514 call __condvar_dec_grefs
515 jmp .L72
516 .size __pthread_cond_wait, .-__pthread_cond_wait
517 .p2align 4,,15
518 .globl __pthread_cond_timedwait
519 .type __pthread_cond_timedwait, @function
520 __pthread_cond_timedwait:
521 cmpq $999999999, 8(%rdx)
522 ja .L112
523 pushq %r15
524 pushq %r14
525 leaq 36(%rdi), %rax
526 pushq %r13
527 pushq %r12
528 movl $2, %r13d
529 pushq %rbp
530 pushq %rbx
531 movq %rsi, %r12
532 movq %rdi, %rbx
533 subq $136, %rsp
534 movq %rdx, 32(%rsp)
535 movl 36(%rdi), %edx
536 shrl %edx
537 andl $1, %edx
538 movl %edx, 28(%rsp)
539 lock xaddq %r13, (%rdi)
540 movl $8, %ebp
541 movl %r13d, %ecx
542 andl $1, %ecx
543 movl %ecx, 4(%rsp)
544 movq %r13, %rcx
545 shrq %rcx
546 movq %rcx, 8(%rsp)
547 lock xaddl %ebp, (%rax)
548 movl $128, %eax
549 andl $1, %ebp
550 movq %r12, %rdi
551 cmovne %eax, %ebp
552 xorl %esi, %esi
553 call __pthread_mutex_unlock_usercnt
554 testl %eax, %eax
555 movl %eax, %r14d
556 jne .L121
557 movl 4(%rsp), %r11d
558 leaq 96(%rsp), %rsi
559 leaq 64(%rsp), %rcx
560 leaq 0(,%r11,4), %r10
561 leaq 40(%rbx,%r10), %r15
562 movl (%r15), %eax
563 movl %r14d, 24(%rsp)
564 movq %r13, %r14
565 movq %rsi, 40(%rsp)
566 movq %rcx, 16(%rsp)
567 movq %r10, %r13
568 .L94:
569 testb $1, %al
570 jne .L116
571 testl %eax, %eax
572 je .L122
573 leal -2(%rax), %edx
574 lock cmpxchgl %edx, (%r15)
575 jne .L94
576 movl 24(%rsp), %r14d
577 movq 8(%rbx), %rdx
578 leaq 8(%rbx), %rcx
579 movq %rdx, %rax
580 shrq %rax
581 cmpq %rax, 8(%rsp)
582 jb .L123
583 .L102:
584 movl %ebp, %esi
585 movq %rbx, %rdi
586 call __condvar_confirm_wakeup
587 movq %r12, %rdi
588 call __pthread_mutex_cond_lock
589 testl %eax, %eax
590 cmove %r14d, %eax
591 .L90:
592 addq $136, %rsp
593 popq %rbx
594 popq %rbp
595 popq %r12
596 popq %r13
597 popq %r14
598 popq %r15
600 .p2align 4,,10
601 .p2align 3
602 .L123:
603 movq %rdx, %rax
604 notq %rax
605 andl $1, %eax
606 cmpq %rax, %r11
607 jne .L102
608 movl (%r15), %eax
609 .L106:
610 movq (%rcx), %rsi
611 cmpq %rsi, %rdx
612 jne .L102
613 testb $1, %al
614 jne .L109
615 leal 2(%rax), %esi
616 lock cmpxchgl %esi, (%r15)
617 jne .L106
618 .L109:
619 movl %ebp, %esi
620 xorl %r10d, %r10d
621 movl $1, %edx
622 xorb $-127, %sil
623 movq %r15, %rdi
624 movl $202, %eax
625 #APP
626 # 209 "../sysdeps/nptl/futex-internal.h" 1
627 syscall
629 # 0 "" 2
630 #NO_APP
631 cmpq $-4096, %rax
632 jbe .L102
633 cmpl $-22, %eax
634 je .L102
635 cmpl $-14, %eax
636 je .L102
637 leaq .LC0(%rip), %rdi
638 call __libc_fatal@PLT
639 .p2align 4,,10
640 .p2align 3
641 .L122:
642 lock addl $2, 16(%rbx,%r13)
643 movl (%r15), %eax
644 testb $1, %al
645 jne .L98
646 movq %r11, 56(%rsp)
647 movq 8(%rbx), %rax
648 shrq %rax
649 cmpq %rax, 8(%rsp)
650 jb .L98
651 movq 40(%rsp), %rdx
652 movq 16(%rsp), %rdi
653 leaq __condvar_cleanup_waiting(%rip), %rsi
654 movq %r14, 96(%rsp)
655 movq %rbx, 104(%rsp)
656 movq %r12, 112(%rsp)
657 movl %ebp, 120(%rsp)
658 call __pthread_cleanup_push
659 movq 32(%rsp), %rcx
660 movl 28(%rsp), %edx
661 xorl %esi, %esi
662 movl %ebp, %r8d
663 movq %r15, %rdi
664 call __GI___futex_abstimed_wait_cancelable64
665 movq 16(%rsp), %rdi
666 xorl %esi, %esi
667 movl %eax, 48(%rsp)
668 call __pthread_cleanup_pop
669 movl 48(%rsp), %eax
670 cmpl $110, %eax
671 je .L113
672 cmpl $75, %eax
673 movq 56(%rsp), %r11
674 je .L113
675 movl 4(%rsp), %esi
676 movl %ebp, %edx
677 movq %rbx, %rdi
678 movq %r11, 48(%rsp)
679 call __condvar_dec_grefs
680 movl (%r15), %eax
681 movq 48(%rsp), %r11
682 jmp .L94
683 .p2align 4,,10
684 .p2align 3
685 .L112:
686 movl $22, %eax
688 .p2align 4,,10
689 .p2align 3
690 .L121:
691 movl 4(%rsp), %edx
692 movq 8(%rsp), %rsi
693 movl %ebp, %ecx
694 movq %rbx, %rdi
695 call __condvar_cancel_waiting
696 movl %ebp, %esi
697 movq %rbx, %rdi
698 call __condvar_confirm_wakeup
699 movl %r14d, %eax
700 jmp .L90
701 .p2align 4,,10
702 .p2align 3
703 .L113:
704 movl 4(%rsp), %r14d
705 movl %ebp, %edx
706 movq %rbx, %rdi
707 movl %eax, 24(%rsp)
708 movl %r14d, %esi
709 call __condvar_dec_grefs
710 movq 8(%rsp), %rsi
711 movl %r14d, %edx
712 movl %ebp, %ecx
713 movq %rbx, %rdi
714 call __condvar_cancel_waiting
715 movl 24(%rsp), %eax
716 movl %eax, %r14d
717 jmp .L102
718 .p2align 4,,10
719 .p2align 3
720 .L116:
721 movl 24(%rsp), %r14d
722 jmp .L102
723 .p2align 4,,10
724 .p2align 3
725 .L98:
726 movl 4(%rsp), %esi
727 movl %ebp, %edx
728 movq %rbx, %rdi
729 movl 24(%rsp), %r14d
730 call __condvar_dec_grefs
731 jmp .L102
732 .size __pthread_cond_timedwait, .-__pthread_cond_timedwait
733 .p2align 4,,15
734 .globl __pthread_cond_clockwait
735 .type __pthread_cond_clockwait, @function
736 __pthread_cond_clockwait:
737 cmpq $999999999, 8(%rcx)
738 movl $22, %eax
739 ja .L146
740 cmpl $1, %edx
741 jbe .L156
742 rep ret
743 .p2align 4,,10
744 .p2align 3
745 .L156:
746 pushq %r15
747 pushq %r14
748 pushq %r13
749 pushq %r12
750 movl $2, %r13d
751 pushq %rbp
752 pushq %rbx
753 movq %rsi, %r12
754 movq %rdi, %rbx
755 subq $136, %rsp
756 movq %rcx, 32(%rsp)
757 movl %edx, 28(%rsp)
758 lock xaddq %r13, (%rdi)
759 movl $8, %ebp
760 movl %r13d, %eax
761 andl $1, %eax
762 movl %eax, 4(%rsp)
763 movq %r13, %rax
764 shrq %rax
765 movq %rax, 8(%rsp)
766 lock xaddl %ebp, 36(%rdi)
767 movl $128, %eax
768 andl $1, %ebp
769 movq %r12, %rdi
770 cmovne %eax, %ebp
771 xorl %esi, %esi
772 call __pthread_mutex_unlock_usercnt
773 testl %eax, %eax
774 movl %eax, %r14d
775 jne .L157
776 movl 4(%rsp), %r11d
777 leaq 96(%rsp), %rsi
778 leaq 64(%rsp), %rcx
779 leaq 0(,%r11,4), %r10
780 leaq 40(%rbx,%r10), %r15
781 movl (%r15), %eax
782 movl %r14d, 24(%rsp)
783 movq %r13, %r14
784 movq %rsi, 40(%rsp)
785 movq %rcx, 16(%rsp)
786 movq %r10, %r13
787 .L128:
788 testb $1, %al
789 jne .L151
790 testl %eax, %eax
791 je .L158
792 leal -2(%rax), %edx
793 lock cmpxchgl %edx, (%r15)
794 jne .L128
795 movl 24(%rsp), %r14d
796 movq 8(%rbx), %rdx
797 leaq 8(%rbx), %rcx
798 movq %rdx, %rax
799 shrq %rax
800 cmpq %rax, 8(%rsp)
801 jb .L159
802 .L136:
803 movl %ebp, %esi
804 movq %rbx, %rdi
805 call __condvar_confirm_wakeup
806 movq %r12, %rdi
807 call __pthread_mutex_cond_lock
808 testl %eax, %eax
809 cmove %r14d, %eax
810 .L124:
811 addq $136, %rsp
812 popq %rbx
813 popq %rbp
814 popq %r12
815 popq %r13
816 popq %r14
817 popq %r15
819 .p2align 4,,10
820 .p2align 3
821 .L159:
822 movq %rdx, %rax
823 notq %rax
824 andl $1, %eax
825 cmpq %rax, %r11
826 jne .L136
827 movl (%r15), %eax
828 .L140:
829 movq (%rcx), %rsi
830 cmpq %rsi, %rdx
831 jne .L136
832 testb $1, %al
833 jne .L143
834 leal 2(%rax), %esi
835 lock cmpxchgl %esi, (%r15)
836 jne .L140
837 .L143:
838 movl %ebp, %esi
839 xorl %r10d, %r10d
840 movl $1, %edx
841 xorb $-127, %sil
842 movq %r15, %rdi
843 movl $202, %eax
844 #APP
845 # 209 "../sysdeps/nptl/futex-internal.h" 1
846 syscall
848 # 0 "" 2
849 #NO_APP
850 cmpq $-4096, %rax
851 jbe .L136
852 cmpl $-22, %eax
853 je .L136
854 cmpl $-14, %eax
855 je .L136
856 leaq .LC0(%rip), %rdi
857 call __libc_fatal@PLT
858 .p2align 4,,10
859 .p2align 3
860 .L158:
861 lock addl $2, 16(%rbx,%r13)
862 movl (%r15), %eax
863 testb $1, %al
864 jne .L132
865 movq %r11, 56(%rsp)
866 movq 8(%rbx), %rax
867 shrq %rax
868 cmpq %rax, 8(%rsp)
869 jb .L132
870 movq 40(%rsp), %rdx
871 movq 16(%rsp), %rdi
872 leaq __condvar_cleanup_waiting(%rip), %rsi
873 movq %r14, 96(%rsp)
874 movq %rbx, 104(%rsp)
875 movq %r12, 112(%rsp)
876 movl %ebp, 120(%rsp)
877 call __pthread_cleanup_push
878 movq 32(%rsp), %rcx
879 movl 28(%rsp), %edx
880 xorl %esi, %esi
881 movl %ebp, %r8d
882 movq %r15, %rdi
883 call __GI___futex_abstimed_wait_cancelable64
884 movq 16(%rsp), %rdi
885 xorl %esi, %esi
886 movl %eax, 48(%rsp)
887 call __pthread_cleanup_pop
888 movl 48(%rsp), %eax
889 cmpl $110, %eax
890 je .L148
891 cmpl $75, %eax
892 movq 56(%rsp), %r11
893 je .L148
894 movl 4(%rsp), %esi
895 movl %ebp, %edx
896 movq %rbx, %rdi
897 movq %r11, 48(%rsp)
898 call __condvar_dec_grefs
899 movl (%r15), %eax
900 movq 48(%rsp), %r11
901 jmp .L128
902 .p2align 4,,10
903 .p2align 3
904 .L146:
905 rep ret
906 .p2align 4,,10
907 .p2align 3
908 .L157:
909 movl 4(%rsp), %edx
910 movq 8(%rsp), %rsi
911 movl %ebp, %ecx
912 movq %rbx, %rdi
913 call __condvar_cancel_waiting
914 movl %ebp, %esi
915 movq %rbx, %rdi
916 call __condvar_confirm_wakeup
917 movl %r14d, %eax
918 jmp .L124
919 .p2align 4,,10
920 .p2align 3
921 .L148:
922 movl 4(%rsp), %r14d
923 movl %ebp, %edx
924 movq %rbx, %rdi
925 movl %eax, 24(%rsp)
926 movl %r14d, %esi
927 call __condvar_dec_grefs
928 movq 8(%rsp), %rsi
929 movl %r14d, %edx
930 movl %ebp, %ecx
931 movq %rbx, %rdi
932 call __condvar_cancel_waiting
933 movl 24(%rsp), %eax
934 movl %eax, %r14d
935 jmp .L136
936 .p2align 4,,10
937 .p2align 3
938 .L151:
939 movl 24(%rsp), %r14d
940 jmp .L136
941 .L132:
942 movl 4(%rsp), %esi
943 movl %ebp, %edx
944 movq %rbx, %rdi
945 movl 24(%rsp), %r14d
946 call __condvar_dec_grefs
947 jmp .L136
948 .size __pthread_cond_clockwait, .-__pthread_cond_clockwait
949 .weak pthread_cond_clockwait
950 .set pthread_cond_clockwait,__pthread_cond_clockwait
951 .hidden __pthread_cleanup_pop
952 .hidden __pthread_cleanup_push
953 .hidden __pthread_mutex_unlock_usercnt
954 .hidden __pthread_mutex_cond_lock