clarify the purpose of this project
[nyanglibc.git] / libio / ioungetwc.s
blob2f4d2e2f050dbe0057ac0cef7338d46536af8ae6
1 .text
2 .p2align 4,,15
3 .globl ungetwc
4 .type ungetwc, @function
5 ungetwc:
6 .LFB71:
7 pushq %r12
8 pushq %rbp
9 movl %edi, %ebp
10 pushq %rbx
11 movl (%rsi), %edx
12 movq %rsi, %rbx
13 andl $32768, %edx
14 jne .L2
15 movq 136(%rsi), %rdi
16 movq %fs:16, %r12
17 cmpq %r12, 8(%rdi)
18 je .L3
19 #APP
20 # 35 "ioungetwc.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, (%rdi)
30 # 0 "" 2
31 #NO_APP
32 .L5:
33 movq 136(%rbx), %rdi
34 movq %r12, 8(%rdi)
35 .L3:
36 addl $1, 4(%rdi)
37 .L2:
38 movl $1, %esi
39 movq %rbx, %rdi
40 call _IO_fwide@PLT
41 movl $-1, %r8d
42 cmpl %r8d, %ebp
43 je .L8
44 movl %ebp, %esi
45 movq %rbx, %rdi
46 call _IO_sputbackwc
47 movl %eax, %r8d
48 .L8:
49 testl $32768, (%rbx)
50 jne .L1
51 movq 136(%rbx), %rdi
52 movl 4(%rdi), %eax
53 subl $1, %eax
54 testl %eax, %eax
55 movl %eax, 4(%rdi)
56 jne .L1
57 movq $0, 8(%rdi)
58 #APP
59 # 885 "libioP.h" 1
60 movl %fs:24,%edx
61 # 0 "" 2
62 #NO_APP
63 testl %edx, %edx
64 jne .L12
65 subl $1, (%rdi)
66 .L1:
67 popq %rbx
68 movl %r8d, %eax
69 popq %rbp
70 popq %r12
71 ret
72 .p2align 4,,10
73 .p2align 3
74 .L4:
75 movl $1, %ecx
76 movl %edx, %eax
77 lock cmpxchgl %ecx, (%rdi)
78 je .L5
79 .LEHB0:
80 call __lll_lock_wait_private
81 .LEHE0:
82 jmp .L5
83 .p2align 4,,10
84 .p2align 3
85 .L12:
86 #APP
87 # 885 "libioP.h" 1
88 xchgl %eax, (%rdi)
89 # 0 "" 2
90 #NO_APP
91 cmpl $1, %eax
92 jle .L1
93 xorl %r10d, %r10d
94 movl $1, %edx
95 movl $129, %esi
96 movl $202, %eax
97 #APP
98 # 885 "libioP.h" 1
99 syscall
101 # 0 "" 2
102 #NO_APP
103 jmp .L1
104 .L17:
105 testl $32768, (%rbx)
106 movq %rax, %r8
107 jne .L14
108 movq 136(%rbx), %rdi
109 movl 4(%rdi), %eax
110 subl $1, %eax
111 testl %eax, %eax
112 movl %eax, 4(%rdi)
113 jne .L14
114 movq $0, 8(%rdi)
115 #APP
116 # 885 "libioP.h" 1
117 movl %fs:24,%edx
118 # 0 "" 2
119 #NO_APP
120 testl %edx, %edx
121 jne .L15
122 subl $1, (%rdi)
123 .L14:
124 movq %r8, %rdi
125 .LEHB1:
126 call _Unwind_Resume@PLT
127 .LEHE1:
128 .L15:
129 #APP
130 # 885 "libioP.h" 1
131 xchgl %eax, (%rdi)
132 # 0 "" 2
133 #NO_APP
134 subl $1, %eax
135 jle .L14
136 xorl %r10d, %r10d
137 movl $1, %edx
138 movl $129, %esi
139 movl $202, %eax
140 #APP
141 # 885 "libioP.h" 1
142 syscall
144 # 0 "" 2
145 #NO_APP
146 jmp .L14
147 .LFE71:
148 .globl __gcc_personality_v0
149 .section .gcc_except_table,"a",@progbits
150 .LLSDA71:
151 .byte 0xff
152 .byte 0xff
153 .byte 0x1
154 .uleb128 .LLSDACSE71-.LLSDACSB71
155 .LLSDACSB71:
156 .uleb128 .LEHB0-.LFB71
157 .uleb128 .LEHE0-.LEHB0
158 .uleb128 .L17-.LFB71
159 .uleb128 0
160 .uleb128 .LEHB1-.LFB71
161 .uleb128 .LEHE1-.LEHB1
162 .uleb128 0
163 .uleb128 0
164 .LLSDACSE71:
165 .text
166 .size ungetwc, .-ungetwc
167 .hidden DW.ref.__gcc_personality_v0
168 .weak DW.ref.__gcc_personality_v0
169 .section .data.DW.ref.__gcc_personality_v0,"awG",@progbits,DW.ref.__gcc_personality_v0,comdat
170 .align 8
171 .type DW.ref.__gcc_personality_v0, @object
172 .size DW.ref.__gcc_personality_v0, 8
173 DW.ref.__gcc_personality_v0:
174 .quad __gcc_personality_v0
175 .hidden __lll_lock_wait_private
176 .hidden _IO_sputbackwc