clarify the purpose of this project
[nyanglibc.git] / libio / iosetvbuf.shared.s
blob36a293b6fbc320a8bca99f2fcda11b6383f12cc3
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 #NO_APP
7 .p2align 4,,15
8 .globl __GI__IO_setvbuf
9 .hidden __GI__IO_setvbuf
10 .type __GI__IO_setvbuf, @function
11 __GI__IO_setvbuf:
12 .LFB68:
13 pushq %r14
14 pushq %r13
15 movl %edx, %r13d
16 pushq %r12
17 pushq %rbp
18 movq %rcx, %r12
19 pushq %rbx
20 movl (%rdi), %edx
21 movq %rdi, %rbx
22 movq %rsi, %rbp
23 movl %edx, %ecx
24 andl $32768, %ecx
25 jne .L2
26 movq 136(%rdi), %rdi
27 movq %fs:16, %r14
28 cmpq %r14, 8(%rdi)
29 je .L3
30 #APP
31 # 38 "iosetvbuf.c" 1
32 movl %fs:24,%eax
33 # 0 "" 2
34 #NO_APP
35 testl %eax, %eax
36 movl $1, %edx
37 jne .L4
38 #APP
39 # 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
40 cmpxchgl %edx, (%rdi)
41 # 0 "" 2
42 #NO_APP
43 .L5:
44 movq 136(%rbx), %rdi
45 movl (%rbx), %edx
46 movq %r14, 8(%rdi)
47 .L3:
48 addl $1, 4(%rdi)
49 cmpl $1, %r13d
50 je .L9
51 cmpl $2, %r13d
52 je .L19
53 testl %r13d, %r13d
54 je .L11
55 .L29:
56 andb $-128, %dh
57 movl $-1, %r8d
58 je .L53
59 .L1:
60 popq %rbx
61 movl %r8d, %eax
62 popq %rbp
63 popq %r12
64 popq %r13
65 popq %r14
66 ret
67 .p2align 4,,10
68 .p2align 3
69 .L2:
70 cmpl $1, %r13d
71 je .L9
72 cmpl $2, %r13d
73 je .L19
74 testl %r13d, %r13d
75 movl $-1, %r8d
76 jne .L1
77 .L11:
78 andl $-515, %edx
79 testq %rbp, %rbp
80 movl %edx, (%rbx)
81 je .L54
82 .L14:
83 movq 216(%rbx), %r13
84 leaq __start___libc_IO_vtables(%rip), %rdx
85 leaq __stop___libc_IO_vtables(%rip), %rax
86 subq %rdx, %rax
87 movq %r13, %rsi
88 subq %rdx, %rsi
89 cmpq %rsi, %rax
90 jbe .L20
91 .L22:
92 movq %r12, %rdx
93 movq %rbp, %rsi
94 movq %rbx, %rdi
95 .LEHB0:
96 call *88(%r13)
97 xorl %r8d, %r8d
98 movl (%rbx), %edx
99 testq %rax, %rax
100 sete %r8b
101 negl %r8d
102 .L12:
103 andb $-128, %dh
104 jne .L1
105 .L53:
106 movq 136(%rbx), %rdi
107 movl 4(%rdi), %eax
108 subl $1, %eax
109 testl %eax, %eax
110 movl %eax, 4(%rdi)
111 jne .L1
112 movq $0, 8(%rdi)
113 #APP
114 # 885 "libioP.h" 1
115 movl %fs:24,%edx
116 # 0 "" 2
117 #NO_APP
118 testl %edx, %edx
119 jne .L24
120 subl $1, (%rdi)
121 movl %r8d, %eax
122 popq %rbx
123 popq %rbp
124 popq %r12
125 popq %r13
126 popq %r14
128 .p2align 4,,10
129 .p2align 3
130 .L9:
131 andl $-3, %edx
132 orb $2, %dh
133 testq %rbp, %rbp
134 movl %edx, (%rbx)
135 jne .L14
136 xorl %r8d, %r8d
137 jmp .L12
138 .p2align 4,,10
139 .p2align 3
140 .L19:
141 andb $-3, %dh
142 xorl %r12d, %r12d
143 xorl %ebp, %ebp
144 orl $2, %edx
145 movl %edx, (%rbx)
146 jmp .L14
147 .p2align 4,,10
148 .p2align 3
149 .L54:
150 xorl %r8d, %r8d
151 cmpq $0, 56(%rbx)
152 jne .L12
153 movq 216(%rbx), %rbp
154 leaq __start___libc_IO_vtables(%rip), %rdx
155 leaq __stop___libc_IO_vtables(%rip), %rax
156 subq %rdx, %rax
157 movq %rbp, %rsi
158 subq %rdx, %rsi
159 cmpq %rsi, %rax
160 jbe .L15
161 .L17:
162 movq %rbx, %rdi
163 call *104(%rbp)
164 testl %eax, %eax
165 movl (%rbx), %edx
166 js .L29
167 andb $-3, %dh
168 xorl %r8d, %r8d
169 movl %edx, (%rbx)
170 jmp .L12
171 .p2align 4,,10
172 .p2align 3
173 .L20:
174 call _IO_vtable_check
175 jmp .L22
176 .p2align 4,,10
177 .p2align 3
178 .L4:
179 movl %ecx, %eax
180 lock cmpxchgl %edx, (%rdi)
181 je .L5
182 call __lll_lock_wait_private
183 jmp .L5
184 .p2align 4,,10
185 .p2align 3
186 .L24:
187 #APP
188 # 885 "libioP.h" 1
189 xchgl %eax, (%rdi)
190 # 0 "" 2
191 #NO_APP
192 cmpl $1, %eax
193 jle .L1
194 xorl %r10d, %r10d
195 movl $1, %edx
196 movl $129, %esi
197 movl $202, %eax
198 #APP
199 # 885 "libioP.h" 1
200 syscall
202 # 0 "" 2
203 #NO_APP
204 jmp .L1
205 .L15:
206 call _IO_vtable_check
207 .LEHE0:
208 jmp .L17
209 .L32:
210 testl $32768, (%rbx)
211 movq %rax, %r8
212 jne .L26
213 movq 136(%rbx), %rdi
214 movl 4(%rdi), %eax
215 subl $1, %eax
216 testl %eax, %eax
217 movl %eax, 4(%rdi)
218 jne .L26
219 movq $0, 8(%rdi)
220 #APP
221 # 885 "libioP.h" 1
222 movl %fs:24,%edx
223 # 0 "" 2
224 #NO_APP
225 testl %edx, %edx
226 jne .L27
227 subl $1, (%rdi)
228 .L26:
229 movq %r8, %rdi
230 .LEHB1:
231 call _Unwind_Resume@PLT
232 .LEHE1:
233 .L27:
234 #APP
235 # 885 "libioP.h" 1
236 xchgl %eax, (%rdi)
237 # 0 "" 2
238 #NO_APP
239 subl $1, %eax
240 jle .L26
241 xorl %r10d, %r10d
242 movl $1, %edx
243 movl $129, %esi
244 movl $202, %eax
245 #APP
246 # 885 "libioP.h" 1
247 syscall
249 # 0 "" 2
250 #NO_APP
251 jmp .L26
252 .LFE68:
253 .globl __gcc_personality_v0
254 .section .gcc_except_table,"a",@progbits
255 .LLSDA68:
256 .byte 0xff
257 .byte 0xff
258 .byte 0x1
259 .uleb128 .LLSDACSE68-.LLSDACSB68
260 .LLSDACSB68:
261 .uleb128 .LEHB0-.LFB68
262 .uleb128 .LEHE0-.LEHB0
263 .uleb128 .L32-.LFB68
264 .uleb128 0
265 .uleb128 .LEHB1-.LFB68
266 .uleb128 .LEHE1-.LEHB1
267 .uleb128 0
268 .uleb128 0
269 .LLSDACSE68:
270 .text
271 .size __GI__IO_setvbuf, .-__GI__IO_setvbuf
272 .globl _IO_setvbuf
273 .set _IO_setvbuf,__GI__IO_setvbuf
274 .weak setvbuf
275 .set setvbuf,_IO_setvbuf
276 .hidden DW.ref.__gcc_personality_v0
277 .weak DW.ref.__gcc_personality_v0
278 .section .data.DW.ref.__gcc_personality_v0,"awG",@progbits,DW.ref.__gcc_personality_v0,comdat
279 .align 8
280 .type DW.ref.__gcc_personality_v0, @object
281 .size DW.ref.__gcc_personality_v0, 8
282 DW.ref.__gcc_personality_v0:
283 .quad __gcc_personality_v0
284 .hidden __lll_lock_wait_private
285 .hidden _IO_vtable_check
286 .hidden __stop___libc_IO_vtables
287 .hidden __start___libc_IO_vtables