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