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