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