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