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