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