Some broken software wants to deal with ld.so.cache.
[nyanglibc.git] / rt / aio_cancel.shared.s
blob2f235a185d84b30fec6f05cd929e0ff0312068cc
1 .text
2 .section .rodata.str1.8,"aMS",@progbits,1
3 .align 8
4 .LC0:
5 .string "../sysdeps/pthread/aio_cancel.c"
6 .align 8
7 .LC1:
8 .string "req->running == yes || req->running == queued"
9 .text
10 .p2align 4,,15
11 .globl aio_cancel
12 .type aio_cancel, @function
13 aio_cancel:
14 pushq %r13
15 pushq %r12
16 xorl %eax, %eax
17 pushq %rbp
18 pushq %rbx
19 movq %rsi, %rbp
20 movl $3, %esi
21 movl %edi, %ebx
22 subq $8, %rsp
23 call fcntl@PLT
24 testl %eax, %eax
25 js .L33
26 leaq __aio_requests_mutex(%rip), %rdi
27 call pthread_mutex_lock@PLT
28 testq %rbp, %rbp
29 je .L4
30 cmpl %ebx, 0(%rbp)
31 jne .L8
32 cmpl $115, 112(%rbp)
33 je .L34
34 .L6:
35 movl $2, %r13d
36 .L11:
37 leaq __aio_requests_mutex(%rip), %rdi
38 call pthread_mutex_unlock@PLT
39 .L1:
40 addq $8, %rsp
41 movl %r13d, %eax
42 popq %rbx
43 popq %rbp
44 popq %r12
45 popq %r13
46 ret
47 .p2align 4,,10
48 .p2align 3
49 .L4:
50 movl %ebx, %edi
51 call __aio_find_req_fd
52 testq %rax, %rax
53 movq %rax, %rbx
54 je .L6
55 cmpl $3, (%rax)
56 jne .L13
57 movq 24(%rax), %rbp
58 movq $0, 24(%rax)
59 testq %rbp, %rbp
60 je .L14
61 movl $1, %edx
62 movq %rbp, %rsi
63 movq %rax, %rdi
64 call __aio_remove_request
65 movq %rbp, %rbx
66 movl $1, %r13d
67 jmp .L12
68 .p2align 4,,10
69 .p2align 3
70 .L34:
71 movl %ebx, %edi
72 call __aio_find_req_fd
73 testq %rax, %rax
74 movq %rax, %rbx
75 je .L8
76 xorl %edi, %edi
77 jmp .L7
78 .p2align 4,,10
79 .p2align 3
80 .L9:
81 movq 24(%rbx), %rax
82 movq %rbx, %rdi
83 testq %rax, %rax
84 je .L8
85 movq %rax, %rbx
86 .L7:
87 cmpq %rbp, 40(%rbx)
88 jne .L9
89 cmpl $3, (%rbx)
90 jne .L10
91 .L14:
92 movl $1, %r13d
93 jmp .L11
94 .L8:
95 leaq __aio_requests_mutex(%rip), %rdi
96 movl $-1, %r13d
97 call pthread_mutex_unlock@PLT
98 movq errno@gottpoff(%rip), %rax
99 movl $22, %fs:(%rax)
100 jmp .L1
101 .L13:
102 movl $1, %edx
103 movq %rax, %rsi
104 xorl %edi, %edi
105 xorl %r13d, %r13d
106 call __aio_remove_request
107 .L12:
108 movl (%rbx), %eax
109 subl $1, %eax
110 cmpl $1, %eax
111 ja .L18
112 movq $-1, %r12
113 .p2align 4,,10
114 .p2align 3
115 .L16:
116 movq 40(%rbx), %rax
117 movq %rbx, %rdi
118 movl $125, 112(%rax)
119 movq %r12, 120(%rax)
120 call __aio_notify
121 movq 24(%rbx), %rbp
122 movq %rbx, %rdi
123 call __aio_free_request
124 testq %rbp, %rbp
125 je .L11
126 movl 0(%rbp), %eax
127 movq %rbp, %rbx
128 subl $1, %eax
129 cmpl $1, %eax
130 jbe .L16
131 .L18:
132 leaq __PRETTY_FUNCTION__.9163(%rip), %rcx
133 leaq .LC0(%rip), %rsi
134 leaq .LC1(%rip), %rdi
135 movl $141, %edx
136 call __assert_fail@PLT
137 .L10:
138 xorl %edx, %edx
139 movq %rbx, %rsi
140 xorl %r13d, %r13d
141 call __aio_remove_request
142 movq $0, 24(%rbx)
143 jmp .L12
144 .L33:
145 movq errno@gottpoff(%rip), %rax
146 movl $-1, %r13d
147 movl $9, %fs:(%rax)
148 jmp .L1
149 .size aio_cancel, .-aio_cancel
150 .weak aio_cancel64
151 .set aio_cancel64,aio_cancel
152 .section .rodata.str1.8
153 .align 8
154 .type __PRETTY_FUNCTION__.9163, @object
155 .size __PRETTY_FUNCTION__.9163, 11
156 __PRETTY_FUNCTION__.9163:
157 .string "aio_cancel"
158 .hidden __aio_free_request
159 .hidden __aio_notify
160 .hidden __aio_remove_request
161 .hidden __aio_find_req_fd
162 .hidden __aio_requests_mutex