1default	rel
2%define XMMWORD
3%define YMMWORD
4%define ZMMWORD
5section	.text code align=64
6
7
8EXTERN	OPENSSL_ia32cap_P
9global	sha256_block_data_order
10
11ALIGN	16
12sha256_block_data_order:
13	mov	QWORD[8+rsp],rdi	;WIN64 prologue
14	mov	QWORD[16+rsp],rsi
15	mov	rax,rsp
16$L$SEH_begin_sha256_block_data_order:
17	mov	rdi,rcx
18	mov	rsi,rdx
19	mov	rdx,r8
20
21
22	lea	r11,[OPENSSL_ia32cap_P]
23	mov	r9d,DWORD[r11]
24	mov	r10d,DWORD[4+r11]
25	mov	r11d,DWORD[8+r11]
26	test	r10d,512
27	jnz	NEAR $L$ssse3_shortcut
28	push	rbx
29	push	rbp
30	push	r12
31	push	r13
32	push	r14
33	push	r15
34	mov	r11,rsp
35	shl	rdx,4
36	sub	rsp,16*4+4*8
37	lea	rdx,[rdx*4+rsi]
38	and	rsp,-64
39	mov	QWORD[((64+0))+rsp],rdi
40	mov	QWORD[((64+8))+rsp],rsi
41	mov	QWORD[((64+16))+rsp],rdx
42	mov	QWORD[((64+24))+rsp],r11
43$L$prologue:
44
45	mov	eax,DWORD[rdi]
46	mov	ebx,DWORD[4+rdi]
47	mov	ecx,DWORD[8+rdi]
48	mov	edx,DWORD[12+rdi]
49	mov	r8d,DWORD[16+rdi]
50	mov	r9d,DWORD[20+rdi]
51	mov	r10d,DWORD[24+rdi]
52	mov	r11d,DWORD[28+rdi]
53	jmp	NEAR $L$loop
54
55ALIGN	16
56$L$loop:
57	mov	edi,ebx
58	lea	rbp,[K256]
59	xor	edi,ecx
60	mov	r12d,DWORD[rsi]
61	mov	r13d,r8d
62	mov	r14d,eax
63	bswap	r12d
64	ror	r13d,14
65	mov	r15d,r9d
66
67	xor	r13d,r8d
68	ror	r14d,9
69	xor	r15d,r10d
70
71	mov	DWORD[rsp],r12d
72	xor	r14d,eax
73	and	r15d,r8d
74
75	ror	r13d,5
76	add	r12d,r11d
77	xor	r15d,r10d
78
79	ror	r14d,11
80	xor	r13d,r8d
81	add	r12d,r15d
82
83	mov	r15d,eax
84	add	r12d,DWORD[rbp]
85	xor	r14d,eax
86
87	xor	r15d,ebx
88	ror	r13d,6
89	mov	r11d,ebx
90
91	and	edi,r15d
92	ror	r14d,2
93	add	r12d,r13d
94
95	xor	r11d,edi
96	add	edx,r12d
97	add	r11d,r12d
98
99	lea	rbp,[4+rbp]
100	add	r11d,r14d
101	mov	r12d,DWORD[4+rsi]
102	mov	r13d,edx
103	mov	r14d,r11d
104	bswap	r12d
105	ror	r13d,14
106	mov	edi,r8d
107
108	xor	r13d,edx
109	ror	r14d,9
110	xor	edi,r9d
111
112	mov	DWORD[4+rsp],r12d
113	xor	r14d,r11d
114	and	edi,edx
115
116	ror	r13d,5
117	add	r12d,r10d
118	xor	edi,r9d
119
120	ror	r14d,11
121	xor	r13d,edx
122	add	r12d,edi
123
124	mov	edi,r11d
125	add	r12d,DWORD[rbp]
126	xor	r14d,r11d
127
128	xor	edi,eax
129	ror	r13d,6
130	mov	r10d,eax
131
132	and	r15d,edi
133	ror	r14d,2
134	add	r12d,r13d
135
136	xor	r10d,r15d
137	add	ecx,r12d
138	add	r10d,r12d
139
140	lea	rbp,[4+rbp]
141	add	r10d,r14d
142	mov	r12d,DWORD[8+rsi]
143	mov	r13d,ecx
144	mov	r14d,r10d
145	bswap	r12d
146	ror	r13d,14
147	mov	r15d,edx
148
149	xor	r13d,ecx
150	ror	r14d,9
151	xor	r15d,r8d
152
153	mov	DWORD[8+rsp],r12d
154	xor	r14d,r10d
155	and	r15d,ecx
156
157	ror	r13d,5
158	add	r12d,r9d
159	xor	r15d,r8d
160
161	ror	r14d,11
162	xor	r13d,ecx
163	add	r12d,r15d
164
165	mov	r15d,r10d
166	add	r12d,DWORD[rbp]
167	xor	r14d,r10d
168
169	xor	r15d,r11d
170	ror	r13d,6
171	mov	r9d,r11d
172
173	and	edi,r15d
174	ror	r14d,2
175	add	r12d,r13d
176
177	xor	r9d,edi
178	add	ebx,r12d
179	add	r9d,r12d
180
181	lea	rbp,[4+rbp]
182	add	r9d,r14d
183	mov	r12d,DWORD[12+rsi]
184	mov	r13d,ebx
185	mov	r14d,r9d
186	bswap	r12d
187	ror	r13d,14
188	mov	edi,ecx
189
190	xor	r13d,ebx
191	ror	r14d,9
192	xor	edi,edx
193
194	mov	DWORD[12+rsp],r12d
195	xor	r14d,r9d
196	and	edi,ebx
197
198	ror	r13d,5
199	add	r12d,r8d
200	xor	edi,edx
201
202	ror	r14d,11
203	xor	r13d,ebx
204	add	r12d,edi
205
206	mov	edi,r9d
207	add	r12d,DWORD[rbp]
208	xor	r14d,r9d
209
210	xor	edi,r10d
211	ror	r13d,6
212	mov	r8d,r10d
213
214	and	r15d,edi
215	ror	r14d,2
216	add	r12d,r13d
217
218	xor	r8d,r15d
219	add	eax,r12d
220	add	r8d,r12d
221
222	lea	rbp,[20+rbp]
223	add	r8d,r14d
224	mov	r12d,DWORD[16+rsi]
225	mov	r13d,eax
226	mov	r14d,r8d
227	bswap	r12d
228	ror	r13d,14
229	mov	r15d,ebx
230
231	xor	r13d,eax
232	ror	r14d,9
233	xor	r15d,ecx
234
235	mov	DWORD[16+rsp],r12d
236	xor	r14d,r8d
237	and	r15d,eax
238
239	ror	r13d,5
240	add	r12d,edx
241	xor	r15d,ecx
242
243	ror	r14d,11
244	xor	r13d,eax
245	add	r12d,r15d
246
247	mov	r15d,r8d
248	add	r12d,DWORD[rbp]
249	xor	r14d,r8d
250
251	xor	r15d,r9d
252	ror	r13d,6
253	mov	edx,r9d
254
255	and	edi,r15d
256	ror	r14d,2
257	add	r12d,r13d
258
259	xor	edx,edi
260	add	r11d,r12d
261	add	edx,r12d
262
263	lea	rbp,[4+rbp]
264	add	edx,r14d
265	mov	r12d,DWORD[20+rsi]
266	mov	r13d,r11d
267	mov	r14d,edx
268	bswap	r12d
269	ror	r13d,14
270	mov	edi,eax
271
272	xor	r13d,r11d
273	ror	r14d,9
274	xor	edi,ebx
275
276	mov	DWORD[20+rsp],r12d
277	xor	r14d,edx
278	and	edi,r11d
279
280	ror	r13d,5
281	add	r12d,ecx
282	xor	edi,ebx
283
284	ror	r14d,11
285	xor	r13d,r11d
286	add	r12d,edi
287
288	mov	edi,edx
289	add	r12d,DWORD[rbp]
290	xor	r14d,edx
291
292	xor	edi,r8d
293	ror	r13d,6
294	mov	ecx,r8d
295
296	and	r15d,edi
297	ror	r14d,2
298	add	r12d,r13d
299
300	xor	ecx,r15d
301	add	r10d,r12d
302	add	ecx,r12d
303
304	lea	rbp,[4+rbp]
305	add	ecx,r14d
306	mov	r12d,DWORD[24+rsi]
307	mov	r13d,r10d
308	mov	r14d,ecx
309	bswap	r12d
310	ror	r13d,14
311	mov	r15d,r11d
312
313	xor	r13d,r10d
314	ror	r14d,9
315	xor	r15d,eax
316
317	mov	DWORD[24+rsp],r12d
318	xor	r14d,ecx
319	and	r15d,r10d
320
321	ror	r13d,5
322	add	r12d,ebx
323	xor	r15d,eax
324
325	ror	r14d,11
326	xor	r13d,r10d
327	add	r12d,r15d
328
329	mov	r15d,ecx
330	add	r12d,DWORD[rbp]
331	xor	r14d,ecx
332
333	xor	r15d,edx
334	ror	r13d,6
335	mov	ebx,edx
336
337	and	edi,r15d
338	ror	r14d,2
339	add	r12d,r13d
340
341	xor	ebx,edi
342	add	r9d,r12d
343	add	ebx,r12d
344
345	lea	rbp,[4+rbp]
346	add	ebx,r14d
347	mov	r12d,DWORD[28+rsi]
348	mov	r13d,r9d
349	mov	r14d,ebx
350	bswap	r12d
351	ror	r13d,14
352	mov	edi,r10d
353
354	xor	r13d,r9d
355	ror	r14d,9
356	xor	edi,r11d
357
358	mov	DWORD[28+rsp],r12d
359	xor	r14d,ebx
360	and	edi,r9d
361
362	ror	r13d,5
363	add	r12d,eax
364	xor	edi,r11d
365
366	ror	r14d,11
367	xor	r13d,r9d
368	add	r12d,edi
369
370	mov	edi,ebx
371	add	r12d,DWORD[rbp]
372	xor	r14d,ebx
373
374	xor	edi,ecx
375	ror	r13d,6
376	mov	eax,ecx
377
378	and	r15d,edi
379	ror	r14d,2
380	add	r12d,r13d
381
382	xor	eax,r15d
383	add	r8d,r12d
384	add	eax,r12d
385
386	lea	rbp,[20+rbp]
387	add	eax,r14d
388	mov	r12d,DWORD[32+rsi]
389	mov	r13d,r8d
390	mov	r14d,eax
391	bswap	r12d
392	ror	r13d,14
393	mov	r15d,r9d
394
395	xor	r13d,r8d
396	ror	r14d,9
397	xor	r15d,r10d
398
399	mov	DWORD[32+rsp],r12d
400	xor	r14d,eax
401	and	r15d,r8d
402
403	ror	r13d,5
404	add	r12d,r11d
405	xor	r15d,r10d
406
407	ror	r14d,11
408	xor	r13d,r8d
409	add	r12d,r15d
410
411	mov	r15d,eax
412	add	r12d,DWORD[rbp]
413	xor	r14d,eax
414
415	xor	r15d,ebx
416	ror	r13d,6
417	mov	r11d,ebx
418
419	and	edi,r15d
420	ror	r14d,2
421	add	r12d,r13d
422
423	xor	r11d,edi
424	add	edx,r12d
425	add	r11d,r12d
426
427	lea	rbp,[4+rbp]
428	add	r11d,r14d
429	mov	r12d,DWORD[36+rsi]
430	mov	r13d,edx
431	mov	r14d,r11d
432	bswap	r12d
433	ror	r13d,14
434	mov	edi,r8d
435
436	xor	r13d,edx
437	ror	r14d,9
438	xor	edi,r9d
439
440	mov	DWORD[36+rsp],r12d
441	xor	r14d,r11d
442	and	edi,edx
443
444	ror	r13d,5
445	add	r12d,r10d
446	xor	edi,r9d
447
448	ror	r14d,11
449	xor	r13d,edx
450	add	r12d,edi
451
452	mov	edi,r11d
453	add	r12d,DWORD[rbp]
454	xor	r14d,r11d
455
456	xor	edi,eax
457	ror	r13d,6
458	mov	r10d,eax
459
460	and	r15d,edi
461	ror	r14d,2
462	add	r12d,r13d
463
464	xor	r10d,r15d
465	add	ecx,r12d
466	add	r10d,r12d
467
468	lea	rbp,[4+rbp]
469	add	r10d,r14d
470	mov	r12d,DWORD[40+rsi]
471	mov	r13d,ecx
472	mov	r14d,r10d
473	bswap	r12d
474	ror	r13d,14
475	mov	r15d,edx
476
477	xor	r13d,ecx
478	ror	r14d,9
479	xor	r15d,r8d
480
481	mov	DWORD[40+rsp],r12d
482	xor	r14d,r10d
483	and	r15d,ecx
484
485	ror	r13d,5
486	add	r12d,r9d
487	xor	r15d,r8d
488
489	ror	r14d,11
490	xor	r13d,ecx
491	add	r12d,r15d
492
493	mov	r15d,r10d
494	add	r12d,DWORD[rbp]
495	xor	r14d,r10d
496
497	xor	r15d,r11d
498	ror	r13d,6
499	mov	r9d,r11d
500
501	and	edi,r15d
502	ror	r14d,2
503	add	r12d,r13d
504
505	xor	r9d,edi
506	add	ebx,r12d
507	add	r9d,r12d
508
509	lea	rbp,[4+rbp]
510	add	r9d,r14d
511	mov	r12d,DWORD[44+rsi]
512	mov	r13d,ebx
513	mov	r14d,r9d
514	bswap	r12d
515	ror	r13d,14
516	mov	edi,ecx
517
518	xor	r13d,ebx
519	ror	r14d,9
520	xor	edi,edx
521
522	mov	DWORD[44+rsp],r12d
523	xor	r14d,r9d
524	and	edi,ebx
525
526	ror	r13d,5
527	add	r12d,r8d
528	xor	edi,edx
529
530	ror	r14d,11
531	xor	r13d,ebx
532	add	r12d,edi
533
534	mov	edi,r9d
535	add	r12d,DWORD[rbp]
536	xor	r14d,r9d
537
538	xor	edi,r10d
539	ror	r13d,6
540	mov	r8d,r10d
541
542	and	r15d,edi
543	ror	r14d,2
544	add	r12d,r13d
545
546	xor	r8d,r15d
547	add	eax,r12d
548	add	r8d,r12d
549
550	lea	rbp,[20+rbp]
551	add	r8d,r14d
552	mov	r12d,DWORD[48+rsi]
553	mov	r13d,eax
554	mov	r14d,r8d
555	bswap	r12d
556	ror	r13d,14
557	mov	r15d,ebx
558
559	xor	r13d,eax
560	ror	r14d,9
561	xor	r15d,ecx
562
563	mov	DWORD[48+rsp],r12d
564	xor	r14d,r8d
565	and	r15d,eax
566
567	ror	r13d,5
568	add	r12d,edx
569	xor	r15d,ecx
570
571	ror	r14d,11
572	xor	r13d,eax
573	add	r12d,r15d
574
575	mov	r15d,r8d
576	add	r12d,DWORD[rbp]
577	xor	r14d,r8d
578
579	xor	r15d,r9d
580	ror	r13d,6
581	mov	edx,r9d
582
583	and	edi,r15d
584	ror	r14d,2
585	add	r12d,r13d
586
587	xor	edx,edi
588	add	r11d,r12d
589	add	edx,r12d
590
591	lea	rbp,[4+rbp]
592	add	edx,r14d
593	mov	r12d,DWORD[52+rsi]
594	mov	r13d,r11d
595	mov	r14d,edx
596	bswap	r12d
597	ror	r13d,14
598	mov	edi,eax
599
600	xor	r13d,r11d
601	ror	r14d,9
602	xor	edi,ebx
603
604	mov	DWORD[52+rsp],r12d
605	xor	r14d,edx
606	and	edi,r11d
607
608	ror	r13d,5
609	add	r12d,ecx
610	xor	edi,ebx
611
612	ror	r14d,11
613	xor	r13d,r11d
614	add	r12d,edi
615
616	mov	edi,edx
617	add	r12d,DWORD[rbp]
618	xor	r14d,edx
619
620	xor	edi,r8d
621	ror	r13d,6
622	mov	ecx,r8d
623
624	and	r15d,edi
625	ror	r14d,2
626	add	r12d,r13d
627
628	xor	ecx,r15d
629	add	r10d,r12d
630	add	ecx,r12d
631
632	lea	rbp,[4+rbp]
633	add	ecx,r14d
634	mov	r12d,DWORD[56+rsi]
635	mov	r13d,r10d
636	mov	r14d,ecx
637	bswap	r12d
638	ror	r13d,14
639	mov	r15d,r11d
640
641	xor	r13d,r10d
642	ror	r14d,9
643	xor	r15d,eax
644
645	mov	DWORD[56+rsp],r12d
646	xor	r14d,ecx
647	and	r15d,r10d
648
649	ror	r13d,5
650	add	r12d,ebx
651	xor	r15d,eax
652
653	ror	r14d,11
654	xor	r13d,r10d
655	add	r12d,r15d
656
657	mov	r15d,ecx
658	add	r12d,DWORD[rbp]
659	xor	r14d,ecx
660
661	xor	r15d,edx
662	ror	r13d,6
663	mov	ebx,edx
664
665	and	edi,r15d
666	ror	r14d,2
667	add	r12d,r13d
668
669	xor	ebx,edi
670	add	r9d,r12d
671	add	ebx,r12d
672
673	lea	rbp,[4+rbp]
674	add	ebx,r14d
675	mov	r12d,DWORD[60+rsi]
676	mov	r13d,r9d
677	mov	r14d,ebx
678	bswap	r12d
679	ror	r13d,14
680	mov	edi,r10d
681
682	xor	r13d,r9d
683	ror	r14d,9
684	xor	edi,r11d
685
686	mov	DWORD[60+rsp],r12d
687	xor	r14d,ebx
688	and	edi,r9d
689
690	ror	r13d,5
691	add	r12d,eax
692	xor	edi,r11d
693
694	ror	r14d,11
695	xor	r13d,r9d
696	add	r12d,edi
697
698	mov	edi,ebx
699	add	r12d,DWORD[rbp]
700	xor	r14d,ebx
701
702	xor	edi,ecx
703	ror	r13d,6
704	mov	eax,ecx
705
706	and	r15d,edi
707	ror	r14d,2
708	add	r12d,r13d
709
710	xor	eax,r15d
711	add	r8d,r12d
712	add	eax,r12d
713
714	lea	rbp,[20+rbp]
715	jmp	NEAR $L$rounds_16_xx
716ALIGN	16
717$L$rounds_16_xx:
718	mov	r13d,DWORD[4+rsp]
719	mov	r15d,DWORD[56+rsp]
720
721	mov	r12d,r13d
722	ror	r13d,11
723	add	eax,r14d
724	mov	r14d,r15d
725	ror	r15d,2
726
727	xor	r13d,r12d
728	shr	r12d,3
729	ror	r13d,7
730	xor	r15d,r14d
731	shr	r14d,10
732
733	ror	r15d,17
734	xor	r12d,r13d
735	xor	r15d,r14d
736	add	r12d,DWORD[36+rsp]
737
738	add	r12d,DWORD[rsp]
739	mov	r13d,r8d
740	add	r12d,r15d
741	mov	r14d,eax
742	ror	r13d,14
743	mov	r15d,r9d
744
745	xor	r13d,r8d
746	ror	r14d,9
747	xor	r15d,r10d
748
749	mov	DWORD[rsp],r12d
750	xor	r14d,eax
751	and	r15d,r8d
752
753	ror	r13d,5
754	add	r12d,r11d
755	xor	r15d,r10d
756
757	ror	r14d,11
758	xor	r13d,r8d
759	add	r12d,r15d
760
761	mov	r15d,eax
762	add	r12d,DWORD[rbp]
763	xor	r14d,eax
764
765	xor	r15d,ebx
766	ror	r13d,6
767	mov	r11d,ebx
768
769	and	edi,r15d
770	ror	r14d,2
771	add	r12d,r13d
772
773	xor	r11d,edi
774	add	edx,r12d
775	add	r11d,r12d
776
777	lea	rbp,[4+rbp]
778	mov	r13d,DWORD[8+rsp]
779	mov	edi,DWORD[60+rsp]
780
781	mov	r12d,r13d
782	ror	r13d,11
783	add	r11d,r14d
784	mov	r14d,edi
785	ror	edi,2
786
787	xor	r13d,r12d
788	shr	r12d,3
789	ror	r13d,7
790	xor	edi,r14d
791	shr	r14d,10
792
793	ror	edi,17
794	xor	r12d,r13d
795	xor	edi,r14d
796	add	r12d,DWORD[40+rsp]
797
798	add	r12d,DWORD[4+rsp]
799	mov	r13d,edx
800	add	r12d,edi
801	mov	r14d,r11d
802	ror	r13d,14
803	mov	edi,r8d
804
805	xor	r13d,edx
806	ror	r14d,9
807	xor	edi,r9d
808
809	mov	DWORD[4+rsp],r12d
810	xor	r14d,r11d
811	and	edi,edx
812
813	ror	r13d,5
814	add	r12d,r10d
815	xor	edi,r9d
816
817	ror	r14d,11
818	xor	r13d,edx
819	add	r12d,edi
820
821	mov	edi,r11d
822	add	r12d,DWORD[rbp]
823	xor	r14d,r11d
824
825	xor	edi,eax
826	ror	r13d,6
827	mov	r10d,eax
828
829	and	r15d,edi
830	ror	r14d,2
831	add	r12d,r13d
832
833	xor	r10d,r15d
834	add	ecx,r12d
835	add	r10d,r12d
836
837	lea	rbp,[4+rbp]
838	mov	r13d,DWORD[12+rsp]
839	mov	r15d,DWORD[rsp]
840
841	mov	r12d,r13d
842	ror	r13d,11
843	add	r10d,r14d
844	mov	r14d,r15d
845	ror	r15d,2
846
847	xor	r13d,r12d
848	shr	r12d,3
849	ror	r13d,7
850	xor	r15d,r14d
851	shr	r14d,10
852
853	ror	r15d,17
854	xor	r12d,r13d
855	xor	r15d,r14d
856	add	r12d,DWORD[44+rsp]
857
858	add	r12d,DWORD[8+rsp]
859	mov	r13d,ecx
860	add	r12d,r15d
861	mov	r14d,r10d
862	ror	r13d,14
863	mov	r15d,edx
864
865	xor	r13d,ecx
866	ror	r14d,9
867	xor	r15d,r8d
868
869	mov	DWORD[8+rsp],r12d
870	xor	r14d,r10d
871	and	r15d,ecx
872
873	ror	r13d,5
874	add	r12d,r9d
875	xor	r15d,r8d
876
877	ror	r14d,11
878	xor	r13d,ecx
879	add	r12d,r15d
880
881	mov	r15d,r10d
882	add	r12d,DWORD[rbp]
883	xor	r14d,r10d
884
885	xor	r15d,r11d
886	ror	r13d,6
887	mov	r9d,r11d
888
889	and	edi,r15d
890	ror	r14d,2
891	add	r12d,r13d
892
893	xor	r9d,edi
894	add	ebx,r12d
895	add	r9d,r12d
896
897	lea	rbp,[4+rbp]
898	mov	r13d,DWORD[16+rsp]
899	mov	edi,DWORD[4+rsp]
900
901	mov	r12d,r13d
902	ror	r13d,11
903	add	r9d,r14d
904	mov	r14d,edi
905	ror	edi,2
906
907	xor	r13d,r12d
908	shr	r12d,3
909	ror	r13d,7
910	xor	edi,r14d
911	shr	r14d,10
912
913	ror	edi,17
914	xor	r12d,r13d
915	xor	edi,r14d
916	add	r12d,DWORD[48+rsp]
917
918	add	r12d,DWORD[12+rsp]
919	mov	r13d,ebx
920	add	r12d,edi
921	mov	r14d,r9d
922	ror	r13d,14
923	mov	edi,ecx
924
925	xor	r13d,ebx
926	ror	r14d,9
927	xor	edi,edx
928
929	mov	DWORD[12+rsp],r12d
930	xor	r14d,r9d
931	and	edi,ebx
932
933	ror	r13d,5
934	add	r12d,r8d
935	xor	edi,edx
936
937	ror	r14d,11
938	xor	r13d,ebx
939	add	r12d,edi
940
941	mov	edi,r9d
942	add	r12d,DWORD[rbp]
943	xor	r14d,r9d
944
945	xor	edi,r10d
946	ror	r13d,6
947	mov	r8d,r10d
948
949	and	r15d,edi
950	ror	r14d,2
951	add	r12d,r13d
952
953	xor	r8d,r15d
954	add	eax,r12d
955	add	r8d,r12d
956
957	lea	rbp,[20+rbp]
958	mov	r13d,DWORD[20+rsp]
959	mov	r15d,DWORD[8+rsp]
960
961	mov	r12d,r13d
962	ror	r13d,11
963	add	r8d,r14d
964	mov	r14d,r15d
965	ror	r15d,2
966
967	xor	r13d,r12d
968	shr	r12d,3
969	ror	r13d,7
970	xor	r15d,r14d
971	shr	r14d,10
972
973	ror	r15d,17
974	xor	r12d,r13d
975	xor	r15d,r14d
976	add	r12d,DWORD[52+rsp]
977
978	add	r12d,DWORD[16+rsp]
979	mov	r13d,eax
980	add	r12d,r15d
981	mov	r14d,r8d
982	ror	r13d,14
983	mov	r15d,ebx
984
985	xor	r13d,eax
986	ror	r14d,9
987	xor	r15d,ecx
988
989	mov	DWORD[16+rsp],r12d
990	xor	r14d,r8d
991	and	r15d,eax
992
993	ror	r13d,5
994	add	r12d,edx
995	xor	r15d,ecx
996
997	ror	r14d,11
998	xor	r13d,eax
999	add	r12d,r15d
1000
1001	mov	r15d,r8d
1002	add	r12d,DWORD[rbp]
1003	xor	r14d,r8d
1004
1005	xor	r15d,r9d
1006	ror	r13d,6
1007	mov	edx,r9d
1008
1009	and	edi,r15d
1010	ror	r14d,2
1011	add	r12d,r13d
1012
1013	xor	edx,edi
1014	add	r11d,r12d
1015	add	edx,r12d
1016
1017	lea	rbp,[4+rbp]
1018	mov	r13d,DWORD[24+rsp]
1019	mov	edi,DWORD[12+rsp]
1020
1021	mov	r12d,r13d
1022	ror	r13d,11
1023	add	edx,r14d
1024	mov	r14d,edi
1025	ror	edi,2
1026
1027	xor	r13d,r12d
1028	shr	r12d,3
1029	ror	r13d,7
1030	xor	edi,r14d
1031	shr	r14d,10
1032
1033	ror	edi,17
1034	xor	r12d,r13d
1035	xor	edi,r14d
1036	add	r12d,DWORD[56+rsp]
1037
1038	add	r12d,DWORD[20+rsp]
1039	mov	r13d,r11d
1040	add	r12d,edi
1041	mov	r14d,edx
1042	ror	r13d,14
1043	mov	edi,eax
1044
1045	xor	r13d,r11d
1046	ror	r14d,9
1047	xor	edi,ebx
1048
1049	mov	DWORD[20+rsp],r12d
1050	xor	r14d,edx
1051	and	edi,r11d
1052
1053	ror	r13d,5
1054	add	r12d,ecx
1055	xor	edi,ebx
1056
1057	ror	r14d,11
1058	xor	r13d,r11d
1059	add	r12d,edi
1060
1061	mov	edi,edx
1062	add	r12d,DWORD[rbp]
1063	xor	r14d,edx
1064
1065	xor	edi,r8d
1066	ror	r13d,6
1067	mov	ecx,r8d
1068
1069	and	r15d,edi
1070	ror	r14d,2
1071	add	r12d,r13d
1072
1073	xor	ecx,r15d
1074	add	r10d,r12d
1075	add	ecx,r12d
1076
1077	lea	rbp,[4+rbp]
1078	mov	r13d,DWORD[28+rsp]
1079	mov	r15d,DWORD[16+rsp]
1080
1081	mov	r12d,r13d
1082	ror	r13d,11
1083	add	ecx,r14d
1084	mov	r14d,r15d
1085	ror	r15d,2
1086
1087	xor	r13d,r12d
1088	shr	r12d,3
1089	ror	r13d,7
1090	xor	r15d,r14d
1091	shr	r14d,10
1092
1093	ror	r15d,17
1094	xor	r12d,r13d
1095	xor	r15d,r14d
1096	add	r12d,DWORD[60+rsp]
1097
1098	add	r12d,DWORD[24+rsp]
1099	mov	r13d,r10d
1100	add	r12d,r15d
1101	mov	r14d,ecx
1102	ror	r13d,14
1103	mov	r15d,r11d
1104
1105	xor	r13d,r10d
1106	ror	r14d,9
1107	xor	r15d,eax
1108
1109	mov	DWORD[24+rsp],r12d
1110	xor	r14d,ecx
1111	and	r15d,r10d
1112
1113	ror	r13d,5
1114	add	r12d,ebx
1115	xor	r15d,eax
1116
1117	ror	r14d,11
1118	xor	r13d,r10d
1119	add	r12d,r15d
1120
1121	mov	r15d,ecx
1122	add	r12d,DWORD[rbp]
1123	xor	r14d,ecx
1124
1125	xor	r15d,edx
1126	ror	r13d,6
1127	mov	ebx,edx
1128
1129	and	edi,r15d
1130	ror	r14d,2
1131	add	r12d,r13d
1132
1133	xor	ebx,edi
1134	add	r9d,r12d
1135	add	ebx,r12d
1136
1137	lea	rbp,[4+rbp]
1138	mov	r13d,DWORD[32+rsp]
1139	mov	edi,DWORD[20+rsp]
1140
1141	mov	r12d,r13d
1142	ror	r13d,11
1143	add	ebx,r14d
1144	mov	r14d,edi
1145	ror	edi,2
1146
1147	xor	r13d,r12d
1148	shr	r12d,3
1149	ror	r13d,7
1150	xor	edi,r14d
1151	shr	r14d,10
1152
1153	ror	edi,17
1154	xor	r12d,r13d
1155	xor	edi,r14d
1156	add	r12d,DWORD[rsp]
1157
1158	add	r12d,DWORD[28+rsp]
1159	mov	r13d,r9d
1160	add	r12d,edi
1161	mov	r14d,ebx
1162	ror	r13d,14
1163	mov	edi,r10d
1164
1165	xor	r13d,r9d
1166	ror	r14d,9
1167	xor	edi,r11d
1168
1169	mov	DWORD[28+rsp],r12d
1170	xor	r14d,ebx
1171	and	edi,r9d
1172
1173	ror	r13d,5
1174	add	r12d,eax
1175	xor	edi,r11d
1176
1177	ror	r14d,11
1178	xor	r13d,r9d
1179	add	r12d,edi
1180
1181	mov	edi,ebx
1182	add	r12d,DWORD[rbp]
1183	xor	r14d,ebx
1184
1185	xor	edi,ecx
1186	ror	r13d,6
1187	mov	eax,ecx
1188
1189	and	r15d,edi
1190	ror	r14d,2
1191	add	r12d,r13d
1192
1193	xor	eax,r15d
1194	add	r8d,r12d
1195	add	eax,r12d
1196
1197	lea	rbp,[20+rbp]
1198	mov	r13d,DWORD[36+rsp]
1199	mov	r15d,DWORD[24+rsp]
1200
1201	mov	r12d,r13d
1202	ror	r13d,11
1203	add	eax,r14d
1204	mov	r14d,r15d
1205	ror	r15d,2
1206
1207	xor	r13d,r12d
1208	shr	r12d,3
1209	ror	r13d,7
1210	xor	r15d,r14d
1211	shr	r14d,10
1212
1213	ror	r15d,17
1214	xor	r12d,r13d
1215	xor	r15d,r14d
1216	add	r12d,DWORD[4+rsp]
1217
1218	add	r12d,DWORD[32+rsp]
1219	mov	r13d,r8d
1220	add	r12d,r15d
1221	mov	r14d,eax
1222	ror	r13d,14
1223	mov	r15d,r9d
1224
1225	xor	r13d,r8d
1226	ror	r14d,9
1227	xor	r15d,r10d
1228
1229	mov	DWORD[32+rsp],r12d
1230	xor	r14d,eax
1231	and	r15d,r8d
1232
1233	ror	r13d,5
1234	add	r12d,r11d
1235	xor	r15d,r10d
1236
1237	ror	r14d,11
1238	xor	r13d,r8d
1239	add	r12d,r15d
1240
1241	mov	r15d,eax
1242	add	r12d,DWORD[rbp]
1243	xor	r14d,eax
1244
1245	xor	r15d,ebx
1246	ror	r13d,6
1247	mov	r11d,ebx
1248
1249	and	edi,r15d
1250	ror	r14d,2
1251	add	r12d,r13d
1252
1253	xor	r11d,edi
1254	add	edx,r12d
1255	add	r11d,r12d
1256
1257	lea	rbp,[4+rbp]
1258	mov	r13d,DWORD[40+rsp]
1259	mov	edi,DWORD[28+rsp]
1260
1261	mov	r12d,r13d
1262	ror	r13d,11
1263	add	r11d,r14d
1264	mov	r14d,edi
1265	ror	edi,2
1266
1267	xor	r13d,r12d
1268	shr	r12d,3
1269	ror	r13d,7
1270	xor	edi,r14d
1271	shr	r14d,10
1272
1273	ror	edi,17
1274	xor	r12d,r13d
1275	xor	edi,r14d
1276	add	r12d,DWORD[8+rsp]
1277
1278	add	r12d,DWORD[36+rsp]
1279	mov	r13d,edx
1280	add	r12d,edi
1281	mov	r14d,r11d
1282	ror	r13d,14
1283	mov	edi,r8d
1284
1285	xor	r13d,edx
1286	ror	r14d,9
1287	xor	edi,r9d
1288
1289	mov	DWORD[36+rsp],r12d
1290	xor	r14d,r11d
1291	and	edi,edx
1292
1293	ror	r13d,5
1294	add	r12d,r10d
1295	xor	edi,r9d
1296
1297	ror	r14d,11
1298	xor	r13d,edx
1299	add	r12d,edi
1300
1301	mov	edi,r11d
1302	add	r12d,DWORD[rbp]
1303	xor	r14d,r11d
1304
1305	xor	edi,eax
1306	ror	r13d,6
1307	mov	r10d,eax
1308
1309	and	r15d,edi
1310	ror	r14d,2
1311	add	r12d,r13d
1312
1313	xor	r10d,r15d
1314	add	ecx,r12d
1315	add	r10d,r12d
1316
1317	lea	rbp,[4+rbp]
1318	mov	r13d,DWORD[44+rsp]
1319	mov	r15d,DWORD[32+rsp]
1320
1321	mov	r12d,r13d
1322	ror	r13d,11
1323	add	r10d,r14d
1324	mov	r14d,r15d
1325	ror	r15d,2
1326
1327	xor	r13d,r12d
1328	shr	r12d,3
1329	ror	r13d,7
1330	xor	r15d,r14d
1331	shr	r14d,10
1332
1333	ror	r15d,17
1334	xor	r12d,r13d
1335	xor	r15d,r14d
1336	add	r12d,DWORD[12+rsp]
1337
1338	add	r12d,DWORD[40+rsp]
1339	mov	r13d,ecx
1340	add	r12d,r15d
1341	mov	r14d,r10d
1342	ror	r13d,14
1343	mov	r15d,edx
1344
1345	xor	r13d,ecx
1346	ror	r14d,9
1347	xor	r15d,r8d
1348
1349	mov	DWORD[40+rsp],r12d
1350	xor	r14d,r10d
1351	and	r15d,ecx
1352
1353	ror	r13d,5
1354	add	r12d,r9d
1355	xor	r15d,r8d
1356
1357	ror	r14d,11
1358	xor	r13d,ecx
1359	add	r12d,r15d
1360
1361	mov	r15d,r10d
1362	add	r12d,DWORD[rbp]
1363	xor	r14d,r10d
1364
1365	xor	r15d,r11d
1366	ror	r13d,6
1367	mov	r9d,r11d
1368
1369	and	edi,r15d
1370	ror	r14d,2
1371	add	r12d,r13d
1372
1373	xor	r9d,edi
1374	add	ebx,r12d
1375	add	r9d,r12d
1376
1377	lea	rbp,[4+rbp]
1378	mov	r13d,DWORD[48+rsp]
1379	mov	edi,DWORD[36+rsp]
1380
1381	mov	r12d,r13d
1382	ror	r13d,11
1383	add	r9d,r14d
1384	mov	r14d,edi
1385	ror	edi,2
1386
1387	xor	r13d,r12d
1388	shr	r12d,3
1389	ror	r13d,7
1390	xor	edi,r14d
1391	shr	r14d,10
1392
1393	ror	edi,17
1394	xor	r12d,r13d
1395	xor	edi,r14d
1396	add	r12d,DWORD[16+rsp]
1397
1398	add	r12d,DWORD[44+rsp]
1399	mov	r13d,ebx
1400	add	r12d,edi
1401	mov	r14d,r9d
1402	ror	r13d,14
1403	mov	edi,ecx
1404
1405	xor	r13d,ebx
1406	ror	r14d,9
1407	xor	edi,edx
1408
1409	mov	DWORD[44+rsp],r12d
1410	xor	r14d,r9d
1411	and	edi,ebx
1412
1413	ror	r13d,5
1414	add	r12d,r8d
1415	xor	edi,edx
1416
1417	ror	r14d,11
1418	xor	r13d,ebx
1419	add	r12d,edi
1420
1421	mov	edi,r9d
1422	add	r12d,DWORD[rbp]
1423	xor	r14d,r9d
1424
1425	xor	edi,r10d
1426	ror	r13d,6
1427	mov	r8d,r10d
1428
1429	and	r15d,edi
1430	ror	r14d,2
1431	add	r12d,r13d
1432
1433	xor	r8d,r15d
1434	add	eax,r12d
1435	add	r8d,r12d
1436
1437	lea	rbp,[20+rbp]
1438	mov	r13d,DWORD[52+rsp]
1439	mov	r15d,DWORD[40+rsp]
1440
1441	mov	r12d,r13d
1442	ror	r13d,11
1443	add	r8d,r14d
1444	mov	r14d,r15d
1445	ror	r15d,2
1446
1447	xor	r13d,r12d
1448	shr	r12d,3
1449	ror	r13d,7
1450	xor	r15d,r14d
1451	shr	r14d,10
1452
1453	ror	r15d,17
1454	xor	r12d,r13d
1455	xor	r15d,r14d
1456	add	r12d,DWORD[20+rsp]
1457
1458	add	r12d,DWORD[48+rsp]
1459	mov	r13d,eax
1460	add	r12d,r15d
1461	mov	r14d,r8d
1462	ror	r13d,14
1463	mov	r15d,ebx
1464
1465	xor	r13d,eax
1466	ror	r14d,9
1467	xor	r15d,ecx
1468
1469	mov	DWORD[48+rsp],r12d
1470	xor	r14d,r8d
1471	and	r15d,eax
1472
1473	ror	r13d,5
1474	add	r12d,edx
1475	xor	r15d,ecx
1476
1477	ror	r14d,11
1478	xor	r13d,eax
1479	add	r12d,r15d
1480
1481	mov	r15d,r8d
1482	add	r12d,DWORD[rbp]
1483	xor	r14d,r8d
1484
1485	xor	r15d,r9d
1486	ror	r13d,6
1487	mov	edx,r9d
1488
1489	and	edi,r15d
1490	ror	r14d,2
1491	add	r12d,r13d
1492
1493	xor	edx,edi
1494	add	r11d,r12d
1495	add	edx,r12d
1496
1497	lea	rbp,[4+rbp]
1498	mov	r13d,DWORD[56+rsp]
1499	mov	edi,DWORD[44+rsp]
1500
1501	mov	r12d,r13d
1502	ror	r13d,11
1503	add	edx,r14d
1504	mov	r14d,edi
1505	ror	edi,2
1506
1507	xor	r13d,r12d
1508	shr	r12d,3
1509	ror	r13d,7
1510	xor	edi,r14d
1511	shr	r14d,10
1512
1513	ror	edi,17
1514	xor	r12d,r13d
1515	xor	edi,r14d
1516	add	r12d,DWORD[24+rsp]
1517
1518	add	r12d,DWORD[52+rsp]
1519	mov	r13d,r11d
1520	add	r12d,edi
1521	mov	r14d,edx
1522	ror	r13d,14
1523	mov	edi,eax
1524
1525	xor	r13d,r11d
1526	ror	r14d,9
1527	xor	edi,ebx
1528
1529	mov	DWORD[52+rsp],r12d
1530	xor	r14d,edx
1531	and	edi,r11d
1532
1533	ror	r13d,5
1534	add	r12d,ecx
1535	xor	edi,ebx
1536
1537	ror	r14d,11
1538	xor	r13d,r11d
1539	add	r12d,edi
1540
1541	mov	edi,edx
1542	add	r12d,DWORD[rbp]
1543	xor	r14d,edx
1544
1545	xor	edi,r8d
1546	ror	r13d,6
1547	mov	ecx,r8d
1548
1549	and	r15d,edi
1550	ror	r14d,2
1551	add	r12d,r13d
1552
1553	xor	ecx,r15d
1554	add	r10d,r12d
1555	add	ecx,r12d
1556
1557	lea	rbp,[4+rbp]
1558	mov	r13d,DWORD[60+rsp]
1559	mov	r15d,DWORD[48+rsp]
1560
1561	mov	r12d,r13d
1562	ror	r13d,11
1563	add	ecx,r14d
1564	mov	r14d,r15d
1565	ror	r15d,2
1566
1567	xor	r13d,r12d
1568	shr	r12d,3
1569	ror	r13d,7
1570	xor	r15d,r14d
1571	shr	r14d,10
1572
1573	ror	r15d,17
1574	xor	r12d,r13d
1575	xor	r15d,r14d
1576	add	r12d,DWORD[28+rsp]
1577
1578	add	r12d,DWORD[56+rsp]
1579	mov	r13d,r10d
1580	add	r12d,r15d
1581	mov	r14d,ecx
1582	ror	r13d,14
1583	mov	r15d,r11d
1584
1585	xor	r13d,r10d
1586	ror	r14d,9
1587	xor	r15d,eax
1588
1589	mov	DWORD[56+rsp],r12d
1590	xor	r14d,ecx
1591	and	r15d,r10d
1592
1593	ror	r13d,5
1594	add	r12d,ebx
1595	xor	r15d,eax
1596
1597	ror	r14d,11
1598	xor	r13d,r10d
1599	add	r12d,r15d
1600
1601	mov	r15d,ecx
1602	add	r12d,DWORD[rbp]
1603	xor	r14d,ecx
1604
1605	xor	r15d,edx
1606	ror	r13d,6
1607	mov	ebx,edx
1608
1609	and	edi,r15d
1610	ror	r14d,2
1611	add	r12d,r13d
1612
1613	xor	ebx,edi
1614	add	r9d,r12d
1615	add	ebx,r12d
1616
1617	lea	rbp,[4+rbp]
1618	mov	r13d,DWORD[rsp]
1619	mov	edi,DWORD[52+rsp]
1620
1621	mov	r12d,r13d
1622	ror	r13d,11
1623	add	ebx,r14d
1624	mov	r14d,edi
1625	ror	edi,2
1626
1627	xor	r13d,r12d
1628	shr	r12d,3
1629	ror	r13d,7
1630	xor	edi,r14d
1631	shr	r14d,10
1632
1633	ror	edi,17
1634	xor	r12d,r13d
1635	xor	edi,r14d
1636	add	r12d,DWORD[32+rsp]
1637
1638	add	r12d,DWORD[60+rsp]
1639	mov	r13d,r9d
1640	add	r12d,edi
1641	mov	r14d,ebx
1642	ror	r13d,14
1643	mov	edi,r10d
1644
1645	xor	r13d,r9d
1646	ror	r14d,9
1647	xor	edi,r11d
1648
1649	mov	DWORD[60+rsp],r12d
1650	xor	r14d,ebx
1651	and	edi,r9d
1652
1653	ror	r13d,5
1654	add	r12d,eax
1655	xor	edi,r11d
1656
1657	ror	r14d,11
1658	xor	r13d,r9d
1659	add	r12d,edi
1660
1661	mov	edi,ebx
1662	add	r12d,DWORD[rbp]
1663	xor	r14d,ebx
1664
1665	xor	edi,ecx
1666	ror	r13d,6
1667	mov	eax,ecx
1668
1669	and	r15d,edi
1670	ror	r14d,2
1671	add	r12d,r13d
1672
1673	xor	eax,r15d
1674	add	r8d,r12d
1675	add	eax,r12d
1676
1677	lea	rbp,[20+rbp]
1678	cmp	BYTE[3+rbp],0
1679	jnz	NEAR $L$rounds_16_xx
1680
1681	mov	rdi,QWORD[((64+0))+rsp]
1682	add	eax,r14d
1683	lea	rsi,[64+rsi]
1684
1685	add	eax,DWORD[rdi]
1686	add	ebx,DWORD[4+rdi]
1687	add	ecx,DWORD[8+rdi]
1688	add	edx,DWORD[12+rdi]
1689	add	r8d,DWORD[16+rdi]
1690	add	r9d,DWORD[20+rdi]
1691	add	r10d,DWORD[24+rdi]
1692	add	r11d,DWORD[28+rdi]
1693
1694	cmp	rsi,QWORD[((64+16))+rsp]
1695
1696	mov	DWORD[rdi],eax
1697	mov	DWORD[4+rdi],ebx
1698	mov	DWORD[8+rdi],ecx
1699	mov	DWORD[12+rdi],edx
1700	mov	DWORD[16+rdi],r8d
1701	mov	DWORD[20+rdi],r9d
1702	mov	DWORD[24+rdi],r10d
1703	mov	DWORD[28+rdi],r11d
1704	jb	NEAR $L$loop
1705
1706	mov	rsi,QWORD[((64+24))+rsp]
1707	mov	r15,QWORD[rsi]
1708	mov	r14,QWORD[8+rsi]
1709	mov	r13,QWORD[16+rsi]
1710	mov	r12,QWORD[24+rsi]
1711	mov	rbp,QWORD[32+rsi]
1712	mov	rbx,QWORD[40+rsi]
1713	lea	rsp,[48+rsi]
1714$L$epilogue:
1715	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
1716	mov	rsi,QWORD[16+rsp]
1717	DB	0F3h,0C3h		;repret
1718$L$SEH_end_sha256_block_data_order:
1719ALIGN	64
1720
1721K256:
1722	DD	0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5
1723	DD	0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5
1724	DD	0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5
1725	DD	0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5
1726	DD	0xd807aa98,0x12835b01,0x243185be,0x550c7dc3
1727	DD	0xd807aa98,0x12835b01,0x243185be,0x550c7dc3
1728	DD	0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174
1729	DD	0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174
1730	DD	0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc
1731	DD	0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc
1732	DD	0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da
1733	DD	0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da
1734	DD	0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7
1735	DD	0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7
1736	DD	0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967
1737	DD	0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967
1738	DD	0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13
1739	DD	0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13
1740	DD	0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85
1741	DD	0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85
1742	DD	0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3
1743	DD	0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3
1744	DD	0xd192e819,0xd6990624,0xf40e3585,0x106aa070
1745	DD	0xd192e819,0xd6990624,0xf40e3585,0x106aa070
1746	DD	0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5
1747	DD	0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5
1748	DD	0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3
1749	DD	0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3
1750	DD	0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208
1751	DD	0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208
1752	DD	0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2
1753	DD	0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2
1754
1755	DD	0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
1756	DD	0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
1757	DD	0x03020100,0x0b0a0908,0xffffffff,0xffffffff
1758	DD	0x03020100,0x0b0a0908,0xffffffff,0xffffffff
1759	DD	0xffffffff,0xffffffff,0x03020100,0x0b0a0908
1760	DD	0xffffffff,0xffffffff,0x03020100,0x0b0a0908
1761DB	83,72,65,50,53,54,32,98,108,111,99,107,32,116,114,97
1762DB	110,115,102,111,114,109,32,102,111,114,32,120,56,54,95,54
1763DB	52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121
1764DB	32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46
1765DB	111,114,103,62,0
1766
1767ALIGN	64
1768sha256_block_data_order_ssse3:
1769	mov	QWORD[8+rsp],rdi	;WIN64 prologue
1770	mov	QWORD[16+rsp],rsi
1771	mov	rax,rsp
1772$L$SEH_begin_sha256_block_data_order_ssse3:
1773	mov	rdi,rcx
1774	mov	rsi,rdx
1775	mov	rdx,r8
1776
1777
1778$L$ssse3_shortcut:
1779	push	rbx
1780	push	rbp
1781	push	r12
1782	push	r13
1783	push	r14
1784	push	r15
1785	mov	r11,rsp
1786	shl	rdx,4
1787	sub	rsp,160
1788	lea	rdx,[rdx*4+rsi]
1789	and	rsp,-64
1790	mov	QWORD[((64+0))+rsp],rdi
1791	mov	QWORD[((64+8))+rsp],rsi
1792	mov	QWORD[((64+16))+rsp],rdx
1793	mov	QWORD[((64+24))+rsp],r11
1794	movaps	XMMWORD[(64+32)+rsp],xmm6
1795	movaps	XMMWORD[(64+48)+rsp],xmm7
1796	movaps	XMMWORD[(64+64)+rsp],xmm8
1797	movaps	XMMWORD[(64+80)+rsp],xmm9
1798$L$prologue_ssse3:
1799
1800	mov	eax,DWORD[rdi]
1801	mov	ebx,DWORD[4+rdi]
1802	mov	ecx,DWORD[8+rdi]
1803	mov	edx,DWORD[12+rdi]
1804	mov	r8d,DWORD[16+rdi]
1805	mov	r9d,DWORD[20+rdi]
1806	mov	r10d,DWORD[24+rdi]
1807	mov	r11d,DWORD[28+rdi]
1808
1809
1810	jmp	NEAR $L$loop_ssse3
1811ALIGN	16
1812$L$loop_ssse3:
1813	movdqa	xmm7,XMMWORD[((K256+512))]
1814	movdqu	xmm0,XMMWORD[rsi]
1815	movdqu	xmm1,XMMWORD[16+rsi]
1816	movdqu	xmm2,XMMWORD[32+rsi]
1817DB	102,15,56,0,199
1818	movdqu	xmm3,XMMWORD[48+rsi]
1819	lea	rbp,[K256]
1820DB	102,15,56,0,207
1821	movdqa	xmm4,XMMWORD[rbp]
1822	movdqa	xmm5,XMMWORD[32+rbp]
1823DB	102,15,56,0,215
1824	paddd	xmm4,xmm0
1825	movdqa	xmm6,XMMWORD[64+rbp]
1826DB	102,15,56,0,223
1827	movdqa	xmm7,XMMWORD[96+rbp]
1828	paddd	xmm5,xmm1
1829	paddd	xmm6,xmm2
1830	paddd	xmm7,xmm3
1831	movdqa	XMMWORD[rsp],xmm4
1832	mov	r14d,eax
1833	movdqa	XMMWORD[16+rsp],xmm5
1834	mov	edi,ebx
1835	movdqa	XMMWORD[32+rsp],xmm6
1836	xor	edi,ecx
1837	movdqa	XMMWORD[48+rsp],xmm7
1838	mov	r13d,r8d
1839	jmp	NEAR $L$ssse3_00_47
1840
1841ALIGN	16
1842$L$ssse3_00_47:
1843	sub	rbp,-128
1844	ror	r13d,14
1845	movdqa	xmm4,xmm1
1846	mov	eax,r14d
1847	mov	r12d,r9d
1848	movdqa	xmm7,xmm3
1849	ror	r14d,9
1850	xor	r13d,r8d
1851	xor	r12d,r10d
1852	ror	r13d,5
1853	xor	r14d,eax
1854DB	102,15,58,15,224,4
1855	and	r12d,r8d
1856	xor	r13d,r8d
1857DB	102,15,58,15,250,4
1858	add	r11d,DWORD[rsp]
1859	mov	r15d,eax
1860	xor	r12d,r10d
1861	ror	r14d,11
1862	movdqa	xmm5,xmm4
1863	xor	r15d,ebx
1864	add	r11d,r12d
1865	movdqa	xmm6,xmm4
1866	ror	r13d,6
1867	and	edi,r15d
1868	psrld	xmm4,3
1869	xor	r14d,eax
1870	add	r11d,r13d
1871	xor	edi,ebx
1872	paddd	xmm0,xmm7
1873	ror	r14d,2
1874	add	edx,r11d
1875	psrld	xmm6,7
1876	add	r11d,edi
1877	mov	r13d,edx
1878	pshufd	xmm7,xmm3,250
1879	add	r14d,r11d
1880	ror	r13d,14
1881	pslld	xmm5,14
1882	mov	r11d,r14d
1883	mov	r12d,r8d
1884	pxor	xmm4,xmm6
1885	ror	r14d,9
1886	xor	r13d,edx
1887	xor	r12d,r9d
1888	ror	r13d,5
1889	psrld	xmm6,11
1890	xor	r14d,r11d
1891	pxor	xmm4,xmm5
1892	and	r12d,edx
1893	xor	r13d,edx
1894	pslld	xmm5,11
1895	add	r10d,DWORD[4+rsp]
1896	mov	edi,r11d
1897	pxor	xmm4,xmm6
1898	xor	r12d,r9d
1899	ror	r14d,11
1900	movdqa	xmm6,xmm7
1901	xor	edi,eax
1902	add	r10d,r12d
1903	pxor	xmm4,xmm5
1904	ror	r13d,6
1905	and	r15d,edi
1906	xor	r14d,r11d
1907	psrld	xmm7,10
1908	add	r10d,r13d
1909	xor	r15d,eax
1910	paddd	xmm0,xmm4
1911	ror	r14d,2
1912	add	ecx,r10d
1913	psrlq	xmm6,17
1914	add	r10d,r15d
1915	mov	r13d,ecx
1916	add	r14d,r10d
1917	pxor	xmm7,xmm6
1918	ror	r13d,14
1919	mov	r10d,r14d
1920	mov	r12d,edx
1921	ror	r14d,9
1922	psrlq	xmm6,2
1923	xor	r13d,ecx
1924	xor	r12d,r8d
1925	pxor	xmm7,xmm6
1926	ror	r13d,5
1927	xor	r14d,r10d
1928	and	r12d,ecx
1929	pshufd	xmm7,xmm7,128
1930	xor	r13d,ecx
1931	add	r9d,DWORD[8+rsp]
1932	mov	r15d,r10d
1933	psrldq	xmm7,8
1934	xor	r12d,r8d
1935	ror	r14d,11
1936	xor	r15d,r11d
1937	add	r9d,r12d
1938	ror	r13d,6
1939	paddd	xmm0,xmm7
1940	and	edi,r15d
1941	xor	r14d,r10d
1942	add	r9d,r13d
1943	pshufd	xmm7,xmm0,80
1944	xor	edi,r11d
1945	ror	r14d,2
1946	add	ebx,r9d
1947	movdqa	xmm6,xmm7
1948	add	r9d,edi
1949	mov	r13d,ebx
1950	psrld	xmm7,10
1951	add	r14d,r9d
1952	ror	r13d,14
1953	psrlq	xmm6,17
1954	mov	r9d,r14d
1955	mov	r12d,ecx
1956	pxor	xmm7,xmm6
1957	ror	r14d,9
1958	xor	r13d,ebx
1959	xor	r12d,edx
1960	ror	r13d,5
1961	xor	r14d,r9d
1962	psrlq	xmm6,2
1963	and	r12d,ebx
1964	xor	r13d,ebx
1965	add	r8d,DWORD[12+rsp]
1966	pxor	xmm7,xmm6
1967	mov	edi,r9d
1968	xor	r12d,edx
1969	ror	r14d,11
1970	pshufd	xmm7,xmm7,8
1971	xor	edi,r10d
1972	add	r8d,r12d
1973	movdqa	xmm6,XMMWORD[rbp]
1974	ror	r13d,6
1975	and	r15d,edi
1976	pslldq	xmm7,8
1977	xor	r14d,r9d
1978	add	r8d,r13d
1979	xor	r15d,r10d
1980	paddd	xmm0,xmm7
1981	ror	r14d,2
1982	add	eax,r8d
1983	add	r8d,r15d
1984	paddd	xmm6,xmm0
1985	mov	r13d,eax
1986	add	r14d,r8d
1987	movdqa	XMMWORD[rsp],xmm6
1988	ror	r13d,14
1989	movdqa	xmm4,xmm2
1990	mov	r8d,r14d
1991	mov	r12d,ebx
1992	movdqa	xmm7,xmm0
1993	ror	r14d,9
1994	xor	r13d,eax
1995	xor	r12d,ecx
1996	ror	r13d,5
1997	xor	r14d,r8d
1998DB	102,15,58,15,225,4
1999	and	r12d,eax
2000	xor	r13d,eax
2001DB	102,15,58,15,251,4
2002	add	edx,DWORD[16+rsp]
2003	mov	r15d,r8d
2004	xor	r12d,ecx
2005	ror	r14d,11
2006	movdqa	xmm5,xmm4
2007	xor	r15d,r9d
2008	add	edx,r12d
2009	movdqa	xmm6,xmm4
2010	ror	r13d,6
2011	and	edi,r15d
2012	psrld	xmm4,3
2013	xor	r14d,r8d
2014	add	edx,r13d
2015	xor	edi,r9d
2016	paddd	xmm1,xmm7
2017	ror	r14d,2
2018	add	r11d,edx
2019	psrld	xmm6,7
2020	add	edx,edi
2021	mov	r13d,r11d
2022	pshufd	xmm7,xmm0,250
2023	add	r14d,edx
2024	ror	r13d,14
2025	pslld	xmm5,14
2026	mov	edx,r14d
2027	mov	r12d,eax
2028	pxor	xmm4,xmm6
2029	ror	r14d,9
2030	xor	r13d,r11d
2031	xor	r12d,ebx
2032	ror	r13d,5
2033	psrld	xmm6,11
2034	xor	r14d,edx
2035	pxor	xmm4,xmm5
2036	and	r12d,r11d
2037	xor	r13d,r11d
2038	pslld	xmm5,11
2039	add	ecx,DWORD[20+rsp]
2040	mov	edi,edx
2041	pxor	xmm4,xmm6
2042	xor	r12d,ebx
2043	ror	r14d,11
2044	movdqa	xmm6,xmm7
2045	xor	edi,r8d
2046	add	ecx,r12d
2047	pxor	xmm4,xmm5
2048	ror	r13d,6
2049	and	r15d,edi
2050	xor	r14d,edx
2051	psrld	xmm7,10
2052	add	ecx,r13d
2053	xor	r15d,r8d
2054	paddd	xmm1,xmm4
2055	ror	r14d,2
2056	add	r10d,ecx
2057	psrlq	xmm6,17
2058	add	ecx,r15d
2059	mov	r13d,r10d
2060	add	r14d,ecx
2061	pxor	xmm7,xmm6
2062	ror	r13d,14
2063	mov	ecx,r14d
2064	mov	r12d,r11d
2065	ror	r14d,9
2066	psrlq	xmm6,2
2067	xor	r13d,r10d
2068	xor	r12d,eax
2069	pxor	xmm7,xmm6
2070	ror	r13d,5
2071	xor	r14d,ecx
2072	and	r12d,r10d
2073	pshufd	xmm7,xmm7,128
2074	xor	r13d,r10d
2075	add	ebx,DWORD[24+rsp]
2076	mov	r15d,ecx
2077	psrldq	xmm7,8
2078	xor	r12d,eax
2079	ror	r14d,11
2080	xor	r15d,edx
2081	add	ebx,r12d
2082	ror	r13d,6
2083	paddd	xmm1,xmm7
2084	and	edi,r15d
2085	xor	r14d,ecx
2086	add	ebx,r13d
2087	pshufd	xmm7,xmm1,80
2088	xor	edi,edx
2089	ror	r14d,2
2090	add	r9d,ebx
2091	movdqa	xmm6,xmm7
2092	add	ebx,edi
2093	mov	r13d,r9d
2094	psrld	xmm7,10
2095	add	r14d,ebx
2096	ror	r13d,14
2097	psrlq	xmm6,17
2098	mov	ebx,r14d
2099	mov	r12d,r10d
2100	pxor	xmm7,xmm6
2101	ror	r14d,9
2102	xor	r13d,r9d
2103	xor	r12d,r11d
2104	ror	r13d,5
2105	xor	r14d,ebx
2106	psrlq	xmm6,2
2107	and	r12d,r9d
2108	xor	r13d,r9d
2109	add	eax,DWORD[28+rsp]
2110	pxor	xmm7,xmm6
2111	mov	edi,ebx
2112	xor	r12d,r11d
2113	ror	r14d,11
2114	pshufd	xmm7,xmm7,8
2115	xor	edi,ecx
2116	add	eax,r12d
2117	movdqa	xmm6,XMMWORD[32+rbp]
2118	ror	r13d,6
2119	and	r15d,edi
2120	pslldq	xmm7,8
2121	xor	r14d,ebx
2122	add	eax,r13d
2123	xor	r15d,ecx
2124	paddd	xmm1,xmm7
2125	ror	r14d,2
2126	add	r8d,eax
2127	add	eax,r15d
2128	paddd	xmm6,xmm1
2129	mov	r13d,r8d
2130	add	r14d,eax
2131	movdqa	XMMWORD[16+rsp],xmm6
2132	ror	r13d,14
2133	movdqa	xmm4,xmm3
2134	mov	eax,r14d
2135	mov	r12d,r9d
2136	movdqa	xmm7,xmm1
2137	ror	r14d,9
2138	xor	r13d,r8d
2139	xor	r12d,r10d
2140	ror	r13d,5
2141	xor	r14d,eax
2142DB	102,15,58,15,226,4
2143	and	r12d,r8d
2144	xor	r13d,r8d
2145DB	102,15,58,15,248,4
2146	add	r11d,DWORD[32+rsp]
2147	mov	r15d,eax
2148	xor	r12d,r10d
2149	ror	r14d,11
2150	movdqa	xmm5,xmm4
2151	xor	r15d,ebx
2152	add	r11d,r12d
2153	movdqa	xmm6,xmm4
2154	ror	r13d,6
2155	and	edi,r15d
2156	psrld	xmm4,3
2157	xor	r14d,eax
2158	add	r11d,r13d
2159	xor	edi,ebx
2160	paddd	xmm2,xmm7
2161	ror	r14d,2
2162	add	edx,r11d
2163	psrld	xmm6,7
2164	add	r11d,edi
2165	mov	r13d,edx
2166	pshufd	xmm7,xmm1,250
2167	add	r14d,r11d
2168	ror	r13d,14
2169	pslld	xmm5,14
2170	mov	r11d,r14d
2171	mov	r12d,r8d
2172	pxor	xmm4,xmm6
2173	ror	r14d,9
2174	xor	r13d,edx
2175	xor	r12d,r9d
2176	ror	r13d,5
2177	psrld	xmm6,11
2178	xor	r14d,r11d
2179	pxor	xmm4,xmm5
2180	and	r12d,edx
2181	xor	r13d,edx
2182	pslld	xmm5,11
2183	add	r10d,DWORD[36+rsp]
2184	mov	edi,r11d
2185	pxor	xmm4,xmm6
2186	xor	r12d,r9d
2187	ror	r14d,11
2188	movdqa	xmm6,xmm7
2189	xor	edi,eax
2190	add	r10d,r12d
2191	pxor	xmm4,xmm5
2192	ror	r13d,6
2193	and	r15d,edi
2194	xor	r14d,r11d
2195	psrld	xmm7,10
2196	add	r10d,r13d
2197	xor	r15d,eax
2198	paddd	xmm2,xmm4
2199	ror	r14d,2
2200	add	ecx,r10d
2201	psrlq	xmm6,17
2202	add	r10d,r15d
2203	mov	r13d,ecx
2204	add	r14d,r10d
2205	pxor	xmm7,xmm6
2206	ror	r13d,14
2207	mov	r10d,r14d
2208	mov	r12d,edx
2209	ror	r14d,9
2210	psrlq	xmm6,2
2211	xor	r13d,ecx
2212	xor	r12d,r8d
2213	pxor	xmm7,xmm6
2214	ror	r13d,5
2215	xor	r14d,r10d
2216	and	r12d,ecx
2217	pshufd	xmm7,xmm7,128
2218	xor	r13d,ecx
2219	add	r9d,DWORD[40+rsp]
2220	mov	r15d,r10d
2221	psrldq	xmm7,8
2222	xor	r12d,r8d
2223	ror	r14d,11
2224	xor	r15d,r11d
2225	add	r9d,r12d
2226	ror	r13d,6
2227	paddd	xmm2,xmm7
2228	and	edi,r15d
2229	xor	r14d,r10d
2230	add	r9d,r13d
2231	pshufd	xmm7,xmm2,80
2232	xor	edi,r11d
2233	ror	r14d,2
2234	add	ebx,r9d
2235	movdqa	xmm6,xmm7
2236	add	r9d,edi
2237	mov	r13d,ebx
2238	psrld	xmm7,10
2239	add	r14d,r9d
2240	ror	r13d,14
2241	psrlq	xmm6,17
2242	mov	r9d,r14d
2243	mov	r12d,ecx
2244	pxor	xmm7,xmm6
2245	ror	r14d,9
2246	xor	r13d,ebx
2247	xor	r12d,edx
2248	ror	r13d,5
2249	xor	r14d,r9d
2250	psrlq	xmm6,2
2251	and	r12d,ebx
2252	xor	r13d,ebx
2253	add	r8d,DWORD[44+rsp]
2254	pxor	xmm7,xmm6
2255	mov	edi,r9d
2256	xor	r12d,edx
2257	ror	r14d,11
2258	pshufd	xmm7,xmm7,8
2259	xor	edi,r10d
2260	add	r8d,r12d
2261	movdqa	xmm6,XMMWORD[64+rbp]
2262	ror	r13d,6
2263	and	r15d,edi
2264	pslldq	xmm7,8
2265	xor	r14d,r9d
2266	add	r8d,r13d
2267	xor	r15d,r10d
2268	paddd	xmm2,xmm7
2269	ror	r14d,2
2270	add	eax,r8d
2271	add	r8d,r15d
2272	paddd	xmm6,xmm2
2273	mov	r13d,eax
2274	add	r14d,r8d
2275	movdqa	XMMWORD[32+rsp],xmm6
2276	ror	r13d,14
2277	movdqa	xmm4,xmm0
2278	mov	r8d,r14d
2279	mov	r12d,ebx
2280	movdqa	xmm7,xmm2
2281	ror	r14d,9
2282	xor	r13d,eax
2283	xor	r12d,ecx
2284	ror	r13d,5
2285	xor	r14d,r8d
2286DB	102,15,58,15,227,4
2287	and	r12d,eax
2288	xor	r13d,eax
2289DB	102,15,58,15,249,4
2290	add	edx,DWORD[48+rsp]
2291	mov	r15d,r8d
2292	xor	r12d,ecx
2293	ror	r14d,11
2294	movdqa	xmm5,xmm4
2295	xor	r15d,r9d
2296	add	edx,r12d
2297	movdqa	xmm6,xmm4
2298	ror	r13d,6
2299	and	edi,r15d
2300	psrld	xmm4,3
2301	xor	r14d,r8d
2302	add	edx,r13d
2303	xor	edi,r9d
2304	paddd	xmm3,xmm7
2305	ror	r14d,2
2306	add	r11d,edx
2307	psrld	xmm6,7
2308	add	edx,edi
2309	mov	r13d,r11d
2310	pshufd	xmm7,xmm2,250
2311	add	r14d,edx
2312	ror	r13d,14
2313	pslld	xmm5,14
2314	mov	edx,r14d
2315	mov	r12d,eax
2316	pxor	xmm4,xmm6
2317	ror	r14d,9
2318	xor	r13d,r11d
2319	xor	r12d,ebx
2320	ror	r13d,5
2321	psrld	xmm6,11
2322	xor	r14d,edx
2323	pxor	xmm4,xmm5
2324	and	r12d,r11d
2325	xor	r13d,r11d
2326	pslld	xmm5,11
2327	add	ecx,DWORD[52+rsp]
2328	mov	edi,edx
2329	pxor	xmm4,xmm6
2330	xor	r12d,ebx
2331	ror	r14d,11
2332	movdqa	xmm6,xmm7
2333	xor	edi,r8d
2334	add	ecx,r12d
2335	pxor	xmm4,xmm5
2336	ror	r13d,6
2337	and	r15d,edi
2338	xor	r14d,edx
2339	psrld	xmm7,10
2340	add	ecx,r13d
2341	xor	r15d,r8d
2342	paddd	xmm3,xmm4
2343	ror	r14d,2
2344	add	r10d,ecx
2345	psrlq	xmm6,17
2346	add	ecx,r15d
2347	mov	r13d,r10d
2348	add	r14d,ecx
2349	pxor	xmm7,xmm6
2350	ror	r13d,14
2351	mov	ecx,r14d
2352	mov	r12d,r11d
2353	ror	r14d,9
2354	psrlq	xmm6,2
2355	xor	r13d,r10d
2356	xor	r12d,eax
2357	pxor	xmm7,xmm6
2358	ror	r13d,5
2359	xor	r14d,ecx
2360	and	r12d,r10d
2361	pshufd	xmm7,xmm7,128
2362	xor	r13d,r10d
2363	add	ebx,DWORD[56+rsp]
2364	mov	r15d,ecx
2365	psrldq	xmm7,8
2366	xor	r12d,eax
2367	ror	r14d,11
2368	xor	r15d,edx
2369	add	ebx,r12d
2370	ror	r13d,6
2371	paddd	xmm3,xmm7
2372	and	edi,r15d
2373	xor	r14d,ecx
2374	add	ebx,r13d
2375	pshufd	xmm7,xmm3,80
2376	xor	edi,edx
2377	ror	r14d,2
2378	add	r9d,ebx
2379	movdqa	xmm6,xmm7
2380	add	ebx,edi
2381	mov	r13d,r9d
2382	psrld	xmm7,10
2383	add	r14d,ebx
2384	ror	r13d,14
2385	psrlq	xmm6,17
2386	mov	ebx,r14d
2387	mov	r12d,r10d
2388	pxor	xmm7,xmm6
2389	ror	r14d,9
2390	xor	r13d,r9d
2391	xor	r12d,r11d
2392	ror	r13d,5
2393	xor	r14d,ebx
2394	psrlq	xmm6,2
2395	and	r12d,r9d
2396	xor	r13d,r9d
2397	add	eax,DWORD[60+rsp]
2398	pxor	xmm7,xmm6
2399	mov	edi,ebx
2400	xor	r12d,r11d
2401	ror	r14d,11
2402	pshufd	xmm7,xmm7,8
2403	xor	edi,ecx
2404	add	eax,r12d
2405	movdqa	xmm6,XMMWORD[96+rbp]
2406	ror	r13d,6
2407	and	r15d,edi
2408	pslldq	xmm7,8
2409	xor	r14d,ebx
2410	add	eax,r13d
2411	xor	r15d,ecx
2412	paddd	xmm3,xmm7
2413	ror	r14d,2
2414	add	r8d,eax
2415	add	eax,r15d
2416	paddd	xmm6,xmm3
2417	mov	r13d,r8d
2418	add	r14d,eax
2419	movdqa	XMMWORD[48+rsp],xmm6
2420	cmp	BYTE[131+rbp],0
2421	jne	NEAR $L$ssse3_00_47
2422	ror	r13d,14
2423	mov	eax,r14d
2424	mov	r12d,r9d
2425	ror	r14d,9
2426	xor	r13d,r8d
2427	xor	r12d,r10d
2428	ror	r13d,5
2429	xor	r14d,eax
2430	and	r12d,r8d
2431	xor	r13d,r8d
2432	add	r11d,DWORD[rsp]
2433	mov	r15d,eax
2434	xor	r12d,r10d
2435	ror	r14d,11
2436	xor	r15d,ebx
2437	add	r11d,r12d
2438	ror	r13d,6
2439	and	edi,r15d
2440	xor	r14d,eax
2441	add	r11d,r13d
2442	xor	edi,ebx
2443	ror	r14d,2
2444	add	edx,r11d
2445	add	r11d,edi
2446	mov	r13d,edx
2447	add	r14d,r11d
2448	ror	r13d,14
2449	mov	r11d,r14d
2450	mov	r12d,r8d
2451	ror	r14d,9
2452	xor	r13d,edx
2453	xor	r12d,r9d
2454	ror	r13d,5
2455	xor	r14d,r11d
2456	and	r12d,edx
2457	xor	r13d,edx
2458	add	r10d,DWORD[4+rsp]
2459	mov	edi,r11d
2460	xor	r12d,r9d
2461	ror	r14d,11
2462	xor	edi,eax
2463	add	r10d,r12d
2464	ror	r13d,6
2465	and	r15d,edi
2466	xor	r14d,r11d
2467	add	r10d,r13d
2468	xor	r15d,eax
2469	ror	r14d,2
2470	add	ecx,r10d
2471	add	r10d,r15d
2472	mov	r13d,ecx
2473	add	r14d,r10d
2474	ror	r13d,14
2475	mov	r10d,r14d
2476	mov	r12d,edx
2477	ror	r14d,9
2478	xor	r13d,ecx
2479	xor	r12d,r8d
2480	ror	r13d,5
2481	xor	r14d,r10d
2482	and	r12d,ecx
2483	xor	r13d,ecx
2484	add	r9d,DWORD[8+rsp]
2485	mov	r15d,r10d
2486	xor	r12d,r8d
2487	ror	r14d,11
2488	xor	r15d,r11d
2489	add	r9d,r12d
2490	ror	r13d,6
2491	and	edi,r15d
2492	xor	r14d,r10d
2493	add	r9d,r13d
2494	xor	edi,r11d
2495	ror	r14d,2
2496	add	ebx,r9d
2497	add	r9d,edi
2498	mov	r13d,ebx
2499	add	r14d,r9d
2500	ror	r13d,14
2501	mov	r9d,r14d
2502	mov	r12d,ecx
2503	ror	r14d,9
2504	xor	r13d,ebx
2505	xor	r12d,edx
2506	ror	r13d,5
2507	xor	r14d,r9d
2508	and	r12d,ebx
2509	xor	r13d,ebx
2510	add	r8d,DWORD[12+rsp]
2511	mov	edi,r9d
2512	xor	r12d,edx
2513	ror	r14d,11
2514	xor	edi,r10d
2515	add	r8d,r12d
2516	ror	r13d,6
2517	and	r15d,edi
2518	xor	r14d,r9d
2519	add	r8d,r13d
2520	xor	r15d,r10d
2521	ror	r14d,2
2522	add	eax,r8d
2523	add	r8d,r15d
2524	mov	r13d,eax
2525	add	r14d,r8d
2526	ror	r13d,14
2527	mov	r8d,r14d
2528	mov	r12d,ebx
2529	ror	r14d,9
2530	xor	r13d,eax
2531	xor	r12d,ecx
2532	ror	r13d,5
2533	xor	r14d,r8d
2534	and	r12d,eax
2535	xor	r13d,eax
2536	add	edx,DWORD[16+rsp]
2537	mov	r15d,r8d
2538	xor	r12d,ecx
2539	ror	r14d,11
2540	xor	r15d,r9d
2541	add	edx,r12d
2542	ror	r13d,6
2543	and	edi,r15d
2544	xor	r14d,r8d
2545	add	edx,r13d
2546	xor	edi,r9d
2547	ror	r14d,2
2548	add	r11d,edx
2549	add	edx,edi
2550	mov	r13d,r11d
2551	add	r14d,edx
2552	ror	r13d,14
2553	mov	edx,r14d
2554	mov	r12d,eax
2555	ror	r14d,9
2556	xor	r13d,r11d
2557	xor	r12d,ebx
2558	ror	r13d,5
2559	xor	r14d,edx
2560	and	r12d,r11d
2561	xor	r13d,r11d
2562	add	ecx,DWORD[20+rsp]
2563	mov	edi,edx
2564	xor	r12d,ebx
2565	ror	r14d,11
2566	xor	edi,r8d
2567	add	ecx,r12d
2568	ror	r13d,6
2569	and	r15d,edi
2570	xor	r14d,edx
2571	add	ecx,r13d
2572	xor	r15d,r8d
2573	ror	r14d,2
2574	add	r10d,ecx
2575	add	ecx,r15d
2576	mov	r13d,r10d
2577	add	r14d,ecx
2578	ror	r13d,14
2579	mov	ecx,r14d
2580	mov	r12d,r11d
2581	ror	r14d,9
2582	xor	r13d,r10d
2583	xor	r12d,eax
2584	ror	r13d,5
2585	xor	r14d,ecx
2586	and	r12d,r10d
2587	xor	r13d,r10d
2588	add	ebx,DWORD[24+rsp]
2589	mov	r15d,ecx
2590	xor	r12d,eax
2591	ror	r14d,11
2592	xor	r15d,edx
2593	add	ebx,r12d
2594	ror	r13d,6
2595	and	edi,r15d
2596	xor	r14d,ecx
2597	add	ebx,r13d
2598	xor	edi,edx
2599	ror	r14d,2
2600	add	r9d,ebx
2601	add	ebx,edi
2602	mov	r13d,r9d
2603	add	r14d,ebx
2604	ror	r13d,14
2605	mov	ebx,r14d
2606	mov	r12d,r10d
2607	ror	r14d,9
2608	xor	r13d,r9d
2609	xor	r12d,r11d
2610	ror	r13d,5
2611	xor	r14d,ebx
2612	and	r12d,r9d
2613	xor	r13d,r9d
2614	add	eax,DWORD[28+rsp]
2615	mov	edi,ebx
2616	xor	r12d,r11d
2617	ror	r14d,11
2618	xor	edi,ecx
2619	add	eax,r12d
2620	ror	r13d,6
2621	and	r15d,edi
2622	xor	r14d,ebx
2623	add	eax,r13d
2624	xor	r15d,ecx
2625	ror	r14d,2
2626	add	r8d,eax
2627	add	eax,r15d
2628	mov	r13d,r8d
2629	add	r14d,eax
2630	ror	r13d,14
2631	mov	eax,r14d
2632	mov	r12d,r9d
2633	ror	r14d,9
2634	xor	r13d,r8d
2635	xor	r12d,r10d
2636	ror	r13d,5
2637	xor	r14d,eax
2638	and	r12d,r8d
2639	xor	r13d,r8d
2640	add	r11d,DWORD[32+rsp]
2641	mov	r15d,eax
2642	xor	r12d,r10d
2643	ror	r14d,11
2644	xor	r15d,ebx
2645	add	r11d,r12d
2646	ror	r13d,6
2647	and	edi,r15d
2648	xor	r14d,eax
2649	add	r11d,r13d
2650	xor	edi,ebx
2651	ror	r14d,2
2652	add	edx,r11d
2653	add	r11d,edi
2654	mov	r13d,edx
2655	add	r14d,r11d
2656	ror	r13d,14
2657	mov	r11d,r14d
2658	mov	r12d,r8d
2659	ror	r14d,9
2660	xor	r13d,edx
2661	xor	r12d,r9d
2662	ror	r13d,5
2663	xor	r14d,r11d
2664	and	r12d,edx
2665	xor	r13d,edx
2666	add	r10d,DWORD[36+rsp]
2667	mov	edi,r11d
2668	xor	r12d,r9d
2669	ror	r14d,11
2670	xor	edi,eax
2671	add	r10d,r12d
2672	ror	r13d,6
2673	and	r15d,edi
2674	xor	r14d,r11d
2675	add	r10d,r13d
2676	xor	r15d,eax
2677	ror	r14d,2
2678	add	ecx,r10d
2679	add	r10d,r15d
2680	mov	r13d,ecx
2681	add	r14d,r10d
2682	ror	r13d,14
2683	mov	r10d,r14d
2684	mov	r12d,edx
2685	ror	r14d,9
2686	xor	r13d,ecx
2687	xor	r12d,r8d
2688	ror	r13d,5
2689	xor	r14d,r10d
2690	and	r12d,ecx
2691	xor	r13d,ecx
2692	add	r9d,DWORD[40+rsp]
2693	mov	r15d,r10d
2694	xor	r12d,r8d
2695	ror	r14d,11
2696	xor	r15d,r11d
2697	add	r9d,r12d
2698	ror	r13d,6
2699	and	edi,r15d
2700	xor	r14d,r10d
2701	add	r9d,r13d
2702	xor	edi,r11d
2703	ror	r14d,2
2704	add	ebx,r9d
2705	add	r9d,edi
2706	mov	r13d,ebx
2707	add	r14d,r9d
2708	ror	r13d,14
2709	mov	r9d,r14d
2710	mov	r12d,ecx
2711	ror	r14d,9
2712	xor	r13d,ebx
2713	xor	r12d,edx
2714	ror	r13d,5
2715	xor	r14d,r9d
2716	and	r12d,ebx
2717	xor	r13d,ebx
2718	add	r8d,DWORD[44+rsp]
2719	mov	edi,r9d
2720	xor	r12d,edx
2721	ror	r14d,11
2722	xor	edi,r10d
2723	add	r8d,r12d
2724	ror	r13d,6
2725	and	r15d,edi
2726	xor	r14d,r9d
2727	add	r8d,r13d
2728	xor	r15d,r10d
2729	ror	r14d,2
2730	add	eax,r8d
2731	add	r8d,r15d
2732	mov	r13d,eax
2733	add	r14d,r8d
2734	ror	r13d,14
2735	mov	r8d,r14d
2736	mov	r12d,ebx
2737	ror	r14d,9
2738	xor	r13d,eax
2739	xor	r12d,ecx
2740	ror	r13d,5
2741	xor	r14d,r8d
2742	and	r12d,eax
2743	xor	r13d,eax
2744	add	edx,DWORD[48+rsp]
2745	mov	r15d,r8d
2746	xor	r12d,ecx
2747	ror	r14d,11
2748	xor	r15d,r9d
2749	add	edx,r12d
2750	ror	r13d,6
2751	and	edi,r15d
2752	xor	r14d,r8d
2753	add	edx,r13d
2754	xor	edi,r9d
2755	ror	r14d,2
2756	add	r11d,edx
2757	add	edx,edi
2758	mov	r13d,r11d
2759	add	r14d,edx
2760	ror	r13d,14
2761	mov	edx,r14d
2762	mov	r12d,eax
2763	ror	r14d,9
2764	xor	r13d,r11d
2765	xor	r12d,ebx
2766	ror	r13d,5
2767	xor	r14d,edx
2768	and	r12d,r11d
2769	xor	r13d,r11d
2770	add	ecx,DWORD[52+rsp]
2771	mov	edi,edx
2772	xor	r12d,ebx
2773	ror	r14d,11
2774	xor	edi,r8d
2775	add	ecx,r12d
2776	ror	r13d,6
2777	and	r15d,edi
2778	xor	r14d,edx
2779	add	ecx,r13d
2780	xor	r15d,r8d
2781	ror	r14d,2
2782	add	r10d,ecx
2783	add	ecx,r15d
2784	mov	r13d,r10d
2785	add	r14d,ecx
2786	ror	r13d,14
2787	mov	ecx,r14d
2788	mov	r12d,r11d
2789	ror	r14d,9
2790	xor	r13d,r10d
2791	xor	r12d,eax
2792	ror	r13d,5
2793	xor	r14d,ecx
2794	and	r12d,r10d
2795	xor	r13d,r10d
2796	add	ebx,DWORD[56+rsp]
2797	mov	r15d,ecx
2798	xor	r12d,eax
2799	ror	r14d,11
2800	xor	r15d,edx
2801	add	ebx,r12d
2802	ror	r13d,6
2803	and	edi,r15d
2804	xor	r14d,ecx
2805	add	ebx,r13d
2806	xor	edi,edx
2807	ror	r14d,2
2808	add	r9d,ebx
2809	add	ebx,edi
2810	mov	r13d,r9d
2811	add	r14d,ebx
2812	ror	r13d,14
2813	mov	ebx,r14d
2814	mov	r12d,r10d
2815	ror	r14d,9
2816	xor	r13d,r9d
2817	xor	r12d,r11d
2818	ror	r13d,5
2819	xor	r14d,ebx
2820	and	r12d,r9d
2821	xor	r13d,r9d
2822	add	eax,DWORD[60+rsp]
2823	mov	edi,ebx
2824	xor	r12d,r11d
2825	ror	r14d,11
2826	xor	edi,ecx
2827	add	eax,r12d
2828	ror	r13d,6
2829	and	r15d,edi
2830	xor	r14d,ebx
2831	add	eax,r13d
2832	xor	r15d,ecx
2833	ror	r14d,2
2834	add	r8d,eax
2835	add	eax,r15d
2836	mov	r13d,r8d
2837	add	r14d,eax
2838	mov	rdi,QWORD[((64+0))+rsp]
2839	mov	eax,r14d
2840
2841	add	eax,DWORD[rdi]
2842	lea	rsi,[64+rsi]
2843	add	ebx,DWORD[4+rdi]
2844	add	ecx,DWORD[8+rdi]
2845	add	edx,DWORD[12+rdi]
2846	add	r8d,DWORD[16+rdi]
2847	add	r9d,DWORD[20+rdi]
2848	add	r10d,DWORD[24+rdi]
2849	add	r11d,DWORD[28+rdi]
2850
2851	cmp	rsi,QWORD[((64+16))+rsp]
2852
2853	mov	DWORD[rdi],eax
2854	mov	DWORD[4+rdi],ebx
2855	mov	DWORD[8+rdi],ecx
2856	mov	DWORD[12+rdi],edx
2857	mov	DWORD[16+rdi],r8d
2858	mov	DWORD[20+rdi],r9d
2859	mov	DWORD[24+rdi],r10d
2860	mov	DWORD[28+rdi],r11d
2861	jb	NEAR $L$loop_ssse3
2862
2863	mov	rsi,QWORD[((64+24))+rsp]
2864	movaps	xmm6,XMMWORD[((64+32))+rsp]
2865	movaps	xmm7,XMMWORD[((64+48))+rsp]
2866	movaps	xmm8,XMMWORD[((64+64))+rsp]
2867	movaps	xmm9,XMMWORD[((64+80))+rsp]
2868	mov	r15,QWORD[rsi]
2869	mov	r14,QWORD[8+rsi]
2870	mov	r13,QWORD[16+rsi]
2871	mov	r12,QWORD[24+rsi]
2872	mov	rbp,QWORD[32+rsi]
2873	mov	rbx,QWORD[40+rsi]
2874	lea	rsp,[48+rsi]
2875$L$epilogue_ssse3:
2876	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
2877	mov	rsi,QWORD[16+rsp]
2878	DB	0F3h,0C3h		;repret
2879$L$SEH_end_sha256_block_data_order_ssse3:
2880EXTERN	__imp_RtlVirtualUnwind
2881
2882ALIGN	16
2883se_handler:
2884	push	rsi
2885	push	rdi
2886	push	rbx
2887	push	rbp
2888	push	r12
2889	push	r13
2890	push	r14
2891	push	r15
2892	pushfq
2893	sub	rsp,64
2894
2895	mov	rax,QWORD[120+r8]
2896	mov	rbx,QWORD[248+r8]
2897
2898	mov	rsi,QWORD[8+r9]
2899	mov	r11,QWORD[56+r9]
2900
2901	mov	r10d,DWORD[r11]
2902	lea	r10,[r10*1+rsi]
2903	cmp	rbx,r10
2904	jb	NEAR $L$in_prologue
2905
2906	mov	rax,QWORD[152+r8]
2907
2908	mov	r10d,DWORD[4+r11]
2909	lea	r10,[r10*1+rsi]
2910	cmp	rbx,r10
2911	jae	NEAR $L$in_prologue
2912	mov	rsi,rax
2913	mov	rax,QWORD[((64+24))+rax]
2914	lea	rax,[48+rax]
2915
2916	mov	rbx,QWORD[((-8))+rax]
2917	mov	rbp,QWORD[((-16))+rax]
2918	mov	r12,QWORD[((-24))+rax]
2919	mov	r13,QWORD[((-32))+rax]
2920	mov	r14,QWORD[((-40))+rax]
2921	mov	r15,QWORD[((-48))+rax]
2922	mov	QWORD[144+r8],rbx
2923	mov	QWORD[160+r8],rbp
2924	mov	QWORD[216+r8],r12
2925	mov	QWORD[224+r8],r13
2926	mov	QWORD[232+r8],r14
2927	mov	QWORD[240+r8],r15
2928
2929	lea	r10,[$L$epilogue]
2930	cmp	rbx,r10
2931	jb	NEAR $L$in_prologue
2932
2933	lea	rsi,[((64+32))+rsi]
2934	lea	rdi,[512+r8]
2935	mov	ecx,8
2936	DD	0xa548f3fc
2937
2938$L$in_prologue:
2939	mov	rdi,QWORD[8+rax]
2940	mov	rsi,QWORD[16+rax]
2941	mov	QWORD[152+r8],rax
2942	mov	QWORD[168+r8],rsi
2943	mov	QWORD[176+r8],rdi
2944
2945	mov	rdi,QWORD[40+r9]
2946	mov	rsi,r8
2947	mov	ecx,154
2948	DD	0xa548f3fc
2949
2950	mov	rsi,r9
2951	xor	rcx,rcx
2952	mov	rdx,QWORD[8+rsi]
2953	mov	r8,QWORD[rsi]
2954	mov	r9,QWORD[16+rsi]
2955	mov	r10,QWORD[40+rsi]
2956	lea	r11,[56+rsi]
2957	lea	r12,[24+rsi]
2958	mov	QWORD[32+rsp],r10
2959	mov	QWORD[40+rsp],r11
2960	mov	QWORD[48+rsp],r12
2961	mov	QWORD[56+rsp],rcx
2962	call	QWORD[__imp_RtlVirtualUnwind]
2963
2964	mov	eax,1
2965	add	rsp,64
2966	popfq
2967	pop	r15
2968	pop	r14
2969	pop	r13
2970	pop	r12
2971	pop	rbp
2972	pop	rbx
2973	pop	rdi
2974	pop	rsi
2975	DB	0F3h,0C3h		;repret
2976
2977section	.pdata rdata align=4
2978ALIGN	4
2979	DD	$L$SEH_begin_sha256_block_data_order wrt ..imagebase
2980	DD	$L$SEH_end_sha256_block_data_order wrt ..imagebase
2981	DD	$L$SEH_info_sha256_block_data_order wrt ..imagebase
2982	DD	$L$SEH_begin_sha256_block_data_order_ssse3 wrt ..imagebase
2983	DD	$L$SEH_end_sha256_block_data_order_ssse3 wrt ..imagebase
2984	DD	$L$SEH_info_sha256_block_data_order_ssse3 wrt ..imagebase
2985section	.xdata rdata align=8
2986ALIGN	8
2987$L$SEH_info_sha256_block_data_order:
2988DB	9,0,0,0
2989	DD	se_handler wrt ..imagebase
2990	DD	$L$prologue wrt ..imagebase,$L$epilogue wrt ..imagebase
2991$L$SEH_info_sha256_block_data_order_ssse3:
2992DB	9,0,0,0
2993	DD	se_handler wrt ..imagebase
2994	DD	$L$prologue_ssse3 wrt ..imagebase,$L$epilogue_ssse3 wrt ..imagebase
2995