clarify the purpose of this project
[nyanglibc.git] / debug / fgetws_chk.shared.s
blob67c8a0477300fa6cf8c2a9976b8104422300f14a
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 __fgetws_chk
9 .type __fgetws_chk, @function
10 __fgetws_chk:
11 .LFB71:
12 testl %edx, %edx
13 jle .L16
14 pushq %r14
15 pushq %r13
16 movq %rdi, %r14
17 pushq %r12
18 pushq %rbp
19 movq %rcx, %rbp
20 pushq %rbx
21 movl %edx, %ebx
22 movl (%rcx), %edx
23 movq %rsi, %r12
24 movl %edx, %ecx
25 andl $32768, %ecx
26 jne .L3
27 movq 136(%rbp), %rdi
28 movq %fs:16, %r13
29 cmpq %r13, 8(%rdi)
30 je .L4
31 #APP
32 # 31 "fgetws_chk.c" 1
33 movl %fs:24,%eax
34 # 0 "" 2
35 #NO_APP
36 testl %eax, %eax
37 movl $1, %edx
38 jne .L5
39 #APP
40 # 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
41 cmpxchgl %edx, (%rdi)
42 # 0 "" 2
43 #NO_APP
44 .L6:
45 movq 136(%rbp), %rdi
46 movl 0(%rbp), %edx
47 movq %r13, 8(%rdi)
48 .L4:
49 addl $1, 4(%rdi)
50 .L3:
51 movl %edx, %r13d
52 andl $-33, %edx
53 movl $1, %r8d
54 movl %edx, 0(%rbp)
55 movslq %ebx, %rdx
56 andl $32, %r13d
57 subq $1, %rdx
58 movl $10, %ecx
59 movq %r14, %rsi
60 cmpq %r12, %rdx
61 movq %rbp, %rdi
62 cmova %r12, %rdx
63 .LEHB0:
64 call _IO_getwline@PLT
65 testq %rax, %rax
66 movl 0(%rbp), %edx
67 jne .L28
68 xorl %r8d, %r8d
69 .L9:
70 orl %edx, %r13d
71 movl %r13d, 0(%rbp)
72 andl $32768, %r13d
73 jne .L1
74 movq 136(%rbp), %rdi
75 movl 4(%rdi), %eax
76 subl $1, %eax
77 testl %eax, %eax
78 movl %eax, 4(%rdi)
79 jne .L1
80 movq $0, 8(%rdi)
81 #APP
82 # 885 "../libio/libioP.h" 1
83 movl %fs:24,%edx
84 # 0 "" 2
85 #NO_APP
86 testl %edx, %edx
87 jne .L12
88 subl $1, (%rdi)
89 .L1:
90 popq %rbx
91 movq %r8, %rax
92 popq %rbp
93 popq %r12
94 popq %r13
95 popq %r14
96 ret
97 .p2align 4,,10
98 .p2align 3
99 .L28:
100 testb $32, %dl
101 je .L10
102 movq __libc_errno@gottpoff(%rip), %rcx
103 xorl %r8d, %r8d
104 cmpl $11, %fs:(%rcx)
105 jne .L9
106 .L10:
107 cmpq %rax, %r12
108 jbe .L29
109 movl $0, (%r14,%rax,4)
110 movq %r14, %r8
111 movl 0(%rbp), %edx
112 jmp .L9
113 .p2align 4,,10
114 .p2align 3
115 .L16:
116 xorl %r8d, %r8d
117 movq %r8, %rax
119 .p2align 4,,10
120 .p2align 3
121 .L5:
122 movl %ecx, %eax
123 lock cmpxchgl %edx, (%rdi)
124 je .L6
125 call __lll_lock_wait_private
126 jmp .L6
127 .p2align 4,,10
128 .p2align 3
129 .L12:
130 #APP
131 # 885 "../libio/libioP.h" 1
132 xchgl %eax, (%rdi)
133 # 0 "" 2
134 #NO_APP
135 cmpl $1, %eax
136 jle .L1
137 xorl %r10d, %r10d
138 movl $1, %edx
139 movl $129, %esi
140 movl $202, %eax
141 #APP
142 # 885 "../libio/libioP.h" 1
143 syscall
145 # 0 "" 2
146 #NO_APP
147 jmp .L1
148 .L29:
149 call __GI___chk_fail
150 .LEHE0:
151 .L19:
152 testl $32768, 0(%rbp)
153 movq %rax, %r8
154 jne .L14
155 movq 136(%rbp), %rdi
156 movl 4(%rdi), %eax
157 subl $1, %eax
158 testl %eax, %eax
159 movl %eax, 4(%rdi)
160 jne .L14
161 movq $0, 8(%rdi)
162 #APP
163 # 885 "../libio/libioP.h" 1
164 movl %fs:24,%edx
165 # 0 "" 2
166 #NO_APP
167 testl %edx, %edx
168 jne .L15
169 subl $1, (%rdi)
170 .L14:
171 movq %r8, %rdi
172 .LEHB1:
173 call _Unwind_Resume@PLT
174 .LEHE1:
175 .L15:
176 #APP
177 # 885 "../libio/libioP.h" 1
178 xchgl %eax, (%rdi)
179 # 0 "" 2
180 #NO_APP
181 subl $1, %eax
182 jle .L14
183 xorl %r10d, %r10d
184 movl $1, %edx
185 movl $129, %esi
186 movl $202, %eax
187 #APP
188 # 885 "../libio/libioP.h" 1
189 syscall
191 # 0 "" 2
192 #NO_APP
193 jmp .L14
194 .LFE71:
195 .globl __gcc_personality_v0
196 .section .gcc_except_table,"a",@progbits
197 .LLSDA71:
198 .byte 0xff
199 .byte 0xff
200 .byte 0x1
201 .uleb128 .LLSDACSE71-.LLSDACSB71
202 .LLSDACSB71:
203 .uleb128 .LEHB0-.LFB71
204 .uleb128 .LEHE0-.LEHB0
205 .uleb128 .L19-.LFB71
206 .uleb128 0
207 .uleb128 .LEHB1-.LFB71
208 .uleb128 .LEHE1-.LEHB1
209 .uleb128 0
210 .uleb128 0
211 .LLSDACSE71:
212 .text
213 .size __fgetws_chk, .-__fgetws_chk
214 .hidden DW.ref.__gcc_personality_v0
215 .weak DW.ref.__gcc_personality_v0
216 .section .data.DW.ref.__gcc_personality_v0,"awG",@progbits,DW.ref.__gcc_personality_v0,comdat
217 .align 8
218 .type DW.ref.__gcc_personality_v0, @object
219 .size DW.ref.__gcc_personality_v0, 8
220 DW.ref.__gcc_personality_v0:
221 .quad __gcc_personality_v0
222 .hidden __lll_lock_wait_private