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

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

/// 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, 0x5cf5d3ed);
    var x19: u32 = undefined;
    var x20: u1 = undefined;
    subborrowxU32(&x19, &x20, x18, x3, 0x5812631a);
    var x21: u32 = undefined;
    var x22: u1 = undefined;
    subborrowxU32(&x21, &x22, x20, x5, 0xa2f79cd6);
    var x23: u32 = undefined;
    var x24: u1 = undefined;
    subborrowxU32(&x23, &x24, x22, x7, 0x14def9de);
    var x25: u32 = undefined;
    var x26: u1 = undefined;
    subborrowxU32(&x25, &x26, x24, x9, cast(u32, 0x0));
    var x27: u32 = undefined;
    var x28: u1 = undefined;
    subborrowxU32(&x27, &x28, x26, x11, cast(u32, 0x0));
    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, 0x10000000);
    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 & 0x5cf5d3ed));
    var x20: u32 = undefined;
    var x21: u1 = undefined;
    addcarryxU32(&x20, &x21, x19, x3, (x17 & 0x5812631a));
    var x22: u32 = undefined;
    var x23: u1 = undefined;
    addcarryxU32(&x22, &x23, x21, x5, (x17 & 0xa2f79cd6));
    var x24: u32 = undefined;
    var x25: u1 = undefined;
    addcarryxU32(&x24, &x25, x23, x7, (x17 & 0x14def9de));
    var x26: u32 = undefined;
    var x27: u1 = undefined;
    addcarryxU32(&x26, &x27, x25, x9, cast(u32, 0x0));
    var x28: u32 = undefined;
    var x29: u1 = undefined;
    addcarryxU32(&x28, &x29, x27, x11, cast(u32, 0x0));
    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 & 0x10000000));
    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 & 0x5cf5d3ed));
    var x20: u32 = undefined;
    var x21: u1 = undefined;
    addcarryxU32(&x20, &x21, x19, x3, (x17 & 0x5812631a));
    var x22: u32 = undefined;
    var x23: u1 = undefined;
    addcarryxU32(&x22, &x23, x21, x5, (x17 & 0xa2f79cd6));
    var x24: u32 = undefined;
    var x25: u1 = undefined;
    addcarryxU32(&x24, &x25, x23, x7, (x17 & 0x14def9de));
    var x26: u32 = undefined;
    var x27: u1 = undefined;
    addcarryxU32(&x26, &x27, x25, x9, cast(u32, 0x0));
    var x28: u32 = undefined;
    var x29: u1 = undefined;
    addcarryxU32(&x28, &x29, x27, x11, cast(u32, 0x0));
    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 & 0x10000000));
    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, 0x12547e1b);
    var x4: u32 = undefined;
    var x5: u32 = undefined;
    mulxU32(&x4, &x5, x2, 0x10000000);
    var x6: u32 = undefined;
    var x7: u32 = undefined;
    mulxU32(&x6, &x7, x2, 0x14def9de);
    var x8: u32 = undefined;
    var x9: u32 = undefined;
    mulxU32(&x8, &x9, x2, 0xa2f79cd6);
    var x10: u32 = undefined;
    var x11: u32 = undefined;
    mulxU32(&x10, &x11, x2, 0x5812631a);
    var x12: u32 = undefined;
    var x13: u32 = undefined;
    mulxU32(&x12, &x13, x2, 0x5cf5d3ed);
    var x14: u32 = undefined;
    var x15: u1 = undefined;
    addcarryxU32(&x14, &x15, 0x0, x13, x10);
    var x16: u32 = undefined;
    var x17: u1 = undefined;
    addcarryxU32(&x16, &x17, x15, x11, x8);
    var x18: u32 = undefined;
    var x19: u1 = undefined;
    addcarryxU32(&x18, &x19, x17, x9, x6);
    var x20: u32 = undefined;
    var x21: u1 = undefined;
    addcarryxU32(&x20, &x21, 0x0, x1, x12);
    var x22: u32 = undefined;
    var x23: u1 = undefined;
    addcarryxU32(&x22, &x23, x21, cast(u32, 0x0), x14);
    var x24: u32 = undefined;
    var x25: u1 = undefined;
    addcarryxU32(&x24, &x25, x23, cast(u32, 0x0), x16);
    var x26: u32 = undefined;
    var x27: u1 = undefined;
    addcarryxU32(&x26, &x27, x25, cast(u32, 0x0), x18);
    var x28: u32 = undefined;
    var x29: u1 = undefined;
    addcarryxU32(&x28, &x29, 0x0, x22, (arg1[1]));
    var x30: u32 = undefined;
    var x31: u1 = undefined;
    addcarryxU32(&x30, &x31, x29, x24, cast(u32, 0x0));
    var x32: u32 = undefined;
    var x33: u1 = undefined;
    addcarryxU32(&x32, &x33, x31, x26, cast(u32, 0x0));
    var x34: u32 = undefined;
    var x35: u32 = undefined;
    mulxU32(&x34, &x35, x28, 0x12547e1b);
    var x36: u32 = undefined;
    var x37: u32 = undefined;
    mulxU32(&x36, &x37, x34, 0x10000000);
    var x38: u32 = undefined;
    var x39: u32 = undefined;
    mulxU32(&x38, &x39, x34, 0x14def9de);
    var x40: u32 = undefined;
    var x41: u32 = undefined;
    mulxU32(&x40, &x41, x34, 0xa2f79cd6);
    var x42: u32 = undefined;
    var x43: u32 = undefined;
    mulxU32(&x42, &x43, x34, 0x5812631a);
    var x44: u32 = undefined;
    var x45: u32 = undefined;
    mulxU32(&x44, &x45, x34, 0x5cf5d3ed);
    var x46: u32 = undefined;
    var x47: u1 = undefined;
    addcarryxU32(&x46, &x47, 0x0, x45, x42);
    var x48: u32 = undefined;
    var x49: u1 = undefined;
    addcarryxU32(&x48, &x49, x47, x43, x40);
    var x50: u32 = undefined;
    var x51: u1 = undefined;
    addcarryxU32(&x50, &x51, x49, x41, x38);
    var x52: u32 = undefined;
    var x53: u1 = undefined;
    addcarryxU32(&x52, &x53, 0x0, x28, x44);
    var x54: u32 = undefined;
    var x55: u1 = undefined;
    addcarryxU32(&x54, &x55, x53, x30, x46);
    var x56: u32 = undefined;
    var x57: u1 = undefined;
    addcarryxU32(&x56, &x57, x55, x32, x48);
    var x58: u32 = undefined;
    var x59: u1 = undefined;
    addcarryxU32(&x58, &x59, x57, (cast(u32, x33) + (cast(u32, x27) + (cast(u32, x19) + x7))), x50);
    var x60: u32 = undefined;
    var x61: u1 = undefined;
    addcarryxU32(&x60, &x61, 0x0, x5, x36);
    var x62: u32 = undefined;
    var x63: u1 = undefined;
    addcarryxU32(&x62, &x63, 0x0, x54, (arg1[2]));
    var x64: u32 = undefined;
    var x65: u1 = undefined;
    addcarryxU32(&x64, &x65, x63, x56, cast(u32, 0x0));
    var x66: u32 = undefined;
    var x67: u1 = undefined;
    addcarryxU32(&x66, &x67, x65, x58, cast(u32, 0x0));
    var x68: u32 = undefined;
    var x69: u32 = undefined;
    mulxU32(&x68, &x69, x62, 0x12547e1b);
    var x70: u32 = undefined;
    var x71: u32 = undefined;
    mulxU32(&x70, &x71, x68, 0x10000000);
    var x72: u32 = undefined;
    var x73: u32 = undefined;
    mulxU32(&x72, &x73, x68, 0x14def9de);
    var x74: u32 = undefined;
    var x75: u32 = undefined;
    mulxU32(&x74, &x75, x68, 0xa2f79cd6);
    var x76: u32 = undefined;
    var x77: u32 = undefined;
    mulxU32(&x76, &x77, x68, 0x5812631a);
    var x78: u32 = undefined;
    var x79: u32 = undefined;
    mulxU32(&x78, &x79, x68, 0x5cf5d3ed);
    var x80: u32 = undefined;
    var x81: u1 = undefined;
    addcarryxU32(&x80, &x81, 0x0, x79, x76);
    var x82: u32 = undefined;
    var x83: u1 = undefined;
    addcarryxU32(&x82, &x83, x81, x77, x74);
    var x84: u32 = undefined;
    var x85: u1 = undefined;
    addcarryxU32(&x84, &x85, x83, x75, x72);
    var x86: u32 = undefined;
    var x87: u1 = undefined;
    addcarryxU32(&x86, &x87, 0x0, x62, x78);
    var x88: u32 = undefined;
    var x89: u1 = undefined;
    addcarryxU32(&x88, &x89, x87, x64, x80);
    var x90: u32 = undefined;
    var x91: u1 = undefined;
    addcarryxU32(&x90, &x91, x89, x66, x82);
    var x92: u32 = undefined;
    var x93: u1 = undefined;
    addcarryxU32(&x92, &x93, x91, (cast(u32, x67) + (cast(u32, x59) + (cast(u32, x51) + x39))), x84);
    var x94: u32 = undefined;
    var x95: u1 = undefined;
    addcarryxU32(&x94, &x95, 0x0, (cast(u32, x61) + x37), x70);
    var x96: u32 = undefined;
    var x97: u1 = undefined;
    addcarryxU32(&x96, &x97, 0x0, x88, (arg1[3]));
    var x98: u32 = undefined;
    var x99: u1 = undefined;
    addcarryxU32(&x98, &x99, x97, x90, cast(u32, 0x0));
    var x100: u32 = undefined;
    var x101: u1 = undefined;
    addcarryxU32(&x100, &x101, x99, x92, cast(u32, 0x0));
    var x102: u32 = undefined;
    var x103: u32 = undefined;
    mulxU32(&x102, &x103, x96, 0x12547e1b);
    var x104: u32 = undefined;
    var x105: u32 = undefined;
    mulxU32(&x104, &x105, x102, 0x10000000);
    var x106: u32 = undefined;
    var x107: u32 = undefined;
    mulxU32(&x106, &x107, x102, 0x14def9de);
    var x108: u32 = undefined;
    var x109: u32 = undefined;
    mulxU32(&x108, &x109, x102, 0xa2f79cd6);
    var x110: u32 = undefined;
    var x111: u32 = undefined;
    mulxU32(&x110, &x111, x102, 0x5812631a);
    var x112: u32 = undefined;
    var x113: u32 = undefined;
    mulxU32(&x112, &x113, x102, 0x5cf5d3ed);
    var x114: u32 = undefined;
    var x115: u1 = undefined;
    addcarryxU32(&x114, &x115, 0x0, x113, x110);
    var x116: u32 = undefined;
    var x117: u1 = undefined;
    addcarryxU32(&x116, &x117, x115, x111, x108);
    var x118: u32 = undefined;
    var x119: u1 = undefined;
    addcarryxU32(&x118, &x119, x117, x109, x106);
    var x120: u32 = undefined;
    var x121: u1 = undefined;
    addcarryxU32(&x120, &x121, 0x0, x96, x112);
    var x122: u32 = undefined;
    var x123: u1 = undefined;
    addcarryxU32(&x122, &x123, x121, x98, x114);
    var x124: u32 = undefined;
    var x125: u1 = undefined;
    addcarryxU32(&x124, &x125, x123, x100, x116);
    var x126: u32 = undefined;
    var x127: u1 = undefined;
    addcarryxU32(&x126, &x127, x125, (cast(u32, x101) + (cast(u32, x93) + (cast(u32, x85) + x73))), x118);
    var x128: u32 = undefined;
    var x129: u1 = undefined;
    addcarryxU32(&x128, &x129, x127, x4, (cast(u32, x119) + x107));
    var x130: u32 = undefined;
    var x131: u1 = undefined;
    addcarryxU32(&x130, &x131, x129, x60, cast(u32, 0x0));
    var x132: u32 = undefined;
    var x133: u1 = undefined;
    addcarryxU32(&x132, &x133, x131, x94, cast(u32, 0x0));
    var x134: u32 = undefined;
    var x135: u1 = undefined;
    addcarryxU32(&x134, &x135, x133, (cast(u32, x95) + x71), x104);
    var x136: u32 = undefined;
    var x137: u1 = undefined;
    addcarryxU32(&x136, &x137, 0x0, x122, (arg1[4]));
    var x138: u32 = undefined;
    var x139: u1 = undefined;
    addcarryxU32(&x138, &x139, x137, x124, cast(u32, 0x0));
    var x140: u32 = undefined;
    var x141: u1 = undefined;
    addcarryxU32(&x140, &x141, x139, x126, cast(u32, 0x0));
    var x142: u32 = undefined;
    var x143: u1 = undefined;
    addcarryxU32(&x142, &x143, x141, x128, cast(u32, 0x0));
    var x144: u32 = undefined;
    var x145: u1 = undefined;
    addcarryxU32(&x144, &x145, x143, x130, cast(u32, 0x0));
    var x146: u32 = undefined;
    var x147: u1 = undefined;
    addcarryxU32(&x146, &x147, x145, x132, cast(u32, 0x0));
    var x148: u32 = undefined;
    var x149: u1 = undefined;
    addcarryxU32(&x148, &x149, x147, x134, cast(u32, 0x0));
    var x150: u32 = undefined;
    var x151: u32 = undefined;
    mulxU32(&x150, &x151, x136, 0x12547e1b);
    var x152: u32 = undefined;
    var x153: u32 = undefined;
    mulxU32(&x152, &x153, x150, 0x10000000);
    var x154: u32 = undefined;
    var x155: u32 = undefined;
    mulxU32(&x154, &x155, x150, 0x14def9de);
    var x156: u32 = undefined;
    var x157: u32 = undefined;
    mulxU32(&x156, &x157, x150, 0xa2f79cd6);
    var x158: u32 = undefined;
    var x159: u32 = undefined;
    mulxU32(&x158, &x159, x150, 0x5812631a);
    var x160: u32 = undefined;
    var x161: u32 = undefined;
    mulxU32(&x160, &x161, x150, 0x5cf5d3ed);
    var x162: u32 = undefined;
    var x163: u1 = undefined;
    addcarryxU32(&x162, &x163, 0x0, x161, x158);
    var x164: u32 = undefined;
    var x165: u1 = undefined;
    addcarryxU32(&x164, &x165, x163, x159, x156);
    var x166: u32 = undefined;
    var x167: u1 = undefined;
    addcarryxU32(&x166, &x167, x165, x157, x154);
    var x168: u32 = undefined;
    var x169: u1 = undefined;
    addcarryxU32(&x168, &x169, 0x0, x136, x160);
    var x170: u32 = undefined;
    var x171: u1 = undefined;
    addcarryxU32(&x170, &x171, x169, x138, x162);
    var x172: u32 = undefined;
    var x173: u1 = undefined;
    addcarryxU32(&x172, &x173, x171, x140, x164);
    var x174: u32 = undefined;
    var x175: u1 = undefined;
    addcarryxU32(&x174, &x175, x173, x142, x166);
    var x176: u32 = undefined;
    var x177: u1 = undefined;
    addcarryxU32(&x176, &x177, x175, x144, (cast(u32, x167) + x155));
    var x178: u32 = undefined;
    var x179: u1 = undefined;
    addcarryxU32(&x178, &x179, x177, x146, cast(u32, 0x0));
    var x180: u32 = undefined;
    var x181: u1 = undefined;
    addcarryxU32(&x180, &x181, x179, x148, cast(u32, 0x0));
    var x182: u32 = undefined;
    var x183: u1 = undefined;
    addcarryxU32(&x182, &x183, x181, (cast(u32, x149) + (cast(u32, x135) + x105)), x152);
    var x184: u32 = undefined;
    var x185: u1 = undefined;
    addcarryxU32(&x184, &x185, 0x0, x170, (arg1[5]));
    var x186: u32 = undefined;
    var x187: u1 = undefined;
    addcarryxU32(&x186, &x187, x185, x172, cast(u32, 0x0));
    var x188: u32 = undefined;
    var x189: u1 = undefined;
    addcarryxU32(&x188, &x189, x187, x174, cast(u32, 0x0));
    var x190: u32 = undefined;
    var x191: u1 = undefined;
    addcarryxU32(&x190, &x191, x189, x176, cast(u32, 0x0));
    var x192: u32 = undefined;
    var x193: u1 = undefined;
    addcarryxU32(&x192, &x193, x191, x178, cast(u32, 0x0));
    var x194: u32 = undefined;
    var x195: u1 = undefined;
    addcarryxU32(&x194, &x195, x193, x180, cast(u32, 0x0));
    var x196: u32 = undefined;
    var x197: u1 = undefined;
    addcarryxU32(&x196, &x197, x195, x182, cast(u32, 0x0));
    var x198: u32 = undefined;
    var x199: u32 = undefined;
    mulxU32(&x198, &x199, x184, 0x12547e1b);
    var x200: u32 = undefined;
    var x201: u32 = undefined;
    mulxU32(&x200, &x201, x198, 0x10000000);
    var x202: u32 = undefined;
    var x203: u32 = undefined;
    mulxU32(&x202, &x203, x198, 0x14def9de);
    var x204: u32 = undefined;
    var x205: u32 = undefined;
    mulxU32(&x204, &x205, x198, 0xa2f79cd6);
    var x206: u32 = undefined;
    var x207: u32 = undefined;
    mulxU32(&x206, &x207, x198, 0x5812631a);
    var x208: u32 = undefined;
    var x209: u32 = undefined;
    mulxU32(&x208, &x209, x198, 0x5cf5d3ed);
    var x210: u32 = undefined;
    var x211: u1 = undefined;
    addcarryxU32(&x210, &x211, 0x0, x209, x206);
    var x212: u32 = undefined;
    var x213: u1 = undefined;
    addcarryxU32(&x212, &x213, x211, x207, x204);
    var x214: u32 = undefined;
    var x215: u1 = undefined;
    addcarryxU32(&x214, &x215, x213, x205, x202);
    var x216: u32 = undefined;
    var x217: u1 = undefined;
    addcarryxU32(&x216, &x217, 0x0, x184, x208);
    var x218: u32 = undefined;
    var x219: u1 = undefined;
    addcarryxU32(&x218, &x219, x217, x186, x210);
    var x220: u32 = undefined;
    var x221: u1 = undefined;
    addcarryxU32(&x220, &x221, x219, x188, x212);
    var x222: u32 = undefined;
    var x223: u1 = undefined;
    addcarryxU32(&x222, &x223, x221, x190, x214);
    var x224: u32 = undefined;
    var x225: u1 = undefined;
    addcarryxU32(&x224, &x225, x223, x192, (cast(u32, x215) + x203));
    var x226: u32 = undefined;
    var x227: u1 = undefined;
    addcarryxU32(&x226, &x227, x225, x194, cast(u32, 0x0));
    var x228: u32 = undefined;
    var x229: u1 = undefined;
    addcarryxU32(&x228, &x229, x227, x196, cast(u32, 0x0));
    var x230: u32 = undefined;
    var x231: u1 = undefined;
    addcarryxU32(&x230, &x231, x229, (cast(u32, x197) + (cast(u32, x183) + x153)), x200);
    var x232: u32 = undefined;
    var x233: u1 = undefined;
    addcarryxU32(&x232, &x233, 0x0, x218, (arg1[6]));
    var x234: u32 = undefined;
    var x235: u1 = undefined;
    addcarryxU32(&x234, &x235, x233, x220, cast(u32, 0x0));
    var x236: u32 = undefined;
    var x237: u1 = undefined;
    addcarryxU32(&x236, &x237, x235, x222, cast(u32, 0x0));
    var x238: u32 = undefined;
    var x239: u1 = undefined;
    addcarryxU32(&x238, &x239, x237, x224, cast(u32, 0x0));
    var x240: u32 = undefined;
    var x241: u1 = undefined;
    addcarryxU32(&x240, &x241, x239, x226, cast(u32, 0x0));
    var x242: u32 = undefined;
    var x243: u1 = undefined;
    addcarryxU32(&x242, &x243, x241, x228, cast(u32, 0x0));
    var x244: u32 = undefined;
    var x245: u1 = undefined;
    addcarryxU32(&x244, &x245, x243, x230, cast(u32, 0x0));
    var x246: u32 = undefined;
    var x247: u32 = undefined;
    mulxU32(&x246, &x247, x232, 0x12547e1b);
    var x248: u32 = undefined;
    var x249: u32 = undefined;
    mulxU32(&x248, &x249, x246, 0x10000000);
    var x250: u32 = undefined;
    var x251: u32 = undefined;
    mulxU32(&x250, &x251, x246, 0x14def9de);
    var x252: u32 = undefined;
    var x253: u32 = undefined;
    mulxU32(&x252, &x253, x246, 0xa2f79cd6);
    var x254: u32 = undefined;
    var x255: u32 = undefined;
    mulxU32(&x254, &x255, x246, 0x5812631a);
    var x256: u32 = undefined;
    var x257: u32 = undefined;
    mulxU32(&x256, &x257, x246, 0x5cf5d3ed);
    var x258: u32 = undefined;
    var x259: u1 = undefined;
    addcarryxU32(&x258, &x259, 0x0, x257, x254);
    var x260: u32 = undefined;
    var x261: u1 = undefined;
    addcarryxU32(&x260, &x261, x259, x255, x252);
    var x262: u32 = undefined;
    var x263: u1 = undefined;
    addcarryxU32(&x262, &x263, x261, x253, x250);
    var x264: u32 = undefined;
    var x265: u1 = undefined;
    addcarryxU32(&x264, &x265, 0x0, x232, x256);
    var x266: u32 = undefined;
    var x267: u1 = undefined;
    addcarryxU32(&x266, &x267, x265, x234, x258);
    var x268: u32 = undefined;
    var x269: u1 = undefined;
    addcarryxU32(&x268, &x269, x267, x236, x260);
    var x270: u32 = undefined;
    var x271: u1 = undefined;
    addcarryxU32(&x270, &x271, x269, x238, x262);
    var x272: u32 = undefined;
    var x273: u1 = undefined;
    addcarryxU32(&x272, &x273, x271, x240, (cast(u32, x263) + x251));
    var x274: u32 = undefined;
    var x275: u1 = undefined;
    addcarryxU32(&x274, &x275, x273, x242, cast(u32, 0x0));
    var x276: u32 = undefined;
    var x277: u1 = undefined;
    addcarryxU32(&x276, &x277, x275, x244, cast(u32, 0x0));
    var x278: u32 = undefined;
    var x279: u1 = undefined;
    addcarryxU32(&x278, &x279, x277, (cast(u32, x245) + (cast(u32, x231) + x201)), x248);
    var x280: u32 = undefined;
    var x281: u1 = undefined;
    addcarryxU32(&x280, &x281, 0x0, x266, (arg1[7]));
    var x282: u32 = undefined;
    var x283: u1 = undefined;
    addcarryxU32(&x282, &x283, x281, x268, cast(u32, 0x0));
    var x284: u32 = undefined;
    var x285: u1 = undefined;
    addcarryxU32(&x284, &x285, x283, x270, cast(u32, 0x0));
    var x286: u32 = undefined;
    var x287: u1 = undefined;
    addcarryxU32(&x286, &x287, x285, x272, cast(u32, 0x0));
    var x288: u32 = undefined;
    var x289: u1 = undefined;
    addcarryxU32(&x288, &x289, x287, x274, cast(u32, 0x0));
    var x290: u32 = undefined;
    var x291: u1 = undefined;
    addcarryxU32(&x290, &x291, x289, x276, cast(u32, 0x0));
    var x292: u32 = undefined;
    var x293: u1 = undefined;
    addcarryxU32(&x292, &x293, x291, x278, cast(u32, 0x0));
    var x294: u32 = undefined;
    var x295: u32 = undefined;
    mulxU32(&x294, &x295, x280, 0x12547e1b);
    var x296: u32 = undefined;
    var x297: u32 = undefined;
    mulxU32(&x296, &x297, x294, 0x10000000);
    var x298: u32 = undefined;
    var x299: u32 = undefined;
    mulxU32(&x298, &x299, x294, 0x14def9de);
    var x300: u32 = undefined;
    var x301: u32 = undefined;
    mulxU32(&x300, &x301, x294, 0xa2f79cd6);
    var x302: u32 = undefined;
    var x303: u32 = undefined;
    mulxU32(&x302, &x303, x294, 0x5812631a);
    var x304: u32 = undefined;
    var x305: u32 = undefined;
    mulxU32(&x304, &x305, x294, 0x5cf5d3ed);
    var x306: u32 = undefined;
    var x307: u1 = undefined;
    addcarryxU32(&x306, &x307, 0x0, x305, x302);
    var x308: u32 = undefined;
    var x309: u1 = undefined;
    addcarryxU32(&x308, &x309, x307, x303, x300);
    var x310: u32 = undefined;
    var x311: u1 = undefined;
    addcarryxU32(&x310, &x311, x309, x301, x298);
    var x312: u32 = undefined;
    var x313: u1 = undefined;
    addcarryxU32(&x312, &x313, 0x0, x280, x304);
    var x314: u32 = undefined;
    var x315: u1 = undefined;
    addcarryxU32(&x314, &x315, x313, x282, x306);
    var x316: u32 = undefined;
    var x317: u1 = undefined;
    addcarryxU32(&x316, &x317, x315, x284, x308);
    var x318: u32 = undefined;
    var x319: u1 = undefined;
    addcarryxU32(&x318, &x319, x317, x286, x310);
    var x320: u32 = undefined;
    var x321: u1 = undefined;
    addcarryxU32(&x320, &x321, x319, x288, (cast(u32, x311) + x299));
    var x322: u32 = undefined;
    var x323: u1 = undefined;
    addcarryxU32(&x322, &x323, x321, x290, cast(u32, 0x0));
    var x324: u32 = undefined;
    var x325: u1 = undefined;
    addcarryxU32(&x324, &x325, x323, x292, cast(u32, 0x0));
    var x326: u32 = undefined;
    var x327: u1 = undefined;
    addcarryxU32(&x326, &x327, x325, (cast(u32, x293) + (cast(u32, x279) + x249)), x296);
    const x328 = (cast(u32, x327) + x297);
    var x329: u32 = undefined;
    var x330: u1 = undefined;
    subborrowxU32(&x329, &x330, 0x0, x314, 0x5cf5d3ed);
    var x331: u32 = undefined;
    var x332: u1 = undefined;
    subborrowxU32(&x331, &x332, x330, x316, 0x5812631a);
    var x333: u32 = undefined;
    var x334: u1 = undefined;
    subborrowxU32(&x333, &x334, x332, x318, 0xa2f79cd6);
    var x335: u32 = undefined;
    var x336: u1 = undefined;
    subborrowxU32(&x335, &x336, x334, x320, 0x14def9de);
    var x337: u32 = undefined;
    var x338: u1 = undefined;
    subborrowxU32(&x337, &x338, x336, x322, cast(u32, 0x0));
    var x339: u32 = undefined;
    var x340: u1 = undefined;
    subborrowxU32(&x339, &x340, x338, x324, cast(u32, 0x0));
    var x341: u32 = undefined;
    var x342: u1 = undefined;
    subborrowxU32(&x341, &x342, x340, x326, cast(u32, 0x0));
    var x343: u32 = undefined;
    var x344: u1 = undefined;
    subborrowxU32(&x343, &x344, x342, x328, 0x10000000);
    var x345: u32 = undefined;
    var x346: u1 = undefined;
    subborrowxU32(&x345, &x346, x344, cast(u32, 0x0), cast(u32, 0x0));
    var x347: u32 = undefined;
    cmovznzU32(&x347, x346, x329, x314);
    var x348: u32 = undefined;
    cmovznzU32(&x348, x346, x331, x316);
    var x349: u32 = undefined;
    cmovznzU32(&x349, x346, x333, x318);
    var x350: u32 = undefined;
    cmovznzU32(&x350, x346, x335, x320);
    var x351: u32 = undefined;
    cmovznzU32(&x351, x346, x337, x322);
    var x352: u32 = undefined;
    cmovznzU32(&x352, x346, x339, x324);
    var x353: u32 = undefined;
    cmovznzU32(&x353, x346, x341, x326);
    var x354: u32 = undefined;
    cmovznzU32(&x354, x346, x343, x328);
    out1[0] = x347;
    out1[1] = x348;
    out1[2] = x349;
    out1[3] = x350;
    out1[4] = x351;
    out1[5] = x352;
    out1[6] = x353;
    out1[7] = x354;
}

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

/// 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 ~> 0x1fffffff]]
/// 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 ~> 0x1f]]
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 ~> 0x1f]]
/// Output Bounds:
///   out1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0x1fffffff]]
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] = 0x8d98951d;
    out1[1] = 0xd6ec3174;
    out1[2] = 0x737dcf70;
    out1[3] = 0xc6ef5bf4;
    out1[4] = 0xfffffffe;
    out1[5] = 0xffffffff;
    out1[6] = 0xffffffff;
    out1[7] = 0xfffffff;
}

/// 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] = 0x5cf5d3ed;
    out1[1] = 0x5812631a;
    out1[2] = 0xa2f79cd6;
    out1[3] = 0x14def9de;
    out1[4] = cast(u32, 0x0);
    out1[5] = cast(u32, 0x0);
    out1[6] = cast(u32, 0x0);
    out1[7] = 0x10000000;
    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, 0x5cf5d3ed);
    var x69: u32 = undefined;
    var x70: u1 = undefined;
    subborrowxU32(&x69, &x70, x68, x53, 0x5812631a);
    var x71: u32 = undefined;
    var x72: u1 = undefined;
    subborrowxU32(&x71, &x72, x70, x55, 0xa2f79cd6);
    var x73: u32 = undefined;
    var x74: u1 = undefined;
    subborrowxU32(&x73, &x74, x72, x57, 0x14def9de);
    var x75: u32 = undefined;
    var x76: u1 = undefined;
    subborrowxU32(&x75, &x76, x74, x59, cast(u32, 0x0));
    var x77: u32 = undefined;
    var x78: u1 = undefined;
    subborrowxU32(&x77, &x78, x76, x61, cast(u32, 0x0));
    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, 0x10000000);
    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 & 0x5cf5d3ed));
    var x112: u32 = undefined;
    var x113: u1 = undefined;
    addcarryxU32(&x112, &x113, x111, x95, (x109 & 0x5812631a));
    var x114: u32 = undefined;
    var x115: u1 = undefined;
    addcarryxU32(&x114, &x115, x113, x97, (x109 & 0xa2f79cd6));
    var x116: u32 = undefined;
    var x117: u1 = undefined;
    addcarryxU32(&x116, &x117, x115, x99, (x109 & 0x14def9de));
    var x118: u32 = undefined;
    var x119: u1 = undefined;
    addcarryxU32(&x118, &x119, x117, x101, cast(u32, 0x0));
    var x120: u32 = undefined;
    var x121: u1 = undefined;
    addcarryxU32(&x120, &x121, x119, x103, cast(u32, 0x0));
    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 & 0x10000000));
    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, 0x5cf5d3ed);
    var x188: u32 = undefined;
    var x189: u1 = undefined;
    subborrowxU32(&x188, &x189, x187, x172, 0x5812631a);
    var x190: u32 = undefined;
    var x191: u1 = undefined;
    subborrowxU32(&x190, &x191, x189, x174, 0xa2f79cd6);
    var x192: u32 = undefined;
    var x193: u1 = undefined;
    subborrowxU32(&x192, &x193, x191, x176, 0x14def9de);
    var x194: u32 = undefined;
    var x195: u1 = undefined;
    subborrowxU32(&x194, &x195, x193, x178, cast(u32, 0x0));
    var x196: u32 = undefined;
    var x197: u1 = undefined;
    subborrowxU32(&x196, &x197, x195, x180, cast(u32, 0x0));
    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, 0x10000000);
    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] = 0x36a7cb92;
    out1[1] = 0xd70af844;
    out1[2] = 0xb0b8b159;
    out1[3] = 0x5f71c978;
    out1[4] = 0x74947f1a;
    out1[5] = 0xe76d8169;
    out1[6] = 0xf193e4ff;
    out1[7] = 0x19a2d36;
}
