From ed95a82bb46956bc184e3c270d7ab4de98f7749c Mon Sep 17 00:00:00 2001 From: RyuaNerin Date: Mon, 1 Jan 2024 15:40:56 +0900 Subject: [PATCH] temp --- .github/workflows/go-test.yml | 23 +- .vscode/settings.json | 19 + lea/amd64_c2goasm/Makefile | 6 +- lea/amd64_c2goasm/lea_init.go | 14 + lea/amd64_c2goasm/src/lea_init.c | 800 ++++++ lea/arm64_goat/Makefile | 5 +- lea/arm64_goat/src/lea_arm64.c | 802 ++++++ lea/lea_arm64.go | 34 + lea/lea_arm64.s | 3495 +++++++++++++++++++++++++++ lea/lea_arm64_neon_stubs.go | 12 + lea/lea_arm64_stubs.go | 7 +- lea/lea_asm.go | 3 + lea/test_arm64_test.go | 26 +- lea/test_asm_test.go | 48 - lea/test_test.go | 96 + lsh256/arm64_goat/src/lsh256_neon.c | 1176 +++++++++ lsh256/arm64_goat/src/lsh256_neon.h | 104 + lsh256/arm64_goat/src/lsh256_neon.o | Bin 0 -> 6192 bytes lsh256/arm64_goat/src/lsh256_neon.s | 1344 ++++++++++ lsh256/arm64_goat/src/memcpy.h | 0 20 files changed, 7953 insertions(+), 61 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 lea/amd64_c2goasm/lea_init.go create mode 100644 lea/amd64_c2goasm/src/lea_init.c create mode 100644 lea/arm64_goat/src/lea_arm64.c create mode 100644 lea/lea_arm64.s create mode 100644 lea/lea_arm64_neon_stubs.go delete mode 100644 lea/test_asm_test.go create mode 100644 lsh256/arm64_goat/src/lsh256_neon.c create mode 100644 lsh256/arm64_goat/src/lsh256_neon.h create mode 100644 lsh256/arm64_goat/src/lsh256_neon.o create mode 100644 lsh256/arm64_goat/src/lsh256_neon.s create mode 100644 lsh256/arm64_goat/src/memcpy.h diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 3dcd5df..98ff76c 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -7,11 +7,32 @@ on: branches: [ avo ] jobs: - build: + test_amd64: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.14' + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... + + test_arm64: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: arm64 + - name: Set up Go uses: actions/setup-go@v4 with: diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..17563c6 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,19 @@ +{ + "terminal.integrated.env.osx": { + "PATH" : "/opt/homebrew/opt/binutils/bin/:/opt/homebrew/opt/llvm/bin:${env:PATH}", + "LDFLAGS" : "-L/opt/homebrew/opt/llvm/lib", + "CPPFLAGS": "-I/opt/homebrew/opt/llvm/include", + }, + "terminal.integrated.env.linux": { + "PATH" : "/opt/homebrew/opt/binutils/bin/:/opt/homebrew/opt/llvm/bin:${env:PATH}", + "LDFLAGS" : "-L/opt/homebrew/opt/llvm/lib", + "CPPFLAGS": "-I/opt/homebrew/opt/llvm/include", + }, + "files.associations": { + "*.py": "python", + "*.js": "javascript", + "*.rmd": "markdown", + "__config": "c", + "emmintrin.h": "c" + }, +} \ No newline at end of file diff --git a/lea/amd64_c2goasm/Makefile b/lea/amd64_c2goasm/Makefile index 1fabbf4..d8d5380 100644 --- a/lea/amd64_c2goasm/Makefile +++ b/lea/amd64_c2goasm/Makefile @@ -13,7 +13,7 @@ CFLAGS_SSSE3=${CFLAGS_SSE2} -mssse3 CFLAGS_AVX2=${CFLAGS_SSSE3} -mavx -mavx2 -all: sse2 avx2 +all: sse2 avx2 init sse2: ${CC} ${CFLAGS} ${CFLAGS_ARCH} ${CFLAGS_SSE2} -S src/lea_sse2.c -o src/lea_sse2.s @@ -22,3 +22,7 @@ sse2: avx2: ${CC} ${CFLAGS} ${CFLAGS_ARCH} ${CFLAGS_AVX2} -S src/lea_avx2.c -o src/lea_avx2.s ${C2GOASM} -a -f src/lea_avx2.s lea_amd64_avx2.s + +init: + ${CC} ${CFLAGS} ${CFLAGS_ARCH} ${CFLAGS_SSE2} -S src/lea_init.c -o src/lea_init.s + ${C2GOASM} -a -f src/lea_init.s lea_init.s diff --git a/lea/amd64_c2goasm/lea_init.go b/lea/amd64_c2goasm/lea_init.go new file mode 100644 index 0000000..301431c --- /dev/null +++ b/lea/amd64_c2goasm/lea_init.go @@ -0,0 +1,14 @@ +//go:build amd64 && gc && !purego + +package lea + +import "unsafe" + +//go:noescape +func __lea_set_key_generic(rk, round, mk unsafe.Pointer, mk_len uint64) + +//go:noescape +func __lea_encrypt(ct, pt, rk unsafe.Pointer, round uint64) + +//go:noescape +func __lea_decrypt(pt, ct, rk unsafe.Pointer, round uint64) diff --git a/lea/amd64_c2goasm/src/lea_init.c b/lea/amd64_c2goasm/src/lea_init.c new file mode 100644 index 0000000..38624e8 --- /dev/null +++ b/lea/amd64_c2goasm/src/lea_init.c @@ -0,0 +1,800 @@ +#include +#define ROR(W,i) (((W) >> (i)) | ((W) << (32 - (i)))) +#define ROL(W,i) (((W) << (i)) | ((W) >> (32 - (i)))) + +#define loadU32(v) (v) + + +static const unsigned int delta[8][36] = { + {0xc3efe9db, 0x87dfd3b7, 0x0fbfa76f, 0x1f7f4ede, 0x3efe9dbc, 0x7dfd3b78, 0xfbfa76f0, 0xf7f4ede1, + 0xefe9dbc3, 0xdfd3b787, 0xbfa76f0f, 0x7f4ede1f, 0xfe9dbc3e, 0xfd3b787d, 0xfa76f0fb, 0xf4ede1f7, + 0xe9dbc3ef, 0xd3b787df, 0xa76f0fbf, 0x4ede1f7f, 0x9dbc3efe, 0x3b787dfd, 0x76f0fbfa, 0xede1f7f4, + 0xdbc3efe9, 0xb787dfd3, 0x6f0fbfa7, 0xde1f7f4e, 0xbc3efe9d, 0x787dfd3b, 0xf0fbfa76, 0xe1f7f4eD, + 0xc3efe9db, 0x87dfd3b7, 0x0fbfa76f, 0x1f7f4ede}, + {0x44626b02, 0x88c4d604, 0x1189ac09, 0x23135812, 0x4626b024, 0x8c4d6048, 0x189ac091, 0x31358122, + 0x626b0244, 0xc4d60488, 0x89ac0911, 0x13581223, 0x26b02446, 0x4d60488c, 0x9ac09118, 0x35812231, + 0x6b024462, 0xd60488c4, 0xac091189, 0x58122313, 0xb0244626, 0x60488c4d, 0xc091189a, 0x81223135, + 0x0244626b, 0x0488c4d6, 0x091189ac, 0x12231358, 0x244626b0, 0x488c4d60, 0x91189ac0, 0x22313581, + 0x44626b02, 0x88c4d604, 0x1189ac09, 0x23135812}, + {0x79e27c8a, 0xf3c4f914, 0xe789f229, 0xcf13e453, 0x9e27c8a7, 0x3c4f914f, 0x789f229e, 0xf13e453c, + 0xe27c8a79, 0xc4f914f3, 0x89f229e7, 0x13e453cf, 0x27c8a79e, 0x4f914f3c, 0x9f229e78, 0x3e453cf1, + 0x7c8a79e2, 0xf914f3c4, 0xf229e789, 0xe453cf13, 0xc8a79e27, 0x914f3c4f, 0x229e789f, 0x453cf13e, + 0x8a79e27c, 0x14f3c4f9, 0x29e789f2, 0x53cf13e4, 0xa79e27c8, 0x4f3c4f91, 0x9e789f22, 0x3cf13e45, + 0x79e27c8a, 0xf3c4f914, 0xe789f229, 0xcf13e453}, + {0x78df30ec, 0xf1be61d8, 0xe37cc3b1, 0xc6f98763, 0x8df30ec7, 0x1be61d8f, 0x37cc3b1e, 0x6f98763c, + 0xdf30ec78, 0xbe61d8f1, 0x7cc3b1e3, 0xf98763c6, 0xf30ec78d, 0xe61d8f1b, 0xcc3b1e37, 0x98763c6f, + 0x30ec78df, 0x61d8f1be, 0xc3b1e37c, 0x8763c6f9, 0x0ec78df3, 0x1d8f1be6, 0x3b1e37cc, 0x763c6f98, + 0xec78df30, 0xd8f1be61, 0xb1e37cc3, 0x63c6f987, 0xc78df30e, 0x8f1be61d, 0x1e37cc3b, 0x3c6f9876, + 0x78df30ec, 0xf1be61d8, 0xe37cc3b1, 0xc6f98763}, + {0x715ea49e, 0xe2bd493c, 0xc57a9279, 0x8af524f3, 0x15ea49e7, 0x2bd493ce, 0x57a9279c, 0xaf524f38, + 0x5ea49e71, 0xbd493ce2, 0x7a9279c5, 0xf524f38a, 0xea49e715, 0xd493ce2b, 0xa9279c57, 0x524f38af, + 0xa49e715e, 0x493ce2bd, 0x9279c57a, 0x24f38af5, 0x49e715ea, 0x93ce2bd4, 0x279c57a9, 0x4f38af52, + 0x9e715ea4, 0x3ce2bd49, 0x79c57a92, 0xf38af524, 0xe715ea49, 0xce2bd493, 0x9c57a927, 0x38af524f, + 0x715ea49e, 0xe2bd493c, 0xc57a9279, 0x8af524f3}, + {0xc785da0a, 0x8f0bb415, 0x1e17682b, 0x3c2ed056, 0x785da0ac, 0xf0bb4158, 0xe17682b1, 0xc2ed0563, + 0x85da0ac7, 0x0bb4158f, 0x17682b1e, 0x2ed0563c, 0x5da0ac78, 0xbb4158f0, 0x7682b1e1, 0xed0563c2, + 0xda0ac785, 0xb4158f0b, 0x682b1e17, 0xd0563c2e, 0xa0ac785d, 0x4158f0bb, 0x82b1e176, 0x0563c2ed, + 0x0ac785da, 0x158f0bb4, 0x2b1e1768, 0x563c2ed0, 0xac785da0, 0x58f0bb41, 0xb1e17682, 0x63c2ed05, + 0xc785da0a, 0x8f0bb415, 0x1e17682b, 0x3c2ed056}, + {0xe04ef22a, 0xc09de455, 0x813bc8ab, 0x02779157, 0x04ef22ae, 0x09de455c, 0x13bc8ab8, 0x27791570, + 0x4ef22ae0, 0x9de455c0, 0x3bc8ab81, 0x77915702, 0xef22ae04, 0xde455c09, 0xbc8ab813, 0x79157027, + 0xf22ae04e, 0xe455c09d, 0xc8ab813b, 0x91570277, 0x22ae04ef, 0x455c09de, 0x8ab813bc, 0x15702779, + 0x2ae04ef2, 0x55c09de4, 0xab813bc8, 0x57027791, 0xae04ef22, 0x5c09de45, 0xb813bc8a, 0x70277915, + 0xe04ef22a, 0xc09de455, 0x813bc8ab, 0x02779157}, + {0xe5c40957, 0xcb8812af, 0x9710255f, 0x2e204abf, 0x5c40957e, 0xb8812afc, 0x710255f9, 0xe204abf2, + 0xc40957e5, 0x8812afcb, 0x10255f97, 0x204abf2e, 0x40957e5c, 0x812afcb8, 0x0255f971, 0x04abf2e2, + 0x0957e5c4, 0x12afcb88, 0x255f9710, 0x4abf2e20, 0x957e5c40, 0x2afcb881, 0x55f97102, 0xabf2e204, + 0x57e5c409, 0xafcb8812, 0x5f971025, 0xbf2e204a, 0x7e5c4095, 0xfcb8812a, 0xf9710255, 0xf2e204ab, + 0xe5c40957, 0xcb8812af, 0x9710255f, 0x2e204abf} +}; + +void lea_set_key_generic(unsigned int *rk, unsigned long *round, const unsigned char *mk, unsigned long mk_len) +{ + const unsigned int* _mk = (const unsigned int*)mk; + switch(mk_len) + { + case 16: + rk[ 0] = ROL(loadU32(_mk[0]) + delta[0][ 0], 1); + rk[ 6] = ROL(rk[ 0] + delta[1][ 1], 1); + rk[ 12] = ROL(rk[ 6] + delta[2][ 2], 1); + rk[ 18] = ROL(rk[ 12] + delta[3][ 3], 1); + rk[ 24] = ROL(rk[ 18] + delta[0][ 4], 1); + rk[ 30] = ROL(rk[ 24] + delta[1][ 5], 1); + rk[ 36] = ROL(rk[ 30] + delta[2][ 6], 1); + rk[ 42] = ROL(rk[ 36] + delta[3][ 7], 1); + rk[ 48] = ROL(rk[ 42] + delta[0][ 8], 1); + rk[ 54] = ROL(rk[ 48] + delta[1][ 9], 1); + rk[ 60] = ROL(rk[ 54] + delta[2][10], 1); + rk[ 66] = ROL(rk[ 60] + delta[3][11], 1); + rk[ 72] = ROL(rk[ 66] + delta[0][12], 1); + rk[ 78] = ROL(rk[ 72] + delta[1][13], 1); + rk[ 84] = ROL(rk[ 78] + delta[2][14], 1); + rk[ 90] = ROL(rk[ 84] + delta[3][15], 1); + rk[ 96] = ROL(rk[ 90] + delta[0][16], 1); + rk[102] = ROL(rk[ 96] + delta[1][17], 1); + rk[108] = ROL(rk[102] + delta[2][18], 1); + rk[114] = ROL(rk[108] + delta[3][19], 1); + rk[120] = ROL(rk[114] + delta[0][20], 1); + rk[126] = ROL(rk[120] + delta[1][21], 1); + rk[132] = ROL(rk[126] + delta[2][22], 1); + rk[138] = ROL(rk[132] + delta[3][23], 1); + + rk[ 1] = rk[ 3] = rk[ 5] = ROL(loadU32(_mk[1]) + delta[0][ 1], 3); + rk[ 7] = rk[ 9] = rk[ 11] = ROL(rk[ 1] + delta[1][ 2], 3); + rk[ 13] = rk[ 15] = rk[ 17] = ROL(rk[ 7] + delta[2][ 3], 3); + rk[ 19] = rk[ 21] = rk[ 23] = ROL(rk[ 13] + delta[3][ 4], 3); + rk[ 25] = rk[ 27] = rk[ 29] = ROL(rk[ 19] + delta[0][ 5], 3); + rk[ 31] = rk[ 33] = rk[ 35] = ROL(rk[ 25] + delta[1][ 6], 3); + rk[ 37] = rk[ 39] = rk[ 41] = ROL(rk[ 31] + delta[2][ 7], 3); + rk[ 43] = rk[ 45] = rk[ 47] = ROL(rk[ 37] + delta[3][ 8], 3); + rk[ 49] = rk[ 51] = rk[ 53] = ROL(rk[ 43] + delta[0][ 9], 3); + rk[ 55] = rk[ 57] = rk[ 59] = ROL(rk[ 49] + delta[1][10], 3); + rk[ 61] = rk[ 63] = rk[ 65] = ROL(rk[ 55] + delta[2][11], 3); + rk[ 67] = rk[ 69] = rk[ 71] = ROL(rk[ 61] + delta[3][12], 3); + rk[ 73] = rk[ 75] = rk[ 77] = ROL(rk[ 67] + delta[0][13], 3); + rk[ 79] = rk[ 81] = rk[ 83] = ROL(rk[ 73] + delta[1][14], 3); + rk[ 85] = rk[ 87] = rk[ 89] = ROL(rk[ 79] + delta[2][15], 3); + rk[ 91] = rk[ 93] = rk[ 95] = ROL(rk[ 85] + delta[3][16], 3); + rk[ 97] = rk[ 99] = rk[101] = ROL(rk[ 91] + delta[0][17], 3); + rk[103] = rk[105] = rk[107] = ROL(rk[ 97] + delta[1][18], 3); + rk[109] = rk[111] = rk[113] = ROL(rk[103] + delta[2][19], 3); + rk[115] = rk[117] = rk[119] = ROL(rk[109] + delta[3][20], 3); + rk[121] = rk[123] = rk[125] = ROL(rk[115] + delta[0][21], 3); + rk[127] = rk[129] = rk[131] = ROL(rk[121] + delta[1][22], 3); + rk[133] = rk[135] = rk[137] = ROL(rk[127] + delta[2][23], 3); + rk[139] = rk[141] = rk[143] = ROL(rk[133] + delta[3][24], 3); + + rk[ 2] = ROL(loadU32(_mk[2]) + delta[0][ 2], 6); + rk[ 8] = ROL(rk[ 2] + delta[1][ 3], 6); + rk[ 14] = ROL(rk[ 8] + delta[2][ 4], 6); + rk[ 20] = ROL(rk[ 14] + delta[3][ 5], 6); + rk[ 26] = ROL(rk[ 20] + delta[0][ 6], 6); + rk[ 32] = ROL(rk[ 26] + delta[1][ 7], 6); + rk[ 38] = ROL(rk[ 32] + delta[2][ 8], 6); + rk[ 44] = ROL(rk[ 38] + delta[3][ 9], 6); + rk[ 50] = ROL(rk[ 44] + delta[0][10], 6); + rk[ 56] = ROL(rk[ 50] + delta[1][11], 6); + rk[ 62] = ROL(rk[ 56] + delta[2][12], 6); + rk[ 68] = ROL(rk[ 62] + delta[3][13], 6); + rk[ 74] = ROL(rk[ 68] + delta[0][14], 6); + rk[ 80] = ROL(rk[ 74] + delta[1][15], 6); + rk[ 86] = ROL(rk[ 80] + delta[2][16], 6); + rk[ 92] = ROL(rk[ 86] + delta[3][17], 6); + rk[ 98] = ROL(rk[ 92] + delta[0][18], 6); + rk[104] = ROL(rk[ 98] + delta[1][19], 6); + rk[110] = ROL(rk[104] + delta[2][20], 6); + rk[116] = ROL(rk[110] + delta[3][21], 6); + rk[122] = ROL(rk[116] + delta[0][22], 6); + rk[128] = ROL(rk[122] + delta[1][23], 6); + rk[134] = ROL(rk[128] + delta[2][24], 6); + rk[140] = ROL(rk[134] + delta[3][25], 6); + + rk[ 4] = ROL(loadU32(_mk[3]) + delta[0][ 3], 11); + rk[ 10] = ROL(rk[ 4] + delta[1][ 4], 11); + rk[ 16] = ROL(rk[ 10] + delta[2][ 5], 11); + rk[ 22] = ROL(rk[ 16] + delta[3][ 6], 11); + rk[ 28] = ROL(rk[ 22] + delta[0][ 7], 11); + rk[ 34] = ROL(rk[ 28] + delta[1][ 8], 11); + rk[ 40] = ROL(rk[ 34] + delta[2][ 9], 11); + rk[ 46] = ROL(rk[ 40] + delta[3][10], 11); + rk[ 52] = ROL(rk[ 46] + delta[0][11], 11); + rk[ 58] = ROL(rk[ 52] + delta[1][12], 11); + rk[ 64] = ROL(rk[ 58] + delta[2][13], 11); + rk[ 70] = ROL(rk[ 64] + delta[3][14], 11); + rk[ 76] = ROL(rk[ 70] + delta[0][15], 11); + rk[ 82] = ROL(rk[ 76] + delta[1][16], 11); + rk[ 88] = ROL(rk[ 82] + delta[2][17], 11); + rk[ 94] = ROL(rk[ 88] + delta[3][18], 11); + rk[100] = ROL(rk[ 94] + delta[0][19], 11); + rk[106] = ROL(rk[100] + delta[1][20], 11); + rk[112] = ROL(rk[106] + delta[2][21], 11); + rk[118] = ROL(rk[112] + delta[3][22], 11); + rk[124] = ROL(rk[118] + delta[0][23], 11); + rk[130] = ROL(rk[124] + delta[1][24], 11); + rk[136] = ROL(rk[130] + delta[2][25], 11); + rk[142] = ROL(rk[136] + delta[3][26], 11); + break; + + case 24: + rk[ 0] = ROL(loadU32(_mk[0]) + delta[0][ 0], 1); + rk[ 6] = ROL(rk[ 0] + delta[1][ 1], 1); + rk[ 12] = ROL(rk[ 6] + delta[2][ 2], 1); + rk[ 18] = ROL(rk[ 12] + delta[3][ 3], 1); + rk[ 24] = ROL(rk[ 18] + delta[4][ 4], 1); + rk[ 30] = ROL(rk[ 24] + delta[5][ 5], 1); + rk[ 36] = ROL(rk[ 30] + delta[0][ 6], 1); + rk[ 42] = ROL(rk[ 36] + delta[1][ 7], 1); + rk[ 48] = ROL(rk[ 42] + delta[2][ 8], 1); + rk[ 54] = ROL(rk[ 48] + delta[3][ 9], 1); + rk[ 60] = ROL(rk[ 54] + delta[4][10], 1); + rk[ 66] = ROL(rk[ 60] + delta[5][11], 1); + rk[ 72] = ROL(rk[ 66] + delta[0][12], 1); + rk[ 78] = ROL(rk[ 72] + delta[1][13], 1); + rk[ 84] = ROL(rk[ 78] + delta[2][14], 1); + rk[ 90] = ROL(rk[ 84] + delta[3][15], 1); + rk[ 96] = ROL(rk[ 90] + delta[4][16], 1); + rk[102] = ROL(rk[ 96] + delta[5][17], 1); + rk[108] = ROL(rk[102] + delta[0][18], 1); + rk[114] = ROL(rk[108] + delta[1][19], 1); + rk[120] = ROL(rk[114] + delta[2][20], 1); + rk[126] = ROL(rk[120] + delta[3][21], 1); + rk[132] = ROL(rk[126] + delta[4][22], 1); + rk[138] = ROL(rk[132] + delta[5][23], 1); + rk[144] = ROL(rk[138] + delta[0][24], 1); + rk[150] = ROL(rk[144] + delta[1][25], 1); + rk[156] = ROL(rk[150] + delta[2][26], 1); + rk[162] = ROL(rk[156] + delta[3][27], 1); + + rk[ 1] = ROL(loadU32(_mk[1]) + delta[0][ 1], 3); + rk[ 7] = ROL(rk[ 1] + delta[1][ 2], 3); + rk[ 13] = ROL(rk[ 7] + delta[2][ 3], 3); + rk[ 19] = ROL(rk[ 13] + delta[3][ 4], 3); + rk[ 25] = ROL(rk[ 19] + delta[4][ 5], 3); + rk[ 31] = ROL(rk[ 25] + delta[5][ 6], 3); + rk[ 37] = ROL(rk[ 31] + delta[0][ 7], 3); + rk[ 43] = ROL(rk[ 37] + delta[1][ 8], 3); + rk[ 49] = ROL(rk[ 43] + delta[2][ 9], 3); + rk[ 55] = ROL(rk[ 49] + delta[3][10], 3); + rk[ 61] = ROL(rk[ 55] + delta[4][11], 3); + rk[ 67] = ROL(rk[ 61] + delta[5][12], 3); + rk[ 73] = ROL(rk[ 67] + delta[0][13], 3); + rk[ 79] = ROL(rk[ 73] + delta[1][14], 3); + rk[ 85] = ROL(rk[ 79] + delta[2][15], 3); + rk[ 91] = ROL(rk[ 85] + delta[3][16], 3); + rk[ 97] = ROL(rk[ 91] + delta[4][17], 3); + rk[103] = ROL(rk[ 97] + delta[5][18], 3); + rk[109] = ROL(rk[103] + delta[0][19], 3); + rk[115] = ROL(rk[109] + delta[1][20], 3); + rk[121] = ROL(rk[115] + delta[2][21], 3); + rk[127] = ROL(rk[121] + delta[3][22], 3); + rk[133] = ROL(rk[127] + delta[4][23], 3); + rk[139] = ROL(rk[133] + delta[5][24], 3); + rk[145] = ROL(rk[139] + delta[0][25], 3); + rk[151] = ROL(rk[145] + delta[1][26], 3); + rk[157] = ROL(rk[151] + delta[2][27], 3); + rk[163] = ROL(rk[157] + delta[3][28], 3); + + rk[ 2] = ROL(loadU32(_mk[2]) + delta[0][ 2], 6); + rk[ 8] = ROL(rk[ 2] + delta[1][ 3], 6); + rk[ 14] = ROL(rk[ 8] + delta[2][ 4], 6); + rk[ 20] = ROL(rk[ 14] + delta[3][ 5], 6); + rk[ 26] = ROL(rk[ 20] + delta[4][ 6], 6); + rk[ 32] = ROL(rk[ 26] + delta[5][ 7], 6); + rk[ 38] = ROL(rk[ 32] + delta[0][ 8], 6); + rk[ 44] = ROL(rk[ 38] + delta[1][ 9], 6); + rk[ 50] = ROL(rk[ 44] + delta[2][10], 6); + rk[ 56] = ROL(rk[ 50] + delta[3][11], 6); + rk[ 62] = ROL(rk[ 56] + delta[4][12], 6); + rk[ 68] = ROL(rk[ 62] + delta[5][13], 6); + rk[ 74] = ROL(rk[ 68] + delta[0][14], 6); + rk[ 80] = ROL(rk[ 74] + delta[1][15], 6); + rk[ 86] = ROL(rk[ 80] + delta[2][16], 6); + rk[ 92] = ROL(rk[ 86] + delta[3][17], 6); + rk[ 98] = ROL(rk[ 92] + delta[4][18], 6); + rk[104] = ROL(rk[ 98] + delta[5][19], 6); + rk[110] = ROL(rk[104] + delta[0][20], 6); + rk[116] = ROL(rk[110] + delta[1][21], 6); + rk[122] = ROL(rk[116] + delta[2][22], 6); + rk[128] = ROL(rk[122] + delta[3][23], 6); + rk[134] = ROL(rk[128] + delta[4][24], 6); + rk[140] = ROL(rk[134] + delta[5][25], 6); + rk[146] = ROL(rk[140] + delta[0][26], 6); + rk[152] = ROL(rk[146] + delta[1][27], 6); + rk[158] = ROL(rk[152] + delta[2][28], 6); + rk[164] = ROL(rk[158] + delta[3][29], 6); + + rk[ 3] = ROL(loadU32(_mk[3]) + delta[0][ 3], 11); + rk[ 9] = ROL(rk[ 3] + delta[1][ 4], 11); + rk[ 15] = ROL(rk[ 9] + delta[2][ 5], 11); + rk[ 21] = ROL(rk[ 15] + delta[3][ 6], 11); + rk[ 27] = ROL(rk[ 21] + delta[4][ 7], 11); + rk[ 33] = ROL(rk[ 27] + delta[5][ 8], 11); + rk[ 39] = ROL(rk[ 33] + delta[0][ 9], 11); + rk[ 45] = ROL(rk[ 39] + delta[1][10], 11); + rk[ 51] = ROL(rk[ 45] + delta[2][11], 11); + rk[ 57] = ROL(rk[ 51] + delta[3][12], 11); + rk[ 63] = ROL(rk[ 57] + delta[4][13], 11); + rk[ 69] = ROL(rk[ 63] + delta[5][14], 11); + rk[ 75] = ROL(rk[ 69] + delta[0][15], 11); + rk[ 81] = ROL(rk[ 75] + delta[1][16], 11); + rk[ 87] = ROL(rk[ 81] + delta[2][17], 11); + rk[ 93] = ROL(rk[ 87] + delta[3][18], 11); + rk[ 99] = ROL(rk[ 93] + delta[4][19], 11); + rk[105] = ROL(rk[ 99] + delta[5][20], 11); + rk[111] = ROL(rk[105] + delta[0][21], 11); + rk[117] = ROL(rk[111] + delta[1][22], 11); + rk[123] = ROL(rk[117] + delta[2][23], 11); + rk[129] = ROL(rk[123] + delta[3][24], 11); + rk[135] = ROL(rk[129] + delta[4][25], 11); + rk[141] = ROL(rk[135] + delta[5][26], 11); + rk[147] = ROL(rk[141] + delta[0][27], 11); + rk[153] = ROL(rk[147] + delta[1][28], 11); + rk[159] = ROL(rk[153] + delta[2][29], 11); + rk[165] = ROL(rk[159] + delta[3][30], 11); + + rk[ 4] = ROL(loadU32(_mk[4]) + delta[0][ 4], 13); + rk[ 10] = ROL(rk[ 4] + delta[1][ 5], 13); + rk[ 16] = ROL(rk[ 10] + delta[2][ 6], 13); + rk[ 22] = ROL(rk[ 16] + delta[3][ 7], 13); + rk[ 28] = ROL(rk[ 22] + delta[4][ 8], 13); + rk[ 34] = ROL(rk[ 28] + delta[5][ 9], 13); + rk[ 40] = ROL(rk[ 34] + delta[0][10], 13); + rk[ 46] = ROL(rk[ 40] + delta[1][11], 13); + rk[ 52] = ROL(rk[ 46] + delta[2][12], 13); + rk[ 58] = ROL(rk[ 52] + delta[3][13], 13); + rk[ 64] = ROL(rk[ 58] + delta[4][14], 13); + rk[ 70] = ROL(rk[ 64] + delta[5][15], 13); + rk[ 76] = ROL(rk[ 70] + delta[0][16], 13); + rk[ 82] = ROL(rk[ 76] + delta[1][17], 13); + rk[ 88] = ROL(rk[ 82] + delta[2][18], 13); + rk[ 94] = ROL(rk[ 88] + delta[3][19], 13); + rk[100] = ROL(rk[ 94] + delta[4][20], 13); + rk[106] = ROL(rk[100] + delta[5][21], 13); + rk[112] = ROL(rk[106] + delta[0][22], 13); + rk[118] = ROL(rk[112] + delta[1][23], 13); + rk[124] = ROL(rk[118] + delta[2][24], 13); + rk[130] = ROL(rk[124] + delta[3][25], 13); + rk[136] = ROL(rk[130] + delta[4][26], 13); + rk[142] = ROL(rk[136] + delta[5][27], 13); + rk[148] = ROL(rk[142] + delta[0][28], 13); + rk[154] = ROL(rk[148] + delta[1][29], 13); + rk[160] = ROL(rk[154] + delta[2][30], 13); + rk[166] = ROL(rk[160] + delta[3][31], 13); + + rk[ 5] = ROL(loadU32(_mk[5]) + delta[0][ 5], 17); + rk[ 11] = ROL(rk[ 5] + delta[1][ 6], 17); + rk[ 17] = ROL(rk[ 11] + delta[2][ 7], 17); + rk[ 23] = ROL(rk[ 17] + delta[3][ 8], 17); + rk[ 29] = ROL(rk[ 23] + delta[4][ 9], 17); + rk[ 35] = ROL(rk[ 29] + delta[5][10], 17); + rk[ 41] = ROL(rk[ 35] + delta[0][11], 17); + rk[ 47] = ROL(rk[ 41] + delta[1][12], 17); + rk[ 53] = ROL(rk[ 47] + delta[2][13], 17); + rk[ 59] = ROL(rk[ 53] + delta[3][14], 17); + rk[ 65] = ROL(rk[ 59] + delta[4][15], 17); + rk[ 71] = ROL(rk[ 65] + delta[5][16], 17); + rk[ 77] = ROL(rk[ 71] + delta[0][17], 17); + rk[ 83] = ROL(rk[ 77] + delta[1][18], 17); + rk[ 89] = ROL(rk[ 83] + delta[2][19], 17); + rk[ 95] = ROL(rk[ 89] + delta[3][20], 17); + rk[101] = ROL(rk[ 95] + delta[4][21], 17); + rk[107] = ROL(rk[101] + delta[5][22], 17); + rk[113] = ROL(rk[107] + delta[0][23], 17); + rk[119] = ROL(rk[113] + delta[1][24], 17); + rk[125] = ROL(rk[119] + delta[2][25], 17); + rk[131] = ROL(rk[125] + delta[3][26], 17); + rk[137] = ROL(rk[131] + delta[4][27], 17); + rk[143] = ROL(rk[137] + delta[5][28], 17); + rk[149] = ROL(rk[143] + delta[0][29], 17); + rk[155] = ROL(rk[149] + delta[1][30], 17); + rk[161] = ROL(rk[155] + delta[2][31], 17); + rk[167] = ROL(rk[161] + delta[3][ 0], 17); + break; + + case 32: + rk[ 0] = ROL(loadU32(_mk[0]) + delta[0][ 0], 1); + rk[ 8] = ROL(rk[ 0] + delta[1][ 3], 6); + rk[ 16] = ROL(rk[ 8] + delta[2][ 6], 13); + rk[ 24] = ROL(rk[ 16] + delta[4][ 4], 1); + rk[ 32] = ROL(rk[ 24] + delta[5][ 7], 6); + rk[ 40] = ROL(rk[ 32] + delta[6][10], 13); + rk[ 48] = ROL(rk[ 40] + delta[0][ 8], 1); + rk[ 56] = ROL(rk[ 48] + delta[1][11], 6); + rk[ 64] = ROL(rk[ 56] + delta[2][14], 13); + rk[ 72] = ROL(rk[ 64] + delta[4][12], 1); + rk[ 80] = ROL(rk[ 72] + delta[5][15], 6); + rk[ 88] = ROL(rk[ 80] + delta[6][18], 13); + rk[ 96] = ROL(rk[ 88] + delta[0][16], 1); + rk[104] = ROL(rk[ 96] + delta[1][19], 6); + rk[112] = ROL(rk[104] + delta[2][22], 13); + rk[120] = ROL(rk[112] + delta[4][20], 1); + rk[128] = ROL(rk[120] + delta[5][23], 6); + rk[136] = ROL(rk[128] + delta[6][26], 13); + rk[144] = ROL(rk[136] + delta[0][24], 1); + rk[152] = ROL(rk[144] + delta[1][27], 6); + rk[160] = ROL(rk[152] + delta[2][30], 13); + rk[168] = ROL(rk[160] + delta[4][28], 1); + rk[176] = ROL(rk[168] + delta[5][31], 6); + rk[184] = ROL(rk[176] + delta[6][ 2], 13); + + rk[ 1] = ROL(loadU32(_mk[1]) + delta[0][ 1], 3); + rk[ 9] = ROL(rk[ 1] + delta[1][ 4], 11); + rk[ 17] = ROL(rk[ 9] + delta[2][ 7], 17); + rk[ 25] = ROL(rk[ 17] + delta[4][ 5], 3); + rk[ 33] = ROL(rk[ 25] + delta[5][ 8], 11); + rk[ 41] = ROL(rk[ 33] + delta[6][11], 17); + rk[ 49] = ROL(rk[ 41] + delta[0][ 9], 3); + rk[ 57] = ROL(rk[ 49] + delta[1][12], 11); + rk[ 65] = ROL(rk[ 57] + delta[2][15], 17); + rk[ 73] = ROL(rk[ 65] + delta[4][13], 3); + rk[ 81] = ROL(rk[ 73] + delta[5][16], 11); + rk[ 89] = ROL(rk[ 81] + delta[6][19], 17); + rk[ 97] = ROL(rk[ 89] + delta[0][17], 3); + rk[105] = ROL(rk[ 97] + delta[1][20], 11); + rk[113] = ROL(rk[105] + delta[2][23], 17); + rk[121] = ROL(rk[113] + delta[4][21], 3); + rk[129] = ROL(rk[121] + delta[5][24], 11); + rk[137] = ROL(rk[129] + delta[6][27], 17); + rk[145] = ROL(rk[137] + delta[0][25], 3); + rk[153] = ROL(rk[145] + delta[1][28], 11); + rk[161] = ROL(rk[153] + delta[2][31], 17); + rk[169] = ROL(rk[161] + delta[4][29], 3); + rk[177] = ROL(rk[169] + delta[5][ 0], 11); + rk[185] = ROL(rk[177] + delta[6][ 3], 17); + + rk[ 2] = ROL(loadU32(_mk[2]) + delta[0][ 2], 6); + rk[ 10] = ROL(rk[ 2] + delta[1][ 5], 13); + rk[ 18] = ROL(rk[ 10] + delta[3][ 3], 1); + rk[ 26] = ROL(rk[ 18] + delta[4][ 6], 6); + rk[ 34] = ROL(rk[ 26] + delta[5][ 9], 13); + rk[ 42] = ROL(rk[ 34] + delta[7][ 7], 1); + rk[ 50] = ROL(rk[ 42] + delta[0][10], 6); + rk[ 58] = ROL(rk[ 50] + delta[1][13], 13); + rk[ 66] = ROL(rk[ 58] + delta[3][11], 1); + rk[ 74] = ROL(rk[ 66] + delta[4][14], 6); + rk[ 82] = ROL(rk[ 74] + delta[5][17], 13); + rk[ 90] = ROL(rk[ 82] + delta[7][15], 1); + rk[ 98] = ROL(rk[ 90] + delta[0][18], 6); + rk[106] = ROL(rk[ 98] + delta[1][21], 13); + rk[114] = ROL(rk[106] + delta[3][19], 1); + rk[122] = ROL(rk[114] + delta[4][22], 6); + rk[130] = ROL(rk[122] + delta[5][25], 13); + rk[138] = ROL(rk[130] + delta[7][23], 1); + rk[146] = ROL(rk[138] + delta[0][26], 6); + rk[154] = ROL(rk[146] + delta[1][29], 13); + rk[162] = ROL(rk[154] + delta[3][27], 1); + rk[170] = ROL(rk[162] + delta[4][30], 6); + rk[178] = ROL(rk[170] + delta[5][ 1], 13); + rk[186] = ROL(rk[178] + delta[7][31], 1); + + rk[ 3] = ROL(loadU32(_mk[3]) + delta[0][ 3], 11); + rk[ 11] = ROL(rk[ 3] + delta[1][ 6], 17); + rk[ 19] = ROL(rk[ 11] + delta[3][ 4], 3); + rk[ 27] = ROL(rk[ 19] + delta[4][ 7], 11); + rk[ 35] = ROL(rk[ 27] + delta[5][10], 17); + rk[ 43] = ROL(rk[ 35] + delta[7][ 8], 3); + rk[ 51] = ROL(rk[ 43] + delta[0][11], 11); + rk[ 59] = ROL(rk[ 51] + delta[1][14], 17); + rk[ 67] = ROL(rk[ 59] + delta[3][12], 3); + rk[ 75] = ROL(rk[ 67] + delta[4][15], 11); + rk[ 83] = ROL(rk[ 75] + delta[5][18], 17); + rk[ 91] = ROL(rk[ 83] + delta[7][16], 3); + rk[ 99] = ROL(rk[ 91] + delta[0][19], 11); + rk[107] = ROL(rk[ 99] + delta[1][22], 17); + rk[115] = ROL(rk[107] + delta[3][20], 3); + rk[123] = ROL(rk[115] + delta[4][23], 11); + rk[131] = ROL(rk[123] + delta[5][26], 17); + rk[139] = ROL(rk[131] + delta[7][24], 3); + rk[147] = ROL(rk[139] + delta[0][27], 11); + rk[155] = ROL(rk[147] + delta[1][30], 17); + rk[163] = ROL(rk[155] + delta[3][28], 3); + rk[171] = ROL(rk[163] + delta[4][31], 11); + rk[179] = ROL(rk[171] + delta[5][ 2], 17); + rk[187] = ROL(rk[179] + delta[7][ 0], 3); + + rk[ 4] = ROL(loadU32(_mk[4]) + delta[0][ 4], 13); + rk[ 12] = ROL(rk[ 4] + delta[2][ 2], 1); + rk[ 20] = ROL(rk[ 12] + delta[3][ 5], 6); + rk[ 28] = ROL(rk[ 20] + delta[4][ 8], 13); + rk[ 36] = ROL(rk[ 28] + delta[6][ 6], 1); + rk[ 44] = ROL(rk[ 36] + delta[7][ 9], 6); + rk[ 52] = ROL(rk[ 44] + delta[0][12], 13); + rk[ 60] = ROL(rk[ 52] + delta[2][10], 1); + rk[ 68] = ROL(rk[ 60] + delta[3][13], 6); + rk[ 76] = ROL(rk[ 68] + delta[4][16], 13); + rk[ 84] = ROL(rk[ 76] + delta[6][14], 1); + rk[ 92] = ROL(rk[ 84] + delta[7][17], 6); + rk[100] = ROL(rk[ 92] + delta[0][20], 13); + rk[108] = ROL(rk[100] + delta[2][18], 1); + rk[116] = ROL(rk[108] + delta[3][21], 6); + rk[124] = ROL(rk[116] + delta[4][24], 13); + rk[132] = ROL(rk[124] + delta[6][22], 1); + rk[140] = ROL(rk[132] + delta[7][25], 6); + rk[148] = ROL(rk[140] + delta[0][28], 13); + rk[156] = ROL(rk[148] + delta[2][26], 1); + rk[164] = ROL(rk[156] + delta[3][29], 6); + rk[172] = ROL(rk[164] + delta[4][ 0], 13); + rk[180] = ROL(rk[172] + delta[6][30], 1); + rk[188] = ROL(rk[180] + delta[7][ 1], 6); + + rk[ 5] = ROL(loadU32(_mk[5]) + delta[0][ 5], 17); + rk[ 13] = ROL(rk[ 5] + delta[2][ 3], 3); + rk[ 21] = ROL(rk[ 13] + delta[3][ 6], 11); + rk[ 29] = ROL(rk[ 21] + delta[4][ 9], 17); + rk[ 37] = ROL(rk[ 29] + delta[6][ 7], 3); + rk[ 45] = ROL(rk[ 37] + delta[7][10], 11); + rk[ 53] = ROL(rk[ 45] + delta[0][13], 17); + rk[ 61] = ROL(rk[ 53] + delta[2][11], 3); + rk[ 69] = ROL(rk[ 61] + delta[3][14], 11); + rk[ 77] = ROL(rk[ 69] + delta[4][17], 17); + rk[ 85] = ROL(rk[ 77] + delta[6][15], 3); + rk[ 93] = ROL(rk[ 85] + delta[7][18], 11); + rk[101] = ROL(rk[ 93] + delta[0][21], 17); + rk[109] = ROL(rk[101] + delta[2][19], 3); + rk[117] = ROL(rk[109] + delta[3][22], 11); + rk[125] = ROL(rk[117] + delta[4][25], 17); + rk[133] = ROL(rk[125] + delta[6][23], 3); + rk[141] = ROL(rk[133] + delta[7][26], 11); + rk[149] = ROL(rk[141] + delta[0][29], 17); + rk[157] = ROL(rk[149] + delta[2][27], 3); + rk[165] = ROL(rk[157] + delta[3][30], 11); + rk[173] = ROL(rk[165] + delta[4][ 1], 17); + rk[181] = ROL(rk[173] + delta[6][31], 3); + rk[189] = ROL(rk[181] + delta[7][ 2], 11); + + rk[ 6] = ROL(loadU32(_mk[6]) + delta[1][ 1], 1); + rk[ 14] = ROL(rk[ 6] + delta[2][ 4], 6); + rk[ 22] = ROL(rk[ 14] + delta[3][ 7], 13); + rk[ 30] = ROL(rk[ 22] + delta[5][ 5], 1); + rk[ 38] = ROL(rk[ 30] + delta[6][ 8], 6); + rk[ 46] = ROL(rk[ 38] + delta[7][11], 13); + rk[ 54] = ROL(rk[ 46] + delta[1][ 9], 1); + rk[ 62] = ROL(rk[ 54] + delta[2][12], 6); + rk[ 70] = ROL(rk[ 62] + delta[3][15], 13); + rk[ 78] = ROL(rk[ 70] + delta[5][13], 1); + rk[ 86] = ROL(rk[ 78] + delta[6][16], 6); + rk[ 94] = ROL(rk[ 86] + delta[7][19], 13); + rk[102] = ROL(rk[ 94] + delta[1][17], 1); + rk[110] = ROL(rk[102] + delta[2][20], 6); + rk[118] = ROL(rk[110] + delta[3][23], 13); + rk[126] = ROL(rk[118] + delta[5][21], 1); + rk[134] = ROL(rk[126] + delta[6][24], 6); + rk[142] = ROL(rk[134] + delta[7][27], 13); + rk[150] = ROL(rk[142] + delta[1][25], 1); + rk[158] = ROL(rk[150] + delta[2][28], 6); + rk[166] = ROL(rk[158] + delta[3][31], 13); + rk[174] = ROL(rk[166] + delta[5][29], 1); + rk[182] = ROL(rk[174] + delta[6][ 0], 6); + rk[190] = ROL(rk[182] + delta[7][ 3], 13); + + rk[ 7] = ROL(loadU32(_mk[7]) + delta[1][ 2], 3); + rk[ 15] = ROL(rk[ 7] + delta[2][ 5], 11); + rk[ 23] = ROL(rk[ 15] + delta[3][ 8], 17); + rk[ 31] = ROL(rk[ 23] + delta[5][ 6], 3); + rk[ 39] = ROL(rk[ 31] + delta[6][ 9], 11); + rk[ 47] = ROL(rk[ 39] + delta[7][12], 17); + rk[ 55] = ROL(rk[ 47] + delta[1][10], 3); + rk[ 63] = ROL(rk[ 55] + delta[2][13], 11); + rk[ 71] = ROL(rk[ 63] + delta[3][16], 17); + rk[ 79] = ROL(rk[ 71] + delta[5][14], 3); + rk[ 87] = ROL(rk[ 79] + delta[6][17], 11); + rk[ 95] = ROL(rk[ 87] + delta[7][20], 17); + rk[103] = ROL(rk[ 95] + delta[1][18], 3); + rk[111] = ROL(rk[103] + delta[2][21], 11); + rk[119] = ROL(rk[111] + delta[3][24], 17); + rk[127] = ROL(rk[119] + delta[5][22], 3); + rk[135] = ROL(rk[127] + delta[6][25], 11); + rk[143] = ROL(rk[135] + delta[7][28], 17); + rk[151] = ROL(rk[143] + delta[1][26], 3); + rk[159] = ROL(rk[151] + delta[2][29], 11); + rk[167] = ROL(rk[159] + delta[3][ 0], 17); + rk[175] = ROL(rk[167] + delta[5][30], 3); + rk[183] = ROL(rk[175] + delta[6][ 1], 11); + rk[191] = ROL(rk[183] + delta[7][ 4], 17); + + break; + + default: + return; + } + + *round = (mk_len >> 1) + 16; +} + +void lea_encrypt(unsigned char *ct, const unsigned char *pt, const unsigned int *rk, const unsigned long round) +{ + unsigned int X0,X1,X2,X3; + + const unsigned int * _pt = (const unsigned int *)pt; + unsigned int * _ct = (unsigned int*)ct; + + X0 = loadU32(_pt[0]); + X1 = loadU32(_pt[1]); + X2 = loadU32(_pt[2]); + X3 = loadU32(_pt[3]); + + X3 = ROR((X2 ^ rk[ 4]) + (X3 ^ rk[ 5]), 3); + X2 = ROR((X1 ^ rk[ 2]) + (X2 ^ rk[ 3]), 5); + X1 = ROL((X0 ^ rk[ 0]) + (X1 ^ rk[ 1]), 9); + X0 = ROR((X3 ^ rk[ 10]) + (X0 ^ rk[ 11]), 3); + X3 = ROR((X2 ^ rk[ 8]) + (X3 ^ rk[ 9]), 5); + X2 = ROL((X1 ^ rk[ 6]) + (X2 ^ rk[ 7]), 9); + X1 = ROR((X0 ^ rk[ 16]) + (X1 ^ rk[ 17]), 3); + X0 = ROR((X3 ^ rk[ 14]) + (X0 ^ rk[ 15]), 5); + X3 = ROL((X2 ^ rk[ 12]) + (X3 ^ rk[ 13]), 9); + X2 = ROR((X1 ^ rk[ 22]) + (X2 ^ rk[ 23]), 3); + X1 = ROR((X0 ^ rk[ 20]) + (X1 ^ rk[ 21]), 5); + X0 = ROL((X3 ^ rk[ 18]) + (X0 ^ rk[ 19]), 9); + + X3 = ROR((X2 ^ rk[ 28]) + (X3 ^ rk[ 29]), 3); + X2 = ROR((X1 ^ rk[ 26]) + (X2 ^ rk[ 27]), 5); + X1 = ROL((X0 ^ rk[ 24]) + (X1 ^ rk[ 25]), 9); + X0 = ROR((X3 ^ rk[ 34]) + (X0 ^ rk[ 35]), 3); + X3 = ROR((X2 ^ rk[ 32]) + (X3 ^ rk[ 33]), 5); + X2 = ROL((X1 ^ rk[ 30]) + (X2 ^ rk[ 31]), 9); + X1 = ROR((X0 ^ rk[ 40]) + (X1 ^ rk[ 41]), 3); + X0 = ROR((X3 ^ rk[ 38]) + (X0 ^ rk[ 39]), 5); + X3 = ROL((X2 ^ rk[ 36]) + (X3 ^ rk[ 37]), 9); + X2 = ROR((X1 ^ rk[ 46]) + (X2 ^ rk[ 47]), 3); + X1 = ROR((X0 ^ rk[ 44]) + (X1 ^ rk[ 45]), 5); + X0 = ROL((X3 ^ rk[ 42]) + (X0 ^ rk[ 43]), 9); + + X3 = ROR((X2 ^ rk[ 52]) + (X3 ^ rk[ 53]), 3); + X2 = ROR((X1 ^ rk[ 50]) + (X2 ^ rk[ 51]), 5); + X1 = ROL((X0 ^ rk[ 48]) + (X1 ^ rk[ 49]), 9); + X0 = ROR((X3 ^ rk[ 58]) + (X0 ^ rk[ 59]), 3); + X3 = ROR((X2 ^ rk[ 56]) + (X3 ^ rk[ 57]), 5); + X2 = ROL((X1 ^ rk[ 54]) + (X2 ^ rk[ 55]), 9); + X1 = ROR((X0 ^ rk[ 64]) + (X1 ^ rk[ 65]), 3); + X0 = ROR((X3 ^ rk[ 62]) + (X0 ^ rk[ 63]), 5); + X3 = ROL((X2 ^ rk[ 60]) + (X3 ^ rk[ 61]), 9); + X2 = ROR((X1 ^ rk[ 70]) + (X2 ^ rk[ 71]), 3); + X1 = ROR((X0 ^ rk[ 68]) + (X1 ^ rk[ 69]), 5); + X0 = ROL((X3 ^ rk[ 66]) + (X0 ^ rk[ 67]), 9); + + X3 = ROR((X2 ^ rk[ 76]) + (X3 ^ rk[ 77]), 3); + X2 = ROR((X1 ^ rk[ 74]) + (X2 ^ rk[ 75]), 5); + X1 = ROL((X0 ^ rk[ 72]) + (X1 ^ rk[ 73]), 9); + X0 = ROR((X3 ^ rk[ 82]) + (X0 ^ rk[ 83]), 3); + X3 = ROR((X2 ^ rk[ 80]) + (X3 ^ rk[ 81]), 5); + X2 = ROL((X1 ^ rk[ 78]) + (X2 ^ rk[ 79]), 9); + X1 = ROR((X0 ^ rk[ 88]) + (X1 ^ rk[ 89]), 3); + X0 = ROR((X3 ^ rk[ 86]) + (X0 ^ rk[ 87]), 5); + X3 = ROL((X2 ^ rk[ 84]) + (X3 ^ rk[ 85]), 9); + X2 = ROR((X1 ^ rk[ 94]) + (X2 ^ rk[ 95]), 3); + X1 = ROR((X0 ^ rk[ 92]) + (X1 ^ rk[ 93]), 5); + X0 = ROL((X3 ^ rk[ 90]) + (X0 ^ rk[ 91]), 9); + + X3 = ROR((X2 ^ rk[100]) + (X3 ^ rk[101]), 3); + X2 = ROR((X1 ^ rk[ 98]) + (X2 ^ rk[ 99]), 5); + X1 = ROL((X0 ^ rk[ 96]) + (X1 ^ rk[ 97]), 9); + X0 = ROR((X3 ^ rk[106]) + (X0 ^ rk[107]), 3); + X3 = ROR((X2 ^ rk[104]) + (X3 ^ rk[105]), 5); + X2 = ROL((X1 ^ rk[102]) + (X2 ^ rk[103]), 9); + X1 = ROR((X0 ^ rk[112]) + (X1 ^ rk[113]), 3); + X0 = ROR((X3 ^ rk[110]) + (X0 ^ rk[111]), 5); + X3 = ROL((X2 ^ rk[108]) + (X3 ^ rk[109]), 9); + X2 = ROR((X1 ^ rk[118]) + (X2 ^ rk[119]), 3); + X1 = ROR((X0 ^ rk[116]) + (X1 ^ rk[117]), 5); + X0 = ROL((X3 ^ rk[114]) + (X0 ^ rk[115]), 9); + + X3 = ROR((X2 ^ rk[124]) + (X3 ^ rk[125]), 3); + X2 = ROR((X1 ^ rk[122]) + (X2 ^ rk[123]), 5); + X1 = ROL((X0 ^ rk[120]) + (X1 ^ rk[121]), 9); + X0 = ROR((X3 ^ rk[130]) + (X0 ^ rk[131]), 3); + X3 = ROR((X2 ^ rk[128]) + (X3 ^ rk[129]), 5); + X2 = ROL((X1 ^ rk[126]) + (X2 ^ rk[127]), 9); + X1 = ROR((X0 ^ rk[136]) + (X1 ^ rk[137]), 3); + X0 = ROR((X3 ^ rk[134]) + (X0 ^ rk[135]), 5); + X3 = ROL((X2 ^ rk[132]) + (X3 ^ rk[133]), 9); + X2 = ROR((X1 ^ rk[142]) + (X2 ^ rk[143]), 3); + X1 = ROR((X0 ^ rk[140]) + (X1 ^ rk[141]), 5); + X0 = ROL((X3 ^ rk[138]) + (X0 ^ rk[139]), 9); + + if(round > 24) + { + X3 = ROR((X2 ^ rk[148]) + (X3 ^ rk[149]), 3); + X2 = ROR((X1 ^ rk[146]) + (X2 ^ rk[147]), 5); + X1 = ROL((X0 ^ rk[144]) + (X1 ^ rk[145]), 9); + X0 = ROR((X3 ^ rk[154]) + (X0 ^ rk[155]), 3); + X3 = ROR((X2 ^ rk[152]) + (X3 ^ rk[153]), 5); + X2 = ROL((X1 ^ rk[150]) + (X2 ^ rk[151]), 9); + X1 = ROR((X0 ^ rk[160]) + (X1 ^ rk[161]), 3); + X0 = ROR((X3 ^ rk[158]) + (X0 ^ rk[159]), 5); + X3 = ROL((X2 ^ rk[156]) + (X3 ^ rk[157]), 9); + X2 = ROR((X1 ^ rk[166]) + (X2 ^ rk[167]), 3); + X1 = ROR((X0 ^ rk[164]) + (X1 ^ rk[165]), 5); + X0 = ROL((X3 ^ rk[162]) + (X0 ^ rk[163]), 9); + } + + if(round > 28) + { + X3 = ROR((X2 ^ rk[172]) + (X3 ^ rk[173]), 3); + X2 = ROR((X1 ^ rk[170]) + (X2 ^ rk[171]), 5); + X1 = ROL((X0 ^ rk[168]) + (X1 ^ rk[169]), 9); + X0 = ROR((X3 ^ rk[178]) + (X0 ^ rk[179]), 3); + X3 = ROR((X2 ^ rk[176]) + (X3 ^ rk[177]), 5); + X2 = ROL((X1 ^ rk[174]) + (X2 ^ rk[175]), 9); + X1 = ROR((X0 ^ rk[184]) + (X1 ^ rk[185]), 3); + X0 = ROR((X3 ^ rk[182]) + (X0 ^ rk[183]), 5); + X3 = ROL((X2 ^ rk[180]) + (X3 ^ rk[181]), 9); + X2 = ROR((X1 ^ rk[190]) + (X2 ^ rk[191]), 3); + X1 = ROR((X0 ^ rk[188]) + (X1 ^ rk[189]), 5); + X0 = ROL((X3 ^ rk[186]) + (X0 ^ rk[187]), 9); + } + + _ct[0] = loadU32(X0); + _ct[1] = loadU32(X1); + _ct[2] = loadU32(X2); + _ct[3] = loadU32(X3); +} + +void lea_decrypt(unsigned char *pt, const unsigned char *ct, const unsigned int *rk, const unsigned long round) +{ + unsigned int X0,X1,X2,X3; + + + + unsigned int * _pt = (unsigned int *)pt; + const unsigned int * _ct = (const unsigned int*)ct; + + X0 = loadU32(_ct[0]); + X1 = loadU32(_ct[1]); + X2 = loadU32(_ct[2]); + X3 = loadU32(_ct[3]); + + if(round > 28) + { + X0 = (ROR(X0, 9) - (X3 ^ rk[186])) ^ rk[187]; + X1 = (ROL(X1, 5) - (X0 ^ rk[188])) ^ rk[189]; + X2 = (ROL(X2, 3) - (X1 ^ rk[190])) ^ rk[191]; + X3 = (ROR(X3, 9) - (X2 ^ rk[180])) ^ rk[181]; + X0 = (ROL(X0, 5) - (X3 ^ rk[182])) ^ rk[183]; + X1 = (ROL(X1, 3) - (X0 ^ rk[184])) ^ rk[185]; + X2 = (ROR(X2, 9) - (X1 ^ rk[174])) ^ rk[175]; + X3 = (ROL(X3, 5) - (X2 ^ rk[176])) ^ rk[177]; + X0 = (ROL(X0, 3) - (X3 ^ rk[178])) ^ rk[179]; + X1 = (ROR(X1, 9) - (X0 ^ rk[168])) ^ rk[169]; + X2 = (ROL(X2, 5) - (X1 ^ rk[170])) ^ rk[171]; + X3 = (ROL(X3, 3) - (X2 ^ rk[172])) ^ rk[173]; + } + + if(round > 24) + { + X0 = (ROR(X0, 9) - (X3 ^ rk[162])) ^ rk[163]; + X1 = (ROL(X1, 5) - (X0 ^ rk[164])) ^ rk[165]; + X2 = (ROL(X2, 3) - (X1 ^ rk[166])) ^ rk[167]; + X3 = (ROR(X3, 9) - (X2 ^ rk[156])) ^ rk[157]; + X0 = (ROL(X0, 5) - (X3 ^ rk[158])) ^ rk[159]; + X1 = (ROL(X1, 3) - (X0 ^ rk[160])) ^ rk[161]; + X2 = (ROR(X2, 9) - (X1 ^ rk[150])) ^ rk[151]; + X3 = (ROL(X3, 5) - (X2 ^ rk[152])) ^ rk[153]; + X0 = (ROL(X0, 3) - (X3 ^ rk[154])) ^ rk[155]; + X1 = (ROR(X1, 9) - (X0 ^ rk[144])) ^ rk[145]; + X2 = (ROL(X2, 5) - (X1 ^ rk[146])) ^ rk[147]; + X3 = (ROL(X3, 3) - (X2 ^ rk[148])) ^ rk[149]; + } + + X0 = (ROR(X0, 9) - (X3 ^ rk[138])) ^ rk[139]; + X1 = (ROL(X1, 5) - (X0 ^ rk[140])) ^ rk[141]; + X2 = (ROL(X2, 3) - (X1 ^ rk[142])) ^ rk[143]; + X3 = (ROR(X3, 9) - (X2 ^ rk[132])) ^ rk[133]; + X0 = (ROL(X0, 5) - (X3 ^ rk[134])) ^ rk[135]; + X1 = (ROL(X1, 3) - (X0 ^ rk[136])) ^ rk[137]; + X2 = (ROR(X2, 9) - (X1 ^ rk[126])) ^ rk[127]; + X3 = (ROL(X3, 5) - (X2 ^ rk[128])) ^ rk[129]; + X0 = (ROL(X0, 3) - (X3 ^ rk[130])) ^ rk[131]; + X1 = (ROR(X1, 9) - (X0 ^ rk[120])) ^ rk[121]; + X2 = (ROL(X2, 5) - (X1 ^ rk[122])) ^ rk[123]; + X3 = (ROL(X3, 3) - (X2 ^ rk[124])) ^ rk[125]; + + X0 = (ROR(X0, 9) - (X3 ^ rk[114])) ^ rk[115]; + X1 = (ROL(X1, 5) - (X0 ^ rk[116])) ^ rk[117]; + X2 = (ROL(X2, 3) - (X1 ^ rk[118])) ^ rk[119]; + X3 = (ROR(X3, 9) - (X2 ^ rk[108])) ^ rk[109]; + X0 = (ROL(X0, 5) - (X3 ^ rk[110])) ^ rk[111]; + X1 = (ROL(X1, 3) - (X0 ^ rk[112])) ^ rk[113]; + X2 = (ROR(X2, 9) - (X1 ^ rk[102])) ^ rk[103]; + X3 = (ROL(X3, 5) - (X2 ^ rk[104])) ^ rk[105]; + X0 = (ROL(X0, 3) - (X3 ^ rk[106])) ^ rk[107]; + X1 = (ROR(X1, 9) - (X0 ^ rk[ 96])) ^ rk[ 97]; + X2 = (ROL(X2, 5) - (X1 ^ rk[ 98])) ^ rk[ 99]; + X3 = (ROL(X3, 3) - (X2 ^ rk[100])) ^ rk[101]; + + X0 = (ROR(X0, 9) - (X3 ^ rk[ 90])) ^ rk[ 91]; + X1 = (ROL(X1, 5) - (X0 ^ rk[ 92])) ^ rk[ 93]; + X2 = (ROL(X2, 3) - (X1 ^ rk[ 94])) ^ rk[ 95]; + X3 = (ROR(X3, 9) - (X2 ^ rk[ 84])) ^ rk[ 85]; + X0 = (ROL(X0, 5) - (X3 ^ rk[ 86])) ^ rk[ 87]; + X1 = (ROL(X1, 3) - (X0 ^ rk[ 88])) ^ rk[ 89]; + X2 = (ROR(X2, 9) - (X1 ^ rk[ 78])) ^ rk[ 79]; + X3 = (ROL(X3, 5) - (X2 ^ rk[ 80])) ^ rk[ 81]; + X0 = (ROL(X0, 3) - (X3 ^ rk[ 82])) ^ rk[ 83]; + X1 = (ROR(X1, 9) - (X0 ^ rk[ 72])) ^ rk[ 73]; + X2 = (ROL(X2, 5) - (X1 ^ rk[ 74])) ^ rk[ 75]; + X3 = (ROL(X3, 3) - (X2 ^ rk[ 76])) ^ rk[ 77]; + + X0 = (ROR(X0, 9) - (X3 ^ rk[ 66])) ^ rk[ 67]; + X1 = (ROL(X1, 5) - (X0 ^ rk[ 68])) ^ rk[ 69]; + X2 = (ROL(X2, 3) - (X1 ^ rk[ 70])) ^ rk[ 71]; + X3 = (ROR(X3, 9) - (X2 ^ rk[ 60])) ^ rk[ 61]; + X0 = (ROL(X0, 5) - (X3 ^ rk[ 62])) ^ rk[ 63]; + X1 = (ROL(X1, 3) - (X0 ^ rk[ 64])) ^ rk[ 65]; + X2 = (ROR(X2, 9) - (X1 ^ rk[ 54])) ^ rk[ 55]; + X3 = (ROL(X3, 5) - (X2 ^ rk[ 56])) ^ rk[ 57]; + X0 = (ROL(X0, 3) - (X3 ^ rk[ 58])) ^ rk[ 59]; + X1 = (ROR(X1, 9) - (X0 ^ rk[ 48])) ^ rk[ 49]; + X2 = (ROL(X2, 5) - (X1 ^ rk[ 50])) ^ rk[ 51]; + X3 = (ROL(X3, 3) - (X2 ^ rk[ 52])) ^ rk[ 53]; + + X0 = (ROR(X0, 9) - (X3 ^ rk[ 42])) ^ rk[ 43]; + X1 = (ROL(X1, 5) - (X0 ^ rk[ 44])) ^ rk[ 45]; + X2 = (ROL(X2, 3) - (X1 ^ rk[ 46])) ^ rk[ 47]; + X3 = (ROR(X3, 9) - (X2 ^ rk[ 36])) ^ rk[ 37]; + X0 = (ROL(X0, 5) - (X3 ^ rk[ 38])) ^ rk[ 39]; + X1 = (ROL(X1, 3) - (X0 ^ rk[ 40])) ^ rk[ 41]; + X2 = (ROR(X2, 9) - (X1 ^ rk[ 30])) ^ rk[ 31]; + X3 = (ROL(X3, 5) - (X2 ^ rk[ 32])) ^ rk[ 33]; + X0 = (ROL(X0, 3) - (X3 ^ rk[ 34])) ^ rk[ 35]; + X1 = (ROR(X1, 9) - (X0 ^ rk[ 24])) ^ rk[ 25]; + X2 = (ROL(X2, 5) - (X1 ^ rk[ 26])) ^ rk[ 27]; + X3 = (ROL(X3, 3) - (X2 ^ rk[ 28])) ^ rk[ 29]; + + X0 = (ROR(X0, 9) - (X3 ^ rk[ 18])) ^ rk[ 19]; + X1 = (ROL(X1, 5) - (X0 ^ rk[ 20])) ^ rk[ 21]; + X2 = (ROL(X2, 3) - (X1 ^ rk[ 22])) ^ rk[ 23]; + X3 = (ROR(X3, 9) - (X2 ^ rk[ 12])) ^ rk[ 13]; + X0 = (ROL(X0, 5) - (X3 ^ rk[ 14])) ^ rk[ 15]; + X1 = (ROL(X1, 3) - (X0 ^ rk[ 16])) ^ rk[ 17]; + X2 = (ROR(X2, 9) - (X1 ^ rk[ 6])) ^ rk[ 7]; + X3 = (ROL(X3, 5) - (X2 ^ rk[ 8])) ^ rk[ 9]; + X0 = (ROL(X0, 3) - (X3 ^ rk[ 10])) ^ rk[ 11]; + X1 = (ROR(X1, 9) - (X0 ^ rk[ 0])) ^ rk[ 1]; + X2 = (ROL(X2, 5) - (X1 ^ rk[ 2])) ^ rk[ 3]; + X3 = (ROL(X3, 3) - (X2 ^ rk[ 4])) ^ rk[ 5]; + + _pt[0] = loadU32(X0); + _pt[1] = loadU32(X1); + _pt[2] = loadU32(X2); + _pt[3] = loadU32(X3); +} diff --git a/lea/arm64_goat/Makefile b/lea/arm64_goat/Makefile index 9bd6c3f..99f461a 100644 --- a/lea/arm64_goat/Makefile +++ b/lea/arm64_goat/Makefile @@ -9,7 +9,10 @@ export PATH := /opt/homebrew/opt/binutils/bin/:/opt/homebrew/opt/llvm/bin:$(PATH export LDFLAGS := -L/opt/homebrew/opt/llvm/lib export CPPFLAGS := -I/opt/homebrew/opt/llvm/include -all: arm64 +all: arm64 arm64_neon arm64: + ${GOAT} ${GOAT_FLAGS} src/lea_arm64.c + +arm64_neon: ${GOAT} ${GOAT_FLAGS} src/lea_arm64_neon.c diff --git a/lea/arm64_goat/src/lea_arm64.c b/lea/arm64_goat/src/lea_arm64.c new file mode 100644 index 0000000..ab71202 --- /dev/null +++ b/lea/arm64_goat/src/lea_arm64.c @@ -0,0 +1,802 @@ +#include + + +#define ROR(W,i) (((W) >> (i)) | ((W) << (32 - (i)))) +#define ROL(W,i) (((W) << (i)) | ((W) >> (32 - (i)))) + +#define loadU32(v) (v) + + +static const unsigned int delta[8][36] = { + {0xc3efe9db, 0x87dfd3b7, 0x0fbfa76f, 0x1f7f4ede, 0x3efe9dbc, 0x7dfd3b78, 0xfbfa76f0, 0xf7f4ede1, + 0xefe9dbc3, 0xdfd3b787, 0xbfa76f0f, 0x7f4ede1f, 0xfe9dbc3e, 0xfd3b787d, 0xfa76f0fb, 0xf4ede1f7, + 0xe9dbc3ef, 0xd3b787df, 0xa76f0fbf, 0x4ede1f7f, 0x9dbc3efe, 0x3b787dfd, 0x76f0fbfa, 0xede1f7f4, + 0xdbc3efe9, 0xb787dfd3, 0x6f0fbfa7, 0xde1f7f4e, 0xbc3efe9d, 0x787dfd3b, 0xf0fbfa76, 0xe1f7f4eD, + 0xc3efe9db, 0x87dfd3b7, 0x0fbfa76f, 0x1f7f4ede}, + {0x44626b02, 0x88c4d604, 0x1189ac09, 0x23135812, 0x4626b024, 0x8c4d6048, 0x189ac091, 0x31358122, + 0x626b0244, 0xc4d60488, 0x89ac0911, 0x13581223, 0x26b02446, 0x4d60488c, 0x9ac09118, 0x35812231, + 0x6b024462, 0xd60488c4, 0xac091189, 0x58122313, 0xb0244626, 0x60488c4d, 0xc091189a, 0x81223135, + 0x0244626b, 0x0488c4d6, 0x091189ac, 0x12231358, 0x244626b0, 0x488c4d60, 0x91189ac0, 0x22313581, + 0x44626b02, 0x88c4d604, 0x1189ac09, 0x23135812}, + {0x79e27c8a, 0xf3c4f914, 0xe789f229, 0xcf13e453, 0x9e27c8a7, 0x3c4f914f, 0x789f229e, 0xf13e453c, + 0xe27c8a79, 0xc4f914f3, 0x89f229e7, 0x13e453cf, 0x27c8a79e, 0x4f914f3c, 0x9f229e78, 0x3e453cf1, + 0x7c8a79e2, 0xf914f3c4, 0xf229e789, 0xe453cf13, 0xc8a79e27, 0x914f3c4f, 0x229e789f, 0x453cf13e, + 0x8a79e27c, 0x14f3c4f9, 0x29e789f2, 0x53cf13e4, 0xa79e27c8, 0x4f3c4f91, 0x9e789f22, 0x3cf13e45, + 0x79e27c8a, 0xf3c4f914, 0xe789f229, 0xcf13e453}, + {0x78df30ec, 0xf1be61d8, 0xe37cc3b1, 0xc6f98763, 0x8df30ec7, 0x1be61d8f, 0x37cc3b1e, 0x6f98763c, + 0xdf30ec78, 0xbe61d8f1, 0x7cc3b1e3, 0xf98763c6, 0xf30ec78d, 0xe61d8f1b, 0xcc3b1e37, 0x98763c6f, + 0x30ec78df, 0x61d8f1be, 0xc3b1e37c, 0x8763c6f9, 0x0ec78df3, 0x1d8f1be6, 0x3b1e37cc, 0x763c6f98, + 0xec78df30, 0xd8f1be61, 0xb1e37cc3, 0x63c6f987, 0xc78df30e, 0x8f1be61d, 0x1e37cc3b, 0x3c6f9876, + 0x78df30ec, 0xf1be61d8, 0xe37cc3b1, 0xc6f98763}, + {0x715ea49e, 0xe2bd493c, 0xc57a9279, 0x8af524f3, 0x15ea49e7, 0x2bd493ce, 0x57a9279c, 0xaf524f38, + 0x5ea49e71, 0xbd493ce2, 0x7a9279c5, 0xf524f38a, 0xea49e715, 0xd493ce2b, 0xa9279c57, 0x524f38af, + 0xa49e715e, 0x493ce2bd, 0x9279c57a, 0x24f38af5, 0x49e715ea, 0x93ce2bd4, 0x279c57a9, 0x4f38af52, + 0x9e715ea4, 0x3ce2bd49, 0x79c57a92, 0xf38af524, 0xe715ea49, 0xce2bd493, 0x9c57a927, 0x38af524f, + 0x715ea49e, 0xe2bd493c, 0xc57a9279, 0x8af524f3}, + {0xc785da0a, 0x8f0bb415, 0x1e17682b, 0x3c2ed056, 0x785da0ac, 0xf0bb4158, 0xe17682b1, 0xc2ed0563, + 0x85da0ac7, 0x0bb4158f, 0x17682b1e, 0x2ed0563c, 0x5da0ac78, 0xbb4158f0, 0x7682b1e1, 0xed0563c2, + 0xda0ac785, 0xb4158f0b, 0x682b1e17, 0xd0563c2e, 0xa0ac785d, 0x4158f0bb, 0x82b1e176, 0x0563c2ed, + 0x0ac785da, 0x158f0bb4, 0x2b1e1768, 0x563c2ed0, 0xac785da0, 0x58f0bb41, 0xb1e17682, 0x63c2ed05, + 0xc785da0a, 0x8f0bb415, 0x1e17682b, 0x3c2ed056}, + {0xe04ef22a, 0xc09de455, 0x813bc8ab, 0x02779157, 0x04ef22ae, 0x09de455c, 0x13bc8ab8, 0x27791570, + 0x4ef22ae0, 0x9de455c0, 0x3bc8ab81, 0x77915702, 0xef22ae04, 0xde455c09, 0xbc8ab813, 0x79157027, + 0xf22ae04e, 0xe455c09d, 0xc8ab813b, 0x91570277, 0x22ae04ef, 0x455c09de, 0x8ab813bc, 0x15702779, + 0x2ae04ef2, 0x55c09de4, 0xab813bc8, 0x57027791, 0xae04ef22, 0x5c09de45, 0xb813bc8a, 0x70277915, + 0xe04ef22a, 0xc09de455, 0x813bc8ab, 0x02779157}, + {0xe5c40957, 0xcb8812af, 0x9710255f, 0x2e204abf, 0x5c40957e, 0xb8812afc, 0x710255f9, 0xe204abf2, + 0xc40957e5, 0x8812afcb, 0x10255f97, 0x204abf2e, 0x40957e5c, 0x812afcb8, 0x0255f971, 0x04abf2e2, + 0x0957e5c4, 0x12afcb88, 0x255f9710, 0x4abf2e20, 0x957e5c40, 0x2afcb881, 0x55f97102, 0xabf2e204, + 0x57e5c409, 0xafcb8812, 0x5f971025, 0xbf2e204a, 0x7e5c4095, 0xfcb8812a, 0xf9710255, 0xf2e204ab, + 0xe5c40957, 0xcb8812af, 0x9710255f, 0x2e204abf} +}; + +void lea_set_key_generic(unsigned int *rk, unsigned long *round, const unsigned char *mk, unsigned long mk_len) +{ + const unsigned int* _mk = (const unsigned int*)mk; + switch(mk_len) + { + case 16: + rk[ 0] = ROL(loadU32(_mk[0]) + delta[0][ 0], 1); + rk[ 6] = ROL(rk[ 0] + delta[1][ 1], 1); + rk[ 12] = ROL(rk[ 6] + delta[2][ 2], 1); + rk[ 18] = ROL(rk[ 12] + delta[3][ 3], 1); + rk[ 24] = ROL(rk[ 18] + delta[0][ 4], 1); + rk[ 30] = ROL(rk[ 24] + delta[1][ 5], 1); + rk[ 36] = ROL(rk[ 30] + delta[2][ 6], 1); + rk[ 42] = ROL(rk[ 36] + delta[3][ 7], 1); + rk[ 48] = ROL(rk[ 42] + delta[0][ 8], 1); + rk[ 54] = ROL(rk[ 48] + delta[1][ 9], 1); + rk[ 60] = ROL(rk[ 54] + delta[2][10], 1); + rk[ 66] = ROL(rk[ 60] + delta[3][11], 1); + rk[ 72] = ROL(rk[ 66] + delta[0][12], 1); + rk[ 78] = ROL(rk[ 72] + delta[1][13], 1); + rk[ 84] = ROL(rk[ 78] + delta[2][14], 1); + rk[ 90] = ROL(rk[ 84] + delta[3][15], 1); + rk[ 96] = ROL(rk[ 90] + delta[0][16], 1); + rk[102] = ROL(rk[ 96] + delta[1][17], 1); + rk[108] = ROL(rk[102] + delta[2][18], 1); + rk[114] = ROL(rk[108] + delta[3][19], 1); + rk[120] = ROL(rk[114] + delta[0][20], 1); + rk[126] = ROL(rk[120] + delta[1][21], 1); + rk[132] = ROL(rk[126] + delta[2][22], 1); + rk[138] = ROL(rk[132] + delta[3][23], 1); + + rk[ 1] = rk[ 3] = rk[ 5] = ROL(loadU32(_mk[1]) + delta[0][ 1], 3); + rk[ 7] = rk[ 9] = rk[ 11] = ROL(rk[ 1] + delta[1][ 2], 3); + rk[ 13] = rk[ 15] = rk[ 17] = ROL(rk[ 7] + delta[2][ 3], 3); + rk[ 19] = rk[ 21] = rk[ 23] = ROL(rk[ 13] + delta[3][ 4], 3); + rk[ 25] = rk[ 27] = rk[ 29] = ROL(rk[ 19] + delta[0][ 5], 3); + rk[ 31] = rk[ 33] = rk[ 35] = ROL(rk[ 25] + delta[1][ 6], 3); + rk[ 37] = rk[ 39] = rk[ 41] = ROL(rk[ 31] + delta[2][ 7], 3); + rk[ 43] = rk[ 45] = rk[ 47] = ROL(rk[ 37] + delta[3][ 8], 3); + rk[ 49] = rk[ 51] = rk[ 53] = ROL(rk[ 43] + delta[0][ 9], 3); + rk[ 55] = rk[ 57] = rk[ 59] = ROL(rk[ 49] + delta[1][10], 3); + rk[ 61] = rk[ 63] = rk[ 65] = ROL(rk[ 55] + delta[2][11], 3); + rk[ 67] = rk[ 69] = rk[ 71] = ROL(rk[ 61] + delta[3][12], 3); + rk[ 73] = rk[ 75] = rk[ 77] = ROL(rk[ 67] + delta[0][13], 3); + rk[ 79] = rk[ 81] = rk[ 83] = ROL(rk[ 73] + delta[1][14], 3); + rk[ 85] = rk[ 87] = rk[ 89] = ROL(rk[ 79] + delta[2][15], 3); + rk[ 91] = rk[ 93] = rk[ 95] = ROL(rk[ 85] + delta[3][16], 3); + rk[ 97] = rk[ 99] = rk[101] = ROL(rk[ 91] + delta[0][17], 3); + rk[103] = rk[105] = rk[107] = ROL(rk[ 97] + delta[1][18], 3); + rk[109] = rk[111] = rk[113] = ROL(rk[103] + delta[2][19], 3); + rk[115] = rk[117] = rk[119] = ROL(rk[109] + delta[3][20], 3); + rk[121] = rk[123] = rk[125] = ROL(rk[115] + delta[0][21], 3); + rk[127] = rk[129] = rk[131] = ROL(rk[121] + delta[1][22], 3); + rk[133] = rk[135] = rk[137] = ROL(rk[127] + delta[2][23], 3); + rk[139] = rk[141] = rk[143] = ROL(rk[133] + delta[3][24], 3); + + rk[ 2] = ROL(loadU32(_mk[2]) + delta[0][ 2], 6); + rk[ 8] = ROL(rk[ 2] + delta[1][ 3], 6); + rk[ 14] = ROL(rk[ 8] + delta[2][ 4], 6); + rk[ 20] = ROL(rk[ 14] + delta[3][ 5], 6); + rk[ 26] = ROL(rk[ 20] + delta[0][ 6], 6); + rk[ 32] = ROL(rk[ 26] + delta[1][ 7], 6); + rk[ 38] = ROL(rk[ 32] + delta[2][ 8], 6); + rk[ 44] = ROL(rk[ 38] + delta[3][ 9], 6); + rk[ 50] = ROL(rk[ 44] + delta[0][10], 6); + rk[ 56] = ROL(rk[ 50] + delta[1][11], 6); + rk[ 62] = ROL(rk[ 56] + delta[2][12], 6); + rk[ 68] = ROL(rk[ 62] + delta[3][13], 6); + rk[ 74] = ROL(rk[ 68] + delta[0][14], 6); + rk[ 80] = ROL(rk[ 74] + delta[1][15], 6); + rk[ 86] = ROL(rk[ 80] + delta[2][16], 6); + rk[ 92] = ROL(rk[ 86] + delta[3][17], 6); + rk[ 98] = ROL(rk[ 92] + delta[0][18], 6); + rk[104] = ROL(rk[ 98] + delta[1][19], 6); + rk[110] = ROL(rk[104] + delta[2][20], 6); + rk[116] = ROL(rk[110] + delta[3][21], 6); + rk[122] = ROL(rk[116] + delta[0][22], 6); + rk[128] = ROL(rk[122] + delta[1][23], 6); + rk[134] = ROL(rk[128] + delta[2][24], 6); + rk[140] = ROL(rk[134] + delta[3][25], 6); + + rk[ 4] = ROL(loadU32(_mk[3]) + delta[0][ 3], 11); + rk[ 10] = ROL(rk[ 4] + delta[1][ 4], 11); + rk[ 16] = ROL(rk[ 10] + delta[2][ 5], 11); + rk[ 22] = ROL(rk[ 16] + delta[3][ 6], 11); + rk[ 28] = ROL(rk[ 22] + delta[0][ 7], 11); + rk[ 34] = ROL(rk[ 28] + delta[1][ 8], 11); + rk[ 40] = ROL(rk[ 34] + delta[2][ 9], 11); + rk[ 46] = ROL(rk[ 40] + delta[3][10], 11); + rk[ 52] = ROL(rk[ 46] + delta[0][11], 11); + rk[ 58] = ROL(rk[ 52] + delta[1][12], 11); + rk[ 64] = ROL(rk[ 58] + delta[2][13], 11); + rk[ 70] = ROL(rk[ 64] + delta[3][14], 11); + rk[ 76] = ROL(rk[ 70] + delta[0][15], 11); + rk[ 82] = ROL(rk[ 76] + delta[1][16], 11); + rk[ 88] = ROL(rk[ 82] + delta[2][17], 11); + rk[ 94] = ROL(rk[ 88] + delta[3][18], 11); + rk[100] = ROL(rk[ 94] + delta[0][19], 11); + rk[106] = ROL(rk[100] + delta[1][20], 11); + rk[112] = ROL(rk[106] + delta[2][21], 11); + rk[118] = ROL(rk[112] + delta[3][22], 11); + rk[124] = ROL(rk[118] + delta[0][23], 11); + rk[130] = ROL(rk[124] + delta[1][24], 11); + rk[136] = ROL(rk[130] + delta[2][25], 11); + rk[142] = ROL(rk[136] + delta[3][26], 11); + break; + + case 24: + rk[ 0] = ROL(loadU32(_mk[0]) + delta[0][ 0], 1); + rk[ 6] = ROL(rk[ 0] + delta[1][ 1], 1); + rk[ 12] = ROL(rk[ 6] + delta[2][ 2], 1); + rk[ 18] = ROL(rk[ 12] + delta[3][ 3], 1); + rk[ 24] = ROL(rk[ 18] + delta[4][ 4], 1); + rk[ 30] = ROL(rk[ 24] + delta[5][ 5], 1); + rk[ 36] = ROL(rk[ 30] + delta[0][ 6], 1); + rk[ 42] = ROL(rk[ 36] + delta[1][ 7], 1); + rk[ 48] = ROL(rk[ 42] + delta[2][ 8], 1); + rk[ 54] = ROL(rk[ 48] + delta[3][ 9], 1); + rk[ 60] = ROL(rk[ 54] + delta[4][10], 1); + rk[ 66] = ROL(rk[ 60] + delta[5][11], 1); + rk[ 72] = ROL(rk[ 66] + delta[0][12], 1); + rk[ 78] = ROL(rk[ 72] + delta[1][13], 1); + rk[ 84] = ROL(rk[ 78] + delta[2][14], 1); + rk[ 90] = ROL(rk[ 84] + delta[3][15], 1); + rk[ 96] = ROL(rk[ 90] + delta[4][16], 1); + rk[102] = ROL(rk[ 96] + delta[5][17], 1); + rk[108] = ROL(rk[102] + delta[0][18], 1); + rk[114] = ROL(rk[108] + delta[1][19], 1); + rk[120] = ROL(rk[114] + delta[2][20], 1); + rk[126] = ROL(rk[120] + delta[3][21], 1); + rk[132] = ROL(rk[126] + delta[4][22], 1); + rk[138] = ROL(rk[132] + delta[5][23], 1); + rk[144] = ROL(rk[138] + delta[0][24], 1); + rk[150] = ROL(rk[144] + delta[1][25], 1); + rk[156] = ROL(rk[150] + delta[2][26], 1); + rk[162] = ROL(rk[156] + delta[3][27], 1); + + rk[ 1] = ROL(loadU32(_mk[1]) + delta[0][ 1], 3); + rk[ 7] = ROL(rk[ 1] + delta[1][ 2], 3); + rk[ 13] = ROL(rk[ 7] + delta[2][ 3], 3); + rk[ 19] = ROL(rk[ 13] + delta[3][ 4], 3); + rk[ 25] = ROL(rk[ 19] + delta[4][ 5], 3); + rk[ 31] = ROL(rk[ 25] + delta[5][ 6], 3); + rk[ 37] = ROL(rk[ 31] + delta[0][ 7], 3); + rk[ 43] = ROL(rk[ 37] + delta[1][ 8], 3); + rk[ 49] = ROL(rk[ 43] + delta[2][ 9], 3); + rk[ 55] = ROL(rk[ 49] + delta[3][10], 3); + rk[ 61] = ROL(rk[ 55] + delta[4][11], 3); + rk[ 67] = ROL(rk[ 61] + delta[5][12], 3); + rk[ 73] = ROL(rk[ 67] + delta[0][13], 3); + rk[ 79] = ROL(rk[ 73] + delta[1][14], 3); + rk[ 85] = ROL(rk[ 79] + delta[2][15], 3); + rk[ 91] = ROL(rk[ 85] + delta[3][16], 3); + rk[ 97] = ROL(rk[ 91] + delta[4][17], 3); + rk[103] = ROL(rk[ 97] + delta[5][18], 3); + rk[109] = ROL(rk[103] + delta[0][19], 3); + rk[115] = ROL(rk[109] + delta[1][20], 3); + rk[121] = ROL(rk[115] + delta[2][21], 3); + rk[127] = ROL(rk[121] + delta[3][22], 3); + rk[133] = ROL(rk[127] + delta[4][23], 3); + rk[139] = ROL(rk[133] + delta[5][24], 3); + rk[145] = ROL(rk[139] + delta[0][25], 3); + rk[151] = ROL(rk[145] + delta[1][26], 3); + rk[157] = ROL(rk[151] + delta[2][27], 3); + rk[163] = ROL(rk[157] + delta[3][28], 3); + + rk[ 2] = ROL(loadU32(_mk[2]) + delta[0][ 2], 6); + rk[ 8] = ROL(rk[ 2] + delta[1][ 3], 6); + rk[ 14] = ROL(rk[ 8] + delta[2][ 4], 6); + rk[ 20] = ROL(rk[ 14] + delta[3][ 5], 6); + rk[ 26] = ROL(rk[ 20] + delta[4][ 6], 6); + rk[ 32] = ROL(rk[ 26] + delta[5][ 7], 6); + rk[ 38] = ROL(rk[ 32] + delta[0][ 8], 6); + rk[ 44] = ROL(rk[ 38] + delta[1][ 9], 6); + rk[ 50] = ROL(rk[ 44] + delta[2][10], 6); + rk[ 56] = ROL(rk[ 50] + delta[3][11], 6); + rk[ 62] = ROL(rk[ 56] + delta[4][12], 6); + rk[ 68] = ROL(rk[ 62] + delta[5][13], 6); + rk[ 74] = ROL(rk[ 68] + delta[0][14], 6); + rk[ 80] = ROL(rk[ 74] + delta[1][15], 6); + rk[ 86] = ROL(rk[ 80] + delta[2][16], 6); + rk[ 92] = ROL(rk[ 86] + delta[3][17], 6); + rk[ 98] = ROL(rk[ 92] + delta[4][18], 6); + rk[104] = ROL(rk[ 98] + delta[5][19], 6); + rk[110] = ROL(rk[104] + delta[0][20], 6); + rk[116] = ROL(rk[110] + delta[1][21], 6); + rk[122] = ROL(rk[116] + delta[2][22], 6); + rk[128] = ROL(rk[122] + delta[3][23], 6); + rk[134] = ROL(rk[128] + delta[4][24], 6); + rk[140] = ROL(rk[134] + delta[5][25], 6); + rk[146] = ROL(rk[140] + delta[0][26], 6); + rk[152] = ROL(rk[146] + delta[1][27], 6); + rk[158] = ROL(rk[152] + delta[2][28], 6); + rk[164] = ROL(rk[158] + delta[3][29], 6); + + rk[ 3] = ROL(loadU32(_mk[3]) + delta[0][ 3], 11); + rk[ 9] = ROL(rk[ 3] + delta[1][ 4], 11); + rk[ 15] = ROL(rk[ 9] + delta[2][ 5], 11); + rk[ 21] = ROL(rk[ 15] + delta[3][ 6], 11); + rk[ 27] = ROL(rk[ 21] + delta[4][ 7], 11); + rk[ 33] = ROL(rk[ 27] + delta[5][ 8], 11); + rk[ 39] = ROL(rk[ 33] + delta[0][ 9], 11); + rk[ 45] = ROL(rk[ 39] + delta[1][10], 11); + rk[ 51] = ROL(rk[ 45] + delta[2][11], 11); + rk[ 57] = ROL(rk[ 51] + delta[3][12], 11); + rk[ 63] = ROL(rk[ 57] + delta[4][13], 11); + rk[ 69] = ROL(rk[ 63] + delta[5][14], 11); + rk[ 75] = ROL(rk[ 69] + delta[0][15], 11); + rk[ 81] = ROL(rk[ 75] + delta[1][16], 11); + rk[ 87] = ROL(rk[ 81] + delta[2][17], 11); + rk[ 93] = ROL(rk[ 87] + delta[3][18], 11); + rk[ 99] = ROL(rk[ 93] + delta[4][19], 11); + rk[105] = ROL(rk[ 99] + delta[5][20], 11); + rk[111] = ROL(rk[105] + delta[0][21], 11); + rk[117] = ROL(rk[111] + delta[1][22], 11); + rk[123] = ROL(rk[117] + delta[2][23], 11); + rk[129] = ROL(rk[123] + delta[3][24], 11); + rk[135] = ROL(rk[129] + delta[4][25], 11); + rk[141] = ROL(rk[135] + delta[5][26], 11); + rk[147] = ROL(rk[141] + delta[0][27], 11); + rk[153] = ROL(rk[147] + delta[1][28], 11); + rk[159] = ROL(rk[153] + delta[2][29], 11); + rk[165] = ROL(rk[159] + delta[3][30], 11); + + rk[ 4] = ROL(loadU32(_mk[4]) + delta[0][ 4], 13); + rk[ 10] = ROL(rk[ 4] + delta[1][ 5], 13); + rk[ 16] = ROL(rk[ 10] + delta[2][ 6], 13); + rk[ 22] = ROL(rk[ 16] + delta[3][ 7], 13); + rk[ 28] = ROL(rk[ 22] + delta[4][ 8], 13); + rk[ 34] = ROL(rk[ 28] + delta[5][ 9], 13); + rk[ 40] = ROL(rk[ 34] + delta[0][10], 13); + rk[ 46] = ROL(rk[ 40] + delta[1][11], 13); + rk[ 52] = ROL(rk[ 46] + delta[2][12], 13); + rk[ 58] = ROL(rk[ 52] + delta[3][13], 13); + rk[ 64] = ROL(rk[ 58] + delta[4][14], 13); + rk[ 70] = ROL(rk[ 64] + delta[5][15], 13); + rk[ 76] = ROL(rk[ 70] + delta[0][16], 13); + rk[ 82] = ROL(rk[ 76] + delta[1][17], 13); + rk[ 88] = ROL(rk[ 82] + delta[2][18], 13); + rk[ 94] = ROL(rk[ 88] + delta[3][19], 13); + rk[100] = ROL(rk[ 94] + delta[4][20], 13); + rk[106] = ROL(rk[100] + delta[5][21], 13); + rk[112] = ROL(rk[106] + delta[0][22], 13); + rk[118] = ROL(rk[112] + delta[1][23], 13); + rk[124] = ROL(rk[118] + delta[2][24], 13); + rk[130] = ROL(rk[124] + delta[3][25], 13); + rk[136] = ROL(rk[130] + delta[4][26], 13); + rk[142] = ROL(rk[136] + delta[5][27], 13); + rk[148] = ROL(rk[142] + delta[0][28], 13); + rk[154] = ROL(rk[148] + delta[1][29], 13); + rk[160] = ROL(rk[154] + delta[2][30], 13); + rk[166] = ROL(rk[160] + delta[3][31], 13); + + rk[ 5] = ROL(loadU32(_mk[5]) + delta[0][ 5], 17); + rk[ 11] = ROL(rk[ 5] + delta[1][ 6], 17); + rk[ 17] = ROL(rk[ 11] + delta[2][ 7], 17); + rk[ 23] = ROL(rk[ 17] + delta[3][ 8], 17); + rk[ 29] = ROL(rk[ 23] + delta[4][ 9], 17); + rk[ 35] = ROL(rk[ 29] + delta[5][10], 17); + rk[ 41] = ROL(rk[ 35] + delta[0][11], 17); + rk[ 47] = ROL(rk[ 41] + delta[1][12], 17); + rk[ 53] = ROL(rk[ 47] + delta[2][13], 17); + rk[ 59] = ROL(rk[ 53] + delta[3][14], 17); + rk[ 65] = ROL(rk[ 59] + delta[4][15], 17); + rk[ 71] = ROL(rk[ 65] + delta[5][16], 17); + rk[ 77] = ROL(rk[ 71] + delta[0][17], 17); + rk[ 83] = ROL(rk[ 77] + delta[1][18], 17); + rk[ 89] = ROL(rk[ 83] + delta[2][19], 17); + rk[ 95] = ROL(rk[ 89] + delta[3][20], 17); + rk[101] = ROL(rk[ 95] + delta[4][21], 17); + rk[107] = ROL(rk[101] + delta[5][22], 17); + rk[113] = ROL(rk[107] + delta[0][23], 17); + rk[119] = ROL(rk[113] + delta[1][24], 17); + rk[125] = ROL(rk[119] + delta[2][25], 17); + rk[131] = ROL(rk[125] + delta[3][26], 17); + rk[137] = ROL(rk[131] + delta[4][27], 17); + rk[143] = ROL(rk[137] + delta[5][28], 17); + rk[149] = ROL(rk[143] + delta[0][29], 17); + rk[155] = ROL(rk[149] + delta[1][30], 17); + rk[161] = ROL(rk[155] + delta[2][31], 17); + rk[167] = ROL(rk[161] + delta[3][ 0], 17); + break; + + case 32: + rk[ 0] = ROL(loadU32(_mk[0]) + delta[0][ 0], 1); + rk[ 8] = ROL(rk[ 0] + delta[1][ 3], 6); + rk[ 16] = ROL(rk[ 8] + delta[2][ 6], 13); + rk[ 24] = ROL(rk[ 16] + delta[4][ 4], 1); + rk[ 32] = ROL(rk[ 24] + delta[5][ 7], 6); + rk[ 40] = ROL(rk[ 32] + delta[6][10], 13); + rk[ 48] = ROL(rk[ 40] + delta[0][ 8], 1); + rk[ 56] = ROL(rk[ 48] + delta[1][11], 6); + rk[ 64] = ROL(rk[ 56] + delta[2][14], 13); + rk[ 72] = ROL(rk[ 64] + delta[4][12], 1); + rk[ 80] = ROL(rk[ 72] + delta[5][15], 6); + rk[ 88] = ROL(rk[ 80] + delta[6][18], 13); + rk[ 96] = ROL(rk[ 88] + delta[0][16], 1); + rk[104] = ROL(rk[ 96] + delta[1][19], 6); + rk[112] = ROL(rk[104] + delta[2][22], 13); + rk[120] = ROL(rk[112] + delta[4][20], 1); + rk[128] = ROL(rk[120] + delta[5][23], 6); + rk[136] = ROL(rk[128] + delta[6][26], 13); + rk[144] = ROL(rk[136] + delta[0][24], 1); + rk[152] = ROL(rk[144] + delta[1][27], 6); + rk[160] = ROL(rk[152] + delta[2][30], 13); + rk[168] = ROL(rk[160] + delta[4][28], 1); + rk[176] = ROL(rk[168] + delta[5][31], 6); + rk[184] = ROL(rk[176] + delta[6][ 2], 13); + + rk[ 1] = ROL(loadU32(_mk[1]) + delta[0][ 1], 3); + rk[ 9] = ROL(rk[ 1] + delta[1][ 4], 11); + rk[ 17] = ROL(rk[ 9] + delta[2][ 7], 17); + rk[ 25] = ROL(rk[ 17] + delta[4][ 5], 3); + rk[ 33] = ROL(rk[ 25] + delta[5][ 8], 11); + rk[ 41] = ROL(rk[ 33] + delta[6][11], 17); + rk[ 49] = ROL(rk[ 41] + delta[0][ 9], 3); + rk[ 57] = ROL(rk[ 49] + delta[1][12], 11); + rk[ 65] = ROL(rk[ 57] + delta[2][15], 17); + rk[ 73] = ROL(rk[ 65] + delta[4][13], 3); + rk[ 81] = ROL(rk[ 73] + delta[5][16], 11); + rk[ 89] = ROL(rk[ 81] + delta[6][19], 17); + rk[ 97] = ROL(rk[ 89] + delta[0][17], 3); + rk[105] = ROL(rk[ 97] + delta[1][20], 11); + rk[113] = ROL(rk[105] + delta[2][23], 17); + rk[121] = ROL(rk[113] + delta[4][21], 3); + rk[129] = ROL(rk[121] + delta[5][24], 11); + rk[137] = ROL(rk[129] + delta[6][27], 17); + rk[145] = ROL(rk[137] + delta[0][25], 3); + rk[153] = ROL(rk[145] + delta[1][28], 11); + rk[161] = ROL(rk[153] + delta[2][31], 17); + rk[169] = ROL(rk[161] + delta[4][29], 3); + rk[177] = ROL(rk[169] + delta[5][ 0], 11); + rk[185] = ROL(rk[177] + delta[6][ 3], 17); + + rk[ 2] = ROL(loadU32(_mk[2]) + delta[0][ 2], 6); + rk[ 10] = ROL(rk[ 2] + delta[1][ 5], 13); + rk[ 18] = ROL(rk[ 10] + delta[3][ 3], 1); + rk[ 26] = ROL(rk[ 18] + delta[4][ 6], 6); + rk[ 34] = ROL(rk[ 26] + delta[5][ 9], 13); + rk[ 42] = ROL(rk[ 34] + delta[7][ 7], 1); + rk[ 50] = ROL(rk[ 42] + delta[0][10], 6); + rk[ 58] = ROL(rk[ 50] + delta[1][13], 13); + rk[ 66] = ROL(rk[ 58] + delta[3][11], 1); + rk[ 74] = ROL(rk[ 66] + delta[4][14], 6); + rk[ 82] = ROL(rk[ 74] + delta[5][17], 13); + rk[ 90] = ROL(rk[ 82] + delta[7][15], 1); + rk[ 98] = ROL(rk[ 90] + delta[0][18], 6); + rk[106] = ROL(rk[ 98] + delta[1][21], 13); + rk[114] = ROL(rk[106] + delta[3][19], 1); + rk[122] = ROL(rk[114] + delta[4][22], 6); + rk[130] = ROL(rk[122] + delta[5][25], 13); + rk[138] = ROL(rk[130] + delta[7][23], 1); + rk[146] = ROL(rk[138] + delta[0][26], 6); + rk[154] = ROL(rk[146] + delta[1][29], 13); + rk[162] = ROL(rk[154] + delta[3][27], 1); + rk[170] = ROL(rk[162] + delta[4][30], 6); + rk[178] = ROL(rk[170] + delta[5][ 1], 13); + rk[186] = ROL(rk[178] + delta[7][31], 1); + + rk[ 3] = ROL(loadU32(_mk[3]) + delta[0][ 3], 11); + rk[ 11] = ROL(rk[ 3] + delta[1][ 6], 17); + rk[ 19] = ROL(rk[ 11] + delta[3][ 4], 3); + rk[ 27] = ROL(rk[ 19] + delta[4][ 7], 11); + rk[ 35] = ROL(rk[ 27] + delta[5][10], 17); + rk[ 43] = ROL(rk[ 35] + delta[7][ 8], 3); + rk[ 51] = ROL(rk[ 43] + delta[0][11], 11); + rk[ 59] = ROL(rk[ 51] + delta[1][14], 17); + rk[ 67] = ROL(rk[ 59] + delta[3][12], 3); + rk[ 75] = ROL(rk[ 67] + delta[4][15], 11); + rk[ 83] = ROL(rk[ 75] + delta[5][18], 17); + rk[ 91] = ROL(rk[ 83] + delta[7][16], 3); + rk[ 99] = ROL(rk[ 91] + delta[0][19], 11); + rk[107] = ROL(rk[ 99] + delta[1][22], 17); + rk[115] = ROL(rk[107] + delta[3][20], 3); + rk[123] = ROL(rk[115] + delta[4][23], 11); + rk[131] = ROL(rk[123] + delta[5][26], 17); + rk[139] = ROL(rk[131] + delta[7][24], 3); + rk[147] = ROL(rk[139] + delta[0][27], 11); + rk[155] = ROL(rk[147] + delta[1][30], 17); + rk[163] = ROL(rk[155] + delta[3][28], 3); + rk[171] = ROL(rk[163] + delta[4][31], 11); + rk[179] = ROL(rk[171] + delta[5][ 2], 17); + rk[187] = ROL(rk[179] + delta[7][ 0], 3); + + rk[ 4] = ROL(loadU32(_mk[4]) + delta[0][ 4], 13); + rk[ 12] = ROL(rk[ 4] + delta[2][ 2], 1); + rk[ 20] = ROL(rk[ 12] + delta[3][ 5], 6); + rk[ 28] = ROL(rk[ 20] + delta[4][ 8], 13); + rk[ 36] = ROL(rk[ 28] + delta[6][ 6], 1); + rk[ 44] = ROL(rk[ 36] + delta[7][ 9], 6); + rk[ 52] = ROL(rk[ 44] + delta[0][12], 13); + rk[ 60] = ROL(rk[ 52] + delta[2][10], 1); + rk[ 68] = ROL(rk[ 60] + delta[3][13], 6); + rk[ 76] = ROL(rk[ 68] + delta[4][16], 13); + rk[ 84] = ROL(rk[ 76] + delta[6][14], 1); + rk[ 92] = ROL(rk[ 84] + delta[7][17], 6); + rk[100] = ROL(rk[ 92] + delta[0][20], 13); + rk[108] = ROL(rk[100] + delta[2][18], 1); + rk[116] = ROL(rk[108] + delta[3][21], 6); + rk[124] = ROL(rk[116] + delta[4][24], 13); + rk[132] = ROL(rk[124] + delta[6][22], 1); + rk[140] = ROL(rk[132] + delta[7][25], 6); + rk[148] = ROL(rk[140] + delta[0][28], 13); + rk[156] = ROL(rk[148] + delta[2][26], 1); + rk[164] = ROL(rk[156] + delta[3][29], 6); + rk[172] = ROL(rk[164] + delta[4][ 0], 13); + rk[180] = ROL(rk[172] + delta[6][30], 1); + rk[188] = ROL(rk[180] + delta[7][ 1], 6); + + rk[ 5] = ROL(loadU32(_mk[5]) + delta[0][ 5], 17); + rk[ 13] = ROL(rk[ 5] + delta[2][ 3], 3); + rk[ 21] = ROL(rk[ 13] + delta[3][ 6], 11); + rk[ 29] = ROL(rk[ 21] + delta[4][ 9], 17); + rk[ 37] = ROL(rk[ 29] + delta[6][ 7], 3); + rk[ 45] = ROL(rk[ 37] + delta[7][10], 11); + rk[ 53] = ROL(rk[ 45] + delta[0][13], 17); + rk[ 61] = ROL(rk[ 53] + delta[2][11], 3); + rk[ 69] = ROL(rk[ 61] + delta[3][14], 11); + rk[ 77] = ROL(rk[ 69] + delta[4][17], 17); + rk[ 85] = ROL(rk[ 77] + delta[6][15], 3); + rk[ 93] = ROL(rk[ 85] + delta[7][18], 11); + rk[101] = ROL(rk[ 93] + delta[0][21], 17); + rk[109] = ROL(rk[101] + delta[2][19], 3); + rk[117] = ROL(rk[109] + delta[3][22], 11); + rk[125] = ROL(rk[117] + delta[4][25], 17); + rk[133] = ROL(rk[125] + delta[6][23], 3); + rk[141] = ROL(rk[133] + delta[7][26], 11); + rk[149] = ROL(rk[141] + delta[0][29], 17); + rk[157] = ROL(rk[149] + delta[2][27], 3); + rk[165] = ROL(rk[157] + delta[3][30], 11); + rk[173] = ROL(rk[165] + delta[4][ 1], 17); + rk[181] = ROL(rk[173] + delta[6][31], 3); + rk[189] = ROL(rk[181] + delta[7][ 2], 11); + + rk[ 6] = ROL(loadU32(_mk[6]) + delta[1][ 1], 1); + rk[ 14] = ROL(rk[ 6] + delta[2][ 4], 6); + rk[ 22] = ROL(rk[ 14] + delta[3][ 7], 13); + rk[ 30] = ROL(rk[ 22] + delta[5][ 5], 1); + rk[ 38] = ROL(rk[ 30] + delta[6][ 8], 6); + rk[ 46] = ROL(rk[ 38] + delta[7][11], 13); + rk[ 54] = ROL(rk[ 46] + delta[1][ 9], 1); + rk[ 62] = ROL(rk[ 54] + delta[2][12], 6); + rk[ 70] = ROL(rk[ 62] + delta[3][15], 13); + rk[ 78] = ROL(rk[ 70] + delta[5][13], 1); + rk[ 86] = ROL(rk[ 78] + delta[6][16], 6); + rk[ 94] = ROL(rk[ 86] + delta[7][19], 13); + rk[102] = ROL(rk[ 94] + delta[1][17], 1); + rk[110] = ROL(rk[102] + delta[2][20], 6); + rk[118] = ROL(rk[110] + delta[3][23], 13); + rk[126] = ROL(rk[118] + delta[5][21], 1); + rk[134] = ROL(rk[126] + delta[6][24], 6); + rk[142] = ROL(rk[134] + delta[7][27], 13); + rk[150] = ROL(rk[142] + delta[1][25], 1); + rk[158] = ROL(rk[150] + delta[2][28], 6); + rk[166] = ROL(rk[158] + delta[3][31], 13); + rk[174] = ROL(rk[166] + delta[5][29], 1); + rk[182] = ROL(rk[174] + delta[6][ 0], 6); + rk[190] = ROL(rk[182] + delta[7][ 3], 13); + + rk[ 7] = ROL(loadU32(_mk[7]) + delta[1][ 2], 3); + rk[ 15] = ROL(rk[ 7] + delta[2][ 5], 11); + rk[ 23] = ROL(rk[ 15] + delta[3][ 8], 17); + rk[ 31] = ROL(rk[ 23] + delta[5][ 6], 3); + rk[ 39] = ROL(rk[ 31] + delta[6][ 9], 11); + rk[ 47] = ROL(rk[ 39] + delta[7][12], 17); + rk[ 55] = ROL(rk[ 47] + delta[1][10], 3); + rk[ 63] = ROL(rk[ 55] + delta[2][13], 11); + rk[ 71] = ROL(rk[ 63] + delta[3][16], 17); + rk[ 79] = ROL(rk[ 71] + delta[5][14], 3); + rk[ 87] = ROL(rk[ 79] + delta[6][17], 11); + rk[ 95] = ROL(rk[ 87] + delta[7][20], 17); + rk[103] = ROL(rk[ 95] + delta[1][18], 3); + rk[111] = ROL(rk[103] + delta[2][21], 11); + rk[119] = ROL(rk[111] + delta[3][24], 17); + rk[127] = ROL(rk[119] + delta[5][22], 3); + rk[135] = ROL(rk[127] + delta[6][25], 11); + rk[143] = ROL(rk[135] + delta[7][28], 17); + rk[151] = ROL(rk[143] + delta[1][26], 3); + rk[159] = ROL(rk[151] + delta[2][29], 11); + rk[167] = ROL(rk[159] + delta[3][ 0], 17); + rk[175] = ROL(rk[167] + delta[5][30], 3); + rk[183] = ROL(rk[175] + delta[6][ 1], 11); + rk[191] = ROL(rk[183] + delta[7][ 4], 17); + + break; + + default: + return; + } + + *round = (mk_len >> 1) + 16; +} + +void lea_encrypt(unsigned char *ct, const unsigned char *pt, const unsigned int *rk, const unsigned long round) +{ + unsigned int X0,X1,X2,X3; + + const unsigned int * _pt = (const unsigned int *)pt; + unsigned int * _ct = (unsigned int*)ct; + + X0 = loadU32(_pt[0]); + X1 = loadU32(_pt[1]); + X2 = loadU32(_pt[2]); + X3 = loadU32(_pt[3]); + + X3 = ROR((X2 ^ rk[ 4]) + (X3 ^ rk[ 5]), 3); + X2 = ROR((X1 ^ rk[ 2]) + (X2 ^ rk[ 3]), 5); + X1 = ROL((X0 ^ rk[ 0]) + (X1 ^ rk[ 1]), 9); + X0 = ROR((X3 ^ rk[ 10]) + (X0 ^ rk[ 11]), 3); + X3 = ROR((X2 ^ rk[ 8]) + (X3 ^ rk[ 9]), 5); + X2 = ROL((X1 ^ rk[ 6]) + (X2 ^ rk[ 7]), 9); + X1 = ROR((X0 ^ rk[ 16]) + (X1 ^ rk[ 17]), 3); + X0 = ROR((X3 ^ rk[ 14]) + (X0 ^ rk[ 15]), 5); + X3 = ROL((X2 ^ rk[ 12]) + (X3 ^ rk[ 13]), 9); + X2 = ROR((X1 ^ rk[ 22]) + (X2 ^ rk[ 23]), 3); + X1 = ROR((X0 ^ rk[ 20]) + (X1 ^ rk[ 21]), 5); + X0 = ROL((X3 ^ rk[ 18]) + (X0 ^ rk[ 19]), 9); + + X3 = ROR((X2 ^ rk[ 28]) + (X3 ^ rk[ 29]), 3); + X2 = ROR((X1 ^ rk[ 26]) + (X2 ^ rk[ 27]), 5); + X1 = ROL((X0 ^ rk[ 24]) + (X1 ^ rk[ 25]), 9); + X0 = ROR((X3 ^ rk[ 34]) + (X0 ^ rk[ 35]), 3); + X3 = ROR((X2 ^ rk[ 32]) + (X3 ^ rk[ 33]), 5); + X2 = ROL((X1 ^ rk[ 30]) + (X2 ^ rk[ 31]), 9); + X1 = ROR((X0 ^ rk[ 40]) + (X1 ^ rk[ 41]), 3); + X0 = ROR((X3 ^ rk[ 38]) + (X0 ^ rk[ 39]), 5); + X3 = ROL((X2 ^ rk[ 36]) + (X3 ^ rk[ 37]), 9); + X2 = ROR((X1 ^ rk[ 46]) + (X2 ^ rk[ 47]), 3); + X1 = ROR((X0 ^ rk[ 44]) + (X1 ^ rk[ 45]), 5); + X0 = ROL((X3 ^ rk[ 42]) + (X0 ^ rk[ 43]), 9); + + X3 = ROR((X2 ^ rk[ 52]) + (X3 ^ rk[ 53]), 3); + X2 = ROR((X1 ^ rk[ 50]) + (X2 ^ rk[ 51]), 5); + X1 = ROL((X0 ^ rk[ 48]) + (X1 ^ rk[ 49]), 9); + X0 = ROR((X3 ^ rk[ 58]) + (X0 ^ rk[ 59]), 3); + X3 = ROR((X2 ^ rk[ 56]) + (X3 ^ rk[ 57]), 5); + X2 = ROL((X1 ^ rk[ 54]) + (X2 ^ rk[ 55]), 9); + X1 = ROR((X0 ^ rk[ 64]) + (X1 ^ rk[ 65]), 3); + X0 = ROR((X3 ^ rk[ 62]) + (X0 ^ rk[ 63]), 5); + X3 = ROL((X2 ^ rk[ 60]) + (X3 ^ rk[ 61]), 9); + X2 = ROR((X1 ^ rk[ 70]) + (X2 ^ rk[ 71]), 3); + X1 = ROR((X0 ^ rk[ 68]) + (X1 ^ rk[ 69]), 5); + X0 = ROL((X3 ^ rk[ 66]) + (X0 ^ rk[ 67]), 9); + + X3 = ROR((X2 ^ rk[ 76]) + (X3 ^ rk[ 77]), 3); + X2 = ROR((X1 ^ rk[ 74]) + (X2 ^ rk[ 75]), 5); + X1 = ROL((X0 ^ rk[ 72]) + (X1 ^ rk[ 73]), 9); + X0 = ROR((X3 ^ rk[ 82]) + (X0 ^ rk[ 83]), 3); + X3 = ROR((X2 ^ rk[ 80]) + (X3 ^ rk[ 81]), 5); + X2 = ROL((X1 ^ rk[ 78]) + (X2 ^ rk[ 79]), 9); + X1 = ROR((X0 ^ rk[ 88]) + (X1 ^ rk[ 89]), 3); + X0 = ROR((X3 ^ rk[ 86]) + (X0 ^ rk[ 87]), 5); + X3 = ROL((X2 ^ rk[ 84]) + (X3 ^ rk[ 85]), 9); + X2 = ROR((X1 ^ rk[ 94]) + (X2 ^ rk[ 95]), 3); + X1 = ROR((X0 ^ rk[ 92]) + (X1 ^ rk[ 93]), 5); + X0 = ROL((X3 ^ rk[ 90]) + (X0 ^ rk[ 91]), 9); + + X3 = ROR((X2 ^ rk[100]) + (X3 ^ rk[101]), 3); + X2 = ROR((X1 ^ rk[ 98]) + (X2 ^ rk[ 99]), 5); + X1 = ROL((X0 ^ rk[ 96]) + (X1 ^ rk[ 97]), 9); + X0 = ROR((X3 ^ rk[106]) + (X0 ^ rk[107]), 3); + X3 = ROR((X2 ^ rk[104]) + (X3 ^ rk[105]), 5); + X2 = ROL((X1 ^ rk[102]) + (X2 ^ rk[103]), 9); + X1 = ROR((X0 ^ rk[112]) + (X1 ^ rk[113]), 3); + X0 = ROR((X3 ^ rk[110]) + (X0 ^ rk[111]), 5); + X3 = ROL((X2 ^ rk[108]) + (X3 ^ rk[109]), 9); + X2 = ROR((X1 ^ rk[118]) + (X2 ^ rk[119]), 3); + X1 = ROR((X0 ^ rk[116]) + (X1 ^ rk[117]), 5); + X0 = ROL((X3 ^ rk[114]) + (X0 ^ rk[115]), 9); + + X3 = ROR((X2 ^ rk[124]) + (X3 ^ rk[125]), 3); + X2 = ROR((X1 ^ rk[122]) + (X2 ^ rk[123]), 5); + X1 = ROL((X0 ^ rk[120]) + (X1 ^ rk[121]), 9); + X0 = ROR((X3 ^ rk[130]) + (X0 ^ rk[131]), 3); + X3 = ROR((X2 ^ rk[128]) + (X3 ^ rk[129]), 5); + X2 = ROL((X1 ^ rk[126]) + (X2 ^ rk[127]), 9); + X1 = ROR((X0 ^ rk[136]) + (X1 ^ rk[137]), 3); + X0 = ROR((X3 ^ rk[134]) + (X0 ^ rk[135]), 5); + X3 = ROL((X2 ^ rk[132]) + (X3 ^ rk[133]), 9); + X2 = ROR((X1 ^ rk[142]) + (X2 ^ rk[143]), 3); + X1 = ROR((X0 ^ rk[140]) + (X1 ^ rk[141]), 5); + X0 = ROL((X3 ^ rk[138]) + (X0 ^ rk[139]), 9); + + if(round > 24) + { + X3 = ROR((X2 ^ rk[148]) + (X3 ^ rk[149]), 3); + X2 = ROR((X1 ^ rk[146]) + (X2 ^ rk[147]), 5); + X1 = ROL((X0 ^ rk[144]) + (X1 ^ rk[145]), 9); + X0 = ROR((X3 ^ rk[154]) + (X0 ^ rk[155]), 3); + X3 = ROR((X2 ^ rk[152]) + (X3 ^ rk[153]), 5); + X2 = ROL((X1 ^ rk[150]) + (X2 ^ rk[151]), 9); + X1 = ROR((X0 ^ rk[160]) + (X1 ^ rk[161]), 3); + X0 = ROR((X3 ^ rk[158]) + (X0 ^ rk[159]), 5); + X3 = ROL((X2 ^ rk[156]) + (X3 ^ rk[157]), 9); + X2 = ROR((X1 ^ rk[166]) + (X2 ^ rk[167]), 3); + X1 = ROR((X0 ^ rk[164]) + (X1 ^ rk[165]), 5); + X0 = ROL((X3 ^ rk[162]) + (X0 ^ rk[163]), 9); + } + + if(round > 28) + { + X3 = ROR((X2 ^ rk[172]) + (X3 ^ rk[173]), 3); + X2 = ROR((X1 ^ rk[170]) + (X2 ^ rk[171]), 5); + X1 = ROL((X0 ^ rk[168]) + (X1 ^ rk[169]), 9); + X0 = ROR((X3 ^ rk[178]) + (X0 ^ rk[179]), 3); + X3 = ROR((X2 ^ rk[176]) + (X3 ^ rk[177]), 5); + X2 = ROL((X1 ^ rk[174]) + (X2 ^ rk[175]), 9); + X1 = ROR((X0 ^ rk[184]) + (X1 ^ rk[185]), 3); + X0 = ROR((X3 ^ rk[182]) + (X0 ^ rk[183]), 5); + X3 = ROL((X2 ^ rk[180]) + (X3 ^ rk[181]), 9); + X2 = ROR((X1 ^ rk[190]) + (X2 ^ rk[191]), 3); + X1 = ROR((X0 ^ rk[188]) + (X1 ^ rk[189]), 5); + X0 = ROL((X3 ^ rk[186]) + (X0 ^ rk[187]), 9); + } + + _ct[0] = loadU32(X0); + _ct[1] = loadU32(X1); + _ct[2] = loadU32(X2); + _ct[3] = loadU32(X3); +} + +void lea_decrypt(unsigned char *pt, const unsigned char *ct, const unsigned int *rk, const unsigned long round) +{ + unsigned int X0,X1,X2,X3; + + + + unsigned int * _pt = (unsigned int *)pt; + const unsigned int * _ct = (const unsigned int*)ct; + + X0 = loadU32(_ct[0]); + X1 = loadU32(_ct[1]); + X2 = loadU32(_ct[2]); + X3 = loadU32(_ct[3]); + + if(round > 28) + { + X0 = (ROR(X0, 9) - (X3 ^ rk[186])) ^ rk[187]; + X1 = (ROL(X1, 5) - (X0 ^ rk[188])) ^ rk[189]; + X2 = (ROL(X2, 3) - (X1 ^ rk[190])) ^ rk[191]; + X3 = (ROR(X3, 9) - (X2 ^ rk[180])) ^ rk[181]; + X0 = (ROL(X0, 5) - (X3 ^ rk[182])) ^ rk[183]; + X1 = (ROL(X1, 3) - (X0 ^ rk[184])) ^ rk[185]; + X2 = (ROR(X2, 9) - (X1 ^ rk[174])) ^ rk[175]; + X3 = (ROL(X3, 5) - (X2 ^ rk[176])) ^ rk[177]; + X0 = (ROL(X0, 3) - (X3 ^ rk[178])) ^ rk[179]; + X1 = (ROR(X1, 9) - (X0 ^ rk[168])) ^ rk[169]; + X2 = (ROL(X2, 5) - (X1 ^ rk[170])) ^ rk[171]; + X3 = (ROL(X3, 3) - (X2 ^ rk[172])) ^ rk[173]; + } + + if(round > 24) + { + X0 = (ROR(X0, 9) - (X3 ^ rk[162])) ^ rk[163]; + X1 = (ROL(X1, 5) - (X0 ^ rk[164])) ^ rk[165]; + X2 = (ROL(X2, 3) - (X1 ^ rk[166])) ^ rk[167]; + X3 = (ROR(X3, 9) - (X2 ^ rk[156])) ^ rk[157]; + X0 = (ROL(X0, 5) - (X3 ^ rk[158])) ^ rk[159]; + X1 = (ROL(X1, 3) - (X0 ^ rk[160])) ^ rk[161]; + X2 = (ROR(X2, 9) - (X1 ^ rk[150])) ^ rk[151]; + X3 = (ROL(X3, 5) - (X2 ^ rk[152])) ^ rk[153]; + X0 = (ROL(X0, 3) - (X3 ^ rk[154])) ^ rk[155]; + X1 = (ROR(X1, 9) - (X0 ^ rk[144])) ^ rk[145]; + X2 = (ROL(X2, 5) - (X1 ^ rk[146])) ^ rk[147]; + X3 = (ROL(X3, 3) - (X2 ^ rk[148])) ^ rk[149]; + } + + X0 = (ROR(X0, 9) - (X3 ^ rk[138])) ^ rk[139]; + X1 = (ROL(X1, 5) - (X0 ^ rk[140])) ^ rk[141]; + X2 = (ROL(X2, 3) - (X1 ^ rk[142])) ^ rk[143]; + X3 = (ROR(X3, 9) - (X2 ^ rk[132])) ^ rk[133]; + X0 = (ROL(X0, 5) - (X3 ^ rk[134])) ^ rk[135]; + X1 = (ROL(X1, 3) - (X0 ^ rk[136])) ^ rk[137]; + X2 = (ROR(X2, 9) - (X1 ^ rk[126])) ^ rk[127]; + X3 = (ROL(X3, 5) - (X2 ^ rk[128])) ^ rk[129]; + X0 = (ROL(X0, 3) - (X3 ^ rk[130])) ^ rk[131]; + X1 = (ROR(X1, 9) - (X0 ^ rk[120])) ^ rk[121]; + X2 = (ROL(X2, 5) - (X1 ^ rk[122])) ^ rk[123]; + X3 = (ROL(X3, 3) - (X2 ^ rk[124])) ^ rk[125]; + + X0 = (ROR(X0, 9) - (X3 ^ rk[114])) ^ rk[115]; + X1 = (ROL(X1, 5) - (X0 ^ rk[116])) ^ rk[117]; + X2 = (ROL(X2, 3) - (X1 ^ rk[118])) ^ rk[119]; + X3 = (ROR(X3, 9) - (X2 ^ rk[108])) ^ rk[109]; + X0 = (ROL(X0, 5) - (X3 ^ rk[110])) ^ rk[111]; + X1 = (ROL(X1, 3) - (X0 ^ rk[112])) ^ rk[113]; + X2 = (ROR(X2, 9) - (X1 ^ rk[102])) ^ rk[103]; + X3 = (ROL(X3, 5) - (X2 ^ rk[104])) ^ rk[105]; + X0 = (ROL(X0, 3) - (X3 ^ rk[106])) ^ rk[107]; + X1 = (ROR(X1, 9) - (X0 ^ rk[ 96])) ^ rk[ 97]; + X2 = (ROL(X2, 5) - (X1 ^ rk[ 98])) ^ rk[ 99]; + X3 = (ROL(X3, 3) - (X2 ^ rk[100])) ^ rk[101]; + + X0 = (ROR(X0, 9) - (X3 ^ rk[ 90])) ^ rk[ 91]; + X1 = (ROL(X1, 5) - (X0 ^ rk[ 92])) ^ rk[ 93]; + X2 = (ROL(X2, 3) - (X1 ^ rk[ 94])) ^ rk[ 95]; + X3 = (ROR(X3, 9) - (X2 ^ rk[ 84])) ^ rk[ 85]; + X0 = (ROL(X0, 5) - (X3 ^ rk[ 86])) ^ rk[ 87]; + X1 = (ROL(X1, 3) - (X0 ^ rk[ 88])) ^ rk[ 89]; + X2 = (ROR(X2, 9) - (X1 ^ rk[ 78])) ^ rk[ 79]; + X3 = (ROL(X3, 5) - (X2 ^ rk[ 80])) ^ rk[ 81]; + X0 = (ROL(X0, 3) - (X3 ^ rk[ 82])) ^ rk[ 83]; + X1 = (ROR(X1, 9) - (X0 ^ rk[ 72])) ^ rk[ 73]; + X2 = (ROL(X2, 5) - (X1 ^ rk[ 74])) ^ rk[ 75]; + X3 = (ROL(X3, 3) - (X2 ^ rk[ 76])) ^ rk[ 77]; + + X0 = (ROR(X0, 9) - (X3 ^ rk[ 66])) ^ rk[ 67]; + X1 = (ROL(X1, 5) - (X0 ^ rk[ 68])) ^ rk[ 69]; + X2 = (ROL(X2, 3) - (X1 ^ rk[ 70])) ^ rk[ 71]; + X3 = (ROR(X3, 9) - (X2 ^ rk[ 60])) ^ rk[ 61]; + X0 = (ROL(X0, 5) - (X3 ^ rk[ 62])) ^ rk[ 63]; + X1 = (ROL(X1, 3) - (X0 ^ rk[ 64])) ^ rk[ 65]; + X2 = (ROR(X2, 9) - (X1 ^ rk[ 54])) ^ rk[ 55]; + X3 = (ROL(X3, 5) - (X2 ^ rk[ 56])) ^ rk[ 57]; + X0 = (ROL(X0, 3) - (X3 ^ rk[ 58])) ^ rk[ 59]; + X1 = (ROR(X1, 9) - (X0 ^ rk[ 48])) ^ rk[ 49]; + X2 = (ROL(X2, 5) - (X1 ^ rk[ 50])) ^ rk[ 51]; + X3 = (ROL(X3, 3) - (X2 ^ rk[ 52])) ^ rk[ 53]; + + X0 = (ROR(X0, 9) - (X3 ^ rk[ 42])) ^ rk[ 43]; + X1 = (ROL(X1, 5) - (X0 ^ rk[ 44])) ^ rk[ 45]; + X2 = (ROL(X2, 3) - (X1 ^ rk[ 46])) ^ rk[ 47]; + X3 = (ROR(X3, 9) - (X2 ^ rk[ 36])) ^ rk[ 37]; + X0 = (ROL(X0, 5) - (X3 ^ rk[ 38])) ^ rk[ 39]; + X1 = (ROL(X1, 3) - (X0 ^ rk[ 40])) ^ rk[ 41]; + X2 = (ROR(X2, 9) - (X1 ^ rk[ 30])) ^ rk[ 31]; + X3 = (ROL(X3, 5) - (X2 ^ rk[ 32])) ^ rk[ 33]; + X0 = (ROL(X0, 3) - (X3 ^ rk[ 34])) ^ rk[ 35]; + X1 = (ROR(X1, 9) - (X0 ^ rk[ 24])) ^ rk[ 25]; + X2 = (ROL(X2, 5) - (X1 ^ rk[ 26])) ^ rk[ 27]; + X3 = (ROL(X3, 3) - (X2 ^ rk[ 28])) ^ rk[ 29]; + + X0 = (ROR(X0, 9) - (X3 ^ rk[ 18])) ^ rk[ 19]; + X1 = (ROL(X1, 5) - (X0 ^ rk[ 20])) ^ rk[ 21]; + X2 = (ROL(X2, 3) - (X1 ^ rk[ 22])) ^ rk[ 23]; + X3 = (ROR(X3, 9) - (X2 ^ rk[ 12])) ^ rk[ 13]; + X0 = (ROL(X0, 5) - (X3 ^ rk[ 14])) ^ rk[ 15]; + X1 = (ROL(X1, 3) - (X0 ^ rk[ 16])) ^ rk[ 17]; + X2 = (ROR(X2, 9) - (X1 ^ rk[ 6])) ^ rk[ 7]; + X3 = (ROL(X3, 5) - (X2 ^ rk[ 8])) ^ rk[ 9]; + X0 = (ROL(X0, 3) - (X3 ^ rk[ 10])) ^ rk[ 11]; + X1 = (ROR(X1, 9) - (X0 ^ rk[ 0])) ^ rk[ 1]; + X2 = (ROL(X2, 5) - (X1 ^ rk[ 2])) ^ rk[ 3]; + X3 = (ROL(X3, 3) - (X2 ^ rk[ 4])) ^ rk[ 5]; + + _pt[0] = loadU32(X0); + _pt[1] = loadU32(X1); + _pt[2] = loadU32(X2); + _pt[3] = loadU32(X3); +} diff --git a/lea/lea_arm64.go b/lea/lea_arm64.go index abe5e39..47a4d65 100644 --- a/lea/lea_arm64.go +++ b/lea/lea_arm64.go @@ -7,6 +7,11 @@ import ( ) func init() { + leaSetKey = leaSetKeyASM + + leaEnc1 = leaEnc1ASM + leaDec1 = leaDec1ASM + leaEnc4 = leaEnc4NEON leaDec4 = leaDec4NEON @@ -14,6 +19,35 @@ func init() { leaDec8 = leaDec8NEON } +func leaSetKeyASM(rk []uint32, key []byte) int { + var round uint64 + lea_set_key_generic( + unsafe.Pointer(&rk[0]), + unsafe.Pointer(&round), + unsafe.Pointer(&key[0]), + uint64(len(key)), + ) + + return int(round) +} + +func leaEnc1ASM(ctx *leaContext, dst, src []byte) { + lea_encrypt( + unsafe.Pointer(&dst[0]), + unsafe.Pointer(&src[0]), + unsafe.Pointer(&ctx.rk[0]), + uint64(ctx.round), + ) +} +func leaDec1ASM(ctx *leaContext, dst, src []byte) { + lea_decrypt( + unsafe.Pointer(&dst[0]), + unsafe.Pointer(&src[0]), + unsafe.Pointer(&ctx.rk[0]), + uint64(ctx.round), + ) +} + func leaEnc4NEON(ctx *leaContext, dst, src []byte) { lea_encrypt_4block( unsafe.Pointer(&dst[0]), diff --git a/lea/lea_arm64.s b/lea/lea_arm64.s new file mode 100644 index 0000000..d162147 --- /dev/null +++ b/lea/lea_arm64.s @@ -0,0 +1,3495 @@ +//go:build arm64 && gc && !purego +// AUTO-GENERATED BY GOAT -- DO NOT EDIT + +TEXT ·lea_set_key_generic(SB), $0-32 + MOVD rk+0(FP), R0 + MOVD round+8(FP), R1 + MOVD mk+16(FP), R2 + MOVD mk_len+24(FP), R3 + WORD $0xa9bf7bfd // stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill + WORD $0x910003fd // mov x29, sp + WORD $0xf100807f // cmp x3, #32 + WORD $0x54004340 // b.eq LBB0_4 + WORD $0xf100607f // cmp x3, #24 + WORD $0x5400bc20 // b.eq LBB0_5 + WORD $0xf100407f // cmp x3, #16 + WORD $0x54012621 // b.ne LBB0_7 + WORD $0xb9400048 // ldr w8, [x2] + WORD $0x529d3b69 // mov w9, #59867 ; =0xe9db + WORD $0x72b87de9 // movk w9, #50159, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9000008 // str w8, [x0] + WORD $0x529ac089 // mov w9, #54788 ; =0xd604 + WORD $0x72b11889 // movk w9, #35012, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9001808 // str w8, [x0, #24] + WORD $0x529e4529 // mov w9, #61993 ; =0xf229 + WORD $0x72bcf129 // movk w9, #59273, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9003008 // str w8, [x0, #48] + WORD $0x5290ec69 // mov w9, #34659 ; =0x8763 + WORD $0x72b8df29 // movk w9, #50937, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9004808 // str w8, [x0, #72] + WORD $0x5293b789 // mov w9, #40380 ; =0x9dbc + WORD $0x72a7dfc9 // movk w9, #16126, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9006008 // str w8, [x0, #96] + WORD $0x528c0909 // mov w9, #24648 ; =0x6048 + WORD $0x72b189a9 // movk w9, #35917, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0x528453c9 // mov w9, #8862 ; =0x229e + WORD $0x72af13e9 // movk w9, #30879, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13897d29 // ror w9, w9, #31 + WORD $0xb9007808 // str w8, [x0, #120] + WORD $0xb9009009 // str w9, [x0, #144] + WORD $0x528ec788 // mov w8, #30268 ; =0x763c + WORD $0x72adf308 // movk w8, #28568, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb900a808 // str w8, [x0, #168] + WORD $0x529b7869 // mov w9, #56259 ; =0xdbc3 + WORD $0x72bdfd29 // movk w9, #61417, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb900c008 // str w8, [x0, #192] + WORD $0x52809109 // mov w9, #1160 ; =0x488 + WORD $0x72b89ac9 // movk w9, #50390, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb900d808 // str w8, [x0, #216] + WORD $0x52853ce9 // mov w9, #10727 ; =0x29e7 + WORD $0x72b13e49 // movk w9, #35314, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb900f008 // str w8, [x0, #240] + WORD $0x528c78c9 // mov w9, #25542 ; =0x63c6 + WORD $0x72bf30e9 // movk w9, #63879, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0x529787c9 // mov w9, #48190 ; =0xbc3e + WORD $0x72bfd3a9 // movk w9, #65181, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13897d29 // ror w9, w9, #31 + WORD $0xb9010808 // str w8, [x0, #264] + WORD $0xb9012009 // str w9, [x0, #288] + WORD $0x52891188 // mov w8, #18572 ; =0x488c + WORD $0x72a9ac08 // movk w8, #19808, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9013808 // str w8, [x0, #312] + WORD $0x5293cf09 // mov w9, #40568 ; =0x9e78 + WORD $0x72b3e449 // movk w9, #40738, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9015008 // str w8, [x0, #336] + WORD $0x52878de9 // mov w9, #15471 ; =0x3c6f + WORD $0x72b30ec9 // movk w9, #39030, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9016808 // str w8, [x0, #360] + WORD $0x52987de9 // mov w9, #50159 ; =0xc3ef + WORD $0x72bd3b69 // movk w9, #59867, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9018008 // str w8, [x0, #384] + WORD $0x52911889 // mov w9, #35012 ; =0x88c4 + WORD $0x72bac089 // movk w9, #54788, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0x529cf129 // mov w9, #59273 ; =0xe789 + WORD $0x72be4529 // movk w9, #61993, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13897d29 // ror w9, w9, #31 + WORD $0xb9019808 // str w8, [x0, #408] + WORD $0xb901b009 // str w9, [x0, #432] + WORD $0x5298df28 // mov w8, #50937 ; =0xc6f9 + WORD $0x72b0ec68 // movk w8, #34659, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb901c808 // str w8, [x0, #456] + WORD $0x5287dfc9 // mov w9, #16126 ; =0x3efe + WORD $0x72b3b789 // movk w9, #40380, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb901e008 // str w8, [x0, #480] + WORD $0x529189a9 // mov w9, #35917 ; =0x8c4d + WORD $0x72ac0909 // movk w9, #24648, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb901f808 // str w8, [x0, #504] + WORD $0x528f13e9 // mov w9, #30879 ; =0x789f + WORD $0x72a453c9 // movk w9, #8862, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9021008 // str w8, [x0, #528] + WORD $0x528df309 // mov w9, #28568 ; =0x6f98 + WORD $0x72aec789 // movk w9, #30268, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9022808 // str w8, [x0, #552] + WORD $0xb9400448 // ldr w8, [x2, #4] + WORD $0x529a76e9 // mov w9, #54199 ; =0xd3b7 + WORD $0x72b0fbe9 // movk w9, #34783, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9001408 // str w8, [x0, #20] + WORD $0xb9000c08 // str w8, [x0, #12] + WORD $0xb9000408 // str w8, [x0, #4] + WORD $0x52958129 // mov w9, #44041 ; =0xac09 + WORD $0x72a23129 // movk w9, #4489, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9002c08 // str w8, [x0, #44] + WORD $0xb9002408 // str w8, [x0, #36] + WORD $0xb9001c08 // str w8, [x0, #28] + WORD $0x529c8a69 // mov w9, #58451 ; =0xe453 + WORD $0x72b9e269 // movk w9, #53011, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9004408 // str w8, [x0, #68] + WORD $0xb9003c08 // str w8, [x0, #60] + WORD $0xb9003408 // str w8, [x0, #52] + WORD $0x5281d8e9 // mov w9, #3783 ; =0xec7 + WORD $0x72b1be69 // movk w9, #36339, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9005c08 // str w8, [x0, #92] + WORD $0xb9005408 // str w8, [x0, #84] + WORD $0xb9004c08 // str w8, [x0, #76] + WORD $0x52876f09 // mov w9, #15224 ; =0x3b78 + WORD $0x72afbfa9 // movk w9, #32253, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9007408 // str w8, [x0, #116] + WORD $0xb9006c08 // str w8, [x0, #108] + WORD $0x52981229 // mov w9, #49297 ; =0xc091 + WORD $0x72a31349 // movk w9, #6298, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13897529 // ror w9, w9, #29 + WORD $0xb9006408 // str w8, [x0, #100] + WORD $0xb9008c09 // str w9, [x0, #140] + WORD $0xb9008409 // str w9, [x0, #132] + WORD $0xb9007c09 // str w9, [x0, #124] + WORD $0x5288a788 // mov w8, #17724 ; =0x453c + WORD $0x72be27c8 // movk w8, #61758, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb900a408 // str w8, [x0, #164] + WORD $0xb9009c08 // str w8, [x0, #156] + WORD $0xb9009408 // str w8, [x0, #148] + WORD $0x529d8f09 // mov w9, #60536 ; =0xec78 + WORD $0x72bbe609 // movk w9, #57136, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb900bc08 // str w8, [x0, #188] + WORD $0xb900b408 // str w8, [x0, #180] + WORD $0xb900ac08 // str w8, [x0, #172] + WORD $0x5296f0e9 // mov w9, #46983 ; =0xb787 + WORD $0x72bbfa69 // movk w9, #57299, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb900d408 // str w8, [x0, #212] + WORD $0xb900cc08 // str w8, [x0, #204] + WORD $0xb900c408 // str w8, [x0, #196] + WORD $0x52812229 // mov w9, #2321 ; =0x911 + WORD $0x72b13589 // movk w9, #35244, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb900ec08 // str w8, [x0, #236] + WORD $0xb900e408 // str w8, [x0, #228] + WORD $0xb900dc08 // str w8, [x0, #220] + WORD $0x528a79e9 // mov w9, #21455 ; =0x53cf + WORD $0x72a27c89 // movk w9, #5092, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9010408 // str w8, [x0, #260] + WORD $0xb900fc08 // str w8, [x0, #252] + WORD $0x5298f1a9 // mov w9, #51085 ; =0xc78d + WORD $0x72be61c9 // movk w9, #62222, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13897529 // ror w9, w9, #29 + WORD $0xb900f408 // str w8, [x0, #244] + WORD $0xb9011c09 // str w9, [x0, #284] + WORD $0xb9011409 // str w9, [x0, #276] + WORD $0xb9010c09 // str w9, [x0, #268] + WORD $0x528f0fa8 // mov w8, #30845 ; =0x787d + WORD $0x72bfa768 // movk w8, #64827, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9013408 // str w8, [x0, #308] + WORD $0xb9012c08 // str w8, [x0, #300] + WORD $0xb9012408 // str w8, [x0, #292] + WORD $0x52922309 // mov w9, #37144 ; =0x9118 + WORD $0x72b35809 // movk w9, #39616, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9014c08 // str w8, [x0, #332] + WORD $0xb9014408 // str w8, [x0, #324] + WORD $0xb9013c08 // str w8, [x0, #316] + WORD $0x52879e29 // mov w9, #15601 ; =0x3cf1 + WORD $0x72a7c8a9 // movk w9, #15941, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9016408 // str w8, [x0, #356] + WORD $0xb9015c08 // str w8, [x0, #348] + WORD $0xb9015408 // str w8, [x0, #340] + WORD $0x528f1be9 // mov w9, #30943 ; =0x78df + WORD $0x72a61d89 // movk w9, #12524, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9017c08 // str w8, [x0, #380] + WORD $0xb9017408 // str w8, [x0, #372] + WORD $0xb9016c08 // str w8, [x0, #364] + WORD $0x5290fbe9 // mov w9, #34783 ; =0x87df + WORD $0x72ba76e9 // movk w9, #54199, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9019408 // str w8, [x0, #404] + WORD $0xb9018c08 // str w8, [x0, #396] + WORD $0x52823129 // mov w9, #4489 ; =0x1189 + WORD $0x72b58129 // movk w9, #44041, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13897529 // ror w9, w9, #29 + WORD $0xb9018408 // str w8, [x0, #388] + WORD $0xb901ac09 // str w9, [x0, #428] + WORD $0xb901a409 // str w9, [x0, #420] + WORD $0xb9019c09 // str w9, [x0, #412] + WORD $0x5299e268 // mov w8, #53011 ; =0xcf13 + WORD $0x72bc8a68 // movk w8, #58451, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb901c408 // str w8, [x0, #452] + WORD $0xb901bc08 // str w8, [x0, #444] + WORD $0xb901b408 // str w8, [x0, #436] + WORD $0x5291be69 // mov w9, #36339 ; =0x8df3 + WORD $0x72a1d8e9 // movk w9, #3783, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb901dc08 // str w8, [x0, #476] + WORD $0xb901d408 // str w8, [x0, #468] + WORD $0xb901cc08 // str w8, [x0, #460] + WORD $0x528fbfa9 // mov w9, #32253 ; =0x7dfd + WORD $0x72a76f09 // movk w9, #15224, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb901f408 // str w8, [x0, #500] + WORD $0xb901ec08 // str w8, [x0, #492] + WORD $0xb901e408 // str w8, [x0, #484] + WORD $0x52831349 // mov w9, #6298 ; =0x189a + WORD $0x72b81229 // movk w9, #49297, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9020c08 // str w8, [x0, #524] + WORD $0xb9020408 // str w8, [x0, #516] + WORD $0xb901fc08 // str w8, [x0, #508] + WORD $0x529e27c9 // mov w9, #61758 ; =0xf13e + WORD $0x72a8a789 // movk w9, #17724, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9022408 // str w8, [x0, #548] + WORD $0xb9021c08 // str w8, [x0, #540] + WORD $0x529be609 // mov w9, #57136 ; =0xdf30 + WORD $0x72bd8f09 // movk w9, #60536, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13897529 // ror w9, w9, #29 + WORD $0xb9021408 // str w8, [x0, #532] + WORD $0xb9023c09 // str w9, [x0, #572] + WORD $0xb9023409 // str w9, [x0, #564] + WORD $0xb9022c09 // str w9, [x0, #556] + WORD $0xb9400848 // ldr w8, [x2, #8] + WORD $0x5294ede9 // mov w9, #42863 ; =0xa76f + WORD $0x72a1f7e9 // movk w9, #4031, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9000808 // str w8, [x0, #8] + WORD $0x528b0249 // mov w9, #22546 ; =0x5812 + WORD $0x72a46269 // movk w9, #8979, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0x529914e9 // mov w9, #51367 ; =0xc8a7 + WORD $0x72b3c4e9 // movk w9, #40487, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13896929 // ror w9, w9, #26 + WORD $0xb9002008 // str w8, [x0, #32] + WORD $0xb9003809 // str w9, [x0, #56] + WORD $0x5283b1e8 // mov w8, #7567 ; =0x1d8f + WORD $0x72a37cc8 // movk w8, #7142, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9005008 // str w8, [x0, #80] + WORD $0x528ede09 // mov w9, #30448 ; =0x76f0 + WORD $0x72bf7f49 // movk w9, #64506, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9006808 // str w8, [x0, #104] + WORD $0x52902449 // mov w9, #33058 ; =0x8122 + WORD $0x72a626a9 // movk w9, #12597, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9008008 // str w8, [x0, #128] + WORD $0x52914f29 // mov w9, #35449 ; =0x8a79 + WORD $0x72bc4f89 // movk w9, #57980, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9009808 // str w8, [x0, #152] + WORD $0x529b1e29 // mov w9, #55537 ; =0xd8f1 + WORD $0x72b7cc29 // movk w9, #48737, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0x528de1e9 // mov w9, #28431 ; =0x6f0f + WORD $0x72b7f4e9 // movk w9, #49063, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13896929 // ror w9, w9, #26 + WORD $0xb900b008 // str w8, [x0, #176] + WORD $0xb900c809 // str w9, [x0, #200] + WORD $0x52824468 // mov w8, #4643 ; =0x1223 + WORD $0x72a26b08 // movk w8, #4952, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb900e008 // str w8, [x0, #224] + WORD $0x5294f3c9 // mov w9, #42910 ; =0xa79e + WORD $0x72a4f909 // movk w9, #10184, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb900f808 // str w8, [x0, #248] + WORD $0x5291e369 // mov w9, #36635 ; =0x8f1b + WORD $0x72bcc3a9 // movk w9, #58909, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9011008 // str w8, [x0, #272] + WORD $0x529e1f69 // mov w9, #61691 ; =0xf0fb + WORD $0x72bf4ec9 // movk w9, #64118, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9012808 // str w8, [x0, #296] + WORD $0x52844629 // mov w9, #8753 ; =0x2231 + WORD $0x72a6b029 // movk w9, #13697, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0x528f3c49 // mov w9, #31202 ; =0x79e2 + WORD $0x72af9149 // movk w9, #31882, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13896929 // ror w9, w9, #26 + WORD $0xb9014008 // str w8, [x0, #320] + WORD $0xb9015809 // str w9, [x0, #344] + WORD $0x529e37c8 // mov w8, #61886 ; =0xf1be + WORD $0x72ac3b08 // movk w8, #25048, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9017008 // str w8, [x0, #368] + WORD $0x5281f7e9 // mov w9, #4031 ; =0xfbf + WORD $0x72b4ede9 // movk w9, #42863, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9018808 // str w8, [x0, #392] + WORD $0x52846269 // mov w9, #8979 ; =0x2313 + WORD $0x72ab0249 // movk w9, #22546, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb901a008 // str w8, [x0, #416] + WORD $0x5293c4e9 // mov w9, #40487 ; =0x9e27 + WORD $0x72b914e9 // movk w9, #51367, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb901b808 // str w8, [x0, #440] + WORD $0x52837cc9 // mov w9, #7142 ; =0x1be6 + WORD $0x72a3b1e9 // movk w9, #7567, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0x529f7f49 // mov w9, #64506 ; =0xfbfa + WORD $0x72aede09 // movk w9, #30448, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13896929 // ror w9, w9, #26 + WORD $0xb901d008 // str w8, [x0, #464] + WORD $0xb901e809 // str w9, [x0, #488] + WORD $0x528626a8 // mov w8, #12597 ; =0x3135 + WORD $0x72b02448 // movk w8, #33058, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9020008 // str w8, [x0, #512] + WORD $0x529c4f89 // mov w9, #57980 ; =0xe27c + WORD $0x72b14f29 // movk w9, #35449, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9021808 // str w8, [x0, #536] + WORD $0x5297cc29 // mov w9, #48737 ; =0xbe61 + WORD $0x72bb1e29 // movk w9, #55537, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9023008 // str w8, [x0, #560] + WORD $0xb9400c48 // ldr w8, [x2, #12] + WORD $0x5289dbc9 // mov w9, #20190 ; =0x4ede + WORD $0x72a3efe9 // movk w9, #8063, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9001008 // str w8, [x0, #16] + WORD $0x52960489 // mov w9, #45092 ; =0xb024 + WORD $0x72a8c4c9 // movk w9, #17958, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9002808 // str w8, [x0, #40] + WORD $0x529229e9 // mov w9, #37199 ; =0x914f + WORD $0x72a789e9 // movk w9, #15439, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0x528763c9 // mov w9, #15134 ; =0x3b1e + WORD $0x72a6f989 // movk w9, #14284, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13895529 // ror w9, w9, #21 + WORD $0xb9004008 // str w8, [x0, #64] + WORD $0xb9005809 // str w9, [x0, #88] + WORD $0x529dbc28 // mov w8, #60897 ; =0xede1 + WORD $0x72befe88 // movk w8, #63476, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9007008 // str w8, [x0, #112] + WORD $0x52804889 // mov w9, #580 ; =0x244 + WORD $0x72ac4d69 // movk w9, #25195, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9008808 // str w8, [x0, #136] + WORD $0x52829e69 // mov w9, #5363 ; =0x14f3 + WORD $0x72b89f29 // movk w9, #50425, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb900a008 // str w8, [x0, #160] + WORD $0x52963c69 // mov w9, #45539 ; =0xb1e3 + WORD $0x72af9869 // movk w9, #31939, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb900b808 // str w8, [x0, #184] + WORD $0x529bc3e9 // mov w9, #56863 ; =0xde1f + WORD $0x72afe9c9 // movk w9, #32590, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0x528488c9 // mov w9, #9286 ; =0x2446 + WORD $0x72a4d609 // movk w9, #9904, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13895529 // ror w9, w9, #21 + WORD $0xb900d008 // str w8, [x0, #208] + WORD $0xb900e809 // str w9, [x0, #232] + WORD $0x5289e788 // mov w8, #20284 ; =0x4f3c + WORD $0x72a9f228 // movk w8, #20369, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9010008 // str w8, [x0, #256] + WORD $0x5283c6e9 // mov w9, #7735 ; =0x1e37 + WORD $0x72b98769 // movk w9, #52283, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9011808 // str w8, [x0, #280] + WORD $0x529c3ee9 // mov w9, #57847 ; =0xe1f7 + WORD $0x72be9da9 // movk w9, #62701, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9013008 // str w8, [x0, #304] + WORD $0x52888c49 // mov w9, #17506 ; =0x4462 + WORD $0x72ad6049 // movk w9, #27394, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9014808 // str w8, [x0, #328] + WORD $0x529e7889 // mov w9, #62404 ; =0xf3c4 + WORD $0x72bf2289 // movk w9, #63764, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0x529c6f89 // mov w9, #58236 ; =0xe37c + WORD $0x72b87629 // movk w9, #50097, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13895529 // ror w9, w9, #21 + WORD $0xb9016008 // str w8, [x0, #352] + WORD $0xb9017809 // str w9, [x0, #376] + WORD $0x5283efe8 // mov w8, #8063 ; =0x1f7f + WORD $0x72a9dbc8 // movk w8, #20190, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9019008 // str w8, [x0, #400] + WORD $0x5288c4c9 // mov w9, #17958 ; =0x4626 + WORD $0x72b60489 // movk w9, #45092, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb901a808 // str w8, [x0, #424] + WORD $0x528789e9 // mov w9, #15439 ; =0x3c4f + WORD $0x72b229e9 // movk w9, #37199, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb901c008 // str w8, [x0, #448] + WORD $0x5286f989 // mov w9, #14284 ; =0x37cc + WORD $0x72a763c9 // movk w9, #15134, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb901d808 // str w8, [x0, #472] + WORD $0x529efe89 // mov w9, #63476 ; =0xf7f4 + WORD $0x72bdbc29 // movk w9, #60897, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0x528c4d69 // mov w9, #25195 ; =0x626b + WORD $0x72a04889 // movk w9, #580, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13895529 // ror w9, w9, #21 + WORD $0xb901f008 // str w8, [x0, #496] + WORD $0xb9020809 // str w9, [x0, #520] + WORD $0x52989f28 // mov w8, #50425 ; =0xc4f9 + WORD $0x72a29e68 // movk w8, #5363, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9022008 // str w8, [x0, #544] + WORD $0x528f9869 // mov w9, #31939 ; =0x7cc3 + WORD $0x72b63c69 // movk w9, #45539, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0x528011c9 // mov w9, #142 ; =0x8e + WORD $0x14000718 // b LBB0_6 + WORD $0xb9400048 // ldr w8, [x2] + WORD $0x529d3b69 // mov w9, #59867 ; =0xe9db + WORD $0x72b87de9 // movk w9, #50159, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0x528b0249 // mov w9, #22546 ; =0x5812 + WORD $0x72a46269 // movk w9, #8979, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13896929 // ror w9, w9, #26 + WORD $0xb9000008 // str w8, [x0] + WORD $0xb9002009 // str w9, [x0, #32] + WORD $0x528453c8 // mov w8, #8862 ; =0x229e + WORD $0x72af13e8 // movk w8, #30879, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9004008 // str w8, [x0, #64] + WORD $0x52893ce9 // mov w9, #18919 ; =0x49e7 + WORD $0x72a2bd49 // movk w9, #5610, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9006008 // str w8, [x0, #96] + WORD $0x5280ac69 // mov w9, #1379 ; =0x563 + WORD $0x72b85da9 // movk w9, #49901, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9008008 // str w8, [x0, #128] + WORD $0x52957029 // mov w9, #43905 ; =0xab81 + WORD $0x72a77909 // movk w9, #15304, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb900a008 // str w8, [x0, #160] + WORD $0x529b7869 // mov w9, #56259 ; =0xdbc3 + WORD $0x72bdfd29 // movk w9, #61417, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0x52824469 // mov w9, #4643 ; =0x1223 + WORD $0x72a26b09 // movk w9, #4952, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13896929 // ror w9, w9, #26 + WORD $0xb900c008 // str w8, [x0, #192] + WORD $0xb900e009 // str w9, [x0, #224] + WORD $0x5293cf08 // mov w8, #40568 ; =0x9e78 + WORD $0x72b3e448 // movk w8, #40738, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9010008 // str w8, [x0, #256] + WORD $0x529ce2a9 // mov w9, #59157 ; =0xe715 + WORD $0x72bd4929 // movk w9, #59977, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9012008 // str w8, [x0, #288] + WORD $0x528c7849 // mov w9, #25538 ; =0x63c2 + WORD $0x72bda0a9 // movk w9, #60677, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9014008 // str w8, [x0, #320] + WORD $0x52902769 // mov w9, #33083 ; =0x813b + WORD $0x72b91569 // movk w9, #51371, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9016008 // str w8, [x0, #352] + WORD $0x52987de9 // mov w9, #50159 ; =0xc3ef + WORD $0x72bd3b69 // movk w9, #59867, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0x52846269 // mov w9, #8979 ; =0x2313 + WORD $0x72ab0249 // movk w9, #22546, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13896929 // ror w9, w9, #26 + WORD $0xb9018008 // str w8, [x0, #384] + WORD $0xb901a009 // str w9, [x0, #416] + WORD $0x528f13e8 // mov w8, #30879 ; =0x789f + WORD $0x72a453c8 // movk w8, #8862, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb901c008 // str w8, [x0, #448] + WORD $0x5282bd49 // mov w9, #5610 ; =0x15ea + WORD $0x72a93ce9 // movk w9, #18919, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb901e008 // str w8, [x0, #480] + WORD $0x52985da9 // mov w9, #49901 ; =0xc2ed + WORD $0x72a0ac69 // movk w9, #1379, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9020008 // str w8, [x0, #512] + WORD $0x52877909 // mov w9, #15304 ; =0x3bc8 + WORD $0x72b57029 // movk w9, #43905, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9022008 // str w8, [x0, #544] + WORD $0x529dfd29 // mov w9, #61417 ; =0xefe9 + WORD $0x72bb7869 // movk w9, #56259, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0x52826b09 // mov w9, #4952 ; =0x1358 + WORD $0x72a24469 // movk w9, #4643, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13896929 // ror w9, w9, #26 + WORD $0xb9024008 // str w8, [x0, #576] + WORD $0xb9026009 // str w9, [x0, #608] + WORD $0x5293e448 // mov w8, #40738 ; =0x9f22 + WORD $0x72b3cf08 // movk w8, #40568, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9028008 // str w8, [x0, #640] + WORD $0x529d4929 // mov w9, #59977 ; =0xea49 + WORD $0x72bce2a9 // movk w9, #59157, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb902a008 // str w8, [x0, #672] + WORD $0x529da0a9 // mov w9, #60677 ; =0xed05 + WORD $0x72ac7849 // movk w9, #25538, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb902c008 // str w8, [x0, #704] + WORD $0x52991569 // mov w9, #51371 ; =0xc8ab + WORD $0x72b02769 // movk w9, #33083, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb902e008 // str w8, [x0, #736] + WORD $0xb9400448 // ldr w8, [x2, #4] + WORD $0x529a76e9 // mov w9, #54199 ; =0xd3b7 + WORD $0x72b0fbe9 // movk w9, #34783, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9000408 // str w8, [x0, #4] + WORD $0x52960489 // mov w9, #45092 ; =0xb024 + WORD $0x72a8c4c9 // movk w9, #17958, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0x5288a789 // mov w9, #17724 ; =0x453c + WORD $0x72be27c9 // movk w9, #61758, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13893d29 // ror w9, w9, #15 + WORD $0xb9002408 // str w8, [x0, #36] + WORD $0xb9004409 // str w9, [x0, #68] + WORD $0x529279c8 // mov w8, #37838 ; =0x93ce + WORD $0x72a57a88 // movk w8, #11220, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9006408 // str w8, [x0, #100] + WORD $0x528158e9 // mov w9, #2759 ; =0xac7 + WORD $0x72b0bb49 // movk w9, #34266, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9008408 // str w8, [x0, #132] + WORD $0x528ae049 // mov w9, #22274 ; =0x5702 + WORD $0x72aef229 // movk w9, #30609, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb900a408 // str w8, [x0, #164] + WORD $0x5296f0e9 // mov w9, #46983 ; =0xb787 + WORD $0x72bbfa69 // movk w9, #57299, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb900c408 // str w8, [x0, #196] + WORD $0x528488c9 // mov w9, #9286 ; =0x2446 + WORD $0x72a4d609 // movk w9, #9904, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0x52879e29 // mov w9, #15601 ; =0x3cf1 + WORD $0x72a7c8a9 // movk w9, #15941, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13893d29 // ror w9, w9, #15 + WORD $0xb900e408 // str w8, [x0, #228] + WORD $0xb9010409 // str w9, [x0, #260] + WORD $0x5299c568 // mov w8, #52779 ; =0xce2b + WORD $0x72ba9268 // movk w8, #54419, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9012408 // str w8, [x0, #292] + WORD $0x5298f0a9 // mov w9, #51077 ; =0xc785 + WORD $0x72bb4149 // movk w9, #55818, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9014408 // str w8, [x0, #324] + WORD $0x52804ee9 // mov w9, #631 ; =0x277 + WORD $0x72b22ae9 // movk w9, #37207, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb9016408 // str w8, [x0, #356] + WORD $0x5290fbe9 // mov w9, #34783 ; =0x87df + WORD $0x72ba76e9 // movk w9, #54199, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9018408 // str w8, [x0, #388] + WORD $0x5288c4c9 // mov w9, #17958 ; =0x4626 + WORD $0x72b60489 // movk w9, #45092, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0x529e27c9 // mov w9, #61758 ; =0xf13e + WORD $0x72a8a789 // movk w9, #17724, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13893d29 // ror w9, w9, #15 + WORD $0xb901a408 // str w8, [x0, #420] + WORD $0xb901c409 // str w9, [x0, #452] + WORD $0x52857a88 // mov w8, #11220 ; =0x2bd4 + WORD $0x72b279c8 // movk w8, #37838, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb901e408 // str w8, [x0, #484] + WORD $0x5290bb49 // mov w9, #34266 ; =0x85da + WORD $0x72a158e9 // movk w9, #2759, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9020408 // str w8, [x0, #516] + WORD $0x528ef229 // mov w9, #30609 ; =0x7791 + WORD $0x72aae049 // movk w9, #22274, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb9022408 // str w8, [x0, #548] + WORD $0x529bfa69 // mov w9, #57299 ; =0xdfd3 + WORD $0x72b6f0e9 // movk w9, #46983, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9024408 // str w8, [x0, #580] + WORD $0x5284d609 // mov w9, #9904 ; =0x26b0 + WORD $0x72a488c9 // movk w9, #9286, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0x5287c8a9 // mov w9, #15941 ; =0x3e45 + WORD $0x72a79e29 // movk w9, #15601, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13893d29 // ror w9, w9, #15 + WORD $0xb9026408 // str w8, [x0, #612] + WORD $0xb9028409 // str w9, [x0, #644] + WORD $0x529a9268 // mov w8, #54419 ; =0xd493 + WORD $0x72b9c568 // movk w8, #52779, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb902a408 // str w8, [x0, #676] + WORD $0x529b4149 // mov w9, #55818 ; =0xda0a + WORD $0x72b8f0a9 // movk w9, #51077, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb902c408 // str w8, [x0, #708] + WORD $0x52922ae9 // mov w9, #37207 ; =0x9157 + WORD $0x72a04ee9 // movk w9, #631, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb902e408 // str w8, [x0, #740] + WORD $0xb9400848 // ldr w8, [x2, #8] + WORD $0x5294ede9 // mov w9, #42863 ; =0xa76f + WORD $0x72a1f7e9 // movk w9, #4031, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9000808 // str w8, [x0, #8] + WORD $0x528c0909 // mov w9, #24648 ; =0x6048 + WORD $0x72b189a9 // movk w9, #35917, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9002808 // str w8, [x0, #40] + WORD $0x5290ec69 // mov w9, #34659 ; =0x8763 + WORD $0x72b8df29 // movk w9, #50937, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0x5284f389 // mov w9, #10140 ; =0x279c + WORD $0x72aaf529 // movk w9, #22441, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13896929 // ror w9, w9, #26 + WORD $0xb9004808 // str w8, [x0, #72] + WORD $0xb9006809 // str w9, [x0, #104] + WORD $0x5282b1e8 // mov w8, #5519 ; =0x158f + WORD $0x72a17688 // movk w8, #2996, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9008808 // str w8, [x0, #136] + WORD $0x52957e49 // mov w9, #44018 ; =0xabf2 + WORD $0x72bc4089 // movk w9, #57860, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb900a808 // str w8, [x0, #168] + WORD $0x528de1e9 // mov w9, #28431 ; =0x6f0f + WORD $0x72b7f4e9 // movk w9, #49063, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb900c808 // str w8, [x0, #200] + WORD $0x52891189 // mov w9, #18572 ; =0x488c + WORD $0x72a9ac09 // movk w9, #19808, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb900e808 // str w8, [x0, #232] + WORD $0x528c78c9 // mov w9, #25542 ; =0x63c6 + WORD $0x72bf30e9 // movk w9, #63879, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0x52938ae9 // mov w9, #40023 ; =0x9c57 + WORD $0x72b524e9 // movk w9, #43303, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13896929 // ror w9, w9, #26 + WORD $0xb9010808 // str w8, [x0, #264] + WORD $0xb9012809 // str w9, [x0, #296] + WORD $0x5291e168 // mov w8, #36619 ; =0x8f0b + WORD $0x72b682a8 // movk w8, #46101, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9014808 // str w8, [x0, #328] + WORD $0x529e5c49 // mov w9, #62178 ; =0xf2e2 + WORD $0x72a09569 // movk w9, #1195, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9016808 // str w8, [x0, #360] + WORD $0x5281f7e9 // mov w9, #4031 ; =0xfbf + WORD $0x72b4ede9 // movk w9, #42863, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9018808 // str w8, [x0, #392] + WORD $0x529189a9 // mov w9, #35917 ; =0x8c4d + WORD $0x72ac0909 // movk w9, #24648, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb901a808 // str w8, [x0, #424] + WORD $0x5298df29 // mov w9, #50937 ; =0xc6f9 + WORD $0x72b0ec69 // movk w9, #34659, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0x528af529 // mov w9, #22441 ; =0x57a9 + WORD $0x72a4f389 // movk w9, #10140, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13896929 // ror w9, w9, #26 + WORD $0xb901c808 // str w8, [x0, #456] + WORD $0xb901e809 // str w9, [x0, #488] + WORD $0x52817688 // mov w8, #2996 ; =0xbb4 + WORD $0x72a2b1e8 // movk w8, #5519, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9020808 // str w8, [x0, #520] + WORD $0x529c4089 // mov w9, #57860 ; =0xe204 + WORD $0x72b57e49 // movk w9, #44018, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9022808 // str w8, [x0, #552] + WORD $0x5297f4e9 // mov w9, #49063 ; =0xbfa7 + WORD $0x72ade1e9 // movk w9, #28431, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9024808 // str w8, [x0, #584] + WORD $0x5289ac09 // mov w9, #19808 ; =0x4d60 + WORD $0x72a91189 // movk w9, #18572, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9026808 // str w8, [x0, #616] + WORD $0x529f30e9 // mov w9, #63879 ; =0xf987 + WORD $0x72ac78c9 // movk w9, #25542, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0x529524e9 // mov w9, #43303 ; =0xa927 + WORD $0x72b38ae9 // movk w9, #40023, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13896929 // ror w9, w9, #26 + WORD $0xb9028808 // str w8, [x0, #648] + WORD $0xb902a809 // str w9, [x0, #680] + WORD $0x529682a8 // mov w8, #46101 ; =0xb415 + WORD $0x72b1e168 // movk w8, #36619, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb902c808 // str w8, [x0, #712] + WORD $0x52809569 // mov w9, #1195 ; =0x4ab + WORD $0x72be5c49 // movk w9, #62178, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb902e808 // str w8, [x0, #744] + WORD $0xb9400c48 // ldr w8, [x2, #12] + WORD $0x5289dbc9 // mov w9, #20190 ; =0x4ede + WORD $0x72a3efe9 // movk w9, #8063, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9000c08 // str w8, [x0, #12] + WORD $0x52981229 // mov w9, #49297 ; =0xc091 + WORD $0x72a31349 // movk w9, #6298, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb9002c08 // str w8, [x0, #44] + WORD $0x5281d8e9 // mov w9, #3783 ; =0xec7 + WORD $0x72b1be69 // movk w9, #36339, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9004c08 // str w8, [x0, #76] + WORD $0x5289e709 // mov w9, #20280 ; =0x4f38 + WORD $0x72b5ea49 // movk w9, #44882, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0x528563c9 // mov w9, #11038 ; =0x2b1e + WORD $0x72a2ed09 // movk w9, #5992, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13893d29 // ror w9, w9, #15 + WORD $0xb9006c08 // str w8, [x0, #108] + WORD $0xb9008c09 // str w9, [x0, #140] + WORD $0x528afca8 // mov w8, #22501 ; =0x57e5 + WORD $0x72b88128 // movk w8, #50185, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb900ac08 // str w8, [x0, #172] + WORD $0x529bc3e9 // mov w9, #56863 ; =0xde1f + WORD $0x72afe9c9 // movk w9, #32590, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb900cc08 // str w8, [x0, #204] + WORD $0x52922309 // mov w9, #37144 ; =0x9118 + WORD $0x72b35809 // movk w9, #39616, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb900ec08 // str w8, [x0, #236] + WORD $0x5298f1a9 // mov w9, #51085 ; =0xc78d + WORD $0x72be61c9 // movk w9, #62222, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9010c08 // str w8, [x0, #268] + WORD $0x528715e9 // mov w9, #14511 ; =0x38af + WORD $0x72aa49e9 // movk w9, #21071, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0x5283c2e9 // mov w9, #7703 ; =0x1e17 + WORD $0x72ad0569 // movk w9, #26667, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13893d29 // ror w9, w9, #15 + WORD $0xb9012c08 // str w8, [x0, #300] + WORD $0xb9014c09 // str w9, [x0, #332] + WORD $0x529cb888 // mov w8, #58820 ; =0xe5c4 + WORD $0x72a12ae8 // movk w8, #2391, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9016c08 // str w8, [x0, #364] + WORD $0x5283efe9 // mov w9, #8063 ; =0x1f7f + WORD $0x72a9dbc9 // movk w9, #20190, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9018c08 // str w8, [x0, #396] + WORD $0x52831349 // mov w9, #6298 ; =0x189a + WORD $0x72b81229 // movk w9, #49297, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb901ac08 // str w8, [x0, #428] + WORD $0x5291be69 // mov w9, #36339 ; =0x8df3 + WORD $0x72a1d8e9 // movk w9, #3783, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb901cc08 // str w8, [x0, #460] + WORD $0x5295ea49 // mov w9, #44882 ; =0xaf52 + WORD $0x72a9e709 // movk w9, #20280, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0x5282ed09 // mov w9, #5992 ; =0x1768 + WORD $0x72a563c9 // movk w9, #11038, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13893d29 // ror w9, w9, #15 + WORD $0xb901ec08 // str w8, [x0, #492] + WORD $0xb9020c09 // str w9, [x0, #524] + WORD $0x52988128 // mov w8, #50185 ; =0xc409 + WORD $0x72aafca8 // movk w8, #22501, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9022c08 // str w8, [x0, #556] + WORD $0x528fe9c9 // mov w9, #32590 ; =0x7f4e + WORD $0x72bbc3e9 // movk w9, #56863, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9024c08 // str w8, [x0, #588] + WORD $0x52935809 // mov w9, #39616 ; =0x9ac0 + WORD $0x72b22309 // movk w9, #37144, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb9026c08 // str w8, [x0, #620] + WORD $0x529e61c9 // mov w9, #62222 ; =0xf30e + WORD $0x72b8f1a9 // movk w9, #51085, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9028c08 // str w8, [x0, #652] + WORD $0x528a49e9 // mov w9, #21071 ; =0x524f + WORD $0x72a715e9 // movk w9, #14511, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0x528d0569 // mov w9, #26667 ; =0x682b + WORD $0x72a3c2e9 // movk w9, #7703, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13893d29 // ror w9, w9, #15 + WORD $0xb902ac08 // str w8, [x0, #684] + WORD $0xb902cc09 // str w9, [x0, #716] + WORD $0x52812ae8 // mov w8, #2391 ; =0x957 + WORD $0x72bcb888 // movk w8, #58820, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb902ec08 // str w8, [x0, #748] + WORD $0xb9401048 // ldr w8, [x2, #16] + WORD $0x5293b789 // mov w9, #40380 ; =0x9dbc + WORD $0x72a7dfc9 // movk w9, #16126, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9001008 // str w8, [x0, #16] + WORD $0x529e4529 // mov w9, #61993 ; =0xf229 + WORD $0x72bcf129 // movk w9, #59273, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9003008 // str w8, [x0, #48] + WORD $0x5283b1e9 // mov w9, #7567 ; =0x1d8f + WORD $0x72a37cc9 // movk w9, #7142, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9005008 // str w8, [x0, #80] + WORD $0x5293ce29 // mov w9, #40561 ; =0x9e71 + WORD $0x72abd489 // movk w9, #24228, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9007008 // str w8, [x0, #112] + WORD $0x52915709 // mov w9, #35512 ; =0x8ab8 + WORD $0x72a27789 // movk w9, #5052, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9009008 // str w8, [x0, #144] + WORD $0x5295f969 // mov w9, #45003 ; =0xafcb + WORD $0x72b10249 // movk w9, #34834, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0x529787c9 // mov w9, #48190 ; =0xbc3e + WORD $0x72bfd3a9 // movk w9, #65181, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13894d29 // ror w9, w9, #19 + WORD $0xb900b008 // str w8, [x0, #176] + WORD $0xb900d009 // str w9, [x0, #208] + WORD $0x52853ce8 // mov w8, #10727 ; =0x29e7 + WORD $0x72b13e48 // movk w8, #35314, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb900f008 // str w8, [x0, #240] + WORD $0x5291e369 // mov w9, #36635 ; =0x8f1b + WORD $0x72bcc3a9 // movk w9, #58909, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9011008 // str w8, [x0, #272] + WORD $0x528e2bc9 // mov w9, #29022 ; =0x715e + WORD $0x72b493c9 // movk w9, #42142, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9013008 // str w8, [x0, #304] + WORD $0x52970269 // mov w9, #47123 ; =0xb813 + WORD $0x72b79149 // movk w9, #48266, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9015008 // str w8, [x0, #336] + WORD $0x52997109 // mov w9, #52104 ; =0xcb88 + WORD $0x72a255e9 // movk w9, #4783, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0x5287dfc9 // mov w9, #16126 ; =0x3efe + WORD $0x72b3b789 // movk w9, #40380, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13894d29 // ror w9, w9, #19 + WORD $0xb9017008 // str w8, [x0, #368] + WORD $0xb9019009 // str w9, [x0, #400] + WORD $0x529cf128 // mov w8, #59273 ; =0xe789 + WORD $0x72be4528 // movk w8, #61993, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb901b008 // str w8, [x0, #432] + WORD $0x52837cc9 // mov w9, #7142 ; =0x1be6 + WORD $0x72a3b1e9 // movk w9, #7567, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb901d008 // str w8, [x0, #464] + WORD $0x528bd489 // mov w9, #24228 ; =0x5ea4 + WORD $0x72b3ce29 // movk w9, #40561, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb901f008 // str w8, [x0, #496] + WORD $0x52827789 // mov w9, #5052 ; =0x13bc + WORD $0x72b15709 // movk w9, #35512, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9021008 // str w8, [x0, #528] + WORD $0x52910249 // mov w9, #34834 ; =0x8812 + WORD $0x72b5f969 // movk w9, #45003, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0x529fd3a9 // mov w9, #65181 ; =0xfe9d + WORD $0x72b787c9 // movk w9, #48190, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13894d29 // ror w9, w9, #19 + WORD $0xb9023008 // str w8, [x0, #560] + WORD $0xb9025009 // str w9, [x0, #592] + WORD $0x52913e48 // mov w8, #35314 ; =0x89f2 + WORD $0x72a53ce8 // movk w8, #10727, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9027008 // str w8, [x0, #624] + WORD $0x529cc3a9 // mov w9, #58909 ; =0xe61d + WORD $0x72b1e369 // movk w9, #36635, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9029008 // str w8, [x0, #656] + WORD $0x529493c9 // mov w9, #42142 ; =0xa49e + WORD $0x72ae2bc9 // movk w9, #29022, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb902b008 // str w8, [x0, #688] + WORD $0x52979149 // mov w9, #48266 ; =0xbc8a + WORD $0x72b70269 // movk w9, #47123, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb902d008 // str w8, [x0, #720] + WORD $0x528255e9 // mov w9, #4783 ; =0x12af + WORD $0x72b97109 // movk w9, #52104, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb902f008 // str w8, [x0, #752] + WORD $0xb9401448 // ldr w8, [x2, #20] + WORD $0x52876f09 // mov w9, #15224 ; =0x3b78 + WORD $0x72afbfa9 // movk w9, #32253, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0x529c8a69 // mov w9, #58451 ; =0xe453 + WORD $0x72b9e269 // movk w9, #53011, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13897529 // ror w9, w9, #29 + WORD $0xb9001408 // str w8, [x0, #20] + WORD $0xb9003409 // str w9, [x0, #52] + WORD $0x528763c8 // mov w8, #15134 ; =0x3b1e + WORD $0x72a6f988 // movk w8, #14284, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9005408 // str w8, [x0, #84] + WORD $0x52879c49 // mov w9, #15586 ; =0x3ce2 + WORD $0x72b7a929 // movk w9, #48457, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb9007408 // str w8, [x0, #116] + WORD $0x5282ae09 // mov w9, #5488 ; =0x1570 + WORD $0x72a4ef29 // movk w9, #10105, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9009408 // str w8, [x0, #148] + WORD $0x528bf2e9 // mov w9, #24471 ; =0x5f97 + WORD $0x72a204a9 // movk w9, #4133, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb900b408 // str w8, [x0, #180] + WORD $0x528f0fa9 // mov w9, #30845 ; =0x787d + WORD $0x72bfa769 // movk w9, #64827, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0x528a79e9 // mov w9, #21455 ; =0x53cf + WORD $0x72a27c89 // movk w9, #5092, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13897529 // ror w9, w9, #29 + WORD $0xb900d408 // str w8, [x0, #212] + WORD $0xb900f409 // str w9, [x0, #244] + WORD $0x5283c6e8 // mov w8, #7735 ; =0x1e37 + WORD $0x72b98768 // movk w8, #52283, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9011408 // str w8, [x0, #276] + WORD $0x529c57a9 // mov w9, #58045 ; =0xe2bd + WORD $0x72a92789 // movk w9, #18748, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb9013408 // str w8, [x0, #308] + WORD $0x528e04e9 // mov w9, #28711 ; =0x7027 + WORD $0x72af22a9 // movk w9, #30997, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9015408 // str w8, [x0, #340] + WORD $0x5292e209 // mov w9, #38672 ; =0x9710 + WORD $0x72a4abe9 // movk w9, #9567, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9017408 // str w8, [x0, #372] + WORD $0x528fbfa9 // mov w9, #32253 ; =0x7dfd + WORD $0x72a76f09 // movk w9, #15224, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0x5299e269 // mov w9, #53011 ; =0xcf13 + WORD $0x72bc8a69 // movk w9, #58451, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13897529 // ror w9, w9, #29 + WORD $0xb9019408 // str w8, [x0, #404] + WORD $0xb901b409 // str w9, [x0, #436] + WORD $0x5286f988 // mov w8, #14284 ; =0x37cc + WORD $0x72a763c8 // movk w8, #15134, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb901d408 // str w8, [x0, #468] + WORD $0x5297a929 // mov w9, #48457 ; =0xbd49 + WORD $0x72a79c49 // movk w9, #15586, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb901f408 // str w8, [x0, #500] + WORD $0x5284ef29 // mov w9, #10105 ; =0x2779 + WORD $0x72a2ae09 // movk w9, #5488, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9021408 // str w8, [x0, #532] + WORD $0x528204a9 // mov w9, #4133 ; =0x1025 + WORD $0x72abf2e9 // movk w9, #24471, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9023408 // str w8, [x0, #564] + WORD $0x529fa769 // mov w9, #64827 ; =0xfd3b + WORD $0x72af0fa9 // movk w9, #30845, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0x52827c89 // mov w9, #5092 ; =0x13e4 + WORD $0x72aa79e9 // movk w9, #21455, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13897529 // ror w9, w9, #29 + WORD $0xb9025408 // str w8, [x0, #596] + WORD $0xb9027409 // str w9, [x0, #628] + WORD $0x52998768 // mov w8, #52283 ; =0xcc3b + WORD $0x72a3c6e8 // movk w8, #7735, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9029408 // str w8, [x0, #660] + WORD $0x52892789 // mov w9, #18748 ; =0x493c + WORD $0x72bc57a9 // movk w9, #58045, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb902b408 // str w8, [x0, #692] + WORD $0x528f22a9 // mov w9, #30997 ; =0x7915 + WORD $0x72ae04e9 // movk w9, #28711, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb902d408 // str w8, [x0, #724] + WORD $0x5284abe9 // mov w9, #9567 ; =0x255f + WORD $0x72b2e209 // movk w9, #38672, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb902f408 // str w8, [x0, #756] + WORD $0xb9401848 // ldr w8, [x2, #24] + WORD $0x529ac089 // mov w9, #54788 ; =0xd604 + WORD $0x72b11889 // movk w9, #35012, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9001808 // str w8, [x0, #24] + WORD $0x529914e9 // mov w9, #51367 ; =0xc8a7 + WORD $0x72b3c4e9 // movk w9, #40487, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0x528ec789 // mov w9, #30268 ; =0x763c + WORD $0x72adf309 // movk w9, #28568, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13894d29 // ror w9, w9, #19 + WORD $0xb9003808 // str w8, [x0, #56] + WORD $0xb9005809 // str w9, [x0, #88] + WORD $0x52882b08 // mov w8, #16728 ; =0x4158 + WORD $0x72be1768 // movk w8, #61627, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9007808 // str w8, [x0, #120] + WORD $0x52855c09 // mov w9, #10976 ; =0x2ae0 + WORD $0x72a9de49 // movk w9, #20210, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9009808 // str w8, [x0, #152] + WORD $0x5297e5c9 // mov w9, #48942 ; =0xbf2e + WORD $0x72a40949 // movk w9, #8266, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb900b808 // str w8, [x0, #184] + WORD $0x52809109 // mov w9, #1160 ; =0x488 + WORD $0x72b89ac9 // movk w9, #50390, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb900d808 // str w8, [x0, #216] + WORD $0x5294f3c9 // mov w9, #42910 ; =0xa79e + WORD $0x72a4f909 // movk w9, #10184, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0x52878de9 // mov w9, #15471 ; =0x3c6f + WORD $0x72b30ec9 // movk w9, #39030, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13894d29 // ror w9, w9, #19 + WORD $0xb900f808 // str w8, [x0, #248] + WORD $0xb9011809 // str w9, [x0, #280] + WORD $0x528b1e08 // mov w8, #22768 ; =0x58f0 + WORD $0x72b76828 // movk w8, #47937, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9013808 // str w8, [x0, #312] + WORD $0x529c09c9 // mov w9, #57422 ; =0xe04e + WORD $0x72be4549 // movk w9, #61994, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9015808 // str w8, [x0, #344] + WORD $0x5285c409 // mov w9, #11808 ; =0x2e20 + WORD $0x72a957e9 // movk w9, #19135, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9017808 // str w8, [x0, #376] + WORD $0x52911889 // mov w9, #35012 ; =0x88c4 + WORD $0x72bac089 // movk w9, #54788, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9019808 // str w8, [x0, #408] + WORD $0x5293c4e9 // mov w9, #40487 ; =0x9e27 + WORD $0x72b914e9 // movk w9, #51367, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0x528df309 // mov w9, #28568 ; =0x6f98 + WORD $0x72aec789 // movk w9, #30268, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13894d29 // ror w9, w9, #19 + WORD $0xb901b808 // str w8, [x0, #440] + WORD $0xb901d809 // str w9, [x0, #472] + WORD $0x529e1768 // mov w8, #61627 ; =0xf0bb + WORD $0x72a82b08 // movk w8, #16728, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb901f808 // str w8, [x0, #504] + WORD $0x5289de49 // mov w9, #20210 ; =0x4ef2 + WORD $0x72a55c09 // movk w9, #10976, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9021808 // str w8, [x0, #536] + WORD $0x52840949 // mov w9, #8266 ; =0x204a + WORD $0x72b7e5c9 // movk w9, #48942, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9023808 // str w8, [x0, #568] + WORD $0x52989ac9 // mov w9, #50390 ; =0xc4d6 + WORD $0x72a09109 // movk w9, #1160, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9025808 // str w8, [x0, #600] + WORD $0x5284f909 // mov w9, #10184 ; =0x27c8 + WORD $0x72b4f3c9 // movk w9, #42910, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0x52930ec9 // mov w9, #39030 ; =0x9876 + WORD $0x72a78de9 // movk w9, #15471, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13894d29 // ror w9, w9, #19 + WORD $0xb9027808 // str w8, [x0, #632] + WORD $0xb9029809 // str w9, [x0, #664] + WORD $0x52976828 // mov w8, #47937 ; =0xbb41 + WORD $0x72ab1e08 // movk w8, #22768, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb902b808 // str w8, [x0, #696] + WORD $0x529e4549 // mov w9, #61994 ; =0xf22a + WORD $0x72bc09c9 // movk w9, #57422, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb902d808 // str w8, [x0, #728] + WORD $0x528957e9 // mov w9, #19135 ; =0x4abf + WORD $0x72a5c409 // movk w9, #11808, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb902f808 // str w8, [x0, #760] + WORD $0xb9401c48 // ldr w8, [x2, #28] + WORD $0x52958129 // mov w9, #44041 ; =0xac09 + WORD $0x72a23129 // movk w9, #4489, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9001c08 // str w8, [x0, #28] + WORD $0x529229e9 // mov w9, #37199 ; =0x914f + WORD $0x72a789e9 // movk w9, #15439, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9003c08 // str w8, [x0, #60] + WORD $0x529d8f09 // mov w9, #60536 ; =0xec78 + WORD $0x72bbe609 // movk w9, #57136, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0x52905629 // mov w9, #33457 ; =0x82b1 + WORD $0x72bc2ec9 // movk w9, #57718, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13897529 // ror w9, w9, #29 + WORD $0xb9005c08 // str w8, [x0, #92] + WORD $0xb9007c09 // str w9, [x0, #124] + WORD $0x528ab808 // mov w8, #21952 ; =0x55c0 + WORD $0x72b3bc88 // movk w8, #40420, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9009c08 // str w8, [x0, #156] + WORD $0x528fcb89 // mov w9, #32348 ; =0x7e5c + WORD $0x72a812a9 // movk w9, #16533, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb900bc08 // str w8, [x0, #188] + WORD $0x52812229 // mov w9, #2321 ; =0x911 + WORD $0x72b13589 // movk w9, #35244, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb900dc08 // str w8, [x0, #220] + WORD $0x5289e789 // mov w9, #20284 ; =0x4f3c + WORD $0x72a9f229 // movk w9, #20369, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb900fc08 // str w8, [x0, #252] + WORD $0x528f1be9 // mov w9, #30943 ; =0x78df + WORD $0x72a61d89 // movk w9, #12524, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0x52963c29 // mov w9, #45537 ; =0xb1e1 + WORD $0x72aed049 // movk w9, #30338, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13897529 // ror w9, w9, #29 + WORD $0xb9011c08 // str w8, [x0, #284] + WORD $0xb9013c09 // str w9, [x0, #316] + WORD $0x529813a8 // mov w8, #49309 ; =0xc09d + WORD $0x72bc8aa8 // movk w8, #58453, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9015c08 // str w8, [x0, #348] + WORD $0x528b8809 // mov w9, #23616 ; =0x5c40 + WORD $0x72b2afc9 // movk w9, #38270, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb9017c08 // str w8, [x0, #380] + WORD $0x52823129 // mov w9, #4489 ; =0x1189 + WORD $0x72b58129 // movk w9, #44041, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9019c08 // str w8, [x0, #412] + WORD $0x528789e9 // mov w9, #15439 ; =0x3c4f + WORD $0x72b229e9 // movk w9, #37199, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb901bc08 // str w8, [x0, #444] + WORD $0x529be609 // mov w9, #57136 ; =0xdf30 + WORD $0x72bd8f09 // movk w9, #60536, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0x529c2ec9 // mov w9, #57718 ; =0xe176 + WORD $0x72b05629 // movk w9, #33457, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13897529 // ror w9, w9, #29 + WORD $0xb901dc08 // str w8, [x0, #476] + WORD $0xb901fc09 // str w9, [x0, #508] + WORD $0x5293bc88 // mov w8, #40420 ; =0x9de4 + WORD $0x72aab808 // movk w8, #21952, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9021c08 // str w8, [x0, #540] + WORD $0x528812a9 // mov w9, #16533 ; =0x4095 + WORD $0x72afcb89 // movk w9, #32348, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb9023c08 // str w8, [x0, #572] + WORD $0x52913589 // mov w9, #35244 ; =0x89ac + WORD $0x72a12229 // movk w9, #2321, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9025c08 // str w8, [x0, #604] + WORD $0x5289f229 // mov w9, #20369 ; =0x4f91 + WORD $0x72a9e789 // movk w9, #20284, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9027c08 // str w8, [x0, #636] + WORD $0x52861d89 // mov w9, #12524 ; =0x30ec + WORD $0x72af1be9 // movk w9, #30943, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0x528ed049 // mov w9, #30338 ; =0x7682 + WORD $0x72b63c29 // movk w9, #45537, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13897529 // ror w9, w9, #29 + WORD $0xb9029c08 // str w8, [x0, #668] + WORD $0xb902bc09 // str w9, [x0, #700] + WORD $0x529c8aa8 // mov w8, #58453 ; =0xe455 + WORD $0x72b813a8 // movk w8, #49309, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb902dc08 // str w8, [x0, #732] + WORD $0x5292afc9 // mov w9, #38270 ; =0x957e + WORD $0x72ab8809 // movk w9, #23616, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0x528017e9 // mov w9, #191 ; =0xbf + WORD $0x1400034f // b LBB0_6 + WORD $0xb9400048 // ldr w8, [x2] + WORD $0x529d3b69 // mov w9, #59867 ; =0xe9db + WORD $0x72b87de9 // movk w9, #50159, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9000008 // str w8, [x0] + WORD $0x529ac089 // mov w9, #54788 ; =0xd604 + WORD $0x72b11889 // movk w9, #35012, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9001808 // str w8, [x0, #24] + WORD $0x529e4529 // mov w9, #61993 ; =0xf229 + WORD $0x72bcf129 // movk w9, #59273, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9003008 // str w8, [x0, #48] + WORD $0x5290ec69 // mov w9, #34659 ; =0x8763 + WORD $0x72b8df29 // movk w9, #50937, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0x52893ce9 // mov w9, #18919 ; =0x49e7 + WORD $0x72a2bd49 // movk w9, #5610, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13897d29 // ror w9, w9, #31 + WORD $0xb9004808 // str w8, [x0, #72] + WORD $0xb9006009 // str w9, [x0, #96] + WORD $0x52882b08 // mov w8, #16728 ; =0x4158 + WORD $0x72be1768 // movk w8, #61627, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9007808 // str w8, [x0, #120] + WORD $0x528ede09 // mov w9, #30448 ; =0x76f0 + WORD $0x72bf7f49 // movk w9, #64506, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9009008 // str w8, [x0, #144] + WORD $0x52902449 // mov w9, #33058 ; =0x8122 + WORD $0x72a626a9 // movk w9, #12597, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb900a808 // str w8, [x0, #168] + WORD $0x52914f29 // mov w9, #35449 ; =0x8a79 + WORD $0x72bc4f89 // movk w9, #57980, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb900c008 // str w8, [x0, #192] + WORD $0x529b1e29 // mov w9, #55537 ; =0xd8f1 + WORD $0x72b7cc29 // movk w9, #48737, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0x528f38a9 // mov w9, #31173 ; =0x79c5 + WORD $0x72af5249 // movk w9, #31378, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13897d29 // ror w9, w9, #31 + WORD $0xb900d808 // str w8, [x0, #216] + WORD $0xb900f009 // str w9, [x0, #240] + WORD $0x528ac788 // mov w8, #22076 ; =0x563c + WORD $0x72a5da08 // movk w8, #11984, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9010808 // str w8, [x0, #264] + WORD $0x529787c9 // mov w9, #48190 ; =0xbc3e + WORD $0x72bfd3a9 // movk w9, #65181, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9012008 // str w8, [x0, #288] + WORD $0x52891189 // mov w9, #18572 ; =0x488c + WORD $0x72a9ac09 // movk w9, #19808, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9013808 // str w8, [x0, #312] + WORD $0x5293cf09 // mov w9, #40568 ; =0x9e78 + WORD $0x72b3e449 // movk w9, #40738, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9015008 // str w8, [x0, #336] + WORD $0x52878de9 // mov w9, #15471 ; =0x3c6f + WORD $0x72b30ec9 // movk w9, #39030, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0x528e2bc9 // mov w9, #29022 ; =0x715e + WORD $0x72b493c9 // movk w9, #42142, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13897d29 // ror w9, w9, #31 + WORD $0xb9016808 // str w8, [x0, #360] + WORD $0xb9018009 // str w9, [x0, #384] + WORD $0x5291e168 // mov w8, #36619 ; =0x8f0b + WORD $0x72b682a8 // movk w8, #46101, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9019808 // str w8, [x0, #408] + WORD $0x5281f7e9 // mov w9, #4031 ; =0xfbf + WORD $0x72b4ede9 // movk w9, #42863, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb901b008 // str w8, [x0, #432] + WORD $0x52846269 // mov w9, #8979 ; =0x2313 + WORD $0x72ab0249 // movk w9, #22546, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb901c808 // str w8, [x0, #456] + WORD $0x5293c4e9 // mov w9, #40487 ; =0x9e27 + WORD $0x72b914e9 // movk w9, #51367, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb901e008 // str w8, [x0, #480] + WORD $0x52837cc9 // mov w9, #7142 ; =0x1be6 + WORD $0x72a3b1e9 // movk w9, #7567, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0x528af529 // mov w9, #22441 ; =0x57a9 + WORD $0x72a4f389 // movk w9, #10140, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13897d29 // ror w9, w9, #31 + WORD $0xb901f808 // str w8, [x0, #504] + WORD $0xb9021009 // str w9, [x0, #528] + WORD $0x52985da8 // mov w8, #49901 ; =0xc2ed + WORD $0x72a0ac68 // movk w8, #1379, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9022808 // str w8, [x0, #552] + WORD $0x529dfd29 // mov w9, #61417 ; =0xefe9 + WORD $0x72bb7869 // movk w9, #56259, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9024008 // str w8, [x0, #576] + WORD $0x52989ac9 // mov w9, #50390 ; =0xc4d6 + WORD $0x72a09109 // movk w9, #1160, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9025808 // str w8, [x0, #600] + WORD $0x52913e49 // mov w9, #35314 ; =0x89f2 + WORD $0x72a53ce9 // movk w9, #10727, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9027008 // str w8, [x0, #624] + WORD $0x529f30e9 // mov w9, #63879 ; =0xf987 + WORD $0x72ac78c9 // movk w9, #25542, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887d08 // ror w8, w8, #31 + WORD $0xb9028808 // str w8, [x0, #648] + WORD $0xb9400448 // ldr w8, [x2, #4] + WORD $0x529a76e9 // mov w9, #54199 ; =0xd3b7 + WORD $0x72b0fbe9 // movk w9, #34783, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0x52958129 // mov w9, #44041 ; =0xac09 + WORD $0x72a23129 // movk w9, #4489, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13897529 // ror w9, w9, #29 + WORD $0xb9000408 // str w8, [x0, #4] + WORD $0xb9001c09 // str w9, [x0, #28] + WORD $0x529c8a68 // mov w8, #58451 ; =0xe453 + WORD $0x72b9e268 // movk w8, #53011, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9003408 // str w8, [x0, #52] + WORD $0x5281d8e9 // mov w9, #3783 ; =0xec7 + WORD $0x72b1be69 // movk w9, #36339, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9004c08 // str w8, [x0, #76] + WORD $0x529279c9 // mov w9, #37838 ; =0x93ce + WORD $0x72a57a89 // movk w9, #11220, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9006408 // str w8, [x0, #100] + WORD $0x52905629 // mov w9, #33457 ; =0x82b1 + WORD $0x72bc2ec9 // movk w9, #57718, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9007c08 // str w8, [x0, #124] + WORD $0x529dbc29 // mov w9, #60897 ; =0xede1 + WORD $0x72befe89 // movk w9, #63476, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0x52804889 // mov w9, #580 ; =0x244 + WORD $0x72ac4d69 // movk w9, #25195, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13897529 // ror w9, w9, #29 + WORD $0xb9009408 // str w8, [x0, #148] + WORD $0xb900ac09 // str w9, [x0, #172] + WORD $0x52829e68 // mov w8, #5363 ; =0x14f3 + WORD $0x72b89f28 // movk w8, #50425, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb900c408 // str w8, [x0, #196] + WORD $0x52963c69 // mov w9, #45539 ; =0xb1e3 + WORD $0x72af9869 // movk w9, #31939, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb900dc08 // str w8, [x0, #220] + WORD $0x529e7149 // mov w9, #62346 ; =0xf38a + WORD $0x72bea489 // movk w9, #62756, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb900f408 // str w8, [x0, #244] + WORD $0x52958f09 // mov w9, #44152 ; =0xac78 + WORD $0x72abb409 // movk w9, #23968, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9010c08 // str w8, [x0, #268] + WORD $0x528f0fa9 // mov w9, #30845 ; =0x787d + WORD $0x72bfa769 // movk w9, #64827, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0x52922309 // mov w9, #37144 ; =0x9118 + WORD $0x72b35809 // movk w9, #39616, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13897529 // ror w9, w9, #29 + WORD $0xb9012408 // str w8, [x0, #292] + WORD $0xb9013c09 // str w9, [x0, #316] + WORD $0x52879e28 // mov w8, #15601 ; =0x3cf1 + WORD $0x72a7c8a8 // movk w8, #15941, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9015408 // str w8, [x0, #340] + WORD $0x528f1be9 // mov w9, #30943 ; =0x78df + WORD $0x72a61d89 // movk w9, #12524, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9016c08 // str w8, [x0, #364] + WORD $0x529c57a9 // mov w9, #58045 ; =0xe2bd + WORD $0x72a92789 // movk w9, #18748, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9018408 // str w8, [x0, #388] + WORD $0x5283c2e9 // mov w9, #7703 ; =0x1e17 + WORD $0x72ad0569 // movk w9, #26667, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9019c08 // str w8, [x0, #412] + WORD $0x5283efe9 // mov w9, #8063 ; =0x1f7f + WORD $0x72a9dbc9 // movk w9, #20190, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0x5288c4c9 // mov w9, #17958 ; =0x4626 + WORD $0x72b60489 // movk w9, #45092, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13897529 // ror w9, w9, #29 + WORD $0xb901b408 // str w8, [x0, #436] + WORD $0xb901cc09 // str w9, [x0, #460] + WORD $0x528789e8 // mov w8, #15439 ; =0x3c4f + WORD $0x72b229e8 // movk w8, #37199, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb901e408 // str w8, [x0, #484] + WORD $0x5286f989 // mov w9, #14284 ; =0x37cc + WORD $0x72a763c9 // movk w9, #15134, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb901fc08 // str w8, [x0, #508] + WORD $0x5295ea49 // mov w9, #44882 ; =0xaf52 + WORD $0x72a9e709 // movk w9, #20280, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9021408 // str w8, [x0, #532] + WORD $0x5290bb49 // mov w9, #34266 ; =0x85da + WORD $0x72a158e9 // movk w9, #2759, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9022c08 // str w8, [x0, #556] + WORD $0x529bfa69 // mov w9, #57299 ; =0xdfd3 + WORD $0x72b6f0e9 // movk w9, #46983, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0x52913589 // mov w9, #35244 ; =0x89ac + WORD $0x72a12229 // movk w9, #2321, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13897529 // ror w9, w9, #29 + WORD $0xb9024408 // str w8, [x0, #580] + WORD $0xb9025c09 // str w9, [x0, #604] + WORD $0x52827c88 // mov w8, #5092 ; =0x13e4 + WORD $0x72aa79e8 // movk w8, #21455, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9027408 // str w8, [x0, #628] + WORD $0x529e61c9 // mov w9, #62222 ; =0xf30e + WORD $0x72b8f1a9 // movk w9, #51085, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb9028c08 // str w8, [x0, #652] + WORD $0xb9400848 // ldr w8, [x2, #8] + WORD $0x5294ede9 // mov w9, #42863 ; =0xa76f + WORD $0x72a1f7e9 // movk w9, #4031, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9000808 // str w8, [x0, #8] + WORD $0x528b0249 // mov w9, #22546 ; =0x5812 + WORD $0x72a46269 // movk w9, #8979, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9002008 // str w8, [x0, #32] + WORD $0x529914e9 // mov w9, #51367 ; =0xc8a7 + WORD $0x72b3c4e9 // movk w9, #40487, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9003808 // str w8, [x0, #56] + WORD $0x5283b1e9 // mov w9, #7567 ; =0x1d8f + WORD $0x72a37cc9 // movk w9, #7142, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0x5284f389 // mov w9, #10140 ; =0x279c + WORD $0x72aaf529 // movk w9, #22441, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13896929 // ror w9, w9, #26 + WORD $0xb9005008 // str w8, [x0, #80] + WORD $0xb9006809 // str w9, [x0, #104] + WORD $0x5280ac68 // mov w8, #1379 ; =0x563 + WORD $0x72b85da8 // movk w8, #49901, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9008008 // str w8, [x0, #128] + WORD $0x529b7869 // mov w9, #56259 ; =0xdbc3 + WORD $0x72bdfd29 // movk w9, #61417, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9009808 // str w8, [x0, #152] + WORD $0x52809109 // mov w9, #1160 ; =0x488 + WORD $0x72b89ac9 // movk w9, #50390, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb900b008 // str w8, [x0, #176] + WORD $0x52853ce9 // mov w9, #10727 ; =0x29e7 + WORD $0x72b13e49 // movk w9, #35314, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb900c808 // str w8, [x0, #200] + WORD $0x528c78c9 // mov w9, #25542 ; =0x63c6 + WORD $0x72bf30e9 // movk w9, #63879, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0x529ce2a9 // mov w9, #59157 ; =0xe715 + WORD $0x72bd4929 // movk w9, #59977, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13896929 // ror w9, w9, #26 + WORD $0xb900e008 // str w8, [x0, #224] + WORD $0xb900f809 // str w9, [x0, #248] + WORD $0x528b1e08 // mov w8, #22768 ; =0x58f0 + WORD $0x72b76828 // movk w8, #47937, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9011008 // str w8, [x0, #272] + WORD $0x529e1f69 // mov w9, #61691 ; =0xf0fb + WORD $0x72bf4ec9 // movk w9, #64118, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9012808 // str w8, [x0, #296] + WORD $0x52844629 // mov w9, #8753 ; =0x2231 + WORD $0x72a6b029 // movk w9, #13697, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9014008 // str w8, [x0, #320] + WORD $0x528f3c49 // mov w9, #31202 ; =0x79e2 + WORD $0x72af9149 // movk w9, #31882, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9015808 // str w8, [x0, #344] + WORD $0x529e37c9 // mov w9, #61886 ; =0xf1be + WORD $0x72ac3b09 // movk w9, #25048, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0x5298af49 // mov w9, #50554 ; =0xc57a + WORD $0x72b24f29 // movk w9, #37497, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13896929 // ror w9, w9, #26 + WORD $0xb9017008 // str w8, [x0, #368] + WORD $0xb9018809 // str w9, [x0, #392] + WORD $0x528785c8 // mov w8, #15406 ; =0x3c2e + WORD $0x72ba0ac8 // movk w8, #53334, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb901a008 // str w8, [x0, #416] + WORD $0x5287dfc9 // mov w9, #16126 ; =0x3efe + WORD $0x72b3b789 // movk w9, #40380, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb901b808 // str w8, [x0, #440] + WORD $0x529189a9 // mov w9, #35917 ; =0x8c4d + WORD $0x72ac0909 // movk w9, #24648, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb901d008 // str w8, [x0, #464] + WORD $0x528f13e9 // mov w9, #30879 ; =0x789f + WORD $0x72a453c9 // movk w9, #8862, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb901e808 // str w8, [x0, #488] + WORD $0x528df309 // mov w9, #28568 ; =0x6f98 + WORD $0x72aec789 // movk w9, #30268, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0x528bd489 // mov w9, #24228 ; =0x5ea4 + WORD $0x72b3ce29 // movk w9, #40561, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13896929 // ror w9, w9, #26 + WORD $0xb9020008 // str w8, [x0, #512] + WORD $0xb9021809 // str w9, [x0, #536] + WORD $0x52817688 // mov w8, #2996 ; =0xbb4 + WORD $0x72a2b1e8 // movk w8, #5519, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9023008 // str w8, [x0, #560] + WORD $0x5297f4e9 // mov w9, #49063 ; =0xbfa7 + WORD $0x72ade1e9 // movk w9, #28431, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9024808 // str w8, [x0, #584] + WORD $0x52826b09 // mov w9, #4952 ; =0x1358 + WORD $0x72a24469 // movk w9, #4643, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9026008 // str w8, [x0, #608] + WORD $0x5284f909 // mov w9, #10184 ; =0x27c8 + WORD $0x72b4f3c9 // movk w9, #42910, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9027808 // str w8, [x0, #632] + WORD $0x529cc3a9 // mov w9, #58909 ; =0xe61d + WORD $0x72b1e369 // movk w9, #36635, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13886908 // ror w8, w8, #26 + WORD $0xb9029008 // str w8, [x0, #656] + WORD $0xb9400c48 // ldr w8, [x2, #12] + WORD $0x5289dbc9 // mov w9, #20190 ; =0x4ede + WORD $0x72a3efe9 // movk w9, #8063, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0x52960489 // mov w9, #45092 ; =0xb024 + WORD $0x72a8c4c9 // movk w9, #17958, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13895529 // ror w9, w9, #21 + WORD $0xb9000c08 // str w8, [x0, #12] + WORD $0xb9002409 // str w9, [x0, #36] + WORD $0x529229e8 // mov w8, #37199 ; =0x914f + WORD $0x72a789e8 // movk w8, #15439, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9003c08 // str w8, [x0, #60] + WORD $0x528763c9 // mov w9, #15134 ; =0x3b1e + WORD $0x72a6f989 // movk w9, #14284, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9005408 // str w8, [x0, #84] + WORD $0x5289e709 // mov w9, #20280 ; =0x4f38 + WORD $0x72b5ea49 // movk w9, #44882, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9006c08 // str w8, [x0, #108] + WORD $0x528158e9 // mov w9, #2759 ; =0xac7 + WORD $0x72b0bb49 // movk w9, #34266, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9008408 // str w8, [x0, #132] + WORD $0x5296f0e9 // mov w9, #46983 ; =0xb787 + WORD $0x72bbfa69 // movk w9, #57299, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0x52812229 // mov w9, #2321 ; =0x911 + WORD $0x72b13589 // movk w9, #35244, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13895529 // ror w9, w9, #21 + WORD $0xb9009c08 // str w8, [x0, #156] + WORD $0xb900b409 // str w9, [x0, #180] + WORD $0x528a79e8 // mov w8, #21455 ; =0x53cf + WORD $0x72a27c88 // movk w8, #5092, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb900cc08 // str w8, [x0, #204] + WORD $0x5298f1a9 // mov w9, #51085 ; =0xc78d + WORD $0x72be61c9 // movk w9, #62222, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb900e408 // str w8, [x0, #228] + WORD $0x5299c569 // mov w9, #52779 ; =0xce2b + WORD $0x72ba9269 // movk w9, #54419, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb900fc08 // str w8, [x0, #252] + WORD $0x52963c29 // mov w9, #45537 ; =0xb1e1 + WORD $0x72aed049 // movk w9, #30338, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9011408 // str w8, [x0, #276] + WORD $0x529c3ee9 // mov w9, #57847 ; =0xe1f7 + WORD $0x72be9da9 // movk w9, #62701, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0x52888c49 // mov w9, #17506 ; =0x4462 + WORD $0x72ad6049 // movk w9, #27394, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13895529 // ror w9, w9, #21 + WORD $0xb9012c08 // str w8, [x0, #300] + WORD $0xb9014409 // str w9, [x0, #324] + WORD $0x529e7888 // mov w8, #62404 ; =0xf3c4 + WORD $0x72bf2288 // movk w8, #63764, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9015c08 // str w8, [x0, #348] + WORD $0x529c6f89 // mov w9, #58236 ; =0xe37c + WORD $0x72b87629 // movk w9, #50097, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9017408 // str w8, [x0, #372] + WORD $0x52915ea9 // mov w9, #35573 ; =0x8af5 + WORD $0x72a49e69 // movk w9, #9459, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9018c08 // str w8, [x0, #396] + WORD $0x528f0ba9 // mov w9, #30813 ; =0x785d + WORD $0x72b41589 // movk w9, #41132, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb901a408 // str w8, [x0, #420] + WORD $0x528fbfa9 // mov w9, #32253 ; =0x7dfd + WORD $0x72a76f09 // movk w9, #15224, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0x52831349 // mov w9, #6298 ; =0x189a + WORD $0x72b81229 // movk w9, #49297, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13895529 // ror w9, w9, #21 + WORD $0xb901bc08 // str w8, [x0, #444] + WORD $0xb901d409 // str w9, [x0, #468] + WORD $0x529e27c8 // mov w8, #61758 ; =0xf13e + WORD $0x72a8a788 // movk w8, #17724, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb901ec08 // str w8, [x0, #492] + WORD $0x529be609 // mov w9, #57136 ; =0xdf30 + WORD $0x72bd8f09 // movk w9, #60536, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9020408 // str w8, [x0, #516] + WORD $0x5297a929 // mov w9, #48457 ; =0xbd49 + WORD $0x72a79c49 // movk w9, #15586, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9021c08 // str w8, [x0, #540] + WORD $0x5282ed09 // mov w9, #5992 ; =0x1768 + WORD $0x72a563c9 // movk w9, #11038, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9023408 // str w8, [x0, #564] + WORD $0x528fe9c9 // mov w9, #32590 ; =0x7f4e + WORD $0x72bbc3e9 // movk w9, #56863, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0x5284d609 // mov w9, #9904 ; =0x26b0 + WORD $0x72a488c9 // movk w9, #9286, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13895529 // ror w9, w9, #21 + WORD $0xb9024c08 // str w8, [x0, #588] + WORD $0xb9026409 // str w9, [x0, #612] + WORD $0x5289f228 // mov w8, #20369 ; =0x4f91 + WORD $0x72a9e788 // movk w8, #20284, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9027c08 // str w8, [x0, #636] + WORD $0x52998769 // mov w9, #52283 ; =0xcc3b + WORD $0x72a3c6e9 // movk w9, #7735, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13885508 // ror w8, w8, #21 + WORD $0xb9029408 // str w8, [x0, #660] + WORD $0xb9401048 // ldr w8, [x2, #16] + WORD $0x5293b789 // mov w9, #40380 ; =0x9dbc + WORD $0x72a7dfc9 // movk w9, #16126, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9001008 // str w8, [x0, #16] + WORD $0x528c0909 // mov w9, #24648 ; =0x6048 + WORD $0x72b189a9 // movk w9, #35917, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9002808 // str w8, [x0, #40] + WORD $0x528453c9 // mov w9, #8862 ; =0x229e + WORD $0x72af13e9 // movk w9, #30879, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9004008 // str w8, [x0, #64] + WORD $0x528ec789 // mov w9, #30268 ; =0x763c + WORD $0x72adf309 // movk w9, #28568, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0x5293ce29 // mov w9, #40561 ; =0x9e71 + WORD $0x72abd489 // movk w9, #24228, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13894d29 // ror w9, w9, #19 + WORD $0xb9005808 // str w8, [x0, #88] + WORD $0xb9007009 // str w9, [x0, #112] + WORD $0x5282b1e8 // mov w8, #5519 ; =0x158f + WORD $0x72a17688 // movk w8, #2996, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9008808 // str w8, [x0, #136] + WORD $0x528de1e9 // mov w9, #28431 ; =0x6f0f + WORD $0x72b7f4e9 // movk w9, #49063, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb900a008 // str w8, [x0, #160] + WORD $0x52824469 // mov w9, #4643 ; =0x1223 + WORD $0x72a26b09 // movk w9, #4952, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb900b808 // str w8, [x0, #184] + WORD $0x5294f3c9 // mov w9, #42910 ; =0xa79e + WORD $0x72a4f909 // movk w9, #10184, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb900d008 // str w8, [x0, #208] + WORD $0x5291e369 // mov w9, #36635 ; =0x8f1b + WORD $0x72bcc3a9 // movk w9, #58909, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0x52938ae9 // mov w9, #40023 ; =0x9c57 + WORD $0x72b524e9 // movk w9, #43303, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13894d29 // ror w9, w9, #19 + WORD $0xb900e808 // str w8, [x0, #232] + WORD $0xb9010009 // str w9, [x0, #256] + WORD $0x528c7848 // mov w8, #25538 ; =0x63c2 + WORD $0x72bda0a8 // movk w8, #60677, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9011808 // str w8, [x0, #280] + WORD $0x52987de9 // mov w9, #50159 ; =0xc3ef + WORD $0x72bd3b69 // movk w9, #59867, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9013008 // str w8, [x0, #304] + WORD $0x52911889 // mov w9, #35012 ; =0x88c4 + WORD $0x72bac089 // movk w9, #54788, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9014808 // str w8, [x0, #328] + WORD $0x529cf129 // mov w9, #59273 ; =0xe789 + WORD $0x72be4529 // movk w9, #61993, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9016008 // str w8, [x0, #352] + WORD $0x5298df29 // mov w9, #50937 ; =0xc6f9 + WORD $0x72b0ec69 // movk w9, #34659, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0x5282bd49 // mov w9, #5610 ; =0x15ea + WORD $0x72a93ce9 // movk w9, #18919, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13894d29 // ror w9, w9, #19 + WORD $0xb9017808 // str w8, [x0, #376] + WORD $0xb9019009 // str w9, [x0, #400] + WORD $0x529e1768 // mov w8, #61627 ; =0xf0bb + WORD $0x72a82b08 // movk w8, #16728, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb901a808 // str w8, [x0, #424] + WORD $0x529f7f49 // mov w9, #64506 ; =0xfbfa + WORD $0x72aede09 // movk w9, #30448, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb901c008 // str w8, [x0, #448] + WORD $0x528626a9 // mov w9, #12597 ; =0x3135 + WORD $0x72b02449 // movk w9, #33058, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb901d808 // str w8, [x0, #472] + WORD $0x529c4f89 // mov w9, #57980 ; =0xe27c + WORD $0x72b14f29 // movk w9, #35449, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb901f008 // str w8, [x0, #496] + WORD $0x5297cc29 // mov w9, #48737 ; =0xbe61 + WORD $0x72bb1e29 // movk w9, #55537, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0x528f5249 // mov w9, #31378 ; =0x7a92 + WORD $0x72af38a9 // movk w9, #31173, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13894d29 // ror w9, w9, #19 + WORD $0xb9020808 // str w8, [x0, #520] + WORD $0xb9022009 // str w9, [x0, #544] + WORD $0x5285da08 // mov w8, #11984 ; =0x2ed0 + WORD $0x72aac788 // movk w8, #22076, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9023808 // str w8, [x0, #568] + WORD $0x529fd3a9 // mov w9, #65181 ; =0xfe9d + WORD $0x72b787c9 // movk w9, #48190, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9025008 // str w8, [x0, #592] + WORD $0x5289ac09 // mov w9, #19808 ; =0x4d60 + WORD $0x72a91189 // movk w9, #18572, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9026808 // str w8, [x0, #616] + WORD $0x5293e449 // mov w9, #40738 ; =0x9f22 + WORD $0x72b3cf09 // movk w9, #40568, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9028008 // str w8, [x0, #640] + WORD $0x52930ec9 // mov w9, #39030 ; =0x9876 + WORD $0x72a78de9 // movk w9, #15471, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13884d08 // ror w8, w8, #19 + WORD $0xb9029808 // str w8, [x0, #664] + WORD $0xb9401448 // ldr w8, [x2, #20] + WORD $0x52876f09 // mov w9, #15224 ; =0x3b78 + WORD $0x72afbfa9 // movk w9, #32253, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0x52981229 // mov w9, #49297 ; =0xc091 + WORD $0x72a31349 // movk w9, #6298, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13893d29 // ror w9, w9, #15 + WORD $0xb9001408 // str w8, [x0, #20] + WORD $0xb9002c09 // str w9, [x0, #44] + WORD $0x5288a788 // mov w8, #17724 ; =0x453c + WORD $0x72be27c8 // movk w8, #61758, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb9004408 // str w8, [x0, #68] + WORD $0x529d8f09 // mov w9, #60536 ; =0xec78 + WORD $0x72bbe609 // movk w9, #57136, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb9005c08 // str w8, [x0, #92] + WORD $0x52879c49 // mov w9, #15586 ; =0x3ce2 + WORD $0x72b7a929 // movk w9, #48457, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb9007408 // str w8, [x0, #116] + WORD $0x528563c9 // mov w9, #11038 ; =0x2b1e + WORD $0x72a2ed09 // movk w9, #5992, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb9008c08 // str w8, [x0, #140] + WORD $0x529bc3e9 // mov w9, #56863 ; =0xde1f + WORD $0x72afe9c9 // movk w9, #32590, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0x528488c9 // mov w9, #9286 ; =0x2446 + WORD $0x72a4d609 // movk w9, #9904, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13893d29 // ror w9, w9, #15 + WORD $0xb900a408 // str w8, [x0, #164] + WORD $0xb900bc09 // str w9, [x0, #188] + WORD $0x5289e788 // mov w8, #20284 ; =0x4f3c + WORD $0x72a9f228 // movk w8, #20369, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb900d408 // str w8, [x0, #212] + WORD $0x5283c6e9 // mov w9, #7735 ; =0x1e37 + WORD $0x72b98769 // movk w9, #52283, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb900ec08 // str w8, [x0, #236] + WORD $0x528715e9 // mov w9, #14511 ; =0x38af + WORD $0x72aa49e9 // movk w9, #21071, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb9010408 // str w8, [x0, #260] + WORD $0x5298f0a9 // mov w9, #51077 ; =0xc785 + WORD $0x72bb4149 // movk w9, #55818, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb9011c08 // str w8, [x0, #284] + WORD $0x5290fbe9 // mov w9, #34783 ; =0x87df + WORD $0x72ba76e9 // movk w9, #54199, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0x52823129 // mov w9, #4489 ; =0x1189 + WORD $0x72b58129 // movk w9, #44041, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13893d29 // ror w9, w9, #15 + WORD $0xb9013408 // str w8, [x0, #308] + WORD $0xb9014c09 // str w9, [x0, #332] + WORD $0x5299e268 // mov w8, #53011 ; =0xcf13 + WORD $0x72bc8a68 // movk w8, #58451, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb9016408 // str w8, [x0, #356] + WORD $0x5291be69 // mov w9, #36339 ; =0x8df3 + WORD $0x72a1d8e9 // movk w9, #3783, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb9017c08 // str w8, [x0, #380] + WORD $0x52857a89 // mov w9, #11220 ; =0x2bd4 + WORD $0x72b279c9 // movk w9, #37838, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb9019408 // str w8, [x0, #404] + WORD $0x529c2ec9 // mov w9, #57718 ; =0xe176 + WORD $0x72b05629 // movk w9, #33457, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb901ac08 // str w8, [x0, #428] + WORD $0x529efe89 // mov w9, #63476 ; =0xf7f4 + WORD $0x72bdbc29 // movk w9, #60897, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0x528c4d69 // mov w9, #25195 ; =0x626b + WORD $0x72a04889 // movk w9, #580, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13893d29 // ror w9, w9, #15 + WORD $0xb901c408 // str w8, [x0, #452] + WORD $0xb901dc09 // str w9, [x0, #476] + WORD $0x52989f28 // mov w8, #50425 ; =0xc4f9 + WORD $0x72a29e68 // movk w8, #5363, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb901f408 // str w8, [x0, #500] + WORD $0x528f9869 // mov w9, #31939 ; =0x7cc3 + WORD $0x72b63c69 // movk w9, #45539, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb9020c08 // str w8, [x0, #524] + WORD $0x529ea489 // mov w9, #62756 ; =0xf524 + WORD $0x72be7149 // movk w9, #62346, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb9022408 // str w8, [x0, #548] + WORD $0x528bb409 // mov w9, #23968 ; =0x5da0 + WORD $0x72b58f09 // movk w9, #44152, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb9023c08 // str w8, [x0, #572] + WORD $0x529fa769 // mov w9, #64827 ; =0xfd3b + WORD $0x72af0fa9 // movk w9, #30845, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0x52935809 // mov w9, #39616 ; =0x9ac0 + WORD $0x72b22309 // movk w9, #37144, lsl #16 + WORD $0x0b090109 // add w9, w8, w9 + WORD $0x13893d29 // ror w9, w9, #15 + WORD $0xb9025408 // str w8, [x0, #596] + WORD $0xb9026c09 // str w9, [x0, #620] + WORD $0x5287c8a8 // mov w8, #15941 ; =0x3e45 + WORD $0x72a79e28 // movk w8, #15601, lsl #16 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0xb9028408 // str w8, [x0, #644] + WORD $0x52861d89 // mov w9, #12524 ; =0x30ec + WORD $0x72af1be9 // movk w9, #30943, lsl #16 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x13883d08 // ror w8, w8, #15 + WORD $0x528014e9 // mov w9, #167 ; =0xa7 + WORD $0xb8297808 // str w8, [x0, x9, lsl #2] + WORD $0xd341fc68 // lsr x8, x3, #1 + WORD $0x91004108 // add x8, x8, #16 + WORD $0xf9000028 // str x8, [x1] + WORD $0xa8c17bfd // ldp x29, x30, [sp], #16 ; 16-byte Folded Reload + WORD $0xd65f03c0 // ret + +TEXT ·lea_encrypt(SB), $0-32 + MOVD ct+0(FP), R0 + MOVD pt+8(FP), R1 + MOVD rk+16(FP), R2 + MOVD round+24(FP), R3 + WORD $0xa9bf7bfd // stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill + WORD $0x910003fd // mov x29, sp + WORD $0x29402428 // ldp w8, w9, [x1] + WORD $0x29412c2a // ldp w10, w11, [x1, #8] + WORD $0x2942344c // ldp w12, w13, [x2, #16] + WORD $0x4a0a018c // eor w12, w12, w10 + WORD $0x4a0b01ab // eor w11, w13, w11 + WORD $0x0b0c016b // add w11, w11, w12 + WORD $0x138b0d6b // ror w11, w11, #3 + WORD $0x2941344c // ldp w12, w13, [x2, #8] + WORD $0x4a09018c // eor w12, w12, w9 + WORD $0x4a0a01aa // eor w10, w13, w10 + WORD $0x0b0c014a // add w10, w10, w12 + WORD $0x138a154a // ror w10, w10, #5 + WORD $0x2940344c // ldp w12, w13, [x2] + WORD $0x4a08018c // eor w12, w12, w8 + WORD $0x4a0901a9 // eor w9, w13, w9 + WORD $0x0b0c0129 // add w9, w9, w12 + WORD $0x13895d29 // ror w9, w9, #23 + WORD $0x2945344c // ldp w12, w13, [x2, #40] + WORD $0x4a0b018c // eor w12, w12, w11 + WORD $0x4a0801a8 // eor w8, w13, w8 + WORD $0x0b0c0108 // add w8, w8, w12 + WORD $0x13880d08 // ror w8, w8, #3 + WORD $0x2944344c // ldp w12, w13, [x2, #32] + WORD $0x4a0a018c // eor w12, w12, w10 + WORD $0x4a0b01ab // eor w11, w13, w11 + WORD $0x0b0c016b // add w11, w11, w12 + WORD $0x138b156b // ror w11, w11, #5 + WORD $0x2943344c // ldp w12, w13, [x2, #24] + WORD $0x4a09018c // eor w12, w12, w9 + WORD $0x4a0a01aa // eor w10, w13, w10 + WORD $0x0b0c014a // add w10, w10, w12 + WORD $0x138a5d4a // ror w10, w10, #23 + WORD $0x2948344c // ldp w12, w13, [x2, #64] + WORD $0x4a08018c // eor w12, w12, w8 + WORD $0x4a0901a9 // eor w9, w13, w9 + WORD $0x0b0c0129 // add w9, w9, w12 + WORD $0x13890d29 // ror w9, w9, #3 + WORD $0x2947344c // ldp w12, w13, [x2, #56] + WORD $0x4a0b018c // eor w12, w12, w11 + WORD $0x4a0801a8 // eor w8, w13, w8 + WORD $0x0b0c0108 // add w8, w8, w12 + WORD $0x13881508 // ror w8, w8, #5 + WORD $0x2946344c // ldp w12, w13, [x2, #48] + WORD $0x4a0a018c // eor w12, w12, w10 + WORD $0x4a0b01ab // eor w11, w13, w11 + WORD $0x0b0c016b // add w11, w11, w12 + WORD $0x138b5d6b // ror w11, w11, #23 + WORD $0x294b344c // ldp w12, w13, [x2, #88] + WORD $0x4a09018c // eor w12, w12, w9 + WORD $0x4a0a01aa // eor w10, w13, w10 + WORD $0x0b0c014a // add w10, w10, w12 + WORD $0x138a0d4a // ror w10, w10, #3 + WORD $0x294a344c // ldp w12, w13, [x2, #80] + WORD $0x4a08018c // eor w12, w12, w8 + WORD $0x4a0901a9 // eor w9, w13, w9 + WORD $0x0b0c0129 // add w9, w9, w12 + WORD $0x13891529 // ror w9, w9, #5 + WORD $0x2949344c // ldp w12, w13, [x2, #72] + WORD $0x4a0b018c // eor w12, w12, w11 + WORD $0x4a0801a8 // eor w8, w13, w8 + WORD $0x0b0c0108 // add w8, w8, w12 + WORD $0x13885d08 // ror w8, w8, #23 + WORD $0x294e344c // ldp w12, w13, [x2, #112] + WORD $0x4a0a018c // eor w12, w12, w10 + WORD $0x4a0b01ab // eor w11, w13, w11 + WORD $0x0b0c016b // add w11, w11, w12 + WORD $0x138b0d6b // ror w11, w11, #3 + WORD $0x294d344c // ldp w12, w13, [x2, #104] + WORD $0x4a09018c // eor w12, w12, w9 + WORD $0x4a0a01aa // eor w10, w13, w10 + WORD $0x0b0c014a // add w10, w10, w12 + WORD $0x138a154a // ror w10, w10, #5 + WORD $0x294c344c // ldp w12, w13, [x2, #96] + WORD $0x4a08018c // eor w12, w12, w8 + WORD $0x4a0901a9 // eor w9, w13, w9 + WORD $0x0b0c0129 // add w9, w9, w12 + WORD $0x13895d29 // ror w9, w9, #23 + WORD $0x2951344c // ldp w12, w13, [x2, #136] + WORD $0x4a0b018c // eor w12, w12, w11 + WORD $0x4a0801a8 // eor w8, w13, w8 + WORD $0x0b0c0108 // add w8, w8, w12 + WORD $0x13880d08 // ror w8, w8, #3 + WORD $0x2950344c // ldp w12, w13, [x2, #128] + WORD $0x4a0a018c // eor w12, w12, w10 + WORD $0x4a0b01ab // eor w11, w13, w11 + WORD $0x0b0c016b // add w11, w11, w12 + WORD $0x138b156b // ror w11, w11, #5 + WORD $0x294f344c // ldp w12, w13, [x2, #120] + WORD $0x4a09018c // eor w12, w12, w9 + WORD $0x4a0a01aa // eor w10, w13, w10 + WORD $0x0b0c014a // add w10, w10, w12 + WORD $0x138a5d4a // ror w10, w10, #23 + WORD $0x2954344c // ldp w12, w13, [x2, #160] + WORD $0x4a08018c // eor w12, w12, w8 + WORD $0x4a0901a9 // eor w9, w13, w9 + WORD $0x0b0c0129 // add w9, w9, w12 + WORD $0x13890d29 // ror w9, w9, #3 + WORD $0x2953344c // ldp w12, w13, [x2, #152] + WORD $0x4a0b018c // eor w12, w12, w11 + WORD $0x4a0801a8 // eor w8, w13, w8 + WORD $0x0b0c0108 // add w8, w8, w12 + WORD $0x13881508 // ror w8, w8, #5 + WORD $0x2952344c // ldp w12, w13, [x2, #144] + WORD $0x4a0a018c // eor w12, w12, w10 + WORD $0x4a0b01ab // eor w11, w13, w11 + WORD $0x0b0c016b // add w11, w11, w12 + WORD $0x138b5d6b // ror w11, w11, #23 + WORD $0x2957344c // ldp w12, w13, [x2, #184] + WORD $0x4a09018c // eor w12, w12, w9 + WORD $0x4a0a01aa // eor w10, w13, w10 + WORD $0x0b0c014a // add w10, w10, w12 + WORD $0x138a0d4a // ror w10, w10, #3 + WORD $0x2956344c // ldp w12, w13, [x2, #176] + WORD $0x4a08018c // eor w12, w12, w8 + WORD $0x4a0901a9 // eor w9, w13, w9 + WORD $0x0b0c0129 // add w9, w9, w12 + WORD $0x13891529 // ror w9, w9, #5 + WORD $0x2955344c // ldp w12, w13, [x2, #168] + WORD $0x4a0b018c // eor w12, w12, w11 + WORD $0x4a0801a8 // eor w8, w13, w8 + WORD $0x0b0c0108 // add w8, w8, w12 + WORD $0x13885d08 // ror w8, w8, #23 + WORD $0x295a344c // ldp w12, w13, [x2, #208] + WORD $0x4a0a018c // eor w12, w12, w10 + WORD $0x4a0b01ab // eor w11, w13, w11 + WORD $0x0b0c016b // add w11, w11, w12 + WORD $0x138b0d6b // ror w11, w11, #3 + WORD $0x2959344c // ldp w12, w13, [x2, #200] + WORD $0x4a09018c // eor w12, w12, w9 + WORD $0x4a0a01aa // eor w10, w13, w10 + WORD $0x0b0c014a // add w10, w10, w12 + WORD $0x138a154a // ror w10, w10, #5 + WORD $0x2958344c // ldp w12, w13, [x2, #192] + WORD $0x4a08018c // eor w12, w12, w8 + WORD $0x4a0901a9 // eor w9, w13, w9 + WORD $0x0b0c0129 // add w9, w9, w12 + WORD $0x13895d29 // ror w9, w9, #23 + WORD $0x295d344c // ldp w12, w13, [x2, #232] + WORD $0x4a0b018c // eor w12, w12, w11 + WORD $0x4a0801a8 // eor w8, w13, w8 + WORD $0x0b0c0108 // add w8, w8, w12 + WORD $0x13880d08 // ror w8, w8, #3 + WORD $0x295c344c // ldp w12, w13, [x2, #224] + WORD $0x4a0a018c // eor w12, w12, w10 + WORD $0x4a0b01ab // eor w11, w13, w11 + WORD $0x0b0c016b // add w11, w11, w12 + WORD $0x138b156b // ror w11, w11, #5 + WORD $0x295b344c // ldp w12, w13, [x2, #216] + WORD $0x4a09018c // eor w12, w12, w9 + WORD $0x4a0a01aa // eor w10, w13, w10 + WORD $0x0b0c014a // add w10, w10, w12 + WORD $0x138a5d4a // ror w10, w10, #23 + WORD $0xb941004c // ldr w12, [x2, #256] + WORD $0x4a08018c // eor w12, w12, w8 + WORD $0xb941044d // ldr w13, [x2, #260] + WORD $0x4a0901a9 // eor w9, w13, w9 + WORD $0x0b0c0129 // add w9, w9, w12 + WORD $0x13890d29 // ror w9, w9, #3 + WORD $0x295f344c // ldp w12, w13, [x2, #248] + WORD $0x4a0b018c // eor w12, w12, w11 + WORD $0x4a0801a8 // eor w8, w13, w8 + WORD $0x0b0c0108 // add w8, w8, w12 + WORD $0x13881508 // ror w8, w8, #5 + WORD $0x295e344c // ldp w12, w13, [x2, #240] + WORD $0x4a0a018c // eor w12, w12, w10 + WORD $0x4a0b01ab // eor w11, w13, w11 + WORD $0x0b0c016b // add w11, w11, w12 + WORD $0x138b5d6b // ror w11, w11, #23 + WORD $0xb941184c // ldr w12, [x2, #280] + WORD $0x4a09018c // eor w12, w12, w9 + WORD $0xb9411c4d // ldr w13, [x2, #284] + WORD $0x4a0a01aa // eor w10, w13, w10 + WORD $0x0b0c014a // add w10, w10, w12 + WORD $0x138a0d4a // ror w10, w10, #3 + WORD $0xb941104c // ldr w12, [x2, #272] + WORD $0x4a08018c // eor w12, w12, w8 + WORD $0xb941144d // ldr w13, [x2, #276] + WORD $0x4a0901a9 // eor w9, w13, w9 + WORD $0x0b0c0129 // add w9, w9, w12 + WORD $0x13891529 // ror w9, w9, #5 + WORD $0xb941084c // ldr w12, [x2, #264] + WORD $0x4a0b018c // eor w12, w12, w11 + WORD $0xb9410c4d // ldr w13, [x2, #268] + WORD $0x4a0801a8 // eor w8, w13, w8 + WORD $0x0b0c0108 // add w8, w8, w12 + WORD $0x13885d08 // ror w8, w8, #23 + WORD $0xb941304c // ldr w12, [x2, #304] + WORD $0x4a0a018c // eor w12, w12, w10 + WORD $0xb941344d // ldr w13, [x2, #308] + WORD $0x4a0b01ab // eor w11, w13, w11 + WORD $0x0b0c016b // add w11, w11, w12 + WORD $0x138b0d6b // ror w11, w11, #3 + WORD $0xb941284c // ldr w12, [x2, #296] + WORD $0x4a09018c // eor w12, w12, w9 + WORD $0xb9412c4d // ldr w13, [x2, #300] + WORD $0x4a0a01aa // eor w10, w13, w10 + WORD $0x0b0c014a // add w10, w10, w12 + WORD $0x138a154a // ror w10, w10, #5 + WORD $0xb941204c // ldr w12, [x2, #288] + WORD $0x4a08018c // eor w12, w12, w8 + WORD $0xb941244d // ldr w13, [x2, #292] + WORD $0x4a0901a9 // eor w9, w13, w9 + WORD $0x0b0c0129 // add w9, w9, w12 + WORD $0x13895d29 // ror w9, w9, #23 + WORD $0xb941484c // ldr w12, [x2, #328] + WORD $0x4a0b018c // eor w12, w12, w11 + WORD $0xb9414c4d // ldr w13, [x2, #332] + WORD $0x4a0801a8 // eor w8, w13, w8 + WORD $0x0b0c0108 // add w8, w8, w12 + WORD $0x13880d08 // ror w8, w8, #3 + WORD $0xb941404c // ldr w12, [x2, #320] + WORD $0x4a0a018c // eor w12, w12, w10 + WORD $0xb941444d // ldr w13, [x2, #324] + WORD $0x4a0b01ab // eor w11, w13, w11 + WORD $0x0b0c016b // add w11, w11, w12 + WORD $0x138b156b // ror w11, w11, #5 + WORD $0xb941384c // ldr w12, [x2, #312] + WORD $0x4a09018c // eor w12, w12, w9 + WORD $0xb9413c4d // ldr w13, [x2, #316] + WORD $0x4a0a01aa // eor w10, w13, w10 + WORD $0x0b0c014a // add w10, w10, w12 + WORD $0x138a5d4a // ror w10, w10, #23 + WORD $0xb941604c // ldr w12, [x2, #352] + WORD $0x4a08018c // eor w12, w12, w8 + WORD $0xb941644d // ldr w13, [x2, #356] + WORD $0x4a0901a9 // eor w9, w13, w9 + WORD $0x0b0c0129 // add w9, w9, w12 + WORD $0x13890d29 // ror w9, w9, #3 + WORD $0xb941584c // ldr w12, [x2, #344] + WORD $0x4a0b018c // eor w12, w12, w11 + WORD $0xb9415c4d // ldr w13, [x2, #348] + WORD $0x4a0801a8 // eor w8, w13, w8 + WORD $0x0b0c0108 // add w8, w8, w12 + WORD $0x13881508 // ror w8, w8, #5 + WORD $0xb941504c // ldr w12, [x2, #336] + WORD $0x4a0a018c // eor w12, w12, w10 + WORD $0xb941544d // ldr w13, [x2, #340] + WORD $0x4a0b01ab // eor w11, w13, w11 + WORD $0x0b0c016b // add w11, w11, w12 + WORD $0x138b5d6b // ror w11, w11, #23 + WORD $0xb941784c // ldr w12, [x2, #376] + WORD $0x4a09018c // eor w12, w12, w9 + WORD $0xb9417c4d // ldr w13, [x2, #380] + WORD $0x4a0a01aa // eor w10, w13, w10 + WORD $0x0b0c014a // add w10, w10, w12 + WORD $0x138a0d4a // ror w10, w10, #3 + WORD $0xb941704c // ldr w12, [x2, #368] + WORD $0x4a08018c // eor w12, w12, w8 + WORD $0xb941744d // ldr w13, [x2, #372] + WORD $0x4a0901a9 // eor w9, w13, w9 + WORD $0x0b0c0129 // add w9, w9, w12 + WORD $0x13891529 // ror w9, w9, #5 + WORD $0xb941684c // ldr w12, [x2, #360] + WORD $0x4a0b018c // eor w12, w12, w11 + WORD $0xb9416c4d // ldr w13, [x2, #364] + WORD $0x4a0801a8 // eor w8, w13, w8 + WORD $0x0b0c0108 // add w8, w8, w12 + WORD $0x13885d08 // ror w8, w8, #23 + WORD $0xb941904c // ldr w12, [x2, #400] + WORD $0x4a0a018c // eor w12, w12, w10 + WORD $0xb941944d // ldr w13, [x2, #404] + WORD $0x4a0b01ab // eor w11, w13, w11 + WORD $0x0b0c016b // add w11, w11, w12 + WORD $0x138b0d6b // ror w11, w11, #3 + WORD $0xb941884c // ldr w12, [x2, #392] + WORD $0x4a09018c // eor w12, w12, w9 + WORD $0xb9418c4d // ldr w13, [x2, #396] + WORD $0x4a0a01aa // eor w10, w13, w10 + WORD $0x0b0c014a // add w10, w10, w12 + WORD $0x138a154a // ror w10, w10, #5 + WORD $0xb941804c // ldr w12, [x2, #384] + WORD $0x4a08018c // eor w12, w12, w8 + WORD $0xb941844d // ldr w13, [x2, #388] + WORD $0x4a0901a9 // eor w9, w13, w9 + WORD $0x0b0c0129 // add w9, w9, w12 + WORD $0x13895d29 // ror w9, w9, #23 + WORD $0xb941a84c // ldr w12, [x2, #424] + WORD $0x4a0b018c // eor w12, w12, w11 + WORD $0xb941ac4d // ldr w13, [x2, #428] + WORD $0x4a0801a8 // eor w8, w13, w8 + WORD $0x0b0c0108 // add w8, w8, w12 + WORD $0x13880d08 // ror w8, w8, #3 + WORD $0xb941a04c // ldr w12, [x2, #416] + WORD $0x4a0a018c // eor w12, w12, w10 + WORD $0xb941a44d // ldr w13, [x2, #420] + WORD $0x4a0b01ab // eor w11, w13, w11 + WORD $0x0b0c016b // add w11, w11, w12 + WORD $0x138b156b // ror w11, w11, #5 + WORD $0xb941984c // ldr w12, [x2, #408] + WORD $0x4a09018c // eor w12, w12, w9 + WORD $0xb9419c4d // ldr w13, [x2, #412] + WORD $0x4a0a01aa // eor w10, w13, w10 + WORD $0x0b0c014a // add w10, w10, w12 + WORD $0x138a5d4a // ror w10, w10, #23 + WORD $0xb941c04c // ldr w12, [x2, #448] + WORD $0x4a08018c // eor w12, w12, w8 + WORD $0xb941c44d // ldr w13, [x2, #452] + WORD $0x4a0901a9 // eor w9, w13, w9 + WORD $0x0b0c0129 // add w9, w9, w12 + WORD $0x13890d29 // ror w9, w9, #3 + WORD $0xb941b84c // ldr w12, [x2, #440] + WORD $0x4a0b018c // eor w12, w12, w11 + WORD $0xb941bc4d // ldr w13, [x2, #444] + WORD $0x4a0801a8 // eor w8, w13, w8 + WORD $0x0b0c0108 // add w8, w8, w12 + WORD $0x13881508 // ror w8, w8, #5 + WORD $0xb941b04c // ldr w12, [x2, #432] + WORD $0x4a0a018c // eor w12, w12, w10 + WORD $0xb941b44d // ldr w13, [x2, #436] + WORD $0x4a0b01ab // eor w11, w13, w11 + WORD $0x0b0c016b // add w11, w11, w12 + WORD $0x138b5d6b // ror w11, w11, #23 + WORD $0xb941d84c // ldr w12, [x2, #472] + WORD $0x4a09018c // eor w12, w12, w9 + WORD $0xb941dc4d // ldr w13, [x2, #476] + WORD $0x4a0a01aa // eor w10, w13, w10 + WORD $0x0b0c014a // add w10, w10, w12 + WORD $0x138a0d4a // ror w10, w10, #3 + WORD $0xb941d04c // ldr w12, [x2, #464] + WORD $0x4a08018c // eor w12, w12, w8 + WORD $0xb941d44d // ldr w13, [x2, #468] + WORD $0x4a0901a9 // eor w9, w13, w9 + WORD $0x0b0c0129 // add w9, w9, w12 + WORD $0x13891529 // ror w9, w9, #5 + WORD $0xb941c84c // ldr w12, [x2, #456] + WORD $0x4a0b018c // eor w12, w12, w11 + WORD $0xb941cc4d // ldr w13, [x2, #460] + WORD $0x4a0801a8 // eor w8, w13, w8 + WORD $0x0b0c0108 // add w8, w8, w12 + WORD $0x13885d08 // ror w8, w8, #23 + WORD $0xb941f04c // ldr w12, [x2, #496] + WORD $0x4a0a018c // eor w12, w12, w10 + WORD $0xb941f44d // ldr w13, [x2, #500] + WORD $0x4a0b01ab // eor w11, w13, w11 + WORD $0x0b0c016b // add w11, w11, w12 + WORD $0x138b0d6b // ror w11, w11, #3 + WORD $0xb941e84c // ldr w12, [x2, #488] + WORD $0x4a09018c // eor w12, w12, w9 + WORD $0xb941ec4d // ldr w13, [x2, #492] + WORD $0x4a0a01aa // eor w10, w13, w10 + WORD $0x0b0c014a // add w10, w10, w12 + WORD $0x138a154a // ror w10, w10, #5 + WORD $0xb941e04c // ldr w12, [x2, #480] + WORD $0x4a08018c // eor w12, w12, w8 + WORD $0xb941e44d // ldr w13, [x2, #484] + WORD $0x4a0901a9 // eor w9, w13, w9 + WORD $0x0b0c0129 // add w9, w9, w12 + WORD $0x13895d29 // ror w9, w9, #23 + WORD $0xb942084c // ldr w12, [x2, #520] + WORD $0x4a0b018c // eor w12, w12, w11 + WORD $0xb9420c4d // ldr w13, [x2, #524] + WORD $0x4a0801a8 // eor w8, w13, w8 + WORD $0x0b0c0108 // add w8, w8, w12 + WORD $0x13880d08 // ror w8, w8, #3 + WORD $0xb942004c // ldr w12, [x2, #512] + WORD $0x4a0a018c // eor w12, w12, w10 + WORD $0xb942044d // ldr w13, [x2, #516] + WORD $0x4a0b01ab // eor w11, w13, w11 + WORD $0x0b0c016b // add w11, w11, w12 + WORD $0x138b156b // ror w11, w11, #5 + WORD $0xb941f84c // ldr w12, [x2, #504] + WORD $0x4a09018c // eor w12, w12, w9 + WORD $0xb941fc4d // ldr w13, [x2, #508] + WORD $0x4a0a01aa // eor w10, w13, w10 + WORD $0x0b0c014a // add w10, w10, w12 + WORD $0x138a5d4a // ror w10, w10, #23 + WORD $0xb942204c // ldr w12, [x2, #544] + WORD $0x4a08018c // eor w12, w12, w8 + WORD $0xb942244d // ldr w13, [x2, #548] + WORD $0x4a0901a9 // eor w9, w13, w9 + WORD $0x0b0c0129 // add w9, w9, w12 + WORD $0x13890d2c // ror w12, w9, #3 + WORD $0xb9421849 // ldr w9, [x2, #536] + WORD $0x4a0b0129 // eor w9, w9, w11 + WORD $0xb9421c4d // ldr w13, [x2, #540] + WORD $0x4a0801a8 // eor w8, w13, w8 + WORD $0x0b090108 // add w8, w8, w9 + WORD $0x1388150d // ror w13, w8, #5 + WORD $0xb9421048 // ldr w8, [x2, #528] + WORD $0x4a0a0108 // eor w8, w8, w10 + WORD $0xb9421449 // ldr w9, [x2, #532] + WORD $0x4a0b0129 // eor w9, w9, w11 + WORD $0x0b080128 // add w8, w9, w8 + WORD $0x13885d08 // ror w8, w8, #23 + WORD $0xb9423849 // ldr w9, [x2, #568] + WORD $0x4a0c0129 // eor w9, w9, w12 + WORD $0xb9423c4b // ldr w11, [x2, #572] + WORD $0x4a0a016a // eor w10, w11, w10 + WORD $0x0b090149 // add w9, w10, w9 + WORD $0x13890d29 // ror w9, w9, #3 + WORD $0xb942304a // ldr w10, [x2, #560] + WORD $0x4a0d014a // eor w10, w10, w13 + WORD $0xb942344b // ldr w11, [x2, #564] + WORD $0x4a0c016b // eor w11, w11, w12 + WORD $0x0b0a016a // add w10, w11, w10 + WORD $0x138a154a // ror w10, w10, #5 + WORD $0xb942284b // ldr w11, [x2, #552] + WORD $0x4a08016b // eor w11, w11, w8 + WORD $0xb9422c4c // ldr w12, [x2, #556] + WORD $0x4a0d018c // eor w12, w12, w13 + WORD $0x0b0b018b // add w11, w12, w11 + WORD $0x138b5d6b // ror w11, w11, #23 + WORD $0xf100647f // cmp x3, #25 + WORD $0x54001263 // b.lo LBB1_3 + WORD $0xb942504c // ldr w12, [x2, #592] + WORD $0x4a09018c // eor w12, w12, w9 + WORD $0xb942544d // ldr w13, [x2, #596] + WORD $0x4a0801a8 // eor w8, w13, w8 + WORD $0x0b0c0108 // add w8, w8, w12 + WORD $0x13880d08 // ror w8, w8, #3 + WORD $0xb942484c // ldr w12, [x2, #584] + WORD $0x4a0a018c // eor w12, w12, w10 + WORD $0xb9424c4d // ldr w13, [x2, #588] + WORD $0x4a0901a9 // eor w9, w13, w9 + WORD $0x0b0c0129 // add w9, w9, w12 + WORD $0x13891529 // ror w9, w9, #5 + WORD $0xb942404c // ldr w12, [x2, #576] + WORD $0x4a0b018c // eor w12, w12, w11 + WORD $0xb942444d // ldr w13, [x2, #580] + WORD $0x4a0a01aa // eor w10, w13, w10 + WORD $0x0b0c014a // add w10, w10, w12 + WORD $0x138a5d4a // ror w10, w10, #23 + WORD $0xb942684c // ldr w12, [x2, #616] + WORD $0x4a08018c // eor w12, w12, w8 + WORD $0xb9426c4d // ldr w13, [x2, #620] + WORD $0x4a0b01ab // eor w11, w13, w11 + WORD $0x0b0c016b // add w11, w11, w12 + WORD $0x138b0d6b // ror w11, w11, #3 + WORD $0xb942604c // ldr w12, [x2, #608] + WORD $0x4a09018c // eor w12, w12, w9 + WORD $0xb942644d // ldr w13, [x2, #612] + WORD $0x4a0801a8 // eor w8, w13, w8 + WORD $0x0b0c0108 // add w8, w8, w12 + WORD $0x13881508 // ror w8, w8, #5 + WORD $0xb942584c // ldr w12, [x2, #600] + WORD $0x4a0a018c // eor w12, w12, w10 + WORD $0xb9425c4d // ldr w13, [x2, #604] + WORD $0x4a0901a9 // eor w9, w13, w9 + WORD $0x0b0c0129 // add w9, w9, w12 + WORD $0x13895d29 // ror w9, w9, #23 + WORD $0xb942804c // ldr w12, [x2, #640] + WORD $0x4a0b018c // eor w12, w12, w11 + WORD $0xb942844d // ldr w13, [x2, #644] + WORD $0x4a0a01aa // eor w10, w13, w10 + WORD $0x0b0c014a // add w10, w10, w12 + WORD $0x138a0d4a // ror w10, w10, #3 + WORD $0xb942784c // ldr w12, [x2, #632] + WORD $0x4a08018c // eor w12, w12, w8 + WORD $0xb9427c4d // ldr w13, [x2, #636] + WORD $0x4a0b01ab // eor w11, w13, w11 + WORD $0x0b0c016b // add w11, w11, w12 + WORD $0x138b156b // ror w11, w11, #5 + WORD $0xb942704c // ldr w12, [x2, #624] + WORD $0x4a09018c // eor w12, w12, w9 + WORD $0xb942744d // ldr w13, [x2, #628] + WORD $0x4a0801a8 // eor w8, w13, w8 + WORD $0x0b0c0108 // add w8, w8, w12 + WORD $0x13885d08 // ror w8, w8, #23 + WORD $0xb942984c // ldr w12, [x2, #664] + WORD $0x4a0a018c // eor w12, w12, w10 + WORD $0xb9429c4d // ldr w13, [x2, #668] + WORD $0x4a0901a9 // eor w9, w13, w9 + WORD $0x0b0c0129 // add w9, w9, w12 + WORD $0x13890d29 // ror w9, w9, #3 + WORD $0xb942904c // ldr w12, [x2, #656] + WORD $0x4a0b018c // eor w12, w12, w11 + WORD $0xb942944d // ldr w13, [x2, #660] + WORD $0x4a0a01aa // eor w10, w13, w10 + WORD $0x0b0c014a // add w10, w10, w12 + WORD $0x138a154a // ror w10, w10, #5 + WORD $0xb942884c // ldr w12, [x2, #648] + WORD $0x4a08018c // eor w12, w12, w8 + WORD $0xb9428c4d // ldr w13, [x2, #652] + WORD $0x4a0b01ab // eor w11, w13, w11 + WORD $0x0b0c016b // add w11, w11, w12 + WORD $0x138b5d6b // ror w11, w11, #23 + WORD $0xf100747f // cmp x3, #29 + WORD $0x54000923 // b.lo LBB1_3 + WORD $0xb942b04c // ldr w12, [x2, #688] + WORD $0x4a09018c // eor w12, w12, w9 + WORD $0xb942b44d // ldr w13, [x2, #692] + WORD $0x4a0801a8 // eor w8, w13, w8 + WORD $0x0b0c0108 // add w8, w8, w12 + WORD $0x13880d08 // ror w8, w8, #3 + WORD $0xb942a84c // ldr w12, [x2, #680] + WORD $0x4a0a018c // eor w12, w12, w10 + WORD $0xb942ac4d // ldr w13, [x2, #684] + WORD $0x4a0901a9 // eor w9, w13, w9 + WORD $0x0b0c0129 // add w9, w9, w12 + WORD $0x13891529 // ror w9, w9, #5 + WORD $0xb942a04c // ldr w12, [x2, #672] + WORD $0x4a0b018c // eor w12, w12, w11 + WORD $0xb942a44d // ldr w13, [x2, #676] + WORD $0x4a0a01aa // eor w10, w13, w10 + WORD $0x0b0c014a // add w10, w10, w12 + WORD $0x138a5d4a // ror w10, w10, #23 + WORD $0xb942c84c // ldr w12, [x2, #712] + WORD $0x4a08018c // eor w12, w12, w8 + WORD $0xb942cc4d // ldr w13, [x2, #716] + WORD $0x4a0b01ab // eor w11, w13, w11 + WORD $0x0b0c016b // add w11, w11, w12 + WORD $0x138b0d6b // ror w11, w11, #3 + WORD $0xb942c04c // ldr w12, [x2, #704] + WORD $0x4a09018c // eor w12, w12, w9 + WORD $0xb942c44d // ldr w13, [x2, #708] + WORD $0x4a0801a8 // eor w8, w13, w8 + WORD $0x0b0c0108 // add w8, w8, w12 + WORD $0x13881508 // ror w8, w8, #5 + WORD $0xb942b84c // ldr w12, [x2, #696] + WORD $0x4a0a018c // eor w12, w12, w10 + WORD $0xb942bc4d // ldr w13, [x2, #700] + WORD $0x4a0901a9 // eor w9, w13, w9 + WORD $0x0b0c0129 // add w9, w9, w12 + WORD $0x13895d29 // ror w9, w9, #23 + WORD $0xb942e04c // ldr w12, [x2, #736] + WORD $0x4a0b018c // eor w12, w12, w11 + WORD $0xb942e44d // ldr w13, [x2, #740] + WORD $0x4a0a01aa // eor w10, w13, w10 + WORD $0x0b0c014a // add w10, w10, w12 + WORD $0x138a0d4a // ror w10, w10, #3 + WORD $0xb942d84c // ldr w12, [x2, #728] + WORD $0x4a08018c // eor w12, w12, w8 + WORD $0xb942dc4d // ldr w13, [x2, #732] + WORD $0x4a0b01ab // eor w11, w13, w11 + WORD $0x0b0c016b // add w11, w11, w12 + WORD $0x138b156b // ror w11, w11, #5 + WORD $0xb942d04c // ldr w12, [x2, #720] + WORD $0x4a09018c // eor w12, w12, w9 + WORD $0xb942d44d // ldr w13, [x2, #724] + WORD $0x4a0801a8 // eor w8, w13, w8 + WORD $0x0b0c0108 // add w8, w8, w12 + WORD $0x13885d08 // ror w8, w8, #23 + WORD $0xb942f84c // ldr w12, [x2, #760] + WORD $0x4a0a018c // eor w12, w12, w10 + WORD $0xb942fc4d // ldr w13, [x2, #764] + WORD $0x4a0901a9 // eor w9, w13, w9 + WORD $0x0b0c0129 // add w9, w9, w12 + WORD $0x13890d29 // ror w9, w9, #3 + WORD $0xb942f04c // ldr w12, [x2, #752] + WORD $0x4a0b018c // eor w12, w12, w11 + WORD $0xb942f44d // ldr w13, [x2, #756] + WORD $0x4a0a01aa // eor w10, w13, w10 + WORD $0x0b0c014a // add w10, w10, w12 + WORD $0x138a154a // ror w10, w10, #5 + WORD $0xb942e84c // ldr w12, [x2, #744] + WORD $0x4a08018c // eor w12, w12, w8 + WORD $0xb942ec4d // ldr w13, [x2, #748] + WORD $0x4a0b01ab // eor w11, w13, w11 + WORD $0x0b0c016b // add w11, w11, w12 + WORD $0x138b5d6b // ror w11, w11, #23 + WORD $0x2900280b // stp w11, w10, [x0] + WORD $0x29012009 // stp w9, w8, [x0, #8] + WORD $0xa8c17bfd // ldp x29, x30, [sp], #16 ; 16-byte Folded Reload + WORD $0xd65f03c0 // ret + +TEXT ·lea_decrypt(SB), $0-32 + MOVD pt+0(FP), R0 + MOVD ct+8(FP), R1 + MOVD rk+16(FP), R2 + MOVD round+24(FP), R3 + WORD $0xa9bf7bfd // stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill + WORD $0x910003fd // mov x29, sp + WORD $0x2940242b // ldp w11, w9, [x1] + WORD $0x2941202a // ldp w10, w8, [x1, #8] + WORD $0xf100747f // cmp x3, #29 + WORD $0x54000943 // b.lo LBB2_2 + WORD $0x138b256b // ror w11, w11, #9 + WORD $0xb942e84c // ldr w12, [x2, #744] + WORD $0x4a08018c // eor w12, w12, w8 + WORD $0xb942ec4d // ldr w13, [x2, #748] + WORD $0x4b0c016b // sub w11, w11, w12 + WORD $0x4a0d016b // eor w11, w11, w13 + WORD $0x13896d29 // ror w9, w9, #27 + WORD $0xb942f04c // ldr w12, [x2, #752] + WORD $0x4a0c016c // eor w12, w11, w12 + WORD $0xb942f44d // ldr w13, [x2, #756] + WORD $0x4b0c0129 // sub w9, w9, w12 + WORD $0x4a0d0129 // eor w9, w9, w13 + WORD $0x138a754a // ror w10, w10, #29 + WORD $0xb942f84c // ldr w12, [x2, #760] + WORD $0x4a0c012c // eor w12, w9, w12 + WORD $0xb942fc4d // ldr w13, [x2, #764] + WORD $0x4b0c014a // sub w10, w10, w12 + WORD $0x4a0d014a // eor w10, w10, w13 + WORD $0x13882508 // ror w8, w8, #9 + WORD $0xb942d04c // ldr w12, [x2, #720] + WORD $0x4a0c014c // eor w12, w10, w12 + WORD $0xb942d44d // ldr w13, [x2, #724] + WORD $0x4b0c0108 // sub w8, w8, w12 + WORD $0x4a0d0108 // eor w8, w8, w13 + WORD $0x138b6d6b // ror w11, w11, #27 + WORD $0xb942d84c // ldr w12, [x2, #728] + WORD $0x4a0c010c // eor w12, w8, w12 + WORD $0xb942dc4d // ldr w13, [x2, #732] + WORD $0x13897529 // ror w9, w9, #29 + WORD $0x4b0c016b // sub w11, w11, w12 + WORD $0x4a0d016b // eor w11, w11, w13 + WORD $0xb942e04c // ldr w12, [x2, #736] + WORD $0x4a0c016c // eor w12, w11, w12 + WORD $0xb942e44d // ldr w13, [x2, #740] + WORD $0x4b0c0129 // sub w9, w9, w12 + WORD $0x4a0d0129 // eor w9, w9, w13 + WORD $0x138a254a // ror w10, w10, #9 + WORD $0xb942b84c // ldr w12, [x2, #696] + WORD $0x4a0c012c // eor w12, w9, w12 + WORD $0xb942bc4d // ldr w13, [x2, #700] + WORD $0x4b0c014a // sub w10, w10, w12 + WORD $0x4a0d014a // eor w10, w10, w13 + WORD $0x13886d08 // ror w8, w8, #27 + WORD $0xb942c04c // ldr w12, [x2, #704] + WORD $0x4a0c014c // eor w12, w10, w12 + WORD $0xb942c44d // ldr w13, [x2, #708] + WORD $0x4b0c0108 // sub w8, w8, w12 + WORD $0x4a0d0108 // eor w8, w8, w13 + WORD $0x138b756b // ror w11, w11, #29 + WORD $0xb942c84c // ldr w12, [x2, #712] + WORD $0x4a0c010c // eor w12, w8, w12 + WORD $0xb942cc4d // ldr w13, [x2, #716] + WORD $0x4b0c016b // sub w11, w11, w12 + WORD $0x4a0d016b // eor w11, w11, w13 + WORD $0x13892529 // ror w9, w9, #9 + WORD $0xb942a04c // ldr w12, [x2, #672] + WORD $0x4a0c016c // eor w12, w11, w12 + WORD $0xb942a44d // ldr w13, [x2, #676] + WORD $0x4b0c0129 // sub w9, w9, w12 + WORD $0x4a0d0129 // eor w9, w9, w13 + WORD $0x138a6d4a // ror w10, w10, #27 + WORD $0xb942a84c // ldr w12, [x2, #680] + WORD $0x4a0c012c // eor w12, w9, w12 + WORD $0xb942ac4d // ldr w13, [x2, #684] + WORD $0x13887508 // ror w8, w8, #29 + WORD $0x4b0c014a // sub w10, w10, w12 + WORD $0x4a0d014a // eor w10, w10, w13 + WORD $0xb942b04c // ldr w12, [x2, #688] + WORD $0x4a0c014c // eor w12, w10, w12 + WORD $0xb942b44d // ldr w13, [x2, #692] + WORD $0x4b0c0108 // sub w8, w8, w12 + WORD $0x4a0d0108 // eor w8, w8, w13 + WORD $0x14000003 // b LBB2_3 + WORD $0xf100647f // cmp x3, #25 + WORD $0x54000923 // b.lo LBB2_4 + WORD $0x138b256b // ror w11, w11, #9 + WORD $0xb942884c // ldr w12, [x2, #648] + WORD $0x4a08018c // eor w12, w12, w8 + WORD $0xb9428c4d // ldr w13, [x2, #652] + WORD $0x4b0c016b // sub w11, w11, w12 + WORD $0x4a0d016b // eor w11, w11, w13 + WORD $0x13896d29 // ror w9, w9, #27 + WORD $0xb942904c // ldr w12, [x2, #656] + WORD $0x4a0c016c // eor w12, w11, w12 + WORD $0xb942944d // ldr w13, [x2, #660] + WORD $0x4b0c0129 // sub w9, w9, w12 + WORD $0x4a0d0129 // eor w9, w9, w13 + WORD $0x138a754a // ror w10, w10, #29 + WORD $0xb942984c // ldr w12, [x2, #664] + WORD $0x4a0c012c // eor w12, w9, w12 + WORD $0xb9429c4d // ldr w13, [x2, #668] + WORD $0x4b0c014a // sub w10, w10, w12 + WORD $0x4a0d014a // eor w10, w10, w13 + WORD $0x13882508 // ror w8, w8, #9 + WORD $0xb942704c // ldr w12, [x2, #624] + WORD $0x4a0c014c // eor w12, w10, w12 + WORD $0xb942744d // ldr w13, [x2, #628] + WORD $0x4b0c0108 // sub w8, w8, w12 + WORD $0x4a0d0108 // eor w8, w8, w13 + WORD $0x138b6d6b // ror w11, w11, #27 + WORD $0xb942784c // ldr w12, [x2, #632] + WORD $0x4a0c010c // eor w12, w8, w12 + WORD $0xb9427c4d // ldr w13, [x2, #636] + WORD $0x13897529 // ror w9, w9, #29 + WORD $0x4b0c016b // sub w11, w11, w12 + WORD $0x4a0d016b // eor w11, w11, w13 + WORD $0xb942804c // ldr w12, [x2, #640] + WORD $0x4a0c016c // eor w12, w11, w12 + WORD $0xb942844d // ldr w13, [x2, #644] + WORD $0x4b0c0129 // sub w9, w9, w12 + WORD $0x4a0d0129 // eor w9, w9, w13 + WORD $0x138a254a // ror w10, w10, #9 + WORD $0xb942584c // ldr w12, [x2, #600] + WORD $0x4a0c012c // eor w12, w9, w12 + WORD $0xb9425c4d // ldr w13, [x2, #604] + WORD $0x4b0c014a // sub w10, w10, w12 + WORD $0x4a0d014a // eor w10, w10, w13 + WORD $0x13886d08 // ror w8, w8, #27 + WORD $0xb942604c // ldr w12, [x2, #608] + WORD $0x4a0c014c // eor w12, w10, w12 + WORD $0xb942644d // ldr w13, [x2, #612] + WORD $0x4b0c0108 // sub w8, w8, w12 + WORD $0x4a0d0108 // eor w8, w8, w13 + WORD $0x138b756b // ror w11, w11, #29 + WORD $0xb942684c // ldr w12, [x2, #616] + WORD $0x4a0c010c // eor w12, w8, w12 + WORD $0xb9426c4d // ldr w13, [x2, #620] + WORD $0x4b0c016b // sub w11, w11, w12 + WORD $0x4a0d016b // eor w11, w11, w13 + WORD $0x13892529 // ror w9, w9, #9 + WORD $0xb942404c // ldr w12, [x2, #576] + WORD $0x4a0c016c // eor w12, w11, w12 + WORD $0xb942444d // ldr w13, [x2, #580] + WORD $0x4b0c0129 // sub w9, w9, w12 + WORD $0x4a0d0129 // eor w9, w9, w13 + WORD $0x138a6d4a // ror w10, w10, #27 + WORD $0xb942484c // ldr w12, [x2, #584] + WORD $0x4a0c012c // eor w12, w9, w12 + WORD $0xb9424c4d // ldr w13, [x2, #588] + WORD $0x13887508 // ror w8, w8, #29 + WORD $0x4b0c014a // sub w10, w10, w12 + WORD $0x4a0d014a // eor w10, w10, w13 + WORD $0xb942504c // ldr w12, [x2, #592] + WORD $0x4a0c014c // eor w12, w10, w12 + WORD $0xb942544d // ldr w13, [x2, #596] + WORD $0x4b0c0108 // sub w8, w8, w12 + WORD $0x4a0d0108 // eor w8, w8, w13 + WORD $0x138b256b // ror w11, w11, #9 + WORD $0xb942284c // ldr w12, [x2, #552] + WORD $0x4a08018c // eor w12, w12, w8 + WORD $0xb9422c4d // ldr w13, [x2, #556] + WORD $0x4b0c016b // sub w11, w11, w12 + WORD $0x4a0d016b // eor w11, w11, w13 + WORD $0x13896d29 // ror w9, w9, #27 + WORD $0xb942304c // ldr w12, [x2, #560] + WORD $0x4a0c016c // eor w12, w11, w12 + WORD $0xb942344d // ldr w13, [x2, #564] + WORD $0x4b0c0129 // sub w9, w9, w12 + WORD $0x4a0d0129 // eor w9, w9, w13 + WORD $0x138a754a // ror w10, w10, #29 + WORD $0xb942384c // ldr w12, [x2, #568] + WORD $0x4a0c012c // eor w12, w9, w12 + WORD $0xb9423c4d // ldr w13, [x2, #572] + WORD $0x13882508 // ror w8, w8, #9 + WORD $0x4b0c014a // sub w10, w10, w12 + WORD $0x4a0d014a // eor w10, w10, w13 + WORD $0xb942104c // ldr w12, [x2, #528] + WORD $0x4a0c014c // eor w12, w10, w12 + WORD $0xb942144d // ldr w13, [x2, #532] + WORD $0x4b0c0108 // sub w8, w8, w12 + WORD $0x4a0d0108 // eor w8, w8, w13 + WORD $0x138b6d6b // ror w11, w11, #27 + WORD $0xb942184c // ldr w12, [x2, #536] + WORD $0x4a0c010c // eor w12, w8, w12 + WORD $0xb9421c4d // ldr w13, [x2, #540] + WORD $0x4b0c016b // sub w11, w11, w12 + WORD $0x4a0d016b // eor w11, w11, w13 + WORD $0x13897529 // ror w9, w9, #29 + WORD $0xb942204c // ldr w12, [x2, #544] + WORD $0x4a0c016c // eor w12, w11, w12 + WORD $0xb942244d // ldr w13, [x2, #548] + WORD $0x4b0c0129 // sub w9, w9, w12 + WORD $0x4a0d0129 // eor w9, w9, w13 + WORD $0x138a254a // ror w10, w10, #9 + WORD $0xb941f84c // ldr w12, [x2, #504] + WORD $0x4a0c012c // eor w12, w9, w12 + WORD $0xb941fc4d // ldr w13, [x2, #508] + WORD $0x4b0c014a // sub w10, w10, w12 + WORD $0x4a0d014a // eor w10, w10, w13 + WORD $0x13886d08 // ror w8, w8, #27 + WORD $0xb942004c // ldr w12, [x2, #512] + WORD $0x4a0c014c // eor w12, w10, w12 + WORD $0xb942044d // ldr w13, [x2, #516] + WORD $0x4b0c0108 // sub w8, w8, w12 + WORD $0x4a0d0108 // eor w8, w8, w13 + WORD $0x138b756b // ror w11, w11, #29 + WORD $0xb942084c // ldr w12, [x2, #520] + WORD $0x4a0c010c // eor w12, w8, w12 + WORD $0xb9420c4d // ldr w13, [x2, #524] + WORD $0x13892529 // ror w9, w9, #9 + WORD $0x4b0c016b // sub w11, w11, w12 + WORD $0x4a0d016b // eor w11, w11, w13 + WORD $0xb941e04c // ldr w12, [x2, #480] + WORD $0x4a0c016c // eor w12, w11, w12 + WORD $0xb941e44d // ldr w13, [x2, #484] + WORD $0x4b0c0129 // sub w9, w9, w12 + WORD $0x4a0d0129 // eor w9, w9, w13 + WORD $0x138a6d4a // ror w10, w10, #27 + WORD $0xb941e84c // ldr w12, [x2, #488] + WORD $0x4a0c012c // eor w12, w9, w12 + WORD $0xb941ec4d // ldr w13, [x2, #492] + WORD $0x4b0c014a // sub w10, w10, w12 + WORD $0x4a0d014a // eor w10, w10, w13 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb941f04c // ldr w12, [x2, #496] + WORD $0x4a0c014c // eor w12, w10, w12 + WORD $0xb941f44d // ldr w13, [x2, #500] + WORD $0x4b0c0108 // sub w8, w8, w12 + WORD $0x4a0d0108 // eor w8, w8, w13 + WORD $0x138b256b // ror w11, w11, #9 + WORD $0xb941c84c // ldr w12, [x2, #456] + WORD $0x4a0c010c // eor w12, w8, w12 + WORD $0xb941cc4d // ldr w13, [x2, #460] + WORD $0x4b0c016b // sub w11, w11, w12 + WORD $0x4a0d016b // eor w11, w11, w13 + WORD $0x13896d29 // ror w9, w9, #27 + WORD $0xb941d04c // ldr w12, [x2, #464] + WORD $0x4a0c016c // eor w12, w11, w12 + WORD $0xb941d44d // ldr w13, [x2, #468] + WORD $0x4b0c0129 // sub w9, w9, w12 + WORD $0x4a0d0129 // eor w9, w9, w13 + WORD $0x138a754a // ror w10, w10, #29 + WORD $0xb941d84c // ldr w12, [x2, #472] + WORD $0x4a0c012c // eor w12, w9, w12 + WORD $0xb941dc4d // ldr w13, [x2, #476] + WORD $0x13882508 // ror w8, w8, #9 + WORD $0x4b0c014a // sub w10, w10, w12 + WORD $0x4a0d014a // eor w10, w10, w13 + WORD $0xb941b04c // ldr w12, [x2, #432] + WORD $0x4a0c014c // eor w12, w10, w12 + WORD $0xb941b44d // ldr w13, [x2, #436] + WORD $0x4b0c0108 // sub w8, w8, w12 + WORD $0x4a0d0108 // eor w8, w8, w13 + WORD $0x138b6d6b // ror w11, w11, #27 + WORD $0xb941b84c // ldr w12, [x2, #440] + WORD $0x4a0c010c // eor w12, w8, w12 + WORD $0xb941bc4d // ldr w13, [x2, #444] + WORD $0x4b0c016b // sub w11, w11, w12 + WORD $0x4a0d016b // eor w11, w11, w13 + WORD $0x13897529 // ror w9, w9, #29 + WORD $0xb941c04c // ldr w12, [x2, #448] + WORD $0x4a0c016c // eor w12, w11, w12 + WORD $0xb941c44d // ldr w13, [x2, #452] + WORD $0x4b0c0129 // sub w9, w9, w12 + WORD $0x4a0d0129 // eor w9, w9, w13 + WORD $0x138a254a // ror w10, w10, #9 + WORD $0xb941984c // ldr w12, [x2, #408] + WORD $0x4a0c012c // eor w12, w9, w12 + WORD $0xb9419c4d // ldr w13, [x2, #412] + WORD $0x4b0c014a // sub w10, w10, w12 + WORD $0x4a0d014a // eor w10, w10, w13 + WORD $0x13886d08 // ror w8, w8, #27 + WORD $0xb941a04c // ldr w12, [x2, #416] + WORD $0x4a0c014c // eor w12, w10, w12 + WORD $0xb941a44d // ldr w13, [x2, #420] + WORD $0x4b0c0108 // sub w8, w8, w12 + WORD $0x4a0d0108 // eor w8, w8, w13 + WORD $0x138b756b // ror w11, w11, #29 + WORD $0xb941a84c // ldr w12, [x2, #424] + WORD $0x4a0c010c // eor w12, w8, w12 + WORD $0xb941ac4d // ldr w13, [x2, #428] + WORD $0x13892529 // ror w9, w9, #9 + WORD $0x4b0c016b // sub w11, w11, w12 + WORD $0x4a0d016b // eor w11, w11, w13 + WORD $0xb941804c // ldr w12, [x2, #384] + WORD $0x4a0c016c // eor w12, w11, w12 + WORD $0xb941844d // ldr w13, [x2, #388] + WORD $0x4b0c0129 // sub w9, w9, w12 + WORD $0x4a0d0129 // eor w9, w9, w13 + WORD $0x138a6d4a // ror w10, w10, #27 + WORD $0xb941884c // ldr w12, [x2, #392] + WORD $0x4a0c012c // eor w12, w9, w12 + WORD $0xb9418c4d // ldr w13, [x2, #396] + WORD $0x4b0c014a // sub w10, w10, w12 + WORD $0x4a0d014a // eor w10, w10, w13 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb941904c // ldr w12, [x2, #400] + WORD $0x4a0c014c // eor w12, w10, w12 + WORD $0xb941944d // ldr w13, [x2, #404] + WORD $0x4b0c0108 // sub w8, w8, w12 + WORD $0x4a0d0108 // eor w8, w8, w13 + WORD $0x138b256b // ror w11, w11, #9 + WORD $0xb941684c // ldr w12, [x2, #360] + WORD $0x4a0c010c // eor w12, w8, w12 + WORD $0xb9416c4d // ldr w13, [x2, #364] + WORD $0x4b0c016b // sub w11, w11, w12 + WORD $0x4a0d016b // eor w11, w11, w13 + WORD $0x13896d29 // ror w9, w9, #27 + WORD $0xb941704c // ldr w12, [x2, #368] + WORD $0x4a0c016c // eor w12, w11, w12 + WORD $0xb941744d // ldr w13, [x2, #372] + WORD $0x4b0c0129 // sub w9, w9, w12 + WORD $0x4a0d0129 // eor w9, w9, w13 + WORD $0x138a754a // ror w10, w10, #29 + WORD $0xb941784c // ldr w12, [x2, #376] + WORD $0x4a0c012c // eor w12, w9, w12 + WORD $0xb9417c4d // ldr w13, [x2, #380] + WORD $0x13882508 // ror w8, w8, #9 + WORD $0x4b0c014a // sub w10, w10, w12 + WORD $0x4a0d014a // eor w10, w10, w13 + WORD $0xb941504c // ldr w12, [x2, #336] + WORD $0x4a0c014c // eor w12, w10, w12 + WORD $0xb941544d // ldr w13, [x2, #340] + WORD $0x4b0c0108 // sub w8, w8, w12 + WORD $0x4a0d0108 // eor w8, w8, w13 + WORD $0x138b6d6b // ror w11, w11, #27 + WORD $0xb941584c // ldr w12, [x2, #344] + WORD $0x4a0c010c // eor w12, w8, w12 + WORD $0xb9415c4d // ldr w13, [x2, #348] + WORD $0x4b0c016b // sub w11, w11, w12 + WORD $0x4a0d016b // eor w11, w11, w13 + WORD $0x13897529 // ror w9, w9, #29 + WORD $0xb941604c // ldr w12, [x2, #352] + WORD $0x4a0c016c // eor w12, w11, w12 + WORD $0xb941644d // ldr w13, [x2, #356] + WORD $0x4b0c0129 // sub w9, w9, w12 + WORD $0x4a0d0129 // eor w9, w9, w13 + WORD $0x138a254a // ror w10, w10, #9 + WORD $0xb941384c // ldr w12, [x2, #312] + WORD $0x4a0c012c // eor w12, w9, w12 + WORD $0xb9413c4d // ldr w13, [x2, #316] + WORD $0x4b0c014a // sub w10, w10, w12 + WORD $0x4a0d014a // eor w10, w10, w13 + WORD $0x13886d08 // ror w8, w8, #27 + WORD $0xb941404c // ldr w12, [x2, #320] + WORD $0x4a0c014c // eor w12, w10, w12 + WORD $0xb941444d // ldr w13, [x2, #324] + WORD $0x4b0c0108 // sub w8, w8, w12 + WORD $0x4a0d0108 // eor w8, w8, w13 + WORD $0x138b756b // ror w11, w11, #29 + WORD $0xb941484c // ldr w12, [x2, #328] + WORD $0x4a0c010c // eor w12, w8, w12 + WORD $0xb9414c4d // ldr w13, [x2, #332] + WORD $0x13892529 // ror w9, w9, #9 + WORD $0x4b0c016b // sub w11, w11, w12 + WORD $0x4a0d016b // eor w11, w11, w13 + WORD $0xb941204c // ldr w12, [x2, #288] + WORD $0x4a0c016c // eor w12, w11, w12 + WORD $0xb941244d // ldr w13, [x2, #292] + WORD $0x4b0c0129 // sub w9, w9, w12 + WORD $0x4a0d0129 // eor w9, w9, w13 + WORD $0x138a6d4a // ror w10, w10, #27 + WORD $0xb941284c // ldr w12, [x2, #296] + WORD $0x4a0c012c // eor w12, w9, w12 + WORD $0xb9412c4d // ldr w13, [x2, #300] + WORD $0x4b0c014a // sub w10, w10, w12 + WORD $0x4a0d014a // eor w10, w10, w13 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0xb941304c // ldr w12, [x2, #304] + WORD $0x4a0c014c // eor w12, w10, w12 + WORD $0xb941344d // ldr w13, [x2, #308] + WORD $0x4b0c0108 // sub w8, w8, w12 + WORD $0x4a0d0108 // eor w8, w8, w13 + WORD $0x138b256b // ror w11, w11, #9 + WORD $0xb941084c // ldr w12, [x2, #264] + WORD $0x4a0c010c // eor w12, w8, w12 + WORD $0xb9410c4d // ldr w13, [x2, #268] + WORD $0x4b0c016b // sub w11, w11, w12 + WORD $0x4a0d016b // eor w11, w11, w13 + WORD $0x13896d29 // ror w9, w9, #27 + WORD $0xb941104c // ldr w12, [x2, #272] + WORD $0x4a0c016c // eor w12, w11, w12 + WORD $0xb941144d // ldr w13, [x2, #276] + WORD $0x4b0c0129 // sub w9, w9, w12 + WORD $0x4a0d0129 // eor w9, w9, w13 + WORD $0x138a754a // ror w10, w10, #29 + WORD $0xb941184c // ldr w12, [x2, #280] + WORD $0x4a0c012c // eor w12, w9, w12 + WORD $0xb9411c4d // ldr w13, [x2, #284] + WORD $0x13882508 // ror w8, w8, #9 + WORD $0x4b0c014a // sub w10, w10, w12 + WORD $0x4a0d014a // eor w10, w10, w13 + WORD $0x295e344c // ldp w12, w13, [x2, #240] + WORD $0x4a0c014c // eor w12, w10, w12 + WORD $0x4b0c0108 // sub w8, w8, w12 + WORD $0x4a0d0108 // eor w8, w8, w13 + WORD $0x138b6d6b // ror w11, w11, #27 + WORD $0x295f344c // ldp w12, w13, [x2, #248] + WORD $0x4a0c010c // eor w12, w8, w12 + WORD $0x4b0c016b // sub w11, w11, w12 + WORD $0x4a0d016b // eor w11, w11, w13 + WORD $0x13897529 // ror w9, w9, #29 + WORD $0xb941004c // ldr w12, [x2, #256] + WORD $0x4a0c016c // eor w12, w11, w12 + WORD $0xb941044d // ldr w13, [x2, #260] + WORD $0x4b0c0129 // sub w9, w9, w12 + WORD $0x4a0d0129 // eor w9, w9, w13 + WORD $0x138a254a // ror w10, w10, #9 + WORD $0x295b344c // ldp w12, w13, [x2, #216] + WORD $0x4a0c012c // eor w12, w9, w12 + WORD $0x4b0c014a // sub w10, w10, w12 + WORD $0x4a0d014a // eor w10, w10, w13 + WORD $0x13886d08 // ror w8, w8, #27 + WORD $0x295c344c // ldp w12, w13, [x2, #224] + WORD $0x4a0c014c // eor w12, w10, w12 + WORD $0x4b0c0108 // sub w8, w8, w12 + WORD $0x4a0d0108 // eor w8, w8, w13 + WORD $0x138b756b // ror w11, w11, #29 + WORD $0x295d344c // ldp w12, w13, [x2, #232] + WORD $0x4a0c010c // eor w12, w8, w12 + WORD $0x13892529 // ror w9, w9, #9 + WORD $0x4b0c016b // sub w11, w11, w12 + WORD $0x4a0d016b // eor w11, w11, w13 + WORD $0x2958344c // ldp w12, w13, [x2, #192] + WORD $0x4a0c016c // eor w12, w11, w12 + WORD $0x4b0c0129 // sub w9, w9, w12 + WORD $0x4a0d0129 // eor w9, w9, w13 + WORD $0x138a6d4a // ror w10, w10, #27 + WORD $0x2959344c // ldp w12, w13, [x2, #200] + WORD $0x4a0c012c // eor w12, w9, w12 + WORD $0x4b0c014a // sub w10, w10, w12 + WORD $0x4a0d014a // eor w10, w10, w13 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0x295a344c // ldp w12, w13, [x2, #208] + WORD $0x4a0c014c // eor w12, w10, w12 + WORD $0x4b0c0108 // sub w8, w8, w12 + WORD $0x4a0d0108 // eor w8, w8, w13 + WORD $0x138b256b // ror w11, w11, #9 + WORD $0x2955344c // ldp w12, w13, [x2, #168] + WORD $0x4a0c010c // eor w12, w8, w12 + WORD $0x4b0c016b // sub w11, w11, w12 + WORD $0x4a0d016b // eor w11, w11, w13 + WORD $0x13896d29 // ror w9, w9, #27 + WORD $0x2956344c // ldp w12, w13, [x2, #176] + WORD $0x4a0c016c // eor w12, w11, w12 + WORD $0x4b0c0129 // sub w9, w9, w12 + WORD $0x4a0d0129 // eor w9, w9, w13 + WORD $0x138a754a // ror w10, w10, #29 + WORD $0x2957344c // ldp w12, w13, [x2, #184] + WORD $0x4a0c012c // eor w12, w9, w12 + WORD $0x13882508 // ror w8, w8, #9 + WORD $0x4b0c014a // sub w10, w10, w12 + WORD $0x4a0d014a // eor w10, w10, w13 + WORD $0x2952344c // ldp w12, w13, [x2, #144] + WORD $0x4a0c014c // eor w12, w10, w12 + WORD $0x4b0c0108 // sub w8, w8, w12 + WORD $0x4a0d0108 // eor w8, w8, w13 + WORD $0x138b6d6b // ror w11, w11, #27 + WORD $0x2953344c // ldp w12, w13, [x2, #152] + WORD $0x4a0c010c // eor w12, w8, w12 + WORD $0x4b0c016b // sub w11, w11, w12 + WORD $0x4a0d016b // eor w11, w11, w13 + WORD $0x13897529 // ror w9, w9, #29 + WORD $0x2954344c // ldp w12, w13, [x2, #160] + WORD $0x4a0c016c // eor w12, w11, w12 + WORD $0x4b0c0129 // sub w9, w9, w12 + WORD $0x4a0d0129 // eor w9, w9, w13 + WORD $0x138a254a // ror w10, w10, #9 + WORD $0x294f344c // ldp w12, w13, [x2, #120] + WORD $0x4a0c012c // eor w12, w9, w12 + WORD $0x4b0c014a // sub w10, w10, w12 + WORD $0x4a0d014a // eor w10, w10, w13 + WORD $0x13886d08 // ror w8, w8, #27 + WORD $0x2950344c // ldp w12, w13, [x2, #128] + WORD $0x4a0c014c // eor w12, w10, w12 + WORD $0x4b0c0108 // sub w8, w8, w12 + WORD $0x4a0d0108 // eor w8, w8, w13 + WORD $0x138b756b // ror w11, w11, #29 + WORD $0x2951344c // ldp w12, w13, [x2, #136] + WORD $0x4a0c010c // eor w12, w8, w12 + WORD $0x13892529 // ror w9, w9, #9 + WORD $0x4b0c016b // sub w11, w11, w12 + WORD $0x4a0d016b // eor w11, w11, w13 + WORD $0x294c344c // ldp w12, w13, [x2, #96] + WORD $0x4a0c016c // eor w12, w11, w12 + WORD $0x4b0c0129 // sub w9, w9, w12 + WORD $0x4a0d0129 // eor w9, w9, w13 + WORD $0x138a6d4a // ror w10, w10, #27 + WORD $0x294d344c // ldp w12, w13, [x2, #104] + WORD $0x4a0c012c // eor w12, w9, w12 + WORD $0x4b0c014a // sub w10, w10, w12 + WORD $0x4a0d014a // eor w10, w10, w13 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0x294e344c // ldp w12, w13, [x2, #112] + WORD $0x4a0c014c // eor w12, w10, w12 + WORD $0x4b0c0108 // sub w8, w8, w12 + WORD $0x4a0d0108 // eor w8, w8, w13 + WORD $0x138b256b // ror w11, w11, #9 + WORD $0x2949344c // ldp w12, w13, [x2, #72] + WORD $0x4a0c010c // eor w12, w8, w12 + WORD $0x4b0c016b // sub w11, w11, w12 + WORD $0x4a0d016b // eor w11, w11, w13 + WORD $0x13896d29 // ror w9, w9, #27 + WORD $0x294a344c // ldp w12, w13, [x2, #80] + WORD $0x4a0c016c // eor w12, w11, w12 + WORD $0x4b0c0129 // sub w9, w9, w12 + WORD $0x4a0d0129 // eor w9, w9, w13 + WORD $0x138a754a // ror w10, w10, #29 + WORD $0x294b344c // ldp w12, w13, [x2, #88] + WORD $0x4a0c012c // eor w12, w9, w12 + WORD $0x13882508 // ror w8, w8, #9 + WORD $0x4b0c014a // sub w10, w10, w12 + WORD $0x4a0d014a // eor w10, w10, w13 + WORD $0x2946344c // ldp w12, w13, [x2, #48] + WORD $0x4a0c014c // eor w12, w10, w12 + WORD $0x4b0c0108 // sub w8, w8, w12 + WORD $0x4a0d0108 // eor w8, w8, w13 + WORD $0x138b6d6b // ror w11, w11, #27 + WORD $0x2947344c // ldp w12, w13, [x2, #56] + WORD $0x4a0c010c // eor w12, w8, w12 + WORD $0x4b0c016b // sub w11, w11, w12 + WORD $0x4a0d016b // eor w11, w11, w13 + WORD $0x13897529 // ror w9, w9, #29 + WORD $0x2948344c // ldp w12, w13, [x2, #64] + WORD $0x4a0c016c // eor w12, w11, w12 + WORD $0x4b0c0129 // sub w9, w9, w12 + WORD $0x4a0d0129 // eor w9, w9, w13 + WORD $0x138a254a // ror w10, w10, #9 + WORD $0x2943344c // ldp w12, w13, [x2, #24] + WORD $0x4a0c012c // eor w12, w9, w12 + WORD $0x4b0c014a // sub w10, w10, w12 + WORD $0x4a0d014a // eor w10, w10, w13 + WORD $0x13886d08 // ror w8, w8, #27 + WORD $0x2944344c // ldp w12, w13, [x2, #32] + WORD $0x4a0c014c // eor w12, w10, w12 + WORD $0x4b0c0108 // sub w8, w8, w12 + WORD $0x4a0d0108 // eor w8, w8, w13 + WORD $0x138b756b // ror w11, w11, #29 + WORD $0x2945344c // ldp w12, w13, [x2, #40] + WORD $0x4a0c010c // eor w12, w8, w12 + WORD $0x13892529 // ror w9, w9, #9 + WORD $0x4b0c016b // sub w11, w11, w12 + WORD $0x4a0d016b // eor w11, w11, w13 + WORD $0x2940344c // ldp w12, w13, [x2] + WORD $0x4a0c016c // eor w12, w11, w12 + WORD $0x4b0c0129 // sub w9, w9, w12 + WORD $0x4a0d0129 // eor w9, w9, w13 + WORD $0x138a6d4a // ror w10, w10, #27 + WORD $0x2941344c // ldp w12, w13, [x2, #8] + WORD $0x4a0c012c // eor w12, w9, w12 + WORD $0x4b0c014a // sub w10, w10, w12 + WORD $0x4a0d014a // eor w10, w10, w13 + WORD $0x13887508 // ror w8, w8, #29 + WORD $0x2942344c // ldp w12, w13, [x2, #16] + WORD $0x4a0c014c // eor w12, w10, w12 + WORD $0x2900240b // stp w11, w9, [x0] + WORD $0x4b0c0108 // sub w8, w8, w12 + WORD $0x4a0d0108 // eor w8, w8, w13 + WORD $0x2901200a // stp w10, w8, [x0, #8] + WORD $0xa8c17bfd // ldp x29, x30, [sp], #16 ; 16-byte Folded Reload + WORD $0xd65f03c0 // ret diff --git a/lea/lea_arm64_neon_stubs.go b/lea/lea_arm64_neon_stubs.go new file mode 100644 index 0000000..1c43305 --- /dev/null +++ b/lea/lea_arm64_neon_stubs.go @@ -0,0 +1,12 @@ +//go:build arm64 && gc && !purego +// AUTO-GENERATED BY GOAT -- DO NOT EDIT + +package lea + +import "unsafe" + +//go:noescape +func lea_encrypt_4block(ct, pt, rk unsafe.Pointer, round uint64) + +//go:noescape +func lea_decrypt_4block(pt, ct, rk unsafe.Pointer, round uint64) diff --git a/lea/lea_arm64_stubs.go b/lea/lea_arm64_stubs.go index 1c43305..da38d57 100644 --- a/lea/lea_arm64_stubs.go +++ b/lea/lea_arm64_stubs.go @@ -6,7 +6,10 @@ package lea import "unsafe" //go:noescape -func lea_encrypt_4block(ct, pt, rk unsafe.Pointer, round uint64) +func lea_set_key_generic(rk, round, mk unsafe.Pointer, mk_len uint64) //go:noescape -func lea_decrypt_4block(pt, ct, rk unsafe.Pointer, round uint64) +func lea_encrypt(ct, pt, rk unsafe.Pointer, round uint64) + +//go:noescape +func lea_decrypt(pt, ct, rk unsafe.Pointer, round uint64) diff --git a/lea/lea_asm.go b/lea/lea_asm.go index 62456c6..e13f780 100644 --- a/lea/lea_asm.go +++ b/lea/lea_asm.go @@ -7,9 +7,12 @@ import ( "fmt" ) +type funcSetKey func(rk []uint32, key []byte) int type funcBlock func(ctx *leaContext, dst, src []byte) var ( + leaSetKey funcSetKey = leaSetKeyGo + leaEnc1 funcBlock = leaEnc1Go leaEnc4 funcBlock = leaEnc4Go leaEnc8 funcBlock = leaEnc8Go diff --git a/lea/test_arm64_test.go b/lea/test_arm64_test.go index af1aff3..0441267 100644 --- a/lea/test_arm64_test.go +++ b/lea/test_arm64_test.go @@ -6,14 +6,24 @@ import ( "testing" ) -func Test_Encrypt_4Blocks_NEON(t *testing.T) { testAll(t, tb(4, leaEnc4Go, leaEnc4NEON, false)) } -func Test_Decrypt_4Blocks_NEON(t *testing.T) { testAll(t, tb(4, leaDec4Go, leaDec4NEON, false)) } +func Test_SetKey_ARM64_ASM(t *testing.T) { testAll(t, ts(leaSetKeyGo, leaSetKeyASM, false)) } -func Test_Encrypt_8Blocks_NEON(t *testing.T) { testAll(t, tb(8, leaEnc4Go, leaEnc8NEON, false)) } -func Test_Decrypt_8Blocks_NEON(t *testing.T) { testAll(t, tb(8, leaDec4Go, leaDec8NEON, false)) } +func Test_Encrypt_1Block_ARM64_ASM(t *testing.T) { testAll(t, tb(1, leaEnc1Go, leaEnc1ASM, false)) } +func Test_Decrypt_1Block_ARM64_NEON(t *testing.T) { testAll(t, tb(1, leaDec1Go, leaDec1ASM, false)) } -func Benchmark_Encrypt_4Blocks_NEON(b *testing.B) { benchAll(b, bb(4, leaEnc4NEON, false)) } -func Benchmark_Decrypt_4Blocks_NEON(b *testing.B) { benchAll(b, bb(4, leaDec4NEON, false)) } +func Test_Encrypt_4Blocks_ARM64_NEON(t *testing.T) { testAll(t, tb(4, leaEnc4Go, leaEnc4NEON, false)) } +func Test_Decrypt_4Blocks_ARM64_NEON(t *testing.T) { testAll(t, tb(4, leaDec4Go, leaDec4NEON, false)) } -func Benchmark_Encrypt_8Blocks_NEON(b *testing.B) { benchAll(b, bb(4, leaEnc8NEON, false)) } -func Benchmark_Decrypt_8Blocks_NEON(b *testing.B) { benchAll(b, bb(4, leaDec8NEON, false)) } +func Test_Encrypt_8Blocks_ARM64_NEON(t *testing.T) { testAll(t, tb(8, leaEnc4Go, leaEnc8NEON, false)) } +func Test_Decrypt_8Blocks_ARM64_NEON(t *testing.T) { testAll(t, tb(8, leaDec4Go, leaDec8NEON, false)) } + +func Benchmark_SetKey_ARM64_ASM(b *testing.B) { benchAll(b, bb(1, leaEnc1ASM, false)) } + +func Benchmark_Encrypt_1Block_ARM64_NEON(b *testing.B) { benchAll(b, bb(1, leaEnc1ASM, false)) } +func Benchmark_Decrypt_1Block_ARM64_NEON(b *testing.B) { benchAll(b, bb(1, leaDec1ASM, false)) } + +func Benchmark_Encrypt_4Blocks_ARM64_NEON(b *testing.B) { benchAll(b, bb(4, leaEnc4NEON, false)) } +func Benchmark_Decrypt_4Blocks_ARM64_NEON(b *testing.B) { benchAll(b, bb(4, leaDec4NEON, false)) } + +func Benchmark_Encrypt_8Blocks_ARM64_NEON(b *testing.B) { benchAll(b, bb(4, leaEnc8NEON, false)) } +func Benchmark_Decrypt_8Blocks_ARM64_NEON(b *testing.B) { benchAll(b, bb(4, leaDec8NEON, false)) } diff --git a/lea/test_asm_test.go b/lea/test_asm_test.go deleted file mode 100644 index 1f3be93..0000000 --- a/lea/test_asm_test.go +++ /dev/null @@ -1,48 +0,0 @@ -package lea - -import ( - "bytes" - "testing" -) - -func tb(blocks int, funcGo, funcAsm funcBlock, skip bool) func(t *testing.T, keySize int) { - return func(t *testing.T, keySize int) { - if skip { - t.Skip() - return - } - - k := make([]byte, keySize/8) - rnd.Read(k) - - srcGo := make([]byte, BlockSize*blocks) - dstGo := make([]byte, BlockSize*blocks) - - srcAsm := make([]byte, BlockSize*blocks) - dstAsm := make([]byte, BlockSize*blocks) - - rnd.Read(srcGo) - copy(srcAsm, srcGo) - - var ctx leaContextAsm - err := ctx.g.initContext(k) - if err != nil { - t.Error(err) - return - } - - for i := 0; i < testBlocks/blocks; i++ { - funcGo(&ctx.g, dstGo, srcGo) - funcAsm(&ctx.g, dstAsm, srcAsm) - - if !bytes.Equal(dstGo, dstAsm) { - t.Error("did not match") - t.FailNow() - return - } - - copy(srcGo, dstGo) - copy(srcAsm, dstAsm) - } - } -} diff --git a/lea/test_test.go b/lea/test_test.go index f0f935b..f72dfce 100644 --- a/lea/test_test.go +++ b/lea/test_test.go @@ -9,9 +9,12 @@ import ( ) const ( + testKey = 1024 * 1024 testBlocks = 16 * 1024 * 1024 ) +func Benchmark_SetKey(b *testing.B) { benchAll(b, bs(leaSetKeyGo, false)) } + func Benchmark_Encrypt_1Blocks(b *testing.B) { benchAll(b, bb(1, leaEnc1Go, false)) } func Benchmark_Encrypt_4Blocks(b *testing.B) { benchAll(b, bb(4, leaEnc4Go, false)) } func Benchmark_Encrypt_8Blocks(b *testing.B) { benchAll(b, bb(8, leaEnc8Go, false)) } @@ -79,6 +82,78 @@ func testDecryptGo(t *testing.T, testCases []testCase) { } } +func ts(funcGo, funcAsm funcSetKey, skip bool) func(t *testing.T, keySize int) { + return func(t *testing.T, keySize int) { + if skip { + t.Skip() + return + } + + k := make([]byte, keySize/8) + rnd.Read(k) + + var ctxGo leaContext + var ctxAsm leaContext + + for i := 0; i < testKey; i++ { + funcGo(ctxGo.rk[:], k) + funcAsm(ctxAsm.rk[:], k) + + for idx := range ctxGo.rk { + if ctxGo.rk[idx] != ctxAsm.rk[idx] { + t.Error("did not match") + t.FailNow() + return + } + } + + rnd.Read(k) + } + } +} + +func tb(blocks int, funcGo, funcAsm funcBlock, skip bool) func(t *testing.T, keySize int) { + return func(t *testing.T, keySize int) { + if skip { + t.Skip() + return + } + + k := make([]byte, keySize/8) + rnd.Read(k) + + srcGo := make([]byte, BlockSize*blocks) + dstGo := make([]byte, BlockSize*blocks) + + srcAsm := make([]byte, BlockSize*blocks) + dstAsm := make([]byte, BlockSize*blocks) + + rnd.Read(srcGo) + copy(srcAsm, srcGo) + + var ctx leaContextAsm + err := ctx.g.initContext(k) + if err != nil { + t.Error(err) + return + } + + for i := 0; i < testBlocks/blocks; i++ { + funcGo(&ctx.g, dstGo, srcGo) + funcAsm(&ctx.g, dstAsm, srcAsm) + + if !bytes.Equal(dstGo, dstAsm) { + t.Error("did not match") + t.FailNow() + return + } + + copy(srcGo, dstGo) + copy(srcAsm, dstAsm) + } + } +} + func benchAll(b *testing.B, f func(*testing.B, int)) { tests := []struct { name string @@ -96,6 +171,27 @@ func benchAll(b *testing.B, f func(*testing.B, int)) { } } +func bs(f funcSetKey, skip bool) func(b *testing.B, keySize int) { + return func(b *testing.B, keySize int) { + if skip { + b.Skip() + return + } + + key := make([]byte, keySize/8) + rand.Read(key) + + var ctx leaContext + + b.ReportAllocs() + b.ResetTimer() + for i := 0; i < b.N; i++ { + f(ctx.rk[:], key) + rand.Read(key) + } + } +} + func bb(blocks int, f funcBlock, skip bool) func(b *testing.B, keySize int) { return func(b *testing.B, keySize int) { if skip { diff --git a/lsh256/arm64_goat/src/lsh256_neon.c b/lsh256/arm64_goat/src/lsh256_neon.c new file mode 100644 index 0000000..ca8b5f6 --- /dev/null +++ b/lsh256/arm64_goat/src/lsh256_neon.c @@ -0,0 +1,1176 @@ +/* + * Copyright (c) 2016 NSR (National Security Research Institute) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +/* + * Copyright (c) 2016 NSR (National Security Research Institute) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef _SIMD_LSH_DEF_H_ +#define _SIMD_LSH_DEF_H_ + +/* LSH Variable Type */ +#include +#if defined(_MSC_VER) && _MSC_VER < 1600 +/* Under Visual Studio 2010 */ +typedef unsigned __int64 lsh_u64; +typedef unsigned int lsh_u32; +typedef unsigned short lsh_u16; +typedef unsigned char lsh_u8; +typedef unsigned int lsh_uint; +typedef lsh_u32 lsh_type; +typedef lsh_uint lsh_err; +#else +/* C99 Compatible */ +#include +typedef uint64_t lsh_u64; +typedef uint32_t lsh_u32; +typedef uint16_t lsh_u16; +typedef uint8_t lsh_u8; +typedef uint32_t lsh_uint; +typedef lsh_u32 lsh_type; +typedef lsh_uint lsh_err; +#endif + +/* LSH AlgType */ + +#define LSH_TYPE_256_256 0x0000020 +#define LSH_TYPE_256_224 0x000001C + +#define LSH_TYPE_512_512 0x0010040 +#define LSH_TYPE_512_384 0x0010030 +#define LSH_TYPE_512_256 0x0010020 +#define LSH_TYPE_512_224 0x001001C + +#define LSH_TYPE_224 LSH_TYPE_256_224 +#define LSH_TYPE_256 LSH_TYPE_256_256 +#define LSH_TYPE_384 LSH_TYPE_512_384 +#define LSH_TYPE_512 LSH_TYPE_512_512 + +/* LSH AlgType Macro */ + +#define LSH_IS_LSH256(lsh_type_val) (((lsh_type_val)&0xf0000)==0) +#define LSH_IS_LSH512(lsh_type_val) (((lsh_type_val)&0xf0000)==0x10000) + +#define LSH_GET_SMALL_HASHBIT(lsh_type_val) ((lsh_type_val)>>24) +#define LSH_GET_HASHBYTE(lsh_type_val) ((lsh_type_val) & 0xffff) +#define LSH_GET_HASHBIT(lsh_type_val) ((LSH_GET_HASHBYTE(lsh_type_val)<<3)-LSH_GET_SMALL_HASHBIT(lsh_type_val)) + +#define LSH_MAKE_TYPE(is_lsh512, hash_bit_len) (lsh_type)(((is_lsh512)?0x10000:0) \ + | (((hash_bit_len)&7) ?((((hash_bit_len)>>3) + 1) | ((8 - ((hash_bit_len)&7))<<24)) \ + :((hash_bit_len)>>3))) + +/* LSH Constants */ + +#define LSH256_MSG_BLK_BYTE_LEN 128 +#define LSH256_MSG_BLK_BIT_LEN 1024 +#define LSH256_CV_BYTE_LEN 64 +#define LSH256_HASH_VAL_MAX_BYTE_LEN 32 + +#define LSH512_MSG_BLK_BYTE_LEN 256 +#define LSH512_MSG_BLK_BIT_LEN 2048 +#define LSH512_CV_BYTE_LEN 128 +#define LSH512_HASH_VAL_MAX_BYTE_LEN 64 + +/* Error Code */ + +#define LSH_SUCCESS 0x0 +#define LSH_ERR_NULL_PTR 0x2401 +#define LSH_ERR_INVALID_ALGTYPE 0x2402 +#define LSH_ERR_INVALID_DATABITLEN 0x2403 +#define LSH_ERR_INVALID_STATE 0x2404 + +#ifndef NULL +#define NULL ((void*)0) +#endif + +#ifndef __has_attribute +#define __has_attribute(x) 0 +#endif + +#if defined(LSH_ALIGNED_) +/* do nothing */ +#elif defined(_MSC_VER) +#define LSH_ALIGNED_(x) __declspec(align(x)) +#elif defined(__GNUC__) +#define LSH_ALIGNED_(x) __attribute__ ((aligned(x))) +#elif __has_attribute(aligned) +#define LSH_ALIGNED_(x) __attribute__ ((aligned(x))) +#endif + + +#endif + + +/* + * Copyright (c) 2016 NSR (National Security Research Institute) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef _ARM_LSH_LOCAL_H_ +#define _ARM_LSH_LOCAL_H_ + +#include "lsh_def.h" +#include "lsh.h" + +/* INLINE, ROTL64, ROTL, IS_LITTLE_ENDIAN, loadLE32, loadLE64 */ +/* COMPILE_*ARCH*, FunctionPointer */ + +#ifndef __has_builtin +#define __has_builtin(x) 0 +#endif + +#ifndef __has_attribute +#define __has_attribute(x) 0 +#endif + +#ifndef __has_declspec_attribute +#define __has_declspec_attribute(x) 0 +#endif + +/* Inlining Macro */ +#ifdef INLINE +/* do nothing */ +#elif defined(_MSC_VER) +#define INLINE __forceinline +#elif __has_attribute(always_inline) +#define INLINE inline __attribute__((always_inline)) +#elif defined(__GNUC__) +#define INLINE inline __attribute__((always_inline)) +#elif defined(__cplusplus) +#define INLINE inline +#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#define INLINE inline +#else +#define INLINE +#endif + +/* Rotation Macro */ +#if defined(_MSC_VER) && 0 +#include +#define ROTL64(x,r) _rotl64(x,r) +#define ROTR64(x,r) _rotr64(x,r) +#define ROTL(x,r) _lrotl(x,r) +#define ROTR(x,r) _lrotr(x,r) +#else +#define ROTL64(x,r) ((x) << (r)) | ((x) >> (WORD_BIT_LEN-r)) +#define ROTR64(x,r) ((x) >> (r)) | ((x) << (WORD_BIT_LEN-r)) +#define ROTL(x,r) ((x) << (r)) | ((x) >> (WORD_BIT_LEN-r)) +#define ROTR(x,r) ((x) >> (r)) | ((x) << (WORD_BIT_LEN-r)) +#endif + +/* Check Endian */ +#if defined(IS_LITTLE_ENDIAN) +/* do Nothing */ +/* All available "Windows" are Little-Endian except XBOX360. */ +#elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && defined(__ORDER_LITTLE_ENDIAN__) +/* GCC style */ +/* use __BYTE_ORDER__ */ +# if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define IS_LITTLE_ENDIAN 1 +# else +# define IS_LITTLE_ENDIAN 0 +# endif +#elif defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__) +/* use __BIG_ENDIAN__ and __LITTLE_ENDIAN__ */ +# if defined(__LITTLE_ENDIAN__) +# if __LITTLE_ENDIAN__ +# define IS_LITTLE_ENDIAN 1 +# else +# define IS_LITTLE_ENDIAN 0 +# endif +# elif defined(__BIG_ENDIAN__) +# if __BIG_ENDIAN__ +# define IS_LITTLE_ENDIAN 0 +# else +# define IS_LITTLE_ENDIAN 1 +# endif +# endif +#else +/* use */ +# ifdef BSD +# include +# else +# include +# endif +# if __BYTE_ORDER__ == __LITTLE_ENDIAN +# define IS_LITTLE_ENDIAN 1 +# else +# define IS_LITTLE_ENDIAN 0 +# endif +#endif + +#if defined(loadLE32) && defined(loadLE64) +/* do Nothing */ +#elif IS_LITTLE_ENDIAN +// little endian +#define loadLE32(v) (v) +#define loadLE64(v) (v) + +#else +// big endian + +#if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) +#define loadLE32(v) __builtin_bswap32(v) +#define loadLE64(v) __builtin_bswap64(v) + +#elif __has_builtin(__builtin_bswap32) + +#define loadLE32(v) __builtin_bswap32(v) +#define loadLE64(v) __builtin_bswap64(v) +#else + +/* If you want, you can use htole32 and htole64 instead of below. */ +static INLINE lsh_u32 loadLE32(lsh_u32 v) { + unsigned char* p = (unsigned char*)&v; + return p[0] << 24 | p[1] << 16 | p[2] << 8 | p[3]; +} +static INLINE lsh_u64 loadLE64(lsh_u64 v) { + lsh_u32* p = (lsh_u32*)&v; + return (lsh_u64)loadLE32(p[0]) << 32 | loadLE32(p[1]); +} +#endif +#endif + +#if defined(__arm__) || defined(_M_ARM) || defined(_ARM) || defined(__arm) || defined(__aarch64__) +#define LSH_ARCH_ARM +#endif + +#ifdef LSH_ARCH_ARM + +#if (!defined(__GNUC__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && !defined(NO_NEON) +#define LSH_COMPILE_NEON +#endif + +#endif /* NO_SIMD */ + +/** + * lsh256_init 의 SIMD 구현을 위한 함수 포인터 + */ +typedef lsh_err(*PtrLSHInit256)(struct LSH256_Context * ctx, const lsh_type algtype); + +/** + * lsh256_update 의 SIMD 구현을 위한 함수 포인터 + */ +typedef lsh_err(*PtrLSHUpdate256)(struct LSH256_Context * ctx, const lsh_u8 * data, size_t databitlen); + +/** + * lsh256_final 의 SIMD 구현을 위한 함수 포인터 + */ +typedef lsh_err(*PtrLSHFinal256)(struct LSH256_Context * ctx, lsh_u8 * hashval); + +/** + * lsh256_digest 의 SIMD 구현을 위한 함수 포인터 + */ +typedef lsh_err(*PtrLSHDigest256)(const lsh_type algtype, const lsh_u8 * data, size_t databitlen, lsh_u8 * hashval); + +/** + * lsh512_init 의 SIMD 구현을 위한 함수 포인터 + */ +typedef lsh_err(*PtrLSHInit512)(struct LSH512_Context * ctx, const lsh_type algtype); + +/** + * lsh512_update 의 SIMD 구현을 위한 함수 포인터 + */ +typedef lsh_err(*PtrLSHUpdate512)(struct LSH512_Context * ctx, const lsh_u8 * data, size_t databitlen); + +/** + * lsh512_final 의 SIMD 구현을 위한 함수 포인터 + */ +typedef lsh_err(*PtrLSHFinal512)(struct LSH512_Context * ctx, lsh_u8 * hashval); + +/** + * lsh512_digest 의 SIMD 구현을 위한 함수 포인터 + */ +typedef lsh_err(*PtrLSHDigest512)(const lsh_type algtype, const lsh_u8 * data, size_t databitlen, lsh_u8 * hashval); + +#endif + + + + +/* + * Copyright (c) 2016 NSR (National Security Research Institute) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef _LSH256_NEON_H_ +#define _LSH256_NEON_H_ + +#include "lsh.h" +#include "lsh_def.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * 32비트 int 데이터 4개를 묶어 한 번에 처리하기 위한 데이터 타입 + */ +typedef int32x4_t lsh_s32x4; + +/** + * 32비트 unsigned int 데이터 4개를 묶어 한 번에 처리하기 위한 데이터 타입 + */ +typedef uint32x4_t lsh_u32x4; + +/** + * 32비트 unsigned int 데이터 2개를 묶어 한 번에 처리하기 위한 데이터 타입 + */ +typedef uint32x2_t lsh_u32x2; + +/** + * NEON 명령어셋을 이용하여 LSH256 해시 내부 상태를 초기화한다. + * + * @param [in] ctx 해시 내부 상태 구조체 + * @param [in] algtype LSH 알고리즘 명세 + * + * @return LSH_SUCCESS 내부 상태 초기화 성공 + * @return LSH_ERR_NULL_PTR ctx나 hashval이 NULL인 경우 + * @return LSH_ERR_INVALID_STATE 해시 내부 상태값에 오류가 있는 경우 + * @return LSH_ERR_INVALID_DATABITLEN 이전에 입력된 데이터의 길이가 8의 배수가 아닌 경우 + */ +lsh_err lsh256_neon_init(struct LSH256_Context * ctx, const long algtype); + +/** + * NEON 명령어셋을 이용하여 LSH256 해시 내부 상태를 업데이트한다. + * + * @param [inout] ctx 해시 내부 상태 구조체 + * @param [in] data 해시를 계산할 데이터 + * @param [in] databitlen 데이터 길이 (비트단위) + * + * @return LSH_SUCCESS 업데이트 성공 + * @return LSH_ERR_NULL_PTR ctx나 hashval이 NULL인 경우 + * @return LSH_ERR_INVALID_STATE 해시 내부 상태값에 오류가 있는 경우 + * @return LSH_ERR_INVALID_DATABITLEN 이전에 입력된 데이터의 길이가 8의 배수가 아닌 경우 + */ +lsh_err lsh256_neon_update(struct LSH256_Context * ctx, const lsh_u8 * data, size_t databitlen); + +/** + * NEON 명령어셋을 이용하여 LSH256 해시를 계산한다. + * + * @param [in] ctx 해시 내부 상태 구조체 + * @param [out] hashval 해시가 저장될 버퍼 + * + * @return LSH_SUCCESS 해시 계산 성공 + * @return LSH_ERR_NULL_PTR ctx나 hashval이 NULL인 경우 + * @return LSH_ERR_INVALID_STATE 해시 내부 상태값에 오류가 있는 경우 + */ +lsh_err lsh256_neon_final(struct LSH256_Context * ctx, lsh_u8 * hashval); + +/** + * NEON 명령어셋을 이용하여 LSH256 해시를 계산한다. + * + * @param [in] algtype 알고리즘 명세 + * @param [in] data 데이터 + * @param [in] databitlen 데이터 길이 (비트단위) + * @param [out] hashval 해시가 저장될 버퍼 + * + * @return LSH_SUCCESS 해시 계산 성공 + */ +lsh_err lsh256_neon_digest(const lsh_type algtype, const lsh_u8 * data, size_t databitlen, lsh_u8 * hashval); + +#ifdef __cplusplus +} +#endif + +#endif /* _LSH256_NEON_H_ */ + + + + + + + + + +#define NO_INLINE __attribute__((noinline)) + +#ifdef __clang__ +typedef char char8 __attribute__((ext_vector_type(8), aligned(1))); +typedef char char16 __attribute__((ext_vector_type(16), aligned(1))); +typedef char char32 __attribute__((ext_vector_type(32), aligned(1))); +typedef char char32a __attribute__((ext_vector_type(32), aligned(32))); + +#else +// __GNUC__ +typedef char char8 __attribute__((vector_size(8), aligned(1))); +typedef char char16 __attribute__((vector_size(16), aligned(1))); +typedef char char32 __attribute__((vector_size(32), aligned(1))); +typedef char char32a __attribute__((vector_size(32), aligned(32))); +#endif + +typedef uint32_t __attribute__((aligned(1))) u32; +typedef uint64_t __attribute__((aligned(1))) u64; + + + + +inline void *local_memcpy(void *dest, const void *src, size_t n) { + char *d = (char *)dest; + const char *s = (char *)src; + + if (n < 5) { + if (n == 0) + return dest; + d[0] = s[0]; + d[n - 1] = s[n - 1]; + if (n <= 2) + return dest; + d[1] = s[1]; + d[2] = s[2]; + return dest; + } + + if (n <= 16) { + if (n >= 8) { + const char *first_s = s; + const char *last_s = s + n - 8; + char *first_d = d; + char *last_d = d + n - 8; + *((u64 *)first_d) = *((u64 *)first_s); + *((u64 *)last_d) = *((u64 *)last_s); + return dest; + } + + const char *first_s = s; + const char *last_s = s + n - 4; + char *first_d = d; + char *last_d = d + n - 4; + *((u32 *)first_d) = *((u32 *)first_s); + *((u32 *)last_d) = *((u32 *)last_s); + return dest; + } + + if (n <= 32) { + const char *first_s = s; + const char *last_s = s + n - 16; + char *first_d = d; + char *last_d = d + n - 16; + + *((char16 *)first_d) = *((char16 *)first_s); + *((char16 *)last_d) = *((char16 *)last_s); + return dest; + } + + const char *last_word_s = s + n - 32; + char *last_word_d = d + n - 32; + + // Stamp the 32-byte chunks. + do { + *((char32 *)d) = *((char32 *)s); + d += 32; + s += 32; + } while (d < last_word_d); + + // Stamp the last unaligned 32 bytes of the buffer. + *((char32 *)last_word_d) = *((char32 *)last_word_s); + return dest; +} + + + + +// Handle memsets of sizes 0..32 +static inline void* small_memset(void *s, int c, size_t n) { + if (n < 5) { + if (n == 0) + return s; + char *p = s; + p[0] = c; + p[n - 1] = c; + if (n <= 2) + return s; + p[1] = c; + p[2] = c; + return s; + } + + if (n <= 16) { + uint64_t val8 = ((uint64_t)0x0101010101010101L * ((uint8_t)c)); + if (n >= 8) { + char *first = s; + char *last = s + n - 8; + *((u64 *)first) = val8; + *((u64 *)last) = val8; + return s; + } + + uint32_t val4 = val8; + char *first = s; + char *last = s + n - 4; + *((u32 *)first) = val4; + *((u32 *)last) = val4; + return s; + } + + char X = c; + char *p = s; + char16 val16 = {X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X}; + char *last = s + n - 16; + *((char16 *)last) = val16; + *((char16 *)p) = val16; + return s; +} + +static inline void* huge_memset(void *s, int c, size_t n) { + char *p = s; + char X = c; + char32 val32 = {X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, + X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X}; + + // Stamp the first 32byte store. + *((char32 *)p) = val32; + + char *first_aligned = p + 32 - ((uint64_t)p % 32); + char *buffer_end = p + n; + char *last_word = buffer_end - 32; + + // Align the next stores. + p = first_aligned; + + // Unroll the body of the loop to increase parallelism. + while (p + (32 * 5) < buffer_end) { + *((char32a *)p) = val32; + p += 32; + *((char32a *)p) = val32; + p += 32; + *((char32a *)p) = val32; + p += 32; + *((char32a *)p) = val32; + p += 32; + *((char32a *)p) = val32; + p += 32; + } + +// Complete the last few iterations: +#define TRY_STAMP_32_BYTES \ + if (p < last_word) { \ + *((char32a *)p) = val32; \ + p += 32; \ + } + + TRY_STAMP_32_BYTES + TRY_STAMP_32_BYTES + TRY_STAMP_32_BYTES + TRY_STAMP_32_BYTES + + // Stamp the last unaligned word. + *((char32 *)last_word) = val32; + return s; +} + +inline void* local_memset(void *s, int c, size_t n) { + char *p = s; + char X = c; + + if (n < 32) { + return small_memset(s, c, n); + } + + if (n > 160) { + return huge_memset(s, c, n); + } + + char32 val32 = {X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, + X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X}; + + char *last_word = s + n - 32; + + // Stamp the 32-byte chunks. + do { + *((char32 *)p) = val32; + p += 32; + } while (p < last_word); + + // Stamp the last unaligned 32 bytes of the buffer. + *((char32 *)last_word) = val32; + return s; +} + +/// This a memset implementation that was copied from musl. We only use it for +/// benchmarking. + +static void *musl_memset(void *dest, int c, size_t n) { + unsigned char *s = dest; + size_t k; + + /* Fill head and tail with minimal branching. Each + * conditional ensures that all the subsequently used + * offsets are well-defined and in the dest region. */ + + if (!n) + return dest; + s[0] = c; + s[n - 1] = c; + if (n <= 2) + return dest; + s[1] = c; + s[2] = c; + s[n - 2] = c; + s[n - 3] = c; + if (n <= 6) + return dest; + s[3] = c; + s[n - 4] = c; + if (n <= 8) + return dest; + + /* Advance pointer to align it at a 4-byte boundary, + * and truncate n to a multiple of 4. The previous code + * already took care of any head/tail that get cut off + * by the alignment. */ + + k = -(uintptr_t)s & 3; + s += k; + n -= k; + n &= -4; + +#ifdef __GNUC__ + typedef uint32_t __attribute__((__may_alias__)) u32; + typedef uint64_t __attribute__((__may_alias__)) u64; + + u32 c32 = ((u32)-1) / 255 * (unsigned char)c; + + /* In preparation to copy 32 bytes at a time, aligned on + * an 8-byte bounary, fill head/tail up to 28 bytes each. + * As in the initial byte-based head/tail fill, each + * conditional below ensures that the subsequent offsets + * are valid (e.g. !(n<=24) implies n>=28). */ + + *(u32 *)(s + 0) = c32; + *(u32 *)(s + n - 4) = c32; + if (n <= 8) + return dest; + *(u32 *)(s + 4) = c32; + *(u32 *)(s + 8) = c32; + *(u32 *)(s + n - 12) = c32; + *(u32 *)(s + n - 8) = c32; + if (n <= 24) + return dest; + *(u32 *)(s + 12) = c32; + *(u32 *)(s + 16) = c32; + *(u32 *)(s + 20) = c32; + *(u32 *)(s + 24) = c32; + *(u32 *)(s + n - 28) = c32; + *(u32 *)(s + n - 24) = c32; + *(u32 *)(s + n - 20) = c32; + *(u32 *)(s + n - 16) = c32; + + /* Align to a multiple of 8 so we can fill 64 bits at a time, + * and avoid writing the same bytes twice as much as is + * practical without introducing additional branching. */ + + k = 24 + ((uintptr_t)s & 4); + s += k; + n -= k; + + /* If this loop is reached, 28 tail bytes have already been + * filled, so any remainder when n drops below 32 can be + * safely ignored. */ + + u64 c64 = c32 | ((u64)c32 << 32); + for (; n >= 32; n -= 32, s += 32) { + *(u64 *)(s + 0) = c64; + *(u64 *)(s + 8) = c64; + *(u64 *)(s + 16) = c64; + *(u64 *)(s + 24) = c64; + } +#else + /* Pure C fallback with no aliasing violations. */ + for (; n; n--, s++) + *s = c; +#endif + + return dest; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#include +#include + +static const LSH_ALIGNED_(32) lsh_u32 IV224[16] = { + 0x068608D3, 0x62D8F7A7, 0xD76652AB, 0x4C600A43, 0xBDC40AA8, 0x1ECA0B68, 0xDA1A89BE, 0x3147D354, + 0x707EB4F9, 0xF65B3862, 0x6B0B2ABE, 0x56B8EC0A, 0xCF237286, 0xEE0D1727, 0x33636595, 0x8BB8D05F, +}; + +static const LSH_ALIGNED_(32) lsh_u32 IV256[16] = { + 0x46a10f1f, 0xfddce486, 0xb41443a8, 0x198e6b9d, 0x3304388d, 0xb0f5a3c7, 0xb36061c4, 0x7adbd553, + 0x105d5378, 0x2f74de54, 0x5c2f2d95, 0xf2553fbe, 0x8051357a, 0x138668c8, 0x47aa4484, 0xe01afb41 +}; + +static const LSH_ALIGNED_(32) lsh_u32 STEP256[208] = { + 0x917caf90, 0x6c1b10a2, 0x6f352943, 0xcf778243, 0x2ceb7472, 0x29e96ff2, 0x8a9ba428, 0x2eeb2642, + 0x0e2c4021, 0x872bb30e, 0xa45e6cb2, 0x46f9c612, 0x185fe69e, 0x1359621b, 0x263fccb2, 0x1a116870, + 0x3a6c612f, 0xb2dec195, 0x02cb1f56, 0x40bfd858, 0x784684b6, 0x6cbb7d2e, 0x660c7ed8, 0x2b79d88a, + 0xa6cd9069, 0x91a05747, 0xcdea7558, 0x00983098, 0xbecb3b2e, 0x2838ab9a, 0x728b573e, 0xa55262b5, + 0x745dfa0f, 0x31f79ed8, 0xb85fce25, 0x98c8c898, 0x8a0669ec, 0x60e445c2, 0xfde295b0, 0xf7b5185a, + 0xd2580983, 0x29967709, 0x182df3dd, 0x61916130, 0x90705676, 0x452a0822, 0xe07846ad, 0xaccd7351, + 0x2a618d55, 0xc00d8032, 0x4621d0f5, 0xf2f29191, 0x00c6cd06, 0x6f322a67, 0x58bef48d, 0x7a40c4fd, + 0x8beee27f, 0xcd8db2f2, 0x67f2c63b, 0xe5842383, 0xc793d306, 0xa15c91d6, 0x17b381e5, 0xbb05c277, + 0x7ad1620a, 0x5b40a5bf, 0x5ab901a2, 0x69a7a768, 0x5b66d9cd, 0xfdee6877, 0xcb3566fc, 0xc0c83a32, + 0x4c336c84, 0x9be6651a, 0x13baa3fc, 0x114f0fd1, 0xc240a728, 0xec56e074, 0x009c63c7, 0x89026cf2, + 0x7f9ff0d0, 0x824b7fb5, 0xce5ea00f, 0x605ee0e2, 0x02e7cfea, 0x43375560, 0x9d002ac7, 0x8b6f5f7b, + 0x1f90c14f, 0xcdcb3537, 0x2cfeafdd, 0xbf3fc342, 0xeab7b9ec, 0x7a8cb5a3, 0x9d2af264, 0xfacedb06, + 0xb052106e, 0x99006d04, 0x2bae8d09, 0xff030601, 0xa271a6d6, 0x0742591d, 0xc81d5701, 0xc9a9e200, + 0x02627f1e, 0x996d719d, 0xda3b9634, 0x02090800, 0x14187d78, 0x499b7624, 0xe57458c9, 0x738be2c9, + 0x64e19d20, 0x06df0f36, 0x15d1cb0e, 0x0b110802, 0x2c95f58c, 0xe5119a6d, 0x59cd22ae, 0xff6eac3c, + 0x467ebd84, 0xe5ee453c, 0xe79cd923, 0x1c190a0d, 0xc28b81b8, 0xf6ac0852, 0x26efd107, 0x6e1ae93b, + 0xc53c41ca, 0xd4338221, 0x8475fd0a, 0x35231729, 0x4e0d3a7a, 0xa2b45b48, 0x16c0d82d, 0x890424a9, + 0x017e0c8f, 0x07b5a3f5, 0xfa73078e, 0x583a405e, 0x5b47b4c8, 0x570fa3ea, 0xd7990543, 0x8d28ce32, + 0x7f8a9b90, 0xbd5998fc, 0x6d7a9688, 0x927a9eb6, 0xa2fc7d23, 0x66b38e41, 0x709e491a, 0xb5f700bf, + 0x0a262c0f, 0x16f295b9, 0xe8111ef5, 0x0d195548, 0x9f79a0c5, 0x1a41cfa7, 0x0ee7638a, 0xacf7c074, + 0x30523b19, 0x09884ecf, 0xf93014dd, 0x266e9d55, 0x191a6664, 0x5c1176c1, 0xf64aed98, 0xa4b83520, + 0x828d5449, 0x91d71dd8, 0x2944f2d6, 0x950bf27b, 0x3380ca7d, 0x6d88381d, 0x4138868e, 0x5ced55c4, + 0x0fe19dcb, 0x68f4f669, 0x6e37c8ff, 0xa0fe6e10, 0xb44b47b0, 0xf5c0558a, 0x79bf14cf, 0x4a431a20, + 0xf17f68da, 0x5deb5fd1, 0xa600c86d, 0x9f6c7eb0, 0xff92f864, 0xb615e07f, 0x38d3e448, 0x8d5d3a6a, + 0x70e843cb, 0x494b312e, 0xa6c93613, 0x0beb2f4f, 0x928b5d63, 0xcbf66035, 0x0cb82c80, 0xea97a4f7, + 0x592c0f3b, 0x947c5f77, 0x6fff49b9, 0xf71a7e5a, 0x1de8c0f5, 0xc2569600, 0xc4e4ac8c, 0x823c9ce1 +}; +// "INDENT-ON" + +static const lsh_u32 BLK_LEN_BYTE = 128; +static const lsh_u32 ALPHA_EVEN = 29; +static const lsh_u32 ALPHA_ODD = 5; +static const lsh_u32 BETA_EVEN = 1; +static const lsh_u32 BETA_ODD = 17; + +static const LSH_ALIGNED_(16) lsh_s32x4 GAMMA[2] ={ {0, 8, 16, 24}, {24, 16, 8, 0} }; +static const LSH_ALIGNED_(16) lsh_s32x4 GAMMA_INV[2] ={ {-32, -24, -16, -8}, {-8, -16, -24, -32} }; + +typedef struct LSH_ALIGNED_(32) { + LSH_ALIGNED_(16) lsh_u32 algtype; + LSH_ALIGNED_(16) lsh_u32 rbytes; // remaining bytes + LSH_ALIGNED_(32) lsh_u32x4 cv[4]; + LSH_ALIGNED_(32) lsh_u8 block[128]; +} LSH256Neon_Context; + +static INLINE void add(lsh_u32x4* lhs, const lsh_u32x4* rhs) { + lhs[0] += rhs[0]; + lhs[1] += rhs[1]; +} + +static INLINE void msg_add(LSH256Neon_Context* ctx, lsh_u32x4* msg) { + lsh_uint idx; + for (idx = 0; idx < 4; ++idx) { + ctx->cv[idx] ^= msg[idx]; + } +} + +/** + * {0, 1, 2, 3} -> {3, 2, 0, 1} + */ +static INLINE lsh_u32x4 msg_permutation(lsh_u32x4* value) { + lsh_u32x2 high = vget_high_u32(*value); + lsh_u32x2 low = vget_low_u32(*value); + high = vrev64_u32(high); + return vcombine_u32(high, low); +} + +static INLINE void msg_expansion(lsh_u32x4* lhs, const lsh_u32x4* rhs) { + lhs[0] = msg_permutation(&lhs[0]); + lhs[1] = vextq_u32(lhs[1], lhs[1], 3); // {0, 1, 2, 3} -> {3, 0, 1, 2} + lhs[2] = msg_permutation(&lhs[2]); + lhs[3] = vextq_u32(lhs[3], lhs[3], 3); + + add(lhs, rhs); + add(lhs+2, rhs+2); +} + +/** + * {0, 1, 2, 3} -> {2, 0, 1, 3} + */ +static INLINE void word_permutation1(lsh_u32x4* value) { + lsh_u32x2 high = vget_high_u32(*value); + lsh_u32x2 low = vget_low_u32(*value); + high = vrev64_u32(high); + *value = vcombine_u32(low, high); + *value = vextq_u32(*value, *value, 3); +} + +/** + * {0, 1, 2, 3} -> {0, 3, 2, 1} + */ +static INLINE void word_permutation2(lsh_u32x4* value) { + *value = vextq_u32(*value, *value, 3); + *value = vrev64q_u32(*value); +} + +static INLINE void word_permutation(LSH256Neon_Context* ctx) { + lsh_u32x4 tmp; + + word_permutation1(&ctx->cv[0]); + word_permutation1(&ctx->cv[1]); + word_permutation2(&ctx->cv[2]); + word_permutation2(&ctx->cv[3]); + + tmp = ctx->cv[0]; + ctx->cv[0] = ctx->cv[1]; + ctx->cv[1] = ctx->cv[3]; + ctx->cv[3] = ctx->cv[2]; + ctx->cv[2] = tmp; +} + +static INLINE void inner_step_even_alpha(lsh_u32x4* lhs, const lsh_u32x4* rhs) { + add(lhs, rhs); + + lhs[0] = vsriq_n_u32(vshlq_n_u32(lhs[0], 29), lhs[0], 3); + lhs[1] = vsriq_n_u32(vshlq_n_u32(lhs[1], 29), lhs[1], 3); +} + +static INLINE void inner_step_even_beta(lsh_u32x4* lhs, const lsh_u32x4* rhs) { + add(lhs, rhs); + + lhs[0] = vsriq_n_u32(vshlq_n_u32(lhs[0], 1), lhs[0], 31); + lhs[1] = vsriq_n_u32(vshlq_n_u32(lhs[1], 1), lhs[1], 31); +} + +static INLINE void inner_step_odd_alpha(lsh_u32x4* lhs, const lsh_u32x4* rhs) { + add(lhs, rhs); + + lhs[0] = vsriq_n_u32(vshlq_n_u32(lhs[0], 5), lhs[0], 27); + lhs[1] = vsriq_n_u32(vshlq_n_u32(lhs[1], 5), lhs[1], 27); +} + +static INLINE void inner_step_odd_beta(lsh_u32x4* lhs, const lsh_u32x4* rhs) { + add(lhs, rhs); + + lhs[0] = vsriq_n_u32(vshlq_n_u32(lhs[0], 17), lhs[0], 15); + lhs[1] = vsriq_n_u32(vshlq_n_u32(lhs[1], 17), lhs[1], 15); +} + +static INLINE void load_sc(lsh_u32x4* sc, const lsh_u32* psc) { + sc[0] = vld1q_u32(psc); + sc[1] = vld1q_u32(psc + 4); +} + +static INLINE void step_even(LSH256Neon_Context* ctx, lsh_u32x4* msg, lsh_u32x4* sc) { + // msg add + msg_add(ctx, msg); + + // mix: rotate alpha + inner_step_even_alpha(ctx->cv, ctx->cv + 2); + + // mix: xor step constant + ctx->cv[0] ^= sc[0]; + ctx->cv[1] ^= sc[1]; + + // mix: rotate beta + inner_step_even_beta(ctx->cv + 2, ctx->cv); + + // mix: add to left + //ctx->cv[0] += ctx->cv[2]; + //ctx->cv[1] += ctx->cv[3]; + add(ctx->cv, ctx->cv+2); + + // mix: rotate gamma + ctx->cv[2] = vshlq_u32(ctx->cv[2], GAMMA[0]) ^ vshlq_u32(ctx->cv[2], GAMMA_INV[0]); + ctx->cv[3] = vshlq_u32(ctx->cv[3], GAMMA[1]) ^ vshlq_u32(ctx->cv[3], GAMMA_INV[1]); + + // word permutation + word_permutation(ctx); +} + +static INLINE void step_odd(LSH256Neon_Context* ctx, lsh_u32x4* msg, lsh_u32x4* sc) { + // msg add + msg_add(ctx, msg); + + // mix: rotate alpha + inner_step_odd_alpha(ctx->cv, ctx->cv + 2); + + // mix: xor step constant + ctx->cv[0] ^= sc[0]; + ctx->cv[1] ^= sc[1]; + + // mix: rotate beta + inner_step_odd_beta(ctx->cv + 2, ctx->cv); + + // mix: add to left + //ctx->cv[0] += ctx->cv[2]; + //ctx->cv[1] += ctx->cv[3]; + add(ctx->cv, ctx->cv+2); + + // mix: rotate gamma + ctx->cv[2] = vshlq_u32(ctx->cv[2], GAMMA[0]) ^ vshlq_u32(ctx->cv[2], GAMMA_INV[0]); + ctx->cv[3] = vshlq_u32(ctx->cv[3], GAMMA[1]) ^ vshlq_u32(ctx->cv[3], GAMMA_INV[1]); + + // word permutation + word_permutation(ctx); +} + +static INLINE void compress(LSH256Neon_Context* ctx, const lsh_u8* block) { + + lsh_uint idx; + lsh_u32* pb = (lsh_u32*) block; + const lsh_u32* pstep = STEP256; + + LSH_ALIGNED_(32) lsh_u32x4 sc[2]; + LSH_ALIGNED_(32) lsh_u32x4 msg[8]; + + //msg load + for (idx = 0; idx < 8; ++idx, pb += 4) { + msg[idx] = vld1q_u32(pb); + } + + // step functions + for (idx = 0; idx < 13; ++idx, pstep += 16) { + //sc[0] = vld1q_u32(pstep); + //sc[1] = vld1q_u32(pstep + 4); + load_sc(sc, pstep); + step_even(ctx, msg, sc); // msg add & Mix & word permutation + msg_expansion(msg, msg + 4); + + //sc[0] = vld1q_u32(pstep + 8); + //sc[1] = vld1q_u32(pstep + 12); + load_sc(sc, pstep + 8); + step_odd(ctx, msg + 4, sc); // msg add & Mix & word permutation + msg_expansion(msg + 4, msg); + } + + // msg add + msg_add(ctx, msg); +} + +static INLINE void load_iv(LSH256Neon_Context* ctx, const lsh_u32* iv) { + ctx->cv[0] = vld1q_u32(iv); + ctx->cv[1] = vld1q_u32(iv + 4); + ctx->cv[2] = vld1q_u32(iv + 8); + ctx->cv[3] = vld1q_u32(iv + 12); +} + +static INLINE void generate_iv(LSH256Neon_Context* ctx, const lsh_u32 hashlenbit) { + lsh_u32 block[32] = {'\0'}; + + lsh_u32 cv[4] = {32, hashlenbit, 0, 0}; + local_memset(ctx->cv, 0, 4 * sizeof(lsh_u32x4)); + ctx->cv[0] = vld1q_u32(cv); + + compress(ctx, (lsh_u8*) block); +} + + + +lsh_err lsh256_neon_init(struct LSH256_Context* ctx, const long algtype) { + LSH256Neon_Context* state = (LSH256Neon_Context*) ctx; + state->algtype = algtype; + state->rbytes = 0; + + switch((lsh_type)algtype) { + case LSH_TYPE_256_224: + load_iv(state, IV224); + break; + + case LSH_TYPE_256_256: + load_iv(state, IV256); + break; + + /* + default: + generate_iv(state, LSH_GET_HASHBIT(algtype)); + break; + */ + } + generate_iv(state, LSH_GET_HASHBIT(algtype)); + + return LSH_SUCCESS; +} + +lsh_err lsh256_neon_update(struct LSH256_Context* ctx, const lsh_u8* data, size_t databytelen) { + + LSH256Neon_Context* ctx_neon = (LSH256Neon_Context*) ctx; + + size_t len_bytes = databytelen; + + size_t rbytes; + size_t rbits; + + if (databytelen == 0) { + return LSH_SUCCESS; + } + + if (ctx == NULL || data == NULL) { + return LSH_ERR_NULL_PTR; + } + + if (ctx->algtype == 0 || LSH_GET_HASHBYTE(ctx->algtype) > LSH256_HASH_VAL_MAX_BYTE_LEN){ + return LSH_ERR_INVALID_STATE; + } + + rbytes = ctx_neon->rbytes; + + if (len_bytes + rbytes < BLK_LEN_BYTE) { + local_memcpy(ctx_neon->block + rbytes, data, len_bytes); + ctx_neon->rbytes += databytelen; + rbytes += len_bytes; + + return LSH_SUCCESS; + } + + if (rbytes > 0) { + size_t more_byte = BLK_LEN_BYTE - rbytes; + local_memcpy(ctx_neon->block + rbytes, data, more_byte); + + compress(ctx_neon, ctx_neon->block); + data += more_byte; + len_bytes -= more_byte; + + rbytes = 0; + ctx_neon->rbytes = 0; + } + + while (len_bytes >= BLK_LEN_BYTE) { + compress(ctx_neon, data); + data += BLK_LEN_BYTE; + len_bytes -= BLK_LEN_BYTE; + } + + if (len_bytes > 0) { + local_memcpy(ctx_neon->block, data, len_bytes); + ctx_neon->rbytes = len_bytes; + } + + return LSH_SUCCESS; +} + +lsh_err lsh256_neon_final(struct LSH256_Context* ctx, lsh_u8* hashval) { + + lsh_u8 buffer[LSH256_HASH_VAL_MAX_BYTE_LEN] = { 0x00, }; + lsh_u32* out = (lsh_u32*) buffer; + LSH256Neon_Context* ctx_neon = (LSH256Neon_Context*) ctx; + lsh_uint outlenbytes = LSH_GET_HASHBYTE(ctx->algtype); + lsh_uint routbits = LSH_GET_SMALL_HASHBIT(ctx->algtype); + + size_t rbytes; + size_t rbits; + + if (ctx == NULL || hashval == NULL) { + return LSH_ERR_NULL_PTR; + } + + if (ctx->algtype == 0 || LSH_GET_HASHBYTE(ctx->algtype) > LSH256_HASH_VAL_MAX_BYTE_LEN){ + return LSH_ERR_INVALID_STATE; + } + + rbytes = ctx_neon->rbytes; + ctx_neon->block[rbytes] = 0x80; + + int pos = rbytes + 1; + if (pos < BLK_LEN_BYTE) { + local_memset(ctx_neon->block + pos, 0, BLK_LEN_BYTE - pos); + } + + compress(ctx_neon, ctx_neon->block); + + // finalize + ctx_neon->cv[0] = veorq_u32(ctx_neon->cv[0], ctx_neon->cv[2]); + ctx_neon->cv[1] = veorq_u32(ctx_neon->cv[1], ctx_neon->cv[3]); + + // copy to output + vst1q_u32(out, ctx_neon->cv[0]); + vst1q_u32(out + 4, ctx_neon->cv[1]); + + local_memcpy(hashval, buffer, sizeof(lsh_u8) * outlenbytes); + if (routbits > 0) { + hashval[outlenbytes-1] &= (((lsh_u8)0xff) << routbits); + } + + return LSH_SUCCESS; +} diff --git a/lsh256/arm64_goat/src/lsh256_neon.h b/lsh256/arm64_goat/src/lsh256_neon.h new file mode 100644 index 0000000..c552ab8 --- /dev/null +++ b/lsh256/arm64_goat/src/lsh256_neon.h @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2016 NSR (National Security Research Institute) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef _LSH256_NEON_H_ +#define _LSH256_NEON_H_ + +#include "lsh.h" +#include "lsh_def.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * 32비트 int 데이터 4개를 묶어 한 번에 처리하기 위한 데이터 타입 + */ +typedef int32x4_t lsh_s32x4; + +/** + * 32비트 unsigned int 데이터 4개를 묶어 한 번에 처리하기 위한 데이터 타입 + */ +typedef uint32x4_t lsh_u32x4; + +/** + * 32비트 unsigned int 데이터 2개를 묶어 한 번에 처리하기 위한 데이터 타입 + */ +typedef uint32x2_t lsh_u32x2; + +/** + * NEON 명령어셋을 이용하여 LSH256 해시 내부 상태를 초기화한다. + * + * @param [in] ctx 해시 내부 상태 구조체 + * @param [in] algtype LSH 알고리즘 명세 + * + * @return LSH_SUCCESS 내부 상태 초기화 성공 + * @return LSH_ERR_NULL_PTR ctx나 hashval이 NULL인 경우 + * @return LSH_ERR_INVALID_STATE 해시 내부 상태값에 오류가 있는 경우 + * @return LSH_ERR_INVALID_DATABITLEN 이전에 입력된 데이터의 길이가 8의 배수가 아닌 경우 + */ +lsh_err lsh256_neon_init(struct LSH256_Context * ctx, const lsh_type algtype); + +/** + * NEON 명령어셋을 이용하여 LSH256 해시 내부 상태를 업데이트한다. + * + * @param [inout] ctx 해시 내부 상태 구조체 + * @param [in] data 해시를 계산할 데이터 + * @param [in] databitlen 데이터 길이 (비트단위) + * + * @return LSH_SUCCESS 업데이트 성공 + * @return LSH_ERR_NULL_PTR ctx나 hashval이 NULL인 경우 + * @return LSH_ERR_INVALID_STATE 해시 내부 상태값에 오류가 있는 경우 + * @return LSH_ERR_INVALID_DATABITLEN 이전에 입력된 데이터의 길이가 8의 배수가 아닌 경우 + */ +lsh_err lsh256_neon_update(struct LSH256_Context * ctx, const lsh_u8 * data, size_t databitlen); + +/** + * NEON 명령어셋을 이용하여 LSH256 해시를 계산한다. + * + * @param [in] ctx 해시 내부 상태 구조체 + * @param [out] hashval 해시가 저장될 버퍼 + * + * @return LSH_SUCCESS 해시 계산 성공 + * @return LSH_ERR_NULL_PTR ctx나 hashval이 NULL인 경우 + * @return LSH_ERR_INVALID_STATE 해시 내부 상태값에 오류가 있는 경우 + */ +lsh_err lsh256_neon_final(struct LSH256_Context * ctx, lsh_u8 * hashval); + +/** + * NEON 명령어셋을 이용하여 LSH256 해시를 계산한다. + * + * @param [in] algtype 알고리즘 명세 + * @param [in] data 데이터 + * @param [in] databitlen 데이터 길이 (비트단위) + * @param [out] hashval 해시가 저장될 버퍼 + * + * @return LSH_SUCCESS 해시 계산 성공 + */ +lsh_err lsh256_neon_digest(const lsh_type algtype, const lsh_u8 * data, size_t databitlen, lsh_u8 * hashval); + +#ifdef __cplusplus +} +#endif + +#endif /* _LSH256_NEON_H_ */ diff --git a/lsh256/arm64_goat/src/lsh256_neon.o b/lsh256/arm64_goat/src/lsh256_neon.o new file mode 100644 index 0000000000000000000000000000000000000000..98cf18a4f650e7d0ca9e6de080a1d8f318bfeb4e GIT binary patch literal 6192 zcmc&&eN=6slm6#YQI4+LM%FJE0J}oP3x~=M& z`P}S1uL}d(-02igFQNIT3XWTm&2M=6g2U%)6$WSpg&Jh`z4~c_VGrSuy;1Dj@^rNj z)L|$|Q4o>`q&m`m*CBfWwYYr`9F4LNgse%ez!{*SML&9x^7M5Gk&V^ztB zHO5GC@(D3W2`M2=orXw_8YwY;5j1PUE5ZFKH-Z?K`7UB(l7V^NH)6sVeWyx}@|<3D zpJY2@j335O^cQd

eP&6ekpg(C>MnJ%}Nt64WVCJWnGu9_GDNFYz@ANBHW56PP=SZ;4a#-lHqsZcp?MQ3fbOrjPRG zE8^s~x_zjV2gpMrP}h_0#rL>W>Z{Wgd^IpnE3);;6MOSjS||Q(X{DPL&!$u{|5>Vp zk1wpzuPi*OcPg~%0}GGqQ&z=7r*Nz}4f=#aw=lj8?^tcqX)<)0oNY;-yubonBhaBpm^Bk(Od8l+|52TYYi7m7qBfe6 zT1CWCkK#Jm4xHguwgYyiv{-pgs#kTeOuwLI2^mEH1eN)koGur3!Bk)(osPSX& z%+fL+&H^XMYx7Ba1Lmh~b!clv8;LM#{LzLrtyt5luIFkJ>s2+-TmEuBY4Q`-pCV5A zr&Nr~KoC#i%NfeT^_59cq>y1>vSM`bj&E=#N3C ztKfn=0vBAeae+TC0vF`tn^oeQF@!by!?xpyYa@+09AVqH%ZNcizkN!anZ}S+pe)uLu8T8=&W<;`FwVBvQ0@D?ZO_WUG0or{$KG6k9bAANbOE~rd#D!d zf$ovR9&Y0KrVtzG*rBnZ0z6ulP-U}+k-q&%HZt5EdbOi$d)JG-`dlmF`w$y$3;Ran z!(731Y(}#0VN2su3H?hQx+yyd$-T3$TL=u!C}7xnK`eCx;IVj}6owsO=Bc z$sQZ3Y_VaaI51MY_}|Bd6Z*5Z*l--N;ix_c_7Ef3gX4QCmNJNe_HQOnq4vO*#u2uO z>j%GoKWHdmiA8F(^ZQ5O$^VYutNuD@P=jZsCMH@9o|P6c(IfE_tsBZ$LwUFe{7QMa z3hNB#;gRN|e4By3!})fkzRz;(v)uVFId=rE?dAS(vU@RevU34@a$vLQ88 ziafQ}odry(GveL6Om!6ErAN#FlhcOSs)esTayKR=GSc~~cQ6k7rSc#-YQz;4AvEq5 z$F!@WRIVgv1!5F@I*-N|Kdg5H=uM=>@3PLtYUFb?PY7mMAx{e z(ubS(F!`huiE9}_?ngv1X5_MALq6(^IaK~6CxEU^NM8(MB#l>6)Z6+a-XXux zAQzUS-5O(yXT~qKv+?Ev$!v3B+#It>nP4tUjy2PG@5n#HZ2Uq>!UdcrAk9nnE{`)0 z%|U6rX$FV&`1PP6eKNYg|72L)wjL}ji~N8NFQEyKRmvqWw|vz**ABqTc1g+$XF_M@%due7lw z@;TTV9TUtbi!)he@tru5lL7m@GZA(QKTwm^hcI_vB62k~?A0+=%8*F>&dSqRqehE- z%+GGS_IU}3Xj2)Jr2b#}T$Yeuu33{A1;2C2SQ8Z0=B4eUwi^WBrX_}vKCZ`lwebCc z&GF!aIPgO3$zJYLTaJyjt%=CT)bItz+UkM9$R~q?^p~=X{v@j04<{7f|J%Sv@p8+- zH{PSa^#p!p`xmAEpRI#~gKa3^qx7QCI{KeV`_PNl(KgzL_N8_I-{a{!IIfc4Z7Dq> z8=n;)6qy}gu<_dZ+{aTovL6PikAAQ-F7R=Pzjlh7+u0X(oXJ{#)bq2xghPMlyvL_6 z8GGj6V*=M@c=$|B%bHPM{~u?PRgG*)ORe^tDIqW9olmk_wvJi7v*qmHoi`Q4DCmnPDVOeg=p`NhGSGk&shK7o7GbKAO&bgm@ zy8Pb2tKQW;+nrOsaNf8#=<9#J=pC9?n)X)mx{`^~;5p`myw+cCxN>UI?zG@=qibE) zb^nCY(vA+vmCwlQ!Qt7vJO7k2@TqpwwtG*CJI?IBGV`;J*S80l9!PGy|9Nxi(!&q( z&w6dV==6z8def%bW7^k_FxFQyPMpZRa(ne_8#A5^^skO=44=_ZXUdwU^I7%x5BjSv zjBRpX;GsUDy_nmY{O#u}4v>y4_TB5>f4HrB+x!Ce%H>z@wJuM6bnP29bYK;aOOiF{x7k!{_I~c?WW7Xo2DSIfXGcVT=j{sS&qEeQl~sQN&N1w z#%yJ}s;Wo5H)_KV%e6C78Z2{PdsOAVINoXBm*H2{yGuUUxvjrq$sddMZd!Zp(55{B z@AMyueedjQpLvJY)smiS_bGuc*76Qzm#;@#;-Yb`f3AG{!xPtHeRi(+#x1w5=hV2F zNuk&DMb2N#L;DsTx_1&#=3oWx|)G%^kCYHg}9Jf9Eg8 zX%nJ~*1lI575nL;@0KRnSX`ijWsA zKpaJ7ownmLZ~QFd98V{=qeceAQJQXy9W_!QPPcSoJ8I~`6^82i@uLmY^aAm(t?RU- zhW>ynvCd5p99`$S9hX%~Y-e7&13+}qRRGbXD+7XObVqS`hpBayK-zu)NZTubwA~vC zf$cr*sF4BDUo!@X{u(I|{WW4B`fH3J4%&Z<9W{ACETzk}qb3!IvryeqJ8DvZSW0KG zqlTW%VJe-@jvB-WdX}f7yb08>toL)H*eyneVRN^zY;GRIF3n}xrKt>SSjw`76o%Cq zSXQ@i6k8^#kcdUs$KD*tu^%{ivR!m*sO-361UZlH5iTE;AZm~w=ykv)z1gM{$|?xm4ti6FlQlF zAzASY=Y?_+HVo&c*)UANP>Q*0*M$qMb`0a}7)lYXVM41N!#F#JQbcR0&}zpp&W@o# G;rcIw2yx2* literal 0 HcmV?d00001 diff --git a/lsh256/arm64_goat/src/lsh256_neon.s b/lsh256/arm64_goat/src/lsh256_neon.s new file mode 100644 index 0000000..94cc8c1 --- /dev/null +++ b/lsh256/arm64_goat/src/lsh256_neon.s @@ -0,0 +1,1344 @@ + .section __TEXT,__text,regular,pure_instructions + .build_version macos, 14, 0 + .section __TEXT,__literal16,16byte_literals + .p2align 4, 0x0 ; -- Begin function lsh256_neon_init +lCPI0_0: + .long 1184960287 ; 0x46a10f1f + .long 4259112070 ; 0xfddce486 + .long 3021226920 ; 0xb41443a8 + .long 428764061 ; 0x198e6b9d +lCPI0_1: + .long 0 ; 0x0 + .long 8 ; 0x8 + .long 16 ; 0x10 + .long 24 ; 0x18 +lCPI0_2: + .long 4294967264 ; 0xffffffe0 + .long 4294967272 ; 0xffffffe8 + .long 4294967280 ; 0xfffffff0 + .long 4294967288 ; 0xfffffff8 +lCPI0_3: + .long 24 ; 0x18 + .long 16 ; 0x10 + .long 8 ; 0x8 + .long 0 ; 0x0 +lCPI0_4: + .long 4294967288 ; 0xfffffff8 + .long 4294967280 ; 0xfffffff0 + .long 4294967272 ; 0xffffffe8 + .long 4294967264 ; 0xffffffe0 + .section __TEXT,__text,regular,pure_instructions + .globl _lsh256_neon_init + .p2align 2 +_lsh256_neon_init: ; @lsh256_neon_init +; %bb.0: + stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill + mov x29, sp + str w1, [x0] + str wzr, [x0, #16] + cmp w1, #32 + b.ne LBB0_2 +; %bb.1: +Lloh0: + adrp x8, lCPI0_0@PAGE +Lloh1: + ldr q0, [x8, lCPI0_0@PAGEOFF] + str q0, [x0, #32] +LBB0_2: + mov x8, #0 ; =0x0 + ubfiz w9, w1, #3, #16 + lsr x10, x1, #24 + sub w9, w9, w10 + mov w10, #32 ; =0x20 + fmov s20, w10 + mov.s v20[1], w9 + mov.s v20[2], wzr + mov.s v20[3], wzr + movi.2d v3, #0000000000000000 +Lloh2: + adrp x9, lCPI0_1@PAGE +Lloh3: + ldr q0, [x9, lCPI0_1@PAGEOFF] +Lloh4: + adrp x9, lCPI0_2@PAGE +Lloh5: + ldr q1, [x9, lCPI0_2@PAGEOFF] +Lloh6: + adrp x9, lCPI0_3@PAGE +Lloh7: + ldr q2, [x9, lCPI0_3@PAGEOFF] + movi.2d v4, #0000000000000000 + movi.2d v23, #0000000000000000 + movi.2d v5, #0000000000000000 + movi.2d v21, #0000000000000000 +Lloh8: + adrp x9, lCPI0_4@PAGE +Lloh9: + ldr q7, [x9, lCPI0_4@PAGEOFF] +Lloh10: + adrp x9, _STEP256@PAGE +Lloh11: + add x9, x9, _STEP256@PAGEOFF + movi.2d v6, #0000000000000000 + movi.2d v22, #0000000000000000 + movi.2d v18, #0000000000000000 + movi.2d v19, #0000000000000000 + movi.2d v16, #0000000000000000 + movi.2d v17, #0000000000000000 +LBB0_3: ; =>This Inner Loop Header: Depth=1 + add x10, x9, x8 + ldp q24, q25, [x10] + eor.16b v20, v20, v3 + eor.16b v23, v23, v4 + eor.16b v21, v21, v5 + eor.16b v22, v22, v6 + add.4s v20, v21, v20 + add.4s v23, v22, v23 + shl.4s v26, v20, #29 + sri.4s v26, v20, #3 + shl.4s v20, v23, #29 + sri.4s v20, v23, #3 + eor.16b v23, v26, v24 + eor.16b v20, v20, v25 + add.4s v21, v23, v21 + add.4s v22, v20, v22 + add.4s v24, v21, v21 + sri.4s v24, v21, #31 + add.4s v21, v22, v22 + sri.4s v21, v22, #31 + add.4s v22, v24, v23 + add.4s v20, v21, v20 + ushl.4s v23, v24, v0 + ushl.4s v24, v24, v1 + eor.16b v23, v24, v23 + ushl.4s v24, v21, v2 + ushl.4s v21, v21, v7 + eor.16b v21, v21, v24 + ext.16b v24, v22, v22, #8 + rev64.2s v24, v24 + ext.8b v25, v22, v24, #4 + ext.8b v22, v24, v22, #4 + mov.d v22[1], v25[0] + ext.16b v24, v20, v20, #8 + rev64.2s v24, v24 + ext.8b v25, v20, v24, #4 + ext.8b v20, v24, v20, #4 + mov.d v20[1], v25[0] + ext.16b v23, v23, v23, #12 + rev64.4s v23, v23 + ext.16b v21, v21, v21, #12 + rev64.4s v21, v21 + ext.16b v24, v3, v3, #8 + rev64.2s v24, v24 + mov.d v24[1], v3[0] + ext.16b v3, v5, v5, #8 + rev64.2s v25, v3 + mov.d v25[1], v5[0] + ext.16b v4, v4, v4, #12 + ext.16b v6, v6, v6, #12 + add.4s v3, v18, v24 + add.4s v4, v19, v4 + add.4s v5, v16, v25 + add.4s v6, v17, v6 + ldp q24, q25, [x10, #32] + eor.16b v20, v20, v18 + eor.16b v21, v21, v19 + eor.16b v22, v22, v16 + eor.16b v23, v23, v17 + add.4s v20, v20, v22 + add.4s v21, v21, v23 + shl.4s v26, v20, #5 + sri.4s v26, v20, #27 + shl.4s v20, v21, #5 + sri.4s v20, v21, #27 + eor.16b v21, v26, v24 + eor.16b v20, v20, v25 + add.4s v22, v21, v22 + add.4s v23, v20, v23 + shl.4s v24, v22, #17 + sri.4s v24, v22, #15 + shl.4s v22, v23, #17 + sri.4s v22, v23, #15 + add.4s v21, v24, v21 + add.4s v20, v22, v20 + ushl.4s v23, v24, v0 + ushl.4s v24, v24, v1 + eor.16b v23, v24, v23 + ushl.4s v24, v22, v2 + ushl.4s v22, v22, v7 + eor.16b v24, v22, v24 + ext.16b v22, v21, v21, #8 + rev64.2s v22, v22 + ext.8b v25, v21, v22, #4 + ext.8b v21, v22, v21, #4 + mov.d v21[1], v25[0] + ext.16b v22, v20, v20, #8 + rev64.2s v22, v22 + ext.8b v25, v20, v22, #4 + ext.8b v20, v22, v20, #4 + mov.d v20[1], v25[0] + ext.16b v22, v23, v23, #12 + rev64.4s v22, v22 + ext.16b v23, v24, v24, #12 + rev64.4s v23, v23 + ext.16b v24, v18, v18, #8 + rev64.2s v24, v24 + mov.d v24[1], v18[0] + ext.16b v19, v19, v19, #12 + ext.16b v18, v16, v16, #8 + rev64.2s v25, v18 + mov.d v25[1], v16[0] + ext.16b v17, v17, v17, #12 + add.4s v18, v24, v3 + add.4s v19, v4, v19 + add.4s v16, v25, v5 + add.4s v17, v17, v6 + add x8, x8, #64 + cmp w8, #832 + b.ne LBB0_3 +; %bb.4: + eor.16b v0, v20, v3 + eor.16b v1, v23, v4 + stp q0, q1, [x0, #32] + eor.16b v0, v21, v5 + eor.16b v1, v22, v6 + stp q0, q1, [x0, #64] + mov w0, #0 ; =0x0 + ldp x29, x30, [sp], #16 ; 16-byte Folded Reload + ret + .loh AdrpLdr Lloh0, Lloh1 + .loh AdrpAdd Lloh10, Lloh11 + .loh AdrpAdrp Lloh8, Lloh10 + .loh AdrpLdr Lloh8, Lloh9 + .loh AdrpAdrp Lloh6, Lloh8 + .loh AdrpLdr Lloh6, Lloh7 + .loh AdrpAdrp Lloh4, Lloh6 + .loh AdrpLdr Lloh4, Lloh5 + .loh AdrpAdrp Lloh2, Lloh4 + .loh AdrpLdr Lloh2, Lloh3 + ; -- End function + .section __TEXT,__literal16,16byte_literals + .p2align 4, 0x0 ; -- Begin function lsh256_neon_update +lCPI1_0: + .long 0 ; 0x0 + .long 8 ; 0x8 + .long 16 ; 0x10 + .long 24 ; 0x18 +lCPI1_1: + .long 4294967264 ; 0xffffffe0 + .long 4294967272 ; 0xffffffe8 + .long 4294967280 ; 0xfffffff0 + .long 4294967288 ; 0xfffffff8 +lCPI1_2: + .long 24 ; 0x18 + .long 16 ; 0x10 + .long 8 ; 0x8 + .long 0 ; 0x0 +lCPI1_3: + .long 4294967288 ; 0xfffffff8 + .long 4294967280 ; 0xfffffff0 + .long 4294967272 ; 0xffffffe8 + .long 4294967264 ; 0xffffffe0 + .section __TEXT,__text,regular,pure_instructions + .globl _lsh256_neon_update + .p2align 2 +_lsh256_neon_update: ; @lsh256_neon_update +; %bb.0: + cbz x2, LBB1_9 +; %bb.1: + mov w8, #9217 ; =0x2401 + cbz x0, LBB1_10 +; %bb.2: + cbz x1, LBB1_10 +; %bb.3: + ldr w9, [x0] + mov w8, #9220 ; =0x2404 + cbz w9, LBB1_10 +; %bb.4: + and w9, w9, #0xffff + cmp w9, #32 + b.hi LBB1_10 +; %bb.5: + stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill + mov x29, sp + ldr w15, [x0, #16] + add x8, x15, x2 + cmp x8, #127 + b.hi LBB1_11 +; %bb.6: + add x8, x0, x15 + add x8, x8, #96 + cmp x2, #4 + b.hi LBB1_16 +; %bb.7: + ldrb w9, [x1] + strb w9, [x8] + sub x9, x2, #1 + ldrb w10, [x1, x9] + strb w10, [x8, x9] + cmp x2, #3 + b.lo LBB1_30 +; %bb.8: + ldrb w9, [x1, #1] + strb w9, [x8, #1] + ldrb w9, [x1, #2] + strb w9, [x8, #2] + b LBB1_30 +LBB1_9: + mov w8, #0 ; =0x0 +LBB1_10: + mov x0, x8 + ret +LBB1_11: + adrp x9, lCPI1_0@PAGE + adrp x10, lCPI1_1@PAGE + adrp x11, lCPI1_2@PAGE + adrp x12, lCPI1_3@PAGE +Lloh12: + adrp x8, _STEP256@PAGE +Lloh13: + add x8, x8, _STEP256@PAGEOFF + cbz w15, LBB1_39 +; %bb.12: + mov w13, #128 ; =0x80 + sub x13, x13, x15 + add x14, x0, x15 + add x14, x14, #96 + cmp x13, #4 + b.hi LBB1_19 +; %bb.13: + cmp w15, #128 + b.eq LBB1_36 +; %bb.14: + ldrb w16, [x1] + strb w16, [x14] + sub x15, x1, x15 + ldrb w15, [x15, #127] + strb w15, [x0, #223] + cmp x13, #3 + b.lo LBB1_36 +; %bb.15: + ldrb w15, [x1, #1] + strb w15, [x14, #1] + ldrb w15, [x1, #2] + strb w15, [x14, #2] + b LBB1_36 +LBB1_16: + add x9, x1, x2 + add x10, x8, x2 + cmp x2, #16 + b.hi LBB1_22 +; %bb.17: + cmp x2, #8 + b.lo LBB1_26 +; %bb.18: + ldr x11, [x1] + str x11, [x8] + ldur x8, [x9, #-8] + stur x8, [x10, #-8] + b LBB1_30 +LBB1_19: + add x15, x1, x13 + cmp x13, #16 + b.hi LBB1_24 +; %bb.20: + cmp x13, #8 + b.lo LBB1_32 +; %bb.21: + ldr x16, [x1] + str x16, [x14] + ldur x14, [x15, #-8] + str x14, [x0, #216] + b LBB1_36 +LBB1_22: + cmp x2, #32 + b.hi LBB1_27 +; %bb.23: + ldr q0, [x1] + str q0, [x8] + ldur q0, [x9, #-16] + stur q0, [x10, #-16] + b LBB1_30 +LBB1_24: + cmp x13, #32 + b.hi LBB1_33 +; %bb.25: + ldr q0, [x1] + str q0, [x14] + ldur q0, [x15, #-16] + str q0, [x0, #208] + b LBB1_36 +LBB1_26: + ldr w11, [x1] + str w11, [x8] + ldur w8, [x9, #-4] + stur w8, [x10, #-4] + b LBB1_30 +LBB1_27: + sub x10, x10, #32 +LBB1_28: ; =>This Inner Loop Header: Depth=1 + ldp q0, q1, [x1], #32 + stp q0, q1, [x8], #32 + cmp x8, x10 + b.lo LBB1_28 +; %bb.29: + ldp q0, q1, [x9, #-32] + stp q0, q1, [x10] +LBB1_30: + ldr w8, [x0, #16] + add w2, w8, w2 +LBB1_31: + mov w8, #0 ; =0x0 + str w2, [x0, #16] + ldp x29, x30, [sp], #16 ; 16-byte Folded Reload + mov x0, x8 + ret +LBB1_32: + ldr w16, [x1] + str w16, [x14] + ldur w14, [x15, #-4] + str w14, [x0, #220] + b LBB1_36 +LBB1_33: + add x16, x0, #192 + mov x17, x1 +LBB1_34: ; =>This Inner Loop Header: Depth=1 + ldp q0, q1, [x17], #32 + stp q0, q1, [x14], #32 + cmp x14, x16 + b.lo LBB1_34 +; %bb.35: + ldp q0, q1, [x15, #-32] + stp q0, q1, [x16] +LBB1_36: + mov x14, #0 ; =0x0 + ldp q3, q1, [x0, #96] + ldp q2, q0, [x0, #128] + ldp q16, q18, [x0, #160] + ldp q4, q5, [x0, #192] + ldp q22, q23, [x0, #32] + ldp q20, q21, [x0, #64] + ldr q6, [x9, lCPI1_0@PAGEOFF] + ldr q7, [x10, lCPI1_1@PAGEOFF] + ldr q17, [x11, lCPI1_2@PAGEOFF] + ldr q19, [x12, lCPI1_3@PAGEOFF] +LBB1_37: ; =>This Inner Loop Header: Depth=1 + add x15, x8, x14 + ldp q24, q25, [x15] + eor.16b v22, v22, v3 + eor.16b v23, v23, v1 + eor.16b v20, v20, v2 + eor.16b v21, v21, v0 + add.4s v22, v20, v22 + add.4s v23, v21, v23 + shl.4s v26, v22, #29 + sri.4s v26, v22, #3 + shl.4s v22, v23, #29 + sri.4s v22, v23, #3 + eor.16b v23, v26, v24 + eor.16b v22, v22, v25 + add.4s v20, v23, v20 + add.4s v21, v22, v21 + add.4s v24, v20, v20 + sri.4s v24, v20, #31 + add.4s v20, v21, v21 + sri.4s v20, v21, #31 + add.4s v21, v24, v23 + add.4s v22, v20, v22 + ushl.4s v23, v24, v6 + ushl.4s v24, v24, v7 + eor.16b v23, v24, v23 + ushl.4s v24, v20, v17 + ushl.4s v20, v20, v19 + eor.16b v20, v20, v24 + ext.16b v24, v21, v21, #8 + rev64.2s v24, v24 + ext.8b v25, v21, v24, #4 + ext.8b v21, v24, v21, #4 + mov.d v21[1], v25[0] + ext.16b v24, v22, v22, #8 + rev64.2s v24, v24 + ext.8b v25, v22, v24, #4 + ext.8b v22, v24, v22, #4 + mov.d v22[1], v25[0] + ext.16b v23, v23, v23, #12 + rev64.4s v23, v23 + ext.16b v20, v20, v20, #12 + rev64.4s v20, v20 + ext.16b v24, v3, v3, #8 + rev64.2s v24, v24 + mov.d v24[1], v3[0] + ext.16b v3, v2, v2, #8 + rev64.2s v25, v3 + mov.d v25[1], v2[0] + ext.16b v1, v1, v1, #12 + ext.16b v0, v0, v0, #12 + add.4s v3, v16, v24 + add.4s v1, v18, v1 + add.4s v2, v4, v25 + add.4s v0, v5, v0 + ldp q24, q25, [x15, #32] + eor.16b v22, v22, v16 + eor.16b v20, v20, v18 + eor.16b v21, v21, v4 + eor.16b v23, v23, v5 + add.4s v22, v22, v21 + add.4s v20, v20, v23 + shl.4s v26, v22, #5 + sri.4s v26, v22, #27 + shl.4s v22, v20, #5 + sri.4s v22, v20, #27 + eor.16b v20, v26, v24 + eor.16b v22, v22, v25 + add.4s v21, v20, v21 + add.4s v23, v22, v23 + shl.4s v24, v21, #17 + sri.4s v24, v21, #15 + shl.4s v21, v23, #17 + sri.4s v21, v23, #15 + add.4s v20, v24, v20 + add.4s v22, v21, v22 + ushl.4s v23, v24, v6 + ushl.4s v24, v24, v7 + eor.16b v23, v24, v23 + ushl.4s v24, v21, v17 + ushl.4s v21, v21, v19 + eor.16b v24, v21, v24 + ext.16b v21, v20, v20, #8 + rev64.2s v21, v21 + ext.8b v25, v20, v21, #4 + ext.8b v20, v21, v20, #4 + mov.d v20[1], v25[0] + ext.16b v21, v22, v22, #8 + rev64.2s v21, v21 + ext.8b v25, v22, v21, #4 + ext.8b v22, v21, v22, #4 + mov.d v22[1], v25[0] + ext.16b v21, v23, v23, #12 + rev64.4s v21, v21 + ext.16b v23, v24, v24, #12 + rev64.4s v23, v23 + ext.16b v24, v16, v16, #8 + rev64.2s v24, v24 + mov.d v24[1], v16[0] + ext.16b v18, v18, v18, #12 + ext.16b v16, v4, v4, #8 + rev64.2s v25, v16 + mov.d v25[1], v4[0] + ext.16b v5, v5, v5, #12 + add.4s v16, v24, v3 + add.4s v18, v1, v18 + add.4s v4, v25, v2 + add.4s v5, v5, v0 + add x14, x14, #64 + cmp w14, #832 + b.ne LBB1_37 +; %bb.38: + eor.16b v3, v22, v3 + eor.16b v1, v23, v1 + stp q3, q1, [x0, #32] + eor.16b v1, v20, v2 + eor.16b v0, v21, v0 + stp q1, q0, [x0, #64] + add x1, x1, x13 + sub x2, x2, x13 + str wzr, [x0, #16] +LBB1_39: + cmp x2, #128 + b.lo LBB1_44 +; %bb.40: + ldp q21, q23, [x0, #32] + ldp q20, q22, [x0, #64] + ldr q0, [x9, lCPI1_0@PAGEOFF] + ldr q1, [x10, lCPI1_1@PAGEOFF] + ldr q2, [x11, lCPI1_2@PAGEOFF] + ldr q3, [x12, lCPI1_3@PAGEOFF] +LBB1_41: ; =>This Loop Header: Depth=1 + ; Child Loop BB1_42 Depth 2 + mov x9, #0 ; =0x0 + ldp q7, q5, [x1] + ldp q6, q4, [x1, #32] + ldp q18, q19, [x1, #64] + ldp q16, q17, [x1, #96] +LBB1_42: ; Parent Loop BB1_41 Depth=1 + ; => This Inner Loop Header: Depth=2 + add x10, x8, x9 + ldp q24, q25, [x10] + eor.16b v21, v21, v7 + eor.16b v23, v23, v5 + eor.16b v20, v20, v6 + eor.16b v22, v22, v4 + add.4s v21, v20, v21 + add.4s v23, v22, v23 + shl.4s v26, v21, #29 + sri.4s v26, v21, #3 + shl.4s v21, v23, #29 + sri.4s v21, v23, #3 + eor.16b v23, v26, v24 + eor.16b v21, v21, v25 + add.4s v20, v23, v20 + add.4s v22, v21, v22 + add.4s v24, v20, v20 + sri.4s v24, v20, #31 + add.4s v20, v22, v22 + sri.4s v20, v22, #31 + add.4s v22, v24, v23 + add.4s v21, v20, v21 + ushl.4s v23, v24, v0 + ushl.4s v24, v24, v1 + eor.16b v23, v24, v23 + ushl.4s v24, v20, v2 + ushl.4s v20, v20, v3 + eor.16b v20, v20, v24 + ext.16b v24, v22, v22, #8 + rev64.2s v24, v24 + ext.8b v25, v22, v24, #4 + ext.8b v22, v24, v22, #4 + mov.d v22[1], v25[0] + ext.16b v24, v21, v21, #8 + rev64.2s v24, v24 + ext.8b v25, v21, v24, #4 + ext.8b v21, v24, v21, #4 + mov.d v21[1], v25[0] + ext.16b v23, v23, v23, #12 + rev64.4s v23, v23 + ext.16b v20, v20, v20, #12 + rev64.4s v20, v20 + ext.16b v24, v7, v7, #8 + rev64.2s v24, v24 + mov.d v24[1], v7[0] + ext.16b v7, v6, v6, #8 + rev64.2s v25, v7 + mov.d v25[1], v6[0] + ext.16b v5, v5, v5, #12 + ext.16b v4, v4, v4, #12 + add.4s v7, v18, v24 + add.4s v5, v19, v5 + add.4s v6, v16, v25 + add.4s v4, v17, v4 + ldp q24, q25, [x10, #32] + eor.16b v21, v21, v18 + eor.16b v20, v20, v19 + eor.16b v22, v22, v16 + eor.16b v23, v23, v17 + add.4s v21, v21, v22 + add.4s v20, v20, v23 + shl.4s v26, v21, #5 + sri.4s v26, v21, #27 + shl.4s v21, v20, #5 + sri.4s v21, v20, #27 + eor.16b v20, v26, v24 + eor.16b v21, v21, v25 + add.4s v22, v20, v22 + add.4s v23, v21, v23 + shl.4s v24, v22, #17 + sri.4s v24, v22, #15 + shl.4s v22, v23, #17 + sri.4s v22, v23, #15 + add.4s v20, v24, v20 + add.4s v21, v22, v21 + ushl.4s v23, v24, v0 + ushl.4s v24, v24, v1 + eor.16b v23, v24, v23 + ushl.4s v24, v22, v2 + ushl.4s v22, v22, v3 + eor.16b v24, v22, v24 + ext.16b v22, v20, v20, #8 + rev64.2s v22, v22 + ext.8b v25, v20, v22, #4 + ext.8b v20, v22, v20, #4 + mov.d v20[1], v25[0] + ext.16b v22, v21, v21, #8 + rev64.2s v22, v22 + ext.8b v25, v21, v22, #4 + ext.8b v21, v22, v21, #4 + mov.d v21[1], v25[0] + ext.16b v22, v23, v23, #12 + rev64.4s v22, v22 + ext.16b v23, v24, v24, #12 + rev64.4s v23, v23 + ext.16b v24, v18, v18, #8 + rev64.2s v24, v24 + mov.d v24[1], v18[0] + ext.16b v19, v19, v19, #12 + ext.16b v18, v16, v16, #8 + rev64.2s v25, v18 + mov.d v25[1], v16[0] + ext.16b v17, v17, v17, #12 + add.4s v18, v24, v7 + add.4s v19, v5, v19 + add.4s v16, v25, v6 + add.4s v17, v17, v4 + add x9, x9, #64 + cmp w9, #832 + b.ne LBB1_42 +; %bb.43: ; in Loop: Header=BB1_41 Depth=1 + eor.16b v21, v21, v7 + eor.16b v23, v23, v5 + stp q21, q23, [x0, #32] + eor.16b v20, v20, v6 + eor.16b v22, v22, v4 + stp q20, q22, [x0, #64] + add x1, x1, #128 + sub x2, x2, #128 + cmp x2, #127 + b.hi LBB1_41 +LBB1_44: + cbz x2, LBB1_48 +; %bb.45: + add x8, x0, #96 + cmp x2, #4 + b.hi LBB1_49 +; %bb.46: + ldrb w9, [x1] + strb w9, [x8] + sub x9, x2, #1 + ldrb w10, [x1, x9] + strb w10, [x8, x9] + cmp x2, #3 + b.lo LBB1_31 +; %bb.47: + ldrb w8, [x1, #1] + strb w8, [x0, #97] + ldrb w8, [x1, #2] + strb w8, [x0, #98] + mov w8, #0 ; =0x0 + str w2, [x0, #16] + ldp x29, x30, [sp], #16 ; 16-byte Folded Reload + mov x0, x8 + ret +LBB1_48: + mov w8, #0 ; =0x0 + ldp x29, x30, [sp], #16 ; 16-byte Folded Reload + mov x0, x8 + ret +LBB1_49: + add x9, x1, x2 + add x10, x8, x2 + cmp x2, #16 + b.hi LBB1_52 +; %bb.50: + cmp x2, #8 + b.lo LBB1_54 +; %bb.51: + ldr x11, [x1] + str x11, [x8] + ldur x8, [x9, #-8] + stur x8, [x10, #-8] + mov w8, #0 ; =0x0 + str w2, [x0, #16] + ldp x29, x30, [sp], #16 ; 16-byte Folded Reload + mov x0, x8 + ret +LBB1_52: + cmp x2, #32 + b.hi LBB1_55 +; %bb.53: + ldr q0, [x1] + str q0, [x8] + ldur q0, [x9, #-16] + stur q0, [x10, #-16] + mov w8, #0 ; =0x0 + str w2, [x0, #16] + ldp x29, x30, [sp], #16 ; 16-byte Folded Reload + mov x0, x8 + ret +LBB1_54: + ldr w11, [x1] + str w11, [x8] + ldur w8, [x9, #-4] + stur w8, [x10, #-4] + mov w8, #0 ; =0x0 + str w2, [x0, #16] + ldp x29, x30, [sp], #16 ; 16-byte Folded Reload + mov x0, x8 + ret +LBB1_55: + sub x10, x10, #32 +LBB1_56: ; =>This Inner Loop Header: Depth=1 + ldp q0, q1, [x1], #32 + stp q0, q1, [x8], #32 + cmp x8, x10 + b.lo LBB1_56 +; %bb.57: + ldp q0, q1, [x9, #-32] + stp q0, q1, [x10] + mov w8, #0 ; =0x0 + str w2, [x0, #16] + ldp x29, x30, [sp], #16 ; 16-byte Folded Reload + mov x0, x8 + ret + .loh AdrpAdd Lloh12, Lloh13 + ; -- End function + .section __TEXT,__literal16,16byte_literals + .p2align 4, 0x0 ; -- Begin function lsh256_neon_final +lCPI2_0: + .long 0 ; 0x0 + .long 8 ; 0x8 + .long 16 ; 0x10 + .long 24 ; 0x18 +lCPI2_1: + .long 4294967264 ; 0xffffffe0 + .long 4294967272 ; 0xffffffe8 + .long 4294967280 ; 0xfffffff0 + .long 4294967288 ; 0xfffffff8 +lCPI2_2: + .long 24 ; 0x18 + .long 16 ; 0x10 + .long 8 ; 0x8 + .long 0 ; 0x0 +lCPI2_3: + .long 4294967288 ; 0xfffffff8 + .long 4294967280 ; 0xfffffff0 + .long 4294967272 ; 0xffffffe8 + .long 4294967264 ; 0xffffffe0 + .section __TEXT,__text,regular,pure_instructions + .globl _lsh256_neon_final + .p2align 2 +_lsh256_neon_final: ; @lsh256_neon_final +; %bb.0: + stp x24, x23, [sp, #-64]! ; 16-byte Folded Spill + stp x22, x21, [sp, #16] ; 16-byte Folded Spill + stp x20, x19, [sp, #32] ; 16-byte Folded Spill + stp x29, x30, [sp, #48] ; 16-byte Folded Spill + add x29, sp, #48 + sub x9, sp, #48 + and sp, x9, #0xfffffffffffffff0 +Lloh14: + adrp x8, ___stack_chk_guard@GOTPAGE +Lloh15: + ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF] +Lloh16: + ldr x8, [x8] + str x8, [sp, #40] + cbz x1, LBB2_8 +; %bb.1: + mov x20, x0 + ldr w21, [x0] + mov w0, #9220 ; =0x2404 + cbz w21, LBB2_27 +; %bb.2: + and x22, x21, #0xffff + cmp w22, #32 + b.hi LBB2_27 +; %bb.3: + mov x19, x1 + ubfx x23, x21, #24, #8 + ldr w8, [x20, #16] + add x10, x20, #96 + mov w9, #128 ; =0x80 + strb w9, [x10, x8] + add w9, w8, #1 + cmp w9, #127 + b.hi LBB2_15 +; %bb.4: + add x0, x10, x9 + mov w10, #127 ; =0x7f + sub w8, w10, w8 + cmp w8, #31 + b.hi LBB2_9 +; %bb.5: + cmp w8, #4 + b.hi LBB2_10 +; %bb.6: + strb wzr, [x0] + add x9, x8, x0 + sturb wzr, [x9, #-1] + cmp w8, #3 + b.lo LBB2_15 +; %bb.7: + sturh wzr, [x0, #1] + b LBB2_15 +LBB2_8: + mov w0, #9217 ; =0x2401 + b LBB2_27 +LBB2_9: + add x24, x0, x8 + add x9, x20, x9 + add x8, x9, x8 + add x8, x8, #64 + add x10, x9, #128 + cmp x8, x10 + csel x8, x8, x10, hi + sub x8, x8, x9 + sub x8, x8, #97 + and x8, x8, #0xffffffffffffffe0 + add x1, x8, #32 + bl _bzero + movi.2d v0, #0000000000000000 + stp q0, q0, [x24, #-32] + b LBB2_15 +LBB2_10: + cmp w8, #16 + b.hi LBB2_13 +; %bb.11: + add x9, x0, x8 + cmp w8, #8 + b.lo LBB2_14 +; %bb.12: + str xzr, [x0] + stur xzr, [x9, #-8] + b LBB2_15 +LBB2_13: + add x8, x0, x8 + movi.2d v0, #0000000000000000 + stur q0, [x8, #-16] + str q0, [x0] + b LBB2_15 +LBB2_14: + str wzr, [x0] + stur wzr, [x9, #-4] +LBB2_15: + mov x8, #0 ; =0x0 + ldp q3, q0, [x20, #96] + ldp q2, q1, [x20, #128] + ldp q6, q16, [x20, #160] + ldp q4, q5, [x20, #192] + ldp q20, q21, [x20, #32] +Lloh17: + adrp x9, lCPI2_0@PAGE +Lloh18: + ldr q7, [x9, lCPI2_0@PAGEOFF] +Lloh19: + adrp x9, lCPI2_1@PAGE +Lloh20: + ldr q17, [x9, lCPI2_1@PAGEOFF] +Lloh21: + adrp x9, lCPI2_2@PAGE +Lloh22: + ldr q18, [x9, lCPI2_2@PAGEOFF] +Lloh23: + adrp x9, lCPI2_3@PAGE +Lloh24: + ldr q19, [x9, lCPI2_3@PAGEOFF] +Lloh25: + adrp x9, _STEP256@PAGE +Lloh26: + add x9, x9, _STEP256@PAGEOFF + ldp q22, q23, [x20, #64] +LBB2_16: ; =>This Inner Loop Header: Depth=1 + add x10, x9, x8 + ldp q24, q25, [x10] + eor.16b v20, v20, v3 + eor.16b v21, v21, v0 + eor.16b v22, v22, v2 + eor.16b v23, v23, v1 + add.4s v20, v22, v20 + add.4s v21, v23, v21 + shl.4s v26, v20, #29 + sri.4s v26, v20, #3 + shl.4s v20, v21, #29 + sri.4s v20, v21, #3 + eor.16b v21, v26, v24 + eor.16b v20, v20, v25 + add.4s v22, v21, v22 + add.4s v23, v20, v23 + add.4s v24, v22, v22 + sri.4s v24, v22, #31 + add.4s v22, v23, v23 + sri.4s v22, v23, #31 + add.4s v21, v24, v21 + add.4s v20, v22, v20 + ushl.4s v23, v24, v7 + ushl.4s v24, v24, v17 + eor.16b v23, v24, v23 + ushl.4s v24, v22, v18 + ushl.4s v22, v22, v19 + eor.16b v22, v22, v24 + ext.16b v24, v21, v21, #8 + rev64.2s v24, v24 + ext.8b v25, v21, v24, #4 + ext.8b v21, v24, v21, #4 + mov.d v21[1], v25[0] + ext.16b v24, v20, v20, #8 + rev64.2s v24, v24 + ext.8b v25, v20, v24, #4 + ext.8b v20, v24, v20, #4 + mov.d v20[1], v25[0] + ext.16b v23, v23, v23, #12 + rev64.4s v23, v23 + ext.16b v22, v22, v22, #12 + rev64.4s v22, v22 + ext.16b v24, v3, v3, #8 + rev64.2s v24, v24 + mov.d v24[1], v3[0] + ext.16b v3, v2, v2, #8 + rev64.2s v25, v3 + mov.d v25[1], v2[0] + ext.16b v0, v0, v0, #12 + ext.16b v1, v1, v1, #12 + add.4s v3, v6, v24 + add.4s v0, v16, v0 + add.4s v2, v4, v25 + add.4s v1, v5, v1 + ldp q24, q25, [x10, #32] + eor.16b v20, v20, v6 + eor.16b v22, v22, v16 + eor.16b v21, v21, v4 + eor.16b v23, v23, v5 + add.4s v20, v20, v21 + add.4s v22, v22, v23 + shl.4s v26, v20, #5 + sri.4s v26, v20, #27 + shl.4s v20, v22, #5 + sri.4s v20, v22, #27 + eor.16b v22, v26, v24 + eor.16b v20, v20, v25 + add.4s v21, v22, v21 + add.4s v23, v20, v23 + shl.4s v24, v21, #17 + sri.4s v24, v21, #15 + shl.4s v21, v23, #17 + sri.4s v21, v23, #15 + add.4s v22, v24, v22 + add.4s v20, v21, v20 + ushl.4s v23, v24, v7 + ushl.4s v24, v24, v17 + eor.16b v23, v24, v23 + ushl.4s v24, v21, v18 + ushl.4s v21, v21, v19 + eor.16b v21, v21, v24 + ext.16b v24, v22, v22, #8 + rev64.2s v24, v24 + ext.8b v25, v22, v24, #4 + ext.8b v22, v24, v22, #4 + mov.d v22[1], v25[0] + ext.16b v24, v20, v20, #8 + rev64.2s v24, v24 + ext.8b v25, v20, v24, #4 + ext.8b v20, v24, v20, #4 + mov.d v20[1], v25[0] + ext.16b v23, v23, v23, #12 + rev64.4s v23, v23 + ext.16b v21, v21, v21, #12 + rev64.4s v21, v21 + ext.16b v24, v6, v6, #8 + rev64.2s v24, v24 + mov.d v24[1], v6[0] + ext.16b v16, v16, v16, #12 + ext.16b v6, v4, v4, #8 + rev64.2s v25, v6 + mov.d v25[1], v4[0] + ext.16b v5, v5, v5, #12 + add.4s v6, v24, v3 + add.4s v16, v0, v16 + add.4s v4, v25, v2 + add.4s v5, v5, v1 + add x8, x8, #64 + cmp w8, #832 + b.ne LBB2_16 +; %bb.17: + eor.16b v2, v22, v2 + eor.16b v4, v23, v1 + stp q2, q4, [x20, #64] + eor3.16b v1, v20, v3, v2 + eor3.16b v0, v21, v0, v4 + stp q1, q0, [x20, #32] + stp q1, q0, [sp] + fmov w8, s1 + cmp w22, #4 + b.hi LBB2_21 +; %bb.18: + cbz w22, LBB2_25 +; %bb.19: + strb w8, [x19] + sub x8, x22, #1 + mov x9, sp + ldrb w9, [x9, x8] + strb w9, [x19, x8] + cmp w22, #3 + b.lo LBB2_25 +; %bb.20: + umov.b w8, v1[1] + umov.b w9, v1[2] + strb w8, [x19, #1] + strb w9, [x19, #2] + mov w0, #0 ; =0x0 + lsr w8, w21, #24 + cbnz w8, LBB2_26 + b LBB2_27 +LBB2_21: + mov x9, sp + add x10, x9, x22 + add x9, x19, x22 + cmp w22, #16 + b.hi LBB2_24 +; %bb.22: + cmp w22, #8 + b.lo LBB2_29 +; %bb.23: + fmov x8, d1 + str x8, [x19] + ldur x8, [x10, #-8] + stur x8, [x9, #-8] + mov w0, #0 ; =0x0 + lsr w8, w21, #24 + cbnz w8, LBB2_26 + b LBB2_27 +LBB2_24: + str q1, [x19] + ldur q0, [x10, #-16] + stur q0, [x9, #-16] +LBB2_25: + mov w0, #0 ; =0x0 + lsr w8, w21, #24 + cbz w8, LBB2_27 +LBB2_26: + mov w8, #255 ; =0xff + lsl w8, w8, w23 + sub w9, w22, #1 + ldrb w10, [x19, x9] + and w8, w10, w8 + strb w8, [x19, x9] +LBB2_27: + ldr x8, [sp, #40] +Lloh27: + adrp x9, ___stack_chk_guard@GOTPAGE +Lloh28: + ldr x9, [x9, ___stack_chk_guard@GOTPAGEOFF] +Lloh29: + ldr x9, [x9] + cmp x9, x8 + b.ne LBB2_30 +; %bb.28: + sub sp, x29, #48 + ldp x29, x30, [sp, #48] ; 16-byte Folded Reload + ldp x20, x19, [sp, #32] ; 16-byte Folded Reload + ldp x22, x21, [sp, #16] ; 16-byte Folded Reload + ldp x24, x23, [sp], #64 ; 16-byte Folded Reload + ret +LBB2_29: + str w8, [x19] + ldur w8, [x10, #-4] + stur w8, [x9, #-4] + mov w0, #0 ; =0x0 + lsr w8, w21, #24 + cbnz w8, LBB2_26 + b LBB2_27 +LBB2_30: + bl ___stack_chk_fail + .loh AdrpLdrGotLdr Lloh14, Lloh15, Lloh16 + .loh AdrpAdd Lloh25, Lloh26 + .loh AdrpAdrp Lloh23, Lloh25 + .loh AdrpLdr Lloh23, Lloh24 + .loh AdrpAdrp Lloh21, Lloh23 + .loh AdrpLdr Lloh21, Lloh22 + .loh AdrpAdrp Lloh19, Lloh21 + .loh AdrpLdr Lloh19, Lloh20 + .loh AdrpAdrp Lloh17, Lloh19 + .loh AdrpLdr Lloh17, Lloh18 + .loh AdrpLdrGotLdr Lloh27, Lloh28, Lloh29 + ; -- End function + .section __TEXT,__const + .p2align 5, 0x0 ; @STEP256 +_STEP256: + .long 2440867728 ; 0x917caf90 + .long 1813713058 ; 0x6c1b10a2 + .long 1865754947 ; 0x6f352943 + .long 3480715843 ; 0xcf778243 + .long 753628274 ; 0x2ceb7472 + .long 703164402 ; 0x29e96ff2 + .long 2325455912 ; 0x8a9ba428 + .long 787162690 ; 0x2eeb2642 + .long 237781025 ; 0xe2c4021 + .long 2267788046 ; 0x872bb30e + .long 2757651634 ; 0xa45e6cb2 + .long 1190774290 ; 0x46f9c612 + .long 408938142 ; 0x185fe69e + .long 324624923 ; 0x1359621b + .long 641715378 ; 0x263fccb2 + .long 437348464 ; 0x1a116870 + .long 980181295 ; 0x3a6c612f + .long 3000942997 ; 0xb2dec195 + .long 46866262 ; 0x2cb1f56 + .long 1086314584 ; 0x40bfd858 + .long 2017887414 ; 0x784684b6 + .long 1824226606 ; 0x6cbb7d2e + .long 1712094936 ; 0x660c7ed8 + .long 729405578 ; 0x2b79d88a + .long 2798489705 ; 0xa6cd9069 + .long 2443204423 ; 0x91a05747 + .long 3454694744 ; 0xcdea7558 + .long 9973912 ; 0x983098 + .long 3200989998 ; 0xbecb3b2e + .long 674802586 ; 0x2838ab9a + .long 1921734462 ; 0x728b573e + .long 2773639861 ; 0xa55262b5 + .long 1952315919 ; 0x745dfa0f + .long 838311640 ; 0x31f79ed8 + .long 3093286437 ; 0xb85fce25 + .long 2563295384 ; 0x98c8c898 + .long 2315676140 ; 0x8a0669ec + .long 1625572802 ; 0x60e445c2 + .long 4259485104 ; 0xfde295b0 + .long 4155840602 ; 0xf7b5185a + .long 3528984963 ; 0xd2580983 + .long 697726729 ; 0x29967709 + .long 405664733 ; 0x182df3dd + .long 1636917552 ; 0x61916130 + .long 2423281270 ; 0x90705676 + .long 1160382498 ; 0x452a0822 + .long 3765978797 ; 0xe07846ad + .long 2899145553 ; 0xaccd7351 + .long 711036245 ; 0x2a618d55 + .long 3222110258 ; 0xc00d8032 + .long 1176621301 ; 0x4621d0f5 + .long 4075983249 ; 0xf2f29191 + .long 13028614 ; 0xc6cd06 + .long 1865558631 ; 0x6f322a67 + .long 1488909453 ; 0x58bef48d + .long 2051065085 ; 0x7a40c4fd + .long 2347688575 ; 0x8beee27f + .long 3448615666 ; 0xcd8db2f2 + .long 1743963707 ; 0x67f2c63b + .long 3850642307 ; 0xe5842383 + .long 3348353798 ; 0xc793d306 + .long 2707198422 ; 0xa15c91d6 + .long 397640165 ; 0x17b381e5 + .long 3137716855 ; 0xbb05c277 + .long 2060542474 ; 0x7ad1620a + .long 1530963391 ; 0x5b40a5bf + .long 1522074018 ; 0x5ab901a2 + .long 1772595048 ; 0x69a7a768 + .long 1533467085 ; 0x5b66d9cd + .long 4260259959 ; 0xfdee6877 + .long 3409274620 ; 0xcb3566fc + .long 3234347570 ; 0xc0c83a32 + .long 1278438532 ; 0x4c336c84 + .long 2615567642 ; 0x9be6651a + .long 330998780 ; 0x13baa3fc + .long 290394065 ; 0x114f0fd1 + .long 3259017000 ; 0xc240a728 + .long 3965116532 ; 0xec56e074 + .long 10249159 ; 0x9c63c7 + .long 2298637554 ; 0x89026cf2 + .long 2141188304 ; 0x7f9ff0d0 + .long 2185985973 ; 0x824b7fb5 + .long 3462307855 ; 0xce5ea00f + .long 1616830690 ; 0x605ee0e2 + .long 48746474 ; 0x2e7cfea + .long 1127699808 ; 0x43375560 + .long 2634033863 ; 0x9d002ac7 + .long 2339331963 ; 0x8b6f5f7b + .long 529580367 ; 0x1f90c14f + .long 3452646711 ; 0xcdcb3537 + .long 754888669 ; 0x2cfeafdd + .long 3208627010 ; 0xbf3fc342 + .long 3937909228 ; 0xeab7b9ec + .long 2056041891 ; 0x7a8cb5a3 + .long 2636837476 ; 0x9d2af264 + .long 4207860486 ; 0xfacedb06 + .long 2958168174 ; 0xb052106e + .long 2566941956 ; 0x99006d04 + .long 732859657 ; 0x2bae8d09 + .long 4278388225 ; 0xff030601 + .long 2725357270 ; 0xa271a6d6 + .long 121788701 ; 0x742591d + .long 3357366017 ; 0xc81d5701 + .long 3383353856 ; 0xc9a9e200 + .long 40009502 ; 0x2627f1e + .long 2574086557 ; 0x996d719d + .long 3661338164 ; 0xda3b9634 + .long 34146304 ; 0x2090800 + .long 337149304 ; 0x14187d78 + .long 1234925092 ; 0x499b7624 + .long 3849607369 ; 0xe57458c9 + .long 1938547401 ; 0x738be2c9 + .long 1692507424 ; 0x64e19d20 + .long 115281718 ; 0x6df0f36 + .long 366070542 ; 0x15d1cb0e + .long 185665538 ; 0xb110802 + .long 748025228 ; 0x2c95f58c + .long 3843136109 ; 0xe5119a6d + .long 1506615982 ; 0x59cd22ae + .long 4285443132 ; 0xff6eac3c + .long 1182711172 ; 0x467ebd84 + .long 3857597756 ; 0xe5ee453c + .long 3885816099 ; 0xe79cd923 + .long 471403021 ; 0x1c190a0d + .long 3263922616 ; 0xc28b81b8 + .long 4138469458 ; 0xf6ac0852 + .long 653250823 ; 0x26efd107 + .long 1847257403 ; 0x6e1ae93b + .long 3309060554 ; 0xc53c41ca + .long 3560145441 ; 0xd4338221 + .long 2222325002 ; 0x8475fd0a + .long 891492137 ; 0x35231729 + .long 1309489786 ; 0x4e0d3a7a + .long 2729728840 ; 0xa2b45b48 + .long 381737005 ; 0x16c0d82d + .long 2298750121 ; 0x890424a9 + .long 25037967 ; 0x17e0c8f + .long 129344501 ; 0x7b5a3f5 + .long 4201842574 ; 0xfa73078e + .long 1480212574 ; 0x583a405e + .long 1531425992 ; 0x5b47b4c8 + .long 1460642794 ; 0x570fa3ea + .long 3617129795 ; 0xd7990543 + .long 2368261682 ; 0x8d28ce32 + .long 2139790224 ; 0x7f8a9b90 + .long 3176765692 ; 0xbd5998fc + .long 1836750472 ; 0x6d7a9688 + .long 2457509558 ; 0x927a9eb6 + .long 2734456099 ; 0xa2fc7d23 + .long 1723043393 ; 0x66b38e41 + .long 1889421594 ; 0x709e491a + .long 3052863679 ; 0xb5f700bf + .long 170273807 ; 0xa262c0f + .long 384996793 ; 0x16f295b9 + .long 3893436149 ; 0xe8111ef5 + .long 219764040 ; 0xd195548 + .long 2675548357 ; 0x9f79a0c5 + .long 440520615 ; 0x1a41cfa7 + .long 250045322 ; 0xee7638a + .long 2901917812 ; 0xacf7c074 + .long 810695449 ; 0x30523b19 + .long 159928015 ; 0x9884ecf + .long 4180677853 ; 0xf93014dd + .long 644783445 ; 0x266e9d55 + .long 421160548 ; 0x191a6664 + .long 1544648385 ; 0x5c1176c1 + .long 4132105624 ; 0xf64aed98 + .long 2763535648 ; 0xa4b83520 + .long 2190300233 ; 0x828d5449 + .long 2446794200 ; 0x91d71dd8 + .long 692384470 ; 0x2944f2d6 + .long 2500588155 ; 0x950bf27b + .long 864078461 ; 0x3380ca7d + .long 1837643805 ; 0x6d88381d + .long 1094223502 ; 0x4138868e + .long 1559057860 ; 0x5ced55c4 + .long 266444235 ; 0xfe19dcb + .long 1760884329 ; 0x68f4f669 + .long 1849149695 ; 0x6e37c8ff + .long 2701028880 ; 0xa0fe6e10 + .long 3024832432 ; 0xb44b47b0 + .long 4123022730 ; 0xf5c0558a + .long 2042565839 ; 0x79bf14cf + .long 1245911584 ; 0x4a431a20 + .long 4051658970 ; 0xf17f68da + .long 1575706577 ; 0x5deb5fd1 + .long 2785069165 ; 0xa600c86d + .long 2674687664 ; 0x9f6c7eb0 + .long 4287821924 ; 0xff92f864 + .long 3054887039 ; 0xb615e07f + .long 953410632 ; 0x38d3e448 + .long 2371697258 ; 0x8d5d3a6a + .long 1894269899 ; 0x70e843cb + .long 1229664558 ; 0x494b312e + .long 2798204435 ; 0xa6c93613 + .long 199962447 ; 0xbeb2f4f + .long 2458606947 ; 0x928b5d63 + .long 3421921333 ; 0xcbf66035 + .long 213396608 ; 0xcb82c80 + .long 3935806711 ; 0xea97a4f7 + .long 1496059707 ; 0x592c0f3b + .long 2491178871 ; 0x947c5f77 + .long 1879001529 ; 0x6fff49b9 + .long 4145708634 ; 0xf71a7e5a + .long 501793013 ; 0x1de8c0f5 + .long 3260454400 ; 0xc2569600 + .long 3303320716 ; 0xc4e4ac8c + .long 2185010401 ; 0x823c9ce1 + +.subsections_via_symbols diff --git a/lsh256/arm64_goat/src/memcpy.h b/lsh256/arm64_goat/src/memcpy.h new file mode 100644 index 0000000..e69de29