clarify the purpose of this project
[nyanglibc.git] / libio / iosetbuffer.shared.s
blob99988b51ea228bf754db7b78382b835abb009523
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_setbuffer
9 .hidden __GI__IO_setbuffer
10 .type __GI__IO_setbuffer, @function
11 __GI__IO_setbuffer:
12 .LFB68:
13 pushq %r13
14 pushq %r12
15 movq %rsi, %r12
16 pushq %rbp
17 pushq %rbx
18 movq %rdx, %rbp
19 movq %rdi, %rbx
20 subq $8, %rsp
21 movl (%rdi), %edx
22 movl %edx, %ecx
23 andl $32768, %ecx
24 jne .L2
25 movq 136(%rdi), %rdi
26 movq %fs:16, %r13
27 cmpq %r13, 8(%rdi)
28 je .L3
29 #APP
30 # 33 "iosetbuffer.c" 1
31 movl %fs:24,%eax
32 # 0 "" 2
33 #NO_APP
34 testl %eax, %eax
35 movl $1, %edx
36 jne .L4
37 #APP
38 # 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
39 cmpxchgl %edx, (%rdi)
40 # 0 "" 2
41 #NO_APP
42 .L5:
43 movq 136(%rbx), %rdi
44 movl (%rbx), %edx
45 movq %r13, 8(%rdi)
46 .L3:
47 addl $1, 4(%rdi)
48 .L2:
49 movq 216(%rbx), %r13
50 andb $-3, %dh
51 movl $0, %eax
52 testq %r12, %r12
53 movl %edx, (%rbx)
54 leaq __start___libc_IO_vtables(%rip), %rdx
55 cmove %rax, %rbp
56 leaq __stop___libc_IO_vtables(%rip), %rax
57 movq %r13, %rsi
58 subq %rdx, %rax
59 subq %rdx, %rsi
60 cmpq %rsi, %rax
61 jbe .L9
62 .L11:
63 movq %rbp, %rdx
64 movq %r12, %rsi
65 movq %rbx, %rdi
66 .LEHB0:
67 call *88(%r13)
68 movl 192(%rbx), %eax
69 testl %eax, %eax
70 jne .L15
71 movq 160(%rbx), %rax
72 testq %rax, %rax
73 je .L15
74 movq 224(%rax), %rax
75 movq %rbp, %rdx
76 movq %r12, %rsi
77 movq %rbx, %rdi
78 call *88(%rax)
79 .L15:
80 testl $32768, (%rbx)
81 jne .L1
82 movq 136(%rbx), %rdi
83 movl 4(%rdi), %eax
84 subl $1, %eax
85 testl %eax, %eax
86 movl %eax, 4(%rdi)
87 jne .L1
88 movq $0, 8(%rdi)
89 #APP
90 # 885 "libioP.h" 1
91 movl %fs:24,%edx
92 # 0 "" 2
93 #NO_APP
94 testl %edx, %edx
95 jne .L17
96 subl $1, (%rdi)
97 .L1:
98 addq $8, %rsp
99 popq %rbx
100 popq %rbp
101 popq %r12
102 popq %r13
104 .p2align 4,,10
105 .p2align 3
106 .L9:
107 call _IO_vtable_check
108 jmp .L11
109 .p2align 4,,10
110 .p2align 3
111 .L4:
112 movl %ecx, %eax
113 lock cmpxchgl %edx, (%rdi)
114 je .L5
115 call __lll_lock_wait_private
116 .LEHE0:
117 jmp .L5
118 .p2align 4,,10
119 .p2align 3
120 .L17:
121 #APP
122 # 885 "libioP.h" 1
123 xchgl %eax, (%rdi)
124 # 0 "" 2
125 #NO_APP
126 cmpl $1, %eax
127 jle .L1
128 xorl %r10d, %r10d
129 movl $1, %edx
130 movl $129, %esi
131 movl $202, %eax
132 #APP
133 # 885 "libioP.h" 1
134 syscall
136 # 0 "" 2
137 #NO_APP
138 jmp .L1
139 .L22:
140 testl $32768, (%rbx)
141 movq %rax, %r8
142 jne .L19
143 movq 136(%rbx), %rdi
144 movl 4(%rdi), %eax
145 subl $1, %eax
146 testl %eax, %eax
147 movl %eax, 4(%rdi)
148 jne .L19
149 movq $0, 8(%rdi)
150 #APP
151 # 885 "libioP.h" 1
152 movl %fs:24,%edx
153 # 0 "" 2
154 #NO_APP
155 testl %edx, %edx
156 jne .L20
157 subl $1, (%rdi)
158 .L19:
159 movq %r8, %rdi
160 .LEHB1:
161 call _Unwind_Resume@PLT
162 .LEHE1:
163 .L20:
164 #APP
165 # 885 "libioP.h" 1
166 xchgl %eax, (%rdi)
167 # 0 "" 2
168 #NO_APP
169 subl $1, %eax
170 jle .L19
171 xorl %r10d, %r10d
172 movl $1, %edx
173 movl $129, %esi
174 movl $202, %eax
175 #APP
176 # 885 "libioP.h" 1
177 syscall
179 # 0 "" 2
180 #NO_APP
181 jmp .L19
182 .LFE68:
183 .globl __gcc_personality_v0
184 .section .gcc_except_table,"a",@progbits
185 .LLSDA68:
186 .byte 0xff
187 .byte 0xff
188 .byte 0x1
189 .uleb128 .LLSDACSE68-.LLSDACSB68
190 .LLSDACSB68:
191 .uleb128 .LEHB0-.LFB68
192 .uleb128 .LEHE0-.LEHB0
193 .uleb128 .L22-.LFB68
194 .uleb128 0
195 .uleb128 .LEHB1-.LFB68
196 .uleb128 .LEHE1-.LEHB1
197 .uleb128 0
198 .uleb128 0
199 .LLSDACSE68:
200 .text
201 .size __GI__IO_setbuffer, .-__GI__IO_setbuffer
202 .globl _IO_setbuffer
203 .set _IO_setbuffer,__GI__IO_setbuffer
204 .weak setbuffer
205 .set setbuffer,_IO_setbuffer
206 .hidden DW.ref.__gcc_personality_v0
207 .weak DW.ref.__gcc_personality_v0
208 .section .data.DW.ref.__gcc_personality_v0,"awG",@progbits,DW.ref.__gcc_personality_v0,comdat
209 .align 8
210 .type DW.ref.__gcc_personality_v0, @object
211 .size DW.ref.__gcc_personality_v0, 8
212 DW.ref.__gcc_personality_v0:
213 .quad __gcc_personality_v0
214 .hidden __lll_lock_wait_private
215 .hidden _IO_vtable_check
216 .hidden __stop___libc_IO_vtables
217 .hidden __start___libc_IO_vtables