| 1 |
// Autogenerated: 'src/ExtractionOCaml/unsaturated_solinas' --lang Zig --internal-static --public-function-case camelCase --private-function-case camelCase --public-type-case UpperCamelCase --private-type-case UpperCamelCase --no-prefix-fiat --package-name p521 '' 32 '(auto)' '2^521 - 1' carry_mul carry_square carry add sub opp selectznz to_bytes from_bytes relax |
| 2 |
// curve description (via package name): p521 |
| 3 |
// machine_wordsize = 32 (from "32") |
| 4 |
// requested operations: carry_mul, carry_square, carry, add, sub, opp, selectznz, to_bytes, from_bytes, relax |
| 5 |
// n = 19 (from "(auto)") |
| 6 |
// s-c = 2^521 - [(1, 1)] (from "2^521 - 1") |
| 7 |
// tight_bounds_multiplier = 1 (from "") |
| 8 |
// |
| 9 |
// Computed values: |
| 10 |
// carry_chain = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 0, 1] |
| 11 |
// eval z = z[0] + (z[1] << 28) + (z[2] << 55) + (z[3] << 83) + (z[4] << 110) + (z[5] << 138) + (z[6] << 165) + (z[7] << 192) + (z[8] << 220) + (z[9] << 247) + (z[10] << 0x113) + (z[11] << 0x12e) + (z[12] << 0x14a) + (z[13] << 0x165) + (z[14] << 0x180) + (z[15] << 0x19c) + (z[16] << 0x1b7) + (z[17] << 0x1d3) + (z[18] << 0x1ee) |
| 12 |
// bytes_eval z = z[0] + (z[1] << 8) + (z[2] << 16) + (z[3] << 24) + (z[4] << 32) + (z[5] << 40) + (z[6] << 48) + (z[7] << 56) + (z[8] << 64) + (z[9] << 72) + (z[10] << 80) + (z[11] << 88) + (z[12] << 96) + (z[13] << 104) + (z[14] << 112) + (z[15] << 120) + (z[16] << 128) + (z[17] << 136) + (z[18] << 144) + (z[19] << 152) + (z[20] << 160) + (z[21] << 168) + (z[22] << 176) + (z[23] << 184) + (z[24] << 192) + (z[25] << 200) + (z[26] << 208) + (z[27] << 216) + (z[28] << 224) + (z[29] << 232) + (z[30] << 240) + (z[31] << 248) + (z[32] << 256) + (z[33] << 0x108) + (z[34] << 0x110) + (z[35] << 0x118) + (z[36] << 0x120) + (z[37] << 0x128) + (z[38] << 0x130) + (z[39] << 0x138) + (z[40] << 0x140) + (z[41] << 0x148) + (z[42] << 0x150) + (z[43] << 0x158) + (z[44] << 0x160) + (z[45] << 0x168) + (z[46] << 0x170) + (z[47] << 0x178) + (z[48] << 0x180) + (z[49] << 0x188) + (z[50] << 0x190) + (z[51] << 0x198) + (z[52] << 0x1a0) + (z[53] << 0x1a8) + (z[54] << 0x1b0) + (z[55] << 0x1b8) + (z[56] << 0x1c0) + (z[57] << 0x1c8) + (z[58] << 0x1d0) + (z[59] << 0x1d8) + (z[60] << 0x1e0) + (z[61] << 0x1e8) + (z[62] << 0x1f0) + (z[63] << 0x1f8) + (z[64] << 2^9) + (z[65] << 0x208) |
| 13 |
// balance = [0x1ffffffe, 0xffffffe, 0x1ffffffe, 0xffffffe, 0x1ffffffe, 0xffffffe, 0xffffffe, 0x1ffffffe, 0xffffffe, 0x1ffffffe, 0xffffffe, 0x1ffffffe, 0xffffffe, 0xffffffe, 0x1ffffffe, 0xffffffe, 0x1ffffffe, 0xffffffe, 0xffffffe] |
| 14 |
|
| 15 |
const std = @import("std"); |
| 16 |
const mode = @import("builtin").mode; // Checked arithmetic is disabled in non-debug modes to avoid side channels |
| 17 |
|
| 18 |
inline fn cast(comptime DestType: type, target: anytype) DestType { |
| 19 |
@setEvalBranchQuota(10000); |
| 20 |
if (@typeInfo(@TypeOf(target)) == .int) { |
| 21 |
const dest = @typeInfo(DestType).int; |
| 22 |
const source = @typeInfo(@TypeOf(target)).int; |
| 23 |
if (dest.bits < source.bits) { |
| 24 |
const T = std.meta.Int(source.signedness, dest.bits); |
| 25 |
return @bitCast(@as(T, @truncate(target))); |
| 26 |
} |
| 27 |
} |
| 28 |
return target; |
| 29 |
} |
| 30 |
|
| 31 |
// The type LooseFieldElement is a field element with loose bounds. |
| 32 |
// Bounds: [[0x0 ~> 0x30000000], [0x0 ~> 0x18000000], [0x0 ~> 0x30000000], [0x0 ~> 0x18000000], [0x0 ~> 0x30000000], [0x0 ~> 0x18000000], [0x0 ~> 0x18000000], [0x0 ~> 0x30000000], [0x0 ~> 0x18000000], [0x0 ~> 0x30000000], [0x0 ~> 0x18000000], [0x0 ~> 0x30000000], [0x0 ~> 0x18000000], [0x0 ~> 0x18000000], [0x0 ~> 0x30000000], [0x0 ~> 0x18000000], [0x0 ~> 0x30000000], [0x0 ~> 0x18000000], [0x0 ~> 0x18000000]] |
| 33 |
pub const LooseFieldElement = [19]u32; |
| 34 |
|
| 35 |
// The type TightFieldElement is a field element with tight bounds. |
| 36 |
// Bounds: [[0x0 ~> 0x10000000], [0x0 ~> 0x8000000], [0x0 ~> 0x10000000], [0x0 ~> 0x8000000], [0x0 ~> 0x10000000], [0x0 ~> 0x8000000], [0x0 ~> 0x8000000], [0x0 ~> 0x10000000], [0x0 ~> 0x8000000], [0x0 ~> 0x10000000], [0x0 ~> 0x8000000], [0x0 ~> 0x10000000], [0x0 ~> 0x8000000], [0x0 ~> 0x8000000], [0x0 ~> 0x10000000], [0x0 ~> 0x8000000], [0x0 ~> 0x10000000], [0x0 ~> 0x8000000], [0x0 ~> 0x8000000]] |
| 37 |
pub const TightFieldElement = [19]u32; |
| 38 |
|
| 39 |
/// The function addcarryxU28 is an addition with carry. |
| 40 |
/// |
| 41 |
/// Postconditions: |
| 42 |
/// out1 = (arg1 + arg2 + arg3) mod 2^28 |
| 43 |
/// out2 = ⌊(arg1 + arg2 + arg3) / 2^28⌋ |
| 44 |
/// |
| 45 |
/// Input Bounds: |
| 46 |
/// arg1: [0x0 ~> 0x1] |
| 47 |
/// arg2: [0x0 ~> 0xfffffff] |
| 48 |
/// arg3: [0x0 ~> 0xfffffff] |
| 49 |
/// Output Bounds: |
| 50 |
/// out1: [0x0 ~> 0xfffffff] |
| 51 |
/// out2: [0x0 ~> 0x1] |
| 52 |
inline fn addcarryxU28(out1: *u32, out2: *u1, arg1: u1, arg2: u32, arg3: u32) void { |
| 53 |
@setRuntimeSafety(mode == .Debug); |
| 54 |
|
| 55 |
const x1 = ((cast(u32, arg1) + arg2) + arg3); |
| 56 |
const x2 = (x1 & 0xfffffff); |
| 57 |
const x3 = cast(u1, (x1 >> 28)); |
| 58 |
out1.* = x2; |
| 59 |
out2.* = x3; |
| 60 |
} |
| 61 |
|
| 62 |
/// The function subborrowxU28 is a subtraction with borrow. |
| 63 |
/// |
| 64 |
/// Postconditions: |
| 65 |
/// out1 = (-arg1 + arg2 + -arg3) mod 2^28 |
| 66 |
/// out2 = -⌊(-arg1 + arg2 + -arg3) / 2^28⌋ |
| 67 |
/// |
| 68 |
/// Input Bounds: |
| 69 |
/// arg1: [0x0 ~> 0x1] |
| 70 |
/// arg2: [0x0 ~> 0xfffffff] |
| 71 |
/// arg3: [0x0 ~> 0xfffffff] |
| 72 |
/// Output Bounds: |
| 73 |
/// out1: [0x0 ~> 0xfffffff] |
| 74 |
/// out2: [0x0 ~> 0x1] |
| 75 |
inline fn subborrowxU28(out1: *u32, out2: *u1, arg1: u1, arg2: u32, arg3: u32) void { |
| 76 |
@setRuntimeSafety(mode == .Debug); |
| 77 |
|
| 78 |
const x1 = cast(i32, (cast(i64, cast(i32, (cast(i64, arg2) - cast(i64, arg1)))) - cast(i64, arg3))); |
| 79 |
const x2 = cast(i1, (x1 >> 28)); |
| 80 |
const x3 = cast(u32, (cast(i64, x1) & cast(i64, 0xfffffff))); |
| 81 |
out1.* = x3; |
| 82 |
out2.* = cast(u1, (cast(i2, 0x0) - cast(i2, x2))); |
| 83 |
} |
| 84 |
|
| 85 |
/// The function addcarryxU27 is an addition with carry. |
| 86 |
/// |
| 87 |
/// Postconditions: |
| 88 |
/// out1 = (arg1 + arg2 + arg3) mod 2^27 |
| 89 |
/// out2 = ⌊(arg1 + arg2 + arg3) / 2^27⌋ |
| 90 |
/// |
| 91 |
/// Input Bounds: |
| 92 |
/// arg1: [0x0 ~> 0x1] |
| 93 |
/// arg2: [0x0 ~> 0x7ffffff] |
| 94 |
/// arg3: [0x0 ~> 0x7ffffff] |
| 95 |
/// Output Bounds: |
| 96 |
/// out1: [0x0 ~> 0x7ffffff] |
| 97 |
/// out2: [0x0 ~> 0x1] |
| 98 |
inline fn addcarryxU27(out1: *u32, out2: *u1, arg1: u1, arg2: u32, arg3: u32) void { |
| 99 |
@setRuntimeSafety(mode == .Debug); |
| 100 |
|
| 101 |
const x1 = ((cast(u32, arg1) + arg2) + arg3); |
| 102 |
const x2 = (x1 & 0x7ffffff); |
| 103 |
const x3 = cast(u1, (x1 >> 27)); |
| 104 |
out1.* = x2; |
| 105 |
out2.* = x3; |
| 106 |
} |
| 107 |
|
| 108 |
/// The function subborrowxU27 is a subtraction with borrow. |
| 109 |
/// |
| 110 |
/// Postconditions: |
| 111 |
/// out1 = (-arg1 + arg2 + -arg3) mod 2^27 |
| 112 |
/// out2 = -⌊(-arg1 + arg2 + -arg3) / 2^27⌋ |
| 113 |
/// |
| 114 |
/// Input Bounds: |
| 115 |
/// arg1: [0x0 ~> 0x1] |
| 116 |
/// arg2: [0x0 ~> 0x7ffffff] |
| 117 |
/// arg3: [0x0 ~> 0x7ffffff] |
| 118 |
/// Output Bounds: |
| 119 |
/// out1: [0x0 ~> 0x7ffffff] |
| 120 |
/// out2: [0x0 ~> 0x1] |
| 121 |
inline fn subborrowxU27(out1: *u32, out2: *u1, arg1: u1, arg2: u32, arg3: u32) void { |
| 122 |
@setRuntimeSafety(mode == .Debug); |
| 123 |
|
| 124 |
const x1 = cast(i32, (cast(i64, cast(i32, (cast(i64, arg2) - cast(i64, arg1)))) - cast(i64, arg3))); |
| 125 |
const x2 = cast(i1, (x1 >> 27)); |
| 126 |
const x3 = cast(u32, (cast(i64, x1) & cast(i64, 0x7ffffff))); |
| 127 |
out1.* = x3; |
| 128 |
out2.* = cast(u1, (cast(i2, 0x0) - cast(i2, x2))); |
| 129 |
} |
| 130 |
|
| 131 |
/// The function cmovznzU32 is a single-word conditional move. |
| 132 |
/// |
| 133 |
/// Postconditions: |
| 134 |
/// out1 = (if arg1 = 0 then arg2 else arg3) |
| 135 |
/// |
| 136 |
/// Input Bounds: |
| 137 |
/// arg1: [0x0 ~> 0x1] |
| 138 |
/// arg2: [0x0 ~> 0xffffffff] |
| 139 |
/// arg3: [0x0 ~> 0xffffffff] |
| 140 |
/// Output Bounds: |
| 141 |
/// out1: [0x0 ~> 0xffffffff] |
| 142 |
inline fn cmovznzU32(out1: *u32, arg1: u1, arg2: u32, arg3: u32) void { |
| 143 |
@setRuntimeSafety(mode == .Debug); |
| 144 |
|
| 145 |
const x1 = (~(~arg1)); |
| 146 |
const x2 = cast(u32, (cast(i64, cast(i1, (cast(i2, 0x0) - cast(i2, x1)))) & cast(i64, 0xffffffff))); |
| 147 |
const x3 = ((x2 & arg3) | ((~x2) & arg2)); |
| 148 |
out1.* = x3; |
| 149 |
} |
| 150 |
|
| 151 |
/// The function carryMul multiplies two field elements and reduces the result. |
| 152 |
/// |
| 153 |
/// Postconditions: |
| 154 |
/// eval out1 mod m = (eval arg1 * eval arg2) mod m |
| 155 |
/// |
| 156 |
pub fn carryMul(out1: *TightFieldElement, arg1: LooseFieldElement, arg2: LooseFieldElement) void { |
| 157 |
@setRuntimeSafety(mode == .Debug); |
| 158 |
|
| 159 |
const x1 = (cast(u64, (arg1[18])) * cast(u64, (arg2[18]))); |
| 160 |
const x2 = (cast(u64, (arg1[18])) * cast(u64, ((arg2[17]) * 0x2))); |
| 161 |
const x3 = (cast(u64, (arg1[18])) * cast(u64, (arg2[16]))); |
| 162 |
const x4 = (cast(u64, (arg1[18])) * cast(u64, ((arg2[15]) * 0x2))); |
| 163 |
const x5 = (cast(u64, (arg1[18])) * cast(u64, (arg2[14]))); |
| 164 |
const x6 = (cast(u64, (arg1[18])) * cast(u64, (arg2[13]))); |
| 165 |
const x7 = (cast(u64, (arg1[18])) * cast(u64, ((arg2[12]) * 0x2))); |
| 166 |
const x8 = (cast(u64, (arg1[18])) * cast(u64, (arg2[11]))); |
| 167 |
const x9 = (cast(u64, (arg1[18])) * cast(u64, ((arg2[10]) * 0x2))); |
| 168 |
const x10 = (cast(u64, (arg1[18])) * cast(u64, (arg2[9]))); |
| 169 |
const x11 = (cast(u64, (arg1[18])) * cast(u64, ((arg2[8]) * 0x2))); |
| 170 |
const x12 = (cast(u64, (arg1[18])) * cast(u64, (arg2[7]))); |
| 171 |
const x13 = (cast(u64, (arg1[18])) * cast(u64, (arg2[6]))); |
| 172 |
const x14 = (cast(u64, (arg1[18])) * cast(u64, ((arg2[5]) * 0x2))); |
| 173 |
const x15 = (cast(u64, (arg1[18])) * cast(u64, (arg2[4]))); |
| 174 |
const x16 = (cast(u64, (arg1[18])) * cast(u64, ((arg2[3]) * 0x2))); |
| 175 |
const x17 = (cast(u64, (arg1[18])) * cast(u64, (arg2[2]))); |
| 176 |
const x18 = (cast(u64, (arg1[18])) * cast(u64, ((arg2[1]) * 0x2))); |
| 177 |
const x19 = (cast(u64, (arg1[17])) * cast(u64, ((arg2[18]) * 0x2))); |
| 178 |
const x20 = (cast(u64, (arg1[17])) * cast(u64, ((arg2[17]) * 0x2))); |
| 179 |
const x21 = (cast(u64, (arg1[17])) * cast(u64, ((arg2[16]) * 0x2))); |
| 180 |
const x22 = (cast(u64, (arg1[17])) * cast(u64, ((arg2[15]) * 0x2))); |
| 181 |
const x23 = (cast(u64, (arg1[17])) * cast(u64, (arg2[14]))); |
| 182 |
const x24 = (cast(u64, (arg1[17])) * cast(u64, ((arg2[13]) * 0x2))); |
| 183 |
const x25 = (cast(u64, (arg1[17])) * cast(u64, ((arg2[12]) * 0x2))); |
| 184 |
const x26 = (cast(u64, (arg1[17])) * cast(u64, ((arg2[11]) * 0x2))); |
| 185 |
const x27 = (cast(u64, (arg1[17])) * cast(u64, ((arg2[10]) * 0x2))); |
| 186 |
const x28 = (cast(u64, (arg1[17])) * cast(u64, ((arg2[9]) * 0x2))); |
| 187 |
const x29 = (cast(u64, (arg1[17])) * cast(u64, ((arg2[8]) * 0x2))); |
| 188 |
const x30 = (cast(u64, (arg1[17])) * cast(u64, (arg2[7]))); |
| 189 |
const x31 = (cast(u64, (arg1[17])) * cast(u64, ((arg2[6]) * 0x2))); |
| 190 |
const x32 = (cast(u64, (arg1[17])) * cast(u64, ((arg2[5]) * 0x2))); |
| 191 |
const x33 = (cast(u64, (arg1[17])) * cast(u64, ((arg2[4]) * 0x2))); |
| 192 |
const x34 = (cast(u64, (arg1[17])) * cast(u64, ((arg2[3]) * 0x2))); |
| 193 |
const x35 = (cast(u64, (arg1[17])) * cast(u64, ((arg2[2]) * 0x2))); |
| 194 |
const x36 = (cast(u64, (arg1[16])) * cast(u64, (arg2[18]))); |
| 195 |
const x37 = (cast(u64, (arg1[16])) * cast(u64, ((arg2[17]) * 0x2))); |
| 196 |
const x38 = (cast(u64, (arg1[16])) * cast(u64, (arg2[16]))); |
| 197 |
const x39 = (cast(u64, (arg1[16])) * cast(u64, (arg2[15]))); |
| 198 |
const x40 = (cast(u64, (arg1[16])) * cast(u64, (arg2[14]))); |
| 199 |
const x41 = (cast(u64, (arg1[16])) * cast(u64, (arg2[13]))); |
| 200 |
const x42 = (cast(u64, (arg1[16])) * cast(u64, ((arg2[12]) * 0x2))); |
| 201 |
const x43 = (cast(u64, (arg1[16])) * cast(u64, (arg2[11]))); |
| 202 |
const x44 = (cast(u64, (arg1[16])) * cast(u64, ((arg2[10]) * 0x2))); |
| 203 |
const x45 = (cast(u64, (arg1[16])) * cast(u64, (arg2[9]))); |
| 204 |
const x46 = (cast(u64, (arg1[16])) * cast(u64, (arg2[8]))); |
| 205 |
const x47 = (cast(u64, (arg1[16])) * cast(u64, (arg2[7]))); |
| 206 |
const x48 = (cast(u64, (arg1[16])) * cast(u64, (arg2[6]))); |
| 207 |
const x49 = (cast(u64, (arg1[16])) * cast(u64, ((arg2[5]) * 0x2))); |
| 208 |
const x50 = (cast(u64, (arg1[16])) * cast(u64, (arg2[4]))); |
| 209 |
const x51 = (cast(u64, (arg1[16])) * cast(u64, ((arg2[3]) * 0x2))); |
| 210 |
const x52 = (cast(u64, (arg1[15])) * cast(u64, ((arg2[18]) * 0x2))); |
| 211 |
const x53 = (cast(u64, (arg1[15])) * cast(u64, ((arg2[17]) * 0x2))); |
| 212 |
const x54 = (cast(u64, (arg1[15])) * cast(u64, (arg2[16]))); |
| 213 |
const x55 = (cast(u64, (arg1[15])) * cast(u64, ((arg2[15]) * 0x2))); |
| 214 |
const x56 = (cast(u64, (arg1[15])) * cast(u64, (arg2[14]))); |
| 215 |
const x57 = (cast(u64, (arg1[15])) * cast(u64, ((arg2[13]) * 0x2))); |
| 216 |
const x58 = (cast(u64, (arg1[15])) * cast(u64, ((arg2[12]) * 0x2))); |
| 217 |
const x59 = (cast(u64, (arg1[15])) * cast(u64, ((arg2[11]) * 0x2))); |
| 218 |
const x60 = (cast(u64, (arg1[15])) * cast(u64, ((arg2[10]) * 0x2))); |
| 219 |
const x61 = (cast(u64, (arg1[15])) * cast(u64, (arg2[9]))); |
| 220 |
const x62 = (cast(u64, (arg1[15])) * cast(u64, ((arg2[8]) * 0x2))); |
| 221 |
const x63 = (cast(u64, (arg1[15])) * cast(u64, (arg2[7]))); |
| 222 |
const x64 = (cast(u64, (arg1[15])) * cast(u64, ((arg2[6]) * 0x2))); |
| 223 |
const x65 = (cast(u64, (arg1[15])) * cast(u64, ((arg2[5]) * 0x2))); |
| 224 |
const x66 = (cast(u64, (arg1[15])) * cast(u64, ((arg2[4]) * 0x2))); |
| 225 |
const x67 = (cast(u64, (arg1[14])) * cast(u64, (arg2[18]))); |
| 226 |
const x68 = (cast(u64, (arg1[14])) * cast(u64, (arg2[17]))); |
| 227 |
const x69 = (cast(u64, (arg1[14])) * cast(u64, (arg2[16]))); |
| 228 |
const x70 = (cast(u64, (arg1[14])) * cast(u64, (arg2[15]))); |
| 229 |
const x71 = (cast(u64, (arg1[14])) * cast(u64, (arg2[14]))); |
| 230 |
const x72 = (cast(u64, (arg1[14])) * cast(u64, (arg2[13]))); |
| 231 |
const x73 = (cast(u64, (arg1[14])) * cast(u64, ((arg2[12]) * 0x2))); |
| 232 |
const x74 = (cast(u64, (arg1[14])) * cast(u64, (arg2[11]))); |
| 233 |
const x75 = (cast(u64, (arg1[14])) * cast(u64, (arg2[10]))); |
| 234 |
const x76 = (cast(u64, (arg1[14])) * cast(u64, (arg2[9]))); |
| 235 |
const x77 = (cast(u64, (arg1[14])) * cast(u64, (arg2[8]))); |
| 236 |
const x78 = (cast(u64, (arg1[14])) * cast(u64, (arg2[7]))); |
| 237 |
const x79 = (cast(u64, (arg1[14])) * cast(u64, (arg2[6]))); |
| 238 |
const x80 = (cast(u64, (arg1[14])) * cast(u64, ((arg2[5]) * 0x2))); |
| 239 |
const x81 = (cast(u64, (arg1[13])) * cast(u64, (arg2[18]))); |
| 240 |
const x82 = (cast(u64, (arg1[13])) * cast(u64, ((arg2[17]) * 0x2))); |
| 241 |
const x83 = (cast(u64, (arg1[13])) * cast(u64, (arg2[16]))); |
| 242 |
const x84 = (cast(u64, (arg1[13])) * cast(u64, ((arg2[15]) * 0x2))); |
| 243 |
const x85 = (cast(u64, (arg1[13])) * cast(u64, (arg2[14]))); |
| 244 |
const x86 = (cast(u64, (arg1[13])) * cast(u64, ((arg2[13]) * 0x2))); |
| 245 |
const x87 = (cast(u64, (arg1[13])) * cast(u64, ((arg2[12]) * 0x2))); |
| 246 |
const x88 = (cast(u64, (arg1[13])) * cast(u64, (arg2[11]))); |
| 247 |
const x89 = (cast(u64, (arg1[13])) * cast(u64, ((arg2[10]) * 0x2))); |
| 248 |
const x90 = (cast(u64, (arg1[13])) * cast(u64, (arg2[9]))); |
| 249 |
const x91 = (cast(u64, (arg1[13])) * cast(u64, ((arg2[8]) * 0x2))); |
| 250 |
const x92 = (cast(u64, (arg1[13])) * cast(u64, (arg2[7]))); |
| 251 |
const x93 = (cast(u64, (arg1[13])) * cast(u64, ((arg2[6]) * 0x2))); |
| 252 |
const x94 = (cast(u64, (arg1[12])) * cast(u64, ((arg2[18]) * 0x2))); |
| 253 |
const x95 = (cast(u64, (arg1[12])) * cast(u64, ((arg2[17]) * 0x2))); |
| 254 |
const x96 = (cast(u64, (arg1[12])) * cast(u64, ((arg2[16]) * 0x2))); |
| 255 |
const x97 = (cast(u64, (arg1[12])) * cast(u64, ((arg2[15]) * 0x2))); |
| 256 |
const x98 = (cast(u64, (arg1[12])) * cast(u64, ((arg2[14]) * 0x2))); |
| 257 |
const x99 = (cast(u64, (arg1[12])) * cast(u64, ((arg2[13]) * 0x2))); |
| 258 |
const x100 = (cast(u64, (arg1[12])) * cast(u64, ((arg2[12]) * 0x2))); |
| 259 |
const x101 = (cast(u64, (arg1[12])) * cast(u64, ((arg2[11]) * 0x2))); |
| 260 |
const x102 = (cast(u64, (arg1[12])) * cast(u64, ((arg2[10]) * 0x2))); |
| 261 |
const x103 = (cast(u64, (arg1[12])) * cast(u64, ((arg2[9]) * 0x2))); |
| 262 |
const x104 = (cast(u64, (arg1[12])) * cast(u64, ((arg2[8]) * 0x2))); |
| 263 |
const x105 = (cast(u64, (arg1[12])) * cast(u64, ((arg2[7]) * 0x2))); |
| 264 |
const x106 = (cast(u64, (arg1[11])) * cast(u64, (arg2[18]))); |
| 265 |
const x107 = (cast(u64, (arg1[11])) * cast(u64, ((arg2[17]) * 0x2))); |
| 266 |
const x108 = (cast(u64, (arg1[11])) * cast(u64, (arg2[16]))); |
| 267 |
const x109 = (cast(u64, (arg1[11])) * cast(u64, ((arg2[15]) * 0x2))); |
| 268 |
const x110 = (cast(u64, (arg1[11])) * cast(u64, (arg2[14]))); |
| 269 |
const x111 = (cast(u64, (arg1[11])) * cast(u64, (arg2[13]))); |
| 270 |
const x112 = (cast(u64, (arg1[11])) * cast(u64, ((arg2[12]) * 0x2))); |
| 271 |
const x113 = (cast(u64, (arg1[11])) * cast(u64, (arg2[11]))); |
| 272 |
const x114 = (cast(u64, (arg1[11])) * cast(u64, ((arg2[10]) * 0x2))); |
| 273 |
const x115 = (cast(u64, (arg1[11])) * cast(u64, (arg2[9]))); |
| 274 |
const x116 = (cast(u64, (arg1[11])) * cast(u64, ((arg2[8]) * 0x2))); |
| 275 |
const x117 = (cast(u64, (arg1[10])) * cast(u64, ((arg2[18]) * 0x2))); |
| 276 |
const x118 = (cast(u64, (arg1[10])) * cast(u64, ((arg2[17]) * 0x2))); |
| 277 |
const x119 = (cast(u64, (arg1[10])) * cast(u64, ((arg2[16]) * 0x2))); |
| 278 |
const x120 = (cast(u64, (arg1[10])) * cast(u64, ((arg2[15]) * 0x2))); |
| 279 |
const x121 = (cast(u64, (arg1[10])) * cast(u64, (arg2[14]))); |
| 280 |
const x122 = (cast(u64, (arg1[10])) * cast(u64, ((arg2[13]) * 0x2))); |
| 281 |
const x123 = (cast(u64, (arg1[10])) * cast(u64, ((arg2[12]) * 0x2))); |
| 282 |
const x124 = (cast(u64, (arg1[10])) * cast(u64, ((arg2[11]) * 0x2))); |
| 283 |
const x125 = (cast(u64, (arg1[10])) * cast(u64, ((arg2[10]) * 0x2))); |
| 284 |
const x126 = (cast(u64, (arg1[10])) * cast(u64, ((arg2[9]) * 0x2))); |
| 285 |
const x127 = (cast(u64, (arg1[9])) * cast(u64, (arg2[18]))); |
| 286 |
const x128 = (cast(u64, (arg1[9])) * cast(u64, ((arg2[17]) * 0x2))); |
| 287 |
const x129 = (cast(u64, (arg1[9])) * cast(u64, (arg2[16]))); |
| 288 |
const x130 = (cast(u64, (arg1[9])) * cast(u64, (arg2[15]))); |
| 289 |
const x131 = (cast(u64, (arg1[9])) * cast(u64, (arg2[14]))); |
| 290 |
const x132 = (cast(u64, (arg1[9])) * cast(u64, (arg2[13]))); |
| 291 |
const x133 = (cast(u64, (arg1[9])) * cast(u64, ((arg2[12]) * 0x2))); |
| 292 |
const x134 = (cast(u64, (arg1[9])) * cast(u64, (arg2[11]))); |
| 293 |
const x135 = (cast(u64, (arg1[9])) * cast(u64, ((arg2[10]) * 0x2))); |
| 294 |
const x136 = (cast(u64, (arg1[8])) * cast(u64, ((arg2[18]) * 0x2))); |
| 295 |
const x137 = (cast(u64, (arg1[8])) * cast(u64, ((arg2[17]) * 0x2))); |
| 296 |
const x138 = (cast(u64, (arg1[8])) * cast(u64, (arg2[16]))); |
| 297 |
const x139 = (cast(u64, (arg1[8])) * cast(u64, ((arg2[15]) * 0x2))); |
| 298 |
const x140 = (cast(u64, (arg1[8])) * cast(u64, (arg2[14]))); |
| 299 |
const x141 = (cast(u64, (arg1[8])) * cast(u64, ((arg2[13]) * 0x2))); |
| 300 |
const x142 = (cast(u64, (arg1[8])) * cast(u64, ((arg2[12]) * 0x2))); |
| 301 |
const x143 = (cast(u64, (arg1[8])) * cast(u64, ((arg2[11]) * 0x2))); |
| 302 |
const x144 = (cast(u64, (arg1[7])) * cast(u64, (arg2[18]))); |
| 303 |
const x145 = (cast(u64, (arg1[7])) * cast(u64, (arg2[17]))); |
| 304 |
const x146 = (cast(u64, (arg1[7])) * cast(u64, (arg2[16]))); |
| 305 |
const x147 = (cast(u64, (arg1[7])) * cast(u64, (arg2[15]))); |
| 306 |
const x148 = (cast(u64, (arg1[7])) * cast(u64, (arg2[14]))); |
| 307 |
const x149 = (cast(u64, (arg1[7])) * cast(u64, (arg2[13]))); |
| 308 |
const x150 = (cast(u64, (arg1[7])) * cast(u64, ((arg2[12]) * 0x2))); |
| 309 |
const x151 = (cast(u64, (arg1[6])) * cast(u64, (arg2[18]))); |
| 310 |
const x152 = (cast(u64, (arg1[6])) * cast(u64, ((arg2[17]) * 0x2))); |
| 311 |
const x153 = (cast(u64, (arg1[6])) * cast(u64, (arg2[16]))); |
| 312 |
const x154 = (cast(u64, (arg1[6])) * cast(u64, ((arg2[15]) * 0x2))); |
| 313 |
const x155 = (cast(u64, (arg1[6])) * cast(u64, (arg2[14]))); |
| 314 |
const x156 = (cast(u64, (arg1[6])) * cast(u64, ((arg2[13]) * 0x2))); |
| 315 |
const x157 = (cast(u64, (arg1[5])) * cast(u64, ((arg2[18]) * 0x2))); |
| 316 |
const x158 = (cast(u64, (arg1[5])) * cast(u64, ((arg2[17]) * 0x2))); |
| 317 |
const x159 = (cast(u64, (arg1[5])) * cast(u64, ((arg2[16]) * 0x2))); |
| 318 |
const x160 = (cast(u64, (arg1[5])) * cast(u64, ((arg2[15]) * 0x2))); |
| 319 |
const x161 = (cast(u64, (arg1[5])) * cast(u64, ((arg2[14]) * 0x2))); |
| 320 |
const x162 = (cast(u64, (arg1[4])) * cast(u64, (arg2[18]))); |
| 321 |
const x163 = (cast(u64, (arg1[4])) * cast(u64, ((arg2[17]) * 0x2))); |
| 322 |
const x164 = (cast(u64, (arg1[4])) * cast(u64, (arg2[16]))); |
| 323 |
const x165 = (cast(u64, (arg1[4])) * cast(u64, ((arg2[15]) * 0x2))); |
| 324 |
const x166 = (cast(u64, (arg1[3])) * cast(u64, ((arg2[18]) * 0x2))); |
| 325 |
const x167 = (cast(u64, (arg1[3])) * cast(u64, ((arg2[17]) * 0x2))); |
| 326 |
const x168 = (cast(u64, (arg1[3])) * cast(u64, ((arg2[16]) * 0x2))); |
| 327 |
const x169 = (cast(u64, (arg1[2])) * cast(u64, (arg2[18]))); |
| 328 |
const x170 = (cast(u64, (arg1[2])) * cast(u64, ((arg2[17]) * 0x2))); |
| 329 |
const x171 = (cast(u64, (arg1[1])) * cast(u64, ((arg2[18]) * 0x2))); |
| 330 |
const x172 = (cast(u64, (arg1[18])) * cast(u64, (arg2[0]))); |
| 331 |
const x173 = (cast(u64, (arg1[17])) * cast(u64, ((arg2[1]) * 0x2))); |
| 332 |
const x174 = (cast(u64, (arg1[17])) * cast(u64, (arg2[0]))); |
| 333 |
const x175 = (cast(u64, (arg1[16])) * cast(u64, (arg2[2]))); |
| 334 |
const x176 = (cast(u64, (arg1[16])) * cast(u64, (arg2[1]))); |
| 335 |
const x177 = (cast(u64, (arg1[16])) * cast(u64, (arg2[0]))); |
| 336 |
const x178 = (cast(u64, (arg1[15])) * cast(u64, ((arg2[3]) * 0x2))); |
| 337 |
const x179 = (cast(u64, (arg1[15])) * cast(u64, (arg2[2]))); |
| 338 |
const x180 = (cast(u64, (arg1[15])) * cast(u64, ((arg2[1]) * 0x2))); |
| 339 |
const x181 = (cast(u64, (arg1[15])) * cast(u64, (arg2[0]))); |
| 340 |
const x182 = (cast(u64, (arg1[14])) * cast(u64, (arg2[4]))); |
| 341 |
const x183 = (cast(u64, (arg1[14])) * cast(u64, (arg2[3]))); |
| 342 |
const x184 = (cast(u64, (arg1[14])) * cast(u64, (arg2[2]))); |
| 343 |
const x185 = (cast(u64, (arg1[14])) * cast(u64, (arg2[1]))); |
| 344 |
const x186 = (cast(u64, (arg1[14])) * cast(u64, (arg2[0]))); |
| 345 |
const x187 = (cast(u64, (arg1[13])) * cast(u64, ((arg2[5]) * 0x2))); |
| 346 |
const x188 = (cast(u64, (arg1[13])) * cast(u64, (arg2[4]))); |
| 347 |
const x189 = (cast(u64, (arg1[13])) * cast(u64, ((arg2[3]) * 0x2))); |
| 348 |
const x190 = (cast(u64, (arg1[13])) * cast(u64, (arg2[2]))); |
| 349 |
const x191 = (cast(u64, (arg1[13])) * cast(u64, ((arg2[1]) * 0x2))); |
| 350 |
const x192 = (cast(u64, (arg1[13])) * cast(u64, (arg2[0]))); |
| 351 |
const x193 = (cast(u64, (arg1[12])) * cast(u64, ((arg2[6]) * 0x2))); |
| 352 |
const x194 = (cast(u64, (arg1[12])) * cast(u64, ((arg2[5]) * 0x2))); |
| 353 |
const x195 = (cast(u64, (arg1[12])) * cast(u64, ((arg2[4]) * 0x2))); |
| 354 |
const x196 = (cast(u64, (arg1[12])) * cast(u64, ((arg2[3]) * 0x2))); |
| 355 |
const x197 = (cast(u64, (arg1[12])) * cast(u64, ((arg2[2]) * 0x2))); |
| 356 |
const x198 = (cast(u64, (arg1[12])) * cast(u64, ((arg2[1]) * 0x2))); |
| 357 |
const x199 = (cast(u64, (arg1[12])) * cast(u64, (arg2[0]))); |
| 358 |
const x200 = (cast(u64, (arg1[11])) * cast(u64, (arg2[7]))); |
| 359 |
const x201 = (cast(u64, (arg1[11])) * cast(u64, (arg2[6]))); |
| 360 |
const x202 = (cast(u64, (arg1[11])) * cast(u64, ((arg2[5]) * 0x2))); |
| 361 |
const x203 = (cast(u64, (arg1[11])) * cast(u64, (arg2[4]))); |
| 362 |
const x204 = (cast(u64, (arg1[11])) * cast(u64, ((arg2[3]) * 0x2))); |
| 363 |
const x205 = (cast(u64, (arg1[11])) * cast(u64, (arg2[2]))); |
| 364 |
const x206 = (cast(u64, (arg1[11])) * cast(u64, (arg2[1]))); |
| 365 |
const x207 = (cast(u64, (arg1[11])) * cast(u64, (arg2[0]))); |
| 366 |
const x208 = (cast(u64, (arg1[10])) * cast(u64, ((arg2[8]) * 0x2))); |
| 367 |
const x209 = (cast(u64, (arg1[10])) * cast(u64, (arg2[7]))); |
| 368 |
const x210 = (cast(u64, (arg1[10])) * cast(u64, ((arg2[6]) * 0x2))); |
| 369 |
const x211 = (cast(u64, (arg1[10])) * cast(u64, ((arg2[5]) * 0x2))); |
| 370 |
const x212 = (cast(u64, (arg1[10])) * cast(u64, ((arg2[4]) * 0x2))); |
| 371 |
const x213 = (cast(u64, (arg1[10])) * cast(u64, ((arg2[3]) * 0x2))); |
| 372 |
const x214 = (cast(u64, (arg1[10])) * cast(u64, (arg2[2]))); |
| 373 |
const x215 = (cast(u64, (arg1[10])) * cast(u64, ((arg2[1]) * 0x2))); |
| 374 |
const x216 = (cast(u64, (arg1[10])) * cast(u64, (arg2[0]))); |
| 375 |
const x217 = (cast(u64, (arg1[9])) * cast(u64, (arg2[9]))); |
| 376 |
const x218 = (cast(u64, (arg1[9])) * cast(u64, (arg2[8]))); |
| 377 |
const x219 = (cast(u64, (arg1[9])) * cast(u64, (arg2[7]))); |
| 378 |
const x220 = (cast(u64, (arg1[9])) * cast(u64, (arg2[6]))); |
| 379 |
const x221 = (cast(u64, (arg1[9])) * cast(u64, ((arg2[5]) * 0x2))); |
| 380 |
const x222 = (cast(u64, (arg1[9])) * cast(u64, (arg2[4]))); |
| 381 |
const x223 = (cast(u64, (arg1[9])) * cast(u64, (arg2[3]))); |
| 382 |
const x224 = (cast(u64, (arg1[9])) * cast(u64, (arg2[2]))); |
| 383 |
const x225 = (cast(u64, (arg1[9])) * cast(u64, (arg2[1]))); |
| 384 |
const x226 = (cast(u64, (arg1[9])) * cast(u64, (arg2[0]))); |
| 385 |
const x227 = (cast(u64, (arg1[8])) * cast(u64, ((arg2[10]) * 0x2))); |
| 386 |
const x228 = (cast(u64, (arg1[8])) * cast(u64, (arg2[9]))); |
| 387 |
const x229 = (cast(u64, (arg1[8])) * cast(u64, ((arg2[8]) * 0x2))); |
| 388 |
const x230 = (cast(u64, (arg1[8])) * cast(u64, (arg2[7]))); |
| 389 |
const x231 = (cast(u64, (arg1[8])) * cast(u64, ((arg2[6]) * 0x2))); |
| 390 |
const x232 = (cast(u64, (arg1[8])) * cast(u64, ((arg2[5]) * 0x2))); |
| 391 |
const x233 = (cast(u64, (arg1[8])) * cast(u64, (arg2[4]))); |
| 392 |
const x234 = (cast(u64, (arg1[8])) * cast(u64, ((arg2[3]) * 0x2))); |
| 393 |
const x235 = (cast(u64, (arg1[8])) * cast(u64, (arg2[2]))); |
| 394 |
const x236 = (cast(u64, (arg1[8])) * cast(u64, ((arg2[1]) * 0x2))); |
| 395 |
const x237 = (cast(u64, (arg1[8])) * cast(u64, (arg2[0]))); |
| 396 |
const x238 = (cast(u64, (arg1[7])) * cast(u64, (arg2[11]))); |
| 397 |
const x239 = (cast(u64, (arg1[7])) * cast(u64, (arg2[10]))); |
| 398 |
const x240 = (cast(u64, (arg1[7])) * cast(u64, (arg2[9]))); |
| 399 |
const x241 = (cast(u64, (arg1[7])) * cast(u64, (arg2[8]))); |
| 400 |
const x242 = (cast(u64, (arg1[7])) * cast(u64, (arg2[7]))); |
| 401 |
const x243 = (cast(u64, (arg1[7])) * cast(u64, (arg2[6]))); |
| 402 |
const x244 = (cast(u64, (arg1[7])) * cast(u64, (arg2[5]))); |
| 403 |
const x245 = (cast(u64, (arg1[7])) * cast(u64, (arg2[4]))); |
| 404 |
const x246 = (cast(u64, (arg1[7])) * cast(u64, (arg2[3]))); |
| 405 |
const x247 = (cast(u64, (arg1[7])) * cast(u64, (arg2[2]))); |
| 406 |
const x248 = (cast(u64, (arg1[7])) * cast(u64, (arg2[1]))); |
| 407 |
const x249 = (cast(u64, (arg1[7])) * cast(u64, (arg2[0]))); |
| 408 |
const x250 = (cast(u64, (arg1[6])) * cast(u64, ((arg2[12]) * 0x2))); |
| 409 |
const x251 = (cast(u64, (arg1[6])) * cast(u64, (arg2[11]))); |
| 410 |
const x252 = (cast(u64, (arg1[6])) * cast(u64, ((arg2[10]) * 0x2))); |
| 411 |
const x253 = (cast(u64, (arg1[6])) * cast(u64, (arg2[9]))); |
| 412 |
const x254 = (cast(u64, (arg1[6])) * cast(u64, ((arg2[8]) * 0x2))); |
| 413 |
const x255 = (cast(u64, (arg1[6])) * cast(u64, (arg2[7]))); |
| 414 |
const x256 = (cast(u64, (arg1[6])) * cast(u64, (arg2[6]))); |
| 415 |
const x257 = (cast(u64, (arg1[6])) * cast(u64, ((arg2[5]) * 0x2))); |
| 416 |
const x258 = (cast(u64, (arg1[6])) * cast(u64, (arg2[4]))); |
| 417 |
const x259 = (cast(u64, (arg1[6])) * cast(u64, ((arg2[3]) * 0x2))); |
| 418 |
const x260 = (cast(u64, (arg1[6])) * cast(u64, (arg2[2]))); |
| 419 |
const x261 = (cast(u64, (arg1[6])) * cast(u64, ((arg2[1]) * 0x2))); |
| 420 |
const x262 = (cast(u64, (arg1[6])) * cast(u64, (arg2[0]))); |
| 421 |
const x263 = (cast(u64, (arg1[5])) * cast(u64, ((arg2[13]) * 0x2))); |
| 422 |
const x264 = (cast(u64, (arg1[5])) * cast(u64, ((arg2[12]) * 0x2))); |
| 423 |
const x265 = (cast(u64, (arg1[5])) * cast(u64, ((arg2[11]) * 0x2))); |
| 424 |
const x266 = (cast(u64, (arg1[5])) * cast(u64, ((arg2[10]) * 0x2))); |
| 425 |
const x267 = (cast(u64, (arg1[5])) * cast(u64, ((arg2[9]) * 0x2))); |
| 426 |
const x268 = (cast(u64, (arg1[5])) * cast(u64, ((arg2[8]) * 0x2))); |
| 427 |
const x269 = (cast(u64, (arg1[5])) * cast(u64, (arg2[7]))); |
| 428 |
const x270 = (cast(u64, (arg1[5])) * cast(u64, ((arg2[6]) * 0x2))); |
| 429 |
const x271 = (cast(u64, (arg1[5])) * cast(u64, ((arg2[5]) * 0x2))); |
| 430 |
const x272 = (cast(u64, (arg1[5])) * cast(u64, ((arg2[4]) * 0x2))); |
| 431 |
const x273 = (cast(u64, (arg1[5])) * cast(u64, ((arg2[3]) * 0x2))); |
| 432 |
const x274 = (cast(u64, (arg1[5])) * cast(u64, ((arg2[2]) * 0x2))); |
| 433 |
const x275 = (cast(u64, (arg1[5])) * cast(u64, ((arg2[1]) * 0x2))); |
| 434 |
const x276 = (cast(u64, (arg1[5])) * cast(u64, (arg2[0]))); |
| 435 |
const x277 = (cast(u64, (arg1[4])) * cast(u64, (arg2[14]))); |
| 436 |
const x278 = (cast(u64, (arg1[4])) * cast(u64, (arg2[13]))); |
| 437 |
const x279 = (cast(u64, (arg1[4])) * cast(u64, ((arg2[12]) * 0x2))); |
| 438 |
const x280 = (cast(u64, (arg1[4])) * cast(u64, (arg2[11]))); |
| 439 |
const x281 = (cast(u64, (arg1[4])) * cast(u64, ((arg2[10]) * 0x2))); |
| 440 |
const x282 = (cast(u64, (arg1[4])) * cast(u64, (arg2[9]))); |
| 441 |
const x283 = (cast(u64, (arg1[4])) * cast(u64, (arg2[8]))); |
| 442 |
const x284 = (cast(u64, (arg1[4])) * cast(u64, (arg2[7]))); |
| 443 |
const x285 = (cast(u64, (arg1[4])) * cast(u64, (arg2[6]))); |
| 444 |
const x286 = (cast(u64, (arg1[4])) * cast(u64, ((arg2[5]) * 0x2))); |
| 445 |
const x287 = (cast(u64, (arg1[4])) * cast(u64, (arg2[4]))); |
| 446 |
const x288 = (cast(u64, (arg1[4])) * cast(u64, ((arg2[3]) * 0x2))); |
| 447 |
const x289 = (cast(u64, (arg1[4])) * cast(u64, (arg2[2]))); |
| 448 |
const x290 = (cast(u64, (arg1[4])) * cast(u64, (arg2[1]))); |
| 449 |
const x291 = (cast(u64, (arg1[4])) * cast(u64, (arg2[0]))); |
| 450 |
const x292 = (cast(u64, (arg1[3])) * cast(u64, ((arg2[15]) * 0x2))); |
| 451 |
const x293 = (cast(u64, (arg1[3])) * cast(u64, (arg2[14]))); |
| 452 |
const x294 = (cast(u64, (arg1[3])) * cast(u64, ((arg2[13]) * 0x2))); |
| 453 |
const x295 = (cast(u64, (arg1[3])) * cast(u64, ((arg2[12]) * 0x2))); |
| 454 |
const x296 = (cast(u64, (arg1[3])) * cast(u64, ((arg2[11]) * 0x2))); |
| 455 |
const x297 = (cast(u64, (arg1[3])) * cast(u64, ((arg2[10]) * 0x2))); |
| 456 |
const x298 = (cast(u64, (arg1[3])) * cast(u64, (arg2[9]))); |
| 457 |
const x299 = (cast(u64, (arg1[3])) * cast(u64, ((arg2[8]) * 0x2))); |
| 458 |
const x300 = (cast(u64, (arg1[3])) * cast(u64, (arg2[7]))); |
| 459 |
const x301 = (cast(u64, (arg1[3])) * cast(u64, ((arg2[6]) * 0x2))); |
| 460 |
const x302 = (cast(u64, (arg1[3])) * cast(u64, ((arg2[5]) * 0x2))); |
| 461 |
const x303 = (cast(u64, (arg1[3])) * cast(u64, ((arg2[4]) * 0x2))); |
| 462 |
const x304 = (cast(u64, (arg1[3])) * cast(u64, ((arg2[3]) * 0x2))); |
| 463 |
const x305 = (cast(u64, (arg1[3])) * cast(u64, (arg2[2]))); |
| 464 |
const x306 = (cast(u64, (arg1[3])) * cast(u64, ((arg2[1]) * 0x2))); |
| 465 |
const x307 = (cast(u64, (arg1[3])) * cast(u64, (arg2[0]))); |
| 466 |
const x308 = (cast(u64, (arg1[2])) * cast(u64, (arg2[16]))); |
| 467 |
const x309 = (cast(u64, (arg1[2])) * cast(u64, (arg2[15]))); |
| 468 |
const x310 = (cast(u64, (arg1[2])) * cast(u64, (arg2[14]))); |
| 469 |
const x311 = (cast(u64, (arg1[2])) * cast(u64, (arg2[13]))); |
| 470 |
const x312 = (cast(u64, (arg1[2])) * cast(u64, ((arg2[12]) * 0x2))); |
| 471 |
const x313 = (cast(u64, (arg1[2])) * cast(u64, (arg2[11]))); |
| 472 |
const x314 = (cast(u64, (arg1[2])) * cast(u64, (arg2[10]))); |
| 473 |
const x315 = (cast(u64, (arg1[2])) * cast(u64, (arg2[9]))); |
| 474 |
const x316 = (cast(u64, (arg1[2])) * cast(u64, (arg2[8]))); |
| 475 |
const x317 = (cast(u64, (arg1[2])) * cast(u64, (arg2[7]))); |
| 476 |
const x318 = (cast(u64, (arg1[2])) * cast(u64, (arg2[6]))); |
| 477 |
const x319 = (cast(u64, (arg1[2])) * cast(u64, ((arg2[5]) * 0x2))); |
| 478 |
const x320 = (cast(u64, (arg1[2])) * cast(u64, (arg2[4]))); |
| 479 |
const x321 = (cast(u64, (arg1[2])) * cast(u64, (arg2[3]))); |
| 480 |
const x322 = (cast(u64, (arg1[2])) * cast(u64, (arg2[2]))); |
| 481 |
const x323 = (cast(u64, (arg1[2])) * cast(u64, (arg2[1]))); |
| 482 |
const x324 = (cast(u64, (arg1[2])) * cast(u64, (arg2[0]))); |
| 483 |
const x325 = (cast(u64, (arg1[1])) * cast(u64, ((arg2[17]) * 0x2))); |
| 484 |
const x326 = (cast(u64, (arg1[1])) * cast(u64, (arg2[16]))); |
| 485 |
const x327 = (cast(u64, (arg1[1])) * cast(u64, ((arg2[15]) * 0x2))); |
| 486 |
const x328 = (cast(u64, (arg1[1])) * cast(u64, (arg2[14]))); |
| 487 |
const x329 = (cast(u64, (arg1[1])) * cast(u64, ((arg2[13]) * 0x2))); |
| 488 |
const x330 = (cast(u64, (arg1[1])) * cast(u64, ((arg2[12]) * 0x2))); |
| 489 |
const x331 = (cast(u64, (arg1[1])) * cast(u64, (arg2[11]))); |
| 490 |
const x332 = (cast(u64, (arg1[1])) * cast(u64, ((arg2[10]) * 0x2))); |
| 491 |
const x333 = (cast(u64, (arg1[1])) * cast(u64, (arg2[9]))); |
| 492 |
const x334 = (cast(u64, (arg1[1])) * cast(u64, ((arg2[8]) * 0x2))); |
| 493 |
const x335 = (cast(u64, (arg1[1])) * cast(u64, (arg2[7]))); |
| 494 |
const x336 = (cast(u64, (arg1[1])) * cast(u64, ((arg2[6]) * 0x2))); |
| 495 |
const x337 = (cast(u64, (arg1[1])) * cast(u64, ((arg2[5]) * 0x2))); |
| 496 |
const x338 = (cast(u64, (arg1[1])) * cast(u64, (arg2[4]))); |
| 497 |
const x339 = (cast(u64, (arg1[1])) * cast(u64, ((arg2[3]) * 0x2))); |
| 498 |
const x340 = (cast(u64, (arg1[1])) * cast(u64, (arg2[2]))); |
| 499 |
const x341 = (cast(u64, (arg1[1])) * cast(u64, ((arg2[1]) * 0x2))); |
| 500 |
const x342 = (cast(u64, (arg1[1])) * cast(u64, (arg2[0]))); |
| 501 |
const x343 = (cast(u64, (arg1[0])) * cast(u64, (arg2[18]))); |
| 502 |
const x344 = (cast(u64, (arg1[0])) * cast(u64, (arg2[17]))); |
| 503 |
const x345 = (cast(u64, (arg1[0])) * cast(u64, (arg2[16]))); |
| 504 |
const x346 = (cast(u64, (arg1[0])) * cast(u64, (arg2[15]))); |
| 505 |
const x347 = (cast(u64, (arg1[0])) * cast(u64, (arg2[14]))); |
| 506 |
const x348 = (cast(u64, (arg1[0])) * cast(u64, (arg2[13]))); |
| 507 |
const x349 = (cast(u64, (arg1[0])) * cast(u64, (arg2[12]))); |
| 508 |
const x350 = (cast(u64, (arg1[0])) * cast(u64, (arg2[11]))); |
| 509 |
const x351 = (cast(u64, (arg1[0])) * cast(u64, (arg2[10]))); |
| 510 |
const x352 = (cast(u64, (arg1[0])) * cast(u64, (arg2[9]))); |
| 511 |
const x353 = (cast(u64, (arg1[0])) * cast(u64, (arg2[8]))); |
| 512 |
const x354 = (cast(u64, (arg1[0])) * cast(u64, (arg2[7]))); |
| 513 |
const x355 = (cast(u64, (arg1[0])) * cast(u64, (arg2[6]))); |
| 514 |
const x356 = (cast(u64, (arg1[0])) * cast(u64, (arg2[5]))); |
| 515 |
const x357 = (cast(u64, (arg1[0])) * cast(u64, (arg2[4]))); |
| 516 |
const x358 = (cast(u64, (arg1[0])) * cast(u64, (arg2[3]))); |
| 517 |
const x359 = (cast(u64, (arg1[0])) * cast(u64, (arg2[2]))); |
| 518 |
const x360 = (cast(u64, (arg1[0])) * cast(u64, (arg2[1]))); |
| 519 |
const x361 = (cast(u64, (arg1[0])) * cast(u64, (arg2[0]))); |
| 520 |
const x362 = (x361 + (x171 + (x170 + (x168 + (x165 + (x161 + (x156 + (x150 + (x143 + (x135 + (x126 + (x116 + (x105 + (x93 + (x80 + (x66 + (x51 + (x35 + x18)))))))))))))))))); |
| 521 |
const x363 = (x362 >> 28); |
| 522 |
const x364 = cast(u32, (x362 & cast(u64, 0xfffffff))); |
| 523 |
const x365 = (x343 + (x325 + (x308 + (x292 + (x277 + (x263 + (x250 + (x238 + (x227 + (x217 + (x208 + (x200 + (x193 + (x187 + (x182 + (x178 + (x175 + (x173 + x172)))))))))))))))))); |
| 524 |
const x366 = (x344 + (x326 + (x309 + (x293 + (x278 + (x264 + (x251 + (x239 + (x228 + (x218 + (x209 + (x201 + (x194 + (x188 + (x183 + (x179 + (x176 + (x174 + x1)))))))))))))))))); |
| 525 |
const x367 = (x345 + (x327 + (x310 + (x294 + (x279 + (x265 + (x252 + (x240 + (x229 + (x219 + (x210 + (x202 + (x195 + (x189 + (x184 + (x180 + (x177 + (x19 + x2)))))))))))))))))); |
| 526 |
const x368 = (x346 + (x328 + (x311 + (x295 + (x280 + (x266 + (x253 + (x241 + (x230 + (x220 + (x211 + (x203 + (x196 + (x190 + (x185 + (x181 + (x36 + (x20 + x3)))))))))))))))))); |
| 527 |
const x369 = (x347 + (x329 + (x312 + (x296 + (x281 + (x267 + (x254 + (x242 + (x231 + (x221 + (x212 + (x204 + (x197 + (x191 + (x186 + (x52 + (x37 + (x21 + x4)))))))))))))))))); |
| 528 |
const x370 = (x348 + (x330 + (x313 + (x297 + (x282 + (x268 + (x255 + (x243 + (x232 + (x222 + (x213 + (x205 + (x198 + (x192 + (x67 + (x53 + (x38 + (x22 + x5)))))))))))))))))); |
| 529 |
const x371 = (x349 + (x331 + (x314 + (x298 + (x283 + (x269 + (x256 + (x244 + (x233 + (x223 + (x214 + (x206 + (x199 + (x81 + (x68 + (x54 + (x39 + (x23 + x6)))))))))))))))))); |
| 530 |
const x372 = (x350 + (x332 + (x315 + (x299 + (x284 + (x270 + (x257 + (x245 + (x234 + (x224 + (x215 + (x207 + (x94 + (x82 + (x69 + (x55 + (x40 + (x24 + x7)))))))))))))))))); |
| 531 |
const x373 = (x351 + (x333 + (x316 + (x300 + (x285 + (x271 + (x258 + (x246 + (x235 + (x225 + (x216 + (x106 + (x95 + (x83 + (x70 + (x56 + (x41 + (x25 + x8)))))))))))))))))); |
| 532 |
const x374 = (x352 + (x334 + (x317 + (x301 + (x286 + (x272 + (x259 + (x247 + (x236 + (x226 + (x117 + (x107 + (x96 + (x84 + (x71 + (x57 + (x42 + (x26 + x9)))))))))))))))))); |
| 533 |
const x375 = (x353 + (x335 + (x318 + (x302 + (x287 + (x273 + (x260 + (x248 + (x237 + (x127 + (x118 + (x108 + (x97 + (x85 + (x72 + (x58 + (x43 + (x27 + x10)))))))))))))))))); |
| 534 |
const x376 = (x354 + (x336 + (x319 + (x303 + (x288 + (x274 + (x261 + (x249 + (x136 + (x128 + (x119 + (x109 + (x98 + (x86 + (x73 + (x59 + (x44 + (x28 + x11)))))))))))))))))); |
| 535 |
const x377 = (x355 + (x337 + (x320 + (x304 + (x289 + (x275 + (x262 + (x144 + (x137 + (x129 + (x120 + (x110 + (x99 + (x87 + (x74 + (x60 + (x45 + (x29 + x12)))))))))))))))))); |
| 536 |
const x378 = (x356 + (x338 + (x321 + (x305 + (x290 + (x276 + (x151 + (x145 + (x138 + (x130 + (x121 + (x111 + (x100 + (x88 + (x75 + (x61 + (x46 + (x30 + x13)))))))))))))))))); |
| 537 |
const x379 = (x357 + (x339 + (x322 + (x306 + (x291 + (x157 + (x152 + (x146 + (x139 + (x131 + (x122 + (x112 + (x101 + (x89 + (x76 + (x62 + (x47 + (x31 + x14)))))))))))))))))); |
| 538 |
const x380 = (x358 + (x340 + (x323 + (x307 + (x162 + (x158 + (x153 + (x147 + (x140 + (x132 + (x123 + (x113 + (x102 + (x90 + (x77 + (x63 + (x48 + (x32 + x15)))))))))))))))))); |
| 539 |
const x381 = (x359 + (x341 + (x324 + (x166 + (x163 + (x159 + (x154 + (x148 + (x141 + (x133 + (x124 + (x114 + (x103 + (x91 + (x78 + (x64 + (x49 + (x33 + x16)))))))))))))))))); |
| 540 |
const x382 = (x360 + (x342 + (x169 + (x167 + (x164 + (x160 + (x155 + (x149 + (x142 + (x134 + (x125 + (x115 + (x104 + (x92 + (x79 + (x65 + (x50 + (x34 + x17)))))))))))))))))); |
| 541 |
const x383 = (x363 + x382); |
| 542 |
const x384 = (x383 >> 27); |
| 543 |
const x385 = cast(u32, (x383 & cast(u64, 0x7ffffff))); |
| 544 |
const x386 = (x384 + x381); |
| 545 |
const x387 = (x386 >> 28); |
| 546 |
const x388 = cast(u32, (x386 & cast(u64, 0xfffffff))); |
| 547 |
const x389 = (x387 + x380); |
| 548 |
const x390 = (x389 >> 27); |
| 549 |
const x391 = cast(u32, (x389 & cast(u64, 0x7ffffff))); |
| 550 |
const x392 = (x390 + x379); |
| 551 |
const x393 = (x392 >> 28); |
| 552 |
const x394 = cast(u32, (x392 & cast(u64, 0xfffffff))); |
| 553 |
const x395 = (x393 + x378); |
| 554 |
const x396 = (x395 >> 27); |
| 555 |
const x397 = cast(u32, (x395 & cast(u64, 0x7ffffff))); |
| 556 |
const x398 = (x396 + x377); |
| 557 |
const x399 = (x398 >> 27); |
| 558 |
const x400 = cast(u32, (x398 & cast(u64, 0x7ffffff))); |
| 559 |
const x401 = (x399 + x376); |
| 560 |
const x402 = (x401 >> 28); |
| 561 |
const x403 = cast(u32, (x401 & cast(u64, 0xfffffff))); |
| 562 |
const x404 = (x402 + x375); |
| 563 |
const x405 = (x404 >> 27); |
| 564 |
const x406 = cast(u32, (x404 & cast(u64, 0x7ffffff))); |
| 565 |
const x407 = (x405 + x374); |
| 566 |
const x408 = (x407 >> 28); |
| 567 |
const x409 = cast(u32, (x407 & cast(u64, 0xfffffff))); |
| 568 |
const x410 = (x408 + x373); |
| 569 |
const x411 = (x410 >> 27); |
| 570 |
const x412 = cast(u32, (x410 & cast(u64, 0x7ffffff))); |
| 571 |
const x413 = (x411 + x372); |
| 572 |
const x414 = (x413 >> 28); |
| 573 |
const x415 = cast(u32, (x413 & cast(u64, 0xfffffff))); |
| 574 |
const x416 = (x414 + x371); |
| 575 |
const x417 = (x416 >> 27); |
| 576 |
const x418 = cast(u32, (x416 & cast(u64, 0x7ffffff))); |
| 577 |
const x419 = (x417 + x370); |
| 578 |
const x420 = (x419 >> 27); |
| 579 |
const x421 = cast(u32, (x419 & cast(u64, 0x7ffffff))); |
| 580 |
const x422 = (x420 + x369); |
| 581 |
const x423 = (x422 >> 28); |
| 582 |
const x424 = cast(u32, (x422 & cast(u64, 0xfffffff))); |
| 583 |
const x425 = (x423 + x368); |
| 584 |
const x426 = (x425 >> 27); |
| 585 |
const x427 = cast(u32, (x425 & cast(u64, 0x7ffffff))); |
| 586 |
const x428 = (x426 + x367); |
| 587 |
const x429 = (x428 >> 28); |
| 588 |
const x430 = cast(u32, (x428 & cast(u64, 0xfffffff))); |
| 589 |
const x431 = (x429 + x366); |
| 590 |
const x432 = (x431 >> 27); |
| 591 |
const x433 = cast(u32, (x431 & cast(u64, 0x7ffffff))); |
| 592 |
const x434 = (x432 + x365); |
| 593 |
const x435 = (x434 >> 27); |
| 594 |
const x436 = cast(u32, (x434 & cast(u64, 0x7ffffff))); |
| 595 |
const x437 = (cast(u64, x364) + x435); |
| 596 |
const x438 = cast(u32, (x437 >> 28)); |
| 597 |
const x439 = cast(u32, (x437 & cast(u64, 0xfffffff))); |
| 598 |
const x440 = (x438 + x385); |
| 599 |
const x441 = cast(u1, (x440 >> 27)); |
| 600 |
const x442 = (x440 & 0x7ffffff); |
| 601 |
const x443 = (cast(u32, x441) + x388); |
| 602 |
out1[0] = x439; |
| 603 |
out1[1] = x442; |
| 604 |
out1[2] = x443; |
| 605 |
out1[3] = x391; |
| 606 |
out1[4] = x394; |
| 607 |
out1[5] = x397; |
| 608 |
out1[6] = x400; |
| 609 |
out1[7] = x403; |
| 610 |
out1[8] = x406; |
| 611 |
out1[9] = x409; |
| 612 |
out1[10] = x412; |
| 613 |
out1[11] = x415; |
| 614 |
out1[12] = x418; |
| 615 |
out1[13] = x421; |
| 616 |
out1[14] = x424; |
| 617 |
out1[15] = x427; |
| 618 |
out1[16] = x430; |
| 619 |
out1[17] = x433; |
| 620 |
out1[18] = x436; |
| 621 |
} |
| 622 |
|
| 623 |
/// The function carrySquare squares a field element and reduces the result. |
| 624 |
/// |
| 625 |
/// Postconditions: |
| 626 |
/// eval out1 mod m = (eval arg1 * eval arg1) mod m |
| 627 |
/// |
| 628 |
pub fn carrySquare(out1: *TightFieldElement, arg1: LooseFieldElement) void { |
| 629 |
@setRuntimeSafety(mode == .Debug); |
| 630 |
|
| 631 |
const x1 = (arg1[18]); |
| 632 |
const x2 = (x1 * 0x2); |
| 633 |
const x3 = ((arg1[18]) * 0x2); |
| 634 |
const x4 = (arg1[17]); |
| 635 |
const x5 = (x4 * 0x2); |
| 636 |
const x6 = ((arg1[17]) * 0x2); |
| 637 |
const x7 = (arg1[16]); |
| 638 |
const x8 = (x7 * 0x2); |
| 639 |
const x9 = ((arg1[16]) * 0x2); |
| 640 |
const x10 = (arg1[15]); |
| 641 |
const x11 = (x10 * 0x2); |
| 642 |
const x12 = ((arg1[15]) * 0x2); |
| 643 |
const x13 = (arg1[14]); |
| 644 |
const x14 = (x13 * 0x2); |
| 645 |
const x15 = ((arg1[14]) * 0x2); |
| 646 |
const x16 = (arg1[13]); |
| 647 |
const x17 = (x16 * 0x2); |
| 648 |
const x18 = ((arg1[13]) * 0x2); |
| 649 |
const x19 = (arg1[12]); |
| 650 |
const x20 = (x19 * 0x2); |
| 651 |
const x21 = ((arg1[12]) * 0x2); |
| 652 |
const x22 = (arg1[11]); |
| 653 |
const x23 = (x22 * 0x2); |
| 654 |
const x24 = ((arg1[11]) * 0x2); |
| 655 |
const x25 = (arg1[10]); |
| 656 |
const x26 = (x25 * 0x2); |
| 657 |
const x27 = ((arg1[10]) * 0x2); |
| 658 |
const x28 = ((arg1[9]) * 0x2); |
| 659 |
const x29 = ((arg1[8]) * 0x2); |
| 660 |
const x30 = ((arg1[7]) * 0x2); |
| 661 |
const x31 = ((arg1[6]) * 0x2); |
| 662 |
const x32 = ((arg1[5]) * 0x2); |
| 663 |
const x33 = ((arg1[4]) * 0x2); |
| 664 |
const x34 = ((arg1[3]) * 0x2); |
| 665 |
const x35 = ((arg1[2]) * 0x2); |
| 666 |
const x36 = ((arg1[1]) * 0x2); |
| 667 |
const x37 = (cast(u64, (arg1[18])) * cast(u64, x1)); |
| 668 |
const x38 = (cast(u64, (arg1[17])) * cast(u64, (x2 * 0x2))); |
| 669 |
const x39 = (cast(u64, (arg1[17])) * cast(u64, (x4 * 0x2))); |
| 670 |
const x40 = (cast(u64, (arg1[16])) * cast(u64, x2)); |
| 671 |
const x41 = (cast(u64, (arg1[16])) * cast(u64, (x5 * 0x2))); |
| 672 |
const x42 = (cast(u64, (arg1[16])) * cast(u64, x7)); |
| 673 |
const x43 = (cast(u64, (arg1[15])) * cast(u64, (x2 * 0x2))); |
| 674 |
const x44 = (cast(u64, (arg1[15])) * cast(u64, (x5 * 0x2))); |
| 675 |
const x45 = (cast(u64, (arg1[15])) * cast(u64, x8)); |
| 676 |
const x46 = (cast(u64, (arg1[15])) * cast(u64, (x10 * 0x2))); |
| 677 |
const x47 = (cast(u64, (arg1[14])) * cast(u64, x2)); |
| 678 |
const x48 = (cast(u64, (arg1[14])) * cast(u64, x5)); |
| 679 |
const x49 = (cast(u64, (arg1[14])) * cast(u64, x8)); |
| 680 |
const x50 = (cast(u64, (arg1[14])) * cast(u64, x11)); |
| 681 |
const x51 = (cast(u64, (arg1[14])) * cast(u64, x13)); |
| 682 |
const x52 = (cast(u64, (arg1[13])) * cast(u64, x2)); |
| 683 |
const x53 = (cast(u64, (arg1[13])) * cast(u64, (x5 * 0x2))); |
| 684 |
const x54 = (cast(u64, (arg1[13])) * cast(u64, x8)); |
| 685 |
const x55 = (cast(u64, (arg1[13])) * cast(u64, (x11 * 0x2))); |
| 686 |
const x56 = (cast(u64, (arg1[13])) * cast(u64, x14)); |
| 687 |
const x57 = (cast(u64, (arg1[13])) * cast(u64, (x16 * 0x2))); |
| 688 |
const x58 = (cast(u64, (arg1[12])) * cast(u64, (x2 * 0x2))); |
| 689 |
const x59 = (cast(u64, (arg1[12])) * cast(u64, (x5 * 0x2))); |
| 690 |
const x60 = (cast(u64, (arg1[12])) * cast(u64, (x8 * 0x2))); |
| 691 |
const x61 = (cast(u64, (arg1[12])) * cast(u64, (x11 * 0x2))); |
| 692 |
const x62 = (cast(u64, (arg1[12])) * cast(u64, (x14 * 0x2))); |
| 693 |
const x63 = (cast(u64, (arg1[12])) * cast(u64, (x17 * 0x2))); |
| 694 |
const x64 = (cast(u64, (arg1[12])) * cast(u64, (x19 * 0x2))); |
| 695 |
const x65 = (cast(u64, (arg1[11])) * cast(u64, x2)); |
| 696 |
const x66 = (cast(u64, (arg1[11])) * cast(u64, (x5 * 0x2))); |
| 697 |
const x67 = (cast(u64, (arg1[11])) * cast(u64, x8)); |
| 698 |
const x68 = (cast(u64, (arg1[11])) * cast(u64, (x11 * 0x2))); |
| 699 |
const x69 = (cast(u64, (arg1[11])) * cast(u64, x14)); |
| 700 |
const x70 = (cast(u64, (arg1[11])) * cast(u64, x17)); |
| 701 |
const x71 = (cast(u64, (arg1[11])) * cast(u64, (x20 * 0x2))); |
| 702 |
const x72 = (cast(u64, (arg1[11])) * cast(u64, x22)); |
| 703 |
const x73 = (cast(u64, (arg1[10])) * cast(u64, (x2 * 0x2))); |
| 704 |
const x74 = (cast(u64, (arg1[10])) * cast(u64, (x5 * 0x2))); |
| 705 |
const x75 = (cast(u64, (arg1[10])) * cast(u64, (x8 * 0x2))); |
| 706 |
const x76 = (cast(u64, (arg1[10])) * cast(u64, (x11 * 0x2))); |
| 707 |
const x77 = (cast(u64, (arg1[10])) * cast(u64, x14)); |
| 708 |
const x78 = (cast(u64, (arg1[10])) * cast(u64, (x17 * 0x2))); |
| 709 |
const x79 = (cast(u64, (arg1[10])) * cast(u64, (x20 * 0x2))); |
| 710 |
const x80 = (cast(u64, (arg1[10])) * cast(u64, (x23 * 0x2))); |
| 711 |
const x81 = (cast(u64, (arg1[10])) * cast(u64, (x25 * 0x2))); |
| 712 |
const x82 = (cast(u64, (arg1[9])) * cast(u64, x2)); |
| 713 |
const x83 = (cast(u64, (arg1[9])) * cast(u64, (x5 * 0x2))); |
| 714 |
const x84 = (cast(u64, (arg1[9])) * cast(u64, x8)); |
| 715 |
const x85 = (cast(u64, (arg1[9])) * cast(u64, x11)); |
| 716 |
const x86 = (cast(u64, (arg1[9])) * cast(u64, x14)); |
| 717 |
const x87 = (cast(u64, (arg1[9])) * cast(u64, x17)); |
| 718 |
const x88 = (cast(u64, (arg1[9])) * cast(u64, (x20 * 0x2))); |
| 719 |
const x89 = (cast(u64, (arg1[9])) * cast(u64, x23)); |
| 720 |
const x90 = (cast(u64, (arg1[9])) * cast(u64, (x26 * 0x2))); |
| 721 |
const x91 = (cast(u64, (arg1[9])) * cast(u64, (arg1[9]))); |
| 722 |
const x92 = (cast(u64, (arg1[8])) * cast(u64, (x2 * 0x2))); |
| 723 |
const x93 = (cast(u64, (arg1[8])) * cast(u64, (x5 * 0x2))); |
| 724 |
const x94 = (cast(u64, (arg1[8])) * cast(u64, x8)); |
| 725 |
const x95 = (cast(u64, (arg1[8])) * cast(u64, (x11 * 0x2))); |
| 726 |
const x96 = (cast(u64, (arg1[8])) * cast(u64, x14)); |
| 727 |
const x97 = (cast(u64, (arg1[8])) * cast(u64, (x17 * 0x2))); |
| 728 |
const x98 = (cast(u64, (arg1[8])) * cast(u64, (x20 * 0x2))); |
| 729 |
const x99 = (cast(u64, (arg1[8])) * cast(u64, (x23 * 0x2))); |
| 730 |
const x100 = (cast(u64, (arg1[8])) * cast(u64, (x27 * 0x2))); |
| 731 |
const x101 = (cast(u64, (arg1[8])) * cast(u64, x28)); |
| 732 |
const x102 = (cast(u64, (arg1[8])) * cast(u64, ((arg1[8]) * 0x2))); |
| 733 |
const x103 = (cast(u64, (arg1[7])) * cast(u64, x2)); |
| 734 |
const x104 = (cast(u64, (arg1[7])) * cast(u64, x5)); |
| 735 |
const x105 = (cast(u64, (arg1[7])) * cast(u64, x8)); |
| 736 |
const x106 = (cast(u64, (arg1[7])) * cast(u64, x11)); |
| 737 |
const x107 = (cast(u64, (arg1[7])) * cast(u64, x14)); |
| 738 |
const x108 = (cast(u64, (arg1[7])) * cast(u64, x17)); |
| 739 |
const x109 = (cast(u64, (arg1[7])) * cast(u64, (x20 * 0x2))); |
| 740 |
const x110 = (cast(u64, (arg1[7])) * cast(u64, x24)); |
| 741 |
const x111 = (cast(u64, (arg1[7])) * cast(u64, x27)); |
| 742 |
const x112 = (cast(u64, (arg1[7])) * cast(u64, x28)); |
| 743 |
const x113 = (cast(u64, (arg1[7])) * cast(u64, x29)); |
| 744 |
const x114 = (cast(u64, (arg1[7])) * cast(u64, (arg1[7]))); |
| 745 |
const x115 = (cast(u64, (arg1[6])) * cast(u64, x2)); |
| 746 |
const x116 = (cast(u64, (arg1[6])) * cast(u64, (x5 * 0x2))); |
| 747 |
const x117 = (cast(u64, (arg1[6])) * cast(u64, x8)); |
| 748 |
const x118 = (cast(u64, (arg1[6])) * cast(u64, (x11 * 0x2))); |
| 749 |
const x119 = (cast(u64, (arg1[6])) * cast(u64, x14)); |
| 750 |
const x120 = (cast(u64, (arg1[6])) * cast(u64, (x17 * 0x2))); |
| 751 |
const x121 = (cast(u64, (arg1[6])) * cast(u64, (x21 * 0x2))); |
| 752 |
const x122 = (cast(u64, (arg1[6])) * cast(u64, x24)); |
| 753 |
const x123 = (cast(u64, (arg1[6])) * cast(u64, (x27 * 0x2))); |
| 754 |
const x124 = (cast(u64, (arg1[6])) * cast(u64, x28)); |
| 755 |
const x125 = (cast(u64, (arg1[6])) * cast(u64, (x29 * 0x2))); |
| 756 |
const x126 = (cast(u64, (arg1[6])) * cast(u64, x30)); |
| 757 |
const x127 = (cast(u64, (arg1[6])) * cast(u64, (arg1[6]))); |
| 758 |
const x128 = (cast(u64, (arg1[5])) * cast(u64, (x2 * 0x2))); |
| 759 |
const x129 = (cast(u64, (arg1[5])) * cast(u64, (x5 * 0x2))); |
| 760 |
const x130 = (cast(u64, (arg1[5])) * cast(u64, (x8 * 0x2))); |
| 761 |
const x131 = (cast(u64, (arg1[5])) * cast(u64, (x11 * 0x2))); |
| 762 |
const x132 = (cast(u64, (arg1[5])) * cast(u64, (x14 * 0x2))); |
| 763 |
const x133 = (cast(u64, (arg1[5])) * cast(u64, (x18 * 0x2))); |
| 764 |
const x134 = (cast(u64, (arg1[5])) * cast(u64, (x21 * 0x2))); |
| 765 |
const x135 = (cast(u64, (arg1[5])) * cast(u64, (x24 * 0x2))); |
| 766 |
const x136 = (cast(u64, (arg1[5])) * cast(u64, (x27 * 0x2))); |
| 767 |
const x137 = (cast(u64, (arg1[5])) * cast(u64, (x28 * 0x2))); |
| 768 |
const x138 = (cast(u64, (arg1[5])) * cast(u64, (x29 * 0x2))); |
| 769 |
const x139 = (cast(u64, (arg1[5])) * cast(u64, x30)); |
| 770 |
const x140 = (cast(u64, (arg1[5])) * cast(u64, (x31 * 0x2))); |
| 771 |
const x141 = (cast(u64, (arg1[5])) * cast(u64, ((arg1[5]) * 0x2))); |
| 772 |
const x142 = (cast(u64, (arg1[4])) * cast(u64, x2)); |
| 773 |
const x143 = (cast(u64, (arg1[4])) * cast(u64, (x5 * 0x2))); |
| 774 |
const x144 = (cast(u64, (arg1[4])) * cast(u64, x8)); |
| 775 |
const x145 = (cast(u64, (arg1[4])) * cast(u64, (x11 * 0x2))); |
| 776 |
const x146 = (cast(u64, (arg1[4])) * cast(u64, x15)); |
| 777 |
const x147 = (cast(u64, (arg1[4])) * cast(u64, x18)); |
| 778 |
const x148 = (cast(u64, (arg1[4])) * cast(u64, (x21 * 0x2))); |
| 779 |
const x149 = (cast(u64, (arg1[4])) * cast(u64, x24)); |
| 780 |
const x150 = (cast(u64, (arg1[4])) * cast(u64, (x27 * 0x2))); |
| 781 |
const x151 = (cast(u64, (arg1[4])) * cast(u64, x28)); |
| 782 |
const x152 = (cast(u64, (arg1[4])) * cast(u64, x29)); |
| 783 |
const x153 = (cast(u64, (arg1[4])) * cast(u64, x30)); |
| 784 |
const x154 = (cast(u64, (arg1[4])) * cast(u64, x31)); |
| 785 |
const x155 = (cast(u64, (arg1[4])) * cast(u64, (x32 * 0x2))); |
| 786 |
const x156 = (cast(u64, (arg1[4])) * cast(u64, (arg1[4]))); |
| 787 |
const x157 = (cast(u64, (arg1[3])) * cast(u64, (x2 * 0x2))); |
| 788 |
const x158 = (cast(u64, (arg1[3])) * cast(u64, (x5 * 0x2))); |
| 789 |
const x159 = (cast(u64, (arg1[3])) * cast(u64, (x8 * 0x2))); |
| 790 |
const x160 = (cast(u64, (arg1[3])) * cast(u64, (x12 * 0x2))); |
| 791 |
const x161 = (cast(u64, (arg1[3])) * cast(u64, x15)); |
| 792 |
const x162 = (cast(u64, (arg1[3])) * cast(u64, (x18 * 0x2))); |
| 793 |
const x163 = (cast(u64, (arg1[3])) * cast(u64, (x21 * 0x2))); |
| 794 |
const x164 = (cast(u64, (arg1[3])) * cast(u64, (x24 * 0x2))); |
| 795 |
const x165 = (cast(u64, (arg1[3])) * cast(u64, (x27 * 0x2))); |
| 796 |
const x166 = (cast(u64, (arg1[3])) * cast(u64, x28)); |
| 797 |
const x167 = (cast(u64, (arg1[3])) * cast(u64, (x29 * 0x2))); |
| 798 |
const x168 = (cast(u64, (arg1[3])) * cast(u64, x30)); |
| 799 |
const x169 = (cast(u64, (arg1[3])) * cast(u64, (x31 * 0x2))); |
| 800 |
const x170 = (cast(u64, (arg1[3])) * cast(u64, (x32 * 0x2))); |
| 801 |
const x171 = (cast(u64, (arg1[3])) * cast(u64, (x33 * 0x2))); |
| 802 |
const x172 = (cast(u64, (arg1[3])) * cast(u64, ((arg1[3]) * 0x2))); |
| 803 |
const x173 = (cast(u64, (arg1[2])) * cast(u64, x2)); |
| 804 |
const x174 = (cast(u64, (arg1[2])) * cast(u64, (x5 * 0x2))); |
| 805 |
const x175 = (cast(u64, (arg1[2])) * cast(u64, x9)); |
| 806 |
const x176 = (cast(u64, (arg1[2])) * cast(u64, x12)); |
| 807 |
const x177 = (cast(u64, (arg1[2])) * cast(u64, x15)); |
| 808 |
const x178 = (cast(u64, (arg1[2])) * cast(u64, x18)); |
| 809 |
const x179 = (cast(u64, (arg1[2])) * cast(u64, (x21 * 0x2))); |
| 810 |
const x180 = (cast(u64, (arg1[2])) * cast(u64, x24)); |
| 811 |
const x181 = (cast(u64, (arg1[2])) * cast(u64, x27)); |
| 812 |
const x182 = (cast(u64, (arg1[2])) * cast(u64, x28)); |
| 813 |
const x183 = (cast(u64, (arg1[2])) * cast(u64, x29)); |
| 814 |
const x184 = (cast(u64, (arg1[2])) * cast(u64, x30)); |
| 815 |
const x185 = (cast(u64, (arg1[2])) * cast(u64, x31)); |
| 816 |
const x186 = (cast(u64, (arg1[2])) * cast(u64, (x32 * 0x2))); |
| 817 |
const x187 = (cast(u64, (arg1[2])) * cast(u64, x33)); |
| 818 |
const x188 = (cast(u64, (arg1[2])) * cast(u64, x34)); |
| 819 |
const x189 = (cast(u64, (arg1[2])) * cast(u64, (arg1[2]))); |
| 820 |
const x190 = (cast(u64, (arg1[1])) * cast(u64, (x2 * 0x2))); |
| 821 |
const x191 = (cast(u64, (arg1[1])) * cast(u64, (x6 * 0x2))); |
| 822 |
const x192 = (cast(u64, (arg1[1])) * cast(u64, x9)); |
| 823 |
const x193 = (cast(u64, (arg1[1])) * cast(u64, (x12 * 0x2))); |
| 824 |
const x194 = (cast(u64, (arg1[1])) * cast(u64, x15)); |
| 825 |
const x195 = (cast(u64, (arg1[1])) * cast(u64, (x18 * 0x2))); |
| 826 |
const x196 = (cast(u64, (arg1[1])) * cast(u64, (x21 * 0x2))); |
| 827 |
const x197 = (cast(u64, (arg1[1])) * cast(u64, x24)); |
| 828 |
const x198 = (cast(u64, (arg1[1])) * cast(u64, (x27 * 0x2))); |
| 829 |
const x199 = (cast(u64, (arg1[1])) * cast(u64, x28)); |
| 830 |
const x200 = (cast(u64, (arg1[1])) * cast(u64, (x29 * 0x2))); |
| 831 |
const x201 = (cast(u64, (arg1[1])) * cast(u64, x30)); |
| 832 |
const x202 = (cast(u64, (arg1[1])) * cast(u64, (x31 * 0x2))); |
| 833 |
const x203 = (cast(u64, (arg1[1])) * cast(u64, (x32 * 0x2))); |
| 834 |
const x204 = (cast(u64, (arg1[1])) * cast(u64, x33)); |
| 835 |
const x205 = (cast(u64, (arg1[1])) * cast(u64, (x34 * 0x2))); |
| 836 |
const x206 = (cast(u64, (arg1[1])) * cast(u64, x35)); |
| 837 |
const x207 = (cast(u64, (arg1[1])) * cast(u64, ((arg1[1]) * 0x2))); |
| 838 |
const x208 = (cast(u64, (arg1[0])) * cast(u64, x3)); |
| 839 |
const x209 = (cast(u64, (arg1[0])) * cast(u64, x6)); |
| 840 |
const x210 = (cast(u64, (arg1[0])) * cast(u64, x9)); |
| 841 |
const x211 = (cast(u64, (arg1[0])) * cast(u64, x12)); |
| 842 |
const x212 = (cast(u64, (arg1[0])) * cast(u64, x15)); |
| 843 |
const x213 = (cast(u64, (arg1[0])) * cast(u64, x18)); |
| 844 |
const x214 = (cast(u64, (arg1[0])) * cast(u64, x21)); |
| 845 |
const x215 = (cast(u64, (arg1[0])) * cast(u64, x24)); |
| 846 |
const x216 = (cast(u64, (arg1[0])) * cast(u64, x27)); |
| 847 |
const x217 = (cast(u64, (arg1[0])) * cast(u64, x28)); |
| 848 |
const x218 = (cast(u64, (arg1[0])) * cast(u64, x29)); |
| 849 |
const x219 = (cast(u64, (arg1[0])) * cast(u64, x30)); |
| 850 |
const x220 = (cast(u64, (arg1[0])) * cast(u64, x31)); |
| 851 |
const x221 = (cast(u64, (arg1[0])) * cast(u64, x32)); |
| 852 |
const x222 = (cast(u64, (arg1[0])) * cast(u64, x33)); |
| 853 |
const x223 = (cast(u64, (arg1[0])) * cast(u64, x34)); |
| 854 |
const x224 = (cast(u64, (arg1[0])) * cast(u64, x35)); |
| 855 |
const x225 = (cast(u64, (arg1[0])) * cast(u64, x36)); |
| 856 |
const x226 = (cast(u64, (arg1[0])) * cast(u64, (arg1[0]))); |
| 857 |
const x227 = (x226 + (x190 + (x174 + (x159 + (x145 + (x132 + (x120 + (x109 + (x99 + x90))))))))); |
| 858 |
const x228 = (x227 >> 28); |
| 859 |
const x229 = cast(u32, (x227 & cast(u64, 0xfffffff))); |
| 860 |
const x230 = (x208 + (x191 + (x175 + (x160 + (x146 + (x133 + (x121 + (x110 + (x100 + x91))))))))); |
| 861 |
const x231 = (x209 + (x192 + (x176 + (x161 + (x147 + (x134 + (x122 + (x111 + (x101 + x37))))))))); |
| 862 |
const x232 = (x210 + (x193 + (x177 + (x162 + (x148 + (x135 + (x123 + (x112 + (x102 + x38))))))))); |
| 863 |
const x233 = (x211 + (x194 + (x178 + (x163 + (x149 + (x136 + (x124 + (x113 + (x40 + x39))))))))); |
| 864 |
const x234 = (x212 + (x195 + (x179 + (x164 + (x150 + (x137 + (x125 + (x114 + (x43 + x41))))))))); |
| 865 |
const x235 = (x213 + (x196 + (x180 + (x165 + (x151 + (x138 + (x126 + (x47 + (x44 + x42))))))))); |
| 866 |
const x236 = (x214 + (x197 + (x181 + (x166 + (x152 + (x139 + (x127 + (x52 + (x48 + x45))))))))); |
| 867 |
const x237 = (x215 + (x198 + (x182 + (x167 + (x153 + (x140 + (x58 + (x53 + (x49 + x46))))))))); |
| 868 |
const x238 = (x216 + (x199 + (x183 + (x168 + (x154 + (x141 + (x65 + (x59 + (x54 + x50))))))))); |
| 869 |
const x239 = (x217 + (x200 + (x184 + (x169 + (x155 + (x73 + (x66 + (x60 + (x55 + x51))))))))); |
| 870 |
const x240 = (x218 + (x201 + (x185 + (x170 + (x156 + (x82 + (x74 + (x67 + (x61 + x56))))))))); |
| 871 |
const x241 = (x219 + (x202 + (x186 + (x171 + (x92 + (x83 + (x75 + (x68 + (x62 + x57))))))))); |
| 872 |
const x242 = (x220 + (x203 + (x187 + (x172 + (x103 + (x93 + (x84 + (x76 + (x69 + x63))))))))); |
| 873 |
const x243 = (x221 + (x204 + (x188 + (x115 + (x104 + (x94 + (x85 + (x77 + (x70 + x64))))))))); |
| 874 |
const x244 = (x222 + (x205 + (x189 + (x128 + (x116 + (x105 + (x95 + (x86 + (x78 + x71))))))))); |
| 875 |
const x245 = (x223 + (x206 + (x142 + (x129 + (x117 + (x106 + (x96 + (x87 + (x79 + x72))))))))); |
| 876 |
const x246 = (x224 + (x207 + (x157 + (x143 + (x130 + (x118 + (x107 + (x97 + (x88 + x80))))))))); |
| 877 |
const x247 = (x225 + (x173 + (x158 + (x144 + (x131 + (x119 + (x108 + (x98 + (x89 + x81))))))))); |
| 878 |
const x248 = (x228 + x247); |
| 879 |
const x249 = (x248 >> 27); |
| 880 |
const x250 = cast(u32, (x248 & cast(u64, 0x7ffffff))); |
| 881 |
const x251 = (x249 + x246); |
| 882 |
const x252 = (x251 >> 28); |
| 883 |
const x253 = cast(u32, (x251 & cast(u64, 0xfffffff))); |
| 884 |
const x254 = (x252 + x245); |
| 885 |
const x255 = (x254 >> 27); |
| 886 |
const x256 = cast(u32, (x254 & cast(u64, 0x7ffffff))); |
| 887 |
const x257 = (x255 + x244); |
| 888 |
const x258 = (x257 >> 28); |
| 889 |
const x259 = cast(u32, (x257 & cast(u64, 0xfffffff))); |
| 890 |
const x260 = (x258 + x243); |
| 891 |
const x261 = (x260 >> 27); |
| 892 |
const x262 = cast(u32, (x260 & cast(u64, 0x7ffffff))); |
| 893 |
const x263 = (x261 + x242); |
| 894 |
const x264 = (x263 >> 27); |
| 895 |
const x265 = cast(u32, (x263 & cast(u64, 0x7ffffff))); |
| 896 |
const x266 = (x264 + x241); |
| 897 |
const x267 = (x266 >> 28); |
| 898 |
const x268 = cast(u32, (x266 & cast(u64, 0xfffffff))); |
| 899 |
const x269 = (x267 + x240); |
| 900 |
const x270 = (x269 >> 27); |
| 901 |
const x271 = cast(u32, (x269 & cast(u64, 0x7ffffff))); |
| 902 |
const x272 = (x270 + x239); |
| 903 |
const x273 = (x272 >> 28); |
| 904 |
const x274 = cast(u32, (x272 & cast(u64, 0xfffffff))); |
| 905 |
const x275 = (x273 + x238); |
| 906 |
const x276 = (x275 >> 27); |
| 907 |
const x277 = cast(u32, (x275 & cast(u64, 0x7ffffff))); |
| 908 |
const x278 = (x276 + x237); |
| 909 |
const x279 = (x278 >> 28); |
| 910 |
const x280 = cast(u32, (x278 & cast(u64, 0xfffffff))); |
| 911 |
const x281 = (x279 + x236); |
| 912 |
const x282 = (x281 >> 27); |
| 913 |
const x283 = cast(u32, (x281 & cast(u64, 0x7ffffff))); |
| 914 |
const x284 = (x282 + x235); |
| 915 |
const x285 = (x284 >> 27); |
| 916 |
const x286 = cast(u32, (x284 & cast(u64, 0x7ffffff))); |
| 917 |
const x287 = (x285 + x234); |
| 918 |
const x288 = (x287 >> 28); |
| 919 |
const x289 = cast(u32, (x287 & cast(u64, 0xfffffff))); |
| 920 |
const x290 = (x288 + x233); |
| 921 |
const x291 = (x290 >> 27); |
| 922 |
const x292 = cast(u32, (x290 & cast(u64, 0x7ffffff))); |
| 923 |
const x293 = (x291 + x232); |
| 924 |
const x294 = (x293 >> 28); |
| 925 |
const x295 = cast(u32, (x293 & cast(u64, 0xfffffff))); |
| 926 |
const x296 = (x294 + x231); |
| 927 |
const x297 = (x296 >> 27); |
| 928 |
const x298 = cast(u32, (x296 & cast(u64, 0x7ffffff))); |
| 929 |
const x299 = (x297 + x230); |
| 930 |
const x300 = (x299 >> 27); |
| 931 |
const x301 = cast(u32, (x299 & cast(u64, 0x7ffffff))); |
| 932 |
const x302 = (cast(u64, x229) + x300); |
| 933 |
const x303 = cast(u32, (x302 >> 28)); |
| 934 |
const x304 = cast(u32, (x302 & cast(u64, 0xfffffff))); |
| 935 |
const x305 = (x303 + x250); |
| 936 |
const x306 = cast(u1, (x305 >> 27)); |
| 937 |
const x307 = (x305 & 0x7ffffff); |
| 938 |
const x308 = (cast(u32, x306) + x253); |
| 939 |
out1[0] = x304; |
| 940 |
out1[1] = x307; |
| 941 |
out1[2] = x308; |
| 942 |
out1[3] = x256; |
| 943 |
out1[4] = x259; |
| 944 |
out1[5] = x262; |
| 945 |
out1[6] = x265; |
| 946 |
out1[7] = x268; |
| 947 |
out1[8] = x271; |
| 948 |
out1[9] = x274; |
| 949 |
out1[10] = x277; |
| 950 |
out1[11] = x280; |
| 951 |
out1[12] = x283; |
| 952 |
out1[13] = x286; |
| 953 |
out1[14] = x289; |
| 954 |
out1[15] = x292; |
| 955 |
out1[16] = x295; |
| 956 |
out1[17] = x298; |
| 957 |
out1[18] = x301; |
| 958 |
} |
| 959 |
|
| 960 |
/// The function carry reduces a field element. |
| 961 |
/// |
| 962 |
/// Postconditions: |
| 963 |
/// eval out1 mod m = eval arg1 mod m |
| 964 |
/// |
| 965 |
pub fn carry(out1: *TightFieldElement, arg1: LooseFieldElement) void { |
| 966 |
@setRuntimeSafety(mode == .Debug); |
| 967 |
|
| 968 |
const x1 = (arg1[0]); |
| 969 |
const x2 = ((x1 >> 28) + (arg1[1])); |
| 970 |
const x3 = ((x2 >> 27) + (arg1[2])); |
| 971 |
const x4 = ((x3 >> 28) + (arg1[3])); |
| 972 |
const x5 = ((x4 >> 27) + (arg1[4])); |
| 973 |
const x6 = ((x5 >> 28) + (arg1[5])); |
| 974 |
const x7 = ((x6 >> 27) + (arg1[6])); |
| 975 |
const x8 = ((x7 >> 27) + (arg1[7])); |
| 976 |
const x9 = ((x8 >> 28) + (arg1[8])); |
| 977 |
const x10 = ((x9 >> 27) + (arg1[9])); |
| 978 |
const x11 = ((x10 >> 28) + (arg1[10])); |
| 979 |
const x12 = ((x11 >> 27) + (arg1[11])); |
| 980 |
const x13 = ((x12 >> 28) + (arg1[12])); |
| 981 |
const x14 = ((x13 >> 27) + (arg1[13])); |
| 982 |
const x15 = ((x14 >> 27) + (arg1[14])); |
| 983 |
const x16 = ((x15 >> 28) + (arg1[15])); |
| 984 |
const x17 = ((x16 >> 27) + (arg1[16])); |
| 985 |
const x18 = ((x17 >> 28) + (arg1[17])); |
| 986 |
const x19 = ((x18 >> 27) + (arg1[18])); |
| 987 |
const x20 = ((x1 & 0xfffffff) + (x19 >> 27)); |
| 988 |
const x21 = (cast(u32, cast(u1, (x20 >> 28))) + (x2 & 0x7ffffff)); |
| 989 |
const x22 = (x20 & 0xfffffff); |
| 990 |
const x23 = (x21 & 0x7ffffff); |
| 991 |
const x24 = (cast(u32, cast(u1, (x21 >> 27))) + (x3 & 0xfffffff)); |
| 992 |
const x25 = (x4 & 0x7ffffff); |
| 993 |
const x26 = (x5 & 0xfffffff); |
| 994 |
const x27 = (x6 & 0x7ffffff); |
| 995 |
const x28 = (x7 & 0x7ffffff); |
| 996 |
const x29 = (x8 & 0xfffffff); |
| 997 |
const x30 = (x9 & 0x7ffffff); |
| 998 |
const x31 = (x10 & 0xfffffff); |
| 999 |
const x32 = (x11 & 0x7ffffff); |
| 1000 |
const x33 = (x12 & 0xfffffff); |
| 1001 |
const x34 = (x13 & 0x7ffffff); |
| 1002 |
const x35 = (x14 & 0x7ffffff); |
| 1003 |
const x36 = (x15 & 0xfffffff); |
| 1004 |
const x37 = (x16 & 0x7ffffff); |
| 1005 |
const x38 = (x17 & 0xfffffff); |
| 1006 |
const x39 = (x18 & 0x7ffffff); |
| 1007 |
const x40 = (x19 & 0x7ffffff); |
| 1008 |
out1[0] = x22; |
| 1009 |
out1[1] = x23; |
| 1010 |
out1[2] = x24; |
| 1011 |
out1[3] = x25; |
| 1012 |
out1[4] = x26; |
| 1013 |
out1[5] = x27; |
| 1014 |
out1[6] = x28; |
| 1015 |
out1[7] = x29; |
| 1016 |
out1[8] = x30; |
| 1017 |
out1[9] = x31; |
| 1018 |
out1[10] = x32; |
| 1019 |
out1[11] = x33; |
| 1020 |
out1[12] = x34; |
| 1021 |
out1[13] = x35; |
| 1022 |
out1[14] = x36; |
| 1023 |
out1[15] = x37; |
| 1024 |
out1[16] = x38; |
| 1025 |
out1[17] = x39; |
| 1026 |
out1[18] = x40; |
| 1027 |
} |
| 1028 |
|
| 1029 |
/// The function add adds two field elements. |
| 1030 |
/// |
| 1031 |
/// Postconditions: |
| 1032 |
/// eval out1 mod m = (eval arg1 + eval arg2) mod m |
| 1033 |
/// |
| 1034 |
pub fn add(out1: *LooseFieldElement, arg1: TightFieldElement, arg2: TightFieldElement) void { |
| 1035 |
@setRuntimeSafety(mode == .Debug); |
| 1036 |
|
| 1037 |
const x1 = ((arg1[0]) + (arg2[0])); |
| 1038 |
const x2 = ((arg1[1]) + (arg2[1])); |
| 1039 |
const x3 = ((arg1[2]) + (arg2[2])); |
| 1040 |
const x4 = ((arg1[3]) + (arg2[3])); |
| 1041 |
const x5 = ((arg1[4]) + (arg2[4])); |
| 1042 |
const x6 = ((arg1[5]) + (arg2[5])); |
| 1043 |
const x7 = ((arg1[6]) + (arg2[6])); |
| 1044 |
const x8 = ((arg1[7]) + (arg2[7])); |
| 1045 |
const x9 = ((arg1[8]) + (arg2[8])); |
| 1046 |
const x10 = ((arg1[9]) + (arg2[9])); |
| 1047 |
const x11 = ((arg1[10]) + (arg2[10])); |
| 1048 |
const x12 = ((arg1[11]) + (arg2[11])); |
| 1049 |
const x13 = ((arg1[12]) + (arg2[12])); |
| 1050 |
const x14 = ((arg1[13]) + (arg2[13])); |
| 1051 |
const x15 = ((arg1[14]) + (arg2[14])); |
| 1052 |
const x16 = ((arg1[15]) + (arg2[15])); |
| 1053 |
const x17 = ((arg1[16]) + (arg2[16])); |
| 1054 |
const x18 = ((arg1[17]) + (arg2[17])); |
| 1055 |
const x19 = ((arg1[18]) + (arg2[18])); |
| 1056 |
out1[0] = x1; |
| 1057 |
out1[1] = x2; |
| 1058 |
out1[2] = x3; |
| 1059 |
out1[3] = x4; |
| 1060 |
out1[4] = x5; |
| 1061 |
out1[5] = x6; |
| 1062 |
out1[6] = x7; |
| 1063 |
out1[7] = x8; |
| 1064 |
out1[8] = x9; |
| 1065 |
out1[9] = x10; |
| 1066 |
out1[10] = x11; |
| 1067 |
out1[11] = x12; |
| 1068 |
out1[12] = x13; |
| 1069 |
out1[13] = x14; |
| 1070 |
out1[14] = x15; |
| 1071 |
out1[15] = x16; |
| 1072 |
out1[16] = x17; |
| 1073 |
out1[17] = x18; |
| 1074 |
out1[18] = x19; |
| 1075 |
} |
| 1076 |
|
| 1077 |
/// The function sub subtracts two field elements. |
| 1078 |
/// |
| 1079 |
/// Postconditions: |
| 1080 |
/// eval out1 mod m = (eval arg1 - eval arg2) mod m |
| 1081 |
/// |
| 1082 |
pub fn sub(out1: *LooseFieldElement, arg1: TightFieldElement, arg2: TightFieldElement) void { |
| 1083 |
@setRuntimeSafety(mode == .Debug); |
| 1084 |
|
| 1085 |
const x1 = ((0x1ffffffe + (arg1[0])) - (arg2[0])); |
| 1086 |
const x2 = ((0xffffffe + (arg1[1])) - (arg2[1])); |
| 1087 |
const x3 = ((0x1ffffffe + (arg1[2])) - (arg2[2])); |
| 1088 |
const x4 = ((0xffffffe + (arg1[3])) - (arg2[3])); |
| 1089 |
const x5 = ((0x1ffffffe + (arg1[4])) - (arg2[4])); |
| 1090 |
const x6 = ((0xffffffe + (arg1[5])) - (arg2[5])); |
| 1091 |
const x7 = ((0xffffffe + (arg1[6])) - (arg2[6])); |
| 1092 |
const x8 = ((0x1ffffffe + (arg1[7])) - (arg2[7])); |
| 1093 |
const x9 = ((0xffffffe + (arg1[8])) - (arg2[8])); |
| 1094 |
const x10 = ((0x1ffffffe + (arg1[9])) - (arg2[9])); |
| 1095 |
const x11 = ((0xffffffe + (arg1[10])) - (arg2[10])); |
| 1096 |
const x12 = ((0x1ffffffe + (arg1[11])) - (arg2[11])); |
| 1097 |
const x13 = ((0xffffffe + (arg1[12])) - (arg2[12])); |
| 1098 |
const x14 = ((0xffffffe + (arg1[13])) - (arg2[13])); |
| 1099 |
const x15 = ((0x1ffffffe + (arg1[14])) - (arg2[14])); |
| 1100 |
const x16 = ((0xffffffe + (arg1[15])) - (arg2[15])); |
| 1101 |
const x17 = ((0x1ffffffe + (arg1[16])) - (arg2[16])); |
| 1102 |
const x18 = ((0xffffffe + (arg1[17])) - (arg2[17])); |
| 1103 |
const x19 = ((0xffffffe + (arg1[18])) - (arg2[18])); |
| 1104 |
out1[0] = x1; |
| 1105 |
out1[1] = x2; |
| 1106 |
out1[2] = x3; |
| 1107 |
out1[3] = x4; |
| 1108 |
out1[4] = x5; |
| 1109 |
out1[5] = x6; |
| 1110 |
out1[6] = x7; |
| 1111 |
out1[7] = x8; |
| 1112 |
out1[8] = x9; |
| 1113 |
out1[9] = x10; |
| 1114 |
out1[10] = x11; |
| 1115 |
out1[11] = x12; |
| 1116 |
out1[12] = x13; |
| 1117 |
out1[13] = x14; |
| 1118 |
out1[14] = x15; |
| 1119 |
out1[15] = x16; |
| 1120 |
out1[16] = x17; |
| 1121 |
out1[17] = x18; |
| 1122 |
out1[18] = x19; |
| 1123 |
} |
| 1124 |
|
| 1125 |
/// The function opp negates a field element. |
| 1126 |
/// |
| 1127 |
/// Postconditions: |
| 1128 |
/// eval out1 mod m = -eval arg1 mod m |
| 1129 |
/// |
| 1130 |
pub fn opp(out1: *LooseFieldElement, arg1: TightFieldElement) void { |
| 1131 |
@setRuntimeSafety(mode == .Debug); |
| 1132 |
|
| 1133 |
const x1 = (0x1ffffffe - (arg1[0])); |
| 1134 |
const x2 = (0xffffffe - (arg1[1])); |
| 1135 |
const x3 = (0x1ffffffe - (arg1[2])); |
| 1136 |
const x4 = (0xffffffe - (arg1[3])); |
| 1137 |
const x5 = (0x1ffffffe - (arg1[4])); |
| 1138 |
const x6 = (0xffffffe - (arg1[5])); |
| 1139 |
const x7 = (0xffffffe - (arg1[6])); |
| 1140 |
const x8 = (0x1ffffffe - (arg1[7])); |
| 1141 |
const x9 = (0xffffffe - (arg1[8])); |
| 1142 |
const x10 = (0x1ffffffe - (arg1[9])); |
| 1143 |
const x11 = (0xffffffe - (arg1[10])); |
| 1144 |
const x12 = (0x1ffffffe - (arg1[11])); |
| 1145 |
const x13 = (0xffffffe - (arg1[12])); |
| 1146 |
const x14 = (0xffffffe - (arg1[13])); |
| 1147 |
const x15 = (0x1ffffffe - (arg1[14])); |
| 1148 |
const x16 = (0xffffffe - (arg1[15])); |
| 1149 |
const x17 = (0x1ffffffe - (arg1[16])); |
| 1150 |
const x18 = (0xffffffe - (arg1[17])); |
| 1151 |
const x19 = (0xffffffe - (arg1[18])); |
| 1152 |
out1[0] = x1; |
| 1153 |
out1[1] = x2; |
| 1154 |
out1[2] = x3; |
| 1155 |
out1[3] = x4; |
| 1156 |
out1[4] = x5; |
| 1157 |
out1[5] = x6; |
| 1158 |
out1[6] = x7; |
| 1159 |
out1[7] = x8; |
| 1160 |
out1[8] = x9; |
| 1161 |
out1[9] = x10; |
| 1162 |
out1[10] = x11; |
| 1163 |
out1[11] = x12; |
| 1164 |
out1[12] = x13; |
| 1165 |
out1[13] = x14; |
| 1166 |
out1[14] = x15; |
| 1167 |
out1[15] = x16; |
| 1168 |
out1[16] = x17; |
| 1169 |
out1[17] = x18; |
| 1170 |
out1[18] = x19; |
| 1171 |
} |
| 1172 |
|
| 1173 |
/// The function selectznz is a multi-limb conditional select. |
| 1174 |
/// |
| 1175 |
/// Postconditions: |
| 1176 |
/// out1 = (if arg1 = 0 then arg2 else arg3) |
| 1177 |
/// |
| 1178 |
/// Input Bounds: |
| 1179 |
/// arg1: [0x0 ~> 0x1] |
| 1180 |
/// arg2: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]] |
| 1181 |
/// arg3: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]] |
| 1182 |
/// Output Bounds: |
| 1183 |
/// out1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]] |
| 1184 |
pub fn selectznz(out1: *[19]u32, arg1: u1, arg2: [19]u32, arg3: [19]u32) void { |
| 1185 |
@setRuntimeSafety(mode == .Debug); |
| 1186 |
|
| 1187 |
var x1: u32 = undefined; |
| 1188 |
cmovznzU32(&x1, arg1, (arg2[0]), (arg3[0])); |
| 1189 |
var x2: u32 = undefined; |
| 1190 |
cmovznzU32(&x2, arg1, (arg2[1]), (arg3[1])); |
| 1191 |
var x3: u32 = undefined; |
| 1192 |
cmovznzU32(&x3, arg1, (arg2[2]), (arg3[2])); |
| 1193 |
var x4: u32 = undefined; |
| 1194 |
cmovznzU32(&x4, arg1, (arg2[3]), (arg3[3])); |
| 1195 |
var x5: u32 = undefined; |
| 1196 |
cmovznzU32(&x5, arg1, (arg2[4]), (arg3[4])); |
| 1197 |
var x6: u32 = undefined; |
| 1198 |
cmovznzU32(&x6, arg1, (arg2[5]), (arg3[5])); |
| 1199 |
var x7: u32 = undefined; |
| 1200 |
cmovznzU32(&x7, arg1, (arg2[6]), (arg3[6])); |
| 1201 |
var x8: u32 = undefined; |
| 1202 |
cmovznzU32(&x8, arg1, (arg2[7]), (arg3[7])); |
| 1203 |
var x9: u32 = undefined; |
| 1204 |
cmovznzU32(&x9, arg1, (arg2[8]), (arg3[8])); |
| 1205 |
var x10: u32 = undefined; |
| 1206 |
cmovznzU32(&x10, arg1, (arg2[9]), (arg3[9])); |
| 1207 |
var x11: u32 = undefined; |
| 1208 |
cmovznzU32(&x11, arg1, (arg2[10]), (arg3[10])); |
| 1209 |
var x12: u32 = undefined; |
| 1210 |
cmovznzU32(&x12, arg1, (arg2[11]), (arg3[11])); |
| 1211 |
var x13: u32 = undefined; |
| 1212 |
cmovznzU32(&x13, arg1, (arg2[12]), (arg3[12])); |
| 1213 |
var x14: u32 = undefined; |
| 1214 |
cmovznzU32(&x14, arg1, (arg2[13]), (arg3[13])); |
| 1215 |
var x15: u32 = undefined; |
| 1216 |
cmovznzU32(&x15, arg1, (arg2[14]), (arg3[14])); |
| 1217 |
var x16: u32 = undefined; |
| 1218 |
cmovznzU32(&x16, arg1, (arg2[15]), (arg3[15])); |
| 1219 |
var x17: u32 = undefined; |
| 1220 |
cmovznzU32(&x17, arg1, (arg2[16]), (arg3[16])); |
| 1221 |
var x18: u32 = undefined; |
| 1222 |
cmovznzU32(&x18, arg1, (arg2[17]), (arg3[17])); |
| 1223 |
var x19: u32 = undefined; |
| 1224 |
cmovznzU32(&x19, arg1, (arg2[18]), (arg3[18])); |
| 1225 |
out1[0] = x1; |
| 1226 |
out1[1] = x2; |
| 1227 |
out1[2] = x3; |
| 1228 |
out1[3] = x4; |
| 1229 |
out1[4] = x5; |
| 1230 |
out1[5] = x6; |
| 1231 |
out1[6] = x7; |
| 1232 |
out1[7] = x8; |
| 1233 |
out1[8] = x9; |
| 1234 |
out1[9] = x10; |
| 1235 |
out1[10] = x11; |
| 1236 |
out1[11] = x12; |
| 1237 |
out1[12] = x13; |
| 1238 |
out1[13] = x14; |
| 1239 |
out1[14] = x15; |
| 1240 |
out1[15] = x16; |
| 1241 |
out1[16] = x17; |
| 1242 |
out1[17] = x18; |
| 1243 |
out1[18] = x19; |
| 1244 |
} |
| 1245 |
|
| 1246 |
/// The function toBytes serializes a field element to bytes in little-endian order. |
| 1247 |
/// |
| 1248 |
/// Postconditions: |
| 1249 |
/// out1 = map (λ x, ⌊((eval arg1 mod m) mod 2^(8 * (x + 1))) / 2^(8 * x)⌋) [0..65] |
| 1250 |
/// |
| 1251 |
/// Output Bounds: |
| 1252 |
/// out1: [[0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0x1]] |
| 1253 |
pub fn toBytes(out1: *[66]u8, arg1: TightFieldElement) void { |
| 1254 |
@setRuntimeSafety(mode == .Debug); |
| 1255 |
|
| 1256 |
var x1: u32 = undefined; |
| 1257 |
var x2: u1 = undefined; |
| 1258 |
subborrowxU28(&x1, &x2, 0x0, (arg1[0]), 0xfffffff); |
| 1259 |
var x3: u32 = undefined; |
| 1260 |
var x4: u1 = undefined; |
| 1261 |
subborrowxU27(&x3, &x4, x2, (arg1[1]), 0x7ffffff); |
| 1262 |
var x5: u32 = undefined; |
| 1263 |
var x6: u1 = undefined; |
| 1264 |
subborrowxU28(&x5, &x6, x4, (arg1[2]), 0xfffffff); |
| 1265 |
var x7: u32 = undefined; |
| 1266 |
var x8: u1 = undefined; |
| 1267 |
subborrowxU27(&x7, &x8, x6, (arg1[3]), 0x7ffffff); |
| 1268 |
var x9: u32 = undefined; |
| 1269 |
var x10: u1 = undefined; |
| 1270 |
subborrowxU28(&x9, &x10, x8, (arg1[4]), 0xfffffff); |
| 1271 |
var x11: u32 = undefined; |
| 1272 |
var x12: u1 = undefined; |
| 1273 |
subborrowxU27(&x11, &x12, x10, (arg1[5]), 0x7ffffff); |
| 1274 |
var x13: u32 = undefined; |
| 1275 |
var x14: u1 = undefined; |
| 1276 |
subborrowxU27(&x13, &x14, x12, (arg1[6]), 0x7ffffff); |
| 1277 |
var x15: u32 = undefined; |
| 1278 |
var x16: u1 = undefined; |
| 1279 |
subborrowxU28(&x15, &x16, x14, (arg1[7]), 0xfffffff); |
| 1280 |
var x17: u32 = undefined; |
| 1281 |
var x18: u1 = undefined; |
| 1282 |
subborrowxU27(&x17, &x18, x16, (arg1[8]), 0x7ffffff); |
| 1283 |
var x19: u32 = undefined; |
| 1284 |
var x20: u1 = undefined; |
| 1285 |
subborrowxU28(&x19, &x20, x18, (arg1[9]), 0xfffffff); |
| 1286 |
var x21: u32 = undefined; |
| 1287 |
var x22: u1 = undefined; |
| 1288 |
subborrowxU27(&x21, &x22, x20, (arg1[10]), 0x7ffffff); |
| 1289 |
var x23: u32 = undefined; |
| 1290 |
var x24: u1 = undefined; |
| 1291 |
subborrowxU28(&x23, &x24, x22, (arg1[11]), 0xfffffff); |
| 1292 |
var x25: u32 = undefined; |
| 1293 |
var x26: u1 = undefined; |
| 1294 |
subborrowxU27(&x25, &x26, x24, (arg1[12]), 0x7ffffff); |
| 1295 |
var x27: u32 = undefined; |
| 1296 |
var x28: u1 = undefined; |
| 1297 |
subborrowxU27(&x27, &x28, x26, (arg1[13]), 0x7ffffff); |
| 1298 |
var x29: u32 = undefined; |
| 1299 |
var x30: u1 = undefined; |
| 1300 |
subborrowxU28(&x29, &x30, x28, (arg1[14]), 0xfffffff); |
| 1301 |
var x31: u32 = undefined; |
| 1302 |
var x32: u1 = undefined; |
| 1303 |
subborrowxU27(&x31, &x32, x30, (arg1[15]), 0x7ffffff); |
| 1304 |
var x33: u32 = undefined; |
| 1305 |
var x34: u1 = undefined; |
| 1306 |
subborrowxU28(&x33, &x34, x32, (arg1[16]), 0xfffffff); |
| 1307 |
var x35: u32 = undefined; |
| 1308 |
var x36: u1 = undefined; |
| 1309 |
subborrowxU27(&x35, &x36, x34, (arg1[17]), 0x7ffffff); |
| 1310 |
var x37: u32 = undefined; |
| 1311 |
var x38: u1 = undefined; |
| 1312 |
subborrowxU27(&x37, &x38, x36, (arg1[18]), 0x7ffffff); |
| 1313 |
var x39: u32 = undefined; |
| 1314 |
cmovznzU32(&x39, x38, cast(u32, 0x0), 0xffffffff); |
| 1315 |
var x40: u32 = undefined; |
| 1316 |
var x41: u1 = undefined; |
| 1317 |
addcarryxU28(&x40, &x41, 0x0, x1, (x39 & 0xfffffff)); |
| 1318 |
var x42: u32 = undefined; |
| 1319 |
var x43: u1 = undefined; |
| 1320 |
addcarryxU27(&x42, &x43, x41, x3, (x39 & 0x7ffffff)); |
| 1321 |
var x44: u32 = undefined; |
| 1322 |
var x45: u1 = undefined; |
| 1323 |
addcarryxU28(&x44, &x45, x43, x5, (x39 & 0xfffffff)); |
| 1324 |
var x46: u32 = undefined; |
| 1325 |
var x47: u1 = undefined; |
| 1326 |
addcarryxU27(&x46, &x47, x45, x7, (x39 & 0x7ffffff)); |
| 1327 |
var x48: u32 = undefined; |
| 1328 |
var x49: u1 = undefined; |
| 1329 |
addcarryxU28(&x48, &x49, x47, x9, (x39 & 0xfffffff)); |
| 1330 |
var x50: u32 = undefined; |
| 1331 |
var x51: u1 = undefined; |
| 1332 |
addcarryxU27(&x50, &x51, x49, x11, (x39 & 0x7ffffff)); |
| 1333 |
var x52: u32 = undefined; |
| 1334 |
var x53: u1 = undefined; |
| 1335 |
addcarryxU27(&x52, &x53, x51, x13, (x39 & 0x7ffffff)); |
| 1336 |
var x54: u32 = undefined; |
| 1337 |
var x55: u1 = undefined; |
| 1338 |
addcarryxU28(&x54, &x55, x53, x15, (x39 & 0xfffffff)); |
| 1339 |
var x56: u32 = undefined; |
| 1340 |
var x57: u1 = undefined; |
| 1341 |
addcarryxU27(&x56, &x57, x55, x17, (x39 & 0x7ffffff)); |
| 1342 |
var x58: u32 = undefined; |
| 1343 |
var x59: u1 = undefined; |
| 1344 |
addcarryxU28(&x58, &x59, x57, x19, (x39 & 0xfffffff)); |
| 1345 |
var x60: u32 = undefined; |
| 1346 |
var x61: u1 = undefined; |
| 1347 |
addcarryxU27(&x60, &x61, x59, x21, (x39 & 0x7ffffff)); |
| 1348 |
var x62: u32 = undefined; |
| 1349 |
var x63: u1 = undefined; |
| 1350 |
addcarryxU28(&x62, &x63, x61, x23, (x39 & 0xfffffff)); |
| 1351 |
var x64: u32 = undefined; |
| 1352 |
var x65: u1 = undefined; |
| 1353 |
addcarryxU27(&x64, &x65, x63, x25, (x39 & 0x7ffffff)); |
| 1354 |
var x66: u32 = undefined; |
| 1355 |
var x67: u1 = undefined; |
| 1356 |
addcarryxU27(&x66, &x67, x65, x27, (x39 & 0x7ffffff)); |
| 1357 |
var x68: u32 = undefined; |
| 1358 |
var x69: u1 = undefined; |
| 1359 |
addcarryxU28(&x68, &x69, x67, x29, (x39 & 0xfffffff)); |
| 1360 |
var x70: u32 = undefined; |
| 1361 |
var x71: u1 = undefined; |
| 1362 |
addcarryxU27(&x70, &x71, x69, x31, (x39 & 0x7ffffff)); |
| 1363 |
var x72: u32 = undefined; |
| 1364 |
var x73: u1 = undefined; |
| 1365 |
addcarryxU28(&x72, &x73, x71, x33, (x39 & 0xfffffff)); |
| 1366 |
var x74: u32 = undefined; |
| 1367 |
var x75: u1 = undefined; |
| 1368 |
addcarryxU27(&x74, &x75, x73, x35, (x39 & 0x7ffffff)); |
| 1369 |
var x76: u32 = undefined; |
| 1370 |
var x77: u1 = undefined; |
| 1371 |
addcarryxU27(&x76, &x77, x75, x37, (x39 & 0x7ffffff)); |
| 1372 |
const x78 = (cast(u64, x76) << 6); |
| 1373 |
const x79 = (x74 << 3); |
| 1374 |
const x80 = (cast(u64, x72) << 7); |
| 1375 |
const x81 = (x70 << 4); |
| 1376 |
const x82 = (x66 << 5); |
| 1377 |
const x83 = (x64 << 2); |
| 1378 |
const x84 = (cast(u64, x62) << 6); |
| 1379 |
const x85 = (x60 << 3); |
| 1380 |
const x86 = (cast(u64, x58) << 7); |
| 1381 |
const x87 = (x56 << 4); |
| 1382 |
const x88 = (x52 << 5); |
| 1383 |
const x89 = (x50 << 2); |
| 1384 |
const x90 = (cast(u64, x48) << 6); |
| 1385 |
const x91 = (x46 << 3); |
| 1386 |
const x92 = (cast(u64, x44) << 7); |
| 1387 |
const x93 = (x42 << 4); |
| 1388 |
const x94 = cast(u8, (x40 & cast(u32, 0xff))); |
| 1389 |
const x95 = (x40 >> 8); |
| 1390 |
const x96 = cast(u8, (x95 & cast(u32, 0xff))); |
| 1391 |
const x97 = (x95 >> 8); |
| 1392 |
const x98 = cast(u8, (x97 & cast(u32, 0xff))); |
| 1393 |
const x99 = cast(u8, (x97 >> 8)); |
| 1394 |
const x100 = (x93 + cast(u32, x99)); |
| 1395 |
const x101 = cast(u8, (x100 & cast(u32, 0xff))); |
| 1396 |
const x102 = (x100 >> 8); |
| 1397 |
const x103 = cast(u8, (x102 & cast(u32, 0xff))); |
| 1398 |
const x104 = (x102 >> 8); |
| 1399 |
const x105 = cast(u8, (x104 & cast(u32, 0xff))); |
| 1400 |
const x106 = cast(u8, (x104 >> 8)); |
| 1401 |
const x107 = (x92 + cast(u64, x106)); |
| 1402 |
const x108 = cast(u8, (x107 & cast(u64, 0xff))); |
| 1403 |
const x109 = cast(u32, (x107 >> 8)); |
| 1404 |
const x110 = cast(u8, (x109 & cast(u32, 0xff))); |
| 1405 |
const x111 = (x109 >> 8); |
| 1406 |
const x112 = cast(u8, (x111 & cast(u32, 0xff))); |
| 1407 |
const x113 = (x111 >> 8); |
| 1408 |
const x114 = cast(u8, (x113 & cast(u32, 0xff))); |
| 1409 |
const x115 = cast(u8, (x113 >> 8)); |
| 1410 |
const x116 = (x91 + cast(u32, x115)); |
| 1411 |
const x117 = cast(u8, (x116 & cast(u32, 0xff))); |
| 1412 |
const x118 = (x116 >> 8); |
| 1413 |
const x119 = cast(u8, (x118 & cast(u32, 0xff))); |
| 1414 |
const x120 = (x118 >> 8); |
| 1415 |
const x121 = cast(u8, (x120 & cast(u32, 0xff))); |
| 1416 |
const x122 = cast(u8, (x120 >> 8)); |
| 1417 |
const x123 = (x90 + cast(u64, x122)); |
| 1418 |
const x124 = cast(u8, (x123 & cast(u64, 0xff))); |
| 1419 |
const x125 = cast(u32, (x123 >> 8)); |
| 1420 |
const x126 = cast(u8, (x125 & cast(u32, 0xff))); |
| 1421 |
const x127 = (x125 >> 8); |
| 1422 |
const x128 = cast(u8, (x127 & cast(u32, 0xff))); |
| 1423 |
const x129 = (x127 >> 8); |
| 1424 |
const x130 = cast(u8, (x129 & cast(u32, 0xff))); |
| 1425 |
const x131 = cast(u8, (x129 >> 8)); |
| 1426 |
const x132 = (x89 + cast(u32, x131)); |
| 1427 |
const x133 = cast(u8, (x132 & cast(u32, 0xff))); |
| 1428 |
const x134 = (x132 >> 8); |
| 1429 |
const x135 = cast(u8, (x134 & cast(u32, 0xff))); |
| 1430 |
const x136 = (x134 >> 8); |
| 1431 |
const x137 = cast(u8, (x136 & cast(u32, 0xff))); |
| 1432 |
const x138 = cast(u8, (x136 >> 8)); |
| 1433 |
const x139 = (x88 + cast(u32, x138)); |
| 1434 |
const x140 = cast(u8, (x139 & cast(u32, 0xff))); |
| 1435 |
const x141 = (x139 >> 8); |
| 1436 |
const x142 = cast(u8, (x141 & cast(u32, 0xff))); |
| 1437 |
const x143 = (x141 >> 8); |
| 1438 |
const x144 = cast(u8, (x143 & cast(u32, 0xff))); |
| 1439 |
const x145 = cast(u8, (x143 >> 8)); |
| 1440 |
const x146 = cast(u8, (x54 & cast(u32, 0xff))); |
| 1441 |
const x147 = (x54 >> 8); |
| 1442 |
const x148 = cast(u8, (x147 & cast(u32, 0xff))); |
| 1443 |
const x149 = (x147 >> 8); |
| 1444 |
const x150 = cast(u8, (x149 & cast(u32, 0xff))); |
| 1445 |
const x151 = cast(u8, (x149 >> 8)); |
| 1446 |
const x152 = (x87 + cast(u32, x151)); |
| 1447 |
const x153 = cast(u8, (x152 & cast(u32, 0xff))); |
| 1448 |
const x154 = (x152 >> 8); |
| 1449 |
const x155 = cast(u8, (x154 & cast(u32, 0xff))); |
| 1450 |
const x156 = (x154 >> 8); |
| 1451 |
const x157 = cast(u8, (x156 & cast(u32, 0xff))); |
| 1452 |
const x158 = cast(u8, (x156 >> 8)); |
| 1453 |
const x159 = (x86 + cast(u64, x158)); |
| 1454 |
const x160 = cast(u8, (x159 & cast(u64, 0xff))); |
| 1455 |
const x161 = cast(u32, (x159 >> 8)); |
| 1456 |
const x162 = cast(u8, (x161 & cast(u32, 0xff))); |
| 1457 |
const x163 = (x161 >> 8); |
| 1458 |
const x164 = cast(u8, (x163 & cast(u32, 0xff))); |
| 1459 |
const x165 = (x163 >> 8); |
| 1460 |
const x166 = cast(u8, (x165 & cast(u32, 0xff))); |
| 1461 |
const x167 = cast(u8, (x165 >> 8)); |
| 1462 |
const x168 = (x85 + cast(u32, x167)); |
| 1463 |
const x169 = cast(u8, (x168 & cast(u32, 0xff))); |
| 1464 |
const x170 = (x168 >> 8); |
| 1465 |
const x171 = cast(u8, (x170 & cast(u32, 0xff))); |
| 1466 |
const x172 = (x170 >> 8); |
| 1467 |
const x173 = cast(u8, (x172 & cast(u32, 0xff))); |
| 1468 |
const x174 = cast(u8, (x172 >> 8)); |
| 1469 |
const x175 = (x84 + cast(u64, x174)); |
| 1470 |
const x176 = cast(u8, (x175 & cast(u64, 0xff))); |
| 1471 |
const x177 = cast(u32, (x175 >> 8)); |
| 1472 |
const x178 = cast(u8, (x177 & cast(u32, 0xff))); |
| 1473 |
const x179 = (x177 >> 8); |
| 1474 |
const x180 = cast(u8, (x179 & cast(u32, 0xff))); |
| 1475 |
const x181 = (x179 >> 8); |
| 1476 |
const x182 = cast(u8, (x181 & cast(u32, 0xff))); |
| 1477 |
const x183 = cast(u8, (x181 >> 8)); |
| 1478 |
const x184 = (x83 + cast(u32, x183)); |
| 1479 |
const x185 = cast(u8, (x184 & cast(u32, 0xff))); |
| 1480 |
const x186 = (x184 >> 8); |
| 1481 |
const x187 = cast(u8, (x186 & cast(u32, 0xff))); |
| 1482 |
const x188 = (x186 >> 8); |
| 1483 |
const x189 = cast(u8, (x188 & cast(u32, 0xff))); |
| 1484 |
const x190 = cast(u8, (x188 >> 8)); |
| 1485 |
const x191 = (x82 + cast(u32, x190)); |
| 1486 |
const x192 = cast(u8, (x191 & cast(u32, 0xff))); |
| 1487 |
const x193 = (x191 >> 8); |
| 1488 |
const x194 = cast(u8, (x193 & cast(u32, 0xff))); |
| 1489 |
const x195 = (x193 >> 8); |
| 1490 |
const x196 = cast(u8, (x195 & cast(u32, 0xff))); |
| 1491 |
const x197 = cast(u8, (x195 >> 8)); |
| 1492 |
const x198 = cast(u8, (x68 & cast(u32, 0xff))); |
| 1493 |
const x199 = (x68 >> 8); |
| 1494 |
const x200 = cast(u8, (x199 & cast(u32, 0xff))); |
| 1495 |
const x201 = (x199 >> 8); |
| 1496 |
const x202 = cast(u8, (x201 & cast(u32, 0xff))); |
| 1497 |
const x203 = cast(u8, (x201 >> 8)); |
| 1498 |
const x204 = (x81 + cast(u32, x203)); |
| 1499 |
const x205 = cast(u8, (x204 & cast(u32, 0xff))); |
| 1500 |
const x206 = (x204 >> 8); |
| 1501 |
const x207 = cast(u8, (x206 & cast(u32, 0xff))); |
| 1502 |
const x208 = (x206 >> 8); |
| 1503 |
const x209 = cast(u8, (x208 & cast(u32, 0xff))); |
| 1504 |
const x210 = cast(u8, (x208 >> 8)); |
| 1505 |
const x211 = (x80 + cast(u64, x210)); |
| 1506 |
const x212 = cast(u8, (x211 & cast(u64, 0xff))); |
| 1507 |
const x213 = cast(u32, (x211 >> 8)); |
| 1508 |
const x214 = cast(u8, (x213 & cast(u32, 0xff))); |
| 1509 |
const x215 = (x213 >> 8); |
| 1510 |
const x216 = cast(u8, (x215 & cast(u32, 0xff))); |
| 1511 |
const x217 = (x215 >> 8); |
| 1512 |
const x218 = cast(u8, (x217 & cast(u32, 0xff))); |
| 1513 |
const x219 = cast(u8, (x217 >> 8)); |
| 1514 |
const x220 = (x79 + cast(u32, x219)); |
| 1515 |
const x221 = cast(u8, (x220 & cast(u32, 0xff))); |
| 1516 |
const x222 = (x220 >> 8); |
| 1517 |
const x223 = cast(u8, (x222 & cast(u32, 0xff))); |
| 1518 |
const x224 = (x222 >> 8); |
| 1519 |
const x225 = cast(u8, (x224 & cast(u32, 0xff))); |
| 1520 |
const x226 = cast(u8, (x224 >> 8)); |
| 1521 |
const x227 = (x78 + cast(u64, x226)); |
| 1522 |
const x228 = cast(u8, (x227 & cast(u64, 0xff))); |
| 1523 |
const x229 = cast(u32, (x227 >> 8)); |
| 1524 |
const x230 = cast(u8, (x229 & cast(u32, 0xff))); |
| 1525 |
const x231 = (x229 >> 8); |
| 1526 |
const x232 = cast(u8, (x231 & cast(u32, 0xff))); |
| 1527 |
const x233 = (x231 >> 8); |
| 1528 |
const x234 = cast(u8, (x233 & cast(u32, 0xff))); |
| 1529 |
const x235 = cast(u1, (x233 >> 8)); |
| 1530 |
out1[0] = x94; |
| 1531 |
out1[1] = x96; |
| 1532 |
out1[2] = x98; |
| 1533 |
out1[3] = x101; |
| 1534 |
out1[4] = x103; |
| 1535 |
out1[5] = x105; |
| 1536 |
out1[6] = x108; |
| 1537 |
out1[7] = x110; |
| 1538 |
out1[8] = x112; |
| 1539 |
out1[9] = x114; |
| 1540 |
out1[10] = x117; |
| 1541 |
out1[11] = x119; |
| 1542 |
out1[12] = x121; |
| 1543 |
out1[13] = x124; |
| 1544 |
out1[14] = x126; |
| 1545 |
out1[15] = x128; |
| 1546 |
out1[16] = x130; |
| 1547 |
out1[17] = x133; |
| 1548 |
out1[18] = x135; |
| 1549 |
out1[19] = x137; |
| 1550 |
out1[20] = x140; |
| 1551 |
out1[21] = x142; |
| 1552 |
out1[22] = x144; |
| 1553 |
out1[23] = x145; |
| 1554 |
out1[24] = x146; |
| 1555 |
out1[25] = x148; |
| 1556 |
out1[26] = x150; |
| 1557 |
out1[27] = x153; |
| 1558 |
out1[28] = x155; |
| 1559 |
out1[29] = x157; |
| 1560 |
out1[30] = x160; |
| 1561 |
out1[31] = x162; |
| 1562 |
out1[32] = x164; |
| 1563 |
out1[33] = x166; |
| 1564 |
out1[34] = x169; |
| 1565 |
out1[35] = x171; |
| 1566 |
out1[36] = x173; |
| 1567 |
out1[37] = x176; |
| 1568 |
out1[38] = x178; |
| 1569 |
out1[39] = x180; |
| 1570 |
out1[40] = x182; |
| 1571 |
out1[41] = x185; |
| 1572 |
out1[42] = x187; |
| 1573 |
out1[43] = x189; |
| 1574 |
out1[44] = x192; |
| 1575 |
out1[45] = x194; |
| 1576 |
out1[46] = x196; |
| 1577 |
out1[47] = x197; |
| 1578 |
out1[48] = x198; |
| 1579 |
out1[49] = x200; |
| 1580 |
out1[50] = x202; |
| 1581 |
out1[51] = x205; |
| 1582 |
out1[52] = x207; |
| 1583 |
out1[53] = x209; |
| 1584 |
out1[54] = x212; |
| 1585 |
out1[55] = x214; |
| 1586 |
out1[56] = x216; |
| 1587 |
out1[57] = x218; |
| 1588 |
out1[58] = x221; |
| 1589 |
out1[59] = x223; |
| 1590 |
out1[60] = x225; |
| 1591 |
out1[61] = x228; |
| 1592 |
out1[62] = x230; |
| 1593 |
out1[63] = x232; |
| 1594 |
out1[64] = x234; |
| 1595 |
out1[65] = cast(u8, x235); |
| 1596 |
} |
| 1597 |
|
| 1598 |
/// The function fromBytes deserializes a field element from bytes in little-endian order. |
| 1599 |
/// |
| 1600 |
/// Postconditions: |
| 1601 |
/// eval out1 mod m = bytes_eval arg1 mod m |
| 1602 |
/// |
| 1603 |
/// Input Bounds: |
| 1604 |
/// arg1: [[0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0x1]] |
| 1605 |
pub fn fromBytes(out1: *TightFieldElement, arg1: [66]u8) void { |
| 1606 |
@setRuntimeSafety(mode == .Debug); |
| 1607 |
|
| 1608 |
const x1 = (cast(u32, cast(u1, (arg1[65]))) << 26); |
| 1609 |
const x2 = (cast(u32, (arg1[64])) << 18); |
| 1610 |
const x3 = (cast(u32, (arg1[63])) << 10); |
| 1611 |
const x4 = (cast(u32, (arg1[62])) << 2); |
| 1612 |
const x5 = (cast(u32, (arg1[61])) << 21); |
| 1613 |
const x6 = (cast(u32, (arg1[60])) << 13); |
| 1614 |
const x7 = (cast(u32, (arg1[59])) << 5); |
| 1615 |
const x8 = (cast(u64, (arg1[58])) << 25); |
| 1616 |
const x9 = (cast(u32, (arg1[57])) << 17); |
| 1617 |
const x10 = (cast(u32, (arg1[56])) << 9); |
| 1618 |
const x11 = (cast(u32, (arg1[55])) * cast(u32, 0x2)); |
| 1619 |
const x12 = (cast(u32, (arg1[54])) << 20); |
| 1620 |
const x13 = (cast(u32, (arg1[53])) << 12); |
| 1621 |
const x14 = (cast(u32, (arg1[52])) << 4); |
| 1622 |
const x15 = (cast(u32, (arg1[51])) << 24); |
| 1623 |
const x16 = (cast(u32, (arg1[50])) << 16); |
| 1624 |
const x17 = (cast(u32, (arg1[49])) << 8); |
| 1625 |
const x18 = (arg1[48]); |
| 1626 |
const x19 = (cast(u32, (arg1[47])) << 19); |
| 1627 |
const x20 = (cast(u32, (arg1[46])) << 11); |
| 1628 |
const x21 = (cast(u32, (arg1[45])) << 3); |
| 1629 |
const x22 = (cast(u32, (arg1[44])) << 22); |
| 1630 |
const x23 = (cast(u32, (arg1[43])) << 14); |
| 1631 |
const x24 = (cast(u32, (arg1[42])) << 6); |
| 1632 |
const x25 = (cast(u64, (arg1[41])) << 26); |
| 1633 |
const x26 = (cast(u32, (arg1[40])) << 18); |
| 1634 |
const x27 = (cast(u32, (arg1[39])) << 10); |
| 1635 |
const x28 = (cast(u32, (arg1[38])) << 2); |
| 1636 |
const x29 = (cast(u32, (arg1[37])) << 21); |
| 1637 |
const x30 = (cast(u32, (arg1[36])) << 13); |
| 1638 |
const x31 = (cast(u32, (arg1[35])) << 5); |
| 1639 |
const x32 = (cast(u64, (arg1[34])) << 25); |
| 1640 |
const x33 = (cast(u32, (arg1[33])) << 17); |
| 1641 |
const x34 = (cast(u32, (arg1[32])) << 9); |
| 1642 |
const x35 = (cast(u32, (arg1[31])) * cast(u32, 0x2)); |
| 1643 |
const x36 = (cast(u32, (arg1[30])) << 20); |
| 1644 |
const x37 = (cast(u32, (arg1[29])) << 12); |
| 1645 |
const x38 = (cast(u32, (arg1[28])) << 4); |
| 1646 |
const x39 = (cast(u32, (arg1[27])) << 24); |
| 1647 |
const x40 = (cast(u32, (arg1[26])) << 16); |
| 1648 |
const x41 = (cast(u32, (arg1[25])) << 8); |
| 1649 |
const x42 = (arg1[24]); |
| 1650 |
const x43 = (cast(u32, (arg1[23])) << 19); |
| 1651 |
const x44 = (cast(u32, (arg1[22])) << 11); |
| 1652 |
const x45 = (cast(u32, (arg1[21])) << 3); |
| 1653 |
const x46 = (cast(u32, (arg1[20])) << 22); |
| 1654 |
const x47 = (cast(u32, (arg1[19])) << 14); |
| 1655 |
const x48 = (cast(u32, (arg1[18])) << 6); |
| 1656 |
const x49 = (cast(u64, (arg1[17])) << 26); |
| 1657 |
const x50 = (cast(u32, (arg1[16])) << 18); |
| 1658 |
const x51 = (cast(u32, (arg1[15])) << 10); |
| 1659 |
const x52 = (cast(u32, (arg1[14])) << 2); |
| 1660 |
const x53 = (cast(u32, (arg1[13])) << 21); |
| 1661 |
const x54 = (cast(u32, (arg1[12])) << 13); |
| 1662 |
const x55 = (cast(u32, (arg1[11])) << 5); |
| 1663 |
const x56 = (cast(u64, (arg1[10])) << 25); |
| 1664 |
const x57 = (cast(u32, (arg1[9])) << 17); |
| 1665 |
const x58 = (cast(u32, (arg1[8])) << 9); |
| 1666 |
const x59 = (cast(u32, (arg1[7])) * cast(u32, 0x2)); |
| 1667 |
const x60 = (cast(u32, (arg1[6])) << 20); |
| 1668 |
const x61 = (cast(u32, (arg1[5])) << 12); |
| 1669 |
const x62 = (cast(u32, (arg1[4])) << 4); |
| 1670 |
const x63 = (cast(u32, (arg1[3])) << 24); |
| 1671 |
const x64 = (cast(u32, (arg1[2])) << 16); |
| 1672 |
const x65 = (cast(u32, (arg1[1])) << 8); |
| 1673 |
const x66 = (arg1[0]); |
| 1674 |
const x67 = (x65 + cast(u32, x66)); |
| 1675 |
const x68 = (x64 + x67); |
| 1676 |
const x69 = (x63 + x68); |
| 1677 |
const x70 = (x69 & 0xfffffff); |
| 1678 |
const x71 = cast(u8, (x69 >> 28)); |
| 1679 |
const x72 = (x62 + cast(u32, x71)); |
| 1680 |
const x73 = (x61 + x72); |
| 1681 |
const x74 = (x60 + x73); |
| 1682 |
const x75 = (x74 & 0x7ffffff); |
| 1683 |
const x76 = cast(u1, (x74 >> 27)); |
| 1684 |
const x77 = (x59 + cast(u32, x76)); |
| 1685 |
const x78 = (x58 + x77); |
| 1686 |
const x79 = (x57 + x78); |
| 1687 |
const x80 = (x56 + cast(u64, x79)); |
| 1688 |
const x81 = cast(u32, (x80 & cast(u64, 0xfffffff))); |
| 1689 |
const x82 = cast(u8, (x80 >> 28)); |
| 1690 |
const x83 = (x55 + cast(u32, x82)); |
| 1691 |
const x84 = (x54 + x83); |
| 1692 |
const x85 = (x53 + x84); |
| 1693 |
const x86 = (x85 & 0x7ffffff); |
| 1694 |
const x87 = cast(u8, (x85 >> 27)); |
| 1695 |
const x88 = (x52 + cast(u32, x87)); |
| 1696 |
const x89 = (x51 + x88); |
| 1697 |
const x90 = (x50 + x89); |
| 1698 |
const x91 = (x49 + cast(u64, x90)); |
| 1699 |
const x92 = cast(u32, (x91 & cast(u64, 0xfffffff))); |
| 1700 |
const x93 = cast(u8, (x91 >> 28)); |
| 1701 |
const x94 = (x48 + cast(u32, x93)); |
| 1702 |
const x95 = (x47 + x94); |
| 1703 |
const x96 = (x46 + x95); |
| 1704 |
const x97 = (x96 & 0x7ffffff); |
| 1705 |
const x98 = cast(u8, (x96 >> 27)); |
| 1706 |
const x99 = (x45 + cast(u32, x98)); |
| 1707 |
const x100 = (x44 + x99); |
| 1708 |
const x101 = (x43 + x100); |
| 1709 |
const x102 = (x41 + cast(u32, x42)); |
| 1710 |
const x103 = (x40 + x102); |
| 1711 |
const x104 = (x39 + x103); |
| 1712 |
const x105 = (x104 & 0xfffffff); |
| 1713 |
const x106 = cast(u8, (x104 >> 28)); |
| 1714 |
const x107 = (x38 + cast(u32, x106)); |
| 1715 |
const x108 = (x37 + x107); |
| 1716 |
const x109 = (x36 + x108); |
| 1717 |
const x110 = (x109 & 0x7ffffff); |
| 1718 |
const x111 = cast(u1, (x109 >> 27)); |
| 1719 |
const x112 = (x35 + cast(u32, x111)); |
| 1720 |
const x113 = (x34 + x112); |
| 1721 |
const x114 = (x33 + x113); |
| 1722 |
const x115 = (x32 + cast(u64, x114)); |
| 1723 |
const x116 = cast(u32, (x115 & cast(u64, 0xfffffff))); |
| 1724 |
const x117 = cast(u8, (x115 >> 28)); |
| 1725 |
const x118 = (x31 + cast(u32, x117)); |
| 1726 |
const x119 = (x30 + x118); |
| 1727 |
const x120 = (x29 + x119); |
| 1728 |
const x121 = (x120 & 0x7ffffff); |
| 1729 |
const x122 = cast(u8, (x120 >> 27)); |
| 1730 |
const x123 = (x28 + cast(u32, x122)); |
| 1731 |
const x124 = (x27 + x123); |
| 1732 |
const x125 = (x26 + x124); |
| 1733 |
const x126 = (x25 + cast(u64, x125)); |
| 1734 |
const x127 = cast(u32, (x126 & cast(u64, 0xfffffff))); |
| 1735 |
const x128 = cast(u8, (x126 >> 28)); |
| 1736 |
const x129 = (x24 + cast(u32, x128)); |
| 1737 |
const x130 = (x23 + x129); |
| 1738 |
const x131 = (x22 + x130); |
| 1739 |
const x132 = (x131 & 0x7ffffff); |
| 1740 |
const x133 = cast(u8, (x131 >> 27)); |
| 1741 |
const x134 = (x21 + cast(u32, x133)); |
| 1742 |
const x135 = (x20 + x134); |
| 1743 |
const x136 = (x19 + x135); |
| 1744 |
const x137 = (x17 + cast(u32, x18)); |
| 1745 |
const x138 = (x16 + x137); |
| 1746 |
const x139 = (x15 + x138); |
| 1747 |
const x140 = (x139 & 0xfffffff); |
| 1748 |
const x141 = cast(u8, (x139 >> 28)); |
| 1749 |
const x142 = (x14 + cast(u32, x141)); |
| 1750 |
const x143 = (x13 + x142); |
| 1751 |
const x144 = (x12 + x143); |
| 1752 |
const x145 = (x144 & 0x7ffffff); |
| 1753 |
const x146 = cast(u1, (x144 >> 27)); |
| 1754 |
const x147 = (x11 + cast(u32, x146)); |
| 1755 |
const x148 = (x10 + x147); |
| 1756 |
const x149 = (x9 + x148); |
| 1757 |
const x150 = (x8 + cast(u64, x149)); |
| 1758 |
const x151 = cast(u32, (x150 & cast(u64, 0xfffffff))); |
| 1759 |
const x152 = cast(u8, (x150 >> 28)); |
| 1760 |
const x153 = (x7 + cast(u32, x152)); |
| 1761 |
const x154 = (x6 + x153); |
| 1762 |
const x155 = (x5 + x154); |
| 1763 |
const x156 = (x155 & 0x7ffffff); |
| 1764 |
const x157 = cast(u8, (x155 >> 27)); |
| 1765 |
const x158 = (x4 + cast(u32, x157)); |
| 1766 |
const x159 = (x3 + x158); |
| 1767 |
const x160 = (x2 + x159); |
| 1768 |
const x161 = (x1 + x160); |
| 1769 |
out1[0] = x70; |
| 1770 |
out1[1] = x75; |
| 1771 |
out1[2] = x81; |
| 1772 |
out1[3] = x86; |
| 1773 |
out1[4] = x92; |
| 1774 |
out1[5] = x97; |
| 1775 |
out1[6] = x101; |
| 1776 |
out1[7] = x105; |
| 1777 |
out1[8] = x110; |
| 1778 |
out1[9] = x116; |
| 1779 |
out1[10] = x121; |
| 1780 |
out1[11] = x127; |
| 1781 |
out1[12] = x132; |
| 1782 |
out1[13] = x136; |
| 1783 |
out1[14] = x140; |
| 1784 |
out1[15] = x145; |
| 1785 |
out1[16] = x151; |
| 1786 |
out1[17] = x156; |
| 1787 |
out1[18] = x161; |
| 1788 |
} |
| 1789 |
|
| 1790 |
/// The function relax is the identity function converting from tight field elements to loose field elements. |
| 1791 |
/// |
| 1792 |
/// Postconditions: |
| 1793 |
/// out1 = arg1 |
| 1794 |
/// |
| 1795 |
pub fn relax(out1: *LooseFieldElement, arg1: TightFieldElement) void { |
| 1796 |
@setRuntimeSafety(mode == .Debug); |
| 1797 |
|
| 1798 |
const x1 = (arg1[0]); |
| 1799 |
const x2 = (arg1[1]); |
| 1800 |
const x3 = (arg1[2]); |
| 1801 |
const x4 = (arg1[3]); |
| 1802 |
const x5 = (arg1[4]); |
| 1803 |
const x6 = (arg1[5]); |
| 1804 |
const x7 = (arg1[6]); |
| 1805 |
const x8 = (arg1[7]); |
| 1806 |
const x9 = (arg1[8]); |
| 1807 |
const x10 = (arg1[9]); |
| 1808 |
const x11 = (arg1[10]); |
| 1809 |
const x12 = (arg1[11]); |
| 1810 |
const x13 = (arg1[12]); |
| 1811 |
const x14 = (arg1[13]); |
| 1812 |
const x15 = (arg1[14]); |
| 1813 |
const x16 = (arg1[15]); |
| 1814 |
const x17 = (arg1[16]); |
| 1815 |
const x18 = (arg1[17]); |
| 1816 |
const x19 = (arg1[18]); |
| 1817 |
out1[0] = x1; |
| 1818 |
out1[1] = x2; |
| 1819 |
out1[2] = x3; |
| 1820 |
out1[3] = x4; |
| 1821 |
out1[4] = x5; |
| 1822 |
out1[5] = x6; |
| 1823 |
out1[6] = x7; |
| 1824 |
out1[7] = x8; |
| 1825 |
out1[8] = x9; |
| 1826 |
out1[9] = x10; |
| 1827 |
out1[10] = x11; |
| 1828 |
out1[11] = x12; |
| 1829 |
out1[12] = x13; |
| 1830 |
out1[13] = x14; |
| 1831 |
out1[14] = x15; |
| 1832 |
out1[15] = x16; |
| 1833 |
out1[16] = x17; |
| 1834 |
out1[17] = x18; |
| 1835 |
out1[18] = x19; |
| 1836 |
} |