local p={rem={i32=rt_rem_i32;u64=rt_rem_u64;i64=rt_rem_i64};eq={i64=rt_eq_i64},shr={u32=rt_shr_u32;u64=rt_shr_u64;i64=rt_shr_i64;i32=rt_shr_i32};saturate={u32_f64=rt_saturate_u32_f64;u32_f32=rt_saturate_u32_f64,u64_f64=rt_saturate_u64_f64;u64_f32=rt_saturate_u64_f64;i32_f64=rt_saturate_i32_f64;i32_f32=rt_saturate_i32_f64;i64_f64=rt_saturate_i64_f64;i64_f32=rt_saturate_i64_f64},copysign={f64=rt_copysign_f64;f32=rt_copysign_f64};promote={f64_f32=no_op};ne={i64=rt_ne_i64};clz={i64=rt_clz_i64};max={f64=rt_max_f64,f32=rt_max_f64},div={i32=rt_div_i32;u64=rt_div_u64,i64=rt_div_i64;u32=rt_div_u32},ge={i32=rt_ge_i32;u64=rt_ge_u64;i64=rt_ge_i64};mul={i32=rt_mul_i32,i64=rt_mul_i64};extend={i32_n8=rt_extend_i32_n8,i64_n32=rt_extend_i64_n32,i64_u32=rt_extend_i64_u32,i64_n8=rt_extend_i64_n8,i64_i32=rt_extend_i64_i32;i32_n16=rt_extend_i32_n16;i64_n16=rt_extend_i64_n16};load={i32_i16=rt_load_i32_i16,string=rt_load_string;i32_u8=rt_load_i32_u8,i32=rt_load_i32,f64=rt_load_f64,i64_u16=rt_load_i64_u16;i32_u16=rt_load_i32_u16;i64_i32=rt_load_i64_i32;f32=rt_load_f32;i64=rt_load_i64,i64_i16=rt_load_i64_i16,i64_i8=rt_load_i64_i8;i32_i8=rt_load_i32_i8;i64_u32=rt_load_i64_u32,i64_u8=rt_load_i64_u8};gt={i32=rt_gt_i32,u64=rt_gt_u64,i64=rt_gt_i64},rotr={i32=rt_rotr_i32;i64=rt_rotr_i64};demote={f32_f64=no_op},bnot={i64=rt_bit_not_i64};allocator={grow=rt_allocator_grow;size=rt_allocator_size;new=rt_allocator_new};store={i32_n8=rt_store_i32_n8;string=rt_store_string;i64_n32=rt_store_i64_n32;i32=rt_store_i32,i64=rt_store_i64;f32=rt_store_f32,i64_n16=rt_store_i64_n16,copy=rt_store_copy;i64_n8=rt_store_i64_n8,f64=rt_store_f64;i32_n16=rt_store_i32_n16,fill=rt_store_fill};min={f64=rt_min_f64;f32=rt_min_f64},convert={f64_u64=rt_convert_f64_u64;f32_i64=rt_convert_f64_i64;f64_i64=rt_convert_f64_i64,f32_u64=rt_convert_f64_u64,f32_i32=rt_convert_f64_i32;f64_i32=rt_i64_into_u32,f64_u32=no_op;f32_u32=no_op};lt={i32=rt_lt_i32,u64=rt_lt_u64;i64=rt_lt_i64},sub={i32=rt_sub_i32;i64=rt_sub_i64},neg={f64=rt_neg_f64,f32=rt_neg_f64},wrap={i32_i64=rt_wrap_i32_i64},truncate={u32_f64=rt_truncate_f64;u32_f32=rt_truncate_f64,u64_f32=rt_truncate_u64_f64,i64_f32=rt_truncate_i64_f64,f32=rt_truncate_f64,f64=rt_truncate_f64,i32_f64=rt_truncate_i32_f64,i32_f32=rt_truncate_i32_f64;u64_f64=rt_truncate_u64_f64;i64_f64=rt_truncate_i64_f64},bor={i64=rt_bit_or_i64},shl={i32=rt_shl_i32;i64=rt_shl_i64};bxor={i64=rt_bit_xor_i64},nearest={f64=rt_nearest_f32;f32=rt_nearest_f32};i64={bit_not=rt_bit_not_i64;ONE=rt_i64_ONE;multiply=rt_mul_i64,divide_signed=rt_div_i64,into_u64=rt_convert_f64_u64;ZERO=rt_i64_ZERO;from_u32=rt_i64_from_u32,bit_and=rt_bit_and_i64;is_zero=rt_i64_is_zero,is_less_signed=rt_lt_i64;is_negative=rt_i64_is_negative,divide_unsigned=rt_div_i64,is_greater_signed=rt_gt_i64,negate=rt_i64_negate,is_less_unsigned=rt_lt_u64;is_equal=rt_eq_i64,into_u32=rt_i64_into_u32;shift_right_signed=rt_shr_i64,rotate_left=rt_rotl_i64,rotate_right=rt_rotr_i64;shift_right_unsigned=rt_shr_u64;from_u64=rt_i64_from_u64,shift_left=rt_shl_i64,subtract=rt_sub_i64;bit_or=rt_bit_or_i64,is_greater_unsigned=rt_gt_u64;bit_xor=rt_bit_xor_i64,add=rt_add_i64},popcnt={i32=rt_popcnt_i32;i64=rt_popcnt_i64};band={i64=rt_bit_and_i64},le={i32=rt_le_i32;u64=rt_le_u64,i64=rt_le_i64};ctz={i64=rt_ctz_i64};reinterpret={i64_f64=rt_reinterpret_i64_f64;i32_f32=rt_reinterpret_i32_f32,f64_i64=rt_reinterpret_f64_i64,f32_i32=rt_reinterpret_f32_i32},rotl={i32=rt_rotl_i32;i64=rt_rotl_i64};add={i32=rt_add_i32,i64=rt_add_i64}}
--// self note as for 28/06/2024:
--// replace all ``rt_truncate_u32_f64`` calls with ``rt_truncate_f64``
--// since it's not defined (Wasynth bug)

local rt = {
	rem = {
		i32 = rt_rem_i32,
		u64 = rt_rem_u64,
		i64 = rt_rem_i64,
	},
	eq = {
		i64 = rt_eq_i64,
	},
	shr = {
		u32 = rt_shr_u32,
		u64 = rt_shr_u64,
		i64 = rt_shr_i64,
		i32 = rt_shr_i32,
	},
	saturate = {
		u32_f64 = rt_saturate_u32_f64,
		u32_f32 = rt_saturate_u32_f64,
		u64_f64 = rt_saturate_u64_f64,
		u64_f32 = rt_saturate_u64_f64,
		i32_f64 = rt_saturate_i32_f64,
		i32_f32 = rt_saturate_i32_f64,
		i64_f64 = rt_saturate_i64_f64,
		i64_f32 = rt_saturate_i64_f64,
	},
	copysign = {
		f64 = rt_copysign_f64,
		f32 = rt_copysign_f64,
	},
	promote = {
		f64_f32 = no_op,
	},
	ne = {
		i64 = rt_ne_i64,
	},
	clz = {
		i64 = rt_clz_i64,
	},
	max = {
		f64 = rt_max_f64,
		f32 = rt_max_f64,
	},
	div = {
		i32 = rt_div_i32,
		u64 = rt_div_u64,
		i64 = rt_div_i64,
		u32 = rt_div_u32,
	},
	ge = {
		i32 = rt_ge_i32,
		u64 = rt_ge_u64,
		i64 = rt_ge_i64,
	},
	mul = {
		i32 = rt_mul_i32,
		i64 = rt_mul_i64,
	},
	extend = {
		i32_n8 = rt_extend_i32_n8,
		i64_n32 = rt_extend_i64_n32,
		i64_u32 = rt_extend_i64_u32,
		i64_n8 = rt_extend_i64_n8,
		i64_i32 = rt_extend_i64_i32,
		i32_n16 = rt_extend_i32_n16,
		i64_n16 = rt_extend_i64_n16,
	},
	load = {
		i32_i16 = rt_load_i32_i16,
		string = rt_load_string,
		i32_u8 = rt_load_i32_u8,
		i32 = rt_load_i32,
		f64 = rt_load_f64,
		i64_u16 = rt_load_i64_u16,
		i32_u16 = rt_load_i32_u16,
		i64_i32 = rt_load_i64_i32,
		f32 = rt_load_f32,
		i64 = rt_load_i64,
		i64_i16 = rt_load_i64_i16,
		i64_i8 = rt_load_i64_i8,
		i32_i8 = rt_load_i32_i8,
		i64_u32 = rt_load_i64_u32,
		i64_u8 = rt_load_i64_u8,
	},
	gt = {
		i32 = rt_gt_i32,
		u64 = rt_gt_u64,
		i64 = rt_gt_i64,
	},
	rotr = {
		i32 = rt_rotr_i32,
		i64 = rt_rotr_i64,
	},
	demote = {
		f32_f64 = no_op,
	},
	bnot = {
		i64 = rt_bit_not_i64,
	},
	allocator = {
		grow = rt_allocator_grow,
		size = rt_allocator_size,
		new = rt_allocator_new,
	},
	store = {
		i32_n8 = rt_store_i32_n8,
		string = rt_store_string,
		i64_n32 = rt_store_i64_n32,
		i32 = rt_store_i32,
		i64 = rt_store_i64,
		f32 = rt_store_f32,
		i64_n16 = rt_store_i64_n16,
		copy = rt_store_copy,
		i64_n8 = rt_store_i64_n8,
		f64 = rt_store_f64,
		i32_n16 = rt_store_i32_n16,
		fill = rt_store_fill,
	},
	min = {
		f64 = rt_min_f64,
		f32 = rt_min_f64,
	},
	convert = {
		f64_u64 = rt_convert_f64_u64,
		f32_i64 = rt_convert_f64_i64,
		f64_i64 = rt_convert_f64_i64,
		f32_u64 = rt_convert_f64_u64,
		f32_i32 = rt_convert_f64_i32,
		f64_i32 = rt_i64_into_u32,
		f64_u32 = no_op,
		f32_u32 = no_op,
	},
	lt = {
		i32 = rt_lt_i32,
		u64 = rt_lt_u64,
		i64 = rt_lt_i64,
	},
	sub = {
		i32 = rt_sub_i32,
		i64 = rt_sub_i64,
	},
	neg = {
		f64 = rt_neg_f64,
		f32 = rt_neg_f64,
	},
	wrap = {
		i32_i64 = rt_wrap_i32_i64,
	},
	truncate = {
		u32_f64 = rt_truncate_f64,
		u32_f32 = rt_truncate_f64,
		u64_f32 = rt_truncate_u64_f64,
		i64_f32 = rt_truncate_i64_f64,
		f32 = rt_truncate_f64,
		f64 = rt_truncate_f64,
		i32_f64 = rt_truncate_i32_f64,
		i32_f32 = rt_truncate_i32_f64,
		u64_f64 = rt_truncate_u64_f64,
		i64_f64 = rt_truncate_i64_f64,
	},
	bor = {
		i64 = rt_bit_or_i64,
	},
	shl = {
		i32 = rt_shl_i32,
		i64 = rt_shl_i64,
	},
	bxor = {
		i64 = rt_bit_xor_i64,
	},
	nearest = {
		f64 = rt_nearest_f32,
		f32 = rt_nearest_f32,
	},
	i64 = {
		bit_not = rt_bit_not_i64,
		ONE = rt_i64_ONE,
		multiply = rt_mul_i64,
		divide_signed = rt_div_i64,
		into_u64 = rt_convert_f64_u64,
		ZERO = rt_i64_ZERO,
		from_u32 = rt_i64_from_u32,
		bit_and = rt_bit_and_i64,
		is_zero = rt_i64_is_zero,
		is_less_signed = rt_lt_i64,
		is_negative = rt_i64_is_negative,
		divide_unsigned = rt_div_i64,
		is_greater_signed = rt_gt_i64,
		negate = rt_i64_negate,
		is_less_unsigned = rt_lt_u64,
		is_equal = rt_eq_i64,
		into_u32 = rt_i64_into_u32,
		shift_right_signed = rt_shr_i64,
		rotate_left = rt_rotl_i64,
		rotate_right = rt_rotr_i64,
		shift_right_unsigned = rt_shr_u64,
		from_u64 = rt_i64_from_u64,
		shift_left = rt_shl_i64,
		subtract = rt_sub_i64,
		bit_or = rt_bit_or_i64,
		is_greater_unsigned = rt_gt_u64,
		bit_xor = rt_bit_xor_i64,
		add = rt_add_i64,
	},
	popcnt = {
		i32 = rt_popcnt_i32,
		i64 = rt_popcnt_i64,
	},
	band = {
		i64 = rt_bit_and_i64,
	},
	le = {
		i32 = rt_le_i32,
		u64 = rt_le_u64,
		i64 = rt_le_i64,
	},
	ctz = {
		i64 = rt_ctz_i64,
	},
	reinterpret = {
		i64_f64 = rt_reinterpret_i64_f64,
		i32_f32 = rt_reinterpret_i32_f32,
		f64_i64 = rt_reinterpret_f64_i64,
		f32_i32 = rt_reinterpret_f32_i32,
	},
	rotl = {
		i32 = rt_rotl_i32,
		i64 = rt_rotl_i64,
	},
	add = {
		i32 = rt_add_i32,
		i64 = rt_add_i64,
	},
}
