clarify the purpose of this project
[nyanglibc.git] / libio / putwchar.s
blob46b50c87ac0fa3d11c77da9f86561046bfb97bb4
1 .text
2 .p2align 4,,15
3 .globl putwchar
4 .type putwchar, @function
5 putwchar:
6 .LFB71:
7 pushq %r12
8 pushq %rbp
9 movl %edi, %ebp
10 pushq %rbx
11 movq stdout(%rip), %rbx
12 movl (%rbx), %edx
13 andl $32768, %edx
14 jne .L18
15 movq 136(%rbx), %rcx
16 movq %fs:16, %r12
17 cmpq %r12, 8(%rcx)
18 je .L19
19 #APP
20 # 25 "putwchar.c" 1
21 movl %fs:24,%eax
22 # 0 "" 2
23 #NO_APP
24 testl %eax, %eax
25 jne .L4
26 movl $1, %edx
27 #APP
28 # 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
29 cmpxchgl %edx, (%rcx)
30 # 0 "" 2
31 #NO_APP
32 .L5:
33 movq 136(%rbx), %rcx
34 movq stdout(%rip), %rdi
35 movq %r12, 8(%rcx)
36 .L3:
37 movq 160(%rdi), %rax
38 addl $1, 4(%rcx)
39 movl %ebp, %r8d
40 testq %rax, %rax
41 jne .L26
42 .L8:
43 movl %ebp, %esi
44 .LEHB0:
45 call __woverflow
46 testl $32768, (%rbx)
47 movl %eax, %r8d
48 je .L27
49 .L1:
50 popq %rbx
51 movl %r8d, %eax
52 popq %rbp
53 popq %r12
54 ret
55 .p2align 4,,10
56 .p2align 3
57 .L18:
58 movq %rbx, %rdi
59 movl %ebp, %r8d
60 movq 160(%rdi), %rax
61 testq %rax, %rax
62 je .L8
63 .L26:
64 movq 32(%rax), %rdx
65 cmpq 40(%rax), %rdx
66 jnb .L8
67 leaq 4(%rdx), %rcx
68 movq %rcx, 32(%rax)
69 movl %ebp, (%rdx)
70 testl $32768, (%rbx)
71 jne .L1
72 .L27:
73 movq 136(%rbx), %rdi
74 movl 4(%rdi), %eax
75 subl $1, %eax
76 testl %eax, %eax
77 movl %eax, 4(%rdi)
78 jne .L1
79 movq $0, 8(%rdi)
80 #APP
81 # 885 "libioP.h" 1
82 movl %fs:24,%edx
83 # 0 "" 2
84 #NO_APP
85 testl %edx, %edx
86 jne .L14
87 subl $1, (%rdi)
88 movl %r8d, %eax
89 popq %rbx
90 popq %rbp
91 popq %r12
92 ret
93 .p2align 4,,10
94 .p2align 3
95 .L19:
96 movq %rbx, %rdi
97 jmp .L3
98 .p2align 4,,10
99 .p2align 3
100 .L4:
101 movl $1, %esi
102 movl %edx, %eax
103 lock cmpxchgl %esi, (%rcx)
104 je .L5
105 movq %rcx, %rdi
106 call __lll_lock_wait_private
107 .LEHE0:
108 jmp .L5
109 .p2align 4,,10
110 .p2align 3
111 .L14:
112 #APP
113 # 885 "libioP.h" 1
114 xchgl %eax, (%rdi)
115 # 0 "" 2
116 #NO_APP
117 cmpl $1, %eax
118 jle .L1
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 .L1
130 .L20:
131 testl $32768, (%rbx)
132 movq %rax, %r8
133 jne .L16
134 movq 136(%rbx), %rdi
135 movl 4(%rdi), %eax
136 subl $1, %eax
137 testl %eax, %eax
138 movl %eax, 4(%rdi)
139 jne .L16
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 .L17
148 subl $1, (%rdi)
149 .L16:
150 movq %r8, %rdi
151 .LEHB1:
152 call _Unwind_Resume@PLT
153 .LEHE1:
154 .L17:
155 #APP
156 # 885 "libioP.h" 1
157 xchgl %eax, (%rdi)
158 # 0 "" 2
159 #NO_APP
160 subl $1, %eax
161 jle .L16
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 .L16
173 .LFE71:
174 .globl __gcc_personality_v0
175 .section .gcc_except_table,"a",@progbits
176 .LLSDA71:
177 .byte 0xff
178 .byte 0xff
179 .byte 0x1
180 .uleb128 .LLSDACSE71-.LLSDACSB71
181 .LLSDACSB71:
182 .uleb128 .LEHB0-.LFB71
183 .uleb128 .LEHE0-.LEHB0
184 .uleb128 .L20-.LFB71
185 .uleb128 0
186 .uleb128 .LEHB1-.LFB71
187 .uleb128 .LEHE1-.LEHB1
188 .uleb128 0
189 .uleb128 0
190 .LLSDACSE71:
191 .text
192 .size putwchar, .-putwchar
193 .hidden DW.ref.__gcc_personality_v0
194 .weak DW.ref.__gcc_personality_v0
195 .section .data.DW.ref.__gcc_personality_v0,"awG",@progbits,DW.ref.__gcc_personality_v0,comdat
196 .align 8
197 .type DW.ref.__gcc_personality_v0, @object
198 .size DW.ref.__gcc_personality_v0, 8
199 DW.ref.__gcc_personality_v0:
200 .quad __gcc_personality_v0
201 .hidden __lll_lock_wait_private
202 .hidden __woverflow