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