clarify the purpose of this project
[nyanglibc.git] / time / tzset.shared.s.in
blob223a381e89b04f458f5f6710def817e6b7be6a8d
1 .file "tzset.c"
2 .text
3 #APP
4 memmove = __GI_memmove
5 memset = __GI_memset
6 memcpy = __GI_memcpy
7 #NO_APP
8 .p2align 4,,15
9 .type compute_change, @function
10 compute_change:
11 cmpl $-1, %esi
12 je .L17
13 cmpl %esi, 40(%rdi)
14 je .L23
15 cmpl $1970, %esi
16 jle .L17
17 leal -1970(%rsi), %eax
18 leal -1(%rsi), %edx
19 movl $1374389535, %r8d
20 imull $365, %eax, %eax
21 movl %edx, %ecx
22 sarl $2, %ecx
23 leal -492(%rax,%rcx), %ecx
24 movl %edx, %eax
25 mull %r8d
26 movl %edx, %eax
27 shrl $7, %edx
28 shrl $5, %eax
29 subl %eax, %ecx
30 leal 15(%rcx,%rdx), %ecx
31 movslq %ecx, %rcx
32 imulq $86400, %rcx, %rcx
33 .L2:
34 movl 8(%rdi), %eax
35 pushq %r15
36 pushq %r14
37 pushq %r13
38 pushq %r12
39 pushq %rbp
40 cmpl $1, %eax
41 pushq %rbx
42 je .L5
43 jb .L6
44 cmpl $2, %eax
45 jne .L4
46 testb $3, %sil
47 jne .L18
48 movl %esi, %eax
49 movl $1374389535, %edx
50 imull %edx
51 movl %esi, %eax
52 sarl $31, %eax
53 movl %edx, %r8d
54 sarl $5, %r8d
55 subl %eax, %r8d
56 imull $100, %r8d, %r8d
57 cmpl %r8d, %esi
58 jne .L19
59 sarl $7, %edx
60 movl %esi, %ebx
61 subl %eax, %edx
62 imull $400, %edx, %eax
63 subl %eax, %ebx
64 cmpl $1, %ebx
65 sbbq %rdx, %rdx
66 xorl %r8d, %r8d
67 andl $13, %edx
68 testl %ebx, %ebx
69 sete %r8b
70 .L9:
71 movzwl 12(%rdi), %r11d
72 leaq __mon_yday(%rip), %rbx
73 movl %esi, %r15d
74 movzwl %r11w, %eax
75 addq %rdx, %rax
76 movl $-1431655765, %edx
77 movzwl -2(%rbx,%rax,2), %r9d
78 movq %r9, %r10
79 imulq $86400, %r9, %r9
80 addq %rcx, %r9
81 leal 9(%r11), %ecx
82 movl %ecx, %eax
83 mull %edx
84 shrl $3, %edx
85 leal (%rdx,%rdx,2), %eax
86 sall $2, %eax
87 subl %eax, %ecx
88 cmpw $3, %r11w
89 sbbl $0, %r15d
90 leal 1(%rcx), %r14d
91 movl $1374389535, %ecx
92 movl %r15d, %eax
93 movl %r15d, %r13d
94 imull %ecx
95 sarl $31, %r13d
96 movl %edx, %ecx
97 movl %edx, %r12d
98 imull $26, %r14d, %edx
99 sarl $5, %r12d
100 movl $-858993459, %r14d
101 movl %r12d, %ebp
102 subl %r13d, %ebp
103 subl $2, %edx
104 movl %edx, %eax
105 imull $100, %ebp, %ebp
106 mull %r14d
107 subl %ebp, %r15d
108 shrl $3, %edx
109 movl %r15d, %ebp
110 testl %r15d, %r15d
111 leal 1(%r15,%rdx), %eax
112 leal 3(%r15), %edx
113 cmovs %edx, %ebp
114 sarl $7, %ecx
115 subl %r13d, %r12d
116 sarl $2, %ebp
117 subl %r13d, %ecx
118 addl %r12d, %r12d
119 addl %eax, %ebp
120 movl $-1840700269, %edx
121 addl %ebp, %ecx
122 movzwl 14(%rdi), %ebp
123 subl %r12d, %ecx
124 movl %ecx, %eax
125 imull %edx
126 leal (%rdx,%rcx), %eax
127 movl %ecx, %edx
128 sarl $31, %edx
129 sarl $2, %eax
130 subl %edx, %eax
131 leal 0(,%rax,8), %edx
132 subl %eax, %edx
133 subl %edx, %ecx
134 leal 7(%rcx), %edx
135 testl %ecx, %ecx
136 movl %ecx, %eax
137 cmovs %edx, %eax
138 movzwl 16(%rdi), %edx
139 subl %eax, %edx
140 leal 7(%rdx), %eax
141 testl %edx, %edx
142 cmovs %eax, %edx
143 cmpl $1, %ebp
144 jbe .L13
145 leaq (%r8,%r8,2), %rcx
146 movslq %r11d, %r11
147 leal 7(%rdx), %eax
148 leaq (%r8,%rcx,4), %rcx
149 addq %rcx, %r11
150 movzwl (%rbx,%r11,2), %ecx
151 subl %r10d, %ecx
152 cmpl %eax, %ecx
153 jle .L13
154 leal 0(,%rbp,8), %r8d
155 subl %ebp, %r8d
156 leal -7(%rdx,%r8), %r8d
157 jmp .L14
158 .p2align 4,,10
159 .p2align 3
160 .L15:
161 addl $7, %eax
162 cmpl %eax, %ecx
163 jle .L13
164 .L14:
165 cmpl %eax, %r8d
166 movl %eax, %edx
167 jne .L15
168 .L13:
169 movslq %edx, %rcx
170 imulq $86400, %rcx, %rcx
171 addq %r9, %rcx
172 .L4:
173 movslq 24(%rdi), %rax
174 movl %esi, 40(%rdi)
175 popq %rbx
176 popq %rbp
177 popq %r12
178 subq %rax, %rcx
179 movslq 20(%rdi), %rax
180 popq %r13
181 popq %r14
182 popq %r15
183 addq %rax, %rcx
184 movq %rcx, 32(%rdi)
186 .p2align 4,,10
187 .p2align 3
188 .L17:
189 xorl %ecx, %ecx
190 jmp .L2
191 .p2align 4,,10
192 .p2align 3
193 .L6:
194 movzwl 16(%rdi), %eax
195 imulq $86400, %rax, %rax
196 addq %rax, %rcx
197 jmp .L4
198 .p2align 4,,10
199 .p2align 3
200 .L5:
201 movzwl 16(%rdi), %eax
202 movl %eax, %edx
203 subl $1, %eax
204 cltq
205 imulq $86400, %rax, %rax
206 addq %rax, %rcx
207 cmpw $59, %dx
208 jbe .L4
209 testb $3, %sil
210 jne .L4
211 movl %esi, %eax
212 movl $1374389535, %edx
213 movl %esi, %r8d
214 imull %edx
215 sarl $31, %r8d
216 movl %edx, %eax
217 sarl $5, %eax
218 subl %r8d, %eax
219 imull $100, %eax, %eax
220 cmpl %eax, %esi
221 je .L26
222 .L8:
223 addq $86400, %rcx
224 jmp .L4
225 .p2align 4,,10
226 .p2align 3
227 .L18:
228 xorl %edx, %edx
229 xorl %r8d, %r8d
230 jmp .L9
231 .p2align 4,,10
232 .p2align 3
233 .L19:
234 movl $13, %edx
235 movl $1, %r8d
236 jmp .L9
237 .L23:
239 .p2align 4,,10
240 .p2align 3
241 .L26:
242 sarl $7, %edx
243 subl %r8d, %edx
244 imull $400, %edx, %eax
245 cmpl %eax, %esi
246 jne .L4
247 jmp .L8
248 .size compute_change, .-compute_change
249 .p2align 4,,15
250 .type __tzstring_len, @function
251 __tzstring_len:
252 pushq %r14
253 pushq %r13
254 movq %rsi, %r14
255 pushq %r12
256 pushq %rbp
257 movq %rdi, %r13
258 pushq %rbx
259 movq tzstring_list(%rip), %rbx
260 testq %rbx, %rbx
261 je .L28
262 movl $16, %r12d
263 subq %rsi, %r12
264 jmp .L31
265 .p2align 4,,10
266 .p2align 3
267 .L35:
268 movq %rax, %rbx
269 .L31:
270 movq 8(%rbx), %rax
271 cmpq %r14, %rax
272 jb .L29
273 addq %r12, %rax
274 movq %r14, %rdx
275 movq %r13, %rdi
276 leaq (%rbx,%rax), %rbp
277 movq %rbp, %rsi
278 call __GI_memcmp@PLT
279 testl %eax, %eax
280 je .L27
281 .L29:
282 movq (%rbx), %rax
283 testq %rax, %rax
284 jne .L35
285 leaq 17(%r14), %rdi
286 call malloc@PLT
287 testq %rax, %rax
288 movq %rax, %r12
289 je .L33
290 leaq 16(%rax), %rbp
291 movq $0, (%rax)
292 movq %r14, 8(%rax)
293 movq %r14, %rdx
294 movq %r13, %rsi
295 movq %rbp, %rdi
296 call __GI_memcpy@PLT
297 movb $0, 16(%r12,%r14)
298 movq %r12, (%rbx)
299 .L27:
300 popq %rbx
301 movq %rbp, %rax
302 popq %rbp
303 popq %r12
304 popq %r13
305 popq %r14
307 .L28:
308 leaq 17(%rsi), %rdi
309 call malloc@PLT
310 testq %rax, %rax
311 movq %rax, %rbx
312 je .L33
313 leaq 16(%rbx), %rbp
314 movq %r14, 8(%rbx)
315 movq $0, (%rbx)
316 movq %r14, %rdx
317 movq %r13, %rsi
318 movq %rbp, %rdi
319 call __GI_memcpy@PLT
320 movb $0, 16(%rbx,%r14)
321 movq %rbp, %rax
322 movq %rbx, tzstring_list(%rip)
323 popq %rbx
324 popq %rbp
325 popq %r12
326 popq %r13
327 popq %r14
329 .L33:
330 xorl %ebp, %ebp
331 jmp .L27
332 .size __tzstring_len, .-__tzstring_len
333 .section __libc_freeres_fn,"ax",@progbits
334 .p2align 4,,15
335 .type free_mem, @function
336 free_mem:
337 movq tzstring_list(%rip), %rdi
338 pushq %rbx
339 testq %rdi, %rdi
340 je .L45
341 .p2align 4,,10
342 .p2align 3
343 .L46:
344 movq (%rdi), %rbx
345 movq %rbx, tzstring_list(%rip)
346 call free@PLT
347 testq %rbx, %rbx
348 movq %rbx, %rdi
349 jne .L46
350 .L45:
351 movq old_tz(%rip), %rdi
352 call free@PLT
353 movq $0, old_tz(%rip)
354 popq %rbx
356 .size free_mem, .-free_mem
357 .text
358 .p2align 4,,15
359 .type parse_tzname, @function
360 parse_tzname:
361 pushq %r12
362 pushq %rbp
363 pushq %rbx
364 movq (%rdi), %r8
365 movzbl (%r8), %ecx
366 movl %ecx, %eax
367 andl $-33, %eax
368 subl $65, %eax
369 cmpb $25, %al
370 ja .L53
371 movq %r8, %rbx
372 .p2align 4,,10
373 .p2align 3
374 .L54:
375 addq $1, %rbx
376 movzbl (%rbx), %eax
377 andl $-33, %eax
378 subl $65, %eax
379 cmpb $25, %al
380 jbe .L54
381 movq %rbx, %rax
382 subq %r8, %rax
383 cmpq $2, %rax
384 ja .L55
385 .L53:
386 addq $1, %r8
387 cmpb $60, %cl
388 movq %r8, %rdx
389 je .L56
390 jmp .L59
391 .p2align 4,,10
392 .p2align 3
393 .L58:
394 addq $1, %rdx
395 .L56:
396 movzbl (%rdx), %ecx
397 movl %ecx, %eax
398 andl $-33, %eax
399 subl $65, %eax
400 cmpb $25, %al
401 jbe .L58
402 leal -43(%rcx), %eax
403 testb $-3, %al
404 je .L58
405 leal -48(%rcx), %eax
406 cmpb $9, %al
407 jbe .L58
408 movq %rdx, %rax
409 subq %r8, %rax
410 cmpb $62, %cl
411 jne .L59
412 cmpq $2, %rax
413 ja .L68
414 .L59:
415 popq %rbx
416 xorl %eax, %eax
417 popq %rbp
418 popq %r12
420 .L68:
421 leaq 1(%rdx), %rbx
422 .L55:
423 movl %esi, %ebp
424 movq %rdi, %r12
425 movq %rax, %rsi
426 movq %r8, %rdi
427 call __tzstring_len
428 testq %rax, %rax
429 je .L59
430 movslq %ebp, %rdx
431 leaq tz_rules(%rip), %rcx
432 leaq (%rdx,%rdx,2), %rdx
433 salq $4, %rdx
434 movq %rax, (%rcx,%rdx)
435 movq %rbx, (%r12)
436 movl $1, %eax
437 popq %rbx
438 popq %rbp
439 popq %r12
441 .size parse_tzname, .-parse_tzname
442 .section .rodata.str1.1,"aMS",@progbits,1
443 .LC0:
444 .string "%hu%n:%hu%n:%hu%n"
445 .text
446 .p2align 4,,15
447 .type parse_offset, @function
448 parse_offset:
449 pushq %r13
450 pushq %r12
451 movq %rdi, %r12
452 pushq %rbp
453 pushq %rbx
454 movslq %esi, %rbp
455 subq $24, %rsp
456 movq (%rdi), %rbx
457 testl %ebp, %ebp
458 movsbl (%rbx), %edx
459 je .L70
460 leal -43(%rdx), %eax
461 testb $-3, %al
462 je .L71
463 leaq 12(%rsp), %rcx
464 xorl %eax, %eax
465 xorl %edx, %edx
466 movw %ax, 8(%rsp)
467 movw %dx, 10(%rsp)
468 leaq 6(%rsp), %rdx
469 movl $0, 12(%rsp)
470 pushq %rcx
471 leaq .LC0(%rip), %rsi
472 movq %rcx, %r9
473 movq %rbx, %rdi
474 movl $-1, %r13d
475 leaq 18(%rsp), %rax
476 pushq %rax
477 xorl %eax, %eax
478 leaq 24(%rsp), %r8
479 call __GI___isoc99_sscanf
480 testl %eax, %eax
481 popq %rcx
482 popq %rsi
483 jg .L78
484 .L77:
485 movl 24+tz_rules(%rip), %eax
486 addl $3600, %eax
487 movl %eax, 72+tz_rules(%rip)
488 jmp .L76
489 .p2align 4,,10
490 .p2align 3
491 .L70:
492 xorl %eax, %eax
493 testb %dl, %dl
494 je .L69
495 leal -43(%rdx), %ecx
496 andl $253, %ecx
497 jne .L92
498 .L71:
499 xorl %r13d, %r13d
500 addq $1, %rbx
501 cmpb $45, %dl
502 sete %r13b
503 leal -1(%r13,%r13), %r13d
504 .L74:
505 leaq 12(%rsp), %rcx
506 xorl %edi, %edi
507 xorl %r8d, %r8d
508 movw %di, 8(%rsp)
509 movw %r8w, 10(%rsp)
510 leaq 6(%rsp), %rdx
511 movl $0, 12(%rsp)
512 pushq %rcx
513 leaq .LC0(%rip), %rsi
514 movq %rcx, %r9
515 movq %rbx, (%r12)
516 movq %rbx, %rdi
517 leaq 18(%rsp), %rax
518 pushq %rax
519 xorl %eax, %eax
520 leaq 24(%rsp), %r8
521 call __GI___isoc99_sscanf
522 testl %eax, %eax
523 popq %r9
524 popq %r10
525 jle .L75
526 .L78:
527 movzwl 8(%rsp), %eax
528 movzwl 6(%rsp), %edx
529 leaq 0(%rbp,%rbp,2), %rcx
530 movl $59, %esi
531 movl $24, %edi
532 salq $4, %rcx
533 cmpl $59, %eax
534 cmova %esi, %eax
535 imull $60, %eax, %eax
536 cmpl $24, %edx
537 cmova %edi, %edx
538 imull $3600, %edx, %edx
539 addl %edx, %eax
540 movzwl 10(%rsp), %edx
541 cmpl $59, %edx
542 cmova %esi, %edx
543 addl %edx, %eax
544 leaq tz_rules(%rip), %rdx
545 imull %r13d, %eax
546 movl %eax, 24(%rdx,%rcx)
547 .L76:
548 movslq 12(%rsp), %rax
549 addq %rax, %rbx
550 movl $1, %eax
551 movq %rbx, (%r12)
552 .L69:
553 addq $24, %rsp
554 popq %rbx
555 popq %rbp
556 popq %r12
557 popq %r13
559 .p2align 4,,10
560 .p2align 3
561 .L92:
562 subl $48, %edx
563 movl $-1, %r13d
564 cmpl $9, %edx
565 jbe .L74
566 jmp .L69
567 .p2align 4,,10
568 .p2align 3
569 .L75:
570 testl %ebp, %ebp
571 jne .L77
572 movl $0, 24+tz_rules(%rip)
573 addq $24, %rsp
574 xorl %eax, %eax
575 popq %rbx
576 popq %rbp
577 popq %r12
578 popq %r13
580 .size parse_offset, .-parse_offset
581 .section .rodata.str1.1
582 .LC1:
583 .string "M%hu.%hu.%hu%n"
584 .text
585 .p2align 4,,15
586 .type parse_rule, @function
587 parse_rule:
588 pushq %r14
589 pushq %r13
590 xorl %eax, %eax
591 pushq %r12
592 pushq %rbp
593 movq %rdi, %r13
594 pushq %rbx
595 subq $16, %rsp
596 movq (%rdi), %rbx
597 cmpb $44, (%rbx)
598 sete %al
599 addq %rax, %rbx
600 movzbl (%rbx), %eax
601 cmpb $74, %al
602 je .L94
603 movsbl %al, %edx
604 subl $48, %edx
605 cmpl $9, %edx
606 ja .L122
607 movslq %esi, %rbp
608 leaq tz_rules(%rip), %r12
609 leaq 0(%rbp,%rbp,2), %rax
610 salq $4, %rax
611 movl $0, 8(%r12,%rax)
612 .L113:
613 leaq 8(%rsp), %rsi
614 movl $10, %edx
615 movq %rbx, %rdi
616 call __GI_strtoul
617 movq 8(%rsp), %rdx
618 cmpq %rbx, %rdx
619 je .L107
620 cmpq $365, %rax
621 ja .L107
622 leaq 0(%rbp,%rbp,2), %rcx
623 salq $4, %rcx
624 cmpl $1, 8(%r12,%rcx)
625 jne .L115
626 testq %rax, %rax
627 je .L107
628 .L115:
629 leaq 0(%rbp,%rbp,2), %rcx
630 salq $4, %rcx
631 movw %ax, 16(%r12,%rcx)
632 jmp .L99
633 .p2align 4,,10
634 .p2align 3
635 .L122:
636 movslq %esi, %rbp
637 leaq 0(%rbp,%rbp,2), %rsi
638 salq $4, %rsi
639 cmpb $77, %al
640 je .L123
641 testb %al, %al
642 jne .L107
643 leaq tz_rules(%rip), %r12
644 testq %rsi, %rsi
645 leaq (%r12,%rsi), %rax
646 movl $2, 8(%rax)
647 je .L124
648 xorl %r8d, %r8d
649 movl $65547, 12(%rax)
650 movq %rbx, %rdx
651 movw %r8w, 16(%rax)
652 .L99:
653 movzbl (%rdx), %ecx
654 testb %cl, %cl
655 setne %al
656 cmpb $47, %cl
657 setne %sil
658 andb %sil, %al
659 je .L106
660 cmpb $44, %cl
661 jne .L107
662 .L108:
663 leaq 0(%rbp,%rbp,2), %rax
664 salq $4, %rax
665 movl $7200, 20(%r12,%rax)
666 .L111:
667 leaq 0(%rbp,%rbp,2), %rax
668 salq $4, %rax
669 movl $-1, 40(%r12,%rax)
670 movq %rdx, 0(%r13)
671 addq $16, %rsp
672 popq %rbx
673 movl $1, %eax
674 popq %rbp
675 popq %r12
676 popq %r13
677 popq %r14
679 .p2align 4,,10
680 .p2align 3
681 .L123:
682 leaq tz_rules(%rip), %r12
683 leaq 8(%rsp), %r9
684 xorl %eax, %eax
685 movq %rbx, %rdi
686 leaq (%r12,%rsi), %r14
687 leaq 14(%r12,%rsi), %rcx
688 leaq 12(%r12,%rsi), %rdx
689 leaq 16(%r12,%rsi), %r8
690 leaq .LC1(%rip), %rsi
691 movl $2, 8(%r14)
692 call __GI___isoc99_sscanf
693 cmpl $3, %eax
694 je .L125
695 .p2align 4,,10
696 .p2align 3
697 .L107:
698 xorl %eax, %eax
699 .L93:
700 addq $16, %rsp
701 popq %rbx
702 popq %rbp
703 popq %r12
704 popq %r13
705 popq %r14
707 .p2align 4,,10
708 .p2align 3
709 .L94:
710 movslq %esi, %rbp
711 leaq tz_rules(%rip), %r12
712 addq $1, %rbx
713 leaq 0(%rbp,%rbp,2), %rax
714 salq $4, %rax
715 movl $1, 8(%r12,%rax)
716 movsbl (%rbx), %eax
717 subl $48, %eax
718 cmpl $9, %eax
719 jbe .L113
720 jmp .L107
721 .p2align 4,,10
722 .p2align 3
723 .L106:
724 cmpb $47, %cl
725 jne .L108
726 movzbl 1(%rdx), %ebx
727 testb %bl, %bl
728 je .L93
729 xorl %eax, %eax
730 cmpb $45, %bl
731 movl $0, 8(%rsp)
732 sete %al
733 xorl %ecx, %ecx
734 leaq .LC0(%rip), %rsi
735 movw %cx, 6(%rsp)
736 leaq 8(%rsp), %rcx
737 leaq 1(%rdx,%rax), %r14
738 xorl %edx, %edx
739 movl $2, %eax
740 movw %ax, 2(%rsp)
741 movw %dx, 4(%rsp)
742 leaq 2(%rsp), %rdx
743 pushq %rcx
744 movq %rcx, %r9
745 movq %r14, %rdi
746 leaq 14(%rsp), %rax
747 pushq %rax
748 xorl %eax, %eax
749 leaq 20(%rsp), %r8
750 call __GI___isoc99_sscanf
751 movslq 24(%rsp), %rdx
752 popq %rsi
753 popq %rdi
754 movzwl 2(%rsp), %ecx
755 movzwl 4(%rsp), %eax
756 xorl %edi, %edi
757 addq %r14, %rdx
758 cmpb $45, %bl
759 leaq 0(%rbp,%rbp,2), %rsi
760 setne %dil
761 leal -1(%rdi,%rdi), %edi
762 salq $4, %rsi
763 imull $60, %eax, %eax
764 imull $3600, %ecx, %ecx
765 addl %eax, %ecx
766 movzwl 6(%rsp), %eax
767 addl %ecx, %eax
768 imull %edi, %eax
769 movl %eax, 20(%r12,%rsi)
770 jmp .L111
771 .p2align 4,,10
772 .p2align 3
773 .L125:
774 movzwl 12(%r14), %eax
775 subl $1, %eax
776 cmpw $11, %ax
777 ja .L107
778 movzwl 14(%r14), %eax
779 subl $1, %eax
780 cmpw $4, %ax
781 ja .L107
782 cmpw $6, 16(%r14)
783 ja .L107
784 movslq 8(%rsp), %rdx
785 addq %rbx, %rdx
786 jmp .L99
787 .p2align 4,,10
788 .p2align 3
789 .L124:
790 xorl %r9d, %r9d
791 movl $131075, 12(%r12)
792 movq %rbx, %rdx
793 movw %r9w, 16(%r12)
794 jmp .L99
795 .size parse_rule, .-parse_rule
796 .p2align 4,,15
797 .globl __tzstring
798 .hidden __tzstring
799 .type __tzstring, @function
800 __tzstring:
801 pushq %rbx
802 movq %rdi, %rbx
803 call __GI_strlen
804 movq %rbx, %rdi
805 movq %rax, %rsi
806 popq %rbx
807 jmp __tzstring_len
808 .size __tzstring, .-__tzstring
809 .section .rodata.str1.1
810 .LC2:
811 .string ""
812 .text
813 .p2align 4,,15
814 .globl __tzset_parse_tz
815 .hidden __tzset_parse_tz
816 .type __tzset_parse_tz, @function
817 __tzset_parse_tz:
818 pushq %rbx
819 leaq 8+tz_rules(%rip), %rdx
820 xorl %eax, %eax
821 movl $11, %ecx
822 xorl %esi, %esi
823 subq $16, %rsp
824 movq %rdi, 8(%rsp)
825 movq %rdx, %rdi
826 leaq 8(%rsp), %rbx
827 rep stosq
828 leaq .LC2(%rip), %rax
829 movq %rbx, %rdi
830 movq %rax, 48+tz_rules(%rip)
831 movq %rax, tz_rules(%rip)
832 call parse_tzname
833 testb %al, %al
834 jne .L129
835 .L145:
836 xorl %edi, %edi
837 movl 24+tz_rules(%rip), %eax
838 cmpl %eax, 72+tz_rules(%rip)
839 movq tz_rules(%rip), %rdx
840 movq 48+tz_rules(%rip), %rsi
841 setne %dil
842 .L130:
843 movq __daylight@GOTPCREL(%rip), %rcx
844 negl %eax
845 cltq
846 movl %edi, (%rcx)
847 movq __timezone@GOTPCREL(%rip), %rcx
848 movq %rax, (%rcx)
849 movq __tzname@GOTPCREL(%rip), %rax
850 movq %rdx, (%rax)
851 movq %rsi, 8(%rax)
852 .L128:
853 addq $16, %rsp
854 popq %rbx
856 .p2align 4,,10
857 .p2align 3
858 .L129:
859 xorl %esi, %esi
860 movq %rbx, %rdi
861 call parse_offset
862 testb %al, %al
863 je .L145
864 movq 8(%rsp), %rax
865 cmpb $0, (%rax)
866 jne .L146
867 movq tz_rules(%rip), %rdx
868 movl 24+tz_rules(%rip), %eax
869 xorl %edi, %edi
870 movq %rdx, 48+tz_rules(%rip)
871 movl %eax, 72+tz_rules(%rip)
872 movq %rdx, %rsi
873 jmp .L130
874 .p2align 4,,10
875 .p2align 3
876 .L146:
877 movl $1, %esi
878 movq %rbx, %rdi
879 call parse_tzname
880 testb %al, %al
881 je .L133
882 movl $1, %esi
883 movq %rbx, %rdi
884 call parse_offset
885 movq 8(%rsp), %rdx
886 movzbl (%rdx), %eax
887 testb %al, %al
888 je .L134
889 cmpb $44, %al
890 jne .L133
891 cmpb $0, 1(%rdx)
892 jne .L133
893 .L134:
894 movl 72+tz_rules(%rip), %ecx
895 movl 24+tz_rules(%rip), %edx
896 movq 48+tz_rules(%rip), %rsi
897 movq tz_rules(%rip), %rdi
898 call __tzfile_default
899 movl __use_tzfile(%rip), %eax
900 testl %eax, %eax
901 je .L133
902 movq old_tz(%rip), %rdi
903 call free@PLT
904 movq $0, old_tz(%rip)
905 jmp .L128
906 .p2align 4,,10
907 .p2align 3
908 .L133:
909 xorl %esi, %esi
910 movq %rbx, %rdi
911 call parse_rule
912 testb %al, %al
913 je .L145
914 movl $1, %esi
915 movq %rbx, %rdi
916 call parse_rule
917 jmp .L145
918 .size __tzset_parse_tz, .-__tzset_parse_tz
919 .section .rodata.str1.1
920 .LC3:
921 .string "Universal"
922 .LC4:
923 .string "TZ"
924 .LC5:
925 .string "UTC"
926 .text
927 .p2align 4,,15
928 .type tzset_internal.part.0, @function
929 tzset_internal.part.0:
930 pushq %rbp
931 pushq %rbx
932 leaq .LC4(%rip), %rdi
933 subq $8, %rsp
934 movl $1, is_initialized.9306(%rip)
935 call __GI_getenv
936 testq %rax, %rax
937 je .L148
938 movq %rax, %rbx
939 movzbl (%rax), %eax
940 movq old_tz(%rip), %rbp
941 testb %al, %al
942 jne .L166
943 leaq .LC3(%rip), %rbx
944 .L149:
945 testq %rbp, %rbp
946 je .L152
947 .L159:
948 movq %rbp, %rsi
949 movq %rbx, %rdi
950 call __GI_strcmp
951 testl %eax, %eax
952 je .L147
953 .L152:
954 movq %rbp, %rdi
955 movq $0, tz_rules(%rip)
956 movq $0, 48+tz_rules(%rip)
957 call free@PLT
958 movq %rbx, %rdi
959 call __GI___strdup
960 xorl %edx, %edx
961 xorl %esi, %esi
962 movq %rbx, %rdi
963 movq %rax, old_tz(%rip)
964 call __tzfile_read
965 movl __use_tzfile(%rip), %eax
966 testl %eax, %eax
967 je .L167
968 .L147:
969 addq $8, %rsp
970 popq %rbx
971 popq %rbp
973 .p2align 4,,10
974 .p2align 3
975 .L166:
976 cmpb $58, %al
977 jne .L149
978 addq $1, %rbx
979 testq %rbp, %rbp
980 je .L151
981 testq %rbx, %rbx
982 jne .L159
983 .L162:
984 movq tzdefault@GOTPCREL(%rip), %rbx
985 jmp .L152
986 .p2align 4,,10
987 .p2align 3
988 .L167:
989 cmpb $0, (%rbx)
990 je .L154
991 movq tzdefault@GOTPCREL(%rip), %rsi
992 movq %rbx, %rdi
993 call __GI_strcmp
994 testl %eax, %eax
995 je .L154
996 addq $8, %rsp
997 movq %rbx, %rdi
998 popq %rbx
999 popq %rbp
1000 jmp __tzset_parse_tz
1001 .p2align 4,,10
1002 .p2align 3
1003 .L154:
1004 leaq 8+tz_rules(%rip), %rdx
1005 xorl %eax, %eax
1006 movl $11, %ecx
1007 movq %rdx, %rdi
1008 movq $-1, %rdx
1009 rep stosq
1010 movq %rdx, 80+tz_rules(%rip)
1011 movq %rdx, 32+tz_rules(%rip)
1012 leaq .LC5(%rip), %rax
1013 movq __daylight@GOTPCREL(%rip), %rdx
1014 movq %rax, 48+tz_rules(%rip)
1015 movq %rax, tz_rules(%rip)
1016 movl $0, (%rdx)
1017 movq __timezone@GOTPCREL(%rip), %rdx
1018 movq $0, (%rdx)
1019 movq __tzname@GOTPCREL(%rip), %rdx
1020 movq %rax, (%rdx)
1021 movq %rax, 8(%rdx)
1022 addq $8, %rsp
1023 popq %rbx
1024 popq %rbp
1026 .p2align 4,,10
1027 .p2align 3
1028 .L148:
1029 movq old_tz(%rip), %rbp
1030 movq tzdefault@GOTPCREL(%rip), %rbx
1031 jmp .L152
1032 .p2align 4,,10
1033 .p2align 3
1034 .L151:
1035 testq %rbx, %rbx
1036 jne .L152
1037 jmp .L162
1038 .size tzset_internal.part.0, .-tzset_internal.part.0
1039 .p2align 4,,15
1040 .globl __tz_compute
1041 .hidden __tz_compute
1042 .type __tz_compute, @function
1043 __tz_compute:
1044 pushq %r12
1045 pushq %rbp
1046 movq %rdi, %rbp
1047 pushq %rbx
1048 movl 20(%rsi), %eax
1049 movq %rsi, %rbx
1050 leaq tz_rules(%rip), %rdi
1051 movl %edx, %r12d
1052 leal 1900(%rax), %esi
1053 call compute_change
1054 movl 20(%rbx), %eax
1055 leaq 48+tz_rules(%rip), %rdi
1056 leal 1900(%rax), %esi
1057 call compute_change
1058 testl %r12d, %r12d
1059 je .L168
1060 movq 32+tz_rules(%rip), %rsi
1061 movq 80+tz_rules(%rip), %rcx
1062 cmpq %rsi, %rbp
1063 setge %dl
1064 cmpq %rcx, %rbp
1065 setl %dil
1066 movl %edx, %eax
1067 andl %edi, %eax
1068 orl %edi, %edx
1069 cmpq %rcx, %rsi
1070 movzbl %dl, %edx
1071 movzbl %al, %eax
1072 cmovg %rdx, %rax
1073 movq __tzname@GOTPCREL(%rip), %rdx
1074 movl %eax, 32(%rbx)
1075 movq (%rdx,%rax,8), %rdx
1076 movq %rdx, 48(%rbx)
1077 leaq (%rax,%rax), %rdx
1078 addq %rdx, %rax
1079 leaq tz_rules(%rip), %rdx
1080 salq $4, %rax
1081 movslq 24(%rdx,%rax), %rax
1082 movq %rax, 40(%rbx)
1083 .L168:
1084 popq %rbx
1085 popq %rbp
1086 popq %r12
1088 .size __tz_compute, .-__tz_compute
1089 .p2align 4,,15
1090 .globl __tzset
1091 .hidden __tzset
1092 .type __tzset, @function
1093 __tzset:
1094 subq $8, %rsp
1095 #APP
1096 # 551 "/root/wip/nyanglibc/fork/time/tzset.c" 1
1097 movl %fs:24,%eax
1098 # 0 "" 2
1099 #NO_APP
1100 testl %eax, %eax
1101 jne .L177
1102 movl $1, %edx
1103 #APP
1104 # 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
1105 cmpxchgl %edx, tzset_lock(%rip)
1106 # 0 "" 2
1107 #NO_APP
1108 .L178:
1109 call tzset_internal.part.0
1110 movl __use_tzfile(%rip), %eax
1111 testl %eax, %eax
1112 jne .L179
1113 movq __tzname@GOTPCREL(%rip), %rax
1114 movq tz_rules(%rip), %rdx
1115 movq %rdx, (%rax)
1116 movq 48+tz_rules(%rip), %rdx
1117 movq %rdx, 8(%rax)
1118 .L179:
1119 #APP
1120 # 562 "/root/wip/nyanglibc/fork/time/tzset.c" 1
1121 movl %fs:24,%eax
1122 # 0 "" 2
1123 #NO_APP
1124 testl %eax, %eax
1125 jne .L180
1126 subl $1, tzset_lock(%rip)
1127 .L176:
1128 addq $8, %rsp
1130 .p2align 4,,10
1131 .p2align 3
1132 .L177:
1133 xorl %eax, %eax
1134 movl $1, %edx
1135 lock cmpxchgl %edx, tzset_lock(%rip)
1136 je .L178
1137 leaq tzset_lock(%rip), %rdi
1138 call __lll_lock_wait_private
1139 jmp .L178
1140 .p2align 4,,10
1141 .p2align 3
1142 .L180:
1143 xorl %eax, %eax
1144 #APP
1145 # 562 "/root/wip/nyanglibc/fork/time/tzset.c" 1
1146 xchgl %eax, tzset_lock(%rip)
1147 # 0 "" 2
1148 #NO_APP
1149 cmpl $1, %eax
1150 jle .L176
1151 xorl %r10d, %r10d
1152 movl $1, %edx
1153 movl $129, %esi
1154 leaq tzset_lock(%rip), %rdi
1155 movl $202, %eax
1156 #APP
1157 # 562 "/root/wip/nyanglibc/fork/time/tzset.c" 1
1158 syscall
1160 # 0 "" 2
1161 #NO_APP
1162 jmp .L176
1163 .size __tzset, .-__tzset
1164 .weak tzset
1165 .set tzset,__tzset
1166 .section .rodata.str1.1
1167 .LC6:
1168 .string "GMT"
1169 .text
1170 .p2align 4,,15
1171 .globl __tz_convert
1172 .hidden __tz_convert
1173 .type __tz_convert, @function
1174 __tz_convert:
1175 pushq %r13
1176 pushq %r12
1177 movq %rdi, %r13
1178 pushq %rbp
1179 pushq %rbx
1180 movl %esi, %r12d
1181 movq %rdx, %rbp
1182 subq $24, %rsp
1183 #APP
1184 # 574 "/root/wip/nyanglibc/fork/time/tzset.c" 1
1185 movl %fs:24,%eax
1186 # 0 "" 2
1187 #NO_APP
1188 testl %eax, %eax
1189 jne .L184
1190 movl $1, %edx
1191 #APP
1192 # 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
1193 cmpxchgl %edx, tzset_lock(%rip)
1194 # 0 "" 2
1195 #NO_APP
1196 .L185:
1197 testl %r12d, %r12d
1198 je .L200
1199 leaq _tmbuf(%rip), %rax
1200 cmpq %rax, %rbp
1201 je .L186
1202 .L200:
1203 movl is_initialized.9306(%rip), %edx
1204 testl %edx, %edx
1205 je .L186
1206 movl __use_tzfile(%rip), %eax
1207 testl %eax, %eax
1208 je .L189
1209 .L209:
1210 leaq 4(%rsp), %rcx
1211 leaq 8(%rsp), %rdx
1212 movq %rbp, %r8
1213 movl %r12d, %esi
1214 movq %r13, %rdi
1215 movq %rbp, %rbx
1216 call __tzfile_compute
1217 .L190:
1218 #APP
1219 # 594 "/root/wip/nyanglibc/fork/time/tzset.c" 1
1220 movl %fs:24,%eax
1221 # 0 "" 2
1222 #NO_APP
1223 testl %eax, %eax
1224 jne .L192
1225 subl $1, tzset_lock(%rip)
1226 .L193:
1227 testq %rbx, %rbx
1228 je .L198
1229 testl %r12d, %r12d
1230 je .L196
1231 movq 40(%rbx), %rsi
1232 .L197:
1233 subq 8(%rsp), %rsi
1234 movq %rbx, %rdx
1235 movq %r13, %rdi
1236 call __offtime
1237 testl %eax, %eax
1238 je .L198
1239 movl 4(%rsp), %eax
1240 addl %eax, (%rbx)
1241 addq $24, %rsp
1242 movq %rbx, %rax
1243 popq %rbx
1244 popq %rbp
1245 popq %r12
1246 popq %r13
1248 .p2align 4,,10
1249 .p2align 3
1250 .L186:
1251 call tzset_internal.part.0
1252 movl __use_tzfile(%rip), %eax
1253 testl %eax, %eax
1254 jne .L209
1255 .L189:
1256 xorl %esi, %esi
1257 movq %rbp, %rdx
1258 movq %r13, %rdi
1259 call __offtime
1260 xorl %ebx, %ebx
1261 testl %eax, %eax
1262 jne .L210
1263 .L191:
1264 movq $0, 8(%rsp)
1265 movl $0, 4(%rsp)
1266 jmp .L190
1267 .p2align 4,,10
1268 .p2align 3
1269 .L196:
1270 leaq .LC6(%rip), %rax
1271 movl $0, 32(%rbx)
1272 movq $0, 40(%rbx)
1273 xorl %esi, %esi
1274 movq %rax, 48(%rbx)
1275 jmp .L197
1276 .p2align 4,,10
1277 .p2align 3
1278 .L198:
1279 addq $24, %rsp
1280 xorl %ebx, %ebx
1281 movq %rbx, %rax
1282 popq %rbx
1283 popq %rbp
1284 popq %r12
1285 popq %r13
1287 .p2align 4,,10
1288 .p2align 3
1289 .L210:
1290 movl %r12d, %edx
1291 movq %rbp, %rsi
1292 movq %r13, %rdi
1293 call __tz_compute
1294 movq %rbp, %rbx
1295 jmp .L191
1296 .p2align 4,,10
1297 .p2align 3
1298 .L192:
1299 xorl %eax, %eax
1300 #APP
1301 # 594 "/root/wip/nyanglibc/fork/time/tzset.c" 1
1302 xchgl %eax, tzset_lock(%rip)
1303 # 0 "" 2
1304 #NO_APP
1305 cmpl $1, %eax
1306 jle .L193
1307 xorl %r10d, %r10d
1308 movl $1, %edx
1309 movl $129, %esi
1310 leaq tzset_lock(%rip), %rdi
1311 movl $202, %eax
1312 #APP
1313 # 594 "/root/wip/nyanglibc/fork/time/tzset.c" 1
1314 syscall
1316 # 0 "" 2
1317 #NO_APP
1318 jmp .L193
1319 .p2align 4,,10
1320 .p2align 3
1321 .L184:
1322 xorl %eax, %eax
1323 movl $1, %edx
1324 lock cmpxchgl %edx, tzset_lock(%rip)
1325 je .L185
1326 leaq tzset_lock(%rip), %rdi
1327 call __lll_lock_wait_private
1328 jmp .L185
1329 .size __tz_convert, .-__tz_convert
1330 .local is_initialized.9306
1331 .comm is_initialized.9306,4,4
1332 .section __libc_subfreeres,"aw",@progbits
1333 .align 8
1334 .type __elf_set___libc_subfreeres_element_free_mem__, @object
1335 .size __elf_set___libc_subfreeres_element_free_mem__, 8
1336 __elf_set___libc_subfreeres_element_free_mem__:
1337 .quad free_mem
1338 .globl tzdefault
1339 .data
1340 .align 32
1341 .type tzdefault, @object
1342 .size tzdefault, CONF_TZDEFAULT_STR_BYTES_N
1343 tzdefault:
1344 .string "CONF_TZDEFAULT_STR"
1345 .local old_tz
1346 .comm old_tz,8,8
1347 .local tzstring_list
1348 .comm tzstring_list,8,8
1349 .local tz_rules
1350 .comm tz_rules,96,32
1351 .local tzset_lock
1352 .comm tzset_lock,4,4
1353 .globl __timezone
1354 .bss
1355 .align 8
1356 .type __timezone, @object
1357 .size __timezone, 8
1358 __timezone:
1359 .zero 8
1360 .weak timezone
1361 .set timezone,__timezone
1362 .globl __daylight
1363 .align 4
1364 .type __daylight, @object
1365 .size __daylight, 4
1366 __daylight:
1367 .zero 4
1368 .weak daylight
1369 .set daylight,__daylight
1370 .globl __tzname
1371 .section .data.rel.local,"aw",@progbits
1372 .align 16
1373 .type __tzname, @object
1374 .size __tzname, 16
1375 __tzname:
1376 .quad .LC6
1377 .quad .LC6
1378 .weak tzname
1379 .set tzname,__tzname
1380 .hidden __offtime
1381 .hidden __tzfile_compute
1382 .hidden _tmbuf
1383 .hidden __lll_lock_wait_private
1384 .hidden __tzfile_read
1385 .hidden __use_tzfile
1386 .hidden __tzfile_default
1387 .hidden __mon_yday
1388 .ident "GCC: (GNU) 7.3.0"
1389 .section .note.GNU-stack,"",@progbits