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