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