clarify the purpose of this project
[nyanglibc.git] / time / asctime.s
blobdd49af973edb8ae00f230a841d0bbd36b87ab607
1 .text
2 .section .rodata.str1.1,"aMS",@progbits,1
3 .LC0:
4 .string "???"
5 .text
6 .p2align 4,,15
7 .type asctime_internal, @function
8 asctime_internal:
9 pushq %rbp
10 pushq %rbx
11 subq $8, %rsp
12 testq %rdi, %rdi
13 je .L13
14 movl 20(%rdi), %eax
15 cmpl $2147481747, %eax
16 jg .L7
17 movq %rdx, %rbp
18 leal 1900(%rax), %edx
19 movl 16(%rdi), %eax
20 movq %rsi, %rbx
21 movl (%rdi), %r11d
22 movl 4(%rdi), %r10d
23 movl 8(%rdi), %esi
24 movl 12(%rdi), %r9d
25 leaq .LC0(%rip), %r8
26 cmpl $11, %eax
27 ja .L5
28 addl $14, %eax
29 leaq _nl_C_LC_TIME(%rip), %rcx
30 cltq
31 movq 64(%rcx,%rax,8), %r8
32 .L5:
33 movslq 24(%rdi), %rax
34 leaq .LC0(%rip), %rcx
35 cmpl $6, %eax
36 jbe .L14
37 .L6:
38 pushq %rdx
39 leaq format(%rip), %rdx
40 pushq %r11
41 pushq %r10
42 pushq %rsi
43 xorl %eax, %eax
44 movq %rbp, %rsi
45 movq %rbx, %rdi
46 call __snprintf
47 addq $32, %rsp
48 testl %eax, %eax
49 js .L10
50 cltq
51 cmpq %rbp, %rax
52 jnb .L7
53 .L3:
54 addq $8, %rsp
55 movq %rbx, %rax
56 popq %rbx
57 popq %rbp
58 ret
59 .p2align 4,,10
60 .p2align 3
61 .L14:
62 leaq _nl_C_LC_TIME(%rip), %rcx
63 movq 64(%rcx,%rax,8), %rcx
64 jmp .L6
65 .p2align 4,,10
66 .p2align 3
67 .L7:
68 movq __libc_errno@gottpoff(%rip), %rax
69 xorl %ebx, %ebx
70 movl $75, %fs:(%rax)
71 addq $8, %rsp
72 movq %rbx, %rax
73 popq %rbx
74 popq %rbp
75 ret
76 .p2align 4,,10
77 .p2align 3
78 .L10:
79 xorl %ebx, %ebx
80 jmp .L3
81 .p2align 4,,10
82 .p2align 3
83 .L13:
84 movq __libc_errno@gottpoff(%rip), %rax
85 xorl %ebx, %ebx
86 movl $22, %fs:(%rax)
87 jmp .L3
88 .size asctime_internal, .-asctime_internal
89 .p2align 4,,15
90 .globl __asctime_r
91 .hidden __asctime_r
92 .type __asctime_r, @function
93 __asctime_r:
94 movl $26, %edx
95 jmp asctime_internal
96 .size __asctime_r, .-__asctime_r
97 .weak asctime_r
98 .set asctime_r,__asctime_r
99 .p2align 4,,15
100 .globl asctime
101 .hidden asctime
102 .type asctime, @function
103 asctime:
104 leaq result(%rip), %rsi
105 movl $114, %edx
106 jmp asctime_internal
107 .size asctime, .-asctime
108 .local result
109 .comm result,114,32
110 .section .rodata.str1.32,"aMS",@progbits,1
111 .align 32
112 .type format, @object
113 .size format, 32
114 format:
115 .string "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n"
116 .hidden __snprintf
117 .hidden _nl_C_LC_TIME