clarify the purpose of this project
[nyanglibc.git] / libio / iofgetpos.s
blob4e0639dcffa6172a998e277d5a4f0ba94bde6574
1 .text
2 .p2align 4,,15
3 .globl _IO_new_fgetpos
4 .type _IO_new_fgetpos, @function
5 _IO_new_fgetpos:
6 .LFB68:
7 pushq %r12
8 pushq %rbp
9 movq %rsi, %rbp
10 pushq %rbx
11 movl (%rdi), %edx
12 movq %rdi, %rbx
13 andl $32768, %edx
14 jne .L2
15 movq 136(%rdi), %rdi
16 movq %fs:16, %r12
17 cmpq %r12, 8(%rdi)
18 je .L3
19 #APP
20 # 50 "iofgetpos.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 xorl %ecx, %ecx
39 movl $1, %edx
40 xorl %esi, %esi
41 movq %rbx, %rdi
42 .LEHB0:
43 call _IO_seekoff_unlocked
44 movl (%rbx), %edx
45 movl %edx, %r8d
46 andl $256, %r8d
47 je .L8
48 cmpq $-1, %rax
49 je .L9
50 movl 192(%rbx), %esi
51 testl %esi, %esi
52 jle .L34
53 movq %rax, 0(%rbp)
54 .L21:
55 movq 152(%rbx), %rdi
56 call __libio_codecvt_encoding
57 xorl %r8d, %r8d
58 testl %eax, %eax
59 movl (%rbx), %edx
60 jns .L13
61 movq 160(%rbx), %rax
62 movq 88(%rax), %rax
63 movq %rax, 8(%rbp)
64 jmp .L13
65 .p2align 4,,10
66 .p2align 3
67 .L8:
68 cmpq $-1, %rax
69 je .L9
70 movq %rax, 0(%rbp)
71 movl 192(%rbx), %eax
72 testl %eax, %eax
73 jg .L21
74 .L13:
75 andb $-128, %dh
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 popq %rbx
94 movl %r8d, %eax
95 popq %rbp
96 popq %r12
97 ret
98 .p2align 4,,10
99 .p2align 3
100 .L9:
101 movq __libc_errno@gottpoff(%rip), %rax
102 movl $-1, %r8d
103 movl %fs:(%rax), %ecx
104 testl %ecx, %ecx
105 jne .L13
106 movl $5, %fs:(%rax)
107 jmp .L13
108 .p2align 4,,10
109 .p2align 3
110 .L34:
111 movq 88(%rbx), %rcx
112 subq 72(%rbx), %rcx
113 subq %rcx, %rax
114 cmpq $-1, %rax
115 je .L9
116 movq %rax, 0(%rbp)
117 xorl %r8d, %r8d
118 jmp .L13
119 .p2align 4,,10
120 .p2align 3
121 .L4:
122 movl $1, %ecx
123 movl %edx, %eax
124 lock cmpxchgl %ecx, (%rdi)
125 je .L5
126 call __lll_lock_wait_private
127 .LEHE0:
128 jmp .L5
129 .p2align 4,,10
130 .p2align 3
131 .L17:
132 #APP
133 # 885 "libioP.h" 1
134 xchgl %eax, (%rdi)
135 # 0 "" 2
136 #NO_APP
137 cmpl $1, %eax
138 jle .L1
139 xorl %r10d, %r10d
140 movl $1, %edx
141 movl $129, %esi
142 movl $202, %eax
143 #APP
144 # 885 "libioP.h" 1
145 syscall
147 # 0 "" 2
148 #NO_APP
149 jmp .L1
150 .L24:
151 testl $32768, (%rbx)
152 movq %rax, %r8
153 jne .L19
154 movq 136(%rbx), %rdi
155 movl 4(%rdi), %eax
156 subl $1, %eax
157 testl %eax, %eax
158 movl %eax, 4(%rdi)
159 jne .L19
160 movq $0, 8(%rdi)
161 #APP
162 # 885 "libioP.h" 1
163 movl %fs:24,%edx
164 # 0 "" 2
165 #NO_APP
166 testl %edx, %edx
167 jne .L20
168 subl $1, (%rdi)
169 .L19:
170 movq %r8, %rdi
171 .LEHB1:
172 call _Unwind_Resume@PLT
173 .LEHE1:
174 .L20:
175 #APP
176 # 885 "libioP.h" 1
177 xchgl %eax, (%rdi)
178 # 0 "" 2
179 #NO_APP
180 subl $1, %eax
181 jle .L19
182 xorl %r10d, %r10d
183 movl $1, %edx
184 movl $129, %esi
185 movl $202, %eax
186 #APP
187 # 885 "libioP.h" 1
188 syscall
190 # 0 "" 2
191 #NO_APP
192 jmp .L19
193 .LFE68:
194 .globl __gcc_personality_v0
195 .section .gcc_except_table,"a",@progbits
196 .LLSDA68:
197 .byte 0xff
198 .byte 0xff
199 .byte 0x1
200 .uleb128 .LLSDACSE68-.LLSDACSB68
201 .LLSDACSB68:
202 .uleb128 .LEHB0-.LFB68
203 .uleb128 .LEHE0-.LEHB0
204 .uleb128 .L24-.LFB68
205 .uleb128 0
206 .uleb128 .LEHB1-.LFB68
207 .uleb128 .LEHE1-.LEHB1
208 .uleb128 0
209 .uleb128 0
210 .LLSDACSE68:
211 .text
212 .size _IO_new_fgetpos, .-_IO_new_fgetpos
213 .globl _IO_new_fgetpos64
214 .set _IO_new_fgetpos64,_IO_new_fgetpos
215 .weak _IO_fgetpos64
216 .set _IO_fgetpos64,_IO_new_fgetpos64
217 .globl __new_fgetpos64
218 .set __new_fgetpos64,_IO_new_fgetpos64
219 .weak fgetpos64
220 .set fgetpos64,__new_fgetpos64
221 .weak _IO_fgetpos
222 .set _IO_fgetpos,_IO_new_fgetpos
223 .globl __new_fgetpos
224 .set __new_fgetpos,_IO_new_fgetpos
225 .weak fgetpos
226 .set fgetpos,__new_fgetpos
227 .hidden DW.ref.__gcc_personality_v0
228 .weak DW.ref.__gcc_personality_v0
229 .section .data.DW.ref.__gcc_personality_v0,"awG",@progbits,DW.ref.__gcc_personality_v0,comdat
230 .align 8
231 .type DW.ref.__gcc_personality_v0, @object
232 .size DW.ref.__gcc_personality_v0, 8
233 DW.ref.__gcc_personality_v0:
234 .quad __gcc_personality_v0
235 .hidden __lll_lock_wait_private
236 .hidden __libio_codecvt_encoding
237 .hidden _IO_seekoff_unlocked