#include "core.h"intcrypto_aead_decrypt(unsignedchar*m,unsignedlonglong*mlen,unsignedchar*nsec,constunsignedchar*c,unsignedlonglongclen,constunsignedchar*ad,unsignedlonglongadlen,constunsignedchar*npub,constunsignedchar*k){if(clen<CRYPTO_ABYTES){*mlen=0;return-1;}states;u32_2t0,t1;(void)nsec;// set plaintext size*mlen=clen-CRYPTO_ABYTES;ascon_core(&s,m,c,*mlen,ad,adlen,npub,k,ASCON_DEC);// verify tag (should be constant time, check compiler output)t0=to_big((*(u64*)(c+*mlen)));t1=to_big((*(u64*)(c+*mlen+8)));if(((s.x3.h^t0.h)|(s.x3.l^t0.l)|(s.x4.h^t1.h)|(s.x4.l^t1.l))!=0){*mlen=0;return-1;}return0;}