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