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