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