xref: /freebsd/sys/crypto/openssl/amd64/cmll-x86_64.S (revision fe75646a0234a261c0013bf1840fdac4acaf0cec)
1/* Do not modify. This file is auto-generated from cmll-x86_64.pl. */
2.text
3
4
5.globl	Camellia_EncryptBlock
6.type	Camellia_EncryptBlock,@function
7.align	16
8Camellia_EncryptBlock:
9.cfi_startproc
10	movl	$128,%eax
11	subl	%edi,%eax
12	movl	$3,%edi
13	adcl	$0,%edi
14	jmp	.Lenc_rounds
15.cfi_endproc
16.size	Camellia_EncryptBlock,.-Camellia_EncryptBlock
17
18.globl	Camellia_EncryptBlock_Rounds
19.type	Camellia_EncryptBlock_Rounds,@function
20.align	16
21.Lenc_rounds:
22Camellia_EncryptBlock_Rounds:
23.cfi_startproc
24	pushq	%rbx
25.cfi_adjust_cfa_offset	8
26.cfi_offset	%rbx,-16
27	pushq	%rbp
28.cfi_adjust_cfa_offset	8
29.cfi_offset	%rbp,-24
30	pushq	%r13
31.cfi_adjust_cfa_offset	8
32.cfi_offset	%r13,-32
33	pushq	%r14
34.cfi_adjust_cfa_offset	8
35.cfi_offset	%r14,-40
36	pushq	%r15
37.cfi_adjust_cfa_offset	8
38.cfi_offset	%r15,-48
39.Lenc_prologue:
40
41
42	movq	%rcx,%r13
43	movq	%rdx,%r14
44
45	shll	$6,%edi
46	leaq	.LCamellia_SBOX(%rip),%rbp
47	leaq	(%r14,%rdi,1),%r15
48
49	movl	0(%rsi),%r8d
50	movl	4(%rsi),%r9d
51	movl	8(%rsi),%r10d
52	bswapl	%r8d
53	movl	12(%rsi),%r11d
54	bswapl	%r9d
55	bswapl	%r10d
56	bswapl	%r11d
57
58	call	_x86_64_Camellia_encrypt
59
60	bswapl	%r8d
61	bswapl	%r9d
62	bswapl	%r10d
63	movl	%r8d,0(%r13)
64	bswapl	%r11d
65	movl	%r9d,4(%r13)
66	movl	%r10d,8(%r13)
67	movl	%r11d,12(%r13)
68
69	movq	0(%rsp),%r15
70.cfi_restore	%r15
71	movq	8(%rsp),%r14
72.cfi_restore	%r14
73	movq	16(%rsp),%r13
74.cfi_restore	%r13
75	movq	24(%rsp),%rbp
76.cfi_restore	%rbp
77	movq	32(%rsp),%rbx
78.cfi_restore	%rbx
79	leaq	40(%rsp),%rsp
80.cfi_adjust_cfa_offset	-40
81.Lenc_epilogue:
82	.byte	0xf3,0xc3
83.cfi_endproc
84.size	Camellia_EncryptBlock_Rounds,.-Camellia_EncryptBlock_Rounds
85
86.type	_x86_64_Camellia_encrypt,@function
87.align	16
88_x86_64_Camellia_encrypt:
89.cfi_startproc
90	xorl	0(%r14),%r9d
91	xorl	4(%r14),%r8d
92	xorl	8(%r14),%r11d
93	xorl	12(%r14),%r10d
94.align	16
95.Leloop:
96	movl	16(%r14),%ebx
97	movl	20(%r14),%eax
98
99	xorl	%r8d,%eax
100	xorl	%r9d,%ebx
101	movzbl	%ah,%esi
102	movzbl	%bl,%edi
103	movl	2052(%rbp,%rsi,8),%edx
104	movl	0(%rbp,%rdi,8),%ecx
105	movzbl	%al,%esi
106	shrl	$16,%eax
107	movzbl	%bh,%edi
108	xorl	4(%rbp,%rsi,8),%edx
109	shrl	$16,%ebx
110	xorl	4(%rbp,%rdi,8),%ecx
111	movzbl	%ah,%esi
112	movzbl	%bl,%edi
113	xorl	0(%rbp,%rsi,8),%edx
114	xorl	2052(%rbp,%rdi,8),%ecx
115	movzbl	%al,%esi
116	movzbl	%bh,%edi
117	xorl	2048(%rbp,%rsi,8),%edx
118	xorl	2048(%rbp,%rdi,8),%ecx
119	movl	24(%r14),%ebx
120	movl	28(%r14),%eax
121	xorl	%edx,%ecx
122	rorl	$8,%edx
123	xorl	%ecx,%r10d
124	xorl	%ecx,%r11d
125	xorl	%edx,%r11d
126	xorl	%r10d,%eax
127	xorl	%r11d,%ebx
128	movzbl	%ah,%esi
129	movzbl	%bl,%edi
130	movl	2052(%rbp,%rsi,8),%edx
131	movl	0(%rbp,%rdi,8),%ecx
132	movzbl	%al,%esi
133	shrl	$16,%eax
134	movzbl	%bh,%edi
135	xorl	4(%rbp,%rsi,8),%edx
136	shrl	$16,%ebx
137	xorl	4(%rbp,%rdi,8),%ecx
138	movzbl	%ah,%esi
139	movzbl	%bl,%edi
140	xorl	0(%rbp,%rsi,8),%edx
141	xorl	2052(%rbp,%rdi,8),%ecx
142	movzbl	%al,%esi
143	movzbl	%bh,%edi
144	xorl	2048(%rbp,%rsi,8),%edx
145	xorl	2048(%rbp,%rdi,8),%ecx
146	movl	32(%r14),%ebx
147	movl	36(%r14),%eax
148	xorl	%edx,%ecx
149	rorl	$8,%edx
150	xorl	%ecx,%r8d
151	xorl	%ecx,%r9d
152	xorl	%edx,%r9d
153	xorl	%r8d,%eax
154	xorl	%r9d,%ebx
155	movzbl	%ah,%esi
156	movzbl	%bl,%edi
157	movl	2052(%rbp,%rsi,8),%edx
158	movl	0(%rbp,%rdi,8),%ecx
159	movzbl	%al,%esi
160	shrl	$16,%eax
161	movzbl	%bh,%edi
162	xorl	4(%rbp,%rsi,8),%edx
163	shrl	$16,%ebx
164	xorl	4(%rbp,%rdi,8),%ecx
165	movzbl	%ah,%esi
166	movzbl	%bl,%edi
167	xorl	0(%rbp,%rsi,8),%edx
168	xorl	2052(%rbp,%rdi,8),%ecx
169	movzbl	%al,%esi
170	movzbl	%bh,%edi
171	xorl	2048(%rbp,%rsi,8),%edx
172	xorl	2048(%rbp,%rdi,8),%ecx
173	movl	40(%r14),%ebx
174	movl	44(%r14),%eax
175	xorl	%edx,%ecx
176	rorl	$8,%edx
177	xorl	%ecx,%r10d
178	xorl	%ecx,%r11d
179	xorl	%edx,%r11d
180	xorl	%r10d,%eax
181	xorl	%r11d,%ebx
182	movzbl	%ah,%esi
183	movzbl	%bl,%edi
184	movl	2052(%rbp,%rsi,8),%edx
185	movl	0(%rbp,%rdi,8),%ecx
186	movzbl	%al,%esi
187	shrl	$16,%eax
188	movzbl	%bh,%edi
189	xorl	4(%rbp,%rsi,8),%edx
190	shrl	$16,%ebx
191	xorl	4(%rbp,%rdi,8),%ecx
192	movzbl	%ah,%esi
193	movzbl	%bl,%edi
194	xorl	0(%rbp,%rsi,8),%edx
195	xorl	2052(%rbp,%rdi,8),%ecx
196	movzbl	%al,%esi
197	movzbl	%bh,%edi
198	xorl	2048(%rbp,%rsi,8),%edx
199	xorl	2048(%rbp,%rdi,8),%ecx
200	movl	48(%r14),%ebx
201	movl	52(%r14),%eax
202	xorl	%edx,%ecx
203	rorl	$8,%edx
204	xorl	%ecx,%r8d
205	xorl	%ecx,%r9d
206	xorl	%edx,%r9d
207	xorl	%r8d,%eax
208	xorl	%r9d,%ebx
209	movzbl	%ah,%esi
210	movzbl	%bl,%edi
211	movl	2052(%rbp,%rsi,8),%edx
212	movl	0(%rbp,%rdi,8),%ecx
213	movzbl	%al,%esi
214	shrl	$16,%eax
215	movzbl	%bh,%edi
216	xorl	4(%rbp,%rsi,8),%edx
217	shrl	$16,%ebx
218	xorl	4(%rbp,%rdi,8),%ecx
219	movzbl	%ah,%esi
220	movzbl	%bl,%edi
221	xorl	0(%rbp,%rsi,8),%edx
222	xorl	2052(%rbp,%rdi,8),%ecx
223	movzbl	%al,%esi
224	movzbl	%bh,%edi
225	xorl	2048(%rbp,%rsi,8),%edx
226	xorl	2048(%rbp,%rdi,8),%ecx
227	movl	56(%r14),%ebx
228	movl	60(%r14),%eax
229	xorl	%edx,%ecx
230	rorl	$8,%edx
231	xorl	%ecx,%r10d
232	xorl	%ecx,%r11d
233	xorl	%edx,%r11d
234	xorl	%r10d,%eax
235	xorl	%r11d,%ebx
236	movzbl	%ah,%esi
237	movzbl	%bl,%edi
238	movl	2052(%rbp,%rsi,8),%edx
239	movl	0(%rbp,%rdi,8),%ecx
240	movzbl	%al,%esi
241	shrl	$16,%eax
242	movzbl	%bh,%edi
243	xorl	4(%rbp,%rsi,8),%edx
244	shrl	$16,%ebx
245	xorl	4(%rbp,%rdi,8),%ecx
246	movzbl	%ah,%esi
247	movzbl	%bl,%edi
248	xorl	0(%rbp,%rsi,8),%edx
249	xorl	2052(%rbp,%rdi,8),%ecx
250	movzbl	%al,%esi
251	movzbl	%bh,%edi
252	xorl	2048(%rbp,%rsi,8),%edx
253	xorl	2048(%rbp,%rdi,8),%ecx
254	movl	64(%r14),%ebx
255	movl	68(%r14),%eax
256	xorl	%edx,%ecx
257	rorl	$8,%edx
258	xorl	%ecx,%r8d
259	xorl	%ecx,%r9d
260	xorl	%edx,%r9d
261	leaq	64(%r14),%r14
262	cmpq	%r15,%r14
263	movl	8(%r14),%edx
264	movl	12(%r14),%ecx
265	je	.Ledone
266
267	andl	%r8d,%eax
268	orl	%r11d,%edx
269	roll	$1,%eax
270	xorl	%edx,%r10d
271	xorl	%eax,%r9d
272	andl	%r10d,%ecx
273	orl	%r9d,%ebx
274	roll	$1,%ecx
275	xorl	%ebx,%r8d
276	xorl	%ecx,%r11d
277	jmp	.Leloop
278
279.align	16
280.Ledone:
281	xorl	%r10d,%eax
282	xorl	%r11d,%ebx
283	xorl	%r8d,%ecx
284	xorl	%r9d,%edx
285
286	movl	%eax,%r8d
287	movl	%ebx,%r9d
288	movl	%ecx,%r10d
289	movl	%edx,%r11d
290
291.byte	0xf3,0xc3
292.cfi_endproc
293.size	_x86_64_Camellia_encrypt,.-_x86_64_Camellia_encrypt
294
295
296.globl	Camellia_DecryptBlock
297.type	Camellia_DecryptBlock,@function
298.align	16
299Camellia_DecryptBlock:
300.cfi_startproc
301	movl	$128,%eax
302	subl	%edi,%eax
303	movl	$3,%edi
304	adcl	$0,%edi
305	jmp	.Ldec_rounds
306.cfi_endproc
307.size	Camellia_DecryptBlock,.-Camellia_DecryptBlock
308
309.globl	Camellia_DecryptBlock_Rounds
310.type	Camellia_DecryptBlock_Rounds,@function
311.align	16
312.Ldec_rounds:
313Camellia_DecryptBlock_Rounds:
314.cfi_startproc
315	pushq	%rbx
316.cfi_adjust_cfa_offset	8
317.cfi_offset	%rbx,-16
318	pushq	%rbp
319.cfi_adjust_cfa_offset	8
320.cfi_offset	%rbp,-24
321	pushq	%r13
322.cfi_adjust_cfa_offset	8
323.cfi_offset	%r13,-32
324	pushq	%r14
325.cfi_adjust_cfa_offset	8
326.cfi_offset	%r14,-40
327	pushq	%r15
328.cfi_adjust_cfa_offset	8
329.cfi_offset	%r15,-48
330.Ldec_prologue:
331
332
333	movq	%rcx,%r13
334	movq	%rdx,%r15
335
336	shll	$6,%edi
337	leaq	.LCamellia_SBOX(%rip),%rbp
338	leaq	(%r15,%rdi,1),%r14
339
340	movl	0(%rsi),%r8d
341	movl	4(%rsi),%r9d
342	movl	8(%rsi),%r10d
343	bswapl	%r8d
344	movl	12(%rsi),%r11d
345	bswapl	%r9d
346	bswapl	%r10d
347	bswapl	%r11d
348
349	call	_x86_64_Camellia_decrypt
350
351	bswapl	%r8d
352	bswapl	%r9d
353	bswapl	%r10d
354	movl	%r8d,0(%r13)
355	bswapl	%r11d
356	movl	%r9d,4(%r13)
357	movl	%r10d,8(%r13)
358	movl	%r11d,12(%r13)
359
360	movq	0(%rsp),%r15
361.cfi_restore	%r15
362	movq	8(%rsp),%r14
363.cfi_restore	%r14
364	movq	16(%rsp),%r13
365.cfi_restore	%r13
366	movq	24(%rsp),%rbp
367.cfi_restore	%rbp
368	movq	32(%rsp),%rbx
369.cfi_restore	%rbx
370	leaq	40(%rsp),%rsp
371.cfi_adjust_cfa_offset	-40
372.Ldec_epilogue:
373	.byte	0xf3,0xc3
374.cfi_endproc
375.size	Camellia_DecryptBlock_Rounds,.-Camellia_DecryptBlock_Rounds
376
377.type	_x86_64_Camellia_decrypt,@function
378.align	16
379_x86_64_Camellia_decrypt:
380.cfi_startproc
381	xorl	0(%r14),%r9d
382	xorl	4(%r14),%r8d
383	xorl	8(%r14),%r11d
384	xorl	12(%r14),%r10d
385.align	16
386.Ldloop:
387	movl	-8(%r14),%ebx
388	movl	-4(%r14),%eax
389
390	xorl	%r8d,%eax
391	xorl	%r9d,%ebx
392	movzbl	%ah,%esi
393	movzbl	%bl,%edi
394	movl	2052(%rbp,%rsi,8),%edx
395	movl	0(%rbp,%rdi,8),%ecx
396	movzbl	%al,%esi
397	shrl	$16,%eax
398	movzbl	%bh,%edi
399	xorl	4(%rbp,%rsi,8),%edx
400	shrl	$16,%ebx
401	xorl	4(%rbp,%rdi,8),%ecx
402	movzbl	%ah,%esi
403	movzbl	%bl,%edi
404	xorl	0(%rbp,%rsi,8),%edx
405	xorl	2052(%rbp,%rdi,8),%ecx
406	movzbl	%al,%esi
407	movzbl	%bh,%edi
408	xorl	2048(%rbp,%rsi,8),%edx
409	xorl	2048(%rbp,%rdi,8),%ecx
410	movl	-16(%r14),%ebx
411	movl	-12(%r14),%eax
412	xorl	%edx,%ecx
413	rorl	$8,%edx
414	xorl	%ecx,%r10d
415	xorl	%ecx,%r11d
416	xorl	%edx,%r11d
417	xorl	%r10d,%eax
418	xorl	%r11d,%ebx
419	movzbl	%ah,%esi
420	movzbl	%bl,%edi
421	movl	2052(%rbp,%rsi,8),%edx
422	movl	0(%rbp,%rdi,8),%ecx
423	movzbl	%al,%esi
424	shrl	$16,%eax
425	movzbl	%bh,%edi
426	xorl	4(%rbp,%rsi,8),%edx
427	shrl	$16,%ebx
428	xorl	4(%rbp,%rdi,8),%ecx
429	movzbl	%ah,%esi
430	movzbl	%bl,%edi
431	xorl	0(%rbp,%rsi,8),%edx
432	xorl	2052(%rbp,%rdi,8),%ecx
433	movzbl	%al,%esi
434	movzbl	%bh,%edi
435	xorl	2048(%rbp,%rsi,8),%edx
436	xorl	2048(%rbp,%rdi,8),%ecx
437	movl	-24(%r14),%ebx
438	movl	-20(%r14),%eax
439	xorl	%edx,%ecx
440	rorl	$8,%edx
441	xorl	%ecx,%r8d
442	xorl	%ecx,%r9d
443	xorl	%edx,%r9d
444	xorl	%r8d,%eax
445	xorl	%r9d,%ebx
446	movzbl	%ah,%esi
447	movzbl	%bl,%edi
448	movl	2052(%rbp,%rsi,8),%edx
449	movl	0(%rbp,%rdi,8),%ecx
450	movzbl	%al,%esi
451	shrl	$16,%eax
452	movzbl	%bh,%edi
453	xorl	4(%rbp,%rsi,8),%edx
454	shrl	$16,%ebx
455	xorl	4(%rbp,%rdi,8),%ecx
456	movzbl	%ah,%esi
457	movzbl	%bl,%edi
458	xorl	0(%rbp,%rsi,8),%edx
459	xorl	2052(%rbp,%rdi,8),%ecx
460	movzbl	%al,%esi
461	movzbl	%bh,%edi
462	xorl	2048(%rbp,%rsi,8),%edx
463	xorl	2048(%rbp,%rdi,8),%ecx
464	movl	-32(%r14),%ebx
465	movl	-28(%r14),%eax
466	xorl	%edx,%ecx
467	rorl	$8,%edx
468	xorl	%ecx,%r10d
469	xorl	%ecx,%r11d
470	xorl	%edx,%r11d
471	xorl	%r10d,%eax
472	xorl	%r11d,%ebx
473	movzbl	%ah,%esi
474	movzbl	%bl,%edi
475	movl	2052(%rbp,%rsi,8),%edx
476	movl	0(%rbp,%rdi,8),%ecx
477	movzbl	%al,%esi
478	shrl	$16,%eax
479	movzbl	%bh,%edi
480	xorl	4(%rbp,%rsi,8),%edx
481	shrl	$16,%ebx
482	xorl	4(%rbp,%rdi,8),%ecx
483	movzbl	%ah,%esi
484	movzbl	%bl,%edi
485	xorl	0(%rbp,%rsi,8),%edx
486	xorl	2052(%rbp,%rdi,8),%ecx
487	movzbl	%al,%esi
488	movzbl	%bh,%edi
489	xorl	2048(%rbp,%rsi,8),%edx
490	xorl	2048(%rbp,%rdi,8),%ecx
491	movl	-40(%r14),%ebx
492	movl	-36(%r14),%eax
493	xorl	%edx,%ecx
494	rorl	$8,%edx
495	xorl	%ecx,%r8d
496	xorl	%ecx,%r9d
497	xorl	%edx,%r9d
498	xorl	%r8d,%eax
499	xorl	%r9d,%ebx
500	movzbl	%ah,%esi
501	movzbl	%bl,%edi
502	movl	2052(%rbp,%rsi,8),%edx
503	movl	0(%rbp,%rdi,8),%ecx
504	movzbl	%al,%esi
505	shrl	$16,%eax
506	movzbl	%bh,%edi
507	xorl	4(%rbp,%rsi,8),%edx
508	shrl	$16,%ebx
509	xorl	4(%rbp,%rdi,8),%ecx
510	movzbl	%ah,%esi
511	movzbl	%bl,%edi
512	xorl	0(%rbp,%rsi,8),%edx
513	xorl	2052(%rbp,%rdi,8),%ecx
514	movzbl	%al,%esi
515	movzbl	%bh,%edi
516	xorl	2048(%rbp,%rsi,8),%edx
517	xorl	2048(%rbp,%rdi,8),%ecx
518	movl	-48(%r14),%ebx
519	movl	-44(%r14),%eax
520	xorl	%edx,%ecx
521	rorl	$8,%edx
522	xorl	%ecx,%r10d
523	xorl	%ecx,%r11d
524	xorl	%edx,%r11d
525	xorl	%r10d,%eax
526	xorl	%r11d,%ebx
527	movzbl	%ah,%esi
528	movzbl	%bl,%edi
529	movl	2052(%rbp,%rsi,8),%edx
530	movl	0(%rbp,%rdi,8),%ecx
531	movzbl	%al,%esi
532	shrl	$16,%eax
533	movzbl	%bh,%edi
534	xorl	4(%rbp,%rsi,8),%edx
535	shrl	$16,%ebx
536	xorl	4(%rbp,%rdi,8),%ecx
537	movzbl	%ah,%esi
538	movzbl	%bl,%edi
539	xorl	0(%rbp,%rsi,8),%edx
540	xorl	2052(%rbp,%rdi,8),%ecx
541	movzbl	%al,%esi
542	movzbl	%bh,%edi
543	xorl	2048(%rbp,%rsi,8),%edx
544	xorl	2048(%rbp,%rdi,8),%ecx
545	movl	-56(%r14),%ebx
546	movl	-52(%r14),%eax
547	xorl	%edx,%ecx
548	rorl	$8,%edx
549	xorl	%ecx,%r8d
550	xorl	%ecx,%r9d
551	xorl	%edx,%r9d
552	leaq	-64(%r14),%r14
553	cmpq	%r15,%r14
554	movl	0(%r14),%edx
555	movl	4(%r14),%ecx
556	je	.Lddone
557
558	andl	%r8d,%eax
559	orl	%r11d,%edx
560	roll	$1,%eax
561	xorl	%edx,%r10d
562	xorl	%eax,%r9d
563	andl	%r10d,%ecx
564	orl	%r9d,%ebx
565	roll	$1,%ecx
566	xorl	%ebx,%r8d
567	xorl	%ecx,%r11d
568
569	jmp	.Ldloop
570
571.align	16
572.Lddone:
573	xorl	%r10d,%ecx
574	xorl	%r11d,%edx
575	xorl	%r8d,%eax
576	xorl	%r9d,%ebx
577
578	movl	%ecx,%r8d
579	movl	%edx,%r9d
580	movl	%eax,%r10d
581	movl	%ebx,%r11d
582
583.byte	0xf3,0xc3
584.cfi_endproc
585.size	_x86_64_Camellia_decrypt,.-_x86_64_Camellia_decrypt
586.globl	Camellia_Ekeygen
587.type	Camellia_Ekeygen,@function
588.align	16
589Camellia_Ekeygen:
590.cfi_startproc
591	pushq	%rbx
592.cfi_adjust_cfa_offset	8
593.cfi_offset	%rbx,-16
594	pushq	%rbp
595.cfi_adjust_cfa_offset	8
596.cfi_offset	%rbp,-24
597	pushq	%r13
598.cfi_adjust_cfa_offset	8
599.cfi_offset	%r13,-32
600	pushq	%r14
601.cfi_adjust_cfa_offset	8
602.cfi_offset	%r14,-40
603	pushq	%r15
604.cfi_adjust_cfa_offset	8
605.cfi_offset	%r15,-48
606.Lkey_prologue:
607
608	movl	%edi,%r15d
609	movq	%rdx,%r13
610
611	movl	0(%rsi),%r8d
612	movl	4(%rsi),%r9d
613	movl	8(%rsi),%r10d
614	movl	12(%rsi),%r11d
615
616	bswapl	%r8d
617	bswapl	%r9d
618	bswapl	%r10d
619	bswapl	%r11d
620	movl	%r9d,0(%r13)
621	movl	%r8d,4(%r13)
622	movl	%r11d,8(%r13)
623	movl	%r10d,12(%r13)
624	cmpq	$128,%r15
625	je	.L1st128
626
627	movl	16(%rsi),%r8d
628	movl	20(%rsi),%r9d
629	cmpq	$192,%r15
630	je	.L1st192
631	movl	24(%rsi),%r10d
632	movl	28(%rsi),%r11d
633	jmp	.L1st256
634.L1st192:
635	movl	%r8d,%r10d
636	movl	%r9d,%r11d
637	notl	%r10d
638	notl	%r11d
639.L1st256:
640	bswapl	%r8d
641	bswapl	%r9d
642	bswapl	%r10d
643	bswapl	%r11d
644	movl	%r9d,32(%r13)
645	movl	%r8d,36(%r13)
646	movl	%r11d,40(%r13)
647	movl	%r10d,44(%r13)
648	xorl	0(%r13),%r9d
649	xorl	4(%r13),%r8d
650	xorl	8(%r13),%r11d
651	xorl	12(%r13),%r10d
652
653.L1st128:
654	leaq	.LCamellia_SIGMA(%rip),%r14
655	leaq	.LCamellia_SBOX(%rip),%rbp
656
657	movl	0(%r14),%ebx
658	movl	4(%r14),%eax
659	xorl	%r8d,%eax
660	xorl	%r9d,%ebx
661	movzbl	%ah,%esi
662	movzbl	%bl,%edi
663	movl	2052(%rbp,%rsi,8),%edx
664	movl	0(%rbp,%rdi,8),%ecx
665	movzbl	%al,%esi
666	shrl	$16,%eax
667	movzbl	%bh,%edi
668	xorl	4(%rbp,%rsi,8),%edx
669	shrl	$16,%ebx
670	xorl	4(%rbp,%rdi,8),%ecx
671	movzbl	%ah,%esi
672	movzbl	%bl,%edi
673	xorl	0(%rbp,%rsi,8),%edx
674	xorl	2052(%rbp,%rdi,8),%ecx
675	movzbl	%al,%esi
676	movzbl	%bh,%edi
677	xorl	2048(%rbp,%rsi,8),%edx
678	xorl	2048(%rbp,%rdi,8),%ecx
679	movl	8(%r14),%ebx
680	movl	12(%r14),%eax
681	xorl	%edx,%ecx
682	rorl	$8,%edx
683	xorl	%ecx,%r10d
684	xorl	%ecx,%r11d
685	xorl	%edx,%r11d
686	xorl	%r10d,%eax
687	xorl	%r11d,%ebx
688	movzbl	%ah,%esi
689	movzbl	%bl,%edi
690	movl	2052(%rbp,%rsi,8),%edx
691	movl	0(%rbp,%rdi,8),%ecx
692	movzbl	%al,%esi
693	shrl	$16,%eax
694	movzbl	%bh,%edi
695	xorl	4(%rbp,%rsi,8),%edx
696	shrl	$16,%ebx
697	xorl	4(%rbp,%rdi,8),%ecx
698	movzbl	%ah,%esi
699	movzbl	%bl,%edi
700	xorl	0(%rbp,%rsi,8),%edx
701	xorl	2052(%rbp,%rdi,8),%ecx
702	movzbl	%al,%esi
703	movzbl	%bh,%edi
704	xorl	2048(%rbp,%rsi,8),%edx
705	xorl	2048(%rbp,%rdi,8),%ecx
706	movl	16(%r14),%ebx
707	movl	20(%r14),%eax
708	xorl	%edx,%ecx
709	rorl	$8,%edx
710	xorl	%ecx,%r8d
711	xorl	%ecx,%r9d
712	xorl	%edx,%r9d
713	xorl	0(%r13),%r9d
714	xorl	4(%r13),%r8d
715	xorl	8(%r13),%r11d
716	xorl	12(%r13),%r10d
717	xorl	%r8d,%eax
718	xorl	%r9d,%ebx
719	movzbl	%ah,%esi
720	movzbl	%bl,%edi
721	movl	2052(%rbp,%rsi,8),%edx
722	movl	0(%rbp,%rdi,8),%ecx
723	movzbl	%al,%esi
724	shrl	$16,%eax
725	movzbl	%bh,%edi
726	xorl	4(%rbp,%rsi,8),%edx
727	shrl	$16,%ebx
728	xorl	4(%rbp,%rdi,8),%ecx
729	movzbl	%ah,%esi
730	movzbl	%bl,%edi
731	xorl	0(%rbp,%rsi,8),%edx
732	xorl	2052(%rbp,%rdi,8),%ecx
733	movzbl	%al,%esi
734	movzbl	%bh,%edi
735	xorl	2048(%rbp,%rsi,8),%edx
736	xorl	2048(%rbp,%rdi,8),%ecx
737	movl	24(%r14),%ebx
738	movl	28(%r14),%eax
739	xorl	%edx,%ecx
740	rorl	$8,%edx
741	xorl	%ecx,%r10d
742	xorl	%ecx,%r11d
743	xorl	%edx,%r11d
744	xorl	%r10d,%eax
745	xorl	%r11d,%ebx
746	movzbl	%ah,%esi
747	movzbl	%bl,%edi
748	movl	2052(%rbp,%rsi,8),%edx
749	movl	0(%rbp,%rdi,8),%ecx
750	movzbl	%al,%esi
751	shrl	$16,%eax
752	movzbl	%bh,%edi
753	xorl	4(%rbp,%rsi,8),%edx
754	shrl	$16,%ebx
755	xorl	4(%rbp,%rdi,8),%ecx
756	movzbl	%ah,%esi
757	movzbl	%bl,%edi
758	xorl	0(%rbp,%rsi,8),%edx
759	xorl	2052(%rbp,%rdi,8),%ecx
760	movzbl	%al,%esi
761	movzbl	%bh,%edi
762	xorl	2048(%rbp,%rsi,8),%edx
763	xorl	2048(%rbp,%rdi,8),%ecx
764	movl	32(%r14),%ebx
765	movl	36(%r14),%eax
766	xorl	%edx,%ecx
767	rorl	$8,%edx
768	xorl	%ecx,%r8d
769	xorl	%ecx,%r9d
770	xorl	%edx,%r9d
771	cmpq	$128,%r15
772	jne	.L2nd256
773
774	leaq	128(%r13),%r13
775	shlq	$32,%r8
776	shlq	$32,%r10
777	orq	%r9,%r8
778	orq	%r11,%r10
779	movq	-128(%r13),%rax
780	movq	-120(%r13),%rbx
781	movq	%r8,-112(%r13)
782	movq	%r10,-104(%r13)
783	movq	%rax,%r11
784	shlq	$15,%rax
785	movq	%rbx,%r9
786	shrq	$49,%r9
787	shrq	$49,%r11
788	orq	%r9,%rax
789	shlq	$15,%rbx
790	orq	%r11,%rbx
791	movq	%rax,-96(%r13)
792	movq	%rbx,-88(%r13)
793	movq	%r8,%r11
794	shlq	$15,%r8
795	movq	%r10,%r9
796	shrq	$49,%r9
797	shrq	$49,%r11
798	orq	%r9,%r8
799	shlq	$15,%r10
800	orq	%r11,%r10
801	movq	%r8,-80(%r13)
802	movq	%r10,-72(%r13)
803	movq	%r8,%r11
804	shlq	$15,%r8
805	movq	%r10,%r9
806	shrq	$49,%r9
807	shrq	$49,%r11
808	orq	%r9,%r8
809	shlq	$15,%r10
810	orq	%r11,%r10
811	movq	%r8,-64(%r13)
812	movq	%r10,-56(%r13)
813	movq	%rax,%r11
814	shlq	$30,%rax
815	movq	%rbx,%r9
816	shrq	$34,%r9
817	shrq	$34,%r11
818	orq	%r9,%rax
819	shlq	$30,%rbx
820	orq	%r11,%rbx
821	movq	%rax,-48(%r13)
822	movq	%rbx,-40(%r13)
823	movq	%r8,%r11
824	shlq	$15,%r8
825	movq	%r10,%r9
826	shrq	$49,%r9
827	shrq	$49,%r11
828	orq	%r9,%r8
829	shlq	$15,%r10
830	orq	%r11,%r10
831	movq	%r8,-32(%r13)
832	movq	%rax,%r11
833	shlq	$15,%rax
834	movq	%rbx,%r9
835	shrq	$49,%r9
836	shrq	$49,%r11
837	orq	%r9,%rax
838	shlq	$15,%rbx
839	orq	%r11,%rbx
840	movq	%rbx,-24(%r13)
841	movq	%r8,%r11
842	shlq	$15,%r8
843	movq	%r10,%r9
844	shrq	$49,%r9
845	shrq	$49,%r11
846	orq	%r9,%r8
847	shlq	$15,%r10
848	orq	%r11,%r10
849	movq	%r8,-16(%r13)
850	movq	%r10,-8(%r13)
851	movq	%rax,%r11
852	shlq	$17,%rax
853	movq	%rbx,%r9
854	shrq	$47,%r9
855	shrq	$47,%r11
856	orq	%r9,%rax
857	shlq	$17,%rbx
858	orq	%r11,%rbx
859	movq	%rax,0(%r13)
860	movq	%rbx,8(%r13)
861	movq	%rax,%r11
862	shlq	$17,%rax
863	movq	%rbx,%r9
864	shrq	$47,%r9
865	shrq	$47,%r11
866	orq	%r9,%rax
867	shlq	$17,%rbx
868	orq	%r11,%rbx
869	movq	%rax,16(%r13)
870	movq	%rbx,24(%r13)
871	movq	%r8,%r11
872	shlq	$34,%r8
873	movq	%r10,%r9
874	shrq	$30,%r9
875	shrq	$30,%r11
876	orq	%r9,%r8
877	shlq	$34,%r10
878	orq	%r11,%r10
879	movq	%r8,32(%r13)
880	movq	%r10,40(%r13)
881	movq	%rax,%r11
882	shlq	$17,%rax
883	movq	%rbx,%r9
884	shrq	$47,%r9
885	shrq	$47,%r11
886	orq	%r9,%rax
887	shlq	$17,%rbx
888	orq	%r11,%rbx
889	movq	%rax,48(%r13)
890	movq	%rbx,56(%r13)
891	movq	%r8,%r11
892	shlq	$17,%r8
893	movq	%r10,%r9
894	shrq	$47,%r9
895	shrq	$47,%r11
896	orq	%r9,%r8
897	shlq	$17,%r10
898	orq	%r11,%r10
899	movq	%r8,64(%r13)
900	movq	%r10,72(%r13)
901	movl	$3,%eax
902	jmp	.Ldone
903.align	16
904.L2nd256:
905	movl	%r9d,48(%r13)
906	movl	%r8d,52(%r13)
907	movl	%r11d,56(%r13)
908	movl	%r10d,60(%r13)
909	xorl	32(%r13),%r9d
910	xorl	36(%r13),%r8d
911	xorl	40(%r13),%r11d
912	xorl	44(%r13),%r10d
913	xorl	%r8d,%eax
914	xorl	%r9d,%ebx
915	movzbl	%ah,%esi
916	movzbl	%bl,%edi
917	movl	2052(%rbp,%rsi,8),%edx
918	movl	0(%rbp,%rdi,8),%ecx
919	movzbl	%al,%esi
920	shrl	$16,%eax
921	movzbl	%bh,%edi
922	xorl	4(%rbp,%rsi,8),%edx
923	shrl	$16,%ebx
924	xorl	4(%rbp,%rdi,8),%ecx
925	movzbl	%ah,%esi
926	movzbl	%bl,%edi
927	xorl	0(%rbp,%rsi,8),%edx
928	xorl	2052(%rbp,%rdi,8),%ecx
929	movzbl	%al,%esi
930	movzbl	%bh,%edi
931	xorl	2048(%rbp,%rsi,8),%edx
932	xorl	2048(%rbp,%rdi,8),%ecx
933	movl	40(%r14),%ebx
934	movl	44(%r14),%eax
935	xorl	%edx,%ecx
936	rorl	$8,%edx
937	xorl	%ecx,%r10d
938	xorl	%ecx,%r11d
939	xorl	%edx,%r11d
940	xorl	%r10d,%eax
941	xorl	%r11d,%ebx
942	movzbl	%ah,%esi
943	movzbl	%bl,%edi
944	movl	2052(%rbp,%rsi,8),%edx
945	movl	0(%rbp,%rdi,8),%ecx
946	movzbl	%al,%esi
947	shrl	$16,%eax
948	movzbl	%bh,%edi
949	xorl	4(%rbp,%rsi,8),%edx
950	shrl	$16,%ebx
951	xorl	4(%rbp,%rdi,8),%ecx
952	movzbl	%ah,%esi
953	movzbl	%bl,%edi
954	xorl	0(%rbp,%rsi,8),%edx
955	xorl	2052(%rbp,%rdi,8),%ecx
956	movzbl	%al,%esi
957	movzbl	%bh,%edi
958	xorl	2048(%rbp,%rsi,8),%edx
959	xorl	2048(%rbp,%rdi,8),%ecx
960	movl	48(%r14),%ebx
961	movl	52(%r14),%eax
962	xorl	%edx,%ecx
963	rorl	$8,%edx
964	xorl	%ecx,%r8d
965	xorl	%ecx,%r9d
966	xorl	%edx,%r9d
967	movq	0(%r13),%rax
968	movq	8(%r13),%rbx
969	movq	32(%r13),%rcx
970	movq	40(%r13),%rdx
971	movq	48(%r13),%r14
972	movq	56(%r13),%r15
973	leaq	128(%r13),%r13
974	shlq	$32,%r8
975	shlq	$32,%r10
976	orq	%r9,%r8
977	orq	%r11,%r10
978	movq	%r8,-112(%r13)
979	movq	%r10,-104(%r13)
980	movq	%rcx,%r11
981	shlq	$15,%rcx
982	movq	%rdx,%r9
983	shrq	$49,%r9
984	shrq	$49,%r11
985	orq	%r9,%rcx
986	shlq	$15,%rdx
987	orq	%r11,%rdx
988	movq	%rcx,-96(%r13)
989	movq	%rdx,-88(%r13)
990	movq	%r14,%r11
991	shlq	$15,%r14
992	movq	%r15,%r9
993	shrq	$49,%r9
994	shrq	$49,%r11
995	orq	%r9,%r14
996	shlq	$15,%r15
997	orq	%r11,%r15
998	movq	%r14,-80(%r13)
999	movq	%r15,-72(%r13)
1000	movq	%rcx,%r11
1001	shlq	$15,%rcx
1002	movq	%rdx,%r9
1003	shrq	$49,%r9
1004	shrq	$49,%r11
1005	orq	%r9,%rcx
1006	shlq	$15,%rdx
1007	orq	%r11,%rdx
1008	movq	%rcx,-64(%r13)
1009	movq	%rdx,-56(%r13)
1010	movq	%r8,%r11
1011	shlq	$30,%r8
1012	movq	%r10,%r9
1013	shrq	$34,%r9
1014	shrq	$34,%r11
1015	orq	%r9,%r8
1016	shlq	$30,%r10
1017	orq	%r11,%r10
1018	movq	%r8,-48(%r13)
1019	movq	%r10,-40(%r13)
1020	movq	%rax,%r11
1021	shlq	$45,%rax
1022	movq	%rbx,%r9
1023	shrq	$19,%r9
1024	shrq	$19,%r11
1025	orq	%r9,%rax
1026	shlq	$45,%rbx
1027	orq	%r11,%rbx
1028	movq	%rax,-32(%r13)
1029	movq	%rbx,-24(%r13)
1030	movq	%r14,%r11
1031	shlq	$30,%r14
1032	movq	%r15,%r9
1033	shrq	$34,%r9
1034	shrq	$34,%r11
1035	orq	%r9,%r14
1036	shlq	$30,%r15
1037	orq	%r11,%r15
1038	movq	%r14,-16(%r13)
1039	movq	%r15,-8(%r13)
1040	movq	%rax,%r11
1041	shlq	$15,%rax
1042	movq	%rbx,%r9
1043	shrq	$49,%r9
1044	shrq	$49,%r11
1045	orq	%r9,%rax
1046	shlq	$15,%rbx
1047	orq	%r11,%rbx
1048	movq	%rax,0(%r13)
1049	movq	%rbx,8(%r13)
1050	movq	%rcx,%r11
1051	shlq	$30,%rcx
1052	movq	%rdx,%r9
1053	shrq	$34,%r9
1054	shrq	$34,%r11
1055	orq	%r9,%rcx
1056	shlq	$30,%rdx
1057	orq	%r11,%rdx
1058	movq	%rcx,16(%r13)
1059	movq	%rdx,24(%r13)
1060	movq	%r8,%r11
1061	shlq	$30,%r8
1062	movq	%r10,%r9
1063	shrq	$34,%r9
1064	shrq	$34,%r11
1065	orq	%r9,%r8
1066	shlq	$30,%r10
1067	orq	%r11,%r10
1068	movq	%r8,32(%r13)
1069	movq	%r10,40(%r13)
1070	movq	%rax,%r11
1071	shlq	$17,%rax
1072	movq	%rbx,%r9
1073	shrq	$47,%r9
1074	shrq	$47,%r11
1075	orq	%r9,%rax
1076	shlq	$17,%rbx
1077	orq	%r11,%rbx
1078	movq	%rax,48(%r13)
1079	movq	%rbx,56(%r13)
1080	movq	%r14,%r11
1081	shlq	$32,%r14
1082	movq	%r15,%r9
1083	shrq	$32,%r9
1084	shrq	$32,%r11
1085	orq	%r9,%r14
1086	shlq	$32,%r15
1087	orq	%r11,%r15
1088	movq	%r14,64(%r13)
1089	movq	%r15,72(%r13)
1090	movq	%rcx,%r11
1091	shlq	$34,%rcx
1092	movq	%rdx,%r9
1093	shrq	$30,%r9
1094	shrq	$30,%r11
1095	orq	%r9,%rcx
1096	shlq	$34,%rdx
1097	orq	%r11,%rdx
1098	movq	%rcx,80(%r13)
1099	movq	%rdx,88(%r13)
1100	movq	%r14,%r11
1101	shlq	$17,%r14
1102	movq	%r15,%r9
1103	shrq	$47,%r9
1104	shrq	$47,%r11
1105	orq	%r9,%r14
1106	shlq	$17,%r15
1107	orq	%r11,%r15
1108	movq	%r14,96(%r13)
1109	movq	%r15,104(%r13)
1110	movq	%rax,%r11
1111	shlq	$34,%rax
1112	movq	%rbx,%r9
1113	shrq	$30,%r9
1114	shrq	$30,%r11
1115	orq	%r9,%rax
1116	shlq	$34,%rbx
1117	orq	%r11,%rbx
1118	movq	%rax,112(%r13)
1119	movq	%rbx,120(%r13)
1120	movq	%r8,%r11
1121	shlq	$51,%r8
1122	movq	%r10,%r9
1123	shrq	$13,%r9
1124	shrq	$13,%r11
1125	orq	%r9,%r8
1126	shlq	$51,%r10
1127	orq	%r11,%r10
1128	movq	%r8,128(%r13)
1129	movq	%r10,136(%r13)
1130	movl	$4,%eax
1131.Ldone:
1132	movq	0(%rsp),%r15
1133.cfi_restore	%r15
1134	movq	8(%rsp),%r14
1135.cfi_restore	%r14
1136	movq	16(%rsp),%r13
1137.cfi_restore	%r13
1138	movq	24(%rsp),%rbp
1139.cfi_restore	%rbp
1140	movq	32(%rsp),%rbx
1141.cfi_restore	%rbx
1142	leaq	40(%rsp),%rsp
1143.cfi_adjust_cfa_offset	-40
1144.Lkey_epilogue:
1145	.byte	0xf3,0xc3
1146.cfi_endproc
1147.size	Camellia_Ekeygen,.-Camellia_Ekeygen
1148.align	64
1149.LCamellia_SIGMA:
1150.long	0x3bcc908b, 0xa09e667f, 0x4caa73b2, 0xb67ae858
1151.long	0xe94f82be, 0xc6ef372f, 0xf1d36f1c, 0x54ff53a5
1152.long	0xde682d1d, 0x10e527fa, 0xb3e6c1fd, 0xb05688c2
1153.long	0,          0,          0,          0
1154.LCamellia_SBOX:
1155.long	0x70707000,0x70700070
1156.long	0x82828200,0x2c2c002c
1157.long	0x2c2c2c00,0xb3b300b3
1158.long	0xececec00,0xc0c000c0
1159.long	0xb3b3b300,0xe4e400e4
1160.long	0x27272700,0x57570057
1161.long	0xc0c0c000,0xeaea00ea
1162.long	0xe5e5e500,0xaeae00ae
1163.long	0xe4e4e400,0x23230023
1164.long	0x85858500,0x6b6b006b
1165.long	0x57575700,0x45450045
1166.long	0x35353500,0xa5a500a5
1167.long	0xeaeaea00,0xeded00ed
1168.long	0x0c0c0c00,0x4f4f004f
1169.long	0xaeaeae00,0x1d1d001d
1170.long	0x41414100,0x92920092
1171.long	0x23232300,0x86860086
1172.long	0xefefef00,0xafaf00af
1173.long	0x6b6b6b00,0x7c7c007c
1174.long	0x93939300,0x1f1f001f
1175.long	0x45454500,0x3e3e003e
1176.long	0x19191900,0xdcdc00dc
1177.long	0xa5a5a500,0x5e5e005e
1178.long	0x21212100,0x0b0b000b
1179.long	0xededed00,0xa6a600a6
1180.long	0x0e0e0e00,0x39390039
1181.long	0x4f4f4f00,0xd5d500d5
1182.long	0x4e4e4e00,0x5d5d005d
1183.long	0x1d1d1d00,0xd9d900d9
1184.long	0x65656500,0x5a5a005a
1185.long	0x92929200,0x51510051
1186.long	0xbdbdbd00,0x6c6c006c
1187.long	0x86868600,0x8b8b008b
1188.long	0xb8b8b800,0x9a9a009a
1189.long	0xafafaf00,0xfbfb00fb
1190.long	0x8f8f8f00,0xb0b000b0
1191.long	0x7c7c7c00,0x74740074
1192.long	0xebebeb00,0x2b2b002b
1193.long	0x1f1f1f00,0xf0f000f0
1194.long	0xcecece00,0x84840084
1195.long	0x3e3e3e00,0xdfdf00df
1196.long	0x30303000,0xcbcb00cb
1197.long	0xdcdcdc00,0x34340034
1198.long	0x5f5f5f00,0x76760076
1199.long	0x5e5e5e00,0x6d6d006d
1200.long	0xc5c5c500,0xa9a900a9
1201.long	0x0b0b0b00,0xd1d100d1
1202.long	0x1a1a1a00,0x04040004
1203.long	0xa6a6a600,0x14140014
1204.long	0xe1e1e100,0x3a3a003a
1205.long	0x39393900,0xdede00de
1206.long	0xcacaca00,0x11110011
1207.long	0xd5d5d500,0x32320032
1208.long	0x47474700,0x9c9c009c
1209.long	0x5d5d5d00,0x53530053
1210.long	0x3d3d3d00,0xf2f200f2
1211.long	0xd9d9d900,0xfefe00fe
1212.long	0x01010100,0xcfcf00cf
1213.long	0x5a5a5a00,0xc3c300c3
1214.long	0xd6d6d600,0x7a7a007a
1215.long	0x51515100,0x24240024
1216.long	0x56565600,0xe8e800e8
1217.long	0x6c6c6c00,0x60600060
1218.long	0x4d4d4d00,0x69690069
1219.long	0x8b8b8b00,0xaaaa00aa
1220.long	0x0d0d0d00,0xa0a000a0
1221.long	0x9a9a9a00,0xa1a100a1
1222.long	0x66666600,0x62620062
1223.long	0xfbfbfb00,0x54540054
1224.long	0xcccccc00,0x1e1e001e
1225.long	0xb0b0b000,0xe0e000e0
1226.long	0x2d2d2d00,0x64640064
1227.long	0x74747400,0x10100010
1228.long	0x12121200,0x00000000
1229.long	0x2b2b2b00,0xa3a300a3
1230.long	0x20202000,0x75750075
1231.long	0xf0f0f000,0x8a8a008a
1232.long	0xb1b1b100,0xe6e600e6
1233.long	0x84848400,0x09090009
1234.long	0x99999900,0xdddd00dd
1235.long	0xdfdfdf00,0x87870087
1236.long	0x4c4c4c00,0x83830083
1237.long	0xcbcbcb00,0xcdcd00cd
1238.long	0xc2c2c200,0x90900090
1239.long	0x34343400,0x73730073
1240.long	0x7e7e7e00,0xf6f600f6
1241.long	0x76767600,0x9d9d009d
1242.long	0x05050500,0xbfbf00bf
1243.long	0x6d6d6d00,0x52520052
1244.long	0xb7b7b700,0xd8d800d8
1245.long	0xa9a9a900,0xc8c800c8
1246.long	0x31313100,0xc6c600c6
1247.long	0xd1d1d100,0x81810081
1248.long	0x17171700,0x6f6f006f
1249.long	0x04040400,0x13130013
1250.long	0xd7d7d700,0x63630063
1251.long	0x14141400,0xe9e900e9
1252.long	0x58585800,0xa7a700a7
1253.long	0x3a3a3a00,0x9f9f009f
1254.long	0x61616100,0xbcbc00bc
1255.long	0xdedede00,0x29290029
1256.long	0x1b1b1b00,0xf9f900f9
1257.long	0x11111100,0x2f2f002f
1258.long	0x1c1c1c00,0xb4b400b4
1259.long	0x32323200,0x78780078
1260.long	0x0f0f0f00,0x06060006
1261.long	0x9c9c9c00,0xe7e700e7
1262.long	0x16161600,0x71710071
1263.long	0x53535300,0xd4d400d4
1264.long	0x18181800,0xabab00ab
1265.long	0xf2f2f200,0x88880088
1266.long	0x22222200,0x8d8d008d
1267.long	0xfefefe00,0x72720072
1268.long	0x44444400,0xb9b900b9
1269.long	0xcfcfcf00,0xf8f800f8
1270.long	0xb2b2b200,0xacac00ac
1271.long	0xc3c3c300,0x36360036
1272.long	0xb5b5b500,0x2a2a002a
1273.long	0x7a7a7a00,0x3c3c003c
1274.long	0x91919100,0xf1f100f1
1275.long	0x24242400,0x40400040
1276.long	0x08080800,0xd3d300d3
1277.long	0xe8e8e800,0xbbbb00bb
1278.long	0xa8a8a800,0x43430043
1279.long	0x60606000,0x15150015
1280.long	0xfcfcfc00,0xadad00ad
1281.long	0x69696900,0x77770077
1282.long	0x50505000,0x80800080
1283.long	0xaaaaaa00,0x82820082
1284.long	0xd0d0d000,0xecec00ec
1285.long	0xa0a0a000,0x27270027
1286.long	0x7d7d7d00,0xe5e500e5
1287.long	0xa1a1a100,0x85850085
1288.long	0x89898900,0x35350035
1289.long	0x62626200,0x0c0c000c
1290.long	0x97979700,0x41410041
1291.long	0x54545400,0xefef00ef
1292.long	0x5b5b5b00,0x93930093
1293.long	0x1e1e1e00,0x19190019
1294.long	0x95959500,0x21210021
1295.long	0xe0e0e000,0x0e0e000e
1296.long	0xffffff00,0x4e4e004e
1297.long	0x64646400,0x65650065
1298.long	0xd2d2d200,0xbdbd00bd
1299.long	0x10101000,0xb8b800b8
1300.long	0xc4c4c400,0x8f8f008f
1301.long	0x00000000,0xebeb00eb
1302.long	0x48484800,0xcece00ce
1303.long	0xa3a3a300,0x30300030
1304.long	0xf7f7f700,0x5f5f005f
1305.long	0x75757500,0xc5c500c5
1306.long	0xdbdbdb00,0x1a1a001a
1307.long	0x8a8a8a00,0xe1e100e1
1308.long	0x03030300,0xcaca00ca
1309.long	0xe6e6e600,0x47470047
1310.long	0xdadada00,0x3d3d003d
1311.long	0x09090900,0x01010001
1312.long	0x3f3f3f00,0xd6d600d6
1313.long	0xdddddd00,0x56560056
1314.long	0x94949400,0x4d4d004d
1315.long	0x87878700,0x0d0d000d
1316.long	0x5c5c5c00,0x66660066
1317.long	0x83838300,0xcccc00cc
1318.long	0x02020200,0x2d2d002d
1319.long	0xcdcdcd00,0x12120012
1320.long	0x4a4a4a00,0x20200020
1321.long	0x90909000,0xb1b100b1
1322.long	0x33333300,0x99990099
1323.long	0x73737300,0x4c4c004c
1324.long	0x67676700,0xc2c200c2
1325.long	0xf6f6f600,0x7e7e007e
1326.long	0xf3f3f300,0x05050005
1327.long	0x9d9d9d00,0xb7b700b7
1328.long	0x7f7f7f00,0x31310031
1329.long	0xbfbfbf00,0x17170017
1330.long	0xe2e2e200,0xd7d700d7
1331.long	0x52525200,0x58580058
1332.long	0x9b9b9b00,0x61610061
1333.long	0xd8d8d800,0x1b1b001b
1334.long	0x26262600,0x1c1c001c
1335.long	0xc8c8c800,0x0f0f000f
1336.long	0x37373700,0x16160016
1337.long	0xc6c6c600,0x18180018
1338.long	0x3b3b3b00,0x22220022
1339.long	0x81818100,0x44440044
1340.long	0x96969600,0xb2b200b2
1341.long	0x6f6f6f00,0xb5b500b5
1342.long	0x4b4b4b00,0x91910091
1343.long	0x13131300,0x08080008
1344.long	0xbebebe00,0xa8a800a8
1345.long	0x63636300,0xfcfc00fc
1346.long	0x2e2e2e00,0x50500050
1347.long	0xe9e9e900,0xd0d000d0
1348.long	0x79797900,0x7d7d007d
1349.long	0xa7a7a700,0x89890089
1350.long	0x8c8c8c00,0x97970097
1351.long	0x9f9f9f00,0x5b5b005b
1352.long	0x6e6e6e00,0x95950095
1353.long	0xbcbcbc00,0xffff00ff
1354.long	0x8e8e8e00,0xd2d200d2
1355.long	0x29292900,0xc4c400c4
1356.long	0xf5f5f500,0x48480048
1357.long	0xf9f9f900,0xf7f700f7
1358.long	0xb6b6b600,0xdbdb00db
1359.long	0x2f2f2f00,0x03030003
1360.long	0xfdfdfd00,0xdada00da
1361.long	0xb4b4b400,0x3f3f003f
1362.long	0x59595900,0x94940094
1363.long	0x78787800,0x5c5c005c
1364.long	0x98989800,0x02020002
1365.long	0x06060600,0x4a4a004a
1366.long	0x6a6a6a00,0x33330033
1367.long	0xe7e7e700,0x67670067
1368.long	0x46464600,0xf3f300f3
1369.long	0x71717100,0x7f7f007f
1370.long	0xbababa00,0xe2e200e2
1371.long	0xd4d4d400,0x9b9b009b
1372.long	0x25252500,0x26260026
1373.long	0xababab00,0x37370037
1374.long	0x42424200,0x3b3b003b
1375.long	0x88888800,0x96960096
1376.long	0xa2a2a200,0x4b4b004b
1377.long	0x8d8d8d00,0xbebe00be
1378.long	0xfafafa00,0x2e2e002e
1379.long	0x72727200,0x79790079
1380.long	0x07070700,0x8c8c008c
1381.long	0xb9b9b900,0x6e6e006e
1382.long	0x55555500,0x8e8e008e
1383.long	0xf8f8f800,0xf5f500f5
1384.long	0xeeeeee00,0xb6b600b6
1385.long	0xacacac00,0xfdfd00fd
1386.long	0x0a0a0a00,0x59590059
1387.long	0x36363600,0x98980098
1388.long	0x49494900,0x6a6a006a
1389.long	0x2a2a2a00,0x46460046
1390.long	0x68686800,0xbaba00ba
1391.long	0x3c3c3c00,0x25250025
1392.long	0x38383800,0x42420042
1393.long	0xf1f1f100,0xa2a200a2
1394.long	0xa4a4a400,0xfafa00fa
1395.long	0x40404000,0x07070007
1396.long	0x28282800,0x55550055
1397.long	0xd3d3d300,0xeeee00ee
1398.long	0x7b7b7b00,0x0a0a000a
1399.long	0xbbbbbb00,0x49490049
1400.long	0xc9c9c900,0x68680068
1401.long	0x43434300,0x38380038
1402.long	0xc1c1c100,0xa4a400a4
1403.long	0x15151500,0x28280028
1404.long	0xe3e3e300,0x7b7b007b
1405.long	0xadadad00,0xc9c900c9
1406.long	0xf4f4f400,0xc1c100c1
1407.long	0x77777700,0xe3e300e3
1408.long	0xc7c7c700,0xf4f400f4
1409.long	0x80808000,0xc7c700c7
1410.long	0x9e9e9e00,0x9e9e009e
1411.long	0x00e0e0e0,0x38003838
1412.long	0x00050505,0x41004141
1413.long	0x00585858,0x16001616
1414.long	0x00d9d9d9,0x76007676
1415.long	0x00676767,0xd900d9d9
1416.long	0x004e4e4e,0x93009393
1417.long	0x00818181,0x60006060
1418.long	0x00cbcbcb,0xf200f2f2
1419.long	0x00c9c9c9,0x72007272
1420.long	0x000b0b0b,0xc200c2c2
1421.long	0x00aeaeae,0xab00abab
1422.long	0x006a6a6a,0x9a009a9a
1423.long	0x00d5d5d5,0x75007575
1424.long	0x00181818,0x06000606
1425.long	0x005d5d5d,0x57005757
1426.long	0x00828282,0xa000a0a0
1427.long	0x00464646,0x91009191
1428.long	0x00dfdfdf,0xf700f7f7
1429.long	0x00d6d6d6,0xb500b5b5
1430.long	0x00272727,0xc900c9c9
1431.long	0x008a8a8a,0xa200a2a2
1432.long	0x00323232,0x8c008c8c
1433.long	0x004b4b4b,0xd200d2d2
1434.long	0x00424242,0x90009090
1435.long	0x00dbdbdb,0xf600f6f6
1436.long	0x001c1c1c,0x07000707
1437.long	0x009e9e9e,0xa700a7a7
1438.long	0x009c9c9c,0x27002727
1439.long	0x003a3a3a,0x8e008e8e
1440.long	0x00cacaca,0xb200b2b2
1441.long	0x00252525,0x49004949
1442.long	0x007b7b7b,0xde00dede
1443.long	0x000d0d0d,0x43004343
1444.long	0x00717171,0x5c005c5c
1445.long	0x005f5f5f,0xd700d7d7
1446.long	0x001f1f1f,0xc700c7c7
1447.long	0x00f8f8f8,0x3e003e3e
1448.long	0x00d7d7d7,0xf500f5f5
1449.long	0x003e3e3e,0x8f008f8f
1450.long	0x009d9d9d,0x67006767
1451.long	0x007c7c7c,0x1f001f1f
1452.long	0x00606060,0x18001818
1453.long	0x00b9b9b9,0x6e006e6e
1454.long	0x00bebebe,0xaf00afaf
1455.long	0x00bcbcbc,0x2f002f2f
1456.long	0x008b8b8b,0xe200e2e2
1457.long	0x00161616,0x85008585
1458.long	0x00343434,0x0d000d0d
1459.long	0x004d4d4d,0x53005353
1460.long	0x00c3c3c3,0xf000f0f0
1461.long	0x00727272,0x9c009c9c
1462.long	0x00959595,0x65006565
1463.long	0x00ababab,0xea00eaea
1464.long	0x008e8e8e,0xa300a3a3
1465.long	0x00bababa,0xae00aeae
1466.long	0x007a7a7a,0x9e009e9e
1467.long	0x00b3b3b3,0xec00ecec
1468.long	0x00020202,0x80008080
1469.long	0x00b4b4b4,0x2d002d2d
1470.long	0x00adadad,0x6b006b6b
1471.long	0x00a2a2a2,0xa800a8a8
1472.long	0x00acacac,0x2b002b2b
1473.long	0x00d8d8d8,0x36003636
1474.long	0x009a9a9a,0xa600a6a6
1475.long	0x00171717,0xc500c5c5
1476.long	0x001a1a1a,0x86008686
1477.long	0x00353535,0x4d004d4d
1478.long	0x00cccccc,0x33003333
1479.long	0x00f7f7f7,0xfd00fdfd
1480.long	0x00999999,0x66006666
1481.long	0x00616161,0x58005858
1482.long	0x005a5a5a,0x96009696
1483.long	0x00e8e8e8,0x3a003a3a
1484.long	0x00242424,0x09000909
1485.long	0x00565656,0x95009595
1486.long	0x00404040,0x10001010
1487.long	0x00e1e1e1,0x78007878
1488.long	0x00636363,0xd800d8d8
1489.long	0x00090909,0x42004242
1490.long	0x00333333,0xcc00cccc
1491.long	0x00bfbfbf,0xef00efef
1492.long	0x00989898,0x26002626
1493.long	0x00979797,0xe500e5e5
1494.long	0x00858585,0x61006161
1495.long	0x00686868,0x1a001a1a
1496.long	0x00fcfcfc,0x3f003f3f
1497.long	0x00ececec,0x3b003b3b
1498.long	0x000a0a0a,0x82008282
1499.long	0x00dadada,0xb600b6b6
1500.long	0x006f6f6f,0xdb00dbdb
1501.long	0x00535353,0xd400d4d4
1502.long	0x00626262,0x98009898
1503.long	0x00a3a3a3,0xe800e8e8
1504.long	0x002e2e2e,0x8b008b8b
1505.long	0x00080808,0x02000202
1506.long	0x00afafaf,0xeb00ebeb
1507.long	0x00282828,0x0a000a0a
1508.long	0x00b0b0b0,0x2c002c2c
1509.long	0x00747474,0x1d001d1d
1510.long	0x00c2c2c2,0xb000b0b0
1511.long	0x00bdbdbd,0x6f006f6f
1512.long	0x00363636,0x8d008d8d
1513.long	0x00222222,0x88008888
1514.long	0x00383838,0x0e000e0e
1515.long	0x00646464,0x19001919
1516.long	0x001e1e1e,0x87008787
1517.long	0x00393939,0x4e004e4e
1518.long	0x002c2c2c,0x0b000b0b
1519.long	0x00a6a6a6,0xa900a9a9
1520.long	0x00303030,0x0c000c0c
1521.long	0x00e5e5e5,0x79007979
1522.long	0x00444444,0x11001111
1523.long	0x00fdfdfd,0x7f007f7f
1524.long	0x00888888,0x22002222
1525.long	0x009f9f9f,0xe700e7e7
1526.long	0x00656565,0x59005959
1527.long	0x00878787,0xe100e1e1
1528.long	0x006b6b6b,0xda00dada
1529.long	0x00f4f4f4,0x3d003d3d
1530.long	0x00232323,0xc800c8c8
1531.long	0x00484848,0x12001212
1532.long	0x00101010,0x04000404
1533.long	0x00d1d1d1,0x74007474
1534.long	0x00515151,0x54005454
1535.long	0x00c0c0c0,0x30003030
1536.long	0x00f9f9f9,0x7e007e7e
1537.long	0x00d2d2d2,0xb400b4b4
1538.long	0x00a0a0a0,0x28002828
1539.long	0x00555555,0x55005555
1540.long	0x00a1a1a1,0x68006868
1541.long	0x00414141,0x50005050
1542.long	0x00fafafa,0xbe00bebe
1543.long	0x00434343,0xd000d0d0
1544.long	0x00131313,0xc400c4c4
1545.long	0x00c4c4c4,0x31003131
1546.long	0x002f2f2f,0xcb00cbcb
1547.long	0x00a8a8a8,0x2a002a2a
1548.long	0x00b6b6b6,0xad00adad
1549.long	0x003c3c3c,0x0f000f0f
1550.long	0x002b2b2b,0xca00caca
1551.long	0x00c1c1c1,0x70007070
1552.long	0x00ffffff,0xff00ffff
1553.long	0x00c8c8c8,0x32003232
1554.long	0x00a5a5a5,0x69006969
1555.long	0x00202020,0x08000808
1556.long	0x00898989,0x62006262
1557.long	0x00000000,0x00000000
1558.long	0x00909090,0x24002424
1559.long	0x00474747,0xd100d1d1
1560.long	0x00efefef,0xfb00fbfb
1561.long	0x00eaeaea,0xba00baba
1562.long	0x00b7b7b7,0xed00eded
1563.long	0x00151515,0x45004545
1564.long	0x00060606,0x81008181
1565.long	0x00cdcdcd,0x73007373
1566.long	0x00b5b5b5,0x6d006d6d
1567.long	0x00121212,0x84008484
1568.long	0x007e7e7e,0x9f009f9f
1569.long	0x00bbbbbb,0xee00eeee
1570.long	0x00292929,0x4a004a4a
1571.long	0x000f0f0f,0xc300c3c3
1572.long	0x00b8b8b8,0x2e002e2e
1573.long	0x00070707,0xc100c1c1
1574.long	0x00040404,0x01000101
1575.long	0x009b9b9b,0xe600e6e6
1576.long	0x00949494,0x25002525
1577.long	0x00212121,0x48004848
1578.long	0x00666666,0x99009999
1579.long	0x00e6e6e6,0xb900b9b9
1580.long	0x00cecece,0xb300b3b3
1581.long	0x00ededed,0x7b007b7b
1582.long	0x00e7e7e7,0xf900f9f9
1583.long	0x003b3b3b,0xce00cece
1584.long	0x00fefefe,0xbf00bfbf
1585.long	0x007f7f7f,0xdf00dfdf
1586.long	0x00c5c5c5,0x71007171
1587.long	0x00a4a4a4,0x29002929
1588.long	0x00373737,0xcd00cdcd
1589.long	0x00b1b1b1,0x6c006c6c
1590.long	0x004c4c4c,0x13001313
1591.long	0x00919191,0x64006464
1592.long	0x006e6e6e,0x9b009b9b
1593.long	0x008d8d8d,0x63006363
1594.long	0x00767676,0x9d009d9d
1595.long	0x00030303,0xc000c0c0
1596.long	0x002d2d2d,0x4b004b4b
1597.long	0x00dedede,0xb700b7b7
1598.long	0x00969696,0xa500a5a5
1599.long	0x00262626,0x89008989
1600.long	0x007d7d7d,0x5f005f5f
1601.long	0x00c6c6c6,0xb100b1b1
1602.long	0x005c5c5c,0x17001717
1603.long	0x00d3d3d3,0xf400f4f4
1604.long	0x00f2f2f2,0xbc00bcbc
1605.long	0x004f4f4f,0xd300d3d3
1606.long	0x00191919,0x46004646
1607.long	0x003f3f3f,0xcf00cfcf
1608.long	0x00dcdcdc,0x37003737
1609.long	0x00797979,0x5e005e5e
1610.long	0x001d1d1d,0x47004747
1611.long	0x00525252,0x94009494
1612.long	0x00ebebeb,0xfa00fafa
1613.long	0x00f3f3f3,0xfc00fcfc
1614.long	0x006d6d6d,0x5b005b5b
1615.long	0x005e5e5e,0x97009797
1616.long	0x00fbfbfb,0xfe00fefe
1617.long	0x00696969,0x5a005a5a
1618.long	0x00b2b2b2,0xac00acac
1619.long	0x00f0f0f0,0x3c003c3c
1620.long	0x00313131,0x4c004c4c
1621.long	0x000c0c0c,0x03000303
1622.long	0x00d4d4d4,0x35003535
1623.long	0x00cfcfcf,0xf300f3f3
1624.long	0x008c8c8c,0x23002323
1625.long	0x00e2e2e2,0xb800b8b8
1626.long	0x00757575,0x5d005d5d
1627.long	0x00a9a9a9,0x6a006a6a
1628.long	0x004a4a4a,0x92009292
1629.long	0x00575757,0xd500d5d5
1630.long	0x00848484,0x21002121
1631.long	0x00111111,0x44004444
1632.long	0x00454545,0x51005151
1633.long	0x001b1b1b,0xc600c6c6
1634.long	0x00f5f5f5,0x7d007d7d
1635.long	0x00e4e4e4,0x39003939
1636.long	0x000e0e0e,0x83008383
1637.long	0x00737373,0xdc00dcdc
1638.long	0x00aaaaaa,0xaa00aaaa
1639.long	0x00f1f1f1,0x7c007c7c
1640.long	0x00dddddd,0x77007777
1641.long	0x00595959,0x56005656
1642.long	0x00141414,0x05000505
1643.long	0x006c6c6c,0x1b001b1b
1644.long	0x00929292,0xa400a4a4
1645.long	0x00545454,0x15001515
1646.long	0x00d0d0d0,0x34003434
1647.long	0x00787878,0x1e001e1e
1648.long	0x00707070,0x1c001c1c
1649.long	0x00e3e3e3,0xf800f8f8
1650.long	0x00494949,0x52005252
1651.long	0x00808080,0x20002020
1652.long	0x00505050,0x14001414
1653.long	0x00a7a7a7,0xe900e9e9
1654.long	0x00f6f6f6,0xbd00bdbd
1655.long	0x00777777,0xdd00dddd
1656.long	0x00939393,0xe400e4e4
1657.long	0x00868686,0xa100a1a1
1658.long	0x00838383,0xe000e0e0
1659.long	0x002a2a2a,0x8a008a8a
1660.long	0x00c7c7c7,0xf100f1f1
1661.long	0x005b5b5b,0xd600d6d6
1662.long	0x00e9e9e9,0x7a007a7a
1663.long	0x00eeeeee,0xbb00bbbb
1664.long	0x008f8f8f,0xe300e3e3
1665.long	0x00010101,0x40004040
1666.long	0x003d3d3d,0x4f004f4f
1667.globl	Camellia_cbc_encrypt
1668.type	Camellia_cbc_encrypt,@function
1669.align	16
1670Camellia_cbc_encrypt:
1671.cfi_startproc
1672.byte	243,15,30,250
1673	cmpq	$0,%rdx
1674	je	.Lcbc_abort
1675	pushq	%rbx
1676.cfi_adjust_cfa_offset	8
1677.cfi_offset	%rbx,-16
1678	pushq	%rbp
1679.cfi_adjust_cfa_offset	8
1680.cfi_offset	%rbp,-24
1681	pushq	%r12
1682.cfi_adjust_cfa_offset	8
1683.cfi_offset	%r12,-32
1684	pushq	%r13
1685.cfi_adjust_cfa_offset	8
1686.cfi_offset	%r13,-40
1687	pushq	%r14
1688.cfi_adjust_cfa_offset	8
1689.cfi_offset	%r14,-48
1690	pushq	%r15
1691.cfi_adjust_cfa_offset	8
1692.cfi_offset	%r15,-56
1693.Lcbc_prologue:
1694
1695	movq	%rsp,%rbp
1696.cfi_def_cfa_register	%rbp
1697	subq	$64,%rsp
1698	andq	$-64,%rsp
1699
1700
1701
1702	leaq	-64-63(%rcx),%r10
1703	subq	%rsp,%r10
1704	negq	%r10
1705	andq	$0x3C0,%r10
1706	subq	%r10,%rsp
1707
1708
1709	movq	%rdi,%r12
1710	movq	%rsi,%r13
1711	movq	%r8,%rbx
1712	movq	%rcx,%r14
1713	movl	272(%rcx),%r15d
1714
1715	movq	%r8,40(%rsp)
1716	movq	%rbp,48(%rsp)
1717.cfi_escape	0x0f,0x05,0x77,0x30,0x06,0x23,0x38
1718
1719.Lcbc_body:
1720	leaq	.LCamellia_SBOX(%rip),%rbp
1721
1722	movl	$32,%ecx
1723.align	4
1724.Lcbc_prefetch_sbox:
1725	movq	0(%rbp),%rax
1726	movq	32(%rbp),%rsi
1727	movq	64(%rbp),%rdi
1728	movq	96(%rbp),%r11
1729	leaq	128(%rbp),%rbp
1730	loop	.Lcbc_prefetch_sbox
1731	subq	$4096,%rbp
1732	shlq	$6,%r15
1733	movq	%rdx,%rcx
1734	leaq	(%r14,%r15,1),%r15
1735
1736	cmpl	$0,%r9d
1737	je	.LCBC_DECRYPT
1738
1739	andq	$-16,%rdx
1740	andq	$15,%rcx
1741	leaq	(%r12,%rdx,1),%rdx
1742	movq	%r14,0(%rsp)
1743	movq	%rdx,8(%rsp)
1744	movq	%rcx,16(%rsp)
1745
1746	cmpq	%r12,%rdx
1747	movl	0(%rbx),%r8d
1748	movl	4(%rbx),%r9d
1749	movl	8(%rbx),%r10d
1750	movl	12(%rbx),%r11d
1751	je	.Lcbc_enc_tail
1752	jmp	.Lcbc_eloop
1753
1754.align	16
1755.Lcbc_eloop:
1756	xorl	0(%r12),%r8d
1757	xorl	4(%r12),%r9d
1758	xorl	8(%r12),%r10d
1759	bswapl	%r8d
1760	xorl	12(%r12),%r11d
1761	bswapl	%r9d
1762	bswapl	%r10d
1763	bswapl	%r11d
1764
1765	call	_x86_64_Camellia_encrypt
1766
1767	movq	0(%rsp),%r14
1768	bswapl	%r8d
1769	movq	8(%rsp),%rdx
1770	bswapl	%r9d
1771	movq	16(%rsp),%rcx
1772	bswapl	%r10d
1773	movl	%r8d,0(%r13)
1774	bswapl	%r11d
1775	movl	%r9d,4(%r13)
1776	movl	%r10d,8(%r13)
1777	leaq	16(%r12),%r12
1778	movl	%r11d,12(%r13)
1779	cmpq	%rdx,%r12
1780	leaq	16(%r13),%r13
1781	jne	.Lcbc_eloop
1782
1783	cmpq	$0,%rcx
1784	jne	.Lcbc_enc_tail
1785
1786	movq	40(%rsp),%r13
1787	movl	%r8d,0(%r13)
1788	movl	%r9d,4(%r13)
1789	movl	%r10d,8(%r13)
1790	movl	%r11d,12(%r13)
1791	jmp	.Lcbc_done
1792
1793.align	16
1794.Lcbc_enc_tail:
1795	xorq	%rax,%rax
1796	movq	%rax,0+24(%rsp)
1797	movq	%rax,8+24(%rsp)
1798	movq	%rax,16(%rsp)
1799
1800.Lcbc_enc_pushf:
1801	pushfq
1802	cld
1803	movq	%r12,%rsi
1804	leaq	8+24(%rsp),%rdi
1805.long	0x9066A4F3
1806	popfq
1807.Lcbc_enc_popf:
1808
1809	leaq	24(%rsp),%r12
1810	leaq	16+24(%rsp),%rax
1811	movq	%rax,8(%rsp)
1812	jmp	.Lcbc_eloop
1813
1814.align	16
1815.LCBC_DECRYPT:
1816	xchgq	%r14,%r15
1817	addq	$15,%rdx
1818	andq	$15,%rcx
1819	andq	$-16,%rdx
1820	movq	%r14,0(%rsp)
1821	leaq	(%r12,%rdx,1),%rdx
1822	movq	%rdx,8(%rsp)
1823	movq	%rcx,16(%rsp)
1824
1825	movq	(%rbx),%rax
1826	movq	8(%rbx),%rbx
1827	jmp	.Lcbc_dloop
1828.align	16
1829.Lcbc_dloop:
1830	movl	0(%r12),%r8d
1831	movl	4(%r12),%r9d
1832	movl	8(%r12),%r10d
1833	bswapl	%r8d
1834	movl	12(%r12),%r11d
1835	bswapl	%r9d
1836	movq	%rax,0+24(%rsp)
1837	bswapl	%r10d
1838	movq	%rbx,8+24(%rsp)
1839	bswapl	%r11d
1840
1841	call	_x86_64_Camellia_decrypt
1842
1843	movq	0(%rsp),%r14
1844	movq	8(%rsp),%rdx
1845	movq	16(%rsp),%rcx
1846
1847	bswapl	%r8d
1848	movq	(%r12),%rax
1849	bswapl	%r9d
1850	movq	8(%r12),%rbx
1851	bswapl	%r10d
1852	xorl	0+24(%rsp),%r8d
1853	bswapl	%r11d
1854	xorl	4+24(%rsp),%r9d
1855	xorl	8+24(%rsp),%r10d
1856	leaq	16(%r12),%r12
1857	xorl	12+24(%rsp),%r11d
1858	cmpq	%rdx,%r12
1859	je	.Lcbc_ddone
1860
1861	movl	%r8d,0(%r13)
1862	movl	%r9d,4(%r13)
1863	movl	%r10d,8(%r13)
1864	movl	%r11d,12(%r13)
1865
1866	leaq	16(%r13),%r13
1867	jmp	.Lcbc_dloop
1868
1869.align	16
1870.Lcbc_ddone:
1871	movq	40(%rsp),%rdx
1872	cmpq	$0,%rcx
1873	jne	.Lcbc_dec_tail
1874
1875	movl	%r8d,0(%r13)
1876	movl	%r9d,4(%r13)
1877	movl	%r10d,8(%r13)
1878	movl	%r11d,12(%r13)
1879
1880	movq	%rax,(%rdx)
1881	movq	%rbx,8(%rdx)
1882	jmp	.Lcbc_done
1883.align	16
1884.Lcbc_dec_tail:
1885	movl	%r8d,0+24(%rsp)
1886	movl	%r9d,4+24(%rsp)
1887	movl	%r10d,8+24(%rsp)
1888	movl	%r11d,12+24(%rsp)
1889
1890.Lcbc_dec_pushf:
1891	pushfq
1892	cld
1893	leaq	8+24(%rsp),%rsi
1894	leaq	(%r13),%rdi
1895.long	0x9066A4F3
1896	popfq
1897.Lcbc_dec_popf:
1898
1899	movq	%rax,(%rdx)
1900	movq	%rbx,8(%rdx)
1901	jmp	.Lcbc_done
1902
1903.align	16
1904.Lcbc_done:
1905	movq	48(%rsp),%rcx
1906.cfi_def_cfa	%rcx,56
1907	movq	0(%rcx),%r15
1908.cfi_restore	%r15
1909	movq	8(%rcx),%r14
1910.cfi_restore	%r14
1911	movq	16(%rcx),%r13
1912.cfi_restore	%r13
1913	movq	24(%rcx),%r12
1914.cfi_restore	%r12
1915	movq	32(%rcx),%rbp
1916.cfi_restore	%rbp
1917	movq	40(%rcx),%rbx
1918.cfi_restore	%rbx
1919	leaq	48(%rcx),%rsp
1920.cfi_def_cfa	%rsp,8
1921.Lcbc_abort:
1922	.byte	0xf3,0xc3
1923.cfi_endproc
1924.size	Camellia_cbc_encrypt,.-Camellia_cbc_encrypt
1925
1926.byte	67,97,109,101,108,108,105,97,32,102,111,114,32,120,56,54,95,54,52,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
1927	.section ".note.gnu.property", "a"
1928	.p2align 3
1929	.long 1f - 0f
1930	.long 4f - 1f
1931	.long 5
19320:
1933	# "GNU" encoded with .byte, since .asciz isn't supported
1934	# on Solaris.
1935	.byte 0x47
1936	.byte 0x4e
1937	.byte 0x55
1938	.byte 0
19391:
1940	.p2align 3
1941	.long 0xc0000002
1942	.long 3f - 2f
19432:
1944	.long 3
19453:
1946	.p2align 3
19474:
1948