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