xref: /freebsd/sys/crypto/openssl/powerpc/aesp8-ppc.S (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1/* $FreeBSD$ */
2/* Do not modify. This file is auto-generated from aesp8-ppc.pl. */
3.machine	"any"
4
5.text
6
7.align	7
8rcon:
9.byte	0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00
10.byte	0x1b,0x00,0x00,0x00,0x1b,0x00,0x00,0x00,0x1b,0x00,0x00,0x00,0x1b,0x00,0x00,0x00
11.byte	0x0d,0x0e,0x0f,0x0c,0x0d,0x0e,0x0f,0x0c,0x0d,0x0e,0x0f,0x0c,0x0d,0x0e,0x0f,0x0c
12.byte	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
13.Lconsts:
14	mflr	0
15	bcl	20,31,$+4
16	mflr	6
17	addi	6,6,-0x48
18	mtlr	0
19	blr
20.long	0
21.byte	0,12,0x14,0,0,0,0,0
22.byte	65,69,83,32,102,111,114,32,80,111,119,101,114,73,83,65,32,50,46,48,55,44,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
23.align	2
24
25.globl	aes_p8_set_encrypt_key
26.type	aes_p8_set_encrypt_key,@function
27.align	5
28aes_p8_set_encrypt_key:
29.Lset_encrypt_key:
30	mflr	11
31	stw	11,4(1)
32
33	li	6,-1
34	cmplwi	3,0
35	beq-	.Lenc_key_abort
36	cmplwi	5,0
37	beq-	.Lenc_key_abort
38	li	6,-2
39	cmpwi	4,128
40	blt-	.Lenc_key_abort
41	cmpwi	4,256
42	bgt-	.Lenc_key_abort
43	andi.	0,4,0x3f
44	bne-	.Lenc_key_abort
45
46	lis	0,0xfff0
47	mfspr	12,256
48	mtspr	256,0
49
50	bl	.Lconsts
51	mtlr	11
52
53	neg	9,3
54	lvx	1,0,3
55	addi	3,3,15
56	lvsr	3,0,9
57	li	8,0x20
58	cmpwi	4,192
59	lvx	2,0,3
60
61	lvx	4,0,6
62
63	lvx	5,8,6
64	addi	6,6,0x10
65	vperm	1,1,2,3
66	li	7,8
67	vxor	0,0,0
68	mtctr	7
69
70	lvsr	8,0,5
71	vspltisb	9,-1
72	lvx	10,0,5
73	vperm	9,0,9,8
74
75	blt	.Loop128
76	addi	3,3,8
77	beq	.L192
78	addi	3,3,8
79	b	.L256
80
81.align	4
82.Loop128:
83	vperm	3,1,1,5
84	vsldoi	6,0,1,12
85	vperm	11,1,1,8
86	vsel	7,10,11,9
87	vor	10,11,11
88	.long	0x10632509
89	stvx	7,0,5
90	addi	5,5,16
91
92	vxor	1,1,6
93	vsldoi	6,0,6,12
94	vxor	1,1,6
95	vsldoi	6,0,6,12
96	vxor	1,1,6
97	vadduwm	4,4,4
98	vxor	1,1,3
99	bdnz	.Loop128
100
101	lvx	4,0,6
102
103	vperm	3,1,1,5
104	vsldoi	6,0,1,12
105	vperm	11,1,1,8
106	vsel	7,10,11,9
107	vor	10,11,11
108	.long	0x10632509
109	stvx	7,0,5
110	addi	5,5,16
111
112	vxor	1,1,6
113	vsldoi	6,0,6,12
114	vxor	1,1,6
115	vsldoi	6,0,6,12
116	vxor	1,1,6
117	vadduwm	4,4,4
118	vxor	1,1,3
119
120	vperm	3,1,1,5
121	vsldoi	6,0,1,12
122	vperm	11,1,1,8
123	vsel	7,10,11,9
124	vor	10,11,11
125	.long	0x10632509
126	stvx	7,0,5
127	addi	5,5,16
128
129	vxor	1,1,6
130	vsldoi	6,0,6,12
131	vxor	1,1,6
132	vsldoi	6,0,6,12
133	vxor	1,1,6
134	vxor	1,1,3
135	vperm	11,1,1,8
136	vsel	7,10,11,9
137	vor	10,11,11
138	stvx	7,0,5
139
140	addi	3,5,15
141	addi	5,5,0x50
142
143	li	8,10
144	b	.Ldone
145
146.align	4
147.L192:
148	lvx	6,0,3
149	li	7,4
150	vperm	11,1,1,8
151	vsel	7,10,11,9
152	vor	10,11,11
153	stvx	7,0,5
154	addi	5,5,16
155	vperm	2,2,6,3
156	vspltisb	3,8
157	mtctr	7
158	vsububm	5,5,3
159
160.Loop192:
161	vperm	3,2,2,5
162	vsldoi	6,0,1,12
163	.long	0x10632509
164
165	vxor	1,1,6
166	vsldoi	6,0,6,12
167	vxor	1,1,6
168	vsldoi	6,0,6,12
169	vxor	1,1,6
170
171	vsldoi	7,0,2,8
172	vspltw	6,1,3
173	vxor	6,6,2
174	vsldoi	2,0,2,12
175	vadduwm	4,4,4
176	vxor	2,2,6
177	vxor	1,1,3
178	vxor	2,2,3
179	vsldoi	7,7,1,8
180
181	vperm	3,2,2,5
182	vsldoi	6,0,1,12
183	vperm	11,7,7,8
184	vsel	7,10,11,9
185	vor	10,11,11
186	.long	0x10632509
187	stvx	7,0,5
188	addi	5,5,16
189
190	vsldoi	7,1,2,8
191	vxor	1,1,6
192	vsldoi	6,0,6,12
193	vperm	11,7,7,8
194	vsel	7,10,11,9
195	vor	10,11,11
196	vxor	1,1,6
197	vsldoi	6,0,6,12
198	vxor	1,1,6
199	stvx	7,0,5
200	addi	5,5,16
201
202	vspltw	6,1,3
203	vxor	6,6,2
204	vsldoi	2,0,2,12
205	vadduwm	4,4,4
206	vxor	2,2,6
207	vxor	1,1,3
208	vxor	2,2,3
209	vperm	11,1,1,8
210	vsel	7,10,11,9
211	vor	10,11,11
212	stvx	7,0,5
213	addi	3,5,15
214	addi	5,5,16
215	bdnz	.Loop192
216
217	li	8,12
218	addi	5,5,0x20
219	b	.Ldone
220
221.align	4
222.L256:
223	lvx	6,0,3
224	li	7,7
225	li	8,14
226	vperm	11,1,1,8
227	vsel	7,10,11,9
228	vor	10,11,11
229	stvx	7,0,5
230	addi	5,5,16
231	vperm	2,2,6,3
232	mtctr	7
233
234.Loop256:
235	vperm	3,2,2,5
236	vsldoi	6,0,1,12
237	vperm	11,2,2,8
238	vsel	7,10,11,9
239	vor	10,11,11
240	.long	0x10632509
241	stvx	7,0,5
242	addi	5,5,16
243
244	vxor	1,1,6
245	vsldoi	6,0,6,12
246	vxor	1,1,6
247	vsldoi	6,0,6,12
248	vxor	1,1,6
249	vadduwm	4,4,4
250	vxor	1,1,3
251	vperm	11,1,1,8
252	vsel	7,10,11,9
253	vor	10,11,11
254	stvx	7,0,5
255	addi	3,5,15
256	addi	5,5,16
257	bdz	.Ldone
258
259	vspltw	3,1,3
260	vsldoi	6,0,2,12
261	.long	0x106305C8
262
263	vxor	2,2,6
264	vsldoi	6,0,6,12
265	vxor	2,2,6
266	vsldoi	6,0,6,12
267	vxor	2,2,6
268
269	vxor	2,2,3
270	b	.Loop256
271
272.align	4
273.Ldone:
274	lvx	2,0,3
275	vsel	2,10,2,9
276	stvx	2,0,3
277	li	6,0
278	mtspr	256,12
279	stw	8,0(5)
280
281.Lenc_key_abort:
282	mr	3,6
283	blr
284.long	0
285.byte	0,12,0x14,1,0,0,3,0
286.long	0
287.size	aes_p8_set_encrypt_key,.-aes_p8_set_encrypt_key
288
289.globl	aes_p8_set_decrypt_key
290.type	aes_p8_set_decrypt_key,@function
291.align	5
292aes_p8_set_decrypt_key:
293	stwu	1,-32(1)
294	mflr	10
295	stw	10,32+4(1)
296	bl	.Lset_encrypt_key
297	mtlr	10
298
299	cmpwi	3,0
300	bne-	.Ldec_key_abort
301
302	slwi	7,8,4
303	subi	3,5,240
304	srwi	8,8,1
305	add	5,3,7
306	mtctr	8
307
308.Ldeckey:
309	lwz	0, 0(3)
310	lwz	6, 4(3)
311	lwz	7, 8(3)
312	lwz	8, 12(3)
313	addi	3,3,16
314	lwz	9, 0(5)
315	lwz	10,4(5)
316	lwz	11,8(5)
317	lwz	12,12(5)
318	stw	0, 0(5)
319	stw	6, 4(5)
320	stw	7, 8(5)
321	stw	8, 12(5)
322	subi	5,5,16
323	stw	9, -16(3)
324	stw	10,-12(3)
325	stw	11,-8(3)
326	stw	12,-4(3)
327	bdnz	.Ldeckey
328
329	xor	3,3,3
330.Ldec_key_abort:
331	addi	1,1,32
332	blr
333.long	0
334.byte	0,12,4,1,0x80,0,3,0
335.long	0
336.size	aes_p8_set_decrypt_key,.-aes_p8_set_decrypt_key
337.globl	aes_p8_encrypt
338.type	aes_p8_encrypt,@function
339.align	5
340aes_p8_encrypt:
341	lwz	6,240(5)
342	lis	0,0xfc00
343	mfspr	12,256
344	li	7,15
345	mtspr	256,0
346
347	lvx	0,0,3
348	neg	11,4
349	lvx	1,7,3
350	lvsl	2,0,3
351
352	lvsl	3,0,11
353
354	li	7,16
355	vperm	0,0,1,2
356	lvx	1,0,5
357	lvsl	5,0,5
358	srwi	6,6,1
359	lvx	2,7,5
360	addi	7,7,16
361	subi	6,6,1
362	vperm	1,1,2,5
363
364	vxor	0,0,1
365	lvx	1,7,5
366	addi	7,7,16
367	mtctr	6
368
369.Loop_enc:
370	vperm	2,2,1,5
371	.long	0x10001508
372	lvx	2,7,5
373	addi	7,7,16
374	vperm	1,1,2,5
375	.long	0x10000D08
376	lvx	1,7,5
377	addi	7,7,16
378	bdnz	.Loop_enc
379
380	vperm	2,2,1,5
381	.long	0x10001508
382	lvx	2,7,5
383	vperm	1,1,2,5
384	.long	0x10000D09
385
386	vspltisb	2,-1
387	vxor	1,1,1
388	li	7,15
389	vperm	2,1,2,3
390
391	lvx	1,0,4
392	vperm	0,0,0,3
393	vsel	1,1,0,2
394	lvx	4,7,4
395	stvx	1,0,4
396	vsel	0,0,4,2
397	stvx	0,7,4
398
399	mtspr	256,12
400	blr
401.long	0
402.byte	0,12,0x14,0,0,0,3,0
403.long	0
404.size	aes_p8_encrypt,.-aes_p8_encrypt
405.globl	aes_p8_decrypt
406.type	aes_p8_decrypt,@function
407.align	5
408aes_p8_decrypt:
409	lwz	6,240(5)
410	lis	0,0xfc00
411	mfspr	12,256
412	li	7,15
413	mtspr	256,0
414
415	lvx	0,0,3
416	neg	11,4
417	lvx	1,7,3
418	lvsl	2,0,3
419
420	lvsl	3,0,11
421
422	li	7,16
423	vperm	0,0,1,2
424	lvx	1,0,5
425	lvsl	5,0,5
426	srwi	6,6,1
427	lvx	2,7,5
428	addi	7,7,16
429	subi	6,6,1
430	vperm	1,1,2,5
431
432	vxor	0,0,1
433	lvx	1,7,5
434	addi	7,7,16
435	mtctr	6
436
437.Loop_dec:
438	vperm	2,2,1,5
439	.long	0x10001548
440	lvx	2,7,5
441	addi	7,7,16
442	vperm	1,1,2,5
443	.long	0x10000D48
444	lvx	1,7,5
445	addi	7,7,16
446	bdnz	.Loop_dec
447
448	vperm	2,2,1,5
449	.long	0x10001548
450	lvx	2,7,5
451	vperm	1,1,2,5
452	.long	0x10000D49
453
454	vspltisb	2,-1
455	vxor	1,1,1
456	li	7,15
457	vperm	2,1,2,3
458
459	lvx	1,0,4
460	vperm	0,0,0,3
461	vsel	1,1,0,2
462	lvx	4,7,4
463	stvx	1,0,4
464	vsel	0,0,4,2
465	stvx	0,7,4
466
467	mtspr	256,12
468	blr
469.long	0
470.byte	0,12,0x14,0,0,0,3,0
471.long	0
472.size	aes_p8_decrypt,.-aes_p8_decrypt
473.globl	aes_p8_cbc_encrypt
474.type	aes_p8_cbc_encrypt,@function
475.align	5
476aes_p8_cbc_encrypt:
477	cmplwi	5,16
478	.long	0x4dc00020
479
480	cmpwi	8,0
481	lis	0,0xffe0
482	mfspr	12,256
483	mtspr	256,0
484
485	li	10,15
486	vxor	0,0,0
487
488
489	lvx	4,0,7
490	lvsl	6,0,7
491	lvx	5,10,7
492
493	vperm	4,4,5,6
494
495	neg	11,3
496	lvsl	10,0,6
497	lwz	9,240(6)
498
499	lvsr	6,0,11
500	lvx	5,0,3
501	addi	3,3,15
502
503
504	lvsr	8,0,4
505	vspltisb	9,-1
506	lvx	7,0,4
507	vperm	9,0,9,8
508
509
510	srwi	9,9,1
511	li	10,16
512	subi	9,9,1
513	beq	.Lcbc_dec
514
515.Lcbc_enc:
516	vor	2,5,5
517	lvx	5,0,3
518	addi	3,3,16
519	mtctr	9
520	subi	5,5,16
521
522	lvx	0,0,6
523	vperm	2,2,5,6
524	lvx	1,10,6
525	addi	10,10,16
526	vperm	0,0,1,10
527	vxor	2,2,0
528	lvx	0,10,6
529	addi	10,10,16
530	vxor	2,2,4
531
532.Loop_cbc_enc:
533	vperm	1,1,0,10
534	.long	0x10420D08
535	lvx	1,10,6
536	addi	10,10,16
537	vperm	0,0,1,10
538	.long	0x10420508
539	lvx	0,10,6
540	addi	10,10,16
541	bdnz	.Loop_cbc_enc
542
543	vperm	1,1,0,10
544	.long	0x10420D08
545	lvx	1,10,6
546	li	10,16
547	vperm	0,0,1,10
548	.long	0x10820509
549	cmplwi	5,16
550
551	vperm	3,4,4,8
552	vsel	2,7,3,9
553	vor	7,3,3
554	stvx	2,0,4
555	addi	4,4,16
556	bge	.Lcbc_enc
557
558	b	.Lcbc_done
559
560.align	4
561.Lcbc_dec:
562	cmplwi	5,128
563	bge	_aesp8_cbc_decrypt8x
564	vor	3,5,5
565	lvx	5,0,3
566	addi	3,3,16
567	mtctr	9
568	subi	5,5,16
569
570	lvx	0,0,6
571	vperm	3,3,5,6
572	lvx	1,10,6
573	addi	10,10,16
574	vperm	0,0,1,10
575	vxor	2,3,0
576	lvx	0,10,6
577	addi	10,10,16
578
579.Loop_cbc_dec:
580	vperm	1,1,0,10
581	.long	0x10420D48
582	lvx	1,10,6
583	addi	10,10,16
584	vperm	0,0,1,10
585	.long	0x10420548
586	lvx	0,10,6
587	addi	10,10,16
588	bdnz	.Loop_cbc_dec
589
590	vperm	1,1,0,10
591	.long	0x10420D48
592	lvx	1,10,6
593	li	10,16
594	vperm	0,0,1,10
595	.long	0x10420549
596	cmplwi	5,16
597
598	vxor	2,2,4
599	vor	4,3,3
600	vperm	3,2,2,8
601	vsel	2,7,3,9
602	vor	7,3,3
603	stvx	2,0,4
604	addi	4,4,16
605	bge	.Lcbc_dec
606
607.Lcbc_done:
608	addi	4,4,-1
609	lvx	2,0,4
610	vsel	2,7,2,9
611	stvx	2,0,4
612
613	neg	8,7
614	li	10,15
615	vxor	0,0,0
616	vspltisb	9,-1
617
618	lvsl	8,0,8
619	vperm	9,0,9,8
620
621	lvx	7,0,7
622	vperm	4,4,4,8
623	vsel	2,7,4,9
624	lvx	5,10,7
625	stvx	2,0,7
626	vsel	2,4,5,9
627	stvx	2,10,7
628
629	mtspr	256,12
630	blr
631.long	0
632.byte	0,12,0x14,0,0,0,6,0
633.long	0
634.align	5
635_aesp8_cbc_decrypt8x:
636	stwu	1,-392(1)
637	li	10,175
638	li	11,191
639	stvx	20,10,1
640	addi	10,10,32
641	stvx	21,11,1
642	addi	11,11,32
643	stvx	22,10,1
644	addi	10,10,32
645	stvx	23,11,1
646	addi	11,11,32
647	stvx	24,10,1
648	addi	10,10,32
649	stvx	25,11,1
650	addi	11,11,32
651	stvx	26,10,1
652	addi	10,10,32
653	stvx	27,11,1
654	addi	11,11,32
655	stvx	28,10,1
656	addi	10,10,32
657	stvx	29,11,1
658	addi	11,11,32
659	stvx	30,10,1
660	stvx	31,11,1
661	li	0,-1
662	stw	12,364(1)
663	li	8,0x10
664	stw	26,368(1)
665	li	26,0x20
666	stw	27,372(1)
667	li	27,0x30
668	stw	28,376(1)
669	li	28,0x40
670	stw	29,380(1)
671	li	29,0x50
672	stw	30,384(1)
673	li	30,0x60
674	stw	31,388(1)
675	li	31,0x70
676	mtspr	256,0
677
678	subi	9,9,3
679	subi	5,5,128
680
681	lvx	23,0,6
682	lvx	30,8,6
683	addi	6,6,0x20
684	lvx	31,0,6
685	vperm	23,23,30,10
686	addi	11,1,32+15
687	mtctr	9
688
689.Load_cbc_dec_key:
690	vperm	24,30,31,10
691	lvx	30,8,6
692	addi	6,6,0x20
693	stvx	24,0,11
694	vperm	25,31,30,10
695	lvx	31,0,6
696	stvx	25,8,11
697	addi	11,11,0x20
698	bdnz	.Load_cbc_dec_key
699
700	lvx	26,8,6
701	vperm	24,30,31,10
702	lvx	27,26,6
703	stvx	24,0,11
704	vperm	25,31,26,10
705	lvx	28,27,6
706	stvx	25,8,11
707	addi	11,1,32+15
708	vperm	26,26,27,10
709	lvx	29,28,6
710	vperm	27,27,28,10
711	lvx	30,29,6
712	vperm	28,28,29,10
713	lvx	31,30,6
714	vperm	29,29,30,10
715	lvx	14,31,6
716	vperm	30,30,31,10
717	lvx	24,0,11
718	vperm	31,31,14,10
719	lvx	25,8,11
720
721
722
723	subi	3,3,15
724
725
726	.long	0x7C001E99
727
728
729	.long	0x7C281E99
730
731	.long	0x7C5A1E99
732
733	.long	0x7C7B1E99
734
735	.long	0x7D5C1E99
736
737	vxor	14,0,23
738	.long	0x7D7D1E99
739
740	vxor	15,1,23
741	.long	0x7D9E1E99
742
743	vxor	16,2,23
744	.long	0x7DBF1E99
745	addi	3,3,0x80
746
747	vxor	17,3,23
748
749	vxor	18,10,23
750
751	vxor	19,11,23
752	vxor	20,12,23
753	vxor	21,13,23
754
755	mtctr	9
756	b	.Loop_cbc_dec8x
757.align	5
758.Loop_cbc_dec8x:
759	.long	0x11CEC548
760	.long	0x11EFC548
761	.long	0x1210C548
762	.long	0x1231C548
763	.long	0x1252C548
764	.long	0x1273C548
765	.long	0x1294C548
766	.long	0x12B5C548
767	lvx	24,26,11
768	addi	11,11,0x20
769
770	.long	0x11CECD48
771	.long	0x11EFCD48
772	.long	0x1210CD48
773	.long	0x1231CD48
774	.long	0x1252CD48
775	.long	0x1273CD48
776	.long	0x1294CD48
777	.long	0x12B5CD48
778	lvx	25,8,11
779	bdnz	.Loop_cbc_dec8x
780
781	subic	5,5,128
782	.long	0x11CEC548
783	.long	0x11EFC548
784	.long	0x1210C548
785	.long	0x1231C548
786	.long	0x1252C548
787	.long	0x1273C548
788	.long	0x1294C548
789	.long	0x12B5C548
790
791	subfe.	0,0,0
792	.long	0x11CECD48
793	.long	0x11EFCD48
794	.long	0x1210CD48
795	.long	0x1231CD48
796	.long	0x1252CD48
797	.long	0x1273CD48
798	.long	0x1294CD48
799	.long	0x12B5CD48
800
801	and	0,0,5
802	.long	0x11CED548
803	.long	0x11EFD548
804	.long	0x1210D548
805	.long	0x1231D548
806	.long	0x1252D548
807	.long	0x1273D548
808	.long	0x1294D548
809	.long	0x12B5D548
810
811	add	3,3,0
812
813
814
815	.long	0x11CEDD48
816	.long	0x11EFDD48
817	.long	0x1210DD48
818	.long	0x1231DD48
819	.long	0x1252DD48
820	.long	0x1273DD48
821	.long	0x1294DD48
822	.long	0x12B5DD48
823
824	addi	11,1,32+15
825	.long	0x11CEE548
826	.long	0x11EFE548
827	.long	0x1210E548
828	.long	0x1231E548
829	.long	0x1252E548
830	.long	0x1273E548
831	.long	0x1294E548
832	.long	0x12B5E548
833	lvx	24,0,11
834
835	.long	0x11CEED48
836	.long	0x11EFED48
837	.long	0x1210ED48
838	.long	0x1231ED48
839	.long	0x1252ED48
840	.long	0x1273ED48
841	.long	0x1294ED48
842	.long	0x12B5ED48
843	lvx	25,8,11
844
845	.long	0x11CEF548
846	vxor	4,4,31
847	.long	0x11EFF548
848	vxor	0,0,31
849	.long	0x1210F548
850	vxor	1,1,31
851	.long	0x1231F548
852	vxor	2,2,31
853	.long	0x1252F548
854	vxor	3,3,31
855	.long	0x1273F548
856	vxor	10,10,31
857	.long	0x1294F548
858	vxor	11,11,31
859	.long	0x12B5F548
860	vxor	12,12,31
861
862	.long	0x11CE2549
863	.long	0x11EF0549
864	.long	0x7C001E99
865	.long	0x12100D49
866	.long	0x7C281E99
867	.long	0x12311549
868
869	.long	0x7C5A1E99
870	.long	0x12521D49
871
872	.long	0x7C7B1E99
873	.long	0x12735549
874
875	.long	0x7D5C1E99
876	.long	0x12945D49
877
878	.long	0x7D7D1E99
879	.long	0x12B56549
880
881	.long	0x7D9E1E99
882	vor	4,13,13
883
884	.long	0x7DBF1E99
885	addi	3,3,0x80
886
887
888
889	.long	0x7DC02799
890
891	vxor	14,0,23
892
893	.long	0x7DE82799
894
895	vxor	15,1,23
896
897	.long	0x7E1A2799
898	vxor	16,2,23
899
900	.long	0x7E3B2799
901	vxor	17,3,23
902
903	.long	0x7E5C2799
904	vxor	18,10,23
905
906	.long	0x7E7D2799
907	vxor	19,11,23
908
909	.long	0x7E9E2799
910	vxor	20,12,23
911	.long	0x7EBF2799
912	addi	4,4,0x80
913	vxor	21,13,23
914
915	mtctr	9
916	beq	.Loop_cbc_dec8x
917
918	addic.	5,5,128
919	beq	.Lcbc_dec8x_done
920	nop
921	nop
922
923.Loop_cbc_dec8x_tail:
924	.long	0x11EFC548
925	.long	0x1210C548
926	.long	0x1231C548
927	.long	0x1252C548
928	.long	0x1273C548
929	.long	0x1294C548
930	.long	0x12B5C548
931	lvx	24,26,11
932	addi	11,11,0x20
933
934	.long	0x11EFCD48
935	.long	0x1210CD48
936	.long	0x1231CD48
937	.long	0x1252CD48
938	.long	0x1273CD48
939	.long	0x1294CD48
940	.long	0x12B5CD48
941	lvx	25,8,11
942	bdnz	.Loop_cbc_dec8x_tail
943
944	.long	0x11EFC548
945	.long	0x1210C548
946	.long	0x1231C548
947	.long	0x1252C548
948	.long	0x1273C548
949	.long	0x1294C548
950	.long	0x12B5C548
951
952	.long	0x11EFCD48
953	.long	0x1210CD48
954	.long	0x1231CD48
955	.long	0x1252CD48
956	.long	0x1273CD48
957	.long	0x1294CD48
958	.long	0x12B5CD48
959
960	.long	0x11EFD548
961	.long	0x1210D548
962	.long	0x1231D548
963	.long	0x1252D548
964	.long	0x1273D548
965	.long	0x1294D548
966	.long	0x12B5D548
967
968	.long	0x11EFDD48
969	.long	0x1210DD48
970	.long	0x1231DD48
971	.long	0x1252DD48
972	.long	0x1273DD48
973	.long	0x1294DD48
974	.long	0x12B5DD48
975
976	.long	0x11EFE548
977	.long	0x1210E548
978	.long	0x1231E548
979	.long	0x1252E548
980	.long	0x1273E548
981	.long	0x1294E548
982	.long	0x12B5E548
983
984	.long	0x11EFED48
985	.long	0x1210ED48
986	.long	0x1231ED48
987	.long	0x1252ED48
988	.long	0x1273ED48
989	.long	0x1294ED48
990	.long	0x12B5ED48
991
992	.long	0x11EFF548
993	vxor	4,4,31
994	.long	0x1210F548
995	vxor	1,1,31
996	.long	0x1231F548
997	vxor	2,2,31
998	.long	0x1252F548
999	vxor	3,3,31
1000	.long	0x1273F548
1001	vxor	10,10,31
1002	.long	0x1294F548
1003	vxor	11,11,31
1004	.long	0x12B5F548
1005	vxor	12,12,31
1006
1007	cmplwi	5,32
1008	blt	.Lcbc_dec8x_one
1009	nop
1010	beq	.Lcbc_dec8x_two
1011	cmplwi	5,64
1012	blt	.Lcbc_dec8x_three
1013	nop
1014	beq	.Lcbc_dec8x_four
1015	cmplwi	5,96
1016	blt	.Lcbc_dec8x_five
1017	nop
1018	beq	.Lcbc_dec8x_six
1019
1020.Lcbc_dec8x_seven:
1021	.long	0x11EF2549
1022	.long	0x12100D49
1023	.long	0x12311549
1024	.long	0x12521D49
1025	.long	0x12735549
1026	.long	0x12945D49
1027	.long	0x12B56549
1028	vor	4,13,13
1029
1030
1031
1032	.long	0x7DE02799
1033
1034	.long	0x7E082799
1035
1036	.long	0x7E3A2799
1037
1038	.long	0x7E5B2799
1039
1040	.long	0x7E7C2799
1041
1042	.long	0x7E9D2799
1043	.long	0x7EBE2799
1044	addi	4,4,0x70
1045	b	.Lcbc_dec8x_done
1046
1047.align	5
1048.Lcbc_dec8x_six:
1049	.long	0x12102549
1050	.long	0x12311549
1051	.long	0x12521D49
1052	.long	0x12735549
1053	.long	0x12945D49
1054	.long	0x12B56549
1055	vor	4,13,13
1056
1057
1058
1059	.long	0x7E002799
1060
1061	.long	0x7E282799
1062
1063	.long	0x7E5A2799
1064
1065	.long	0x7E7B2799
1066
1067	.long	0x7E9C2799
1068	.long	0x7EBD2799
1069	addi	4,4,0x60
1070	b	.Lcbc_dec8x_done
1071
1072.align	5
1073.Lcbc_dec8x_five:
1074	.long	0x12312549
1075	.long	0x12521D49
1076	.long	0x12735549
1077	.long	0x12945D49
1078	.long	0x12B56549
1079	vor	4,13,13
1080
1081
1082
1083	.long	0x7E202799
1084
1085	.long	0x7E482799
1086
1087	.long	0x7E7A2799
1088
1089	.long	0x7E9B2799
1090	.long	0x7EBC2799
1091	addi	4,4,0x50
1092	b	.Lcbc_dec8x_done
1093
1094.align	5
1095.Lcbc_dec8x_four:
1096	.long	0x12522549
1097	.long	0x12735549
1098	.long	0x12945D49
1099	.long	0x12B56549
1100	vor	4,13,13
1101
1102
1103
1104	.long	0x7E402799
1105
1106	.long	0x7E682799
1107
1108	.long	0x7E9A2799
1109	.long	0x7EBB2799
1110	addi	4,4,0x40
1111	b	.Lcbc_dec8x_done
1112
1113.align	5
1114.Lcbc_dec8x_three:
1115	.long	0x12732549
1116	.long	0x12945D49
1117	.long	0x12B56549
1118	vor	4,13,13
1119
1120
1121
1122	.long	0x7E602799
1123
1124	.long	0x7E882799
1125	.long	0x7EBA2799
1126	addi	4,4,0x30
1127	b	.Lcbc_dec8x_done
1128
1129.align	5
1130.Lcbc_dec8x_two:
1131	.long	0x12942549
1132	.long	0x12B56549
1133	vor	4,13,13
1134
1135
1136
1137	.long	0x7E802799
1138	.long	0x7EA82799
1139	addi	4,4,0x20
1140	b	.Lcbc_dec8x_done
1141
1142.align	5
1143.Lcbc_dec8x_one:
1144	.long	0x12B52549
1145	vor	4,13,13
1146
1147
1148	.long	0x7EA02799
1149	addi	4,4,0x10
1150
1151.Lcbc_dec8x_done:
1152
1153	.long	0x7C803F99
1154
1155	li	10,47
1156	li	11,63
1157	stvx	6,10,1
1158	addi	10,10,32
1159	stvx	6,11,1
1160	addi	11,11,32
1161	stvx	6,10,1
1162	addi	10,10,32
1163	stvx	6,11,1
1164	addi	11,11,32
1165	stvx	6,10,1
1166	addi	10,10,32
1167	stvx	6,11,1
1168	addi	11,11,32
1169	stvx	6,10,1
1170	addi	10,10,32
1171	stvx	6,11,1
1172	addi	11,11,32
1173
1174	mtspr	256,12
1175	lvx	20,10,1
1176	addi	10,10,32
1177	lvx	21,11,1
1178	addi	11,11,32
1179	lvx	22,10,1
1180	addi	10,10,32
1181	lvx	23,11,1
1182	addi	11,11,32
1183	lvx	24,10,1
1184	addi	10,10,32
1185	lvx	25,11,1
1186	addi	11,11,32
1187	lvx	26,10,1
1188	addi	10,10,32
1189	lvx	27,11,1
1190	addi	11,11,32
1191	lvx	28,10,1
1192	addi	10,10,32
1193	lvx	29,11,1
1194	addi	11,11,32
1195	lvx	30,10,1
1196	lvx	31,11,1
1197	lwz	26,368(1)
1198	lwz	27,372(1)
1199	lwz	28,376(1)
1200	lwz	29,380(1)
1201	lwz	30,384(1)
1202	lwz	31,388(1)
1203	addi	1,1,392
1204	blr
1205.long	0
1206.byte	0,12,0x04,0,0x80,6,6,0
1207.long	0
1208.size	aes_p8_cbc_encrypt,.-aes_p8_cbc_encrypt
1209.globl	aes_p8_ctr32_encrypt_blocks
1210.type	aes_p8_ctr32_encrypt_blocks,@function
1211.align	5
1212aes_p8_ctr32_encrypt_blocks:
1213	cmplwi	5,1
1214	.long	0x4dc00020
1215
1216	lis	0,0xfff0
1217	mfspr	12,256
1218	mtspr	256,0
1219
1220	li	10,15
1221	vxor	0,0,0
1222
1223
1224	lvx	4,0,7
1225	lvsl	6,0,7
1226	lvx	5,10,7
1227	vspltisb	11,1
1228
1229	vperm	4,4,5,6
1230	vsldoi	11,0,11,1
1231
1232	neg	11,3
1233	lvsl	10,0,6
1234	lwz	9,240(6)
1235
1236	lvsr	6,0,11
1237	lvx	5,0,3
1238	addi	3,3,15
1239
1240
1241	srwi	9,9,1
1242	li	10,16
1243	subi	9,9,1
1244
1245	cmplwi	5,8
1246	bge	_aesp8_ctr32_encrypt8x
1247
1248	lvsr	8,0,4
1249	vspltisb	9,-1
1250	lvx	7,0,4
1251	vperm	9,0,9,8
1252
1253
1254	lvx	0,0,6
1255	mtctr	9
1256	lvx	1,10,6
1257	addi	10,10,16
1258	vperm	0,0,1,10
1259	vxor	2,4,0
1260	lvx	0,10,6
1261	addi	10,10,16
1262	b	.Loop_ctr32_enc
1263
1264.align	5
1265.Loop_ctr32_enc:
1266	vperm	1,1,0,10
1267	.long	0x10420D08
1268	lvx	1,10,6
1269	addi	10,10,16
1270	vperm	0,0,1,10
1271	.long	0x10420508
1272	lvx	0,10,6
1273	addi	10,10,16
1274	bdnz	.Loop_ctr32_enc
1275
1276	vadduwm	4,4,11
1277	vor	3,5,5
1278	lvx	5,0,3
1279	addi	3,3,16
1280	subic.	5,5,1
1281
1282	vperm	1,1,0,10
1283	.long	0x10420D08
1284	lvx	1,10,6
1285	vperm	3,3,5,6
1286	li	10,16
1287	vperm	1,0,1,10
1288	lvx	0,0,6
1289	vxor	3,3,1
1290	.long	0x10421D09
1291
1292	lvx	1,10,6
1293	addi	10,10,16
1294	vperm	2,2,2,8
1295	vsel	3,7,2,9
1296	mtctr	9
1297	vperm	0,0,1,10
1298	vor	7,2,2
1299	vxor	2,4,0
1300	lvx	0,10,6
1301	addi	10,10,16
1302	stvx	3,0,4
1303	addi	4,4,16
1304	bne	.Loop_ctr32_enc
1305
1306	addi	4,4,-1
1307	lvx	2,0,4
1308	vsel	2,7,2,9
1309	stvx	2,0,4
1310
1311	mtspr	256,12
1312	blr
1313.long	0
1314.byte	0,12,0x14,0,0,0,6,0
1315.long	0
1316.align	5
1317_aesp8_ctr32_encrypt8x:
1318	stwu	1,-392(1)
1319	li	10,175
1320	li	11,191
1321	stvx	20,10,1
1322	addi	10,10,32
1323	stvx	21,11,1
1324	addi	11,11,32
1325	stvx	22,10,1
1326	addi	10,10,32
1327	stvx	23,11,1
1328	addi	11,11,32
1329	stvx	24,10,1
1330	addi	10,10,32
1331	stvx	25,11,1
1332	addi	11,11,32
1333	stvx	26,10,1
1334	addi	10,10,32
1335	stvx	27,11,1
1336	addi	11,11,32
1337	stvx	28,10,1
1338	addi	10,10,32
1339	stvx	29,11,1
1340	addi	11,11,32
1341	stvx	30,10,1
1342	stvx	31,11,1
1343	li	0,-1
1344	stw	12,364(1)
1345	li	8,0x10
1346	stw	26,368(1)
1347	li	26,0x20
1348	stw	27,372(1)
1349	li	27,0x30
1350	stw	28,376(1)
1351	li	28,0x40
1352	stw	29,380(1)
1353	li	29,0x50
1354	stw	30,384(1)
1355	li	30,0x60
1356	stw	31,388(1)
1357	li	31,0x70
1358	mtspr	256,0
1359
1360	subi	9,9,3
1361
1362	lvx	23,0,6
1363	lvx	30,8,6
1364	addi	6,6,0x20
1365	lvx	31,0,6
1366	vperm	23,23,30,10
1367	addi	11,1,32+15
1368	mtctr	9
1369
1370.Load_ctr32_enc_key:
1371	vperm	24,30,31,10
1372	lvx	30,8,6
1373	addi	6,6,0x20
1374	stvx	24,0,11
1375	vperm	25,31,30,10
1376	lvx	31,0,6
1377	stvx	25,8,11
1378	addi	11,11,0x20
1379	bdnz	.Load_ctr32_enc_key
1380
1381	lvx	26,8,6
1382	vperm	24,30,31,10
1383	lvx	27,26,6
1384	stvx	24,0,11
1385	vperm	25,31,26,10
1386	lvx	28,27,6
1387	stvx	25,8,11
1388	addi	11,1,32+15
1389	vperm	26,26,27,10
1390	lvx	29,28,6
1391	vperm	27,27,28,10
1392	lvx	30,29,6
1393	vperm	28,28,29,10
1394	lvx	31,30,6
1395	vperm	29,29,30,10
1396	lvx	15,31,6
1397	vperm	30,30,31,10
1398	lvx	24,0,11
1399	vperm	31,31,15,10
1400	lvx	25,8,11
1401
1402	vadduwm	7,11,11
1403	subi	3,3,15
1404	slwi	5,5,4
1405
1406	vadduwm	16,4,11
1407	vadduwm	17,4,7
1408	vxor	15,4,23
1409
1410	vadduwm	18,16,7
1411	vxor	16,16,23
1412
1413	vadduwm	19,17,7
1414	vxor	17,17,23
1415
1416	vadduwm	20,18,7
1417	vxor	18,18,23
1418
1419	vadduwm	21,19,7
1420	vxor	19,19,23
1421	vadduwm	22,20,7
1422	vxor	20,20,23
1423	vadduwm	4,21,7
1424	vxor	21,21,23
1425	vxor	22,22,23
1426
1427	mtctr	9
1428	b	.Loop_ctr32_enc8x
1429.align	5
1430.Loop_ctr32_enc8x:
1431	.long	0x11EFC508
1432	.long	0x1210C508
1433	.long	0x1231C508
1434	.long	0x1252C508
1435	.long	0x1273C508
1436	.long	0x1294C508
1437	.long	0x12B5C508
1438	.long	0x12D6C508
1439.Loop_ctr32_enc8x_middle:
1440	lvx	24,26,11
1441	addi	11,11,0x20
1442
1443	.long	0x11EFCD08
1444	.long	0x1210CD08
1445	.long	0x1231CD08
1446	.long	0x1252CD08
1447	.long	0x1273CD08
1448	.long	0x1294CD08
1449	.long	0x12B5CD08
1450	.long	0x12D6CD08
1451	lvx	25,8,11
1452	bdnz	.Loop_ctr32_enc8x
1453
1454	subic	11,5,256
1455	.long	0x11EFC508
1456	.long	0x1210C508
1457	.long	0x1231C508
1458	.long	0x1252C508
1459	.long	0x1273C508
1460	.long	0x1294C508
1461	.long	0x12B5C508
1462	.long	0x12D6C508
1463
1464	subfe	0,0,0
1465	.long	0x11EFCD08
1466	.long	0x1210CD08
1467	.long	0x1231CD08
1468	.long	0x1252CD08
1469	.long	0x1273CD08
1470	.long	0x1294CD08
1471	.long	0x12B5CD08
1472	.long	0x12D6CD08
1473
1474	and	0,0,11
1475	addi	11,1,32+15
1476	.long	0x11EFD508
1477	.long	0x1210D508
1478	.long	0x1231D508
1479	.long	0x1252D508
1480	.long	0x1273D508
1481	.long	0x1294D508
1482	.long	0x12B5D508
1483	.long	0x12D6D508
1484	lvx	24,0,11
1485
1486	subic	5,5,129
1487	.long	0x11EFDD08
1488	addi	5,5,1
1489	.long	0x1210DD08
1490	.long	0x1231DD08
1491	.long	0x1252DD08
1492	.long	0x1273DD08
1493	.long	0x1294DD08
1494	.long	0x12B5DD08
1495	.long	0x12D6DD08
1496	lvx	25,8,11
1497
1498	.long	0x11EFE508
1499	.long	0x7C001E99
1500	.long	0x1210E508
1501	.long	0x7C281E99
1502	.long	0x1231E508
1503	.long	0x7C5A1E99
1504	.long	0x1252E508
1505	.long	0x7C7B1E99
1506	.long	0x1273E508
1507	.long	0x7D5C1E99
1508	.long	0x1294E508
1509	.long	0x7D9D1E99
1510	.long	0x12B5E508
1511	.long	0x7DBE1E99
1512	.long	0x12D6E508
1513	.long	0x7DDF1E99
1514	addi	3,3,0x80
1515
1516	.long	0x11EFED08
1517
1518	.long	0x1210ED08
1519
1520	.long	0x1231ED08
1521
1522	.long	0x1252ED08
1523
1524	.long	0x1273ED08
1525
1526	.long	0x1294ED08
1527
1528	.long	0x12B5ED08
1529
1530	.long	0x12D6ED08
1531
1532
1533	add	3,3,0
1534
1535
1536
1537	subfe.	0,0,0
1538	.long	0x11EFF508
1539	vxor	0,0,31
1540	.long	0x1210F508
1541	vxor	1,1,31
1542	.long	0x1231F508
1543	vxor	2,2,31
1544	.long	0x1252F508
1545	vxor	3,3,31
1546	.long	0x1273F508
1547	vxor	10,10,31
1548	.long	0x1294F508
1549	vxor	12,12,31
1550	.long	0x12B5F508
1551	vxor	13,13,31
1552	.long	0x12D6F508
1553	vxor	14,14,31
1554
1555	bne	.Lctr32_enc8x_break
1556
1557	.long	0x100F0509
1558	.long	0x10300D09
1559	vadduwm	16,4,11
1560	.long	0x10511509
1561	vadduwm	17,4,7
1562	vxor	15,4,23
1563	.long	0x10721D09
1564	vadduwm	18,16,7
1565	vxor	16,16,23
1566	.long	0x11535509
1567	vadduwm	19,17,7
1568	vxor	17,17,23
1569	.long	0x11946509
1570	vadduwm	20,18,7
1571	vxor	18,18,23
1572	.long	0x11B56D09
1573	vadduwm	21,19,7
1574	vxor	19,19,23
1575	.long	0x11D67509
1576	vadduwm	22,20,7
1577	vxor	20,20,23
1578
1579	vadduwm	4,21,7
1580	vxor	21,21,23
1581
1582	vxor	22,22,23
1583	mtctr	9
1584
1585	.long	0x11EFC508
1586	.long	0x7C002799
1587
1588	.long	0x1210C508
1589	.long	0x7C282799
1590
1591	.long	0x1231C508
1592	.long	0x7C5A2799
1593
1594	.long	0x1252C508
1595	.long	0x7C7B2799
1596
1597	.long	0x1273C508
1598	.long	0x7D5C2799
1599
1600	.long	0x1294C508
1601	.long	0x7D9D2799
1602
1603	.long	0x12B5C508
1604	.long	0x7DBE2799
1605	.long	0x12D6C508
1606	.long	0x7DDF2799
1607	addi	4,4,0x80
1608
1609	b	.Loop_ctr32_enc8x_middle
1610
1611.align	5
1612.Lctr32_enc8x_break:
1613	cmpwi	5,-0x60
1614	blt	.Lctr32_enc8x_one
1615	nop
1616	beq	.Lctr32_enc8x_two
1617	cmpwi	5,-0x40
1618	blt	.Lctr32_enc8x_three
1619	nop
1620	beq	.Lctr32_enc8x_four
1621	cmpwi	5,-0x20
1622	blt	.Lctr32_enc8x_five
1623	nop
1624	beq	.Lctr32_enc8x_six
1625	cmpwi	5,0x00
1626	blt	.Lctr32_enc8x_seven
1627
1628.Lctr32_enc8x_eight:
1629	.long	0x11EF0509
1630	.long	0x12100D09
1631	.long	0x12311509
1632	.long	0x12521D09
1633	.long	0x12735509
1634	.long	0x12946509
1635	.long	0x12B56D09
1636	.long	0x12D67509
1637
1638
1639
1640	.long	0x7DE02799
1641
1642	.long	0x7E082799
1643
1644	.long	0x7E3A2799
1645
1646	.long	0x7E5B2799
1647
1648	.long	0x7E7C2799
1649
1650	.long	0x7E9D2799
1651
1652	.long	0x7EBE2799
1653	.long	0x7EDF2799
1654	addi	4,4,0x80
1655	b	.Lctr32_enc8x_done
1656
1657.align	5
1658.Lctr32_enc8x_seven:
1659	.long	0x11EF0D09
1660	.long	0x12101509
1661	.long	0x12311D09
1662	.long	0x12525509
1663	.long	0x12736509
1664	.long	0x12946D09
1665	.long	0x12B57509
1666
1667
1668
1669	.long	0x7DE02799
1670
1671	.long	0x7E082799
1672
1673	.long	0x7E3A2799
1674
1675	.long	0x7E5B2799
1676
1677	.long	0x7E7C2799
1678
1679	.long	0x7E9D2799
1680	.long	0x7EBE2799
1681	addi	4,4,0x70
1682	b	.Lctr32_enc8x_done
1683
1684.align	5
1685.Lctr32_enc8x_six:
1686	.long	0x11EF1509
1687	.long	0x12101D09
1688	.long	0x12315509
1689	.long	0x12526509
1690	.long	0x12736D09
1691	.long	0x12947509
1692
1693
1694
1695	.long	0x7DE02799
1696
1697	.long	0x7E082799
1698
1699	.long	0x7E3A2799
1700
1701	.long	0x7E5B2799
1702
1703	.long	0x7E7C2799
1704	.long	0x7E9D2799
1705	addi	4,4,0x60
1706	b	.Lctr32_enc8x_done
1707
1708.align	5
1709.Lctr32_enc8x_five:
1710	.long	0x11EF1D09
1711	.long	0x12105509
1712	.long	0x12316509
1713	.long	0x12526D09
1714	.long	0x12737509
1715
1716
1717
1718	.long	0x7DE02799
1719
1720	.long	0x7E082799
1721
1722	.long	0x7E3A2799
1723
1724	.long	0x7E5B2799
1725	.long	0x7E7C2799
1726	addi	4,4,0x50
1727	b	.Lctr32_enc8x_done
1728
1729.align	5
1730.Lctr32_enc8x_four:
1731	.long	0x11EF5509
1732	.long	0x12106509
1733	.long	0x12316D09
1734	.long	0x12527509
1735
1736
1737
1738	.long	0x7DE02799
1739
1740	.long	0x7E082799
1741
1742	.long	0x7E3A2799
1743	.long	0x7E5B2799
1744	addi	4,4,0x40
1745	b	.Lctr32_enc8x_done
1746
1747.align	5
1748.Lctr32_enc8x_three:
1749	.long	0x11EF6509
1750	.long	0x12106D09
1751	.long	0x12317509
1752
1753
1754
1755	.long	0x7DE02799
1756
1757	.long	0x7E082799
1758	.long	0x7E3A2799
1759	addi	4,4,0x30
1760	b	.Lctr32_enc8x_done
1761
1762.align	5
1763.Lctr32_enc8x_two:
1764	.long	0x11EF6D09
1765	.long	0x12107509
1766
1767
1768
1769	.long	0x7DE02799
1770	.long	0x7E082799
1771	addi	4,4,0x20
1772	b	.Lctr32_enc8x_done
1773
1774.align	5
1775.Lctr32_enc8x_one:
1776	.long	0x11EF7509
1777
1778
1779	.long	0x7DE02799
1780	addi	4,4,0x10
1781
1782.Lctr32_enc8x_done:
1783	li	10,47
1784	li	11,63
1785	stvx	6,10,1
1786	addi	10,10,32
1787	stvx	6,11,1
1788	addi	11,11,32
1789	stvx	6,10,1
1790	addi	10,10,32
1791	stvx	6,11,1
1792	addi	11,11,32
1793	stvx	6,10,1
1794	addi	10,10,32
1795	stvx	6,11,1
1796	addi	11,11,32
1797	stvx	6,10,1
1798	addi	10,10,32
1799	stvx	6,11,1
1800	addi	11,11,32
1801
1802	mtspr	256,12
1803	lvx	20,10,1
1804	addi	10,10,32
1805	lvx	21,11,1
1806	addi	11,11,32
1807	lvx	22,10,1
1808	addi	10,10,32
1809	lvx	23,11,1
1810	addi	11,11,32
1811	lvx	24,10,1
1812	addi	10,10,32
1813	lvx	25,11,1
1814	addi	11,11,32
1815	lvx	26,10,1
1816	addi	10,10,32
1817	lvx	27,11,1
1818	addi	11,11,32
1819	lvx	28,10,1
1820	addi	10,10,32
1821	lvx	29,11,1
1822	addi	11,11,32
1823	lvx	30,10,1
1824	lvx	31,11,1
1825	lwz	26,368(1)
1826	lwz	27,372(1)
1827	lwz	28,376(1)
1828	lwz	29,380(1)
1829	lwz	30,384(1)
1830	lwz	31,388(1)
1831	addi	1,1,392
1832	blr
1833.long	0
1834.byte	0,12,0x04,0,0x80,6,6,0
1835.long	0
1836.size	aes_p8_ctr32_encrypt_blocks,.-aes_p8_ctr32_encrypt_blocks
1837.globl	aes_p8_xts_encrypt
1838.type	aes_p8_xts_encrypt,@function
1839.align	5
1840aes_p8_xts_encrypt:
1841	mr	10,3
1842	li	3,-1
1843	cmplwi	5,16
1844	.long	0x4dc00020
1845
1846	lis	0,0xfff0
1847	mfspr	12,256
1848	li	11,0
1849	mtspr	256,0
1850
1851	vspltisb	9,0x07
1852
1853
1854
1855
1856	li	3,15
1857	lvx	8,0,8
1858	lvsl	5,0,8
1859	lvx	4,3,8
1860
1861	vperm	8,8,4,5
1862
1863	neg	11,10
1864	lvsr	5,0,11
1865	lvx	2,0,10
1866	addi	10,10,15
1867
1868
1869	cmplwi	7,0
1870	beq	.Lxts_enc_no_key2
1871
1872	lvsl	7,0,7
1873	lwz	9,240(7)
1874	srwi	9,9,1
1875	subi	9,9,1
1876	li	3,16
1877
1878	lvx	0,0,7
1879	lvx	1,3,7
1880	addi	3,3,16
1881	vperm	0,0,1,7
1882	vxor	8,8,0
1883	lvx	0,3,7
1884	addi	3,3,16
1885	mtctr	9
1886
1887.Ltweak_xts_enc:
1888	vperm	1,1,0,7
1889	.long	0x11080D08
1890	lvx	1,3,7
1891	addi	3,3,16
1892	vperm	0,0,1,7
1893	.long	0x11080508
1894	lvx	0,3,7
1895	addi	3,3,16
1896	bdnz	.Ltweak_xts_enc
1897
1898	vperm	1,1,0,7
1899	.long	0x11080D08
1900	lvx	1,3,7
1901	vperm	0,0,1,7
1902	.long	0x11080509
1903
1904	li	8,0
1905	b	.Lxts_enc
1906
1907.Lxts_enc_no_key2:
1908	li	3,-16
1909	and	5,5,3
1910
1911
1912.Lxts_enc:
1913	lvx	4,0,10
1914	addi	10,10,16
1915
1916	lvsl	7,0,6
1917	lwz	9,240(6)
1918	srwi	9,9,1
1919	subi	9,9,1
1920	li	3,16
1921
1922	vslb	10,9,9
1923	vor	10,10,9
1924	vspltisb	11,1
1925	vsldoi	10,10,11,15
1926
1927	cmplwi	5,96
1928	bge	_aesp8_xts_encrypt6x
1929
1930	andi.	7,5,15
1931	subic	0,5,32
1932	subi	7,7,16
1933	subfe	0,0,0
1934	and	0,0,7
1935	add	10,10,0
1936
1937	lvx	0,0,6
1938	lvx	1,3,6
1939	addi	3,3,16
1940	vperm	2,2,4,5
1941	vperm	0,0,1,7
1942	vxor	2,2,8
1943	vxor	2,2,0
1944	lvx	0,3,6
1945	addi	3,3,16
1946	mtctr	9
1947	b	.Loop_xts_enc
1948
1949.align	5
1950.Loop_xts_enc:
1951	vperm	1,1,0,7
1952	.long	0x10420D08
1953	lvx	1,3,6
1954	addi	3,3,16
1955	vperm	0,0,1,7
1956	.long	0x10420508
1957	lvx	0,3,6
1958	addi	3,3,16
1959	bdnz	.Loop_xts_enc
1960
1961	vperm	1,1,0,7
1962	.long	0x10420D08
1963	lvx	1,3,6
1964	li	3,16
1965	vperm	0,0,1,7
1966	vxor	0,0,8
1967	.long	0x10620509
1968
1969
1970	nop
1971
1972	.long	0x7C602799
1973	addi	4,4,16
1974
1975	subic.	5,5,16
1976	beq	.Lxts_enc_done
1977
1978	vor	2,4,4
1979	lvx	4,0,10
1980	addi	10,10,16
1981	lvx	0,0,6
1982	lvx	1,3,6
1983	addi	3,3,16
1984
1985	subic	0,5,32
1986	subfe	0,0,0
1987	and	0,0,7
1988	add	10,10,0
1989
1990	vsrab	11,8,9
1991	vaddubm	8,8,8
1992	vsldoi	11,11,11,15
1993	vand	11,11,10
1994	vxor	8,8,11
1995
1996	vperm	2,2,4,5
1997	vperm	0,0,1,7
1998	vxor	2,2,8
1999	vxor	3,3,0
2000	vxor	2,2,0
2001	lvx	0,3,6
2002	addi	3,3,16
2003
2004	mtctr	9
2005	cmplwi	5,16
2006	bge	.Loop_xts_enc
2007
2008	vxor	3,3,8
2009	lvsr	5,0,5
2010	vxor	4,4,4
2011	vspltisb	11,-1
2012	vperm	4,4,11,5
2013	vsel	2,2,3,4
2014
2015	subi	11,4,17
2016	subi	4,4,16
2017	mtctr	5
2018	li	5,16
2019.Loop_xts_enc_steal:
2020	lbzu	0,1(11)
2021	stb	0,16(11)
2022	bdnz	.Loop_xts_enc_steal
2023
2024	mtctr	9
2025	b	.Loop_xts_enc
2026
2027.Lxts_enc_done:
2028	cmplwi	8,0
2029	beq	.Lxts_enc_ret
2030
2031	vsrab	11,8,9
2032	vaddubm	8,8,8
2033	vsldoi	11,11,11,15
2034	vand	11,11,10
2035	vxor	8,8,11
2036
2037
2038	.long	0x7D004799
2039
2040.Lxts_enc_ret:
2041	mtspr	256,12
2042	li	3,0
2043	blr
2044.long	0
2045.byte	0,12,0x04,0,0x80,6,6,0
2046.long	0
2047.size	aes_p8_xts_encrypt,.-aes_p8_xts_encrypt
2048
2049.globl	aes_p8_xts_decrypt
2050.type	aes_p8_xts_decrypt,@function
2051.align	5
2052aes_p8_xts_decrypt:
2053	mr	10,3
2054	li	3,-1
2055	cmplwi	5,16
2056	.long	0x4dc00020
2057
2058	lis	0,0xfff8
2059	mfspr	12,256
2060	li	11,0
2061	mtspr	256,0
2062
2063	andi.	0,5,15
2064	neg	0,0
2065	andi.	0,0,16
2066	sub	5,5,0
2067
2068	vspltisb	9,0x07
2069
2070
2071
2072
2073	li	3,15
2074	lvx	8,0,8
2075	lvsl	5,0,8
2076	lvx	4,3,8
2077
2078	vperm	8,8,4,5
2079
2080	neg	11,10
2081	lvsr	5,0,11
2082	lvx	2,0,10
2083	addi	10,10,15
2084
2085
2086	cmplwi	7,0
2087	beq	.Lxts_dec_no_key2
2088
2089	lvsl	7,0,7
2090	lwz	9,240(7)
2091	srwi	9,9,1
2092	subi	9,9,1
2093	li	3,16
2094
2095	lvx	0,0,7
2096	lvx	1,3,7
2097	addi	3,3,16
2098	vperm	0,0,1,7
2099	vxor	8,8,0
2100	lvx	0,3,7
2101	addi	3,3,16
2102	mtctr	9
2103
2104.Ltweak_xts_dec:
2105	vperm	1,1,0,7
2106	.long	0x11080D08
2107	lvx	1,3,7
2108	addi	3,3,16
2109	vperm	0,0,1,7
2110	.long	0x11080508
2111	lvx	0,3,7
2112	addi	3,3,16
2113	bdnz	.Ltweak_xts_dec
2114
2115	vperm	1,1,0,7
2116	.long	0x11080D08
2117	lvx	1,3,7
2118	vperm	0,0,1,7
2119	.long	0x11080509
2120
2121	li	8,0
2122	b	.Lxts_dec
2123
2124.Lxts_dec_no_key2:
2125	neg	3,5
2126	andi.	3,3,15
2127	add	5,5,3
2128
2129
2130.Lxts_dec:
2131	lvx	4,0,10
2132	addi	10,10,16
2133
2134	lvsl	7,0,6
2135	lwz	9,240(6)
2136	srwi	9,9,1
2137	subi	9,9,1
2138	li	3,16
2139
2140	vslb	10,9,9
2141	vor	10,10,9
2142	vspltisb	11,1
2143	vsldoi	10,10,11,15
2144
2145	cmplwi	5,96
2146	bge	_aesp8_xts_decrypt6x
2147
2148	lvx	0,0,6
2149	lvx	1,3,6
2150	addi	3,3,16
2151	vperm	2,2,4,5
2152	vperm	0,0,1,7
2153	vxor	2,2,8
2154	vxor	2,2,0
2155	lvx	0,3,6
2156	addi	3,3,16
2157	mtctr	9
2158
2159	cmplwi	5,16
2160	blt	.Ltail_xts_dec
2161	b	.Loop_xts_dec
2162
2163.align	5
2164.Loop_xts_dec:
2165	vperm	1,1,0,7
2166	.long	0x10420D48
2167	lvx	1,3,6
2168	addi	3,3,16
2169	vperm	0,0,1,7
2170	.long	0x10420548
2171	lvx	0,3,6
2172	addi	3,3,16
2173	bdnz	.Loop_xts_dec
2174
2175	vperm	1,1,0,7
2176	.long	0x10420D48
2177	lvx	1,3,6
2178	li	3,16
2179	vperm	0,0,1,7
2180	vxor	0,0,8
2181	.long	0x10620549
2182
2183
2184	nop
2185
2186	.long	0x7C602799
2187	addi	4,4,16
2188
2189	subic.	5,5,16
2190	beq	.Lxts_dec_done
2191
2192	vor	2,4,4
2193	lvx	4,0,10
2194	addi	10,10,16
2195	lvx	0,0,6
2196	lvx	1,3,6
2197	addi	3,3,16
2198
2199	vsrab	11,8,9
2200	vaddubm	8,8,8
2201	vsldoi	11,11,11,15
2202	vand	11,11,10
2203	vxor	8,8,11
2204
2205	vperm	2,2,4,5
2206	vperm	0,0,1,7
2207	vxor	2,2,8
2208	vxor	2,2,0
2209	lvx	0,3,6
2210	addi	3,3,16
2211
2212	mtctr	9
2213	cmplwi	5,16
2214	bge	.Loop_xts_dec
2215
2216.Ltail_xts_dec:
2217	vsrab	11,8,9
2218	vaddubm	12,8,8
2219	vsldoi	11,11,11,15
2220	vand	11,11,10
2221	vxor	12,12,11
2222
2223	subi	10,10,16
2224	add	10,10,5
2225
2226	vxor	2,2,8
2227	vxor	2,2,12
2228
2229.Loop_xts_dec_short:
2230	vperm	1,1,0,7
2231	.long	0x10420D48
2232	lvx	1,3,6
2233	addi	3,3,16
2234	vperm	0,0,1,7
2235	.long	0x10420548
2236	lvx	0,3,6
2237	addi	3,3,16
2238	bdnz	.Loop_xts_dec_short
2239
2240	vperm	1,1,0,7
2241	.long	0x10420D48
2242	lvx	1,3,6
2243	li	3,16
2244	vperm	0,0,1,7
2245	vxor	0,0,12
2246	.long	0x10620549
2247
2248
2249	nop
2250
2251	.long	0x7C602799
2252
2253	vor	2,4,4
2254	lvx	4,0,10
2255
2256	lvx	0,0,6
2257	lvx	1,3,6
2258	addi	3,3,16
2259	vperm	2,2,4,5
2260	vperm	0,0,1,7
2261
2262	lvsr	5,0,5
2263	vxor	4,4,4
2264	vspltisb	11,-1
2265	vperm	4,4,11,5
2266	vsel	2,2,3,4
2267
2268	vxor	0,0,8
2269	vxor	2,2,0
2270	lvx	0,3,6
2271	addi	3,3,16
2272
2273	subi	11,4,1
2274	mtctr	5
2275	li	5,16
2276.Loop_xts_dec_steal:
2277	lbzu	0,1(11)
2278	stb	0,16(11)
2279	bdnz	.Loop_xts_dec_steal
2280
2281	mtctr	9
2282	b	.Loop_xts_dec
2283
2284.Lxts_dec_done:
2285	cmplwi	8,0
2286	beq	.Lxts_dec_ret
2287
2288	vsrab	11,8,9
2289	vaddubm	8,8,8
2290	vsldoi	11,11,11,15
2291	vand	11,11,10
2292	vxor	8,8,11
2293
2294
2295	.long	0x7D004799
2296
2297.Lxts_dec_ret:
2298	mtspr	256,12
2299	li	3,0
2300	blr
2301.long	0
2302.byte	0,12,0x04,0,0x80,6,6,0
2303.long	0
2304.size	aes_p8_xts_decrypt,.-aes_p8_xts_decrypt
2305.align	5
2306_aesp8_xts_encrypt6x:
2307	stwu	1,-392(1)
2308	mflr	11
2309	li	7,175
2310	li	3,191
2311	stw	11,396(1)
2312	stvx	20,7,1
2313	addi	7,7,32
2314	stvx	21,3,1
2315	addi	3,3,32
2316	stvx	22,7,1
2317	addi	7,7,32
2318	stvx	23,3,1
2319	addi	3,3,32
2320	stvx	24,7,1
2321	addi	7,7,32
2322	stvx	25,3,1
2323	addi	3,3,32
2324	stvx	26,7,1
2325	addi	7,7,32
2326	stvx	27,3,1
2327	addi	3,3,32
2328	stvx	28,7,1
2329	addi	7,7,32
2330	stvx	29,3,1
2331	addi	3,3,32
2332	stvx	30,7,1
2333	stvx	31,3,1
2334	li	0,-1
2335	stw	12,364(1)
2336	li	3,0x10
2337	stw	26,368(1)
2338	li	26,0x20
2339	stw	27,372(1)
2340	li	27,0x30
2341	stw	28,376(1)
2342	li	28,0x40
2343	stw	29,380(1)
2344	li	29,0x50
2345	stw	30,384(1)
2346	li	30,0x60
2347	stw	31,388(1)
2348	li	31,0x70
2349	mtspr	256,0
2350
2351	subi	9,9,3
2352
2353	lvx	23,0,6
2354	lvx	30,3,6
2355	addi	6,6,0x20
2356	lvx	31,0,6
2357	vperm	23,23,30,7
2358	addi	7,1,32+15
2359	mtctr	9
2360
2361.Load_xts_enc_key:
2362	vperm	24,30,31,7
2363	lvx	30,3,6
2364	addi	6,6,0x20
2365	stvx	24,0,7
2366	vperm	25,31,30,7
2367	lvx	31,0,6
2368	stvx	25,3,7
2369	addi	7,7,0x20
2370	bdnz	.Load_xts_enc_key
2371
2372	lvx	26,3,6
2373	vperm	24,30,31,7
2374	lvx	27,26,6
2375	stvx	24,0,7
2376	vperm	25,31,26,7
2377	lvx	28,27,6
2378	stvx	25,3,7
2379	addi	7,1,32+15
2380	vperm	26,26,27,7
2381	lvx	29,28,6
2382	vperm	27,27,28,7
2383	lvx	30,29,6
2384	vperm	28,28,29,7
2385	lvx	31,30,6
2386	vperm	29,29,30,7
2387	lvx	22,31,6
2388	vperm	30,30,31,7
2389	lvx	24,0,7
2390	vperm	31,31,22,7
2391	lvx	25,3,7
2392
2393	vperm	0,2,4,5
2394	subi	10,10,31
2395	vxor	17,8,23
2396	vsrab	11,8,9
2397	vaddubm	8,8,8
2398	vsldoi	11,11,11,15
2399	vand	11,11,10
2400	vxor	7,0,17
2401	vxor	8,8,11
2402
2403	.long	0x7C235699
2404	vxor	18,8,23
2405	vsrab	11,8,9
2406	vaddubm	8,8,8
2407	vsldoi	11,11,11,15
2408
2409	vand	11,11,10
2410	vxor	12,1,18
2411	vxor	8,8,11
2412
2413	.long	0x7C5A5699
2414	andi.	31,5,15
2415	vxor	19,8,23
2416	vsrab	11,8,9
2417	vaddubm	8,8,8
2418	vsldoi	11,11,11,15
2419
2420	vand	11,11,10
2421	vxor	13,2,19
2422	vxor	8,8,11
2423
2424	.long	0x7C7B5699
2425	sub	5,5,31
2426	vxor	20,8,23
2427	vsrab	11,8,9
2428	vaddubm	8,8,8
2429	vsldoi	11,11,11,15
2430
2431	vand	11,11,10
2432	vxor	14,3,20
2433	vxor	8,8,11
2434
2435	.long	0x7C9C5699
2436	subi	5,5,0x60
2437	vxor	21,8,23
2438	vsrab	11,8,9
2439	vaddubm	8,8,8
2440	vsldoi	11,11,11,15
2441
2442	vand	11,11,10
2443	vxor	15,4,21
2444	vxor	8,8,11
2445
2446	.long	0x7CBD5699
2447	addi	10,10,0x60
2448	vxor	22,8,23
2449	vsrab	11,8,9
2450	vaddubm	8,8,8
2451	vsldoi	11,11,11,15
2452
2453	vand	11,11,10
2454	vxor	16,5,22
2455	vxor	8,8,11
2456
2457	vxor	31,31,23
2458	mtctr	9
2459	b	.Loop_xts_enc6x
2460
2461.align	5
2462.Loop_xts_enc6x:
2463	.long	0x10E7C508
2464	.long	0x118CC508
2465	.long	0x11ADC508
2466	.long	0x11CEC508
2467	.long	0x11EFC508
2468	.long	0x1210C508
2469	lvx	24,26,7
2470	addi	7,7,0x20
2471
2472	.long	0x10E7CD08
2473	.long	0x118CCD08
2474	.long	0x11ADCD08
2475	.long	0x11CECD08
2476	.long	0x11EFCD08
2477	.long	0x1210CD08
2478	lvx	25,3,7
2479	bdnz	.Loop_xts_enc6x
2480
2481	subic	5,5,96
2482	vxor	0,17,31
2483	.long	0x10E7C508
2484	.long	0x118CC508
2485	vsrab	11,8,9
2486	vxor	17,8,23
2487	vaddubm	8,8,8
2488	.long	0x11ADC508
2489	.long	0x11CEC508
2490	vsldoi	11,11,11,15
2491	.long	0x11EFC508
2492	.long	0x1210C508
2493
2494	subfe.	0,0,0
2495	vand	11,11,10
2496	.long	0x10E7CD08
2497	.long	0x118CCD08
2498	vxor	8,8,11
2499	.long	0x11ADCD08
2500	.long	0x11CECD08
2501	vxor	1,18,31
2502	vsrab	11,8,9
2503	vxor	18,8,23
2504	.long	0x11EFCD08
2505	.long	0x1210CD08
2506
2507	and	0,0,5
2508	vaddubm	8,8,8
2509	vsldoi	11,11,11,15
2510	.long	0x10E7D508
2511	.long	0x118CD508
2512	vand	11,11,10
2513	.long	0x11ADD508
2514	.long	0x11CED508
2515	vxor	8,8,11
2516	.long	0x11EFD508
2517	.long	0x1210D508
2518
2519	add	10,10,0
2520
2521
2522
2523	vxor	2,19,31
2524	vsrab	11,8,9
2525	vxor	19,8,23
2526	vaddubm	8,8,8
2527	.long	0x10E7DD08
2528	.long	0x118CDD08
2529	vsldoi	11,11,11,15
2530	.long	0x11ADDD08
2531	.long	0x11CEDD08
2532	vand	11,11,10
2533	.long	0x11EFDD08
2534	.long	0x1210DD08
2535
2536	addi	7,1,32+15
2537	vxor	8,8,11
2538	.long	0x10E7E508
2539	.long	0x118CE508
2540	vxor	3,20,31
2541	vsrab	11,8,9
2542	vxor	20,8,23
2543	.long	0x11ADE508
2544	.long	0x11CEE508
2545	vaddubm	8,8,8
2546	vsldoi	11,11,11,15
2547	.long	0x11EFE508
2548	.long	0x1210E508
2549	lvx	24,0,7
2550	vand	11,11,10
2551
2552	.long	0x10E7ED08
2553	.long	0x118CED08
2554	vxor	8,8,11
2555	.long	0x11ADED08
2556	.long	0x11CEED08
2557	vxor	4,21,31
2558	vsrab	11,8,9
2559	vxor	21,8,23
2560	.long	0x11EFED08
2561	.long	0x1210ED08
2562	lvx	25,3,7
2563	vaddubm	8,8,8
2564	vsldoi	11,11,11,15
2565
2566	.long	0x10E7F508
2567	.long	0x118CF508
2568	vand	11,11,10
2569	.long	0x11ADF508
2570	.long	0x11CEF508
2571	vxor	8,8,11
2572	.long	0x11EFF508
2573	.long	0x1210F508
2574	vxor	5,22,31
2575	vsrab	11,8,9
2576	vxor	22,8,23
2577
2578	.long	0x10E70509
2579	.long	0x7C005699
2580	vaddubm	8,8,8
2581	vsldoi	11,11,11,15
2582	.long	0x118C0D09
2583	.long	0x7C235699
2584	.long	0x11AD1509
2585
2586	.long	0x7C5A5699
2587	vand	11,11,10
2588	.long	0x11CE1D09
2589
2590	.long	0x7C7B5699
2591	.long	0x11EF2509
2592
2593	.long	0x7C9C5699
2594	vxor	8,8,11
2595	.long	0x11702D09
2596
2597
2598	.long	0x7CBD5699
2599	addi	10,10,0x60
2600
2601
2602
2603
2604
2605	.long	0x7CE02799
2606	vxor	7,0,17
2607
2608	.long	0x7D832799
2609	vxor	12,1,18
2610
2611	.long	0x7DBA2799
2612	vxor	13,2,19
2613
2614	.long	0x7DDB2799
2615	vxor	14,3,20
2616
2617	.long	0x7DFC2799
2618	vxor	15,4,21
2619
2620	.long	0x7D7D2799
2621	vxor	16,5,22
2622	addi	4,4,0x60
2623
2624	mtctr	9
2625	beq	.Loop_xts_enc6x
2626
2627	addic.	5,5,0x60
2628	beq	.Lxts_enc6x_zero
2629	cmpwi	5,0x20
2630	blt	.Lxts_enc6x_one
2631	nop
2632	beq	.Lxts_enc6x_two
2633	cmpwi	5,0x40
2634	blt	.Lxts_enc6x_three
2635	nop
2636	beq	.Lxts_enc6x_four
2637
2638.Lxts_enc6x_five:
2639	vxor	7,1,17
2640	vxor	12,2,18
2641	vxor	13,3,19
2642	vxor	14,4,20
2643	vxor	15,5,21
2644
2645	bl	_aesp8_xts_enc5x
2646
2647
2648	vor	17,22,22
2649
2650	.long	0x7CE02799
2651
2652	.long	0x7D832799
2653
2654	.long	0x7DBA2799
2655	vxor	11,15,22
2656
2657	.long	0x7DDB2799
2658	.long	0x7DFC2799
2659	addi	4,4,0x50
2660	bne	.Lxts_enc6x_steal
2661	b	.Lxts_enc6x_done
2662
2663.align	4
2664.Lxts_enc6x_four:
2665	vxor	7,2,17
2666	vxor	12,3,18
2667	vxor	13,4,19
2668	vxor	14,5,20
2669	vxor	15,15,15
2670
2671	bl	_aesp8_xts_enc5x
2672
2673
2674	vor	17,21,21
2675
2676	.long	0x7CE02799
2677
2678	.long	0x7D832799
2679	vxor	11,14,21
2680
2681	.long	0x7DBA2799
2682	.long	0x7DDB2799
2683	addi	4,4,0x40
2684	bne	.Lxts_enc6x_steal
2685	b	.Lxts_enc6x_done
2686
2687.align	4
2688.Lxts_enc6x_three:
2689	vxor	7,3,17
2690	vxor	12,4,18
2691	vxor	13,5,19
2692	vxor	14,14,14
2693	vxor	15,15,15
2694
2695	bl	_aesp8_xts_enc5x
2696
2697
2698	vor	17,20,20
2699
2700	.long	0x7CE02799
2701	vxor	11,13,20
2702
2703	.long	0x7D832799
2704	.long	0x7DBA2799
2705	addi	4,4,0x30
2706	bne	.Lxts_enc6x_steal
2707	b	.Lxts_enc6x_done
2708
2709.align	4
2710.Lxts_enc6x_two:
2711	vxor	7,4,17
2712	vxor	12,5,18
2713	vxor	13,13,13
2714	vxor	14,14,14
2715	vxor	15,15,15
2716
2717	bl	_aesp8_xts_enc5x
2718
2719
2720	vor	17,19,19
2721	vxor	11,12,19
2722
2723	.long	0x7CE02799
2724	.long	0x7D832799
2725	addi	4,4,0x20
2726	bne	.Lxts_enc6x_steal
2727	b	.Lxts_enc6x_done
2728
2729.align	4
2730.Lxts_enc6x_one:
2731	vxor	7,5,17
2732	nop
2733.Loop_xts_enc1x:
2734	.long	0x10E7C508
2735	lvx	24,26,7
2736	addi	7,7,0x20
2737
2738	.long	0x10E7CD08
2739	lvx	25,3,7
2740	bdnz	.Loop_xts_enc1x
2741
2742	add	10,10,31
2743	cmpwi	31,0
2744	.long	0x10E7C508
2745
2746	subi	10,10,16
2747	.long	0x10E7CD08
2748
2749	lvsr	5,0,31
2750	.long	0x10E7D508
2751
2752	.long	0x7C005699
2753	.long	0x10E7DD08
2754
2755	addi	7,1,32+15
2756	.long	0x10E7E508
2757	lvx	24,0,7
2758
2759	.long	0x10E7ED08
2760	lvx	25,3,7
2761	vxor	17,17,31
2762
2763
2764	.long	0x10E7F508
2765
2766	vperm	0,0,0,5
2767	.long	0x10E78D09
2768
2769	vor	17,18,18
2770	vxor	11,7,18
2771
2772	.long	0x7CE02799
2773	addi	4,4,0x10
2774	bne	.Lxts_enc6x_steal
2775	b	.Lxts_enc6x_done
2776
2777.align	4
2778.Lxts_enc6x_zero:
2779	cmpwi	31,0
2780	beq	.Lxts_enc6x_done
2781
2782	add	10,10,31
2783	subi	10,10,16
2784	.long	0x7C005699
2785	lvsr	5,0,31
2786
2787	vperm	0,0,0,5
2788	vxor	11,11,17
2789.Lxts_enc6x_steal:
2790	vxor	0,0,17
2791	vxor	7,7,7
2792	vspltisb	12,-1
2793	vperm	7,7,12,5
2794	vsel	7,0,11,7
2795
2796	subi	30,4,17
2797	subi	4,4,16
2798	mtctr	31
2799.Loop_xts_enc6x_steal:
2800	lbzu	0,1(30)
2801	stb	0,16(30)
2802	bdnz	.Loop_xts_enc6x_steal
2803
2804	li	31,0
2805	mtctr	9
2806	b	.Loop_xts_enc1x
2807
2808.align	4
2809.Lxts_enc6x_done:
2810	cmplwi	8,0
2811	beq	.Lxts_enc6x_ret
2812
2813	vxor	8,17,23
2814
2815	.long	0x7D004799
2816
2817.Lxts_enc6x_ret:
2818	mtlr	11
2819	li	10,47
2820	li	11,63
2821	stvx	9,10,1
2822	addi	10,10,32
2823	stvx	9,11,1
2824	addi	11,11,32
2825	stvx	9,10,1
2826	addi	10,10,32
2827	stvx	9,11,1
2828	addi	11,11,32
2829	stvx	9,10,1
2830	addi	10,10,32
2831	stvx	9,11,1
2832	addi	11,11,32
2833	stvx	9,10,1
2834	addi	10,10,32
2835	stvx	9,11,1
2836	addi	11,11,32
2837
2838	mtspr	256,12
2839	lvx	20,10,1
2840	addi	10,10,32
2841	lvx	21,11,1
2842	addi	11,11,32
2843	lvx	22,10,1
2844	addi	10,10,32
2845	lvx	23,11,1
2846	addi	11,11,32
2847	lvx	24,10,1
2848	addi	10,10,32
2849	lvx	25,11,1
2850	addi	11,11,32
2851	lvx	26,10,1
2852	addi	10,10,32
2853	lvx	27,11,1
2854	addi	11,11,32
2855	lvx	28,10,1
2856	addi	10,10,32
2857	lvx	29,11,1
2858	addi	11,11,32
2859	lvx	30,10,1
2860	lvx	31,11,1
2861	lwz	26,368(1)
2862	lwz	27,372(1)
2863	lwz	28,376(1)
2864	lwz	29,380(1)
2865	lwz	30,384(1)
2866	lwz	31,388(1)
2867	addi	1,1,392
2868	blr
2869.long	0
2870.byte	0,12,0x04,1,0x80,6,6,0
2871.long	0
2872
2873.align	5
2874_aesp8_xts_enc5x:
2875	.long	0x10E7C508
2876	.long	0x118CC508
2877	.long	0x11ADC508
2878	.long	0x11CEC508
2879	.long	0x11EFC508
2880	lvx	24,26,7
2881	addi	7,7,0x20
2882
2883	.long	0x10E7CD08
2884	.long	0x118CCD08
2885	.long	0x11ADCD08
2886	.long	0x11CECD08
2887	.long	0x11EFCD08
2888	lvx	25,3,7
2889	bdnz	_aesp8_xts_enc5x
2890
2891	add	10,10,31
2892	cmpwi	31,0
2893	.long	0x10E7C508
2894	.long	0x118CC508
2895	.long	0x11ADC508
2896	.long	0x11CEC508
2897	.long	0x11EFC508
2898
2899	subi	10,10,16
2900	.long	0x10E7CD08
2901	.long	0x118CCD08
2902	.long	0x11ADCD08
2903	.long	0x11CECD08
2904	.long	0x11EFCD08
2905	vxor	17,17,31
2906
2907	.long	0x10E7D508
2908	lvsr	5,0,31
2909	.long	0x118CD508
2910	.long	0x11ADD508
2911	.long	0x11CED508
2912	.long	0x11EFD508
2913	vxor	1,18,31
2914
2915	.long	0x10E7DD08
2916	.long	0x7C005699
2917	.long	0x118CDD08
2918	.long	0x11ADDD08
2919	.long	0x11CEDD08
2920	.long	0x11EFDD08
2921	vxor	2,19,31
2922
2923	addi	7,1,32+15
2924	.long	0x10E7E508
2925	.long	0x118CE508
2926	.long	0x11ADE508
2927	.long	0x11CEE508
2928	.long	0x11EFE508
2929	lvx	24,0,7
2930	vxor	3,20,31
2931
2932	.long	0x10E7ED08
2933
2934	.long	0x118CED08
2935	.long	0x11ADED08
2936	.long	0x11CEED08
2937	.long	0x11EFED08
2938	lvx	25,3,7
2939	vxor	4,21,31
2940
2941	.long	0x10E7F508
2942	vperm	0,0,0,5
2943	.long	0x118CF508
2944	.long	0x11ADF508
2945	.long	0x11CEF508
2946	.long	0x11EFF508
2947
2948	.long	0x10E78D09
2949	.long	0x118C0D09
2950	.long	0x11AD1509
2951	.long	0x11CE1D09
2952	.long	0x11EF2509
2953	blr
2954.long	0
2955.byte	0,12,0x14,0,0,0,0,0
2956
2957.align	5
2958_aesp8_xts_decrypt6x:
2959	stwu	1,-392(1)
2960	mflr	11
2961	li	7,175
2962	li	3,191
2963	stw	11,396(1)
2964	stvx	20,7,1
2965	addi	7,7,32
2966	stvx	21,3,1
2967	addi	3,3,32
2968	stvx	22,7,1
2969	addi	7,7,32
2970	stvx	23,3,1
2971	addi	3,3,32
2972	stvx	24,7,1
2973	addi	7,7,32
2974	stvx	25,3,1
2975	addi	3,3,32
2976	stvx	26,7,1
2977	addi	7,7,32
2978	stvx	27,3,1
2979	addi	3,3,32
2980	stvx	28,7,1
2981	addi	7,7,32
2982	stvx	29,3,1
2983	addi	3,3,32
2984	stvx	30,7,1
2985	stvx	31,3,1
2986	li	0,-1
2987	stw	12,364(1)
2988	li	3,0x10
2989	stw	26,368(1)
2990	li	26,0x20
2991	stw	27,372(1)
2992	li	27,0x30
2993	stw	28,376(1)
2994	li	28,0x40
2995	stw	29,380(1)
2996	li	29,0x50
2997	stw	30,384(1)
2998	li	30,0x60
2999	stw	31,388(1)
3000	li	31,0x70
3001	mtspr	256,0
3002
3003	subi	9,9,3
3004
3005	lvx	23,0,6
3006	lvx	30,3,6
3007	addi	6,6,0x20
3008	lvx	31,0,6
3009	vperm	23,23,30,7
3010	addi	7,1,32+15
3011	mtctr	9
3012
3013.Load_xts_dec_key:
3014	vperm	24,30,31,7
3015	lvx	30,3,6
3016	addi	6,6,0x20
3017	stvx	24,0,7
3018	vperm	25,31,30,7
3019	lvx	31,0,6
3020	stvx	25,3,7
3021	addi	7,7,0x20
3022	bdnz	.Load_xts_dec_key
3023
3024	lvx	26,3,6
3025	vperm	24,30,31,7
3026	lvx	27,26,6
3027	stvx	24,0,7
3028	vperm	25,31,26,7
3029	lvx	28,27,6
3030	stvx	25,3,7
3031	addi	7,1,32+15
3032	vperm	26,26,27,7
3033	lvx	29,28,6
3034	vperm	27,27,28,7
3035	lvx	30,29,6
3036	vperm	28,28,29,7
3037	lvx	31,30,6
3038	vperm	29,29,30,7
3039	lvx	22,31,6
3040	vperm	30,30,31,7
3041	lvx	24,0,7
3042	vperm	31,31,22,7
3043	lvx	25,3,7
3044
3045	vperm	0,2,4,5
3046	subi	10,10,31
3047	vxor	17,8,23
3048	vsrab	11,8,9
3049	vaddubm	8,8,8
3050	vsldoi	11,11,11,15
3051	vand	11,11,10
3052	vxor	7,0,17
3053	vxor	8,8,11
3054
3055	.long	0x7C235699
3056	vxor	18,8,23
3057	vsrab	11,8,9
3058	vaddubm	8,8,8
3059	vsldoi	11,11,11,15
3060
3061	vand	11,11,10
3062	vxor	12,1,18
3063	vxor	8,8,11
3064
3065	.long	0x7C5A5699
3066	andi.	31,5,15
3067	vxor	19,8,23
3068	vsrab	11,8,9
3069	vaddubm	8,8,8
3070	vsldoi	11,11,11,15
3071
3072	vand	11,11,10
3073	vxor	13,2,19
3074	vxor	8,8,11
3075
3076	.long	0x7C7B5699
3077	sub	5,5,31
3078	vxor	20,8,23
3079	vsrab	11,8,9
3080	vaddubm	8,8,8
3081	vsldoi	11,11,11,15
3082
3083	vand	11,11,10
3084	vxor	14,3,20
3085	vxor	8,8,11
3086
3087	.long	0x7C9C5699
3088	subi	5,5,0x60
3089	vxor	21,8,23
3090	vsrab	11,8,9
3091	vaddubm	8,8,8
3092	vsldoi	11,11,11,15
3093
3094	vand	11,11,10
3095	vxor	15,4,21
3096	vxor	8,8,11
3097
3098	.long	0x7CBD5699
3099	addi	10,10,0x60
3100	vxor	22,8,23
3101	vsrab	11,8,9
3102	vaddubm	8,8,8
3103	vsldoi	11,11,11,15
3104
3105	vand	11,11,10
3106	vxor	16,5,22
3107	vxor	8,8,11
3108
3109	vxor	31,31,23
3110	mtctr	9
3111	b	.Loop_xts_dec6x
3112
3113.align	5
3114.Loop_xts_dec6x:
3115	.long	0x10E7C548
3116	.long	0x118CC548
3117	.long	0x11ADC548
3118	.long	0x11CEC548
3119	.long	0x11EFC548
3120	.long	0x1210C548
3121	lvx	24,26,7
3122	addi	7,7,0x20
3123
3124	.long	0x10E7CD48
3125	.long	0x118CCD48
3126	.long	0x11ADCD48
3127	.long	0x11CECD48
3128	.long	0x11EFCD48
3129	.long	0x1210CD48
3130	lvx	25,3,7
3131	bdnz	.Loop_xts_dec6x
3132
3133	subic	5,5,96
3134	vxor	0,17,31
3135	.long	0x10E7C548
3136	.long	0x118CC548
3137	vsrab	11,8,9
3138	vxor	17,8,23
3139	vaddubm	8,8,8
3140	.long	0x11ADC548
3141	.long	0x11CEC548
3142	vsldoi	11,11,11,15
3143	.long	0x11EFC548
3144	.long	0x1210C548
3145
3146	subfe.	0,0,0
3147	vand	11,11,10
3148	.long	0x10E7CD48
3149	.long	0x118CCD48
3150	vxor	8,8,11
3151	.long	0x11ADCD48
3152	.long	0x11CECD48
3153	vxor	1,18,31
3154	vsrab	11,8,9
3155	vxor	18,8,23
3156	.long	0x11EFCD48
3157	.long	0x1210CD48
3158
3159	and	0,0,5
3160	vaddubm	8,8,8
3161	vsldoi	11,11,11,15
3162	.long	0x10E7D548
3163	.long	0x118CD548
3164	vand	11,11,10
3165	.long	0x11ADD548
3166	.long	0x11CED548
3167	vxor	8,8,11
3168	.long	0x11EFD548
3169	.long	0x1210D548
3170
3171	add	10,10,0
3172
3173
3174
3175	vxor	2,19,31
3176	vsrab	11,8,9
3177	vxor	19,8,23
3178	vaddubm	8,8,8
3179	.long	0x10E7DD48
3180	.long	0x118CDD48
3181	vsldoi	11,11,11,15
3182	.long	0x11ADDD48
3183	.long	0x11CEDD48
3184	vand	11,11,10
3185	.long	0x11EFDD48
3186	.long	0x1210DD48
3187
3188	addi	7,1,32+15
3189	vxor	8,8,11
3190	.long	0x10E7E548
3191	.long	0x118CE548
3192	vxor	3,20,31
3193	vsrab	11,8,9
3194	vxor	20,8,23
3195	.long	0x11ADE548
3196	.long	0x11CEE548
3197	vaddubm	8,8,8
3198	vsldoi	11,11,11,15
3199	.long	0x11EFE548
3200	.long	0x1210E548
3201	lvx	24,0,7
3202	vand	11,11,10
3203
3204	.long	0x10E7ED48
3205	.long	0x118CED48
3206	vxor	8,8,11
3207	.long	0x11ADED48
3208	.long	0x11CEED48
3209	vxor	4,21,31
3210	vsrab	11,8,9
3211	vxor	21,8,23
3212	.long	0x11EFED48
3213	.long	0x1210ED48
3214	lvx	25,3,7
3215	vaddubm	8,8,8
3216	vsldoi	11,11,11,15
3217
3218	.long	0x10E7F548
3219	.long	0x118CF548
3220	vand	11,11,10
3221	.long	0x11ADF548
3222	.long	0x11CEF548
3223	vxor	8,8,11
3224	.long	0x11EFF548
3225	.long	0x1210F548
3226	vxor	5,22,31
3227	vsrab	11,8,9
3228	vxor	22,8,23
3229
3230	.long	0x10E70549
3231	.long	0x7C005699
3232	vaddubm	8,8,8
3233	vsldoi	11,11,11,15
3234	.long	0x118C0D49
3235	.long	0x7C235699
3236	.long	0x11AD1549
3237
3238	.long	0x7C5A5699
3239	vand	11,11,10
3240	.long	0x11CE1D49
3241
3242	.long	0x7C7B5699
3243	.long	0x11EF2549
3244
3245	.long	0x7C9C5699
3246	vxor	8,8,11
3247	.long	0x12102D49
3248
3249	.long	0x7CBD5699
3250	addi	10,10,0x60
3251
3252
3253
3254
3255
3256	.long	0x7CE02799
3257	vxor	7,0,17
3258
3259	.long	0x7D832799
3260	vxor	12,1,18
3261
3262	.long	0x7DBA2799
3263	vxor	13,2,19
3264
3265	.long	0x7DDB2799
3266	vxor	14,3,20
3267
3268	.long	0x7DFC2799
3269	vxor	15,4,21
3270	.long	0x7E1D2799
3271	vxor	16,5,22
3272	addi	4,4,0x60
3273
3274	mtctr	9
3275	beq	.Loop_xts_dec6x
3276
3277	addic.	5,5,0x60
3278	beq	.Lxts_dec6x_zero
3279	cmpwi	5,0x20
3280	blt	.Lxts_dec6x_one
3281	nop
3282	beq	.Lxts_dec6x_two
3283	cmpwi	5,0x40
3284	blt	.Lxts_dec6x_three
3285	nop
3286	beq	.Lxts_dec6x_four
3287
3288.Lxts_dec6x_five:
3289	vxor	7,1,17
3290	vxor	12,2,18
3291	vxor	13,3,19
3292	vxor	14,4,20
3293	vxor	15,5,21
3294
3295	bl	_aesp8_xts_dec5x
3296
3297
3298	vor	17,22,22
3299	vxor	18,8,23
3300
3301	.long	0x7CE02799
3302	vxor	7,0,18
3303
3304	.long	0x7D832799
3305
3306	.long	0x7DBA2799
3307
3308	.long	0x7DDB2799
3309	.long	0x7DFC2799
3310	addi	4,4,0x50
3311	bne	.Lxts_dec6x_steal
3312	b	.Lxts_dec6x_done
3313
3314.align	4
3315.Lxts_dec6x_four:
3316	vxor	7,2,17
3317	vxor	12,3,18
3318	vxor	13,4,19
3319	vxor	14,5,20
3320	vxor	15,15,15
3321
3322	bl	_aesp8_xts_dec5x
3323
3324
3325	vor	17,21,21
3326	vor	18,22,22
3327
3328	.long	0x7CE02799
3329	vxor	7,0,22
3330
3331	.long	0x7D832799
3332
3333	.long	0x7DBA2799
3334	.long	0x7DDB2799
3335	addi	4,4,0x40
3336	bne	.Lxts_dec6x_steal
3337	b	.Lxts_dec6x_done
3338
3339.align	4
3340.Lxts_dec6x_three:
3341	vxor	7,3,17
3342	vxor	12,4,18
3343	vxor	13,5,19
3344	vxor	14,14,14
3345	vxor	15,15,15
3346
3347	bl	_aesp8_xts_dec5x
3348
3349
3350	vor	17,20,20
3351	vor	18,21,21
3352
3353	.long	0x7CE02799
3354	vxor	7,0,21
3355
3356	.long	0x7D832799
3357	.long	0x7DBA2799
3358	addi	4,4,0x30
3359	bne	.Lxts_dec6x_steal
3360	b	.Lxts_dec6x_done
3361
3362.align	4
3363.Lxts_dec6x_two:
3364	vxor	7,4,17
3365	vxor	12,5,18
3366	vxor	13,13,13
3367	vxor	14,14,14
3368	vxor	15,15,15
3369
3370	bl	_aesp8_xts_dec5x
3371
3372
3373	vor	17,19,19
3374	vor	18,20,20
3375
3376	.long	0x7CE02799
3377	vxor	7,0,20
3378	.long	0x7D832799
3379	addi	4,4,0x20
3380	bne	.Lxts_dec6x_steal
3381	b	.Lxts_dec6x_done
3382
3383.align	4
3384.Lxts_dec6x_one:
3385	vxor	7,5,17
3386	nop
3387.Loop_xts_dec1x:
3388	.long	0x10E7C548
3389	lvx	24,26,7
3390	addi	7,7,0x20
3391
3392	.long	0x10E7CD48
3393	lvx	25,3,7
3394	bdnz	.Loop_xts_dec1x
3395
3396	subi	0,31,1
3397	.long	0x10E7C548
3398
3399	andi.	0,0,16
3400	cmpwi	31,0
3401	.long	0x10E7CD48
3402
3403	sub	10,10,0
3404	.long	0x10E7D548
3405
3406	.long	0x7C005699
3407	.long	0x10E7DD48
3408
3409	addi	7,1,32+15
3410	.long	0x10E7E548
3411	lvx	24,0,7
3412
3413	.long	0x10E7ED48
3414	lvx	25,3,7
3415	vxor	17,17,31
3416
3417
3418	.long	0x10E7F548
3419
3420	mtctr	9
3421	.long	0x10E78D49
3422
3423	vor	17,18,18
3424	vor	18,19,19
3425
3426	.long	0x7CE02799
3427	addi	4,4,0x10
3428	vxor	7,0,19
3429	bne	.Lxts_dec6x_steal
3430	b	.Lxts_dec6x_done
3431
3432.align	4
3433.Lxts_dec6x_zero:
3434	cmpwi	31,0
3435	beq	.Lxts_dec6x_done
3436
3437	.long	0x7C005699
3438
3439	vxor	7,0,18
3440.Lxts_dec6x_steal:
3441	.long	0x10E7C548
3442	lvx	24,26,7
3443	addi	7,7,0x20
3444
3445	.long	0x10E7CD48
3446	lvx	25,3,7
3447	bdnz	.Lxts_dec6x_steal
3448
3449	add	10,10,31
3450	.long	0x10E7C548
3451
3452	cmpwi	31,0
3453	.long	0x10E7CD48
3454
3455	.long	0x7C005699
3456	.long	0x10E7D548
3457
3458	lvsr	5,0,31
3459	.long	0x10E7DD48
3460
3461	addi	7,1,32+15
3462	.long	0x10E7E548
3463	lvx	24,0,7
3464
3465	.long	0x10E7ED48
3466	lvx	25,3,7
3467	vxor	18,18,31
3468
3469
3470	.long	0x10E7F548
3471
3472	vperm	0,0,0,5
3473	.long	0x11679549
3474
3475
3476
3477	.long	0x7D602799
3478
3479	vxor	7,7,7
3480	vspltisb	12,-1
3481	vperm	7,7,12,5
3482	vsel	7,0,11,7
3483	vxor	7,7,17
3484
3485	subi	30,4,1
3486	mtctr	31
3487.Loop_xts_dec6x_steal:
3488	lbzu	0,1(30)
3489	stb	0,16(30)
3490	bdnz	.Loop_xts_dec6x_steal
3491
3492	li	31,0
3493	mtctr	9
3494	b	.Loop_xts_dec1x
3495
3496.align	4
3497.Lxts_dec6x_done:
3498	cmplwi	8,0
3499	beq	.Lxts_dec6x_ret
3500
3501	vxor	8,17,23
3502
3503	.long	0x7D004799
3504
3505.Lxts_dec6x_ret:
3506	mtlr	11
3507	li	10,47
3508	li	11,63
3509	stvx	9,10,1
3510	addi	10,10,32
3511	stvx	9,11,1
3512	addi	11,11,32
3513	stvx	9,10,1
3514	addi	10,10,32
3515	stvx	9,11,1
3516	addi	11,11,32
3517	stvx	9,10,1
3518	addi	10,10,32
3519	stvx	9,11,1
3520	addi	11,11,32
3521	stvx	9,10,1
3522	addi	10,10,32
3523	stvx	9,11,1
3524	addi	11,11,32
3525
3526	mtspr	256,12
3527	lvx	20,10,1
3528	addi	10,10,32
3529	lvx	21,11,1
3530	addi	11,11,32
3531	lvx	22,10,1
3532	addi	10,10,32
3533	lvx	23,11,1
3534	addi	11,11,32
3535	lvx	24,10,1
3536	addi	10,10,32
3537	lvx	25,11,1
3538	addi	11,11,32
3539	lvx	26,10,1
3540	addi	10,10,32
3541	lvx	27,11,1
3542	addi	11,11,32
3543	lvx	28,10,1
3544	addi	10,10,32
3545	lvx	29,11,1
3546	addi	11,11,32
3547	lvx	30,10,1
3548	lvx	31,11,1
3549	lwz	26,368(1)
3550	lwz	27,372(1)
3551	lwz	28,376(1)
3552	lwz	29,380(1)
3553	lwz	30,384(1)
3554	lwz	31,388(1)
3555	addi	1,1,392
3556	blr
3557.long	0
3558.byte	0,12,0x04,1,0x80,6,6,0
3559.long	0
3560
3561.align	5
3562_aesp8_xts_dec5x:
3563	.long	0x10E7C548
3564	.long	0x118CC548
3565	.long	0x11ADC548
3566	.long	0x11CEC548
3567	.long	0x11EFC548
3568	lvx	24,26,7
3569	addi	7,7,0x20
3570
3571	.long	0x10E7CD48
3572	.long	0x118CCD48
3573	.long	0x11ADCD48
3574	.long	0x11CECD48
3575	.long	0x11EFCD48
3576	lvx	25,3,7
3577	bdnz	_aesp8_xts_dec5x
3578
3579	subi	0,31,1
3580	.long	0x10E7C548
3581	.long	0x118CC548
3582	.long	0x11ADC548
3583	.long	0x11CEC548
3584	.long	0x11EFC548
3585
3586	andi.	0,0,16
3587	cmpwi	31,0
3588	.long	0x10E7CD48
3589	.long	0x118CCD48
3590	.long	0x11ADCD48
3591	.long	0x11CECD48
3592	.long	0x11EFCD48
3593	vxor	17,17,31
3594
3595	sub	10,10,0
3596	.long	0x10E7D548
3597	.long	0x118CD548
3598	.long	0x11ADD548
3599	.long	0x11CED548
3600	.long	0x11EFD548
3601	vxor	1,18,31
3602
3603	.long	0x10E7DD48
3604	.long	0x7C005699
3605	.long	0x118CDD48
3606	.long	0x11ADDD48
3607	.long	0x11CEDD48
3608	.long	0x11EFDD48
3609	vxor	2,19,31
3610
3611	addi	7,1,32+15
3612	.long	0x10E7E548
3613	.long	0x118CE548
3614	.long	0x11ADE548
3615	.long	0x11CEE548
3616	.long	0x11EFE548
3617	lvx	24,0,7
3618	vxor	3,20,31
3619
3620	.long	0x10E7ED48
3621
3622	.long	0x118CED48
3623	.long	0x11ADED48
3624	.long	0x11CEED48
3625	.long	0x11EFED48
3626	lvx	25,3,7
3627	vxor	4,21,31
3628
3629	.long	0x10E7F548
3630	.long	0x118CF548
3631	.long	0x11ADF548
3632	.long	0x11CEF548
3633	.long	0x11EFF548
3634
3635	.long	0x10E78D49
3636	.long	0x118C0D49
3637	.long	0x11AD1549
3638	.long	0x11CE1D49
3639	.long	0x11EF2549
3640	mtctr	9
3641	blr
3642.long	0
3643.byte	0,12,0x14,0,0,0,0,0
3644