Vendor dependencies

This commit is contained in:
2026-08-01 16:11:49 +03:00
parent 7f139a0241
commit 6b5e7f0f8b
29706 changed files with 9575646 additions and 0 deletions
File diff suppressed because it is too large Load Diff
+664
View File
@@ -0,0 +1,664 @@
//! Autogenerated: 'src/ExtractionOCaml/unsaturated_solinas' --lang Rust --inline 25519 64 '(auto)' '2^255 - 19' carry_mul carry_square carry add sub opp selectznz to_bytes from_bytes relax carry_scmul121666
//! curve description: 25519
//! machine_wordsize = 64 (from "64")
//! requested operations: carry_mul, carry_square, carry, add, sub, opp, selectznz, to_bytes, from_bytes, relax, carry_scmul121666
//! n = 5 (from "(auto)")
//! s-c = 2^255 - [(1, 19)] (from "2^255 - 19")
//! tight_bounds_multiplier = 1 (from "")
//!
//! Computed values:
//! carry_chain = [0, 1, 2, 3, 4, 0, 1]
//! eval z = z[0] + (z[1] << 51) + (z[2] << 102) + (z[3] << 153) + (z[4] << 204)
//! 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)
//! balance = [0xfffffffffffda, 0xffffffffffffe, 0xffffffffffffe, 0xffffffffffffe, 0xffffffffffffe]
#![allow(unused_parens)]
#![allow(non_camel_case_types)]
/** fiat_25519_u1 represents values of 1 bits, stored in one byte. */
pub type fiat_25519_u1 = u8;
/** fiat_25519_i1 represents values of 1 bits, stored in one byte. */
pub type fiat_25519_i1 = i8;
/** fiat_25519_u2 represents values of 2 bits, stored in one byte. */
pub type fiat_25519_u2 = u8;
/** fiat_25519_i2 represents values of 2 bits, stored in one byte. */
pub type fiat_25519_i2 = i8;
/** The type fiat_25519_loose_field_element is a field element with loose bounds. */
/** Bounds: [[0x0 ~> 0x18000000000000], [0x0 ~> 0x18000000000000], [0x0 ~> 0x18000000000000], [0x0 ~> 0x18000000000000], [0x0 ~> 0x18000000000000]] */
#[derive(Clone, Copy)]
pub struct fiat_25519_loose_field_element(pub [u64; 5]);
impl core::ops::Index<usize> for fiat_25519_loose_field_element {
type Output = u64;
#[inline]
fn index(&self, index: usize) -> &Self::Output {
&self.0[index]
}
}
impl core::ops::IndexMut<usize> for fiat_25519_loose_field_element {
#[inline]
fn index_mut(&mut self, index: usize) -> &mut Self::Output {
&mut self.0[index]
}
}
/** The type fiat_25519_tight_field_element is a field element with tight bounds. */
/** Bounds: [[0x0 ~> 0x8000000000000], [0x0 ~> 0x8000000000000], [0x0 ~> 0x8000000000000], [0x0 ~> 0x8000000000000], [0x0 ~> 0x8000000000000]] */
#[derive(Clone, Copy)]
pub struct fiat_25519_tight_field_element(pub [u64; 5]);
impl core::ops::Index<usize> for fiat_25519_tight_field_element {
type Output = u64;
#[inline]
fn index(&self, index: usize) -> &Self::Output {
&self.0[index]
}
}
impl core::ops::IndexMut<usize> for fiat_25519_tight_field_element {
#[inline]
fn index_mut(&mut self, index: usize) -> &mut Self::Output {
&mut self.0[index]
}
}
/// The function fiat_25519_addcarryx_u51 is an addition with carry.
///
/// Postconditions:
/// out1 = (arg1 + arg2 + arg3) mod 2^51
/// out2 = ⌊(arg1 + arg2 + arg3) / 2^51⌋
///
/// Input Bounds:
/// arg1: [0x0 ~> 0x1]
/// arg2: [0x0 ~> 0x7ffffffffffff]
/// arg3: [0x0 ~> 0x7ffffffffffff]
/// Output Bounds:
/// out1: [0x0 ~> 0x7ffffffffffff]
/// out2: [0x0 ~> 0x1]
#[inline]
pub fn fiat_25519_addcarryx_u51(out1: &mut u64, out2: &mut fiat_25519_u1, arg1: fiat_25519_u1, arg2: u64, arg3: u64) {
let x1: u64 = (((arg1 as u64) + arg2) + arg3);
let x2: u64 = (x1 & 0x7ffffffffffff);
let x3: fiat_25519_u1 = ((x1 >> 51) as fiat_25519_u1);
*out1 = x2;
*out2 = x3;
}
/// The function fiat_25519_subborrowx_u51 is a subtraction with borrow.
///
/// Postconditions:
/// out1 = (-arg1 + arg2 + -arg3) mod 2^51
/// out2 = -⌊(-arg1 + arg2 + -arg3) / 2^51⌋
///
/// Input Bounds:
/// arg1: [0x0 ~> 0x1]
/// arg2: [0x0 ~> 0x7ffffffffffff]
/// arg3: [0x0 ~> 0x7ffffffffffff]
/// Output Bounds:
/// out1: [0x0 ~> 0x7ffffffffffff]
/// out2: [0x0 ~> 0x1]
#[inline]
pub fn fiat_25519_subborrowx_u51(out1: &mut u64, out2: &mut fiat_25519_u1, arg1: fiat_25519_u1, arg2: u64, arg3: u64) {
let x1: i64 = ((((((arg2 as i128) - (arg1 as i128)) as i64) as i128) - (arg3 as i128)) as i64);
let x2: fiat_25519_i1 = ((x1 >> 51) as fiat_25519_i1);
let x3: u64 = (((x1 as i128) & (0x7ffffffffffff as i128)) as u64);
*out1 = x3;
*out2 = (((0x0 as fiat_25519_i2) - (x2 as fiat_25519_i2)) as fiat_25519_u1);
}
/// The function fiat_25519_cmovznz_u64 is a single-word conditional move.
///
/// Postconditions:
/// out1 = (if arg1 = 0 then arg2 else arg3)
///
/// Input Bounds:
/// arg1: [0x0 ~> 0x1]
/// arg2: [0x0 ~> 0xffffffffffffffff]
/// arg3: [0x0 ~> 0xffffffffffffffff]
/// Output Bounds:
/// out1: [0x0 ~> 0xffffffffffffffff]
#[inline]
pub fn fiat_25519_cmovznz_u64(out1: &mut u64, arg1: fiat_25519_u1, arg2: u64, arg3: u64) {
let x1: fiat_25519_u1 = (!(!arg1));
let x2: u64 = ((((((0x0 as fiat_25519_i2) - (x1 as fiat_25519_i2)) as fiat_25519_i1) as i128) & (0xffffffffffffffff as i128)) as u64);
let x3: u64 = ((x2 & arg3) | ((!x2) & arg2));
*out1 = x3;
}
/// The function fiat_25519_carry_mul multiplies two field elements and reduces the result.
///
/// Postconditions:
/// eval out1 mod m = (eval arg1 * eval arg2) mod m
///
#[inline]
pub fn fiat_25519_carry_mul(out1: &mut fiat_25519_tight_field_element, arg1: &fiat_25519_loose_field_element, arg2: &fiat_25519_loose_field_element) {
let x1: u128 = (((arg1[4]) as u128) * (((arg2[4]) * 0x13) as u128));
let x2: u128 = (((arg1[4]) as u128) * (((arg2[3]) * 0x13) as u128));
let x3: u128 = (((arg1[4]) as u128) * (((arg2[2]) * 0x13) as u128));
let x4: u128 = (((arg1[4]) as u128) * (((arg2[1]) * 0x13) as u128));
let x5: u128 = (((arg1[3]) as u128) * (((arg2[4]) * 0x13) as u128));
let x6: u128 = (((arg1[3]) as u128) * (((arg2[3]) * 0x13) as u128));
let x7: u128 = (((arg1[3]) as u128) * (((arg2[2]) * 0x13) as u128));
let x8: u128 = (((arg1[2]) as u128) * (((arg2[4]) * 0x13) as u128));
let x9: u128 = (((arg1[2]) as u128) * (((arg2[3]) * 0x13) as u128));
let x10: u128 = (((arg1[1]) as u128) * (((arg2[4]) * 0x13) as u128));
let x11: u128 = (((arg1[4]) as u128) * ((arg2[0]) as u128));
let x12: u128 = (((arg1[3]) as u128) * ((arg2[1]) as u128));
let x13: u128 = (((arg1[3]) as u128) * ((arg2[0]) as u128));
let x14: u128 = (((arg1[2]) as u128) * ((arg2[2]) as u128));
let x15: u128 = (((arg1[2]) as u128) * ((arg2[1]) as u128));
let x16: u128 = (((arg1[2]) as u128) * ((arg2[0]) as u128));
let x17: u128 = (((arg1[1]) as u128) * ((arg2[3]) as u128));
let x18: u128 = (((arg1[1]) as u128) * ((arg2[2]) as u128));
let x19: u128 = (((arg1[1]) as u128) * ((arg2[1]) as u128));
let x20: u128 = (((arg1[1]) as u128) * ((arg2[0]) as u128));
let x21: u128 = (((arg1[0]) as u128) * ((arg2[4]) as u128));
let x22: u128 = (((arg1[0]) as u128) * ((arg2[3]) as u128));
let x23: u128 = (((arg1[0]) as u128) * ((arg2[2]) as u128));
let x24: u128 = (((arg1[0]) as u128) * ((arg2[1]) as u128));
let x25: u128 = (((arg1[0]) as u128) * ((arg2[0]) as u128));
let x26: u128 = (x25 + (x10 + (x9 + (x7 + x4))));
let x27: u64 = ((x26 >> 51) as u64);
let x28: u64 = ((x26 & (0x7ffffffffffff as u128)) as u64);
let x29: u128 = (x21 + (x17 + (x14 + (x12 + x11))));
let x30: u128 = (x22 + (x18 + (x15 + (x13 + x1))));
let x31: u128 = (x23 + (x19 + (x16 + (x5 + x2))));
let x32: u128 = (x24 + (x20 + (x8 + (x6 + x3))));
let x33: u128 = ((x27 as u128) + x32);
let x34: u64 = ((x33 >> 51) as u64);
let x35: u64 = ((x33 & (0x7ffffffffffff as u128)) as u64);
let x36: u128 = ((x34 as u128) + x31);
let x37: u64 = ((x36 >> 51) as u64);
let x38: u64 = ((x36 & (0x7ffffffffffff as u128)) as u64);
let x39: u128 = ((x37 as u128) + x30);
let x40: u64 = ((x39 >> 51) as u64);
let x41: u64 = ((x39 & (0x7ffffffffffff as u128)) as u64);
let x42: u128 = ((x40 as u128) + x29);
let x43: u64 = ((x42 >> 51) as u64);
let x44: u64 = ((x42 & (0x7ffffffffffff as u128)) as u64);
let x45: u64 = (x43 * 0x13);
let x46: u64 = (x28 + x45);
let x47: u64 = (x46 >> 51);
let x48: u64 = (x46 & 0x7ffffffffffff);
let x49: u64 = (x47 + x35);
let x50: fiat_25519_u1 = ((x49 >> 51) as fiat_25519_u1);
let x51: u64 = (x49 & 0x7ffffffffffff);
let x52: u64 = ((x50 as u64) + x38);
out1[0] = x48;
out1[1] = x51;
out1[2] = x52;
out1[3] = x41;
out1[4] = x44;
}
/// The function fiat_25519_carry_square squares a field element and reduces the result.
///
/// Postconditions:
/// eval out1 mod m = (eval arg1 * eval arg1) mod m
///
#[inline]
pub fn fiat_25519_carry_square(out1: &mut fiat_25519_tight_field_element, arg1: &fiat_25519_loose_field_element) {
let x1: u64 = ((arg1[4]) * 0x13);
let x2: u64 = (x1 * 0x2);
let x3: u64 = ((arg1[4]) * 0x2);
let x4: u64 = ((arg1[3]) * 0x13);
let x5: u64 = (x4 * 0x2);
let x6: u64 = ((arg1[3]) * 0x2);
let x7: u64 = ((arg1[2]) * 0x2);
let x8: u64 = ((arg1[1]) * 0x2);
let x9: u128 = (((arg1[4]) as u128) * (x1 as u128));
let x10: u128 = (((arg1[3]) as u128) * (x2 as u128));
let x11: u128 = (((arg1[3]) as u128) * (x4 as u128));
let x12: u128 = (((arg1[2]) as u128) * (x2 as u128));
let x13: u128 = (((arg1[2]) as u128) * (x5 as u128));
let x14: u128 = (((arg1[2]) as u128) * ((arg1[2]) as u128));
let x15: u128 = (((arg1[1]) as u128) * (x2 as u128));
let x16: u128 = (((arg1[1]) as u128) * (x6 as u128));
let x17: u128 = (((arg1[1]) as u128) * (x7 as u128));
let x18: u128 = (((arg1[1]) as u128) * ((arg1[1]) as u128));
let x19: u128 = (((arg1[0]) as u128) * (x3 as u128));
let x20: u128 = (((arg1[0]) as u128) * (x6 as u128));
let x21: u128 = (((arg1[0]) as u128) * (x7 as u128));
let x22: u128 = (((arg1[0]) as u128) * (x8 as u128));
let x23: u128 = (((arg1[0]) as u128) * ((arg1[0]) as u128));
let x24: u128 = (x23 + (x15 + x13));
let x25: u64 = ((x24 >> 51) as u64);
let x26: u64 = ((x24 & (0x7ffffffffffff as u128)) as u64);
let x27: u128 = (x19 + (x16 + x14));
let x28: u128 = (x20 + (x17 + x9));
let x29: u128 = (x21 + (x18 + x10));
let x30: u128 = (x22 + (x12 + x11));
let x31: u128 = ((x25 as u128) + x30);
let x32: u64 = ((x31 >> 51) as u64);
let x33: u64 = ((x31 & (0x7ffffffffffff as u128)) as u64);
let x34: u128 = ((x32 as u128) + x29);
let x35: u64 = ((x34 >> 51) as u64);
let x36: u64 = ((x34 & (0x7ffffffffffff as u128)) as u64);
let x37: u128 = ((x35 as u128) + x28);
let x38: u64 = ((x37 >> 51) as u64);
let x39: u64 = ((x37 & (0x7ffffffffffff as u128)) as u64);
let x40: u128 = ((x38 as u128) + x27);
let x41: u64 = ((x40 >> 51) as u64);
let x42: u64 = ((x40 & (0x7ffffffffffff as u128)) as u64);
let x43: u64 = (x41 * 0x13);
let x44: u64 = (x26 + x43);
let x45: u64 = (x44 >> 51);
let x46: u64 = (x44 & 0x7ffffffffffff);
let x47: u64 = (x45 + x33);
let x48: fiat_25519_u1 = ((x47 >> 51) as fiat_25519_u1);
let x49: u64 = (x47 & 0x7ffffffffffff);
let x50: u64 = ((x48 as u64) + x36);
out1[0] = x46;
out1[1] = x49;
out1[2] = x50;
out1[3] = x39;
out1[4] = x42;
}
/// The function fiat_25519_carry reduces a field element.
///
/// Postconditions:
/// eval out1 mod m = eval arg1 mod m
///
#[inline]
pub fn fiat_25519_carry(out1: &mut fiat_25519_tight_field_element, arg1: &fiat_25519_loose_field_element) {
let x1: u64 = (arg1[0]);
let x2: u64 = ((x1 >> 51) + (arg1[1]));
let x3: u64 = ((x2 >> 51) + (arg1[2]));
let x4: u64 = ((x3 >> 51) + (arg1[3]));
let x5: u64 = ((x4 >> 51) + (arg1[4]));
let x6: u64 = ((x1 & 0x7ffffffffffff) + ((x5 >> 51) * 0x13));
let x7: u64 = ((((x6 >> 51) as fiat_25519_u1) as u64) + (x2 & 0x7ffffffffffff));
let x8: u64 = (x6 & 0x7ffffffffffff);
let x9: u64 = (x7 & 0x7ffffffffffff);
let x10: u64 = ((((x7 >> 51) as fiat_25519_u1) as u64) + (x3 & 0x7ffffffffffff));
let x11: u64 = (x4 & 0x7ffffffffffff);
let x12: u64 = (x5 & 0x7ffffffffffff);
out1[0] = x8;
out1[1] = x9;
out1[2] = x10;
out1[3] = x11;
out1[4] = x12;
}
/// The function fiat_25519_add adds two field elements.
///
/// Postconditions:
/// eval out1 mod m = (eval arg1 + eval arg2) mod m
///
#[inline]
pub fn fiat_25519_add(out1: &mut fiat_25519_loose_field_element, arg1: &fiat_25519_tight_field_element, arg2: &fiat_25519_tight_field_element) {
let x1: u64 = ((arg1[0]) + (arg2[0]));
let x2: u64 = ((arg1[1]) + (arg2[1]));
let x3: u64 = ((arg1[2]) + (arg2[2]));
let x4: u64 = ((arg1[3]) + (arg2[3]));
let x5: u64 = ((arg1[4]) + (arg2[4]));
out1[0] = x1;
out1[1] = x2;
out1[2] = x3;
out1[3] = x4;
out1[4] = x5;
}
/// The function fiat_25519_sub subtracts two field elements.
///
/// Postconditions:
/// eval out1 mod m = (eval arg1 - eval arg2) mod m
///
#[inline]
pub fn fiat_25519_sub(out1: &mut fiat_25519_loose_field_element, arg1: &fiat_25519_tight_field_element, arg2: &fiat_25519_tight_field_element) {
let x1: u64 = ((0xfffffffffffda + (arg1[0])) - (arg2[0]));
let x2: u64 = ((0xffffffffffffe + (arg1[1])) - (arg2[1]));
let x3: u64 = ((0xffffffffffffe + (arg1[2])) - (arg2[2]));
let x4: u64 = ((0xffffffffffffe + (arg1[3])) - (arg2[3]));
let x5: u64 = ((0xffffffffffffe + (arg1[4])) - (arg2[4]));
out1[0] = x1;
out1[1] = x2;
out1[2] = x3;
out1[3] = x4;
out1[4] = x5;
}
/// The function fiat_25519_opp negates a field element.
///
/// Postconditions:
/// eval out1 mod m = -eval arg1 mod m
///
#[inline]
pub fn fiat_25519_opp(out1: &mut fiat_25519_loose_field_element, arg1: &fiat_25519_tight_field_element) {
let x1: u64 = (0xfffffffffffda - (arg1[0]));
let x2: u64 = (0xffffffffffffe - (arg1[1]));
let x3: u64 = (0xffffffffffffe - (arg1[2]));
let x4: u64 = (0xffffffffffffe - (arg1[3]));
let x5: u64 = (0xffffffffffffe - (arg1[4]));
out1[0] = x1;
out1[1] = x2;
out1[2] = x3;
out1[3] = x4;
out1[4] = x5;
}
/// The function fiat_25519_selectznz is a multi-limb conditional select.
///
/// Postconditions:
/// out1 = (if arg1 = 0 then arg2 else arg3)
///
/// Input Bounds:
/// arg1: [0x0 ~> 0x1]
/// arg2: [[0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff]]
/// arg3: [[0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff]]
/// Output Bounds:
/// out1: [[0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff]]
#[inline]
pub fn fiat_25519_selectznz(out1: &mut [u64; 5], arg1: fiat_25519_u1, arg2: &[u64; 5], arg3: &[u64; 5]) {
let mut x1: u64 = 0;
fiat_25519_cmovznz_u64(&mut x1, arg1, (arg2[0]), (arg3[0]));
let mut x2: u64 = 0;
fiat_25519_cmovznz_u64(&mut x2, arg1, (arg2[1]), (arg3[1]));
let mut x3: u64 = 0;
fiat_25519_cmovznz_u64(&mut x3, arg1, (arg2[2]), (arg3[2]));
let mut x4: u64 = 0;
fiat_25519_cmovznz_u64(&mut x4, arg1, (arg2[3]), (arg3[3]));
let mut x5: u64 = 0;
fiat_25519_cmovznz_u64(&mut x5, arg1, (arg2[4]), (arg3[4]));
out1[0] = x1;
out1[1] = x2;
out1[2] = x3;
out1[3] = x4;
out1[4] = x5;
}
/// The function fiat_25519_to_bytes serializes a field element to bytes in little-endian order.
///
/// Postconditions:
/// out1 = map (λ x, ⌊((eval arg1 mod m) mod 2^(8 * (x + 1))) / 2^(8 * x)⌋) [0..31]
///
/// Output Bounds:
/// 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 ~> 0x7f]]
#[inline]
pub fn fiat_25519_to_bytes(out1: &mut [u8; 32], arg1: &fiat_25519_tight_field_element) {
let mut x1: u64 = 0;
let mut x2: fiat_25519_u1 = 0;
fiat_25519_subborrowx_u51(&mut x1, &mut x2, 0x0, (arg1[0]), 0x7ffffffffffed);
let mut x3: u64 = 0;
let mut x4: fiat_25519_u1 = 0;
fiat_25519_subborrowx_u51(&mut x3, &mut x4, x2, (arg1[1]), 0x7ffffffffffff);
let mut x5: u64 = 0;
let mut x6: fiat_25519_u1 = 0;
fiat_25519_subborrowx_u51(&mut x5, &mut x6, x4, (arg1[2]), 0x7ffffffffffff);
let mut x7: u64 = 0;
let mut x8: fiat_25519_u1 = 0;
fiat_25519_subborrowx_u51(&mut x7, &mut x8, x6, (arg1[3]), 0x7ffffffffffff);
let mut x9: u64 = 0;
let mut x10: fiat_25519_u1 = 0;
fiat_25519_subborrowx_u51(&mut x9, &mut x10, x8, (arg1[4]), 0x7ffffffffffff);
let mut x11: u64 = 0;
fiat_25519_cmovznz_u64(&mut x11, x10, (0x0 as u64), 0xffffffffffffffff);
let mut x12: u64 = 0;
let mut x13: fiat_25519_u1 = 0;
fiat_25519_addcarryx_u51(&mut x12, &mut x13, 0x0, x1, (x11 & 0x7ffffffffffed));
let mut x14: u64 = 0;
let mut x15: fiat_25519_u1 = 0;
fiat_25519_addcarryx_u51(&mut x14, &mut x15, x13, x3, (x11 & 0x7ffffffffffff));
let mut x16: u64 = 0;
let mut x17: fiat_25519_u1 = 0;
fiat_25519_addcarryx_u51(&mut x16, &mut x17, x15, x5, (x11 & 0x7ffffffffffff));
let mut x18: u64 = 0;
let mut x19: fiat_25519_u1 = 0;
fiat_25519_addcarryx_u51(&mut x18, &mut x19, x17, x7, (x11 & 0x7ffffffffffff));
let mut x20: u64 = 0;
let mut x21: fiat_25519_u1 = 0;
fiat_25519_addcarryx_u51(&mut x20, &mut x21, x19, x9, (x11 & 0x7ffffffffffff));
let x22: u64 = (x20 << 4);
let x23: u64 = (x18 * (0x2 as u64));
let x24: u64 = (x16 << 6);
let x25: u64 = (x14 << 3);
let x26: u8 = ((x12 & (0xff as u64)) as u8);
let x27: u64 = (x12 >> 8);
let x28: u8 = ((x27 & (0xff as u64)) as u8);
let x29: u64 = (x27 >> 8);
let x30: u8 = ((x29 & (0xff as u64)) as u8);
let x31: u64 = (x29 >> 8);
let x32: u8 = ((x31 & (0xff as u64)) as u8);
let x33: u64 = (x31 >> 8);
let x34: u8 = ((x33 & (0xff as u64)) as u8);
let x35: u64 = (x33 >> 8);
let x36: u8 = ((x35 & (0xff as u64)) as u8);
let x37: u8 = ((x35 >> 8) as u8);
let x38: u64 = (x25 + (x37 as u64));
let x39: u8 = ((x38 & (0xff as u64)) as u8);
let x40: u64 = (x38 >> 8);
let x41: u8 = ((x40 & (0xff as u64)) as u8);
let x42: u64 = (x40 >> 8);
let x43: u8 = ((x42 & (0xff as u64)) as u8);
let x44: u64 = (x42 >> 8);
let x45: u8 = ((x44 & (0xff as u64)) as u8);
let x46: u64 = (x44 >> 8);
let x47: u8 = ((x46 & (0xff as u64)) as u8);
let x48: u64 = (x46 >> 8);
let x49: u8 = ((x48 & (0xff as u64)) as u8);
let x50: u8 = ((x48 >> 8) as u8);
let x51: u64 = (x24 + (x50 as u64));
let x52: u8 = ((x51 & (0xff as u64)) as u8);
let x53: u64 = (x51 >> 8);
let x54: u8 = ((x53 & (0xff as u64)) as u8);
let x55: u64 = (x53 >> 8);
let x56: u8 = ((x55 & (0xff as u64)) as u8);
let x57: u64 = (x55 >> 8);
let x58: u8 = ((x57 & (0xff as u64)) as u8);
let x59: u64 = (x57 >> 8);
let x60: u8 = ((x59 & (0xff as u64)) as u8);
let x61: u64 = (x59 >> 8);
let x62: u8 = ((x61 & (0xff as u64)) as u8);
let x63: u64 = (x61 >> 8);
let x64: u8 = ((x63 & (0xff as u64)) as u8);
let x65: fiat_25519_u1 = ((x63 >> 8) as fiat_25519_u1);
let x66: u64 = (x23 + (x65 as u64));
let x67: u8 = ((x66 & (0xff as u64)) as u8);
let x68: u64 = (x66 >> 8);
let x69: u8 = ((x68 & (0xff as u64)) as u8);
let x70: u64 = (x68 >> 8);
let x71: u8 = ((x70 & (0xff as u64)) as u8);
let x72: u64 = (x70 >> 8);
let x73: u8 = ((x72 & (0xff as u64)) as u8);
let x74: u64 = (x72 >> 8);
let x75: u8 = ((x74 & (0xff as u64)) as u8);
let x76: u64 = (x74 >> 8);
let x77: u8 = ((x76 & (0xff as u64)) as u8);
let x78: u8 = ((x76 >> 8) as u8);
let x79: u64 = (x22 + (x78 as u64));
let x80: u8 = ((x79 & (0xff as u64)) as u8);
let x81: u64 = (x79 >> 8);
let x82: u8 = ((x81 & (0xff as u64)) as u8);
let x83: u64 = (x81 >> 8);
let x84: u8 = ((x83 & (0xff as u64)) as u8);
let x85: u64 = (x83 >> 8);
let x86: u8 = ((x85 & (0xff as u64)) as u8);
let x87: u64 = (x85 >> 8);
let x88: u8 = ((x87 & (0xff as u64)) as u8);
let x89: u64 = (x87 >> 8);
let x90: u8 = ((x89 & (0xff as u64)) as u8);
let x91: u8 = ((x89 >> 8) as u8);
out1[0] = x26;
out1[1] = x28;
out1[2] = x30;
out1[3] = x32;
out1[4] = x34;
out1[5] = x36;
out1[6] = x39;
out1[7] = x41;
out1[8] = x43;
out1[9] = x45;
out1[10] = x47;
out1[11] = x49;
out1[12] = x52;
out1[13] = x54;
out1[14] = x56;
out1[15] = x58;
out1[16] = x60;
out1[17] = x62;
out1[18] = x64;
out1[19] = x67;
out1[20] = x69;
out1[21] = x71;
out1[22] = x73;
out1[23] = x75;
out1[24] = x77;
out1[25] = x80;
out1[26] = x82;
out1[27] = x84;
out1[28] = x86;
out1[29] = x88;
out1[30] = x90;
out1[31] = x91;
}
/// The function fiat_25519_from_bytes deserializes a field element from bytes in little-endian order.
///
/// Postconditions:
/// eval out1 mod m = bytes_eval arg1 mod m
///
/// Input Bounds:
/// 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 ~> 0x7f]]
#[inline]
pub fn fiat_25519_from_bytes(out1: &mut fiat_25519_tight_field_element, arg1: &[u8; 32]) {
let x1: u64 = (((arg1[31]) as u64) << 44);
let x2: u64 = (((arg1[30]) as u64) << 36);
let x3: u64 = (((arg1[29]) as u64) << 28);
let x4: u64 = (((arg1[28]) as u64) << 20);
let x5: u64 = (((arg1[27]) as u64) << 12);
let x6: u64 = (((arg1[26]) as u64) << 4);
let x7: u64 = (((arg1[25]) as u64) << 47);
let x8: u64 = (((arg1[24]) as u64) << 39);
let x9: u64 = (((arg1[23]) as u64) << 31);
let x10: u64 = (((arg1[22]) as u64) << 23);
let x11: u64 = (((arg1[21]) as u64) << 15);
let x12: u64 = (((arg1[20]) as u64) << 7);
let x13: u64 = (((arg1[19]) as u64) << 50);
let x14: u64 = (((arg1[18]) as u64) << 42);
let x15: u64 = (((arg1[17]) as u64) << 34);
let x16: u64 = (((arg1[16]) as u64) << 26);
let x17: u64 = (((arg1[15]) as u64) << 18);
let x18: u64 = (((arg1[14]) as u64) << 10);
let x19: u64 = (((arg1[13]) as u64) << 2);
let x20: u64 = (((arg1[12]) as u64) << 45);
let x21: u64 = (((arg1[11]) as u64) << 37);
let x22: u64 = (((arg1[10]) as u64) << 29);
let x23: u64 = (((arg1[9]) as u64) << 21);
let x24: u64 = (((arg1[8]) as u64) << 13);
let x25: u64 = (((arg1[7]) as u64) << 5);
let x26: u64 = (((arg1[6]) as u64) << 48);
let x27: u64 = (((arg1[5]) as u64) << 40);
let x28: u64 = (((arg1[4]) as u64) << 32);
let x29: u64 = (((arg1[3]) as u64) << 24);
let x30: u64 = (((arg1[2]) as u64) << 16);
let x31: u64 = (((arg1[1]) as u64) << 8);
let x32: u8 = (arg1[0]);
let x33: u64 = (x31 + (x32 as u64));
let x34: u64 = (x30 + x33);
let x35: u64 = (x29 + x34);
let x36: u64 = (x28 + x35);
let x37: u64 = (x27 + x36);
let x38: u64 = (x26 + x37);
let x39: u64 = (x38 & 0x7ffffffffffff);
let x40: u8 = ((x38 >> 51) as u8);
let x41: u64 = (x25 + (x40 as u64));
let x42: u64 = (x24 + x41);
let x43: u64 = (x23 + x42);
let x44: u64 = (x22 + x43);
let x45: u64 = (x21 + x44);
let x46: u64 = (x20 + x45);
let x47: u64 = (x46 & 0x7ffffffffffff);
let x48: u8 = ((x46 >> 51) as u8);
let x49: u64 = (x19 + (x48 as u64));
let x50: u64 = (x18 + x49);
let x51: u64 = (x17 + x50);
let x52: u64 = (x16 + x51);
let x53: u64 = (x15 + x52);
let x54: u64 = (x14 + x53);
let x55: u64 = (x13 + x54);
let x56: u64 = (x55 & 0x7ffffffffffff);
let x57: u8 = ((x55 >> 51) as u8);
let x58: u64 = (x12 + (x57 as u64));
let x59: u64 = (x11 + x58);
let x60: u64 = (x10 + x59);
let x61: u64 = (x9 + x60);
let x62: u64 = (x8 + x61);
let x63: u64 = (x7 + x62);
let x64: u64 = (x63 & 0x7ffffffffffff);
let x65: u8 = ((x63 >> 51) as u8);
let x66: u64 = (x6 + (x65 as u64));
let x67: u64 = (x5 + x66);
let x68: u64 = (x4 + x67);
let x69: u64 = (x3 + x68);
let x70: u64 = (x2 + x69);
let x71: u64 = (x1 + x70);
out1[0] = x39;
out1[1] = x47;
out1[2] = x56;
out1[3] = x64;
out1[4] = x71;
}
/// The function fiat_25519_relax is the identity function converting from tight field elements to loose field elements.
///
/// Postconditions:
/// out1 = arg1
///
#[inline]
pub fn fiat_25519_relax(out1: &mut fiat_25519_loose_field_element, arg1: &fiat_25519_tight_field_element) {
let x1: u64 = (arg1[0]);
let x2: u64 = (arg1[1]);
let x3: u64 = (arg1[2]);
let x4: u64 = (arg1[3]);
let x5: u64 = (arg1[4]);
out1[0] = x1;
out1[1] = x2;
out1[2] = x3;
out1[3] = x4;
out1[4] = x5;
}
/// The function fiat_25519_carry_scmul_121666 multiplies a field element by 121666 and reduces the result.
///
/// Postconditions:
/// eval out1 mod m = (121666 * eval arg1) mod m
///
#[inline]
pub fn fiat_25519_carry_scmul_121666(out1: &mut fiat_25519_tight_field_element, arg1: &fiat_25519_loose_field_element) {
let x1: u128 = ((0x1db42 as u128) * ((arg1[4]) as u128));
let x2: u128 = ((0x1db42 as u128) * ((arg1[3]) as u128));
let x3: u128 = ((0x1db42 as u128) * ((arg1[2]) as u128));
let x4: u128 = ((0x1db42 as u128) * ((arg1[1]) as u128));
let x5: u128 = ((0x1db42 as u128) * ((arg1[0]) as u128));
let x6: u64 = ((x5 >> 51) as u64);
let x7: u64 = ((x5 & (0x7ffffffffffff as u128)) as u64);
let x8: u128 = ((x6 as u128) + x4);
let x9: u64 = ((x8 >> 51) as u64);
let x10: u64 = ((x8 & (0x7ffffffffffff as u128)) as u64);
let x11: u128 = ((x9 as u128) + x3);
let x12: u64 = ((x11 >> 51) as u64);
let x13: u64 = ((x11 & (0x7ffffffffffff as u128)) as u64);
let x14: u128 = ((x12 as u128) + x2);
let x15: u64 = ((x14 >> 51) as u64);
let x16: u64 = ((x14 & (0x7ffffffffffff as u128)) as u64);
let x17: u128 = ((x15 as u128) + x1);
let x18: u64 = ((x17 >> 51) as u64);
let x19: u64 = ((x17 & (0x7ffffffffffff as u128)) as u64);
let x20: u64 = (x18 * 0x13);
let x21: u64 = (x7 + x20);
let x22: fiat_25519_u1 = ((x21 >> 51) as fiat_25519_u1);
let x23: u64 = (x21 & 0x7ffffffffffff);
let x24: u64 = ((x22 as u64) + x10);
let x25: fiat_25519_u1 = ((x24 >> 51) as fiat_25519_u1);
let x26: u64 = (x24 & 0x7ffffffffffff);
let x27: u64 = ((x25 as u64) + x13);
out1[0] = x23;
out1[1] = x26;
out1[2] = x27;
out1[3] = x16;
out1[4] = x19;
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,486 @@
//! Autogenerated: 'src/ExtractionOCaml/solinas_reduction' --lang Rust --inline curve25519_solinas 64 '2^255 - 19' mul square
//! curve description: curve25519_solinas
//! machine_wordsize = 64 (from "64")
//! requested operations: mul, square
//! s-c = 2^255 - [(1, 19)] (from "2^255 - 19")
//!
//! Computed values:
//!
#![allow(unused_parens)]
#![allow(non_camel_case_types)]
/** fiat_curve25519_solinas_u1 represents values of 1 bits, stored in one byte. */
pub type fiat_curve25519_solinas_u1 = u8;
/** fiat_curve25519_solinas_i1 represents values of 1 bits, stored in one byte. */
pub type fiat_curve25519_solinas_i1 = i8;
/** fiat_curve25519_solinas_u2 represents values of 2 bits, stored in one byte. */
pub type fiat_curve25519_solinas_u2 = u8;
/** fiat_curve25519_solinas_i2 represents values of 2 bits, stored in one byte. */
pub type fiat_curve25519_solinas_i2 = i8;
/// The function fiat_curve25519_solinas_addcarryx_u64 is an addition with carry.
///
/// Postconditions:
/// out1 = (arg1 + arg2 + arg3) mod 2^64
/// out2 = ⌊(arg1 + arg2 + arg3) / 2^64⌋
///
/// Input Bounds:
/// arg1: [0x0 ~> 0x1]
/// arg2: [0x0 ~> 0xffffffffffffffff]
/// arg3: [0x0 ~> 0xffffffffffffffff]
/// Output Bounds:
/// out1: [0x0 ~> 0xffffffffffffffff]
/// out2: [0x0 ~> 0x1]
#[inline]
pub fn fiat_curve25519_solinas_addcarryx_u64(out1: &mut u64, out2: &mut fiat_curve25519_solinas_u1, arg1: fiat_curve25519_solinas_u1, arg2: u64, arg3: u64) {
let x1: u128 = (((arg1 as u128) + (arg2 as u128)) + (arg3 as u128));
let x2: u64 = ((x1 & (0xffffffffffffffff as u128)) as u64);
let x3: fiat_curve25519_solinas_u1 = ((x1 >> 64) as fiat_curve25519_solinas_u1);
*out1 = x2;
*out2 = x3;
}
/// The function fiat_curve25519_solinas_subborrowx_u64 is a subtraction with borrow.
///
/// Postconditions:
/// out1 = (-arg1 + arg2 + -arg3) mod 2^64
/// out2 = -⌊(-arg1 + arg2 + -arg3) / 2^64⌋
///
/// Input Bounds:
/// arg1: [0x0 ~> 0x1]
/// arg2: [0x0 ~> 0xffffffffffffffff]
/// arg3: [0x0 ~> 0xffffffffffffffff]
/// Output Bounds:
/// out1: [0x0 ~> 0xffffffffffffffff]
/// out2: [0x0 ~> 0x1]
#[inline]
pub fn fiat_curve25519_solinas_subborrowx_u64(out1: &mut u64, out2: &mut fiat_curve25519_solinas_u1, arg1: fiat_curve25519_solinas_u1, arg2: u64, arg3: u64) {
let x1: i128 = (((arg2 as i128) - (arg1 as i128)) - (arg3 as i128));
let x2: fiat_curve25519_solinas_i1 = ((x1 >> 64) as fiat_curve25519_solinas_i1);
let x3: u64 = ((x1 & (0xffffffffffffffff as i128)) as u64);
*out1 = x3;
*out2 = (((0x0 as fiat_curve25519_solinas_i2) - (x2 as fiat_curve25519_solinas_i2)) as fiat_curve25519_solinas_u1);
}
/// The function fiat_curve25519_solinas_mulx_u64 is a multiplication, returning the full double-width result.
///
/// Postconditions:
/// out1 = (arg1 * arg2) mod 2^64
/// out2 = ⌊arg1 * arg2 / 2^64⌋
///
/// Input Bounds:
/// arg1: [0x0 ~> 0xffffffffffffffff]
/// arg2: [0x0 ~> 0xffffffffffffffff]
/// Output Bounds:
/// out1: [0x0 ~> 0xffffffffffffffff]
/// out2: [0x0 ~> 0xffffffffffffffff]
#[inline]
pub fn fiat_curve25519_solinas_mulx_u64(out1: &mut u64, out2: &mut u64, arg1: u64, arg2: u64) {
let x1: u128 = ((arg1 as u128) * (arg2 as u128));
let x2: u64 = ((x1 & (0xffffffffffffffff as u128)) as u64);
let x3: u64 = ((x1 >> 64) as u64);
*out1 = x2;
*out2 = x3;
}
/// The function fiat_curve25519_solinas_cmovznz_u64 is a single-word conditional move.
///
/// Postconditions:
/// out1 = (if arg1 = 0 then arg2 else arg3)
///
/// Input Bounds:
/// arg1: [0x0 ~> 0x1]
/// arg2: [0x0 ~> 0xffffffffffffffff]
/// arg3: [0x0 ~> 0xffffffffffffffff]
/// Output Bounds:
/// out1: [0x0 ~> 0xffffffffffffffff]
#[inline]
pub fn fiat_curve25519_solinas_cmovznz_u64(out1: &mut u64, arg1: fiat_curve25519_solinas_u1, arg2: u64, arg3: u64) {
let x1: fiat_curve25519_solinas_u1 = (!(!arg1));
let x2: u64 = ((((((0x0 as fiat_curve25519_solinas_i2) - (x1 as fiat_curve25519_solinas_i2)) as fiat_curve25519_solinas_i1) as i128) & (0xffffffffffffffff as i128)) as u64);
let x3: u64 = ((x2 & arg3) | ((!x2) & arg2));
*out1 = x3;
}
/// The function fiat_curve25519_solinas_mul multiplies two field elements.
///
/// Postconditions:
/// eval out1 mod 57896044618658097711785492504343953926634992332820282019728792003956564819949 = (eval arg1 * eval arg2) mod 57896044618658097711785492504343953926634992332820282019728792003956564819949
///
/// Input Bounds:
/// arg1: [[0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff]]
/// arg2: [[0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff]]
/// Output Bounds:
/// out1: [[0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff]]
#[inline]
pub fn fiat_curve25519_solinas_mul(out1: &mut [u64; 4], arg1: &[u64; 4], arg2: &[u64; 4]) {
let mut x1: u64 = 0;
let mut x2: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x1, &mut x2, (arg1[3]), (arg2[3]));
let mut x3: u64 = 0;
let mut x4: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x3, &mut x4, (arg1[3]), (arg2[2]));
let mut x5: u64 = 0;
let mut x6: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x5, &mut x6, (arg1[3]), (arg2[1]));
let mut x7: u64 = 0;
let mut x8: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x7, &mut x8, (arg1[3]), (arg2[0]));
let mut x9: u64 = 0;
let mut x10: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x9, &mut x10, (arg1[2]), (arg2[3]));
let mut x11: u64 = 0;
let mut x12: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x11, &mut x12, (arg1[2]), (arg2[2]));
let mut x13: u64 = 0;
let mut x14: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x13, &mut x14, (arg1[2]), (arg2[1]));
let mut x15: u64 = 0;
let mut x16: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x15, &mut x16, (arg1[2]), (arg2[0]));
let mut x17: u64 = 0;
let mut x18: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x17, &mut x18, (arg1[1]), (arg2[3]));
let mut x19: u64 = 0;
let mut x20: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x19, &mut x20, (arg1[1]), (arg2[2]));
let mut x21: u64 = 0;
let mut x22: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x21, &mut x22, (arg1[1]), (arg2[1]));
let mut x23: u64 = 0;
let mut x24: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x23, &mut x24, (arg1[1]), (arg2[0]));
let mut x25: u64 = 0;
let mut x26: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x25, &mut x26, (arg1[0]), (arg2[3]));
let mut x27: u64 = 0;
let mut x28: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x27, &mut x28, (arg1[0]), (arg2[2]));
let mut x29: u64 = 0;
let mut x30: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x29, &mut x30, (arg1[0]), (arg2[1]));
let mut x31: u64 = 0;
let mut x32: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x31, &mut x32, (arg1[0]), (arg2[0]));
let mut x33: u64 = 0;
let mut x34: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x33, &mut x34, 0x0, x28, x7);
let mut x35: u64 = 0;
let mut x36: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x35, &mut x36, x34, x26, x5);
let x37: u64 = ((x36 as u64) + x18);
let mut x38: u64 = 0;
let mut x39: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x38, &mut x39, 0x0, x33, x13);
let mut x40: u64 = 0;
let mut x41: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x40, &mut x41, x39, x35, x8);
let mut x42: u64 = 0;
let mut x43: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x42, &mut x43, x41, x37, (0x0 as u64));
let x44: u64 = ((x43 as u64) + x10);
let mut x45: u64 = 0;
let mut x46: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x45, &mut x46, 0x0, x30, x15);
let mut x47: u64 = 0;
let mut x48: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x47, &mut x48, x46, x38, x16);
let mut x49: u64 = 0;
let mut x50: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x49, &mut x50, x48, x40, x11);
let mut x51: u64 = 0;
let mut x52: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x51, &mut x52, x50, x42, x3);
let mut x53: u64 = 0;
let mut x54: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x53, &mut x54, x52, x44, (0x0 as u64));
let x55: u64 = ((x54 as u64) + x2);
let mut x56: u64 = 0;
let mut x57: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x56, &mut x57, 0x0, x45, x21);
let mut x58: u64 = 0;
let mut x59: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x58, &mut x59, x57, x47, x19);
let mut x60: u64 = 0;
let mut x61: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x60, &mut x61, x59, x49, x14);
let mut x62: u64 = 0;
let mut x63: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x62, &mut x63, x61, x51, x6);
let mut x64: u64 = 0;
let mut x65: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x64, &mut x65, x63, x53, (0x0 as u64));
let mut x66: u64 = 0;
let mut x67: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x66, &mut x67, x65, x55, (0x0 as u64));
let mut x68: u64 = 0;
let mut x69: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x68, &mut x69, 0x0, x32, x23);
let mut x70: u64 = 0;
let mut x71: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x70, &mut x71, x69, x56, x24);
let mut x72: u64 = 0;
let mut x73: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x72, &mut x73, x71, x58, x22);
let mut x74: u64 = 0;
let mut x75: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x74, &mut x75, x73, x60, x17);
let mut x76: u64 = 0;
let mut x77: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x76, &mut x77, x75, x62, x9);
let mut x78: u64 = 0;
let mut x79: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x78, &mut x79, x77, x64, x1);
let mut x80: u64 = 0;
let mut x81: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x80, &mut x81, x79, x66, (0x0 as u64));
let mut x82: u64 = 0;
let mut x83: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x82, &mut x83, 0x0, x68, x29);
let mut x84: u64 = 0;
let mut x85: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x84, &mut x85, x83, x70, x27);
let mut x86: u64 = 0;
let mut x87: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x86, &mut x87, x85, x72, x25);
let mut x88: u64 = 0;
let mut x89: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x88, &mut x89, x87, x74, x20);
let mut x90: u64 = 0;
let mut x91: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x90, &mut x91, x89, x76, x12);
let mut x92: u64 = 0;
let mut x93: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x92, &mut x93, x91, x78, x4);
let mut x94: u64 = 0;
let mut x95: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x94, &mut x95, x93, x80, (0x0 as u64));
let mut x96: u64 = 0;
let mut x97: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x96, &mut x97, 0x26, x94);
let mut x98: u64 = 0;
let mut x99: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x98, &mut x99, 0x26, x92);
let mut x100: u64 = 0;
let mut x101: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x100, &mut x101, 0x26, x90);
let mut x102: u64 = 0;
let mut x103: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x102, &mut x103, 0x26, x88);
let mut x104: u64 = 0;
let mut x105: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x104, &mut x105, 0x0, x82, x100);
let mut x106: u64 = 0;
let mut x107: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x106, &mut x107, x105, x84, x98);
let mut x108: u64 = 0;
let mut x109: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x108, &mut x109, x107, x86, x96);
let x110: u64 = ((x109 as u64) + x97);
let mut x111: u64 = 0;
let mut x112: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x111, &mut x112, 0x0, x31, x102);
let mut x113: u64 = 0;
let mut x114: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x113, &mut x114, x112, x104, x103);
let mut x115: u64 = 0;
let mut x116: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x115, &mut x116, x114, x106, x101);
let mut x117: u64 = 0;
let mut x118: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x117, &mut x118, x116, x108, x99);
let x119: u64 = ((x118 as u64) + x110);
let mut x120: u64 = 0;
let mut x121: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x120, &mut x121, 0x26, x119);
let mut x122: u64 = 0;
let mut x123: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x122, &mut x123, 0x0, x111, x120);
let mut x124: u64 = 0;
let mut x125: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x124, &mut x125, x123, x113, (0x0 as u64));
let mut x126: u64 = 0;
let mut x127: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x126, &mut x127, x125, x115, (0x0 as u64));
let mut x128: u64 = 0;
let mut x129: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x128, &mut x129, x127, x117, (0x0 as u64));
let mut x130: u64 = 0;
fiat_curve25519_solinas_cmovznz_u64(&mut x130, x129, (0x0 as u64), 0x26);
let mut x131: u64 = 0;
let mut x132: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x131, &mut x132, 0x0, x130, x122);
out1[0] = x131;
out1[1] = x124;
out1[2] = x126;
out1[3] = x128;
}
/// The function fiat_curve25519_solinas_square squares a field element.
///
/// Postconditions:
/// eval out1 mod 57896044618658097711785492504343953926634992332820282019728792003956564819949 = (eval arg1 * eval arg1) mod 57896044618658097711785492504343953926634992332820282019728792003956564819949
///
/// Input Bounds:
/// arg1: [[0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff]]
/// Output Bounds:
/// out1: [[0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff]]
#[inline]
pub fn fiat_curve25519_solinas_square(out1: &mut [u64; 4], arg1: &[u64; 4]) {
let mut x1: u64 = 0;
let mut x2: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x1, &mut x2, (arg1[0]), (arg1[3]));
let mut x3: u64 = 0;
let mut x4: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x3, &mut x4, (arg1[0]), (arg1[2]));
let mut x5: u64 = 0;
let mut x6: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x5, &mut x6, (arg1[0]), (arg1[1]));
let mut x7: u64 = 0;
let mut x8: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x7, &mut x8, (arg1[3]), (arg1[2]));
let mut x9: u64 = 0;
let mut x10: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x9, &mut x10, (arg1[3]), (arg1[1]));
let mut x11: u64 = 0;
let mut x12: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x11, &mut x12, 0x0, x6, x3);
let mut x13: u64 = 0;
let mut x14: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x13, &mut x14, x12, x4, x1);
let mut x15: u64 = 0;
let mut x16: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x15, &mut x16, x14, x2, x9);
let mut x17: u64 = 0;
let mut x18: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x17, &mut x18, x16, x10, x7);
let x19: u64 = ((x18 as u64) + x8);
let mut x20: u64 = 0;
let mut x21: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x20, &mut x21, (arg1[1]), (arg1[2]));
let mut x22: u64 = 0;
let mut x23: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x22, &mut x23, 0x0, x13, x20);
let mut x24: u64 = 0;
let mut x25: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x24, &mut x25, x23, x15, x21);
let mut x26: u64 = 0;
let mut x27: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x26, &mut x27, x25, x17, (0x0 as u64));
let mut x28: u64 = 0;
let mut x29: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x28, &mut x29, x27, x19, (0x0 as u64));
let mut x30: u64 = 0;
let mut x31: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x30, &mut x31, 0x0, x5, x5);
let mut x32: u64 = 0;
let mut x33: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x32, &mut x33, x31, x11, x11);
let mut x34: u64 = 0;
let mut x35: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x34, &mut x35, x33, x22, x22);
let mut x36: u64 = 0;
let mut x37: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x36, &mut x37, x35, x24, x24);
let mut x38: u64 = 0;
let mut x39: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x38, &mut x39, x37, x26, x26);
let mut x40: u64 = 0;
let mut x41: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x40, &mut x41, x39, x28, x28);
let x42: u64 = (((x41 as u64) + (x29 as u64)) + (x29 as u64));
let mut x43: u64 = 0;
let mut x44: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x43, &mut x44, (arg1[3]), (arg1[3]));
let mut x45: u64 = 0;
let mut x46: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x45, &mut x46, (arg1[2]), (arg1[2]));
let mut x47: u64 = 0;
let mut x48: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x47, &mut x48, (arg1[1]), (arg1[1]));
let mut x49: u64 = 0;
let mut x50: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x49, &mut x50, (arg1[0]), (arg1[0]));
let mut x51: u64 = 0;
let mut x52: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x51, &mut x52, 0x0, x30, x50);
let mut x53: u64 = 0;
let mut x54: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x53, &mut x54, x52, x32, x47);
let mut x55: u64 = 0;
let mut x56: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x55, &mut x56, x54, x34, x48);
let mut x57: u64 = 0;
let mut x58: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x57, &mut x58, x56, x36, x45);
let mut x59: u64 = 0;
let mut x60: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x59, &mut x60, x58, x38, x46);
let mut x61: u64 = 0;
let mut x62: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x61, &mut x62, x60, x40, x43);
let mut x63: u64 = 0;
let mut x64: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x63, &mut x64, x62, x42, x44);
let mut x65: u64 = 0;
let mut x66: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x65, &mut x66, 0x26, x63);
let mut x67: u64 = 0;
let mut x68: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x67, &mut x68, 0x26, x61);
let mut x69: u64 = 0;
let mut x70: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x69, &mut x70, 0x26, x59);
let mut x71: u64 = 0;
let mut x72: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x71, &mut x72, 0x26, x57);
let mut x73: u64 = 0;
let mut x74: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x73, &mut x74, 0x0, x51, x69);
let mut x75: u64 = 0;
let mut x76: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x75, &mut x76, x74, x53, x67);
let mut x77: u64 = 0;
let mut x78: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x77, &mut x78, x76, x55, x65);
let x79: u64 = ((x78 as u64) + x66);
let mut x80: u64 = 0;
let mut x81: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x80, &mut x81, 0x0, x49, x71);
let mut x82: u64 = 0;
let mut x83: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x82, &mut x83, x81, x73, x72);
let mut x84: u64 = 0;
let mut x85: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x84, &mut x85, x83, x75, x70);
let mut x86: u64 = 0;
let mut x87: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x86, &mut x87, x85, x77, x68);
let x88: u64 = ((x87 as u64) + x79);
let mut x89: u64 = 0;
let mut x90: u64 = 0;
fiat_curve25519_solinas_mulx_u64(&mut x89, &mut x90, 0x26, x88);
let mut x91: u64 = 0;
let mut x92: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x91, &mut x92, 0x0, x80, x89);
let mut x93: u64 = 0;
let mut x94: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x93, &mut x94, x92, x82, (0x0 as u64));
let mut x95: u64 = 0;
let mut x96: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x95, &mut x96, x94, x84, (0x0 as u64));
let mut x97: u64 = 0;
let mut x98: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x97, &mut x98, x96, x86, (0x0 as u64));
let mut x99: u64 = 0;
fiat_curve25519_solinas_cmovznz_u64(&mut x99, x98, (0x0 as u64), 0x26);
let mut x100: u64 = 0;
let mut x101: fiat_curve25519_solinas_u1 = 0;
fiat_curve25519_solinas_addcarryx_u64(&mut x100, &mut x101, 0x0, x99, x91);
out1[0] = x100;
out1[1] = x93;
out1[2] = x95;
out1[3] = x97;
}
+30
View File
@@ -0,0 +1,30 @@
// AUTOGENERATED FILE: DO NOT EDIT
#![cfg_attr(not(feature = "std"), no_std)]
pub mod curve25519_32;
pub mod curve25519_64;
pub mod curve25519_scalar_32;
pub mod curve25519_scalar_64;
pub mod curve25519_solinas_64;
pub mod p224_32;
pub mod p224_64;
pub mod p256_32;
pub mod p256_64;
pub mod p256_scalar_32;
pub mod p256_scalar_64;
pub mod p384_32;
pub mod p384_64;
pub mod p384_scalar_32;
pub mod p384_scalar_64;
pub mod p434_64;
pub mod p448_solinas_32;
pub mod p448_solinas_64;
pub mod p521_32;
pub mod p521_64;
pub mod poly1305_32;
pub mod poly1305_64;
pub mod secp256k1_dettman_32;
pub mod secp256k1_dettman_64;
pub mod secp256k1_montgomery_32;
pub mod secp256k1_montgomery_64;
pub mod secp256k1_montgomery_scalar_32;
pub mod secp256k1_montgomery_scalar_64;
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+944
View File
@@ -0,0 +1,944 @@
//! Autogenerated: 'src/ExtractionOCaml/unsaturated_solinas' --lang Rust --inline p448 64 8 '2^448 - 2^224 - 1' carry_mul carry_square carry add sub opp selectznz to_bytes from_bytes relax
//! curve description: p448
//! machine_wordsize = 64 (from "64")
//! requested operations: carry_mul, carry_square, carry, add, sub, opp, selectznz, to_bytes, from_bytes, relax
//! n = 8 (from "8")
//! s-c = 2^448 - [(2^224, 1), (1, 1)] (from "2^448 - 2^224 - 1")
//! tight_bounds_multiplier = 1 (from "")
//!
//! Computed values:
//! carry_chain = [3, 7, 4, 0, 5, 1, 6, 2, 7, 3, 4, 0]
//! eval z = z[0] + (z[1] << 56) + (z[2] << 112) + (z[3] << 168) + (z[4] << 224) + (z[5] << 0x118) + (z[6] << 0x150) + (z[7] << 0x188)
//! 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)
//! balance = [0x1fffffffffffffe, 0x1fffffffffffffe, 0x1fffffffffffffe, 0x1fffffffffffffe, 0x1fffffffffffffc, 0x1fffffffffffffe, 0x1fffffffffffffe, 0x1fffffffffffffe]
#![allow(unused_parens)]
#![allow(non_camel_case_types)]
/** fiat_p448_u1 represents values of 1 bits, stored in one byte. */
pub type fiat_p448_u1 = u8;
/** fiat_p448_i1 represents values of 1 bits, stored in one byte. */
pub type fiat_p448_i1 = i8;
/** fiat_p448_u2 represents values of 2 bits, stored in one byte. */
pub type fiat_p448_u2 = u8;
/** fiat_p448_i2 represents values of 2 bits, stored in one byte. */
pub type fiat_p448_i2 = i8;
/** The type fiat_p448_loose_field_element is a field element with loose bounds. */
/** Bounds: [[0x0 ~> 0x300000000000000], [0x0 ~> 0x300000000000000], [0x0 ~> 0x300000000000000], [0x0 ~> 0x300000000000000], [0x0 ~> 0x300000000000000], [0x0 ~> 0x300000000000000], [0x0 ~> 0x300000000000000], [0x0 ~> 0x300000000000000]] */
#[derive(Clone, Copy)]
pub struct fiat_p448_loose_field_element(pub [u64; 8]);
impl core::ops::Index<usize> for fiat_p448_loose_field_element {
type Output = u64;
#[inline]
fn index(&self, index: usize) -> &Self::Output {
&self.0[index]
}
}
impl core::ops::IndexMut<usize> for fiat_p448_loose_field_element {
#[inline]
fn index_mut(&mut self, index: usize) -> &mut Self::Output {
&mut self.0[index]
}
}
/** The type fiat_p448_tight_field_element is a field element with tight bounds. */
/** Bounds: [[0x0 ~> 0x100000000000000], [0x0 ~> 0x100000000000000], [0x0 ~> 0x100000000000000], [0x0 ~> 0x100000000000000], [0x0 ~> 0x100000000000000], [0x0 ~> 0x100000000000000], [0x0 ~> 0x100000000000000], [0x0 ~> 0x100000000000000]] */
#[derive(Clone, Copy)]
pub struct fiat_p448_tight_field_element(pub [u64; 8]);
impl core::ops::Index<usize> for fiat_p448_tight_field_element {
type Output = u64;
#[inline]
fn index(&self, index: usize) -> &Self::Output {
&self.0[index]
}
}
impl core::ops::IndexMut<usize> for fiat_p448_tight_field_element {
#[inline]
fn index_mut(&mut self, index: usize) -> &mut Self::Output {
&mut self.0[index]
}
}
/// The function fiat_p448_addcarryx_u56 is an addition with carry.
///
/// Postconditions:
/// out1 = (arg1 + arg2 + arg3) mod 2^56
/// out2 = ⌊(arg1 + arg2 + arg3) / 2^56⌋
///
/// Input Bounds:
/// arg1: [0x0 ~> 0x1]
/// arg2: [0x0 ~> 0xffffffffffffff]
/// arg3: [0x0 ~> 0xffffffffffffff]
/// Output Bounds:
/// out1: [0x0 ~> 0xffffffffffffff]
/// out2: [0x0 ~> 0x1]
#[inline]
pub fn fiat_p448_addcarryx_u56(out1: &mut u64, out2: &mut fiat_p448_u1, arg1: fiat_p448_u1, arg2: u64, arg3: u64) {
let x1: u64 = (((arg1 as u64) + arg2) + arg3);
let x2: u64 = (x1 & 0xffffffffffffff);
let x3: fiat_p448_u1 = ((x1 >> 56) as fiat_p448_u1);
*out1 = x2;
*out2 = x3;
}
/// The function fiat_p448_subborrowx_u56 is a subtraction with borrow.
///
/// Postconditions:
/// out1 = (-arg1 + arg2 + -arg3) mod 2^56
/// out2 = -⌊(-arg1 + arg2 + -arg3) / 2^56⌋
///
/// Input Bounds:
/// arg1: [0x0 ~> 0x1]
/// arg2: [0x0 ~> 0xffffffffffffff]
/// arg3: [0x0 ~> 0xffffffffffffff]
/// Output Bounds:
/// out1: [0x0 ~> 0xffffffffffffff]
/// out2: [0x0 ~> 0x1]
#[inline]
pub fn fiat_p448_subborrowx_u56(out1: &mut u64, out2: &mut fiat_p448_u1, arg1: fiat_p448_u1, arg2: u64, arg3: u64) {
let x1: i64 = ((((((arg2 as i128) - (arg1 as i128)) as i64) as i128) - (arg3 as i128)) as i64);
let x2: fiat_p448_i1 = ((x1 >> 56) as fiat_p448_i1);
let x3: u64 = (((x1 as i128) & (0xffffffffffffff as i128)) as u64);
*out1 = x3;
*out2 = (((0x0 as fiat_p448_i2) - (x2 as fiat_p448_i2)) as fiat_p448_u1);
}
/// The function fiat_p448_cmovznz_u64 is a single-word conditional move.
///
/// Postconditions:
/// out1 = (if arg1 = 0 then arg2 else arg3)
///
/// Input Bounds:
/// arg1: [0x0 ~> 0x1]
/// arg2: [0x0 ~> 0xffffffffffffffff]
/// arg3: [0x0 ~> 0xffffffffffffffff]
/// Output Bounds:
/// out1: [0x0 ~> 0xffffffffffffffff]
#[inline]
pub fn fiat_p448_cmovznz_u64(out1: &mut u64, arg1: fiat_p448_u1, arg2: u64, arg3: u64) {
let x1: fiat_p448_u1 = (!(!arg1));
let x2: u64 = ((((((0x0 as fiat_p448_i2) - (x1 as fiat_p448_i2)) as fiat_p448_i1) as i128) & (0xffffffffffffffff as i128)) as u64);
let x3: u64 = ((x2 & arg3) | ((!x2) & arg2));
*out1 = x3;
}
/// The function fiat_p448_carry_mul multiplies two field elements and reduces the result.
///
/// Postconditions:
/// eval out1 mod m = (eval arg1 * eval arg2) mod m
///
#[inline]
pub fn fiat_p448_carry_mul(out1: &mut fiat_p448_tight_field_element, arg1: &fiat_p448_loose_field_element, arg2: &fiat_p448_loose_field_element) {
let x1: u128 = (((arg1[7]) as u128) * ((arg2[7]) as u128));
let x2: u128 = (((arg1[7]) as u128) * ((arg2[6]) as u128));
let x3: u128 = (((arg1[7]) as u128) * ((arg2[5]) as u128));
let x4: u128 = (((arg1[6]) as u128) * ((arg2[7]) as u128));
let x5: u128 = (((arg1[6]) as u128) * ((arg2[6]) as u128));
let x6: u128 = (((arg1[5]) as u128) * ((arg2[7]) as u128));
let x7: u128 = (((arg1[7]) as u128) * ((arg2[7]) as u128));
let x8: u128 = (((arg1[7]) as u128) * ((arg2[6]) as u128));
let x9: u128 = (((arg1[7]) as u128) * ((arg2[5]) as u128));
let x10: u128 = (((arg1[6]) as u128) * ((arg2[7]) as u128));
let x11: u128 = (((arg1[6]) as u128) * ((arg2[6]) as u128));
let x12: u128 = (((arg1[5]) as u128) * ((arg2[7]) as u128));
let x13: u128 = (((arg1[7]) as u128) * ((arg2[7]) as u128));
let x14: u128 = (((arg1[7]) as u128) * ((arg2[6]) as u128));
let x15: u128 = (((arg1[7]) as u128) * ((arg2[5]) as u128));
let x16: u128 = (((arg1[7]) as u128) * ((arg2[4]) as u128));
let x17: u128 = (((arg1[7]) as u128) * ((arg2[3]) as u128));
let x18: u128 = (((arg1[7]) as u128) * ((arg2[2]) as u128));
let x19: u128 = (((arg1[7]) as u128) * ((arg2[1]) as u128));
let x20: u128 = (((arg1[6]) as u128) * ((arg2[7]) as u128));
let x21: u128 = (((arg1[6]) as u128) * ((arg2[6]) as u128));
let x22: u128 = (((arg1[6]) as u128) * ((arg2[5]) as u128));
let x23: u128 = (((arg1[6]) as u128) * ((arg2[4]) as u128));
let x24: u128 = (((arg1[6]) as u128) * ((arg2[3]) as u128));
let x25: u128 = (((arg1[6]) as u128) * ((arg2[2]) as u128));
let x26: u128 = (((arg1[5]) as u128) * ((arg2[7]) as u128));
let x27: u128 = (((arg1[5]) as u128) * ((arg2[6]) as u128));
let x28: u128 = (((arg1[5]) as u128) * ((arg2[5]) as u128));
let x29: u128 = (((arg1[5]) as u128) * ((arg2[4]) as u128));
let x30: u128 = (((arg1[5]) as u128) * ((arg2[3]) as u128));
let x31: u128 = (((arg1[4]) as u128) * ((arg2[7]) as u128));
let x32: u128 = (((arg1[4]) as u128) * ((arg2[6]) as u128));
let x33: u128 = (((arg1[4]) as u128) * ((arg2[5]) as u128));
let x34: u128 = (((arg1[4]) as u128) * ((arg2[4]) as u128));
let x35: u128 = (((arg1[3]) as u128) * ((arg2[7]) as u128));
let x36: u128 = (((arg1[3]) as u128) * ((arg2[6]) as u128));
let x37: u128 = (((arg1[3]) as u128) * ((arg2[5]) as u128));
let x38: u128 = (((arg1[2]) as u128) * ((arg2[7]) as u128));
let x39: u128 = (((arg1[2]) as u128) * ((arg2[6]) as u128));
let x40: u128 = (((arg1[1]) as u128) * ((arg2[7]) as u128));
let x41: u128 = (((arg1[7]) as u128) * ((arg2[4]) as u128));
let x42: u128 = (((arg1[7]) as u128) * ((arg2[3]) as u128));
let x43: u128 = (((arg1[7]) as u128) * ((arg2[2]) as u128));
let x44: u128 = (((arg1[7]) as u128) * ((arg2[1]) as u128));
let x45: u128 = (((arg1[6]) as u128) * ((arg2[5]) as u128));
let x46: u128 = (((arg1[6]) as u128) * ((arg2[4]) as u128));
let x47: u128 = (((arg1[6]) as u128) * ((arg2[3]) as u128));
let x48: u128 = (((arg1[6]) as u128) * ((arg2[2]) as u128));
let x49: u128 = (((arg1[5]) as u128) * ((arg2[6]) as u128));
let x50: u128 = (((arg1[5]) as u128) * ((arg2[5]) as u128));
let x51: u128 = (((arg1[5]) as u128) * ((arg2[4]) as u128));
let x52: u128 = (((arg1[5]) as u128) * ((arg2[3]) as u128));
let x53: u128 = (((arg1[4]) as u128) * ((arg2[7]) as u128));
let x54: u128 = (((arg1[4]) as u128) * ((arg2[6]) as u128));
let x55: u128 = (((arg1[4]) as u128) * ((arg2[5]) as u128));
let x56: u128 = (((arg1[4]) as u128) * ((arg2[4]) as u128));
let x57: u128 = (((arg1[3]) as u128) * ((arg2[7]) as u128));
let x58: u128 = (((arg1[3]) as u128) * ((arg2[6]) as u128));
let x59: u128 = (((arg1[3]) as u128) * ((arg2[5]) as u128));
let x60: u128 = (((arg1[2]) as u128) * ((arg2[7]) as u128));
let x61: u128 = (((arg1[2]) as u128) * ((arg2[6]) as u128));
let x62: u128 = (((arg1[1]) as u128) * ((arg2[7]) as u128));
let x63: u128 = (((arg1[7]) as u128) * ((arg2[0]) as u128));
let x64: u128 = (((arg1[6]) as u128) * ((arg2[1]) as u128));
let x65: u128 = (((arg1[6]) as u128) * ((arg2[0]) as u128));
let x66: u128 = (((arg1[5]) as u128) * ((arg2[2]) as u128));
let x67: u128 = (((arg1[5]) as u128) * ((arg2[1]) as u128));
let x68: u128 = (((arg1[5]) as u128) * ((arg2[0]) as u128));
let x69: u128 = (((arg1[4]) as u128) * ((arg2[3]) as u128));
let x70: u128 = (((arg1[4]) as u128) * ((arg2[2]) as u128));
let x71: u128 = (((arg1[4]) as u128) * ((arg2[1]) as u128));
let x72: u128 = (((arg1[4]) as u128) * ((arg2[0]) as u128));
let x73: u128 = (((arg1[3]) as u128) * ((arg2[4]) as u128));
let x74: u128 = (((arg1[3]) as u128) * ((arg2[3]) as u128));
let x75: u128 = (((arg1[3]) as u128) * ((arg2[2]) as u128));
let x76: u128 = (((arg1[3]) as u128) * ((arg2[1]) as u128));
let x77: u128 = (((arg1[3]) as u128) * ((arg2[0]) as u128));
let x78: u128 = (((arg1[2]) as u128) * ((arg2[5]) as u128));
let x79: u128 = (((arg1[2]) as u128) * ((arg2[4]) as u128));
let x80: u128 = (((arg1[2]) as u128) * ((arg2[3]) as u128));
let x81: u128 = (((arg1[2]) as u128) * ((arg2[2]) as u128));
let x82: u128 = (((arg1[2]) as u128) * ((arg2[1]) as u128));
let x83: u128 = (((arg1[2]) as u128) * ((arg2[0]) as u128));
let x84: u128 = (((arg1[1]) as u128) * ((arg2[6]) as u128));
let x85: u128 = (((arg1[1]) as u128) * ((arg2[5]) as u128));
let x86: u128 = (((arg1[1]) as u128) * ((arg2[4]) as u128));
let x87: u128 = (((arg1[1]) as u128) * ((arg2[3]) as u128));
let x88: u128 = (((arg1[1]) as u128) * ((arg2[2]) as u128));
let x89: u128 = (((arg1[1]) as u128) * ((arg2[1]) as u128));
let x90: u128 = (((arg1[1]) as u128) * ((arg2[0]) as u128));
let x91: u128 = (((arg1[0]) as u128) * ((arg2[7]) as u128));
let x92: u128 = (((arg1[0]) as u128) * ((arg2[6]) as u128));
let x93: u128 = (((arg1[0]) as u128) * ((arg2[5]) as u128));
let x94: u128 = (((arg1[0]) as u128) * ((arg2[4]) as u128));
let x95: u128 = (((arg1[0]) as u128) * ((arg2[3]) as u128));
let x96: u128 = (((arg1[0]) as u128) * ((arg2[2]) as u128));
let x97: u128 = (((arg1[0]) as u128) * ((arg2[1]) as u128));
let x98: u128 = (((arg1[0]) as u128) * ((arg2[0]) as u128));
let x99: u128 = (x95 + (x88 + (x82 + (x77 + (x31 + (x27 + (x22 + x16)))))));
let x100: u64 = ((x99 >> 56) as u64);
let x101: u64 = ((x99 & (0xffffffffffffff as u128)) as u64);
let x102: u128 = (x91 + (x84 + (x78 + (x73 + (x69 + (x66 + (x64 + (x63 + (x53 + (x49 + (x45 + x41)))))))))));
let x103: u128 = (x92 + (x85 + (x79 + (x74 + (x70 + (x67 + (x65 + (x57 + (x54 + (x50 + (x46 + (x42 + (x13 + x7)))))))))))));
let x104: u128 = (x93 + (x86 + (x80 + (x75 + (x71 + (x68 + (x60 + (x58 + (x55 + (x51 + (x47 + (x43 + (x20 + (x14 + (x10 + x8)))))))))))))));
let x105: u128 = (x94 + (x87 + (x81 + (x76 + (x72 + (x62 + (x61 + (x59 + (x56 + (x52 + (x48 + (x44 + (x26 + (x21 + (x15 + (x12 + (x11 + x9)))))))))))))))));
let x106: u128 = (x96 + (x89 + (x83 + (x35 + (x32 + (x28 + (x23 + (x17 + x1))))))));
let x107: u128 = (x97 + (x90 + (x38 + (x36 + (x33 + (x29 + (x24 + (x18 + (x4 + x2)))))))));
let x108: u128 = (x98 + (x40 + (x39 + (x37 + (x34 + (x30 + (x25 + (x19 + (x6 + (x5 + x3))))))))));
let x109: u128 = ((x100 as u128) + x105);
let x110: u64 = ((x102 >> 56) as u64);
let x111: u64 = ((x102 & (0xffffffffffffff as u128)) as u64);
let x112: u128 = (x109 + (x110 as u128));
let x113: u64 = ((x112 >> 56) as u64);
let x114: u64 = ((x112 & (0xffffffffffffff as u128)) as u64);
let x115: u128 = (x108 + (x110 as u128));
let x116: u128 = ((x113 as u128) + x104);
let x117: u64 = ((x115 >> 56) as u64);
let x118: u64 = ((x115 & (0xffffffffffffff as u128)) as u64);
let x119: u128 = ((x117 as u128) + x107);
let x120: u64 = ((x116 >> 56) as u64);
let x121: u64 = ((x116 & (0xffffffffffffff as u128)) as u64);
let x122: u128 = ((x120 as u128) + x103);
let x123: u64 = ((x119 >> 56) as u64);
let x124: u64 = ((x119 & (0xffffffffffffff as u128)) as u64);
let x125: u128 = ((x123 as u128) + x106);
let x126: u64 = ((x122 >> 56) as u64);
let x127: u64 = ((x122 & (0xffffffffffffff as u128)) as u64);
let x128: u64 = (x126 + x111);
let x129: u64 = ((x125 >> 56) as u64);
let x130: u64 = ((x125 & (0xffffffffffffff as u128)) as u64);
let x131: u64 = (x129 + x101);
let x132: u64 = (x128 >> 56);
let x133: u64 = (x128 & 0xffffffffffffff);
let x134: u64 = (x131 >> 56);
let x135: u64 = (x131 & 0xffffffffffffff);
let x136: u64 = (x114 + x132);
let x137: u64 = (x118 + x132);
let x138: u64 = (x134 + x136);
let x139: fiat_p448_u1 = ((x138 >> 56) as fiat_p448_u1);
let x140: u64 = (x138 & 0xffffffffffffff);
let x141: u64 = ((x139 as u64) + x121);
let x142: fiat_p448_u1 = ((x137 >> 56) as fiat_p448_u1);
let x143: u64 = (x137 & 0xffffffffffffff);
let x144: u64 = ((x142 as u64) + x124);
out1[0] = x143;
out1[1] = x144;
out1[2] = x130;
out1[3] = x135;
out1[4] = x140;
out1[5] = x141;
out1[6] = x127;
out1[7] = x133;
}
/// The function fiat_p448_carry_square squares a field element and reduces the result.
///
/// Postconditions:
/// eval out1 mod m = (eval arg1 * eval arg1) mod m
///
#[inline]
pub fn fiat_p448_carry_square(out1: &mut fiat_p448_tight_field_element, arg1: &fiat_p448_loose_field_element) {
let x1: u64 = (arg1[7]);
let x2: u64 = (arg1[7]);
let x3: u64 = (x1 * 0x2);
let x4: u64 = (x2 * 0x2);
let x5: u64 = ((arg1[7]) * 0x2);
let x6: u64 = (arg1[6]);
let x7: u64 = (arg1[6]);
let x8: u64 = (x6 * 0x2);
let x9: u64 = (x7 * 0x2);
let x10: u64 = ((arg1[6]) * 0x2);
let x11: u64 = (arg1[5]);
let x12: u64 = (arg1[5]);
let x13: u64 = (x11 * 0x2);
let x14: u64 = (x12 * 0x2);
let x15: u64 = ((arg1[5]) * 0x2);
let x16: u64 = (arg1[4]);
let x17: u64 = (arg1[4]);
let x18: u64 = ((arg1[4]) * 0x2);
let x19: u64 = ((arg1[3]) * 0x2);
let x20: u64 = ((arg1[2]) * 0x2);
let x21: u64 = ((arg1[1]) * 0x2);
let x22: u128 = (((arg1[7]) as u128) * (x1 as u128));
let x23: u128 = (((arg1[6]) as u128) * (x3 as u128));
let x24: u128 = (((arg1[6]) as u128) * (x6 as u128));
let x25: u128 = (((arg1[5]) as u128) * (x3 as u128));
let x26: u128 = (((arg1[7]) as u128) * (x1 as u128));
let x27: u128 = (((arg1[6]) as u128) * (x3 as u128));
let x28: u128 = (((arg1[6]) as u128) * (x6 as u128));
let x29: u128 = (((arg1[5]) as u128) * (x3 as u128));
let x30: u128 = (((arg1[7]) as u128) * (x2 as u128));
let x31: u128 = (((arg1[6]) as u128) * (x4 as u128));
let x32: u128 = (((arg1[6]) as u128) * (x7 as u128));
let x33: u128 = (((arg1[5]) as u128) * (x4 as u128));
let x34: u128 = (((arg1[5]) as u128) * (x9 as u128));
let x35: u128 = (((arg1[5]) as u128) * (x8 as u128));
let x36: u128 = (((arg1[5]) as u128) * (x12 as u128));
let x37: u128 = (((arg1[5]) as u128) * (x11 as u128));
let x38: u128 = (((arg1[4]) as u128) * (x4 as u128));
let x39: u128 = (((arg1[4]) as u128) * (x3 as u128));
let x40: u128 = (((arg1[4]) as u128) * (x9 as u128));
let x41: u128 = (((arg1[4]) as u128) * (x8 as u128));
let x42: u128 = (((arg1[4]) as u128) * (x14 as u128));
let x43: u128 = (((arg1[4]) as u128) * (x13 as u128));
let x44: u128 = (((arg1[4]) as u128) * (x17 as u128));
let x45: u128 = (((arg1[4]) as u128) * (x16 as u128));
let x46: u128 = (((arg1[3]) as u128) * (x4 as u128));
let x47: u128 = (((arg1[3]) as u128) * (x3 as u128));
let x48: u128 = (((arg1[3]) as u128) * (x9 as u128));
let x49: u128 = (((arg1[3]) as u128) * (x8 as u128));
let x50: u128 = (((arg1[3]) as u128) * (x14 as u128));
let x51: u128 = (((arg1[3]) as u128) * (x13 as u128));
let x52: u128 = (((arg1[3]) as u128) * (x18 as u128));
let x53: u128 = (((arg1[3]) as u128) * ((arg1[3]) as u128));
let x54: u128 = (((arg1[2]) as u128) * (x4 as u128));
let x55: u128 = (((arg1[2]) as u128) * (x3 as u128));
let x56: u128 = (((arg1[2]) as u128) * (x9 as u128));
let x57: u128 = (((arg1[2]) as u128) * (x8 as u128));
let x58: u128 = (((arg1[2]) as u128) * (x15 as u128));
let x59: u128 = (((arg1[2]) as u128) * (x18 as u128));
let x60: u128 = (((arg1[2]) as u128) * (x19 as u128));
let x61: u128 = (((arg1[2]) as u128) * ((arg1[2]) as u128));
let x62: u128 = (((arg1[1]) as u128) * (x4 as u128));
let x63: u128 = (((arg1[1]) as u128) * (x3 as u128));
let x64: u128 = (((arg1[1]) as u128) * (x10 as u128));
let x65: u128 = (((arg1[1]) as u128) * (x15 as u128));
let x66: u128 = (((arg1[1]) as u128) * (x18 as u128));
let x67: u128 = (((arg1[1]) as u128) * (x19 as u128));
let x68: u128 = (((arg1[1]) as u128) * (x20 as u128));
let x69: u128 = (((arg1[1]) as u128) * ((arg1[1]) as u128));
let x70: u128 = (((arg1[0]) as u128) * (x5 as u128));
let x71: u128 = (((arg1[0]) as u128) * (x10 as u128));
let x72: u128 = (((arg1[0]) as u128) * (x15 as u128));
let x73: u128 = (((arg1[0]) as u128) * (x18 as u128));
let x74: u128 = (((arg1[0]) as u128) * (x19 as u128));
let x75: u128 = (((arg1[0]) as u128) * (x20 as u128));
let x76: u128 = (((arg1[0]) as u128) * (x21 as u128));
let x77: u128 = (((arg1[0]) as u128) * ((arg1[0]) as u128));
let x78: u128 = (x74 + (x68 + (x38 + x34)));
let x79: u64 = ((x78 >> 56) as u64);
let x80: u64 = ((x78 & (0xffffffffffffff as u128)) as u64);
let x81: u128 = (x70 + (x64 + (x58 + (x52 + (x39 + x35)))));
let x82: u128 = (x71 + (x65 + (x59 + (x53 + (x47 + (x41 + (x37 + (x30 + x26))))))));
let x83: u128 = (x72 + (x66 + (x60 + (x55 + (x49 + (x43 + (x31 + x27)))))));
let x84: u128 = (x73 + (x67 + (x63 + (x61 + (x57 + (x51 + (x45 + (x33 + (x32 + (x29 + x28))))))))));
let x85: u128 = (x75 + (x69 + (x46 + (x40 + (x36 + x22)))));
let x86: u128 = (x76 + (x54 + (x48 + (x42 + x23))));
let x87: u128 = (x77 + (x62 + (x56 + (x50 + (x44 + (x25 + x24))))));
let x88: u128 = ((x79 as u128) + x84);
let x89: u64 = ((x81 >> 56) as u64);
let x90: u64 = ((x81 & (0xffffffffffffff as u128)) as u64);
let x91: u128 = (x88 + (x89 as u128));
let x92: u64 = ((x91 >> 56) as u64);
let x93: u64 = ((x91 & (0xffffffffffffff as u128)) as u64);
let x94: u128 = (x87 + (x89 as u128));
let x95: u128 = ((x92 as u128) + x83);
let x96: u64 = ((x94 >> 56) as u64);
let x97: u64 = ((x94 & (0xffffffffffffff as u128)) as u64);
let x98: u128 = ((x96 as u128) + x86);
let x99: u64 = ((x95 >> 56) as u64);
let x100: u64 = ((x95 & (0xffffffffffffff as u128)) as u64);
let x101: u128 = ((x99 as u128) + x82);
let x102: u64 = ((x98 >> 56) as u64);
let x103: u64 = ((x98 & (0xffffffffffffff as u128)) as u64);
let x104: u128 = ((x102 as u128) + x85);
let x105: u64 = ((x101 >> 56) as u64);
let x106: u64 = ((x101 & (0xffffffffffffff as u128)) as u64);
let x107: u64 = (x105 + x90);
let x108: u64 = ((x104 >> 56) as u64);
let x109: u64 = ((x104 & (0xffffffffffffff as u128)) as u64);
let x110: u64 = (x108 + x80);
let x111: u64 = (x107 >> 56);
let x112: u64 = (x107 & 0xffffffffffffff);
let x113: u64 = (x110 >> 56);
let x114: u64 = (x110 & 0xffffffffffffff);
let x115: u64 = (x93 + x111);
let x116: u64 = (x97 + x111);
let x117: u64 = (x113 + x115);
let x118: fiat_p448_u1 = ((x117 >> 56) as fiat_p448_u1);
let x119: u64 = (x117 & 0xffffffffffffff);
let x120: u64 = ((x118 as u64) + x100);
let x121: fiat_p448_u1 = ((x116 >> 56) as fiat_p448_u1);
let x122: u64 = (x116 & 0xffffffffffffff);
let x123: u64 = ((x121 as u64) + x103);
out1[0] = x122;
out1[1] = x123;
out1[2] = x109;
out1[3] = x114;
out1[4] = x119;
out1[5] = x120;
out1[6] = x106;
out1[7] = x112;
}
/// The function fiat_p448_carry reduces a field element.
///
/// Postconditions:
/// eval out1 mod m = eval arg1 mod m
///
#[inline]
pub fn fiat_p448_carry(out1: &mut fiat_p448_tight_field_element, arg1: &fiat_p448_loose_field_element) {
let x1: u64 = (arg1[3]);
let x2: u64 = (arg1[7]);
let x3: u64 = (x2 >> 56);
let x4: u64 = (((x1 >> 56) + (arg1[4])) + x3);
let x5: u64 = ((arg1[0]) + x3);
let x6: u64 = ((x4 >> 56) + (arg1[5]));
let x7: u64 = ((x5 >> 56) + (arg1[1]));
let x8: u64 = ((x6 >> 56) + (arg1[6]));
let x9: u64 = ((x7 >> 56) + (arg1[2]));
let x10: u64 = ((x8 >> 56) + (x2 & 0xffffffffffffff));
let x11: u64 = ((x9 >> 56) + (x1 & 0xffffffffffffff));
let x12: fiat_p448_u1 = ((x10 >> 56) as fiat_p448_u1);
let x13: u64 = ((x5 & 0xffffffffffffff) + (x12 as u64));
let x14: u64 = ((((x11 >> 56) as fiat_p448_u1) as u64) + ((x4 & 0xffffffffffffff) + (x12 as u64)));
let x15: u64 = (x13 & 0xffffffffffffff);
let x16: u64 = ((((x13 >> 56) as fiat_p448_u1) as u64) + (x7 & 0xffffffffffffff));
let x17: u64 = (x9 & 0xffffffffffffff);
let x18: u64 = (x11 & 0xffffffffffffff);
let x19: u64 = (x14 & 0xffffffffffffff);
let x20: u64 = ((((x14 >> 56) as fiat_p448_u1) as u64) + (x6 & 0xffffffffffffff));
let x21: u64 = (x8 & 0xffffffffffffff);
let x22: u64 = (x10 & 0xffffffffffffff);
out1[0] = x15;
out1[1] = x16;
out1[2] = x17;
out1[3] = x18;
out1[4] = x19;
out1[5] = x20;
out1[6] = x21;
out1[7] = x22;
}
/// The function fiat_p448_add adds two field elements.
///
/// Postconditions:
/// eval out1 mod m = (eval arg1 + eval arg2) mod m
///
#[inline]
pub fn fiat_p448_add(out1: &mut fiat_p448_loose_field_element, arg1: &fiat_p448_tight_field_element, arg2: &fiat_p448_tight_field_element) {
let x1: u64 = ((arg1[0]) + (arg2[0]));
let x2: u64 = ((arg1[1]) + (arg2[1]));
let x3: u64 = ((arg1[2]) + (arg2[2]));
let x4: u64 = ((arg1[3]) + (arg2[3]));
let x5: u64 = ((arg1[4]) + (arg2[4]));
let x6: u64 = ((arg1[5]) + (arg2[5]));
let x7: u64 = ((arg1[6]) + (arg2[6]));
let x8: u64 = ((arg1[7]) + (arg2[7]));
out1[0] = x1;
out1[1] = x2;
out1[2] = x3;
out1[3] = x4;
out1[4] = x5;
out1[5] = x6;
out1[6] = x7;
out1[7] = x8;
}
/// The function fiat_p448_sub subtracts two field elements.
///
/// Postconditions:
/// eval out1 mod m = (eval arg1 - eval arg2) mod m
///
#[inline]
pub fn fiat_p448_sub(out1: &mut fiat_p448_loose_field_element, arg1: &fiat_p448_tight_field_element, arg2: &fiat_p448_tight_field_element) {
let x1: u64 = ((0x1fffffffffffffe + (arg1[0])) - (arg2[0]));
let x2: u64 = ((0x1fffffffffffffe + (arg1[1])) - (arg2[1]));
let x3: u64 = ((0x1fffffffffffffe + (arg1[2])) - (arg2[2]));
let x4: u64 = ((0x1fffffffffffffe + (arg1[3])) - (arg2[3]));
let x5: u64 = ((0x1fffffffffffffc + (arg1[4])) - (arg2[4]));
let x6: u64 = ((0x1fffffffffffffe + (arg1[5])) - (arg2[5]));
let x7: u64 = ((0x1fffffffffffffe + (arg1[6])) - (arg2[6]));
let x8: u64 = ((0x1fffffffffffffe + (arg1[7])) - (arg2[7]));
out1[0] = x1;
out1[1] = x2;
out1[2] = x3;
out1[3] = x4;
out1[4] = x5;
out1[5] = x6;
out1[6] = x7;
out1[7] = x8;
}
/// The function fiat_p448_opp negates a field element.
///
/// Postconditions:
/// eval out1 mod m = -eval arg1 mod m
///
#[inline]
pub fn fiat_p448_opp(out1: &mut fiat_p448_loose_field_element, arg1: &fiat_p448_tight_field_element) {
let x1: u64 = (0x1fffffffffffffe - (arg1[0]));
let x2: u64 = (0x1fffffffffffffe - (arg1[1]));
let x3: u64 = (0x1fffffffffffffe - (arg1[2]));
let x4: u64 = (0x1fffffffffffffe - (arg1[3]));
let x5: u64 = (0x1fffffffffffffc - (arg1[4]));
let x6: u64 = (0x1fffffffffffffe - (arg1[5]));
let x7: u64 = (0x1fffffffffffffe - (arg1[6]));
let x8: u64 = (0x1fffffffffffffe - (arg1[7]));
out1[0] = x1;
out1[1] = x2;
out1[2] = x3;
out1[3] = x4;
out1[4] = x5;
out1[5] = x6;
out1[6] = x7;
out1[7] = x8;
}
/// The function fiat_p448_selectznz is a multi-limb conditional select.
///
/// Postconditions:
/// out1 = (if arg1 = 0 then arg2 else arg3)
///
/// Input Bounds:
/// arg1: [0x0 ~> 0x1]
/// arg2: [[0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff]]
/// arg3: [[0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff]]
/// Output Bounds:
/// out1: [[0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff]]
#[inline]
pub fn fiat_p448_selectznz(out1: &mut [u64; 8], arg1: fiat_p448_u1, arg2: &[u64; 8], arg3: &[u64; 8]) {
let mut x1: u64 = 0;
fiat_p448_cmovznz_u64(&mut x1, arg1, (arg2[0]), (arg3[0]));
let mut x2: u64 = 0;
fiat_p448_cmovznz_u64(&mut x2, arg1, (arg2[1]), (arg3[1]));
let mut x3: u64 = 0;
fiat_p448_cmovznz_u64(&mut x3, arg1, (arg2[2]), (arg3[2]));
let mut x4: u64 = 0;
fiat_p448_cmovznz_u64(&mut x4, arg1, (arg2[3]), (arg3[3]));
let mut x5: u64 = 0;
fiat_p448_cmovznz_u64(&mut x5, arg1, (arg2[4]), (arg3[4]));
let mut x6: u64 = 0;
fiat_p448_cmovznz_u64(&mut x6, arg1, (arg2[5]), (arg3[5]));
let mut x7: u64 = 0;
fiat_p448_cmovznz_u64(&mut x7, arg1, (arg2[6]), (arg3[6]));
let mut x8: u64 = 0;
fiat_p448_cmovznz_u64(&mut x8, arg1, (arg2[7]), (arg3[7]));
out1[0] = x1;
out1[1] = x2;
out1[2] = x3;
out1[3] = x4;
out1[4] = x5;
out1[5] = x6;
out1[6] = x7;
out1[7] = x8;
}
/// The function fiat_p448_to_bytes serializes a field element to bytes in little-endian order.
///
/// Postconditions:
/// out1 = map (λ x, ⌊((eval arg1 mod m) mod 2^(8 * (x + 1))) / 2^(8 * x)⌋) [0..55]
///
/// Output Bounds:
/// 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]]
#[inline]
pub fn fiat_p448_to_bytes(out1: &mut [u8; 56], arg1: &fiat_p448_tight_field_element) {
let mut x1: u64 = 0;
let mut x2: fiat_p448_u1 = 0;
fiat_p448_subborrowx_u56(&mut x1, &mut x2, 0x0, (arg1[0]), 0xffffffffffffff);
let mut x3: u64 = 0;
let mut x4: fiat_p448_u1 = 0;
fiat_p448_subborrowx_u56(&mut x3, &mut x4, x2, (arg1[1]), 0xffffffffffffff);
let mut x5: u64 = 0;
let mut x6: fiat_p448_u1 = 0;
fiat_p448_subborrowx_u56(&mut x5, &mut x6, x4, (arg1[2]), 0xffffffffffffff);
let mut x7: u64 = 0;
let mut x8: fiat_p448_u1 = 0;
fiat_p448_subborrowx_u56(&mut x7, &mut x8, x6, (arg1[3]), 0xffffffffffffff);
let mut x9: u64 = 0;
let mut x10: fiat_p448_u1 = 0;
fiat_p448_subborrowx_u56(&mut x9, &mut x10, x8, (arg1[4]), 0xfffffffffffffe);
let mut x11: u64 = 0;
let mut x12: fiat_p448_u1 = 0;
fiat_p448_subborrowx_u56(&mut x11, &mut x12, x10, (arg1[5]), 0xffffffffffffff);
let mut x13: u64 = 0;
let mut x14: fiat_p448_u1 = 0;
fiat_p448_subborrowx_u56(&mut x13, &mut x14, x12, (arg1[6]), 0xffffffffffffff);
let mut x15: u64 = 0;
let mut x16: fiat_p448_u1 = 0;
fiat_p448_subborrowx_u56(&mut x15, &mut x16, x14, (arg1[7]), 0xffffffffffffff);
let mut x17: u64 = 0;
fiat_p448_cmovznz_u64(&mut x17, x16, (0x0 as u64), 0xffffffffffffffff);
let mut x18: u64 = 0;
let mut x19: fiat_p448_u1 = 0;
fiat_p448_addcarryx_u56(&mut x18, &mut x19, 0x0, x1, (x17 & 0xffffffffffffff));
let mut x20: u64 = 0;
let mut x21: fiat_p448_u1 = 0;
fiat_p448_addcarryx_u56(&mut x20, &mut x21, x19, x3, (x17 & 0xffffffffffffff));
let mut x22: u64 = 0;
let mut x23: fiat_p448_u1 = 0;
fiat_p448_addcarryx_u56(&mut x22, &mut x23, x21, x5, (x17 & 0xffffffffffffff));
let mut x24: u64 = 0;
let mut x25: fiat_p448_u1 = 0;
fiat_p448_addcarryx_u56(&mut x24, &mut x25, x23, x7, (x17 & 0xffffffffffffff));
let mut x26: u64 = 0;
let mut x27: fiat_p448_u1 = 0;
fiat_p448_addcarryx_u56(&mut x26, &mut x27, x25, x9, (x17 & 0xfffffffffffffe));
let mut x28: u64 = 0;
let mut x29: fiat_p448_u1 = 0;
fiat_p448_addcarryx_u56(&mut x28, &mut x29, x27, x11, (x17 & 0xffffffffffffff));
let mut x30: u64 = 0;
let mut x31: fiat_p448_u1 = 0;
fiat_p448_addcarryx_u56(&mut x30, &mut x31, x29, x13, (x17 & 0xffffffffffffff));
let mut x32: u64 = 0;
let mut x33: fiat_p448_u1 = 0;
fiat_p448_addcarryx_u56(&mut x32, &mut x33, x31, x15, (x17 & 0xffffffffffffff));
let x34: u8 = ((x18 & (0xff as u64)) as u8);
let x35: u64 = (x18 >> 8);
let x36: u8 = ((x35 & (0xff as u64)) as u8);
let x37: u64 = (x35 >> 8);
let x38: u8 = ((x37 & (0xff as u64)) as u8);
let x39: u64 = (x37 >> 8);
let x40: u8 = ((x39 & (0xff as u64)) as u8);
let x41: u64 = (x39 >> 8);
let x42: u8 = ((x41 & (0xff as u64)) as u8);
let x43: u64 = (x41 >> 8);
let x44: u8 = ((x43 & (0xff as u64)) as u8);
let x45: u8 = ((x43 >> 8) as u8);
let x46: u8 = ((x20 & (0xff as u64)) as u8);
let x47: u64 = (x20 >> 8);
let x48: u8 = ((x47 & (0xff as u64)) as u8);
let x49: u64 = (x47 >> 8);
let x50: u8 = ((x49 & (0xff as u64)) as u8);
let x51: u64 = (x49 >> 8);
let x52: u8 = ((x51 & (0xff as u64)) as u8);
let x53: u64 = (x51 >> 8);
let x54: u8 = ((x53 & (0xff as u64)) as u8);
let x55: u64 = (x53 >> 8);
let x56: u8 = ((x55 & (0xff as u64)) as u8);
let x57: u8 = ((x55 >> 8) as u8);
let x58: u8 = ((x22 & (0xff as u64)) as u8);
let x59: u64 = (x22 >> 8);
let x60: u8 = ((x59 & (0xff as u64)) as u8);
let x61: u64 = (x59 >> 8);
let x62: u8 = ((x61 & (0xff as u64)) as u8);
let x63: u64 = (x61 >> 8);
let x64: u8 = ((x63 & (0xff as u64)) as u8);
let x65: u64 = (x63 >> 8);
let x66: u8 = ((x65 & (0xff as u64)) as u8);
let x67: u64 = (x65 >> 8);
let x68: u8 = ((x67 & (0xff as u64)) as u8);
let x69: u8 = ((x67 >> 8) as u8);
let x70: u8 = ((x24 & (0xff as u64)) as u8);
let x71: u64 = (x24 >> 8);
let x72: u8 = ((x71 & (0xff as u64)) as u8);
let x73: u64 = (x71 >> 8);
let x74: u8 = ((x73 & (0xff as u64)) as u8);
let x75: u64 = (x73 >> 8);
let x76: u8 = ((x75 & (0xff as u64)) as u8);
let x77: u64 = (x75 >> 8);
let x78: u8 = ((x77 & (0xff as u64)) as u8);
let x79: u64 = (x77 >> 8);
let x80: u8 = ((x79 & (0xff as u64)) as u8);
let x81: u8 = ((x79 >> 8) as u8);
let x82: u8 = ((x26 & (0xff as u64)) as u8);
let x83: u64 = (x26 >> 8);
let x84: u8 = ((x83 & (0xff as u64)) as u8);
let x85: u64 = (x83 >> 8);
let x86: u8 = ((x85 & (0xff as u64)) as u8);
let x87: u64 = (x85 >> 8);
let x88: u8 = ((x87 & (0xff as u64)) as u8);
let x89: u64 = (x87 >> 8);
let x90: u8 = ((x89 & (0xff as u64)) as u8);
let x91: u64 = (x89 >> 8);
let x92: u8 = ((x91 & (0xff as u64)) as u8);
let x93: u8 = ((x91 >> 8) as u8);
let x94: u8 = ((x28 & (0xff as u64)) as u8);
let x95: u64 = (x28 >> 8);
let x96: u8 = ((x95 & (0xff as u64)) as u8);
let x97: u64 = (x95 >> 8);
let x98: u8 = ((x97 & (0xff as u64)) as u8);
let x99: u64 = (x97 >> 8);
let x100: u8 = ((x99 & (0xff as u64)) as u8);
let x101: u64 = (x99 >> 8);
let x102: u8 = ((x101 & (0xff as u64)) as u8);
let x103: u64 = (x101 >> 8);
let x104: u8 = ((x103 & (0xff as u64)) as u8);
let x105: u8 = ((x103 >> 8) as u8);
let x106: u8 = ((x30 & (0xff as u64)) as u8);
let x107: u64 = (x30 >> 8);
let x108: u8 = ((x107 & (0xff as u64)) as u8);
let x109: u64 = (x107 >> 8);
let x110: u8 = ((x109 & (0xff as u64)) as u8);
let x111: u64 = (x109 >> 8);
let x112: u8 = ((x111 & (0xff as u64)) as u8);
let x113: u64 = (x111 >> 8);
let x114: u8 = ((x113 & (0xff as u64)) as u8);
let x115: u64 = (x113 >> 8);
let x116: u8 = ((x115 & (0xff as u64)) as u8);
let x117: u8 = ((x115 >> 8) as u8);
let x118: u8 = ((x32 & (0xff as u64)) as u8);
let x119: u64 = (x32 >> 8);
let x120: u8 = ((x119 & (0xff as u64)) as u8);
let x121: u64 = (x119 >> 8);
let x122: u8 = ((x121 & (0xff as u64)) as u8);
let x123: u64 = (x121 >> 8);
let x124: u8 = ((x123 & (0xff as u64)) as u8);
let x125: u64 = (x123 >> 8);
let x126: u8 = ((x125 & (0xff as u64)) as u8);
let x127: u64 = (x125 >> 8);
let x128: u8 = ((x127 & (0xff as u64)) as u8);
let x129: u8 = ((x127 >> 8) as u8);
out1[0] = x34;
out1[1] = x36;
out1[2] = x38;
out1[3] = x40;
out1[4] = x42;
out1[5] = x44;
out1[6] = x45;
out1[7] = x46;
out1[8] = x48;
out1[9] = x50;
out1[10] = x52;
out1[11] = x54;
out1[12] = x56;
out1[13] = x57;
out1[14] = x58;
out1[15] = x60;
out1[16] = x62;
out1[17] = x64;
out1[18] = x66;
out1[19] = x68;
out1[20] = x69;
out1[21] = x70;
out1[22] = x72;
out1[23] = x74;
out1[24] = x76;
out1[25] = x78;
out1[26] = x80;
out1[27] = x81;
out1[28] = x82;
out1[29] = x84;
out1[30] = x86;
out1[31] = x88;
out1[32] = x90;
out1[33] = x92;
out1[34] = x93;
out1[35] = x94;
out1[36] = x96;
out1[37] = x98;
out1[38] = x100;
out1[39] = x102;
out1[40] = x104;
out1[41] = x105;
out1[42] = x106;
out1[43] = x108;
out1[44] = x110;
out1[45] = x112;
out1[46] = x114;
out1[47] = x116;
out1[48] = x117;
out1[49] = x118;
out1[50] = x120;
out1[51] = x122;
out1[52] = x124;
out1[53] = x126;
out1[54] = x128;
out1[55] = x129;
}
/// The function fiat_p448_from_bytes deserializes a field element from bytes in little-endian order.
///
/// Postconditions:
/// eval out1 mod m = bytes_eval arg1 mod m
///
/// Input Bounds:
/// 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]]
#[inline]
pub fn fiat_p448_from_bytes(out1: &mut fiat_p448_tight_field_element, arg1: &[u8; 56]) {
let x1: u64 = (((arg1[55]) as u64) << 48);
let x2: u64 = (((arg1[54]) as u64) << 40);
let x3: u64 = (((arg1[53]) as u64) << 32);
let x4: u64 = (((arg1[52]) as u64) << 24);
let x5: u64 = (((arg1[51]) as u64) << 16);
let x6: u64 = (((arg1[50]) as u64) << 8);
let x7: u8 = (arg1[49]);
let x8: u64 = (((arg1[48]) as u64) << 48);
let x9: u64 = (((arg1[47]) as u64) << 40);
let x10: u64 = (((arg1[46]) as u64) << 32);
let x11: u64 = (((arg1[45]) as u64) << 24);
let x12: u64 = (((arg1[44]) as u64) << 16);
let x13: u64 = (((arg1[43]) as u64) << 8);
let x14: u8 = (arg1[42]);
let x15: u64 = (((arg1[41]) as u64) << 48);
let x16: u64 = (((arg1[40]) as u64) << 40);
let x17: u64 = (((arg1[39]) as u64) << 32);
let x18: u64 = (((arg1[38]) as u64) << 24);
let x19: u64 = (((arg1[37]) as u64) << 16);
let x20: u64 = (((arg1[36]) as u64) << 8);
let x21: u8 = (arg1[35]);
let x22: u64 = (((arg1[34]) as u64) << 48);
let x23: u64 = (((arg1[33]) as u64) << 40);
let x24: u64 = (((arg1[32]) as u64) << 32);
let x25: u64 = (((arg1[31]) as u64) << 24);
let x26: u64 = (((arg1[30]) as u64) << 16);
let x27: u64 = (((arg1[29]) as u64) << 8);
let x28: u8 = (arg1[28]);
let x29: u64 = (((arg1[27]) as u64) << 48);
let x30: u64 = (((arg1[26]) as u64) << 40);
let x31: u64 = (((arg1[25]) as u64) << 32);
let x32: u64 = (((arg1[24]) as u64) << 24);
let x33: u64 = (((arg1[23]) as u64) << 16);
let x34: u64 = (((arg1[22]) as u64) << 8);
let x35: u8 = (arg1[21]);
let x36: u64 = (((arg1[20]) as u64) << 48);
let x37: u64 = (((arg1[19]) as u64) << 40);
let x38: u64 = (((arg1[18]) as u64) << 32);
let x39: u64 = (((arg1[17]) as u64) << 24);
let x40: u64 = (((arg1[16]) as u64) << 16);
let x41: u64 = (((arg1[15]) as u64) << 8);
let x42: u8 = (arg1[14]);
let x43: u64 = (((arg1[13]) as u64) << 48);
let x44: u64 = (((arg1[12]) as u64) << 40);
let x45: u64 = (((arg1[11]) as u64) << 32);
let x46: u64 = (((arg1[10]) as u64) << 24);
let x47: u64 = (((arg1[9]) as u64) << 16);
let x48: u64 = (((arg1[8]) as u64) << 8);
let x49: u8 = (arg1[7]);
let x50: u64 = (((arg1[6]) as u64) << 48);
let x51: u64 = (((arg1[5]) as u64) << 40);
let x52: u64 = (((arg1[4]) as u64) << 32);
let x53: u64 = (((arg1[3]) as u64) << 24);
let x54: u64 = (((arg1[2]) as u64) << 16);
let x55: u64 = (((arg1[1]) as u64) << 8);
let x56: u8 = (arg1[0]);
let x57: u64 = (x55 + (x56 as u64));
let x58: u64 = (x54 + x57);
let x59: u64 = (x53 + x58);
let x60: u64 = (x52 + x59);
let x61: u64 = (x51 + x60);
let x62: u64 = (x50 + x61);
let x63: u64 = (x48 + (x49 as u64));
let x64: u64 = (x47 + x63);
let x65: u64 = (x46 + x64);
let x66: u64 = (x45 + x65);
let x67: u64 = (x44 + x66);
let x68: u64 = (x43 + x67);
let x69: u64 = (x41 + (x42 as u64));
let x70: u64 = (x40 + x69);
let x71: u64 = (x39 + x70);
let x72: u64 = (x38 + x71);
let x73: u64 = (x37 + x72);
let x74: u64 = (x36 + x73);
let x75: u64 = (x34 + (x35 as u64));
let x76: u64 = (x33 + x75);
let x77: u64 = (x32 + x76);
let x78: u64 = (x31 + x77);
let x79: u64 = (x30 + x78);
let x80: u64 = (x29 + x79);
let x81: u64 = (x27 + (x28 as u64));
let x82: u64 = (x26 + x81);
let x83: u64 = (x25 + x82);
let x84: u64 = (x24 + x83);
let x85: u64 = (x23 + x84);
let x86: u64 = (x22 + x85);
let x87: u64 = (x20 + (x21 as u64));
let x88: u64 = (x19 + x87);
let x89: u64 = (x18 + x88);
let x90: u64 = (x17 + x89);
let x91: u64 = (x16 + x90);
let x92: u64 = (x15 + x91);
let x93: u64 = (x13 + (x14 as u64));
let x94: u64 = (x12 + x93);
let x95: u64 = (x11 + x94);
let x96: u64 = (x10 + x95);
let x97: u64 = (x9 + x96);
let x98: u64 = (x8 + x97);
let x99: u64 = (x6 + (x7 as u64));
let x100: u64 = (x5 + x99);
let x101: u64 = (x4 + x100);
let x102: u64 = (x3 + x101);
let x103: u64 = (x2 + x102);
let x104: u64 = (x1 + x103);
out1[0] = x62;
out1[1] = x68;
out1[2] = x74;
out1[3] = x80;
out1[4] = x86;
out1[5] = x92;
out1[6] = x98;
out1[7] = x104;
}
/// The function fiat_p448_relax is the identity function converting from tight field elements to loose field elements.
///
/// Postconditions:
/// out1 = arg1
///
#[inline]
pub fn fiat_p448_relax(out1: &mut fiat_p448_loose_field_element, arg1: &fiat_p448_tight_field_element) {
let x1: u64 = (arg1[0]);
let x2: u64 = (arg1[1]);
let x3: u64 = (arg1[2]);
let x4: u64 = (arg1[3]);
let x5: u64 = (arg1[4]);
let x6: u64 = (arg1[5]);
let x7: u64 = (arg1[6]);
let x8: u64 = (arg1[7]);
out1[0] = x1;
out1[1] = x2;
out1[2] = x3;
out1[3] = x4;
out1[4] = x5;
out1[5] = x6;
out1[6] = x7;
out1[7] = x8;
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+541
View File
@@ -0,0 +1,541 @@
//! Autogenerated: 'src/ExtractionOCaml/unsaturated_solinas' --lang Rust --inline poly1305 32 '(auto)' '2^130 - 5' carry_mul carry_square carry add sub opp selectznz to_bytes from_bytes relax
//! curve description: poly1305
//! machine_wordsize = 32 (from "32")
//! requested operations: carry_mul, carry_square, carry, add, sub, opp, selectznz, to_bytes, from_bytes, relax
//! n = 5 (from "(auto)")
//! s-c = 2^130 - [(1, 5)] (from "2^130 - 5")
//! tight_bounds_multiplier = 1 (from "")
//!
//! Computed values:
//! carry_chain = [0, 1, 2, 3, 4, 0, 1]
//! eval z = z[0] + (z[1] << 26) + (z[2] << 52) + (z[3] << 78) + (z[4] << 104)
//! 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)
//! balance = [0x7fffff6, 0x7fffffe, 0x7fffffe, 0x7fffffe, 0x7fffffe]
#![allow(unused_parens)]
#![allow(non_camel_case_types)]
/** fiat_poly1305_u1 represents values of 1 bits, stored in one byte. */
pub type fiat_poly1305_u1 = u8;
/** fiat_poly1305_i1 represents values of 1 bits, stored in one byte. */
pub type fiat_poly1305_i1 = i8;
/** fiat_poly1305_u2 represents values of 2 bits, stored in one byte. */
pub type fiat_poly1305_u2 = u8;
/** fiat_poly1305_i2 represents values of 2 bits, stored in one byte. */
pub type fiat_poly1305_i2 = i8;
/** The type fiat_poly1305_loose_field_element is a field element with loose bounds. */
/** Bounds: [[0x0 ~> 0xc000000], [0x0 ~> 0xc000000], [0x0 ~> 0xc000000], [0x0 ~> 0xc000000], [0x0 ~> 0xc000000]] */
#[derive(Clone, Copy)]
pub struct fiat_poly1305_loose_field_element(pub [u32; 5]);
impl core::ops::Index<usize> for fiat_poly1305_loose_field_element {
type Output = u32;
#[inline]
fn index(&self, index: usize) -> &Self::Output {
&self.0[index]
}
}
impl core::ops::IndexMut<usize> for fiat_poly1305_loose_field_element {
#[inline]
fn index_mut(&mut self, index: usize) -> &mut Self::Output {
&mut self.0[index]
}
}
/** The type fiat_poly1305_tight_field_element is a field element with tight bounds. */
/** Bounds: [[0x0 ~> 0x4000000], [0x0 ~> 0x4000000], [0x0 ~> 0x4000000], [0x0 ~> 0x4000000], [0x0 ~> 0x4000000]] */
#[derive(Clone, Copy)]
pub struct fiat_poly1305_tight_field_element(pub [u32; 5]);
impl core::ops::Index<usize> for fiat_poly1305_tight_field_element {
type Output = u32;
#[inline]
fn index(&self, index: usize) -> &Self::Output {
&self.0[index]
}
}
impl core::ops::IndexMut<usize> for fiat_poly1305_tight_field_element {
#[inline]
fn index_mut(&mut self, index: usize) -> &mut Self::Output {
&mut self.0[index]
}
}
/// The function fiat_poly1305_addcarryx_u26 is an addition with carry.
///
/// Postconditions:
/// out1 = (arg1 + arg2 + arg3) mod 2^26
/// out2 = ⌊(arg1 + arg2 + arg3) / 2^26⌋
///
/// Input Bounds:
/// arg1: [0x0 ~> 0x1]
/// arg2: [0x0 ~> 0x3ffffff]
/// arg3: [0x0 ~> 0x3ffffff]
/// Output Bounds:
/// out1: [0x0 ~> 0x3ffffff]
/// out2: [0x0 ~> 0x1]
#[inline]
pub fn fiat_poly1305_addcarryx_u26(out1: &mut u32, out2: &mut fiat_poly1305_u1, arg1: fiat_poly1305_u1, arg2: u32, arg3: u32) {
let x1: u32 = (((arg1 as u32) + arg2) + arg3);
let x2: u32 = (x1 & 0x3ffffff);
let x3: fiat_poly1305_u1 = ((x1 >> 26) as fiat_poly1305_u1);
*out1 = x2;
*out2 = x3;
}
/// The function fiat_poly1305_subborrowx_u26 is a subtraction with borrow.
///
/// Postconditions:
/// out1 = (-arg1 + arg2 + -arg3) mod 2^26
/// out2 = -⌊(-arg1 + arg2 + -arg3) / 2^26⌋
///
/// Input Bounds:
/// arg1: [0x0 ~> 0x1]
/// arg2: [0x0 ~> 0x3ffffff]
/// arg3: [0x0 ~> 0x3ffffff]
/// Output Bounds:
/// out1: [0x0 ~> 0x3ffffff]
/// out2: [0x0 ~> 0x1]
#[inline]
pub fn fiat_poly1305_subborrowx_u26(out1: &mut u32, out2: &mut fiat_poly1305_u1, arg1: fiat_poly1305_u1, arg2: u32, arg3: u32) {
let x1: i32 = ((((((arg2 as i64) - (arg1 as i64)) as i32) as i64) - (arg3 as i64)) as i32);
let x2: fiat_poly1305_i1 = ((x1 >> 26) as fiat_poly1305_i1);
let x3: u32 = (((x1 as i64) & (0x3ffffff as i64)) as u32);
*out1 = x3;
*out2 = (((0x0 as fiat_poly1305_i2) - (x2 as fiat_poly1305_i2)) as fiat_poly1305_u1);
}
/// The function fiat_poly1305_cmovznz_u32 is a single-word conditional move.
///
/// Postconditions:
/// out1 = (if arg1 = 0 then arg2 else arg3)
///
/// Input Bounds:
/// arg1: [0x0 ~> 0x1]
/// arg2: [0x0 ~> 0xffffffff]
/// arg3: [0x0 ~> 0xffffffff]
/// Output Bounds:
/// out1: [0x0 ~> 0xffffffff]
#[inline]
pub fn fiat_poly1305_cmovznz_u32(out1: &mut u32, arg1: fiat_poly1305_u1, arg2: u32, arg3: u32) {
let x1: fiat_poly1305_u1 = (!(!arg1));
let x2: u32 = ((((((0x0 as fiat_poly1305_i2) - (x1 as fiat_poly1305_i2)) as fiat_poly1305_i1) as i64) & (0xffffffff as i64)) as u32);
let x3: u32 = ((x2 & arg3) | ((!x2) & arg2));
*out1 = x3;
}
/// The function fiat_poly1305_carry_mul multiplies two field elements and reduces the result.
///
/// Postconditions:
/// eval out1 mod m = (eval arg1 * eval arg2) mod m
///
#[inline]
pub fn fiat_poly1305_carry_mul(out1: &mut fiat_poly1305_tight_field_element, arg1: &fiat_poly1305_loose_field_element, arg2: &fiat_poly1305_loose_field_element) {
let x1: u64 = (((arg1[4]) as u64) * (((arg2[4]) * 0x5) as u64));
let x2: u64 = (((arg1[4]) as u64) * (((arg2[3]) * 0x5) as u64));
let x3: u64 = (((arg1[4]) as u64) * (((arg2[2]) * 0x5) as u64));
let x4: u64 = (((arg1[4]) as u64) * (((arg2[1]) * 0x5) as u64));
let x5: u64 = (((arg1[3]) as u64) * (((arg2[4]) * 0x5) as u64));
let x6: u64 = (((arg1[3]) as u64) * (((arg2[3]) * 0x5) as u64));
let x7: u64 = (((arg1[3]) as u64) * (((arg2[2]) * 0x5) as u64));
let x8: u64 = (((arg1[2]) as u64) * (((arg2[4]) * 0x5) as u64));
let x9: u64 = (((arg1[2]) as u64) * (((arg2[3]) * 0x5) as u64));
let x10: u64 = (((arg1[1]) as u64) * (((arg2[4]) * 0x5) as u64));
let x11: u64 = (((arg1[4]) as u64) * ((arg2[0]) as u64));
let x12: u64 = (((arg1[3]) as u64) * ((arg2[1]) as u64));
let x13: u64 = (((arg1[3]) as u64) * ((arg2[0]) as u64));
let x14: u64 = (((arg1[2]) as u64) * ((arg2[2]) as u64));
let x15: u64 = (((arg1[2]) as u64) * ((arg2[1]) as u64));
let x16: u64 = (((arg1[2]) as u64) * ((arg2[0]) as u64));
let x17: u64 = (((arg1[1]) as u64) * ((arg2[3]) as u64));
let x18: u64 = (((arg1[1]) as u64) * ((arg2[2]) as u64));
let x19: u64 = (((arg1[1]) as u64) * ((arg2[1]) as u64));
let x20: u64 = (((arg1[1]) as u64) * ((arg2[0]) as u64));
let x21: u64 = (((arg1[0]) as u64) * ((arg2[4]) as u64));
let x22: u64 = (((arg1[0]) as u64) * ((arg2[3]) as u64));
let x23: u64 = (((arg1[0]) as u64) * ((arg2[2]) as u64));
let x24: u64 = (((arg1[0]) as u64) * ((arg2[1]) as u64));
let x25: u64 = (((arg1[0]) as u64) * ((arg2[0]) as u64));
let x26: u64 = (x25 + (x10 + (x9 + (x7 + x4))));
let x27: u64 = (x26 >> 26);
let x28: u32 = ((x26 & (0x3ffffff as u64)) as u32);
let x29: u64 = (x21 + (x17 + (x14 + (x12 + x11))));
let x30: u64 = (x22 + (x18 + (x15 + (x13 + x1))));
let x31: u64 = (x23 + (x19 + (x16 + (x5 + x2))));
let x32: u64 = (x24 + (x20 + (x8 + (x6 + x3))));
let x33: u64 = (x27 + x32);
let x34: u64 = (x33 >> 26);
let x35: u32 = ((x33 & (0x3ffffff as u64)) as u32);
let x36: u64 = (x34 + x31);
let x37: u64 = (x36 >> 26);
let x38: u32 = ((x36 & (0x3ffffff as u64)) as u32);
let x39: u64 = (x37 + x30);
let x40: u64 = (x39 >> 26);
let x41: u32 = ((x39 & (0x3ffffff as u64)) as u32);
let x42: u64 = (x40 + x29);
let x43: u32 = ((x42 >> 26) as u32);
let x44: u32 = ((x42 & (0x3ffffff as u64)) as u32);
let x45: u64 = ((x43 as u64) * (0x5 as u64));
let x46: u64 = ((x28 as u64) + x45);
let x47: u32 = ((x46 >> 26) as u32);
let x48: u32 = ((x46 & (0x3ffffff as u64)) as u32);
let x49: u32 = (x47 + x35);
let x50: fiat_poly1305_u1 = ((x49 >> 26) as fiat_poly1305_u1);
let x51: u32 = (x49 & 0x3ffffff);
let x52: u32 = ((x50 as u32) + x38);
out1[0] = x48;
out1[1] = x51;
out1[2] = x52;
out1[3] = x41;
out1[4] = x44;
}
/// The function fiat_poly1305_carry_square squares a field element and reduces the result.
///
/// Postconditions:
/// eval out1 mod m = (eval arg1 * eval arg1) mod m
///
#[inline]
pub fn fiat_poly1305_carry_square(out1: &mut fiat_poly1305_tight_field_element, arg1: &fiat_poly1305_loose_field_element) {
let x1: u32 = ((arg1[4]) * 0x5);
let x2: u32 = (x1 * 0x2);
let x3: u32 = ((arg1[4]) * 0x2);
let x4: u32 = ((arg1[3]) * 0x5);
let x5: u32 = (x4 * 0x2);
let x6: u32 = ((arg1[3]) * 0x2);
let x7: u32 = ((arg1[2]) * 0x2);
let x8: u32 = ((arg1[1]) * 0x2);
let x9: u64 = (((arg1[4]) as u64) * (x1 as u64));
let x10: u64 = (((arg1[3]) as u64) * (x2 as u64));
let x11: u64 = (((arg1[3]) as u64) * (x4 as u64));
let x12: u64 = (((arg1[2]) as u64) * (x2 as u64));
let x13: u64 = (((arg1[2]) as u64) * (x5 as u64));
let x14: u64 = (((arg1[2]) as u64) * ((arg1[2]) as u64));
let x15: u64 = (((arg1[1]) as u64) * (x2 as u64));
let x16: u64 = (((arg1[1]) as u64) * (x6 as u64));
let x17: u64 = (((arg1[1]) as u64) * (x7 as u64));
let x18: u64 = (((arg1[1]) as u64) * ((arg1[1]) as u64));
let x19: u64 = (((arg1[0]) as u64) * (x3 as u64));
let x20: u64 = (((arg1[0]) as u64) * (x6 as u64));
let x21: u64 = (((arg1[0]) as u64) * (x7 as u64));
let x22: u64 = (((arg1[0]) as u64) * (x8 as u64));
let x23: u64 = (((arg1[0]) as u64) * ((arg1[0]) as u64));
let x24: u64 = (x23 + (x15 + x13));
let x25: u64 = (x24 >> 26);
let x26: u32 = ((x24 & (0x3ffffff as u64)) as u32);
let x27: u64 = (x19 + (x16 + x14));
let x28: u64 = (x20 + (x17 + x9));
let x29: u64 = (x21 + (x18 + x10));
let x30: u64 = (x22 + (x12 + x11));
let x31: u64 = (x25 + x30);
let x32: u64 = (x31 >> 26);
let x33: u32 = ((x31 & (0x3ffffff as u64)) as u32);
let x34: u64 = (x32 + x29);
let x35: u64 = (x34 >> 26);
let x36: u32 = ((x34 & (0x3ffffff as u64)) as u32);
let x37: u64 = (x35 + x28);
let x38: u64 = (x37 >> 26);
let x39: u32 = ((x37 & (0x3ffffff as u64)) as u32);
let x40: u64 = (x38 + x27);
let x41: u32 = ((x40 >> 26) as u32);
let x42: u32 = ((x40 & (0x3ffffff as u64)) as u32);
let x43: u64 = ((x41 as u64) * (0x5 as u64));
let x44: u64 = ((x26 as u64) + x43);
let x45: u32 = ((x44 >> 26) as u32);
let x46: u32 = ((x44 & (0x3ffffff as u64)) as u32);
let x47: u32 = (x45 + x33);
let x48: fiat_poly1305_u1 = ((x47 >> 26) as fiat_poly1305_u1);
let x49: u32 = (x47 & 0x3ffffff);
let x50: u32 = ((x48 as u32) + x36);
out1[0] = x46;
out1[1] = x49;
out1[2] = x50;
out1[3] = x39;
out1[4] = x42;
}
/// The function fiat_poly1305_carry reduces a field element.
///
/// Postconditions:
/// eval out1 mod m = eval arg1 mod m
///
#[inline]
pub fn fiat_poly1305_carry(out1: &mut fiat_poly1305_tight_field_element, arg1: &fiat_poly1305_loose_field_element) {
let x1: u32 = (arg1[0]);
let x2: u32 = ((x1 >> 26) + (arg1[1]));
let x3: u32 = ((x2 >> 26) + (arg1[2]));
let x4: u32 = ((x3 >> 26) + (arg1[3]));
let x5: u32 = ((x4 >> 26) + (arg1[4]));
let x6: u32 = ((x1 & 0x3ffffff) + ((x5 >> 26) * 0x5));
let x7: u32 = ((((x6 >> 26) as fiat_poly1305_u1) as u32) + (x2 & 0x3ffffff));
let x8: u32 = (x6 & 0x3ffffff);
let x9: u32 = (x7 & 0x3ffffff);
let x10: u32 = ((((x7 >> 26) as fiat_poly1305_u1) as u32) + (x3 & 0x3ffffff));
let x11: u32 = (x4 & 0x3ffffff);
let x12: u32 = (x5 & 0x3ffffff);
out1[0] = x8;
out1[1] = x9;
out1[2] = x10;
out1[3] = x11;
out1[4] = x12;
}
/// The function fiat_poly1305_add adds two field elements.
///
/// Postconditions:
/// eval out1 mod m = (eval arg1 + eval arg2) mod m
///
#[inline]
pub fn fiat_poly1305_add(out1: &mut fiat_poly1305_loose_field_element, arg1: &fiat_poly1305_tight_field_element, arg2: &fiat_poly1305_tight_field_element) {
let x1: u32 = ((arg1[0]) + (arg2[0]));
let x2: u32 = ((arg1[1]) + (arg2[1]));
let x3: u32 = ((arg1[2]) + (arg2[2]));
let x4: u32 = ((arg1[3]) + (arg2[3]));
let x5: u32 = ((arg1[4]) + (arg2[4]));
out1[0] = x1;
out1[1] = x2;
out1[2] = x3;
out1[3] = x4;
out1[4] = x5;
}
/// The function fiat_poly1305_sub subtracts two field elements.
///
/// Postconditions:
/// eval out1 mod m = (eval arg1 - eval arg2) mod m
///
#[inline]
pub fn fiat_poly1305_sub(out1: &mut fiat_poly1305_loose_field_element, arg1: &fiat_poly1305_tight_field_element, arg2: &fiat_poly1305_tight_field_element) {
let x1: u32 = ((0x7fffff6 + (arg1[0])) - (arg2[0]));
let x2: u32 = ((0x7fffffe + (arg1[1])) - (arg2[1]));
let x3: u32 = ((0x7fffffe + (arg1[2])) - (arg2[2]));
let x4: u32 = ((0x7fffffe + (arg1[3])) - (arg2[3]));
let x5: u32 = ((0x7fffffe + (arg1[4])) - (arg2[4]));
out1[0] = x1;
out1[1] = x2;
out1[2] = x3;
out1[3] = x4;
out1[4] = x5;
}
/// The function fiat_poly1305_opp negates a field element.
///
/// Postconditions:
/// eval out1 mod m = -eval arg1 mod m
///
#[inline]
pub fn fiat_poly1305_opp(out1: &mut fiat_poly1305_loose_field_element, arg1: &fiat_poly1305_tight_field_element) {
let x1: u32 = (0x7fffff6 - (arg1[0]));
let x2: u32 = (0x7fffffe - (arg1[1]));
let x3: u32 = (0x7fffffe - (arg1[2]));
let x4: u32 = (0x7fffffe - (arg1[3]));
let x5: u32 = (0x7fffffe - (arg1[4]));
out1[0] = x1;
out1[1] = x2;
out1[2] = x3;
out1[3] = x4;
out1[4] = x5;
}
/// The function fiat_poly1305_selectznz is a multi-limb conditional select.
///
/// Postconditions:
/// out1 = (if arg1 = 0 then arg2 else arg3)
///
/// Input Bounds:
/// arg1: [0x0 ~> 0x1]
/// arg2: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
/// arg3: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
/// Output Bounds:
/// out1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
#[inline]
pub fn fiat_poly1305_selectznz(out1: &mut [u32; 5], arg1: fiat_poly1305_u1, arg2: &[u32; 5], arg3: &[u32; 5]) {
let mut x1: u32 = 0;
fiat_poly1305_cmovznz_u32(&mut x1, arg1, (arg2[0]), (arg3[0]));
let mut x2: u32 = 0;
fiat_poly1305_cmovznz_u32(&mut x2, arg1, (arg2[1]), (arg3[1]));
let mut x3: u32 = 0;
fiat_poly1305_cmovznz_u32(&mut x3, arg1, (arg2[2]), (arg3[2]));
let mut x4: u32 = 0;
fiat_poly1305_cmovznz_u32(&mut x4, arg1, (arg2[3]), (arg3[3]));
let mut x5: u32 = 0;
fiat_poly1305_cmovznz_u32(&mut x5, arg1, (arg2[4]), (arg3[4]));
out1[0] = x1;
out1[1] = x2;
out1[2] = x3;
out1[3] = x4;
out1[4] = x5;
}
/// The function fiat_poly1305_to_bytes serializes a field element to bytes in little-endian order.
///
/// Postconditions:
/// out1 = map (λ x, ⌊((eval arg1 mod m) mod 2^(8 * (x + 1))) / 2^(8 * x)⌋) [0..16]
///
/// Output Bounds:
/// 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 ~> 0x3]]
#[inline]
pub fn fiat_poly1305_to_bytes(out1: &mut [u8; 17], arg1: &fiat_poly1305_tight_field_element) {
let mut x1: u32 = 0;
let mut x2: fiat_poly1305_u1 = 0;
fiat_poly1305_subborrowx_u26(&mut x1, &mut x2, 0x0, (arg1[0]), 0x3fffffb);
let mut x3: u32 = 0;
let mut x4: fiat_poly1305_u1 = 0;
fiat_poly1305_subborrowx_u26(&mut x3, &mut x4, x2, (arg1[1]), 0x3ffffff);
let mut x5: u32 = 0;
let mut x6: fiat_poly1305_u1 = 0;
fiat_poly1305_subborrowx_u26(&mut x5, &mut x6, x4, (arg1[2]), 0x3ffffff);
let mut x7: u32 = 0;
let mut x8: fiat_poly1305_u1 = 0;
fiat_poly1305_subborrowx_u26(&mut x7, &mut x8, x6, (arg1[3]), 0x3ffffff);
let mut x9: u32 = 0;
let mut x10: fiat_poly1305_u1 = 0;
fiat_poly1305_subborrowx_u26(&mut x9, &mut x10, x8, (arg1[4]), 0x3ffffff);
let mut x11: u32 = 0;
fiat_poly1305_cmovznz_u32(&mut x11, x10, (0x0 as u32), 0xffffffff);
let mut x12: u32 = 0;
let mut x13: fiat_poly1305_u1 = 0;
fiat_poly1305_addcarryx_u26(&mut x12, &mut x13, 0x0, x1, (x11 & 0x3fffffb));
let mut x14: u32 = 0;
let mut x15: fiat_poly1305_u1 = 0;
fiat_poly1305_addcarryx_u26(&mut x14, &mut x15, x13, x3, (x11 & 0x3ffffff));
let mut x16: u32 = 0;
let mut x17: fiat_poly1305_u1 = 0;
fiat_poly1305_addcarryx_u26(&mut x16, &mut x17, x15, x5, (x11 & 0x3ffffff));
let mut x18: u32 = 0;
let mut x19: fiat_poly1305_u1 = 0;
fiat_poly1305_addcarryx_u26(&mut x18, &mut x19, x17, x7, (x11 & 0x3ffffff));
let mut x20: u32 = 0;
let mut x21: fiat_poly1305_u1 = 0;
fiat_poly1305_addcarryx_u26(&mut x20, &mut x21, x19, x9, (x11 & 0x3ffffff));
let x22: u32 = (x18 << 6);
let x23: u32 = (x16 << 4);
let x24: u32 = (x14 << 2);
let x25: u8 = ((x12 & (0xff as u32)) as u8);
let x26: u32 = (x12 >> 8);
let x27: u8 = ((x26 & (0xff as u32)) as u8);
let x28: u32 = (x26 >> 8);
let x29: u8 = ((x28 & (0xff as u32)) as u8);
let x30: u8 = ((x28 >> 8) as u8);
let x31: u32 = (x24 + (x30 as u32));
let x32: u8 = ((x31 & (0xff as u32)) as u8);
let x33: u32 = (x31 >> 8);
let x34: u8 = ((x33 & (0xff as u32)) as u8);
let x35: u32 = (x33 >> 8);
let x36: u8 = ((x35 & (0xff as u32)) as u8);
let x37: u8 = ((x35 >> 8) as u8);
let x38: u32 = (x23 + (x37 as u32));
let x39: u8 = ((x38 & (0xff as u32)) as u8);
let x40: u32 = (x38 >> 8);
let x41: u8 = ((x40 & (0xff as u32)) as u8);
let x42: u32 = (x40 >> 8);
let x43: u8 = ((x42 & (0xff as u32)) as u8);
let x44: u8 = ((x42 >> 8) as u8);
let x45: u32 = (x22 + (x44 as u32));
let x46: u8 = ((x45 & (0xff as u32)) as u8);
let x47: u32 = (x45 >> 8);
let x48: u8 = ((x47 & (0xff as u32)) as u8);
let x49: u32 = (x47 >> 8);
let x50: u8 = ((x49 & (0xff as u32)) as u8);
let x51: u8 = ((x49 >> 8) as u8);
let x52: u8 = ((x20 & (0xff as u32)) as u8);
let x53: u32 = (x20 >> 8);
let x54: u8 = ((x53 & (0xff as u32)) as u8);
let x55: u32 = (x53 >> 8);
let x56: u8 = ((x55 & (0xff as u32)) as u8);
let x57: u8 = ((x55 >> 8) as u8);
out1[0] = x25;
out1[1] = x27;
out1[2] = x29;
out1[3] = x32;
out1[4] = x34;
out1[5] = x36;
out1[6] = x39;
out1[7] = x41;
out1[8] = x43;
out1[9] = x46;
out1[10] = x48;
out1[11] = x50;
out1[12] = x51;
out1[13] = x52;
out1[14] = x54;
out1[15] = x56;
out1[16] = x57;
}
/// The function fiat_poly1305_from_bytes deserializes a field element from bytes in little-endian order.
///
/// Postconditions:
/// eval out1 mod m = bytes_eval arg1 mod m
///
/// Input Bounds:
/// 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 ~> 0x3]]
#[inline]
pub fn fiat_poly1305_from_bytes(out1: &mut fiat_poly1305_tight_field_element, arg1: &[u8; 17]) {
let x1: u32 = (((arg1[16]) as u32) << 24);
let x2: u32 = (((arg1[15]) as u32) << 16);
let x3: u32 = (((arg1[14]) as u32) << 8);
let x4: u8 = (arg1[13]);
let x5: u32 = (((arg1[12]) as u32) << 18);
let x6: u32 = (((arg1[11]) as u32) << 10);
let x7: u32 = (((arg1[10]) as u32) << 2);
let x8: u32 = (((arg1[9]) as u32) << 20);
let x9: u32 = (((arg1[8]) as u32) << 12);
let x10: u32 = (((arg1[7]) as u32) << 4);
let x11: u32 = (((arg1[6]) as u32) << 22);
let x12: u32 = (((arg1[5]) as u32) << 14);
let x13: u32 = (((arg1[4]) as u32) << 6);
let x14: u32 = (((arg1[3]) as u32) << 24);
let x15: u32 = (((arg1[2]) as u32) << 16);
let x16: u32 = (((arg1[1]) as u32) << 8);
let x17: u8 = (arg1[0]);
let x18: u32 = (x16 + (x17 as u32));
let x19: u32 = (x15 + x18);
let x20: u32 = (x14 + x19);
let x21: u32 = (x20 & 0x3ffffff);
let x22: u8 = ((x20 >> 26) as u8);
let x23: u32 = (x13 + (x22 as u32));
let x24: u32 = (x12 + x23);
let x25: u32 = (x11 + x24);
let x26: u32 = (x25 & 0x3ffffff);
let x27: u8 = ((x25 >> 26) as u8);
let x28: u32 = (x10 + (x27 as u32));
let x29: u32 = (x9 + x28);
let x30: u32 = (x8 + x29);
let x31: u32 = (x30 & 0x3ffffff);
let x32: u8 = ((x30 >> 26) as u8);
let x33: u32 = (x7 + (x32 as u32));
let x34: u32 = (x6 + x33);
let x35: u32 = (x5 + x34);
let x36: u32 = (x3 + (x4 as u32));
let x37: u32 = (x2 + x36);
let x38: u32 = (x1 + x37);
out1[0] = x21;
out1[1] = x26;
out1[2] = x31;
out1[3] = x35;
out1[4] = x38;
}
/// The function fiat_poly1305_relax is the identity function converting from tight field elements to loose field elements.
///
/// Postconditions:
/// out1 = arg1
///
#[inline]
pub fn fiat_poly1305_relax(out1: &mut fiat_poly1305_loose_field_element, arg1: &fiat_poly1305_tight_field_element) {
let x1: u32 = (arg1[0]);
let x2: u32 = (arg1[1]);
let x3: u32 = (arg1[2]);
let x4: u32 = (arg1[3]);
let x5: u32 = (arg1[4]);
out1[0] = x1;
out1[1] = x2;
out1[2] = x3;
out1[3] = x4;
out1[4] = x5;
}
+493
View File
@@ -0,0 +1,493 @@
//! Autogenerated: 'src/ExtractionOCaml/unsaturated_solinas' --lang Rust --inline poly1305 64 3 '2^130 - 5' carry_mul carry_square carry add sub opp selectznz to_bytes from_bytes relax
//! curve description: poly1305
//! machine_wordsize = 64 (from "64")
//! requested operations: carry_mul, carry_square, carry, add, sub, opp, selectznz, to_bytes, from_bytes, relax
//! n = 3 (from "3")
//! s-c = 2^130 - [(1, 5)] (from "2^130 - 5")
//! tight_bounds_multiplier = 1 (from "")
//!
//! Computed values:
//! carry_chain = [0, 1, 2, 0, 1]
//! eval z = z[0] + (z[1] << 44) + (z[2] << 87)
//! 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)
//! balance = [0x1ffffffffff6, 0xffffffffffe, 0xffffffffffe]
#![allow(unused_parens)]
#![allow(non_camel_case_types)]
/** fiat_poly1305_u1 represents values of 1 bits, stored in one byte. */
pub type fiat_poly1305_u1 = u8;
/** fiat_poly1305_i1 represents values of 1 bits, stored in one byte. */
pub type fiat_poly1305_i1 = i8;
/** fiat_poly1305_u2 represents values of 2 bits, stored in one byte. */
pub type fiat_poly1305_u2 = u8;
/** fiat_poly1305_i2 represents values of 2 bits, stored in one byte. */
pub type fiat_poly1305_i2 = i8;
/** The type fiat_poly1305_loose_field_element is a field element with loose bounds. */
/** Bounds: [[0x0 ~> 0x300000000000], [0x0 ~> 0x180000000000], [0x0 ~> 0x180000000000]] */
#[derive(Clone, Copy)]
pub struct fiat_poly1305_loose_field_element(pub [u64; 3]);
impl core::ops::Index<usize> for fiat_poly1305_loose_field_element {
type Output = u64;
#[inline]
fn index(&self, index: usize) -> &Self::Output {
&self.0[index]
}
}
impl core::ops::IndexMut<usize> for fiat_poly1305_loose_field_element {
#[inline]
fn index_mut(&mut self, index: usize) -> &mut Self::Output {
&mut self.0[index]
}
}
/** The type fiat_poly1305_tight_field_element is a field element with tight bounds. */
/** Bounds: [[0x0 ~> 0x100000000000], [0x0 ~> 0x80000000000], [0x0 ~> 0x80000000000]] */
#[derive(Clone, Copy)]
pub struct fiat_poly1305_tight_field_element(pub [u64; 3]);
impl core::ops::Index<usize> for fiat_poly1305_tight_field_element {
type Output = u64;
#[inline]
fn index(&self, index: usize) -> &Self::Output {
&self.0[index]
}
}
impl core::ops::IndexMut<usize> for fiat_poly1305_tight_field_element {
#[inline]
fn index_mut(&mut self, index: usize) -> &mut Self::Output {
&mut self.0[index]
}
}
/// The function fiat_poly1305_addcarryx_u44 is an addition with carry.
///
/// Postconditions:
/// out1 = (arg1 + arg2 + arg3) mod 2^44
/// out2 = ⌊(arg1 + arg2 + arg3) / 2^44⌋
///
/// Input Bounds:
/// arg1: [0x0 ~> 0x1]
/// arg2: [0x0 ~> 0xfffffffffff]
/// arg3: [0x0 ~> 0xfffffffffff]
/// Output Bounds:
/// out1: [0x0 ~> 0xfffffffffff]
/// out2: [0x0 ~> 0x1]
#[inline]
pub fn fiat_poly1305_addcarryx_u44(out1: &mut u64, out2: &mut fiat_poly1305_u1, arg1: fiat_poly1305_u1, arg2: u64, arg3: u64) {
let x1: u64 = (((arg1 as u64) + arg2) + arg3);
let x2: u64 = (x1 & 0xfffffffffff);
let x3: fiat_poly1305_u1 = ((x1 >> 44) as fiat_poly1305_u1);
*out1 = x2;
*out2 = x3;
}
/// The function fiat_poly1305_subborrowx_u44 is a subtraction with borrow.
///
/// Postconditions:
/// out1 = (-arg1 + arg2 + -arg3) mod 2^44
/// out2 = -⌊(-arg1 + arg2 + -arg3) / 2^44⌋
///
/// Input Bounds:
/// arg1: [0x0 ~> 0x1]
/// arg2: [0x0 ~> 0xfffffffffff]
/// arg3: [0x0 ~> 0xfffffffffff]
/// Output Bounds:
/// out1: [0x0 ~> 0xfffffffffff]
/// out2: [0x0 ~> 0x1]
#[inline]
pub fn fiat_poly1305_subborrowx_u44(out1: &mut u64, out2: &mut fiat_poly1305_u1, arg1: fiat_poly1305_u1, arg2: u64, arg3: u64) {
let x1: i64 = ((((((arg2 as i128) - (arg1 as i128)) as i64) as i128) - (arg3 as i128)) as i64);
let x2: fiat_poly1305_i1 = ((x1 >> 44) as fiat_poly1305_i1);
let x3: u64 = (((x1 as i128) & (0xfffffffffff as i128)) as u64);
*out1 = x3;
*out2 = (((0x0 as fiat_poly1305_i2) - (x2 as fiat_poly1305_i2)) as fiat_poly1305_u1);
}
/// The function fiat_poly1305_addcarryx_u43 is an addition with carry.
///
/// Postconditions:
/// out1 = (arg1 + arg2 + arg3) mod 2^43
/// out2 = ⌊(arg1 + arg2 + arg3) / 2^43⌋
///
/// Input Bounds:
/// arg1: [0x0 ~> 0x1]
/// arg2: [0x0 ~> 0x7ffffffffff]
/// arg3: [0x0 ~> 0x7ffffffffff]
/// Output Bounds:
/// out1: [0x0 ~> 0x7ffffffffff]
/// out2: [0x0 ~> 0x1]
#[inline]
pub fn fiat_poly1305_addcarryx_u43(out1: &mut u64, out2: &mut fiat_poly1305_u1, arg1: fiat_poly1305_u1, arg2: u64, arg3: u64) {
let x1: u64 = (((arg1 as u64) + arg2) + arg3);
let x2: u64 = (x1 & 0x7ffffffffff);
let x3: fiat_poly1305_u1 = ((x1 >> 43) as fiat_poly1305_u1);
*out1 = x2;
*out2 = x3;
}
/// The function fiat_poly1305_subborrowx_u43 is a subtraction with borrow.
///
/// Postconditions:
/// out1 = (-arg1 + arg2 + -arg3) mod 2^43
/// out2 = -⌊(-arg1 + arg2 + -arg3) / 2^43⌋
///
/// Input Bounds:
/// arg1: [0x0 ~> 0x1]
/// arg2: [0x0 ~> 0x7ffffffffff]
/// arg3: [0x0 ~> 0x7ffffffffff]
/// Output Bounds:
/// out1: [0x0 ~> 0x7ffffffffff]
/// out2: [0x0 ~> 0x1]
#[inline]
pub fn fiat_poly1305_subborrowx_u43(out1: &mut u64, out2: &mut fiat_poly1305_u1, arg1: fiat_poly1305_u1, arg2: u64, arg3: u64) {
let x1: i64 = ((((((arg2 as i128) - (arg1 as i128)) as i64) as i128) - (arg3 as i128)) as i64);
let x2: fiat_poly1305_i1 = ((x1 >> 43) as fiat_poly1305_i1);
let x3: u64 = (((x1 as i128) & (0x7ffffffffff as i128)) as u64);
*out1 = x3;
*out2 = (((0x0 as fiat_poly1305_i2) - (x2 as fiat_poly1305_i2)) as fiat_poly1305_u1);
}
/// The function fiat_poly1305_cmovznz_u64 is a single-word conditional move.
///
/// Postconditions:
/// out1 = (if arg1 = 0 then arg2 else arg3)
///
/// Input Bounds:
/// arg1: [0x0 ~> 0x1]
/// arg2: [0x0 ~> 0xffffffffffffffff]
/// arg3: [0x0 ~> 0xffffffffffffffff]
/// Output Bounds:
/// out1: [0x0 ~> 0xffffffffffffffff]
#[inline]
pub fn fiat_poly1305_cmovznz_u64(out1: &mut u64, arg1: fiat_poly1305_u1, arg2: u64, arg3: u64) {
let x1: fiat_poly1305_u1 = (!(!arg1));
let x2: u64 = ((((((0x0 as fiat_poly1305_i2) - (x1 as fiat_poly1305_i2)) as fiat_poly1305_i1) as i128) & (0xffffffffffffffff as i128)) as u64);
let x3: u64 = ((x2 & arg3) | ((!x2) & arg2));
*out1 = x3;
}
/// The function fiat_poly1305_carry_mul multiplies two field elements and reduces the result.
///
/// Postconditions:
/// eval out1 mod m = (eval arg1 * eval arg2) mod m
///
#[inline]
pub fn fiat_poly1305_carry_mul(out1: &mut fiat_poly1305_tight_field_element, arg1: &fiat_poly1305_loose_field_element, arg2: &fiat_poly1305_loose_field_element) {
let x1: u128 = (((arg1[2]) as u128) * (((arg2[2]) * 0x5) as u128));
let x2: u128 = (((arg1[2]) as u128) * (((arg2[1]) * 0xa) as u128));
let x3: u128 = (((arg1[1]) as u128) * (((arg2[2]) * 0xa) as u128));
let x4: u128 = (((arg1[2]) as u128) * ((arg2[0]) as u128));
let x5: u128 = (((arg1[1]) as u128) * (((arg2[1]) * 0x2) as u128));
let x6: u128 = (((arg1[1]) as u128) * ((arg2[0]) as u128));
let x7: u128 = (((arg1[0]) as u128) * ((arg2[2]) as u128));
let x8: u128 = (((arg1[0]) as u128) * ((arg2[1]) as u128));
let x9: u128 = (((arg1[0]) as u128) * ((arg2[0]) as u128));
let x10: u128 = (x9 + (x3 + x2));
let x11: u64 = ((x10 >> 44) as u64);
let x12: u64 = ((x10 & (0xfffffffffff as u128)) as u64);
let x13: u128 = (x7 + (x5 + x4));
let x14: u128 = (x8 + (x6 + x1));
let x15: u128 = ((x11 as u128) + x14);
let x16: u64 = ((x15 >> 43) as u64);
let x17: u64 = ((x15 & (0x7ffffffffff as u128)) as u64);
let x18: u128 = ((x16 as u128) + x13);
let x19: u64 = ((x18 >> 43) as u64);
let x20: u64 = ((x18 & (0x7ffffffffff as u128)) as u64);
let x21: u64 = (x19 * 0x5);
let x22: u64 = (x12 + x21);
let x23: u64 = (x22 >> 44);
let x24: u64 = (x22 & 0xfffffffffff);
let x25: u64 = (x23 + x17);
let x26: fiat_poly1305_u1 = ((x25 >> 43) as fiat_poly1305_u1);
let x27: u64 = (x25 & 0x7ffffffffff);
let x28: u64 = ((x26 as u64) + x20);
out1[0] = x24;
out1[1] = x27;
out1[2] = x28;
}
/// The function fiat_poly1305_carry_square squares a field element and reduces the result.
///
/// Postconditions:
/// eval out1 mod m = (eval arg1 * eval arg1) mod m
///
#[inline]
pub fn fiat_poly1305_carry_square(out1: &mut fiat_poly1305_tight_field_element, arg1: &fiat_poly1305_loose_field_element) {
let x1: u64 = ((arg1[2]) * 0x5);
let x2: u64 = (x1 * 0x2);
let x3: u64 = ((arg1[2]) * 0x2);
let x4: u64 = ((arg1[1]) * 0x2);
let x5: u128 = (((arg1[2]) as u128) * (x1 as u128));
let x6: u128 = (((arg1[1]) as u128) * ((x2 * 0x2) as u128));
let x7: u128 = (((arg1[1]) as u128) * (((arg1[1]) * 0x2) as u128));
let x8: u128 = (((arg1[0]) as u128) * (x3 as u128));
let x9: u128 = (((arg1[0]) as u128) * (x4 as u128));
let x10: u128 = (((arg1[0]) as u128) * ((arg1[0]) as u128));
let x11: u128 = (x10 + x6);
let x12: u64 = ((x11 >> 44) as u64);
let x13: u64 = ((x11 & (0xfffffffffff as u128)) as u64);
let x14: u128 = (x8 + x7);
let x15: u128 = (x9 + x5);
let x16: u128 = ((x12 as u128) + x15);
let x17: u64 = ((x16 >> 43) as u64);
let x18: u64 = ((x16 & (0x7ffffffffff as u128)) as u64);
let x19: u128 = ((x17 as u128) + x14);
let x20: u64 = ((x19 >> 43) as u64);
let x21: u64 = ((x19 & (0x7ffffffffff as u128)) as u64);
let x22: u64 = (x20 * 0x5);
let x23: u64 = (x13 + x22);
let x24: u64 = (x23 >> 44);
let x25: u64 = (x23 & 0xfffffffffff);
let x26: u64 = (x24 + x18);
let x27: fiat_poly1305_u1 = ((x26 >> 43) as fiat_poly1305_u1);
let x28: u64 = (x26 & 0x7ffffffffff);
let x29: u64 = ((x27 as u64) + x21);
out1[0] = x25;
out1[1] = x28;
out1[2] = x29;
}
/// The function fiat_poly1305_carry reduces a field element.
///
/// Postconditions:
/// eval out1 mod m = eval arg1 mod m
///
#[inline]
pub fn fiat_poly1305_carry(out1: &mut fiat_poly1305_tight_field_element, arg1: &fiat_poly1305_loose_field_element) {
let x1: u64 = (arg1[0]);
let x2: u64 = ((x1 >> 44) + (arg1[1]));
let x3: u64 = ((x2 >> 43) + (arg1[2]));
let x4: u64 = ((x1 & 0xfffffffffff) + ((x3 >> 43) * 0x5));
let x5: u64 = ((((x4 >> 44) as fiat_poly1305_u1) as u64) + (x2 & 0x7ffffffffff));
let x6: u64 = (x4 & 0xfffffffffff);
let x7: u64 = (x5 & 0x7ffffffffff);
let x8: u64 = ((((x5 >> 43) as fiat_poly1305_u1) as u64) + (x3 & 0x7ffffffffff));
out1[0] = x6;
out1[1] = x7;
out1[2] = x8;
}
/// The function fiat_poly1305_add adds two field elements.
///
/// Postconditions:
/// eval out1 mod m = (eval arg1 + eval arg2) mod m
///
#[inline]
pub fn fiat_poly1305_add(out1: &mut fiat_poly1305_loose_field_element, arg1: &fiat_poly1305_tight_field_element, arg2: &fiat_poly1305_tight_field_element) {
let x1: u64 = ((arg1[0]) + (arg2[0]));
let x2: u64 = ((arg1[1]) + (arg2[1]));
let x3: u64 = ((arg1[2]) + (arg2[2]));
out1[0] = x1;
out1[1] = x2;
out1[2] = x3;
}
/// The function fiat_poly1305_sub subtracts two field elements.
///
/// Postconditions:
/// eval out1 mod m = (eval arg1 - eval arg2) mod m
///
#[inline]
pub fn fiat_poly1305_sub(out1: &mut fiat_poly1305_loose_field_element, arg1: &fiat_poly1305_tight_field_element, arg2: &fiat_poly1305_tight_field_element) {
let x1: u64 = ((0x1ffffffffff6 + (arg1[0])) - (arg2[0]));
let x2: u64 = ((0xffffffffffe + (arg1[1])) - (arg2[1]));
let x3: u64 = ((0xffffffffffe + (arg1[2])) - (arg2[2]));
out1[0] = x1;
out1[1] = x2;
out1[2] = x3;
}
/// The function fiat_poly1305_opp negates a field element.
///
/// Postconditions:
/// eval out1 mod m = -eval arg1 mod m
///
#[inline]
pub fn fiat_poly1305_opp(out1: &mut fiat_poly1305_loose_field_element, arg1: &fiat_poly1305_tight_field_element) {
let x1: u64 = (0x1ffffffffff6 - (arg1[0]));
let x2: u64 = (0xffffffffffe - (arg1[1]));
let x3: u64 = (0xffffffffffe - (arg1[2]));
out1[0] = x1;
out1[1] = x2;
out1[2] = x3;
}
/// The function fiat_poly1305_selectznz is a multi-limb conditional select.
///
/// Postconditions:
/// out1 = (if arg1 = 0 then arg2 else arg3)
///
/// Input Bounds:
/// arg1: [0x0 ~> 0x1]
/// arg2: [[0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff]]
/// arg3: [[0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff]]
/// Output Bounds:
/// out1: [[0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff]]
#[inline]
pub fn fiat_poly1305_selectznz(out1: &mut [u64; 3], arg1: fiat_poly1305_u1, arg2: &[u64; 3], arg3: &[u64; 3]) {
let mut x1: u64 = 0;
fiat_poly1305_cmovznz_u64(&mut x1, arg1, (arg2[0]), (arg3[0]));
let mut x2: u64 = 0;
fiat_poly1305_cmovznz_u64(&mut x2, arg1, (arg2[1]), (arg3[1]));
let mut x3: u64 = 0;
fiat_poly1305_cmovznz_u64(&mut x3, arg1, (arg2[2]), (arg3[2]));
out1[0] = x1;
out1[1] = x2;
out1[2] = x3;
}
/// The function fiat_poly1305_to_bytes serializes a field element to bytes in little-endian order.
///
/// Postconditions:
/// out1 = map (λ x, ⌊((eval arg1 mod m) mod 2^(8 * (x + 1))) / 2^(8 * x)⌋) [0..16]
///
/// Output Bounds:
/// 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 ~> 0x3]]
#[inline]
pub fn fiat_poly1305_to_bytes(out1: &mut [u8; 17], arg1: &fiat_poly1305_tight_field_element) {
let mut x1: u64 = 0;
let mut x2: fiat_poly1305_u1 = 0;
fiat_poly1305_subborrowx_u44(&mut x1, &mut x2, 0x0, (arg1[0]), 0xffffffffffb);
let mut x3: u64 = 0;
let mut x4: fiat_poly1305_u1 = 0;
fiat_poly1305_subborrowx_u43(&mut x3, &mut x4, x2, (arg1[1]), 0x7ffffffffff);
let mut x5: u64 = 0;
let mut x6: fiat_poly1305_u1 = 0;
fiat_poly1305_subborrowx_u43(&mut x5, &mut x6, x4, (arg1[2]), 0x7ffffffffff);
let mut x7: u64 = 0;
fiat_poly1305_cmovznz_u64(&mut x7, x6, (0x0 as u64), 0xffffffffffffffff);
let mut x8: u64 = 0;
let mut x9: fiat_poly1305_u1 = 0;
fiat_poly1305_addcarryx_u44(&mut x8, &mut x9, 0x0, x1, (x7 & 0xffffffffffb));
let mut x10: u64 = 0;
let mut x11: fiat_poly1305_u1 = 0;
fiat_poly1305_addcarryx_u43(&mut x10, &mut x11, x9, x3, (x7 & 0x7ffffffffff));
let mut x12: u64 = 0;
let mut x13: fiat_poly1305_u1 = 0;
fiat_poly1305_addcarryx_u43(&mut x12, &mut x13, x11, x5, (x7 & 0x7ffffffffff));
let x14: u64 = (x12 << 7);
let x15: u64 = (x10 << 4);
let x16: u8 = ((x8 & (0xff as u64)) as u8);
let x17: u64 = (x8 >> 8);
let x18: u8 = ((x17 & (0xff as u64)) as u8);
let x19: u64 = (x17 >> 8);
let x20: u8 = ((x19 & (0xff as u64)) as u8);
let x21: u64 = (x19 >> 8);
let x22: u8 = ((x21 & (0xff as u64)) as u8);
let x23: u64 = (x21 >> 8);
let x24: u8 = ((x23 & (0xff as u64)) as u8);
let x25: u8 = ((x23 >> 8) as u8);
let x26: u64 = (x15 + (x25 as u64));
let x27: u8 = ((x26 & (0xff as u64)) as u8);
let x28: u64 = (x26 >> 8);
let x29: u8 = ((x28 & (0xff as u64)) as u8);
let x30: u64 = (x28 >> 8);
let x31: u8 = ((x30 & (0xff as u64)) as u8);
let x32: u64 = (x30 >> 8);
let x33: u8 = ((x32 & (0xff as u64)) as u8);
let x34: u64 = (x32 >> 8);
let x35: u8 = ((x34 & (0xff as u64)) as u8);
let x36: u8 = ((x34 >> 8) as u8);
let x37: u64 = (x14 + (x36 as u64));
let x38: u8 = ((x37 & (0xff as u64)) as u8);
let x39: u64 = (x37 >> 8);
let x40: u8 = ((x39 & (0xff as u64)) as u8);
let x41: u64 = (x39 >> 8);
let x42: u8 = ((x41 & (0xff as u64)) as u8);
let x43: u64 = (x41 >> 8);
let x44: u8 = ((x43 & (0xff as u64)) as u8);
let x45: u64 = (x43 >> 8);
let x46: u8 = ((x45 & (0xff as u64)) as u8);
let x47: u64 = (x45 >> 8);
let x48: u8 = ((x47 & (0xff as u64)) as u8);
let x49: u8 = ((x47 >> 8) as u8);
out1[0] = x16;
out1[1] = x18;
out1[2] = x20;
out1[3] = x22;
out1[4] = x24;
out1[5] = x27;
out1[6] = x29;
out1[7] = x31;
out1[8] = x33;
out1[9] = x35;
out1[10] = x38;
out1[11] = x40;
out1[12] = x42;
out1[13] = x44;
out1[14] = x46;
out1[15] = x48;
out1[16] = x49;
}
/// The function fiat_poly1305_from_bytes deserializes a field element from bytes in little-endian order.
///
/// Postconditions:
/// eval out1 mod m = bytes_eval arg1 mod m
///
/// Input Bounds:
/// 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 ~> 0x3]]
#[inline]
pub fn fiat_poly1305_from_bytes(out1: &mut fiat_poly1305_tight_field_element, arg1: &[u8; 17]) {
let x1: u64 = (((arg1[16]) as u64) << 41);
let x2: u64 = (((arg1[15]) as u64) << 33);
let x3: u64 = (((arg1[14]) as u64) << 25);
let x4: u64 = (((arg1[13]) as u64) << 17);
let x5: u64 = (((arg1[12]) as u64) << 9);
let x6: u64 = (((arg1[11]) as u64) * (0x2 as u64));
let x7: u64 = (((arg1[10]) as u64) << 36);
let x8: u64 = (((arg1[9]) as u64) << 28);
let x9: u64 = (((arg1[8]) as u64) << 20);
let x10: u64 = (((arg1[7]) as u64) << 12);
let x11: u64 = (((arg1[6]) as u64) << 4);
let x12: u64 = (((arg1[5]) as u64) << 40);
let x13: u64 = (((arg1[4]) as u64) << 32);
let x14: u64 = (((arg1[3]) as u64) << 24);
let x15: u64 = (((arg1[2]) as u64) << 16);
let x16: u64 = (((arg1[1]) as u64) << 8);
let x17: u8 = (arg1[0]);
let x18: u64 = (x16 + (x17 as u64));
let x19: u64 = (x15 + x18);
let x20: u64 = (x14 + x19);
let x21: u64 = (x13 + x20);
let x22: u64 = (x12 + x21);
let x23: u64 = (x22 & 0xfffffffffff);
let x24: u8 = ((x22 >> 44) as u8);
let x25: u64 = (x11 + (x24 as u64));
let x26: u64 = (x10 + x25);
let x27: u64 = (x9 + x26);
let x28: u64 = (x8 + x27);
let x29: u64 = (x7 + x28);
let x30: u64 = (x29 & 0x7ffffffffff);
let x31: fiat_poly1305_u1 = ((x29 >> 43) as fiat_poly1305_u1);
let x32: u64 = (x6 + (x31 as u64));
let x33: u64 = (x5 + x32);
let x34: u64 = (x4 + x33);
let x35: u64 = (x3 + x34);
let x36: u64 = (x2 + x35);
let x37: u64 = (x1 + x36);
out1[0] = x23;
out1[1] = x30;
out1[2] = x37;
}
/// The function fiat_poly1305_relax is the identity function converting from tight field elements to loose field elements.
///
/// Postconditions:
/// out1 = arg1
///
#[inline]
pub fn fiat_poly1305_relax(out1: &mut fiat_poly1305_loose_field_element, arg1: &fiat_poly1305_tight_field_element) {
let x1: u64 = (arg1[0]);
let x2: u64 = (arg1[1]);
let x3: u64 = (arg1[2]);
out1[0] = x1;
out1[1] = x2;
out1[2] = x3;
}
@@ -0,0 +1,206 @@
//! Autogenerated: 'src/ExtractionOCaml/dettman_multiplication' --lang Rust --inline secp256k1_dettman 32 10 22 6 '2^256 - 4294968273' mul square
//! curve description: secp256k1_dettman
//! machine_wordsize = 32 (from "32")
//! requested operations: mul, square
//! n = 10 (from "10")
//! last_limb_width = 22 (from "22")
//! last_reduction = 6 (from "6")
//! s-c = 2^256 - [(1, 4294968273)] (from "2^256 - 4294968273")
//! inbounds_multiplier: None (from "")
//!
//! Computed values:
//!
//!
#![allow(unused_parens)]
#![allow(non_camel_case_types)]
/// The function fiat_secp256k1_dettman_mul multiplies two field elements.
///
/// Postconditions:
/// eval out1 mod 115792089237316195423570985008687907853269984665640564039457584007908834671663 = (eval arg1 * eval arg2) mod 115792089237316195423570985008687907853269984665640564039457584007908834671663
///
/// Input Bounds:
/// arg1: [[0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7ffffe]]
/// arg2: [[0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7ffffe]]
/// Output Bounds:
/// out1: [[0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x5fffff]]
#[inline]
pub fn fiat_secp256k1_dettman_mul(out1: &mut [u32; 10], arg1: &[u32; 10], arg2: &[u32; 10]) {
let x1: u64 = ((((arg1[8]) as u64) * ((arg2[9]) as u64)) + (((arg1[9]) as u64) * ((arg2[8]) as u64)));
let x2: u32 = ((x1 >> 26) as u32);
let x3: u32 = ((x1 & (0x3ffffff as u64)) as u32);
let x4: u64 = (((((arg1[0]) as u64) * ((arg2[7]) as u64)) + ((((arg1[1]) as u64) * ((arg2[6]) as u64)) + ((((arg1[2]) as u64) * ((arg2[5]) as u64)) + ((((arg1[3]) as u64) * ((arg2[4]) as u64)) + ((((arg1[4]) as u64) * ((arg2[3]) as u64)) + ((((arg1[5]) as u64) * ((arg2[2]) as u64)) + ((((arg1[6]) as u64) * ((arg2[1]) as u64)) + (((arg1[7]) as u64) * ((arg2[0]) as u64))))))))) + ((x3 as u64) * (0x3d10 as u64)));
let x5: u32 = ((x4 >> 26) as u32);
let x6: u32 = ((x4 & (0x3ffffff as u64)) as u32);
let x7: u64 = ((x2 as u64) + (((arg1[9]) as u64) * ((arg2[9]) as u64)));
let x8: u32 = ((x7 >> 32) as u32);
let x9: u32 = ((x7 & (0xffffffff as u64)) as u32);
let x10: u64 = (((x5 as u64) + (((((arg1[0]) as u64) * ((arg2[8]) as u64)) + ((((arg1[1]) as u64) * ((arg2[7]) as u64)) + ((((arg1[2]) as u64) * ((arg2[6]) as u64)) + ((((arg1[3]) as u64) * ((arg2[5]) as u64)) + ((((arg1[4]) as u64) * ((arg2[4]) as u64)) + ((((arg1[5]) as u64) * ((arg2[3]) as u64)) + ((((arg1[6]) as u64) * ((arg2[2]) as u64)) + ((((arg1[7]) as u64) * ((arg2[1]) as u64)) + (((arg1[8]) as u64) * ((arg2[0]) as u64)))))))))) + ((x3 as u64) << 10))) + ((x9 as u64) * (0x3d10 as u64)));
let x11: u32 = ((x10 >> 26) as u32);
let x12: u32 = ((x10 & (0x3ffffff as u64)) as u32);
let x13: u64 = (((x11 as u64) + (((((arg1[0]) as u64) * ((arg2[9]) as u64)) + ((((arg1[1]) as u64) * ((arg2[8]) as u64)) + ((((arg1[2]) as u64) * ((arg2[7]) as u64)) + ((((arg1[3]) as u64) * ((arg2[6]) as u64)) + ((((arg1[4]) as u64) * ((arg2[5]) as u64)) + ((((arg1[5]) as u64) * ((arg2[4]) as u64)) + ((((arg1[6]) as u64) * ((arg2[3]) as u64)) + ((((arg1[7]) as u64) * ((arg2[2]) as u64)) + ((((arg1[8]) as u64) * ((arg2[1]) as u64)) + (((arg1[9]) as u64) * ((arg2[0]) as u64))))))))))) + ((x9 as u64) << 10))) + ((x8 as u64) * (0xf4400 as u64)));
let x14: u32 = ((x13 >> 26) as u32);
let x15: u32 = ((x13 & (0x3ffffff as u64)) as u32);
let x16: u64 = ((x14 as u64) + (((((arg1[1]) as u64) * ((arg2[9]) as u64)) + ((((arg1[2]) as u64) * ((arg2[8]) as u64)) + ((((arg1[3]) as u64) * ((arg2[7]) as u64)) + ((((arg1[4]) as u64) * ((arg2[6]) as u64)) + ((((arg1[5]) as u64) * ((arg2[5]) as u64)) + ((((arg1[6]) as u64) * ((arg2[4]) as u64)) + ((((arg1[7]) as u64) * ((arg2[3]) as u64)) + ((((arg1[8]) as u64) * ((arg2[2]) as u64)) + (((arg1[9]) as u64) * ((arg2[1]) as u64)))))))))) + ((x8 << 16) as u64)));
let x17: u32 = ((x16 >> 26) as u32);
let x18: u32 = ((x16 & (0x3ffffff as u64)) as u32);
let x19: u32 = (x15 >> 22);
let x20: u32 = (x15 & 0x3fffff);
let x21: u64 = ((((arg1[0]) as u64) * ((arg2[0]) as u64)) + (((x19 + (x18 << 4)) as u64) * (0x3d1 as u64)));
let x22: u32 = ((x21 >> 26) as u32);
let x23: u32 = ((x21 & (0x3ffffff as u64)) as u32);
let x24: u64 = ((x17 as u64) + ((((arg1[2]) as u64) * ((arg2[9]) as u64)) + ((((arg1[3]) as u64) * ((arg2[8]) as u64)) + ((((arg1[4]) as u64) * ((arg2[7]) as u64)) + ((((arg1[5]) as u64) * ((arg2[6]) as u64)) + ((((arg1[6]) as u64) * ((arg2[5]) as u64)) + ((((arg1[7]) as u64) * ((arg2[4]) as u64)) + ((((arg1[8]) as u64) * ((arg2[3]) as u64)) + (((arg1[9]) as u64) * ((arg2[2]) as u64))))))))));
let x25: u32 = ((x24 >> 26) as u32);
let x26: u32 = ((x24 & (0x3ffffff as u64)) as u32);
let x27: u64 = (((x22 as u64) + (((((arg1[0]) as u64) * ((arg2[1]) as u64)) + (((arg1[1]) as u64) * ((arg2[0]) as u64))) + (((x19 + (x18 << 4)) as u64) << 6))) + ((x26 as u64) * (0x3d10 as u64)));
let x28: u32 = ((x27 >> 26) as u32);
let x29: u32 = ((x27 & (0x3ffffff as u64)) as u32);
let x30: u64 = ((x25 as u64) + ((((arg1[3]) as u64) * ((arg2[9]) as u64)) + ((((arg1[4]) as u64) * ((arg2[8]) as u64)) + ((((arg1[5]) as u64) * ((arg2[7]) as u64)) + ((((arg1[6]) as u64) * ((arg2[6]) as u64)) + ((((arg1[7]) as u64) * ((arg2[5]) as u64)) + ((((arg1[8]) as u64) * ((arg2[4]) as u64)) + (((arg1[9]) as u64) * ((arg2[3]) as u64)))))))));
let x31: u32 = ((x30 >> 26) as u32);
let x32: u32 = ((x30 & (0x3ffffff as u64)) as u32);
let x33: u64 = (((x28 as u64) + (((((arg1[0]) as u64) * ((arg2[2]) as u64)) + ((((arg1[1]) as u64) * ((arg2[1]) as u64)) + (((arg1[2]) as u64) * ((arg2[0]) as u64)))) + ((x26 as u64) << 10))) + ((x32 as u64) * (0x3d10 as u64)));
let x34: u32 = ((x33 >> 26) as u32);
let x35: u32 = ((x33 & (0x3ffffff as u64)) as u32);
let x36: u64 = ((x31 as u64) + ((((arg1[4]) as u64) * ((arg2[9]) as u64)) + ((((arg1[5]) as u64) * ((arg2[8]) as u64)) + ((((arg1[6]) as u64) * ((arg2[7]) as u64)) + ((((arg1[7]) as u64) * ((arg2[6]) as u64)) + ((((arg1[8]) as u64) * ((arg2[5]) as u64)) + (((arg1[9]) as u64) * ((arg2[4]) as u64))))))));
let x37: u32 = ((x36 >> 26) as u32);
let x38: u32 = ((x36 & (0x3ffffff as u64)) as u32);
let x39: u64 = (((x34 as u64) + (((((arg1[0]) as u64) * ((arg2[3]) as u64)) + ((((arg1[1]) as u64) * ((arg2[2]) as u64)) + ((((arg1[2]) as u64) * ((arg2[1]) as u64)) + (((arg1[3]) as u64) * ((arg2[0]) as u64))))) + ((x32 as u64) << 10))) + ((x38 as u64) * (0x3d10 as u64)));
let x40: u32 = ((x39 >> 26) as u32);
let x41: u32 = ((x39 & (0x3ffffff as u64)) as u32);
let x42: u64 = ((x37 as u64) + ((((arg1[5]) as u64) * ((arg2[9]) as u64)) + ((((arg1[6]) as u64) * ((arg2[8]) as u64)) + ((((arg1[7]) as u64) * ((arg2[7]) as u64)) + ((((arg1[8]) as u64) * ((arg2[6]) as u64)) + (((arg1[9]) as u64) * ((arg2[5]) as u64)))))));
let x43: u32 = ((x42 >> 26) as u32);
let x44: u32 = ((x42 & (0x3ffffff as u64)) as u32);
let x45: u64 = (((x40 as u64) + (((((arg1[0]) as u64) * ((arg2[4]) as u64)) + ((((arg1[1]) as u64) * ((arg2[3]) as u64)) + ((((arg1[2]) as u64) * ((arg2[2]) as u64)) + ((((arg1[3]) as u64) * ((arg2[1]) as u64)) + (((arg1[4]) as u64) * ((arg2[0]) as u64)))))) + ((x38 as u64) << 10))) + ((x44 as u64) * (0x3d10 as u64)));
let x46: u32 = ((x45 >> 26) as u32);
let x47: u32 = ((x45 & (0x3ffffff as u64)) as u32);
let x48: u64 = ((x43 as u64) + ((((arg1[6]) as u64) * ((arg2[9]) as u64)) + ((((arg1[7]) as u64) * ((arg2[8]) as u64)) + ((((arg1[8]) as u64) * ((arg2[7]) as u64)) + (((arg1[9]) as u64) * ((arg2[6]) as u64))))));
let x49: u32 = ((x48 >> 26) as u32);
let x50: u32 = ((x48 & (0x3ffffff as u64)) as u32);
let x51: u64 = (((x46 as u64) + (((((arg1[0]) as u64) * ((arg2[5]) as u64)) + ((((arg1[1]) as u64) * ((arg2[4]) as u64)) + ((((arg1[2]) as u64) * ((arg2[3]) as u64)) + ((((arg1[3]) as u64) * ((arg2[2]) as u64)) + ((((arg1[4]) as u64) * ((arg2[1]) as u64)) + (((arg1[5]) as u64) * ((arg2[0]) as u64))))))) + ((x44 as u64) << 10))) + ((x50 as u64) * (0x3d10 as u64)));
let x52: u32 = ((x51 >> 26) as u32);
let x53: u32 = ((x51 & (0x3ffffff as u64)) as u32);
let x54: u64 = ((x49 as u64) + ((((arg1[7]) as u64) * ((arg2[9]) as u64)) + ((((arg1[8]) as u64) * ((arg2[8]) as u64)) + (((arg1[9]) as u64) * ((arg2[7]) as u64)))));
let x55: u32 = ((x54 >> 32) as u32);
let x56: u32 = ((x54 & (0xffffffff as u64)) as u32);
let x57: u64 = (((x52 as u64) + (((((arg1[0]) as u64) * ((arg2[6]) as u64)) + ((((arg1[1]) as u64) * ((arg2[5]) as u64)) + ((((arg1[2]) as u64) * ((arg2[4]) as u64)) + ((((arg1[3]) as u64) * ((arg2[3]) as u64)) + ((((arg1[4]) as u64) * ((arg2[2]) as u64)) + ((((arg1[5]) as u64) * ((arg2[1]) as u64)) + (((arg1[6]) as u64) * ((arg2[0]) as u64)))))))) + ((x50 as u64) << 10))) + ((x56 as u64) * (0x3d10 as u64)));
let x58: u32 = ((x57 >> 26) as u32);
let x59: u32 = ((x57 & (0x3ffffff as u64)) as u32);
let x60: u64 = (((x58 as u64) + ((x6 as u64) + ((x56 as u64) << 10))) + ((x55 as u64) * (0xf4400 as u64)));
let x61: u32 = ((x60 >> 26) as u32);
let x62: u32 = ((x60 & (0x3ffffff as u64)) as u32);
let x63: u64 = ((x61 as u64) + ((x12 as u64) + ((x55 as u64) << 16)));
let x64: u32 = ((x63 >> 26) as u32);
let x65: u32 = ((x63 & (0x3ffffff as u64)) as u32);
let x66: u32 = (x64 + x20);
out1[0] = x23;
out1[1] = x29;
out1[2] = x35;
out1[3] = x41;
out1[4] = x47;
out1[5] = x53;
out1[6] = x59;
out1[7] = x62;
out1[8] = x65;
out1[9] = x66;
}
/// The function fiat_secp256k1_dettman_square squares a field element.
///
/// Postconditions:
/// eval out1 mod 115792089237316195423570985008687907853269984665640564039457584007908834671663 = (eval arg1 * eval arg1) mod 115792089237316195423570985008687907853269984665640564039457584007908834671663
///
/// Input Bounds:
/// arg1: [[0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7ffffe]]
/// Output Bounds:
/// out1: [[0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x7fffffe], [0x0 ~> 0x5fffff]]
#[inline]
pub fn fiat_secp256k1_dettman_square(out1: &mut [u32; 10], arg1: &[u32; 10]) {
let x1: u32 = ((arg1[8]) * 0x2);
let x2: u32 = ((arg1[7]) * 0x2);
let x3: u32 = ((arg1[6]) * 0x2);
let x4: u32 = ((arg1[5]) * 0x2);
let x5: u32 = ((arg1[4]) * 0x2);
let x6: u32 = ((arg1[3]) * 0x2);
let x7: u32 = ((arg1[2]) * 0x2);
let x8: u32 = ((arg1[1]) * 0x2);
let x9: u32 = ((arg1[0]) * 0x2);
let x10: u64 = ((x1 as u64) * ((arg1[9]) as u64));
let x11: u32 = ((x10 >> 26) as u32);
let x12: u32 = ((x10 & (0x3ffffff as u64)) as u32);
let x13: u64 = ((((x9 as u64) * ((arg1[7]) as u64)) + (((x8 as u64) * ((arg1[6]) as u64)) + (((x7 as u64) * ((arg1[5]) as u64)) + ((x6 as u64) * ((arg1[4]) as u64))))) + ((x12 as u64) * (0x3d10 as u64)));
let x14: u32 = ((x13 >> 26) as u32);
let x15: u32 = ((x13 & (0x3ffffff as u64)) as u32);
let x16: u64 = ((x11 as u64) + (((arg1[9]) as u64) * ((arg1[9]) as u64)));
let x17: u32 = ((x16 >> 32) as u32);
let x18: u32 = ((x16 & (0xffffffff as u64)) as u32);
let x19: u64 = (((x14 as u64) + ((((x9 as u64) * ((arg1[8]) as u64)) + (((x8 as u64) * ((arg1[7]) as u64)) + (((x7 as u64) * ((arg1[6]) as u64)) + (((x6 as u64) * ((arg1[5]) as u64)) + (((arg1[4]) as u64) * ((arg1[4]) as u64)))))) + ((x12 as u64) << 10))) + ((x18 as u64) * (0x3d10 as u64)));
let x20: u32 = ((x19 >> 26) as u32);
let x21: u32 = ((x19 & (0x3ffffff as u64)) as u32);
let x22: u64 = (((x20 as u64) + ((((x9 as u64) * ((arg1[9]) as u64)) + (((x8 as u64) * ((arg1[8]) as u64)) + (((x7 as u64) * ((arg1[7]) as u64)) + (((x6 as u64) * ((arg1[6]) as u64)) + ((x5 as u64) * ((arg1[5]) as u64)))))) + ((x18 as u64) << 10))) + ((x17 as u64) * (0xf4400 as u64)));
let x23: u32 = ((x22 >> 26) as u32);
let x24: u32 = ((x22 & (0x3ffffff as u64)) as u32);
let x25: u64 = ((x23 as u64) + ((((x8 as u64) * ((arg1[9]) as u64)) + (((x7 as u64) * ((arg1[8]) as u64)) + (((x6 as u64) * ((arg1[7]) as u64)) + (((x5 as u64) * ((arg1[6]) as u64)) + (((arg1[5]) as u64) * ((arg1[5]) as u64)))))) + ((x17 << 16) as u64)));
let x26: u32 = ((x25 >> 26) as u32);
let x27: u32 = ((x25 & (0x3ffffff as u64)) as u32);
let x28: u32 = (x24 >> 22);
let x29: u32 = (x24 & 0x3fffff);
let x30: u64 = ((((arg1[0]) as u64) * ((arg1[0]) as u64)) + (((x28 + (x27 << 4)) as u64) * (0x3d1 as u64)));
let x31: u32 = ((x30 >> 26) as u32);
let x32: u32 = ((x30 & (0x3ffffff as u64)) as u32);
let x33: u64 = ((x26 as u64) + (((x7 as u64) * ((arg1[9]) as u64)) + (((x6 as u64) * ((arg1[8]) as u64)) + (((x5 as u64) * ((arg1[7]) as u64)) + ((x4 as u64) * ((arg1[6]) as u64))))));
let x34: u32 = ((x33 >> 26) as u32);
let x35: u32 = ((x33 & (0x3ffffff as u64)) as u32);
let x36: u64 = (((x31 as u64) + (((x9 as u64) * ((arg1[1]) as u64)) + (((x28 + (x27 << 4)) as u64) << 6))) + ((x35 as u64) * (0x3d10 as u64)));
let x37: u32 = ((x36 >> 26) as u32);
let x38: u32 = ((x36 & (0x3ffffff as u64)) as u32);
let x39: u64 = ((x34 as u64) + (((x6 as u64) * ((arg1[9]) as u64)) + (((x5 as u64) * ((arg1[8]) as u64)) + (((x4 as u64) * ((arg1[7]) as u64)) + (((arg1[6]) as u64) * ((arg1[6]) as u64))))));
let x40: u32 = ((x39 >> 26) as u32);
let x41: u32 = ((x39 & (0x3ffffff as u64)) as u32);
let x42: u64 = (((x37 as u64) + ((((x9 as u64) * ((arg1[2]) as u64)) + (((arg1[1]) as u64) * ((arg1[1]) as u64))) + ((x35 as u64) << 10))) + ((x41 as u64) * (0x3d10 as u64)));
let x43: u32 = ((x42 >> 26) as u32);
let x44: u32 = ((x42 & (0x3ffffff as u64)) as u32);
let x45: u64 = ((x40 as u64) + (((x5 as u64) * ((arg1[9]) as u64)) + (((x4 as u64) * ((arg1[8]) as u64)) + ((x3 as u64) * ((arg1[7]) as u64)))));
let x46: u32 = ((x45 >> 26) as u32);
let x47: u32 = ((x45 & (0x3ffffff as u64)) as u32);
let x48: u64 = (((x43 as u64) + ((((x9 as u64) * ((arg1[3]) as u64)) + ((x8 as u64) * ((arg1[2]) as u64))) + ((x41 as u64) << 10))) + ((x47 as u64) * (0x3d10 as u64)));
let x49: u32 = ((x48 >> 26) as u32);
let x50: u32 = ((x48 & (0x3ffffff as u64)) as u32);
let x51: u64 = ((x46 as u64) + (((x4 as u64) * ((arg1[9]) as u64)) + (((x3 as u64) * ((arg1[8]) as u64)) + (((arg1[7]) as u64) * ((arg1[7]) as u64)))));
let x52: u32 = ((x51 >> 26) as u32);
let x53: u32 = ((x51 & (0x3ffffff as u64)) as u32);
let x54: u64 = (((x49 as u64) + ((((x9 as u64) * ((arg1[4]) as u64)) + (((x8 as u64) * ((arg1[3]) as u64)) + (((arg1[2]) as u64) * ((arg1[2]) as u64)))) + ((x47 as u64) << 10))) + ((x53 as u64) * (0x3d10 as u64)));
let x55: u32 = ((x54 >> 26) as u32);
let x56: u32 = ((x54 & (0x3ffffff as u64)) as u32);
let x57: u64 = ((x52 as u64) + (((x3 as u64) * ((arg1[9]) as u64)) + ((x2 as u64) * ((arg1[8]) as u64))));
let x58: u32 = ((x57 >> 26) as u32);
let x59: u32 = ((x57 & (0x3ffffff as u64)) as u32);
let x60: u64 = (((x55 as u64) + ((((x9 as u64) * ((arg1[5]) as u64)) + (((x8 as u64) * ((arg1[4]) as u64)) + ((x7 as u64) * ((arg1[3]) as u64)))) + ((x53 as u64) << 10))) + ((x59 as u64) * (0x3d10 as u64)));
let x61: u32 = ((x60 >> 26) as u32);
let x62: u32 = ((x60 & (0x3ffffff as u64)) as u32);
let x63: u64 = ((x58 as u64) + (((x2 as u64) * ((arg1[9]) as u64)) + (((arg1[8]) as u64) * ((arg1[8]) as u64))));
let x64: u32 = ((x63 >> 32) as u32);
let x65: u32 = ((x63 & (0xffffffff as u64)) as u32);
let x66: u64 = (((x61 as u64) + ((((x9 as u64) * ((arg1[6]) as u64)) + (((x8 as u64) * ((arg1[5]) as u64)) + (((x7 as u64) * ((arg1[4]) as u64)) + (((arg1[3]) as u64) * ((arg1[3]) as u64))))) + ((x59 as u64) << 10))) + ((x65 as u64) * (0x3d10 as u64)));
let x67: u32 = ((x66 >> 26) as u32);
let x68: u32 = ((x66 & (0x3ffffff as u64)) as u32);
let x69: u64 = (((x67 as u64) + ((x15 as u64) + ((x65 as u64) << 10))) + ((x64 as u64) * (0xf4400 as u64)));
let x70: u32 = ((x69 >> 26) as u32);
let x71: u32 = ((x69 & (0x3ffffff as u64)) as u32);
let x72: u64 = ((x70 as u64) + ((x21 as u64) + ((x64 as u64) << 16)));
let x73: u32 = ((x72 >> 26) as u32);
let x74: u32 = ((x72 & (0x3ffffff as u64)) as u32);
let x75: u32 = (x73 + x29);
out1[0] = x32;
out1[1] = x38;
out1[2] = x44;
out1[3] = x50;
out1[4] = x56;
out1[5] = x62;
out1[6] = x68;
out1[7] = x71;
out1[8] = x74;
out1[9] = x75;
}
@@ -0,0 +1,125 @@
//! Autogenerated: 'src/ExtractionOCaml/dettman_multiplication' --lang Rust --inline secp256k1_dettman 64 5 48 2 '2^256 - 4294968273' mul square
//! curve description: secp256k1_dettman
//! machine_wordsize = 64 (from "64")
//! requested operations: mul, square
//! n = 5 (from "5")
//! last_limb_width = 48 (from "48")
//! last_reduction = 2 (from "2")
//! s-c = 2^256 - [(1, 4294968273)] (from "2^256 - 4294968273")
//! inbounds_multiplier: None (from "")
//!
//! Computed values:
//!
//!
#![allow(unused_parens)]
#![allow(non_camel_case_types)]
/// The function fiat_secp256k1_dettman_mul multiplies two field elements.
///
/// Postconditions:
/// eval out1 mod 115792089237316195423570985008687907853269984665640564039457584007908834671663 = (eval arg1 * eval arg2) mod 115792089237316195423570985008687907853269984665640564039457584007908834671663
///
/// Input Bounds:
/// arg1: [[0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1fffffffffffe]]
/// arg2: [[0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1fffffffffffe]]
/// Output Bounds:
/// out1: [[0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x17fffffffffff]]
#[inline]
pub fn fiat_secp256k1_dettman_mul(out1: &mut [u64; 5], arg1: &[u64; 5], arg2: &[u64; 5]) {
let x1: u128 = (((arg1[4]) as u128) * ((arg2[4]) as u128));
let x2: u64 = ((x1 >> 64) as u64);
let x3: u64 = ((x1 & (0xffffffffffffffff as u128)) as u64);
let x4: u128 = (((((arg1[0]) as u128) * ((arg2[3]) as u128)) + ((((arg1[1]) as u128) * ((arg2[2]) as u128)) + ((((arg1[2]) as u128) * ((arg2[1]) as u128)) + (((arg1[3]) as u128) * ((arg2[0]) as u128))))) + ((x3 as u128) * (0x1000003d10 as u128)));
let x5: u64 = ((x4 >> 52) as u64);
let x6: u64 = ((x4 & (0xfffffffffffff as u128)) as u64);
let x7: u128 = (((x5 as u128) + ((((arg1[0]) as u128) * ((arg2[4]) as u128)) + ((((arg1[1]) as u128) * ((arg2[3]) as u128)) + ((((arg1[2]) as u128) * ((arg2[2]) as u128)) + ((((arg1[3]) as u128) * ((arg2[1]) as u128)) + (((arg1[4]) as u128) * ((arg2[0]) as u128))))))) + ((x2 as u128) * (0x1000003d10000 as u128)));
let x8: u64 = ((x7 >> 52) as u64);
let x9: u64 = ((x7 & (0xfffffffffffff as u128)) as u64);
let x10: u128 = ((x8 as u128) + ((((arg1[1]) as u128) * ((arg2[4]) as u128)) + ((((arg1[2]) as u128) * ((arg2[3]) as u128)) + ((((arg1[3]) as u128) * ((arg2[2]) as u128)) + (((arg1[4]) as u128) * ((arg2[1]) as u128))))));
let x11: u64 = ((x10 >> 52) as u64);
let x12: u64 = ((x10 & (0xfffffffffffff as u128)) as u64);
let x13: u64 = (x9 >> 48);
let x14: u64 = (x9 & 0xffffffffffff);
let x15: u128 = ((((arg1[0]) as u128) * ((arg2[0]) as u128)) + (((x13 + (x12 << 4)) as u128) * (0x1000003d1 as u128)));
let x16: u64 = ((x15 >> 52) as u64);
let x17: u64 = ((x15 & (0xfffffffffffff as u128)) as u64);
let x18: u128 = ((x11 as u128) + ((((arg1[2]) as u128) * ((arg2[4]) as u128)) + ((((arg1[3]) as u128) * ((arg2[3]) as u128)) + (((arg1[4]) as u128) * ((arg2[2]) as u128)))));
let x19: u64 = ((x18 >> 52) as u64);
let x20: u64 = ((x18 & (0xfffffffffffff as u128)) as u64);
let x21: u128 = (((x16 as u128) + ((((arg1[0]) as u128) * ((arg2[1]) as u128)) + (((arg1[1]) as u128) * ((arg2[0]) as u128)))) + ((x20 as u128) * (0x1000003d10 as u128)));
let x22: u64 = ((x21 >> 52) as u64);
let x23: u64 = ((x21 & (0xfffffffffffff as u128)) as u64);
let x24: u128 = ((x19 as u128) + ((((arg1[3]) as u128) * ((arg2[4]) as u128)) + (((arg1[4]) as u128) * ((arg2[3]) as u128))));
let x25: u64 = ((x24 >> 64) as u64);
let x26: u64 = ((x24 & (0xffffffffffffffff as u128)) as u64);
let x27: u128 = (((x22 as u128) + ((((arg1[0]) as u128) * ((arg2[2]) as u128)) + ((((arg1[1]) as u128) * ((arg2[1]) as u128)) + (((arg1[2]) as u128) * ((arg2[0]) as u128))))) + ((x26 as u128) * (0x1000003d10 as u128)));
let x28: u64 = ((x27 >> 52) as u64);
let x29: u64 = ((x27 & (0xfffffffffffff as u128)) as u64);
let x30: u128 = (((x28 + x6) as u128) + ((x25 as u128) * (0x1000003d10000 as u128)));
let x31: u64 = ((x30 >> 52) as u64);
let x32: u64 = ((x30 & (0xfffffffffffff as u128)) as u64);
let x33: u64 = (x31 + x14);
out1[0] = x17;
out1[1] = x23;
out1[2] = x29;
out1[3] = x32;
out1[4] = x33;
}
/// The function fiat_secp256k1_dettman_square squares a field element.
///
/// Postconditions:
/// eval out1 mod 115792089237316195423570985008687907853269984665640564039457584007908834671663 = (eval arg1 * eval arg1) mod 115792089237316195423570985008687907853269984665640564039457584007908834671663
///
/// Input Bounds:
/// arg1: [[0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1fffffffffffe]]
/// Output Bounds:
/// out1: [[0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x17fffffffffff]]
#[inline]
pub fn fiat_secp256k1_dettman_square(out1: &mut [u64; 5], arg1: &[u64; 5]) {
let x1: u64 = ((arg1[3]) * 0x2);
let x2: u64 = ((arg1[2]) * 0x2);
let x3: u64 = ((arg1[1]) * 0x2);
let x4: u64 = ((arg1[0]) * 0x2);
let x5: u128 = (((arg1[4]) as u128) * ((arg1[4]) as u128));
let x6: u64 = ((x5 >> 64) as u64);
let x7: u64 = ((x5 & (0xffffffffffffffff as u128)) as u64);
let x8: u128 = ((((x4 as u128) * ((arg1[3]) as u128)) + ((x3 as u128) * ((arg1[2]) as u128))) + ((x7 as u128) * (0x1000003d10 as u128)));
let x9: u64 = ((x8 >> 52) as u64);
let x10: u64 = ((x8 & (0xfffffffffffff as u128)) as u64);
let x11: u128 = (((x9 as u128) + (((x4 as u128) * ((arg1[4]) as u128)) + (((x3 as u128) * ((arg1[3]) as u128)) + (((arg1[2]) as u128) * ((arg1[2]) as u128))))) + ((x6 as u128) * (0x1000003d10000 as u128)));
let x12: u64 = ((x11 >> 52) as u64);
let x13: u64 = ((x11 & (0xfffffffffffff as u128)) as u64);
let x14: u128 = ((x12 as u128) + (((x3 as u128) * ((arg1[4]) as u128)) + ((x2 as u128) * ((arg1[3]) as u128))));
let x15: u64 = ((x14 >> 52) as u64);
let x16: u64 = ((x14 & (0xfffffffffffff as u128)) as u64);
let x17: u64 = (x13 >> 48);
let x18: u64 = (x13 & 0xffffffffffff);
let x19: u128 = ((((arg1[0]) as u128) * ((arg1[0]) as u128)) + (((x17 + (x16 << 4)) as u128) * (0x1000003d1 as u128)));
let x20: u64 = ((x19 >> 52) as u64);
let x21: u64 = ((x19 & (0xfffffffffffff as u128)) as u64);
let x22: u128 = ((x15 as u128) + (((x2 as u128) * ((arg1[4]) as u128)) + (((arg1[3]) as u128) * ((arg1[3]) as u128))));
let x23: u64 = ((x22 >> 52) as u64);
let x24: u64 = ((x22 & (0xfffffffffffff as u128)) as u64);
let x25: u128 = (((x20 as u128) + ((x4 as u128) * ((arg1[1]) as u128))) + ((x24 as u128) * (0x1000003d10 as u128)));
let x26: u64 = ((x25 >> 52) as u64);
let x27: u64 = ((x25 & (0xfffffffffffff as u128)) as u64);
let x28: u128 = ((x23 as u128) + ((x1 as u128) * ((arg1[4]) as u128)));
let x29: u64 = ((x28 >> 64) as u64);
let x30: u64 = ((x28 & (0xffffffffffffffff as u128)) as u64);
let x31: u128 = (((x26 as u128) + (((x4 as u128) * ((arg1[2]) as u128)) + (((arg1[1]) as u128) * ((arg1[1]) as u128)))) + ((x30 as u128) * (0x1000003d10 as u128)));
let x32: u64 = ((x31 >> 52) as u64);
let x33: u64 = ((x31 & (0xfffffffffffff as u128)) as u64);
let x34: u128 = (((x32 + x10) as u128) + ((x29 as u128) * (0x1000003d10000 as u128)));
let x35: u64 = ((x34 >> 52) as u64);
let x36: u64 = ((x34 & (0xfffffffffffff as u128)) as u64);
let x37: u64 = (x35 + x18);
out1[0] = x21;
out1[1] = x27;
out1[2] = x33;
out1[3] = x36;
out1[4] = x37;
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff