#![no_std]
#![no_main]
#[panic_handler]
fn panic(_: &core::panic::PanicInfo) -> ! {
loop {}
}
#[repr(C)]
pub struct Record {
prefix: u64,
key: [u8; 32],
}
#[unsafe(no_mangle)]
pub static RECORD: Record = Record { prefix: 7, key: [2; 32] };
pub static KEYS: [&[u8; 32]; 2] = [&RECORD.key, &RECORD.key];
#[unsafe(no_mangle)]
pub fn entrypoint(input: *mut u8) -> u64 {
let index = (unsafe { core::ptr::read_volatile(input) } as usize);
let keys = core::hint::black_box(&KEYS);
keys[index & 1][index] as u64
}