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