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