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

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

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

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

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

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

/// The function selectznz is a multi-limb conditional select.
///
/// Postconditions:
///   out1 = (if arg1 = 0 then arg2 else arg3)
///
/// Input Bounds:
///   arg1: [0x0 ~> 0x1]
///   arg2: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
///   arg3: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
/// Output Bounds:
///   out1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
pub fn selectznz(out1: *[8]u32, arg1: u1, arg2: [8]u32, arg3: [8]u32) void {
    @setRuntimeSafety(mode == .Debug);

    var x1: u32 = undefined;
    cmovznzU32(&x1, arg1, (arg2[0]), (arg3[0]));
    var x2: u32 = undefined;
    cmovznzU32(&x2, arg1, (arg2[1]), (arg3[1]));
    var x3: u32 = undefined;
    cmovznzU32(&x3, arg1, (arg2[2]), (arg3[2]));
    var x4: u32 = undefined;
    cmovznzU32(&x4, arg1, (arg2[3]), (arg3[3]));
    var x5: u32 = undefined;
    cmovznzU32(&x5, arg1, (arg2[4]), (arg3[4]));
    var x6: u32 = undefined;
    cmovznzU32(&x6, arg1, (arg2[5]), (arg3[5]));
    var x7: u32 = undefined;
    cmovznzU32(&x7, arg1, (arg2[6]), (arg3[6]));
    var x8: u32 = undefined;
    cmovznzU32(&x8, arg1, (arg2[7]), (arg3[7]));
    out1[0] = x1;
    out1[1] = x2;
    out1[2] = x3;
    out1[3] = x4;
    out1[4] = x5;
    out1[5] = x6;
    out1[6] = x7;
    out1[7] = x8;
}

/// The function toBytes serializes a field element NOT in the Montgomery domain to bytes in little-endian order.
///
/// Preconditions:
///   0 ≤ eval arg1 < m
/// Postconditions:
///   out1 = map (λ x, ⌊((eval arg1 mod m) mod 2^(8 * (x + 1))) / 2^(8 * x)⌋) [0..31]
///
/// Input Bounds:
///   arg1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
/// Output Bounds:
///   out1: [[0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff]]
pub fn toBytes(out1: *[32]u8, arg1: [8]u32) void {
    @setRuntimeSafety(mode == .Debug);

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

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

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

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

    out1[0] = 0xc62abedd;
    out1[1] = 0xac440bf6;
    out1[2] = 0xde39fad4;
    out1[3] = 0x8dfc2094;
    out1[4] = cast(u32, 0x0);
    out1[5] = cast(u32, 0x0);
    out1[6] = cast(u32, 0x0);
    out1[7] = cast(u32, 0x1);
}

/// 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] = 0x39d54123;
    out1[1] = 0x53bbf409;
    out1[2] = 0x21c6052b;
    out1[3] = 0x7203df6b;
    out1[4] = 0xffffffff;
    out1[5] = 0xffffffff;
    out1[6] = 0xffffffff;
    out1[7] = 0xfffffffe;
    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, 0x39d54123);
    var x69: u32 = undefined;
    var x70: u1 = undefined;
    subborrowxU32(&x69, &x70, x68, x53, 0x53bbf409);
    var x71: u32 = undefined;
    var x72: u1 = undefined;
    subborrowxU32(&x71, &x72, x70, x55, 0x21c6052b);
    var x73: u32 = undefined;
    var x74: u1 = undefined;
    subborrowxU32(&x73, &x74, x72, x57, 0x7203df6b);
    var x75: u32 = undefined;
    var x76: u1 = undefined;
    subborrowxU32(&x75, &x76, x74, x59, 0xffffffff);
    var x77: u32 = undefined;
    var x78: u1 = undefined;
    subborrowxU32(&x77, &x78, x76, x61, 0xffffffff);
    var x79: u32 = undefined;
    var x80: u1 = undefined;
    subborrowxU32(&x79, &x80, x78, x63, 0xffffffff);
    var x81: u32 = undefined;
    var x82: u1 = undefined;
    subborrowxU32(&x81, &x82, x80, x65, 0xfffffffe);
    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 & 0x39d54123));
    var x112: u32 = undefined;
    var x113: u1 = undefined;
    addcarryxU32(&x112, &x113, x111, x95, (x109 & 0x53bbf409));
    var x114: u32 = undefined;
    var x115: u1 = undefined;
    addcarryxU32(&x114, &x115, x113, x97, (x109 & 0x21c6052b));
    var x116: u32 = undefined;
    var x117: u1 = undefined;
    addcarryxU32(&x116, &x117, x115, x99, (x109 & 0x7203df6b));
    var x118: u32 = undefined;
    var x119: u1 = undefined;
    addcarryxU32(&x118, &x119, x117, x101, x109);
    var x120: u32 = undefined;
    var x121: u1 = undefined;
    addcarryxU32(&x120, &x121, x119, x103, x109);
    var x122: u32 = undefined;
    var x123: u1 = undefined;
    addcarryxU32(&x122, &x123, x121, x105, x109);
    var x124: u32 = undefined;
    var x125: u1 = undefined;
    addcarryxU32(&x124, &x125, x123, x107, (x109 & 0xfffffffe));
    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, 0x39d54123);
    var x188: u32 = undefined;
    var x189: u1 = undefined;
    subborrowxU32(&x188, &x189, x187, x172, 0x53bbf409);
    var x190: u32 = undefined;
    var x191: u1 = undefined;
    subborrowxU32(&x190, &x191, x189, x174, 0x21c6052b);
    var x192: u32 = undefined;
    var x193: u1 = undefined;
    subborrowxU32(&x192, &x193, x191, x176, 0x7203df6b);
    var x194: u32 = undefined;
    var x195: u1 = undefined;
    subborrowxU32(&x194, &x195, x193, x178, 0xffffffff);
    var x196: u32 = undefined;
    var x197: u1 = undefined;
    subborrowxU32(&x196, &x197, x195, x180, 0xffffffff);
    var x198: u32 = undefined;
    var x199: u1 = undefined;
    subborrowxU32(&x198, &x199, x197, x182, 0xffffffff);
    var x200: u32 = undefined;
    var x201: u1 = undefined;
    subborrowxU32(&x200, &x201, x199, x184, 0xfffffffe);
    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] = 0xb351756d;
    out1[1] = 0x1aa32707;
    out1[2] = 0x1e2a62fa;
    out1[3] = 0xabdd67;
    out1[4] = 0xd4009a81;
    out1[5] = 0x49280d7d;
    out1[6] = 0xe6bb86e8;
    out1[7] = 0xd730336e;
}
