// Autogenerated: 'src/ExtractionOCaml/word_by_word_montgomery' --lang Zig --internal-static --public-function-case camelCase --private-function-case camelCase --public-type-case UpperCamelCase --private-type-case UpperCamelCase --no-prefix-fiat --package-name p256_scalar '' 32 '2^256 - 2^224 + 2^192 - 89188191075325690597107910205041859247' mul square add sub opp from_montgomery to_montgomery nonzero selectznz to_bytes from_bytes one msat divstep divstep_precomp
// curve description (via package name): p256_scalar
// machine_wordsize = 32 (from "32")
// requested operations: mul, square, add, sub, opp, from_montgomery, to_montgomery, nonzero, selectznz, to_bytes, from_bytes, one, msat, divstep, divstep_precomp
// m = 0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551 (from "2^256 - 2^224 + 2^192 - 89188191075325690597107910205041859247")
//
// NOTE: In addition to the bounds specified above each function, all
//   functions synthesized for this Montgomery arithmetic require the
//   input to be strictly less than the prime modulus (m), and also
//   require the input to be in the unique saturated representation.
//   All functions also ensure that these two properties are true of
//   return values.
//
// Computed values:
//   eval z = z[0] + (z[1] << 32) + (z[2] << 64) + (z[3] << 96) + (z[4] << 128) + (z[5] << 160) + (z[6] << 192) + (z[7] << 224)
//   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)
//   twos_complement_eval z = let x1 := z[0] + (z[1] << 32) + (z[2] << 64) + (z[3] << 96) + (z[4] << 128) + (z[5] << 160) + (z[6] << 192) + (z[7] << 224) in
//                            if x1 & (2^256-1) < 2^255 then x1 & (2^256-1) else (x1 & (2^256-1)) - 2^256

const std = @import("std");
const mode = @import("builtin").mode; // Checked arithmetic is disabled in non-debug modes to avoid side channels

inline fn cast(comptime DestType: type, target: anytype) DestType {
    @setEvalBranchQuota(10000);
    if (@typeInfo(@TypeOf(target)) == .int) {
        const dest = @typeInfo(DestType).int;
        const source = @typeInfo(@TypeOf(target)).int;
        if (dest.bits < source.bits) {
            const T = std.meta.Int(source.signedness, dest.bits);
            return @bitCast(@as(T, @truncate(target)));
        }
    }
    return target;
}

// The type MontgomeryDomainFieldElement is a field element in the Montgomery domain.
// Bounds: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
pub const MontgomeryDomainFieldElement = [8]u32;

// The type NonMontgomeryDomainFieldElement is a field element NOT in the Montgomery domain.
// Bounds: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
pub const NonMontgomeryDomainFieldElement = [8]u32;

/// The function addcarryxU32 is an addition with carry.
///
/// Postconditions:
///   out1 = (arg1 + arg2 + arg3) mod 2^32
///   out2 = ⌊(arg1 + arg2 + arg3) / 2^32⌋
///
/// Input Bounds:
///   arg1: [0x0 ~> 0x1]
///   arg2: [0x0 ~> 0xffffffff]
///   arg3: [0x0 ~> 0xffffffff]
/// Output Bounds:
///   out1: [0x0 ~> 0xffffffff]
///   out2: [0x0 ~> 0x1]
inline fn addcarryxU32(out1: *u32, out2: *u1, arg1: u1, arg2: u32, arg3: u32) void {
    @setRuntimeSafety(mode == .Debug);

    const x1 = ((cast(u64, arg1) + cast(u64, arg2)) + cast(u64, arg3));
    const x2 = cast(u32, (x1 & cast(u64, 0xffffffff)));
    const x3 = cast(u1, (x1 >> 32));
    out1.* = x2;
    out2.* = x3;
}

/// The function subborrowxU32 is a subtraction with borrow.
///
/// Postconditions:
///   out1 = (-arg1 + arg2 + -arg3) mod 2^32
///   out2 = -⌊(-arg1 + arg2 + -arg3) / 2^32⌋
///
/// Input Bounds:
///   arg1: [0x0 ~> 0x1]
///   arg2: [0x0 ~> 0xffffffff]
///   arg3: [0x0 ~> 0xffffffff]
/// Output Bounds:
///   out1: [0x0 ~> 0xffffffff]
///   out2: [0x0 ~> 0x1]
inline fn subborrowxU32(out1: *u32, out2: *u1, arg1: u1, arg2: u32, arg3: u32) void {
    @setRuntimeSafety(mode == .Debug);

    const x1 = ((cast(i64, arg2) - cast(i64, arg1)) - cast(i64, arg3));
    const x2 = cast(i1, (x1 >> 32));
    const x3 = cast(u32, (x1 & cast(i64, 0xffffffff)));
    out1.* = x3;
    out2.* = cast(u1, (cast(i2, 0x0) - cast(i2, x2)));
}

/// The function mulxU32 is a multiplication, returning the full double-width result.
///
/// Postconditions:
///   out1 = (arg1 * arg2) mod 2^32
///   out2 = ⌊arg1 * arg2 / 2^32⌋
///
/// Input Bounds:
///   arg1: [0x0 ~> 0xffffffff]
///   arg2: [0x0 ~> 0xffffffff]
/// Output Bounds:
///   out1: [0x0 ~> 0xffffffff]
///   out2: [0x0 ~> 0xffffffff]
inline fn mulxU32(out1: *u32, out2: *u32, arg1: u32, arg2: u32) void {
    @setRuntimeSafety(mode == .Debug);

    const x1 = (cast(u64, arg1) * cast(u64, arg2));
    const x2 = cast(u32, (x1 & cast(u64, 0xffffffff)));
    const x3 = cast(u32, (x1 >> 32));
    out1.* = x2;
    out2.* = x3;
}

/// The function cmovznzU32 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 fn cmovznzU32(out1: *u32, arg1: u1, arg2: u32, arg3: u32) void {
    @setRuntimeSafety(mode == .Debug);

    const x1 = (~(~arg1));
    const x2 = cast(u32, (cast(i64, cast(i1, (cast(i2, 0x0) - cast(i2, x1)))) & cast(i64, 0xffffffff)));
    const x3 = ((x2 & arg3) | ((~x2) & arg2));
    out1.* = x3;
}

/// The function mul multiplies two field elements in the Montgomery domain.
///
/// Preconditions:
///   0 ≤ eval arg1 < m
///   0 ≤ eval arg2 < m
/// Postconditions:
///   eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) * eval (from_montgomery arg2)) mod m
///   0 ≤ eval out1 < m
///
pub fn mul(out1: *MontgomeryDomainFieldElement, arg1: MontgomeryDomainFieldElement, arg2: MontgomeryDomainFieldElement) void {
    @setRuntimeSafety(mode == .Debug);

    const x1 = (arg1[1]);
    const x2 = (arg1[2]);
    const x3 = (arg1[3]);
    const x4 = (arg1[4]);
    const x5 = (arg1[5]);
    const x6 = (arg1[6]);
    const x7 = (arg1[7]);
    const x8 = (arg1[0]);
    var x9: u32 = undefined;
    var x10: u32 = undefined;
    mulxU32(&x9, &x10, x8, (arg2[7]));
    var x11: u32 = undefined;
    var x12: u32 = undefined;
    mulxU32(&x11, &x12, x8, (arg2[6]));
    var x13: u32 = undefined;
    var x14: u32 = undefined;
    mulxU32(&x13, &x14, x8, (arg2[5]));
    var x15: u32 = undefined;
    var x16: u32 = undefined;
    mulxU32(&x15, &x16, x8, (arg2[4]));
    var x17: u32 = undefined;
    var x18: u32 = undefined;
    mulxU32(&x17, &x18, x8, (arg2[3]));
    var x19: u32 = undefined;
    var x20: u32 = undefined;
    mulxU32(&x19, &x20, x8, (arg2[2]));
    var x21: u32 = undefined;
    var x22: u32 = undefined;
    mulxU32(&x21, &x22, x8, (arg2[1]));
    var x23: u32 = undefined;
    var x24: u32 = undefined;
    mulxU32(&x23, &x24, x8, (arg2[0]));
    var x25: u32 = undefined;
    var x26: u1 = undefined;
    addcarryxU32(&x25, &x26, 0x0, x24, x21);
    var x27: u32 = undefined;
    var x28: u1 = undefined;
    addcarryxU32(&x27, &x28, x26, x22, x19);
    var x29: u32 = undefined;
    var x30: u1 = undefined;
    addcarryxU32(&x29, &x30, x28, x20, x17);
    var x31: u32 = undefined;
    var x32: u1 = undefined;
    addcarryxU32(&x31, &x32, x30, x18, x15);
    var x33: u32 = undefined;
    var x34: u1 = undefined;
    addcarryxU32(&x33, &x34, x32, x16, x13);
    var x35: u32 = undefined;
    var x36: u1 = undefined;
    addcarryxU32(&x35, &x36, x34, x14, x11);
    var x37: u32 = undefined;
    var x38: u1 = undefined;
    addcarryxU32(&x37, &x38, x36, x12, x9);
    const x39 = (cast(u32, x38) + x10);
    var x40: u32 = undefined;
    var x41: u32 = undefined;
    mulxU32(&x40, &x41, x23, 0xee00bc4f);
    var x42: u32 = undefined;
    var x43: u32 = undefined;
    mulxU32(&x42, &x43, x40, 0xffffffff);
    var x44: u32 = undefined;
    var x45: u32 = undefined;
    mulxU32(&x44, &x45, x40, 0xffffffff);
    var x46: u32 = undefined;
    var x47: u32 = undefined;
    mulxU32(&x46, &x47, x40, 0xffffffff);
    var x48: u32 = undefined;
    var x49: u32 = undefined;
    mulxU32(&x48, &x49, x40, 0xbce6faad);
    var x50: u32 = undefined;
    var x51: u32 = undefined;
    mulxU32(&x50, &x51, x40, 0xa7179e84);
    var x52: u32 = undefined;
    var x53: u32 = undefined;
    mulxU32(&x52, &x53, x40, 0xf3b9cac2);
    var x54: u32 = undefined;
    var x55: u32 = undefined;
    mulxU32(&x54, &x55, x40, 0xfc632551);
    var x56: u32 = undefined;
    var x57: u1 = undefined;
    addcarryxU32(&x56, &x57, 0x0, x55, x52);
    var x58: u32 = undefined;
    var x59: u1 = undefined;
    addcarryxU32(&x58, &x59, x57, x53, x50);
    var x60: u32 = undefined;
    var x61: u1 = undefined;
    addcarryxU32(&x60, &x61, x59, x51, x48);
    var x62: u32 = undefined;
    var x63: u1 = undefined;
    addcarryxU32(&x62, &x63, x61, x49, x46);
    var x64: u32 = undefined;
    var x65: u1 = undefined;
    addcarryxU32(&x64, &x65, x63, x47, x44);
    const x66 = (cast(u32, x65) + x45);
    var x67: u32 = undefined;
    var x68: u1 = undefined;
    addcarryxU32(&x67, &x68, 0x0, x23, x54);
    var x69: u32 = undefined;
    var x70: u1 = undefined;
    addcarryxU32(&x69, &x70, x68, x25, x56);
    var x71: u32 = undefined;
    var x72: u1 = undefined;
    addcarryxU32(&x71, &x72, x70, x27, x58);
    var x73: u32 = undefined;
    var x74: u1 = undefined;
    addcarryxU32(&x73, &x74, x72, x29, x60);
    var x75: u32 = undefined;
    var x76: u1 = undefined;
    addcarryxU32(&x75, &x76, x74, x31, x62);
    var x77: u32 = undefined;
    var x78: u1 = undefined;
    addcarryxU32(&x77, &x78, x76, x33, x64);
    var x79: u32 = undefined;
    var x80: u1 = undefined;
    addcarryxU32(&x79, &x80, x78, x35, x66);
    var x81: u32 = undefined;
    var x82: u1 = undefined;
    addcarryxU32(&x81, &x82, x80, x37, x42);
    var x83: u32 = undefined;
    var x84: u1 = undefined;
    addcarryxU32(&x83, &x84, x82, x39, x43);
    var x85: u32 = undefined;
    var x86: u32 = undefined;
    mulxU32(&x85, &x86, x1, (arg2[7]));
    var x87: u32 = undefined;
    var x88: u32 = undefined;
    mulxU32(&x87, &x88, x1, (arg2[6]));
    var x89: u32 = undefined;
    var x90: u32 = undefined;
    mulxU32(&x89, &x90, x1, (arg2[5]));
    var x91: u32 = undefined;
    var x92: u32 = undefined;
    mulxU32(&x91, &x92, x1, (arg2[4]));
    var x93: u32 = undefined;
    var x94: u32 = undefined;
    mulxU32(&x93, &x94, x1, (arg2[3]));
    var x95: u32 = undefined;
    var x96: u32 = undefined;
    mulxU32(&x95, &x96, x1, (arg2[2]));
    var x97: u32 = undefined;
    var x98: u32 = undefined;
    mulxU32(&x97, &x98, x1, (arg2[1]));
    var x99: u32 = undefined;
    var x100: u32 = undefined;
    mulxU32(&x99, &x100, x1, (arg2[0]));
    var x101: u32 = undefined;
    var x102: u1 = undefined;
    addcarryxU32(&x101, &x102, 0x0, x100, x97);
    var x103: u32 = undefined;
    var x104: u1 = undefined;
    addcarryxU32(&x103, &x104, x102, x98, x95);
    var x105: u32 = undefined;
    var x106: u1 = undefined;
    addcarryxU32(&x105, &x106, x104, x96, x93);
    var x107: u32 = undefined;
    var x108: u1 = undefined;
    addcarryxU32(&x107, &x108, x106, x94, x91);
    var x109: u32 = undefined;
    var x110: u1 = undefined;
    addcarryxU32(&x109, &x110, x108, x92, x89);
    var x111: u32 = undefined;
    var x112: u1 = undefined;
    addcarryxU32(&x111, &x112, x110, x90, x87);
    var x113: u32 = undefined;
    var x114: u1 = undefined;
    addcarryxU32(&x113, &x114, x112, x88, x85);
    const x115 = (cast(u32, x114) + x86);
    var x116: u32 = undefined;
    var x117: u1 = undefined;
    addcarryxU32(&x116, &x117, 0x0, x69, x99);
    var x118: u32 = undefined;
    var x119: u1 = undefined;
    addcarryxU32(&x118, &x119, x117, x71, x101);
    var x120: u32 = undefined;
    var x121: u1 = undefined;
    addcarryxU32(&x120, &x121, x119, x73, x103);
    var x122: u32 = undefined;
    var x123: u1 = undefined;
    addcarryxU32(&x122, &x123, x121, x75, x105);
    var x124: u32 = undefined;
    var x125: u1 = undefined;
    addcarryxU32(&x124, &x125, x123, x77, x107);
    var x126: u32 = undefined;
    var x127: u1 = undefined;
    addcarryxU32(&x126, &x127, x125, x79, x109);
    var x128: u32 = undefined;
    var x129: u1 = undefined;
    addcarryxU32(&x128, &x129, x127, x81, x111);
    var x130: u32 = undefined;
    var x131: u1 = undefined;
    addcarryxU32(&x130, &x131, x129, x83, x113);
    var x132: u32 = undefined;
    var x133: u1 = undefined;
    addcarryxU32(&x132, &x133, x131, cast(u32, x84), x115);
    var x134: u32 = undefined;
    var x135: u32 = undefined;
    mulxU32(&x134, &x135, x116, 0xee00bc4f);
    var x136: u32 = undefined;
    var x137: u32 = undefined;
    mulxU32(&x136, &x137, x134, 0xffffffff);
    var x138: u32 = undefined;
    var x139: u32 = undefined;
    mulxU32(&x138, &x139, x134, 0xffffffff);
    var x140: u32 = undefined;
    var x141: u32 = undefined;
    mulxU32(&x140, &x141, x134, 0xffffffff);
    var x142: u32 = undefined;
    var x143: u32 = undefined;
    mulxU32(&x142, &x143, x134, 0xbce6faad);
    var x144: u32 = undefined;
    var x145: u32 = undefined;
    mulxU32(&x144, &x145, x134, 0xa7179e84);
    var x146: u32 = undefined;
    var x147: u32 = undefined;
    mulxU32(&x146, &x147, x134, 0xf3b9cac2);
    var x148: u32 = undefined;
    var x149: u32 = undefined;
    mulxU32(&x148, &x149, x134, 0xfc632551);
    var x150: u32 = undefined;
    var x151: u1 = undefined;
    addcarryxU32(&x150, &x151, 0x0, x149, x146);
    var x152: u32 = undefined;
    var x153: u1 = undefined;
    addcarryxU32(&x152, &x153, x151, x147, x144);
    var x154: u32 = undefined;
    var x155: u1 = undefined;
    addcarryxU32(&x154, &x155, x153, x145, x142);
    var x156: u32 = undefined;
    var x157: u1 = undefined;
    addcarryxU32(&x156, &x157, x155, x143, x140);
    var x158: u32 = undefined;
    var x159: u1 = undefined;
    addcarryxU32(&x158, &x159, x157, x141, x138);
    const x160 = (cast(u32, x159) + x139);
    var x161: u32 = undefined;
    var x162: u1 = undefined;
    addcarryxU32(&x161, &x162, 0x0, x116, x148);
    var x163: u32 = undefined;
    var x164: u1 = undefined;
    addcarryxU32(&x163, &x164, x162, x118, x150);
    var x165: u32 = undefined;
    var x166: u1 = undefined;
    addcarryxU32(&x165, &x166, x164, x120, x152);
    var x167: u32 = undefined;
    var x168: u1 = undefined;
    addcarryxU32(&x167, &x168, x166, x122, x154);
    var x169: u32 = undefined;
    var x170: u1 = undefined;
    addcarryxU32(&x169, &x170, x168, x124, x156);
    var x171: u32 = undefined;
    var x172: u1 = undefined;
    addcarryxU32(&x171, &x172, x170, x126, x158);
    var x173: u32 = undefined;
    var x174: u1 = undefined;
    addcarryxU32(&x173, &x174, x172, x128, x160);
    var x175: u32 = undefined;
    var x176: u1 = undefined;
    addcarryxU32(&x175, &x176, x174, x130, x136);
    var x177: u32 = undefined;
    var x178: u1 = undefined;
    addcarryxU32(&x177, &x178, x176, x132, x137);
    const x179 = (cast(u32, x178) + cast(u32, x133));
    var x180: u32 = undefined;
    var x181: u32 = undefined;
    mulxU32(&x180, &x181, x2, (arg2[7]));
    var x182: u32 = undefined;
    var x183: u32 = undefined;
    mulxU32(&x182, &x183, x2, (arg2[6]));
    var x184: u32 = undefined;
    var x185: u32 = undefined;
    mulxU32(&x184, &x185, x2, (arg2[5]));
    var x186: u32 = undefined;
    var x187: u32 = undefined;
    mulxU32(&x186, &x187, x2, (arg2[4]));
    var x188: u32 = undefined;
    var x189: u32 = undefined;
    mulxU32(&x188, &x189, x2, (arg2[3]));
    var x190: u32 = undefined;
    var x191: u32 = undefined;
    mulxU32(&x190, &x191, x2, (arg2[2]));
    var x192: u32 = undefined;
    var x193: u32 = undefined;
    mulxU32(&x192, &x193, x2, (arg2[1]));
    var x194: u32 = undefined;
    var x195: u32 = undefined;
    mulxU32(&x194, &x195, x2, (arg2[0]));
    var x196: u32 = undefined;
    var x197: u1 = undefined;
    addcarryxU32(&x196, &x197, 0x0, x195, x192);
    var x198: u32 = undefined;
    var x199: u1 = undefined;
    addcarryxU32(&x198, &x199, x197, x193, x190);
    var x200: u32 = undefined;
    var x201: u1 = undefined;
    addcarryxU32(&x200, &x201, x199, x191, x188);
    var x202: u32 = undefined;
    var x203: u1 = undefined;
    addcarryxU32(&x202, &x203, x201, x189, x186);
    var x204: u32 = undefined;
    var x205: u1 = undefined;
    addcarryxU32(&x204, &x205, x203, x187, x184);
    var x206: u32 = undefined;
    var x207: u1 = undefined;
    addcarryxU32(&x206, &x207, x205, x185, x182);
    var x208: u32 = undefined;
    var x209: u1 = undefined;
    addcarryxU32(&x208, &x209, x207, x183, x180);
    const x210 = (cast(u32, x209) + x181);
    var x211: u32 = undefined;
    var x212: u1 = undefined;
    addcarryxU32(&x211, &x212, 0x0, x163, x194);
    var x213: u32 = undefined;
    var x214: u1 = undefined;
    addcarryxU32(&x213, &x214, x212, x165, x196);
    var x215: u32 = undefined;
    var x216: u1 = undefined;
    addcarryxU32(&x215, &x216, x214, x167, x198);
    var x217: u32 = undefined;
    var x218: u1 = undefined;
    addcarryxU32(&x217, &x218, x216, x169, x200);
    var x219: u32 = undefined;
    var x220: u1 = undefined;
    addcarryxU32(&x219, &x220, x218, x171, x202);
    var x221: u32 = undefined;
    var x222: u1 = undefined;
    addcarryxU32(&x221, &x222, x220, x173, x204);
    var x223: u32 = undefined;
    var x224: u1 = undefined;
    addcarryxU32(&x223, &x224, x222, x175, x206);
    var x225: u32 = undefined;
    var x226: u1 = undefined;
    addcarryxU32(&x225, &x226, x224, x177, x208);
    var x227: u32 = undefined;
    var x228: u1 = undefined;
    addcarryxU32(&x227, &x228, x226, x179, x210);
    var x229: u32 = undefined;
    var x230: u32 = undefined;
    mulxU32(&x229, &x230, x211, 0xee00bc4f);
    var x231: u32 = undefined;
    var x232: u32 = undefined;
    mulxU32(&x231, &x232, x229, 0xffffffff);
    var x233: u32 = undefined;
    var x234: u32 = undefined;
    mulxU32(&x233, &x234, x229, 0xffffffff);
    var x235: u32 = undefined;
    var x236: u32 = undefined;
    mulxU32(&x235, &x236, x229, 0xffffffff);
    var x237: u32 = undefined;
    var x238: u32 = undefined;
    mulxU32(&x237, &x238, x229, 0xbce6faad);
    var x239: u32 = undefined;
    var x240: u32 = undefined;
    mulxU32(&x239, &x240, x229, 0xa7179e84);
    var x241: u32 = undefined;
    var x242: u32 = undefined;
    mulxU32(&x241, &x242, x229, 0xf3b9cac2);
    var x243: u32 = undefined;
    var x244: u32 = undefined;
    mulxU32(&x243, &x244, x229, 0xfc632551);
    var x245: u32 = undefined;
    var x246: u1 = undefined;
    addcarryxU32(&x245, &x246, 0x0, x244, x241);
    var x247: u32 = undefined;
    var x248: u1 = undefined;
    addcarryxU32(&x247, &x248, x246, x242, x239);
    var x249: u32 = undefined;
    var x250: u1 = undefined;
    addcarryxU32(&x249, &x250, x248, x240, x237);
    var x251: u32 = undefined;
    var x252: u1 = undefined;
    addcarryxU32(&x251, &x252, x250, x238, x235);
    var x253: u32 = undefined;
    var x254: u1 = undefined;
    addcarryxU32(&x253, &x254, x252, x236, x233);
    const x255 = (cast(u32, x254) + x234);
    var x256: u32 = undefined;
    var x257: u1 = undefined;
    addcarryxU32(&x256, &x257, 0x0, x211, x243);
    var x258: u32 = undefined;
    var x259: u1 = undefined;
    addcarryxU32(&x258, &x259, x257, x213, x245);
    var x260: u32 = undefined;
    var x261: u1 = undefined;
    addcarryxU32(&x260, &x261, x259, x215, x247);
    var x262: u32 = undefined;
    var x263: u1 = undefined;
    addcarryxU32(&x262, &x263, x261, x217, x249);
    var x264: u32 = undefined;
    var x265: u1 = undefined;
    addcarryxU32(&x264, &x265, x263, x219, x251);
    var x266: u32 = undefined;
    var x267: u1 = undefined;
    addcarryxU32(&x266, &x267, x265, x221, x253);
    var x268: u32 = undefined;
    var x269: u1 = undefined;
    addcarryxU32(&x268, &x269, x267, x223, x255);
    var x270: u32 = undefined;
    var x271: u1 = undefined;
    addcarryxU32(&x270, &x271, x269, x225, x231);
    var x272: u32 = undefined;
    var x273: u1 = undefined;
    addcarryxU32(&x272, &x273, x271, x227, x232);
    const x274 = (cast(u32, x273) + cast(u32, x228));
    var x275: u32 = undefined;
    var x276: u32 = undefined;
    mulxU32(&x275, &x276, x3, (arg2[7]));
    var x277: u32 = undefined;
    var x278: u32 = undefined;
    mulxU32(&x277, &x278, x3, (arg2[6]));
    var x279: u32 = undefined;
    var x280: u32 = undefined;
    mulxU32(&x279, &x280, x3, (arg2[5]));
    var x281: u32 = undefined;
    var x282: u32 = undefined;
    mulxU32(&x281, &x282, x3, (arg2[4]));
    var x283: u32 = undefined;
    var x284: u32 = undefined;
    mulxU32(&x283, &x284, x3, (arg2[3]));
    var x285: u32 = undefined;
    var x286: u32 = undefined;
    mulxU32(&x285, &x286, x3, (arg2[2]));
    var x287: u32 = undefined;
    var x288: u32 = undefined;
    mulxU32(&x287, &x288, x3, (arg2[1]));
    var x289: u32 = undefined;
    var x290: u32 = undefined;
    mulxU32(&x289, &x290, x3, (arg2[0]));
    var x291: u32 = undefined;
    var x292: u1 = undefined;
    addcarryxU32(&x291, &x292, 0x0, x290, x287);
    var x293: u32 = undefined;
    var x294: u1 = undefined;
    addcarryxU32(&x293, &x294, x292, x288, x285);
    var x295: u32 = undefined;
    var x296: u1 = undefined;
    addcarryxU32(&x295, &x296, x294, x286, x283);
    var x297: u32 = undefined;
    var x298: u1 = undefined;
    addcarryxU32(&x297, &x298, x296, x284, x281);
    var x299: u32 = undefined;
    var x300: u1 = undefined;
    addcarryxU32(&x299, &x300, x298, x282, x279);
    var x301: u32 = undefined;
    var x302: u1 = undefined;
    addcarryxU32(&x301, &x302, x300, x280, x277);
    var x303: u32 = undefined;
    var x304: u1 = undefined;
    addcarryxU32(&x303, &x304, x302, x278, x275);
    const x305 = (cast(u32, x304) + x276);
    var x306: u32 = undefined;
    var x307: u1 = undefined;
    addcarryxU32(&x306, &x307, 0x0, x258, x289);
    var x308: u32 = undefined;
    var x309: u1 = undefined;
    addcarryxU32(&x308, &x309, x307, x260, x291);
    var x310: u32 = undefined;
    var x311: u1 = undefined;
    addcarryxU32(&x310, &x311, x309, x262, x293);
    var x312: u32 = undefined;
    var x313: u1 = undefined;
    addcarryxU32(&x312, &x313, x311, x264, x295);
    var x314: u32 = undefined;
    var x315: u1 = undefined;
    addcarryxU32(&x314, &x315, x313, x266, x297);
    var x316: u32 = undefined;
    var x317: u1 = undefined;
    addcarryxU32(&x316, &x317, x315, x268, x299);
    var x318: u32 = undefined;
    var x319: u1 = undefined;
    addcarryxU32(&x318, &x319, x317, x270, x301);
    var x320: u32 = undefined;
    var x321: u1 = undefined;
    addcarryxU32(&x320, &x321, x319, x272, x303);
    var x322: u32 = undefined;
    var x323: u1 = undefined;
    addcarryxU32(&x322, &x323, x321, x274, x305);
    var x324: u32 = undefined;
    var x325: u32 = undefined;
    mulxU32(&x324, &x325, x306, 0xee00bc4f);
    var x326: u32 = undefined;
    var x327: u32 = undefined;
    mulxU32(&x326, &x327, x324, 0xffffffff);
    var x328: u32 = undefined;
    var x329: u32 = undefined;
    mulxU32(&x328, &x329, x324, 0xffffffff);
    var x330: u32 = undefined;
    var x331: u32 = undefined;
    mulxU32(&x330, &x331, x324, 0xffffffff);
    var x332: u32 = undefined;
    var x333: u32 = undefined;
    mulxU32(&x332, &x333, x324, 0xbce6faad);
    var x334: u32 = undefined;
    var x335: u32 = undefined;
    mulxU32(&x334, &x335, x324, 0xa7179e84);
    var x336: u32 = undefined;
    var x337: u32 = undefined;
    mulxU32(&x336, &x337, x324, 0xf3b9cac2);
    var x338: u32 = undefined;
    var x339: u32 = undefined;
    mulxU32(&x338, &x339, x324, 0xfc632551);
    var x340: u32 = undefined;
    var x341: u1 = undefined;
    addcarryxU32(&x340, &x341, 0x0, x339, x336);
    var x342: u32 = undefined;
    var x343: u1 = undefined;
    addcarryxU32(&x342, &x343, x341, x337, x334);
    var x344: u32 = undefined;
    var x345: u1 = undefined;
    addcarryxU32(&x344, &x345, x343, x335, x332);
    var x346: u32 = undefined;
    var x347: u1 = undefined;
    addcarryxU32(&x346, &x347, x345, x333, x330);
    var x348: u32 = undefined;
    var x349: u1 = undefined;
    addcarryxU32(&x348, &x349, x347, x331, x328);
    const x350 = (cast(u32, x349) + x329);
    var x351: u32 = undefined;
    var x352: u1 = undefined;
    addcarryxU32(&x351, &x352, 0x0, x306, x338);
    var x353: u32 = undefined;
    var x354: u1 = undefined;
    addcarryxU32(&x353, &x354, x352, x308, x340);
    var x355: u32 = undefined;
    var x356: u1 = undefined;
    addcarryxU32(&x355, &x356, x354, x310, x342);
    var x357: u32 = undefined;
    var x358: u1 = undefined;
    addcarryxU32(&x357, &x358, x356, x312, x344);
    var x359: u32 = undefined;
    var x360: u1 = undefined;
    addcarryxU32(&x359, &x360, x358, x314, x346);
    var x361: u32 = undefined;
    var x362: u1 = undefined;
    addcarryxU32(&x361, &x362, x360, x316, x348);
    var x363: u32 = undefined;
    var x364: u1 = undefined;
    addcarryxU32(&x363, &x364, x362, x318, x350);
    var x365: u32 = undefined;
    var x366: u1 = undefined;
    addcarryxU32(&x365, &x366, x364, x320, x326);
    var x367: u32 = undefined;
    var x368: u1 = undefined;
    addcarryxU32(&x367, &x368, x366, x322, x327);
    const x369 = (cast(u32, x368) + cast(u32, x323));
    var x370: u32 = undefined;
    var x371: u32 = undefined;
    mulxU32(&x370, &x371, x4, (arg2[7]));
    var x372: u32 = undefined;
    var x373: u32 = undefined;
    mulxU32(&x372, &x373, x4, (arg2[6]));
    var x374: u32 = undefined;
    var x375: u32 = undefined;
    mulxU32(&x374, &x375, x4, (arg2[5]));
    var x376: u32 = undefined;
    var x377: u32 = undefined;
    mulxU32(&x376, &x377, x4, (arg2[4]));
    var x378: u32 = undefined;
    var x379: u32 = undefined;
    mulxU32(&x378, &x379, x4, (arg2[3]));
    var x380: u32 = undefined;
    var x381: u32 = undefined;
    mulxU32(&x380, &x381, x4, (arg2[2]));
    var x382: u32 = undefined;
    var x383: u32 = undefined;
    mulxU32(&x382, &x383, x4, (arg2[1]));
    var x384: u32 = undefined;
    var x385: u32 = undefined;
    mulxU32(&x384, &x385, x4, (arg2[0]));
    var x386: u32 = undefined;
    var x387: u1 = undefined;
    addcarryxU32(&x386, &x387, 0x0, x385, x382);
    var x388: u32 = undefined;
    var x389: u1 = undefined;
    addcarryxU32(&x388, &x389, x387, x383, x380);
    var x390: u32 = undefined;
    var x391: u1 = undefined;
    addcarryxU32(&x390, &x391, x389, x381, x378);
    var x392: u32 = undefined;
    var x393: u1 = undefined;
    addcarryxU32(&x392, &x393, x391, x379, x376);
    var x394: u32 = undefined;
    var x395: u1 = undefined;
    addcarryxU32(&x394, &x395, x393, x377, x374);
    var x396: u32 = undefined;
    var x397: u1 = undefined;
    addcarryxU32(&x396, &x397, x395, x375, x372);
    var x398: u32 = undefined;
    var x399: u1 = undefined;
    addcarryxU32(&x398, &x399, x397, x373, x370);
    const x400 = (cast(u32, x399) + x371);
    var x401: u32 = undefined;
    var x402: u1 = undefined;
    addcarryxU32(&x401, &x402, 0x0, x353, x384);
    var x403: u32 = undefined;
    var x404: u1 = undefined;
    addcarryxU32(&x403, &x404, x402, x355, x386);
    var x405: u32 = undefined;
    var x406: u1 = undefined;
    addcarryxU32(&x405, &x406, x404, x357, x388);
    var x407: u32 = undefined;
    var x408: u1 = undefined;
    addcarryxU32(&x407, &x408, x406, x359, x390);
    var x409: u32 = undefined;
    var x410: u1 = undefined;
    addcarryxU32(&x409, &x410, x408, x361, x392);
    var x411: u32 = undefined;
    var x412: u1 = undefined;
    addcarryxU32(&x411, &x412, x410, x363, x394);
    var x413: u32 = undefined;
    var x414: u1 = undefined;
    addcarryxU32(&x413, &x414, x412, x365, x396);
    var x415: u32 = undefined;
    var x416: u1 = undefined;
    addcarryxU32(&x415, &x416, x414, x367, x398);
    var x417: u32 = undefined;
    var x418: u1 = undefined;
    addcarryxU32(&x417, &x418, x416, x369, x400);
    var x419: u32 = undefined;
    var x420: u32 = undefined;
    mulxU32(&x419, &x420, x401, 0xee00bc4f);
    var x421: u32 = undefined;
    var x422: u32 = undefined;
    mulxU32(&x421, &x422, x419, 0xffffffff);
    var x423: u32 = undefined;
    var x424: u32 = undefined;
    mulxU32(&x423, &x424, x419, 0xffffffff);
    var x425: u32 = undefined;
    var x426: u32 = undefined;
    mulxU32(&x425, &x426, x419, 0xffffffff);
    var x427: u32 = undefined;
    var x428: u32 = undefined;
    mulxU32(&x427, &x428, x419, 0xbce6faad);
    var x429: u32 = undefined;
    var x430: u32 = undefined;
    mulxU32(&x429, &x430, x419, 0xa7179e84);
    var x431: u32 = undefined;
    var x432: u32 = undefined;
    mulxU32(&x431, &x432, x419, 0xf3b9cac2);
    var x433: u32 = undefined;
    var x434: u32 = undefined;
    mulxU32(&x433, &x434, x419, 0xfc632551);
    var x435: u32 = undefined;
    var x436: u1 = undefined;
    addcarryxU32(&x435, &x436, 0x0, x434, x431);
    var x437: u32 = undefined;
    var x438: u1 = undefined;
    addcarryxU32(&x437, &x438, x436, x432, x429);
    var x439: u32 = undefined;
    var x440: u1 = undefined;
    addcarryxU32(&x439, &x440, x438, x430, x427);
    var x441: u32 = undefined;
    var x442: u1 = undefined;
    addcarryxU32(&x441, &x442, x440, x428, x425);
    var x443: u32 = undefined;
    var x444: u1 = undefined;
    addcarryxU32(&x443, &x444, x442, x426, x423);
    const x445 = (cast(u32, x444) + x424);
    var x446: u32 = undefined;
    var x447: u1 = undefined;
    addcarryxU32(&x446, &x447, 0x0, x401, x433);
    var x448: u32 = undefined;
    var x449: u1 = undefined;
    addcarryxU32(&x448, &x449, x447, x403, x435);
    var x450: u32 = undefined;
    var x451: u1 = undefined;
    addcarryxU32(&x450, &x451, x449, x405, x437);
    var x452: u32 = undefined;
    var x453: u1 = undefined;
    addcarryxU32(&x452, &x453, x451, x407, x439);
    var x454: u32 = undefined;
    var x455: u1 = undefined;
    addcarryxU32(&x454, &x455, x453, x409, x441);
    var x456: u32 = undefined;
    var x457: u1 = undefined;
    addcarryxU32(&x456, &x457, x455, x411, x443);
    var x458: u32 = undefined;
    var x459: u1 = undefined;
    addcarryxU32(&x458, &x459, x457, x413, x445);
    var x460: u32 = undefined;
    var x461: u1 = undefined;
    addcarryxU32(&x460, &x461, x459, x415, x421);
    var x462: u32 = undefined;
    var x463: u1 = undefined;
    addcarryxU32(&x462, &x463, x461, x417, x422);
    const x464 = (cast(u32, x463) + cast(u32, x418));
    var x465: u32 = undefined;
    var x466: u32 = undefined;
    mulxU32(&x465, &x466, x5, (arg2[7]));
    var x467: u32 = undefined;
    var x468: u32 = undefined;
    mulxU32(&x467, &x468, x5, (arg2[6]));
    var x469: u32 = undefined;
    var x470: u32 = undefined;
    mulxU32(&x469, &x470, x5, (arg2[5]));
    var x471: u32 = undefined;
    var x472: u32 = undefined;
    mulxU32(&x471, &x472, x5, (arg2[4]));
    var x473: u32 = undefined;
    var x474: u32 = undefined;
    mulxU32(&x473, &x474, x5, (arg2[3]));
    var x475: u32 = undefined;
    var x476: u32 = undefined;
    mulxU32(&x475, &x476, x5, (arg2[2]));
    var x477: u32 = undefined;
    var x478: u32 = undefined;
    mulxU32(&x477, &x478, x5, (arg2[1]));
    var x479: u32 = undefined;
    var x480: u32 = undefined;
    mulxU32(&x479, &x480, x5, (arg2[0]));
    var x481: u32 = undefined;
    var x482: u1 = undefined;
    addcarryxU32(&x481, &x482, 0x0, x480, x477);
    var x483: u32 = undefined;
    var x484: u1 = undefined;
    addcarryxU32(&x483, &x484, x482, x478, x475);
    var x485: u32 = undefined;
    var x486: u1 = undefined;
    addcarryxU32(&x485, &x486, x484, x476, x473);
    var x487: u32 = undefined;
    var x488: u1 = undefined;
    addcarryxU32(&x487, &x488, x486, x474, x471);
    var x489: u32 = undefined;
    var x490: u1 = undefined;
    addcarryxU32(&x489, &x490, x488, x472, x469);
    var x491: u32 = undefined;
    var x492: u1 = undefined;
    addcarryxU32(&x491, &x492, x490, x470, x467);
    var x493: u32 = undefined;
    var x494: u1 = undefined;
    addcarryxU32(&x493, &x494, x492, x468, x465);
    const x495 = (cast(u32, x494) + x466);
    var x496: u32 = undefined;
    var x497: u1 = undefined;
    addcarryxU32(&x496, &x497, 0x0, x448, x479);
    var x498: u32 = undefined;
    var x499: u1 = undefined;
    addcarryxU32(&x498, &x499, x497, x450, x481);
    var x500: u32 = undefined;
    var x501: u1 = undefined;
    addcarryxU32(&x500, &x501, x499, x452, x483);
    var x502: u32 = undefined;
    var x503: u1 = undefined;
    addcarryxU32(&x502, &x503, x501, x454, x485);
    var x504: u32 = undefined;
    var x505: u1 = undefined;
    addcarryxU32(&x504, &x505, x503, x456, x487);
    var x506: u32 = undefined;
    var x507: u1 = undefined;
    addcarryxU32(&x506, &x507, x505, x458, x489);
    var x508: u32 = undefined;
    var x509: u1 = undefined;
    addcarryxU32(&x508, &x509, x507, x460, x491);
    var x510: u32 = undefined;
    var x511: u1 = undefined;
    addcarryxU32(&x510, &x511, x509, x462, x493);
    var x512: u32 = undefined;
    var x513: u1 = undefined;
    addcarryxU32(&x512, &x513, x511, x464, x495);
    var x514: u32 = undefined;
    var x515: u32 = undefined;
    mulxU32(&x514, &x515, x496, 0xee00bc4f);
    var x516: u32 = undefined;
    var x517: u32 = undefined;
    mulxU32(&x516, &x517, x514, 0xffffffff);
    var x518: u32 = undefined;
    var x519: u32 = undefined;
    mulxU32(&x518, &x519, x514, 0xffffffff);
    var x520: u32 = undefined;
    var x521: u32 = undefined;
    mulxU32(&x520, &x521, x514, 0xffffffff);
    var x522: u32 = undefined;
    var x523: u32 = undefined;
    mulxU32(&x522, &x523, x514, 0xbce6faad);
    var x524: u32 = undefined;
    var x525: u32 = undefined;
    mulxU32(&x524, &x525, x514, 0xa7179e84);
    var x526: u32 = undefined;
    var x527: u32 = undefined;
    mulxU32(&x526, &x527, x514, 0xf3b9cac2);
    var x528: u32 = undefined;
    var x529: u32 = undefined;
    mulxU32(&x528, &x529, x514, 0xfc632551);
    var x530: u32 = undefined;
    var x531: u1 = undefined;
    addcarryxU32(&x530, &x531, 0x0, x529, x526);
    var x532: u32 = undefined;
    var x533: u1 = undefined;
    addcarryxU32(&x532, &x533, x531, x527, x524);
    var x534: u32 = undefined;
    var x535: u1 = undefined;
    addcarryxU32(&x534, &x535, x533, x525, x522);
    var x536: u32 = undefined;
    var x537: u1 = undefined;
    addcarryxU32(&x536, &x537, x535, x523, x520);
    var x538: u32 = undefined;
    var x539: u1 = undefined;
    addcarryxU32(&x538, &x539, x537, x521, x518);
    const x540 = (cast(u32, x539) + x519);
    var x541: u32 = undefined;
    var x542: u1 = undefined;
    addcarryxU32(&x541, &x542, 0x0, x496, x528);
    var x543: u32 = undefined;
    var x544: u1 = undefined;
    addcarryxU32(&x543, &x544, x542, x498, x530);
    var x545: u32 = undefined;
    var x546: u1 = undefined;
    addcarryxU32(&x545, &x546, x544, x500, x532);
    var x547: u32 = undefined;
    var x548: u1 = undefined;
    addcarryxU32(&x547, &x548, x546, x502, x534);
    var x549: u32 = undefined;
    var x550: u1 = undefined;
    addcarryxU32(&x549, &x550, x548, x504, x536);
    var x551: u32 = undefined;
    var x552: u1 = undefined;
    addcarryxU32(&x551, &x552, x550, x506, x538);
    var x553: u32 = undefined;
    var x554: u1 = undefined;
    addcarryxU32(&x553, &x554, x552, x508, x540);
    var x555: u32 = undefined;
    var x556: u1 = undefined;
    addcarryxU32(&x555, &x556, x554, x510, x516);
    var x557: u32 = undefined;
    var x558: u1 = undefined;
    addcarryxU32(&x557, &x558, x556, x512, x517);
    const x559 = (cast(u32, x558) + cast(u32, x513));
    var x560: u32 = undefined;
    var x561: u32 = undefined;
    mulxU32(&x560, &x561, x6, (arg2[7]));
    var x562: u32 = undefined;
    var x563: u32 = undefined;
    mulxU32(&x562, &x563, x6, (arg2[6]));
    var x564: u32 = undefined;
    var x565: u32 = undefined;
    mulxU32(&x564, &x565, x6, (arg2[5]));
    var x566: u32 = undefined;
    var x567: u32 = undefined;
    mulxU32(&x566, &x567, x6, (arg2[4]));
    var x568: u32 = undefined;
    var x569: u32 = undefined;
    mulxU32(&x568, &x569, x6, (arg2[3]));
    var x570: u32 = undefined;
    var x571: u32 = undefined;
    mulxU32(&x570, &x571, x6, (arg2[2]));
    var x572: u32 = undefined;
    var x573: u32 = undefined;
    mulxU32(&x572, &x573, x6, (arg2[1]));
    var x574: u32 = undefined;
    var x575: u32 = undefined;
    mulxU32(&x574, &x575, x6, (arg2[0]));
    var x576: u32 = undefined;
    var x577: u1 = undefined;
    addcarryxU32(&x576, &x577, 0x0, x575, x572);
    var x578: u32 = undefined;
    var x579: u1 = undefined;
    addcarryxU32(&x578, &x579, x577, x573, x570);
    var x580: u32 = undefined;
    var x581: u1 = undefined;
    addcarryxU32(&x580, &x581, x579, x571, x568);
    var x582: u32 = undefined;
    var x583: u1 = undefined;
    addcarryxU32(&x582, &x583, x581, x569, x566);
    var x584: u32 = undefined;
    var x585: u1 = undefined;
    addcarryxU32(&x584, &x585, x583, x567, x564);
    var x586: u32 = undefined;
    var x587: u1 = undefined;
    addcarryxU32(&x586, &x587, x585, x565, x562);
    var x588: u32 = undefined;
    var x589: u1 = undefined;
    addcarryxU32(&x588, &x589, x587, x563, x560);
    const x590 = (cast(u32, x589) + x561);
    var x591: u32 = undefined;
    var x592: u1 = undefined;
    addcarryxU32(&x591, &x592, 0x0, x543, x574);
    var x593: u32 = undefined;
    var x594: u1 = undefined;
    addcarryxU32(&x593, &x594, x592, x545, x576);
    var x595: u32 = undefined;
    var x596: u1 = undefined;
    addcarryxU32(&x595, &x596, x594, x547, x578);
    var x597: u32 = undefined;
    var x598: u1 = undefined;
    addcarryxU32(&x597, &x598, x596, x549, x580);
    var x599: u32 = undefined;
    var x600: u1 = undefined;
    addcarryxU32(&x599, &x600, x598, x551, x582);
    var x601: u32 = undefined;
    var x602: u1 = undefined;
    addcarryxU32(&x601, &x602, x600, x553, x584);
    var x603: u32 = undefined;
    var x604: u1 = undefined;
    addcarryxU32(&x603, &x604, x602, x555, x586);
    var x605: u32 = undefined;
    var x606: u1 = undefined;
    addcarryxU32(&x605, &x606, x604, x557, x588);
    var x607: u32 = undefined;
    var x608: u1 = undefined;
    addcarryxU32(&x607, &x608, x606, x559, x590);
    var x609: u32 = undefined;
    var x610: u32 = undefined;
    mulxU32(&x609, &x610, x591, 0xee00bc4f);
    var x611: u32 = undefined;
    var x612: u32 = undefined;
    mulxU32(&x611, &x612, x609, 0xffffffff);
    var x613: u32 = undefined;
    var x614: u32 = undefined;
    mulxU32(&x613, &x614, x609, 0xffffffff);
    var x615: u32 = undefined;
    var x616: u32 = undefined;
    mulxU32(&x615, &x616, x609, 0xffffffff);
    var x617: u32 = undefined;
    var x618: u32 = undefined;
    mulxU32(&x617, &x618, x609, 0xbce6faad);
    var x619: u32 = undefined;
    var x620: u32 = undefined;
    mulxU32(&x619, &x620, x609, 0xa7179e84);
    var x621: u32 = undefined;
    var x622: u32 = undefined;
    mulxU32(&x621, &x622, x609, 0xf3b9cac2);
    var x623: u32 = undefined;
    var x624: u32 = undefined;
    mulxU32(&x623, &x624, x609, 0xfc632551);
    var x625: u32 = undefined;
    var x626: u1 = undefined;
    addcarryxU32(&x625, &x626, 0x0, x624, x621);
    var x627: u32 = undefined;
    var x628: u1 = undefined;
    addcarryxU32(&x627, &x628, x626, x622, x619);
    var x629: u32 = undefined;
    var x630: u1 = undefined;
    addcarryxU32(&x629, &x630, x628, x620, x617);
    var x631: u32 = undefined;
    var x632: u1 = undefined;
    addcarryxU32(&x631, &x632, x630, x618, x615);
    var x633: u32 = undefined;
    var x634: u1 = undefined;
    addcarryxU32(&x633, &x634, x632, x616, x613);
    const x635 = (cast(u32, x634) + x614);
    var x636: u32 = undefined;
    var x637: u1 = undefined;
    addcarryxU32(&x636, &x637, 0x0, x591, x623);
    var x638: u32 = undefined;
    var x639: u1 = undefined;
    addcarryxU32(&x638, &x639, x637, x593, x625);
    var x640: u32 = undefined;
    var x641: u1 = undefined;
    addcarryxU32(&x640, &x641, x639, x595, x627);
    var x642: u32 = undefined;
    var x643: u1 = undefined;
    addcarryxU32(&x642, &x643, x641, x597, x629);
    var x644: u32 = undefined;
    var x645: u1 = undefined;
    addcarryxU32(&x644, &x645, x643, x599, x631);
    var x646: u32 = undefined;
    var x647: u1 = undefined;
    addcarryxU32(&x646, &x647, x645, x601, x633);
    var x648: u32 = undefined;
    var x649: u1 = undefined;
    addcarryxU32(&x648, &x649, x647, x603, x635);
    var x650: u32 = undefined;
    var x651: u1 = undefined;
    addcarryxU32(&x650, &x651, x649, x605, x611);
    var x652: u32 = undefined;
    var x653: u1 = undefined;
    addcarryxU32(&x652, &x653, x651, x607, x612);
    const x654 = (cast(u32, x653) + cast(u32, x608));
    var x655: u32 = undefined;
    var x656: u32 = undefined;
    mulxU32(&x655, &x656, x7, (arg2[7]));
    var x657: u32 = undefined;
    var x658: u32 = undefined;
    mulxU32(&x657, &x658, x7, (arg2[6]));
    var x659: u32 = undefined;
    var x660: u32 = undefined;
    mulxU32(&x659, &x660, x7, (arg2[5]));
    var x661: u32 = undefined;
    var x662: u32 = undefined;
    mulxU32(&x661, &x662, x7, (arg2[4]));
    var x663: u32 = undefined;
    var x664: u32 = undefined;
    mulxU32(&x663, &x664, x7, (arg2[3]));
    var x665: u32 = undefined;
    var x666: u32 = undefined;
    mulxU32(&x665, &x666, x7, (arg2[2]));
    var x667: u32 = undefined;
    var x668: u32 = undefined;
    mulxU32(&x667, &x668, x7, (arg2[1]));
    var x669: u32 = undefined;
    var x670: u32 = undefined;
    mulxU32(&x669, &x670, x7, (arg2[0]));
    var x671: u32 = undefined;
    var x672: u1 = undefined;
    addcarryxU32(&x671, &x672, 0x0, x670, x667);
    var x673: u32 = undefined;
    var x674: u1 = undefined;
    addcarryxU32(&x673, &x674, x672, x668, x665);
    var x675: u32 = undefined;
    var x676: u1 = undefined;
    addcarryxU32(&x675, &x676, x674, x666, x663);
    var x677: u32 = undefined;
    var x678: u1 = undefined;
    addcarryxU32(&x677, &x678, x676, x664, x661);
    var x679: u32 = undefined;
    var x680: u1 = undefined;
    addcarryxU32(&x679, &x680, x678, x662, x659);
    var x681: u32 = undefined;
    var x682: u1 = undefined;
    addcarryxU32(&x681, &x682, x680, x660, x657);
    var x683: u32 = undefined;
    var x684: u1 = undefined;
    addcarryxU32(&x683, &x684, x682, x658, x655);
    const x685 = (cast(u32, x684) + x656);
    var x686: u32 = undefined;
    var x687: u1 = undefined;
    addcarryxU32(&x686, &x687, 0x0, x638, x669);
    var x688: u32 = undefined;
    var x689: u1 = undefined;
    addcarryxU32(&x688, &x689, x687, x640, x671);
    var x690: u32 = undefined;
    var x691: u1 = undefined;
    addcarryxU32(&x690, &x691, x689, x642, x673);
    var x692: u32 = undefined;
    var x693: u1 = undefined;
    addcarryxU32(&x692, &x693, x691, x644, x675);
    var x694: u32 = undefined;
    var x695: u1 = undefined;
    addcarryxU32(&x694, &x695, x693, x646, x677);
    var x696: u32 = undefined;
    var x697: u1 = undefined;
    addcarryxU32(&x696, &x697, x695, x648, x679);
    var x698: u32 = undefined;
    var x699: u1 = undefined;
    addcarryxU32(&x698, &x699, x697, x650, x681);
    var x700: u32 = undefined;
    var x701: u1 = undefined;
    addcarryxU32(&x700, &x701, x699, x652, x683);
    var x702: u32 = undefined;
    var x703: u1 = undefined;
    addcarryxU32(&x702, &x703, x701, x654, x685);
    var x704: u32 = undefined;
    var x705: u32 = undefined;
    mulxU32(&x704, &x705, x686, 0xee00bc4f);
    var x706: u32 = undefined;
    var x707: u32 = undefined;
    mulxU32(&x706, &x707, x704, 0xffffffff);
    var x708: u32 = undefined;
    var x709: u32 = undefined;
    mulxU32(&x708, &x709, x704, 0xffffffff);
    var x710: u32 = undefined;
    var x711: u32 = undefined;
    mulxU32(&x710, &x711, x704, 0xffffffff);
    var x712: u32 = undefined;
    var x713: u32 = undefined;
    mulxU32(&x712, &x713, x704, 0xbce6faad);
    var x714: u32 = undefined;
    var x715: u32 = undefined;
    mulxU32(&x714, &x715, x704, 0xa7179e84);
    var x716: u32 = undefined;
    var x717: u32 = undefined;
    mulxU32(&x716, &x717, x704, 0xf3b9cac2);
    var x718: u32 = undefined;
    var x719: u32 = undefined;
    mulxU32(&x718, &x719, x704, 0xfc632551);
    var x720: u32 = undefined;
    var x721: u1 = undefined;
    addcarryxU32(&x720, &x721, 0x0, x719, x716);
    var x722: u32 = undefined;
    var x723: u1 = undefined;
    addcarryxU32(&x722, &x723, x721, x717, x714);
    var x724: u32 = undefined;
    var x725: u1 = undefined;
    addcarryxU32(&x724, &x725, x723, x715, x712);
    var x726: u32 = undefined;
    var x727: u1 = undefined;
    addcarryxU32(&x726, &x727, x725, x713, x710);
    var x728: u32 = undefined;
    var x729: u1 = undefined;
    addcarryxU32(&x728, &x729, x727, x711, x708);
    const x730 = (cast(u32, x729) + x709);
    var x731: u32 = undefined;
    var x732: u1 = undefined;
    addcarryxU32(&x731, &x732, 0x0, x686, x718);
    var x733: u32 = undefined;
    var x734: u1 = undefined;
    addcarryxU32(&x733, &x734, x732, x688, x720);
    var x735: u32 = undefined;
    var x736: u1 = undefined;
    addcarryxU32(&x735, &x736, x734, x690, x722);
    var x737: u32 = undefined;
    var x738: u1 = undefined;
    addcarryxU32(&x737, &x738, x736, x692, x724);
    var x739: u32 = undefined;
    var x740: u1 = undefined;
    addcarryxU32(&x739, &x740, x738, x694, x726);
    var x741: u32 = undefined;
    var x742: u1 = undefined;
    addcarryxU32(&x741, &x742, x740, x696, x728);
    var x743: u32 = undefined;
    var x744: u1 = undefined;
    addcarryxU32(&x743, &x744, x742, x698, x730);
    var x745: u32 = undefined;
    var x746: u1 = undefined;
    addcarryxU32(&x745, &x746, x744, x700, x706);
    var x747: u32 = undefined;
    var x748: u1 = undefined;
    addcarryxU32(&x747, &x748, x746, x702, x707);
    const x749 = (cast(u32, x748) + cast(u32, x703));
    var x750: u32 = undefined;
    var x751: u1 = undefined;
    subborrowxU32(&x750, &x751, 0x0, x733, 0xfc632551);
    var x752: u32 = undefined;
    var x753: u1 = undefined;
    subborrowxU32(&x752, &x753, x751, x735, 0xf3b9cac2);
    var x754: u32 = undefined;
    var x755: u1 = undefined;
    subborrowxU32(&x754, &x755, x753, x737, 0xa7179e84);
    var x756: u32 = undefined;
    var x757: u1 = undefined;
    subborrowxU32(&x756, &x757, x755, x739, 0xbce6faad);
    var x758: u32 = undefined;
    var x759: u1 = undefined;
    subborrowxU32(&x758, &x759, x757, x741, 0xffffffff);
    var x760: u32 = undefined;
    var x761: u1 = undefined;
    subborrowxU32(&x760, &x761, x759, x743, 0xffffffff);
    var x762: u32 = undefined;
    var x763: u1 = undefined;
    subborrowxU32(&x762, &x763, x761, x745, cast(u32, 0x0));
    var x764: u32 = undefined;
    var x765: u1 = undefined;
    subborrowxU32(&x764, &x765, x763, x747, 0xffffffff);
    var x766: u32 = undefined;
    var x767: u1 = undefined;
    subborrowxU32(&x766, &x767, x765, x749, cast(u32, 0x0));
    var x768: u32 = undefined;
    cmovznzU32(&x768, x767, x750, x733);
    var x769: u32 = undefined;
    cmovznzU32(&x769, x767, x752, x735);
    var x770: u32 = undefined;
    cmovznzU32(&x770, x767, x754, x737);
    var x771: u32 = undefined;
    cmovznzU32(&x771, x767, x756, x739);
    var x772: u32 = undefined;
    cmovznzU32(&x772, x767, x758, x741);
    var x773: u32 = undefined;
    cmovznzU32(&x773, x767, x760, x743);
    var x774: u32 = undefined;
    cmovznzU32(&x774, x767, x762, x745);
    var x775: u32 = undefined;
    cmovznzU32(&x775, x767, x764, x747);
    out1[0] = x768;
    out1[1] = x769;
    out1[2] = x770;
    out1[3] = x771;
    out1[4] = x772;
    out1[5] = x773;
    out1[6] = x774;
    out1[7] = x775;
}

/// The function square squares a field element in the Montgomery domain.
///
/// Preconditions:
///   0 ≤ eval arg1 < m
/// Postconditions:
///   eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) * eval (from_montgomery arg1)) mod m
///   0 ≤ eval out1 < m
///
pub fn square(out1: *MontgomeryDomainFieldElement, arg1: MontgomeryDomainFieldElement) void {
    @setRuntimeSafety(mode == .Debug);

    const x1 = (arg1[1]);
    const x2 = (arg1[2]);
    const x3 = (arg1[3]);
    const x4 = (arg1[4]);
    const x5 = (arg1[5]);
    const x6 = (arg1[6]);
    const x7 = (arg1[7]);
    const x8 = (arg1[0]);
    var x9: u32 = undefined;
    var x10: u32 = undefined;
    mulxU32(&x9, &x10, x8, (arg1[7]));
    var x11: u32 = undefined;
    var x12: u32 = undefined;
    mulxU32(&x11, &x12, x8, (arg1[6]));
    var x13: u32 = undefined;
    var x14: u32 = undefined;
    mulxU32(&x13, &x14, x8, (arg1[5]));
    var x15: u32 = undefined;
    var x16: u32 = undefined;
    mulxU32(&x15, &x16, x8, (arg1[4]));
    var x17: u32 = undefined;
    var x18: u32 = undefined;
    mulxU32(&x17, &x18, x8, (arg1[3]));
    var x19: u32 = undefined;
    var x20: u32 = undefined;
    mulxU32(&x19, &x20, x8, (arg1[2]));
    var x21: u32 = undefined;
    var x22: u32 = undefined;
    mulxU32(&x21, &x22, x8, (arg1[1]));
    var x23: u32 = undefined;
    var x24: u32 = undefined;
    mulxU32(&x23, &x24, x8, (arg1[0]));
    var x25: u32 = undefined;
    var x26: u1 = undefined;
    addcarryxU32(&x25, &x26, 0x0, x24, x21);
    var x27: u32 = undefined;
    var x28: u1 = undefined;
    addcarryxU32(&x27, &x28, x26, x22, x19);
    var x29: u32 = undefined;
    var x30: u1 = undefined;
    addcarryxU32(&x29, &x30, x28, x20, x17);
    var x31: u32 = undefined;
    var x32: u1 = undefined;
    addcarryxU32(&x31, &x32, x30, x18, x15);
    var x33: u32 = undefined;
    var x34: u1 = undefined;
    addcarryxU32(&x33, &x34, x32, x16, x13);
    var x35: u32 = undefined;
    var x36: u1 = undefined;
    addcarryxU32(&x35, &x36, x34, x14, x11);
    var x37: u32 = undefined;
    var x38: u1 = undefined;
    addcarryxU32(&x37, &x38, x36, x12, x9);
    const x39 = (cast(u32, x38) + x10);
    var x40: u32 = undefined;
    var x41: u32 = undefined;
    mulxU32(&x40, &x41, x23, 0xee00bc4f);
    var x42: u32 = undefined;
    var x43: u32 = undefined;
    mulxU32(&x42, &x43, x40, 0xffffffff);
    var x44: u32 = undefined;
    var x45: u32 = undefined;
    mulxU32(&x44, &x45, x40, 0xffffffff);
    var x46: u32 = undefined;
    var x47: u32 = undefined;
    mulxU32(&x46, &x47, x40, 0xffffffff);
    var x48: u32 = undefined;
    var x49: u32 = undefined;
    mulxU32(&x48, &x49, x40, 0xbce6faad);
    var x50: u32 = undefined;
    var x51: u32 = undefined;
    mulxU32(&x50, &x51, x40, 0xa7179e84);
    var x52: u32 = undefined;
    var x53: u32 = undefined;
    mulxU32(&x52, &x53, x40, 0xf3b9cac2);
    var x54: u32 = undefined;
    var x55: u32 = undefined;
    mulxU32(&x54, &x55, x40, 0xfc632551);
    var x56: u32 = undefined;
    var x57: u1 = undefined;
    addcarryxU32(&x56, &x57, 0x0, x55, x52);
    var x58: u32 = undefined;
    var x59: u1 = undefined;
    addcarryxU32(&x58, &x59, x57, x53, x50);
    var x60: u32 = undefined;
    var x61: u1 = undefined;
    addcarryxU32(&x60, &x61, x59, x51, x48);
    var x62: u32 = undefined;
    var x63: u1 = undefined;
    addcarryxU32(&x62, &x63, x61, x49, x46);
    var x64: u32 = undefined;
    var x65: u1 = undefined;
    addcarryxU32(&x64, &x65, x63, x47, x44);
    const x66 = (cast(u32, x65) + x45);
    var x67: u32 = undefined;
    var x68: u1 = undefined;
    addcarryxU32(&x67, &x68, 0x0, x23, x54);
    var x69: u32 = undefined;
    var x70: u1 = undefined;
    addcarryxU32(&x69, &x70, x68, x25, x56);
    var x71: u32 = undefined;
    var x72: u1 = undefined;
    addcarryxU32(&x71, &x72, x70, x27, x58);
    var x73: u32 = undefined;
    var x74: u1 = undefined;
    addcarryxU32(&x73, &x74, x72, x29, x60);
    var x75: u32 = undefined;
    var x76: u1 = undefined;
    addcarryxU32(&x75, &x76, x74, x31, x62);
    var x77: u32 = undefined;
    var x78: u1 = undefined;
    addcarryxU32(&x77, &x78, x76, x33, x64);
    var x79: u32 = undefined;
    var x80: u1 = undefined;
    addcarryxU32(&x79, &x80, x78, x35, x66);
    var x81: u32 = undefined;
    var x82: u1 = undefined;
    addcarryxU32(&x81, &x82, x80, x37, x42);
    var x83: u32 = undefined;
    var x84: u1 = undefined;
    addcarryxU32(&x83, &x84, x82, x39, x43);
    var x85: u32 = undefined;
    var x86: u32 = undefined;
    mulxU32(&x85, &x86, x1, (arg1[7]));
    var x87: u32 = undefined;
    var x88: u32 = undefined;
    mulxU32(&x87, &x88, x1, (arg1[6]));
    var x89: u32 = undefined;
    var x90: u32 = undefined;
    mulxU32(&x89, &x90, x1, (arg1[5]));
    var x91: u32 = undefined;
    var x92: u32 = undefined;
    mulxU32(&x91, &x92, x1, (arg1[4]));
    var x93: u32 = undefined;
    var x94: u32 = undefined;
    mulxU32(&x93, &x94, x1, (arg1[3]));
    var x95: u32 = undefined;
    var x96: u32 = undefined;
    mulxU32(&x95, &x96, x1, (arg1[2]));
    var x97: u32 = undefined;
    var x98: u32 = undefined;
    mulxU32(&x97, &x98, x1, (arg1[1]));
    var x99: u32 = undefined;
    var x100: u32 = undefined;
    mulxU32(&x99, &x100, x1, (arg1[0]));
    var x101: u32 = undefined;
    var x102: u1 = undefined;
    addcarryxU32(&x101, &x102, 0x0, x100, x97);
    var x103: u32 = undefined;
    var x104: u1 = undefined;
    addcarryxU32(&x103, &x104, x102, x98, x95);
    var x105: u32 = undefined;
    var x106: u1 = undefined;
    addcarryxU32(&x105, &x106, x104, x96, x93);
    var x107: u32 = undefined;
    var x108: u1 = undefined;
    addcarryxU32(&x107, &x108, x106, x94, x91);
    var x109: u32 = undefined;
    var x110: u1 = undefined;
    addcarryxU32(&x109, &x110, x108, x92, x89);
    var x111: u32 = undefined;
    var x112: u1 = undefined;
    addcarryxU32(&x111, &x112, x110, x90, x87);
    var x113: u32 = undefined;
    var x114: u1 = undefined;
    addcarryxU32(&x113, &x114, x112, x88, x85);
    const x115 = (cast(u32, x114) + x86);
    var x116: u32 = undefined;
    var x117: u1 = undefined;
    addcarryxU32(&x116, &x117, 0x0, x69, x99);
    var x118: u32 = undefined;
    var x119: u1 = undefined;
    addcarryxU32(&x118, &x119, x117, x71, x101);
    var x120: u32 = undefined;
    var x121: u1 = undefined;
    addcarryxU32(&x120, &x121, x119, x73, x103);
    var x122: u32 = undefined;
    var x123: u1 = undefined;
    addcarryxU32(&x122, &x123, x121, x75, x105);
    var x124: u32 = undefined;
    var x125: u1 = undefined;
    addcarryxU32(&x124, &x125, x123, x77, x107);
    var x126: u32 = undefined;
    var x127: u1 = undefined;
    addcarryxU32(&x126, &x127, x125, x79, x109);
    var x128: u32 = undefined;
    var x129: u1 = undefined;
    addcarryxU32(&x128, &x129, x127, x81, x111);
    var x130: u32 = undefined;
    var x131: u1 = undefined;
    addcarryxU32(&x130, &x131, x129, x83, x113);
    var x132: u32 = undefined;
    var x133: u1 = undefined;
    addcarryxU32(&x132, &x133, x131, cast(u32, x84), x115);
    var x134: u32 = undefined;
    var x135: u32 = undefined;
    mulxU32(&x134, &x135, x116, 0xee00bc4f);
    var x136: u32 = undefined;
    var x137: u32 = undefined;
    mulxU32(&x136, &x137, x134, 0xffffffff);
    var x138: u32 = undefined;
    var x139: u32 = undefined;
    mulxU32(&x138, &x139, x134, 0xffffffff);
    var x140: u32 = undefined;
    var x141: u32 = undefined;
    mulxU32(&x140, &x141, x134, 0xffffffff);
    var x142: u32 = undefined;
    var x143: u32 = undefined;
    mulxU32(&x142, &x143, x134, 0xbce6faad);
    var x144: u32 = undefined;
    var x145: u32 = undefined;
    mulxU32(&x144, &x145, x134, 0xa7179e84);
    var x146: u32 = undefined;
    var x147: u32 = undefined;
    mulxU32(&x146, &x147, x134, 0xf3b9cac2);
    var x148: u32 = undefined;
    var x149: u32 = undefined;
    mulxU32(&x148, &x149, x134, 0xfc632551);
    var x150: u32 = undefined;
    var x151: u1 = undefined;
    addcarryxU32(&x150, &x151, 0x0, x149, x146);
    var x152: u32 = undefined;
    var x153: u1 = undefined;
    addcarryxU32(&x152, &x153, x151, x147, x144);
    var x154: u32 = undefined;
    var x155: u1 = undefined;
    addcarryxU32(&x154, &x155, x153, x145, x142);
    var x156: u32 = undefined;
    var x157: u1 = undefined;
    addcarryxU32(&x156, &x157, x155, x143, x140);
    var x158: u32 = undefined;
    var x159: u1 = undefined;
    addcarryxU32(&x158, &x159, x157, x141, x138);
    const x160 = (cast(u32, x159) + x139);
    var x161: u32 = undefined;
    var x162: u1 = undefined;
    addcarryxU32(&x161, &x162, 0x0, x116, x148);
    var x163: u32 = undefined;
    var x164: u1 = undefined;
    addcarryxU32(&x163, &x164, x162, x118, x150);
    var x165: u32 = undefined;
    var x166: u1 = undefined;
    addcarryxU32(&x165, &x166, x164, x120, x152);
    var x167: u32 = undefined;
    var x168: u1 = undefined;
    addcarryxU32(&x167, &x168, x166, x122, x154);
    var x169: u32 = undefined;
    var x170: u1 = undefined;
    addcarryxU32(&x169, &x170, x168, x124, x156);
    var x171: u32 = undefined;
    var x172: u1 = undefined;
    addcarryxU32(&x171, &x172, x170, x126, x158);
    var x173: u32 = undefined;
    var x174: u1 = undefined;
    addcarryxU32(&x173, &x174, x172, x128, x160);
    var x175: u32 = undefined;
    var x176: u1 = undefined;
    addcarryxU32(&x175, &x176, x174, x130, x136);
    var x177: u32 = undefined;
    var x178: u1 = undefined;
    addcarryxU32(&x177, &x178, x176, x132, x137);
    const x179 = (cast(u32, x178) + cast(u32, x133));
    var x180: u32 = undefined;
    var x181: u32 = undefined;
    mulxU32(&x180, &x181, x2, (arg1[7]));
    var x182: u32 = undefined;
    var x183: u32 = undefined;
    mulxU32(&x182, &x183, x2, (arg1[6]));
    var x184: u32 = undefined;
    var x185: u32 = undefined;
    mulxU32(&x184, &x185, x2, (arg1[5]));
    var x186: u32 = undefined;
    var x187: u32 = undefined;
    mulxU32(&x186, &x187, x2, (arg1[4]));
    var x188: u32 = undefined;
    var x189: u32 = undefined;
    mulxU32(&x188, &x189, x2, (arg1[3]));
    var x190: u32 = undefined;
    var x191: u32 = undefined;
    mulxU32(&x190, &x191, x2, (arg1[2]));
    var x192: u32 = undefined;
    var x193: u32 = undefined;
    mulxU32(&x192, &x193, x2, (arg1[1]));
    var x194: u32 = undefined;
    var x195: u32 = undefined;
    mulxU32(&x194, &x195, x2, (arg1[0]));
    var x196: u32 = undefined;
    var x197: u1 = undefined;
    addcarryxU32(&x196, &x197, 0x0, x195, x192);
    var x198: u32 = undefined;
    var x199: u1 = undefined;
    addcarryxU32(&x198, &x199, x197, x193, x190);
    var x200: u32 = undefined;
    var x201: u1 = undefined;
    addcarryxU32(&x200, &x201, x199, x191, x188);
    var x202: u32 = undefined;
    var x203: u1 = undefined;
    addcarryxU32(&x202, &x203, x201, x189, x186);
    var x204: u32 = undefined;
    var x205: u1 = undefined;
    addcarryxU32(&x204, &x205, x203, x187, x184);
    var x206: u32 = undefined;
    var x207: u1 = undefined;
    addcarryxU32(&x206, &x207, x205, x185, x182);
    var x208: u32 = undefined;
    var x209: u1 = undefined;
    addcarryxU32(&x208, &x209, x207, x183, x180);
    const x210 = (cast(u32, x209) + x181);
    var x211: u32 = undefined;
    var x212: u1 = undefined;
    addcarryxU32(&x211, &x212, 0x0, x163, x194);
    var x213: u32 = undefined;
    var x214: u1 = undefined;
    addcarryxU32(&x213, &x214, x212, x165, x196);
    var x215: u32 = undefined;
    var x216: u1 = undefined;
    addcarryxU32(&x215, &x216, x214, x167, x198);
    var x217: u32 = undefined;
    var x218: u1 = undefined;
    addcarryxU32(&x217, &x218, x216, x169, x200);
    var x219: u32 = undefined;
    var x220: u1 = undefined;
    addcarryxU32(&x219, &x220, x218, x171, x202);
    var x221: u32 = undefined;
    var x222: u1 = undefined;
    addcarryxU32(&x221, &x222, x220, x173, x204);
    var x223: u32 = undefined;
    var x224: u1 = undefined;
    addcarryxU32(&x223, &x224, x222, x175, x206);
    var x225: u32 = undefined;
    var x226: u1 = undefined;
    addcarryxU32(&x225, &x226, x224, x177, x208);
    var x227: u32 = undefined;
    var x228: u1 = undefined;
    addcarryxU32(&x227, &x228, x226, x179, x210);
    var x229: u32 = undefined;
    var x230: u32 = undefined;
    mulxU32(&x229, &x230, x211, 0xee00bc4f);
    var x231: u32 = undefined;
    var x232: u32 = undefined;
    mulxU32(&x231, &x232, x229, 0xffffffff);
    var x233: u32 = undefined;
    var x234: u32 = undefined;
    mulxU32(&x233, &x234, x229, 0xffffffff);
    var x235: u32 = undefined;
    var x236: u32 = undefined;
    mulxU32(&x235, &x236, x229, 0xffffffff);
    var x237: u32 = undefined;
    var x238: u32 = undefined;
    mulxU32(&x237, &x238, x229, 0xbce6faad);
    var x239: u32 = undefined;
    var x240: u32 = undefined;
    mulxU32(&x239, &x240, x229, 0xa7179e84);
    var x241: u32 = undefined;
    var x242: u32 = undefined;
    mulxU32(&x241, &x242, x229, 0xf3b9cac2);
    var x243: u32 = undefined;
    var x244: u32 = undefined;
    mulxU32(&x243, &x244, x229, 0xfc632551);
    var x245: u32 = undefined;
    var x246: u1 = undefined;
    addcarryxU32(&x245, &x246, 0x0, x244, x241);
    var x247: u32 = undefined;
    var x248: u1 = undefined;
    addcarryxU32(&x247, &x248, x246, x242, x239);
    var x249: u32 = undefined;
    var x250: u1 = undefined;
    addcarryxU32(&x249, &x250, x248, x240, x237);
    var x251: u32 = undefined;
    var x252: u1 = undefined;
    addcarryxU32(&x251, &x252, x250, x238, x235);
    var x253: u32 = undefined;
    var x254: u1 = undefined;
    addcarryxU32(&x253, &x254, x252, x236, x233);
    const x255 = (cast(u32, x254) + x234);
    var x256: u32 = undefined;
    var x257: u1 = undefined;
    addcarryxU32(&x256, &x257, 0x0, x211, x243);
    var x258: u32 = undefined;
    var x259: u1 = undefined;
    addcarryxU32(&x258, &x259, x257, x213, x245);
    var x260: u32 = undefined;
    var x261: u1 = undefined;
    addcarryxU32(&x260, &x261, x259, x215, x247);
    var x262: u32 = undefined;
    var x263: u1 = undefined;
    addcarryxU32(&x262, &x263, x261, x217, x249);
    var x264: u32 = undefined;
    var x265: u1 = undefined;
    addcarryxU32(&x264, &x265, x263, x219, x251);
    var x266: u32 = undefined;
    var x267: u1 = undefined;
    addcarryxU32(&x266, &x267, x265, x221, x253);
    var x268: u32 = undefined;
    var x269: u1 = undefined;
    addcarryxU32(&x268, &x269, x267, x223, x255);
    var x270: u32 = undefined;
    var x271: u1 = undefined;
    addcarryxU32(&x270, &x271, x269, x225, x231);
    var x272: u32 = undefined;
    var x273: u1 = undefined;
    addcarryxU32(&x272, &x273, x271, x227, x232);
    const x274 = (cast(u32, x273) + cast(u32, x228));
    var x275: u32 = undefined;
    var x276: u32 = undefined;
    mulxU32(&x275, &x276, x3, (arg1[7]));
    var x277: u32 = undefined;
    var x278: u32 = undefined;
    mulxU32(&x277, &x278, x3, (arg1[6]));
    var x279: u32 = undefined;
    var x280: u32 = undefined;
    mulxU32(&x279, &x280, x3, (arg1[5]));
    var x281: u32 = undefined;
    var x282: u32 = undefined;
    mulxU32(&x281, &x282, x3, (arg1[4]));
    var x283: u32 = undefined;
    var x284: u32 = undefined;
    mulxU32(&x283, &x284, x3, (arg1[3]));
    var x285: u32 = undefined;
    var x286: u32 = undefined;
    mulxU32(&x285, &x286, x3, (arg1[2]));
    var x287: u32 = undefined;
    var x288: u32 = undefined;
    mulxU32(&x287, &x288, x3, (arg1[1]));
    var x289: u32 = undefined;
    var x290: u32 = undefined;
    mulxU32(&x289, &x290, x3, (arg1[0]));
    var x291: u32 = undefined;
    var x292: u1 = undefined;
    addcarryxU32(&x291, &x292, 0x0, x290, x287);
    var x293: u32 = undefined;
    var x294: u1 = undefined;
    addcarryxU32(&x293, &x294, x292, x288, x285);
    var x295: u32 = undefined;
    var x296: u1 = undefined;
    addcarryxU32(&x295, &x296, x294, x286, x283);
    var x297: u32 = undefined;
    var x298: u1 = undefined;
    addcarryxU32(&x297, &x298, x296, x284, x281);
    var x299: u32 = undefined;
    var x300: u1 = undefined;
    addcarryxU32(&x299, &x300, x298, x282, x279);
    var x301: u32 = undefined;
    var x302: u1 = undefined;
    addcarryxU32(&x301, &x302, x300, x280, x277);
    var x303: u32 = undefined;
    var x304: u1 = undefined;
    addcarryxU32(&x303, &x304, x302, x278, x275);
    const x305 = (cast(u32, x304) + x276);
    var x306: u32 = undefined;
    var x307: u1 = undefined;
    addcarryxU32(&x306, &x307, 0x0, x258, x289);
    var x308: u32 = undefined;
    var x309: u1 = undefined;
    addcarryxU32(&x308, &x309, x307, x260, x291);
    var x310: u32 = undefined;
    var x311: u1 = undefined;
    addcarryxU32(&x310, &x311, x309, x262, x293);
    var x312: u32 = undefined;
    var x313: u1 = undefined;
    addcarryxU32(&x312, &x313, x311, x264, x295);
    var x314: u32 = undefined;
    var x315: u1 = undefined;
    addcarryxU32(&x314, &x315, x313, x266, x297);
    var x316: u32 = undefined;
    var x317: u1 = undefined;
    addcarryxU32(&x316, &x317, x315, x268, x299);
    var x318: u32 = undefined;
    var x319: u1 = undefined;
    addcarryxU32(&x318, &x319, x317, x270, x301);
    var x320: u32 = undefined;
    var x321: u1 = undefined;
    addcarryxU32(&x320, &x321, x319, x272, x303);
    var x322: u32 = undefined;
    var x323: u1 = undefined;
    addcarryxU32(&x322, &x323, x321, x274, x305);
    var x324: u32 = undefined;
    var x325: u32 = undefined;
    mulxU32(&x324, &x325, x306, 0xee00bc4f);
    var x326: u32 = undefined;
    var x327: u32 = undefined;
    mulxU32(&x326, &x327, x324, 0xffffffff);
    var x328: u32 = undefined;
    var x329: u32 = undefined;
    mulxU32(&x328, &x329, x324, 0xffffffff);
    var x330: u32 = undefined;
    var x331: u32 = undefined;
    mulxU32(&x330, &x331, x324, 0xffffffff);
    var x332: u32 = undefined;
    var x333: u32 = undefined;
    mulxU32(&x332, &x333, x324, 0xbce6faad);
    var x334: u32 = undefined;
    var x335: u32 = undefined;
    mulxU32(&x334, &x335, x324, 0xa7179e84);
    var x336: u32 = undefined;
    var x337: u32 = undefined;
    mulxU32(&x336, &x337, x324, 0xf3b9cac2);
    var x338: u32 = undefined;
    var x339: u32 = undefined;
    mulxU32(&x338, &x339, x324, 0xfc632551);
    var x340: u32 = undefined;
    var x341: u1 = undefined;
    addcarryxU32(&x340, &x341, 0x0, x339, x336);
    var x342: u32 = undefined;
    var x343: u1 = undefined;
    addcarryxU32(&x342, &x343, x341, x337, x334);
    var x344: u32 = undefined;
    var x345: u1 = undefined;
    addcarryxU32(&x344, &x345, x343, x335, x332);
    var x346: u32 = undefined;
    var x347: u1 = undefined;
    addcarryxU32(&x346, &x347, x345, x333, x330);
    var x348: u32 = undefined;
    var x349: u1 = undefined;
    addcarryxU32(&x348, &x349, x347, x331, x328);
    const x350 = (cast(u32, x349) + x329);
    var x351: u32 = undefined;
    var x352: u1 = undefined;
    addcarryxU32(&x351, &x352, 0x0, x306, x338);
    var x353: u32 = undefined;
    var x354: u1 = undefined;
    addcarryxU32(&x353, &x354, x352, x308, x340);
    var x355: u32 = undefined;
    var x356: u1 = undefined;
    addcarryxU32(&x355, &x356, x354, x310, x342);
    var x357: u32 = undefined;
    var x358: u1 = undefined;
    addcarryxU32(&x357, &x358, x356, x312, x344);
    var x359: u32 = undefined;
    var x360: u1 = undefined;
    addcarryxU32(&x359, &x360, x358, x314, x346);
    var x361: u32 = undefined;
    var x362: u1 = undefined;
    addcarryxU32(&x361, &x362, x360, x316, x348);
    var x363: u32 = undefined;
    var x364: u1 = undefined;
    addcarryxU32(&x363, &x364, x362, x318, x350);
    var x365: u32 = undefined;
    var x366: u1 = undefined;
    addcarryxU32(&x365, &x366, x364, x320, x326);
    var x367: u32 = undefined;
    var x368: u1 = undefined;
    addcarryxU32(&x367, &x368, x366, x322, x327);
    const x369 = (cast(u32, x368) + cast(u32, x323));
    var x370: u32 = undefined;
    var x371: u32 = undefined;
    mulxU32(&x370, &x371, x4, (arg1[7]));
    var x372: u32 = undefined;
    var x373: u32 = undefined;
    mulxU32(&x372, &x373, x4, (arg1[6]));
    var x374: u32 = undefined;
    var x375: u32 = undefined;
    mulxU32(&x374, &x375, x4, (arg1[5]));
    var x376: u32 = undefined;
    var x377: u32 = undefined;
    mulxU32(&x376, &x377, x4, (arg1[4]));
    var x378: u32 = undefined;
    var x379: u32 = undefined;
    mulxU32(&x378, &x379, x4, (arg1[3]));
    var x380: u32 = undefined;
    var x381: u32 = undefined;
    mulxU32(&x380, &x381, x4, (arg1[2]));
    var x382: u32 = undefined;
    var x383: u32 = undefined;
    mulxU32(&x382, &x383, x4, (arg1[1]));
    var x384: u32 = undefined;
    var x385: u32 = undefined;
    mulxU32(&x384, &x385, x4, (arg1[0]));
    var x386: u32 = undefined;
    var x387: u1 = undefined;
    addcarryxU32(&x386, &x387, 0x0, x385, x382);
    var x388: u32 = undefined;
    var x389: u1 = undefined;
    addcarryxU32(&x388, &x389, x387, x383, x380);
    var x390: u32 = undefined;
    var x391: u1 = undefined;
    addcarryxU32(&x390, &x391, x389, x381, x378);
    var x392: u32 = undefined;
    var x393: u1 = undefined;
    addcarryxU32(&x392, &x393, x391, x379, x376);
    var x394: u32 = undefined;
    var x395: u1 = undefined;
    addcarryxU32(&x394, &x395, x393, x377, x374);
    var x396: u32 = undefined;
    var x397: u1 = undefined;
    addcarryxU32(&x396, &x397, x395, x375, x372);
    var x398: u32 = undefined;
    var x399: u1 = undefined;
    addcarryxU32(&x398, &x399, x397, x373, x370);
    const x400 = (cast(u32, x399) + x371);
    var x401: u32 = undefined;
    var x402: u1 = undefined;
    addcarryxU32(&x401, &x402, 0x0, x353, x384);
    var x403: u32 = undefined;
    var x404: u1 = undefined;
    addcarryxU32(&x403, &x404, x402, x355, x386);
    var x405: u32 = undefined;
    var x406: u1 = undefined;
    addcarryxU32(&x405, &x406, x404, x357, x388);
    var x407: u32 = undefined;
    var x408: u1 = undefined;
    addcarryxU32(&x407, &x408, x406, x359, x390);
    var x409: u32 = undefined;
    var x410: u1 = undefined;
    addcarryxU32(&x409, &x410, x408, x361, x392);
    var x411: u32 = undefined;
    var x412: u1 = undefined;
    addcarryxU32(&x411, &x412, x410, x363, x394);
    var x413: u32 = undefined;
    var x414: u1 = undefined;
    addcarryxU32(&x413, &x414, x412, x365, x396);
    var x415: u32 = undefined;
    var x416: u1 = undefined;
    addcarryxU32(&x415, &x416, x414, x367, x398);
    var x417: u32 = undefined;
    var x418: u1 = undefined;
    addcarryxU32(&x417, &x418, x416, x369, x400);
    var x419: u32 = undefined;
    var x420: u32 = undefined;
    mulxU32(&x419, &x420, x401, 0xee00bc4f);
    var x421: u32 = undefined;
    var x422: u32 = undefined;
    mulxU32(&x421, &x422, x419, 0xffffffff);
    var x423: u32 = undefined;
    var x424: u32 = undefined;
    mulxU32(&x423, &x424, x419, 0xffffffff);
    var x425: u32 = undefined;
    var x426: u32 = undefined;
    mulxU32(&x425, &x426, x419, 0xffffffff);
    var x427: u32 = undefined;
    var x428: u32 = undefined;
    mulxU32(&x427, &x428, x419, 0xbce6faad);
    var x429: u32 = undefined;
    var x430: u32 = undefined;
    mulxU32(&x429, &x430, x419, 0xa7179e84);
    var x431: u32 = undefined;
    var x432: u32 = undefined;
    mulxU32(&x431, &x432, x419, 0xf3b9cac2);
    var x433: u32 = undefined;
    var x434: u32 = undefined;
    mulxU32(&x433, &x434, x419, 0xfc632551);
    var x435: u32 = undefined;
    var x436: u1 = undefined;
    addcarryxU32(&x435, &x436, 0x0, x434, x431);
    var x437: u32 = undefined;
    var x438: u1 = undefined;
    addcarryxU32(&x437, &x438, x436, x432, x429);
    var x439: u32 = undefined;
    var x440: u1 = undefined;
    addcarryxU32(&x439, &x440, x438, x430, x427);
    var x441: u32 = undefined;
    var x442: u1 = undefined;
    addcarryxU32(&x441, &x442, x440, x428, x425);
    var x443: u32 = undefined;
    var x444: u1 = undefined;
    addcarryxU32(&x443, &x444, x442, x426, x423);
    const x445 = (cast(u32, x444) + x424);
    var x446: u32 = undefined;
    var x447: u1 = undefined;
    addcarryxU32(&x446, &x447, 0x0, x401, x433);
    var x448: u32 = undefined;
    var x449: u1 = undefined;
    addcarryxU32(&x448, &x449, x447, x403, x435);
    var x450: u32 = undefined;
    var x451: u1 = undefined;
    addcarryxU32(&x450, &x451, x449, x405, x437);
    var x452: u32 = undefined;
    var x453: u1 = undefined;
    addcarryxU32(&x452, &x453, x451, x407, x439);
    var x454: u32 = undefined;
    var x455: u1 = undefined;
    addcarryxU32(&x454, &x455, x453, x409, x441);
    var x456: u32 = undefined;
    var x457: u1 = undefined;
    addcarryxU32(&x456, &x457, x455, x411, x443);
    var x458: u32 = undefined;
    var x459: u1 = undefined;
    addcarryxU32(&x458, &x459, x457, x413, x445);
    var x460: u32 = undefined;
    var x461: u1 = undefined;
    addcarryxU32(&x460, &x461, x459, x415, x421);
    var x462: u32 = undefined;
    var x463: u1 = undefined;
    addcarryxU32(&x462, &x463, x461, x417, x422);
    const x464 = (cast(u32, x463) + cast(u32, x418));
    var x465: u32 = undefined;
    var x466: u32 = undefined;
    mulxU32(&x465, &x466, x5, (arg1[7]));
    var x467: u32 = undefined;
    var x468: u32 = undefined;
    mulxU32(&x467, &x468, x5, (arg1[6]));
    var x469: u32 = undefined;
    var x470: u32 = undefined;
    mulxU32(&x469, &x470, x5, (arg1[5]));
    var x471: u32 = undefined;
    var x472: u32 = undefined;
    mulxU32(&x471, &x472, x5, (arg1[4]));
    var x473: u32 = undefined;
    var x474: u32 = undefined;
    mulxU32(&x473, &x474, x5, (arg1[3]));
    var x475: u32 = undefined;
    var x476: u32 = undefined;
    mulxU32(&x475, &x476, x5, (arg1[2]));
    var x477: u32 = undefined;
    var x478: u32 = undefined;
    mulxU32(&x477, &x478, x5, (arg1[1]));
    var x479: u32 = undefined;
    var x480: u32 = undefined;
    mulxU32(&x479, &x480, x5, (arg1[0]));
    var x481: u32 = undefined;
    var x482: u1 = undefined;
    addcarryxU32(&x481, &x482, 0x0, x480, x477);
    var x483: u32 = undefined;
    var x484: u1 = undefined;
    addcarryxU32(&x483, &x484, x482, x478, x475);
    var x485: u32 = undefined;
    var x486: u1 = undefined;
    addcarryxU32(&x485, &x486, x484, x476, x473);
    var x487: u32 = undefined;
    var x488: u1 = undefined;
    addcarryxU32(&x487, &x488, x486, x474, x471);
    var x489: u32 = undefined;
    var x490: u1 = undefined;
    addcarryxU32(&x489, &x490, x488, x472, x469);
    var x491: u32 = undefined;
    var x492: u1 = undefined;
    addcarryxU32(&x491, &x492, x490, x470, x467);
    var x493: u32 = undefined;
    var x494: u1 = undefined;
    addcarryxU32(&x493, &x494, x492, x468, x465);
    const x495 = (cast(u32, x494) + x466);
    var x496: u32 = undefined;
    var x497: u1 = undefined;
    addcarryxU32(&x496, &x497, 0x0, x448, x479);
    var x498: u32 = undefined;
    var x499: u1 = undefined;
    addcarryxU32(&x498, &x499, x497, x450, x481);
    var x500: u32 = undefined;
    var x501: u1 = undefined;
    addcarryxU32(&x500, &x501, x499, x452, x483);
    var x502: u32 = undefined;
    var x503: u1 = undefined;
    addcarryxU32(&x502, &x503, x501, x454, x485);
    var x504: u32 = undefined;
    var x505: u1 = undefined;
    addcarryxU32(&x504, &x505, x503, x456, x487);
    var x506: u32 = undefined;
    var x507: u1 = undefined;
    addcarryxU32(&x506, &x507, x505, x458, x489);
    var x508: u32 = undefined;
    var x509: u1 = undefined;
    addcarryxU32(&x508, &x509, x507, x460, x491);
    var x510: u32 = undefined;
    var x511: u1 = undefined;
    addcarryxU32(&x510, &x511, x509, x462, x493);
    var x512: u32 = undefined;
    var x513: u1 = undefined;
    addcarryxU32(&x512, &x513, x511, x464, x495);
    var x514: u32 = undefined;
    var x515: u32 = undefined;
    mulxU32(&x514, &x515, x496, 0xee00bc4f);
    var x516: u32 = undefined;
    var x517: u32 = undefined;
    mulxU32(&x516, &x517, x514, 0xffffffff);
    var x518: u32 = undefined;
    var x519: u32 = undefined;
    mulxU32(&x518, &x519, x514, 0xffffffff);
    var x520: u32 = undefined;
    var x521: u32 = undefined;
    mulxU32(&x520, &x521, x514, 0xffffffff);
    var x522: u32 = undefined;
    var x523: u32 = undefined;
    mulxU32(&x522, &x523, x514, 0xbce6faad);
    var x524: u32 = undefined;
    var x525: u32 = undefined;
    mulxU32(&x524, &x525, x514, 0xa7179e84);
    var x526: u32 = undefined;
    var x527: u32 = undefined;
    mulxU32(&x526, &x527, x514, 0xf3b9cac2);
    var x528: u32 = undefined;
    var x529: u32 = undefined;
    mulxU32(&x528, &x529, x514, 0xfc632551);
    var x530: u32 = undefined;
    var x531: u1 = undefined;
    addcarryxU32(&x530, &x531, 0x0, x529, x526);
    var x532: u32 = undefined;
    var x533: u1 = undefined;
    addcarryxU32(&x532, &x533, x531, x527, x524);
    var x534: u32 = undefined;
    var x535: u1 = undefined;
    addcarryxU32(&x534, &x535, x533, x525, x522);
    var x536: u32 = undefined;
    var x537: u1 = undefined;
    addcarryxU32(&x536, &x537, x535, x523, x520);
    var x538: u32 = undefined;
    var x539: u1 = undefined;
    addcarryxU32(&x538, &x539, x537, x521, x518);
    const x540 = (cast(u32, x539) + x519);
    var x541: u32 = undefined;
    var x542: u1 = undefined;
    addcarryxU32(&x541, &x542, 0x0, x496, x528);
    var x543: u32 = undefined;
    var x544: u1 = undefined;
    addcarryxU32(&x543, &x544, x542, x498, x530);
    var x545: u32 = undefined;
    var x546: u1 = undefined;
    addcarryxU32(&x545, &x546, x544, x500, x532);
    var x547: u32 = undefined;
    var x548: u1 = undefined;
    addcarryxU32(&x547, &x548, x546, x502, x534);
    var x549: u32 = undefined;
    var x550: u1 = undefined;
    addcarryxU32(&x549, &x550, x548, x504, x536);
    var x551: u32 = undefined;
    var x552: u1 = undefined;
    addcarryxU32(&x551, &x552, x550, x506, x538);
    var x553: u32 = undefined;
    var x554: u1 = undefined;
    addcarryxU32(&x553, &x554, x552, x508, x540);
    var x555: u32 = undefined;
    var x556: u1 = undefined;
    addcarryxU32(&x555, &x556, x554, x510, x516);
    var x557: u32 = undefined;
    var x558: u1 = undefined;
    addcarryxU32(&x557, &x558, x556, x512, x517);
    const x559 = (cast(u32, x558) + cast(u32, x513));
    var x560: u32 = undefined;
    var x561: u32 = undefined;
    mulxU32(&x560, &x561, x6, (arg1[7]));
    var x562: u32 = undefined;
    var x563: u32 = undefined;
    mulxU32(&x562, &x563, x6, (arg1[6]));
    var x564: u32 = undefined;
    var x565: u32 = undefined;
    mulxU32(&x564, &x565, x6, (arg1[5]));
    var x566: u32 = undefined;
    var x567: u32 = undefined;
    mulxU32(&x566, &x567, x6, (arg1[4]));
    var x568: u32 = undefined;
    var x569: u32 = undefined;
    mulxU32(&x568, &x569, x6, (arg1[3]));
    var x570: u32 = undefined;
    var x571: u32 = undefined;
    mulxU32(&x570, &x571, x6, (arg1[2]));
    var x572: u32 = undefined;
    var x573: u32 = undefined;
    mulxU32(&x572, &x573, x6, (arg1[1]));
    var x574: u32 = undefined;
    var x575: u32 = undefined;
    mulxU32(&x574, &x575, x6, (arg1[0]));
    var x576: u32 = undefined;
    var x577: u1 = undefined;
    addcarryxU32(&x576, &x577, 0x0, x575, x572);
    var x578: u32 = undefined;
    var x579: u1 = undefined;
    addcarryxU32(&x578, &x579, x577, x573, x570);
    var x580: u32 = undefined;
    var x581: u1 = undefined;
    addcarryxU32(&x580, &x581, x579, x571, x568);
    var x582: u32 = undefined;
    var x583: u1 = undefined;
    addcarryxU32(&x582, &x583, x581, x569, x566);
    var x584: u32 = undefined;
    var x585: u1 = undefined;
    addcarryxU32(&x584, &x585, x583, x567, x564);
    var x586: u32 = undefined;
    var x587: u1 = undefined;
    addcarryxU32(&x586, &x587, x585, x565, x562);
    var x588: u32 = undefined;
    var x589: u1 = undefined;
    addcarryxU32(&x588, &x589, x587, x563, x560);
    const x590 = (cast(u32, x589) + x561);
    var x591: u32 = undefined;
    var x592: u1 = undefined;
    addcarryxU32(&x591, &x592, 0x0, x543, x574);
    var x593: u32 = undefined;
    var x594: u1 = undefined;
    addcarryxU32(&x593, &x594, x592, x545, x576);
    var x595: u32 = undefined;
    var x596: u1 = undefined;
    addcarryxU32(&x595, &x596, x594, x547, x578);
    var x597: u32 = undefined;
    var x598: u1 = undefined;
    addcarryxU32(&x597, &x598, x596, x549, x580);
    var x599: u32 = undefined;
    var x600: u1 = undefined;
    addcarryxU32(&x599, &x600, x598, x551, x582);
    var x601: u32 = undefined;
    var x602: u1 = undefined;
    addcarryxU32(&x601, &x602, x600, x553, x584);
    var x603: u32 = undefined;
    var x604: u1 = undefined;
    addcarryxU32(&x603, &x604, x602, x555, x586);
    var x605: u32 = undefined;
    var x606: u1 = undefined;
    addcarryxU32(&x605, &x606, x604, x557, x588);
    var x607: u32 = undefined;
    var x608: u1 = undefined;
    addcarryxU32(&x607, &x608, x606, x559, x590);
    var x609: u32 = undefined;
    var x610: u32 = undefined;
    mulxU32(&x609, &x610, x591, 0xee00bc4f);
    var x611: u32 = undefined;
    var x612: u32 = undefined;
    mulxU32(&x611, &x612, x609, 0xffffffff);
    var x613: u32 = undefined;
    var x614: u32 = undefined;
    mulxU32(&x613, &x614, x609, 0xffffffff);
    var x615: u32 = undefined;
    var x616: u32 = undefined;
    mulxU32(&x615, &x616, x609, 0xffffffff);
    var x617: u32 = undefined;
    var x618: u32 = undefined;
    mulxU32(&x617, &x618, x609, 0xbce6faad);
    var x619: u32 = undefined;
    var x620: u32 = undefined;
    mulxU32(&x619, &x620, x609, 0xa7179e84);
    var x621: u32 = undefined;
    var x622: u32 = undefined;
    mulxU32(&x621, &x622, x609, 0xf3b9cac2);
    var x623: u32 = undefined;
    var x624: u32 = undefined;
    mulxU32(&x623, &x624, x609, 0xfc632551);
    var x625: u32 = undefined;
    var x626: u1 = undefined;
    addcarryxU32(&x625, &x626, 0x0, x624, x621);
    var x627: u32 = undefined;
    var x628: u1 = undefined;
    addcarryxU32(&x627, &x628, x626, x622, x619);
    var x629: u32 = undefined;
    var x630: u1 = undefined;
    addcarryxU32(&x629, &x630, x628, x620, x617);
    var x631: u32 = undefined;
    var x632: u1 = undefined;
    addcarryxU32(&x631, &x632, x630, x618, x615);
    var x633: u32 = undefined;
    var x634: u1 = undefined;
    addcarryxU32(&x633, &x634, x632, x616, x613);
    const x635 = (cast(u32, x634) + x614);
    var x636: u32 = undefined;
    var x637: u1 = undefined;
    addcarryxU32(&x636, &x637, 0x0, x591, x623);
    var x638: u32 = undefined;
    var x639: u1 = undefined;
    addcarryxU32(&x638, &x639, x637, x593, x625);
    var x640: u32 = undefined;
    var x641: u1 = undefined;
    addcarryxU32(&x640, &x641, x639, x595, x627);
    var x642: u32 = undefined;
    var x643: u1 = undefined;
    addcarryxU32(&x642, &x643, x641, x597, x629);
    var x644: u32 = undefined;
    var x645: u1 = undefined;
    addcarryxU32(&x644, &x645, x643, x599, x631);
    var x646: u32 = undefined;
    var x647: u1 = undefined;
    addcarryxU32(&x646, &x647, x645, x601, x633);
    var x648: u32 = undefined;
    var x649: u1 = undefined;
    addcarryxU32(&x648, &x649, x647, x603, x635);
    var x650: u32 = undefined;
    var x651: u1 = undefined;
    addcarryxU32(&x650, &x651, x649, x605, x611);
    var x652: u32 = undefined;
    var x653: u1 = undefined;
    addcarryxU32(&x652, &x653, x651, x607, x612);
    const x654 = (cast(u32, x653) + cast(u32, x608));
    var x655: u32 = undefined;
    var x656: u32 = undefined;
    mulxU32(&x655, &x656, x7, (arg1[7]));
    var x657: u32 = undefined;
    var x658: u32 = undefined;
    mulxU32(&x657, &x658, x7, (arg1[6]));
    var x659: u32 = undefined;
    var x660: u32 = undefined;
    mulxU32(&x659, &x660, x7, (arg1[5]));
    var x661: u32 = undefined;
    var x662: u32 = undefined;
    mulxU32(&x661, &x662, x7, (arg1[4]));
    var x663: u32 = undefined;
    var x664: u32 = undefined;
    mulxU32(&x663, &x664, x7, (arg1[3]));
    var x665: u32 = undefined;
    var x666: u32 = undefined;
    mulxU32(&x665, &x666, x7, (arg1[2]));
    var x667: u32 = undefined;
    var x668: u32 = undefined;
    mulxU32(&x667, &x668, x7, (arg1[1]));
    var x669: u32 = undefined;
    var x670: u32 = undefined;
    mulxU32(&x669, &x670, x7, (arg1[0]));
    var x671: u32 = undefined;
    var x672: u1 = undefined;
    addcarryxU32(&x671, &x672, 0x0, x670, x667);
    var x673: u32 = undefined;
    var x674: u1 = undefined;
    addcarryxU32(&x673, &x674, x672, x668, x665);
    var x675: u32 = undefined;
    var x676: u1 = undefined;
    addcarryxU32(&x675, &x676, x674, x666, x663);
    var x677: u32 = undefined;
    var x678: u1 = undefined;
    addcarryxU32(&x677, &x678, x676, x664, x661);
    var x679: u32 = undefined;
    var x680: u1 = undefined;
    addcarryxU32(&x679, &x680, x678, x662, x659);
    var x681: u32 = undefined;
    var x682: u1 = undefined;
    addcarryxU32(&x681, &x682, x680, x660, x657);
    var x683: u32 = undefined;
    var x684: u1 = undefined;
    addcarryxU32(&x683, &x684, x682, x658, x655);
    const x685 = (cast(u32, x684) + x656);
    var x686: u32 = undefined;
    var x687: u1 = undefined;
    addcarryxU32(&x686, &x687, 0x0, x638, x669);
    var x688: u32 = undefined;
    var x689: u1 = undefined;
    addcarryxU32(&x688, &x689, x687, x640, x671);
    var x690: u32 = undefined;
    var x691: u1 = undefined;
    addcarryxU32(&x690, &x691, x689, x642, x673);
    var x692: u32 = undefined;
    var x693: u1 = undefined;
    addcarryxU32(&x692, &x693, x691, x644, x675);
    var x694: u32 = undefined;
    var x695: u1 = undefined;
    addcarryxU32(&x694, &x695, x693, x646, x677);
    var x696: u32 = undefined;
    var x697: u1 = undefined;
    addcarryxU32(&x696, &x697, x695, x648, x679);
    var x698: u32 = undefined;
    var x699: u1 = undefined;
    addcarryxU32(&x698, &x699, x697, x650, x681);
    var x700: u32 = undefined;
    var x701: u1 = undefined;
    addcarryxU32(&x700, &x701, x699, x652, x683);
    var x702: u32 = undefined;
    var x703: u1 = undefined;
    addcarryxU32(&x702, &x703, x701, x654, x685);
    var x704: u32 = undefined;
    var x705: u32 = undefined;
    mulxU32(&x704, &x705, x686, 0xee00bc4f);
    var x706: u32 = undefined;
    var x707: u32 = undefined;
    mulxU32(&x706, &x707, x704, 0xffffffff);
    var x708: u32 = undefined;
    var x709: u32 = undefined;
    mulxU32(&x708, &x709, x704, 0xffffffff);
    var x710: u32 = undefined;
    var x711: u32 = undefined;
    mulxU32(&x710, &x711, x704, 0xffffffff);
    var x712: u32 = undefined;
    var x713: u32 = undefined;
    mulxU32(&x712, &x713, x704, 0xbce6faad);
    var x714: u32 = undefined;
    var x715: u32 = undefined;
    mulxU32(&x714, &x715, x704, 0xa7179e84);
    var x716: u32 = undefined;
    var x717: u32 = undefined;
    mulxU32(&x716, &x717, x704, 0xf3b9cac2);
    var x718: u32 = undefined;
    var x719: u32 = undefined;
    mulxU32(&x718, &x719, x704, 0xfc632551);
    var x720: u32 = undefined;
    var x721: u1 = undefined;
    addcarryxU32(&x720, &x721, 0x0, x719, x716);
    var x722: u32 = undefined;
    var x723: u1 = undefined;
    addcarryxU32(&x722, &x723, x721, x717, x714);
    var x724: u32 = undefined;
    var x725: u1 = undefined;
    addcarryxU32(&x724, &x725, x723, x715, x712);
    var x726: u32 = undefined;
    var x727: u1 = undefined;
    addcarryxU32(&x726, &x727, x725, x713, x710);
    var x728: u32 = undefined;
    var x729: u1 = undefined;
    addcarryxU32(&x728, &x729, x727, x711, x708);
    const x730 = (cast(u32, x729) + x709);
    var x731: u32 = undefined;
    var x732: u1 = undefined;
    addcarryxU32(&x731, &x732, 0x0, x686, x718);
    var x733: u32 = undefined;
    var x734: u1 = undefined;
    addcarryxU32(&x733, &x734, x732, x688, x720);
    var x735: u32 = undefined;
    var x736: u1 = undefined;
    addcarryxU32(&x735, &x736, x734, x690, x722);
    var x737: u32 = undefined;
    var x738: u1 = undefined;
    addcarryxU32(&x737, &x738, x736, x692, x724);
    var x739: u32 = undefined;
    var x740: u1 = undefined;
    addcarryxU32(&x739, &x740, x738, x694, x726);
    var x741: u32 = undefined;
    var x742: u1 = undefined;
    addcarryxU32(&x741, &x742, x740, x696, x728);
    var x743: u32 = undefined;
    var x744: u1 = undefined;
    addcarryxU32(&x743, &x744, x742, x698, x730);
    var x745: u32 = undefined;
    var x746: u1 = undefined;
    addcarryxU32(&x745, &x746, x744, x700, x706);
    var x747: u32 = undefined;
    var x748: u1 = undefined;
    addcarryxU32(&x747, &x748, x746, x702, x707);
    const x749 = (cast(u32, x748) + cast(u32, x703));
    var x750: u32 = undefined;
    var x751: u1 = undefined;
    subborrowxU32(&x750, &x751, 0x0, x733, 0xfc632551);
    var x752: u32 = undefined;
    var x753: u1 = undefined;
    subborrowxU32(&x752, &x753, x751, x735, 0xf3b9cac2);
    var x754: u32 = undefined;
    var x755: u1 = undefined;
    subborrowxU32(&x754, &x755, x753, x737, 0xa7179e84);
    var x756: u32 = undefined;
    var x757: u1 = undefined;
    subborrowxU32(&x756, &x757, x755, x739, 0xbce6faad);
    var x758: u32 = undefined;
    var x759: u1 = undefined;
    subborrowxU32(&x758, &x759, x757, x741, 0xffffffff);
    var x760: u32 = undefined;
    var x761: u1 = undefined;
    subborrowxU32(&x760, &x761, x759, x743, 0xffffffff);
    var x762: u32 = undefined;
    var x763: u1 = undefined;
    subborrowxU32(&x762, &x763, x761, x745, cast(u32, 0x0));
    var x764: u32 = undefined;
    var x765: u1 = undefined;
    subborrowxU32(&x764, &x765, x763, x747, 0xffffffff);
    var x766: u32 = undefined;
    var x767: u1 = undefined;
    subborrowxU32(&x766, &x767, x765, x749, cast(u32, 0x0));
    var x768: u32 = undefined;
    cmovznzU32(&x768, x767, x750, x733);
    var x769: u32 = undefined;
    cmovznzU32(&x769, x767, x752, x735);
    var x770: u32 = undefined;
    cmovznzU32(&x770, x767, x754, x737);
    var x771: u32 = undefined;
    cmovznzU32(&x771, x767, x756, x739);
    var x772: u32 = undefined;
    cmovznzU32(&x772, x767, x758, x741);
    var x773: u32 = undefined;
    cmovznzU32(&x773, x767, x760, x743);
    var x774: u32 = undefined;
    cmovznzU32(&x774, x767, x762, x745);
    var x775: u32 = undefined;
    cmovznzU32(&x775, x767, x764, x747);
    out1[0] = x768;
    out1[1] = x769;
    out1[2] = x770;
    out1[3] = x771;
    out1[4] = x772;
    out1[5] = x773;
    out1[6] = x774;
    out1[7] = x775;
}

/// The function add adds two field elements in the Montgomery domain.
///
/// Preconditions:
///   0 ≤ eval arg1 < m
///   0 ≤ eval arg2 < m
/// Postconditions:
///   eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) + eval (from_montgomery arg2)) mod m
///   0 ≤ eval out1 < m
///
pub fn add(out1: *MontgomeryDomainFieldElement, arg1: MontgomeryDomainFieldElement, arg2: MontgomeryDomainFieldElement) void {
    @setRuntimeSafety(mode == .Debug);

    var x1: u32 = undefined;
    var x2: u1 = undefined;
    addcarryxU32(&x1, &x2, 0x0, (arg1[0]), (arg2[0]));
    var x3: u32 = undefined;
    var x4: u1 = undefined;
    addcarryxU32(&x3, &x4, x2, (arg1[1]), (arg2[1]));
    var x5: u32 = undefined;
    var x6: u1 = undefined;
    addcarryxU32(&x5, &x6, x4, (arg1[2]), (arg2[2]));
    var x7: u32 = undefined;
    var x8: u1 = undefined;
    addcarryxU32(&x7, &x8, x6, (arg1[3]), (arg2[3]));
    var x9: u32 = undefined;
    var x10: u1 = undefined;
    addcarryxU32(&x9, &x10, x8, (arg1[4]), (arg2[4]));
    var x11: u32 = undefined;
    var x12: u1 = undefined;
    addcarryxU32(&x11, &x12, x10, (arg1[5]), (arg2[5]));
    var x13: u32 = undefined;
    var x14: u1 = undefined;
    addcarryxU32(&x13, &x14, x12, (arg1[6]), (arg2[6]));
    var x15: u32 = undefined;
    var x16: u1 = undefined;
    addcarryxU32(&x15, &x16, x14, (arg1[7]), (arg2[7]));
    var x17: u32 = undefined;
    var x18: u1 = undefined;
    subborrowxU32(&x17, &x18, 0x0, x1, 0xfc632551);
    var x19: u32 = undefined;
    var x20: u1 = undefined;
    subborrowxU32(&x19, &x20, x18, x3, 0xf3b9cac2);
    var x21: u32 = undefined;
    var x22: u1 = undefined;
    subborrowxU32(&x21, &x22, x20, x5, 0xa7179e84);
    var x23: u32 = undefined;
    var x24: u1 = undefined;
    subborrowxU32(&x23, &x24, x22, x7, 0xbce6faad);
    var x25: u32 = undefined;
    var x26: u1 = undefined;
    subborrowxU32(&x25, &x26, x24, x9, 0xffffffff);
    var x27: u32 = undefined;
    var x28: u1 = undefined;
    subborrowxU32(&x27, &x28, x26, x11, 0xffffffff);
    var x29: u32 = undefined;
    var x30: u1 = undefined;
    subborrowxU32(&x29, &x30, x28, x13, cast(u32, 0x0));
    var x31: u32 = undefined;
    var x32: u1 = undefined;
    subborrowxU32(&x31, &x32, x30, x15, 0xffffffff);
    var x33: u32 = undefined;
    var x34: u1 = undefined;
    subborrowxU32(&x33, &x34, x32, cast(u32, x16), cast(u32, 0x0));
    var x35: u32 = undefined;
    cmovznzU32(&x35, x34, x17, x1);
    var x36: u32 = undefined;
    cmovznzU32(&x36, x34, x19, x3);
    var x37: u32 = undefined;
    cmovznzU32(&x37, x34, x21, x5);
    var x38: u32 = undefined;
    cmovznzU32(&x38, x34, x23, x7);
    var x39: u32 = undefined;
    cmovznzU32(&x39, x34, x25, x9);
    var x40: u32 = undefined;
    cmovznzU32(&x40, x34, x27, x11);
    var x41: u32 = undefined;
    cmovznzU32(&x41, x34, x29, x13);
    var x42: u32 = undefined;
    cmovznzU32(&x42, x34, x31, x15);
    out1[0] = x35;
    out1[1] = x36;
    out1[2] = x37;
    out1[3] = x38;
    out1[4] = x39;
    out1[5] = x40;
    out1[6] = x41;
    out1[7] = x42;
}

/// The function sub subtracts two field elements in the Montgomery domain.
///
/// Preconditions:
///   0 ≤ eval arg1 < m
///   0 ≤ eval arg2 < m
/// Postconditions:
///   eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) - eval (from_montgomery arg2)) mod m
///   0 ≤ eval out1 < m
///
pub fn sub(out1: *MontgomeryDomainFieldElement, arg1: MontgomeryDomainFieldElement, arg2: MontgomeryDomainFieldElement) void {
    @setRuntimeSafety(mode == .Debug);

    var x1: u32 = undefined;
    var x2: u1 = undefined;
    subborrowxU32(&x1, &x2, 0x0, (arg1[0]), (arg2[0]));
    var x3: u32 = undefined;
    var x4: u1 = undefined;
    subborrowxU32(&x3, &x4, x2, (arg1[1]), (arg2[1]));
    var x5: u32 = undefined;
    var x6: u1 = undefined;
    subborrowxU32(&x5, &x6, x4, (arg1[2]), (arg2[2]));
    var x7: u32 = undefined;
    var x8: u1 = undefined;
    subborrowxU32(&x7, &x8, x6, (arg1[3]), (arg2[3]));
    var x9: u32 = undefined;
    var x10: u1 = undefined;
    subborrowxU32(&x9, &x10, x8, (arg1[4]), (arg2[4]));
    var x11: u32 = undefined;
    var x12: u1 = undefined;
    subborrowxU32(&x11, &x12, x10, (arg1[5]), (arg2[5]));
    var x13: u32 = undefined;
    var x14: u1 = undefined;
    subborrowxU32(&x13, &x14, x12, (arg1[6]), (arg2[6]));
    var x15: u32 = undefined;
    var x16: u1 = undefined;
    subborrowxU32(&x15, &x16, x14, (arg1[7]), (arg2[7]));
    var x17: u32 = undefined;
    cmovznzU32(&x17, x16, cast(u32, 0x0), 0xffffffff);
    var x18: u32 = undefined;
    var x19: u1 = undefined;
    addcarryxU32(&x18, &x19, 0x0, x1, (x17 & 0xfc632551));
    var x20: u32 = undefined;
    var x21: u1 = undefined;
    addcarryxU32(&x20, &x21, x19, x3, (x17 & 0xf3b9cac2));
    var x22: u32 = undefined;
    var x23: u1 = undefined;
    addcarryxU32(&x22, &x23, x21, x5, (x17 & 0xa7179e84));
    var x24: u32 = undefined;
    var x25: u1 = undefined;
    addcarryxU32(&x24, &x25, x23, x7, (x17 & 0xbce6faad));
    var x26: u32 = undefined;
    var x27: u1 = undefined;
    addcarryxU32(&x26, &x27, x25, x9, x17);
    var x28: u32 = undefined;
    var x29: u1 = undefined;
    addcarryxU32(&x28, &x29, x27, x11, x17);
    var x30: u32 = undefined;
    var x31: u1 = undefined;
    addcarryxU32(&x30, &x31, x29, x13, cast(u32, 0x0));
    var x32: u32 = undefined;
    var x33: u1 = undefined;
    addcarryxU32(&x32, &x33, x31, x15, x17);
    out1[0] = x18;
    out1[1] = x20;
    out1[2] = x22;
    out1[3] = x24;
    out1[4] = x26;
    out1[5] = x28;
    out1[6] = x30;
    out1[7] = x32;
}

/// The function opp negates a field element in the Montgomery domain.
///
/// Preconditions:
///   0 ≤ eval arg1 < m
/// Postconditions:
///   eval (from_montgomery out1) mod m = -eval (from_montgomery arg1) mod m
///   0 ≤ eval out1 < m
///
pub fn opp(out1: *MontgomeryDomainFieldElement, arg1: MontgomeryDomainFieldElement) void {
    @setRuntimeSafety(mode == .Debug);

    var x1: u32 = undefined;
    var x2: u1 = undefined;
    subborrowxU32(&x1, &x2, 0x0, cast(u32, 0x0), (arg1[0]));
    var x3: u32 = undefined;
    var x4: u1 = undefined;
    subborrowxU32(&x3, &x4, x2, cast(u32, 0x0), (arg1[1]));
    var x5: u32 = undefined;
    var x6: u1 = undefined;
    subborrowxU32(&x5, &x6, x4, cast(u32, 0x0), (arg1[2]));
    var x7: u32 = undefined;
    var x8: u1 = undefined;
    subborrowxU32(&x7, &x8, x6, cast(u32, 0x0), (arg1[3]));
    var x9: u32 = undefined;
    var x10: u1 = undefined;
    subborrowxU32(&x9, &x10, x8, cast(u32, 0x0), (arg1[4]));
    var x11: u32 = undefined;
    var x12: u1 = undefined;
    subborrowxU32(&x11, &x12, x10, cast(u32, 0x0), (arg1[5]));
    var x13: u32 = undefined;
    var x14: u1 = undefined;
    subborrowxU32(&x13, &x14, x12, cast(u32, 0x0), (arg1[6]));
    var x15: u32 = undefined;
    var x16: u1 = undefined;
    subborrowxU32(&x15, &x16, x14, cast(u32, 0x0), (arg1[7]));
    var x17: u32 = undefined;
    cmovznzU32(&x17, x16, cast(u32, 0x0), 0xffffffff);
    var x18: u32 = undefined;
    var x19: u1 = undefined;
    addcarryxU32(&x18, &x19, 0x0, x1, (x17 & 0xfc632551));
    var x20: u32 = undefined;
    var x21: u1 = undefined;
    addcarryxU32(&x20, &x21, x19, x3, (x17 & 0xf3b9cac2));
    var x22: u32 = undefined;
    var x23: u1 = undefined;
    addcarryxU32(&x22, &x23, x21, x5, (x17 & 0xa7179e84));
    var x24: u32 = undefined;
    var x25: u1 = undefined;
    addcarryxU32(&x24, &x25, x23, x7, (x17 & 0xbce6faad));
    var x26: u32 = undefined;
    var x27: u1 = undefined;
    addcarryxU32(&x26, &x27, x25, x9, x17);
    var x28: u32 = undefined;
    var x29: u1 = undefined;
    addcarryxU32(&x28, &x29, x27, x11, x17);
    var x30: u32 = undefined;
    var x31: u1 = undefined;
    addcarryxU32(&x30, &x31, x29, x13, cast(u32, 0x0));
    var x32: u32 = undefined;
    var x33: u1 = undefined;
    addcarryxU32(&x32, &x33, x31, x15, x17);
    out1[0] = x18;
    out1[1] = x20;
    out1[2] = x22;
    out1[3] = x24;
    out1[4] = x26;
    out1[5] = x28;
    out1[6] = x30;
    out1[7] = x32;
}

/// The function fromMontgomery translates a field element out of the Montgomery domain.
///
/// Preconditions:
///   0 ≤ eval arg1 < m
/// Postconditions:
///   eval out1 mod m = (eval arg1 * ((2^32)⁻¹ mod m)^8) mod m
///   0 ≤ eval out1 < m
///
pub fn fromMontgomery(out1: *NonMontgomeryDomainFieldElement, arg1: MontgomeryDomainFieldElement) void {
    @setRuntimeSafety(mode == .Debug);

    const x1 = (arg1[0]);
    var x2: u32 = undefined;
    var x3: u32 = undefined;
    mulxU32(&x2, &x3, x1, 0xee00bc4f);
    var x4: u32 = undefined;
    var x5: u32 = undefined;
    mulxU32(&x4, &x5, x2, 0xffffffff);
    var x6: u32 = undefined;
    var x7: u32 = undefined;
    mulxU32(&x6, &x7, x2, 0xffffffff);
    var x8: u32 = undefined;
    var x9: u32 = undefined;
    mulxU32(&x8, &x9, x2, 0xffffffff);
    var x10: u32 = undefined;
    var x11: u32 = undefined;
    mulxU32(&x10, &x11, x2, 0xbce6faad);
    var x12: u32 = undefined;
    var x13: u32 = undefined;
    mulxU32(&x12, &x13, x2, 0xa7179e84);
    var x14: u32 = undefined;
    var x15: u32 = undefined;
    mulxU32(&x14, &x15, x2, 0xf3b9cac2);
    var x16: u32 = undefined;
    var x17: u32 = undefined;
    mulxU32(&x16, &x17, x2, 0xfc632551);
    var x18: u32 = undefined;
    var x19: u1 = undefined;
    addcarryxU32(&x18, &x19, 0x0, x17, x14);
    var x20: u32 = undefined;
    var x21: u1 = undefined;
    addcarryxU32(&x20, &x21, x19, x15, x12);
    var x22: u32 = undefined;
    var x23: u1 = undefined;
    addcarryxU32(&x22, &x23, x21, x13, x10);
    var x24: u32 = undefined;
    var x25: u1 = undefined;
    addcarryxU32(&x24, &x25, x23, x11, x8);
    var x26: u32 = undefined;
    var x27: u1 = undefined;
    addcarryxU32(&x26, &x27, x25, x9, x6);
    var x28: u32 = undefined;
    var x29: u1 = undefined;
    addcarryxU32(&x28, &x29, 0x0, x1, x16);
    var x30: u32 = undefined;
    var x31: u1 = undefined;
    addcarryxU32(&x30, &x31, x29, cast(u32, 0x0), x18);
    var x32: u32 = undefined;
    var x33: u1 = undefined;
    addcarryxU32(&x32, &x33, x31, cast(u32, 0x0), x20);
    var x34: u32 = undefined;
    var x35: u1 = undefined;
    addcarryxU32(&x34, &x35, x33, cast(u32, 0x0), x22);
    var x36: u32 = undefined;
    var x37: u1 = undefined;
    addcarryxU32(&x36, &x37, x35, cast(u32, 0x0), x24);
    var x38: u32 = undefined;
    var x39: u1 = undefined;
    addcarryxU32(&x38, &x39, x37, cast(u32, 0x0), x26);
    var x40: u32 = undefined;
    var x41: u1 = undefined;
    addcarryxU32(&x40, &x41, x39, cast(u32, 0x0), (cast(u32, x27) + x7));
    var x42: u32 = undefined;
    var x43: u1 = undefined;
    addcarryxU32(&x42, &x43, x41, cast(u32, 0x0), x4);
    var x44: u32 = undefined;
    var x45: u1 = undefined;
    addcarryxU32(&x44, &x45, 0x0, x30, (arg1[1]));
    var x46: u32 = undefined;
    var x47: u1 = undefined;
    addcarryxU32(&x46, &x47, x45, x32, cast(u32, 0x0));
    var x48: u32 = undefined;
    var x49: u1 = undefined;
    addcarryxU32(&x48, &x49, x47, x34, cast(u32, 0x0));
    var x50: u32 = undefined;
    var x51: u1 = undefined;
    addcarryxU32(&x50, &x51, x49, x36, cast(u32, 0x0));
    var x52: u32 = undefined;
    var x53: u1 = undefined;
    addcarryxU32(&x52, &x53, x51, x38, cast(u32, 0x0));
    var x54: u32 = undefined;
    var x55: u1 = undefined;
    addcarryxU32(&x54, &x55, x53, x40, cast(u32, 0x0));
    var x56: u32 = undefined;
    var x57: u1 = undefined;
    addcarryxU32(&x56, &x57, x55, x42, cast(u32, 0x0));
    var x58: u32 = undefined;
    var x59: u1 = undefined;
    addcarryxU32(&x58, &x59, x57, (cast(u32, x43) + x5), cast(u32, 0x0));
    var x60: u32 = undefined;
    var x61: u32 = undefined;
    mulxU32(&x60, &x61, x44, 0xee00bc4f);
    var x62: u32 = undefined;
    var x63: u32 = undefined;
    mulxU32(&x62, &x63, x60, 0xffffffff);
    var x64: u32 = undefined;
    var x65: u32 = undefined;
    mulxU32(&x64, &x65, x60, 0xffffffff);
    var x66: u32 = undefined;
    var x67: u32 = undefined;
    mulxU32(&x66, &x67, x60, 0xffffffff);
    var x68: u32 = undefined;
    var x69: u32 = undefined;
    mulxU32(&x68, &x69, x60, 0xbce6faad);
    var x70: u32 = undefined;
    var x71: u32 = undefined;
    mulxU32(&x70, &x71, x60, 0xa7179e84);
    var x72: u32 = undefined;
    var x73: u32 = undefined;
    mulxU32(&x72, &x73, x60, 0xf3b9cac2);
    var x74: u32 = undefined;
    var x75: u32 = undefined;
    mulxU32(&x74, &x75, x60, 0xfc632551);
    var x76: u32 = undefined;
    var x77: u1 = undefined;
    addcarryxU32(&x76, &x77, 0x0, x75, x72);
    var x78: u32 = undefined;
    var x79: u1 = undefined;
    addcarryxU32(&x78, &x79, x77, x73, x70);
    var x80: u32 = undefined;
    var x81: u1 = undefined;
    addcarryxU32(&x80, &x81, x79, x71, x68);
    var x82: u32 = undefined;
    var x83: u1 = undefined;
    addcarryxU32(&x82, &x83, x81, x69, x66);
    var x84: u32 = undefined;
    var x85: u1 = undefined;
    addcarryxU32(&x84, &x85, x83, x67, x64);
    var x86: u32 = undefined;
    var x87: u1 = undefined;
    addcarryxU32(&x86, &x87, 0x0, x44, x74);
    var x88: u32 = undefined;
    var x89: u1 = undefined;
    addcarryxU32(&x88, &x89, x87, x46, x76);
    var x90: u32 = undefined;
    var x91: u1 = undefined;
    addcarryxU32(&x90, &x91, x89, x48, x78);
    var x92: u32 = undefined;
    var x93: u1 = undefined;
    addcarryxU32(&x92, &x93, x91, x50, x80);
    var x94: u32 = undefined;
    var x95: u1 = undefined;
    addcarryxU32(&x94, &x95, x93, x52, x82);
    var x96: u32 = undefined;
    var x97: u1 = undefined;
    addcarryxU32(&x96, &x97, x95, x54, x84);
    var x98: u32 = undefined;
    var x99: u1 = undefined;
    addcarryxU32(&x98, &x99, x97, x56, (cast(u32, x85) + x65));
    var x100: u32 = undefined;
    var x101: u1 = undefined;
    addcarryxU32(&x100, &x101, x99, x58, x62);
    var x102: u32 = undefined;
    var x103: u1 = undefined;
    addcarryxU32(&x102, &x103, x101, cast(u32, x59), x63);
    var x104: u32 = undefined;
    var x105: u1 = undefined;
    addcarryxU32(&x104, &x105, 0x0, x88, (arg1[2]));
    var x106: u32 = undefined;
    var x107: u1 = undefined;
    addcarryxU32(&x106, &x107, x105, x90, cast(u32, 0x0));
    var x108: u32 = undefined;
    var x109: u1 = undefined;
    addcarryxU32(&x108, &x109, x107, x92, cast(u32, 0x0));
    var x110: u32 = undefined;
    var x111: u1 = undefined;
    addcarryxU32(&x110, &x111, x109, x94, cast(u32, 0x0));
    var x112: u32 = undefined;
    var x113: u1 = undefined;
    addcarryxU32(&x112, &x113, x111, x96, cast(u32, 0x0));
    var x114: u32 = undefined;
    var x115: u1 = undefined;
    addcarryxU32(&x114, &x115, x113, x98, cast(u32, 0x0));
    var x116: u32 = undefined;
    var x117: u1 = undefined;
    addcarryxU32(&x116, &x117, x115, x100, cast(u32, 0x0));
    var x118: u32 = undefined;
    var x119: u1 = undefined;
    addcarryxU32(&x118, &x119, x117, x102, cast(u32, 0x0));
    var x120: u32 = undefined;
    var x121: u32 = undefined;
    mulxU32(&x120, &x121, x104, 0xee00bc4f);
    var x122: u32 = undefined;
    var x123: u32 = undefined;
    mulxU32(&x122, &x123, x120, 0xffffffff);
    var x124: u32 = undefined;
    var x125: u32 = undefined;
    mulxU32(&x124, &x125, x120, 0xffffffff);
    var x126: u32 = undefined;
    var x127: u32 = undefined;
    mulxU32(&x126, &x127, x120, 0xffffffff);
    var x128: u32 = undefined;
    var x129: u32 = undefined;
    mulxU32(&x128, &x129, x120, 0xbce6faad);
    var x130: u32 = undefined;
    var x131: u32 = undefined;
    mulxU32(&x130, &x131, x120, 0xa7179e84);
    var x132: u32 = undefined;
    var x133: u32 = undefined;
    mulxU32(&x132, &x133, x120, 0xf3b9cac2);
    var x134: u32 = undefined;
    var x135: u32 = undefined;
    mulxU32(&x134, &x135, x120, 0xfc632551);
    var x136: u32 = undefined;
    var x137: u1 = undefined;
    addcarryxU32(&x136, &x137, 0x0, x135, x132);
    var x138: u32 = undefined;
    var x139: u1 = undefined;
    addcarryxU32(&x138, &x139, x137, x133, x130);
    var x140: u32 = undefined;
    var x141: u1 = undefined;
    addcarryxU32(&x140, &x141, x139, x131, x128);
    var x142: u32 = undefined;
    var x143: u1 = undefined;
    addcarryxU32(&x142, &x143, x141, x129, x126);
    var x144: u32 = undefined;
    var x145: u1 = undefined;
    addcarryxU32(&x144, &x145, x143, x127, x124);
    var x146: u32 = undefined;
    var x147: u1 = undefined;
    addcarryxU32(&x146, &x147, 0x0, x104, x134);
    var x148: u32 = undefined;
    var x149: u1 = undefined;
    addcarryxU32(&x148, &x149, x147, x106, x136);
    var x150: u32 = undefined;
    var x151: u1 = undefined;
    addcarryxU32(&x150, &x151, x149, x108, x138);
    var x152: u32 = undefined;
    var x153: u1 = undefined;
    addcarryxU32(&x152, &x153, x151, x110, x140);
    var x154: u32 = undefined;
    var x155: u1 = undefined;
    addcarryxU32(&x154, &x155, x153, x112, x142);
    var x156: u32 = undefined;
    var x157: u1 = undefined;
    addcarryxU32(&x156, &x157, x155, x114, x144);
    var x158: u32 = undefined;
    var x159: u1 = undefined;
    addcarryxU32(&x158, &x159, x157, x116, (cast(u32, x145) + x125));
    var x160: u32 = undefined;
    var x161: u1 = undefined;
    addcarryxU32(&x160, &x161, x159, x118, x122);
    var x162: u32 = undefined;
    var x163: u1 = undefined;
    addcarryxU32(&x162, &x163, x161, (cast(u32, x119) + cast(u32, x103)), x123);
    var x164: u32 = undefined;
    var x165: u1 = undefined;
    addcarryxU32(&x164, &x165, 0x0, x148, (arg1[3]));
    var x166: u32 = undefined;
    var x167: u1 = undefined;
    addcarryxU32(&x166, &x167, x165, x150, cast(u32, 0x0));
    var x168: u32 = undefined;
    var x169: u1 = undefined;
    addcarryxU32(&x168, &x169, x167, x152, cast(u32, 0x0));
    var x170: u32 = undefined;
    var x171: u1 = undefined;
    addcarryxU32(&x170, &x171, x169, x154, cast(u32, 0x0));
    var x172: u32 = undefined;
    var x173: u1 = undefined;
    addcarryxU32(&x172, &x173, x171, x156, cast(u32, 0x0));
    var x174: u32 = undefined;
    var x175: u1 = undefined;
    addcarryxU32(&x174, &x175, x173, x158, cast(u32, 0x0));
    var x176: u32 = undefined;
    var x177: u1 = undefined;
    addcarryxU32(&x176, &x177, x175, x160, cast(u32, 0x0));
    var x178: u32 = undefined;
    var x179: u1 = undefined;
    addcarryxU32(&x178, &x179, x177, x162, cast(u32, 0x0));
    var x180: u32 = undefined;
    var x181: u32 = undefined;
    mulxU32(&x180, &x181, x164, 0xee00bc4f);
    var x182: u32 = undefined;
    var x183: u32 = undefined;
    mulxU32(&x182, &x183, x180, 0xffffffff);
    var x184: u32 = undefined;
    var x185: u32 = undefined;
    mulxU32(&x184, &x185, x180, 0xffffffff);
    var x186: u32 = undefined;
    var x187: u32 = undefined;
    mulxU32(&x186, &x187, x180, 0xffffffff);
    var x188: u32 = undefined;
    var x189: u32 = undefined;
    mulxU32(&x188, &x189, x180, 0xbce6faad);
    var x190: u32 = undefined;
    var x191: u32 = undefined;
    mulxU32(&x190, &x191, x180, 0xa7179e84);
    var x192: u32 = undefined;
    var x193: u32 = undefined;
    mulxU32(&x192, &x193, x180, 0xf3b9cac2);
    var x194: u32 = undefined;
    var x195: u32 = undefined;
    mulxU32(&x194, &x195, x180, 0xfc632551);
    var x196: u32 = undefined;
    var x197: u1 = undefined;
    addcarryxU32(&x196, &x197, 0x0, x195, x192);
    var x198: u32 = undefined;
    var x199: u1 = undefined;
    addcarryxU32(&x198, &x199, x197, x193, x190);
    var x200: u32 = undefined;
    var x201: u1 = undefined;
    addcarryxU32(&x200, &x201, x199, x191, x188);
    var x202: u32 = undefined;
    var x203: u1 = undefined;
    addcarryxU32(&x202, &x203, x201, x189, x186);
    var x204: u32 = undefined;
    var x205: u1 = undefined;
    addcarryxU32(&x204, &x205, x203, x187, x184);
    var x206: u32 = undefined;
    var x207: u1 = undefined;
    addcarryxU32(&x206, &x207, 0x0, x164, x194);
    var x208: u32 = undefined;
    var x209: u1 = undefined;
    addcarryxU32(&x208, &x209, x207, x166, x196);
    var x210: u32 = undefined;
    var x211: u1 = undefined;
    addcarryxU32(&x210, &x211, x209, x168, x198);
    var x212: u32 = undefined;
    var x213: u1 = undefined;
    addcarryxU32(&x212, &x213, x211, x170, x200);
    var x214: u32 = undefined;
    var x215: u1 = undefined;
    addcarryxU32(&x214, &x215, x213, x172, x202);
    var x216: u32 = undefined;
    var x217: u1 = undefined;
    addcarryxU32(&x216, &x217, x215, x174, x204);
    var x218: u32 = undefined;
    var x219: u1 = undefined;
    addcarryxU32(&x218, &x219, x217, x176, (cast(u32, x205) + x185));
    var x220: u32 = undefined;
    var x221: u1 = undefined;
    addcarryxU32(&x220, &x221, x219, x178, x182);
    var x222: u32 = undefined;
    var x223: u1 = undefined;
    addcarryxU32(&x222, &x223, x221, (cast(u32, x179) + cast(u32, x163)), x183);
    var x224: u32 = undefined;
    var x225: u1 = undefined;
    addcarryxU32(&x224, &x225, 0x0, x208, (arg1[4]));
    var x226: u32 = undefined;
    var x227: u1 = undefined;
    addcarryxU32(&x226, &x227, x225, x210, cast(u32, 0x0));
    var x228: u32 = undefined;
    var x229: u1 = undefined;
    addcarryxU32(&x228, &x229, x227, x212, cast(u32, 0x0));
    var x230: u32 = undefined;
    var x231: u1 = undefined;
    addcarryxU32(&x230, &x231, x229, x214, cast(u32, 0x0));
    var x232: u32 = undefined;
    var x233: u1 = undefined;
    addcarryxU32(&x232, &x233, x231, x216, cast(u32, 0x0));
    var x234: u32 = undefined;
    var x235: u1 = undefined;
    addcarryxU32(&x234, &x235, x233, x218, cast(u32, 0x0));
    var x236: u32 = undefined;
    var x237: u1 = undefined;
    addcarryxU32(&x236, &x237, x235, x220, cast(u32, 0x0));
    var x238: u32 = undefined;
    var x239: u1 = undefined;
    addcarryxU32(&x238, &x239, x237, x222, cast(u32, 0x0));
    var x240: u32 = undefined;
    var x241: u32 = undefined;
    mulxU32(&x240, &x241, x224, 0xee00bc4f);
    var x242: u32 = undefined;
    var x243: u32 = undefined;
    mulxU32(&x242, &x243, x240, 0xffffffff);
    var x244: u32 = undefined;
    var x245: u32 = undefined;
    mulxU32(&x244, &x245, x240, 0xffffffff);
    var x246: u32 = undefined;
    var x247: u32 = undefined;
    mulxU32(&x246, &x247, x240, 0xffffffff);
    var x248: u32 = undefined;
    var x249: u32 = undefined;
    mulxU32(&x248, &x249, x240, 0xbce6faad);
    var x250: u32 = undefined;
    var x251: u32 = undefined;
    mulxU32(&x250, &x251, x240, 0xa7179e84);
    var x252: u32 = undefined;
    var x253: u32 = undefined;
    mulxU32(&x252, &x253, x240, 0xf3b9cac2);
    var x254: u32 = undefined;
    var x255: u32 = undefined;
    mulxU32(&x254, &x255, x240, 0xfc632551);
    var x256: u32 = undefined;
    var x257: u1 = undefined;
    addcarryxU32(&x256, &x257, 0x0, x255, x252);
    var x258: u32 = undefined;
    var x259: u1 = undefined;
    addcarryxU32(&x258, &x259, x257, x253, x250);
    var x260: u32 = undefined;
    var x261: u1 = undefined;
    addcarryxU32(&x260, &x261, x259, x251, x248);
    var x262: u32 = undefined;
    var x263: u1 = undefined;
    addcarryxU32(&x262, &x263, x261, x249, x246);
    var x264: u32 = undefined;
    var x265: u1 = undefined;
    addcarryxU32(&x264, &x265, x263, x247, x244);
    var x266: u32 = undefined;
    var x267: u1 = undefined;
    addcarryxU32(&x266, &x267, 0x0, x224, x254);
    var x268: u32 = undefined;
    var x269: u1 = undefined;
    addcarryxU32(&x268, &x269, x267, x226, x256);
    var x270: u32 = undefined;
    var x271: u1 = undefined;
    addcarryxU32(&x270, &x271, x269, x228, x258);
    var x272: u32 = undefined;
    var x273: u1 = undefined;
    addcarryxU32(&x272, &x273, x271, x230, x260);
    var x274: u32 = undefined;
    var x275: u1 = undefined;
    addcarryxU32(&x274, &x275, x273, x232, x262);
    var x276: u32 = undefined;
    var x277: u1 = undefined;
    addcarryxU32(&x276, &x277, x275, x234, x264);
    var x278: u32 = undefined;
    var x279: u1 = undefined;
    addcarryxU32(&x278, &x279, x277, x236, (cast(u32, x265) + x245));
    var x280: u32 = undefined;
    var x281: u1 = undefined;
    addcarryxU32(&x280, &x281, x279, x238, x242);
    var x282: u32 = undefined;
    var x283: u1 = undefined;
    addcarryxU32(&x282, &x283, x281, (cast(u32, x239) + cast(u32, x223)), x243);
    var x284: u32 = undefined;
    var x285: u1 = undefined;
    addcarryxU32(&x284, &x285, 0x0, x268, (arg1[5]));
    var x286: u32 = undefined;
    var x287: u1 = undefined;
    addcarryxU32(&x286, &x287, x285, x270, cast(u32, 0x0));
    var x288: u32 = undefined;
    var x289: u1 = undefined;
    addcarryxU32(&x288, &x289, x287, x272, cast(u32, 0x0));
    var x290: u32 = undefined;
    var x291: u1 = undefined;
    addcarryxU32(&x290, &x291, x289, x274, cast(u32, 0x0));
    var x292: u32 = undefined;
    var x293: u1 = undefined;
    addcarryxU32(&x292, &x293, x291, x276, cast(u32, 0x0));
    var x294: u32 = undefined;
    var x295: u1 = undefined;
    addcarryxU32(&x294, &x295, x293, x278, cast(u32, 0x0));
    var x296: u32 = undefined;
    var x297: u1 = undefined;
    addcarryxU32(&x296, &x297, x295, x280, cast(u32, 0x0));
    var x298: u32 = undefined;
    var x299: u1 = undefined;
    addcarryxU32(&x298, &x299, x297, x282, cast(u32, 0x0));
    var x300: u32 = undefined;
    var x301: u32 = undefined;
    mulxU32(&x300, &x301, x284, 0xee00bc4f);
    var x302: u32 = undefined;
    var x303: u32 = undefined;
    mulxU32(&x302, &x303, x300, 0xffffffff);
    var x304: u32 = undefined;
    var x305: u32 = undefined;
    mulxU32(&x304, &x305, x300, 0xffffffff);
    var x306: u32 = undefined;
    var x307: u32 = undefined;
    mulxU32(&x306, &x307, x300, 0xffffffff);
    var x308: u32 = undefined;
    var x309: u32 = undefined;
    mulxU32(&x308, &x309, x300, 0xbce6faad);
    var x310: u32 = undefined;
    var x311: u32 = undefined;
    mulxU32(&x310, &x311, x300, 0xa7179e84);
    var x312: u32 = undefined;
    var x313: u32 = undefined;
    mulxU32(&x312, &x313, x300, 0xf3b9cac2);
    var x314: u32 = undefined;
    var x315: u32 = undefined;
    mulxU32(&x314, &x315, x300, 0xfc632551);
    var x316: u32 = undefined;
    var x317: u1 = undefined;
    addcarryxU32(&x316, &x317, 0x0, x315, x312);
    var x318: u32 = undefined;
    var x319: u1 = undefined;
    addcarryxU32(&x318, &x319, x317, x313, x310);
    var x320: u32 = undefined;
    var x321: u1 = undefined;
    addcarryxU32(&x320, &x321, x319, x311, x308);
    var x322: u32 = undefined;
    var x323: u1 = undefined;
    addcarryxU32(&x322, &x323, x321, x309, x306);
    var x324: u32 = undefined;
    var x325: u1 = undefined;
    addcarryxU32(&x324, &x325, x323, x307, x304);
    var x326: u32 = undefined;
    var x327: u1 = undefined;
    addcarryxU32(&x326, &x327, 0x0, x284, x314);
    var x328: u32 = undefined;
    var x329: u1 = undefined;
    addcarryxU32(&x328, &x329, x327, x286, x316);
    var x330: u32 = undefined;
    var x331: u1 = undefined;
    addcarryxU32(&x330, &x331, x329, x288, x318);
    var x332: u32 = undefined;
    var x333: u1 = undefined;
    addcarryxU32(&x332, &x333, x331, x290, x320);
    var x334: u32 = undefined;
    var x335: u1 = undefined;
    addcarryxU32(&x334, &x335, x333, x292, x322);
    var x336: u32 = undefined;
    var x337: u1 = undefined;
    addcarryxU32(&x336, &x337, x335, x294, x324);
    var x338: u32 = undefined;
    var x339: u1 = undefined;
    addcarryxU32(&x338, &x339, x337, x296, (cast(u32, x325) + x305));
    var x340: u32 = undefined;
    var x341: u1 = undefined;
    addcarryxU32(&x340, &x341, x339, x298, x302);
    var x342: u32 = undefined;
    var x343: u1 = undefined;
    addcarryxU32(&x342, &x343, x341, (cast(u32, x299) + cast(u32, x283)), x303);
    var x344: u32 = undefined;
    var x345: u1 = undefined;
    addcarryxU32(&x344, &x345, 0x0, x328, (arg1[6]));
    var x346: u32 = undefined;
    var x347: u1 = undefined;
    addcarryxU32(&x346, &x347, x345, x330, cast(u32, 0x0));
    var x348: u32 = undefined;
    var x349: u1 = undefined;
    addcarryxU32(&x348, &x349, x347, x332, cast(u32, 0x0));
    var x350: u32 = undefined;
    var x351: u1 = undefined;
    addcarryxU32(&x350, &x351, x349, x334, cast(u32, 0x0));
    var x352: u32 = undefined;
    var x353: u1 = undefined;
    addcarryxU32(&x352, &x353, x351, x336, cast(u32, 0x0));
    var x354: u32 = undefined;
    var x355: u1 = undefined;
    addcarryxU32(&x354, &x355, x353, x338, cast(u32, 0x0));
    var x356: u32 = undefined;
    var x357: u1 = undefined;
    addcarryxU32(&x356, &x357, x355, x340, cast(u32, 0x0));
    var x358: u32 = undefined;
    var x359: u1 = undefined;
    addcarryxU32(&x358, &x359, x357, x342, cast(u32, 0x0));
    var x360: u32 = undefined;
    var x361: u32 = undefined;
    mulxU32(&x360, &x361, x344, 0xee00bc4f);
    var x362: u32 = undefined;
    var x363: u32 = undefined;
    mulxU32(&x362, &x363, x360, 0xffffffff);
    var x364: u32 = undefined;
    var x365: u32 = undefined;
    mulxU32(&x364, &x365, x360, 0xffffffff);
    var x366: u32 = undefined;
    var x367: u32 = undefined;
    mulxU32(&x366, &x367, x360, 0xffffffff);
    var x368: u32 = undefined;
    var x369: u32 = undefined;
    mulxU32(&x368, &x369, x360, 0xbce6faad);
    var x370: u32 = undefined;
    var x371: u32 = undefined;
    mulxU32(&x370, &x371, x360, 0xa7179e84);
    var x372: u32 = undefined;
    var x373: u32 = undefined;
    mulxU32(&x372, &x373, x360, 0xf3b9cac2);
    var x374: u32 = undefined;
    var x375: u32 = undefined;
    mulxU32(&x374, &x375, x360, 0xfc632551);
    var x376: u32 = undefined;
    var x377: u1 = undefined;
    addcarryxU32(&x376, &x377, 0x0, x375, x372);
    var x378: u32 = undefined;
    var x379: u1 = undefined;
    addcarryxU32(&x378, &x379, x377, x373, x370);
    var x380: u32 = undefined;
    var x381: u1 = undefined;
    addcarryxU32(&x380, &x381, x379, x371, x368);
    var x382: u32 = undefined;
    var x383: u1 = undefined;
    addcarryxU32(&x382, &x383, x381, x369, x366);
    var x384: u32 = undefined;
    var x385: u1 = undefined;
    addcarryxU32(&x384, &x385, x383, x367, x364);
    var x386: u32 = undefined;
    var x387: u1 = undefined;
    addcarryxU32(&x386, &x387, 0x0, x344, x374);
    var x388: u32 = undefined;
    var x389: u1 = undefined;
    addcarryxU32(&x388, &x389, x387, x346, x376);
    var x390: u32 = undefined;
    var x391: u1 = undefined;
    addcarryxU32(&x390, &x391, x389, x348, x378);
    var x392: u32 = undefined;
    var x393: u1 = undefined;
    addcarryxU32(&x392, &x393, x391, x350, x380);
    var x394: u32 = undefined;
    var x395: u1 = undefined;
    addcarryxU32(&x394, &x395, x393, x352, x382);
    var x396: u32 = undefined;
    var x397: u1 = undefined;
    addcarryxU32(&x396, &x397, x395, x354, x384);
    var x398: u32 = undefined;
    var x399: u1 = undefined;
    addcarryxU32(&x398, &x399, x397, x356, (cast(u32, x385) + x365));
    var x400: u32 = undefined;
    var x401: u1 = undefined;
    addcarryxU32(&x400, &x401, x399, x358, x362);
    var x402: u32 = undefined;
    var x403: u1 = undefined;
    addcarryxU32(&x402, &x403, x401, (cast(u32, x359) + cast(u32, x343)), x363);
    var x404: u32 = undefined;
    var x405: u1 = undefined;
    addcarryxU32(&x404, &x405, 0x0, x388, (arg1[7]));
    var x406: u32 = undefined;
    var x407: u1 = undefined;
    addcarryxU32(&x406, &x407, x405, x390, cast(u32, 0x0));
    var x408: u32 = undefined;
    var x409: u1 = undefined;
    addcarryxU32(&x408, &x409, x407, x392, cast(u32, 0x0));
    var x410: u32 = undefined;
    var x411: u1 = undefined;
    addcarryxU32(&x410, &x411, x409, x394, cast(u32, 0x0));
    var x412: u32 = undefined;
    var x413: u1 = undefined;
    addcarryxU32(&x412, &x413, x411, x396, cast(u32, 0x0));
    var x414: u32 = undefined;
    var x415: u1 = undefined;
    addcarryxU32(&x414, &x415, x413, x398, cast(u32, 0x0));
    var x416: u32 = undefined;
    var x417: u1 = undefined;
    addcarryxU32(&x416, &x417, x415, x400, cast(u32, 0x0));
    var x418: u32 = undefined;
    var x419: u1 = undefined;
    addcarryxU32(&x418, &x419, x417, x402, cast(u32, 0x0));
    var x420: u32 = undefined;
    var x421: u32 = undefined;
    mulxU32(&x420, &x421, x404, 0xee00bc4f);
    var x422: u32 = undefined;
    var x423: u32 = undefined;
    mulxU32(&x422, &x423, x420, 0xffffffff);
    var x424: u32 = undefined;
    var x425: u32 = undefined;
    mulxU32(&x424, &x425, x420, 0xffffffff);
    var x426: u32 = undefined;
    var x427: u32 = undefined;
    mulxU32(&x426, &x427, x420, 0xffffffff);
    var x428: u32 = undefined;
    var x429: u32 = undefined;
    mulxU32(&x428, &x429, x420, 0xbce6faad);
    var x430: u32 = undefined;
    var x431: u32 = undefined;
    mulxU32(&x430, &x431, x420, 0xa7179e84);
    var x432: u32 = undefined;
    var x433: u32 = undefined;
    mulxU32(&x432, &x433, x420, 0xf3b9cac2);
    var x434: u32 = undefined;
    var x435: u32 = undefined;
    mulxU32(&x434, &x435, x420, 0xfc632551);
    var x436: u32 = undefined;
    var x437: u1 = undefined;
    addcarryxU32(&x436, &x437, 0x0, x435, x432);
    var x438: u32 = undefined;
    var x439: u1 = undefined;
    addcarryxU32(&x438, &x439, x437, x433, x430);
    var x440: u32 = undefined;
    var x441: u1 = undefined;
    addcarryxU32(&x440, &x441, x439, x431, x428);
    var x442: u32 = undefined;
    var x443: u1 = undefined;
    addcarryxU32(&x442, &x443, x441, x429, x426);
    var x444: u32 = undefined;
    var x445: u1 = undefined;
    addcarryxU32(&x444, &x445, x443, x427, x424);
    var x446: u32 = undefined;
    var x447: u1 = undefined;
    addcarryxU32(&x446, &x447, 0x0, x404, x434);
    var x448: u32 = undefined;
    var x449: u1 = undefined;
    addcarryxU32(&x448, &x449, x447, x406, x436);
    var x450: u32 = undefined;
    var x451: u1 = undefined;
    addcarryxU32(&x450, &x451, x449, x408, x438);
    var x452: u32 = undefined;
    var x453: u1 = undefined;
    addcarryxU32(&x452, &x453, x451, x410, x440);
    var x454: u32 = undefined;
    var x455: u1 = undefined;
    addcarryxU32(&x454, &x455, x453, x412, x442);
    var x456: u32 = undefined;
    var x457: u1 = undefined;
    addcarryxU32(&x456, &x457, x455, x414, x444);
    var x458: u32 = undefined;
    var x459: u1 = undefined;
    addcarryxU32(&x458, &x459, x457, x416, (cast(u32, x445) + x425));
    var x460: u32 = undefined;
    var x461: u1 = undefined;
    addcarryxU32(&x460, &x461, x459, x418, x422);
    var x462: u32 = undefined;
    var x463: u1 = undefined;
    addcarryxU32(&x462, &x463, x461, (cast(u32, x419) + cast(u32, x403)), x423);
    var x464: u32 = undefined;
    var x465: u1 = undefined;
    subborrowxU32(&x464, &x465, 0x0, x448, 0xfc632551);
    var x466: u32 = undefined;
    var x467: u1 = undefined;
    subborrowxU32(&x466, &x467, x465, x450, 0xf3b9cac2);
    var x468: u32 = undefined;
    var x469: u1 = undefined;
    subborrowxU32(&x468, &x469, x467, x452, 0xa7179e84);
    var x470: u32 = undefined;
    var x471: u1 = undefined;
    subborrowxU32(&x470, &x471, x469, x454, 0xbce6faad);
    var x472: u32 = undefined;
    var x473: u1 = undefined;
    subborrowxU32(&x472, &x473, x471, x456, 0xffffffff);
    var x474: u32 = undefined;
    var x475: u1 = undefined;
    subborrowxU32(&x474, &x475, x473, x458, 0xffffffff);
    var x476: u32 = undefined;
    var x477: u1 = undefined;
    subborrowxU32(&x476, &x477, x475, x460, cast(u32, 0x0));
    var x478: u32 = undefined;
    var x479: u1 = undefined;
    subborrowxU32(&x478, &x479, x477, x462, 0xffffffff);
    var x480: u32 = undefined;
    var x481: u1 = undefined;
    subborrowxU32(&x480, &x481, x479, cast(u32, x463), cast(u32, 0x0));
    var x482: u32 = undefined;
    cmovznzU32(&x482, x481, x464, x448);
    var x483: u32 = undefined;
    cmovznzU32(&x483, x481, x466, x450);
    var x484: u32 = undefined;
    cmovznzU32(&x484, x481, x468, x452);
    var x485: u32 = undefined;
    cmovznzU32(&x485, x481, x470, x454);
    var x486: u32 = undefined;
    cmovznzU32(&x486, x481, x472, x456);
    var x487: u32 = undefined;
    cmovznzU32(&x487, x481, x474, x458);
    var x488: u32 = undefined;
    cmovznzU32(&x488, x481, x476, x460);
    var x489: u32 = undefined;
    cmovznzU32(&x489, x481, x478, x462);
    out1[0] = x482;
    out1[1] = x483;
    out1[2] = x484;
    out1[3] = x485;
    out1[4] = x486;
    out1[5] = x487;
    out1[6] = x488;
    out1[7] = x489;
}

/// The function toMontgomery translates a field element into the Montgomery domain.
///
/// Preconditions:
///   0 ≤ eval arg1 < m
/// Postconditions:
///   eval (from_montgomery out1) mod m = eval arg1 mod m
///   0 ≤ eval out1 < m
///
pub fn toMontgomery(out1: *MontgomeryDomainFieldElement, arg1: NonMontgomeryDomainFieldElement) void {
    @setRuntimeSafety(mode == .Debug);

    const x1 = (arg1[1]);
    const x2 = (arg1[2]);
    const x3 = (arg1[3]);
    const x4 = (arg1[4]);
    const x5 = (arg1[5]);
    const x6 = (arg1[6]);
    const x7 = (arg1[7]);
    const x8 = (arg1[0]);
    var x9: u32 = undefined;
    var x10: u32 = undefined;
    mulxU32(&x9, &x10, x8, 0x66e12d94);
    var x11: u32 = undefined;
    var x12: u32 = undefined;
    mulxU32(&x11, &x12, x8, 0xf3d95620);
    var x13: u32 = undefined;
    var x14: u32 = undefined;
    mulxU32(&x13, &x14, x8, 0x2845b239);
    var x15: u32 = undefined;
    var x16: u32 = undefined;
    mulxU32(&x15, &x16, x8, 0x2b6bec59);
    var x17: u32 = undefined;
    var x18: u32 = undefined;
    mulxU32(&x17, &x18, x8, 0x4699799c);
    var x19: u32 = undefined;
    var x20: u32 = undefined;
    mulxU32(&x19, &x20, x8, 0x49bd6fa6);
    var x21: u32 = undefined;
    var x22: u32 = undefined;
    mulxU32(&x21, &x22, x8, 0x83244c95);
    var x23: u32 = undefined;
    var x24: u32 = undefined;
    mulxU32(&x23, &x24, x8, 0xbe79eea2);
    var x25: u32 = undefined;
    var x26: u1 = undefined;
    addcarryxU32(&x25, &x26, 0x0, x24, x21);
    var x27: u32 = undefined;
    var x28: u1 = undefined;
    addcarryxU32(&x27, &x28, x26, x22, x19);
    var x29: u32 = undefined;
    var x30: u1 = undefined;
    addcarryxU32(&x29, &x30, x28, x20, x17);
    var x31: u32 = undefined;
    var x32: u1 = undefined;
    addcarryxU32(&x31, &x32, x30, x18, x15);
    var x33: u32 = undefined;
    var x34: u1 = undefined;
    addcarryxU32(&x33, &x34, x32, x16, x13);
    var x35: u32 = undefined;
    var x36: u1 = undefined;
    addcarryxU32(&x35, &x36, x34, x14, x11);
    var x37: u32 = undefined;
    var x38: u1 = undefined;
    addcarryxU32(&x37, &x38, x36, x12, x9);
    var x39: u32 = undefined;
    var x40: u32 = undefined;
    mulxU32(&x39, &x40, x23, 0xee00bc4f);
    var x41: u32 = undefined;
    var x42: u32 = undefined;
    mulxU32(&x41, &x42, x39, 0xffffffff);
    var x43: u32 = undefined;
    var x44: u32 = undefined;
    mulxU32(&x43, &x44, x39, 0xffffffff);
    var x45: u32 = undefined;
    var x46: u32 = undefined;
    mulxU32(&x45, &x46, x39, 0xffffffff);
    var x47: u32 = undefined;
    var x48: u32 = undefined;
    mulxU32(&x47, &x48, x39, 0xbce6faad);
    var x49: u32 = undefined;
    var x50: u32 = undefined;
    mulxU32(&x49, &x50, x39, 0xa7179e84);
    var x51: u32 = undefined;
    var x52: u32 = undefined;
    mulxU32(&x51, &x52, x39, 0xf3b9cac2);
    var x53: u32 = undefined;
    var x54: u32 = undefined;
    mulxU32(&x53, &x54, x39, 0xfc632551);
    var x55: u32 = undefined;
    var x56: u1 = undefined;
    addcarryxU32(&x55, &x56, 0x0, x54, x51);
    var x57: u32 = undefined;
    var x58: u1 = undefined;
    addcarryxU32(&x57, &x58, x56, x52, x49);
    var x59: u32 = undefined;
    var x60: u1 = undefined;
    addcarryxU32(&x59, &x60, x58, x50, x47);
    var x61: u32 = undefined;
    var x62: u1 = undefined;
    addcarryxU32(&x61, &x62, x60, x48, x45);
    var x63: u32 = undefined;
    var x64: u1 = undefined;
    addcarryxU32(&x63, &x64, x62, x46, x43);
    var x65: u32 = undefined;
    var x66: u1 = undefined;
    addcarryxU32(&x65, &x66, 0x0, x23, x53);
    var x67: u32 = undefined;
    var x68: u1 = undefined;
    addcarryxU32(&x67, &x68, x66, x25, x55);
    var x69: u32 = undefined;
    var x70: u1 = undefined;
    addcarryxU32(&x69, &x70, x68, x27, x57);
    var x71: u32 = undefined;
    var x72: u1 = undefined;
    addcarryxU32(&x71, &x72, x70, x29, x59);
    var x73: u32 = undefined;
    var x74: u1 = undefined;
    addcarryxU32(&x73, &x74, x72, x31, x61);
    var x75: u32 = undefined;
    var x76: u1 = undefined;
    addcarryxU32(&x75, &x76, x74, x33, x63);
    var x77: u32 = undefined;
    var x78: u1 = undefined;
    addcarryxU32(&x77, &x78, x76, x35, (cast(u32, x64) + x44));
    var x79: u32 = undefined;
    var x80: u1 = undefined;
    addcarryxU32(&x79, &x80, x78, x37, x41);
    var x81: u32 = undefined;
    var x82: u1 = undefined;
    addcarryxU32(&x81, &x82, x80, (cast(u32, x38) + x10), x42);
    var x83: u32 = undefined;
    var x84: u32 = undefined;
    mulxU32(&x83, &x84, x1, 0x66e12d94);
    var x85: u32 = undefined;
    var x86: u32 = undefined;
    mulxU32(&x85, &x86, x1, 0xf3d95620);
    var x87: u32 = undefined;
    var x88: u32 = undefined;
    mulxU32(&x87, &x88, x1, 0x2845b239);
    var x89: u32 = undefined;
    var x90: u32 = undefined;
    mulxU32(&x89, &x90, x1, 0x2b6bec59);
    var x91: u32 = undefined;
    var x92: u32 = undefined;
    mulxU32(&x91, &x92, x1, 0x4699799c);
    var x93: u32 = undefined;
    var x94: u32 = undefined;
    mulxU32(&x93, &x94, x1, 0x49bd6fa6);
    var x95: u32 = undefined;
    var x96: u32 = undefined;
    mulxU32(&x95, &x96, x1, 0x83244c95);
    var x97: u32 = undefined;
    var x98: u32 = undefined;
    mulxU32(&x97, &x98, x1, 0xbe79eea2);
    var x99: u32 = undefined;
    var x100: u1 = undefined;
    addcarryxU32(&x99, &x100, 0x0, x98, x95);
    var x101: u32 = undefined;
    var x102: u1 = undefined;
    addcarryxU32(&x101, &x102, x100, x96, x93);
    var x103: u32 = undefined;
    var x104: u1 = undefined;
    addcarryxU32(&x103, &x104, x102, x94, x91);
    var x105: u32 = undefined;
    var x106: u1 = undefined;
    addcarryxU32(&x105, &x106, x104, x92, x89);
    var x107: u32 = undefined;
    var x108: u1 = undefined;
    addcarryxU32(&x107, &x108, x106, x90, x87);
    var x109: u32 = undefined;
    var x110: u1 = undefined;
    addcarryxU32(&x109, &x110, x108, x88, x85);
    var x111: u32 = undefined;
    var x112: u1 = undefined;
    addcarryxU32(&x111, &x112, x110, x86, x83);
    var x113: u32 = undefined;
    var x114: u1 = undefined;
    addcarryxU32(&x113, &x114, 0x0, x67, x97);
    var x115: u32 = undefined;
    var x116: u1 = undefined;
    addcarryxU32(&x115, &x116, x114, x69, x99);
    var x117: u32 = undefined;
    var x118: u1 = undefined;
    addcarryxU32(&x117, &x118, x116, x71, x101);
    var x119: u32 = undefined;
    var x120: u1 = undefined;
    addcarryxU32(&x119, &x120, x118, x73, x103);
    var x121: u32 = undefined;
    var x122: u1 = undefined;
    addcarryxU32(&x121, &x122, x120, x75, x105);
    var x123: u32 = undefined;
    var x124: u1 = undefined;
    addcarryxU32(&x123, &x124, x122, x77, x107);
    var x125: u32 = undefined;
    var x126: u1 = undefined;
    addcarryxU32(&x125, &x126, x124, x79, x109);
    var x127: u32 = undefined;
    var x128: u1 = undefined;
    addcarryxU32(&x127, &x128, x126, x81, x111);
    var x129: u32 = undefined;
    var x130: u32 = undefined;
    mulxU32(&x129, &x130, x113, 0xee00bc4f);
    var x131: u32 = undefined;
    var x132: u32 = undefined;
    mulxU32(&x131, &x132, x129, 0xffffffff);
    var x133: u32 = undefined;
    var x134: u32 = undefined;
    mulxU32(&x133, &x134, x129, 0xffffffff);
    var x135: u32 = undefined;
    var x136: u32 = undefined;
    mulxU32(&x135, &x136, x129, 0xffffffff);
    var x137: u32 = undefined;
    var x138: u32 = undefined;
    mulxU32(&x137, &x138, x129, 0xbce6faad);
    var x139: u32 = undefined;
    var x140: u32 = undefined;
    mulxU32(&x139, &x140, x129, 0xa7179e84);
    var x141: u32 = undefined;
    var x142: u32 = undefined;
    mulxU32(&x141, &x142, x129, 0xf3b9cac2);
    var x143: u32 = undefined;
    var x144: u32 = undefined;
    mulxU32(&x143, &x144, x129, 0xfc632551);
    var x145: u32 = undefined;
    var x146: u1 = undefined;
    addcarryxU32(&x145, &x146, 0x0, x144, x141);
    var x147: u32 = undefined;
    var x148: u1 = undefined;
    addcarryxU32(&x147, &x148, x146, x142, x139);
    var x149: u32 = undefined;
    var x150: u1 = undefined;
    addcarryxU32(&x149, &x150, x148, x140, x137);
    var x151: u32 = undefined;
    var x152: u1 = undefined;
    addcarryxU32(&x151, &x152, x150, x138, x135);
    var x153: u32 = undefined;
    var x154: u1 = undefined;
    addcarryxU32(&x153, &x154, x152, x136, x133);
    var x155: u32 = undefined;
    var x156: u1 = undefined;
    addcarryxU32(&x155, &x156, 0x0, x113, x143);
    var x157: u32 = undefined;
    var x158: u1 = undefined;
    addcarryxU32(&x157, &x158, x156, x115, x145);
    var x159: u32 = undefined;
    var x160: u1 = undefined;
    addcarryxU32(&x159, &x160, x158, x117, x147);
    var x161: u32 = undefined;
    var x162: u1 = undefined;
    addcarryxU32(&x161, &x162, x160, x119, x149);
    var x163: u32 = undefined;
    var x164: u1 = undefined;
    addcarryxU32(&x163, &x164, x162, x121, x151);
    var x165: u32 = undefined;
    var x166: u1 = undefined;
    addcarryxU32(&x165, &x166, x164, x123, x153);
    var x167: u32 = undefined;
    var x168: u1 = undefined;
    addcarryxU32(&x167, &x168, x166, x125, (cast(u32, x154) + x134));
    var x169: u32 = undefined;
    var x170: u1 = undefined;
    addcarryxU32(&x169, &x170, x168, x127, x131);
    var x171: u32 = undefined;
    var x172: u1 = undefined;
    addcarryxU32(&x171, &x172, x170, ((cast(u32, x128) + cast(u32, x82)) + (cast(u32, x112) + x84)), x132);
    var x173: u32 = undefined;
    var x174: u32 = undefined;
    mulxU32(&x173, &x174, x2, 0x66e12d94);
    var x175: u32 = undefined;
    var x176: u32 = undefined;
    mulxU32(&x175, &x176, x2, 0xf3d95620);
    var x177: u32 = undefined;
    var x178: u32 = undefined;
    mulxU32(&x177, &x178, x2, 0x2845b239);
    var x179: u32 = undefined;
    var x180: u32 = undefined;
    mulxU32(&x179, &x180, x2, 0x2b6bec59);
    var x181: u32 = undefined;
    var x182: u32 = undefined;
    mulxU32(&x181, &x182, x2, 0x4699799c);
    var x183: u32 = undefined;
    var x184: u32 = undefined;
    mulxU32(&x183, &x184, x2, 0x49bd6fa6);
    var x185: u32 = undefined;
    var x186: u32 = undefined;
    mulxU32(&x185, &x186, x2, 0x83244c95);
    var x187: u32 = undefined;
    var x188: u32 = undefined;
    mulxU32(&x187, &x188, x2, 0xbe79eea2);
    var x189: u32 = undefined;
    var x190: u1 = undefined;
    addcarryxU32(&x189, &x190, 0x0, x188, x185);
    var x191: u32 = undefined;
    var x192: u1 = undefined;
    addcarryxU32(&x191, &x192, x190, x186, x183);
    var x193: u32 = undefined;
    var x194: u1 = undefined;
    addcarryxU32(&x193, &x194, x192, x184, x181);
    var x195: u32 = undefined;
    var x196: u1 = undefined;
    addcarryxU32(&x195, &x196, x194, x182, x179);
    var x197: u32 = undefined;
    var x198: u1 = undefined;
    addcarryxU32(&x197, &x198, x196, x180, x177);
    var x199: u32 = undefined;
    var x200: u1 = undefined;
    addcarryxU32(&x199, &x200, x198, x178, x175);
    var x201: u32 = undefined;
    var x202: u1 = undefined;
    addcarryxU32(&x201, &x202, x200, x176, x173);
    var x203: u32 = undefined;
    var x204: u1 = undefined;
    addcarryxU32(&x203, &x204, 0x0, x157, x187);
    var x205: u32 = undefined;
    var x206: u1 = undefined;
    addcarryxU32(&x205, &x206, x204, x159, x189);
    var x207: u32 = undefined;
    var x208: u1 = undefined;
    addcarryxU32(&x207, &x208, x206, x161, x191);
    var x209: u32 = undefined;
    var x210: u1 = undefined;
    addcarryxU32(&x209, &x210, x208, x163, x193);
    var x211: u32 = undefined;
    var x212: u1 = undefined;
    addcarryxU32(&x211, &x212, x210, x165, x195);
    var x213: u32 = undefined;
    var x214: u1 = undefined;
    addcarryxU32(&x213, &x214, x212, x167, x197);
    var x215: u32 = undefined;
    var x216: u1 = undefined;
    addcarryxU32(&x215, &x216, x214, x169, x199);
    var x217: u32 = undefined;
    var x218: u1 = undefined;
    addcarryxU32(&x217, &x218, x216, x171, x201);
    var x219: u32 = undefined;
    var x220: u32 = undefined;
    mulxU32(&x219, &x220, x203, 0xee00bc4f);
    var x221: u32 = undefined;
    var x222: u32 = undefined;
    mulxU32(&x221, &x222, x219, 0xffffffff);
    var x223: u32 = undefined;
    var x224: u32 = undefined;
    mulxU32(&x223, &x224, x219, 0xffffffff);
    var x225: u32 = undefined;
    var x226: u32 = undefined;
    mulxU32(&x225, &x226, x219, 0xffffffff);
    var x227: u32 = undefined;
    var x228: u32 = undefined;
    mulxU32(&x227, &x228, x219, 0xbce6faad);
    var x229: u32 = undefined;
    var x230: u32 = undefined;
    mulxU32(&x229, &x230, x219, 0xa7179e84);
    var x231: u32 = undefined;
    var x232: u32 = undefined;
    mulxU32(&x231, &x232, x219, 0xf3b9cac2);
    var x233: u32 = undefined;
    var x234: u32 = undefined;
    mulxU32(&x233, &x234, x219, 0xfc632551);
    var x235: u32 = undefined;
    var x236: u1 = undefined;
    addcarryxU32(&x235, &x236, 0x0, x234, x231);
    var x237: u32 = undefined;
    var x238: u1 = undefined;
    addcarryxU32(&x237, &x238, x236, x232, x229);
    var x239: u32 = undefined;
    var x240: u1 = undefined;
    addcarryxU32(&x239, &x240, x238, x230, x227);
    var x241: u32 = undefined;
    var x242: u1 = undefined;
    addcarryxU32(&x241, &x242, x240, x228, x225);
    var x243: u32 = undefined;
    var x244: u1 = undefined;
    addcarryxU32(&x243, &x244, x242, x226, x223);
    var x245: u32 = undefined;
    var x246: u1 = undefined;
    addcarryxU32(&x245, &x246, 0x0, x203, x233);
    var x247: u32 = undefined;
    var x248: u1 = undefined;
    addcarryxU32(&x247, &x248, x246, x205, x235);
    var x249: u32 = undefined;
    var x250: u1 = undefined;
    addcarryxU32(&x249, &x250, x248, x207, x237);
    var x251: u32 = undefined;
    var x252: u1 = undefined;
    addcarryxU32(&x251, &x252, x250, x209, x239);
    var x253: u32 = undefined;
    var x254: u1 = undefined;
    addcarryxU32(&x253, &x254, x252, x211, x241);
    var x255: u32 = undefined;
    var x256: u1 = undefined;
    addcarryxU32(&x255, &x256, x254, x213, x243);
    var x257: u32 = undefined;
    var x258: u1 = undefined;
    addcarryxU32(&x257, &x258, x256, x215, (cast(u32, x244) + x224));
    var x259: u32 = undefined;
    var x260: u1 = undefined;
    addcarryxU32(&x259, &x260, x258, x217, x221);
    var x261: u32 = undefined;
    var x262: u1 = undefined;
    addcarryxU32(&x261, &x262, x260, ((cast(u32, x218) + cast(u32, x172)) + (cast(u32, x202) + x174)), x222);
    var x263: u32 = undefined;
    var x264: u32 = undefined;
    mulxU32(&x263, &x264, x3, 0x66e12d94);
    var x265: u32 = undefined;
    var x266: u32 = undefined;
    mulxU32(&x265, &x266, x3, 0xf3d95620);
    var x267: u32 = undefined;
    var x268: u32 = undefined;
    mulxU32(&x267, &x268, x3, 0x2845b239);
    var x269: u32 = undefined;
    var x270: u32 = undefined;
    mulxU32(&x269, &x270, x3, 0x2b6bec59);
    var x271: u32 = undefined;
    var x272: u32 = undefined;
    mulxU32(&x271, &x272, x3, 0x4699799c);
    var x273: u32 = undefined;
    var x274: u32 = undefined;
    mulxU32(&x273, &x274, x3, 0x49bd6fa6);
    var x275: u32 = undefined;
    var x276: u32 = undefined;
    mulxU32(&x275, &x276, x3, 0x83244c95);
    var x277: u32 = undefined;
    var x278: u32 = undefined;
    mulxU32(&x277, &x278, x3, 0xbe79eea2);
    var x279: u32 = undefined;
    var x280: u1 = undefined;
    addcarryxU32(&x279, &x280, 0x0, x278, x275);
    var x281: u32 = undefined;
    var x282: u1 = undefined;
    addcarryxU32(&x281, &x282, x280, x276, x273);
    var x283: u32 = undefined;
    var x284: u1 = undefined;
    addcarryxU32(&x283, &x284, x282, x274, x271);
    var x285: u32 = undefined;
    var x286: u1 = undefined;
    addcarryxU32(&x285, &x286, x284, x272, x269);
    var x287: u32 = undefined;
    var x288: u1 = undefined;
    addcarryxU32(&x287, &x288, x286, x270, x267);
    var x289: u32 = undefined;
    var x290: u1 = undefined;
    addcarryxU32(&x289, &x290, x288, x268, x265);
    var x291: u32 = undefined;
    var x292: u1 = undefined;
    addcarryxU32(&x291, &x292, x290, x266, x263);
    var x293: u32 = undefined;
    var x294: u1 = undefined;
    addcarryxU32(&x293, &x294, 0x0, x247, x277);
    var x295: u32 = undefined;
    var x296: u1 = undefined;
    addcarryxU32(&x295, &x296, x294, x249, x279);
    var x297: u32 = undefined;
    var x298: u1 = undefined;
    addcarryxU32(&x297, &x298, x296, x251, x281);
    var x299: u32 = undefined;
    var x300: u1 = undefined;
    addcarryxU32(&x299, &x300, x298, x253, x283);
    var x301: u32 = undefined;
    var x302: u1 = undefined;
    addcarryxU32(&x301, &x302, x300, x255, x285);
    var x303: u32 = undefined;
    var x304: u1 = undefined;
    addcarryxU32(&x303, &x304, x302, x257, x287);
    var x305: u32 = undefined;
    var x306: u1 = undefined;
    addcarryxU32(&x305, &x306, x304, x259, x289);
    var x307: u32 = undefined;
    var x308: u1 = undefined;
    addcarryxU32(&x307, &x308, x306, x261, x291);
    var x309: u32 = undefined;
    var x310: u32 = undefined;
    mulxU32(&x309, &x310, x293, 0xee00bc4f);
    var x311: u32 = undefined;
    var x312: u32 = undefined;
    mulxU32(&x311, &x312, x309, 0xffffffff);
    var x313: u32 = undefined;
    var x314: u32 = undefined;
    mulxU32(&x313, &x314, x309, 0xffffffff);
    var x315: u32 = undefined;
    var x316: u32 = undefined;
    mulxU32(&x315, &x316, x309, 0xffffffff);
    var x317: u32 = undefined;
    var x318: u32 = undefined;
    mulxU32(&x317, &x318, x309, 0xbce6faad);
    var x319: u32 = undefined;
    var x320: u32 = undefined;
    mulxU32(&x319, &x320, x309, 0xa7179e84);
    var x321: u32 = undefined;
    var x322: u32 = undefined;
    mulxU32(&x321, &x322, x309, 0xf3b9cac2);
    var x323: u32 = undefined;
    var x324: u32 = undefined;
    mulxU32(&x323, &x324, x309, 0xfc632551);
    var x325: u32 = undefined;
    var x326: u1 = undefined;
    addcarryxU32(&x325, &x326, 0x0, x324, x321);
    var x327: u32 = undefined;
    var x328: u1 = undefined;
    addcarryxU32(&x327, &x328, x326, x322, x319);
    var x329: u32 = undefined;
    var x330: u1 = undefined;
    addcarryxU32(&x329, &x330, x328, x320, x317);
    var x331: u32 = undefined;
    var x332: u1 = undefined;
    addcarryxU32(&x331, &x332, x330, x318, x315);
    var x333: u32 = undefined;
    var x334: u1 = undefined;
    addcarryxU32(&x333, &x334, x332, x316, x313);
    var x335: u32 = undefined;
    var x336: u1 = undefined;
    addcarryxU32(&x335, &x336, 0x0, x293, x323);
    var x337: u32 = undefined;
    var x338: u1 = undefined;
    addcarryxU32(&x337, &x338, x336, x295, x325);
    var x339: u32 = undefined;
    var x340: u1 = undefined;
    addcarryxU32(&x339, &x340, x338, x297, x327);
    var x341: u32 = undefined;
    var x342: u1 = undefined;
    addcarryxU32(&x341, &x342, x340, x299, x329);
    var x343: u32 = undefined;
    var x344: u1 = undefined;
    addcarryxU32(&x343, &x344, x342, x301, x331);
    var x345: u32 = undefined;
    var x346: u1 = undefined;
    addcarryxU32(&x345, &x346, x344, x303, x333);
    var x347: u32 = undefined;
    var x348: u1 = undefined;
    addcarryxU32(&x347, &x348, x346, x305, (cast(u32, x334) + x314));
    var x349: u32 = undefined;
    var x350: u1 = undefined;
    addcarryxU32(&x349, &x350, x348, x307, x311);
    var x351: u32 = undefined;
    var x352: u1 = undefined;
    addcarryxU32(&x351, &x352, x350, ((cast(u32, x308) + cast(u32, x262)) + (cast(u32, x292) + x264)), x312);
    var x353: u32 = undefined;
    var x354: u32 = undefined;
    mulxU32(&x353, &x354, x4, 0x66e12d94);
    var x355: u32 = undefined;
    var x356: u32 = undefined;
    mulxU32(&x355, &x356, x4, 0xf3d95620);
    var x357: u32 = undefined;
    var x358: u32 = undefined;
    mulxU32(&x357, &x358, x4, 0x2845b239);
    var x359: u32 = undefined;
    var x360: u32 = undefined;
    mulxU32(&x359, &x360, x4, 0x2b6bec59);
    var x361: u32 = undefined;
    var x362: u32 = undefined;
    mulxU32(&x361, &x362, x4, 0x4699799c);
    var x363: u32 = undefined;
    var x364: u32 = undefined;
    mulxU32(&x363, &x364, x4, 0x49bd6fa6);
    var x365: u32 = undefined;
    var x366: u32 = undefined;
    mulxU32(&x365, &x366, x4, 0x83244c95);
    var x367: u32 = undefined;
    var x368: u32 = undefined;
    mulxU32(&x367, &x368, x4, 0xbe79eea2);
    var x369: u32 = undefined;
    var x370: u1 = undefined;
    addcarryxU32(&x369, &x370, 0x0, x368, x365);
    var x371: u32 = undefined;
    var x372: u1 = undefined;
    addcarryxU32(&x371, &x372, x370, x366, x363);
    var x373: u32 = undefined;
    var x374: u1 = undefined;
    addcarryxU32(&x373, &x374, x372, x364, x361);
    var x375: u32 = undefined;
    var x376: u1 = undefined;
    addcarryxU32(&x375, &x376, x374, x362, x359);
    var x377: u32 = undefined;
    var x378: u1 = undefined;
    addcarryxU32(&x377, &x378, x376, x360, x357);
    var x379: u32 = undefined;
    var x380: u1 = undefined;
    addcarryxU32(&x379, &x380, x378, x358, x355);
    var x381: u32 = undefined;
    var x382: u1 = undefined;
    addcarryxU32(&x381, &x382, x380, x356, x353);
    var x383: u32 = undefined;
    var x384: u1 = undefined;
    addcarryxU32(&x383, &x384, 0x0, x337, x367);
    var x385: u32 = undefined;
    var x386: u1 = undefined;
    addcarryxU32(&x385, &x386, x384, x339, x369);
    var x387: u32 = undefined;
    var x388: u1 = undefined;
    addcarryxU32(&x387, &x388, x386, x341, x371);
    var x389: u32 = undefined;
    var x390: u1 = undefined;
    addcarryxU32(&x389, &x390, x388, x343, x373);
    var x391: u32 = undefined;
    var x392: u1 = undefined;
    addcarryxU32(&x391, &x392, x390, x345, x375);
    var x393: u32 = undefined;
    var x394: u1 = undefined;
    addcarryxU32(&x393, &x394, x392, x347, x377);
    var x395: u32 = undefined;
    var x396: u1 = undefined;
    addcarryxU32(&x395, &x396, x394, x349, x379);
    var x397: u32 = undefined;
    var x398: u1 = undefined;
    addcarryxU32(&x397, &x398, x396, x351, x381);
    var x399: u32 = undefined;
    var x400: u32 = undefined;
    mulxU32(&x399, &x400, x383, 0xee00bc4f);
    var x401: u32 = undefined;
    var x402: u32 = undefined;
    mulxU32(&x401, &x402, x399, 0xffffffff);
    var x403: u32 = undefined;
    var x404: u32 = undefined;
    mulxU32(&x403, &x404, x399, 0xffffffff);
    var x405: u32 = undefined;
    var x406: u32 = undefined;
    mulxU32(&x405, &x406, x399, 0xffffffff);
    var x407: u32 = undefined;
    var x408: u32 = undefined;
    mulxU32(&x407, &x408, x399, 0xbce6faad);
    var x409: u32 = undefined;
    var x410: u32 = undefined;
    mulxU32(&x409, &x410, x399, 0xa7179e84);
    var x411: u32 = undefined;
    var x412: u32 = undefined;
    mulxU32(&x411, &x412, x399, 0xf3b9cac2);
    var x413: u32 = undefined;
    var x414: u32 = undefined;
    mulxU32(&x413, &x414, x399, 0xfc632551);
    var x415: u32 = undefined;
    var x416: u1 = undefined;
    addcarryxU32(&x415, &x416, 0x0, x414, x411);
    var x417: u32 = undefined;
    var x418: u1 = undefined;
    addcarryxU32(&x417, &x418, x416, x412, x409);
    var x419: u32 = undefined;
    var x420: u1 = undefined;
    addcarryxU32(&x419, &x420, x418, x410, x407);
    var x421: u32 = undefined;
    var x422: u1 = undefined;
    addcarryxU32(&x421, &x422, x420, x408, x405);
    var x423: u32 = undefined;
    var x424: u1 = undefined;
    addcarryxU32(&x423, &x424, x422, x406, x403);
    var x425: u32 = undefined;
    var x426: u1 = undefined;
    addcarryxU32(&x425, &x426, 0x0, x383, x413);
    var x427: u32 = undefined;
    var x428: u1 = undefined;
    addcarryxU32(&x427, &x428, x426, x385, x415);
    var x429: u32 = undefined;
    var x430: u1 = undefined;
    addcarryxU32(&x429, &x430, x428, x387, x417);
    var x431: u32 = undefined;
    var x432: u1 = undefined;
    addcarryxU32(&x431, &x432, x430, x389, x419);
    var x433: u32 = undefined;
    var x434: u1 = undefined;
    addcarryxU32(&x433, &x434, x432, x391, x421);
    var x435: u32 = undefined;
    var x436: u1 = undefined;
    addcarryxU32(&x435, &x436, x434, x393, x423);
    var x437: u32 = undefined;
    var x438: u1 = undefined;
    addcarryxU32(&x437, &x438, x436, x395, (cast(u32, x424) + x404));
    var x439: u32 = undefined;
    var x440: u1 = undefined;
    addcarryxU32(&x439, &x440, x438, x397, x401);
    var x441: u32 = undefined;
    var x442: u1 = undefined;
    addcarryxU32(&x441, &x442, x440, ((cast(u32, x398) + cast(u32, x352)) + (cast(u32, x382) + x354)), x402);
    var x443: u32 = undefined;
    var x444: u32 = undefined;
    mulxU32(&x443, &x444, x5, 0x66e12d94);
    var x445: u32 = undefined;
    var x446: u32 = undefined;
    mulxU32(&x445, &x446, x5, 0xf3d95620);
    var x447: u32 = undefined;
    var x448: u32 = undefined;
    mulxU32(&x447, &x448, x5, 0x2845b239);
    var x449: u32 = undefined;
    var x450: u32 = undefined;
    mulxU32(&x449, &x450, x5, 0x2b6bec59);
    var x451: u32 = undefined;
    var x452: u32 = undefined;
    mulxU32(&x451, &x452, x5, 0x4699799c);
    var x453: u32 = undefined;
    var x454: u32 = undefined;
    mulxU32(&x453, &x454, x5, 0x49bd6fa6);
    var x455: u32 = undefined;
    var x456: u32 = undefined;
    mulxU32(&x455, &x456, x5, 0x83244c95);
    var x457: u32 = undefined;
    var x458: u32 = undefined;
    mulxU32(&x457, &x458, x5, 0xbe79eea2);
    var x459: u32 = undefined;
    var x460: u1 = undefined;
    addcarryxU32(&x459, &x460, 0x0, x458, x455);
    var x461: u32 = undefined;
    var x462: u1 = undefined;
    addcarryxU32(&x461, &x462, x460, x456, x453);
    var x463: u32 = undefined;
    var x464: u1 = undefined;
    addcarryxU32(&x463, &x464, x462, x454, x451);
    var x465: u32 = undefined;
    var x466: u1 = undefined;
    addcarryxU32(&x465, &x466, x464, x452, x449);
    var x467: u32 = undefined;
    var x468: u1 = undefined;
    addcarryxU32(&x467, &x468, x466, x450, x447);
    var x469: u32 = undefined;
    var x470: u1 = undefined;
    addcarryxU32(&x469, &x470, x468, x448, x445);
    var x471: u32 = undefined;
    var x472: u1 = undefined;
    addcarryxU32(&x471, &x472, x470, x446, x443);
    var x473: u32 = undefined;
    var x474: u1 = undefined;
    addcarryxU32(&x473, &x474, 0x0, x427, x457);
    var x475: u32 = undefined;
    var x476: u1 = undefined;
    addcarryxU32(&x475, &x476, x474, x429, x459);
    var x477: u32 = undefined;
    var x478: u1 = undefined;
    addcarryxU32(&x477, &x478, x476, x431, x461);
    var x479: u32 = undefined;
    var x480: u1 = undefined;
    addcarryxU32(&x479, &x480, x478, x433, x463);
    var x481: u32 = undefined;
    var x482: u1 = undefined;
    addcarryxU32(&x481, &x482, x480, x435, x465);
    var x483: u32 = undefined;
    var x484: u1 = undefined;
    addcarryxU32(&x483, &x484, x482, x437, x467);
    var x485: u32 = undefined;
    var x486: u1 = undefined;
    addcarryxU32(&x485, &x486, x484, x439, x469);
    var x487: u32 = undefined;
    var x488: u1 = undefined;
    addcarryxU32(&x487, &x488, x486, x441, x471);
    var x489: u32 = undefined;
    var x490: u32 = undefined;
    mulxU32(&x489, &x490, x473, 0xee00bc4f);
    var x491: u32 = undefined;
    var x492: u32 = undefined;
    mulxU32(&x491, &x492, x489, 0xffffffff);
    var x493: u32 = undefined;
    var x494: u32 = undefined;
    mulxU32(&x493, &x494, x489, 0xffffffff);
    var x495: u32 = undefined;
    var x496: u32 = undefined;
    mulxU32(&x495, &x496, x489, 0xffffffff);
    var x497: u32 = undefined;
    var x498: u32 = undefined;
    mulxU32(&x497, &x498, x489, 0xbce6faad);
    var x499: u32 = undefined;
    var x500: u32 = undefined;
    mulxU32(&x499, &x500, x489, 0xa7179e84);
    var x501: u32 = undefined;
    var x502: u32 = undefined;
    mulxU32(&x501, &x502, x489, 0xf3b9cac2);
    var x503: u32 = undefined;
    var x504: u32 = undefined;
    mulxU32(&x503, &x504, x489, 0xfc632551);
    var x505: u32 = undefined;
    var x506: u1 = undefined;
    addcarryxU32(&x505, &x506, 0x0, x504, x501);
    var x507: u32 = undefined;
    var x508: u1 = undefined;
    addcarryxU32(&x507, &x508, x506, x502, x499);
    var x509: u32 = undefined;
    var x510: u1 = undefined;
    addcarryxU32(&x509, &x510, x508, x500, x497);
    var x511: u32 = undefined;
    var x512: u1 = undefined;
    addcarryxU32(&x511, &x512, x510, x498, x495);
    var x513: u32 = undefined;
    var x514: u1 = undefined;
    addcarryxU32(&x513, &x514, x512, x496, x493);
    var x515: u32 = undefined;
    var x516: u1 = undefined;
    addcarryxU32(&x515, &x516, 0x0, x473, x503);
    var x517: u32 = undefined;
    var x518: u1 = undefined;
    addcarryxU32(&x517, &x518, x516, x475, x505);
    var x519: u32 = undefined;
    var x520: u1 = undefined;
    addcarryxU32(&x519, &x520, x518, x477, x507);
    var x521: u32 = undefined;
    var x522: u1 = undefined;
    addcarryxU32(&x521, &x522, x520, x479, x509);
    var x523: u32 = undefined;
    var x524: u1 = undefined;
    addcarryxU32(&x523, &x524, x522, x481, x511);
    var x525: u32 = undefined;
    var x526: u1 = undefined;
    addcarryxU32(&x525, &x526, x524, x483, x513);
    var x527: u32 = undefined;
    var x528: u1 = undefined;
    addcarryxU32(&x527, &x528, x526, x485, (cast(u32, x514) + x494));
    var x529: u32 = undefined;
    var x530: u1 = undefined;
    addcarryxU32(&x529, &x530, x528, x487, x491);
    var x531: u32 = undefined;
    var x532: u1 = undefined;
    addcarryxU32(&x531, &x532, x530, ((cast(u32, x488) + cast(u32, x442)) + (cast(u32, x472) + x444)), x492);
    var x533: u32 = undefined;
    var x534: u32 = undefined;
    mulxU32(&x533, &x534, x6, 0x66e12d94);
    var x535: u32 = undefined;
    var x536: u32 = undefined;
    mulxU32(&x535, &x536, x6, 0xf3d95620);
    var x537: u32 = undefined;
    var x538: u32 = undefined;
    mulxU32(&x537, &x538, x6, 0x2845b239);
    var x539: u32 = undefined;
    var x540: u32 = undefined;
    mulxU32(&x539, &x540, x6, 0x2b6bec59);
    var x541: u32 = undefined;
    var x542: u32 = undefined;
    mulxU32(&x541, &x542, x6, 0x4699799c);
    var x543: u32 = undefined;
    var x544: u32 = undefined;
    mulxU32(&x543, &x544, x6, 0x49bd6fa6);
    var x545: u32 = undefined;
    var x546: u32 = undefined;
    mulxU32(&x545, &x546, x6, 0x83244c95);
    var x547: u32 = undefined;
    var x548: u32 = undefined;
    mulxU32(&x547, &x548, x6, 0xbe79eea2);
    var x549: u32 = undefined;
    var x550: u1 = undefined;
    addcarryxU32(&x549, &x550, 0x0, x548, x545);
    var x551: u32 = undefined;
    var x552: u1 = undefined;
    addcarryxU32(&x551, &x552, x550, x546, x543);
    var x553: u32 = undefined;
    var x554: u1 = undefined;
    addcarryxU32(&x553, &x554, x552, x544, x541);
    var x555: u32 = undefined;
    var x556: u1 = undefined;
    addcarryxU32(&x555, &x556, x554, x542, x539);
    var x557: u32 = undefined;
    var x558: u1 = undefined;
    addcarryxU32(&x557, &x558, x556, x540, x537);
    var x559: u32 = undefined;
    var x560: u1 = undefined;
    addcarryxU32(&x559, &x560, x558, x538, x535);
    var x561: u32 = undefined;
    var x562: u1 = undefined;
    addcarryxU32(&x561, &x562, x560, x536, x533);
    var x563: u32 = undefined;
    var x564: u1 = undefined;
    addcarryxU32(&x563, &x564, 0x0, x517, x547);
    var x565: u32 = undefined;
    var x566: u1 = undefined;
    addcarryxU32(&x565, &x566, x564, x519, x549);
    var x567: u32 = undefined;
    var x568: u1 = undefined;
    addcarryxU32(&x567, &x568, x566, x521, x551);
    var x569: u32 = undefined;
    var x570: u1 = undefined;
    addcarryxU32(&x569, &x570, x568, x523, x553);
    var x571: u32 = undefined;
    var x572: u1 = undefined;
    addcarryxU32(&x571, &x572, x570, x525, x555);
    var x573: u32 = undefined;
    var x574: u1 = undefined;
    addcarryxU32(&x573, &x574, x572, x527, x557);
    var x575: u32 = undefined;
    var x576: u1 = undefined;
    addcarryxU32(&x575, &x576, x574, x529, x559);
    var x577: u32 = undefined;
    var x578: u1 = undefined;
    addcarryxU32(&x577, &x578, x576, x531, x561);
    var x579: u32 = undefined;
    var x580: u32 = undefined;
    mulxU32(&x579, &x580, x563, 0xee00bc4f);
    var x581: u32 = undefined;
    var x582: u32 = undefined;
    mulxU32(&x581, &x582, x579, 0xffffffff);
    var x583: u32 = undefined;
    var x584: u32 = undefined;
    mulxU32(&x583, &x584, x579, 0xffffffff);
    var x585: u32 = undefined;
    var x586: u32 = undefined;
    mulxU32(&x585, &x586, x579, 0xffffffff);
    var x587: u32 = undefined;
    var x588: u32 = undefined;
    mulxU32(&x587, &x588, x579, 0xbce6faad);
    var x589: u32 = undefined;
    var x590: u32 = undefined;
    mulxU32(&x589, &x590, x579, 0xa7179e84);
    var x591: u32 = undefined;
    var x592: u32 = undefined;
    mulxU32(&x591, &x592, x579, 0xf3b9cac2);
    var x593: u32 = undefined;
    var x594: u32 = undefined;
    mulxU32(&x593, &x594, x579, 0xfc632551);
    var x595: u32 = undefined;
    var x596: u1 = undefined;
    addcarryxU32(&x595, &x596, 0x0, x594, x591);
    var x597: u32 = undefined;
    var x598: u1 = undefined;
    addcarryxU32(&x597, &x598, x596, x592, x589);
    var x599: u32 = undefined;
    var x600: u1 = undefined;
    addcarryxU32(&x599, &x600, x598, x590, x587);
    var x601: u32 = undefined;
    var x602: u1 = undefined;
    addcarryxU32(&x601, &x602, x600, x588, x585);
    var x603: u32 = undefined;
    var x604: u1 = undefined;
    addcarryxU32(&x603, &x604, x602, x586, x583);
    var x605: u32 = undefined;
    var x606: u1 = undefined;
    addcarryxU32(&x605, &x606, 0x0, x563, x593);
    var x607: u32 = undefined;
    var x608: u1 = undefined;
    addcarryxU32(&x607, &x608, x606, x565, x595);
    var x609: u32 = undefined;
    var x610: u1 = undefined;
    addcarryxU32(&x609, &x610, x608, x567, x597);
    var x611: u32 = undefined;
    var x612: u1 = undefined;
    addcarryxU32(&x611, &x612, x610, x569, x599);
    var x613: u32 = undefined;
    var x614: u1 = undefined;
    addcarryxU32(&x613, &x614, x612, x571, x601);
    var x615: u32 = undefined;
    var x616: u1 = undefined;
    addcarryxU32(&x615, &x616, x614, x573, x603);
    var x617: u32 = undefined;
    var x618: u1 = undefined;
    addcarryxU32(&x617, &x618, x616, x575, (cast(u32, x604) + x584));
    var x619: u32 = undefined;
    var x620: u1 = undefined;
    addcarryxU32(&x619, &x620, x618, x577, x581);
    var x621: u32 = undefined;
    var x622: u1 = undefined;
    addcarryxU32(&x621, &x622, x620, ((cast(u32, x578) + cast(u32, x532)) + (cast(u32, x562) + x534)), x582);
    var x623: u32 = undefined;
    var x624: u32 = undefined;
    mulxU32(&x623, &x624, x7, 0x66e12d94);
    var x625: u32 = undefined;
    var x626: u32 = undefined;
    mulxU32(&x625, &x626, x7, 0xf3d95620);
    var x627: u32 = undefined;
    var x628: u32 = undefined;
    mulxU32(&x627, &x628, x7, 0x2845b239);
    var x629: u32 = undefined;
    var x630: u32 = undefined;
    mulxU32(&x629, &x630, x7, 0x2b6bec59);
    var x631: u32 = undefined;
    var x632: u32 = undefined;
    mulxU32(&x631, &x632, x7, 0x4699799c);
    var x633: u32 = undefined;
    var x634: u32 = undefined;
    mulxU32(&x633, &x634, x7, 0x49bd6fa6);
    var x635: u32 = undefined;
    var x636: u32 = undefined;
    mulxU32(&x635, &x636, x7, 0x83244c95);
    var x637: u32 = undefined;
    var x638: u32 = undefined;
    mulxU32(&x637, &x638, x7, 0xbe79eea2);
    var x639: u32 = undefined;
    var x640: u1 = undefined;
    addcarryxU32(&x639, &x640, 0x0, x638, x635);
    var x641: u32 = undefined;
    var x642: u1 = undefined;
    addcarryxU32(&x641, &x642, x640, x636, x633);
    var x643: u32 = undefined;
    var x644: u1 = undefined;
    addcarryxU32(&x643, &x644, x642, x634, x631);
    var x645: u32 = undefined;
    var x646: u1 = undefined;
    addcarryxU32(&x645, &x646, x644, x632, x629);
    var x647: u32 = undefined;
    var x648: u1 = undefined;
    addcarryxU32(&x647, &x648, x646, x630, x627);
    var x649: u32 = undefined;
    var x650: u1 = undefined;
    addcarryxU32(&x649, &x650, x648, x628, x625);
    var x651: u32 = undefined;
    var x652: u1 = undefined;
    addcarryxU32(&x651, &x652, x650, x626, x623);
    var x653: u32 = undefined;
    var x654: u1 = undefined;
    addcarryxU32(&x653, &x654, 0x0, x607, x637);
    var x655: u32 = undefined;
    var x656: u1 = undefined;
    addcarryxU32(&x655, &x656, x654, x609, x639);
    var x657: u32 = undefined;
    var x658: u1 = undefined;
    addcarryxU32(&x657, &x658, x656, x611, x641);
    var x659: u32 = undefined;
    var x660: u1 = undefined;
    addcarryxU32(&x659, &x660, x658, x613, x643);
    var x661: u32 = undefined;
    var x662: u1 = undefined;
    addcarryxU32(&x661, &x662, x660, x615, x645);
    var x663: u32 = undefined;
    var x664: u1 = undefined;
    addcarryxU32(&x663, &x664, x662, x617, x647);
    var x665: u32 = undefined;
    var x666: u1 = undefined;
    addcarryxU32(&x665, &x666, x664, x619, x649);
    var x667: u32 = undefined;
    var x668: u1 = undefined;
    addcarryxU32(&x667, &x668, x666, x621, x651);
    var x669: u32 = undefined;
    var x670: u32 = undefined;
    mulxU32(&x669, &x670, x653, 0xee00bc4f);
    var x671: u32 = undefined;
    var x672: u32 = undefined;
    mulxU32(&x671, &x672, x669, 0xffffffff);
    var x673: u32 = undefined;
    var x674: u32 = undefined;
    mulxU32(&x673, &x674, x669, 0xffffffff);
    var x675: u32 = undefined;
    var x676: u32 = undefined;
    mulxU32(&x675, &x676, x669, 0xffffffff);
    var x677: u32 = undefined;
    var x678: u32 = undefined;
    mulxU32(&x677, &x678, x669, 0xbce6faad);
    var x679: u32 = undefined;
    var x680: u32 = undefined;
    mulxU32(&x679, &x680, x669, 0xa7179e84);
    var x681: u32 = undefined;
    var x682: u32 = undefined;
    mulxU32(&x681, &x682, x669, 0xf3b9cac2);
    var x683: u32 = undefined;
    var x684: u32 = undefined;
    mulxU32(&x683, &x684, x669, 0xfc632551);
    var x685: u32 = undefined;
    var x686: u1 = undefined;
    addcarryxU32(&x685, &x686, 0x0, x684, x681);
    var x687: u32 = undefined;
    var x688: u1 = undefined;
    addcarryxU32(&x687, &x688, x686, x682, x679);
    var x689: u32 = undefined;
    var x690: u1 = undefined;
    addcarryxU32(&x689, &x690, x688, x680, x677);
    var x691: u32 = undefined;
    var x692: u1 = undefined;
    addcarryxU32(&x691, &x692, x690, x678, x675);
    var x693: u32 = undefined;
    var x694: u1 = undefined;
    addcarryxU32(&x693, &x694, x692, x676, x673);
    var x695: u32 = undefined;
    var x696: u1 = undefined;
    addcarryxU32(&x695, &x696, 0x0, x653, x683);
    var x697: u32 = undefined;
    var x698: u1 = undefined;
    addcarryxU32(&x697, &x698, x696, x655, x685);
    var x699: u32 = undefined;
    var x700: u1 = undefined;
    addcarryxU32(&x699, &x700, x698, x657, x687);
    var x701: u32 = undefined;
    var x702: u1 = undefined;
    addcarryxU32(&x701, &x702, x700, x659, x689);
    var x703: u32 = undefined;
    var x704: u1 = undefined;
    addcarryxU32(&x703, &x704, x702, x661, x691);
    var x705: u32 = undefined;
    var x706: u1 = undefined;
    addcarryxU32(&x705, &x706, x704, x663, x693);
    var x707: u32 = undefined;
    var x708: u1 = undefined;
    addcarryxU32(&x707, &x708, x706, x665, (cast(u32, x694) + x674));
    var x709: u32 = undefined;
    var x710: u1 = undefined;
    addcarryxU32(&x709, &x710, x708, x667, x671);
    var x711: u32 = undefined;
    var x712: u1 = undefined;
    addcarryxU32(&x711, &x712, x710, ((cast(u32, x668) + cast(u32, x622)) + (cast(u32, x652) + x624)), x672);
    var x713: u32 = undefined;
    var x714: u1 = undefined;
    subborrowxU32(&x713, &x714, 0x0, x697, 0xfc632551);
    var x715: u32 = undefined;
    var x716: u1 = undefined;
    subborrowxU32(&x715, &x716, x714, x699, 0xf3b9cac2);
    var x717: u32 = undefined;
    var x718: u1 = undefined;
    subborrowxU32(&x717, &x718, x716, x701, 0xa7179e84);
    var x719: u32 = undefined;
    var x720: u1 = undefined;
    subborrowxU32(&x719, &x720, x718, x703, 0xbce6faad);
    var x721: u32 = undefined;
    var x722: u1 = undefined;
    subborrowxU32(&x721, &x722, x720, x705, 0xffffffff);
    var x723: u32 = undefined;
    var x724: u1 = undefined;
    subborrowxU32(&x723, &x724, x722, x707, 0xffffffff);
    var x725: u32 = undefined;
    var x726: u1 = undefined;
    subborrowxU32(&x725, &x726, x724, x709, cast(u32, 0x0));
    var x727: u32 = undefined;
    var x728: u1 = undefined;
    subborrowxU32(&x727, &x728, x726, x711, 0xffffffff);
    var x729: u32 = undefined;
    var x730: u1 = undefined;
    subborrowxU32(&x729, &x730, x728, cast(u32, x712), cast(u32, 0x0));
    var x731: u32 = undefined;
    cmovznzU32(&x731, x730, x713, x697);
    var x732: u32 = undefined;
    cmovznzU32(&x732, x730, x715, x699);
    var x733: u32 = undefined;
    cmovznzU32(&x733, x730, x717, x701);
    var x734: u32 = undefined;
    cmovznzU32(&x734, x730, x719, x703);
    var x735: u32 = undefined;
    cmovznzU32(&x735, x730, x721, x705);
    var x736: u32 = undefined;
    cmovznzU32(&x736, x730, x723, x707);
    var x737: u32 = undefined;
    cmovznzU32(&x737, x730, x725, x709);
    var x738: u32 = undefined;
    cmovznzU32(&x738, x730, x727, x711);
    out1[0] = x731;
    out1[1] = x732;
    out1[2] = x733;
    out1[3] = x734;
    out1[4] = x735;
    out1[5] = x736;
    out1[6] = x737;
    out1[7] = x738;
}

/// The function nonzero outputs a single non-zero word if the input is non-zero and zero otherwise.
///
/// Preconditions:
///   0 ≤ eval arg1 < m
/// Postconditions:
///   out1 = 0 ↔ eval (from_montgomery arg1) mod m = 0
///
/// Input Bounds:
///   arg1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
/// Output Bounds:
///   out1: [0x0 ~> 0xffffffff]
pub fn nonzero(out1: *u32, arg1: [8]u32) void {
    @setRuntimeSafety(mode == .Debug);

    const x1 = ((arg1[0]) | ((arg1[1]) | ((arg1[2]) | ((arg1[3]) | ((arg1[4]) | ((arg1[5]) | ((arg1[6]) | (arg1[7]))))))));
    out1.* = x1;
}

/// The function 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], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
///   arg3: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
/// Output Bounds:
///   out1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
pub fn selectznz(out1: *[8]u32, arg1: u1, arg2: [8]u32, arg3: [8]u32) void {
    @setRuntimeSafety(mode == .Debug);

    var x1: u32 = undefined;
    cmovznzU32(&x1, arg1, (arg2[0]), (arg3[0]));
    var x2: u32 = undefined;
    cmovznzU32(&x2, arg1, (arg2[1]), (arg3[1]));
    var x3: u32 = undefined;
    cmovznzU32(&x3, arg1, (arg2[2]), (arg3[2]));
    var x4: u32 = undefined;
    cmovznzU32(&x4, arg1, (arg2[3]), (arg3[3]));
    var x5: u32 = undefined;
    cmovznzU32(&x5, arg1, (arg2[4]), (arg3[4]));
    var x6: u32 = undefined;
    cmovznzU32(&x6, arg1, (arg2[5]), (arg3[5]));
    var x7: u32 = undefined;
    cmovznzU32(&x7, arg1, (arg2[6]), (arg3[6]));
    var x8: u32 = undefined;
    cmovznzU32(&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 toBytes serializes a field element NOT in the Montgomery domain to bytes in little-endian order.
///
/// Preconditions:
///   0 ≤ eval arg1 < m
/// Postconditions:
///   out1 = map (λ x, ⌊((eval arg1 mod m) mod 2^(8 * (x + 1))) / 2^(8 * x)⌋) [0..31]
///
/// Input Bounds:
///   arg1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
/// 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]]
pub fn toBytes(out1: *[32]u8, arg1: [8]u32) void {
    @setRuntimeSafety(mode == .Debug);

    const x1 = (arg1[7]);
    const x2 = (arg1[6]);
    const x3 = (arg1[5]);
    const x4 = (arg1[4]);
    const x5 = (arg1[3]);
    const x6 = (arg1[2]);
    const x7 = (arg1[1]);
    const x8 = (arg1[0]);
    const x9 = cast(u8, (x8 & cast(u32, 0xff)));
    const x10 = (x8 >> 8);
    const x11 = cast(u8, (x10 & cast(u32, 0xff)));
    const x12 = (x10 >> 8);
    const x13 = cast(u8, (x12 & cast(u32, 0xff)));
    const x14 = cast(u8, (x12 >> 8));
    const x15 = cast(u8, (x7 & cast(u32, 0xff)));
    const x16 = (x7 >> 8);
    const x17 = cast(u8, (x16 & cast(u32, 0xff)));
    const x18 = (x16 >> 8);
    const x19 = cast(u8, (x18 & cast(u32, 0xff)));
    const x20 = cast(u8, (x18 >> 8));
    const x21 = cast(u8, (x6 & cast(u32, 0xff)));
    const x22 = (x6 >> 8);
    const x23 = cast(u8, (x22 & cast(u32, 0xff)));
    const x24 = (x22 >> 8);
    const x25 = cast(u8, (x24 & cast(u32, 0xff)));
    const x26 = cast(u8, (x24 >> 8));
    const x27 = cast(u8, (x5 & cast(u32, 0xff)));
    const x28 = (x5 >> 8);
    const x29 = cast(u8, (x28 & cast(u32, 0xff)));
    const x30 = (x28 >> 8);
    const x31 = cast(u8, (x30 & cast(u32, 0xff)));
    const x32 = cast(u8, (x30 >> 8));
    const x33 = cast(u8, (x4 & cast(u32, 0xff)));
    const x34 = (x4 >> 8);
    const x35 = cast(u8, (x34 & cast(u32, 0xff)));
    const x36 = (x34 >> 8);
    const x37 = cast(u8, (x36 & cast(u32, 0xff)));
    const x38 = cast(u8, (x36 >> 8));
    const x39 = cast(u8, (x3 & cast(u32, 0xff)));
    const x40 = (x3 >> 8);
    const x41 = cast(u8, (x40 & cast(u32, 0xff)));
    const x42 = (x40 >> 8);
    const x43 = cast(u8, (x42 & cast(u32, 0xff)));
    const x44 = cast(u8, (x42 >> 8));
    const x45 = cast(u8, (x2 & cast(u32, 0xff)));
    const x46 = (x2 >> 8);
    const x47 = cast(u8, (x46 & cast(u32, 0xff)));
    const x48 = (x46 >> 8);
    const x49 = cast(u8, (x48 & cast(u32, 0xff)));
    const x50 = cast(u8, (x48 >> 8));
    const x51 = cast(u8, (x1 & cast(u32, 0xff)));
    const x52 = (x1 >> 8);
    const x53 = cast(u8, (x52 & cast(u32, 0xff)));
    const x54 = (x52 >> 8);
    const x55 = cast(u8, (x54 & cast(u32, 0xff)));
    const x56 = cast(u8, (x54 >> 8));
    out1[0] = x9;
    out1[1] = x11;
    out1[2] = x13;
    out1[3] = x14;
    out1[4] = x15;
    out1[5] = x17;
    out1[6] = x19;
    out1[7] = x20;
    out1[8] = x21;
    out1[9] = x23;
    out1[10] = x25;
    out1[11] = x26;
    out1[12] = x27;
    out1[13] = x29;
    out1[14] = x31;
    out1[15] = x32;
    out1[16] = x33;
    out1[17] = x35;
    out1[18] = x37;
    out1[19] = x38;
    out1[20] = x39;
    out1[21] = x41;
    out1[22] = x43;
    out1[23] = x44;
    out1[24] = x45;
    out1[25] = x47;
    out1[26] = x49;
    out1[27] = x50;
    out1[28] = x51;
    out1[29] = x53;
    out1[30] = x55;
    out1[31] = x56;
}

/// The function fromBytes deserializes a field element NOT in the Montgomery domain from bytes in little-endian order.
///
/// Preconditions:
///   0 ≤ bytes_eval arg1 < m
/// Postconditions:
///   eval out1 mod m = bytes_eval arg1 mod m
///   0 ≤ eval out1 < 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]]
/// Output Bounds:
///   out1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
pub fn fromBytes(out1: *[8]u32, arg1: [32]u8) void {
    @setRuntimeSafety(mode == .Debug);

    const x1 = (cast(u32, (arg1[31])) << 24);
    const x2 = (cast(u32, (arg1[30])) << 16);
    const x3 = (cast(u32, (arg1[29])) << 8);
    const x4 = (arg1[28]);
    const x5 = (cast(u32, (arg1[27])) << 24);
    const x6 = (cast(u32, (arg1[26])) << 16);
    const x7 = (cast(u32, (arg1[25])) << 8);
    const x8 = (arg1[24]);
    const x9 = (cast(u32, (arg1[23])) << 24);
    const x10 = (cast(u32, (arg1[22])) << 16);
    const x11 = (cast(u32, (arg1[21])) << 8);
    const x12 = (arg1[20]);
    const x13 = (cast(u32, (arg1[19])) << 24);
    const x14 = (cast(u32, (arg1[18])) << 16);
    const x15 = (cast(u32, (arg1[17])) << 8);
    const x16 = (arg1[16]);
    const x17 = (cast(u32, (arg1[15])) << 24);
    const x18 = (cast(u32, (arg1[14])) << 16);
    const x19 = (cast(u32, (arg1[13])) << 8);
    const x20 = (arg1[12]);
    const x21 = (cast(u32, (arg1[11])) << 24);
    const x22 = (cast(u32, (arg1[10])) << 16);
    const x23 = (cast(u32, (arg1[9])) << 8);
    const x24 = (arg1[8]);
    const x25 = (cast(u32, (arg1[7])) << 24);
    const x26 = (cast(u32, (arg1[6])) << 16);
    const x27 = (cast(u32, (arg1[5])) << 8);
    const x28 = (arg1[4]);
    const x29 = (cast(u32, (arg1[3])) << 24);
    const x30 = (cast(u32, (arg1[2])) << 16);
    const x31 = (cast(u32, (arg1[1])) << 8);
    const x32 = (arg1[0]);
    const x33 = (x31 + cast(u32, x32));
    const x34 = (x30 + x33);
    const x35 = (x29 + x34);
    const x36 = (x27 + cast(u32, x28));
    const x37 = (x26 + x36);
    const x38 = (x25 + x37);
    const x39 = (x23 + cast(u32, x24));
    const x40 = (x22 + x39);
    const x41 = (x21 + x40);
    const x42 = (x19 + cast(u32, x20));
    const x43 = (x18 + x42);
    const x44 = (x17 + x43);
    const x45 = (x15 + cast(u32, x16));
    const x46 = (x14 + x45);
    const x47 = (x13 + x46);
    const x48 = (x11 + cast(u32, x12));
    const x49 = (x10 + x48);
    const x50 = (x9 + x49);
    const x51 = (x7 + cast(u32, x8));
    const x52 = (x6 + x51);
    const x53 = (x5 + x52);
    const x54 = (x3 + cast(u32, x4));
    const x55 = (x2 + x54);
    const x56 = (x1 + x55);
    out1[0] = x35;
    out1[1] = x38;
    out1[2] = x41;
    out1[3] = x44;
    out1[4] = x47;
    out1[5] = x50;
    out1[6] = x53;
    out1[7] = x56;
}

/// The function setOne returns the field element one in the Montgomery domain.
///
/// Postconditions:
///   eval (from_montgomery out1) mod m = 1 mod m
///   0 ≤ eval out1 < m
///
pub fn setOne(out1: *MontgomeryDomainFieldElement) void {
    @setRuntimeSafety(mode == .Debug);

    out1[0] = 0x39cdaaf;
    out1[1] = 0xc46353d;
    out1[2] = 0x58e8617b;
    out1[3] = 0x43190552;
    out1[4] = cast(u32, 0x0);
    out1[5] = cast(u32, 0x0);
    out1[6] = 0xffffffff;
    out1[7] = cast(u32, 0x0);
}

/// The function msat returns the saturated representation of the prime modulus.
///
/// Postconditions:
///   twos_complement_eval out1 = m
///   0 ≤ eval out1 < m
///
/// Output Bounds:
///   out1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
pub fn msat(out1: *[9]u32) void {
    @setRuntimeSafety(mode == .Debug);

    out1[0] = 0xfc632551;
    out1[1] = 0xf3b9cac2;
    out1[2] = 0xa7179e84;
    out1[3] = 0xbce6faad;
    out1[4] = 0xffffffff;
    out1[5] = 0xffffffff;
    out1[6] = cast(u32, 0x0);
    out1[7] = 0xffffffff;
    out1[8] = cast(u32, 0x0);
}

/// The function divstep computes a divstep.
///
/// Preconditions:
///   0 ≤ eval arg4 < m
///   0 ≤ eval arg5 < m
/// Postconditions:
///   out1 = (if 0 < arg1 ∧ (twos_complement_eval arg3) is odd then 1 - arg1 else 1 + arg1)
///   twos_complement_eval out2 = (if 0 < arg1 ∧ (twos_complement_eval arg3) is odd then twos_complement_eval arg3 else twos_complement_eval arg2)
///   twos_complement_eval out3 = (if 0 < arg1 ∧ (twos_complement_eval arg3) is odd then ⌊(twos_complement_eval arg3 - twos_complement_eval arg2) / 2⌋ else ⌊(twos_complement_eval arg3 + (twos_complement_eval arg3 mod 2) * twos_complement_eval arg2) / 2⌋)
///   eval (from_montgomery out4) mod m = (if 0 < arg1 ∧ (twos_complement_eval arg3) is odd then (2 * eval (from_montgomery arg5)) mod m else (2 * eval (from_montgomery arg4)) mod m)
///   eval (from_montgomery out5) mod m = (if 0 < arg1 ∧ (twos_complement_eval arg3) is odd then (eval (from_montgomery arg4) - eval (from_montgomery arg4)) mod m else (eval (from_montgomery arg5) + (twos_complement_eval arg3 mod 2) * eval (from_montgomery arg4)) mod m)
///   0 ≤ eval out5 < m
///   0 ≤ eval out5 < m
///   0 ≤ eval out2 < m
///   0 ≤ eval out3 < m
///
/// Input Bounds:
///   arg1: [0x0 ~> 0xffffffff]
///   arg2: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
///   arg3: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
///   arg4: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
///   arg5: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
/// Output Bounds:
///   out1: [0x0 ~> 0xffffffff]
///   out2: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
///   out3: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
///   out4: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
///   out5: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
pub fn divstep(out1: *u32, out2: *[9]u32, out3: *[9]u32, out4: *[8]u32, out5: *[8]u32, arg1: u32, arg2: [9]u32, arg3: [9]u32, arg4: [8]u32, arg5: [8]u32) void {
    @setRuntimeSafety(mode == .Debug);

    var x1: u32 = undefined;
    var x2: u1 = undefined;
    addcarryxU32(&x1, &x2, 0x0, (~arg1), cast(u32, 0x1));
    const x3 = (cast(u1, (x1 >> 31)) & cast(u1, ((arg3[0]) & cast(u32, 0x1))));
    var x4: u32 = undefined;
    var x5: u1 = undefined;
    addcarryxU32(&x4, &x5, 0x0, (~arg1), cast(u32, 0x1));
    var x6: u32 = undefined;
    cmovznzU32(&x6, x3, arg1, x4);
    var x7: u32 = undefined;
    cmovznzU32(&x7, x3, (arg2[0]), (arg3[0]));
    var x8: u32 = undefined;
    cmovznzU32(&x8, x3, (arg2[1]), (arg3[1]));
    var x9: u32 = undefined;
    cmovznzU32(&x9, x3, (arg2[2]), (arg3[2]));
    var x10: u32 = undefined;
    cmovznzU32(&x10, x3, (arg2[3]), (arg3[3]));
    var x11: u32 = undefined;
    cmovznzU32(&x11, x3, (arg2[4]), (arg3[4]));
    var x12: u32 = undefined;
    cmovznzU32(&x12, x3, (arg2[5]), (arg3[5]));
    var x13: u32 = undefined;
    cmovznzU32(&x13, x3, (arg2[6]), (arg3[6]));
    var x14: u32 = undefined;
    cmovznzU32(&x14, x3, (arg2[7]), (arg3[7]));
    var x15: u32 = undefined;
    cmovznzU32(&x15, x3, (arg2[8]), (arg3[8]));
    var x16: u32 = undefined;
    var x17: u1 = undefined;
    addcarryxU32(&x16, &x17, 0x0, cast(u32, 0x1), (~(arg2[0])));
    var x18: u32 = undefined;
    var x19: u1 = undefined;
    addcarryxU32(&x18, &x19, x17, cast(u32, 0x0), (~(arg2[1])));
    var x20: u32 = undefined;
    var x21: u1 = undefined;
    addcarryxU32(&x20, &x21, x19, cast(u32, 0x0), (~(arg2[2])));
    var x22: u32 = undefined;
    var x23: u1 = undefined;
    addcarryxU32(&x22, &x23, x21, cast(u32, 0x0), (~(arg2[3])));
    var x24: u32 = undefined;
    var x25: u1 = undefined;
    addcarryxU32(&x24, &x25, x23, cast(u32, 0x0), (~(arg2[4])));
    var x26: u32 = undefined;
    var x27: u1 = undefined;
    addcarryxU32(&x26, &x27, x25, cast(u32, 0x0), (~(arg2[5])));
    var x28: u32 = undefined;
    var x29: u1 = undefined;
    addcarryxU32(&x28, &x29, x27, cast(u32, 0x0), (~(arg2[6])));
    var x30: u32 = undefined;
    var x31: u1 = undefined;
    addcarryxU32(&x30, &x31, x29, cast(u32, 0x0), (~(arg2[7])));
    var x32: u32 = undefined;
    var x33: u1 = undefined;
    addcarryxU32(&x32, &x33, x31, cast(u32, 0x0), (~(arg2[8])));
    var x34: u32 = undefined;
    cmovznzU32(&x34, x3, (arg3[0]), x16);
    var x35: u32 = undefined;
    cmovznzU32(&x35, x3, (arg3[1]), x18);
    var x36: u32 = undefined;
    cmovznzU32(&x36, x3, (arg3[2]), x20);
    var x37: u32 = undefined;
    cmovznzU32(&x37, x3, (arg3[3]), x22);
    var x38: u32 = undefined;
    cmovznzU32(&x38, x3, (arg3[4]), x24);
    var x39: u32 = undefined;
    cmovznzU32(&x39, x3, (arg3[5]), x26);
    var x40: u32 = undefined;
    cmovznzU32(&x40, x3, (arg3[6]), x28);
    var x41: u32 = undefined;
    cmovznzU32(&x41, x3, (arg3[7]), x30);
    var x42: u32 = undefined;
    cmovznzU32(&x42, x3, (arg3[8]), x32);
    var x43: u32 = undefined;
    cmovznzU32(&x43, x3, (arg4[0]), (arg5[0]));
    var x44: u32 = undefined;
    cmovznzU32(&x44, x3, (arg4[1]), (arg5[1]));
    var x45: u32 = undefined;
    cmovznzU32(&x45, x3, (arg4[2]), (arg5[2]));
    var x46: u32 = undefined;
    cmovznzU32(&x46, x3, (arg4[3]), (arg5[3]));
    var x47: u32 = undefined;
    cmovznzU32(&x47, x3, (arg4[4]), (arg5[4]));
    var x48: u32 = undefined;
    cmovznzU32(&x48, x3, (arg4[5]), (arg5[5]));
    var x49: u32 = undefined;
    cmovznzU32(&x49, x3, (arg4[6]), (arg5[6]));
    var x50: u32 = undefined;
    cmovznzU32(&x50, x3, (arg4[7]), (arg5[7]));
    var x51: u32 = undefined;
    var x52: u1 = undefined;
    addcarryxU32(&x51, &x52, 0x0, x43, x43);
    var x53: u32 = undefined;
    var x54: u1 = undefined;
    addcarryxU32(&x53, &x54, x52, x44, x44);
    var x55: u32 = undefined;
    var x56: u1 = undefined;
    addcarryxU32(&x55, &x56, x54, x45, x45);
    var x57: u32 = undefined;
    var x58: u1 = undefined;
    addcarryxU32(&x57, &x58, x56, x46, x46);
    var x59: u32 = undefined;
    var x60: u1 = undefined;
    addcarryxU32(&x59, &x60, x58, x47, x47);
    var x61: u32 = undefined;
    var x62: u1 = undefined;
    addcarryxU32(&x61, &x62, x60, x48, x48);
    var x63: u32 = undefined;
    var x64: u1 = undefined;
    addcarryxU32(&x63, &x64, x62, x49, x49);
    var x65: u32 = undefined;
    var x66: u1 = undefined;
    addcarryxU32(&x65, &x66, x64, x50, x50);
    var x67: u32 = undefined;
    var x68: u1 = undefined;
    subborrowxU32(&x67, &x68, 0x0, x51, 0xfc632551);
    var x69: u32 = undefined;
    var x70: u1 = undefined;
    subborrowxU32(&x69, &x70, x68, x53, 0xf3b9cac2);
    var x71: u32 = undefined;
    var x72: u1 = undefined;
    subborrowxU32(&x71, &x72, x70, x55, 0xa7179e84);
    var x73: u32 = undefined;
    var x74: u1 = undefined;
    subborrowxU32(&x73, &x74, x72, x57, 0xbce6faad);
    var x75: u32 = undefined;
    var x76: u1 = undefined;
    subborrowxU32(&x75, &x76, x74, x59, 0xffffffff);
    var x77: u32 = undefined;
    var x78: u1 = undefined;
    subborrowxU32(&x77, &x78, x76, x61, 0xffffffff);
    var x79: u32 = undefined;
    var x80: u1 = undefined;
    subborrowxU32(&x79, &x80, x78, x63, cast(u32, 0x0));
    var x81: u32 = undefined;
    var x82: u1 = undefined;
    subborrowxU32(&x81, &x82, x80, x65, 0xffffffff);
    var x83: u32 = undefined;
    var x84: u1 = undefined;
    subborrowxU32(&x83, &x84, x82, cast(u32, x66), cast(u32, 0x0));
    const x85 = (arg4[7]);
    const x86 = (arg4[6]);
    const x87 = (arg4[5]);
    const x88 = (arg4[4]);
    const x89 = (arg4[3]);
    const x90 = (arg4[2]);
    const x91 = (arg4[1]);
    const x92 = (arg4[0]);
    var x93: u32 = undefined;
    var x94: u1 = undefined;
    subborrowxU32(&x93, &x94, 0x0, cast(u32, 0x0), x92);
    var x95: u32 = undefined;
    var x96: u1 = undefined;
    subborrowxU32(&x95, &x96, x94, cast(u32, 0x0), x91);
    var x97: u32 = undefined;
    var x98: u1 = undefined;
    subborrowxU32(&x97, &x98, x96, cast(u32, 0x0), x90);
    var x99: u32 = undefined;
    var x100: u1 = undefined;
    subborrowxU32(&x99, &x100, x98, cast(u32, 0x0), x89);
    var x101: u32 = undefined;
    var x102: u1 = undefined;
    subborrowxU32(&x101, &x102, x100, cast(u32, 0x0), x88);
    var x103: u32 = undefined;
    var x104: u1 = undefined;
    subborrowxU32(&x103, &x104, x102, cast(u32, 0x0), x87);
    var x105: u32 = undefined;
    var x106: u1 = undefined;
    subborrowxU32(&x105, &x106, x104, cast(u32, 0x0), x86);
    var x107: u32 = undefined;
    var x108: u1 = undefined;
    subborrowxU32(&x107, &x108, x106, cast(u32, 0x0), x85);
    var x109: u32 = undefined;
    cmovznzU32(&x109, x108, cast(u32, 0x0), 0xffffffff);
    var x110: u32 = undefined;
    var x111: u1 = undefined;
    addcarryxU32(&x110, &x111, 0x0, x93, (x109 & 0xfc632551));
    var x112: u32 = undefined;
    var x113: u1 = undefined;
    addcarryxU32(&x112, &x113, x111, x95, (x109 & 0xf3b9cac2));
    var x114: u32 = undefined;
    var x115: u1 = undefined;
    addcarryxU32(&x114, &x115, x113, x97, (x109 & 0xa7179e84));
    var x116: u32 = undefined;
    var x117: u1 = undefined;
    addcarryxU32(&x116, &x117, x115, x99, (x109 & 0xbce6faad));
    var x118: u32 = undefined;
    var x119: u1 = undefined;
    addcarryxU32(&x118, &x119, x117, x101, x109);
    var x120: u32 = undefined;
    var x121: u1 = undefined;
    addcarryxU32(&x120, &x121, x119, x103, x109);
    var x122: u32 = undefined;
    var x123: u1 = undefined;
    addcarryxU32(&x122, &x123, x121, x105, cast(u32, 0x0));
    var x124: u32 = undefined;
    var x125: u1 = undefined;
    addcarryxU32(&x124, &x125, x123, x107, x109);
    var x126: u32 = undefined;
    cmovznzU32(&x126, x3, (arg5[0]), x110);
    var x127: u32 = undefined;
    cmovznzU32(&x127, x3, (arg5[1]), x112);
    var x128: u32 = undefined;
    cmovznzU32(&x128, x3, (arg5[2]), x114);
    var x129: u32 = undefined;
    cmovznzU32(&x129, x3, (arg5[3]), x116);
    var x130: u32 = undefined;
    cmovznzU32(&x130, x3, (arg5[4]), x118);
    var x131: u32 = undefined;
    cmovznzU32(&x131, x3, (arg5[5]), x120);
    var x132: u32 = undefined;
    cmovznzU32(&x132, x3, (arg5[6]), x122);
    var x133: u32 = undefined;
    cmovznzU32(&x133, x3, (arg5[7]), x124);
    const x134 = cast(u1, (x34 & cast(u32, 0x1)));
    var x135: u32 = undefined;
    cmovznzU32(&x135, x134, cast(u32, 0x0), x7);
    var x136: u32 = undefined;
    cmovznzU32(&x136, x134, cast(u32, 0x0), x8);
    var x137: u32 = undefined;
    cmovznzU32(&x137, x134, cast(u32, 0x0), x9);
    var x138: u32 = undefined;
    cmovznzU32(&x138, x134, cast(u32, 0x0), x10);
    var x139: u32 = undefined;
    cmovznzU32(&x139, x134, cast(u32, 0x0), x11);
    var x140: u32 = undefined;
    cmovznzU32(&x140, x134, cast(u32, 0x0), x12);
    var x141: u32 = undefined;
    cmovznzU32(&x141, x134, cast(u32, 0x0), x13);
    var x142: u32 = undefined;
    cmovznzU32(&x142, x134, cast(u32, 0x0), x14);
    var x143: u32 = undefined;
    cmovznzU32(&x143, x134, cast(u32, 0x0), x15);
    var x144: u32 = undefined;
    var x145: u1 = undefined;
    addcarryxU32(&x144, &x145, 0x0, x34, x135);
    var x146: u32 = undefined;
    var x147: u1 = undefined;
    addcarryxU32(&x146, &x147, x145, x35, x136);
    var x148: u32 = undefined;
    var x149: u1 = undefined;
    addcarryxU32(&x148, &x149, x147, x36, x137);
    var x150: u32 = undefined;
    var x151: u1 = undefined;
    addcarryxU32(&x150, &x151, x149, x37, x138);
    var x152: u32 = undefined;
    var x153: u1 = undefined;
    addcarryxU32(&x152, &x153, x151, x38, x139);
    var x154: u32 = undefined;
    var x155: u1 = undefined;
    addcarryxU32(&x154, &x155, x153, x39, x140);
    var x156: u32 = undefined;
    var x157: u1 = undefined;
    addcarryxU32(&x156, &x157, x155, x40, x141);
    var x158: u32 = undefined;
    var x159: u1 = undefined;
    addcarryxU32(&x158, &x159, x157, x41, x142);
    var x160: u32 = undefined;
    var x161: u1 = undefined;
    addcarryxU32(&x160, &x161, x159, x42, x143);
    var x162: u32 = undefined;
    cmovznzU32(&x162, x134, cast(u32, 0x0), x43);
    var x163: u32 = undefined;
    cmovznzU32(&x163, x134, cast(u32, 0x0), x44);
    var x164: u32 = undefined;
    cmovznzU32(&x164, x134, cast(u32, 0x0), x45);
    var x165: u32 = undefined;
    cmovznzU32(&x165, x134, cast(u32, 0x0), x46);
    var x166: u32 = undefined;
    cmovznzU32(&x166, x134, cast(u32, 0x0), x47);
    var x167: u32 = undefined;
    cmovznzU32(&x167, x134, cast(u32, 0x0), x48);
    var x168: u32 = undefined;
    cmovznzU32(&x168, x134, cast(u32, 0x0), x49);
    var x169: u32 = undefined;
    cmovznzU32(&x169, x134, cast(u32, 0x0), x50);
    var x170: u32 = undefined;
    var x171: u1 = undefined;
    addcarryxU32(&x170, &x171, 0x0, x126, x162);
    var x172: u32 = undefined;
    var x173: u1 = undefined;
    addcarryxU32(&x172, &x173, x171, x127, x163);
    var x174: u32 = undefined;
    var x175: u1 = undefined;
    addcarryxU32(&x174, &x175, x173, x128, x164);
    var x176: u32 = undefined;
    var x177: u1 = undefined;
    addcarryxU32(&x176, &x177, x175, x129, x165);
    var x178: u32 = undefined;
    var x179: u1 = undefined;
    addcarryxU32(&x178, &x179, x177, x130, x166);
    var x180: u32 = undefined;
    var x181: u1 = undefined;
    addcarryxU32(&x180, &x181, x179, x131, x167);
    var x182: u32 = undefined;
    var x183: u1 = undefined;
    addcarryxU32(&x182, &x183, x181, x132, x168);
    var x184: u32 = undefined;
    var x185: u1 = undefined;
    addcarryxU32(&x184, &x185, x183, x133, x169);
    var x186: u32 = undefined;
    var x187: u1 = undefined;
    subborrowxU32(&x186, &x187, 0x0, x170, 0xfc632551);
    var x188: u32 = undefined;
    var x189: u1 = undefined;
    subborrowxU32(&x188, &x189, x187, x172, 0xf3b9cac2);
    var x190: u32 = undefined;
    var x191: u1 = undefined;
    subborrowxU32(&x190, &x191, x189, x174, 0xa7179e84);
    var x192: u32 = undefined;
    var x193: u1 = undefined;
    subborrowxU32(&x192, &x193, x191, x176, 0xbce6faad);
    var x194: u32 = undefined;
    var x195: u1 = undefined;
    subborrowxU32(&x194, &x195, x193, x178, 0xffffffff);
    var x196: u32 = undefined;
    var x197: u1 = undefined;
    subborrowxU32(&x196, &x197, x195, x180, 0xffffffff);
    var x198: u32 = undefined;
    var x199: u1 = undefined;
    subborrowxU32(&x198, &x199, x197, x182, cast(u32, 0x0));
    var x200: u32 = undefined;
    var x201: u1 = undefined;
    subborrowxU32(&x200, &x201, x199, x184, 0xffffffff);
    var x202: u32 = undefined;
    var x203: u1 = undefined;
    subborrowxU32(&x202, &x203, x201, cast(u32, x185), cast(u32, 0x0));
    var x204: u32 = undefined;
    var x205: u1 = undefined;
    addcarryxU32(&x204, &x205, 0x0, x6, cast(u32, 0x1));
    const x206 = ((x144 >> 1) | ((x146 << 31) & 0xffffffff));
    const x207 = ((x146 >> 1) | ((x148 << 31) & 0xffffffff));
    const x208 = ((x148 >> 1) | ((x150 << 31) & 0xffffffff));
    const x209 = ((x150 >> 1) | ((x152 << 31) & 0xffffffff));
    const x210 = ((x152 >> 1) | ((x154 << 31) & 0xffffffff));
    const x211 = ((x154 >> 1) | ((x156 << 31) & 0xffffffff));
    const x212 = ((x156 >> 1) | ((x158 << 31) & 0xffffffff));
    const x213 = ((x158 >> 1) | ((x160 << 31) & 0xffffffff));
    const x214 = ((x160 & 0x80000000) | (x160 >> 1));
    var x215: u32 = undefined;
    cmovznzU32(&x215, x84, x67, x51);
    var x216: u32 = undefined;
    cmovznzU32(&x216, x84, x69, x53);
    var x217: u32 = undefined;
    cmovznzU32(&x217, x84, x71, x55);
    var x218: u32 = undefined;
    cmovznzU32(&x218, x84, x73, x57);
    var x219: u32 = undefined;
    cmovznzU32(&x219, x84, x75, x59);
    var x220: u32 = undefined;
    cmovznzU32(&x220, x84, x77, x61);
    var x221: u32 = undefined;
    cmovznzU32(&x221, x84, x79, x63);
    var x222: u32 = undefined;
    cmovznzU32(&x222, x84, x81, x65);
    var x223: u32 = undefined;
    cmovznzU32(&x223, x203, x186, x170);
    var x224: u32 = undefined;
    cmovznzU32(&x224, x203, x188, x172);
    var x225: u32 = undefined;
    cmovznzU32(&x225, x203, x190, x174);
    var x226: u32 = undefined;
    cmovznzU32(&x226, x203, x192, x176);
    var x227: u32 = undefined;
    cmovznzU32(&x227, x203, x194, x178);
    var x228: u32 = undefined;
    cmovznzU32(&x228, x203, x196, x180);
    var x229: u32 = undefined;
    cmovznzU32(&x229, x203, x198, x182);
    var x230: u32 = undefined;
    cmovznzU32(&x230, x203, x200, x184);
    out1.* = x204;
    out2[0] = x7;
    out2[1] = x8;
    out2[2] = x9;
    out2[3] = x10;
    out2[4] = x11;
    out2[5] = x12;
    out2[6] = x13;
    out2[7] = x14;
    out2[8] = x15;
    out3[0] = x206;
    out3[1] = x207;
    out3[2] = x208;
    out3[3] = x209;
    out3[4] = x210;
    out3[5] = x211;
    out3[6] = x212;
    out3[7] = x213;
    out3[8] = x214;
    out4[0] = x215;
    out4[1] = x216;
    out4[2] = x217;
    out4[3] = x218;
    out4[4] = x219;
    out4[5] = x220;
    out4[6] = x221;
    out4[7] = x222;
    out5[0] = x223;
    out5[1] = x224;
    out5[2] = x225;
    out5[3] = x226;
    out5[4] = x227;
    out5[5] = x228;
    out5[6] = x229;
    out5[7] = x230;
}

/// The function divstepPrecomp returns the precomputed value for Bernstein-Yang-inversion (in montgomery form).
///
/// Postconditions:
///   eval (from_montgomery out1) = ⌊(m - 1) / 2⌋^(if ⌊log2 m⌋ + 1 < 46 then ⌊(49 * (⌊log2 m⌋ + 1) + 80) / 17⌋ else ⌊(49 * (⌊log2 m⌋ + 1) + 57) / 17⌋)
///   0 ≤ eval out1 < m
///
/// Output Bounds:
///   out1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
pub fn divstepPrecomp(out1: *[8]u32) void {
    @setRuntimeSafety(mode == .Debug);

    out1[0] = 0xb7fcfbb5;
    out1[1] = 0xd739262f;
    out1[2] = 0x20074414;
    out1[3] = 0x8ac6f75d;
    out1[4] = 0xb5e3c256;
    out1[5] = 0xc67428bf;
    out1[6] = 0xeda7aedf;
    out1[7] = 0x444962f2;
}
