-- GENERATED by C->Haskell Compiler, version 0.28.6 Switcheroo, 25 November 2017 (Haskell)
-- Edit the ORIGNAL .chs file instead!


{-# LINE 1 "lib/Libsodium.chs" #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}



-- | This module exports raw bindings to the @libsodium@ C library.
--
-- You can find @libsodium@'s documentation at
-- https://libsodium.gitbook.io
--
-- Regarding the version of the C @libsodium@ library supported by this
-- library: Haskell's library @libsodium-A.B.C.D@ is designed to work
-- with the C library @libsodium-A.B.C@.
module Libsodium {--}
  ( -- * Functions
    --
    -- $functions
    (:::)
  , crypto_aead_aes256gcm_beforenm
  , crypto_aead_aes256gcm_decrypt
  , crypto_aead_aes256gcm_decrypt_afternm
  , crypto_aead_aes256gcm_decrypt_detached
  , crypto_aead_aes256gcm_decrypt_detached_afternm
  , crypto_aead_aes256gcm_encrypt
  , crypto_aead_aes256gcm_encrypt_afternm
  , crypto_aead_aes256gcm_encrypt_detached
  , crypto_aead_aes256gcm_encrypt_detached_afternm
  , crypto_aead_aes256gcm_is_available
  , crypto_aead_aes256gcm_keygen
  , crypto_aead_chacha20poly1305_decrypt
  , crypto_aead_chacha20poly1305_decrypt_detached
  , crypto_aead_chacha20poly1305_encrypt
  , crypto_aead_chacha20poly1305_encrypt_detached
  , crypto_aead_chacha20poly1305_ietf_decrypt
  , crypto_aead_chacha20poly1305_ietf_decrypt_detached
  , crypto_aead_chacha20poly1305_ietf_encrypt
  , crypto_aead_chacha20poly1305_ietf_encrypt_detached
  , crypto_aead_chacha20poly1305_ietf_keygen
  , crypto_aead_chacha20poly1305_keygen
  , crypto_aead_xchacha20poly1305_ietf_decrypt
  , crypto_aead_xchacha20poly1305_ietf_decrypt_detached
  , crypto_aead_xchacha20poly1305_ietf_encrypt
  , crypto_aead_xchacha20poly1305_ietf_encrypt_detached
  , crypto_aead_xchacha20poly1305_ietf_keygen
  , crypto_auth
  , crypto_auth_hmacsha256
  , crypto_auth_hmacsha256_final
  , crypto_auth_hmacsha256_init
  , crypto_auth_hmacsha256_keygen
  , crypto_auth_hmacsha256_update
  , crypto_auth_hmacsha256_verify
  , crypto_auth_hmacsha512
  , crypto_auth_hmacsha512256
  , crypto_auth_hmacsha512256_final
  , crypto_auth_hmacsha512256_init
  , crypto_auth_hmacsha512256_keygen
  , crypto_auth_hmacsha512256_update
  , crypto_auth_hmacsha512256_verify
  , crypto_auth_hmacsha512_final
  , crypto_auth_hmacsha512_init
  , crypto_auth_hmacsha512_keygen
  , crypto_auth_hmacsha512_update
  , crypto_auth_hmacsha512_verify
  , crypto_auth_keygen
  , crypto_auth_verify
  , crypto_box
  , crypto_box_afternm
  , crypto_box_beforenm
  , crypto_box_curve25519xchacha20poly1305_beforenm
  , crypto_box_curve25519xchacha20poly1305_detached
  , crypto_box_curve25519xchacha20poly1305_detached_afternm
  , crypto_box_curve25519xchacha20poly1305_easy
  , crypto_box_curve25519xchacha20poly1305_easy_afternm
  , crypto_box_curve25519xchacha20poly1305_keypair
  , crypto_box_curve25519xchacha20poly1305_open_detached
  , crypto_box_curve25519xchacha20poly1305_open_detached_afternm
  , crypto_box_curve25519xchacha20poly1305_open_easy
  , crypto_box_curve25519xchacha20poly1305_open_easy_afternm
  , crypto_box_curve25519xchacha20poly1305_seal
  , crypto_box_curve25519xchacha20poly1305_seal_open
  , crypto_box_curve25519xchacha20poly1305_seed_keypair
  , crypto_box_curve25519xsalsa20poly1305
  , crypto_box_curve25519xsalsa20poly1305_afternm
  , crypto_box_curve25519xsalsa20poly1305_beforenm
  , crypto_box_curve25519xsalsa20poly1305_keypair
  , crypto_box_curve25519xsalsa20poly1305_open
  , crypto_box_curve25519xsalsa20poly1305_open_afternm
  , crypto_box_curve25519xsalsa20poly1305_seed_keypair
  , crypto_box_detached
  , crypto_box_detached_afternm
  , crypto_box_easy
  , crypto_box_easy_afternm
  , crypto_box_keypair
  , crypto_box_open
  , crypto_box_open_afternm
  , crypto_box_open_detached
  , crypto_box_open_detached_afternm
  , crypto_box_open_easy
  , crypto_box_open_easy_afternm
  , crypto_box_seal
  , crypto_box_seal_open
  , crypto_box_seed_keypair
  , crypto_core_ed25519_add
  , crypto_core_ed25519_from_hash
  , crypto_core_ed25519_from_uniform
  , crypto_core_ed25519_is_valid_point
  , crypto_core_ed25519_random
  , crypto_core_ed25519_scalar_add
  , crypto_core_ed25519_scalar_complement
  , crypto_core_ed25519_scalar_invert
  , crypto_core_ed25519_scalar_mul
  , crypto_core_ed25519_scalar_negate
  , crypto_core_ed25519_scalar_random
  , crypto_core_ed25519_scalar_reduce
  , crypto_core_ed25519_scalar_sub
  , crypto_core_ed25519_sub
  , crypto_core_hchacha20
  , crypto_core_hsalsa20
  , crypto_core_ristretto255_add
  , crypto_core_ristretto255_from_hash
  , crypto_core_ristretto255_is_valid_point
  , crypto_core_ristretto255_random
  , crypto_core_ristretto255_scalar_add
  , crypto_core_ristretto255_scalar_complement
  , crypto_core_ristretto255_scalar_invert
  , crypto_core_ristretto255_scalar_mul
  , crypto_core_ristretto255_scalar_negate
  , crypto_core_ristretto255_scalar_random
  , crypto_core_ristretto255_scalar_reduce
  , crypto_core_ristretto255_scalar_sub
  , crypto_core_ristretto255_sub
  , crypto_core_salsa20
  , crypto_core_salsa2012
  , crypto_core_salsa208
  , crypto_generichash
  , crypto_generichash_blake2b
  , crypto_generichash_blake2b_final
  , crypto_generichash_blake2b_init
  , crypto_generichash_blake2b_init_salt_personal
  , crypto_generichash_blake2b_keygen
  , crypto_generichash_blake2b_salt_personal
  , crypto_generichash_blake2b_update
  , crypto_generichash_final
  , crypto_generichash_init
  , crypto_generichash_keygen
  , crypto_generichash_update
  , crypto_hash
  , crypto_hash_sha256
  , crypto_hash_sha256_final
  , crypto_hash_sha256_init
  , crypto_hash_sha256_update
  , crypto_hash_sha512
  , crypto_hash_sha512_final
  , crypto_hash_sha512_init
  , crypto_hash_sha512_update
  , crypto_kdf_blake2b_derive_from_key
  , crypto_kdf_derive_from_key
  , crypto_kdf_keygen
  , crypto_kx_client_session_keys
  , crypto_kx_keypair
  , crypto_kx_seed_keypair
  , crypto_kx_server_session_keys
  , crypto_onetimeauth
  , crypto_onetimeauth_final
  , crypto_onetimeauth_init
  , crypto_onetimeauth_keygen
  , crypto_onetimeauth_poly1305
  , crypto_onetimeauth_poly1305_final
  , crypto_onetimeauth_poly1305_init
  , crypto_onetimeauth_poly1305_keygen
  , crypto_onetimeauth_poly1305_update
  , crypto_onetimeauth_poly1305_verify
  , crypto_onetimeauth_update
  , crypto_onetimeauth_verify
  , crypto_pwhash
  , crypto_pwhash_argon2i
  , crypto_pwhash_argon2id
  , crypto_pwhash_argon2id_str
  , crypto_pwhash_argon2id_str_needs_rehash
  , crypto_pwhash_argon2id_str_verify
  , crypto_pwhash_argon2i_str
  , crypto_pwhash_argon2i_str_needs_rehash
  , crypto_pwhash_argon2i_str_verify
  , crypto_pwhash_scryptsalsa208sha256
  , crypto_pwhash_scryptsalsa208sha256_ll
  , crypto_pwhash_scryptsalsa208sha256_str
  , crypto_pwhash_scryptsalsa208sha256_str_needs_rehash
  , crypto_pwhash_scryptsalsa208sha256_str_verify
  , crypto_pwhash_str
  , crypto_pwhash_str_alg
  , crypto_pwhash_str_needs_rehash
  , crypto_pwhash_str_verify
  , crypto_scalarmult
  , crypto_scalarmult_base
  , crypto_scalarmult_curve25519
  , crypto_scalarmult_curve25519_base
  , crypto_scalarmult_ed25519
  , crypto_scalarmult_ed25519_base
  , crypto_scalarmult_ed25519_base_noclamp
  , crypto_scalarmult_ed25519_noclamp
  , crypto_scalarmult_ristretto255
  , crypto_scalarmult_ristretto255_base
  , crypto_secretbox
  , crypto_secretbox_detached
  , crypto_secretbox_easy
  , crypto_secretbox_keygen
  , crypto_secretbox_open
  , crypto_secretbox_open_detached
  , crypto_secretbox_open_easy
  , crypto_secretbox_xchacha20poly1305_detached
  , crypto_secretbox_xchacha20poly1305_easy
  , crypto_secretbox_xchacha20poly1305_open_detached
  , crypto_secretbox_xchacha20poly1305_open_easy
  , crypto_secretbox_xsalsa20poly1305
  , crypto_secretbox_xsalsa20poly1305_keygen
  , crypto_secretbox_xsalsa20poly1305_open
  , crypto_secretstream_xchacha20poly1305_init_pull
  , crypto_secretstream_xchacha20poly1305_init_push
  , crypto_secretstream_xchacha20poly1305_keygen
  , crypto_secretstream_xchacha20poly1305_pull
  , crypto_secretstream_xchacha20poly1305_push
  , crypto_secretstream_xchacha20poly1305_rekey
  , crypto_shorthash
  , crypto_shorthash_keygen
  , crypto_shorthash_siphash24
  , crypto_shorthash_siphashx24
  , crypto_sign
  , crypto_sign_detached
  , crypto_sign_ed25519
  , crypto_sign_ed25519_detached
  , crypto_sign_ed25519_keypair
  , crypto_sign_ed25519_open
  , crypto_sign_ed25519ph_final_create
  , crypto_sign_ed25519ph_final_verify
  , crypto_sign_ed25519ph_init
  , crypto_sign_ed25519ph_update
  , crypto_sign_ed25519_pk_to_curve25519
  , crypto_sign_ed25519_seed_keypair
  , crypto_sign_ed25519_sk_to_curve25519
  , crypto_sign_ed25519_sk_to_pk
  , crypto_sign_ed25519_sk_to_seed
  , crypto_sign_ed25519_verify_detached
  , crypto_sign_final_create
  , crypto_sign_final_verify
  , crypto_sign_init
  , crypto_sign_keypair
  , crypto_sign_open
  , crypto_sign_seed_keypair
  , crypto_sign_update
  , crypto_sign_verify_detached
  , crypto_stream
  , crypto_stream_chacha20
  , crypto_stream_chacha20_ietf
  , crypto_stream_chacha20_ietf_keygen
  , crypto_stream_chacha20_ietf_xor
  , crypto_stream_chacha20_ietf_xor_ic
  , crypto_stream_chacha20_keygen
  , crypto_stream_chacha20_xor
  , crypto_stream_chacha20_xor_ic
  , crypto_stream_keygen
  , crypto_stream_salsa20
  , crypto_stream_salsa2012
  , crypto_stream_salsa2012_keygen
  , crypto_stream_salsa2012_xor
  , crypto_stream_salsa208
  , crypto_stream_salsa208_keygen
  , crypto_stream_salsa208_xor
  , crypto_stream_salsa20_keygen
  , crypto_stream_salsa20_xor
  , crypto_stream_salsa20_xor_ic
  , crypto_stream_xchacha20
  , crypto_stream_xchacha20_keygen
  , crypto_stream_xchacha20_xor
  , crypto_stream_xchacha20_xor_ic
  , crypto_stream_xor
  , crypto_stream_xsalsa20
  , crypto_stream_xsalsa20_keygen
  , crypto_stream_xsalsa20_xor
  , crypto_stream_xsalsa20_xor_ic
  , crypto_verify_16
  , crypto_verify_32
  , crypto_verify_64
  , randombytes
  , randombytes_buf
  , randombytes_buf_deterministic
  , randombytes_close
  , randombytes_implementation_name
  , randombytes_internal_implementation
  , randombytes_random
  , randombytes_set_implementation
  , randombytes_stir
  , randombytes_sysrandom_implementation
  , randombytes_uniform
  , sodium_add
  , sodium_allocarray
  , sodium_base642bin
  , sodium_base64_encoded_len
  , sodium_bin2base64
  , sodium_bin2hex
  , sodium_compare
  , sodium_hex2bin
  , sodium_increment
  , sodium_init
  , sodium_is_zero
  , sodium_malloc
  , sodium_memcmp
  , sodium_memzero
  , sodium_mlock
  , sodium_mprotect_noaccess
  , sodium_mprotect_readonly
  , sodium_mprotect_readwrite
  , sodium_munlock
  , sodium_pad
  , sodium_runtime_has_aesni
  , sodium_runtime_has_avx
  , sodium_runtime_has_avx2
  , sodium_runtime_has_avx512f
  , sodium_runtime_has_neon
  , sodium_runtime_has_pclmul
  , sodium_runtime_has_rdrand
  , sodium_runtime_has_sse2
  , sodium_runtime_has_sse3
  , sodium_runtime_has_sse41
  , sodium_runtime_has_ssse3
  , sodium_stackzero
  , sodium_sub
  , sodium_unpad
    -- * Types
    --
    -- $types
  , Crypto_aead_aes256gcm_state
  , Crypto_auth_hmacsha256_state
  , Crypto_auth_hmacsha512_state
  , Crypto_generichash_blake2b_state
  , Crypto_hash_sha256_state
  , Crypto_hash_sha512_state
  , Crypto_onetimeauth_poly1305_state
  , Crypto_secretstream_xchacha20poly1305_state
  , Crypto_sign_ed25519ph_state
  , Crypto_auth_hmacsha512256_state
  , Crypto_generichash_state
  , Crypto_onetimeauth_state
  , Crypto_sign_state
  , Randombytes_implementation
  -- * Constants
  --
  -- $constants
  , module Libsodium.Constants
  ) --}
  where
import qualified Foreign.C.Types as C2HSImp
import qualified Foreign.Ptr as C2HSImp



import Data.Proxy
import Data.Word
import Foreign.C
import Foreign.Ptr
import Foreign.Storable
import GHC.TypeLits
import Libsodium.Constants

-------------------------------------------------------------------------


{-# LINE 367 "lib/Libsodium.chs" #-}


{-# LINE 368 "lib/Libsodium.chs" #-}


{-# LINE 369 "lib/Libsodium.chs" #-}



{-# LINE 371 "lib/Libsodium.chs" #-}


{-# LINE 372 "lib/Libsodium.chs" #-}


{-# LINE 373 "lib/Libsodium.chs" #-}



{-# LINE 375 "lib/Libsodium.chs" #-}


{-# LINE 376 "lib/Libsodium.chs" #-}


{-# LINE 377 "lib/Libsodium.chs" #-}



{-# LINE 379 "lib/Libsodium.chs" #-}


{-# LINE 380 "lib/Libsodium.chs" #-}


{-# LINE 381 "lib/Libsodium.chs" #-}



{-# LINE 383 "lib/Libsodium.chs" #-}


{-# LINE 384 "lib/Libsodium.chs" #-}


{-# LINE 385 "lib/Libsodium.chs" #-}



{-# LINE 387 "lib/Libsodium.chs" #-}


{-# LINE 388 "lib/Libsodium.chs" #-}


{-# LINE 389 "lib/Libsodium.chs" #-}



{-# LINE 391 "lib/Libsodium.chs" #-}


{-# LINE 392 "lib/Libsodium.chs" #-}


{-# LINE 393 "lib/Libsodium.chs" #-}



{-# LINE 395 "lib/Libsodium.chs" #-}


{-# LINE 396 "lib/Libsodium.chs" #-}


{-# LINE 397 "lib/Libsodium.chs" #-}



{-# LINE 399 "lib/Libsodium.chs" #-}


{-# LINE 400 "lib/Libsodium.chs" #-}


{-# LINE 401 "lib/Libsodium.chs" #-}


-------------------------------------------------------------------------
-- $functions
--
-- In "Libsodium", each function parameter shows up as “@name ':::' x@”,
-- where @x@ is the actual parameter type and @name@ is the name the
-- parameter is given in the C library.
--
-- This is for documentation purposes only. The type checker will
-- ignore the “@name :::@” part.

-- | “@name ::: x@” is a type synonym for @x@.
type name ::: x = x

-------------------------------------------------------------------------

crypto_aead_aes256gcm_beforenm :: (ctx_ ::: Ptr Crypto_aead_aes256gcm_state) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_aes256gcm_beforenm a1 a2 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  crypto_aead_aes256gcm_beforenm'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 418 "lib/Libsodium.chs" #-}

crypto_aead_aes256gcm_decrypt_afternm :: (m ::: Ptr CUChar) -> (mlen_p ::: Ptr CULLong) -> (nsec ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (npub ::: Ptr CUChar) -> (ctx_ ::: Ptr Crypto_aead_aes256gcm_state) -> IO ((CInt))
crypto_aead_aes256gcm_decrypt_afternm a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  let {a8' = id a8} in
  let {a9' = castPtr a9} in
  crypto_aead_aes256gcm_decrypt_afternm'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 419 "lib/Libsodium.chs" #-}

crypto_aead_aes256gcm_decrypt_detached_afternm :: (m ::: Ptr CUChar) -> (nsec ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (mac ::: Ptr CUChar) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (npub ::: Ptr CUChar) -> (ctx_ ::: Ptr Crypto_aead_aes256gcm_state) -> IO ((CInt))
crypto_aead_aes256gcm_decrypt_detached_afternm a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  let {a8' = id a8} in
  let {a9' = castPtr a9} in
  crypto_aead_aes256gcm_decrypt_detached_afternm'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 420 "lib/Libsodium.chs" #-}

crypto_aead_aes256gcm_decrypt_detached :: (m ::: Ptr CUChar) -> (nsec ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (mac ::: Ptr CUChar) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_aes256gcm_decrypt_detached a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  let {a8' = id a8} in
  let {a9' = id a9} in
  crypto_aead_aes256gcm_decrypt_detached'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 421 "lib/Libsodium.chs" #-}

crypto_aead_aes256gcm_decrypt :: (m ::: Ptr CUChar) -> (mlen_p ::: Ptr CULLong) -> (nsec ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_aes256gcm_decrypt a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  let {a8' = id a8} in
  let {a9' = id a9} in
  crypto_aead_aes256gcm_decrypt'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 422 "lib/Libsodium.chs" #-}

crypto_aead_aes256gcm_encrypt_afternm :: (c ::: Ptr CUChar) -> (clen_p ::: Ptr CULLong) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (nsec ::: Ptr CUChar) -> (npub ::: Ptr CUChar) -> (ctx_ ::: Ptr Crypto_aead_aes256gcm_state) -> IO ((CInt))
crypto_aead_aes256gcm_encrypt_afternm a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  let {a8' = id a8} in
  let {a9' = castPtr a9} in
  crypto_aead_aes256gcm_encrypt_afternm'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 423 "lib/Libsodium.chs" #-}

crypto_aead_aes256gcm_encrypt_detached_afternm :: (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (maclen_p ::: Ptr CULLong) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (nsec ::: Ptr CUChar) -> (npub ::: Ptr CUChar) -> (ctx_ ::: Ptr Crypto_aead_aes256gcm_state) -> IO ((CInt))
crypto_aead_aes256gcm_encrypt_detached_afternm a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  let {a8' = id a8} in
  let {a9' = id a9} in
  let {a10' = castPtr a10} in
  crypto_aead_aes256gcm_encrypt_detached_afternm'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 424 "lib/Libsodium.chs" #-}

crypto_aead_aes256gcm_encrypt_detached :: (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (maclen_p ::: Ptr CULLong) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (nsec ::: Ptr CUChar) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_aes256gcm_encrypt_detached a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  let {a8' = id a8} in
  let {a9' = id a9} in
  let {a10' = id a10} in
  crypto_aead_aes256gcm_encrypt_detached'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 425 "lib/Libsodium.chs" #-}

crypto_aead_aes256gcm_encrypt :: (c ::: Ptr CUChar) -> (clen_p ::: Ptr CULLong) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (nsec ::: Ptr CUChar) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_aes256gcm_encrypt a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  let {a8' = id a8} in
  let {a9' = id a9} in
  crypto_aead_aes256gcm_encrypt'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 426 "lib/Libsodium.chs" #-}

crypto_aead_aes256gcm_is_available :: IO ((CInt))
crypto_aead_aes256gcm_is_available =
  crypto_aead_aes256gcm_is_available'_ >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 427 "lib/Libsodium.chs" #-}

crypto_aead_aes256gcm_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_aead_aes256gcm_keygen a1 =
  let {a1' = id a1} in
  crypto_aead_aes256gcm_keygen'_ a1' >>
  return ()

{-# LINE 428 "lib/Libsodium.chs" #-}


crypto_aead_chacha20poly1305_decrypt_detached :: (m ::: Ptr CUChar) -> (nsec ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (mac ::: Ptr CUChar) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_chacha20poly1305_decrypt_detached a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  let {a8' = id a8} in
  let {a9' = id a9} in
  crypto_aead_chacha20poly1305_decrypt_detached'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 430 "lib/Libsodium.chs" #-}

crypto_aead_chacha20poly1305_decrypt :: (m ::: Ptr CUChar) -> (mlen_p ::: Ptr CULLong) -> (nsec ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_chacha20poly1305_decrypt a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  let {a8' = id a8} in
  let {a9' = id a9} in
  crypto_aead_chacha20poly1305_decrypt'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 431 "lib/Libsodium.chs" #-}

crypto_aead_chacha20poly1305_encrypt_detached :: (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (maclen_p ::: Ptr CULLong) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (nsec ::: Ptr CUChar) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_chacha20poly1305_encrypt_detached a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  let {a8' = id a8} in
  let {a9' = id a9} in
  let {a10' = id a10} in
  crypto_aead_chacha20poly1305_encrypt_detached'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 432 "lib/Libsodium.chs" #-}

crypto_aead_chacha20poly1305_encrypt :: (c ::: Ptr CUChar) -> (clen_p ::: Ptr CULLong) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (nsec ::: Ptr CUChar) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_chacha20poly1305_encrypt a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  let {a8' = id a8} in
  let {a9' = id a9} in
  crypto_aead_chacha20poly1305_encrypt'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 433 "lib/Libsodium.chs" #-}

crypto_aead_chacha20poly1305_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_aead_chacha20poly1305_keygen a1 =
  let {a1' = id a1} in
  crypto_aead_chacha20poly1305_keygen'_ a1' >>
  return ()

{-# LINE 434 "lib/Libsodium.chs" #-}


crypto_aead_chacha20poly1305_ietf_decrypt_detached :: (m ::: Ptr CUChar) -> (nsec ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (mac ::: Ptr CUChar) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_chacha20poly1305_ietf_decrypt_detached a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  let {a8' = id a8} in
  let {a9' = id a9} in
  crypto_aead_chacha20poly1305_ietf_decrypt_detached'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 436 "lib/Libsodium.chs" #-}

crypto_aead_chacha20poly1305_ietf_decrypt :: (m ::: Ptr CUChar) -> (mlen_p ::: Ptr CULLong) -> (nsec ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_chacha20poly1305_ietf_decrypt a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  let {a8' = id a8} in
  let {a9' = id a9} in
  crypto_aead_chacha20poly1305_ietf_decrypt'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 437 "lib/Libsodium.chs" #-}

crypto_aead_chacha20poly1305_ietf_encrypt_detached :: (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (maclen_p ::: Ptr CULLong) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (nsec ::: Ptr CUChar) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_chacha20poly1305_ietf_encrypt_detached a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  let {a8' = id a8} in
  let {a9' = id a9} in
  let {a10' = id a10} in
  crypto_aead_chacha20poly1305_ietf_encrypt_detached'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 438 "lib/Libsodium.chs" #-}

crypto_aead_chacha20poly1305_ietf_encrypt :: (c ::: Ptr CUChar) -> (clen_p ::: Ptr CULLong) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (nsec ::: Ptr CUChar) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_chacha20poly1305_ietf_encrypt a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  let {a8' = id a8} in
  let {a9' = id a9} in
  crypto_aead_chacha20poly1305_ietf_encrypt'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 439 "lib/Libsodium.chs" #-}

crypto_aead_chacha20poly1305_ietf_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_aead_chacha20poly1305_ietf_keygen a1 =
  let {a1' = id a1} in
  crypto_aead_chacha20poly1305_ietf_keygen'_ a1' >>
  return ()

{-# LINE 440 "lib/Libsodium.chs" #-}


crypto_aead_xchacha20poly1305_ietf_decrypt_detached :: (m ::: Ptr CUChar) -> (nsec ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (mac ::: Ptr CUChar) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_xchacha20poly1305_ietf_decrypt_detached a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  let {a8' = id a8} in
  let {a9' = id a9} in
  crypto_aead_xchacha20poly1305_ietf_decrypt_detached'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 442 "lib/Libsodium.chs" #-}

crypto_aead_xchacha20poly1305_ietf_decrypt :: (m ::: Ptr CUChar) -> (mlen_p ::: Ptr CULLong) -> (nsec ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_xchacha20poly1305_ietf_decrypt a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  let {a8' = id a8} in
  let {a9' = id a9} in
  crypto_aead_xchacha20poly1305_ietf_decrypt'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 443 "lib/Libsodium.chs" #-}

crypto_aead_xchacha20poly1305_ietf_encrypt_detached :: (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (maclen_p ::: Ptr CULLong) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (nsec ::: Ptr CUChar) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_xchacha20poly1305_ietf_encrypt_detached a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  let {a8' = id a8} in
  let {a9' = id a9} in
  let {a10' = id a10} in
  crypto_aead_xchacha20poly1305_ietf_encrypt_detached'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 444 "lib/Libsodium.chs" #-}

crypto_aead_xchacha20poly1305_ietf_encrypt :: (c ::: Ptr CUChar) -> (clen_p ::: Ptr CULLong) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (nsec ::: Ptr CUChar) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_xchacha20poly1305_ietf_encrypt a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  let {a8' = id a8} in
  let {a9' = id a9} in
  crypto_aead_xchacha20poly1305_ietf_encrypt'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 445 "lib/Libsodium.chs" #-}

crypto_aead_xchacha20poly1305_ietf_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_aead_xchacha20poly1305_ietf_keygen a1 =
  let {a1' = id a1} in
  crypto_aead_xchacha20poly1305_ietf_keygen'_ a1' >>
  return ()

{-# LINE 446 "lib/Libsodium.chs" #-}


crypto_auth_hmacsha256_final :: (state ::: Ptr Crypto_auth_hmacsha256_state) -> (out ::: Ptr CUChar) -> IO ((CInt))
crypto_auth_hmacsha256_final a1 a2 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  crypto_auth_hmacsha256_final'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 448 "lib/Libsodium.chs" #-}

crypto_auth_hmacsha256_init :: (state ::: Ptr Crypto_auth_hmacsha256_state) -> (key ::: Ptr CUChar) -> (keylen ::: CSize) -> IO ((CInt))
crypto_auth_hmacsha256_init a1 a2 a3 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_auth_hmacsha256_init'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 449 "lib/Libsodium.chs" #-}

crypto_auth_hmacsha256_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_auth_hmacsha256_keygen a1 =
  let {a1' = id a1} in
  crypto_auth_hmacsha256_keygen'_ a1' >>
  return ()

{-# LINE 450 "lib/Libsodium.chs" #-}

crypto_auth_hmacsha256 :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_auth_hmacsha256 a1 a2 a3 a4 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  crypto_auth_hmacsha256'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 451 "lib/Libsodium.chs" #-}

crypto_auth_hmacsha256_update :: (state ::: Ptr Crypto_auth_hmacsha256_state) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> IO ((CInt))
crypto_auth_hmacsha256_update a1 a2 a3 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_auth_hmacsha256_update'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 452 "lib/Libsodium.chs" #-}

crypto_auth_hmacsha256_verify :: (h ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_auth_hmacsha256_verify a1 a2 a3 a4 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  crypto_auth_hmacsha256_verify'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 453 "lib/Libsodium.chs" #-}


crypto_auth_hmacsha512256_final :: (state ::: Ptr Crypto_auth_hmacsha512256_state) -> (out ::: Ptr CUChar) -> IO ((CInt))
crypto_auth_hmacsha512256_final a1 a2 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  crypto_auth_hmacsha512256_final'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 455 "lib/Libsodium.chs" #-}

crypto_auth_hmacsha512256_init :: (state ::: Ptr Crypto_auth_hmacsha512256_state) -> (key ::: Ptr CUChar) -> (keylen ::: CSize) -> IO ((CInt))
crypto_auth_hmacsha512256_init a1 a2 a3 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_auth_hmacsha512256_init'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 456 "lib/Libsodium.chs" #-}

crypto_auth_hmacsha512256_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_auth_hmacsha512256_keygen a1 =
  let {a1' = id a1} in
  crypto_auth_hmacsha512256_keygen'_ a1' >>
  return ()

{-# LINE 457 "lib/Libsodium.chs" #-}

crypto_auth_hmacsha512256 :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_auth_hmacsha512256 a1 a2 a3 a4 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  crypto_auth_hmacsha512256'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 458 "lib/Libsodium.chs" #-}

crypto_auth_hmacsha512256_update :: (state ::: Ptr Crypto_auth_hmacsha512256_state) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> IO ((CInt))
crypto_auth_hmacsha512256_update a1 a2 a3 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_auth_hmacsha512256_update'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 459 "lib/Libsodium.chs" #-}

crypto_auth_hmacsha512256_verify :: (h ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_auth_hmacsha512256_verify a1 a2 a3 a4 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  crypto_auth_hmacsha512256_verify'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 460 "lib/Libsodium.chs" #-}


crypto_auth_hmacsha512_final :: (state ::: Ptr Crypto_auth_hmacsha512_state) -> (out ::: Ptr CUChar) -> IO ((CInt))
crypto_auth_hmacsha512_final a1 a2 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  crypto_auth_hmacsha512_final'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 462 "lib/Libsodium.chs" #-}

crypto_auth_hmacsha512_init :: (state ::: Ptr Crypto_auth_hmacsha512_state) -> (key ::: Ptr CUChar) -> (keylen ::: CSize) -> IO ((CInt))
crypto_auth_hmacsha512_init a1 a2 a3 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_auth_hmacsha512_init'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 463 "lib/Libsodium.chs" #-}

crypto_auth_hmacsha512_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_auth_hmacsha512_keygen a1 =
  let {a1' = id a1} in
  crypto_auth_hmacsha512_keygen'_ a1' >>
  return ()

{-# LINE 464 "lib/Libsodium.chs" #-}

crypto_auth_hmacsha512 :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_auth_hmacsha512 a1 a2 a3 a4 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  crypto_auth_hmacsha512'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 465 "lib/Libsodium.chs" #-}

crypto_auth_hmacsha512_update :: (state ::: Ptr Crypto_auth_hmacsha512_state) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> IO ((CInt))
crypto_auth_hmacsha512_update a1 a2 a3 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_auth_hmacsha512_update'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 466 "lib/Libsodium.chs" #-}

crypto_auth_hmacsha512_verify :: (h ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_auth_hmacsha512_verify a1 a2 a3 a4 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  crypto_auth_hmacsha512_verify'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 467 "lib/Libsodium.chs" #-}


crypto_auth_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_auth_keygen a1 =
  let {a1' = id a1} in
  crypto_auth_keygen'_ a1' >>
  return ()

{-# LINE 469 "lib/Libsodium.chs" #-}

crypto_auth :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_auth a1 a2 a3 a4 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  crypto_auth'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 470 "lib/Libsodium.chs" #-}

crypto_auth_verify :: (h ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_auth_verify a1 a2 a3 a4 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  crypto_auth_verify'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 471 "lib/Libsodium.chs" #-}


crypto_box_detached_afternm :: (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_box_detached_afternm a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  crypto_box_detached_afternm'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 473 "lib/Libsodium.chs" #-}

crypto_box_detached :: (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_detached a1 a2 a3 a4 a5 a6 a7 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  crypto_box_detached'_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 474 "lib/Libsodium.chs" #-}

crypto_box_easy_afternm :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_box_easy_afternm a1 a2 a3 a4 a5 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  crypto_box_easy_afternm'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 475 "lib/Libsodium.chs" #-}

crypto_box_easy :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_easy a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  crypto_box_easy'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 476 "lib/Libsodium.chs" #-}

crypto_box_keypair :: (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_keypair a1 a2 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  crypto_box_keypair'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 477 "lib/Libsodium.chs" #-}

crypto_box_open_afternm :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_box_open_afternm a1 a2 a3 a4 a5 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  crypto_box_open_afternm'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 478 "lib/Libsodium.chs" #-}

crypto_box_open_detached_afternm :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_box_open_detached_afternm a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  crypto_box_open_detached_afternm'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 479 "lib/Libsodium.chs" #-}

crypto_box_open_detached :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_open_detached a1 a2 a3 a4 a5 a6 a7 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  crypto_box_open_detached'_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 480 "lib/Libsodium.chs" #-}

crypto_box_open_easy_afternm :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_box_open_easy_afternm a1 a2 a3 a4 a5 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  crypto_box_open_easy_afternm'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 481 "lib/Libsodium.chs" #-}

crypto_box_open_easy :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_open_easy a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  crypto_box_open_easy'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 482 "lib/Libsodium.chs" #-}

crypto_box_open :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_open a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  crypto_box_open'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 483 "lib/Libsodium.chs" #-}

crypto_box :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  crypto_box'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 484 "lib/Libsodium.chs" #-}

crypto_box_seal_open :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_seal_open a1 a2 a3 a4 a5 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  crypto_box_seal_open'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 485 "lib/Libsodium.chs" #-}

crypto_box_seal :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (pk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_seal a1 a2 a3 a4 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  crypto_box_seal'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 486 "lib/Libsodium.chs" #-}

crypto_box_seed_keypair :: (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> (seed ::: Ptr CUChar) -> IO ((CInt))
crypto_box_seed_keypair a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_box_seed_keypair'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 487 "lib/Libsodium.chs" #-}

crypto_box_afternm :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_box_afternm a1 a2 a3 a4 a5 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  crypto_box_afternm'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 488 "lib/Libsodium.chs" #-}

crypto_box_beforenm :: (k ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_beforenm a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_box_beforenm'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 489 "lib/Libsodium.chs" #-}


crypto_box_curve25519xchacha20poly1305_beforenm :: (k ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xchacha20poly1305_beforenm a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_box_curve25519xchacha20poly1305_beforenm'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 491 "lib/Libsodium.chs" #-}

crypto_box_curve25519xchacha20poly1305_detached_afternm :: (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xchacha20poly1305_detached_afternm a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  crypto_box_curve25519xchacha20poly1305_detached_afternm'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 492 "lib/Libsodium.chs" #-}

crypto_box_curve25519xchacha20poly1305_detached :: (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xchacha20poly1305_detached a1 a2 a3 a4 a5 a6 a7 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  crypto_box_curve25519xchacha20poly1305_detached'_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 493 "lib/Libsodium.chs" #-}

crypto_box_curve25519xchacha20poly1305_easy_afternm :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xchacha20poly1305_easy_afternm a1 a2 a3 a4 a5 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  crypto_box_curve25519xchacha20poly1305_easy_afternm'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 494 "lib/Libsodium.chs" #-}

crypto_box_curve25519xchacha20poly1305_easy :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xchacha20poly1305_easy a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  crypto_box_curve25519xchacha20poly1305_easy'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 495 "lib/Libsodium.chs" #-}

crypto_box_curve25519xchacha20poly1305_keypair :: (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xchacha20poly1305_keypair a1 a2 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  crypto_box_curve25519xchacha20poly1305_keypair'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 496 "lib/Libsodium.chs" #-}

crypto_box_curve25519xchacha20poly1305_open_detached_afternm :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xchacha20poly1305_open_detached_afternm a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  crypto_box_curve25519xchacha20poly1305_open_detached_afternm'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 497 "lib/Libsodium.chs" #-}

crypto_box_curve25519xchacha20poly1305_open_detached :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xchacha20poly1305_open_detached a1 a2 a3 a4 a5 a6 a7 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  crypto_box_curve25519xchacha20poly1305_open_detached'_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 498 "lib/Libsodium.chs" #-}

crypto_box_curve25519xchacha20poly1305_open_easy_afternm :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xchacha20poly1305_open_easy_afternm a1 a2 a3 a4 a5 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  crypto_box_curve25519xchacha20poly1305_open_easy_afternm'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 499 "lib/Libsodium.chs" #-}

crypto_box_curve25519xchacha20poly1305_open_easy :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xchacha20poly1305_open_easy a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  crypto_box_curve25519xchacha20poly1305_open_easy'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 500 "lib/Libsodium.chs" #-}

crypto_box_curve25519xchacha20poly1305_seal_open :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xchacha20poly1305_seal_open a1 a2 a3 a4 a5 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  crypto_box_curve25519xchacha20poly1305_seal_open'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 501 "lib/Libsodium.chs" #-}

crypto_box_curve25519xchacha20poly1305_seal :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (pk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xchacha20poly1305_seal a1 a2 a3 a4 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  crypto_box_curve25519xchacha20poly1305_seal'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 502 "lib/Libsodium.chs" #-}

crypto_box_curve25519xchacha20poly1305_seed_keypair :: (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> (seed ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xchacha20poly1305_seed_keypair a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_box_curve25519xchacha20poly1305_seed_keypair'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 503 "lib/Libsodium.chs" #-}

crypto_box_curve25519xsalsa20poly1305_afternm :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xsalsa20poly1305_afternm a1 a2 a3 a4 a5 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  crypto_box_curve25519xsalsa20poly1305_afternm'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 504 "lib/Libsodium.chs" #-}

crypto_box_curve25519xsalsa20poly1305_beforenm :: (k ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xsalsa20poly1305_beforenm a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_box_curve25519xsalsa20poly1305_beforenm'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 505 "lib/Libsodium.chs" #-}

crypto_box_curve25519xsalsa20poly1305_keypair :: (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xsalsa20poly1305_keypair a1 a2 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  crypto_box_curve25519xsalsa20poly1305_keypair'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 506 "lib/Libsodium.chs" #-}

crypto_box_curve25519xsalsa20poly1305_open_afternm :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xsalsa20poly1305_open_afternm a1 a2 a3 a4 a5 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  crypto_box_curve25519xsalsa20poly1305_open_afternm'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 507 "lib/Libsodium.chs" #-}

crypto_box_curve25519xsalsa20poly1305_open :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xsalsa20poly1305_open a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  crypto_box_curve25519xsalsa20poly1305_open'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 508 "lib/Libsodium.chs" #-}

crypto_box_curve25519xsalsa20poly1305 :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xsalsa20poly1305 a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  crypto_box_curve25519xsalsa20poly1305'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 509 "lib/Libsodium.chs" #-}

crypto_box_curve25519xsalsa20poly1305_seed_keypair :: (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> (seed ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xsalsa20poly1305_seed_keypair a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_box_curve25519xsalsa20poly1305_seed_keypair'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 510 "lib/Libsodium.chs" #-}


crypto_core_ed25519_add :: (r ::: Ptr CUChar) -> (p ::: Ptr CUChar) -> (q ::: Ptr CUChar) -> IO ((CInt))
crypto_core_ed25519_add a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_core_ed25519_add'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 512 "lib/Libsodium.chs" #-}

crypto_core_ed25519_from_hash :: (p ::: Ptr CUChar) -> (h ::: Ptr CUChar) -> IO ((CInt))
crypto_core_ed25519_from_hash a1 a2 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  crypto_core_ed25519_from_hash'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 513 "lib/Libsodium.chs" #-}

crypto_core_ed25519_from_uniform :: (p ::: Ptr CUChar) -> (r ::: Ptr CUChar) -> IO ((CInt))
crypto_core_ed25519_from_uniform a1 a2 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  crypto_core_ed25519_from_uniform'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 514 "lib/Libsodium.chs" #-}

crypto_core_ed25519_is_valid_point :: (p ::: Ptr CUChar) -> IO ((CInt))
crypto_core_ed25519_is_valid_point a1 =
  let {a1' = id a1} in
  crypto_core_ed25519_is_valid_point'_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 515 "lib/Libsodium.chs" #-}

crypto_core_ed25519_random :: (p ::: Ptr CUChar) -> IO ()
crypto_core_ed25519_random a1 =
  let {a1' = id a1} in
  crypto_core_ed25519_random'_ a1' >>
  return ()

{-# LINE 516 "lib/Libsodium.chs" #-}

crypto_core_ed25519_scalar_add :: (z ::: Ptr CUChar) -> (x ::: Ptr CUChar) -> (y ::: Ptr CUChar) -> IO ()
crypto_core_ed25519_scalar_add a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_core_ed25519_scalar_add'_ a1' a2' a3' >>
  return ()

{-# LINE 517 "lib/Libsodium.chs" #-}

crypto_core_ed25519_scalar_complement :: (comp ::: Ptr CUChar) -> (s ::: Ptr CUChar) -> IO ()
crypto_core_ed25519_scalar_complement a1 a2 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  crypto_core_ed25519_scalar_complement'_ a1' a2' >>
  return ()

{-# LINE 518 "lib/Libsodium.chs" #-}

crypto_core_ed25519_scalar_invert :: (recip ::: Ptr CUChar) -> (s ::: Ptr CUChar) -> IO ((CInt))
crypto_core_ed25519_scalar_invert a1 a2 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  crypto_core_ed25519_scalar_invert'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 519 "lib/Libsodium.chs" #-}

crypto_core_ed25519_scalar_mul :: (z ::: Ptr CUChar) -> (x ::: Ptr CUChar) -> (y ::: Ptr CUChar) -> IO ()
crypto_core_ed25519_scalar_mul a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_core_ed25519_scalar_mul'_ a1' a2' a3' >>
  return ()

{-# LINE 520 "lib/Libsodium.chs" #-}

crypto_core_ed25519_scalar_negate :: (neg ::: Ptr CUChar) -> (s ::: Ptr CUChar) -> IO ()
crypto_core_ed25519_scalar_negate a1 a2 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  crypto_core_ed25519_scalar_negate'_ a1' a2' >>
  return ()

{-# LINE 521 "lib/Libsodium.chs" #-}

crypto_core_ed25519_scalar_random :: (r ::: Ptr CUChar) -> IO ()
crypto_core_ed25519_scalar_random a1 =
  let {a1' = id a1} in
  crypto_core_ed25519_scalar_random'_ a1' >>
  return ()

{-# LINE 522 "lib/Libsodium.chs" #-}

crypto_core_ed25519_scalar_reduce :: (r ::: Ptr CUChar) -> (s ::: Ptr CUChar) -> IO ()
crypto_core_ed25519_scalar_reduce a1 a2 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  crypto_core_ed25519_scalar_reduce'_ a1' a2' >>
  return ()

{-# LINE 523 "lib/Libsodium.chs" #-}

crypto_core_ed25519_scalar_sub :: (z ::: Ptr CUChar) -> (x ::: Ptr CUChar) -> (y ::: Ptr CUChar) -> IO ()
crypto_core_ed25519_scalar_sub a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_core_ed25519_scalar_sub'_ a1' a2' a3' >>
  return ()

{-# LINE 524 "lib/Libsodium.chs" #-}

crypto_core_ed25519_sub :: (r ::: Ptr CUChar) -> (p ::: Ptr CUChar) -> (q ::: Ptr CUChar) -> IO ((CInt))
crypto_core_ed25519_sub a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_core_ed25519_sub'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 525 "lib/Libsodium.chs" #-}


crypto_core_hchacha20 :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> IO ((CInt))
crypto_core_hchacha20 a1 a2 a3 a4 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  crypto_core_hchacha20'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 527 "lib/Libsodium.chs" #-}


crypto_core_hsalsa20 :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> IO ((CInt))
crypto_core_hsalsa20 a1 a2 a3 a4 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  crypto_core_hsalsa20'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 529 "lib/Libsodium.chs" #-}


crypto_core_ristretto255_add :: (r ::: Ptr CUChar) -> (p ::: Ptr CUChar) -> (q ::: Ptr CUChar) -> IO ((CInt))
crypto_core_ristretto255_add a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_core_ristretto255_add'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 531 "lib/Libsodium.chs" #-}

crypto_core_ristretto255_from_hash :: (p ::: Ptr CUChar) -> (r ::: Ptr CUChar) -> IO ((CInt))
crypto_core_ristretto255_from_hash a1 a2 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  crypto_core_ristretto255_from_hash'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 532 "lib/Libsodium.chs" #-}

crypto_core_ristretto255_is_valid_point :: (p ::: Ptr CUChar) -> IO ((CInt))
crypto_core_ristretto255_is_valid_point a1 =
  let {a1' = id a1} in
  crypto_core_ristretto255_is_valid_point'_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 533 "lib/Libsodium.chs" #-}

crypto_core_ristretto255_random :: (p ::: Ptr CUChar) -> IO ()
crypto_core_ristretto255_random a1 =
  let {a1' = id a1} in
  crypto_core_ristretto255_random'_ a1' >>
  return ()

{-# LINE 534 "lib/Libsodium.chs" #-}

crypto_core_ristretto255_scalar_add :: (z ::: Ptr CUChar) -> (x ::: Ptr CUChar) -> (y ::: Ptr CUChar) -> IO ()
crypto_core_ristretto255_scalar_add a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_core_ristretto255_scalar_add'_ a1' a2' a3' >>
  return ()

{-# LINE 535 "lib/Libsodium.chs" #-}

crypto_core_ristretto255_scalar_complement :: (comp ::: Ptr CUChar) -> (s ::: Ptr CUChar) -> IO ()
crypto_core_ristretto255_scalar_complement a1 a2 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  crypto_core_ristretto255_scalar_complement'_ a1' a2' >>
  return ()

{-# LINE 536 "lib/Libsodium.chs" #-}

crypto_core_ristretto255_scalar_invert :: (recip ::: Ptr CUChar) -> (s ::: Ptr CUChar) -> IO ((CInt))
crypto_core_ristretto255_scalar_invert a1 a2 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  crypto_core_ristretto255_scalar_invert'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 537 "lib/Libsodium.chs" #-}

crypto_core_ristretto255_scalar_mul :: (z ::: Ptr CUChar) -> (x ::: Ptr CUChar) -> (y ::: Ptr CUChar) -> IO ()
crypto_core_ristretto255_scalar_mul a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_core_ristretto255_scalar_mul'_ a1' a2' a3' >>
  return ()

{-# LINE 538 "lib/Libsodium.chs" #-}

crypto_core_ristretto255_scalar_negate :: (neg ::: Ptr CUChar) -> (s ::: Ptr CUChar) -> IO ()
crypto_core_ristretto255_scalar_negate a1 a2 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  crypto_core_ristretto255_scalar_negate'_ a1' a2' >>
  return ()

{-# LINE 539 "lib/Libsodium.chs" #-}

crypto_core_ristretto255_scalar_random :: (r ::: Ptr CUChar) -> IO ()
crypto_core_ristretto255_scalar_random a1 =
  let {a1' = id a1} in
  crypto_core_ristretto255_scalar_random'_ a1' >>
  return ()

{-# LINE 540 "lib/Libsodium.chs" #-}

crypto_core_ristretto255_scalar_reduce :: (r ::: Ptr CUChar) -> (s ::: Ptr CUChar) -> IO ()
crypto_core_ristretto255_scalar_reduce a1 a2 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  crypto_core_ristretto255_scalar_reduce'_ a1' a2' >>
  return ()

{-# LINE 541 "lib/Libsodium.chs" #-}

crypto_core_ristretto255_scalar_sub :: (z ::: Ptr CUChar) -> (x ::: Ptr CUChar) -> (y ::: Ptr CUChar) -> IO ()
crypto_core_ristretto255_scalar_sub a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_core_ristretto255_scalar_sub'_ a1' a2' a3' >>
  return ()

{-# LINE 542 "lib/Libsodium.chs" #-}

crypto_core_ristretto255_sub :: (r ::: Ptr CUChar) -> (p ::: Ptr CUChar) -> (q ::: Ptr CUChar) -> IO ((CInt))
crypto_core_ristretto255_sub a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_core_ristretto255_sub'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 543 "lib/Libsodium.chs" #-}


crypto_core_salsa2012 :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> IO ((CInt))
crypto_core_salsa2012 a1 a2 a3 a4 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  crypto_core_salsa2012'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 545 "lib/Libsodium.chs" #-}

crypto_core_salsa208 :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> IO ((CInt))
crypto_core_salsa208 a1 a2 a3 a4 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  crypto_core_salsa208'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 546 "lib/Libsodium.chs" #-}

crypto_core_salsa20 :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> IO ((CInt))
crypto_core_salsa20 a1 a2 a3 a4 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  crypto_core_salsa20'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 547 "lib/Libsodium.chs" #-}


crypto_generichash_blake2b_final :: (state ::: Ptr Crypto_generichash_blake2b_state) -> (out ::: Ptr CUChar) -> (outlen ::: CSize) -> IO ((CInt))
crypto_generichash_blake2b_final a1 a2 a3 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_generichash_blake2b_final'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 549 "lib/Libsodium.chs" #-}

crypto_generichash_blake2b_init :: (state ::: Ptr Crypto_generichash_blake2b_state) -> (key ::: Ptr CUChar) -> (keylen ::: CSize) -> (outlen ::: CSize) -> IO ((CInt))
crypto_generichash_blake2b_init a1 a2 a3 a4 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  crypto_generichash_blake2b_init'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 550 "lib/Libsodium.chs" #-}

crypto_generichash_blake2b_init_salt_personal :: (state ::: Ptr Crypto_generichash_blake2b_state) -> (key ::: Ptr CUChar) -> (keylen ::: CSize) -> (outlen ::: CSize) -> (salt ::: Ptr CUChar) -> (personal ::: Ptr CUChar) -> IO ((CInt))
crypto_generichash_blake2b_init_salt_personal a1 a2 a3 a4 a5 a6 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  crypto_generichash_blake2b_init_salt_personal'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 551 "lib/Libsodium.chs" #-}

crypto_generichash_blake2b_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_generichash_blake2b_keygen a1 =
  let {a1' = id a1} in
  crypto_generichash_blake2b_keygen'_ a1' >>
  return ()

{-# LINE 552 "lib/Libsodium.chs" #-}

crypto_generichash_blake2b :: (out ::: Ptr CUChar) -> (outlen ::: CSize) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (key ::: Ptr CUChar) -> (keylen ::: CSize) -> IO ((CInt))
crypto_generichash_blake2b a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  crypto_generichash_blake2b'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 553 "lib/Libsodium.chs" #-}

crypto_generichash_blake2b_salt_personal :: (out ::: Ptr CUChar) -> (outlen ::: CSize) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (key ::: Ptr CUChar) -> (keylen ::: CSize) -> (salt ::: Ptr CUChar) -> (personal ::: Ptr CUChar) -> IO ((CInt))
crypto_generichash_blake2b_salt_personal a1 a2 a3 a4 a5 a6 a7 a8 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  let {a8' = id a8} in
  crypto_generichash_blake2b_salt_personal'_ a1' a2' a3' a4' a5' a6' a7' a8' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 554 "lib/Libsodium.chs" #-}

crypto_generichash_blake2b_update :: (state ::: Ptr Crypto_generichash_blake2b_state) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> IO ((CInt))
crypto_generichash_blake2b_update a1 a2 a3 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_generichash_blake2b_update'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 555 "lib/Libsodium.chs" #-}


crypto_generichash_final :: (state ::: Ptr Crypto_generichash_state) -> (out ::: Ptr CUChar) -> (outlen ::: CSize) -> IO ((CInt))
crypto_generichash_final a1 a2 a3 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_generichash_final'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 557 "lib/Libsodium.chs" #-}

crypto_generichash_init :: (state ::: Ptr Crypto_generichash_state) -> (key ::: Ptr CUChar) -> (keylen ::: CSize) -> (outlen ::: CSize) -> IO ((CInt))
crypto_generichash_init a1 a2 a3 a4 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  crypto_generichash_init'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 558 "lib/Libsodium.chs" #-}

crypto_generichash_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_generichash_keygen a1 =
  let {a1' = id a1} in
  crypto_generichash_keygen'_ a1' >>
  return ()

{-# LINE 559 "lib/Libsodium.chs" #-}

crypto_generichash :: (out ::: Ptr CUChar) -> (outlen ::: CSize) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (key ::: Ptr CUChar) -> (keylen ::: CSize) -> IO ((CInt))
crypto_generichash a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  crypto_generichash'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 560 "lib/Libsodium.chs" #-}

crypto_generichash_update :: (state ::: Ptr Crypto_generichash_state) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> IO ((CInt))
crypto_generichash_update a1 a2 a3 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_generichash_update'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 561 "lib/Libsodium.chs" #-}


crypto_hash :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> IO ((CInt))
crypto_hash a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_hash'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 563 "lib/Libsodium.chs" #-}


crypto_hash_sha256_final :: (state ::: Ptr Crypto_hash_sha256_state) -> (out ::: Ptr CUChar) -> IO ((CInt))
crypto_hash_sha256_final a1 a2 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  crypto_hash_sha256_final'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 565 "lib/Libsodium.chs" #-}

crypto_hash_sha256_init :: (state ::: Ptr Crypto_hash_sha256_state) -> IO ((CInt))
crypto_hash_sha256_init a1 =
  let {a1' = castPtr a1} in
  crypto_hash_sha256_init'_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 566 "lib/Libsodium.chs" #-}

crypto_hash_sha256 :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> IO ((CInt))
crypto_hash_sha256 a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_hash_sha256'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 567 "lib/Libsodium.chs" #-}

crypto_hash_sha256_update :: (state ::: Ptr Crypto_hash_sha256_state) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> IO ((CInt))
crypto_hash_sha256_update a1 a2 a3 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_hash_sha256_update'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 568 "lib/Libsodium.chs" #-}


crypto_hash_sha512_final :: (state ::: Ptr Crypto_hash_sha512_state) -> (out ::: Ptr CUChar) -> IO ((CInt))
crypto_hash_sha512_final a1 a2 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  crypto_hash_sha512_final'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 570 "lib/Libsodium.chs" #-}

crypto_hash_sha512_init :: (state ::: Ptr Crypto_hash_sha512_state) -> IO ((CInt))
crypto_hash_sha512_init a1 =
  let {a1' = castPtr a1} in
  crypto_hash_sha512_init'_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 571 "lib/Libsodium.chs" #-}

crypto_hash_sha512 :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> IO ((CInt))
crypto_hash_sha512 a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_hash_sha512'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 572 "lib/Libsodium.chs" #-}

crypto_hash_sha512_update :: (state ::: Ptr Crypto_hash_sha512_state) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> IO ((CInt))
crypto_hash_sha512_update a1 a2 a3 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_hash_sha512_update'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 573 "lib/Libsodium.chs" #-}


crypto_kdf_blake2b_derive_from_key :: (subkey ::: Ptr CUChar) -> (subkey_len ::: CSize) -> (subkey_id ::: Word64) -> (ctx ::: Ptr CChar) -> (key ::: Ptr CUChar) -> IO ((CInt))
crypto_kdf_blake2b_derive_from_key a1 a2 a3 a4 a5 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  crypto_kdf_blake2b_derive_from_key'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 575 "lib/Libsodium.chs" #-}


crypto_kdf_derive_from_key :: (subkey ::: Ptr CUChar) -> (subkey_len ::: CSize) -> (subkey_id ::: Word64) -> (ctx ::: Ptr CChar) -> (key ::: Ptr CUChar) -> IO ((CInt))
crypto_kdf_derive_from_key a1 a2 a3 a4 a5 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  crypto_kdf_derive_from_key'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 577 "lib/Libsodium.chs" #-}

crypto_kdf_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_kdf_keygen a1 =
  let {a1' = id a1} in
  crypto_kdf_keygen'_ a1' >>
  return ()

{-# LINE 578 "lib/Libsodium.chs" #-}


crypto_kx_client_session_keys :: (rx ::: Ptr CUChar) -> (tx ::: Ptr CUChar) -> (client_pk ::: Ptr CUChar) -> (client_sk ::: Ptr CUChar) -> (server_pk ::: Ptr CUChar) -> IO ((CInt))
crypto_kx_client_session_keys a1 a2 a3 a4 a5 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  crypto_kx_client_session_keys'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 580 "lib/Libsodium.chs" #-}

crypto_kx_keypair :: (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_kx_keypair a1 a2 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  crypto_kx_keypair'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 581 "lib/Libsodium.chs" #-}

crypto_kx_seed_keypair :: (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> (seed ::: Ptr CUChar) -> IO ((CInt))
crypto_kx_seed_keypair a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_kx_seed_keypair'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 582 "lib/Libsodium.chs" #-}

crypto_kx_server_session_keys :: (rx ::: Ptr CUChar) -> (tx ::: Ptr CUChar) -> (server_pk ::: Ptr CUChar) -> (server_sk ::: Ptr CUChar) -> (client_pk ::: Ptr CUChar) -> IO ((CInt))
crypto_kx_server_session_keys a1 a2 a3 a4 a5 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  crypto_kx_server_session_keys'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 583 "lib/Libsodium.chs" #-}


crypto_onetimeauth_final :: (state ::: Ptr Crypto_onetimeauth_state) -> (out ::: Ptr CUChar) -> IO ((CInt))
crypto_onetimeauth_final a1 a2 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  crypto_onetimeauth_final'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 585 "lib/Libsodium.chs" #-}

crypto_onetimeauth_init :: (state ::: Ptr Crypto_onetimeauth_state) -> (key ::: Ptr CUChar) -> IO ((CInt))
crypto_onetimeauth_init a1 a2 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  crypto_onetimeauth_init'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 586 "lib/Libsodium.chs" #-}

crypto_onetimeauth_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_onetimeauth_keygen a1 =
  let {a1' = id a1} in
  crypto_onetimeauth_keygen'_ a1' >>
  return ()

{-# LINE 587 "lib/Libsodium.chs" #-}


crypto_onetimeauth_poly1305_final :: (state ::: Ptr Crypto_onetimeauth_poly1305_state) -> (out ::: Ptr CUChar) -> IO ((CInt))
crypto_onetimeauth_poly1305_final a1 a2 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  crypto_onetimeauth_poly1305_final'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 589 "lib/Libsodium.chs" #-}

crypto_onetimeauth_poly1305_init :: (state ::: Ptr Crypto_onetimeauth_poly1305_state) -> (key ::: Ptr CUChar) -> IO ((CInt))
crypto_onetimeauth_poly1305_init a1 a2 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  crypto_onetimeauth_poly1305_init'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 590 "lib/Libsodium.chs" #-}

crypto_onetimeauth_poly1305_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_onetimeauth_poly1305_keygen a1 =
  let {a1' = id a1} in
  crypto_onetimeauth_poly1305_keygen'_ a1' >>
  return ()

{-# LINE 591 "lib/Libsodium.chs" #-}

crypto_onetimeauth_poly1305 :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_onetimeauth_poly1305 a1 a2 a3 a4 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  crypto_onetimeauth_poly1305'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 592 "lib/Libsodium.chs" #-}

crypto_onetimeauth_poly1305_update :: (state ::: Ptr Crypto_onetimeauth_poly1305_state) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> IO ((CInt))
crypto_onetimeauth_poly1305_update a1 a2 a3 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_onetimeauth_poly1305_update'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 593 "lib/Libsodium.chs" #-}

crypto_onetimeauth_poly1305_verify :: (h ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_onetimeauth_poly1305_verify a1 a2 a3 a4 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  crypto_onetimeauth_poly1305_verify'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 594 "lib/Libsodium.chs" #-}


crypto_onetimeauth :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_onetimeauth a1 a2 a3 a4 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  crypto_onetimeauth'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 596 "lib/Libsodium.chs" #-}

crypto_onetimeauth_update :: (state ::: Ptr Crypto_onetimeauth_state) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> IO ((CInt))
crypto_onetimeauth_update a1 a2 a3 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_onetimeauth_update'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 597 "lib/Libsodium.chs" #-}

crypto_onetimeauth_verify :: (h ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_onetimeauth_verify a1 a2 a3 a4 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  crypto_onetimeauth_verify'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 598 "lib/Libsodium.chs" #-}


crypto_pwhash_argon2id :: (out ::: Ptr CUChar) -> (outlen ::: CULLong) -> (passwd ::: Ptr CChar) -> (passwdlen ::: CULLong) -> (salt ::: Ptr CUChar) -> (opslimit ::: CULLong) -> (memlimit ::: CSize) -> (alg ::: CInt) -> IO ((CInt))
crypto_pwhash_argon2id a1 a2 a3 a4 a5 a6 a7 a8 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  let {a8' = id a8} in
  crypto_pwhash_argon2id'_ a1' a2' a3' a4' a5' a6' a7' a8' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 600 "lib/Libsodium.chs" #-}

crypto_pwhash_argon2id_str_needs_rehash :: (str ::: Ptr CChar) -> (opslimit ::: CULLong) -> (memlimit ::: CSize) -> IO ((CInt))
crypto_pwhash_argon2id_str_needs_rehash a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_pwhash_argon2id_str_needs_rehash'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 601 "lib/Libsodium.chs" #-}

crypto_pwhash_argon2id_str :: (out ::: Ptr CChar) -> (passwd ::: Ptr CChar) -> (passwdlen ::: CULLong) -> (opslimit ::: CULLong) -> (memlimit ::: CSize) -> IO ((CInt))
crypto_pwhash_argon2id_str a1 a2 a3 a4 a5 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  crypto_pwhash_argon2id_str'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 602 "lib/Libsodium.chs" #-}

crypto_pwhash_argon2id_str_verify :: (str ::: Ptr CChar) -> (passwd ::: Ptr CChar) -> (passwdlen ::: CULLong) -> IO ((CInt))
crypto_pwhash_argon2id_str_verify a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_pwhash_argon2id_str_verify'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 603 "lib/Libsodium.chs" #-}

crypto_pwhash_argon2i :: (out ::: Ptr CUChar) -> (outlen ::: CULLong) -> (passwd ::: Ptr CChar) -> (passwdlen ::: CULLong) -> (salt ::: Ptr CUChar) -> (opslimit ::: CULLong) -> (memlimit ::: CSize) -> (alg ::: CInt) -> IO ((CInt))
crypto_pwhash_argon2i a1 a2 a3 a4 a5 a6 a7 a8 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  let {a8' = id a8} in
  crypto_pwhash_argon2i'_ a1' a2' a3' a4' a5' a6' a7' a8' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 604 "lib/Libsodium.chs" #-}

crypto_pwhash_argon2i_str_needs_rehash :: (str ::: Ptr CChar) -> (opslimit ::: CULLong) -> (memlimit ::: CSize) -> IO ((CInt))
crypto_pwhash_argon2i_str_needs_rehash a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_pwhash_argon2i_str_needs_rehash'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 605 "lib/Libsodium.chs" #-}

crypto_pwhash_argon2i_str :: (out ::: Ptr CChar) -> (passwd ::: Ptr CChar) -> (passwdlen ::: CULLong) -> (opslimit ::: CULLong) -> (memlimit ::: CSize) -> IO ((CInt))
crypto_pwhash_argon2i_str a1 a2 a3 a4 a5 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  crypto_pwhash_argon2i_str'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 606 "lib/Libsodium.chs" #-}

crypto_pwhash_argon2i_str_verify :: (str ::: Ptr CChar) -> (passwd ::: Ptr CChar) -> (passwdlen ::: CULLong) -> IO ((CInt))
crypto_pwhash_argon2i_str_verify a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_pwhash_argon2i_str_verify'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 607 "lib/Libsodium.chs" #-}


crypto_pwhash :: (out ::: Ptr CUChar) -> (outlen ::: CULLong) -> (passwd ::: Ptr CChar) -> (passwdlen ::: CULLong) -> (salt ::: Ptr CUChar) -> (opslimit ::: CULLong) -> (memlimit ::: CSize) -> (alg ::: CInt) -> IO ((CInt))
crypto_pwhash a1 a2 a3 a4 a5 a6 a7 a8 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  let {a8' = id a8} in
  crypto_pwhash'_ a1' a2' a3' a4' a5' a6' a7' a8' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 609 "lib/Libsodium.chs" #-}

crypto_pwhash_str_alg :: (out ::: Ptr CChar) -> (passwd ::: Ptr CChar) -> (passwdlen ::: CULLong) -> (opslimit ::: CULLong) -> (memlimit ::: CSize) -> (alg ::: CInt) -> IO ((CInt))
crypto_pwhash_str_alg a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  crypto_pwhash_str_alg'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 610 "lib/Libsodium.chs" #-}

crypto_pwhash_str_needs_rehash :: (str ::: Ptr CChar) -> (opslimit ::: CULLong) -> (memlimit ::: CSize) -> IO ((CInt))
crypto_pwhash_str_needs_rehash a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_pwhash_str_needs_rehash'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 611 "lib/Libsodium.chs" #-}

crypto_pwhash_str :: (out ::: Ptr CChar) -> (passwd ::: Ptr CChar) -> (passwdlen ::: CULLong) -> (opslimit ::: CULLong) -> (memlimit ::: CSize) -> IO ((CInt))
crypto_pwhash_str a1 a2 a3 a4 a5 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  crypto_pwhash_str'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 612 "lib/Libsodium.chs" #-}

crypto_pwhash_str_verify :: (str ::: Ptr CChar) -> (passwd ::: Ptr CChar) -> (passwdlen ::: CULLong) -> IO ((CInt))
crypto_pwhash_str_verify a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_pwhash_str_verify'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 613 "lib/Libsodium.chs" #-}


crypto_pwhash_scryptsalsa208sha256_ll :: (passwd ::: Ptr Word8) -> (passwdlen ::: CSize) -> (salt ::: Ptr Word8) -> (saltlen ::: CSize) -> (n ::: Word64) -> (r ::: Word32) -> (p ::: Word32) -> (buf ::: Ptr Word8) -> (buflen ::: CSize) -> IO ((CInt))
crypto_pwhash_scryptsalsa208sha256_ll a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  let {a8' = id a8} in
  let {a9' = id a9} in
  crypto_pwhash_scryptsalsa208sha256_ll'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 615 "lib/Libsodium.chs" #-}

crypto_pwhash_scryptsalsa208sha256 :: (out ::: Ptr CUChar) -> (outlen ::: CULLong) -> (passwd ::: Ptr CChar) -> (passwdlen ::: CULLong) -> (salt ::: Ptr CUChar) -> (opslimit ::: CULLong) -> (memlimit ::: CSize) -> IO ((CInt))
crypto_pwhash_scryptsalsa208sha256 a1 a2 a3 a4 a5 a6 a7 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  let {a7' = id a7} in
  crypto_pwhash_scryptsalsa208sha256'_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 616 "lib/Libsodium.chs" #-}

crypto_pwhash_scryptsalsa208sha256_str_needs_rehash :: (str ::: Ptr CChar) -> (opslimit ::: CULLong) -> (memlimit ::: CSize) -> IO ((CInt))
crypto_pwhash_scryptsalsa208sha256_str_needs_rehash a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_pwhash_scryptsalsa208sha256_str_needs_rehash'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 617 "lib/Libsodium.chs" #-}

crypto_pwhash_scryptsalsa208sha256_str :: (out ::: Ptr CChar) -> (passwd ::: Ptr CChar) -> (passwdlen ::: CULLong) -> (opslimit ::: CULLong) -> (memlimit ::: CSize) -> IO ((CInt))
crypto_pwhash_scryptsalsa208sha256_str a1 a2 a3 a4 a5 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  crypto_pwhash_scryptsalsa208sha256_str'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 618 "lib/Libsodium.chs" #-}

crypto_pwhash_scryptsalsa208sha256_str_verify :: (str ::: Ptr CChar) -> (passwd ::: Ptr CChar) -> (passwdlen ::: CULLong) -> IO ((CInt))
crypto_pwhash_scryptsalsa208sha256_str_verify a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_pwhash_scryptsalsa208sha256_str_verify'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 619 "lib/Libsodium.chs" #-}


crypto_scalarmult_curve25519_base :: (q ::: Ptr CUChar) -> (n ::: Ptr CUChar) -> IO ((CInt))
crypto_scalarmult_curve25519_base a1 a2 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  crypto_scalarmult_curve25519_base'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 621 "lib/Libsodium.chs" #-}

crypto_scalarmult_curve25519 :: (q ::: Ptr CUChar) -> (n ::: Ptr CUChar) -> (p ::: Ptr CUChar) -> IO ((CInt))
crypto_scalarmult_curve25519 a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_scalarmult_curve25519'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 622 "lib/Libsodium.chs" #-}

crypto_scalarmult_ed25519_base_noclamp :: (q ::: Ptr CUChar) -> (n ::: Ptr CUChar) -> IO ((CInt))
crypto_scalarmult_ed25519_base_noclamp a1 a2 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  crypto_scalarmult_ed25519_base_noclamp'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 623 "lib/Libsodium.chs" #-}

crypto_scalarmult_ed25519_base :: (q ::: Ptr CUChar) -> (n ::: Ptr CUChar) -> IO ((CInt))
crypto_scalarmult_ed25519_base a1 a2 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  crypto_scalarmult_ed25519_base'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 624 "lib/Libsodium.chs" #-}

crypto_scalarmult_ed25519_noclamp :: (q ::: Ptr CUChar) -> (n ::: Ptr CUChar) -> (p ::: Ptr CUChar) -> IO ((CInt))
crypto_scalarmult_ed25519_noclamp a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_scalarmult_ed25519_noclamp'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 625 "lib/Libsodium.chs" #-}

crypto_scalarmult_ed25519 :: (q ::: Ptr CUChar) -> (n ::: Ptr CUChar) -> (p ::: Ptr CUChar) -> IO ((CInt))
crypto_scalarmult_ed25519 a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_scalarmult_ed25519'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 626 "lib/Libsodium.chs" #-}


crypto_scalarmult_base :: (q ::: Ptr CUChar) -> (n ::: Ptr CUChar) -> IO ((CInt))
crypto_scalarmult_base a1 a2 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  crypto_scalarmult_base'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 628 "lib/Libsodium.chs" #-}

crypto_scalarmult :: (q ::: Ptr CUChar) -> (n ::: Ptr CUChar) -> (p ::: Ptr CUChar) -> IO ((CInt))
crypto_scalarmult a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_scalarmult'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 629 "lib/Libsodium.chs" #-}


crypto_scalarmult_ristretto255_base :: (q ::: Ptr CUChar) -> (n ::: Ptr CUChar) -> IO ((CInt))
crypto_scalarmult_ristretto255_base a1 a2 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  crypto_scalarmult_ristretto255_base'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 631 "lib/Libsodium.chs" #-}

crypto_scalarmult_ristretto255 :: (q ::: Ptr CUChar) -> (n ::: Ptr CUChar) -> (p ::: Ptr CUChar) -> IO ((CInt))
crypto_scalarmult_ristretto255 a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  crypto_scalarmult_ristretto255'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 632 "lib/Libsodium.chs" #-}


crypto_secretbox_detached :: (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_secretbox_detached a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  crypto_secretbox_detached'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 634 "lib/Libsodium.chs" #-}

crypto_secretbox_easy :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_secretbox_easy a1 a2 a3 a4 a5 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  crypto_secretbox_easy'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 635 "lib/Libsodium.chs" #-}

crypto_secretbox_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_secretbox_keygen a1 =
  let {a1' = id a1} in
  crypto_secretbox_keygen'_ a1' >>
  return ()

{-# LINE 636 "lib/Libsodium.chs" #-}

crypto_secretbox_open_detached :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_secretbox_open_detached a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  crypto_secretbox_open_detached'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 637 "lib/Libsodium.chs" #-}

crypto_secretbox_open_easy :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_secretbox_open_easy a1 a2 a3 a4 a5 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  crypto_secretbox_open_easy'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 638 "lib/Libsodium.chs" #-}

crypto_secretbox_open :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_secretbox_open a1 a2 a3 a4 a5 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  crypto_secretbox_open'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 639 "lib/Libsodium.chs" #-}

crypto_secretbox :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_secretbox a1 a2 a3 a4 a5 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  crypto_secretbox'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 640 "lib/Libsodium.chs" #-}


crypto_secretbox_xchacha20poly1305_detached :: (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_secretbox_xchacha20poly1305_detached a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  let {a6' = id a6} in
  crypto_secretbox_xchacha20poly1305_detached'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 642 "lib/Libsodium.chs" #-}

crypto_secretbox_xchacha20poly1305_easy :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_secretbox_xchacha20poly1305_easy a1 a2 a3 a4 a5 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  let {a3' = id a3} in
  let {a4' = id a4} in
  let {a5' = id a5} in
  crypto_secretbox_xchacha20poly1305_easy'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 643 "lib/Libsodium.chs" #-}

crypto_secretbox_xchacha20poly1305_open_detached :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (clen ::: CULLong