]> git.ipfire.org Git - thirdparty/openssl.git/blob - crypto/md5/asm/md5-aarch64.pl
Copyright year updates
[thirdparty/openssl.git] / crypto / md5 / asm / md5-aarch64.pl
1 #! /usr/bin/env perl
2 # Copyright 2021-2023 The OpenSSL Project Authors. All Rights Reserved.
3 #
4 # Licensed under the Apache License 2.0 (the "License"). You may not use
5 # this file except in compliance with the License. You can obtain a copy
6 # in the file LICENSE in the source distribution or at
7 # https://www.openssl.org/source/license.html
8
9 # MD5 optimized for aarch64.
10
11 use strict;
12
13 my $code;
14
15 #no warnings qw(uninitialized);
16 # $output is the last argument if it looks like a file (it has an extension)
17 # $flavour is the first argument if it doesn't look like a file
18 my $output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
19 my $flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
20
21 $0 =~ m/(.*[\/\\])[^\/\\]+$/; my $dir=$1; my $xlate;
22 ( $xlate="${dir}arm-xlate.pl" and -f $xlate ) or
23 ( $xlate="${dir}../../perlasm/arm-xlate.pl" and -f $xlate) or
24 die "can't locate arm-xlate.pl";
25
26 open OUT,"| \"$^X\" $xlate $flavour \"$output\""
27 or die "can't call $xlate: $1";
28 *STDOUT=*OUT;
29
30 $code .= <<EOF;
31 .text
32 .globl ossl_md5_block_asm_data_order
33 .type ossl_md5_block_asm_data_order,\@function
34 ossl_md5_block_asm_data_order:
35 // Save all callee-saved registers
36 stp x19,x20,[sp,#-80]!
37 stp x21,x22,[sp,#16]
38 stp x23,x24,[sp,#32]
39 stp x25,x26,[sp,#48]
40 stp x27,x28,[sp,#64]
41
42 ldp w10, w11, [x0, #0] // Load MD5 state->A and state->B
43 ldp w12, w13, [x0, #8] // Load MD5 state->C and state->D
44 .align 5
45 ossl_md5_blocks_loop:
46 eor x17, x12, x13 // Begin aux function round 1 F(x,y,z)=(((y^z)&x)^z)
47 and x16, x17, x11 // Continue aux function round 1 F(x,y,z)=(((y^z)&x)^z)
48 ldp w15, w20, [x1] // Load 2 words of input data0 M[0],M[1]
49 ldp w3, w21, [x1, #8] // Load 2 words of input data0 M[2],M[3]
50 #ifdef __AARCH64EB__
51 rev w15, w15
52 rev w20, w20
53 rev w3, w3
54 rev w21, w21
55 #endif
56 eor x14, x16, x13 // End aux function round 1 F(x,y,z)=(((y^z)&x)^z)
57 movz x9, #0xa478 // Load lower half of constant 0xd76aa478
58 movk x9, #0xd76a, lsl #16 // Load upper half of constant 0xd76aa478
59 add w8, w10, w15 // Add dest value
60 add w7, w8, w9 // Add constant 0xd76aa478
61 add w6, w7, w14 // Add aux function result
62 ror w6, w6, #25 // Rotate left s=7 bits
63 eor x5, x11, x12 // Begin aux function round 1 F(x,y,z)=(((y^z)&x)^z)
64 add w4, w11, w6 // Add X parameter round 1 A=FF(A, B, C, D, 0xd76aa478, s=7, M[0])
65 and x8, x5, x4 // Continue aux function round 1 F(x,y,z)=(((y^z)&x)^z)
66 eor x17, x8, x12 // End aux function round 1 F(x,y,z)=(((y^z)&x)^z)
67 movz x16, #0xb756 // Load lower half of constant 0xe8c7b756
68 movk x16, #0xe8c7, lsl #16 // Load upper half of constant 0xe8c7b756
69 add w9, w13, w20 // Add dest value
70 add w7, w9, w16 // Add constant 0xe8c7b756
71 add w14, w7, w17 // Add aux function result
72 ror w14, w14, #20 // Rotate left s=12 bits
73 eor x6, x4, x11 // Begin aux function round 1 F(x,y,z)=(((y^z)&x)^z)
74 add w5, w4, w14 // Add X parameter round 1 D=FF(D, A, B, C, 0xe8c7b756, s=12, M[1])
75 and x8, x6, x5 // Continue aux function round 1 F(x,y,z)=(((y^z)&x)^z)
76 eor x9, x8, x11 // End aux function round 1 F(x,y,z)=(((y^z)&x)^z)
77 movz x16, #0x70db // Load lower half of constant 0x242070db
78 movk x16, #0x2420, lsl #16 // Load upper half of constant 0x242070db
79 add w7, w12, w3 // Add dest value
80 add w17, w7, w16 // Add constant 0x242070db
81 add w14, w17, w9 // Add aux function result
82 ror w14, w14, #15 // Rotate left s=17 bits
83 eor x6, x5, x4 // Begin aux function round 1 F(x,y,z)=(((y^z)&x)^z)
84 add w8, w5, w14 // Add X parameter round 1 C=FF(C, D, A, B, 0x242070db, s=17, M[2])
85 and x7, x6, x8 // Continue aux function round 1 F(x,y,z)=(((y^z)&x)^z)
86 eor x16, x7, x4 // End aux function round 1 F(x,y,z)=(((y^z)&x)^z)
87 movz x9, #0xceee // Load lower half of constant 0xc1bdceee
88 movk x9, #0xc1bd, lsl #16 // Load upper half of constant 0xc1bdceee
89 add w14, w11, w21 // Add dest value
90 add w6, w14, w9 // Add constant 0xc1bdceee
91 add w7, w6, w16 // Add aux function result
92 ror w7, w7, #10 // Rotate left s=22 bits
93 eor x17, x8, x5 // Begin aux function round 1 F(x,y,z)=(((y^z)&x)^z)
94 add w9, w8, w7 // Add X parameter round 1 B=FF(B, C, D, A, 0xc1bdceee, s=22, M[3])
95 ldp w14, w22, [x1, #16] // Load 2 words of input data0 M[4],M[5]
96 ldp w7, w23, [x1, #24] // Load 2 words of input data0 M[6],M[7]
97 #ifdef __AARCH64EB__
98 rev w14, w14
99 rev w22, w22
100 rev w7, w7
101 rev w23, w23
102 #endif
103 and x16, x17, x9 // Continue aux function round 1 F(x,y,z)=(((y^z)&x)^z)
104 eor x6, x16, x5 // End aux function round 1 F(x,y,z)=(((y^z)&x)^z)
105 movz x16, #0xfaf // Load lower half of constant 0xf57c0faf
106 movk x16, #0xf57c, lsl #16 // Load upper half of constant 0xf57c0faf
107 add w17, w4, w14 // Add dest value
108 add w16, w17, w16 // Add constant 0xf57c0faf
109 add w4, w16, w6 // Add aux function result
110 ror w4, w4, #25 // Rotate left s=7 bits
111 eor x16, x9, x8 // Begin aux function round 1 F(x,y,z)=(((y^z)&x)^z)
112 add w17, w9, w4 // Add X parameter round 1 A=FF(A, B, C, D, 0xf57c0faf, s=7, M[4])
113 and x16, x16, x17 // Continue aux function round 1 F(x,y,z)=(((y^z)&x)^z)
114 eor x6, x16, x8 // End aux function round 1 F(x,y,z)=(((y^z)&x)^z)
115 movz x4, #0xc62a // Load lower half of constant 0x4787c62a
116 movk x4, #0x4787, lsl #16 // Load upper half of constant 0x4787c62a
117 add w16, w5, w22 // Add dest value
118 add w16, w16, w4 // Add constant 0x4787c62a
119 add w5, w16, w6 // Add aux function result
120 ror w5, w5, #20 // Rotate left s=12 bits
121 eor x4, x17, x9 // Begin aux function round 1 F(x,y,z)=(((y^z)&x)^z)
122 add w19, w17, w5 // Add X parameter round 1 D=FF(D, A, B, C, 0x4787c62a, s=12, M[5])
123 and x6, x4, x19 // Continue aux function round 1 F(x,y,z)=(((y^z)&x)^z)
124 eor x5, x6, x9 // End aux function round 1 F(x,y,z)=(((y^z)&x)^z)
125 movz x4, #0x4613 // Load lower half of constant 0xa8304613
126 movk x4, #0xa830, lsl #16 // Load upper half of constant 0xa8304613
127 add w6, w8, w7 // Add dest value
128 add w8, w6, w4 // Add constant 0xa8304613
129 add w4, w8, w5 // Add aux function result
130 ror w4, w4, #15 // Rotate left s=17 bits
131 eor x6, x19, x17 // Begin aux function round 1 F(x,y,z)=(((y^z)&x)^z)
132 add w8, w19, w4 // Add X parameter round 1 C=FF(C, D, A, B, 0xa8304613, s=17, M[6])
133 and x5, x6, x8 // Continue aux function round 1 F(x,y,z)=(((y^z)&x)^z)
134 eor x4, x5, x17 // End aux function round 1 F(x,y,z)=(((y^z)&x)^z)
135 movz x6, #0x9501 // Load lower half of constant 0xfd469501
136 movk x6, #0xfd46, lsl #16 // Load upper half of constant 0xfd469501
137 add w9, w9, w23 // Add dest value
138 add w5, w9, w6 // Add constant 0xfd469501
139 add w9, w5, w4 // Add aux function result
140 ror w9, w9, #10 // Rotate left s=22 bits
141 eor x6, x8, x19 // Begin aux function round 1 F(x,y,z)=(((y^z)&x)^z)
142 add w4, w8, w9 // Add X parameter round 1 B=FF(B, C, D, A, 0xfd469501, s=22, M[7])
143 ldp w5, w24, [x1, #32] // Load 2 words of input data0 M[8],M[9]
144 ldp w16, w25, [x1, #40] // Load 2 words of input data0 M[10],M[11]
145 #ifdef __AARCH64EB__
146 rev w5, w5
147 rev w24, w24
148 rev w16, w16
149 rev w25, w25
150 #endif
151 and x9, x6, x4 // Continue aux function round 1 F(x,y,z)=(((y^z)&x)^z)
152 eor x6, x9, x19 // End aux function round 1 F(x,y,z)=(((y^z)&x)^z)
153 movz x9, #0x98d8 // Load lower half of constant 0x698098d8
154 movk x9, #0x6980, lsl #16 // Load upper half of constant 0x698098d8
155 add w17, w17, w5 // Add dest value
156 add w9, w17, w9 // Add constant 0x698098d8
157 add w17, w9, w6 // Add aux function result
158 ror w17, w17, #25 // Rotate left s=7 bits
159 eor x9, x4, x8 // Begin aux function round 1 F(x,y,z)=(((y^z)&x)^z)
160 add w6, w4, w17 // Add X parameter round 1 A=FF(A, B, C, D, 0x698098d8, s=7, M[8])
161 and x17, x9, x6 // Continue aux function round 1 F(x,y,z)=(((y^z)&x)^z)
162 eor x9, x17, x8 // End aux function round 1 F(x,y,z)=(((y^z)&x)^z)
163 movz x17, #0xf7af // Load lower half of constant 0x8b44f7af
164 movk x17, #0x8b44, lsl #16 // Load upper half of constant 0x8b44f7af
165 add w19, w19, w24 // Add dest value
166 add w17, w19, w17 // Add constant 0x8b44f7af
167 add w19, w17, w9 // Add aux function result
168 ror w19, w19, #20 // Rotate left s=12 bits
169 eor x9, x6, x4 // Begin aux function round 1 F(x,y,z)=(((y^z)&x)^z)
170 add w17, w6, w19 // Add X parameter round 1 D=FF(D, A, B, C, 0x8b44f7af, s=12, M[9])
171 and x9, x9, x17 // Continue aux function round 1 F(x,y,z)=(((y^z)&x)^z)
172 eor x9, x9, x4 // End aux function round 1 F(x,y,z)=(((y^z)&x)^z)
173 movz x11, #0x5bb1 // Load lower half of constant 0xffff5bb1
174 movk x11, #0xffff, lsl #16 // Load upper half of constant 0xffff5bb1
175 add w8, w8, w16 // Add dest value
176 add w8, w8, w11 // Add constant 0xffff5bb1
177 add w8, w8, w9 // Add aux function result
178 ror w8, w8, #15 // Rotate left s=17 bits
179 eor x9, x17, x6 // Begin aux function round 1 F(x,y,z)=(((y^z)&x)^z)
180 add w8, w17, w8 // Add X parameter round 1 C=FF(C, D, A, B, 0xffff5bb1, s=17, M[10])
181 and x9, x9, x8 // Continue aux function round 1 F(x,y,z)=(((y^z)&x)^z)
182 eor x9, x9, x6 // End aux function round 1 F(x,y,z)=(((y^z)&x)^z)
183 movz x11, #0xd7be // Load lower half of constant 0x895cd7be
184 movk x11, #0x895c, lsl #16 // Load upper half of constant 0x895cd7be
185 add w4, w4, w25 // Add dest value
186 add w4, w4, w11 // Add constant 0x895cd7be
187 add w9, w4, w9 // Add aux function result
188 ror w9, w9, #10 // Rotate left s=22 bits
189 eor x4, x8, x17 // Begin aux function round 1 F(x,y,z)=(((y^z)&x)^z)
190 add w9, w8, w9 // Add X parameter round 1 B=FF(B, C, D, A, 0x895cd7be, s=22, M[11])
191 ldp w11, w26, [x1, #48] // Load 2 words of input data0 M[12],M[13]
192 ldp w12, w27, [x1, #56] // Load 2 words of input data0 M[14],M[15]
193 #ifdef __AARCH64EB__
194 rev w11, w11
195 rev w26, w26
196 rev w12, w12
197 rev w27, w27
198 #endif
199 and x4, x4, x9 // Continue aux function round 1 F(x,y,z)=(((y^z)&x)^z)
200 eor x4, x4, x17 // End aux function round 1 F(x,y,z)=(((y^z)&x)^z)
201 movz x19, #0x1122 // Load lower half of constant 0x6b901122
202 movk x19, #0x6b90, lsl #16 // Load upper half of constant 0x6b901122
203 add w6, w6, w11 // Add dest value
204 add w6, w6, w19 // Add constant 0x6b901122
205 add w4, w6, w4 // Add aux function result
206 ror w4, w4, #25 // Rotate left s=7 bits
207 eor x6, x9, x8 // Begin aux function round 1 F(x,y,z)=(((y^z)&x)^z)
208 add w4, w9, w4 // Add X parameter round 1 A=FF(A, B, C, D, 0x6b901122, s=7, M[12])
209 and x6, x6, x4 // Continue aux function round 1 F(x,y,z)=(((y^z)&x)^z)
210 eor x6, x6, x8 // End aux function round 1 F(x,y,z)=(((y^z)&x)^z)
211 movz x19, #0x7193 // Load lower half of constant 0xfd987193
212 movk x19, #0xfd98, lsl #16 // Load upper half of constant 0xfd987193
213 add w17, w17, w26 // Add dest value
214 add w17, w17, w19 // Add constant 0xfd987193
215 add w17, w17, w6 // Add aux function result
216 ror w17, w17, #20 // Rotate left s=12 bits
217 eor x6, x4, x9 // Begin aux function round 1 F(x,y,z)=(((y^z)&x)^z)
218 add w17, w4, w17 // Add X parameter round 1 D=FF(D, A, B, C, 0xfd987193, s=12, M[13])
219 and x6, x6, x17 // Continue aux function round 1 F(x,y,z)=(((y^z)&x)^z)
220 eor x6, x6, x9 // End aux function round 1 F(x,y,z)=(((y^z)&x)^z)
221 movz x13, #0x438e // Load lower half of constant 0xa679438e
222 movk x13, #0xa679, lsl #16 // Load upper half of constant 0xa679438e
223 add w8, w8, w12 // Add dest value
224 add w8, w8, w13 // Add constant 0xa679438e
225 add w8, w8, w6 // Add aux function result
226 ror w8, w8, #15 // Rotate left s=17 bits
227 eor x6, x17, x4 // Begin aux function round 1 F(x,y,z)=(((y^z)&x)^z)
228 add w8, w17, w8 // Add X parameter round 1 C=FF(C, D, A, B, 0xa679438e, s=17, M[14])
229 and x6, x6, x8 // Continue aux function round 1 F(x,y,z)=(((y^z)&x)^z)
230 eor x6, x6, x4 // End aux function round 1 F(x,y,z)=(((y^z)&x)^z)
231 movz x13, #0x821 // Load lower half of constant 0x49b40821
232 movk x13, #0x49b4, lsl #16 // Load upper half of constant 0x49b40821
233 add w9, w9, w27 // Add dest value
234 add w9, w9, w13 // Add constant 0x49b40821
235 add w9, w9, w6 // Add aux function result
236 ror w9, w9, #10 // Rotate left s=22 bits
237 bic x6, x8, x17 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
238 add w9, w8, w9 // Add X parameter round 1 B=FF(B, C, D, A, 0x49b40821, s=22, M[15])
239 and x13, x9, x17 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
240 orr x6, x6, x13 // End aux function round 2 G(x,y,z)=((x&z)|(~z&y))
241 movz x13, #0x2562 // Load lower half of constant 0xf61e2562
242 movk x13, #0xf61e, lsl #16 // Load upper half of constant 0xf61e2562
243 add w4, w4, w20 // Add dest value
244 add w4, w4, w13 // Add constant 0xf61e2562
245 add w4, w4, w6 // Add aux function result
246 ror w4, w4, #27 // Rotate left s=5 bits
247 bic x6, x9, x8 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
248 add w4, w9, w4 // Add X parameter round 2 A=GG(A, B, C, D, 0xf61e2562, s=5, M[1])
249 and x13, x4, x8 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
250 orr x6, x6, x13 // End aux function round 2 G(x,y,z)=((x&z)|(~z&y))
251 movz x13, #0xb340 // Load lower half of constant 0xc040b340
252 movk x13, #0xc040, lsl #16 // Load upper half of constant 0xc040b340
253 add w17, w17, w7 // Add dest value
254 add w17, w17, w13 // Add constant 0xc040b340
255 add w17, w17, w6 // Add aux function result
256 ror w17, w17, #23 // Rotate left s=9 bits
257 bic x6, x4, x9 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
258 add w17, w4, w17 // Add X parameter round 2 D=GG(D, A, B, C, 0xc040b340, s=9, M[6])
259 and x13, x17, x9 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
260 orr x6, x6, x13 // End aux function round 2 G(x,y,z)=((x&z)|(~z&y))
261 movz x13, #0x5a51 // Load lower half of constant 0x265e5a51
262 movk x13, #0x265e, lsl #16 // Load upper half of constant 0x265e5a51
263 add w8, w8, w25 // Add dest value
264 add w8, w8, w13 // Add constant 0x265e5a51
265 add w8, w8, w6 // Add aux function result
266 ror w8, w8, #18 // Rotate left s=14 bits
267 bic x6, x17, x4 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
268 add w8, w17, w8 // Add X parameter round 2 C=GG(C, D, A, B, 0x265e5a51, s=14, M[11])
269 and x13, x8, x4 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
270 orr x6, x6, x13 // End aux function round 2 G(x,y,z)=((x&z)|(~z&y))
271 movz x13, #0xc7aa // Load lower half of constant 0xe9b6c7aa
272 movk x13, #0xe9b6, lsl #16 // Load upper half of constant 0xe9b6c7aa
273 add w9, w9, w15 // Add dest value
274 add w9, w9, w13 // Add constant 0xe9b6c7aa
275 add w9, w9, w6 // Add aux function result
276 ror w9, w9, #12 // Rotate left s=20 bits
277 bic x6, x8, x17 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
278 add w9, w8, w9 // Add X parameter round 2 B=GG(B, C, D, A, 0xe9b6c7aa, s=20, M[0])
279 and x13, x9, x17 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
280 orr x6, x6, x13 // End aux function round 2 G(x,y,z)=((x&z)|(~z&y))
281 movz x13, #0x105d // Load lower half of constant 0xd62f105d
282 movk x13, #0xd62f, lsl #16 // Load upper half of constant 0xd62f105d
283 add w4, w4, w22 // Add dest value
284 add w4, w4, w13 // Add constant 0xd62f105d
285 add w4, w4, w6 // Add aux function result
286 ror w4, w4, #27 // Rotate left s=5 bits
287 bic x6, x9, x8 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
288 add w4, w9, w4 // Add X parameter round 2 A=GG(A, B, C, D, 0xd62f105d, s=5, M[5])
289 and x13, x4, x8 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
290 orr x6, x6, x13 // End aux function round 2 G(x,y,z)=((x&z)|(~z&y))
291 movz x13, #0x1453 // Load lower half of constant 0x2441453
292 movk x13, #0x244, lsl #16 // Load upper half of constant 0x2441453
293 add w17, w17, w16 // Add dest value
294 add w17, w17, w13 // Add constant 0x2441453
295 add w17, w17, w6 // Add aux function result
296 ror w17, w17, #23 // Rotate left s=9 bits
297 bic x6, x4, x9 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
298 add w17, w4, w17 // Add X parameter round 2 D=GG(D, A, B, C, 0x2441453, s=9, M[10])
299 and x13, x17, x9 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
300 orr x6, x6, x13 // End aux function round 2 G(x,y,z)=((x&z)|(~z&y))
301 movz x13, #0xe681 // Load lower half of constant 0xd8a1e681
302 movk x13, #0xd8a1, lsl #16 // Load upper half of constant 0xd8a1e681
303 add w8, w8, w27 // Add dest value
304 add w8, w8, w13 // Add constant 0xd8a1e681
305 add w8, w8, w6 // Add aux function result
306 ror w8, w8, #18 // Rotate left s=14 bits
307 bic x6, x17, x4 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
308 add w8, w17, w8 // Add X parameter round 2 C=GG(C, D, A, B, 0xd8a1e681, s=14, M[15])
309 and x13, x8, x4 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
310 orr x6, x6, x13 // End aux function round 2 G(x,y,z)=((x&z)|(~z&y))
311 movz x13, #0xfbc8 // Load lower half of constant 0xe7d3fbc8
312 movk x13, #0xe7d3, lsl #16 // Load upper half of constant 0xe7d3fbc8
313 add w9, w9, w14 // Add dest value
314 add w9, w9, w13 // Add constant 0xe7d3fbc8
315 add w9, w9, w6 // Add aux function result
316 ror w9, w9, #12 // Rotate left s=20 bits
317 bic x6, x8, x17 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
318 add w9, w8, w9 // Add X parameter round 2 B=GG(B, C, D, A, 0xe7d3fbc8, s=20, M[4])
319 and x13, x9, x17 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
320 orr x6, x6, x13 // End aux function round 2 G(x,y,z)=((x&z)|(~z&y))
321 movz x13, #0xcde6 // Load lower half of constant 0x21e1cde6
322 movk x13, #0x21e1, lsl #16 // Load upper half of constant 0x21e1cde6
323 add w4, w4, w24 // Add dest value
324 add w4, w4, w13 // Add constant 0x21e1cde6
325 add w4, w4, w6 // Add aux function result
326 ror w4, w4, #27 // Rotate left s=5 bits
327 bic x6, x9, x8 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
328 add w4, w9, w4 // Add X parameter round 2 A=GG(A, B, C, D, 0x21e1cde6, s=5, M[9])
329 and x13, x4, x8 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
330 orr x6, x6, x13 // End aux function round 2 G(x,y,z)=((x&z)|(~z&y))
331 movz x13, #0x7d6 // Load lower half of constant 0xc33707d6
332 movk x13, #0xc337, lsl #16 // Load upper half of constant 0xc33707d6
333 add w17, w17, w12 // Add dest value
334 add w17, w17, w13 // Add constant 0xc33707d6
335 add w17, w17, w6 // Add aux function result
336 ror w17, w17, #23 // Rotate left s=9 bits
337 bic x6, x4, x9 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
338 add w17, w4, w17 // Add X parameter round 2 D=GG(D, A, B, C, 0xc33707d6, s=9, M[14])
339 and x13, x17, x9 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
340 orr x6, x6, x13 // End aux function round 2 G(x,y,z)=((x&z)|(~z&y))
341 movz x13, #0xd87 // Load lower half of constant 0xf4d50d87
342 movk x13, #0xf4d5, lsl #16 // Load upper half of constant 0xf4d50d87
343 add w8, w8, w21 // Add dest value
344 add w8, w8, w13 // Add constant 0xf4d50d87
345 add w8, w8, w6 // Add aux function result
346 ror w8, w8, #18 // Rotate left s=14 bits
347 bic x6, x17, x4 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
348 add w8, w17, w8 // Add X parameter round 2 C=GG(C, D, A, B, 0xf4d50d87, s=14, M[3])
349 and x13, x8, x4 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
350 orr x6, x6, x13 // End aux function round 2 G(x,y,z)=((x&z)|(~z&y))
351 movz x13, #0x14ed // Load lower half of constant 0x455a14ed
352 movk x13, #0x455a, lsl #16 // Load upper half of constant 0x455a14ed
353 add w9, w9, w5 // Add dest value
354 add w9, w9, w13 // Add constant 0x455a14ed
355 add w9, w9, w6 // Add aux function result
356 ror w9, w9, #12 // Rotate left s=20 bits
357 bic x6, x8, x17 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
358 add w9, w8, w9 // Add X parameter round 2 B=GG(B, C, D, A, 0x455a14ed, s=20, M[8])
359 and x13, x9, x17 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
360 orr x6, x6, x13 // End aux function round 2 G(x,y,z)=((x&z)|(~z&y))
361 movz x13, #0xe905 // Load lower half of constant 0xa9e3e905
362 movk x13, #0xa9e3, lsl #16 // Load upper half of constant 0xa9e3e905
363 add w4, w4, w26 // Add dest value
364 add w4, w4, w13 // Add constant 0xa9e3e905
365 add w4, w4, w6 // Add aux function result
366 ror w4, w4, #27 // Rotate left s=5 bits
367 bic x6, x9, x8 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
368 add w4, w9, w4 // Add X parameter round 2 A=GG(A, B, C, D, 0xa9e3e905, s=5, M[13])
369 and x13, x4, x8 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
370 orr x6, x6, x13 // End aux function round 2 G(x,y,z)=((x&z)|(~z&y))
371 movz x13, #0xa3f8 // Load lower half of constant 0xfcefa3f8
372 movk x13, #0xfcef, lsl #16 // Load upper half of constant 0xfcefa3f8
373 add w17, w17, w3 // Add dest value
374 add w17, w17, w13 // Add constant 0xfcefa3f8
375 add w17, w17, w6 // Add aux function result
376 ror w17, w17, #23 // Rotate left s=9 bits
377 bic x6, x4, x9 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
378 add w17, w4, w17 // Add X parameter round 2 D=GG(D, A, B, C, 0xfcefa3f8, s=9, M[2])
379 and x13, x17, x9 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
380 orr x6, x6, x13 // End aux function round 2 G(x,y,z)=((x&z)|(~z&y))
381 movz x13, #0x2d9 // Load lower half of constant 0x676f02d9
382 movk x13, #0x676f, lsl #16 // Load upper half of constant 0x676f02d9
383 add w8, w8, w23 // Add dest value
384 add w8, w8, w13 // Add constant 0x676f02d9
385 add w8, w8, w6 // Add aux function result
386 ror w8, w8, #18 // Rotate left s=14 bits
387 bic x6, x17, x4 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
388 add w8, w17, w8 // Add X parameter round 2 C=GG(C, D, A, B, 0x676f02d9, s=14, M[7])
389 and x13, x8, x4 // Aux function round 2 G(x,y,z)=((x&z)|(~z&y))
390 orr x6, x6, x13 // End aux function round 2 G(x,y,z)=((x&z)|(~z&y))
391 movz x13, #0x4c8a // Load lower half of constant 0x8d2a4c8a
392 movk x13, #0x8d2a, lsl #16 // Load upper half of constant 0x8d2a4c8a
393 add w9, w9, w11 // Add dest value
394 add w9, w9, w13 // Add constant 0x8d2a4c8a
395 add w9, w9, w6 // Add aux function result
396 eor x6, x8, x17 // Begin aux function round 3 H(x,y,z)=(x^y^z)
397 ror w9, w9, #12 // Rotate left s=20 bits
398 movz x10, #0x3942 // Load lower half of constant 0xfffa3942
399 add w9, w8, w9 // Add X parameter round 2 B=GG(B, C, D, A, 0x8d2a4c8a, s=20, M[12])
400 movk x10, #0xfffa, lsl #16 // Load upper half of constant 0xfffa3942
401 add w4, w4, w22 // Add dest value
402 eor x6, x6, x9 // End aux function round 3 H(x,y,z)=(x^y^z)
403 add w4, w4, w10 // Add constant 0xfffa3942
404 add w4, w4, w6 // Add aux function result
405 ror w4, w4, #28 // Rotate left s=4 bits
406 eor x6, x9, x8 // Begin aux function round 3 H(x,y,z)=(x^y^z)
407 movz x10, #0xf681 // Load lower half of constant 0x8771f681
408 add w4, w9, w4 // Add X parameter round 3 A=HH(A, B, C, D, 0xfffa3942, s=4, M[5])
409 movk x10, #0x8771, lsl #16 // Load upper half of constant 0x8771f681
410 add w17, w17, w5 // Add dest value
411 eor x6, x6, x4 // End aux function round 3 H(x,y,z)=(x^y^z)
412 add w17, w17, w10 // Add constant 0x8771f681
413 add w17, w17, w6 // Add aux function result
414 eor x6, x4, x9 // Begin aux function round 3 H(x,y,z)=(x^y^z)
415 ror w17, w17, #21 // Rotate left s=11 bits
416 movz x13, #0x6122 // Load lower half of constant 0x6d9d6122
417 add w17, w4, w17 // Add X parameter round 3 D=HH(D, A, B, C, 0x8771f681, s=11, M[8])
418 movk x13, #0x6d9d, lsl #16 // Load upper half of constant 0x6d9d6122
419 add w8, w8, w25 // Add dest value
420 eor x6, x6, x17 // End aux function round 3 H(x,y,z)=(x^y^z)
421 add w8, w8, w13 // Add constant 0x6d9d6122
422 add w8, w8, w6 // Add aux function result
423 ror w8, w8, #16 // Rotate left s=16 bits
424 eor x6, x17, x4 // Begin aux function round 3 H(x,y,z)=(x^y^z)
425 movz x13, #0x380c // Load lower half of constant 0xfde5380c
426 add w8, w17, w8 // Add X parameter round 3 C=HH(C, D, A, B, 0x6d9d6122, s=16, M[11])
427 movk x13, #0xfde5, lsl #16 // Load upper half of constant 0xfde5380c
428 add w9, w9, w12 // Add dest value
429 eor x6, x6, x8 // End aux function round 3 H(x,y,z)=(x^y^z)
430 add w9, w9, w13 // Add constant 0xfde5380c
431 add w9, w9, w6 // Add aux function result
432 eor x6, x8, x17 // Begin aux function round 3 H(x,y,z)=(x^y^z)
433 ror w9, w9, #9 // Rotate left s=23 bits
434 movz x10, #0xea44 // Load lower half of constant 0xa4beea44
435 add w9, w8, w9 // Add X parameter round 3 B=HH(B, C, D, A, 0xfde5380c, s=23, M[14])
436 movk x10, #0xa4be, lsl #16 // Load upper half of constant 0xa4beea44
437 add w4, w4, w20 // Add dest value
438 eor x6, x6, x9 // End aux function round 3 H(x,y,z)=(x^y^z)
439 add w4, w4, w10 // Add constant 0xa4beea44
440 add w4, w4, w6 // Add aux function result
441 ror w4, w4, #28 // Rotate left s=4 bits
442 eor x6, x9, x8 // Begin aux function round 3 H(x,y,z)=(x^y^z)
443 movz x10, #0xcfa9 // Load lower half of constant 0x4bdecfa9
444 add w4, w9, w4 // Add X parameter round 3 A=HH(A, B, C, D, 0xa4beea44, s=4, M[1])
445 movk x10, #0x4bde, lsl #16 // Load upper half of constant 0x4bdecfa9
446 add w17, w17, w14 // Add dest value
447 eor x6, x6, x4 // End aux function round 3 H(x,y,z)=(x^y^z)
448 add w17, w17, w10 // Add constant 0x4bdecfa9
449 add w17, w17, w6 // Add aux function result
450 eor x6, x4, x9 // Begin aux function round 3 H(x,y,z)=(x^y^z)
451 ror w17, w17, #21 // Rotate left s=11 bits
452 movz x13, #0x4b60 // Load lower half of constant 0xf6bb4b60
453 add w17, w4, w17 // Add X parameter round 3 D=HH(D, A, B, C, 0x4bdecfa9, s=11, M[4])
454 movk x13, #0xf6bb, lsl #16 // Load upper half of constant 0xf6bb4b60
455 add w8, w8, w23 // Add dest value
456 eor x6, x6, x17 // End aux function round 3 H(x,y,z)=(x^y^z)
457 add w8, w8, w13 // Add constant 0xf6bb4b60
458 add w8, w8, w6 // Add aux function result
459 ror w8, w8, #16 // Rotate left s=16 bits
460 eor x6, x17, x4 // Begin aux function round 3 H(x,y,z)=(x^y^z)
461 movz x13, #0xbc70 // Load lower half of constant 0xbebfbc70
462 add w8, w17, w8 // Add X parameter round 3 C=HH(C, D, A, B, 0xf6bb4b60, s=16, M[7])
463 movk x13, #0xbebf, lsl #16 // Load upper half of constant 0xbebfbc70
464 add w9, w9, w16 // Add dest value
465 eor x6, x6, x8 // End aux function round 3 H(x,y,z)=(x^y^z)
466 add w9, w9, w13 // Add constant 0xbebfbc70
467 add w9, w9, w6 // Add aux function result
468 eor x6, x8, x17 // Begin aux function round 3 H(x,y,z)=(x^y^z)
469 ror w9, w9, #9 // Rotate left s=23 bits
470 movz x10, #0x7ec6 // Load lower half of constant 0x289b7ec6
471 add w9, w8, w9 // Add X parameter round 3 B=HH(B, C, D, A, 0xbebfbc70, s=23, M[10])
472 movk x10, #0x289b, lsl #16 // Load upper half of constant 0x289b7ec6
473 add w4, w4, w26 // Add dest value
474 eor x6, x6, x9 // End aux function round 3 H(x,y,z)=(x^y^z)
475 add w4, w4, w10 // Add constant 0x289b7ec6
476 add w4, w4, w6 // Add aux function result
477 ror w4, w4, #28 // Rotate left s=4 bits
478 eor x6, x9, x8 // Begin aux function round 3 H(x,y,z)=(x^y^z)
479 movz x10, #0x27fa // Load lower half of constant 0xeaa127fa
480 add w4, w9, w4 // Add X parameter round 3 A=HH(A, B, C, D, 0x289b7ec6, s=4, M[13])
481 movk x10, #0xeaa1, lsl #16 // Load upper half of constant 0xeaa127fa
482 add w17, w17, w15 // Add dest value
483 eor x6, x6, x4 // End aux function round 3 H(x,y,z)=(x^y^z)
484 add w17, w17, w10 // Add constant 0xeaa127fa
485 add w17, w17, w6 // Add aux function result
486 eor x6, x4, x9 // Begin aux function round 3 H(x,y,z)=(x^y^z)
487 ror w17, w17, #21 // Rotate left s=11 bits
488 movz x13, #0x3085 // Load lower half of constant 0xd4ef3085
489 add w17, w4, w17 // Add X parameter round 3 D=HH(D, A, B, C, 0xeaa127fa, s=11, M[0])
490 movk x13, #0xd4ef, lsl #16 // Load upper half of constant 0xd4ef3085
491 add w8, w8, w21 // Add dest value
492 eor x6, x6, x17 // End aux function round 3 H(x,y,z)=(x^y^z)
493 add w8, w8, w13 // Add constant 0xd4ef3085
494 add w8, w8, w6 // Add aux function result
495 ror w8, w8, #16 // Rotate left s=16 bits
496 eor x6, x17, x4 // Begin aux function round 3 H(x,y,z)=(x^y^z)
497 movz x13, #0x1d05 // Load lower half of constant 0x4881d05
498 add w8, w17, w8 // Add X parameter round 3 C=HH(C, D, A, B, 0xd4ef3085, s=16, M[3])
499 movk x13, #0x488, lsl #16 // Load upper half of constant 0x4881d05
500 add w9, w9, w7 // Add dest value
501 eor x6, x6, x8 // End aux function round 3 H(x,y,z)=(x^y^z)
502 add w9, w9, w13 // Add constant 0x4881d05
503 add w9, w9, w6 // Add aux function result
504 eor x6, x8, x17 // Begin aux function round 3 H(x,y,z)=(x^y^z)
505 ror w9, w9, #9 // Rotate left s=23 bits
506 movz x10, #0xd039 // Load lower half of constant 0xd9d4d039
507 add w9, w8, w9 // Add X parameter round 3 B=HH(B, C, D, A, 0x4881d05, s=23, M[6])
508 movk x10, #0xd9d4, lsl #16 // Load upper half of constant 0xd9d4d039
509 add w4, w4, w24 // Add dest value
510 eor x6, x6, x9 // End aux function round 3 H(x,y,z)=(x^y^z)
511 add w4, w4, w10 // Add constant 0xd9d4d039
512 add w4, w4, w6 // Add aux function result
513 ror w4, w4, #28 // Rotate left s=4 bits
514 eor x6, x9, x8 // Begin aux function round 3 H(x,y,z)=(x^y^z)
515 movz x10, #0x99e5 // Load lower half of constant 0xe6db99e5
516 add w4, w9, w4 // Add X parameter round 3 A=HH(A, B, C, D, 0xd9d4d039, s=4, M[9])
517 movk x10, #0xe6db, lsl #16 // Load upper half of constant 0xe6db99e5
518 add w17, w17, w11 // Add dest value
519 eor x6, x6, x4 // End aux function round 3 H(x,y,z)=(x^y^z)
520 add w17, w17, w10 // Add constant 0xe6db99e5
521 add w17, w17, w6 // Add aux function result
522 eor x6, x4, x9 // Begin aux function round 3 H(x,y,z)=(x^y^z)
523 ror w17, w17, #21 // Rotate left s=11 bits
524 movz x13, #0x7cf8 // Load lower half of constant 0x1fa27cf8
525 add w17, w4, w17 // Add X parameter round 3 D=HH(D, A, B, C, 0xe6db99e5, s=11, M[12])
526 movk x13, #0x1fa2, lsl #16 // Load upper half of constant 0x1fa27cf8
527 add w8, w8, w27 // Add dest value
528 eor x6, x6, x17 // End aux function round 3 H(x,y,z)=(x^y^z)
529 add w8, w8, w13 // Add constant 0x1fa27cf8
530 add w8, w8, w6 // Add aux function result
531 ror w8, w8, #16 // Rotate left s=16 bits
532 eor x6, x17, x4 // Begin aux function round 3 H(x,y,z)=(x^y^z)
533 movz x13, #0x5665 // Load lower half of constant 0xc4ac5665
534 add w8, w17, w8 // Add X parameter round 3 C=HH(C, D, A, B, 0x1fa27cf8, s=16, M[15])
535 movk x13, #0xc4ac, lsl #16 // Load upper half of constant 0xc4ac5665
536 add w9, w9, w3 // Add dest value
537 eor x6, x6, x8 // End aux function round 3 H(x,y,z)=(x^y^z)
538 add w9, w9, w13 // Add constant 0xc4ac5665
539 add w9, w9, w6 // Add aux function result
540 ror w9, w9, #9 // Rotate left s=23 bits
541 movz x6, #0x2244 // Load lower half of constant 0xf4292244
542 movk x6, #0xf429, lsl #16 // Load upper half of constant 0xf4292244
543 add w9, w8, w9 // Add X parameter round 3 B=HH(B, C, D, A, 0xc4ac5665, s=23, M[2])
544 add w4, w4, w15 // Add dest value
545 orn x13, x9, x17 // Begin aux function round 4 I(x,y,z)=((~z|x)^y)
546 add w4, w4, w6 // Add constant 0xf4292244
547 eor x6, x8, x13 // End aux function round 4 I(x,y,z)=((~z|x)^y)
548 add w4, w4, w6 // Add aux function result
549 ror w4, w4, #26 // Rotate left s=6 bits
550 movz x6, #0xff97 // Load lower half of constant 0x432aff97
551 movk x6, #0x432a, lsl #16 // Load upper half of constant 0x432aff97
552 add w4, w9, w4 // Add X parameter round 4 A=II(A, B, C, D, 0xf4292244, s=6, M[0])
553 orn x10, x4, x8 // Begin aux function round 4 I(x,y,z)=((~z|x)^y)
554 add w17, w17, w23 // Add dest value
555 eor x10, x9, x10 // End aux function round 4 I(x,y,z)=((~z|x)^y)
556 add w17, w17, w6 // Add constant 0x432aff97
557 add w6, w17, w10 // Add aux function result
558 ror w6, w6, #22 // Rotate left s=10 bits
559 movz x17, #0x23a7 // Load lower half of constant 0xab9423a7
560 movk x17, #0xab94, lsl #16 // Load upper half of constant 0xab9423a7
561 add w6, w4, w6 // Add X parameter round 4 D=II(D, A, B, C, 0x432aff97, s=10, M[7])
562 add w8, w8, w12 // Add dest value
563 orn x10, x6, x9 // Begin aux function round 4 I(x,y,z)=((~z|x)^y)
564 add w8, w8, w17 // Add constant 0xab9423a7
565 eor x17, x4, x10 // End aux function round 4 I(x,y,z)=((~z|x)^y)
566 add w8, w8, w17 // Add aux function result
567 ror w8, w8, #17 // Rotate left s=15 bits
568 movz x17, #0xa039 // Load lower half of constant 0xfc93a039
569 movk x17, #0xfc93, lsl #16 // Load upper half of constant 0xfc93a039
570 add w8, w6, w8 // Add X parameter round 4 C=II(C, D, A, B, 0xab9423a7, s=15, M[14])
571 orn x13, x8, x4 // Begin aux function round 4 I(x,y,z)=((~z|x)^y)
572 add w9, w9, w22 // Add dest value
573 eor x13, x6, x13 // End aux function round 4 I(x,y,z)=((~z|x)^y)
574 add w9, w9, w17 // Add constant 0xfc93a039
575 add w17, w9, w13 // Add aux function result
576 ror w17, w17, #11 // Rotate left s=21 bits
577 movz x9, #0x59c3 // Load lower half of constant 0x655b59c3
578 movk x9, #0x655b, lsl #16 // Load upper half of constant 0x655b59c3
579 add w17, w8, w17 // Add X parameter round 4 B=II(B, C, D, A, 0xfc93a039, s=21, M[5])
580 add w4, w4, w11 // Add dest value
581 orn x13, x17, x6 // Begin aux function round 4 I(x,y,z)=((~z|x)^y)
582 add w9, w4, w9 // Add constant 0x655b59c3
583 eor x4, x8, x13 // End aux function round 4 I(x,y,z)=((~z|x)^y)
584 add w9, w9, w4 // Add aux function result
585 ror w9, w9, #26 // Rotate left s=6 bits
586 movz x4, #0xcc92 // Load lower half of constant 0x8f0ccc92
587 movk x4, #0x8f0c, lsl #16 // Load upper half of constant 0x8f0ccc92
588 add w9, w17, w9 // Add X parameter round 4 A=II(A, B, C, D, 0x655b59c3, s=6, M[12])
589 orn x10, x9, x8 // Begin aux function round 4 I(x,y,z)=((~z|x)^y)
590 add w6, w6, w21 // Add dest value
591 eor x10, x17, x10 // End aux function round 4 I(x,y,z)=((~z|x)^y)
592 add w4, w6, w4 // Add constant 0x8f0ccc92
593 add w6, w4, w10 // Add aux function result
594 ror w6, w6, #22 // Rotate left s=10 bits
595 movz x4, #0xf47d // Load lower half of constant 0xffeff47d
596 movk x4, #0xffef, lsl #16 // Load upper half of constant 0xffeff47d
597 add w6, w9, w6 // Add X parameter round 4 D=II(D, A, B, C, 0x8f0ccc92, s=10, M[3])
598 add w8, w8, w16 // Add dest value
599 orn x10, x6, x17 // Begin aux function round 4 I(x,y,z)=((~z|x)^y)
600 add w8, w8, w4 // Add constant 0xffeff47d
601 eor x4, x9, x10 // End aux function round 4 I(x,y,z)=((~z|x)^y)
602 add w8, w8, w4 // Add aux function result
603 ror w8, w8, #17 // Rotate left s=15 bits
604 movz x4, #0x5dd1 // Load lower half of constant 0x85845dd1
605 movk x4, #0x8584, lsl #16 // Load upper half of constant 0x85845dd1
606 add w8, w6, w8 // Add X parameter round 4 C=II(C, D, A, B, 0xffeff47d, s=15, M[10])
607 orn x10, x8, x9 // Begin aux function round 4 I(x,y,z)=((~z|x)^y)
608 add w15, w17, w20 // Add dest value
609 eor x17, x6, x10 // End aux function round 4 I(x,y,z)=((~z|x)^y)
610 add w15, w15, w4 // Add constant 0x85845dd1
611 add w4, w15, w17 // Add aux function result
612 ror w4, w4, #11 // Rotate left s=21 bits
613 movz x15, #0x7e4f // Load lower half of constant 0x6fa87e4f
614 movk x15, #0x6fa8, lsl #16 // Load upper half of constant 0x6fa87e4f
615 add w17, w8, w4 // Add X parameter round 4 B=II(B, C, D, A, 0x85845dd1, s=21, M[1])
616 add w4, w9, w5 // Add dest value
617 orn x9, x17, x6 // Begin aux function round 4 I(x,y,z)=((~z|x)^y)
618 add w15, w4, w15 // Add constant 0x6fa87e4f
619 eor x4, x8, x9 // End aux function round 4 I(x,y,z)=((~z|x)^y)
620 add w9, w15, w4 // Add aux function result
621 ror w9, w9, #26 // Rotate left s=6 bits
622 movz x15, #0xe6e0 // Load lower half of constant 0xfe2ce6e0
623 movk x15, #0xfe2c, lsl #16 // Load upper half of constant 0xfe2ce6e0
624 add w4, w17, w9 // Add X parameter round 4 A=II(A, B, C, D, 0x6fa87e4f, s=6, M[8])
625 orn x9, x4, x8 // Begin aux function round 4 I(x,y,z)=((~z|x)^y)
626 add w6, w6, w27 // Add dest value
627 eor x9, x17, x9 // End aux function round 4 I(x,y,z)=((~z|x)^y)
628 add w15, w6, w15 // Add constant 0xfe2ce6e0
629 add w6, w15, w9 // Add aux function result
630 ror w6, w6, #22 // Rotate left s=10 bits
631 movz x9, #0x4314 // Load lower half of constant 0xa3014314
632 movk x9, #0xa301, lsl #16 // Load upper half of constant 0xa3014314
633 add w15, w4, w6 // Add X parameter round 4 D=II(D, A, B, C, 0xfe2ce6e0, s=10, M[15])
634 add w6, w8, w7 // Add dest value
635 orn x7, x15, x17 // Begin aux function round 4 I(x,y,z)=((~z|x)^y)
636 add w8, w6, w9 // Add constant 0xa3014314
637 eor x9, x4, x7 // End aux function round 4 I(x,y,z)=((~z|x)^y)
638 add w6, w8, w9 // Add aux function result
639 ror w6, w6, #17 // Rotate left s=15 bits
640 movz x7, #0x11a1 // Load lower half of constant 0x4e0811a1
641 movk x7, #0x4e08, lsl #16 // Load upper half of constant 0x4e0811a1
642 add w8, w15, w6 // Add X parameter round 4 C=II(C, D, A, B, 0xa3014314, s=15, M[6])
643 orn x9, x8, x4 // Begin aux function round 4 I(x,y,z)=((~z|x)^y)
644 add w6, w17, w26 // Add dest value
645 eor x17, x15, x9 // End aux function round 4 I(x,y,z)=((~z|x)^y)
646 add w9, w6, w7 // Add constant 0x4e0811a1
647 add w7, w9, w17 // Add aux function result
648 ror w7, w7, #11 // Rotate left s=21 bits
649 movz x6, #0x7e82 // Load lower half of constant 0xf7537e82
650 movk x6, #0xf753, lsl #16 // Load upper half of constant 0xf7537e82
651 add w9, w8, w7 // Add X parameter round 4 B=II(B, C, D, A, 0x4e0811a1, s=21, M[13])
652 add w17, w4, w14 // Add dest value
653 orn x7, x9, x15 // Begin aux function round 4 I(x,y,z)=((~z|x)^y)
654 add w14, w17, w6 // Add constant 0xf7537e82
655 eor x4, x8, x7 // End aux function round 4 I(x,y,z)=((~z|x)^y)
656 add w17, w14, w4 // Add aux function result
657 ror w17, w17, #26 // Rotate left s=6 bits
658 movz x6, #0xf235 // Load lower half of constant 0xbd3af235
659 movk x6, #0xbd3a, lsl #16 // Load upper half of constant 0xbd3af235
660 add w7, w9, w17 // Add X parameter round 4 A=II(A, B, C, D, 0xf7537e82, s=6, M[4])
661 orn x14, x7, x8 // Begin aux function round 4 I(x,y,z)=((~z|x)^y)
662 add w4, w15, w25 // Add dest value
663 eor x17, x9, x14 // End aux function round 4 I(x,y,z)=((~z|x)^y)
664 add w15, w4, w6 // Add constant 0xbd3af235
665 add w16, w15, w17 // Add aux function result
666 ror w16, w16, #22 // Rotate left s=10 bits
667 movz x14, #0xd2bb // Load lower half of constant 0x2ad7d2bb
668 movk x14, #0x2ad7, lsl #16 // Load upper half of constant 0x2ad7d2bb
669 add w4, w7, w16 // Add X parameter round 4 D=II(D, A, B, C, 0xbd3af235, s=10, M[11])
670 add w6, w8, w3 // Add dest value
671 orn x15, x4, x9 // Begin aux function round 4 I(x,y,z)=((~z|x)^y)
672 add w17, w6, w14 // Add constant 0x2ad7d2bb
673 eor x16, x7, x15 // End aux function round 4 I(x,y,z)=((~z|x)^y)
674 add w8, w17, w16 // Add aux function result
675 ror w8, w8, #17 // Rotate left s=15 bits
676 movz x3, #0xd391 // Load lower half of constant 0xeb86d391
677 movk x3, #0xeb86, lsl #16 // Load upper half of constant 0xeb86d391
678 add w14, w4, w8 // Add X parameter round 4 C=II(C, D, A, B, 0x2ad7d2bb, s=15, M[2])
679 orn x6, x14, x7 // Begin aux function round 4 I(x,y,z)=((~z|x)^y)
680 add w15, w9, w24 // Add dest value
681 eor x17, x4, x6 // End aux function round 4 I(x,y,z)=((~z|x)^y)
682 add w16, w15, w3 // Add constant 0xeb86d391
683 add w8, w16, w17 // Add aux function result
684 ror w8, w8, #11 // Rotate left s=21 bits
685 ldp w6, w15, [x0] // Reload MD5 state->A and state->B
686 ldp w5, w9, [x0, #8] // Reload MD5 state->C and state->D
687 add w3, w14, w8 // Add X parameter round 4 B=II(B, C, D, A, 0xeb86d391, s=21, M[9])
688 add w13, w4, w9 // Add result of MD5 rounds to state->D
689 add w12, w14, w5 // Add result of MD5 rounds to state->C
690 add w10, w7, w6 // Add result of MD5 rounds to state->A
691 add w11, w3, w15 // Add result of MD5 rounds to state->B
692 stp w12, w13, [x0, #8] // Store MD5 states C,D
693 stp w10, w11, [x0] // Store MD5 states A,B
694 add x1, x1, #64 // Increment data pointer
695 subs w2, w2, #1 // Decrement block counter
696 b.ne ossl_md5_blocks_loop
697
698 ldp x21,x22,[sp,#16]
699 ldp x23,x24,[sp,#32]
700 ldp x25,x26,[sp,#48]
701 ldp x27,x28,[sp,#64]
702 ldp x19,x20,[sp],#80
703 ret
704
705 EOF
706
707 # EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame,
708 # CONTEXT *context,DISPATCHER_CONTEXT *disp)
709
710 print $code;
711
712 close STDOUT or die "error closing STDOUT: $!";