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