clarify the purpose of this project
[nyanglibc.git] / libio / iogetdelim.shared.s
blob94a5876207a9c637f59ba2f7abfc74056b9455b7
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_getdelim
9 .type _IO_getdelim, @function
10 _IO_getdelim:
11 .LFB68:
12 pushq %r15
13 pushq %r14
14 pushq %r13
15 pushq %r12
16 pushq %rbp
17 pushq %rbx
18 subq $40, %rsp
19 testq %rdi, %rdi
20 je .L33
21 testq %rsi, %rsi
22 je .L33
23 movl %edx, 28(%rsp)
24 movl (%rcx), %edx
25 movq %rcx, %rbx
26 movq %rsi, 8(%rsp)
27 movq %rdi, %rbp
28 movl %edx, %ecx
29 andl $32768, %ecx
30 jne .L5
31 movq 136(%rbx), %rdi
32 movq %fs:16, %r13
33 cmpq %r13, 8(%rdi)
34 je .L6
35 #APP
36 # 52 "iogetdelim.c" 1
37 movl %fs:24,%eax
38 # 0 "" 2
39 #NO_APP
40 testl %eax, %eax
41 movl $1, %edx
42 jne .L7
43 #APP
44 # 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
45 cmpxchgl %edx, (%rdi)
46 # 0 "" 2
47 #NO_APP
48 .L8:
49 movq 136(%rbx), %rdi
50 movl (%rbx), %eax
51 addl $1, 4(%rdi)
52 testb $32, %al
53 movq %r13, 8(%rdi)
54 jne .L29
55 .L27:
56 cmpq $0, 0(%rbp)
57 je .L12
58 movq 8(%rsp), %rax
59 cmpq $0, (%rax)
60 jne .L15
61 .L12:
62 movq 8(%rsp), %rax
63 movl $120, %edi
64 movq $120, (%rax)
65 call malloc@PLT
66 testq %rax, %rax
67 movq %rax, 0(%rbp)
68 je .L40
69 .L15:
70 movq 8(%rbx), %r10
71 movq 16(%rbx), %r14
72 subq %r10, %r14
73 testq %r14, %r14
74 jle .L42
75 .L14:
76 xorl %r15d, %r15d
77 jmp .L22
78 .p2align 4,,10
79 .p2align 3
80 .L18:
81 movq 8(%rsp), %rcx
82 leaq (%r15,%r14), %r13
83 movq 0(%rbp), %rdi
84 leaq 1(%r13), %rax
85 movq (%rcx), %rdx
86 cmpq %rax, %rdx
87 jnb .L19
88 addq %rdx, %rdx
89 cmpq %rax, %rdx
90 cmovb %rax, %rdx
91 movq %rdx, %rsi
92 movq %rdx, 16(%rsp)
93 call realloc@PLT
94 testq %rax, %rax
95 movq %rax, %rdi
96 movq 16(%rsp), %rdx
97 je .L40
98 movq %rax, 0(%rbp)
99 movq 8(%rsp), %rax
100 movq 8(%rbx), %r10
101 movq %rdx, (%rax)
102 .L19:
103 addq %r15, %rdi
104 movq %r14, %rdx
105 movq %r10, %rsi
106 call __GI_memcpy@PLT
107 addq %r14, 8(%rbx)
108 testq %r12, %r12
109 jne .L21
110 movq %rbx, %rdi
111 .LEHB0:
112 call __GI___underflow
113 cmpl $-1, %eax
114 je .L21
115 movq 8(%rbx), %r10
116 movq 16(%rbx), %r14
117 movq %r13, %r15
118 subq %r10, %r14
119 .L22:
120 movl 28(%rsp), %esi
121 movq %r14, %rdx
122 movq %r10, %rdi
123 movq %r10, 16(%rsp)
124 call __GI_memchr
125 movq 16(%rsp), %r10
126 movq %rax, %r12
127 subq %r10, %rax
128 addq $1, %rax
129 testq %r12, %r12
130 cmovne %rax, %r14
131 movabsq $9223372036854775807, %rax
132 subq %r15, %rax
133 cmpq %r14, %rax
134 jg .L18
135 movq __libc_errno@gottpoff(%rip), %rax
136 movq $-1, %r13
137 movl $75, %fs:(%rax)
138 movl (%rbx), %eax
139 .L11:
140 testb $-128, %ah
141 jne .L1
142 movq 136(%rbx), %rdi
143 .L28:
144 movl 4(%rdi), %eax
145 subl $1, %eax
146 testl %eax, %eax
147 movl %eax, 4(%rdi)
148 jne .L1
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 .L23
157 subl $1, (%rdi)
158 jmp .L1
159 .p2align 4,,10
160 .p2align 3
161 .L5:
162 andl $32, %edx
163 je .L27
164 movq $-1, %r13
165 .L1:
166 addq $40, %rsp
167 movq %r13, %rax
168 popq %rbx
169 popq %rbp
170 popq %r12
171 popq %r13
172 popq %r14
173 popq %r15
175 .p2align 4,,10
176 .p2align 3
177 .L29:
178 movq $-1, %r13
179 jmp .L11
180 .p2align 4,,10
181 .p2align 3
182 .L40:
183 movl (%rbx), %eax
184 movq $-1, %r13
185 jmp .L11
186 .p2align 4,,10
187 .p2align 3
188 .L6:
189 addl $1, 4(%rdi)
190 andl $32, %edx
191 je .L27
192 movq $-1, %r13
193 jmp .L28
194 .p2align 4,,10
195 .p2align 3
196 .L21:
197 movq 0(%rbp), %rax
198 movb $0, (%rax,%r13)
199 movl (%rbx), %eax
200 jmp .L11
201 .p2align 4,,10
202 .p2align 3
203 .L42:
204 movq %rbx, %rdi
205 call __GI___underflow
206 cmpl $-1, %eax
207 je .L40
208 movq 8(%rbx), %r10
209 movq 16(%rbx), %r14
210 subq %r10, %r14
211 jmp .L14
212 .p2align 4,,10
213 .p2align 3
214 .L7:
215 movl %ecx, %eax
216 lock cmpxchgl %edx, (%rdi)
217 je .L8
218 call __lll_lock_wait_private
219 .LEHE0:
220 jmp .L8
221 .p2align 4,,10
222 .p2align 3
223 .L23:
224 #APP
225 # 885 "libioP.h" 1
226 xchgl %eax, (%rdi)
227 # 0 "" 2
228 #NO_APP
229 cmpl $1, %eax
230 jle .L1
231 xorl %r10d, %r10d
232 movl $1, %edx
233 movl $129, %esi
234 movl $202, %eax
235 #APP
236 # 885 "libioP.h" 1
237 syscall
239 # 0 "" 2
240 #NO_APP
241 jmp .L1
242 .L33:
243 movq __libc_errno@gottpoff(%rip), %rax
244 movq $-1, %r13
245 movl $22, %fs:(%rax)
246 jmp .L1
247 .L32:
248 testl $32768, (%rbx)
249 movq %rax, %r8
250 jne .L25
251 movq 136(%rbx), %rdi
252 movl 4(%rdi), %eax
253 subl $1, %eax
254 testl %eax, %eax
255 movl %eax, 4(%rdi)
256 jne .L25
257 movq $0, 8(%rdi)
258 #APP
259 # 885 "libioP.h" 1
260 movl %fs:24,%edx
261 # 0 "" 2
262 #NO_APP
263 testl %edx, %edx
264 jne .L26
265 subl $1, (%rdi)
266 .L25:
267 movq %r8, %rdi
268 .LEHB1:
269 call _Unwind_Resume@PLT
270 .LEHE1:
271 .L26:
272 #APP
273 # 885 "libioP.h" 1
274 xchgl %eax, (%rdi)
275 # 0 "" 2
276 #NO_APP
277 subl $1, %eax
278 jle .L25
279 xorl %r10d, %r10d
280 movl $1, %edx
281 movl $129, %esi
282 movl $202, %eax
283 #APP
284 # 885 "libioP.h" 1
285 syscall
287 # 0 "" 2
288 #NO_APP
289 jmp .L25
290 .LFE68:
291 .globl __gcc_personality_v0
292 .section .gcc_except_table,"a",@progbits
293 .LLSDA68:
294 .byte 0xff
295 .byte 0xff
296 .byte 0x1
297 .uleb128 .LLSDACSE68-.LLSDACSB68
298 .LLSDACSB68:
299 .uleb128 .LEHB0-.LFB68
300 .uleb128 .LEHE0-.LEHB0
301 .uleb128 .L32-.LFB68
302 .uleb128 0
303 .uleb128 .LEHB1-.LFB68
304 .uleb128 .LEHE1-.LEHB1
305 .uleb128 0
306 .uleb128 0
307 .LLSDACSE68:
308 .text
309 .size _IO_getdelim, .-_IO_getdelim
310 .weak getdelim
311 .set getdelim,_IO_getdelim
312 .weak __getdelim
313 .set __getdelim,_IO_getdelim
314 .hidden DW.ref.__gcc_personality_v0
315 .weak DW.ref.__gcc_personality_v0
316 .section .data.DW.ref.__gcc_personality_v0,"awG",@progbits,DW.ref.__gcc_personality_v0,comdat
317 .align 8
318 .type DW.ref.__gcc_personality_v0, @object
319 .size DW.ref.__gcc_personality_v0, 8
320 DW.ref.__gcc_personality_v0:
321 .quad __gcc_personality_v0
322 .hidden __lll_lock_wait_private