clarify the purpose of this project
[nyanglibc.git] / time / offtime.shared.s
blobfeed4fb1cff4bedee510e314d6f518dab340ac95
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 __offtime
9 .hidden __offtime
10 .type __offtime, @function
11 __offtime:
12 movq %rdi, %rax
13 movq %rdx, %r11
14 movabsq $1749024623285053783, %rdx
15 imulq %rdx
16 movq %rdi, %rax
17 pushq %r14
18 sarq $63, %rax
19 pushq %r12
20 pushq %rbp
21 pushq %rbx
22 sarq $13, %rdx
23 subq %rax, %rdx
24 imulq $86400, %rdx, %rax
25 movq %rdx, %r8
26 subq %rax, %rdi
27 addq %rdi, %rsi
28 jns .L27
29 .p2align 4,,10
30 .p2align 3
31 .L3:
32 subq $1, %r8
33 addq $86400, %rsi
34 js .L3
35 .L4:
36 movq %rsi, %rdx
37 movabsq $655884233731895169, %rcx
38 movabsq $-6640827866535438581, %r9
39 shrq $4, %rdx
40 movabsq $3234497591006606311, %r10
41 movq %rdx, %rax
42 mulq %rcx
43 leaq 4(%r8), %rcx
44 shrq $3, %rdx
45 movl %edx, 8(%r11)
46 imulq $3600, %rdx, %rdx
47 subq %rdx, %rsi
48 movabsq $-8608480567731124087, %rdx
49 movq %rsi, %rax
50 mulq %rdx
51 shrq $5, %rdx
52 movq %rdx, %rax
53 movl %edx, 4(%r11)
54 salq $4, %rax
55 subq %rdx, %rax
56 movabsq $5270498306774157605, %rdx
57 salq $2, %rax
58 subq %rax, %rsi
59 movq %rcx, %rax
60 imulq %rdx
61 movq %rcx, %rax
62 movl %esi, (%r11)
63 sarq $63, %rax
64 sarq %rdx
65 subq %rax, %rdx
66 leaq 0(,%rdx,8), %rax
67 subq %rdx, %rax
68 subq %rax, %rcx
69 leal 7(%rcx), %eax
70 movq %rcx, %rdx
71 testq %rcx, %rcx
72 movl $1970, %ecx
73 cmovs %eax, %edx
74 movl %edx, 24(%r11)
75 jmp .L8
76 .p2align 4,,10
77 .p2align 3
78 .L9:
79 movq %r8, %rax
80 movq %r8, %rbx
81 imulq %r10
82 movq %r8, %rax
83 sarq $63, %rax
84 sarq $6, %rdx
85 subq %rax, %rdx
86 leaq (%rdx,%rdx,8), %rax
87 leaq (%rdx,%rcx), %rdi
88 leaq (%rdx,%rax,8), %rax
89 leaq (%rax,%rax,4), %rax
90 subq %rax, %rbx
91 movq %rbx, %rax
92 shrq $63, %rax
93 subq %rax, %rdi
94 movq %rdi, %rbx
95 leaq 2(%rdi), %r12
96 subq $1, %rbx
97 movq %rbx, %rbp
98 cmovns %rbx, %r12
99 movq %rbx, %r14
100 sarq $63, %rbp
101 sarq $2, %r12
102 movq %rbp, %rdx
103 shrq $62, %rdx
104 leaq (%rbx,%rdx), %rax
105 andl $3, %eax
106 subq %rdx, %rax
107 shrq $63, %rax
108 subq %rax, %r12
109 movq %rbx, %rax
110 imulq %r9
111 leaq (%rdx,%rbx), %rsi
112 movq %rsi, %rax
113 sarq $8, %rsi
114 sarq $6, %rax
115 subq %rbp, %rsi
116 subq %rbp, %rax
117 leaq (%rax,%rax,4), %rdx
118 leaq (%rdx,%rdx,4), %rdx
119 salq $2, %rdx
120 subq %rdx, %r14
121 movq %r14, %rdx
122 shrq $63, %rdx
123 subq %rdx, %rax
124 subq %rax, %r12
125 leaq (%rsi,%rsi,4), %rax
126 leaq (%rax,%rax,4), %rax
127 salq $4, %rax
128 subq %rax, %rbx
129 movq %rbx, %rax
130 shrq $63, %rax
131 subq %rax, %rsi
132 movq %rdi, %rax
133 subq %rcx, %rax
134 addq %r12, %rsi
135 leaq (%rax,%rax,8), %rdx
136 leaq (%rax,%rdx,8), %rax
137 leaq 2(%rcx), %rdx
138 leaq (%rax,%rax,4), %rax
139 addq %rax, %rsi
140 subq $1, %rcx
141 movq %rcx, %rbx
142 cmovns %rcx, %rdx
143 movq %rcx, %r14
144 sarq $63, %rbx
145 sarq $2, %rdx
146 movq %rbx, %rbp
147 shrq $62, %rbp
148 leaq (%rcx,%rbp), %rax
149 andl $3, %eax
150 subq %rbp, %rax
151 shrq $63, %rax
152 subq %rax, %rdx
153 movq %rcx, %rax
154 movq %rdx, %rbp
155 imulq %r9
156 addq %rcx, %rdx
157 movq %rdx, %rax
158 sarq $8, %rdx
159 sarq $6, %rax
160 subq %rbx, %rdx
161 subq %rbx, %rax
162 leaq (%rax,%rax,4), %r12
163 leaq (%r12,%r12,4), %r12
164 salq $2, %r12
165 subq %r12, %r14
166 movq %r14, %r12
167 shrq $63, %r12
168 subq %r12, %rax
169 subq %rax, %rbp
170 leaq (%rdx,%rdx,4), %rax
171 leaq (%rax,%rax,4), %rax
172 salq $4, %rax
173 subq %rax, %rcx
174 shrq $63, %rcx
175 subq %rcx, %rdx
176 movq %rdi, %rcx
177 addq %rbp, %rdx
178 subq %rdx, %rsi
179 subq %rsi, %r8
180 .L8:
181 testq %r8, %r8
182 js .L9
183 movq %rcx, %rsi
184 movl $365, %eax
185 andl $3, %esi
186 jne .L10
187 movq %rcx, %rax
188 movq %rcx, %rbx
189 imulq %r9
190 sarq $63, %rbx
191 addq %rcx, %rdx
192 movq %rdx, %rax
193 sarq $6, %rax
194 subq %rbx, %rax
195 leaq (%rax,%rax,4), %rax
196 leaq (%rax,%rax,4), %rdi
197 movl $366, %eax
198 salq $2, %rdi
199 cmpq %rdi, %rcx
200 jne .L10
201 sarq $8, %rdx
202 subq %rbx, %rdx
203 leaq (%rdx,%rdx,4), %rax
204 leaq (%rax,%rax,4), %rax
205 salq $4, %rax
206 cmpq %rax, %rcx
207 sete %al
208 movzbl %al, %eax
209 addq $365, %rax
210 .L10:
211 cmpq %rax, %r8
212 jge .L9
213 leal -1900(%rcx), %eax
214 leaq -1900(%rcx), %rdx
215 movl %eax, 20(%r11)
216 cltq
217 cmpq %rdx, %rax
218 je .L11
219 movq __libc_errno@gottpoff(%rip), %rax
220 movl $75, %fs:(%rax)
221 xorl %eax, %eax
222 popq %rbx
223 popq %rbp
224 popq %r12
225 popq %r14
227 .p2align 4,,10
228 .p2align 3
229 .L5:
230 subq $86400, %rsi
231 addq $1, %r8
232 .L27:
233 cmpq $86399, %rsi
234 jg .L5
235 jmp .L4
236 .p2align 4,,10
237 .p2align 3
238 .L11:
239 testq %rsi, %rsi
240 movl %r8d, 28(%r11)
241 leaq __mon_yday(%rip), %rdi
242 jne .L13
243 movq %rcx, %rax
244 movabsq $-6640827866535438581, %rdx
245 movq %rcx, %rsi
246 imulq %rdx
247 sarq $63, %rsi
248 addq $26, %rdi
249 addq %rcx, %rdx
250 movq %rdx, %rax
251 sarq $6, %rax
252 subq %rsi, %rax
253 leaq (%rax,%rax,4), %rax
254 leaq (%rax,%rax,4), %rax
255 salq $2, %rax
256 cmpq %rax, %rcx
257 jne .L13
258 sarq $8, %rdx
259 subq %rsi, %rdx
260 leaq (%rdx,%rdx,4), %rax
261 leaq (%rax,%rax,4), %rax
262 salq $4, %rax
263 cmpq %rax, %rcx
264 leaq -26(%rdi), %rax
265 cmovne %rax, %rdi
266 .L13:
267 movzwl 22(%rdi), %edx
268 movl $11, %eax
269 cmpq %r8, %rdx
270 jg .L29
271 .L14:
272 subq %rdx, %r8
273 movl %eax, 16(%r11)
274 movl $1, %eax
275 addl $1, %r8d
276 popq %rbx
277 movl %r8d, 12(%r11)
278 popq %rbp
279 popq %r12
280 popq %r14
282 .p2align 4,,10
283 .p2align 3
284 .L29:
285 movl $11, %eax
286 .L15:
287 subq $1, %rax
288 movzwl (%rdi,%rax,2), %edx
289 cmpq %r8, %rdx
290 jle .L14
291 jmp .L15
292 .size __offtime, .-__offtime
293 .hidden __mon_yday