The function mulxU64 is a multiplication, returning the full double-width result.
Postconditions: out1 = (arg1 * arg2) mod 2^64 out2 = ⌊arg1 * arg2 / 2^64⌋
Input Bounds: arg1: [0x0 ~> 0xffffffffffffffff] arg2: [0x0 ~> 0xffffffffffffffff] Output Bounds: out1: [0x0 ~> 0xffffffffffffffff] out2: [0x0 ~> 0xffffffffffffffff]
fn mulxU64(out1: *u64, out2: *u64, arg1: u64, arg2: u64) void
fn mulxU64(out1: *u64, out2: *u64, arg1: u64, arg2: u64) void {
@setRuntimeSafety(mode == .debug);
const x = @as(u128, arg1) * @as(u128, arg2);
out1.* = @as(u64, @truncate(x));
out2.* = @as(u64, @truncate(x >> 64));
}