// 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 secp256k1_montgomery '' 32 '2^256 - 2^32 - 977' 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): secp256k1_montgomery
// 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 = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f (from "2^256 - 2^32 - 977")
//
// 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, 0xd2253531);
    var x42: u32 = undefined;
    var x43: u32 = undefined;
    mulxU32(&x42, &x43, x40, 0xffffffff);
    var x44: u32 = undefined;
    var x45: u32 = undefined;
    mulxU32(&x44, &x45, x40, 0xffffffff);
    var x46: u32 = undefined;
    var x47: u32 = undefined;
    mulxU32(&x46, &x47, x40, 0xffffffff);
    var x48: u32 = undefined;
    var x49: u32 = undefined;
    mulxU32(&x48, &x49, x40, 0xffffffff);
    var x50: u32 = undefined;
    var x51: u32 = undefined;
    mulxU32(&x50, &x51, x40, 0xffffffff);
    var x52: u32 = undefined;
    var x53: u32 = undefined;
    mulxU32(&x52, &x53, x40, 0xffffffff);
    var x54: u32 = undefined;
    var x55: u32 = undefined;
    mulxU32(&x54, &x55, x40, 0xfffffffe);
    var x56: u32 = undefined;
    var x57: u32 = undefined;
    mulxU32(&x56, &x57, x40, 0xfffffc2f);
    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, 0xd2253531);
    var x142: u32 = undefined;
    var x143: u32 = undefined;
    mulxU32(&x142, &x143, x140, 0xffffffff);
    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, 0xffffffff);
    var x152: u32 = undefined;
    var x153: u32 = undefined;
    mulxU32(&x152, &x153, x140, 0xffffffff);
    var x154: u32 = undefined;
    var x155: u32 = undefined;
    mulxU32(&x154, &x155, x140, 0xfffffffe);
    var x156: u32 = undefined;
    var x157: u32 = undefined;
    mulxU32(&x156, &x157, x140, 0xfffffc2f);
    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, 0xd2253531);
    var x243: u32 = undefined;
    var x244: u32 = undefined;
    mulxU32(&x243, &x244, x241, 0xffffffff);
    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, 0xffffffff);
    var x253: u32 = undefined;
    var x254: u32 = undefined;
    mulxU32(&x253, &x254, x241, 0xffffffff);
    var x255: u32 = undefined;
    var x256: u32 = undefined;
    mulxU32(&x255, &x256, x241, 0xfffffffe);
    var x257: u32 = undefined;
    var x258: u32 = undefined;
    mulxU32(&x257, &x258, x241, 0xfffffc2f);
    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, 0xd2253531);
    var x344: u32 = undefined;
    var x345: u32 = undefined;
    mulxU32(&x344, &x345, x342, 0xffffffff);
    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, 0xffffffff);
    var x354: u32 = undefined;
    var x355: u32 = undefined;
    mulxU32(&x354, &x355, x342, 0xffffffff);
    var x356: u32 = undefined;
    var x357: u32 = undefined;
    mulxU32(&x356, &x357, x342, 0xfffffffe);
    var x358: u32 = undefined;
    var x359: u32 = undefined;
    mulxU32(&x358, &x359, x342, 0xfffffc2f);
    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, 0xd2253531);
    var x445: u32 = undefined;
    var x446: u32 = undefined;
    mulxU32(&x445, &x446, x443, 0xffffffff);
    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, 0xffffffff);
    var x455: u32 = undefined;
    var x456: u32 = undefined;
    mulxU32(&x455, &x456, x443, 0xffffffff);
    var x457: u32 = undefined;
    var x458: u32 = undefined;
    mulxU32(&x457, &x458, x443, 0xfffffffe);
    var x459: u32 = undefined;
    var x460: u32 = undefined;
    mulxU32(&x459, &x460, x443, 0xfffffc2f);
    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, 0xd2253531);
    var x546: u32 = undefined;
    var x547: u32 = undefined;
    mulxU32(&x546, &x547, x544, 0xffffffff);
    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, 0xffffffff);
    var x556: u32 = undefined;
    var x557: u32 = undefined;
    mulxU32(&x556, &x557, x544, 0xffffffff);
    var x558: u32 = undefined;
    var x559: u32 = undefined;
    mulxU32(&x558, &x559, x544, 0xfffffffe);
    var x560: u32 = undefined;
    var x561: u32 = undefined;
    mulxU32(&x560, &x561, x544, 0xfffffc2f);
    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, 0xd2253531);
    var x647: u32 = undefined;
    var x648: u32 = undefined;
    mulxU32(&x647, &x648, x645, 0xffffffff);
    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, 0xffffffff);
    var x657: u32 = undefined;
    var x658: u32 = undefined;
    mulxU32(&x657, &x658, x645, 0xffffffff);
    var x659: u32 = undefined;
    var x660: u32 = undefined;
    mulxU32(&x659, &x660, x645, 0xfffffffe);
    var x661: u32 = undefined;
    var x662: u32 = undefined;
    mulxU32(&x661, &x662, x645, 0xfffffc2f);
    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, 0xd2253531);
    var x748: u32 = undefined;
    var x749: u32 = undefined;
    mulxU32(&x748, &x749, x746, 0xffffffff);
    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, 0xffffffff);
    var x758: u32 = undefined;
    var x759: u32 = undefined;
    mulxU32(&x758, &x759, x746, 0xffffffff);
    var x760: u32 = undefined;
    var x761: u32 = undefined;
    mulxU32(&x760, &x761, x746, 0xfffffffe);
    var x762: u32 = undefined;
    var x763: u32 = undefined;
    mulxU32(&x762, &x763, x746, 0xfffffc2f);
    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, 0xfffffc2f);
    var x800: u32 = undefined;
    var x801: u1 = undefined;
    subborrowxU32(&x800, &x801, x799, x783, 0xfffffffe);
    var x802: u32 = undefined;
    var x803: u1 = undefined;
    subborrowxU32(&x802, &x803, x801, x785, 0xffffffff);
    var x804: u32 = undefined;
    var x805: u1 = undefined;
    subborrowxU32(&x804, &x805, x803, x787, 0xffffffff);
    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, 0xffffffff);
    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, 0xd2253531);
    var x42: u32 = undefined;
    var x43: u32 = undefined;
    mulxU32(&x42, &x43, x40, 0xffffffff);
    var x44: u32 = undefined;
    var x45: u32 = undefined;
    mulxU32(&x44, &x45, x40, 0xffffffff);
    var x46: u32 = undefined;
    var x47: u32 = undefined;
    mulxU32(&x46, &x47, x40, 0xffffffff);
    var x48: u32 = undefined;
    var x49: u32 = undefined;
    mulxU32(&x48, &x49, x40, 0xffffffff);
    var x50: u32 = undefined;
    var x51: u32 = undefined;
    mulxU32(&x50, &x51, x40, 0xffffffff);
    var x52: u32 = undefined;
    var x53: u32 = undefined;
    mulxU32(&x52, &x53, x40, 0xffffffff);
    var x54: u32 = undefined;
    var x55: u32 = undefined;
    mulxU32(&x54, &x55, x40, 0xfffffffe);
    var x56: u32 = undefined;
    var x57: u32 = undefined;
    mulxU32(&x56, &x57, x40, 0xfffffc2f);
    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, 0xd2253531);
    var x142: u32 = undefined;
    var x143: u32 = undefined;
    mulxU32(&x142, &x143, x140, 0xffffffff);
    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, 0xffffffff);
    var x152: u32 = undefined;
    var x153: u32 = undefined;
    mulxU32(&x152, &x153, x140, 0xffffffff);
    var x154: u32 = undefined;
    var x155: u32 = undefined;
    mulxU32(&x154, &x155, x140, 0xfffffffe);
    var x156: u32 = undefined;
    var x157: u32 = undefined;
    mulxU32(&x156, &x157, x140, 0xfffffc2f);
    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, 0xd2253531);
    var x243: u32 = undefined;
    var x244: u32 = undefined;
    mulxU32(&x243, &x244, x241, 0xffffffff);
    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, 0xffffffff);
    var x253: u32 = undefined;
    var x254: u32 = undefined;
    mulxU32(&x253, &x254, x241, 0xffffffff);
    var x255: u32 = undefined;
    var x256: u32 = undefined;
    mulxU32(&x255, &x256, x241, 0xfffffffe);
    var x257: u32 = undefined;
    var x258: u32 = undefined;
    mulxU32(&x257, &x258, x241, 0xfffffc2f);
    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, 0xd2253531);
    var x344: u32 = undefined;
    var x345: u32 = undefined;
    mulxU32(&x344, &x345, x342, 0xffffffff);
    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, 0xffffffff);
    var x354: u32 = undefined;
    var x355: u32 = undefined;
    mulxU32(&x354, &x355, x342, 0xffffffff);
    var x356: u32 = undefined;
    var x357: u32 = undefined;
    mulxU32(&x356, &x357, x342, 0xfffffffe);
    var x358: u32 = undefined;
    var x359: u32 = undefined;
    mulxU32(&x358, &x359, x342, 0xfffffc2f);
    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, 0xd2253531);
    var x445: u32 = undefined;
    var x446: u32 = undefined;
    mulxU32(&x445, &x446, x443, 0xffffffff);
    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, 0xffffffff);
    var x455: u32 = undefined;
    var x456: u32 = undefined;
    mulxU32(&x455, &x456, x443, 0xffffffff);
    var x457: u32 = undefined;
    var x458: u32 = undefined;
    mulxU32(&x457, &x458, x443, 0xfffffffe);
    var x459: u32 = undefined;
    var x460: u32 = undefined;
    mulxU32(&x459, &x460, x443, 0xfffffc2f);
    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, 0xd2253531);
    var x546: u32 = undefined;
    var x547: u32 = undefined;
    mulxU32(&x546, &x547, x544, 0xffffffff);
    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, 0xffffffff);
    var x556: u32 = undefined;
    var x557: u32 = undefined;
    mulxU32(&x556, &x557, x544, 0xffffffff);
    var x558: u32 = undefined;
    var x559: u32 = undefined;
    mulxU32(&x558, &x559, x544, 0xfffffffe);
    var x560: u32 = undefined;
    var x561: u32 = undefined;
    mulxU32(&x560, &x561, x544, 0xfffffc2f);
    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, 0xd2253531);
    var x647: u32 = undefined;
    var x648: u32 = undefined;
    mulxU32(&x647, &x648, x645, 0xffffffff);
    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, 0xffffffff);
    var x657: u32 = undefined;
    var x658: u32 = undefined;
    mulxU32(&x657, &x658, x645, 0xffffffff);
    var x659: u32 = undefined;
    var x660: u32 = undefined;
    mulxU32(&x659, &x660, x645, 0xfffffffe);
    var x661: u32 = undefined;
    var x662: u32 = undefined;
    mulxU32(&x661, &x662, x645, 0xfffffc2f);
    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, 0xd2253531);
    var x748: u32 = undefined;
    var x749: u32 = undefined;
    mulxU32(&x748, &x749, x746, 0xffffffff);
    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, 0xffffffff);
    var x758: u32 = undefined;
    var x759: u32 = undefined;
    mulxU32(&x758, &x759, x746, 0xffffffff);
    var x760: u32 = undefined;
    var x761: u32 = undefined;
    mulxU32(&x760, &x761, x746, 0xfffffffe);
    var x762: u32 = undefined;
    var x763: u32 = undefined;
    mulxU32(&x762, &x763, x746, 0xfffffc2f);
    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, 0xfffffc2f);
    var x800: u32 = undefined;
    var x801: u1 = undefined;
    subborrowxU32(&x800, &x801, x799, x783, 0xfffffffe);
    var x802: u32 = undefined;
    var x803: u1 = undefined;
    subborrowxU32(&x802, &x803, x801, x785, 0xffffffff);
    var x804: u32 = undefined;
    var x805: u1 = undefined;
    subborrowxU32(&x804, &x805, x803, x787, 0xffffffff);
    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, 0xffffffff);
    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, 0xfffffc2f);
    var x19: u32 = undefined;
    var x20: u1 = undefined;
    subborrowxU32(&x19, &x20, x18, x3, 0xfffffffe);
    var x21: u32 = undefined;
    var x22: u1 = undefined;
    subborrowxU32(&x21, &x22, x20, x5, 0xffffffff);
    var x23: u32 = undefined;
    var x24: u1 = undefined;
    subborrowxU32(&x23, &x24, x22, x7, 0xffffffff);
    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, 0xffffffff);
    var x33: u32 = undefined;
    var x34: u1 = undefined;
    subborrowxU32(&x33, &x34, x32, cast(u32, x16), cast(u32, 0x0));
    var x35: u32 = undefined;
    cmovznzU32(&x35, x34, x17, x1);
    var x36: u32 = undefined;
    cmovznzU32(&x36, x34, x19, x3);
    var x37: u32 = undefined;
    cmovznzU32(&x37, x34, x21, x5);
    var x38: u32 = undefined;
    cmovznzU32(&x38, x34, x23, x7);
    var x39: u32 = undefined;
    cmovznzU32(&x39, x34, x25, x9);
    var x40: u32 = undefined;
    cmovznzU32(&x40, x34, x27, x11);
    var x41: u32 = undefined;
    cmovznzU32(&x41, x34, x29, x13);
    var x42: u32 = undefined;
    cmovznzU32(&x42, x34, x31, x15);
    out1[0] = x35;
    out1[1] = x36;
    out1[2] = x37;
    out1[3] = x38;
    out1[4] = x39;
    out1[5] = x40;
    out1[6] = x41;
    out1[7] = x42;
}

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

    var x1: u32 = undefined;
    var x2: u1 = undefined;
    subborrowxU32(&x1, &x2, 0x0, (arg1[0]), (arg2[0]));
    var x3: u32 = undefined;
    var x4: u1 = undefined;
    subborrowxU32(&x3, &x4, x2, (arg1[1]), (arg2[1]));
    var x5: u32 = undefined;
    var x6: u1 = undefined;
    subborrowxU32(&x5, &x6, x4, (arg1[2]), (arg2[2]));
    var x7: u32 = undefined;
    var x8: u1 = undefined;
    subborrowxU32(&x7, &x8, x6, (arg1[3]), (arg2[3]));
    var x9: u32 = undefined;
    var x10: u1 = undefined;
    subborrowxU32(&x9, &x10, x8, (arg1[4]), (arg2[4]));
    var x11: u32 = undefined;
    var x12: u1 = undefined;
    subborrowxU32(&x11, &x12, x10, (arg1[5]), (arg2[5]));
    var x13: u32 = undefined;
    var x14: u1 = undefined;
    subborrowxU32(&x13, &x14, x12, (arg1[6]), (arg2[6]));
    var x15: u32 = undefined;
    var x16: u1 = undefined;
    subborrowxU32(&x15, &x16, x14, (arg1[7]), (arg2[7]));
    var x17: u32 = undefined;
    cmovznzU32(&x17, x16, cast(u32, 0x0), 0xffffffff);
    var x18: u32 = undefined;
    var x19: u1 = undefined;
    addcarryxU32(&x18, &x19, 0x0, x1, (x17 & 0xfffffc2f));
    var x20: u32 = undefined;
    var x21: u1 = undefined;
    addcarryxU32(&x20, &x21, x19, x3, (x17 & 0xfffffffe));
    var x22: u32 = undefined;
    var x23: u1 = undefined;
    addcarryxU32(&x22, &x23, x21, x5, x17);
    var x24: u32 = undefined;
    var x25: u1 = undefined;
    addcarryxU32(&x24, &x25, x23, x7, x17);
    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);
    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 & 0xfffffc2f));
    var x20: u32 = undefined;
    var x21: u1 = undefined;
    addcarryxU32(&x20, &x21, x19, x3, (x17 & 0xfffffffe));
    var x22: u32 = undefined;
    var x23: u1 = undefined;
    addcarryxU32(&x22, &x23, x21, x5, x17);
    var x24: u32 = undefined;
    var x25: u1 = undefined;
    addcarryxU32(&x24, &x25, x23, x7, x17);
    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);
    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, 0xd2253531);
    var x4: u32 = undefined;
    var x5: u32 = undefined;
    mulxU32(&x4, &x5, x2, 0xffffffff);
    var x6: u32 = undefined;
    var x7: u32 = undefined;
    mulxU32(&x6, &x7, x2, 0xffffffff);
    var x8: u32 = undefined;
    var x9: u32 = undefined;
    mulxU32(&x8, &x9, x2, 0xffffffff);
    var x10: u32 = undefined;
    var x11: u32 = undefined;
    mulxU32(&x10, &x11, x2, 0xffffffff);
    var x12: u32 = undefined;
    var x13: u32 = undefined;
    mulxU32(&x12, &x13, x2, 0xffffffff);
    var x14: u32 = undefined;
    var x15: u32 = undefined;
    mulxU32(&x14, &x15, x2, 0xffffffff);
    var x16: u32 = undefined;
    var x17: u32 = undefined;
    mulxU32(&x16, &x17, x2, 0xfffffffe);
    var x18: u32 = undefined;
    var x19: u32 = undefined;
    mulxU32(&x18, &x19, x2, 0xfffffc2f);
    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, x49, cast(u32, 0x0), (cast(u32, x33) + x5));
    var x52: u32 = undefined;
    var x53: u1 = undefined;
    addcarryxU32(&x52, &x53, 0x0, x36, (arg1[1]));
    var x54: u32 = undefined;
    var x55: u1 = undefined;
    addcarryxU32(&x54, &x55, x53, x38, cast(u32, 0x0));
    var x56: u32 = undefined;
    var x57: u1 = undefined;
    addcarryxU32(&x56, &x57, x55, x40, cast(u32, 0x0));
    var x58: u32 = undefined;
    var x59: u1 = undefined;
    addcarryxU32(&x58, &x59, x57, x42, cast(u32, 0x0));
    var x60: u32 = undefined;
    var x61: u1 = undefined;
    addcarryxU32(&x60, &x61, x59, x44, cast(u32, 0x0));
    var x62: u32 = undefined;
    var x63: u1 = undefined;
    addcarryxU32(&x62, &x63, x61, x46, cast(u32, 0x0));
    var x64: u32 = undefined;
    var x65: u1 = undefined;
    addcarryxU32(&x64, &x65, x63, x48, cast(u32, 0x0));
    var x66: u32 = undefined;
    var x67: u1 = undefined;
    addcarryxU32(&x66, &x67, x65, x50, cast(u32, 0x0));
    var x68: u32 = undefined;
    var x69: u32 = undefined;
    mulxU32(&x68, &x69, x52, 0xd2253531);
    var x70: u32 = undefined;
    var x71: u32 = undefined;
    mulxU32(&x70, &x71, x68, 0xffffffff);
    var x72: u32 = undefined;
    var x73: u32 = undefined;
    mulxU32(&x72, &x73, x68, 0xffffffff);
    var x74: u32 = undefined;
    var x75: u32 = undefined;
    mulxU32(&x74, &x75, x68, 0xffffffff);
    var x76: u32 = undefined;
    var x77: u32 = undefined;
    mulxU32(&x76, &x77, x68, 0xffffffff);
    var x78: u32 = undefined;
    var x79: u32 = undefined;
    mulxU32(&x78, &x79, x68, 0xffffffff);
    var x80: u32 = undefined;
    var x81: u32 = undefined;
    mulxU32(&x80, &x81, x68, 0xffffffff);
    var x82: u32 = undefined;
    var x83: u32 = undefined;
    mulxU32(&x82, &x83, x68, 0xfffffffe);
    var x84: u32 = undefined;
    var x85: u32 = undefined;
    mulxU32(&x84, &x85, x68, 0xfffffc2f);
    var x86: u32 = undefined;
    var x87: u1 = undefined;
    addcarryxU32(&x86, &x87, 0x0, x85, x82);
    var x88: u32 = undefined;
    var x89: u1 = undefined;
    addcarryxU32(&x88, &x89, x87, x83, x80);
    var x90: u32 = undefined;
    var x91: u1 = undefined;
    addcarryxU32(&x90, &x91, x89, x81, x78);
    var x92: u32 = undefined;
    var x93: u1 = undefined;
    addcarryxU32(&x92, &x93, x91, x79, x76);
    var x94: u32 = undefined;
    var x95: u1 = undefined;
    addcarryxU32(&x94, &x95, x93, x77, x74);
    var x96: u32 = undefined;
    var x97: u1 = undefined;
    addcarryxU32(&x96, &x97, x95, x75, x72);
    var x98: u32 = undefined;
    var x99: u1 = undefined;
    addcarryxU32(&x98, &x99, x97, x73, x70);
    var x100: u32 = undefined;
    var x101: u1 = undefined;
    addcarryxU32(&x100, &x101, 0x0, 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, x66, x98);
    var x116: u32 = undefined;
    var x117: u1 = undefined;
    addcarryxU32(&x116, &x117, x115, (cast(u32, x67) + cast(u32, x51)), (cast(u32, x99) + x71));
    var x118: u32 = undefined;
    var x119: u1 = undefined;
    addcarryxU32(&x118, &x119, 0x0, x102, (arg1[2]));
    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: u1 = undefined;
    addcarryxU32(&x132, &x133, x131, x116, cast(u32, 0x0));
    var x134: u32 = undefined;
    var x135: u32 = undefined;
    mulxU32(&x134, &x135, x118, 0xd2253531);
    var x136: u32 = undefined;
    var x137: u32 = undefined;
    mulxU32(&x136, &x137, x134, 0xffffffff);
    var x138: u32 = undefined;
    var x139: u32 = undefined;
    mulxU32(&x138, &x139, x134, 0xffffffff);
    var x140: u32 = undefined;
    var x141: u32 = undefined;
    mulxU32(&x140, &x141, x134, 0xffffffff);
    var x142: u32 = undefined;
    var x143: u32 = undefined;
    mulxU32(&x142, &x143, x134, 0xffffffff);
    var x144: u32 = undefined;
    var x145: u32 = undefined;
    mulxU32(&x144, &x145, x134, 0xffffffff);
    var x146: u32 = undefined;
    var x147: u32 = undefined;
    mulxU32(&x146, &x147, x134, 0xffffffff);
    var x148: u32 = undefined;
    var x149: u32 = undefined;
    mulxU32(&x148, &x149, x134, 0xfffffffe);
    var x150: u32 = undefined;
    var x151: u32 = undefined;
    mulxU32(&x150, &x151, x134, 0xfffffc2f);
    var x152: u32 = undefined;
    var x153: u1 = undefined;
    addcarryxU32(&x152, &x153, 0x0, x151, x148);
    var x154: u32 = undefined;
    var x155: u1 = undefined;
    addcarryxU32(&x154, &x155, x153, x149, x146);
    var x156: u32 = undefined;
    var x157: u1 = undefined;
    addcarryxU32(&x156, &x157, x155, x147, x144);
    var x158: u32 = undefined;
    var x159: u1 = undefined;
    addcarryxU32(&x158, &x159, x157, x145, x142);
    var x160: u32 = undefined;
    var x161: u1 = undefined;
    addcarryxU32(&x160, &x161, x159, x143, x140);
    var x162: u32 = undefined;
    var x163: u1 = undefined;
    addcarryxU32(&x162, &x163, x161, x141, x138);
    var x164: u32 = undefined;
    var x165: u1 = undefined;
    addcarryxU32(&x164, &x165, x163, x139, x136);
    var x166: u32 = undefined;
    var x167: u1 = undefined;
    addcarryxU32(&x166, &x167, 0x0, 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, x132, x164);
    var x182: u32 = undefined;
    var x183: u1 = undefined;
    addcarryxU32(&x182, &x183, x181, (cast(u32, x133) + cast(u32, x117)), (cast(u32, x165) + x137));
    var x184: u32 = undefined;
    var x185: u1 = undefined;
    addcarryxU32(&x184, &x185, 0x0, x168, (arg1[3]));
    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: u1 = undefined;
    addcarryxU32(&x198, &x199, x197, x182, cast(u32, 0x0));
    var x200: u32 = undefined;
    var x201: u32 = undefined;
    mulxU32(&x200, &x201, x184, 0xd2253531);
    var x202: u32 = undefined;
    var x203: u32 = undefined;
    mulxU32(&x202, &x203, x200, 0xffffffff);
    var x204: u32 = undefined;
    var x205: u32 = undefined;
    mulxU32(&x204, &x205, x200, 0xffffffff);
    var x206: u32 = undefined;
    var x207: u32 = undefined;
    mulxU32(&x206, &x207, x200, 0xffffffff);
    var x208: u32 = undefined;
    var x209: u32 = undefined;
    mulxU32(&x208, &x209, x200, 0xffffffff);
    var x210: u32 = undefined;
    var x211: u32 = undefined;
    mulxU32(&x210, &x211, x200, 0xffffffff);
    var x212: u32 = undefined;
    var x213: u32 = undefined;
    mulxU32(&x212, &x213, x200, 0xffffffff);
    var x214: u32 = undefined;
    var x215: u32 = undefined;
    mulxU32(&x214, &x215, x200, 0xfffffffe);
    var x216: u32 = undefined;
    var x217: u32 = undefined;
    mulxU32(&x216, &x217, x200, 0xfffffc2f);
    var x218: u32 = undefined;
    var x219: u1 = undefined;
    addcarryxU32(&x218, &x219, 0x0, x217, x214);
    var x220: u32 = undefined;
    var x221: u1 = undefined;
    addcarryxU32(&x220, &x221, x219, x215, x212);
    var x222: u32 = undefined;
    var x223: u1 = undefined;
    addcarryxU32(&x222, &x223, x221, x213, x210);
    var x224: u32 = undefined;
    var x225: u1 = undefined;
    addcarryxU32(&x224, &x225, x223, x211, x208);
    var x226: u32 = undefined;
    var x227: u1 = undefined;
    addcarryxU32(&x226, &x227, x225, x209, x206);
    var x228: u32 = undefined;
    var x229: u1 = undefined;
    addcarryxU32(&x228, &x229, x227, x207, x204);
    var x230: u32 = undefined;
    var x231: u1 = undefined;
    addcarryxU32(&x230, &x231, x229, x205, x202);
    var x232: u32 = undefined;
    var x233: u1 = undefined;
    addcarryxU32(&x232, &x233, 0x0, 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, x198, x230);
    var x248: u32 = undefined;
    var x249: u1 = undefined;
    addcarryxU32(&x248, &x249, x247, (cast(u32, x199) + cast(u32, x183)), (cast(u32, x231) + x203));
    var x250: u32 = undefined;
    var x251: u1 = undefined;
    addcarryxU32(&x250, &x251, 0x0, x234, (arg1[4]));
    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: u1 = undefined;
    addcarryxU32(&x264, &x265, x263, x248, cast(u32, 0x0));
    var x266: u32 = undefined;
    var x267: u32 = undefined;
    mulxU32(&x266, &x267, x250, 0xd2253531);
    var x268: u32 = undefined;
    var x269: u32 = undefined;
    mulxU32(&x268, &x269, x266, 0xffffffff);
    var x270: u32 = undefined;
    var x271: u32 = undefined;
    mulxU32(&x270, &x271, x266, 0xffffffff);
    var x272: u32 = undefined;
    var x273: u32 = undefined;
    mulxU32(&x272, &x273, x266, 0xffffffff);
    var x274: u32 = undefined;
    var x275: u32 = undefined;
    mulxU32(&x274, &x275, x266, 0xffffffff);
    var x276: u32 = undefined;
    var x277: u32 = undefined;
    mulxU32(&x276, &x277, x266, 0xffffffff);
    var x278: u32 = undefined;
    var x279: u32 = undefined;
    mulxU32(&x278, &x279, x266, 0xffffffff);
    var x280: u32 = undefined;
    var x281: u32 = undefined;
    mulxU32(&x280, &x281, x266, 0xfffffffe);
    var x282: u32 = undefined;
    var x283: u32 = undefined;
    mulxU32(&x282, &x283, x266, 0xfffffc2f);
    var x284: u32 = undefined;
    var x285: u1 = undefined;
    addcarryxU32(&x284, &x285, 0x0, x283, x280);
    var x286: u32 = undefined;
    var x287: u1 = undefined;
    addcarryxU32(&x286, &x287, x285, x281, x278);
    var x288: u32 = undefined;
    var x289: u1 = undefined;
    addcarryxU32(&x288, &x289, x287, x279, x276);
    var x290: u32 = undefined;
    var x291: u1 = undefined;
    addcarryxU32(&x290, &x291, x289, x277, x274);
    var x292: u32 = undefined;
    var x293: u1 = undefined;
    addcarryxU32(&x292, &x293, x291, x275, x272);
    var x294: u32 = undefined;
    var x295: u1 = undefined;
    addcarryxU32(&x294, &x295, x293, x273, x270);
    var x296: u32 = undefined;
    var x297: u1 = undefined;
    addcarryxU32(&x296, &x297, x295, x271, x268);
    var x298: u32 = undefined;
    var x299: u1 = undefined;
    addcarryxU32(&x298, &x299, 0x0, 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, x264, x296);
    var x314: u32 = undefined;
    var x315: u1 = undefined;
    addcarryxU32(&x314, &x315, x313, (cast(u32, x265) + cast(u32, x249)), (cast(u32, x297) + x269));
    var x316: u32 = undefined;
    var x317: u1 = undefined;
    addcarryxU32(&x316, &x317, 0x0, x300, (arg1[5]));
    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: u1 = undefined;
    addcarryxU32(&x330, &x331, x329, x314, cast(u32, 0x0));
    var x332: u32 = undefined;
    var x333: u32 = undefined;
    mulxU32(&x332, &x333, x316, 0xd2253531);
    var x334: u32 = undefined;
    var x335: u32 = undefined;
    mulxU32(&x334, &x335, x332, 0xffffffff);
    var x336: u32 = undefined;
    var x337: u32 = undefined;
    mulxU32(&x336, &x337, x332, 0xffffffff);
    var x338: u32 = undefined;
    var x339: u32 = undefined;
    mulxU32(&x338, &x339, x332, 0xffffffff);
    var x340: u32 = undefined;
    var x341: u32 = undefined;
    mulxU32(&x340, &x341, x332, 0xffffffff);
    var x342: u32 = undefined;
    var x343: u32 = undefined;
    mulxU32(&x342, &x343, x332, 0xffffffff);
    var x344: u32 = undefined;
    var x345: u32 = undefined;
    mulxU32(&x344, &x345, x332, 0xffffffff);
    var x346: u32 = undefined;
    var x347: u32 = undefined;
    mulxU32(&x346, &x347, x332, 0xfffffffe);
    var x348: u32 = undefined;
    var x349: u32 = undefined;
    mulxU32(&x348, &x349, x332, 0xfffffc2f);
    var x350: u32 = undefined;
    var x351: u1 = undefined;
    addcarryxU32(&x350, &x351, 0x0, x349, x346);
    var x352: u32 = undefined;
    var x353: u1 = undefined;
    addcarryxU32(&x352, &x353, x351, x347, x344);
    var x354: u32 = undefined;
    var x355: u1 = undefined;
    addcarryxU32(&x354, &x355, x353, x345, x342);
    var x356: u32 = undefined;
    var x357: u1 = undefined;
    addcarryxU32(&x356, &x357, x355, x343, x340);
    var x358: u32 = undefined;
    var x359: u1 = undefined;
    addcarryxU32(&x358, &x359, x357, x341, x338);
    var x360: u32 = undefined;
    var x361: u1 = undefined;
    addcarryxU32(&x360, &x361, x359, x339, x336);
    var x362: u32 = undefined;
    var x363: u1 = undefined;
    addcarryxU32(&x362, &x363, x361, x337, x334);
    var x364: u32 = undefined;
    var x365: u1 = undefined;
    addcarryxU32(&x364, &x365, 0x0, 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, x330, x362);
    var x380: u32 = undefined;
    var x381: u1 = undefined;
    addcarryxU32(&x380, &x381, x379, (cast(u32, x331) + cast(u32, x315)), (cast(u32, x363) + x335));
    var x382: u32 = undefined;
    var x383: u1 = undefined;
    addcarryxU32(&x382, &x383, 0x0, x366, (arg1[6]));
    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: u1 = undefined;
    addcarryxU32(&x396, &x397, x395, x380, cast(u32, 0x0));
    var x398: u32 = undefined;
    var x399: u32 = undefined;
    mulxU32(&x398, &x399, x382, 0xd2253531);
    var x400: u32 = undefined;
    var x401: u32 = undefined;
    mulxU32(&x400, &x401, x398, 0xffffffff);
    var x402: u32 = undefined;
    var x403: u32 = undefined;
    mulxU32(&x402, &x403, x398, 0xffffffff);
    var x404: u32 = undefined;
    var x405: u32 = undefined;
    mulxU32(&x404, &x405, x398, 0xffffffff);
    var x406: u32 = undefined;
    var x407: u32 = undefined;
    mulxU32(&x406, &x407, x398, 0xffffffff);
    var x408: u32 = undefined;
    var x409: u32 = undefined;
    mulxU32(&x408, &x409, x398, 0xffffffff);
    var x410: u32 = undefined;
    var x411: u32 = undefined;
    mulxU32(&x410, &x411, x398, 0xffffffff);
    var x412: u32 = undefined;
    var x413: u32 = undefined;
    mulxU32(&x412, &x413, x398, 0xfffffffe);
    var x414: u32 = undefined;
    var x415: u32 = undefined;
    mulxU32(&x414, &x415, x398, 0xfffffc2f);
    var x416: u32 = undefined;
    var x417: u1 = undefined;
    addcarryxU32(&x416, &x417, 0x0, x415, x412);
    var x418: u32 = undefined;
    var x419: u1 = undefined;
    addcarryxU32(&x418, &x419, x417, x413, x410);
    var x420: u32 = undefined;
    var x421: u1 = undefined;
    addcarryxU32(&x420, &x421, x419, x411, x408);
    var x422: u32 = undefined;
    var x423: u1 = undefined;
    addcarryxU32(&x422, &x423, x421, x409, x406);
    var x424: u32 = undefined;
    var x425: u1 = undefined;
    addcarryxU32(&x424, &x425, x423, x407, x404);
    var x426: u32 = undefined;
    var x427: u1 = undefined;
    addcarryxU32(&x426, &x427, x425, x405, x402);
    var x428: u32 = undefined;
    var x429: u1 = undefined;
    addcarryxU32(&x428, &x429, x427, x403, x400);
    var x430: u32 = undefined;
    var x431: u1 = undefined;
    addcarryxU32(&x430, &x431, 0x0, 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, x396, x428);
    var x446: u32 = undefined;
    var x447: u1 = undefined;
    addcarryxU32(&x446, &x447, x445, (cast(u32, x397) + cast(u32, x381)), (cast(u32, x429) + x401));
    var x448: u32 = undefined;
    var x449: u1 = undefined;
    addcarryxU32(&x448, &x449, 0x0, x432, (arg1[7]));
    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: u1 = undefined;
    addcarryxU32(&x462, &x463, x461, x446, cast(u32, 0x0));
    var x464: u32 = undefined;
    var x465: u32 = undefined;
    mulxU32(&x464, &x465, x448, 0xd2253531);
    var x466: u32 = undefined;
    var x467: u32 = undefined;
    mulxU32(&x466, &x467, x464, 0xffffffff);
    var x468: u32 = undefined;
    var x469: u32 = undefined;
    mulxU32(&x468, &x469, x464, 0xffffffff);
    var x470: u32 = undefined;
    var x471: u32 = undefined;
    mulxU32(&x470, &x471, x464, 0xffffffff);
    var x472: u32 = undefined;
    var x473: u32 = undefined;
    mulxU32(&x472, &x473, x464, 0xffffffff);
    var x474: u32 = undefined;
    var x475: u32 = undefined;
    mulxU32(&x474, &x475, x464, 0xffffffff);
    var x476: u32 = undefined;
    var x477: u32 = undefined;
    mulxU32(&x476, &x477, x464, 0xffffffff);
    var x478: u32 = undefined;
    var x479: u32 = undefined;
    mulxU32(&x478, &x479, x464, 0xfffffffe);
    var x480: u32 = undefined;
    var x481: u32 = undefined;
    mulxU32(&x480, &x481, x464, 0xfffffc2f);
    var x482: u32 = undefined;
    var x483: u1 = undefined;
    addcarryxU32(&x482, &x483, 0x0, x481, x478);
    var x484: u32 = undefined;
    var x485: u1 = undefined;
    addcarryxU32(&x484, &x485, x483, x479, x476);
    var x486: u32 = undefined;
    var x487: u1 = undefined;
    addcarryxU32(&x486, &x487, x485, x477, x474);
    var x488: u32 = undefined;
    var x489: u1 = undefined;
    addcarryxU32(&x488, &x489, x487, x475, x472);
    var x490: u32 = undefined;
    var x491: u1 = undefined;
    addcarryxU32(&x490, &x491, x489, x473, x470);
    var x492: u32 = undefined;
    var x493: u1 = undefined;
    addcarryxU32(&x492, &x493, x491, x471, x468);
    var x494: u32 = undefined;
    var x495: u1 = undefined;
    addcarryxU32(&x494, &x495, x493, x469, x466);
    var x496: u32 = undefined;
    var x497: u1 = undefined;
    addcarryxU32(&x496, &x497, 0x0, 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, x462, x494);
    var x512: u32 = undefined;
    var x513: u1 = undefined;
    addcarryxU32(&x512, &x513, x511, (cast(u32, x463) + cast(u32, x447)), (cast(u32, x495) + x467));
    var x514: u32 = undefined;
    var x515: u1 = undefined;
    subborrowxU32(&x514, &x515, 0x0, x498, 0xfffffc2f);
    var x516: u32 = undefined;
    var x517: u1 = undefined;
    subborrowxU32(&x516, &x517, x515, x500, 0xfffffffe);
    var x518: u32 = undefined;
    var x519: u1 = undefined;
    subborrowxU32(&x518, &x519, x517, x502, 0xffffffff);
    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, 0xffffffff);
    var x528: u32 = undefined;
    var x529: u1 = undefined;
    subborrowxU32(&x528, &x529, x527, x512, 0xffffffff);
    var x530: u32 = undefined;
    var x531: u1 = undefined;
    subborrowxU32(&x530, &x531, x529, cast(u32, x513), cast(u32, 0x0));
    var x532: u32 = undefined;
    cmovznzU32(&x532, x531, x514, x498);
    var x533: u32 = undefined;
    cmovznzU32(&x533, x531, x516, x500);
    var x534: u32 = undefined;
    cmovznzU32(&x534, x531, x518, x502);
    var x535: u32 = undefined;
    cmovznzU32(&x535, x531, x520, x504);
    var x536: u32 = undefined;
    cmovznzU32(&x536, x531, x522, x506);
    var x537: u32 = undefined;
    cmovznzU32(&x537, x531, x524, x508);
    var x538: u32 = undefined;
    cmovznzU32(&x538, x531, x526, x510);
    var x539: u32 = undefined;
    cmovznzU32(&x539, x531, x528, x512);
    out1[0] = x532;
    out1[1] = x533;
    out1[2] = x534;
    out1[3] = x535;
    out1[4] = x536;
    out1[5] = x537;
    out1[6] = x538;
    out1[7] = x539;
}

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

/// 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] = 0x3d1;
    out1[1] = cast(u32, 0x1);
    out1[2] = cast(u32, 0x0);
    out1[3] = cast(u32, 0x0);
    out1[4] = cast(u32, 0x0);
    out1[5] = cast(u32, 0x0);
    out1[6] = cast(u32, 0x0);
    out1[7] = cast(u32, 0x0);
}

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

    out1[0] = 0xfffffc2f;
    out1[1] = 0xfffffffe;
    out1[2] = 0xffffffff;
    out1[3] = 0xffffffff;
    out1[4] = 0xffffffff;
    out1[5] = 0xffffffff;
    out1[6] = 0xffffffff;
    out1[7] = 0xffffffff;
    out1[8] = cast(u32, 0x0);
}

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

    var x1: u32 = undefined;
    var x2: u1 = undefined;
    addcarryxU32(&x1, &x2, 0x0, (~arg1), cast(u32, 0x1));
    const x3 = (cast(u1, (x1 >> 31)) & cast(u1, ((arg3[0]) & cast(u32, 0x1))));
    var x4: u32 = undefined;
    var x5: u1 = undefined;
    addcarryxU32(&x4, &x5, 0x0, (~arg1), cast(u32, 0x1));
    var x6: u32 = undefined;
    cmovznzU32(&x6, x3, arg1, x4);
    var x7: u32 = undefined;
    cmovznzU32(&x7, x3, (arg2[0]), (arg3[0]));
    var x8: u32 = undefined;
    cmovznzU32(&x8, x3, (arg2[1]), (arg3[1]));
    var x9: u32 = undefined;
    cmovznzU32(&x9, x3, (arg2[2]), (arg3[2]));
    var x10: u32 = undefined;
    cmovznzU32(&x10, x3, (arg2[3]), (arg3[3]));
    var x11: u32 = undefined;
    cmovznzU32(&x11, x3, (arg2[4]), (arg3[4]));
    var x12: u32 = undefined;
    cmovznzU32(&x12, x3, (arg2[5]), (arg3[5]));
    var x13: u32 = undefined;
    cmovznzU32(&x13, x3, (arg2[6]), (arg3[6]));
    var x14: u32 = undefined;
    cmovznzU32(&x14, x3, (arg2[7]), (arg3[7]));
    var x15: u32 = undefined;
    cmovznzU32(&x15, x3, (arg2[8]), (arg3[8]));
    var x16: u32 = undefined;
    var x17: u1 = undefined;
    addcarryxU32(&x16, &x17, 0x0, cast(u32, 0x1), (~(arg2[0])));
    var x18: u32 = undefined;
    var x19: u1 = undefined;
    addcarryxU32(&x18, &x19, x17, cast(u32, 0x0), (~(arg2[1])));
    var x20: u32 = undefined;
    var x21: u1 = undefined;
    addcarryxU32(&x20, &x21, x19, cast(u32, 0x0), (~(arg2[2])));
    var x22: u32 = undefined;
    var x23: u1 = undefined;
    addcarryxU32(&x22, &x23, x21, cast(u32, 0x0), (~(arg2[3])));
    var x24: u32 = undefined;
    var x25: u1 = undefined;
    addcarryxU32(&x24, &x25, x23, cast(u32, 0x0), (~(arg2[4])));
    var x26: u32 = undefined;
    var x27: u1 = undefined;
    addcarryxU32(&x26, &x27, x25, cast(u32, 0x0), (~(arg2[5])));
    var x28: u32 = undefined;
    var x29: u1 = undefined;
    addcarryxU32(&x28, &x29, x27, cast(u32, 0x0), (~(arg2[6])));
    var x30: u32 = undefined;
    var x31: u1 = undefined;
    addcarryxU32(&x30, &x31, x29, cast(u32, 0x0), (~(arg2[7])));
    var x32: u32 = undefined;
    var x33: u1 = undefined;
    addcarryxU32(&x32, &x33, x31, cast(u32, 0x0), (~(arg2[8])));
    var x34: u32 = undefined;
    cmovznzU32(&x34, x3, (arg3[0]), x16);
    var x35: u32 = undefined;
    cmovznzU32(&x35, x3, (arg3[1]), x18);
    var x36: u32 = undefined;
    cmovznzU32(&x36, x3, (arg3[2]), x20);
    var x37: u32 = undefined;
    cmovznzU32(&x37, x3, (arg3[3]), x22);
    var x38: u32 = undefined;
    cmovznzU32(&x38, x3, (arg3[4]), x24);
    var x39: u32 = undefined;
    cmovznzU32(&x39, x3, (arg3[5]), x26);
    var x40: u32 = undefined;
    cmovznzU32(&x40, x3, (arg3[6]), x28);
    var x41: u32 = undefined;
    cmovznzU32(&x41, x3, (arg3[7]), x30);
    var x42: u32 = undefined;
    cmovznzU32(&x42, x3, (arg3[8]), x32);
    var x43: u32 = undefined;
    cmovznzU32(&x43, x3, (arg4[0]), (arg5[0]));
    var x44: u32 = undefined;
    cmovznzU32(&x44, x3, (arg4[1]), (arg5[1]));
    var x45: u32 = undefined;
    cmovznzU32(&x45, x3, (arg4[2]), (arg5[2]));
    var x46: u32 = undefined;
    cmovznzU32(&x46, x3, (arg4[3]), (arg5[3]));
    var x47: u32 = undefined;
    cmovznzU32(&x47, x3, (arg4[4]), (arg5[4]));
    var x48: u32 = undefined;
    cmovznzU32(&x48, x3, (arg4[5]), (arg5[5]));
    var x49: u32 = undefined;
    cmovznzU32(&x49, x3, (arg4[6]), (arg5[6]));
    var x50: u32 = undefined;
    cmovznzU32(&x50, x3, (arg4[7]), (arg5[7]));
    var x51: u32 = undefined;
    var x52: u1 = undefined;
    addcarryxU32(&x51, &x52, 0x0, x43, x43);
    var x53: u32 = undefined;
    var x54: u1 = undefined;
    addcarryxU32(&x53, &x54, x52, x44, x44);
    var x55: u32 = undefined;
    var x56: u1 = undefined;
    addcarryxU32(&x55, &x56, x54, x45, x45);
    var x57: u32 = undefined;
    var x58: u1 = undefined;
    addcarryxU32(&x57, &x58, x56, x46, x46);
    var x59: u32 = undefined;
    var x60: u1 = undefined;
    addcarryxU32(&x59, &x60, x58, x47, x47);
    var x61: u32 = undefined;
    var x62: u1 = undefined;
    addcarryxU32(&x61, &x62, x60, x48, x48);
    var x63: u32 = undefined;
    var x64: u1 = undefined;
    addcarryxU32(&x63, &x64, x62, x49, x49);
    var x65: u32 = undefined;
    var x66: u1 = undefined;
    addcarryxU32(&x65, &x66, x64, x50, x50);
    var x67: u32 = undefined;
    var x68: u1 = undefined;
    subborrowxU32(&x67, &x68, 0x0, x51, 0xfffffc2f);
    var x69: u32 = undefined;
    var x70: u1 = undefined;
    subborrowxU32(&x69, &x70, x68, x53, 0xfffffffe);
    var x71: u32 = undefined;
    var x72: u1 = undefined;
    subborrowxU32(&x71, &x72, x70, x55, 0xffffffff);
    var x73: u32 = undefined;
    var x74: u1 = undefined;
    subborrowxU32(&x73, &x74, x72, x57, 0xffffffff);
    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, 0xffffffff);
    var x83: u32 = undefined;
    var x84: u1 = undefined;
    subborrowxU32(&x83, &x84, x82, cast(u32, x66), cast(u32, 0x0));
    const x85 = (arg4[7]);
    const x86 = (arg4[6]);
    const x87 = (arg4[5]);
    const x88 = (arg4[4]);
    const x89 = (arg4[3]);
    const x90 = (arg4[2]);
    const x91 = (arg4[1]);
    const x92 = (arg4[0]);
    var x93: u32 = undefined;
    var x94: u1 = undefined;
    subborrowxU32(&x93, &x94, 0x0, cast(u32, 0x0), x92);
    var x95: u32 = undefined;
    var x96: u1 = undefined;
    subborrowxU32(&x95, &x96, x94, cast(u32, 0x0), x91);
    var x97: u32 = undefined;
    var x98: u1 = undefined;
    subborrowxU32(&x97, &x98, x96, cast(u32, 0x0), x90);
    var x99: u32 = undefined;
    var x100: u1 = undefined;
    subborrowxU32(&x99, &x100, x98, cast(u32, 0x0), x89);
    var x101: u32 = undefined;
    var x102: u1 = undefined;
    subborrowxU32(&x101, &x102, x100, cast(u32, 0x0), x88);
    var x103: u32 = undefined;
    var x104: u1 = undefined;
    subborrowxU32(&x103, &x104, x102, cast(u32, 0x0), x87);
    var x105: u32 = undefined;
    var x106: u1 = undefined;
    subborrowxU32(&x105, &x106, x104, cast(u32, 0x0), x86);
    var x107: u32 = undefined;
    var x108: u1 = undefined;
    subborrowxU32(&x107, &x108, x106, cast(u32, 0x0), x85);
    var x109: u32 = undefined;
    cmovznzU32(&x109, x108, cast(u32, 0x0), 0xffffffff);
    var x110: u32 = undefined;
    var x111: u1 = undefined;
    addcarryxU32(&x110, &x111, 0x0, x93, (x109 & 0xfffffc2f));
    var x112: u32 = undefined;
    var x113: u1 = undefined;
    addcarryxU32(&x112, &x113, x111, x95, (x109 & 0xfffffffe));
    var x114: u32 = undefined;
    var x115: u1 = undefined;
    addcarryxU32(&x114, &x115, x113, x97, x109);
    var x116: u32 = undefined;
    var x117: u1 = undefined;
    addcarryxU32(&x116, &x117, x115, x99, x109);
    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);
    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, 0xfffffc2f);
    var x188: u32 = undefined;
    var x189: u1 = undefined;
    subborrowxU32(&x188, &x189, x187, x172, 0xfffffffe);
    var x190: u32 = undefined;
    var x191: u1 = undefined;
    subborrowxU32(&x190, &x191, x189, x174, 0xffffffff);
    var x192: u32 = undefined;
    var x193: u1 = undefined;
    subborrowxU32(&x192, &x193, x191, x176, 0xffffffff);
    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, 0xffffffff);
    var x202: u32 = undefined;
    var x203: u1 = undefined;
    subborrowxU32(&x202, &x203, x201, cast(u32, x185), cast(u32, 0x0));
    var x204: u32 = undefined;
    var x205: u1 = undefined;
    addcarryxU32(&x204, &x205, 0x0, x6, cast(u32, 0x1));
    const x206 = ((x144 >> 1) | ((x146 << 31) & 0xffffffff));
    const x207 = ((x146 >> 1) | ((x148 << 31) & 0xffffffff));
    const x208 = ((x148 >> 1) | ((x150 << 31) & 0xffffffff));
    const x209 = ((x150 >> 1) | ((x152 << 31) & 0xffffffff));
    const x210 = ((x152 >> 1) | ((x154 << 31) & 0xffffffff));
    const x211 = ((x154 >> 1) | ((x156 << 31) & 0xffffffff));
    const x212 = ((x156 >> 1) | ((x158 << 31) & 0xffffffff));
    const x213 = ((x158 >> 1) | ((x160 << 31) & 0xffffffff));
    const x214 = ((x160 & 0x80000000) | (x160 >> 1));
    var x215: u32 = undefined;
    cmovznzU32(&x215, x84, x67, x51);
    var x216: u32 = undefined;
    cmovznzU32(&x216, x84, x69, x53);
    var x217: u32 = undefined;
    cmovznzU32(&x217, x84, x71, x55);
    var x218: u32 = undefined;
    cmovznzU32(&x218, x84, x73, x57);
    var x219: u32 = undefined;
    cmovznzU32(&x219, x84, x75, x59);
    var x220: u32 = undefined;
    cmovznzU32(&x220, x84, x77, x61);
    var x221: u32 = undefined;
    cmovznzU32(&x221, x84, x79, x63);
    var x222: u32 = undefined;
    cmovznzU32(&x222, x84, x81, x65);
    var x223: u32 = undefined;
    cmovznzU32(&x223, x203, x186, x170);
    var x224: u32 = undefined;
    cmovznzU32(&x224, x203, x188, x172);
    var x225: u32 = undefined;
    cmovznzU32(&x225, x203, x190, x174);
    var x226: u32 = undefined;
    cmovznzU32(&x226, x203, x192, x176);
    var x227: u32 = undefined;
    cmovznzU32(&x227, x203, x194, x178);
    var x228: u32 = undefined;
    cmovznzU32(&x228, x203, x196, x180);
    var x229: u32 = undefined;
    cmovznzU32(&x229, x203, x198, x182);
    var x230: u32 = undefined;
    cmovznzU32(&x230, x203, x200, x184);
    out1.* = x204;
    out2[0] = x7;
    out2[1] = x8;
    out2[2] = x9;
    out2[3] = x10;
    out2[4] = x11;
    out2[5] = x12;
    out2[6] = x13;
    out2[7] = x14;
    out2[8] = x15;
    out3[0] = x206;
    out3[1] = x207;
    out3[2] = x208;
    out3[3] = x209;
    out3[4] = x210;
    out3[5] = x211;
    out3[6] = x212;
    out3[7] = x213;
    out3[8] = x214;
    out4[0] = x215;
    out4[1] = x216;
    out4[2] = x217;
    out4[3] = x218;
    out4[4] = x219;
    out4[5] = x220;
    out4[6] = x221;
    out4[7] = x222;
    out5[0] = x223;
    out5[1] = x224;
    out5[2] = x225;
    out5[3] = x226;
    out5[4] = x227;
    out5[5] = x228;
    out5[6] = x229;
    out5[7] = x230;
}

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

    out1[0] = 0x31525e0a;
    out1[1] = 0xf201a418;
    out1[2] = 0xcd648d85;
    out1[3] = 0x9953f9dd;
    out1[4] = 0x3db210a9;
    out1[5] = 0xe8602946;
    out1[6] = 0x4b03709;
    out1[7] = 0x24fb8a31;
}
