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