#[cfg(zisk_guest)]
use crate::ziskos_syscall;
#[cfg(zisk_guest)]
use core::arch::asm;
use super::point::SyscallPoint384;
#[allow(unused_variables)]
#[cfg_attr(not(feature = "hints"), no_mangle)]
#[cfg_attr(feature = "hints", export_name = "hints_syscall_bls12_381_curve_dbl")]
pub extern "C" fn syscall_bls12_381_curve_dbl(
p: &mut SyscallPoint384,
#[cfg(feature = "hints")] hints: &mut Vec<u64>,
) {
#[cfg(zisk_guest)]
ziskos_syscall!(zisk_definitions::SYSCALL_BLS12_381_CURVE_DBL_ID, p);
#[cfg(not(zisk_guest))]
{
let _p1 = [p.x, p.y].concat().try_into().unwrap();
let mut p2: [u64; 12] = [0; 12];
zisk_precomp_helpers::bls12_381_curve_dbl(&_p1, &mut p2);
p.x.copy_from_slice(&p2[0..6]);
p.y.copy_from_slice(&p2[6..12]);
#[cfg(feature = "hints")]
{
hints.extend_from_slice(&p2);
}
}
}