clarify the purpose of this project
[nyanglibc.git] / libio / iofclose.shared.s
blob248ba32aa46a4cacb9237b1639718175b67d13cb
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 .symver _IO_new_fclose,_IO_fclose@@GLIBC_2.2.5
7 .symver __new_fclose,fclose@@GLIBC_2.2.5
8 #NO_APP
9 .p2align 4,,15
10 .globl _IO_new_fclose
11 .type _IO_new_fclose, @function
12 _IO_new_fclose:
13 .LFB77:
14 pushq %r12
15 pushq %rbp
16 pushq %rbx
17 movl (%rdi), %eax
18 movq %rdi, %rbx
19 testb $32, %ah
20 jne .L36
21 movl %eax, %edx
22 andl $32768, %edx
23 je .L27
24 .L28:
25 sall $26, %eax
26 sarl $31, %eax
27 movl %eax, %ebp
28 .L10:
29 testl %edx, %edx
30 jne .L12
31 movq 136(%rbx), %rdi
32 subl $1, 4(%rdi)
33 je .L37
34 .L12:
35 movq 216(%rbx), %r12
36 leaq __start___libc_IO_vtables(%rip), %rdx
37 leaq __stop___libc_IO_vtables(%rip), %rax
38 subq %rdx, %rax
39 movq %r12, %rcx
40 subq %rdx, %rcx
41 cmpq %rcx, %rax
42 jbe .L38
43 .L15:
44 xorl %esi, %esi
45 movq %rbx, %rdi
46 .LEHB0:
47 call *16(%r12)
48 movl 192(%rbx), %eax
49 testl %eax, %eax
50 jle .L16
51 movq 152(%rbx), %r12
52 #APP
53 # 64 "iofclose.c" 1
54 movl %fs:24,%eax
55 # 0 "" 2
56 #NO_APP
57 testl %eax, %eax
58 jne .L17
59 movl $1, %edx
60 #APP
61 # 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
62 cmpxchgl %edx, __gconv_lock(%rip)
63 # 0 "" 2
64 #NO_APP
65 .L18:
66 movq (%r12), %rdi
67 call __gconv_release_step
68 movq 56(%r12), %rdi
69 call __gconv_release_step
70 .LEHE0:
71 #APP
72 # 67 "iofclose.c" 1
73 movl %fs:24,%eax
74 # 0 "" 2
75 #NO_APP
76 testl %eax, %eax
77 jne .L19
78 subl $1, __gconv_lock(%rip)
79 .L20:
80 cmpq _IO_2_1_stdout_@GOTPCREL(%rip), %rbx
81 sete %dl
82 cmpq _IO_2_1_stdin_@GOTPCREL(%rip), %rbx
83 sete %al
84 orb %al, %dl
85 jne .L1
86 cmpq _IO_2_1_stderr_@GOTPCREL(%rip), %rbx
87 jne .L39
88 .L1:
89 movl %ebp, %eax
90 popq %rbx
91 popq %rbp
92 popq %r12
93 ret
94 .p2align 4,,10
95 .p2align 3
96 .L36:
97 call __GI__IO_un_link
98 movl (%rbx), %eax
99 testb $-128, %ah
100 jne .L3
101 .L27:
102 movq 136(%rbx), %rdi
103 movq %fs:16, %rbp
104 cmpq %rbp, 8(%rdi)
105 je .L4
106 #APP
107 # 51 "iofclose.c" 1
108 movl %fs:24,%eax
109 # 0 "" 2
110 #NO_APP
111 testl %eax, %eax
112 jne .L5
113 movl $1, %edx
114 #APP
115 # 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
116 cmpxchgl %edx, (%rdi)
117 # 0 "" 2
118 #NO_APP
119 .L6:
120 movq 136(%rbx), %rdi
121 movl (%rbx), %eax
122 movq %rbp, 8(%rdi)
123 .L4:
124 addl $1, 4(%rdi)
125 .L3:
126 movl %eax, %edx
127 andl $32768, %edx
128 testb $32, %ah
129 je .L28
130 movq %rbx, %rdi
131 .LEHB1:
132 call __GI__IO_file_close_it
133 .LEHE1:
134 movl (%rbx), %edx
135 movl %eax, %ebp
136 andl $32768, %edx
137 jmp .L10
138 .p2align 4,,10
139 .p2align 3
140 .L39:
141 movq %rbx, %rdi
142 call free@PLT
143 movl %ebp, %eax
144 popq %rbx
145 popq %rbp
146 popq %r12
148 .p2align 4,,10
149 .p2align 3
150 .L37:
151 movq $0, 8(%rdi)
152 #APP
153 # 885 "libioP.h" 1
154 movl %fs:24,%eax
155 # 0 "" 2
156 #NO_APP
157 testl %eax, %eax
158 jne .L14
159 subl $1, (%rdi)
160 jmp .L12
161 .p2align 4,,10
162 .p2align 3
163 .L16:
164 cmpq $0, 72(%rbx)
165 je .L20
166 movq %rbx, %rdi
167 call __GI__IO_free_backup_area
168 jmp .L20
169 .p2align 4,,10
170 .p2align 3
171 .L38:
172 .LEHB2:
173 call _IO_vtable_check
174 jmp .L15
175 .p2align 4,,10
176 .p2align 3
177 .L19:
178 xorl %eax, %eax
179 #APP
180 # 67 "iofclose.c" 1
181 xchgl %eax, __gconv_lock(%rip)
182 # 0 "" 2
183 #NO_APP
184 cmpl $1, %eax
185 jle .L20
186 xorl %r10d, %r10d
187 movl $1, %edx
188 movl $129, %esi
189 leaq __gconv_lock(%rip), %rdi
190 movl $202, %eax
191 #APP
192 # 67 "iofclose.c" 1
193 syscall
195 # 0 "" 2
196 #NO_APP
197 jmp .L20
198 .p2align 4,,10
199 .p2align 3
200 .L17:
201 xorl %eax, %eax
202 movl $1, %edx
203 lock cmpxchgl %edx, __gconv_lock(%rip)
204 je .L18
205 leaq __gconv_lock(%rip), %rdi
206 call __lll_lock_wait_private
207 .LEHE2:
208 jmp .L18
209 .p2align 4,,10
210 .p2align 3
211 .L5:
212 xorl %eax, %eax
213 movl $1, %edx
214 lock cmpxchgl %edx, (%rdi)
215 je .L6
216 .LEHB3:
217 call __lll_lock_wait_private
218 .LEHE3:
219 jmp .L6
220 .p2align 4,,10
221 .p2align 3
222 .L14:
223 #APP
224 # 885 "libioP.h" 1
225 xchgl %edx, (%rdi)
226 # 0 "" 2
227 #NO_APP
228 cmpl $1, %edx
229 jle .L12
230 xorl %r10d, %r10d
231 movl $1, %edx
232 movl $129, %esi
233 movl $202, %eax
234 #APP
235 # 885 "libioP.h" 1
236 syscall
238 # 0 "" 2
239 #NO_APP
240 jmp .L12
241 .L29:
242 testl $32768, (%rbx)
243 movq %rax, %r8
244 jne .L25
245 movq 136(%rbx), %rdi
246 movl 4(%rdi), %eax
247 subl $1, %eax
248 testl %eax, %eax
249 movl %eax, 4(%rdi)
250 jne .L25
251 movq $0, 8(%rdi)
252 #APP
253 # 885 "libioP.h" 1
254 movl %fs:24,%edx
255 # 0 "" 2
256 #NO_APP
257 testl %edx, %edx
258 jne .L26
259 subl $1, (%rdi)
260 .L25:
261 movq %r8, %rdi
262 .LEHB4:
263 call _Unwind_Resume@PLT
264 .LEHE4:
265 .L26:
266 #APP
267 # 885 "libioP.h" 1
268 xchgl %eax, (%rdi)
269 # 0 "" 2
270 #NO_APP
271 subl $1, %eax
272 jle .L25
273 xorl %r10d, %r10d
274 movl $1, %edx
275 movl $129, %esi
276 movl $202, %eax
277 #APP
278 # 885 "libioP.h" 1
279 syscall
281 # 0 "" 2
282 #NO_APP
283 jmp .L25
284 .LFE77:
285 .globl __gcc_personality_v0
286 .section .gcc_except_table,"a",@progbits
287 .LLSDA77:
288 .byte 0xff
289 .byte 0xff
290 .byte 0x1
291 .uleb128 .LLSDACSE77-.LLSDACSB77
292 .LLSDACSB77:
293 .uleb128 .LEHB0-.LFB77
294 .uleb128 .LEHE0-.LEHB0
295 .uleb128 0
296 .uleb128 0
297 .uleb128 .LEHB1-.LFB77
298 .uleb128 .LEHE1-.LEHB1
299 .uleb128 .L29-.LFB77
300 .uleb128 0
301 .uleb128 .LEHB2-.LFB77
302 .uleb128 .LEHE2-.LEHB2
303 .uleb128 0
304 .uleb128 0
305 .uleb128 .LEHB3-.LFB77
306 .uleb128 .LEHE3-.LEHB3
307 .uleb128 .L29-.LFB77
308 .uleb128 0
309 .uleb128 .LEHB4-.LFB77
310 .uleb128 .LEHE4-.LEHB4
311 .uleb128 0
312 .uleb128 0
313 .LLSDACSE77:
314 .text
315 .size _IO_new_fclose, .-_IO_new_fclose
316 .globl __new_fclose
317 .set __new_fclose,_IO_new_fclose
318 .hidden DW.ref.__gcc_personality_v0
319 .weak DW.ref.__gcc_personality_v0
320 .section .data.DW.ref.__gcc_personality_v0,"awG",@progbits,DW.ref.__gcc_personality_v0,comdat
321 .align 8
322 .type DW.ref.__gcc_personality_v0, @object
323 .size DW.ref.__gcc_personality_v0, 8
324 DW.ref.__gcc_personality_v0:
325 .quad __gcc_personality_v0
326 .hidden __lll_lock_wait_private
327 .hidden _IO_vtable_check
328 .hidden __gconv_release_step
329 .hidden __gconv_lock
330 .hidden __stop___libc_IO_vtables
331 .hidden __start___libc_IO_vtables