clarify the purpose of this project
[nyanglibc.git] / time / era.s
blob09f42d553fc7b50649bec14d1cb79c5fb7a59715
1 .text
2 .p2align 4,,15
3 .type _nl_init_era_entries.part.0, @function
4 _nl_init_era_entries.part.0:
5 cmpq $0, __pthread_rwlock_wrlock@GOTPCREL(%rip)
6 pushq %r14
7 pushq %r13
8 pushq %r12
9 pushq %rbp
10 movq %rdi, %rbp
11 pushq %rbx
12 je .L2
13 leaq __libc_setlocale_lock(%rip), %rdi
14 call __pthread_rwlock_wrlock@PLT
15 .L2:
16 movq 40(%rbp), %r13
17 testq %r13, %r13
18 je .L28
19 .L3:
20 movl 16(%r13), %eax
21 testl %eax, %eax
22 jne .L5
23 movl 464(%rbp), %r14d
24 movq 0(%r13), %rdi
25 testq %r14, %r14
26 jne .L7
27 testq %rdi, %rdi
28 je .L9
29 call free@PLT
30 movq $0, 0(%r13)
31 .L9:
32 movl $1, 16(%r13)
33 .L5:
34 cmpq $0, __pthread_rwlock_unlock@GOTPCREL(%rip)
35 je .L1
36 popq %rbx
37 popq %rbp
38 popq %r12
39 popq %r13
40 popq %r14
41 leaq __libc_setlocale_lock(%rip), %rdi
42 jmp __pthread_rwlock_unlock@PLT
43 .p2align 4,,10
44 .p2align 3
45 .L1:
46 popq %rbx
47 popq %rbp
48 popq %r12
49 popq %r13
50 popq %r14
51 ret
52 .p2align 4,,10
53 .p2align 3
54 .L7:
55 cmpq 8(%r13), %r14
56 jne .L29
57 testq %rdi, %rdi
58 je .L30
59 .L11:
60 leaq (%r14,%r14,8), %rax
61 movq 472(%rbp), %r12
62 movq %rdi, %rbx
63 movq %r14, 8(%r13)
64 movq %rdi, 0(%r13)
65 leaq (%rdi,%rax,8), %rbp
66 jmp .L17
67 .p2align 4,,10
68 .p2align 3
69 .L32:
70 je .L31
71 .L13:
72 xorl %eax, %eax
73 cmpl $43, (%rbx)
74 setne %al
75 leal -1(%rax,%rax), %eax
76 movl %eax, 64(%rbx)
77 .L15:
78 leaq 32(%r12), %r14
79 addq $72, %rbx
80 movq %r14, -40(%rbx)
81 movq %r14, %rdi
82 call strlen@PLT
83 leaq 1(%r14,%rax), %r14
84 movq %r14, -32(%rbx)
85 movq %r14, %rdi
86 call strlen@PLT
87 leaq 1(%r14,%rax), %rax
88 xorl %esi, %esi
89 movq %rax, %rdi
90 subq %r12, %rdi
91 addq $3, %rdi
92 notq %rdi
93 andl $3, %edi
94 addq %rax, %rdi
95 movq %rdi, -24(%rbx)
96 call __wcschr
97 leaq 4(%rax), %rdi
98 xorl %esi, %esi
99 movq %rdi, -16(%rbx)
100 call __wcschr
101 cmpq %rbx, %rbp
102 leaq 4(%rax), %r12
103 je .L9
104 .L17:
105 movdqu (%r12), %xmm0
106 movups %xmm0, (%rbx)
107 movdqu 16(%r12), %xmm0
108 movups %xmm0, 16(%rbx)
109 movl 20(%rbx), %eax
110 cmpl %eax, 8(%rbx)
111 jge .L32
112 .L12:
113 xorl %eax, %eax
114 cmpl $43, (%rbx)
115 sete %al
116 leal -1(%rax,%rax), %eax
117 movl %eax, 64(%rbx)
118 jmp .L15
119 .p2align 4,,10
120 .p2align 3
121 .L29:
122 leaq (%r14,%r14,8), %rsi
123 salq $3, %rsi
124 call realloc@PLT
125 movq %rax, %rdi
126 testq %rdi, %rdi
127 jne .L11
128 jmp .L30
129 .p2align 4,,10
130 .p2align 3
131 .L31:
132 movl 24(%rbx), %eax
133 cmpl %eax, 12(%rbx)
134 jl .L12
135 jne .L13
136 movl 28(%rbx), %eax
137 cmpl %eax, 16(%rbx)
138 jg .L13
139 jmp .L12
140 .p2align 4,,10
141 .p2align 3
142 .L28:
143 movl $1, %esi
144 movl $48, %edi
145 call calloc@PLT
146 testq %rax, %rax
147 movq %rax, %r13
148 movq %rax, 40(%rbp)
149 je .L5
150 leaq _nl_cleanup_time(%rip), %rax
151 movq %rax, 32(%rbp)
152 jmp .L3
153 .p2align 4,,10
154 .p2align 3
155 .L30:
156 movq 0(%r13), %rdi
157 call free@PLT
158 movq $0, 8(%r13)
159 movq $0, 0(%r13)
160 jmp .L9
161 .size _nl_init_era_entries.part.0, .-_nl_init_era_entries.part.0
162 .p2align 4,,15
163 .globl _nl_get_era_entry
164 .hidden _nl_get_era_entry
165 .type _nl_get_era_entry, @function
166 _nl_get_era_entry:
167 pushq %rbx
168 movq %rdi, %rbx
169 subq $16, %rsp
170 movq 40(%rsi), %rax
171 testq %rax, %rax
172 je .L34
173 movl 16(%rax), %ecx
174 testl %ecx, %ecx
175 je .L35
176 .L36:
177 movq 8(%rax), %r8
178 movl 20(%rbx), %esi
179 movl 16(%rbx), %r9d
180 movl 12(%rbx), %r10d
181 testq %r8, %r8
182 je .L37
183 movq (%rax), %rdx
184 xorl %ecx, %ecx
185 jmp .L46
186 .p2align 4,,10
187 .p2align 3
188 .L63:
189 je .L60
190 .L39:
191 cmpl 20(%rdx), %esi
192 jle .L61
193 .L44:
194 cmpl %edi, %esi
195 jl .L33
196 .L65:
197 je .L62
198 .L45:
199 addq $1, %rcx
200 addq $72, %rdx
201 cmpq %r8, %rcx
202 je .L37
203 .L46:
204 movl 8(%rdx), %edi
205 movq %rdx, %rax
206 cmpl %edi, %esi
207 jle .L63
208 .L38:
209 cmpl 20(%rdx), %esi
210 jl .L33
211 je .L64
212 .L42:
213 jle .L45
214 cmpl %edi, %esi
215 jge .L65
216 .L33:
217 addq $16, %rsp
218 popq %rbx
220 .p2align 4,,10
221 .p2align 3
222 .L64:
223 cmpl 24(%rdx), %r9d
224 jl .L33
225 jne .L42
226 cmpl 28(%rdx), %r10d
227 jle .L33
228 .L43:
229 cmpl 28(%rdx), %r10d
230 jge .L44
231 addq $1, %rcx
232 addq $72, %rdx
233 cmpq %r8, %rcx
234 jne .L46
235 .p2align 4,,10
236 .p2align 3
237 .L37:
238 xorl %eax, %eax
239 .L66:
240 addq $16, %rsp
241 popq %rbx
243 .p2align 4,,10
244 .p2align 3
245 .L62:
246 cmpl 12(%rdx), %r9d
247 jl .L33
248 jne .L45
249 cmpl 16(%rdx), %r10d
250 jg .L45
251 jmp .L33
252 .p2align 4,,10
253 .p2align 3
254 .L60:
255 cmpl 12(%rdx), %r9d
256 jg .L38
257 jne .L39
258 cmpl 16(%rdx), %r10d
259 jge .L38
260 cmpl 20(%rdx), %esi
261 jg .L44
262 .p2align 4,,10
263 .p2align 3
264 .L61:
265 jne .L45
266 cmpl 24(%rdx), %r9d
267 jg .L44
268 jne .L45
269 jmp .L43
270 .p2align 4,,10
271 .p2align 3
272 .L35:
273 movl 464(%rsi), %edx
274 testl %edx, %edx
275 je .L36
276 jmp .L47
277 .p2align 4,,10
278 .p2align 3
279 .L34:
280 movl 464(%rsi), %eax
281 testl %eax, %eax
282 je .L37
283 .L47:
284 movq %rsi, %rdi
285 movq %rsi, 8(%rsp)
286 call _nl_init_era_entries.part.0
287 movq 8(%rsp), %rsi
288 movq 40(%rsi), %rax
289 testq %rax, %rax
290 jne .L36
291 xorl %eax, %eax
292 jmp .L66
293 .size _nl_get_era_entry, .-_nl_get_era_entry
294 .p2align 4,,15
295 .globl _nl_select_era_entry
296 .hidden _nl_select_era_entry
297 .type _nl_select_era_entry, @function
298 _nl_select_era_entry:
299 pushq %rbx
300 movl %edi, %ebx
301 subq $16, %rsp
302 movq 40(%rsi), %rax
303 testq %rax, %rax
304 je .L68
305 movl 16(%rax), %ecx
306 testl %ecx, %ecx
307 je .L69
308 .L70:
309 movslq %ebx, %rdi
310 movq (%rax), %rax
311 leaq (%rdi,%rdi,8), %rdx
312 leaq (%rax,%rdx,8), %rax
313 .L67:
314 addq $16, %rsp
315 popq %rbx
317 .p2align 4,,10
318 .p2align 3
319 .L69:
320 movl 464(%rsi), %edx
321 testl %edx, %edx
322 je .L70
323 jmp .L72
324 .p2align 4,,10
325 .p2align 3
326 .L68:
327 movl 464(%rsi), %eax
328 testl %eax, %eax
329 je .L73
330 .L72:
331 movq %rsi, %rdi
332 movq %rsi, 8(%rsp)
333 call _nl_init_era_entries.part.0
334 movq 8(%rsp), %rsi
335 movq 40(%rsi), %rax
336 testq %rax, %rax
337 jne .L70
338 .p2align 4,,10
339 .p2align 3
340 .L73:
341 xorl %eax, %eax
342 jmp .L67
343 .size _nl_select_era_entry, .-_nl_select_era_entry
344 .weak __pthread_rwlock_unlock
345 .weak __pthread_rwlock_wrlock
346 .hidden _nl_cleanup_time
347 .hidden __wcschr
348 .hidden __libc_setlocale_lock