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