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