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