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