    -- |
    -- Module      :  Cryptol.Eval.What4
    -- Copyright   :  (c) 2020 Galois, Inc.
    -- License     :  BSD3
    -- Maintainer  :  cryptol@galois.com

    {-# LANGUAGE BlockArguments #-}
    {-# LANGUAGE DataKinds #-}
    {-# LANGUAGE FlexibleContexts #-}
    {-# LANGUAGE LambdaCase #-}
    {-# LANGUAGE GADTs #-}
    {-# LANGUAGE MultiWayIf #-}
    {-# LANGUAGE RankNTypes #-}
    {-# LANGUAGE ScopedTypeVariables #-}
    {-# LANGUAGE TypeApplications #-}
    {-# LANGUAGE TypeOperators #-}
    {-# LANGUAGE ViewPatterns #-}
    {-# LANGUAGE OverloadedStrings #-}
    module Cryptol.Eval.What4
      ( Value
      , primTable
      ) where

    import qualified Control.Exception as X
    import           Control.Concurrent.MVar
    import           Control.Monad (foldM)
    import           Control.Monad.IO.Class

    import qualified Data.Map as Map
    import qualified Data.Set as Set
    import           Data.Text (Text)
    import qualified Data.Text as Text
    import           Data.Parameterized.Context
    import           Data.Parameterized.TraversableFC
    import           Data.Parameterized.Some
    import qualified Data.BitVector.Sized as BV

    import qualified What4.Interface as W4
    import qualified What4.SWord as SW
    import qualified What4.Utils.AbstractDomains as W4

    import Cryptol.Backend
    import Cryptol.Backend.Monad ( EvalError(..), Unsupported(..) )
    import Cryptol.Backend.SeqMap
    import Cryptol.Backend.WordValue
    import Cryptol.Backend.What4

    import Cryptol.Eval.Generic
    import Cryptol.Eval.Prims
    import Cryptol.Eval.Type (TValue(..))
    import Cryptol.Eval.Value

    import qualified Cryptol.SHA as SHA

    import Cryptol.TypeCheck.Solver.InfNat( Nat'(..) )

    import Cryptol.Utils.Ident
    import Cryptol.Utils.Panic
    import Cryptol.Utils.RecordMap

    type Value sym = GenValue (What4 sym)

    -- See also Cryptol.Prims.Eval.primTable
    primTable :: W4.IsSymExprBuilder sym => What4 sym -> IO EvalOpts -> Map.Map PrimIdent (Prim (What4 sym))
    primTable :: forall sym.
    IsSymExprBuilder sym =>
    What4 sym -> IO EvalOpts -> Map PrimIdent (Prim (What4 sym))
    primTable What4 sym
    sym IO EvalOpts
    getEOpts =
      Map PrimIdent (Prim (What4 sym))
    -> Map PrimIdent (Prim (What4 sym))
    -> Map PrimIdent (Prim (What4 sym))
    forall k a. Ord k => Map k a -> Map k a -> Map k a
    Map.union (What4 sym -> Map PrimIdent (Prim (What4 sym))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym -> Map PrimIdent (Prim (What4 sym))
    suiteBPrims What4 sym
    sym) (Map PrimIdent (Prim (What4 sym))
     -> Map PrimIdent (Prim (What4 sym)))
    -> Map PrimIdent (Prim (What4 sym))
    -> Map PrimIdent (Prim (What4 sym))
    forall a b. (a -> b) -> a -> b
    $
      Map PrimIdent (Prim (What4 sym))
    -> Map PrimIdent (Prim (What4 sym))
    -> Map PrimIdent (Prim (What4 sym))
    forall k a. Ord k => Map k a -> Map k a -> Map k a
    Map.union (What4 sym -> Map PrimIdent (Prim (What4 sym))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym -> Map PrimIdent (Prim (What4 sym))
    primeECPrims What4 sym
    sym) (Map PrimIdent (Prim (What4 sym))
     -> Map PrimIdent (Prim (What4 sym)))
    -> Map PrimIdent (Prim (What4 sym))
    -> Map PrimIdent (Prim (What4 sym))
    forall a b. (a -> b) -> a -> b
    $
      Map PrimIdent (Prim (What4 sym))
    -> Map PrimIdent (Prim (What4 sym))
    -> Map PrimIdent (Prim (What4 sym))
    forall k a. Ord k => Map k a -> Map k a -> Map k a
    Map.union (What4 sym -> Map PrimIdent (Prim (What4 sym))
    forall sym. Backend sym => sym -> Map PrimIdent (Prim sym)
    genericFloatTable What4 sym
    sym) (Map PrimIdent (Prim (What4 sym))
     -> Map PrimIdent (Prim (What4 sym)))
    -> Map PrimIdent (Prim (What4 sym))
    -> Map PrimIdent (Prim (What4 sym))
    forall a b. (a -> b) -> a -> b
    $
      Map PrimIdent (Prim (What4 sym))
    -> Map PrimIdent (Prim (What4 sym))
    -> Map PrimIdent (Prim (What4 sym))
    forall k a. Ord k => Map k a -> Map k a -> Map k a
    Map.union (What4 sym -> IO EvalOpts -> Map PrimIdent (Prim (What4 sym))
    forall sym.
    Backend sym =>
    sym -> IO EvalOpts -> Map PrimIdent (Prim sym)
    genericPrimTable What4 sym
    sym IO EvalOpts
    getEOpts) (Map PrimIdent (Prim (What4 sym))
     -> Map PrimIdent (Prim (What4 sym)))
    -> Map PrimIdent (Prim (What4 sym))
    -> Map PrimIdent (Prim (What4 sym))
    forall a b. (a -> b) -> a -> b
    $

      [(PrimIdent, Prim (What4 sym))] -> Map PrimIdent (Prim (What4 sym))
    forall k a. Ord k => [(k, a)] -> Map k a
    Map.fromList ([(PrimIdent, Prim (What4 sym))]
     -> Map PrimIdent (Prim (What4 sym)))
    -> [(PrimIdent, Prim (What4 sym))]
    -> Map PrimIdent (Prim (What4 sym))
    forall a b. (a -> b) -> a -> b
    $ ((Text, Prim (What4 sym)) -> (PrimIdent, Prim (What4 sym)))
    -> [(Text, Prim (What4 sym))] -> [(PrimIdent, Prim (What4 sym))]
    forall a b. (a -> b) -> [a] -> [b]
    map (\(Text
    n, Prim (What4 sym)
    v) -> (Text -> PrimIdent
    prelPrim Text
    n, Prim (What4 sym)
    v))

      [ -- Indexing and updates
        (Text
    "@"           , What4 sym
    -> IndexDirection
    -> (Nat'
        -> TValue
        -> SeqMap (What4 sym) (GenValue (What4 sym))
        -> TValue
        -> SInteger (What4 sym)
        -> SEval (What4 sym) (GenValue (What4 sym)))
    -> (Nat'
        -> TValue
        -> SeqMap (What4 sym) (GenValue (What4 sym))
        -> TValue
        -> Integer
        -> [IndexSegment (What4 sym)]
        -> SEval (What4 sym) (GenValue (What4 sym)))
    -> Prim (What4 sym)
    forall sym.
    Backend sym =>
    sym
    -> IndexDirection
    -> (Nat'
        -> TValue
        -> SeqMap sym (GenValue sym)
        -> TValue
        -> SInteger sym
        -> SEval sym (GenValue sym))
    -> (Nat'
        -> TValue
        -> SeqMap sym (GenValue sym)
        -> TValue
        -> Integer
        -> [IndexSegment sym]
        -> SEval sym (GenValue sym))
    -> Prim sym
    indexPrim What4 sym
    sym IndexDirection
    IndexForward  (What4 sym
    -> Nat'
    -> TValue
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> TValue
    -> SInteger (What4 sym)
    -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> Nat'
    -> TValue
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> TValue
    -> SInteger (What4 sym)
    -> SEval (What4 sym) (GenValue (What4 sym))
    indexFront_int What4 sym
    sym) (What4 sym
    -> Nat'
    -> TValue
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> TValue
    -> Integer
    -> [IndexSegment (What4 sym)]
    -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> Nat'
    -> TValue
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> TValue
    -> Integer
    -> [IndexSegment (What4 sym)]
    -> SEval (What4 sym) (GenValue (What4 sym))
    indexFront_segs What4 sym
    sym))
      , (Text
    "!"           , What4 sym
    -> IndexDirection
    -> (Nat'
        -> TValue
        -> SeqMap (What4 sym) (GenValue (What4 sym))
        -> TValue
        -> SInteger (What4 sym)
        -> SEval (What4 sym) (GenValue (What4 sym)))
    -> (Nat'
        -> TValue
        -> SeqMap (What4 sym) (GenValue (What4 sym))
        -> TValue
        -> Integer
        -> [IndexSegment (What4 sym)]
        -> SEval (What4 sym) (GenValue (What4 sym)))
    -> Prim (What4 sym)
    forall sym.
    Backend sym =>
    sym
    -> IndexDirection
    -> (Nat'
        -> TValue
        -> SeqMap sym (GenValue sym)
        -> TValue
        -> SInteger sym
        -> SEval sym (GenValue sym))
    -> (Nat'
        -> TValue
        -> SeqMap sym (GenValue sym)
        -> TValue
        -> Integer
        -> [IndexSegment sym]
        -> SEval sym (GenValue sym))
    -> Prim sym
    indexPrim What4 sym
    sym IndexDirection
    IndexBackward (What4 sym
    -> Nat'
    -> TValue
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> TValue
    -> SInteger (What4 sym)
    -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> Nat'
    -> TValue
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> TValue
    -> SInteger (What4 sym)
    -> SEval (What4 sym) (GenValue (What4 sym))
    indexFront_int What4 sym
    sym) (What4 sym
    -> Nat'
    -> TValue
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> TValue
    -> Integer
    -> [IndexSegment (What4 sym)]
    -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> Nat'
    -> TValue
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> TValue
    -> Integer
    -> [IndexSegment (What4 sym)]
    -> SEval (What4 sym) (GenValue (What4 sym))
    indexFront_segs What4 sym
    sym))

      , (Text
    "update"      , What4 sym
    -> (Nat'
        -> TValue
        -> WordValue (What4 sym)
        -> Either (SInteger (What4 sym)) (WordValue (What4 sym))
        -> SEval (What4 sym) (GenValue (What4 sym))
        -> SEval (What4 sym) (WordValue (What4 sym)))
    -> (Nat'
        -> TValue
        -> SeqMap (What4 sym) (GenValue (What4 sym))
        -> Either (SInteger (What4 sym)) (WordValue (What4 sym))
        -> SEval (What4 sym) (GenValue (What4 sym))
        -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym))))
    -> Prim (What4 sym)
    forall sym.
    Backend sym =>
    sym
    -> (Nat'
        -> TValue
        -> WordValue sym
        -> Either (SInteger sym) (WordValue sym)
        -> SEval sym (GenValue sym)
        -> SEval sym (WordValue sym))
    -> (Nat'
        -> TValue
        -> SeqMap sym (GenValue sym)
        -> Either (SInteger sym) (WordValue sym)
        -> SEval sym (GenValue sym)
        -> SEval sym (SeqMap sym (GenValue sym)))
    -> Prim sym
    updatePrim What4 sym
    sym (What4 sym
    -> Nat'
    -> TValue
    -> WordValue (What4 sym)
    -> Either (SInteger (What4 sym)) (WordValue (What4 sym))
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (WordValue (What4 sym))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> Nat'
    -> TValue
    -> WordValue (What4 sym)
    -> Either (SInteger (What4 sym)) (WordValue (What4 sym))
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (WordValue (What4 sym))
    updateFrontSym_word What4 sym
    sym) (What4 sym
    -> Nat'
    -> TValue
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Either (SInteger (What4 sym)) (WordValue (What4 sym))
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym)))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> Nat'
    -> TValue
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Either (SInteger (What4 sym)) (WordValue (What4 sym))
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym)))
    updateFrontSym What4 sym
    sym))
      , (Text
    "updateEnd"   , What4 sym
    -> (Nat'
        -> TValue
        -> WordValue (What4 sym)
        -> Either (SInteger (What4 sym)) (WordValue (What4 sym))
        -> SEval (What4 sym) (GenValue (What4 sym))
        -> SEval (What4 sym) (WordValue (What4 sym)))
    -> (Nat'
        -> TValue
        -> SeqMap (What4 sym) (GenValue (What4 sym))
        -> Either (SInteger (What4 sym)) (WordValue (What4 sym))
        -> SEval (What4 sym) (GenValue (What4 sym))
        -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym))))
    -> Prim (What4 sym)
    forall sym.
    Backend sym =>
    sym
    -> (Nat'
        -> TValue
        -> WordValue sym
        -> Either (SInteger sym) (WordValue sym)
        -> SEval sym (GenValue sym)
        -> SEval sym (WordValue sym))
    -> (Nat'
        -> TValue
        -> SeqMap sym (GenValue sym)
        -> Either (SInteger sym) (WordValue sym)
        -> SEval sym (GenValue sym)
        -> SEval sym (SeqMap sym (GenValue sym)))
    -> Prim sym
    updatePrim What4 sym
    sym (What4 sym
    -> Nat'
    -> TValue
    -> WordValue (What4 sym)
    -> Either (SInteger (What4 sym)) (WordValue (What4 sym))
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (WordValue (What4 sym))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> Nat'
    -> TValue
    -> WordValue (What4 sym)
    -> Either (SInteger (What4 sym)) (WordValue (What4 sym))
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (WordValue (What4 sym))
    updateBackSym_word What4 sym
    sym)  (What4 sym
    -> Nat'
    -> TValue
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Either (SInteger (What4 sym)) (WordValue (What4 sym))
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym)))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> Nat'
    -> TValue
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Either (SInteger (What4 sym)) (WordValue (What4 sym))
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym)))
    updateBackSym What4 sym
    sym))

      ]

    primeECPrims :: W4.IsSymExprBuilder sym => What4 sym -> Map.Map PrimIdent (Prim (What4 sym))
    primeECPrims :: forall sym.
    IsSymExprBuilder sym =>
    What4 sym -> Map PrimIdent (Prim (What4 sym))
    primeECPrims What4 sym
    sym = [(PrimIdent, Prim (What4 sym))] -> Map PrimIdent (Prim (What4 sym))
    forall k a. Ord k => [(k, a)] -> Map k a
    Map.fromList ([(PrimIdent, Prim (What4 sym))]
     -> Map PrimIdent (Prim (What4 sym)))
    -> [(PrimIdent, Prim (What4 sym))]
    -> Map PrimIdent (Prim (What4 sym))
    forall a b. (a -> b) -> a -> b
    $ [ (Text -> PrimIdent
    primeECPrim Text
    n, Prim (What4 sym)
    v) | (Text
    n,Prim (What4 sym)
    v) <- [(Text, Prim (What4 sym))]
    prims ]
     where
     ~> :: a -> b -> (a, b)
    (~>) = (,)

     prims :: [(Text, Prim (What4 sym))]
    prims =
      [ -- {p} (prime p, p > 3) => ProjectivePoint p -> ProjectivePoint p
        Text
    "ec_double" Text -> Prim (What4 sym) -> (Text, Prim (What4 sym))
    forall a b. a -> b -> (a, b)
    ~>
          (Integer -> Prim (What4 sym)) -> Prim (What4 sym)
    forall sym. (Integer -> Prim sym) -> Prim sym
    PFinPoly \Integer
    p ->
          (SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym))
    -> Prim (What4 sym)
    forall sym. (SEval sym (GenValue sym) -> Prim sym) -> Prim sym
    PFun     \SEval (What4 sym) (GenValue (What4 sym))
    s ->
          SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym)
    forall sym. SEval sym (GenValue sym) -> Prim sym
    PPrim
             do SymExpr sym BaseIntegerType
    p' <- What4 sym -> Integer -> SEval (What4 sym) (SInteger (What4 sym))
    forall sym.
    Backend sym =>
    sym -> Integer -> SEval sym (SInteger sym)
    integerLit What4 sym
    sym Integer
    p
                SymExpr sym ProjectivePoint
    s' <- What4 sym
    -> GenValue (What4 sym)
    -> SEval (What4 sym) (SymExpr sym ProjectivePoint)
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> Value sym -> SEval (What4 sym) (SymExpr sym ProjectivePoint)
    toProjectivePoint What4 sym
    sym (GenValue (What4 sym) -> W4Eval sym (SymExpr sym ProjectivePoint))
    -> W4Eval sym (GenValue (What4 sym))
    -> W4Eval sym (SymExpr sym ProjectivePoint)
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    s
                What4 sym -> Text -> W4Eval sym ()
    forall (m :: * -> *) sym. MonadIO m => What4 sym -> Text -> m ()
    addUninterpWarning What4 sym
    sym Text
    "Prime ECC"
                SymFn
      sym
      ((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
      ProjectivePoint
    fn <- IO
      (SymFn
         sym
         ((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
         ProjectivePoint)
    -> W4Eval
         sym
         (SymFn
            sym
            ((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
            ProjectivePoint)
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO
       (SymFn
          sym
          ((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
          ProjectivePoint)
     -> W4Eval
          sym
          (SymFn
             sym
             ((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
             ProjectivePoint))
    -> IO
         (SymFn
            sym
            ((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
            ProjectivePoint)
    -> W4Eval
         sym
         (SymFn
            sym
            ((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
            ProjectivePoint)
    forall a b. (a -> b) -> a -> b
    $ What4 sym
    -> Text
    -> Assignment
         BaseTypeRepr ((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
    -> BaseTypeRepr ProjectivePoint
    -> IO
         (SymFn
            sym
            ((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
            ProjectivePoint)
    forall sym (args :: Ctx BaseType) (ret :: BaseType).
    IsSymExprBuilder sym =>
    What4 sym
    -> Text
    -> Assignment BaseTypeRepr args
    -> BaseTypeRepr ret
    -> IO (SymFn sym args ret)
    getUninterpFn What4 sym
    sym Text
    "ec_double"
                                  (Assignment BaseTypeRepr EmptyCtx
    forall {k} (ctx :: Ctx k) (f :: k -> *).
    (ctx ~ EmptyCtx) =>
    Assignment f ctx
    Empty Assignment BaseTypeRepr EmptyCtx
    -> BaseTypeRepr BaseIntegerType
    -> Assignment BaseTypeRepr (EmptyCtx ::> BaseIntegerType)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> BaseTypeRepr BaseIntegerType
    W4.BaseIntegerRepr Assignment BaseTypeRepr (EmptyCtx ::> BaseIntegerType)
    -> BaseTypeRepr ProjectivePoint
    -> Assignment
         BaseTypeRepr ((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> BaseTypeRepr ProjectivePoint
    projectivePointRepr) BaseTypeRepr ProjectivePoint
    projectivePointRepr
                SymExpr sym ProjectivePoint
    z  <- IO (SymExpr sym ProjectivePoint)
    -> W4Eval sym (SymExpr sym ProjectivePoint)
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (SymExpr sym ProjectivePoint)
     -> W4Eval sym (SymExpr sym ProjectivePoint))
    -> IO (SymExpr sym ProjectivePoint)
    -> W4Eval sym (SymExpr sym ProjectivePoint)
    forall a b. (a -> b) -> a -> b
    $ sym
    -> SymFn
         sym
         ((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
         ProjectivePoint
    -> Assignment
         (SymExpr sym) ((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
    -> IO (SymExpr sym ProjectivePoint)
    forall sym (args :: Ctx BaseType) (ret :: BaseType).
    IsSymExprBuilder sym =>
    sym
    -> SymFn sym args ret
    -> Assignment (SymExpr sym) args
    -> IO (SymExpr sym ret)
    forall (args :: Ctx BaseType) (ret :: BaseType).
    sym
    -> SymFn sym args ret
    -> Assignment (SymExpr sym) args
    -> IO (SymExpr sym ret)
    W4.applySymFn (What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym) SymFn
      sym
      ((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
      ProjectivePoint
    fn (Assignment (SymExpr sym) EmptyCtx
    forall {k} (ctx :: Ctx k) (f :: k -> *).
    (ctx ~ EmptyCtx) =>
    Assignment f ctx
    Empty Assignment (SymExpr sym) EmptyCtx
    -> SymExpr sym BaseIntegerType
    -> Assignment (SymExpr sym) (EmptyCtx ::> BaseIntegerType)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym BaseIntegerType
    p' Assignment (SymExpr sym) (EmptyCtx ::> BaseIntegerType)
    -> SymExpr sym ProjectivePoint
    -> Assignment
         (SymExpr sym) ((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym ProjectivePoint
    s')
                What4 sym
    -> SymExpr sym ProjectivePoint
    -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> SymExpr sym ProjectivePoint -> SEval (What4 sym) (Value sym)
    fromProjectivePoint What4 sym
    sym SymExpr sym ProjectivePoint
    z

        -- {p} (prime p, p > 3) => ProjectivePoint p -> ProjectivePoint p -> ProjectivePoint p
      , Text
    "ec_add_nonzero" Text -> Prim (What4 sym) -> (Text, Prim (What4 sym))
    forall a b. a -> b -> (a, b)
    ~>
          (Integer -> Prim (What4 sym)) -> Prim (What4 sym)
    forall sym. (Integer -> Prim sym) -> Prim sym
    PFinPoly \Integer
    p ->
          (SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym))
    -> Prim (What4 sym)
    forall sym. (SEval sym (GenValue sym) -> Prim sym) -> Prim sym
    PFun     \SEval (What4 sym) (GenValue (What4 sym))
    s ->
          (SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym))
    -> Prim (What4 sym)
    forall sym. (SEval sym (GenValue sym) -> Prim sym) -> Prim sym
    PFun     \SEval (What4 sym) (GenValue (What4 sym))
    t ->
          SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym)
    forall sym. SEval sym (GenValue sym) -> Prim sym
    PPrim
             do SymExpr sym BaseIntegerType
    p' <- What4 sym -> Integer -> SEval (What4 sym) (SInteger (What4 sym))
    forall sym.
    Backend sym =>
    sym -> Integer -> SEval sym (SInteger sym)
    integerLit What4 sym
    sym Integer
    p
                SymExpr sym ProjectivePoint
    s' <- What4 sym
    -> GenValue (What4 sym)
    -> SEval (What4 sym) (SymExpr sym ProjectivePoint)
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> Value sym -> SEval (What4 sym) (SymExpr sym ProjectivePoint)
    toProjectivePoint What4 sym
    sym (GenValue (What4 sym) -> W4Eval sym (SymExpr sym ProjectivePoint))
    -> W4Eval sym (GenValue (What4 sym))
    -> W4Eval sym (SymExpr sym ProjectivePoint)
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    s
                SymExpr sym ProjectivePoint
    t' <- What4 sym
    -> GenValue (What4 sym)
    -> SEval (What4 sym) (SymExpr sym ProjectivePoint)
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> Value sym -> SEval (What4 sym) (SymExpr sym ProjectivePoint)
    toProjectivePoint What4 sym
    sym (GenValue (What4 sym) -> W4Eval sym (SymExpr sym ProjectivePoint))
    -> W4Eval sym (GenValue (What4 sym))
    -> W4Eval sym (SymExpr sym ProjectivePoint)
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    t
                What4 sym -> Text -> W4Eval sym ()
    forall (m :: * -> *) sym. MonadIO m => What4 sym -> Text -> m ()
    addUninterpWarning What4 sym
    sym Text
    "Prime ECC"
                SymFn
      sym
      (((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
       ::> ProjectivePoint)
      ProjectivePoint
    fn <- IO
      (SymFn
         sym
         (((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
          ::> ProjectivePoint)
         ProjectivePoint)
    -> W4Eval
         sym
         (SymFn
            sym
            (((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
             ::> ProjectivePoint)
            ProjectivePoint)
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO
       (SymFn
          sym
          (((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
           ::> ProjectivePoint)
          ProjectivePoint)
     -> W4Eval
          sym
          (SymFn
             sym
             (((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
              ::> ProjectivePoint)
             ProjectivePoint))
    -> IO
         (SymFn
            sym
            (((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
             ::> ProjectivePoint)
            ProjectivePoint)
    -> W4Eval
         sym
         (SymFn
            sym
            (((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
             ::> ProjectivePoint)
            ProjectivePoint)
    forall a b. (a -> b) -> a -> b
    $ What4 sym
    -> Text
    -> Assignment
         BaseTypeRepr
         (((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
          ::> ProjectivePoint)
    -> BaseTypeRepr ProjectivePoint
    -> IO
         (SymFn
            sym
            (((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
             ::> ProjectivePoint)
            ProjectivePoint)
    forall sym (args :: Ctx BaseType) (ret :: BaseType).
    IsSymExprBuilder sym =>
    What4 sym
    -> Text
    -> Assignment BaseTypeRepr args
    -> BaseTypeRepr ret
    -> IO (SymFn sym args ret)
    getUninterpFn What4 sym
    sym Text
    "ec_add_nonzero"
                                  (Assignment BaseTypeRepr EmptyCtx
    forall {k} (ctx :: Ctx k) (f :: k -> *).
    (ctx ~ EmptyCtx) =>
    Assignment f ctx
    Empty Assignment BaseTypeRepr EmptyCtx
    -> BaseTypeRepr BaseIntegerType
    -> Assignment BaseTypeRepr (EmptyCtx ::> BaseIntegerType)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> BaseTypeRepr BaseIntegerType
    W4.BaseIntegerRepr Assignment BaseTypeRepr (EmptyCtx ::> BaseIntegerType)
    -> BaseTypeRepr ProjectivePoint
    -> Assignment
         BaseTypeRepr ((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> BaseTypeRepr ProjectivePoint
    projectivePointRepr Assignment
      BaseTypeRepr ((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
    -> BaseTypeRepr ProjectivePoint
    -> Assignment
         BaseTypeRepr
         (((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
          ::> ProjectivePoint)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> BaseTypeRepr ProjectivePoint
    projectivePointRepr) BaseTypeRepr ProjectivePoint
    projectivePointRepr
                SymExpr sym ProjectivePoint
    z  <- IO (SymExpr sym ProjectivePoint)
    -> W4Eval sym (SymExpr sym ProjectivePoint)
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (SymExpr sym ProjectivePoint)
     -> W4Eval sym (SymExpr sym ProjectivePoint))
    -> IO (SymExpr sym ProjectivePoint)
    -> W4Eval sym (SymExpr sym ProjectivePoint)
    forall a b. (a -> b) -> a -> b
    $ sym
    -> SymFn
         sym
         (((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
          ::> ProjectivePoint)
         ProjectivePoint
    -> Assignment
         (SymExpr sym)
         (((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
          ::> ProjectivePoint)
    -> IO (SymExpr sym ProjectivePoint)
    forall sym (args :: Ctx BaseType) (ret :: BaseType).
    IsSymExprBuilder sym =>
    sym
    -> SymFn sym args ret
    -> Assignment (SymExpr sym) args
    -> IO (SymExpr sym ret)
    forall (args :: Ctx BaseType) (ret :: BaseType).
    sym
    -> SymFn sym args ret
    -> Assignment (SymExpr sym) args
    -> IO (SymExpr sym ret)
    W4.applySymFn (What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym) SymFn
      sym
      (((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
       ::> ProjectivePoint)
      ProjectivePoint
    fn (Assignment (SymExpr sym) EmptyCtx
    forall {k} (ctx :: Ctx k) (f :: k -> *).
    (ctx ~ EmptyCtx) =>
    Assignment f ctx
    Empty Assignment (SymExpr sym) EmptyCtx
    -> SymExpr sym BaseIntegerType
    -> Assignment (SymExpr sym) (EmptyCtx ::> BaseIntegerType)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym BaseIntegerType
    p' Assignment (SymExpr sym) (EmptyCtx ::> BaseIntegerType)
    -> SymExpr sym ProjectivePoint
    -> Assignment
         (SymExpr sym) ((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym ProjectivePoint
    s' Assignment
      (SymExpr sym) ((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
    -> SymExpr sym ProjectivePoint
    -> Assignment
         (SymExpr sym)
         (((EmptyCtx ::> BaseIntegerType) ::> ProjectivePoint)
          ::> ProjectivePoint)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym ProjectivePoint
    t')
                What4 sym
    -> SymExpr sym ProjectivePoint
    -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> SymExpr sym ProjectivePoint -> SEval (What4 sym) (Value sym)
    fromProjectivePoint What4 sym
    sym SymExpr sym ProjectivePoint
    z

        -- {p} (prime p, p > 3) => Z p -> ProjectivePoint p -> ProjectivePoint p
      , Text
    "ec_mult" Text -> Prim (What4 sym) -> (Text, Prim (What4 sym))
    forall a b. a -> b -> (a, b)
    ~>
          (Integer -> Prim (What4 sym)) -> Prim (What4 sym)
    forall sym. (Integer -> Prim sym) -> Prim sym
    PFinPoly \Integer
    p ->
          (SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym))
    -> Prim (What4 sym)
    forall sym. (SEval sym (GenValue sym) -> Prim sym) -> Prim sym
    PFun     \SEval (What4 sym) (GenValue (What4 sym))
    k ->
          (SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym))
    -> Prim (What4 sym)
    forall sym. (SEval sym (GenValue sym) -> Prim sym) -> Prim sym
    PFun     \SEval (What4 sym) (GenValue (What4 sym))
    s ->
          SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym)
    forall sym. SEval sym (GenValue sym) -> Prim sym
    PPrim
             do SymExpr sym BaseIntegerType
    p' <- What4 sym -> Integer -> SEval (What4 sym) (SInteger (What4 sym))
    forall sym.
    Backend sym =>
    sym -> Integer -> SEval sym (SInteger sym)
    integerLit What4 sym
    sym Integer
    p
                SymExpr sym BaseIntegerType
    k' <- GenValue (What4 sym) -> SymExpr sym BaseIntegerType
    GenValue (What4 sym) -> SInteger (What4 sym)
    forall sym. GenValue sym -> SInteger sym
    fromVInteger (GenValue (What4 sym) -> SymExpr sym BaseIntegerType)
    -> W4Eval sym (GenValue (What4 sym))
    -> W4Eval sym (SymExpr sym BaseIntegerType)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    k
                SymExpr sym ProjectivePoint
    s' <- What4 sym
    -> GenValue (What4 sym)
    -> SEval (What4 sym) (SymExpr sym ProjectivePoint)
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> Value sym -> SEval (What4 sym) (SymExpr sym ProjectivePoint)
    toProjectivePoint What4 sym
    sym (GenValue (What4 sym) -> W4Eval sym (SymExpr sym ProjectivePoint))
    -> W4Eval sym (GenValue (What4 sym))
    -> W4Eval sym (SymExpr sym ProjectivePoint)
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    s
                What4 sym -> Text -> W4Eval sym ()
    forall (m :: * -> *) sym. MonadIO m => What4 sym -> Text -> m ()
    addUninterpWarning What4 sym
    sym Text
    "Prime ECC"
                SymFn
      sym
      (((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
       ::> ProjectivePoint)
      ProjectivePoint
    fn <- IO
      (SymFn
         sym
         (((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
          ::> ProjectivePoint)
         ProjectivePoint)
    -> W4Eval
         sym
         (SymFn
            sym
            (((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
             ::> ProjectivePoint)
            ProjectivePoint)
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO
       (SymFn
          sym
          (((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
           ::> ProjectivePoint)
          ProjectivePoint)
     -> W4Eval
          sym
          (SymFn
             sym
             (((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
              ::> ProjectivePoint)
             ProjectivePoint))
    -> IO
         (SymFn
            sym
            (((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
             ::> ProjectivePoint)
            ProjectivePoint)
    -> W4Eval
         sym
         (SymFn
            sym
            (((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
             ::> ProjectivePoint)
            ProjectivePoint)
    forall a b. (a -> b) -> a -> b
    $ What4 sym
    -> Text
    -> Assignment
         BaseTypeRepr
         (((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
          ::> ProjectivePoint)
    -> BaseTypeRepr ProjectivePoint
    -> IO
         (SymFn
            sym
            (((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
             ::> ProjectivePoint)
            ProjectivePoint)
    forall sym (args :: Ctx BaseType) (ret :: BaseType).
    IsSymExprBuilder sym =>
    What4 sym
    -> Text
    -> Assignment BaseTypeRepr args
    -> BaseTypeRepr ret
    -> IO (SymFn sym args ret)
    getUninterpFn What4 sym
    sym Text
    "ec_mult"
                                  (Assignment BaseTypeRepr EmptyCtx
    forall {k} (ctx :: Ctx k) (f :: k -> *).
    (ctx ~ EmptyCtx) =>
    Assignment f ctx
    Empty Assignment BaseTypeRepr EmptyCtx
    -> BaseTypeRepr BaseIntegerType
    -> Assignment BaseTypeRepr (EmptyCtx ::> BaseIntegerType)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> BaseTypeRepr BaseIntegerType
    W4.BaseIntegerRepr Assignment BaseTypeRepr (EmptyCtx ::> BaseIntegerType)
    -> BaseTypeRepr BaseIntegerType
    -> Assignment
         BaseTypeRepr ((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> BaseTypeRepr BaseIntegerType
    W4.BaseIntegerRepr Assignment
      BaseTypeRepr ((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
    -> BaseTypeRepr ProjectivePoint
    -> Assignment
         BaseTypeRepr
         (((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
          ::> ProjectivePoint)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> BaseTypeRepr ProjectivePoint
    projectivePointRepr) BaseTypeRepr ProjectivePoint
    projectivePointRepr
                SymExpr sym ProjectivePoint
    z  <- IO (SymExpr sym ProjectivePoint)
    -> W4Eval sym (SymExpr sym ProjectivePoint)
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (SymExpr sym ProjectivePoint)
     -> W4Eval sym (SymExpr sym ProjectivePoint))
    -> IO (SymExpr sym ProjectivePoint)
    -> W4Eval sym (SymExpr sym ProjectivePoint)
    forall a b. (a -> b) -> a -> b
    $ sym
    -> SymFn
         sym
         (((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
          ::> ProjectivePoint)
         ProjectivePoint
    -> Assignment
         (SymExpr sym)
         (((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
          ::> ProjectivePoint)
    -> IO (SymExpr sym ProjectivePoint)
    forall sym (args :: Ctx BaseType) (ret :: BaseType).
    IsSymExprBuilder sym =>
    sym
    -> SymFn sym args ret
    -> Assignment (SymExpr sym) args
    -> IO (SymExpr sym ret)
    forall (args :: Ctx BaseType) (ret :: BaseType).
    sym
    -> SymFn sym args ret
    -> Assignment (SymExpr sym) args
    -> IO (SymExpr sym ret)
    W4.applySymFn (What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym) SymFn
      sym
      (((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
       ::> ProjectivePoint)
      ProjectivePoint
    fn (Assignment (SymExpr sym) EmptyCtx
    forall {k} (ctx :: Ctx k) (f :: k -> *).
    (ctx ~ EmptyCtx) =>
    Assignment f ctx
    Empty Assignment (SymExpr sym) EmptyCtx
    -> SymExpr sym BaseIntegerType
    -> Assignment (SymExpr sym) (EmptyCtx ::> BaseIntegerType)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym BaseIntegerType
    p' Assignment (SymExpr sym) (EmptyCtx ::> BaseIntegerType)
    -> SymExpr sym BaseIntegerType
    -> Assignment
         (SymExpr sym) ((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym BaseIntegerType
    k' Assignment
      (SymExpr sym) ((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
    -> SymExpr sym ProjectivePoint
    -> Assignment
         (SymExpr sym)
         (((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
          ::> ProjectivePoint)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym ProjectivePoint
    s')
                What4 sym
    -> SymExpr sym ProjectivePoint
    -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> SymExpr sym ProjectivePoint -> SEval (What4 sym) (Value sym)
    fromProjectivePoint What4 sym
    sym SymExpr sym ProjectivePoint
    z

        -- {p} (prime p, p > 3) => Z p -> ProjectivePoint p -> Z p -> ProjectivePoint p -> ProjectivePoint p
      , Text
    "ec_twin_mult" Text -> Prim (What4 sym) -> (Text, Prim (What4 sym))
    forall a b. a -> b -> (a, b)
    ~>
          (Integer -> Prim (What4 sym)) -> Prim (What4 sym)
    forall sym. (Integer -> Prim sym) -> Prim sym
    PFinPoly \Integer
    p ->
          (SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym))
    -> Prim (What4 sym)
    forall sym. (SEval sym (GenValue sym) -> Prim sym) -> Prim sym
    PFun     \SEval (What4 sym) (GenValue (What4 sym))
    j ->
          (SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym))
    -> Prim (What4 sym)
    forall sym. (SEval sym (GenValue sym) -> Prim sym) -> Prim sym
    PFun     \SEval (What4 sym) (GenValue (What4 sym))
    s ->
          (SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym))
    -> Prim (What4 sym)
    forall sym. (SEval sym (GenValue sym) -> Prim sym) -> Prim sym
    PFun     \SEval (What4 sym) (GenValue (What4 sym))
    k ->
          (SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym))
    -> Prim (What4 sym)
    forall sym. (SEval sym (GenValue sym) -> Prim sym) -> Prim sym
    PFun     \SEval (What4 sym) (GenValue (What4 sym))
    t ->
          SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym)
    forall sym. SEval sym (GenValue sym) -> Prim sym
    PPrim
             do SymExpr sym BaseIntegerType
    p' <- What4 sym -> Integer -> SEval (What4 sym) (SInteger (What4 sym))
    forall sym.
    Backend sym =>
    sym -> Integer -> SEval sym (SInteger sym)
    integerLit What4 sym
    sym Integer
    p
                SymExpr sym BaseIntegerType
    j' <- GenValue (What4 sym) -> SymExpr sym BaseIntegerType
    GenValue (What4 sym) -> SInteger (What4 sym)
    forall sym. GenValue sym -> SInteger sym
    fromVInteger (GenValue (What4 sym) -> SymExpr sym BaseIntegerType)
    -> W4Eval sym (GenValue (What4 sym))
    -> W4Eval sym (SymExpr sym BaseIntegerType)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    j
                SymExpr sym ProjectivePoint
    s' <- What4 sym
    -> GenValue (What4 sym)
    -> SEval (What4 sym) (SymExpr sym ProjectivePoint)
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> Value sym -> SEval (What4 sym) (SymExpr sym ProjectivePoint)
    toProjectivePoint What4 sym
    sym (GenValue (What4 sym) -> W4Eval sym (SymExpr sym ProjectivePoint))
    -> W4Eval sym (GenValue (What4 sym))
    -> W4Eval sym (SymExpr sym ProjectivePoint)
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    s
                SymExpr sym BaseIntegerType
    k' <- GenValue (What4 sym) -> SymExpr sym BaseIntegerType
    GenValue (What4 sym) -> SInteger (What4 sym)
    forall sym. GenValue sym -> SInteger sym
    fromVInteger (GenValue (What4 sym) -> SymExpr sym BaseIntegerType)
    -> W4Eval sym (GenValue (What4 sym))
    -> W4Eval sym (SymExpr sym BaseIntegerType)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    k
                SymExpr sym ProjectivePoint
    t' <- What4 sym
    -> GenValue (What4 sym)
    -> SEval (What4 sym) (SymExpr sym ProjectivePoint)
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> Value sym -> SEval (What4 sym) (SymExpr sym ProjectivePoint)
    toProjectivePoint What4 sym
    sym (GenValue (What4 sym) -> W4Eval sym (SymExpr sym ProjectivePoint))
    -> W4Eval sym (GenValue (What4 sym))
    -> W4Eval sym (SymExpr sym ProjectivePoint)
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    t
                What4 sym -> Text -> W4Eval sym ()
    forall (m :: * -> *) sym. MonadIO m => What4 sym -> Text -> m ()
    addUninterpWarning What4 sym
    sym Text
    "Prime ECC"
                SymFn
      sym
      (((((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
         ::> ProjectivePoint)
        ::> BaseIntegerType)
       ::> ProjectivePoint)
      ProjectivePoint
    fn <- IO
      (SymFn
         sym
         (((((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
            ::> ProjectivePoint)
           ::> BaseIntegerType)
          ::> ProjectivePoint)
         ProjectivePoint)
    -> W4Eval
         sym
         (SymFn
            sym
            (((((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
               ::> ProjectivePoint)
              ::> BaseIntegerType)
             ::> ProjectivePoint)
            ProjectivePoint)
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO
       (SymFn
          sym
          (((((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
             ::> ProjectivePoint)
            ::> BaseIntegerType)
           ::> ProjectivePoint)
          ProjectivePoint)
     -> W4Eval
          sym
          (SymFn
             sym
             (((((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
                ::> ProjectivePoint)
               ::> BaseIntegerType)
              ::> ProjectivePoint)
             ProjectivePoint))
    -> IO
         (SymFn
            sym
            (((((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
               ::> ProjectivePoint)
              ::> BaseIntegerType)
             ::> ProjectivePoint)
            ProjectivePoint)
    -> W4Eval
         sym
         (SymFn
            sym
            (((((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
               ::> ProjectivePoint)
              ::> BaseIntegerType)
             ::> ProjectivePoint)
            ProjectivePoint)
    forall a b. (a -> b) -> a -> b
    $ What4 sym
    -> Text
    -> Assignment
         BaseTypeRepr
         (((((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
            ::> ProjectivePoint)
           ::> BaseIntegerType)
          ::> ProjectivePoint)
    -> BaseTypeRepr ProjectivePoint
    -> IO
         (SymFn
            sym
            (((((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
               ::> ProjectivePoint)
              ::> BaseIntegerType)
             ::> ProjectivePoint)
            ProjectivePoint)
    forall sym (args :: Ctx BaseType) (ret :: BaseType).
    IsSymExprBuilder sym =>
    What4 sym
    -> Text
    -> Assignment BaseTypeRepr args
    -> BaseTypeRepr ret
    -> IO (SymFn sym args ret)
    getUninterpFn What4 sym
    sym Text
    "ec_twin_mult"
                                  (Assignment BaseTypeRepr EmptyCtx
    forall {k} (ctx :: Ctx k) (f :: k -> *).
    (ctx ~ EmptyCtx) =>
    Assignment f ctx
    Empty Assignment BaseTypeRepr EmptyCtx
    -> BaseTypeRepr BaseIntegerType
    -> Assignment BaseTypeRepr (EmptyCtx ::> BaseIntegerType)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> BaseTypeRepr BaseIntegerType
    W4.BaseIntegerRepr Assignment BaseTypeRepr (EmptyCtx ::> BaseIntegerType)
    -> BaseTypeRepr BaseIntegerType
    -> Assignment
         BaseTypeRepr ((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> BaseTypeRepr BaseIntegerType
    W4.BaseIntegerRepr Assignment
      BaseTypeRepr ((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
    -> BaseTypeRepr ProjectivePoint
    -> Assignment
         BaseTypeRepr
         (((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
          ::> ProjectivePoint)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> BaseTypeRepr ProjectivePoint
    projectivePointRepr Assignment
      BaseTypeRepr
      (((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
       ::> ProjectivePoint)
    -> BaseTypeRepr BaseIntegerType
    -> Assignment
         BaseTypeRepr
         ((((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
           ::> ProjectivePoint)
          ::> BaseIntegerType)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :>
                                                                  BaseTypeRepr BaseIntegerType
    W4.BaseIntegerRepr Assignment
      BaseTypeRepr
      ((((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
        ::> ProjectivePoint)
       ::> BaseIntegerType)
    -> BaseTypeRepr ProjectivePoint
    -> Assignment
         BaseTypeRepr
         (((((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
            ::> ProjectivePoint)
           ::> BaseIntegerType)
          ::> ProjectivePoint)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> BaseTypeRepr ProjectivePoint
    projectivePointRepr)
                                  BaseTypeRepr ProjectivePoint
    projectivePointRepr
                SymExpr sym ProjectivePoint
    z  <- IO (SymExpr sym ProjectivePoint)
    -> W4Eval sym (SymExpr sym ProjectivePoint)
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (SymExpr sym ProjectivePoint)
     -> W4Eval sym (SymExpr sym ProjectivePoint))
    -> IO (SymExpr sym ProjectivePoint)
    -> W4Eval sym (SymExpr sym ProjectivePoint)
    forall a b. (a -> b) -> a -> b
    $ sym
    -> SymFn
         sym
         (((((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
            ::> ProjectivePoint)
           ::> BaseIntegerType)
          ::> ProjectivePoint)
         ProjectivePoint
    -> Assignment
         (SymExpr sym)
         (((((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
            ::> ProjectivePoint)
           ::> BaseIntegerType)
          ::> ProjectivePoint)
    -> IO (SymExpr sym ProjectivePoint)
    forall sym (args :: Ctx BaseType) (ret :: BaseType).
    IsSymExprBuilder sym =>
    sym
    -> SymFn sym args ret
    -> Assignment (SymExpr sym) args
    -> IO (SymExpr sym ret)
    forall (args :: Ctx BaseType) (ret :: BaseType).
    sym
    -> SymFn sym args ret
    -> Assignment (SymExpr sym) args
    -> IO (SymExpr sym ret)
    W4.applySymFn (What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym) SymFn
      sym
      (((((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
         ::> ProjectivePoint)
        ::> BaseIntegerType)
       ::> ProjectivePoint)
      ProjectivePoint
    fn (Assignment (SymExpr sym) EmptyCtx
    forall {k} (ctx :: Ctx k) (f :: k -> *).
    (ctx ~ EmptyCtx) =>
    Assignment f ctx
    Empty Assignment (SymExpr sym) EmptyCtx
    -> SymExpr sym BaseIntegerType
    -> Assignment (SymExpr sym) (EmptyCtx ::> BaseIntegerType)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym BaseIntegerType
    p' Assignment (SymExpr sym) (EmptyCtx ::> BaseIntegerType)
    -> SymExpr sym BaseIntegerType
    -> Assignment
         (SymExpr sym) ((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym BaseIntegerType
    j' Assignment
      (SymExpr sym) ((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
    -> SymExpr sym ProjectivePoint
    -> Assignment
         (SymExpr sym)
         (((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
          ::> ProjectivePoint)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym ProjectivePoint
    s' Assignment
      (SymExpr sym)
      (((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
       ::> ProjectivePoint)
    -> SymExpr sym BaseIntegerType
    -> Assignment
         (SymExpr sym)
         ((((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
           ::> ProjectivePoint)
          ::> BaseIntegerType)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym BaseIntegerType
    k' Assignment
      (SymExpr sym)
      ((((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
        ::> ProjectivePoint)
       ::> BaseIntegerType)
    -> SymExpr sym ProjectivePoint
    -> Assignment
         (SymExpr sym)
         (((((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
            ::> ProjectivePoint)
           ::> BaseIntegerType)
          ::> ProjectivePoint)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym ProjectivePoint
    t')
                What4 sym
    -> SymExpr sym ProjectivePoint
    -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> SymExpr sym ProjectivePoint -> SEval (What4 sym) (Value sym)
    fromProjectivePoint What4 sym
    sym SymExpr sym ProjectivePoint
    z
      ]

    type ProjectivePoint = W4.BaseStructType (EmptyCtx ::> W4.BaseIntegerType ::> W4.BaseIntegerType ::> W4.BaseIntegerType)

    projectivePointRepr :: W4.BaseTypeRepr ProjectivePoint
    projectivePointRepr :: BaseTypeRepr ProjectivePoint
    projectivePointRepr = BaseTypeRepr ProjectivePoint
    forall k (f :: k -> *) (ctx :: k). KnownRepr f ctx => f ctx
    W4.knownRepr

    toProjectivePoint :: W4.IsSymExprBuilder sym =>
      What4 sym -> Value sym -> SEval (What4 sym) (W4.SymExpr sym ProjectivePoint)
    toProjectivePoint :: forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> Value sym -> SEval (What4 sym) (SymExpr sym ProjectivePoint)
    toProjectivePoint What4 sym
    sym Value sym
    v =
      do SymExpr sym BaseIntegerType
    x <- Value sym -> SymExpr sym BaseIntegerType
    Value sym -> SInteger (What4 sym)
    forall sym. GenValue sym -> SInteger sym
    fromVInteger (Value sym -> SymExpr sym BaseIntegerType)
    -> W4Eval sym (Value sym)
    -> W4Eval sym (SymExpr sym BaseIntegerType)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Ident -> Value sym -> SEval (What4 sym) (Value sym)
    forall sym. Ident -> GenValue sym -> SEval sym (GenValue sym)
    lookupRecord Ident
    "x" Value sym
    v
         SymExpr sym BaseIntegerType
    y <- Value sym -> SymExpr sym BaseIntegerType
    Value sym -> SInteger (What4 sym)
    forall sym. GenValue sym -> SInteger sym
    fromVInteger (Value sym -> SymExpr sym BaseIntegerType)
    -> W4Eval sym (Value sym)
    -> W4Eval sym (SymExpr sym BaseIntegerType)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Ident -> Value sym -> SEval (What4 sym) (Value sym)
    forall sym. Ident -> GenValue sym -> SEval sym (GenValue sym)
    lookupRecord Ident
    "y" Value sym
    v
         SymExpr sym BaseIntegerType
    z <- Value sym -> SymExpr sym BaseIntegerType
    Value sym -> SInteger (What4 sym)
    forall sym. GenValue sym -> SInteger sym
    fromVInteger (Value sym -> SymExpr sym BaseIntegerType)
    -> W4Eval sym (Value sym)
    -> W4Eval sym (SymExpr sym BaseIntegerType)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Ident -> Value sym -> SEval (What4 sym) (Value sym)
    forall sym. Ident -> GenValue sym -> SEval sym (GenValue sym)
    lookupRecord Ident
    "z" Value sym
    v
         IO (SymExpr sym ProjectivePoint)
    -> W4Eval sym (SymExpr sym ProjectivePoint)
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (SymExpr sym ProjectivePoint)
     -> W4Eval sym (SymExpr sym ProjectivePoint))
    -> IO (SymExpr sym ProjectivePoint)
    -> W4Eval sym (SymExpr sym ProjectivePoint)
    forall a b. (a -> b) -> a -> b
    $ sym
    -> Assignment
         (SymExpr sym)
         (((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
          '::> BaseIntegerType)
    -> IO (SymExpr sym ProjectivePoint)
    forall sym (flds :: Ctx BaseType).
    IsExprBuilder sym =>
    sym -> Assignment (SymExpr sym) flds -> IO (SymStruct sym flds)
    forall (flds :: Ctx BaseType).
    sym -> Assignment (SymExpr sym) flds -> IO (SymStruct sym flds)
    W4.mkStruct (What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym) (Assignment (SymExpr sym) EmptyCtx
    forall {k} (ctx :: Ctx k) (f :: k -> *).
    (ctx ~ EmptyCtx) =>
    Assignment f ctx
    Empty Assignment (SymExpr sym) EmptyCtx
    -> SymExpr sym BaseIntegerType
    -> Assignment (SymExpr sym) (EmptyCtx ::> BaseIntegerType)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym BaseIntegerType
    x Assignment (SymExpr sym) (EmptyCtx ::> BaseIntegerType)
    -> SymExpr sym BaseIntegerType
    -> Assignment
         (SymExpr sym) ((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym BaseIntegerType
    y Assignment
      (SymExpr sym) ((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
    -> SymExpr sym BaseIntegerType
    -> Assignment
         (SymExpr sym)
         (((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
          '::> BaseIntegerType)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym BaseIntegerType
    z)

    fromProjectivePoint :: W4.IsSymExprBuilder sym =>
      What4 sym -> W4.SymExpr sym ProjectivePoint -> SEval (What4 sym) (Value sym)
    fromProjectivePoint :: forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> SymExpr sym ProjectivePoint -> SEval (What4 sym) (Value sym)
    fromProjectivePoint What4 sym
    sym SymExpr sym ProjectivePoint
    p = IO (Value sym) -> SEval (What4 sym) (Value sym)
    forall a. IO a -> SEval (What4 sym) a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (Value sym) -> SEval (What4 sym) (Value sym))
    -> IO (Value sym) -> SEval (What4 sym) (Value sym)
    forall a b. (a -> b) -> a -> b
    $
      do Value sym
    x <- SInteger (What4 sym) -> Value sym
    forall sym. SInteger sym -> GenValue sym
    VInteger (SInteger (What4 sym) -> Value sym)
    -> IO (SInteger (What4 sym)) -> IO (Value sym)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> sym
    -> SymExpr sym ProjectivePoint
    -> Index
         (((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
          '::> BaseIntegerType)
         BaseIntegerType
    -> IO (SymExpr sym BaseIntegerType)
    forall sym (flds :: Ctx BaseType) (tp :: BaseType).
    IsExprBuilder sym =>
    sym -> SymStruct sym flds -> Index flds tp -> IO (SymExpr sym tp)
    forall (flds :: Ctx BaseType) (tp :: BaseType).
    sym -> SymStruct sym flds -> Index flds tp -> IO (SymExpr sym tp)
    W4.structField (What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym) SymExpr sym ProjectivePoint
    p (forall (n :: Natural) (ctx :: Ctx BaseType) (r :: BaseType).
    Idx n ctx r =>
    Index ctx r
    forall {k} (n :: Natural) (ctx :: Ctx k) (r :: k).
    Idx n ctx r =>
    Index ctx r
    natIndex @0)
         Value sym
    y <- SymExpr sym BaseIntegerType -> Value sym
    SInteger (What4 sym) -> Value sym
    forall sym. SInteger sym -> GenValue sym
    VInteger (SymExpr sym BaseIntegerType -> Value sym)
    -> IO (SymExpr sym BaseIntegerType) -> IO (Value sym)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> sym
    -> SymExpr sym ProjectivePoint
    -> Index
         (((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
          '::> BaseIntegerType)
         BaseIntegerType
    -> IO (SymExpr sym BaseIntegerType)
    forall sym (flds :: Ctx BaseType) (tp :: BaseType).
    IsExprBuilder sym =>
    sym -> SymStruct sym flds -> Index flds tp -> IO (SymExpr sym tp)
    forall (flds :: Ctx BaseType) (tp :: BaseType).
    sym -> SymStruct sym flds -> Index flds tp -> IO (SymExpr sym tp)
    W4.structField (What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym) SymExpr sym ProjectivePoint
    p (forall (n :: Natural) (ctx :: Ctx BaseType) (r :: BaseType).
    Idx n ctx r =>
    Index ctx r
    forall {k} (n :: Natural) (ctx :: Ctx k) (r :: k).
    Idx n ctx r =>
    Index ctx r
    natIndex @1)
         Value sym
    z <- SymExpr sym BaseIntegerType -> Value sym
    SInteger (What4 sym) -> Value sym
    forall sym. SInteger sym -> GenValue sym
    VInteger (SymExpr sym BaseIntegerType -> Value sym)
    -> IO (SymExpr sym BaseIntegerType) -> IO (Value sym)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> sym
    -> SymExpr sym ProjectivePoint
    -> Index
         (((EmptyCtx ::> BaseIntegerType) ::> BaseIntegerType)
          '::> BaseIntegerType)
         BaseIntegerType
    -> IO (SymExpr sym BaseIntegerType)
    forall sym (flds :: Ctx BaseType) (tp :: BaseType).
    IsExprBuilder sym =>
    sym -> SymStruct sym flds -> Index flds tp -> IO (SymExpr sym tp)
    forall (flds :: Ctx BaseType) (tp :: BaseType).
    sym -> SymStruct sym flds -> Index flds tp -> IO (SymExpr sym tp)
    W4.structField (What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym) SymExpr sym ProjectivePoint
    p (forall (n :: Natural) (ctx :: Ctx BaseType) (r :: BaseType).
    Idx n ctx r =>
    Index ctx r
    forall {k} (n :: Natural) (ctx :: Ctx k) (r :: k).
    Idx n ctx r =>
    Index ctx r
    natIndex @2)
         Value sym -> IO (Value sym)
    forall a. a -> IO a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (Value sym -> IO (Value sym)) -> Value sym -> IO (Value sym)
    forall a b. (a -> b) -> a -> b
    $ RecordMap Ident (SEval (What4 sym) (Value sym)) -> Value sym
    forall sym.
    RecordMap Ident (SEval sym (GenValue sym)) -> GenValue sym
    VRecord (RecordMap Ident (SEval (What4 sym) (Value sym)) -> Value sym)
    -> RecordMap Ident (SEval (What4 sym) (Value sym)) -> Value sym
    forall a b. (a -> b) -> a -> b
    $ [(Ident, W4Eval sym (Value sym))]
    -> RecordMap Ident (W4Eval sym (Value sym))
    forall a b. (Show a, Ord a) => [(a, b)] -> RecordMap a b
    recordFromFields [ (String -> Ident
    packIdent String
    "x",Value sym -> W4Eval sym (Value sym)
    forall a. a -> W4Eval sym a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Value sym
    x), (String -> Ident
    packIdent String
    "y",Value sym -> W4Eval sym (Value sym)
    forall a. a -> W4Eval sym a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Value sym
    y),(String -> Ident
    packIdent String
    "z",Value sym -> W4Eval sym (Value sym)
    forall a. a -> W4Eval sym a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Value sym
    z) ]

    suiteBPrims :: W4.IsSymExprBuilder sym => What4 sym -> Map.Map PrimIdent (Prim (What4 sym))
    suiteBPrims :: forall sym.
    IsSymExprBuilder sym =>
    What4 sym -> Map PrimIdent (Prim (What4 sym))
    suiteBPrims What4 sym
    sym = [(PrimIdent, Prim (What4 sym))] -> Map PrimIdent (Prim (What4 sym))
    forall k a. Ord k => [(k, a)] -> Map k a
    Map.fromList ([(PrimIdent, Prim (What4 sym))]
     -> Map PrimIdent (Prim (What4 sym)))
    -> [(PrimIdent, Prim (What4 sym))]
    -> Map PrimIdent (Prim (What4 sym))
    forall a b. (a -> b) -> a -> b
    $ [ (Text -> PrimIdent
    suiteBPrim Text
    n, Prim (What4 sym)
    v) | (Text
    n,Prim (What4 sym)
    v) <- [(Text, Prim (What4 sym))]
    prims ]
     where
     ~> :: a -> b -> (a, b)
    (~>) = (,)

     prims :: [(Text, Prim (What4 sym))]
    prims =
      [ Text
    "AESEncRound" Text -> Prim (What4 sym) -> (Text, Prim (What4 sym))
    forall a b. a -> b -> (a, b)
    ~>
           (SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym))
    -> Prim (What4 sym)
    forall sym. (SEval sym (GenValue sym) -> Prim sym) -> Prim sym
    PFun \SEval (What4 sym) (GenValue (What4 sym))
    st ->
           SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym)
    forall sym. SEval sym (GenValue sym) -> Prim sym
    PPrim
             do What4 sym -> Text -> W4Eval sym ()
    forall (m :: * -> *) sym. MonadIO m => What4 sym -> Text -> m ()
    addUninterpWarning What4 sym
    sym Text
    "AES encryption"
                What4 sym
    -> Text
    -> GenValue (What4 sym)
    -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym -> Text -> Value sym -> SEval (What4 sym) (Value sym)
    applyAESStateFunc What4 sym
    sym Text
    "AESEncRound" (GenValue (What4 sym) -> W4Eval sym (GenValue (What4 sym)))
    -> W4Eval sym (GenValue (What4 sym))
    -> W4Eval sym (GenValue (What4 sym))
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    st
      , Text
    "AESEncFinalRound" Text -> Prim (What4 sym) -> (Text, Prim (What4 sym))
    forall a b. a -> b -> (a, b)
    ~>
           (SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym))
    -> Prim (What4 sym)
    forall sym. (SEval sym (GenValue sym) -> Prim sym) -> Prim sym
    PFun \SEval (What4 sym) (GenValue (What4 sym))
    st ->
           SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym)
    forall sym. SEval sym (GenValue sym) -> Prim sym
    PPrim
             do What4 sym -> Text -> W4Eval sym ()
    forall (m :: * -> *) sym. MonadIO m => What4 sym -> Text -> m ()
    addUninterpWarning What4 sym
    sym Text
    "AES encryption"
                What4 sym
    -> Text
    -> GenValue (What4 sym)
    -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym -> Text -> Value sym -> SEval (What4 sym) (Value sym)
    applyAESStateFunc What4 sym
    sym Text
    "AESEncFinalRound" (GenValue (What4 sym) -> W4Eval sym (GenValue (What4 sym)))
    -> W4Eval sym (GenValue (What4 sym))
    -> W4Eval sym (GenValue (What4 sym))
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    st
      , Text
    "AESDecRound" Text -> Prim (What4 sym) -> (Text, Prim (What4 sym))
    forall a b. a -> b -> (a, b)
    ~>
           (SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym))
    -> Prim (What4 sym)
    forall sym. (SEval sym (GenValue sym) -> Prim sym) -> Prim sym
    PFun \SEval (What4 sym) (GenValue (What4 sym))
    st ->
           SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym)
    forall sym. SEval sym (GenValue sym) -> Prim sym
    PPrim
             do What4 sym -> Text -> W4Eval sym ()
    forall (m :: * -> *) sym. MonadIO m => What4 sym -> Text -> m ()
    addUninterpWarning What4 sym
    sym Text
    "AES decryption"
                What4 sym
    -> Text
    -> GenValue (What4 sym)
    -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym -> Text -> Value sym -> SEval (What4 sym) (Value sym)
    applyAESStateFunc What4 sym
    sym Text
    "AESDecRound" (GenValue (What4 sym) -> W4Eval sym (GenValue (What4 sym)))
    -> W4Eval sym (GenValue (What4 sym))
    -> W4Eval sym (GenValue (What4 sym))
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    st
      , Text
    "AESDecFinalRound" Text -> Prim (What4 sym) -> (Text, Prim (What4 sym))
    forall a b. a -> b -> (a, b)
    ~>
           (SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym))
    -> Prim (What4 sym)
    forall sym. (SEval sym (GenValue sym) -> Prim sym) -> Prim sym
    PFun \SEval (What4 sym) (GenValue (What4 sym))
    st ->
           SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym)
    forall sym. SEval sym (GenValue sym) -> Prim sym
    PPrim
             do What4 sym -> Text -> W4Eval sym ()
    forall (m :: * -> *) sym. MonadIO m => What4 sym -> Text -> m ()
    addUninterpWarning What4 sym
    sym Text
    "AES decryption"
                What4 sym
    -> Text
    -> GenValue (What4 sym)
    -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym -> Text -> Value sym -> SEval (What4 sym) (Value sym)
    applyAESStateFunc What4 sym
    sym Text
    "AESDecFinalRound" (GenValue (What4 sym) -> W4Eval sym (GenValue (What4 sym)))
    -> W4Eval sym (GenValue (What4 sym))
    -> W4Eval sym (GenValue (What4 sym))
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    st
      , Text
    "AESInvMixColumns" Text -> Prim (What4 sym) -> (Text, Prim (What4 sym))
    forall a b. a -> b -> (a, b)
    ~>
           (SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym))
    -> Prim (What4 sym)
    forall sym. (SEval sym (GenValue sym) -> Prim sym) -> Prim sym
    PFun \SEval (What4 sym) (GenValue (What4 sym))
    st ->
           SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym)
    forall sym. SEval sym (GenValue sym) -> Prim sym
    PPrim
             do What4 sym -> Text -> W4Eval sym ()
    forall (m :: * -> *) sym. MonadIO m => What4 sym -> Text -> m ()
    addUninterpWarning What4 sym
    sym Text
    "AES key expansion"
                What4 sym
    -> Text
    -> GenValue (What4 sym)
    -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym -> Text -> Value sym -> SEval (What4 sym) (Value sym)
    applyAESStateFunc What4 sym
    sym Text
    "AESInvMixColumns" (GenValue (What4 sym) -> W4Eval sym (GenValue (What4 sym)))
    -> W4Eval sym (GenValue (What4 sym))
    -> W4Eval sym (GenValue (What4 sym))
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    st

        -- {k} (fin k, k >= 4, 8 >= k) => [k][32] -> [4*(k+7)][32]
      , Text
    "AESKeyExpand" Text -> Prim (What4 sym) -> (Text, Prim (What4 sym))
    forall a b. a -> b -> (a, b)
    ~>
           (Integer -> Prim (What4 sym)) -> Prim (What4 sym)
    forall sym. (Integer -> Prim sym) -> Prim sym
    PFinPoly \Integer
    k ->
           (SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym))
    -> Prim (What4 sym)
    forall sym. (SEval sym (GenValue sym) -> Prim sym) -> Prim sym
    PFun     \SEval (What4 sym) (GenValue (What4 sym))
    st ->
           SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym)
    forall sym. SEval sym (GenValue sym) -> Prim sym
    PPrim
              do SeqMap (What4 sym) (GenValue (What4 sym))
    ss <- GenValue (What4 sym) -> SeqMap (What4 sym) (GenValue (What4 sym))
    forall sym. GenValue sym -> SeqMap sym (GenValue sym)
    fromVSeq (GenValue (What4 sym) -> SeqMap (What4 sym) (GenValue (What4 sym)))
    -> W4Eval sym (GenValue (What4 sym))
    -> W4Eval sym (SeqMap (What4 sym) (GenValue (What4 sym)))
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    st
                 -- pack the arguments into a k-tuple of 32-bit values
                 Some Assignment (SymExpr sym) x
    ws <- Int
    -> (Int -> W4Eval sym (Some (SymExpr sym)))
    -> W4Eval sym (Some (Assignment (SymExpr sym)))
    forall {k} (m :: * -> *) (f :: k -> *).
    Applicative m =>
    Int -> (Int -> m (Some f)) -> m (Some (Assignment f))
    generateSomeM (Integer -> Int
    forall a. Num a => Integer -> a
    fromInteger Integer
    k) (\Int
    i -> SymExpr sym (BaseBVType 32) -> Some (SymExpr sym)
    forall k (f :: k -> *) (x :: k). f x -> Some f
    Some (SymExpr sym (BaseBVType 32) -> Some (SymExpr sym))
    -> W4Eval sym (SymExpr sym (BaseBVType 32))
    -> W4Eval sym (Some (SymExpr sym))
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 32))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 32)
    toWord32 What4 sym
    sym String
    "AESKeyExpand" SeqMap (What4 sym) (GenValue (What4 sym))
    ss (Int -> Integer
    forall a. Integral a => a -> Integer
    toInteger Int
    i))
                 -- get the types of the arguments
                 let args :: Assignment BaseTypeRepr x
    args = (forall (x :: BaseType). SymExpr sym x -> BaseTypeRepr x)
    -> forall (x :: Ctx BaseType).
       Assignment (SymExpr sym) x -> Assignment BaseTypeRepr x
    forall k l (t :: (k -> *) -> l -> *) (f :: k -> *) (g :: k -> *).
    FunctorFC t =>
    (forall (x :: k). f x -> g x) -> forall (x :: l). t f x -> t g x
    forall (f :: BaseType -> *) (g :: BaseType -> *).
    (forall (x :: BaseType). f x -> g x)
    -> forall (x :: Ctx BaseType). Assignment f x -> Assignment g x
    fmapFC SymExpr sym x -> BaseTypeRepr x
    forall (x :: BaseType). SymExpr sym x -> BaseTypeRepr x
    forall (e :: BaseType -> *) (tp :: BaseType).
    IsExpr e =>
    e tp -> BaseTypeRepr tp
    W4.exprType Assignment (SymExpr sym) x
    ws
                 -- compute the return type which is a tuple of @4*(k+7)@ 32-bit values
                 Some Assignment BaseTypeRepr x
    ret <- Some (Assignment BaseTypeRepr)
    -> W4Eval sym (Some (Assignment BaseTypeRepr))
    forall a. a -> W4Eval sym a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (Some (Assignment BaseTypeRepr)
     -> W4Eval sym (Some (Assignment BaseTypeRepr)))
    -> Some (Assignment BaseTypeRepr)
    -> W4Eval sym (Some (Assignment BaseTypeRepr))
    forall a b. (a -> b) -> a -> b
    $ Int -> (Int -> Some BaseTypeRepr) -> Some (Assignment BaseTypeRepr)
    forall {k} (f :: k -> *).
    Int -> (Int -> Some f) -> Some (Assignment f)
    generateSome (Int
    4Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *(Integer -> Int
    forall a. Num a => Integer -> a
    fromInteger Integer
    k Int -> Int -> Int
    forall a. Num a => a -> a -> a
    + Int
    7)) (\Int
    _ -> BaseTypeRepr (BaseBVType 32) -> Some BaseTypeRepr
    forall k (f :: k -> *) (x :: k). f x -> Some f
    Some (NatRepr 32 -> BaseTypeRepr (BaseBVType 32)
    forall (w :: Natural).
    (1 <= w) =>
    NatRepr w -> BaseTypeRepr ('BaseBVType w)
    W4.BaseBVRepr (forall (n :: Natural). KnownNat n => NatRepr n
    W4.knownNat @32)))
                 -- retrieve the relevant uninterpreted function and apply it to the arguments
                 What4 sym -> Text -> W4Eval sym ()
    forall (m :: * -> *) sym. MonadIO m => What4 sym -> Text -> m ()
    addUninterpWarning What4 sym
    sym Text
    "AES key expansion"
                 SymFn sym x ('BaseStructType x)
    fn <- IO (SymFn sym x ('BaseStructType x))
    -> W4Eval sym (SymFn sym x ('BaseStructType x))
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (SymFn sym x ('BaseStructType x))
     -> W4Eval sym (SymFn sym x ('BaseStructType x)))
    -> IO (SymFn sym x ('BaseStructType x))
    -> W4Eval sym (SymFn sym x ('BaseStructType x))
    forall a b. (a -> b) -> a -> b
    $ What4 sym
    -> Text
    -> Assignment BaseTypeRepr x
    -> BaseTypeRepr ('BaseStructType x)
    -> IO (SymFn sym x ('BaseStructType x))
    forall sym (args :: Ctx BaseType) (ret :: BaseType).
    IsSymExprBuilder sym =>
    What4 sym
    -> Text
    -> Assignment BaseTypeRepr args
    -> BaseTypeRepr ret
    -> IO (SymFn sym args ret)
    getUninterpFn What4 sym
    sym (Text
    "AESKeyExpand" Text -> Text -> Text
    forall a. Semigroup a => a -> a -> a
    <> String -> Text
    Text.pack (Integer -> String
    forall a. Show a => a -> String
    show Integer
    k)) Assignment BaseTypeRepr x
    args (Assignment BaseTypeRepr x -> BaseTypeRepr ('BaseStructType x)
    forall (ctx :: Ctx BaseType).
    Assignment BaseTypeRepr ctx -> BaseTypeRepr ('BaseStructType ctx)
    W4.BaseStructRepr Assignment BaseTypeRepr x
    ret)
                 SymExpr sym ('BaseStructType x)
    z  <- IO (SymExpr sym ('BaseStructType x))
    -> W4Eval sym (SymExpr sym ('BaseStructType x))
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (SymExpr sym ('BaseStructType x))
     -> W4Eval sym (SymExpr sym ('BaseStructType x)))
    -> IO (SymExpr sym ('BaseStructType x))
    -> W4Eval sym (SymExpr sym ('BaseStructType x))
    forall a b. (a -> b) -> a -> b
    $ sym
    -> SymFn sym x ('BaseStructType x)
    -> Assignment (SymExpr sym) x
    -> IO (SymExpr sym ('BaseStructType x))
    forall sym (args :: Ctx BaseType) (ret :: BaseType).
    IsSymExprBuilder sym =>
    sym
    -> SymFn sym args ret
    -> Assignment (SymExpr sym) args
    -> IO (SymExpr sym ret)
    forall (args :: Ctx BaseType) (ret :: BaseType).
    sym
    -> SymFn sym args ret
    -> Assignment (SymExpr sym) args
    -> IO (SymExpr sym ret)
    W4.applySymFn (What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym) SymFn sym x ('BaseStructType x)
    fn Assignment (SymExpr sym) x
    ws
                 -- compute a sequence that projects the relevant fields from the outout tuple
                 GenValue (What4 sym) -> W4Eval sym (GenValue (What4 sym))
    forall a. a -> W4Eval sym a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (GenValue (What4 sym) -> W4Eval sym (GenValue (What4 sym)))
    -> GenValue (What4 sym) -> W4Eval sym (GenValue (What4 sym))
    forall a b. (a -> b) -> a -> b
    $ Integer
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> GenValue (What4 sym)
    forall sym. Integer -> SeqMap sym (GenValue sym) -> GenValue sym
    VSeq (Integer
    4Integer -> Integer -> Integer
    forall a. Num a => a -> a -> a
    *(Integer
    kInteger -> Integer -> Integer
    forall a. Num a => a -> a -> a
    +Integer
    7)) (SeqMap (What4 sym) (GenValue (What4 sym)) -> GenValue (What4 sym))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> GenValue (What4 sym)
    forall a b. (a -> b) -> a -> b
    $ (Integer -> SEval (What4 sym) (GenValue (What4 sym)))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    forall sym a. (Integer -> SEval sym a) -> SeqMap sym a
    indexSeqMap ((Integer -> SEval (What4 sym) (GenValue (What4 sym)))
     -> SeqMap (What4 sym) (GenValue (What4 sym)))
    -> (Integer -> SEval (What4 sym) (GenValue (What4 sym)))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    forall a b. (a -> b) -> a -> b
    $ \Integer
    i ->
                   case Int -> Size x -> Maybe (Some (Index x))
    forall {k} (ctx :: Ctx k).
    Int -> Size ctx -> Maybe (Some (Index ctx))
    intIndex (Integer -> Int
    forall a. Num a => Integer -> a
    fromInteger Integer
    i) (Assignment BaseTypeRepr x -> Size x
    forall {k} (f :: k -> *) (ctx :: Ctx k).
    Assignment f ctx -> Size ctx
    size Assignment BaseTypeRepr x
    ret) of
                     Just (Some Index x x
    idx) | Just x :~: BaseBVType 32
    W4.Refl <- BaseTypeRepr x
    -> BaseTypeRepr (BaseBVType 32) -> Maybe (x :~: BaseBVType 32)
    forall {k} (f :: k -> *) (a :: k) (b :: k).
    TestEquality f =>
    f a -> f b -> Maybe (a :~: b)
    forall (a :: BaseType) (b :: BaseType).
    BaseTypeRepr a -> BaseTypeRepr b -> Maybe (a :~: b)
    W4.testEquality (Assignment BaseTypeRepr x
    retAssignment BaseTypeRepr x -> Index x x -> BaseTypeRepr x
    forall {k} (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    Assignment f ctx -> Index ctx tp -> f tp
    !Index x x
    idx) (NatRepr 32 -> BaseTypeRepr (BaseBVType 32)
    forall (w :: Natural).
    (1 <= w) =>
    NatRepr w -> BaseTypeRepr ('BaseBVType w)
    W4.BaseBVRepr (forall (n :: Natural). KnownNat n => NatRepr n
    W4.knownNat @32)) ->
                       SymExpr sym (BaseBVType 32)
    -> SEval (What4 sym) (GenValue (What4 sym))
    SymExpr sym (BaseBVType 32) -> W4Eval sym (GenValue (What4 sym))
    forall sym.
    IsSymExprBuilder sym =>
    SymBV sym 32 -> SEval (What4 sym) (Value sym)
    fromWord32 (SymExpr sym (BaseBVType 32) -> W4Eval sym (GenValue (What4 sym)))
    -> W4Eval sym (SymExpr sym (BaseBVType 32))
    -> W4Eval sym (GenValue (What4 sym))
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< IO (SymExpr sym (BaseBVType 32))
    -> W4Eval sym (SymExpr sym (BaseBVType 32))
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (sym
    -> SymExpr sym ('BaseStructType x)
    -> Index x x
    -> IO (SymExpr sym x)
    forall sym (flds :: Ctx BaseType) (tp :: BaseType).
    IsExprBuilder sym =>
    sym -> SymStruct sym flds -> Index flds tp -> IO (SymExpr sym tp)
    forall (flds :: Ctx BaseType) (tp :: BaseType).
    sym -> SymStruct sym flds -> Index flds tp -> IO (SymExpr sym tp)
    W4.structField (What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym) SymExpr sym ('BaseStructType x)
    z Index x x
    idx)
                     Maybe (Some (Index x))
    _ -> String -> [String] -> W4Eval sym (GenValue (What4 sym))
    forall a. String -> [String] -> a
    evalPanic String
    "AESKeyExpand" [String
    "Index out of range", Integer -> String
    forall a. Show a => a -> String
    show Integer
    k, Integer -> String
    forall a. Show a => a -> String
    show Integer
    i]

        -- {n} (fin n) => [n][16][32] -> [7][32]
      , Text
    "processSHA2_224" Text -> Prim (What4 sym) -> (Text, Prim (What4 sym))
    forall a b. a -> b -> (a, b)
    ~>
        (Integer -> Prim (What4 sym)) -> Prim (What4 sym)
    forall sym. (Integer -> Prim sym) -> Prim sym
    PFinPoly \Integer
    n ->
        (SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym))
    -> Prim (What4 sym)
    forall sym. (SEval sym (GenValue sym) -> Prim sym) -> Prim sym
    PFun     \SEval (What4 sym) (GenValue (What4 sym))
    xs ->
        SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym)
    forall sym. SEval sym (GenValue sym) -> Prim sym
    PPrim
           do [W4Eval sym (GenValue (What4 sym))]
    blks <- Integer
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> [SEval (What4 sym) (GenValue (What4 sym))]
    forall sym n a.
    (Backend sym, Integral n) =>
    n -> SeqMap sym a -> [SEval sym a]
    enumerateSeqMap Integer
    n (SeqMap (What4 sym) (GenValue (What4 sym))
     -> [W4Eval sym (GenValue (What4 sym))])
    -> (GenValue (What4 sym)
        -> SeqMap (What4 sym) (GenValue (What4 sym)))
    -> GenValue (What4 sym)
    -> [W4Eval sym (GenValue (What4 sym))]
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . GenValue (What4 sym) -> SeqMap (What4 sym) (GenValue (What4 sym))
    forall sym. GenValue sym -> SeqMap sym (GenValue sym)
    fromVSeq (GenValue (What4 sym) -> [W4Eval sym (GenValue (What4 sym))])
    -> W4Eval sym (GenValue (What4 sym))
    -> W4Eval sym [W4Eval sym (GenValue (What4 sym))]
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    xs
              What4 sym -> Text -> W4Eval sym ()
    forall (m :: * -> *) sym. MonadIO m => What4 sym -> Text -> m ()
    addUninterpWarning What4 sym
    sym Text
    "SHA-224"
              SymExpr sym (BaseStructType SHA256State)
    initSt <- IO (SymExpr sym (BaseStructType SHA256State))
    -> W4Eval sym (SymExpr sym (BaseStructType SHA256State))
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (What4 sym
    -> SHA256State -> IO (SymExpr sym (BaseStructType SHA256State))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> SHA256State -> IO (SymExpr sym (BaseStructType SHA256State))
    mkSHA256InitialState What4 sym
    sym SHA256State
    SHA.initialSHA224State)
              SymExpr sym (BaseStructType SHA256State)
    finalSt <- (SymExpr sym (BaseStructType SHA256State)
     -> W4Eval sym (GenValue (What4 sym))
     -> W4Eval sym (SymExpr sym (BaseStructType SHA256State)))
    -> SymExpr sym (BaseStructType SHA256State)
    -> [W4Eval sym (GenValue (What4 sym))]
    -> W4Eval sym (SymExpr sym (BaseStructType SHA256State))
    forall (t :: * -> *) (m :: * -> *) b a.
    (Foldable t, Monad m) =>
    (b -> a -> m b) -> b -> t a -> m b
    foldM (\SymExpr sym (BaseStructType SHA256State)
    st W4Eval sym (GenValue (What4 sym))
    blk -> What4 sym
    -> SymExpr sym (BaseStructType SHA256State)
    -> GenValue (What4 sym)
    -> SEval (What4 sym) (SymExpr sym (BaseStructType SHA256State))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> SymExpr sym (BaseStructType SHA256State)
    -> Value sym
    -> SEval (What4 sym) (SymExpr sym (BaseStructType SHA256State))
    processSHA256Block What4 sym
    sym SymExpr sym (BaseStructType SHA256State)
    st (GenValue (What4 sym)
     -> W4Eval sym (SymExpr sym (BaseStructType SHA256State)))
    -> W4Eval sym (GenValue (What4 sym))
    -> W4Eval sym (SymExpr sym (BaseStructType SHA256State))
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< W4Eval sym (GenValue (What4 sym))
    blk) SymExpr sym (BaseStructType SHA256State)
    initSt [W4Eval sym (GenValue (What4 sym))]
    blks
              GenValue (What4 sym) -> W4Eval sym (GenValue (What4 sym))
    forall a. a -> W4Eval sym a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (GenValue (What4 sym) -> W4Eval sym (GenValue (What4 sym)))
    -> GenValue (What4 sym) -> W4Eval sym (GenValue (What4 sym))
    forall a b. (a -> b) -> a -> b
    $ Integer
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> GenValue (What4 sym)
    forall sym. Integer -> SeqMap sym (GenValue sym) -> GenValue sym
    VSeq Integer
    7 (SeqMap (What4 sym) (GenValue (What4 sym)) -> GenValue (What4 sym))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> GenValue (What4 sym)
    forall a b. (a -> b) -> a -> b
    $ (Integer -> SEval (What4 sym) (GenValue (What4 sym)))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    forall sym a. (Integer -> SEval sym a) -> SeqMap sym a
    indexSeqMap \Integer
    i ->
                case Int -> Size SHA256State -> Maybe (Some (Index SHA256State))
    forall {k} (ctx :: Ctx k).
    Int -> Size ctx -> Maybe (Some (Index ctx))
    intIndex (Integer -> Int
    forall a. Num a => Integer -> a
    fromInteger Integer
    i) (Size SHA256State
    forall k (ctx :: Ctx k). KnownContext ctx => Size ctx
    knownSize :: Size SHA256State) of
                  Just (Some Index SHA256State x
    idx) ->
                    do SymExpr sym x
    z <- IO (SymExpr sym x) -> W4Eval sym (SymExpr sym x)
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (SymExpr sym x) -> W4Eval sym (SymExpr sym x))
    -> IO (SymExpr sym x) -> W4Eval sym (SymExpr sym x)
    forall a b. (a -> b) -> a -> b
    $ sym
    -> SymExpr sym (BaseStructType SHA256State)
    -> Index SHA256State x
    -> IO (SymExpr sym x)
    forall sym (flds :: Ctx BaseType) (tp :: BaseType).
    IsExprBuilder sym =>
    sym -> SymStruct sym flds -> Index flds tp -> IO (SymExpr sym tp)
    forall (flds :: Ctx BaseType) (tp :: BaseType).
    sym -> SymStruct sym flds -> Index flds tp -> IO (SymExpr sym tp)
    W4.structField (What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym) SymExpr sym (BaseStructType SHA256State)
    finalSt Index SHA256State x
    idx
                       case BaseTypeRepr x
    -> BaseTypeRepr (BaseBVType 32) -> Maybe (x :~: BaseBVType 32)
    forall {k} (f :: k -> *) (a :: k) (b :: k).
    TestEquality f =>
    f a -> f b -> Maybe (a :~: b)
    forall (a :: BaseType) (b :: BaseType).
    BaseTypeRepr a -> BaseTypeRepr b -> Maybe (a :~: b)
    W4.testEquality (SymExpr sym x -> BaseTypeRepr x
    forall (x :: BaseType). SymExpr sym x -> BaseTypeRepr x
    forall (e :: BaseType -> *) (tp :: BaseType).
    IsExpr e =>
    e tp -> BaseTypeRepr tp
    W4.exprType SymExpr sym x
    z) (NatRepr 32 -> BaseTypeRepr (BaseBVType 32)
    forall (w :: Natural).
    (1 <= w) =>
    NatRepr w -> BaseTypeRepr ('BaseBVType w)
    W4.BaseBVRepr (forall (n :: Natural). KnownNat n => NatRepr n
    W4.knownNat @32)) of
                         Just x :~: BaseBVType 32
    W4.Refl -> SymExpr sym (BaseBVType 32)
    -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym.
    IsSymExprBuilder sym =>
    SymBV sym 32 -> SEval (What4 sym) (Value sym)
    fromWord32 SymExpr sym x
    SymExpr sym (BaseBVType 32)
    z
                         Maybe (x :~: BaseBVType 32)
    Nothing -> String -> [String] -> W4Eval sym (GenValue (What4 sym))
    forall a. String -> [String] -> a
    evalPanic String
    "processSHA2_224" [String
    "Index out of range", Integer -> String
    forall a. Show a => a -> String
    show Integer
    i]
                  Maybe (Some (Index SHA256State))
    Nothing -> String -> [String] -> W4Eval sym (GenValue (What4 sym))
    forall a. String -> [String] -> a
    evalPanic String
    "processSHA2_224" [String
    "Index out of range", Integer -> String
    forall a. Show a => a -> String
    show Integer
    i]

        -- {n} (fin n) => [n][16][32] -> [8][32]
      , Text
    "processSHA2_256" Text -> Prim (What4 sym) -> (Text, Prim (What4 sym))
    forall a b. a -> b -> (a, b)
    ~>
        (Integer -> Prim (What4 sym)) -> Prim (What4 sym)
    forall sym. (Integer -> Prim sym) -> Prim sym
    PFinPoly \Integer
    n ->
        (SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym))
    -> Prim (What4 sym)
    forall sym. (SEval sym (GenValue sym) -> Prim sym) -> Prim sym
    PFun     \SEval (What4 sym) (GenValue (What4 sym))
    xs ->
        SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym)
    forall sym. SEval sym (GenValue sym) -> Prim sym
    PPrim
           do [W4Eval sym (GenValue (What4 sym))]
    blks <- Integer
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> [SEval (What4 sym) (GenValue (What4 sym))]
    forall sym n a.
    (Backend sym, Integral n) =>
    n -> SeqMap sym a -> [SEval sym a]
    enumerateSeqMap Integer
    n (SeqMap (What4 sym) (GenValue (What4 sym))
     -> [W4Eval sym (GenValue (What4 sym))])
    -> (GenValue (What4 sym)
        -> SeqMap (What4 sym) (GenValue (What4 sym)))
    -> GenValue (What4 sym)
    -> [W4Eval sym (GenValue (What4 sym))]
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . GenValue (What4 sym) -> SeqMap (What4 sym) (GenValue (What4 sym))
    forall sym. GenValue sym -> SeqMap sym (GenValue sym)
    fromVSeq (GenValue (What4 sym) -> [W4Eval sym (GenValue (What4 sym))])
    -> W4Eval sym (GenValue (What4 sym))
    -> W4Eval sym [W4Eval sym (GenValue (What4 sym))]
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    xs
              What4 sym -> Text -> W4Eval sym ()
    forall (m :: * -> *) sym. MonadIO m => What4 sym -> Text -> m ()
    addUninterpWarning What4 sym
    sym Text
    "SHA-256"
              SymExpr sym (BaseStructType SHA256State)
    initSt <- IO (SymExpr sym (BaseStructType SHA256State))
    -> W4Eval sym (SymExpr sym (BaseStructType SHA256State))
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (What4 sym
    -> SHA256State -> IO (SymExpr sym (BaseStructType SHA256State))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> SHA256State -> IO (SymExpr sym (BaseStructType SHA256State))
    mkSHA256InitialState What4 sym
    sym SHA256State
    SHA.initialSHA256State)
              SymExpr sym (BaseStructType SHA256State)
    finalSt <- (SymExpr sym (BaseStructType SHA256State)
     -> W4Eval sym (GenValue (What4 sym))
     -> W4Eval sym (SymExpr sym (BaseStructType SHA256State)))
    -> SymExpr sym (BaseStructType SHA256State)
    -> [W4Eval sym (GenValue (What4 sym))]
    -> W4Eval sym (SymExpr sym (BaseStructType SHA256State))
    forall (t :: * -> *) (m :: * -> *) b a.
    (Foldable t, Monad m) =>
    (b -> a -> m b) -> b -> t a -> m b
    foldM (\SymExpr sym (BaseStructType SHA256State)
    st W4Eval sym (GenValue (What4 sym))
    blk -> What4 sym
    -> SymExpr sym (BaseStructType SHA256State)
    -> GenValue (What4 sym)
    -> SEval (What4 sym) (SymExpr sym (BaseStructType SHA256State))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> SymExpr sym (BaseStructType SHA256State)
    -> Value sym
    -> SEval (What4 sym) (SymExpr sym (BaseStructType SHA256State))
    processSHA256Block What4 sym
    sym SymExpr sym (BaseStructType SHA256State)
    st (GenValue (What4 sym)
     -> W4Eval sym (SymExpr sym (BaseStructType SHA256State)))
    -> W4Eval sym (GenValue (What4 sym))
    -> W4Eval sym (SymExpr sym (BaseStructType SHA256State))
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< W4Eval sym (GenValue (What4 sym))
    blk) SymExpr sym (BaseStructType SHA256State)
    initSt [W4Eval sym (GenValue (What4 sym))]
    blks
              GenValue (What4 sym) -> W4Eval sym (GenValue (What4 sym))
    forall a. a -> W4Eval sym a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (GenValue (What4 sym) -> W4Eval sym (GenValue (What4 sym)))
    -> GenValue (What4 sym) -> W4Eval sym (GenValue (What4 sym))
    forall a b. (a -> b) -> a -> b
    $ Integer
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> GenValue (What4 sym)
    forall sym. Integer -> SeqMap sym (GenValue sym) -> GenValue sym
    VSeq Integer
    8 (SeqMap (What4 sym) (GenValue (What4 sym)) -> GenValue (What4 sym))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> GenValue (What4 sym)
    forall a b. (a -> b) -> a -> b
    $ (Integer -> SEval (What4 sym) (GenValue (What4 sym)))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    forall sym a. (Integer -> SEval sym a) -> SeqMap sym a
    indexSeqMap \Integer
    i ->
                case Int -> Size SHA256State -> Maybe (Some (Index SHA256State))
    forall {k} (ctx :: Ctx k).
    Int -> Size ctx -> Maybe (Some (Index ctx))
    intIndex (Integer -> Int
    forall a. Num a => Integer -> a
    fromInteger Integer
    i) (Size SHA256State
    forall k (ctx :: Ctx k). KnownContext ctx => Size ctx
    knownSize :: Size SHA256State) of
                  Just (Some Index SHA256State x
    idx) ->
                    do SymExpr sym x
    z <- IO (SymExpr sym x) -> W4Eval sym (SymExpr sym x)
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (SymExpr sym x) -> W4Eval sym (SymExpr sym x))
    -> IO (SymExpr sym x) -> W4Eval sym (SymExpr sym x)
    forall a b. (a -> b) -> a -> b
    $ sym
    -> SymExpr sym (BaseStructType SHA256State)
    -> Index SHA256State x
    -> IO (SymExpr sym x)
    forall sym (flds :: Ctx BaseType) (tp :: BaseType).
    IsExprBuilder sym =>
    sym -> SymStruct sym flds -> Index flds tp -> IO (SymExpr sym tp)
    forall (flds :: Ctx BaseType) (tp :: BaseType).
    sym -> SymStruct sym flds -> Index flds tp -> IO (SymExpr sym tp)
    W4.structField (What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym) SymExpr sym (BaseStructType SHA256State)
    finalSt Index SHA256State x
    idx
                       case BaseTypeRepr x
    -> BaseTypeRepr (BaseBVType 32) -> Maybe (x :~: BaseBVType 32)
    forall {k} (f :: k -> *) (a :: k) (b :: k).
    TestEquality f =>
    f a -> f b -> Maybe (a :~: b)
    forall (a :: BaseType) (b :: BaseType).
    BaseTypeRepr a -> BaseTypeRepr b -> Maybe (a :~: b)
    W4.testEquality (SymExpr sym x -> BaseTypeRepr x
    forall (x :: BaseType). SymExpr sym x -> BaseTypeRepr x
    forall (e :: BaseType -> *) (tp :: BaseType).
    IsExpr e =>
    e tp -> BaseTypeRepr tp
    W4.exprType SymExpr sym x
    z) (NatRepr 32 -> BaseTypeRepr (BaseBVType 32)
    forall (w :: Natural).
    (1 <= w) =>
    NatRepr w -> BaseTypeRepr ('BaseBVType w)
    W4.BaseBVRepr (forall (n :: Natural). KnownNat n => NatRepr n
    W4.knownNat @32)) of
                         Just x :~: BaseBVType 32
    W4.Refl -> SymExpr sym (BaseBVType 32)
    -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym.
    IsSymExprBuilder sym =>
    SymBV sym 32 -> SEval (What4 sym) (Value sym)
    fromWord32 SymExpr sym x
    SymExpr sym (BaseBVType 32)
    z
                         Maybe (x :~: BaseBVType 32)
    Nothing -> String -> [String] -> W4Eval sym (GenValue (What4 sym))
    forall a. String -> [String] -> a
    evalPanic String
    "processSHA2_256" [String
    "Index out of range", Integer -> String
    forall a. Show a => a -> String
    show Integer
    i]
                  Maybe (Some (Index SHA256State))
    Nothing -> String -> [String] -> W4Eval sym (GenValue (What4 sym))
    forall a. String -> [String] -> a
    evalPanic String
    "processSHA2_256" [String
    "Index out of range", Integer -> String
    forall a. Show a => a -> String
    show Integer
    i]

        -- {n} (fin n) => [n][16][64] -> [6][64]
      , Text
    "processSHA2_384" Text -> Prim (What4 sym) -> (Text, Prim (What4 sym))
    forall a b. a -> b -> (a, b)
    ~>
        (Integer -> Prim (What4 sym)) -> Prim (What4 sym)
    forall sym. (Integer -> Prim sym) -> Prim sym
    PFinPoly \Integer
    n ->
        (SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym))
    -> Prim (What4 sym)
    forall sym. (SEval sym (GenValue sym) -> Prim sym) -> Prim sym
    PFun     \SEval (What4 sym) (GenValue (What4 sym))
    xs ->
        SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym)
    forall sym. SEval sym (GenValue sym) -> Prim sym
    PPrim
           do [W4Eval sym (GenValue (What4 sym))]
    blks <- Integer
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> [SEval (What4 sym) (GenValue (What4 sym))]
    forall sym n a.
    (Backend sym, Integral n) =>
    n -> SeqMap sym a -> [SEval sym a]
    enumerateSeqMap Integer
    n (SeqMap (What4 sym) (GenValue (What4 sym))
     -> [W4Eval sym (GenValue (What4 sym))])
    -> (GenValue (What4 sym)
        -> SeqMap (What4 sym) (GenValue (What4 sym)))
    -> GenValue (What4 sym)
    -> [W4Eval sym (GenValue (What4 sym))]
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . GenValue (What4 sym) -> SeqMap (What4 sym) (GenValue (What4 sym))
    forall sym. GenValue sym -> SeqMap sym (GenValue sym)
    fromVSeq (GenValue (What4 sym) -> [W4Eval sym (GenValue (What4 sym))])
    -> W4Eval sym (GenValue (What4 sym))
    -> W4Eval sym [W4Eval sym (GenValue (What4 sym))]
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    xs
              What4 sym -> Text -> W4Eval sym ()
    forall (m :: * -> *) sym. MonadIO m => What4 sym -> Text -> m ()
    addUninterpWarning What4 sym
    sym Text
    "SHA-384"
              SymExpr sym (BaseStructType SHA512State)
    initSt <- IO (SymExpr sym (BaseStructType SHA512State))
    -> W4Eval sym (SymExpr sym (BaseStructType SHA512State))
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (What4 sym
    -> SHA512State -> IO (SymExpr sym (BaseStructType SHA512State))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> SHA512State -> IO (SymExpr sym (BaseStructType SHA512State))
    mkSHA512InitialState What4 sym
    sym SHA512State
    SHA.initialSHA384State)
              SymExpr sym (BaseStructType SHA512State)
    finalSt <- (SymExpr sym (BaseStructType SHA512State)
     -> W4Eval sym (GenValue (What4 sym))
     -> W4Eval sym (SymExpr sym (BaseStructType SHA512State)))
    -> SymExpr sym (BaseStructType SHA512State)
    -> [W4Eval sym (GenValue (What4 sym))]
    -> W4Eval sym (SymExpr sym (BaseStructType SHA512State))
    forall (t :: * -> *) (m :: * -> *) b a.
    (Foldable t, Monad m) =>
    (b -> a -> m b) -> b -> t a -> m b
    foldM (\SymExpr sym (BaseStructType SHA512State)
    st W4Eval sym (GenValue (What4 sym))
    blk -> What4 sym
    -> SymExpr sym (BaseStructType SHA512State)
    -> GenValue (What4 sym)
    -> SEval (What4 sym) (SymExpr sym (BaseStructType SHA512State))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> SymExpr sym (BaseStructType SHA512State)
    -> Value sym
    -> SEval (What4 sym) (SymExpr sym (BaseStructType SHA512State))
    processSHA512Block What4 sym
    sym SymExpr sym (BaseStructType SHA512State)
    st (GenValue (What4 sym)
     -> W4Eval sym (SymExpr sym (BaseStructType SHA512State)))
    -> W4Eval sym (GenValue (What4 sym))
    -> W4Eval sym (SymExpr sym (BaseStructType SHA512State))
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< W4Eval sym (GenValue (What4 sym))
    blk) SymExpr sym (BaseStructType SHA512State)
    initSt [W4Eval sym (GenValue (What4 sym))]
    blks
              GenValue (What4 sym) -> W4Eval sym (GenValue (What4 sym))
    forall a. a -> W4Eval sym a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (GenValue (What4 sym) -> W4Eval sym (GenValue (What4 sym)))
    -> GenValue (What4 sym) -> W4Eval sym (GenValue (What4 sym))
    forall a b. (a -> b) -> a -> b
    $ Integer
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> GenValue (What4 sym)
    forall sym. Integer -> SeqMap sym (GenValue sym) -> GenValue sym
    VSeq Integer
    6 (SeqMap (What4 sym) (GenValue (What4 sym)) -> GenValue (What4 sym))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> GenValue (What4 sym)
    forall a b. (a -> b) -> a -> b
    $ (Integer -> SEval (What4 sym) (GenValue (What4 sym)))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    forall sym a. (Integer -> SEval sym a) -> SeqMap sym a
    indexSeqMap \Integer
    i ->
                case Int -> Size SHA512State -> Maybe (Some (Index SHA512State))
    forall {k} (ctx :: Ctx k).
    Int -> Size ctx -> Maybe (Some (Index ctx))
    intIndex (Integer -> Int
    forall a. Num a => Integer -> a
    fromInteger Integer
    i) (Size SHA512State
    forall k (ctx :: Ctx k). KnownContext ctx => Size ctx
    knownSize :: Size SHA512State) of
                  Just (Some Index SHA512State x
    idx) ->
                    do SymExpr sym x
    z <- IO (SymExpr sym x) -> W4Eval sym (SymExpr sym x)
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (SymExpr sym x) -> W4Eval sym (SymExpr sym x))
    -> IO (SymExpr sym x) -> W4Eval sym (SymExpr sym x)
    forall a b. (a -> b) -> a -> b
    $ sym
    -> SymExpr sym (BaseStructType SHA512State)
    -> Index SHA512State x
    -> IO (SymExpr sym x)
    forall sym (flds :: Ctx BaseType) (tp :: BaseType).
    IsExprBuilder sym =>
    sym -> SymStruct sym flds -> Index flds tp -> IO (SymExpr sym tp)
    forall (flds :: Ctx BaseType) (tp :: BaseType).
    sym -> SymStruct sym flds -> Index flds tp -> IO (SymExpr sym tp)
    W4.structField (What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym) SymExpr sym (BaseStructType SHA512State)
    finalSt Index SHA512State x
    idx
                       case BaseTypeRepr x
    -> BaseTypeRepr (BaseBVType 64) -> Maybe (x :~: BaseBVType 64)
    forall {k} (f :: k -> *) (a :: k) (b :: k).
    TestEquality f =>
    f a -> f b -> Maybe (a :~: b)
    forall (a :: BaseType) (b :: BaseType).
    BaseTypeRepr a -> BaseTypeRepr b -> Maybe (a :~: b)
    W4.testEquality (SymExpr sym x -> BaseTypeRepr x
    forall (x :: BaseType). SymExpr sym x -> BaseTypeRepr x
    forall (e :: BaseType -> *) (tp :: BaseType).
    IsExpr e =>
    e tp -> BaseTypeRepr tp
    W4.exprType SymExpr sym x
    z) (NatRepr 64 -> BaseTypeRepr (BaseBVType 64)
    forall (w :: Natural).
    (1 <= w) =>
    NatRepr w -> BaseTypeRepr ('BaseBVType w)
    W4.BaseBVRepr (forall (n :: Natural). KnownNat n => NatRepr n
    W4.knownNat @64)) of
                         Just x :~: BaseBVType 64
    W4.Refl -> SymBV sym 64 -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym.
    IsSymExprBuilder sym =>
    SymBV sym 64 -> SEval (What4 sym) (Value sym)
    fromWord64 SymExpr sym x
    SymBV sym 64
    z
                         Maybe (x :~: BaseBVType 64)
    Nothing -> String -> [String] -> W4Eval sym (GenValue (What4 sym))
    forall a. String -> [String] -> a
    evalPanic String
    "processSHA2_384" [String
    "Index out of range", Integer -> String
    forall a. Show a => a -> String
    show Integer
    i]
                  Maybe (Some (Index SHA512State))
    Nothing -> String -> [String] -> W4Eval sym (GenValue (What4 sym))
    forall a. String -> [String] -> a
    evalPanic String
    "processSHA2_384" [String
    "Index out of range", Integer -> String
    forall a. Show a => a -> String
    show Integer
    i]

        -- {n} (fin n) => [n][16][64] -> [8][64]
      , Text
    "processSHA2_512" Text -> Prim (What4 sym) -> (Text, Prim (What4 sym))
    forall a b. a -> b -> (a, b)
    ~>
        (Integer -> Prim (What4 sym)) -> Prim (What4 sym)
    forall sym. (Integer -> Prim sym) -> Prim sym
    PFinPoly \Integer
    n ->
        (SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym))
    -> Prim (What4 sym)
    forall sym. (SEval sym (GenValue sym) -> Prim sym) -> Prim sym
    PFun     \SEval (What4 sym) (GenValue (What4 sym))
    xs ->
        SEval (What4 sym) (GenValue (What4 sym)) -> Prim (What4 sym)
    forall sym. SEval sym (GenValue sym) -> Prim sym
    PPrim
           do [W4Eval sym (GenValue (What4 sym))]
    blks <- Integer
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> [SEval (What4 sym) (GenValue (What4 sym))]
    forall sym n a.
    (Backend sym, Integral n) =>
    n -> SeqMap sym a -> [SEval sym a]
    enumerateSeqMap Integer
    n (SeqMap (What4 sym) (GenValue (What4 sym))
     -> [W4Eval sym (GenValue (What4 sym))])
    -> (GenValue (What4 sym)
        -> SeqMap (What4 sym) (GenValue (What4 sym)))
    -> GenValue (What4 sym)
    -> [W4Eval sym (GenValue (What4 sym))]
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . GenValue (What4 sym) -> SeqMap (What4 sym) (GenValue (What4 sym))
    forall sym. GenValue sym -> SeqMap sym (GenValue sym)
    fromVSeq (GenValue (What4 sym) -> [W4Eval sym (GenValue (What4 sym))])
    -> W4Eval sym (GenValue (What4 sym))
    -> W4Eval sym [W4Eval sym (GenValue (What4 sym))]
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    xs
              What4 sym -> Text -> W4Eval sym ()
    forall (m :: * -> *) sym. MonadIO m => What4 sym -> Text -> m ()
    addUninterpWarning What4 sym
    sym Text
    "SHA-512"
              SymExpr sym (BaseStructType SHA512State)
    initSt <- IO (SymExpr sym (BaseStructType SHA512State))
    -> W4Eval sym (SymExpr sym (BaseStructType SHA512State))
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (What4 sym
    -> SHA512State -> IO (SymExpr sym (BaseStructType SHA512State))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> SHA512State -> IO (SymExpr sym (BaseStructType SHA512State))
    mkSHA512InitialState What4 sym
    sym SHA512State
    SHA.initialSHA512State)
              SymExpr sym (BaseStructType SHA512State)
    finalSt <- (SymExpr sym (BaseStructType SHA512State)
     -> W4Eval sym (GenValue (What4 sym))
     -> W4Eval sym (SymExpr sym (BaseStructType SHA512State)))
    -> SymExpr sym (BaseStructType SHA512State)
    -> [W4Eval sym (GenValue (What4 sym))]
    -> W4Eval sym (SymExpr sym (BaseStructType SHA512State))
    forall (t :: * -> *) (m :: * -> *) b a.
    (Foldable t, Monad m) =>
    (b -> a -> m b) -> b -> t a -> m b
    foldM (\SymExpr sym (BaseStructType SHA512State)
    st W4Eval sym (GenValue (What4 sym))
    blk -> What4 sym
    -> SymExpr sym (BaseStructType SHA512State)
    -> GenValue (What4 sym)
    -> SEval (What4 sym) (SymExpr sym (BaseStructType SHA512State))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> SymExpr sym (BaseStructType SHA512State)
    -> Value sym
    -> SEval (What4 sym) (SymExpr sym (BaseStructType SHA512State))
    processSHA512Block What4 sym
    sym SymExpr sym (BaseStructType SHA512State)
    st (GenValue (What4 sym)
     -> W4Eval sym (SymExpr sym (BaseStructType SHA512State)))
    -> W4Eval sym (GenValue (What4 sym))
    -> W4Eval sym (SymExpr sym (BaseStructType SHA512State))
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< W4Eval sym (GenValue (What4 sym))
    blk) SymExpr sym (BaseStructType SHA512State)
    initSt [W4Eval sym (GenValue (What4 sym))]
    blks
              GenValue (What4 sym) -> W4Eval sym (GenValue (What4 sym))
    forall a. a -> W4Eval sym a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (GenValue (What4 sym) -> W4Eval sym (GenValue (What4 sym)))
    -> GenValue (What4 sym) -> W4Eval sym (GenValue (What4 sym))
    forall a b. (a -> b) -> a -> b
    $ Integer
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> GenValue (What4 sym)
    forall sym. Integer -> SeqMap sym (GenValue sym) -> GenValue sym
    VSeq Integer
    8 (SeqMap (What4 sym) (GenValue (What4 sym)) -> GenValue (What4 sym))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> GenValue (What4 sym)
    forall a b. (a -> b) -> a -> b
    $ (Integer -> SEval (What4 sym) (GenValue (What4 sym)))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    forall sym a. (Integer -> SEval sym a) -> SeqMap sym a
    indexSeqMap \Integer
    i ->
                case Int -> Size SHA512State -> Maybe (Some (Index SHA512State))
    forall {k} (ctx :: Ctx k).
    Int -> Size ctx -> Maybe (Some (Index ctx))
    intIndex (Integer -> Int
    forall a. Num a => Integer -> a
    fromInteger Integer
    i) (Size SHA512State
    forall k (ctx :: Ctx k). KnownContext ctx => Size ctx
    knownSize :: Size SHA512State) of
                  Just (Some Index SHA512State x
    idx) ->
                    do SymExpr sym x
    z <- IO (SymExpr sym x) -> W4Eval sym (SymExpr sym x)
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (SymExpr sym x) -> W4Eval sym (SymExpr sym x))
    -> IO (SymExpr sym x) -> W4Eval sym (SymExpr sym x)
    forall a b. (a -> b) -> a -> b
    $ sym
    -> SymExpr sym (BaseStructType SHA512State)
    -> Index SHA512State x
    -> IO (SymExpr sym x)
    forall sym (flds :: Ctx BaseType) (tp :: BaseType).
    IsExprBuilder sym =>
    sym -> SymStruct sym flds -> Index flds tp -> IO (SymExpr sym tp)
    forall (flds :: Ctx BaseType) (tp :: BaseType).
    sym -> SymStruct sym flds -> Index flds tp -> IO (SymExpr sym tp)
    W4.structField (What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym) SymExpr sym (BaseStructType SHA512State)
    finalSt Index SHA512State x
    idx
                       case BaseTypeRepr x
    -> BaseTypeRepr (BaseBVType 64) -> Maybe (x :~: BaseBVType 64)
    forall {k} (f :: k -> *) (a :: k) (b :: k).
    TestEquality f =>
    f a -> f b -> Maybe (a :~: b)
    forall (a :: BaseType) (b :: BaseType).
    BaseTypeRepr a -> BaseTypeRepr b -> Maybe (a :~: b)
    W4.testEquality (SymExpr sym x -> BaseTypeRepr x
    forall (x :: BaseType). SymExpr sym x -> BaseTypeRepr x
    forall (e :: BaseType -> *) (tp :: BaseType).
    IsExpr e =>
    e tp -> BaseTypeRepr tp
    W4.exprType SymExpr sym x
    z) (NatRepr 64 -> BaseTypeRepr (BaseBVType 64)
    forall (w :: Natural).
    (1 <= w) =>
    NatRepr w -> BaseTypeRepr ('BaseBVType w)
    W4.BaseBVRepr (forall (n :: Natural). KnownNat n => NatRepr n
    W4.knownNat @64)) of
                         Just x :~: BaseBVType 64
    W4.Refl -> SymBV sym 64 -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym.
    IsSymExprBuilder sym =>
    SymBV sym 64 -> SEval (What4 sym) (Value sym)
    fromWord64 SymExpr sym x
    SymBV sym 64
    z
                         Maybe (x :~: BaseBVType 64)
    Nothing -> String -> [String] -> W4Eval sym (GenValue (What4 sym))
    forall a. String -> [String] -> a
    evalPanic String
    "processSHA2_512" [String
    "Index out of range", Integer -> String
    forall a. Show a => a -> String
    show Integer
    i]
                  Maybe (Some (Index SHA512State))
    Nothing -> String -> [String] -> W4Eval sym (GenValue (What4 sym))
    forall a. String -> [String] -> a
    evalPanic String
    "processSHA2_512" [String
    "Index out of range", Integer -> String
    forall a. Show a => a -> String
    show Integer
    i]
      ]

    type SHA256State =
      EmptyCtx ::>
        W4.BaseBVType 32 ::> W4.BaseBVType 32 ::> W4.BaseBVType 32 ::> W4.BaseBVType 32 ::>
        W4.BaseBVType 32 ::> W4.BaseBVType 32 ::> W4.BaseBVType 32 ::> W4.BaseBVType 32

    type SHA512State =
      EmptyCtx ::>
        W4.BaseBVType 64 ::> W4.BaseBVType 64 ::> W4.BaseBVType 64 ::> W4.BaseBVType 64 ::>
        W4.BaseBVType 64 ::> W4.BaseBVType 64 ::> W4.BaseBVType 64 ::> W4.BaseBVType 64

    mkSHA256InitialState :: W4.IsSymExprBuilder sym =>
      What4 sym ->
      SHA.SHA256State ->
      IO (W4.SymExpr sym (W4.BaseStructType SHA256State))
    mkSHA256InitialState :: forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> SHA256State -> IO (SymExpr sym (BaseStructType SHA256State))
    mkSHA256InitialState What4 sym
    sym (SHA.SHA256S Word32
    s0 Word32
    s1 Word32
    s2 Word32
    s3 Word32
    s4 Word32
    s5 Word32
    s6 Word32
    s7) =
      do SymExpr sym (BaseBVType 32)
    z0 <- Word32 -> IO (SymExpr sym (BaseBVType 32))
    lit Word32
    s0
         SymExpr sym (BaseBVType 32)
    z1 <- Word32 -> IO (SymExpr sym (BaseBVType 32))
    lit Word32
    s1
         SymExpr sym (BaseBVType 32)
    z2 <- Word32 -> IO (SymExpr sym (BaseBVType 32))
    lit Word32
    s2
         SymExpr sym (BaseBVType 32)
    z3 <- Word32 -> IO (SymExpr sym (BaseBVType 32))
    lit Word32
    s3
         SymExpr sym (BaseBVType 32)
    z4 <- Word32 -> IO (SymExpr sym (BaseBVType 32))
    lit Word32
    s4
         SymExpr sym (BaseBVType 32)
    z5 <- Word32 -> IO (SymExpr sym (BaseBVType 32))
    lit Word32
    s5
         SymExpr sym (BaseBVType 32)
    z6 <- Word32 -> IO (SymExpr sym (BaseBVType 32))
    lit Word32
    s6
         SymExpr sym (BaseBVType 32)
    z7 <- Word32 -> IO (SymExpr sym (BaseBVType 32))
    lit Word32
    s7
         sym
    -> Assignment (SymExpr sym) SHA256State
    -> IO (SymExpr sym (BaseStructType SHA256State))
    forall sym (flds :: Ctx BaseType).
    IsExprBuilder sym =>
    sym -> Assignment (SymExpr sym) flds -> IO (SymStruct sym flds)
    forall (flds :: Ctx BaseType).
    sym -> Assignment (SymExpr sym) flds -> IO (SymStruct sym flds)
    W4.mkStruct (What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym) (Assignment (SymExpr sym) EmptyCtx
    forall {k} (ctx :: Ctx k) (f :: k -> *).
    (ctx ~ EmptyCtx) =>
    Assignment f ctx
    Empty Assignment (SymExpr sym) EmptyCtx
    -> SymExpr sym (BaseBVType 32)
    -> Assignment (SymExpr sym) (EmptyCtx ::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 32)
    z0 Assignment (SymExpr sym) (EmptyCtx ::> BaseBVType 32)
    -> SymExpr sym (BaseBVType 32)
    -> Assignment
         (SymExpr sym) ((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 32)
    z1 Assignment
      (SymExpr sym) ((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
    -> SymExpr sym (BaseBVType 32)
    -> Assignment
         (SymExpr sym)
         (((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
          ::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 32)
    z2 Assignment
      (SymExpr sym)
      (((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
       ::> BaseBVType 32)
    -> SymExpr sym (BaseBVType 32)
    -> Assignment
         (SymExpr sym)
         ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 32)
    z3 Assignment
      (SymExpr sym)
      ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
    -> SymExpr sym (BaseBVType 32)
    -> Assignment
         (SymExpr sym)
         (((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 32)
    z4 Assignment
      (SymExpr sym)
      (((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
         ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
    -> SymExpr sym (BaseBVType 32)
    -> Assignment
         (SymExpr sym)
         ((((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 32)
    z5 Assignment
      (SymExpr sym)
      ((((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
          ::> BaseBVType 32)
         ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
    -> SymExpr sym (BaseBVType 32)
    -> Assignment
         (SymExpr sym)
         (((((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          '::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 32)
    z6 Assignment
      (SymExpr sym)
      (((((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
         ::> BaseBVType 32)
        ::> BaseBVType 32)
       '::> BaseBVType 32)
    -> SymExpr sym (BaseBVType 32)
    -> Assignment (SymExpr sym) SHA256State
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 32)
    z7)
     where lit :: Word32 -> IO (SymExpr sym (BaseBVType 32))
    lit Word32
    w = sym -> NatRepr 32 -> BV 32 -> IO (SymExpr sym (BaseBVType 32))
    forall (w :: Natural).
    (1 <= w) =>
    sym -> NatRepr w -> BV w -> IO (SymBV sym w)
    forall sym (w :: Natural).
    (IsExprBuilder sym, 1 <= w) =>
    sym -> NatRepr w -> BV w -> IO (SymBV sym w)
    W4.bvLit (What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym) (forall (n :: Natural). KnownNat n => NatRepr n
    W4.knownNat @32) (Word32 -> BV 32
    BV.word32 Word32
    w)

    mkSHA512InitialState :: W4.IsSymExprBuilder sym =>
      What4 sym ->
      SHA.SHA512State ->
      IO (W4.SymExpr sym (W4.BaseStructType SHA512State))
    mkSHA512InitialState :: forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> SHA512State -> IO (SymExpr sym (BaseStructType SHA512State))
    mkSHA512InitialState What4 sym
    sym (SHA.SHA512S Word64
    s0 Word64
    s1 Word64
    s2 Word64
    s3 Word64
    s4 Word64
    s5 Word64
    s6 Word64
    s7) =
      do SymExpr sym (BaseBVType 64)
    z0 <- Word64 -> IO (SymExpr sym (BaseBVType 64))
    lit Word64
    s0
         SymExpr sym (BaseBVType 64)
    z1 <- Word64 -> IO (SymExpr sym (BaseBVType 64))
    lit Word64
    s1
         SymExpr sym (BaseBVType 64)
    z2 <- Word64 -> IO (SymExpr sym (BaseBVType 64))
    lit Word64
    s2
         SymExpr sym (BaseBVType 64)
    z3 <- Word64 -> IO (SymExpr sym (BaseBVType 64))
    lit Word64
    s3
         SymExpr sym (BaseBVType 64)
    z4 <- Word64 -> IO (SymExpr sym (BaseBVType 64))
    lit Word64
    s4
         SymExpr sym (BaseBVType 64)
    z5 <- Word64 -> IO (SymExpr sym (BaseBVType 64))
    lit Word64
    s5
         SymExpr sym (BaseBVType 64)
    z6 <- Word64 -> IO (SymExpr sym (BaseBVType 64))
    lit Word64
    s6
         SymExpr sym (BaseBVType 64)
    z7 <- Word64 -> IO (SymExpr sym (BaseBVType 64))
    lit Word64
    s7
         sym
    -> Assignment (SymExpr sym) SHA512State
    -> IO (SymExpr sym (BaseStructType SHA512State))
    forall sym (flds :: Ctx BaseType).
    IsExprBuilder sym =>
    sym -> Assignment (SymExpr sym) flds -> IO (SymStruct sym flds)
    forall (flds :: Ctx BaseType).
    sym -> Assignment (SymExpr sym) flds -> IO (SymStruct sym flds)
    W4.mkStruct (What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym) (Assignment (SymExpr sym) EmptyCtx
    forall {k} (ctx :: Ctx k) (f :: k -> *).
    (ctx ~ EmptyCtx) =>
    Assignment f ctx
    Empty Assignment (SymExpr sym) EmptyCtx
    -> SymExpr sym (BaseBVType 64)
    -> Assignment (SymExpr sym) (EmptyCtx ::> BaseBVType 64)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 64)
    z0 Assignment (SymExpr sym) (EmptyCtx ::> BaseBVType 64)
    -> SymExpr sym (BaseBVType 64)
    -> Assignment
         (SymExpr sym) ((EmptyCtx ::> BaseBVType 64) ::> BaseBVType 64)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 64)
    z1 Assignment
      (SymExpr sym) ((EmptyCtx ::> BaseBVType 64) ::> BaseBVType 64)
    -> SymExpr sym (BaseBVType 64)
    -> Assignment
         (SymExpr sym)
         (((EmptyCtx ::> BaseBVType 64) ::> BaseBVType 64)
          ::> BaseBVType 64)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 64)
    z2 Assignment
      (SymExpr sym)
      (((EmptyCtx ::> BaseBVType 64) ::> BaseBVType 64)
       ::> BaseBVType 64)
    -> SymExpr sym (BaseBVType 64)
    -> Assignment
         (SymExpr sym)
         ((((EmptyCtx ::> BaseBVType 64) ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 64)
    z3 Assignment
      (SymExpr sym)
      ((((EmptyCtx ::> BaseBVType 64) ::> BaseBVType 64)
        ::> BaseBVType 64)
       ::> BaseBVType 64)
    -> SymExpr sym (BaseBVType 64)
    -> Assignment
         (SymExpr sym)
         (((((EmptyCtx ::> BaseBVType 64) ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 64)
    z4 Assignment
      (SymExpr sym)
      (((((EmptyCtx ::> BaseBVType 64) ::> BaseBVType 64)
         ::> BaseBVType 64)
        ::> BaseBVType 64)
       ::> BaseBVType 64)
    -> SymExpr sym (BaseBVType 64)
    -> Assignment
         (SymExpr sym)
         ((((((EmptyCtx ::> BaseBVType 64) ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 64)
    z5 Assignment
      (SymExpr sym)
      ((((((EmptyCtx ::> BaseBVType 64) ::> BaseBVType 64)
          ::> BaseBVType 64)
         ::> BaseBVType 64)
        ::> BaseBVType 64)
       ::> BaseBVType 64)
    -> SymExpr sym (BaseBVType 64)
    -> Assignment
         (SymExpr sym)
         (((((((EmptyCtx ::> BaseBVType 64) ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          '::> BaseBVType 64)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 64)
    z6 Assignment
      (SymExpr sym)
      (((((((EmptyCtx ::> BaseBVType 64) ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
         ::> BaseBVType 64)
        ::> BaseBVType 64)
       '::> BaseBVType 64)
    -> SymExpr sym (BaseBVType 64)
    -> Assignment (SymExpr sym) SHA512State
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 64)
    z7)
     where lit :: Word64 -> IO (SymExpr sym (BaseBVType 64))
    lit Word64
    w = sym -> NatRepr 64 -> BV 64 -> IO (SymExpr sym (BaseBVType 64))
    forall (w :: Natural).
    (1 <= w) =>
    sym -> NatRepr w -> BV w -> IO (SymBV sym w)
    forall sym (w :: Natural).
    (IsExprBuilder sym, 1 <= w) =>
    sym -> NatRepr w -> BV w -> IO (SymBV sym w)
    W4.bvLit (What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym) (forall (n :: Natural). KnownNat n => NatRepr n
    W4.knownNat @64) (Word64 -> BV 64
    BV.word64 Word64
    w)

    processSHA256Block :: W4.IsSymExprBuilder sym =>
      What4 sym ->
      W4.SymExpr sym (W4.BaseStructType SHA256State) ->
      Value sym ->
      SEval (What4 sym) (W4.SymExpr sym (W4.BaseStructType SHA256State))
    processSHA256Block :: forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> SymExpr sym (BaseStructType SHA256State)
    -> Value sym
    -> SEval (What4 sym) (SymExpr sym (BaseStructType SHA256State))
    processSHA256Block What4 sym
    sym SymExpr sym (BaseStructType SHA256State)
    st Value sym
    blk =
      do let ss :: SeqMap (What4 sym) (Value sym)
    ss = Value sym -> SeqMap (What4 sym) (Value sym)
    forall sym. GenValue sym -> SeqMap sym (GenValue sym)
    fromVSeq Value sym
    blk
         SymExpr sym (BaseBVType 32)
    b0  <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 32))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 32)
    toWord32 What4 sym
    sym String
    "processSHA256Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    0
         SymExpr sym (BaseBVType 32)
    b1  <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 32))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 32)
    toWord32 What4 sym
    sym String
    "processSHA256Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    1
         SymExpr sym (BaseBVType 32)
    b2  <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 32))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 32)
    toWord32 What4 sym
    sym String
    "processSHA256Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    2
         SymExpr sym (BaseBVType 32)
    b3  <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 32))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 32)
    toWord32 What4 sym
    sym String
    "processSHA256Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    3
         SymExpr sym (BaseBVType 32)
    b4  <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 32))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 32)
    toWord32 What4 sym
    sym String
    "processSHA256Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    4
         SymExpr sym (BaseBVType 32)
    b5  <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 32))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 32)
    toWord32 What4 sym
    sym String
    "processSHA256Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    5
         SymExpr sym (BaseBVType 32)
    b6  <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 32))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 32)
    toWord32 What4 sym
    sym String
    "processSHA256Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    6
         SymExpr sym (BaseBVType 32)
    b7  <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 32))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 32)
    toWord32 What4 sym
    sym String
    "processSHA256Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    7
         SymExpr sym (BaseBVType 32)
    b8  <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 32))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 32)
    toWord32 What4 sym
    sym String
    "processSHA256Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    8
         SymExpr sym (BaseBVType 32)
    b9  <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 32))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 32)
    toWord32 What4 sym
    sym String
    "processSHA256Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    9
         SymExpr sym (BaseBVType 32)
    b10 <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 32))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 32)
    toWord32 What4 sym
    sym String
    "processSHA256Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    10
         SymExpr sym (BaseBVType 32)
    b11 <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 32))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 32)
    toWord32 What4 sym
    sym String
    "processSHA256Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    11
         SymExpr sym (BaseBVType 32)
    b12 <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 32))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 32)
    toWord32 What4 sym
    sym String
    "processSHA256Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    12
         SymExpr sym (BaseBVType 32)
    b13 <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 32))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 32)
    toWord32 What4 sym
    sym String
    "processSHA256Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    13
         SymExpr sym (BaseBVType 32)
    b14 <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 32))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 32)
    toWord32 What4 sym
    sym String
    "processSHA256Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    14
         SymExpr sym (BaseBVType 32)
    b15 <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 32))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 32)
    toWord32 What4 sym
    sym String
    "processSHA256Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    15
         let args :: Assignment
      (SymExpr sym)
      (((((((((((((((((EmptyCtx ::> BaseStructType SHA256State)
                      ::> BaseBVType 32)
                     ::> BaseBVType 32)
                    ::> BaseBVType 32)
                   ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
         ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
    args = Assignment (SymExpr sym) EmptyCtx
    forall {k} (ctx :: Ctx k) (f :: k -> *).
    (ctx ~ EmptyCtx) =>
    Assignment f ctx
    Empty Assignment (SymExpr sym) EmptyCtx
    -> SymExpr sym (BaseStructType SHA256State)
    -> Assignment
         (SymExpr sym) (EmptyCtx ::> BaseStructType SHA256State)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseStructType SHA256State)
    st  Assignment (SymExpr sym) (EmptyCtx ::> BaseStructType SHA256State)
    -> SymExpr sym (BaseBVType 32)
    -> Assignment
         (SymExpr sym)
         ((EmptyCtx ::> BaseStructType SHA256State) ::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :>
                      SymExpr sym (BaseBVType 32)
    b0  Assignment
      (SymExpr sym)
      ((EmptyCtx ::> BaseStructType SHA256State) ::> BaseBVType 32)
    -> SymExpr sym (BaseBVType 32)
    -> Assignment
         (SymExpr sym)
         (((EmptyCtx ::> BaseStructType SHA256State) ::> BaseBVType 32)
          ::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 32)
    b1  Assignment
      (SymExpr sym)
      (((EmptyCtx ::> BaseStructType SHA256State) ::> BaseBVType 32)
       ::> BaseBVType 32)
    -> SymExpr sym (BaseBVType 32)
    -> Assignment
         (SymExpr sym)
         ((((EmptyCtx ::> BaseStructType SHA256State) ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 32)
    b2  Assignment
      (SymExpr sym)
      ((((EmptyCtx ::> BaseStructType SHA256State) ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
    -> SymExpr sym (BaseBVType 32)
    -> Assignment
         (SymExpr sym)
         (((((EmptyCtx ::> BaseStructType SHA256State) ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 32)
    b3 Assignment
      (SymExpr sym)
      (((((EmptyCtx ::> BaseStructType SHA256State) ::> BaseBVType 32)
         ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
    -> SymExpr sym (BaseBVType 32)
    -> Assignment
         (SymExpr sym)
         ((((((EmptyCtx ::> BaseStructType SHA256State) ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :>
                      SymExpr sym (BaseBVType 32)
    b4  Assignment
      (SymExpr sym)
      ((((((EmptyCtx ::> BaseStructType SHA256State) ::> BaseBVType 32)
          ::> BaseBVType 32)
         ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
    -> SymExpr sym (BaseBVType 32)
    -> Assignment
         (SymExpr sym)
         (((((((EmptyCtx ::> BaseStructType SHA256State) ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 32)
    b5  Assignment
      (SymExpr sym)
      (((((((EmptyCtx ::> BaseStructType SHA256State) ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
         ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
    -> SymExpr sym (BaseBVType 32)
    -> Assignment
         (SymExpr sym)
         ((((((((EmptyCtx ::> BaseStructType SHA256State) ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 32)
    b6  Assignment
      (SymExpr sym)
      ((((((((EmptyCtx ::> BaseStructType SHA256State) ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
         ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
    -> SymExpr sym (BaseBVType 32)
    -> Assignment
         (SymExpr sym)
         (((((((((EmptyCtx ::> BaseStructType SHA256State)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 32)
    b7 Assignment
      (SymExpr sym)
      (((((((((EmptyCtx ::> BaseStructType SHA256State)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
         ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
    -> SymExpr sym (BaseBVType 32)
    -> Assignment
         (SymExpr sym)
         ((((((((((EmptyCtx ::> BaseStructType SHA256State)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :>
                      SymExpr sym (BaseBVType 32)
    b8  Assignment
      (SymExpr sym)
      ((((((((((EmptyCtx ::> BaseStructType SHA256State)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
         ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
    -> SymExpr sym (BaseBVType 32)
    -> Assignment
         (SymExpr sym)
         (((((((((((EmptyCtx ::> BaseStructType SHA256State)
                   ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 32)
    b9  Assignment
      (SymExpr sym)
      (((((((((((EmptyCtx ::> BaseStructType SHA256State)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
         ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
    -> SymExpr sym (BaseBVType 32)
    -> Assignment
         (SymExpr sym)
         ((((((((((((EmptyCtx ::> BaseStructType SHA256State)
                    ::> BaseBVType 32)
                   ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 32)
    b10 Assignment
      (SymExpr sym)
      ((((((((((((EmptyCtx ::> BaseStructType SHA256State)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
         ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
    -> SymExpr sym (BaseBVType 32)
    -> Assignment
         (SymExpr sym)
         (((((((((((((EmptyCtx ::> BaseStructType SHA256State)
                     ::> BaseBVType 32)
                    ::> BaseBVType 32)
                   ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 32)
    b11 Assignment
      (SymExpr sym)
      (((((((((((((EmptyCtx ::> BaseStructType SHA256State)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
         ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
    -> SymExpr sym (BaseBVType 32)
    -> Assignment
         (SymExpr sym)
         ((((((((((((((EmptyCtx ::> BaseStructType SHA256State)
                      ::> BaseBVType 32)
                     ::> BaseBVType 32)
                    ::> BaseBVType 32)
                   ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :>
                      SymExpr sym (BaseBVType 32)
    b12 Assignment
      (SymExpr sym)
      ((((((((((((((EmptyCtx ::> BaseStructType SHA256State)
                   ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
         ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
    -> SymExpr sym (BaseBVType 32)
    -> Assignment
         (SymExpr sym)
         (((((((((((((((EmptyCtx ::> BaseStructType SHA256State)
                       ::> BaseBVType 32)
                      ::> BaseBVType 32)
                     ::> BaseBVType 32)
                    ::> BaseBVType 32)
                   ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 32)
    b13 Assignment
      (SymExpr sym)
      (((((((((((((((EmptyCtx ::> BaseStructType SHA256State)
                    ::> BaseBVType 32)
                   ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
         ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
    -> SymExpr sym (BaseBVType 32)
    -> Assignment
         (SymExpr sym)
         ((((((((((((((((EmptyCtx ::> BaseStructType SHA256State)
                        ::> BaseBVType 32)
                       ::> BaseBVType 32)
                      ::> BaseBVType 32)
                     ::> BaseBVType 32)
                    ::> BaseBVType 32)
                   ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 32)
    b14 Assignment
      (SymExpr sym)
      ((((((((((((((((EmptyCtx ::> BaseStructType SHA256State)
                     ::> BaseBVType 32)
                    ::> BaseBVType 32)
                   ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
         ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
    -> SymExpr sym (BaseBVType 32)
    -> Assignment
         (SymExpr sym)
         (((((((((((((((((EmptyCtx ::> BaseStructType SHA256State)
                         ::> BaseBVType 32)
                        ::> BaseBVType 32)
                       ::> BaseBVType 32)
                      ::> BaseBVType 32)
                     ::> BaseBVType 32)
                    ::> BaseBVType 32)
                   ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 32)
    b15
         let ret :: BaseTypeRepr (BaseStructType SHA256State)
    ret = SymExpr sym (BaseStructType SHA256State)
    -> BaseTypeRepr (BaseStructType SHA256State)
    forall (tp :: BaseType). SymExpr sym tp -> BaseTypeRepr tp
    forall (e :: BaseType -> *) (tp :: BaseType).
    IsExpr e =>
    e tp -> BaseTypeRepr tp
    W4.exprType SymExpr sym (BaseStructType SHA256State)
    st
         SymFn
      sym
      (((((((((((((((((EmptyCtx ::> BaseStructType SHA256State)
                      ::> BaseBVType 32)
                     ::> BaseBVType 32)
                    ::> BaseBVType 32)
                   ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
         ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
      (BaseStructType SHA256State)
    fn <- IO
      (SymFn
         sym
         (((((((((((((((((EmptyCtx ::> BaseStructType SHA256State)
                         ::> BaseBVType 32)
                        ::> BaseBVType 32)
                       ::> BaseBVType 32)
                      ::> BaseBVType 32)
                     ::> BaseBVType 32)
                    ::> BaseBVType 32)
                   ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
         (BaseStructType SHA256State))
    -> W4Eval
         sym
         (SymFn
            sym
            (((((((((((((((((EmptyCtx ::> BaseStructType SHA256State)
                            ::> BaseBVType 32)
                           ::> BaseBVType 32)
                          ::> BaseBVType 32)
                         ::> BaseBVType 32)
                        ::> BaseBVType 32)
                       ::> BaseBVType 32)
                      ::> BaseBVType 32)
                     ::> BaseBVType 32)
                    ::> BaseBVType 32)
                   ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            (BaseStructType SHA256State))
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO
       (SymFn
          sym
          (((((((((((((((((EmptyCtx ::> BaseStructType SHA256State)
                          ::> BaseBVType 32)
                         ::> BaseBVType 32)
                        ::> BaseBVType 32)
                       ::> BaseBVType 32)
                      ::> BaseBVType 32)
                     ::> BaseBVType 32)
                    ::> BaseBVType 32)
                   ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          (BaseStructType SHA256State))
     -> W4Eval
          sym
          (SymFn
             sym
             (((((((((((((((((EmptyCtx ::> BaseStructType SHA256State)
                             ::> BaseBVType 32)
                            ::> BaseBVType 32)
                           ::> BaseBVType 32)
                          ::> BaseBVType 32)
                         ::> BaseBVType 32)
                        ::> BaseBVType 32)
                       ::> BaseBVType 32)
                      ::> BaseBVType 32)
                     ::> BaseBVType 32)
                    ::> BaseBVType 32)
                   ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             (BaseStructType SHA256State)))
    -> IO
         (SymFn
            sym
            (((((((((((((((((EmptyCtx ::> BaseStructType SHA256State)
                            ::> BaseBVType 32)
                           ::> BaseBVType 32)
                          ::> BaseBVType 32)
                         ::> BaseBVType 32)
                        ::> BaseBVType 32)
                       ::> BaseBVType 32)
                      ::> BaseBVType 32)
                     ::> BaseBVType 32)
                    ::> BaseBVType 32)
                   ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            (BaseStructType SHA256State))
    -> W4Eval
         sym
         (SymFn
            sym
            (((((((((((((((((EmptyCtx ::> BaseStructType SHA256State)
                            ::> BaseBVType 32)
                           ::> BaseBVType 32)
                          ::> BaseBVType 32)
                         ::> BaseBVType 32)
                        ::> BaseBVType 32)
                       ::> BaseBVType 32)
                      ::> BaseBVType 32)
                     ::> BaseBVType 32)
                    ::> BaseBVType 32)
                   ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            (BaseStructType SHA256State))
    forall a b. (a -> b) -> a -> b
    $ What4 sym
    -> Text
    -> Assignment
         BaseTypeRepr
         (((((((((((((((((EmptyCtx ::> BaseStructType SHA256State)
                         ::> BaseBVType 32)
                        ::> BaseBVType 32)
                       ::> BaseBVType 32)
                      ::> BaseBVType 32)
                     ::> BaseBVType 32)
                    ::> BaseBVType 32)
                   ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
    -> BaseTypeRepr (BaseStructType SHA256State)
    -> IO
         (SymFn
            sym
            (((((((((((((((((EmptyCtx ::> BaseStructType SHA256State)
                            ::> BaseBVType 32)
                           ::> BaseBVType 32)
                          ::> BaseBVType 32)
                         ::> BaseBVType 32)
                        ::> BaseBVType 32)
                       ::> BaseBVType 32)
                      ::> BaseBVType 32)
                     ::> BaseBVType 32)
                    ::> BaseBVType 32)
                   ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            (BaseStructType SHA256State))
    forall sym (args :: Ctx BaseType) (ret :: BaseType).
    IsSymExprBuilder sym =>
    What4 sym
    -> Text
    -> Assignment BaseTypeRepr args
    -> BaseTypeRepr ret
    -> IO (SymFn sym args ret)
    getUninterpFn What4 sym
    sym Text
    "processSHA256Block" ((forall (tp :: BaseType). SymExpr sym tp -> BaseTypeRepr tp)
    -> forall (x :: Ctx BaseType).
       Assignment (SymExpr sym) x -> Assignment BaseTypeRepr x
    forall k l (t :: (k -> *) -> l -> *) (f :: k -> *) (g :: k -> *).
    FunctorFC t =>
    (forall (x :: k). f x -> g x) -> forall (x :: l). t f x -> t g x
    forall (f :: BaseType -> *) (g :: BaseType -> *).
    (forall (x :: BaseType). f x -> g x)
    -> forall (x :: Ctx BaseType). Assignment f x -> Assignment g x
    fmapFC SymExpr sym x -> BaseTypeRepr x
    forall (tp :: BaseType). SymExpr sym tp -> BaseTypeRepr tp
    forall (e :: BaseType -> *) (tp :: BaseType).
    IsExpr e =>
    e tp -> BaseTypeRepr tp
    W4.exprType Assignment
      (SymExpr sym)
      (((((((((((((((((EmptyCtx ::> BaseStructType SHA256State)
                      ::> BaseBVType 32)
                     ::> BaseBVType 32)
                    ::> BaseBVType 32)
                   ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
         ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
    args) BaseTypeRepr (BaseStructType SHA256State)
    ret
         IO (SymExpr sym (BaseStructType SHA256State))
    -> W4Eval sym (SymExpr sym (BaseStructType SHA256State))
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (SymExpr sym (BaseStructType SHA256State))
     -> W4Eval sym (SymExpr sym (BaseStructType SHA256State)))
    -> IO (SymExpr sym (BaseStructType SHA256State))
    -> W4Eval sym (SymExpr sym (BaseStructType SHA256State))
    forall a b. (a -> b) -> a -> b
    $ sym
    -> SymFn
         sym
         (((((((((((((((((EmptyCtx ::> BaseStructType SHA256State)
                         ::> BaseBVType 32)
                        ::> BaseBVType 32)
                       ::> BaseBVType 32)
                      ::> BaseBVType 32)
                     ::> BaseBVType 32)
                    ::> BaseBVType 32)
                   ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
         (BaseStructType SHA256State)
    -> Assignment
         (SymExpr sym)
         (((((((((((((((((EmptyCtx ::> BaseStructType SHA256State)
                         ::> BaseBVType 32)
                        ::> BaseBVType 32)
                       ::> BaseBVType 32)
                      ::> BaseBVType 32)
                     ::> BaseBVType 32)
                    ::> BaseBVType 32)
                   ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
    -> IO (SymExpr sym (BaseStructType SHA256State))
    forall sym (args :: Ctx BaseType) (ret :: BaseType).
    IsSymExprBuilder sym =>
    sym
    -> SymFn sym args ret
    -> Assignment (SymExpr sym) args
    -> IO (SymExpr sym ret)
    forall (args :: Ctx BaseType) (ret :: BaseType).
    sym
    -> SymFn sym args ret
    -> Assignment (SymExpr sym) args
    -> IO (SymExpr sym ret)
    W4.applySymFn (What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym) SymFn
      sym
      (((((((((((((((((EmptyCtx ::> BaseStructType SHA256State)
                      ::> BaseBVType 32)
                     ::> BaseBVType 32)
                    ::> BaseBVType 32)
                   ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
         ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
      (BaseStructType SHA256State)
    fn Assignment
      (SymExpr sym)
      (((((((((((((((((EmptyCtx ::> BaseStructType SHA256State)
                      ::> BaseBVType 32)
                     ::> BaseBVType 32)
                    ::> BaseBVType 32)
                   ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
         ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
    args

    processSHA512Block :: W4.IsSymExprBuilder sym =>
      What4 sym ->
      W4.SymExpr sym (W4.BaseStructType SHA512State) ->
      Value sym ->
      SEval (What4 sym) (W4.SymExpr sym (W4.BaseStructType SHA512State))
    processSHA512Block :: forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> SymExpr sym (BaseStructType SHA512State)
    -> Value sym
    -> SEval (What4 sym) (SymExpr sym (BaseStructType SHA512State))
    processSHA512Block What4 sym
    sym SymExpr sym (BaseStructType SHA512State)
    st Value sym
    blk =
      do let ss :: SeqMap (What4 sym) (Value sym)
    ss = Value sym -> SeqMap (What4 sym) (Value sym)
    forall sym. GenValue sym -> SeqMap sym (GenValue sym)
    fromVSeq Value sym
    blk
         SymExpr sym (BaseBVType 64)
    b0  <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 64))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 64)
    toWord64 What4 sym
    sym String
    "processSHA512Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    0
         SymExpr sym (BaseBVType 64)
    b1  <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 64))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 64)
    toWord64 What4 sym
    sym String
    "processSHA512Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    1
         SymExpr sym (BaseBVType 64)
    b2  <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 64))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 64)
    toWord64 What4 sym
    sym String
    "processSHA512Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    2
         SymExpr sym (BaseBVType 64)
    b3  <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 64))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 64)
    toWord64 What4 sym
    sym String
    "processSHA512Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    3
         SymExpr sym (BaseBVType 64)
    b4  <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 64))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 64)
    toWord64 What4 sym
    sym String
    "processSHA512Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    4
         SymExpr sym (BaseBVType 64)
    b5  <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 64))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 64)
    toWord64 What4 sym
    sym String
    "processSHA512Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    5
         SymExpr sym (BaseBVType 64)
    b6  <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 64))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 64)
    toWord64 What4 sym
    sym String
    "processSHA512Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    6
         SymExpr sym (BaseBVType 64)
    b7  <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 64))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 64)
    toWord64 What4 sym
    sym String
    "processSHA512Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    7
         SymExpr sym (BaseBVType 64)
    b8  <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 64))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 64)
    toWord64 What4 sym
    sym String
    "processSHA512Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    8
         SymExpr sym (BaseBVType 64)
    b9  <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 64))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 64)
    toWord64 What4 sym
    sym String
    "processSHA512Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    9
         SymExpr sym (BaseBVType 64)
    b10 <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 64))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 64)
    toWord64 What4 sym
    sym String
    "processSHA512Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    10
         SymExpr sym (BaseBVType 64)
    b11 <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 64))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 64)
    toWord64 What4 sym
    sym String
    "processSHA512Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    11
         SymExpr sym (BaseBVType 64)
    b12 <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 64))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 64)
    toWord64 What4 sym
    sym String
    "processSHA512Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    12
         SymExpr sym (BaseBVType 64)
    b13 <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 64))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 64)
    toWord64 What4 sym
    sym String
    "processSHA512Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    13
         SymExpr sym (BaseBVType 64)
    b14 <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 64))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 64)
    toWord64 What4 sym
    sym String
    "processSHA512Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    14
         SymExpr sym (BaseBVType 64)
    b15 <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 64))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 64)
    toWord64 What4 sym
    sym String
    "processSHA512Block" SeqMap (What4 sym) (Value sym)
    ss Integer
    15
         let args :: Assignment
      (SymExpr sym)
      (((((((((((((((((EmptyCtx ::> BaseStructType SHA512State)
                      ::> BaseBVType 64)
                     ::> BaseBVType 64)
                    ::> BaseBVType 64)
                   ::> BaseBVType 64)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
         ::> BaseBVType 64)
        ::> BaseBVType 64)
       ::> BaseBVType 64)
    args = Assignment (SymExpr sym) EmptyCtx
    forall {k} (ctx :: Ctx k) (f :: k -> *).
    (ctx ~ EmptyCtx) =>
    Assignment f ctx
    Empty Assignment (SymExpr sym) EmptyCtx
    -> SymExpr sym (BaseStructType SHA512State)
    -> Assignment
         (SymExpr sym) (EmptyCtx ::> BaseStructType SHA512State)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseStructType SHA512State)
    st  Assignment (SymExpr sym) (EmptyCtx ::> BaseStructType SHA512State)
    -> SymExpr sym (BaseBVType 64)
    -> Assignment
         (SymExpr sym)
         ((EmptyCtx ::> BaseStructType SHA512State) ::> BaseBVType 64)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :>
                      SymExpr sym (BaseBVType 64)
    b0  Assignment
      (SymExpr sym)
      ((EmptyCtx ::> BaseStructType SHA512State) ::> BaseBVType 64)
    -> SymExpr sym (BaseBVType 64)
    -> Assignment
         (SymExpr sym)
         (((EmptyCtx ::> BaseStructType SHA512State) ::> BaseBVType 64)
          ::> BaseBVType 64)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 64)
    b1  Assignment
      (SymExpr sym)
      (((EmptyCtx ::> BaseStructType SHA512State) ::> BaseBVType 64)
       ::> BaseBVType 64)
    -> SymExpr sym (BaseBVType 64)
    -> Assignment
         (SymExpr sym)
         ((((EmptyCtx ::> BaseStructType SHA512State) ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 64)
    b2  Assignment
      (SymExpr sym)
      ((((EmptyCtx ::> BaseStructType SHA512State) ::> BaseBVType 64)
        ::> BaseBVType 64)
       ::> BaseBVType 64)
    -> SymExpr sym (BaseBVType 64)
    -> Assignment
         (SymExpr sym)
         (((((EmptyCtx ::> BaseStructType SHA512State) ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 64)
    b3 Assignment
      (SymExpr sym)
      (((((EmptyCtx ::> BaseStructType SHA512State) ::> BaseBVType 64)
         ::> BaseBVType 64)
        ::> BaseBVType 64)
       ::> BaseBVType 64)
    -> SymExpr sym (BaseBVType 64)
    -> Assignment
         (SymExpr sym)
         ((((((EmptyCtx ::> BaseStructType SHA512State) ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :>
                      SymExpr sym (BaseBVType 64)
    b4  Assignment
      (SymExpr sym)
      ((((((EmptyCtx ::> BaseStructType SHA512State) ::> BaseBVType 64)
          ::> BaseBVType 64)
         ::> BaseBVType 64)
        ::> BaseBVType 64)
       ::> BaseBVType 64)
    -> SymExpr sym (BaseBVType 64)
    -> Assignment
         (SymExpr sym)
         (((((((EmptyCtx ::> BaseStructType SHA512State) ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 64)
    b5  Assignment
      (SymExpr sym)
      (((((((EmptyCtx ::> BaseStructType SHA512State) ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
         ::> BaseBVType 64)
        ::> BaseBVType 64)
       ::> BaseBVType 64)
    -> SymExpr sym (BaseBVType 64)
    -> Assignment
         (SymExpr sym)
         ((((((((EmptyCtx ::> BaseStructType SHA512State) ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 64)
    b6  Assignment
      (SymExpr sym)
      ((((((((EmptyCtx ::> BaseStructType SHA512State) ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
         ::> BaseBVType 64)
        ::> BaseBVType 64)
       ::> BaseBVType 64)
    -> SymExpr sym (BaseBVType 64)
    -> Assignment
         (SymExpr sym)
         (((((((((EmptyCtx ::> BaseStructType SHA512State)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 64)
    b7 Assignment
      (SymExpr sym)
      (((((((((EmptyCtx ::> BaseStructType SHA512State)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
         ::> BaseBVType 64)
        ::> BaseBVType 64)
       ::> BaseBVType 64)
    -> SymExpr sym (BaseBVType 64)
    -> Assignment
         (SymExpr sym)
         ((((((((((EmptyCtx ::> BaseStructType SHA512State)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :>
                      SymExpr sym (BaseBVType 64)
    b8  Assignment
      (SymExpr sym)
      ((((((((((EmptyCtx ::> BaseStructType SHA512State)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
         ::> BaseBVType 64)
        ::> BaseBVType 64)
       ::> BaseBVType 64)
    -> SymExpr sym (BaseBVType 64)
    -> Assignment
         (SymExpr sym)
         (((((((((((EmptyCtx ::> BaseStructType SHA512State)
                   ::> BaseBVType 64)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 64)
    b9  Assignment
      (SymExpr sym)
      (((((((((((EmptyCtx ::> BaseStructType SHA512State)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
         ::> BaseBVType 64)
        ::> BaseBVType 64)
       ::> BaseBVType 64)
    -> SymExpr sym (BaseBVType 64)
    -> Assignment
         (SymExpr sym)
         ((((((((((((EmptyCtx ::> BaseStructType SHA512State)
                    ::> BaseBVType 64)
                   ::> BaseBVType 64)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 64)
    b10 Assignment
      (SymExpr sym)
      ((((((((((((EmptyCtx ::> BaseStructType SHA512State)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
         ::> BaseBVType 64)
        ::> BaseBVType 64)
       ::> BaseBVType 64)
    -> SymExpr sym (BaseBVType 64)
    -> Assignment
         (SymExpr sym)
         (((((((((((((EmptyCtx ::> BaseStructType SHA512State)
                     ::> BaseBVType 64)
                    ::> BaseBVType 64)
                   ::> BaseBVType 64)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 64)
    b11 Assignment
      (SymExpr sym)
      (((((((((((((EmptyCtx ::> BaseStructType SHA512State)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
         ::> BaseBVType 64)
        ::> BaseBVType 64)
       ::> BaseBVType 64)
    -> SymExpr sym (BaseBVType 64)
    -> Assignment
         (SymExpr sym)
         ((((((((((((((EmptyCtx ::> BaseStructType SHA512State)
                      ::> BaseBVType 64)
                     ::> BaseBVType 64)
                    ::> BaseBVType 64)
                   ::> BaseBVType 64)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :>
                      SymExpr sym (BaseBVType 64)
    b12 Assignment
      (SymExpr sym)
      ((((((((((((((EmptyCtx ::> BaseStructType SHA512State)
                   ::> BaseBVType 64)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
         ::> BaseBVType 64)
        ::> BaseBVType 64)
       ::> BaseBVType 64)
    -> SymExpr sym (BaseBVType 64)
    -> Assignment
         (SymExpr sym)
         (((((((((((((((EmptyCtx ::> BaseStructType SHA512State)
                       ::> BaseBVType 64)
                      ::> BaseBVType 64)
                     ::> BaseBVType 64)
                    ::> BaseBVType 64)
                   ::> BaseBVType 64)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 64)
    b13 Assignment
      (SymExpr sym)
      (((((((((((((((EmptyCtx ::> BaseStructType SHA512State)
                    ::> BaseBVType 64)
                   ::> BaseBVType 64)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
         ::> BaseBVType 64)
        ::> BaseBVType 64)
       ::> BaseBVType 64)
    -> SymExpr sym (BaseBVType 64)
    -> Assignment
         (SymExpr sym)
         ((((((((((((((((EmptyCtx ::> BaseStructType SHA512State)
                        ::> BaseBVType 64)
                       ::> BaseBVType 64)
                      ::> BaseBVType 64)
                     ::> BaseBVType 64)
                    ::> BaseBVType 64)
                   ::> BaseBVType 64)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 64)
    b14 Assignment
      (SymExpr sym)
      ((((((((((((((((EmptyCtx ::> BaseStructType SHA512State)
                     ::> BaseBVType 64)
                    ::> BaseBVType 64)
                   ::> BaseBVType 64)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
         ::> BaseBVType 64)
        ::> BaseBVType 64)
       ::> BaseBVType 64)
    -> SymExpr sym (BaseBVType 64)
    -> Assignment
         (SymExpr sym)
         (((((((((((((((((EmptyCtx ::> BaseStructType SHA512State)
                         ::> BaseBVType 64)
                        ::> BaseBVType 64)
                       ::> BaseBVType 64)
                      ::> BaseBVType 64)
                     ::> BaseBVType 64)
                    ::> BaseBVType 64)
                   ::> BaseBVType 64)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 64)
    b15
         let ret :: BaseTypeRepr (BaseStructType SHA512State)
    ret = SymExpr sym (BaseStructType SHA512State)
    -> BaseTypeRepr (BaseStructType SHA512State)
    forall (tp :: BaseType). SymExpr sym tp -> BaseTypeRepr tp
    forall (e :: BaseType -> *) (tp :: BaseType).
    IsExpr e =>
    e tp -> BaseTypeRepr tp
    W4.exprType SymExpr sym (BaseStructType SHA512State)
    st
         SymFn
      sym
      (((((((((((((((((EmptyCtx ::> BaseStructType SHA512State)
                      ::> BaseBVType 64)
                     ::> BaseBVType 64)
                    ::> BaseBVType 64)
                   ::> BaseBVType 64)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
         ::> BaseBVType 64)
        ::> BaseBVType 64)
       ::> BaseBVType 64)
      (BaseStructType SHA512State)
    fn <- IO
      (SymFn
         sym
         (((((((((((((((((EmptyCtx ::> BaseStructType SHA512State)
                         ::> BaseBVType 64)
                        ::> BaseBVType 64)
                       ::> BaseBVType 64)
                      ::> BaseBVType 64)
                     ::> BaseBVType 64)
                    ::> BaseBVType 64)
                   ::> BaseBVType 64)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
         (BaseStructType SHA512State))
    -> W4Eval
         sym
         (SymFn
            sym
            (((((((((((((((((EmptyCtx ::> BaseStructType SHA512State)
                            ::> BaseBVType 64)
                           ::> BaseBVType 64)
                          ::> BaseBVType 64)
                         ::> BaseBVType 64)
                        ::> BaseBVType 64)
                       ::> BaseBVType 64)
                      ::> BaseBVType 64)
                     ::> BaseBVType 64)
                    ::> BaseBVType 64)
                   ::> BaseBVType 64)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            (BaseStructType SHA512State))
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO
       (SymFn
          sym
          (((((((((((((((((EmptyCtx ::> BaseStructType SHA512State)
                          ::> BaseBVType 64)
                         ::> BaseBVType 64)
                        ::> BaseBVType 64)
                       ::> BaseBVType 64)
                      ::> BaseBVType 64)
                     ::> BaseBVType 64)
                    ::> BaseBVType 64)
                   ::> BaseBVType 64)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          (BaseStructType SHA512State))
     -> W4Eval
          sym
          (SymFn
             sym
             (((((((((((((((((EmptyCtx ::> BaseStructType SHA512State)
                             ::> BaseBVType 64)
                            ::> BaseBVType 64)
                           ::> BaseBVType 64)
                          ::> BaseBVType 64)
                         ::> BaseBVType 64)
                        ::> BaseBVType 64)
                       ::> BaseBVType 64)
                      ::> BaseBVType 64)
                     ::> BaseBVType 64)
                    ::> BaseBVType 64)
                   ::> BaseBVType 64)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             (BaseStructType SHA512State)))
    -> IO
         (SymFn
            sym
            (((((((((((((((((EmptyCtx ::> BaseStructType SHA512State)
                            ::> BaseBVType 64)
                           ::> BaseBVType 64)
                          ::> BaseBVType 64)
                         ::> BaseBVType 64)
                        ::> BaseBVType 64)
                       ::> BaseBVType 64)
                      ::> BaseBVType 64)
                     ::> BaseBVType 64)
                    ::> BaseBVType 64)
                   ::> BaseBVType 64)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            (BaseStructType SHA512State))
    -> W4Eval
         sym
         (SymFn
            sym
            (((((((((((((((((EmptyCtx ::> BaseStructType SHA512State)
                            ::> BaseBVType 64)
                           ::> BaseBVType 64)
                          ::> BaseBVType 64)
                         ::> BaseBVType 64)
                        ::> BaseBVType 64)
                       ::> BaseBVType 64)
                      ::> BaseBVType 64)
                     ::> BaseBVType 64)
                    ::> BaseBVType 64)
                   ::> BaseBVType 64)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            (BaseStructType SHA512State))
    forall a b. (a -> b) -> a -> b
    $ What4 sym
    -> Text
    -> Assignment
         BaseTypeRepr
         (((((((((((((((((EmptyCtx ::> BaseStructType SHA512State)
                         ::> BaseBVType 64)
                        ::> BaseBVType 64)
                       ::> BaseBVType 64)
                      ::> BaseBVType 64)
                     ::> BaseBVType 64)
                    ::> BaseBVType 64)
                   ::> BaseBVType 64)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
    -> BaseTypeRepr (BaseStructType SHA512State)
    -> IO
         (SymFn
            sym
            (((((((((((((((((EmptyCtx ::> BaseStructType SHA512State)
                            ::> BaseBVType 64)
                           ::> BaseBVType 64)
                          ::> BaseBVType 64)
                         ::> BaseBVType 64)
                        ::> BaseBVType 64)
                       ::> BaseBVType 64)
                      ::> BaseBVType 64)
                     ::> BaseBVType 64)
                    ::> BaseBVType 64)
                   ::> BaseBVType 64)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            (BaseStructType SHA512State))
    forall sym (args :: Ctx BaseType) (ret :: BaseType).
    IsSymExprBuilder sym =>
    What4 sym
    -> Text
    -> Assignment BaseTypeRepr args
    -> BaseTypeRepr ret
    -> IO (SymFn sym args ret)
    getUninterpFn What4 sym
    sym Text
    "processSHA512Block" ((forall (tp :: BaseType). SymExpr sym tp -> BaseTypeRepr tp)
    -> forall (x :: Ctx BaseType).
       Assignment (SymExpr sym) x -> Assignment BaseTypeRepr x
    forall k l (t :: (k -> *) -> l -> *) (f :: k -> *) (g :: k -> *).
    FunctorFC t =>
    (forall (x :: k). f x -> g x) -> forall (x :: l). t f x -> t g x
    forall (f :: BaseType -> *) (g :: BaseType -> *).
    (forall (x :: BaseType). f x -> g x)
    -> forall (x :: Ctx BaseType). Assignment f x -> Assignment g x
    fmapFC SymExpr sym x -> BaseTypeRepr x
    forall (tp :: BaseType). SymExpr sym tp -> BaseTypeRepr tp
    forall (e :: BaseType -> *) (tp :: BaseType).
    IsExpr e =>
    e tp -> BaseTypeRepr tp
    W4.exprType Assignment
      (SymExpr sym)
      (((((((((((((((((EmptyCtx ::> BaseStructType SHA512State)
                      ::> BaseBVType 64)
                     ::> BaseBVType 64)
                    ::> BaseBVType 64)
                   ::> BaseBVType 64)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
         ::> BaseBVType 64)
        ::> BaseBVType 64)
       ::> BaseBVType 64)
    args) BaseTypeRepr (BaseStructType SHA512State)
    ret
         IO (SymExpr sym (BaseStructType SHA512State))
    -> W4Eval sym (SymExpr sym (BaseStructType SHA512State))
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (SymExpr sym (BaseStructType SHA512State))
     -> W4Eval sym (SymExpr sym (BaseStructType SHA512State)))
    -> IO (SymExpr sym (BaseStructType SHA512State))
    -> W4Eval sym (SymExpr sym (BaseStructType SHA512State))
    forall a b. (a -> b) -> a -> b
    $ sym
    -> SymFn
         sym
         (((((((((((((((((EmptyCtx ::> BaseStructType SHA512State)
                         ::> BaseBVType 64)
                        ::> BaseBVType 64)
                       ::> BaseBVType 64)
                      ::> BaseBVType 64)
                     ::> BaseBVType 64)
                    ::> BaseBVType 64)
                   ::> BaseBVType 64)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
         (BaseStructType SHA512State)
    -> Assignment
         (SymExpr sym)
         (((((((((((((((((EmptyCtx ::> BaseStructType SHA512State)
                         ::> BaseBVType 64)
                        ::> BaseBVType 64)
                       ::> BaseBVType 64)
                      ::> BaseBVType 64)
                     ::> BaseBVType 64)
                    ::> BaseBVType 64)
                   ::> BaseBVType 64)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
    -> IO (SymExpr sym (BaseStructType SHA512State))
    forall sym (args :: Ctx BaseType) (ret :: BaseType).
    IsSymExprBuilder sym =>
    sym
    -> SymFn sym args ret
    -> Assignment (SymExpr sym) args
    -> IO (SymExpr sym ret)
    forall (args :: Ctx BaseType) (ret :: BaseType).
    sym
    -> SymFn sym args ret
    -> Assignment (SymExpr sym) args
    -> IO (SymExpr sym ret)
    W4.applySymFn (What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym) SymFn
      sym
      (((((((((((((((((EmptyCtx ::> BaseStructType SHA512State)
                      ::> BaseBVType 64)
                     ::> BaseBVType 64)
                    ::> BaseBVType 64)
                   ::> BaseBVType 64)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
         ::> BaseBVType 64)
        ::> BaseBVType 64)
       ::> BaseBVType 64)
      (BaseStructType SHA512State)
    fn Assignment
      (SymExpr sym)
      (((((((((((((((((EmptyCtx ::> BaseStructType SHA512State)
                      ::> BaseBVType 64)
                     ::> BaseBVType 64)
                    ::> BaseBVType 64)
                   ::> BaseBVType 64)
                  ::> BaseBVType 64)
                 ::> BaseBVType 64)
                ::> BaseBVType 64)
               ::> BaseBVType 64)
              ::> BaseBVType 64)
             ::> BaseBVType 64)
            ::> BaseBVType 64)
           ::> BaseBVType 64)
          ::> BaseBVType 64)
         ::> BaseBVType 64)
        ::> BaseBVType 64)
       ::> BaseBVType 64)
    args

    addUninterpWarning :: MonadIO m => What4 sym -> Text -> m ()
    addUninterpWarning :: forall (m :: * -> *) sym. MonadIO m => What4 sym -> Text -> m ()
    addUninterpWarning What4 sym
    sym Text
    nm = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (MVar (Set Text) -> (Set Text -> IO (Set Text)) -> IO ()
    forall a. MVar a -> (a -> IO a) -> IO ()
    modifyMVar_ (What4 sym -> MVar (Set Text)
    forall sym. What4 sym -> MVar (Set Text)
    w4uninterpWarns What4 sym
    sym) (Set Text -> IO (Set Text)
    forall a. a -> IO a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (Set Text -> IO (Set Text))
    -> (Set Text -> Set Text) -> Set Text -> IO (Set Text)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Text -> Set Text -> Set Text
    forall a. Ord a => a -> Set a -> Set a
    Set.insert Text
    nm))

    -- | Retrieve the named uninterpreted function, with the given argument types and
    --   return type, from a cache.  Create a fresh function if it has not previously
    --   been requested.  A particular named function is required to be used with
    --   consistent types every time it is requested; otherwise this function will panic.
    getUninterpFn :: W4.IsSymExprBuilder sym =>
      What4 sym ->
      Text {- ^ Function name -} ->
      Assignment W4.BaseTypeRepr args {- ^ function argument types -} ->
      W4.BaseTypeRepr ret {- ^ function return type -} ->
      IO (W4.SymFn sym args ret)
    getUninterpFn :: forall sym (args :: Ctx BaseType) (ret :: BaseType).
    IsSymExprBuilder sym =>
    What4 sym
    -> Text
    -> Assignment BaseTypeRepr args
    -> BaseTypeRepr ret
    -> IO (SymFn sym args ret)
    getUninterpFn What4 sym
    sym Text
    funNm Assignment BaseTypeRepr args
    args BaseTypeRepr ret
    ret =
      MVar (What4FunCache sym)
    -> (What4FunCache sym
        -> IO (What4FunCache sym, SymFn sym args ret))
    -> IO (SymFn sym args ret)
    forall a b. MVar a -> (a -> IO (a, b)) -> IO b
    modifyMVar (What4 sym -> MVar (What4FunCache sym)
    forall sym. What4 sym -> MVar (What4FunCache sym)
    w4funs What4 sym
    sym) ((What4FunCache sym -> IO (What4FunCache sym, SymFn sym args ret))
     -> IO (SymFn sym args ret))
    -> (What4FunCache sym
        -> IO (What4FunCache sym, SymFn sym args ret))
    -> IO (SymFn sym args ret)
    forall a b. (a -> b) -> a -> b
    $ \What4FunCache sym
    m ->
        case Text -> What4FunCache sym -> Maybe (SomeSymFn sym)
    forall k a. Ord k => k -> Map k a -> Maybe a
    Map.lookup Text
    funNm What4FunCache sym
    m of
          Maybe (SomeSymFn sym)
    Nothing ->
            do SymFn sym args ret
    fn <- sym
    -> SolverSymbol
    -> Assignment BaseTypeRepr args
    -> BaseTypeRepr ret
    -> IO (SymFn sym args ret)
    forall sym (args :: Ctx BaseType) (ret :: BaseType).
    IsSymExprBuilder sym =>
    sym
    -> SolverSymbol
    -> Assignment BaseTypeRepr args
    -> BaseTypeRepr ret
    -> IO (SymFn sym args ret)
    forall (args :: Ctx BaseType) (ret :: BaseType).
    sym
    -> SolverSymbol
    -> Assignment BaseTypeRepr args
    -> BaseTypeRepr ret
    -> IO (SymFn sym args ret)
    W4.freshTotalUninterpFn (What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym) (String -> SolverSymbol
    W4.safeSymbol (Text -> String
    Text.unpack Text
    funNm)) Assignment BaseTypeRepr args
    args BaseTypeRepr ret
    ret
               let m' :: What4FunCache sym
    m' = Text -> SomeSymFn sym -> What4FunCache sym -> What4FunCache sym
    forall k a. Ord k => k -> a -> Map k a -> Map k a
    Map.insert Text
    funNm (SymFn sym args ret -> SomeSymFn sym
    forall sym (args :: Ctx BaseType) (ret :: BaseType).
    SymFn sym args ret -> SomeSymFn sym
    SomeSymFn SymFn sym args ret
    fn) What4FunCache sym
    m
               (What4FunCache sym, SymFn sym args ret)
    -> IO (What4FunCache sym, SymFn sym args ret)
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (What4FunCache sym
    m', SymFn sym args ret
    fn)

          Just (SomeSymFn SymFn sym args ret
    fn)
            | Just args :~: args
    W4.Refl <- Assignment BaseTypeRepr args
    -> Assignment BaseTypeRepr args -> Maybe (args :~: args)
    forall {k} (f :: k -> *) (a :: k) (b :: k).
    TestEquality f =>
    f a -> f b -> Maybe (a :~: b)
    forall (a :: Ctx BaseType) (b :: Ctx BaseType).
    Assignment BaseTypeRepr a
    -> Assignment BaseTypeRepr b -> Maybe (a :~: b)
    W4.testEquality Assignment BaseTypeRepr args
    args (SymFn sym args ret -> Assignment BaseTypeRepr args
    forall (args :: Ctx BaseType) (ret :: BaseType).
    SymFn sym args ret -> Assignment BaseTypeRepr args
    forall (fn :: Ctx BaseType -> BaseType -> *) (args :: Ctx BaseType)
           (ret :: BaseType).
    IsSymFn fn =>
    fn args ret -> Assignment BaseTypeRepr args
    W4.fnArgTypes SymFn sym args ret
    fn)
            , Just ret :~: ret
    W4.Refl <- BaseTypeRepr ret -> BaseTypeRepr ret -> Maybe (ret :~: ret)
    forall {k} (f :: k -> *) (a :: k) (b :: k).
    TestEquality f =>
    f a -> f b -> Maybe (a :~: b)
    forall (a :: BaseType) (b :: BaseType).
    BaseTypeRepr a -> BaseTypeRepr b -> Maybe (a :~: b)
    W4.testEquality BaseTypeRepr ret
    ret (SymFn sym args ret -> BaseTypeRepr ret
    forall (args :: Ctx BaseType) (ret :: BaseType).
    SymFn sym args ret -> BaseTypeRepr ret
    forall (fn :: Ctx BaseType -> BaseType -> *) (args :: Ctx BaseType)
           (ret :: BaseType).
    IsSymFn fn =>
    fn args ret -> BaseTypeRepr ret
    W4.fnReturnType SymFn sym args ret
    SymFn sym args ret
    fn)
            -> (What4FunCache sym, SymFn sym args ret)
    -> IO (What4FunCache sym, SymFn sym args ret)
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (What4FunCache sym
    m, SymFn sym args ret
    SymFn sym args ret
    fn)

            | Bool
    otherwise -> String -> [String] -> IO (What4FunCache sym, SymFn sym args ret)
    forall a. HasCallStack => String -> [String] -> a
    panic String
    "getUninterpFn"
                               [ String
    "Function" String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ Text -> String
    forall a. Show a => a -> String
    show Text
    funNm String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ String
    "used at incompatible types"
                               , String
    "Created with types:"
                               , Assignment BaseTypeRepr args -> String
    forall a. Show a => a -> String
    show (SymFn sym args ret -> Assignment BaseTypeRepr args
    forall (args :: Ctx BaseType) (ret :: BaseType).
    SymFn sym args ret -> Assignment BaseTypeRepr args
    forall (fn :: Ctx BaseType -> BaseType -> *) (args :: Ctx BaseType)
           (ret :: BaseType).
    IsSymFn fn =>
    fn args ret -> Assignment BaseTypeRepr args
    W4.fnArgTypes SymFn sym args ret
    fn) String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ String
    " -> " String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ BaseTypeRepr ret -> String
    forall a. Show a => a -> String
    show (SymFn sym args ret -> BaseTypeRepr ret
    forall (args :: Ctx BaseType) (ret :: BaseType).
    SymFn sym args ret -> BaseTypeRepr ret
    forall (fn :: Ctx BaseType -> BaseType -> *) (args :: Ctx BaseType)
           (ret :: BaseType).
    IsSymFn fn =>
    fn args ret -> BaseTypeRepr ret
    W4.fnReturnType SymFn sym args ret
    fn)
                               , String
    "Requested at types:"
                               , Assignment BaseTypeRepr args -> String
    forall a. Show a => a -> String
    show Assignment BaseTypeRepr args
    args String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ String
    " -> " String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ BaseTypeRepr ret -> String
    forall a. Show a => a -> String
    show BaseTypeRepr ret
    ret
                               ]

    toWord32 :: W4.IsSymExprBuilder sym =>
      What4 sym -> String -> SeqMap (What4 sym) (GenValue (What4 sym)) -> Integer -> SEval (What4 sym) (W4.SymBV sym 32)
    toWord32 :: forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 32)
    toWord32 What4 sym
    sym String
    nm SeqMap (What4 sym) (GenValue (What4 sym))
    ss Integer
    i =
      do SWord sym
    x <- What4 sym
    -> String
    -> GenValue (What4 sym)
    -> SEval (What4 sym) (SWord (What4 sym))
    forall sym.
    Backend sym =>
    sym -> String -> GenValue sym -> SEval sym (SWord sym)
    fromVWord What4 sym
    sym String
    nm (GenValue (What4 sym) -> W4Eval sym (SWord sym))
    -> W4Eval sym (GenValue (What4 sym)) -> W4Eval sym (SWord sym)
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym a. Backend sym => SeqMap sym a -> Integer -> SEval sym a
    lookupSeqMap SeqMap (What4 sym) (GenValue (What4 sym))
    ss Integer
    i
         case SWord sym
    x of
           SW.DBV SymBV sym w
    x' | Just w :~: 32
    W4.Refl <- NatRepr w -> NatRepr 32 -> Maybe (w :~: 32)
    forall (a :: Natural) (b :: Natural).
    NatRepr a -> NatRepr b -> Maybe (a :~: b)
    forall {k} (f :: k -> *) (a :: k) (b :: k).
    TestEquality f =>
    f a -> f b -> Maybe (a :~: b)
    W4.testEquality (SymBV sym w -> NatRepr w
    forall (w :: Natural). SymExpr sym (BaseBVType w) -> NatRepr w
    forall (e :: BaseType -> *) (w :: Natural).
    IsExpr e =>
    e (BaseBVType w) -> NatRepr w
    W4.bvWidth SymBV sym w
    x') (forall (n :: Natural). KnownNat n => NatRepr n
    W4.knownNat @32) -> SymBV sym 32 -> W4Eval sym (SymBV sym 32)
    forall a. a -> W4Eval sym a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure SymBV sym w
    SymBV sym 32
    x'
           SWord sym
    _ -> String -> [String] -> W4Eval sym (SymBV sym 32)
    forall a. HasCallStack => String -> [String] -> a
    panic String
    nm [String
    "Unexpected word size", Integer -> String
    forall a. Show a => a -> String
    show (SWord sym -> Integer
    forall sym. SWord sym -> Integer
    SW.bvWidth SWord sym
    x)]

    fromWord32 :: W4.IsSymExprBuilder sym => W4.SymBV sym 32 -> SEval (What4 sym) (Value sym)
    fromWord32 :: forall sym.
    IsSymExprBuilder sym =>
    SymBV sym 32 -> SEval (What4 sym) (Value sym)
    fromWord32 = GenValue (What4 sym) -> W4Eval sym (GenValue (What4 sym))
    forall a. a -> W4Eval sym a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (GenValue (What4 sym) -> W4Eval sym (GenValue (What4 sym)))
    -> (SymExpr sym (BaseBVType 32) -> GenValue (What4 sym))
    -> SymExpr sym (BaseBVType 32)
    -> W4Eval sym (GenValue (What4 sym))
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Integer -> WordValue (What4 sym) -> GenValue (What4 sym)
    forall sym. Integer -> WordValue sym -> GenValue sym
    VWord Integer
    32 (WordValue (What4 sym) -> GenValue (What4 sym))
    -> (SymExpr sym (BaseBVType 32) -> WordValue (What4 sym))
    -> SymExpr sym (BaseBVType 32)
    -> GenValue (What4 sym)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . SWord sym -> WordValue (What4 sym)
    SWord (What4 sym) -> WordValue (What4 sym)
    forall sym. SWord sym -> WordValue sym
    wordVal (SWord sym -> WordValue (What4 sym))
    -> (SymExpr sym (BaseBVType 32) -> SWord sym)
    -> SymExpr sym (BaseBVType 32)
    -> WordValue (What4 sym)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . SymExpr sym (BaseBVType 32) -> SWord sym
    forall sym (w :: Natural).
    (IsExpr (SymExpr sym), 1 <= w) =>
    SymBV sym w -> SWord sym
    SW.DBV

    toWord64 :: W4.IsSymExprBuilder sym =>
      What4 sym -> String -> SeqMap (What4 sym) (GenValue (What4 sym)) -> Integer -> SEval (What4 sym) (W4.SymBV sym 64)
    toWord64 :: forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 64)
    toWord64 What4 sym
    sym String
    nm SeqMap (What4 sym) (GenValue (What4 sym))
    ss Integer
    i =
      do SWord sym
    x <- What4 sym
    -> String
    -> GenValue (What4 sym)
    -> SEval (What4 sym) (SWord (What4 sym))
    forall sym.
    Backend sym =>
    sym -> String -> GenValue sym -> SEval sym (SWord sym)
    fromVWord What4 sym
    sym String
    nm (GenValue (What4 sym) -> W4Eval sym (SWord sym))
    -> W4Eval sym (GenValue (What4 sym)) -> W4Eval sym (SWord sym)
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym a. Backend sym => SeqMap sym a -> Integer -> SEval sym a
    lookupSeqMap SeqMap (What4 sym) (GenValue (What4 sym))
    ss Integer
    i
         case SWord sym
    x of
           SW.DBV SymBV sym w
    x' | Just w :~: 64
    W4.Refl <- NatRepr w -> NatRepr 64 -> Maybe (w :~: 64)
    forall (a :: Natural) (b :: Natural).
    NatRepr a -> NatRepr b -> Maybe (a :~: b)
    forall {k} (f :: k -> *) (a :: k) (b :: k).
    TestEquality f =>
    f a -> f b -> Maybe (a :~: b)
    W4.testEquality (SymBV sym w -> NatRepr w
    forall (w :: Natural). SymExpr sym (BaseBVType w) -> NatRepr w
    forall (e :: BaseType -> *) (w :: Natural).
    IsExpr e =>
    e (BaseBVType w) -> NatRepr w
    W4.bvWidth SymBV sym w
    x') (forall (n :: Natural). KnownNat n => NatRepr n
    W4.knownNat @64) -> SymBV sym 64 -> W4Eval sym (SymBV sym 64)
    forall a. a -> W4Eval sym a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure SymBV sym w
    SymBV sym 64
    x'
           SWord sym
    _ -> String -> [String] -> W4Eval sym (SymBV sym 64)
    forall a. HasCallStack => String -> [String] -> a
    panic String
    nm [String
    "Unexpected word size", Integer -> String
    forall a. Show a => a -> String
    show (SWord sym -> Integer
    forall sym. SWord sym -> Integer
    SW.bvWidth SWord sym
    x)]

    fromWord64 :: W4.IsSymExprBuilder sym => W4.SymBV sym 64 -> SEval (What4 sym) (Value sym)
    fromWord64 :: forall sym.
    IsSymExprBuilder sym =>
    SymBV sym 64 -> SEval (What4 sym) (Value sym)
    fromWord64 = GenValue (What4 sym) -> W4Eval sym (GenValue (What4 sym))
    forall a. a -> W4Eval sym a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (GenValue (What4 sym) -> W4Eval sym (GenValue (What4 sym)))
    -> (SymExpr sym (BaseBVType 64) -> GenValue (What4 sym))
    -> SymExpr sym (BaseBVType 64)
    -> W4Eval sym (GenValue (What4 sym))
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Integer -> WordValue (What4 sym) -> GenValue (What4 sym)
    forall sym. Integer -> WordValue sym -> GenValue sym
    VWord Integer
    64 (WordValue (What4 sym) -> GenValue (What4 sym))
    -> (SymExpr sym (BaseBVType 64) -> WordValue (What4 sym))
    -> SymExpr sym (BaseBVType 64)
    -> GenValue (What4 sym)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . SWord sym -> WordValue (What4 sym)
    SWord (What4 sym) -> WordValue (What4 sym)
    forall sym. SWord sym -> WordValue sym
    wordVal (SWord sym -> WordValue (What4 sym))
    -> (SymExpr sym (BaseBVType 64) -> SWord sym)
    -> SymExpr sym (BaseBVType 64)
    -> WordValue (What4 sym)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . SymExpr sym (BaseBVType 64) -> SWord sym
    forall sym (w :: Natural).
    (IsExpr (SymExpr sym), 1 <= w) =>
    SymBV sym w -> SWord sym
    SW.DBV

    -- | Apply the named uninterpreted function to a sequence of @[4][32]@ values,
    --   and return a sequence of @[4][32]@ values.  This shape of function is used
    --   for most of the SuiteB AES primitives.
    applyAESStateFunc :: forall sym. W4.IsSymExprBuilder sym =>
      What4 sym -> Text -> Value sym -> SEval (What4 sym) (Value sym)
    applyAESStateFunc :: forall sym.
    IsSymExprBuilder sym =>
    What4 sym -> Text -> Value sym -> SEval (What4 sym) (Value sym)
    applyAESStateFunc What4 sym
    sym Text
    funNm Value sym
    x =
      do let ss :: SeqMap (What4 sym) (Value sym)
    ss = Value sym -> SeqMap (What4 sym) (Value sym)
    forall sym. GenValue sym -> SeqMap sym (GenValue sym)
    fromVSeq Value sym
    x
         SymExpr sym (BaseBVType 32)
    w0 <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 32))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 32)
    toWord32 What4 sym
    sym String
    nm SeqMap (What4 sym) (Value sym)
    ss Integer
    0
         SymExpr sym (BaseBVType 32)
    w1 <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 32))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 32)
    toWord32 What4 sym
    sym String
    nm SeqMap (What4 sym) (Value sym)
    ss Integer
    1
         SymExpr sym (BaseBVType 32)
    w2 <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 32))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 32)
    toWord32 What4 sym
    sym String
    nm SeqMap (What4 sym) (Value sym)
    ss Integer
    2
         SymExpr sym (BaseBVType 32)
    w3 <- What4 sym
    -> String
    -> SeqMap (What4 sym) (Value sym)
    -> Integer
    -> SEval (What4 sym) (SymExpr sym (BaseBVType 32))
    forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> String
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SymBV sym 32)
    toWord32 What4 sym
    sym String
    nm SeqMap (What4 sym) (Value sym)
    ss Integer
    3
         SymFn
      sym
      ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
      ('BaseStructType
         ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32))
    fn <- IO
      (SymFn
         sym
         ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
         ('BaseStructType
            ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)))
    -> W4Eval
         sym
         (SymFn
            sym
            ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ('BaseStructType
               ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)))
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO
       (SymFn
          sym
          ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
            ::> BaseBVType 32)
           ::> BaseBVType 32)
          ('BaseStructType
             ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)))
     -> W4Eval
          sym
          (SymFn
             sym
             ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)
             ('BaseStructType
                ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32))))
    -> IO
         (SymFn
            sym
            ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ('BaseStructType
               ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)))
    -> W4Eval
         sym
         (SymFn
            sym
            ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ('BaseStructType
               ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)))
    forall a b. (a -> b) -> a -> b
    $ What4 sym
    -> Text
    -> Assignment
         BaseTypeRepr
         ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
    -> BaseTypeRepr
         ('BaseStructType
            ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32))
    -> IO
         (SymFn
            sym
            ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)
            ('BaseStructType
               ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)))
    forall sym (args :: Ctx BaseType) (ret :: BaseType).
    IsSymExprBuilder sym =>
    What4 sym
    -> Text
    -> Assignment BaseTypeRepr args
    -> BaseTypeRepr ret
    -> IO (SymFn sym args ret)
    getUninterpFn What4 sym
    sym Text
    funNm Assignment
      BaseTypeRepr
      ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
    argCtx (Assignment
      BaseTypeRepr
      ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
    -> BaseTypeRepr
         ('BaseStructType
            ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32))
    forall (ctx :: Ctx BaseType).
    Assignment BaseTypeRepr ctx -> BaseTypeRepr ('BaseStructType ctx)
    W4.BaseStructRepr Assignment
      BaseTypeRepr
      ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
    argCtx)
         SymExpr
      sym
      ('BaseStructType
         ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32))
    z  <- IO
      (SymExpr
         sym
         ('BaseStructType
            ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32)))
    -> W4Eval
         sym
         (SymExpr
            sym
            ('BaseStructType
               ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)))
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO
       (SymExpr
          sym
          ('BaseStructType
             ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
               ::> BaseBVType 32)
              ::> BaseBVType 32)))
     -> W4Eval
          sym
          (SymExpr
             sym
             ('BaseStructType
                ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
                  ::> BaseBVType 32)
                 ::> BaseBVType 32))))
    -> IO
         (SymExpr
            sym
            ('BaseStructType
               ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)))
    -> W4Eval
         sym
         (SymExpr
            sym
            ('BaseStructType
               ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)))
    forall a b. (a -> b) -> a -> b
    $ sym
    -> SymFn
         sym
         ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
         ('BaseStructType
            ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32))
    -> Assignment
         (SymExpr sym)
         ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
    -> IO
         (SymExpr
            sym
            ('BaseStructType
               ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
                 ::> BaseBVType 32)
                ::> BaseBVType 32)))
    forall sym (args :: Ctx BaseType) (ret :: BaseType).
    IsSymExprBuilder sym =>
    sym
    -> SymFn sym args ret
    -> Assignment (SymExpr sym) args
    -> IO (SymExpr sym ret)
    forall (args :: Ctx BaseType) (ret :: BaseType).
    sym
    -> SymFn sym args ret
    -> Assignment (SymExpr sym) args
    -> IO (SymExpr sym ret)
    W4.applySymFn (What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym) SymFn
      sym
      ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
      ('BaseStructType
         ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32))
    fn (Assignment (SymExpr sym) EmptyCtx
    forall {k} (ctx :: Ctx k) (f :: k -> *).
    (ctx ~ EmptyCtx) =>
    Assignment f ctx
    Empty Assignment (SymExpr sym) EmptyCtx
    -> SymExpr sym (BaseBVType 32)
    -> Assignment (SymExpr sym) (EmptyCtx ::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 32)
    w0 Assignment (SymExpr sym) (EmptyCtx ::> BaseBVType 32)
    -> SymExpr sym (BaseBVType 32)
    -> Assignment
         (SymExpr sym) ((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 32)
    w1 Assignment
      (SymExpr sym) ((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
    -> SymExpr sym (BaseBVType 32)
    -> Assignment
         (SymExpr sym)
         (((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
          ::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 32)
    w2 Assignment
      (SymExpr sym)
      (((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
       ::> BaseBVType 32)
    -> SymExpr sym (BaseBVType 32)
    -> Assignment
         (SymExpr sym)
         ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
    forall {k} (ctx' :: Ctx k) (f :: k -> *) (ctx :: Ctx k) (tp :: k).
    (ctx' ~ (ctx ::> tp)) =>
    Assignment f ctx -> f tp -> Assignment f ctx'
    :> SymExpr sym (BaseBVType 32)
    w3)
         Value sym -> W4Eval sym (Value sym)
    forall a. a -> W4Eval sym a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (Value sym -> W4Eval sym (Value sym))
    -> Value sym -> W4Eval sym (Value sym)
    forall a b. (a -> b) -> a -> b
    $ Integer -> SeqMap (What4 sym) (Value sym) -> Value sym
    forall sym. Integer -> SeqMap sym (GenValue sym) -> GenValue sym
    VSeq Integer
    4 (SeqMap (What4 sym) (Value sym) -> Value sym)
    -> SeqMap (What4 sym) (Value sym) -> Value sym
    forall a b. (a -> b) -> a -> b
    $ (Integer -> SEval (What4 sym) (Value sym))
    -> SeqMap (What4 sym) (Value sym)
    forall sym a. (Integer -> SEval sym a) -> SeqMap sym a
    indexSeqMap \Integer
    i ->
           if | Integer
    i Integer -> Integer -> Bool
    forall a. Eq a => a -> a -> Bool
    == Integer
    0 -> SymExpr sym (BaseBVType 32) -> SEval (What4 sym) (Value sym)
    SymExpr sym (BaseBVType 32) -> W4Eval sym (Value sym)
    forall sym.
    IsSymExprBuilder sym =>
    SymBV sym 32 -> SEval (What4 sym) (Value sym)
    fromWord32 (SymExpr sym (BaseBVType 32) -> W4Eval sym (Value sym))
    -> W4Eval sym (SymExpr sym (BaseBVType 32))
    -> W4Eval sym (Value sym)
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< IO (SymExpr sym (BaseBVType 32))
    -> W4Eval sym (SymExpr sym (BaseBVType 32))
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (sym
    -> SymExpr
         sym
         ('BaseStructType
            ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32))
    -> Index
         ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
         (BaseBVType 32)
    -> IO (SymExpr sym (BaseBVType 32))
    forall sym (flds :: Ctx BaseType) (tp :: BaseType).
    IsExprBuilder sym =>
    sym -> SymStruct sym flds -> Index flds tp -> IO (SymExpr sym tp)
    forall (flds :: Ctx BaseType) (tp :: BaseType).
    sym -> SymStruct sym flds -> Index flds tp -> IO (SymExpr sym tp)
    W4.structField (What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym) SymExpr
      sym
      ('BaseStructType
         ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32))
    z (forall (n :: Natural) (ctx :: Ctx BaseType) (r :: BaseType).
    Idx n ctx r =>
    Index ctx r
    forall {k} (n :: Natural) (ctx :: Ctx k) (r :: k).
    Idx n ctx r =>
    Index ctx r
    natIndex @0))
              | Integer
    i Integer -> Integer -> Bool
    forall a. Eq a => a -> a -> Bool
    == Integer
    1 -> SymExpr sym (BaseBVType 32) -> SEval (What4 sym) (Value sym)
    SymExpr sym (BaseBVType 32) -> W4Eval sym (Value sym)
    forall sym.
    IsSymExprBuilder sym =>
    SymBV sym 32 -> SEval (What4 sym) (Value sym)
    fromWord32 (SymExpr sym (BaseBVType 32) -> W4Eval sym (Value sym))
    -> W4Eval sym (SymExpr sym (BaseBVType 32))
    -> W4Eval sym (Value sym)
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< IO (SymExpr sym (BaseBVType 32))
    -> W4Eval sym (SymExpr sym (BaseBVType 32))
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (sym
    -> SymExpr
         sym
         ('BaseStructType
            ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32))
    -> Index
         ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
         (BaseBVType 32)
    -> IO (SymExpr sym (BaseBVType 32))
    forall sym (flds :: Ctx BaseType) (tp :: BaseType).
    IsExprBuilder sym =>
    sym -> SymStruct sym flds -> Index flds tp -> IO (SymExpr sym tp)
    forall (flds :: Ctx BaseType) (tp :: BaseType).
    sym -> SymStruct sym flds -> Index flds tp -> IO (SymExpr sym tp)
    W4.structField (What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym) SymExpr
      sym
      ('BaseStructType
         ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32))
    z (forall (n :: Natural) (ctx :: Ctx BaseType) (r :: BaseType).
    Idx n ctx r =>
    Index ctx r
    forall {k} (n :: Natural) (ctx :: Ctx k) (r :: k).
    Idx n ctx r =>
    Index ctx r
    natIndex @1))
              | Integer
    i Integer -> Integer -> Bool
    forall a. Eq a => a -> a -> Bool
    == Integer
    2 -> SymExpr sym (BaseBVType 32) -> SEval (What4 sym) (Value sym)
    SymExpr sym (BaseBVType 32) -> W4Eval sym (Value sym)
    forall sym.
    IsSymExprBuilder sym =>
    SymBV sym 32 -> SEval (What4 sym) (Value sym)
    fromWord32 (SymExpr sym (BaseBVType 32) -> W4Eval sym (Value sym))
    -> W4Eval sym (SymExpr sym (BaseBVType 32))
    -> W4Eval sym (Value sym)
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< IO (SymExpr sym (BaseBVType 32))
    -> W4Eval sym (SymExpr sym (BaseBVType 32))
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (sym
    -> SymExpr
         sym
         ('BaseStructType
            ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32))
    -> Index
         ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
         (BaseBVType 32)
    -> IO (SymExpr sym (BaseBVType 32))
    forall sym (flds :: Ctx BaseType) (tp :: BaseType).
    IsExprBuilder sym =>
    sym -> SymStruct sym flds -> Index flds tp -> IO (SymExpr sym tp)
    forall (flds :: Ctx BaseType) (tp :: BaseType).
    sym -> SymStruct sym flds -> Index flds tp -> IO (SymExpr sym tp)
    W4.structField (What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym) SymExpr
      sym
      ('BaseStructType
         ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32))
    z (forall (n :: Natural) (ctx :: Ctx BaseType) (r :: BaseType).
    Idx n ctx r =>
    Index ctx r
    forall {k} (n :: Natural) (ctx :: Ctx k) (r :: k).
    Idx n ctx r =>
    Index ctx r
    natIndex @2))
              | Integer
    i Integer -> Integer -> Bool
    forall a. Eq a => a -> a -> Bool
    == Integer
    3 -> SymExpr sym (BaseBVType 32) -> SEval (What4 sym) (Value sym)
    SymExpr sym (BaseBVType 32) -> W4Eval sym (Value sym)
    forall sym.
    IsSymExprBuilder sym =>
    SymBV sym 32 -> SEval (What4 sym) (Value sym)
    fromWord32 (SymExpr sym (BaseBVType 32) -> W4Eval sym (Value sym))
    -> W4Eval sym (SymExpr sym (BaseBVType 32))
    -> W4Eval sym (Value sym)
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< IO (SymExpr sym (BaseBVType 32))
    -> W4Eval sym (SymExpr sym (BaseBVType 32))
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (sym
    -> SymExpr
         sym
         ('BaseStructType
            ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
              ::> BaseBVType 32)
             ::> BaseBVType 32))
    -> Index
         ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32)
         (BaseBVType 32)
    -> IO (SymExpr sym (BaseBVType 32))
    forall sym (flds :: Ctx BaseType) (tp :: BaseType).
    IsExprBuilder sym =>
    sym -> SymStruct sym flds -> Index flds tp -> IO (SymExpr sym tp)
    forall (flds :: Ctx BaseType) (tp :: BaseType).
    sym -> SymStruct sym flds -> Index flds tp -> IO (SymExpr sym tp)
    W4.structField (What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym) SymExpr
      sym
      ('BaseStructType
         ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
           ::> BaseBVType 32)
          ::> BaseBVType 32))
    z (forall (n :: Natural) (ctx :: Ctx BaseType) (r :: BaseType).
    Idx n ctx r =>
    Index ctx r
    forall {k} (n :: Natural) (ctx :: Ctx k) (r :: k).
    Idx n ctx r =>
    Index ctx r
    natIndex @3))
              | Bool
    otherwise -> String -> [String] -> W4Eval sym (Value sym)
    forall a. String -> [String] -> a
    evalPanic String
    "applyAESStateFunc" [String
    "Index out of range", Text -> String
    forall a. Show a => a -> String
    show Text
    funNm, Integer -> String
    forall a. Show a => a -> String
    show Integer
    i]

     where
       nm :: String
    nm = Text -> String
    Text.unpack Text
    funNm

       argCtx :: Assignment W4.BaseTypeRepr
                     (EmptyCtx ::> W4.BaseBVType 32 ::> W4.BaseBVType 32 ::> W4.BaseBVType 32 ::> W4.BaseBVType 32)
       argCtx :: Assignment
      BaseTypeRepr
      ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
    argCtx = Assignment
      BaseTypeRepr
      ((((EmptyCtx ::> BaseBVType 32) ::> BaseBVType 32)
        ::> BaseBVType 32)
       ::> BaseBVType 32)
    forall k (f :: k -> *) (ctx :: k). KnownRepr f ctx => f ctx
    W4.knownRepr

    indexFront_int ::
      W4.IsSymExprBuilder sym =>
      What4 sym ->
      Nat' ->
      TValue ->
      SeqMap (What4 sym) (GenValue (What4 sym)) ->
      TValue ->
      SInteger (What4 sym) ->
      SEval (What4 sym) (Value sym)
    indexFront_int :: forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> Nat'
    -> TValue
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> TValue
    -> SInteger (What4 sym)
    -> SEval (What4 sym) (GenValue (What4 sym))
    indexFront_int What4 sym
    sym Nat'
    mblen TValue
    _a SeqMap (What4 sym) (GenValue (What4 sym))
    xs TValue
    _ix SInteger (What4 sym)
    idx
      | Just Integer
    i <- SymExpr sym BaseIntegerType -> Maybe Integer
    forall (e :: BaseType -> *).
    IsExpr e =>
    e BaseIntegerType -> Maybe Integer
    W4.asInteger SymExpr sym BaseIntegerType
    SInteger (What4 sym)
    idx
      = SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym a. Backend sym => SeqMap sym a -> Integer -> SEval sym a
    lookupSeqMap SeqMap (What4 sym) (GenValue (What4 sym))
    xs Integer
    i

      | (Integer
    lo, Just Integer
    hi) <- (Integer, Maybe Integer)
    bounds
      = case (Integer
     -> Maybe (W4Eval sym (GenValue (What4 sym)))
     -> Maybe (W4Eval sym (GenValue (What4 sym))))
    -> Maybe (W4Eval sym (GenValue (What4 sym)))
    -> [Integer]
    -> Maybe (W4Eval sym (GenValue (What4 sym)))
    forall a b. (a -> b -> b) -> b -> [a] -> b
    forall (t :: * -> *) a b.
    Foldable t =>
    (a -> b -> b) -> b -> t a -> b
    foldr Integer
    -> Maybe (W4Eval sym (GenValue (What4 sym)))
    -> Maybe (W4Eval sym (GenValue (What4 sym)))
    f Maybe (W4Eval sym (GenValue (What4 sym)))
    forall a. Maybe a
    Nothing [Integer
    lo .. Integer
    hi] of
          Maybe (W4Eval sym (GenValue (What4 sym)))
    Nothing -> What4 sym -> EvalError -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym a. Backend sym => sym -> EvalError -> SEval sym a
    forall a. What4 sym -> EvalError -> SEval (What4 sym) a
    raiseError What4 sym
    sym (Maybe Integer -> EvalError
    InvalidIndex Maybe Integer
    forall a. Maybe a
    Nothing)
          Just W4Eval sym (GenValue (What4 sym))
    m  -> SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    m

      | Bool
    otherwise
      = IO (GenValue (What4 sym)) -> W4Eval sym (GenValue (What4 sym))
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (Unsupported -> IO (GenValue (What4 sym))
    forall a e. Exception e => e -> a
    X.throw (String -> Unsupported
    UnsupportedSymbolicOp String
    "unbounded integer indexing"))

     where
        w4sym :: sym
    w4sym = What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym

        f :: Integer
    -> Maybe (W4Eval sym (GenValue (What4 sym)))
    -> Maybe (W4Eval sym (GenValue (What4 sym)))
    f Integer
    n (Just W4Eval sym (GenValue (What4 sym))
    y) = W4Eval sym (GenValue (What4 sym))
    -> Maybe (W4Eval sym (GenValue (What4 sym)))
    forall a. a -> Maybe a
    Just (W4Eval sym (GenValue (What4 sym))
     -> Maybe (W4Eval sym (GenValue (What4 sym))))
    -> W4Eval sym (GenValue (What4 sym))
    -> Maybe (W4Eval sym (GenValue (What4 sym)))
    forall a b. (a -> b) -> a -> b
    $
           do SymExpr sym BaseBoolType
    p <- IO (SymExpr sym BaseBoolType)
    -> W4Eval sym (SymExpr sym BaseBoolType)
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (sym
    -> SymExpr sym BaseIntegerType
    -> SymExpr sym BaseIntegerType
    -> IO (SymExpr sym BaseBoolType)
    forall sym.
    IsExprBuilder sym =>
    sym -> SymInteger sym -> SymInteger sym -> IO (Pred sym)
    W4.intEq sym
    w4sym SymExpr sym BaseIntegerType
    SInteger (What4 sym)
    idx (SymExpr sym BaseIntegerType -> IO (SymExpr sym BaseBoolType))
    -> IO (SymExpr sym BaseIntegerType)
    -> IO (SymExpr sym BaseBoolType)
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< sym -> Integer -> IO (SymExpr sym BaseIntegerType)
    forall sym.
    IsExprBuilder sym =>
    sym -> Integer -> IO (SymInteger sym)
    W4.intLit sym
    w4sym Integer
    n)
              What4 sym
    -> SBit (What4 sym)
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym.
    Backend sym =>
    sym
    -> SBit sym
    -> SEval sym (GenValue sym)
    -> SEval sym (GenValue sym)
    -> SEval sym (GenValue sym)
    iteValue What4 sym
    sym SymExpr sym BaseBoolType
    SBit (What4 sym)
    p (SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym a. Backend sym => SeqMap sym a -> Integer -> SEval sym a
    lookupSeqMap SeqMap (What4 sym) (GenValue (What4 sym))
    xs Integer
    n) SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    y
        f Integer
    n Maybe (W4Eval sym (GenValue (What4 sym)))
    Nothing = W4Eval sym (GenValue (What4 sym))
    -> Maybe (W4Eval sym (GenValue (What4 sym)))
    forall a. a -> Maybe a
    Just (W4Eval sym (GenValue (What4 sym))
     -> Maybe (W4Eval sym (GenValue (What4 sym))))
    -> W4Eval sym (GenValue (What4 sym))
    -> Maybe (W4Eval sym (GenValue (What4 sym)))
    forall a b. (a -> b) -> a -> b
    $ SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym a. Backend sym => SeqMap sym a -> Integer -> SEval sym a
    lookupSeqMap SeqMap (What4 sym) (GenValue (What4 sym))
    xs Integer
    n

        bounds :: (Integer, Maybe Integer)
    bounds =
          (case ValueRange Integer -> ValueBound Integer
    forall tp. ValueRange tp -> ValueBound tp
    W4.rangeLowBound (SymExpr sym BaseIntegerType -> ValueRange Integer
    forall (e :: BaseType -> *).
    IsExpr e =>
    e BaseIntegerType -> ValueRange Integer
    W4.integerBounds SymExpr sym BaseIntegerType
    SInteger (What4 sym)
    idx) of
            W4.Inclusive Integer
    l -> Integer -> Integer -> Integer
    forall a. Ord a => a -> a -> a
    max Integer
    l Integer
    0
            ValueBound Integer
    _ -> Integer
    0
          , case (Maybe Integer
    maxIdx, ValueRange Integer -> ValueBound Integer
    forall tp. ValueRange tp -> ValueBound tp
    W4.rangeHiBound (SymExpr sym BaseIntegerType -> ValueRange Integer
    forall (e :: BaseType -> *).
    IsExpr e =>
    e BaseIntegerType -> ValueRange Integer
    W4.integerBounds SymExpr sym BaseIntegerType
    SInteger (What4 sym)
    idx)) of
              (Just Integer
    n, W4.Inclusive Integer
    h) -> Integer -> Maybe Integer
    forall a. a -> Maybe a
    Just (Integer -> Integer -> Integer
    forall a. Ord a => a -> a -> a
    min Integer
    n Integer
    h)
              (Just Integer
    n, ValueBound Integer
    _)              -> Integer -> Maybe Integer
    forall a. a -> Maybe a
    Just Integer
    n
              (Maybe Integer, ValueBound Integer)
    _                        -> Maybe Integer
    forall a. Maybe a
    Nothing
          )

        -- Maximum possible in-bounds index given the length
        -- of the sequence. If the sequence is infinite, there
        -- isn't much we can do.
        maxIdx :: Maybe Integer
    maxIdx =
          case Nat'
    mblen of
            Nat Integer
    n -> Integer -> Maybe Integer
    forall a. a -> Maybe a
    Just (Integer
    n Integer -> Integer -> Integer
    forall a. Num a => a -> a -> a
    - Integer
    1)
            Nat'
    Inf   -> Maybe Integer
    forall a. Maybe a
    Nothing
    indexFront_segs ::
      W4.IsSymExprBuilder sym =>
      What4 sym ->
      Nat' ->
      TValue ->
      SeqMap (What4 sym) (GenValue (What4 sym)) ->
      TValue ->
      Integer ->
      [IndexSegment (What4 sym)] ->
      SEval (What4 sym) (Value sym)
    indexFront_segs :: forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> Nat'
    -> TValue
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> TValue
    -> Integer
    -> [IndexSegment (What4 sym)]
    -> SEval (What4 sym) (GenValue (What4 sym))
    indexFront_segs What4 sym
    sym Nat'
    mblen TValue
    _a SeqMap (What4 sym) (GenValue (What4 sym))
    xs TValue
    _ix Integer
    _idx_bits [WordIndexSegment SWord (What4 sym)
    idx]
      | Just Integer
    i <- SWord sym -> Maybe Integer
    forall sym. IsExprBuilder sym => SWord sym -> Maybe Integer
    SW.bvAsUnsignedInteger SWord sym
    SWord (What4 sym)
    idx
      = SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym a. Backend sym => SeqMap sym a -> Integer -> SEval sym a
    lookupSeqMap SeqMap (What4 sym) (GenValue (What4 sym))
    xs Integer
    i

      | Bool
    otherwise
      = case (Integer
     -> Maybe (W4Eval sym (GenValue (What4 sym)))
     -> Maybe (W4Eval sym (GenValue (What4 sym))))
    -> Maybe (W4Eval sym (GenValue (What4 sym)))
    -> [Integer]
    -> Maybe (W4Eval sym (GenValue (What4 sym)))
    forall a b. (a -> b -> b) -> b -> [a] -> b
    forall (t :: * -> *) a b.
    Foldable t =>
    (a -> b -> b) -> b -> t a -> b
    foldr Integer
    -> Maybe (W4Eval sym (GenValue (What4 sym)))
    -> Maybe (W4Eval sym (GenValue (What4 sym)))
    f Maybe (W4Eval sym (GenValue (What4 sym)))
    forall a. Maybe a
    Nothing [Integer]
    idxs of
          Maybe (W4Eval sym (GenValue (What4 sym)))
    Nothing -> What4 sym -> EvalError -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym a. Backend sym => sym -> EvalError -> SEval sym a
    forall a. What4 sym -> EvalError -> SEval (What4 sym) a
    raiseError What4 sym
    sym (Maybe Integer -> EvalError
    InvalidIndex Maybe Integer
    forall a. Maybe a
    Nothing)
          Just W4Eval sym (GenValue (What4 sym))
    m  -> SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    m

     where
        w4sym :: sym
    w4sym = What4 sym -> sym
    forall sym. What4 sym -> sym
    w4 What4 sym
    sym

        w :: Integer
    w = SWord sym -> Integer
    forall sym. SWord sym -> Integer
    SW.bvWidth SWord sym
    SWord (What4 sym)
    idx

        f :: Integer
    -> Maybe (W4Eval sym (GenValue (What4 sym)))
    -> Maybe (W4Eval sym (GenValue (What4 sym)))
    f Integer
    n (Just W4Eval sym (GenValue (What4 sym))
    y) = W4Eval sym (GenValue (What4 sym))
    -> Maybe (W4Eval sym (GenValue (What4 sym)))
    forall a. a -> Maybe a
    Just (W4Eval sym (GenValue (What4 sym))
     -> Maybe (W4Eval sym (GenValue (What4 sym))))
    -> W4Eval sym (GenValue (What4 sym))
    -> Maybe (W4Eval sym (GenValue (What4 sym)))
    forall a b. (a -> b) -> a -> b
    $
           do SymExpr sym BaseBoolType
    p <- IO (SymExpr sym BaseBoolType)
    -> W4Eval sym (SymExpr sym BaseBoolType)
    forall a. IO a -> W4Eval sym a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (sym -> SWord sym -> SWord sym -> IO (SymExpr sym BaseBoolType)
    PredBin
    SW.bvEq sym
    w4sym SWord sym
    SWord (What4 sym)
    idx (SWord sym -> IO (SymExpr sym BaseBoolType))
    -> IO (SWord sym) -> IO (SymExpr sym BaseBoolType)
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< sym -> Integer -> Integer -> IO (SWord sym)
    forall sym.
    IsExprBuilder sym =>
    sym -> Integer -> Integer -> IO (SWord sym)
    SW.bvLit sym
    w4sym Integer
    w Integer
    n)
              What4 sym
    -> SBit (What4 sym)
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym.
    Backend sym =>
    sym
    -> SBit sym
    -> SEval sym (GenValue sym)
    -> SEval sym (GenValue sym)
    -> SEval sym (GenValue sym)
    iteValue What4 sym
    sym SymExpr sym BaseBoolType
    SBit (What4 sym)
    p (SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym a. Backend sym => SeqMap sym a -> Integer -> SEval sym a
    lookupSeqMap SeqMap (What4 sym) (GenValue (What4 sym))
    xs Integer
    n) SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    y
        f Integer
    n Maybe (W4Eval sym (GenValue (What4 sym)))
    Nothing = W4Eval sym (GenValue (What4 sym))
    -> Maybe (W4Eval sym (GenValue (What4 sym)))
    forall a. a -> Maybe a
    Just (W4Eval sym (GenValue (What4 sym))
     -> Maybe (W4Eval sym (GenValue (What4 sym))))
    -> W4Eval sym (GenValue (What4 sym))
    -> Maybe (W4Eval sym (GenValue (What4 sym)))
    forall a b. (a -> b) -> a -> b
    $ SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym a. Backend sym => SeqMap sym a -> Integer -> SEval sym a
    lookupSeqMap SeqMap (What4 sym) (GenValue (What4 sym))
    xs Integer
    n

        -- maximum possible in-bounds index given the bitwidth
        -- of the index value and the length of the sequence
        maxIdx :: Integer
    maxIdx =
          case Nat'
    mblen of
            Nat Integer
    n | Integer
    n Integer -> Integer -> Bool
    forall a. Ord a => a -> a -> Bool
    < Integer
    2Integer -> Integer -> Integer
    forall a b. (Num a, Integral b) => a -> b -> a
    ^Integer
    w -> Integer
    nInteger -> Integer -> Integer
    forall a. Num a => a -> a -> a
    -Integer
    1
            Nat'
    _ -> Integer
    2Integer -> Integer -> Integer
    forall a b. (Num a, Integral b) => a -> b -> a
    ^Integer
    w Integer -> Integer -> Integer
    forall a. Num a => a -> a -> a
    - Integer
    1

        -- concrete indices to consider, intersection of the
        -- range of values the index value might take with
        -- the legal values
        idxs :: [Integer]
    idxs =
          case SWord sym -> Maybe (Integer, Integer)
    forall sym.
    IsExprBuilder sym =>
    SWord sym -> Maybe (Integer, Integer)
    SW.unsignedBVBounds SWord sym
    SWord (What4 sym)
    idx of
            Just (Integer
    lo, Integer
    hi) -> [Integer
    lo .. Integer -> Integer -> Integer
    forall a. Ord a => a -> a -> a
    min Integer
    hi Integer
    maxIdx]
            Maybe (Integer, Integer)
    _ -> [Integer
    0 .. Integer
    maxIdx]

    indexFront_segs What4 sym
    sym Nat'
    mblen TValue
    _a SeqMap (What4 sym) (GenValue (What4 sym))
    xs TValue
    _ix Integer
    idx_bits [IndexSegment (What4 sym)]
    segs =
      do SeqMap (What4 sym) (GenValue (What4 sym))
    xs' <- What4 sym
    -> (SBit (What4 sym)
        -> GenValue (What4 sym)
        -> GenValue (What4 sym)
        -> SEval (What4 sym) (GenValue (What4 sym)))
    -> (SeqMap (What4 sym) (GenValue (What4 sym))
        -> Integer
        -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym))))
    -> Nat'
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> [IndexSegment (What4 sym)]
    -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym)))
    forall sym a.
    Backend sym =>
    sym
    -> (SBit sym -> a -> a -> SEval sym a)
    -> (SeqMap sym a -> Integer -> SEval sym (SeqMap sym a))
    -> Nat'
    -> SeqMap sym a
    -> Integer
    -> [IndexSegment sym]
    -> SEval sym (SeqMap sym a)
    barrelShifter What4 sym
    sym (What4 sym
    -> SBit (What4 sym)
    -> GenValue (What4 sym)
    -> GenValue (What4 sym)
    -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym.
    Backend sym =>
    sym
    -> SBit sym
    -> GenValue sym
    -> GenValue sym
    -> SEval sym (GenValue sym)
    mergeValue What4 sym
    sym) SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym)))
    SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> W4Eval sym (SeqMap (What4 sym) (GenValue (What4 sym)))
    forall {sym} {sym} {f :: * -> *} {a}.
    (SEval sym ~ SEval sym, Backend sym, MonadIO (SEval sym),
     Applicative f) =>
    SeqMap sym a -> Integer -> f (SeqMap sym a)
    shiftOp Nat'
    mblen SeqMap (What4 sym) (GenValue (What4 sym))
    xs Integer
    idx_bits [IndexSegment (What4 sym)]
    segs
         SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym a. Backend sym => SeqMap sym a -> Integer -> SEval sym a
    lookupSeqMap SeqMap (What4 sym) (GenValue (What4 sym))
    xs' Integer
    0
      where
        shiftOp :: SeqMap sym a -> Integer -> f (SeqMap sym a)
    shiftOp SeqMap sym a
    vs Integer
    amt = SeqMap sym a -> f (SeqMap sym a)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure ((Integer -> SEval sym a) -> SeqMap sym a
    forall sym a. (Integer -> SEval sym a) -> SeqMap sym a
    indexSeqMap (\Integer
    i -> SeqMap sym a -> Integer -> SEval sym a
    forall sym a. Backend sym => SeqMap sym a -> Integer -> SEval sym a
    lookupSeqMap SeqMap sym a
    vs (Integer -> SEval sym a) -> Integer -> SEval sym a
    forall a b. (a -> b) -> a -> b
    $! Integer
    amtInteger -> Integer -> Integer
    forall a. Num a => a -> a -> a
    +Integer
    i))

    updateFrontSym ::
      W4.IsSymExprBuilder sym =>
      What4 sym ->
      Nat' ->
      TValue ->
      SeqMap (What4 sym) (GenValue (What4 sym)) ->
      Either (SInteger (What4 sym)) (WordValue (What4 sym)) ->
      SEval (What4 sym) (Value sym) ->
      SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym)))
    updateFrontSym :: forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> Nat'
    -> TValue
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Either (SInteger (What4 sym)) (WordValue (What4 sym))
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym)))
    updateFrontSym What4 sym
    sym Nat'
    _len TValue
    _eltTy SeqMap (What4 sym) (GenValue (What4 sym))
    vs (Left SInteger (What4 sym)
    idx) SEval (What4 sym) (GenValue (What4 sym))
    val =
      case SymExpr sym BaseIntegerType -> Maybe Integer
    forall (e :: BaseType -> *).
    IsExpr e =>
    e BaseIntegerType -> Maybe Integer
    W4.asInteger SymExpr sym BaseIntegerType
    SInteger (What4 sym)
    idx of
        Just Integer
    i -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym)))
    forall a. a -> SEval (What4 sym) a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (SeqMap (What4 sym) (GenValue (What4 sym))
     -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym))))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym)))
    forall a b. (a -> b) -> a -> b
    $ SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    forall sym a.
    SeqMap sym a -> Integer -> SEval sym a -> SeqMap sym a
    updateSeqMap SeqMap (What4 sym) (GenValue (What4 sym))
    vs Integer
    i SEval (What4 sym) (GenValue (What4 sym))
    val
        Maybe Integer
    Nothing -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym)))
    forall a. a -> SEval (What4 sym) a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (SeqMap (What4 sym) (GenValue (What4 sym))
     -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym))))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym)))
    forall a b. (a -> b) -> a -> b
    $ (Integer -> SEval (What4 sym) (GenValue (What4 sym)))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    forall sym a. (Integer -> SEval sym a) -> SeqMap sym a
    indexSeqMap ((Integer -> SEval (What4 sym) (GenValue (What4 sym)))
     -> SeqMap (What4 sym) (GenValue (What4 sym)))
    -> (Integer -> SEval (What4 sym) (GenValue (What4 sym)))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    forall a b. (a -> b) -> a -> b
    $ \Integer
    i ->
          do SymExpr sym BaseBoolType
    b <- What4 sym
    -> SInteger (What4 sym)
    -> SInteger (What4 sym)
    -> SEval (What4 sym) (SBit (What4 sym))
    forall sym.
    Backend sym =>
    sym -> SInteger sym -> SInteger sym -> SEval sym (SBit sym)
    intEq What4 sym
    sym SInteger (What4 sym)
    idx (SymExpr sym BaseIntegerType
     -> W4Eval sym (SymExpr sym BaseBoolType))
    -> W4Eval sym (SymExpr sym BaseIntegerType)
    -> W4Eval sym (SymExpr sym BaseBoolType)
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< What4 sym -> Integer -> SEval (What4 sym) (SInteger (What4 sym))
    forall sym.
    Backend sym =>
    sym -> Integer -> SEval sym (SInteger sym)
    integerLit What4 sym
    sym Integer
    i
             What4 sym
    -> SBit (What4 sym)
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym.
    Backend sym =>
    sym
    -> SBit sym
    -> SEval sym (GenValue sym)
    -> SEval sym (GenValue sym)
    -> SEval sym (GenValue sym)
    iteValue What4 sym
    sym SymExpr sym BaseBoolType
    SBit (What4 sym)
    b SEval (What4 sym) (GenValue (What4 sym))
    val (SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym a. Backend sym => SeqMap sym a -> Integer -> SEval sym a
    lookupSeqMap SeqMap (What4 sym) (GenValue (What4 sym))
    vs Integer
    i)

    updateFrontSym What4 sym
    sym Nat'
    len TValue
    _eltTy SeqMap (What4 sym) (GenValue (What4 sym))
    vs (Right WordValue (What4 sym)
    wv) SEval (What4 sym) (GenValue (What4 sym))
    val =
      What4 sym
    -> WordValue (What4 sym) -> SEval (What4 sym) (Maybe Integer)
    forall sym.
    Backend sym =>
    sym -> WordValue sym -> SEval sym (Maybe Integer)
    wordValAsLit What4 sym
    sym WordValue (What4 sym)
    wv W4Eval sym (Maybe Integer)
    -> (Maybe Integer
        -> W4Eval sym (SeqMap (What4 sym) (GenValue (What4 sym))))
    -> W4Eval sym (SeqMap (What4 sym) (GenValue (What4 sym)))
    forall a b. W4Eval sym a -> (a -> W4Eval sym b) -> W4Eval sym b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= \case
        Just Integer
    j -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> W4Eval sym (SeqMap (What4 sym) (GenValue (What4 sym)))
    forall a. a -> W4Eval sym a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (SeqMap (What4 sym) (GenValue (What4 sym))
     -> W4Eval sym (SeqMap (What4 sym) (GenValue (What4 sym))))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> W4Eval sym (SeqMap (What4 sym) (GenValue (What4 sym)))
    forall a b. (a -> b) -> a -> b
    $ SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    forall sym a.
    SeqMap sym a -> Integer -> SEval sym a -> SeqMap sym a
    updateSeqMap SeqMap (What4 sym) (GenValue (What4 sym))
    vs Integer
    j SEval (What4 sym) (GenValue (What4 sym))
    val
        Maybe Integer
    Nothing ->
          What4 sym
    -> Nat'
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym)))
    forall sym a.
    Backend sym =>
    sym -> Nat' -> SeqMap sym a -> SEval sym (SeqMap sym a)
    memoMap What4 sym
    sym Nat'
    len (SeqMap (What4 sym) (GenValue (What4 sym))
     -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym))))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym)))
    forall a b. (a -> b) -> a -> b
    $ (Integer -> SEval (What4 sym) (GenValue (What4 sym)))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    forall sym a. (Integer -> SEval sym a) -> SeqMap sym a
    indexSeqMap ((Integer -> SEval (What4 sym) (GenValue (What4 sym)))
     -> SeqMap (What4 sym) (GenValue (What4 sym)))
    -> (Integer -> SEval (What4 sym) (GenValue (What4 sym)))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    forall a b. (a -> b) -> a -> b
    $ \Integer
    i ->
          do SymExpr sym BaseBoolType
    b <- What4 sym
    -> WordValue (What4 sym)
    -> Integer
    -> SEval (What4 sym) (SBit (What4 sym))
    forall sym.
    Backend sym =>
    sym -> WordValue sym -> Integer -> SEval sym (SBit sym)
    wordValueEqualsInteger What4 sym
    sym WordValue (What4 sym)
    wv Integer
    i
             What4 sym
    -> SBit (What4 sym)
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym.
    Backend sym =>
    sym
    -> SBit sym
    -> SEval sym (GenValue sym)
    -> SEval sym (GenValue sym)
    -> SEval sym (GenValue sym)
    iteValue What4 sym
    sym SymExpr sym BaseBoolType
    SBit (What4 sym)
    b SEval (What4 sym) (GenValue (What4 sym))
    val (SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym a. Backend sym => SeqMap sym a -> Integer -> SEval sym a
    lookupSeqMap SeqMap (What4 sym) (GenValue (What4 sym))
    vs Integer
    i)

    updateBackSym ::
      W4.IsSymExprBuilder sym =>
      What4 sym ->
      Nat' ->
      TValue ->
      SeqMap (What4 sym) (GenValue (What4 sym)) ->
      Either (SInteger (What4 sym)) (WordValue (What4 sym)) ->
      SEval (What4 sym) (Value sym) ->
      SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym)))
    updateBackSym :: forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> Nat'
    -> TValue
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> Either (SInteger (What4 sym)) (WordValue (What4 sym))
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym)))
    updateBackSym What4 sym
    _ Nat'
    Inf TValue
    _ SeqMap (What4 sym) (GenValue (What4 sym))
    _ Either (SInteger (What4 sym)) (WordValue (What4 sym))
    _ SEval (What4 sym) (GenValue (What4 sym))
    _ = String
    -> [String]
    -> W4Eval sym (SeqMap (What4 sym) (GenValue (What4 sym)))
    forall a. String -> [String] -> a
    evalPanic String
    "Expected finite sequence" [String
    "updateBackSym"]

    updateBackSym What4 sym
    sym (Nat Integer
    n) TValue
    _eltTy SeqMap (What4 sym) (GenValue (What4 sym))
    vs (Left SInteger (What4 sym)
    idx) SEval (What4 sym) (GenValue (What4 sym))
    val =
      case SymExpr sym BaseIntegerType -> Maybe Integer
    forall (e :: BaseType -> *).
    IsExpr e =>
    e BaseIntegerType -> Maybe Integer
    W4.asInteger SymExpr sym BaseIntegerType
    SInteger (What4 sym)
    idx of
        Just Integer
    i -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym)))
    forall a. a -> SEval (What4 sym) a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (SeqMap (What4 sym) (GenValue (What4 sym))
     -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym))))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym)))
    forall a b. (a -> b) -> a -> b
    $ SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    forall sym a.
    SeqMap sym a -> Integer -> SEval sym a -> SeqMap sym a
    updateSeqMap SeqMap (What4 sym) (GenValue (What4 sym))
    vs (Integer
    n Integer -> Integer -> Integer
    forall a. Num a => a -> a -> a
    - Integer
    1 Integer -> Integer -> Integer
    forall a. Num a => a -> a -> a
    - Integer
    i) SEval (What4 sym) (GenValue (What4 sym))
    val
        Maybe Integer
    Nothing -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym)))
    forall a. a -> SEval (What4 sym) a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (SeqMap (What4 sym) (GenValue (What4 sym))
     -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym))))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym)))
    forall a b. (a -> b) -> a -> b
    $ (Integer -> SEval (What4 sym) (GenValue (What4 sym)))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    forall sym a. (Integer -> SEval sym a) -> SeqMap sym a
    indexSeqMap ((Integer -> SEval (What4 sym) (GenValue (What4 sym)))
     -> SeqMap (What4 sym) (GenValue (What4 sym)))
    -> (Integer -> SEval (What4 sym) (GenValue (What4 sym)))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    forall a b. (a -> b) -> a -> b
    $ \Integer
    i ->
          do SymExpr sym BaseBoolType
    b <- What4 sym
    -> SInteger (What4 sym)
    -> SInteger (What4 sym)
    -> SEval (What4 sym) (SBit (What4 sym))
    forall sym.
    Backend sym =>
    sym -> SInteger sym -> SInteger sym -> SEval sym (SBit sym)
    intEq What4 sym
    sym SInteger (What4 sym)
    idx (SymExpr sym BaseIntegerType
     -> W4Eval sym (SymExpr sym BaseBoolType))
    -> W4Eval sym (SymExpr sym BaseIntegerType)
    -> W4Eval sym (SymExpr sym BaseBoolType)
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< What4 sym -> Integer -> SEval (What4 sym) (SInteger (What4 sym))
    forall sym.
    Backend sym =>
    sym -> Integer -> SEval sym (SInteger sym)
    integerLit What4 sym
    sym (Integer
    n Integer -> Integer -> Integer
    forall a. Num a => a -> a -> a
    - Integer
    1 Integer -> Integer -> Integer
    forall a. Num a => a -> a -> a
    - Integer
    i)
             What4 sym
    -> SBit (What4 sym)
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym.
    Backend sym =>
    sym
    -> SBit sym
    -> SEval sym (GenValue sym)
    -> SEval sym (GenValue sym)
    -> SEval sym (GenValue sym)
    iteValue What4 sym
    sym SymExpr sym BaseBoolType
    SBit (What4 sym)
    b SEval (What4 sym) (GenValue (What4 sym))
    val (SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym a. Backend sym => SeqMap sym a -> Integer -> SEval sym a
    lookupSeqMap SeqMap (What4 sym) (GenValue (What4 sym))
    vs Integer
    i)

    updateBackSym What4 sym
    sym (Nat Integer
    n) TValue
    _eltTy SeqMap (What4 sym) (GenValue (What4 sym))
    vs (Right WordValue (What4 sym)
    wv) SEval (What4 sym) (GenValue (What4 sym))
    val =
      What4 sym
    -> WordValue (What4 sym) -> SEval (What4 sym) (Maybe Integer)
    forall sym.
    Backend sym =>
    sym -> WordValue sym -> SEval sym (Maybe Integer)
    wordValAsLit What4 sym
    sym WordValue (What4 sym)
    wv W4Eval sym (Maybe Integer)
    -> (Maybe Integer
        -> W4Eval sym (SeqMap (What4 sym) (GenValue (What4 sym))))
    -> W4Eval sym (SeqMap (What4 sym) (GenValue (What4 sym)))
    forall a b. W4Eval sym a -> (a -> W4Eval sym b) -> W4Eval sym b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= \case
        Just Integer
    j ->
          SeqMap (What4 sym) (GenValue (What4 sym))
    -> W4Eval sym (SeqMap (What4 sym) (GenValue (What4 sym)))
    forall a. a -> W4Eval sym a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (SeqMap (What4 sym) (GenValue (What4 sym))
     -> W4Eval sym (SeqMap (What4 sym) (GenValue (What4 sym))))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> W4Eval sym (SeqMap (What4 sym) (GenValue (What4 sym)))
    forall a b. (a -> b) -> a -> b
    $ SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    forall sym a.
    SeqMap sym a -> Integer -> SEval sym a -> SeqMap sym a
    updateSeqMap SeqMap (What4 sym) (GenValue (What4 sym))
    vs (Integer
    n Integer -> Integer -> Integer
    forall a. Num a => a -> a -> a
    - Integer
    1 Integer -> Integer -> Integer
    forall a. Num a => a -> a -> a
    - Integer
    j) SEval (What4 sym) (GenValue (What4 sym))
    val
        Maybe Integer
    Nothing ->
          What4 sym
    -> Nat'
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym)))
    forall sym a.
    Backend sym =>
    sym -> Nat' -> SeqMap sym a -> SEval sym (SeqMap sym a)
    memoMap What4 sym
    sym (Integer -> Nat'
    Nat Integer
    n) (SeqMap (What4 sym) (GenValue (What4 sym))
     -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym))))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (SeqMap (What4 sym) (GenValue (What4 sym)))
    forall a b. (a -> b) -> a -> b
    $ (Integer -> SEval (What4 sym) (GenValue (What4 sym)))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    forall sym a. (Integer -> SEval sym a) -> SeqMap sym a
    indexSeqMap ((Integer -> SEval (What4 sym) (GenValue (What4 sym)))
     -> SeqMap (What4 sym) (GenValue (What4 sym)))
    -> (Integer -> SEval (What4 sym) (GenValue (What4 sym)))
    -> SeqMap (What4 sym) (GenValue (What4 sym))
    forall a b. (a -> b) -> a -> b
    $ \Integer
    i ->
          do SymExpr sym BaseBoolType
    b <- What4 sym
    -> WordValue (What4 sym)
    -> Integer
    -> SEval (What4 sym) (SBit (What4 sym))
    forall sym.
    Backend sym =>
    sym -> WordValue sym -> Integer -> SEval sym (SBit sym)
    wordValueEqualsInteger What4 sym
    sym WordValue (What4 sym)
    wv (Integer
    n Integer -> Integer -> Integer
    forall a. Num a => a -> a -> a
    - Integer
    1 Integer -> Integer -> Integer
    forall a. Num a => a -> a -> a
    - Integer
    i)
             What4 sym
    -> SBit (What4 sym)
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym.
    Backend sym =>
    sym
    -> SBit sym
    -> SEval sym (GenValue sym)
    -> SEval sym (GenValue sym)
    -> SEval sym (GenValue sym)
    iteValue What4 sym
    sym SymExpr sym BaseBoolType
    SBit (What4 sym)
    b SEval (What4 sym) (GenValue (What4 sym))
    val (SeqMap (What4 sym) (GenValue (What4 sym))
    -> Integer -> SEval (What4 sym) (GenValue (What4 sym))
    forall sym a. Backend sym => SeqMap sym a -> Integer -> SEval sym a
    lookupSeqMap SeqMap (What4 sym) (GenValue (What4 sym))
    vs Integer
    i)

    updateFrontSym_word ::
      W4.IsSymExprBuilder sym =>
      What4 sym ->
      Nat' ->
      TValue ->
      WordValue (What4 sym) ->
      Either (SInteger (What4 sym)) (WordValue (What4 sym)) ->
      SEval (What4 sym) (GenValue (What4 sym)) ->
      SEval (What4 sym) (WordValue (What4 sym))
    updateFrontSym_word :: forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> Nat'
    -> TValue
    -> WordValue (What4 sym)
    -> Either (SInteger (What4 sym)) (WordValue (What4 sym))
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (WordValue (What4 sym))
    updateFrontSym_word What4 sym
    _ Nat'
    Inf TValue
    _ WordValue (What4 sym)
    _ Either (SInteger (What4 sym)) (WordValue (What4 sym))
    _ SEval (What4 sym) (GenValue (What4 sym))
    _ = String -> [String] -> W4Eval sym (WordValue (What4 sym))
    forall a. String -> [String] -> a
    evalPanic String
    "Expected finite sequence" [String
    "updateFrontSym_word"]

    updateFrontSym_word What4 sym
    sym (Nat Integer
    n) TValue
    _eltTy WordValue (What4 sym)
    w (Left SInteger (What4 sym)
    idx) SEval (What4 sym) (GenValue (What4 sym))
    val =
      do SWord sym
    idx' <- What4 sym
    -> Integer
    -> SInteger (What4 sym)
    -> SEval (What4 sym) (SWord (What4 sym))
    forall sym.
    Backend sym =>
    sym -> Integer -> SInteger sym -> SEval sym (SWord sym)
    wordFromInt What4 sym
    sym Integer
    n SInteger (What4 sym)
    idx
         What4 sym
    -> IndexDirection
    -> WordValue (What4 sym)
    -> WordValue (What4 sym)
    -> SEval (What4 sym) (SBit (What4 sym))
    -> SEval (What4 sym) (WordValue (What4 sym))
    forall sym.
    Backend sym =>
    sym
    -> IndexDirection
    -> WordValue sym
    -> WordValue sym
    -> SEval sym (SBit sym)
    -> SEval sym (WordValue sym)
    updateWordByWord What4 sym
    sym IndexDirection
    IndexForward WordValue (What4 sym)
    w (SWord (What4 sym) -> WordValue (What4 sym)
    forall sym. SWord sym -> WordValue sym
    wordVal SWord sym
    SWord (What4 sym)
    idx') (GenValue (What4 sym) -> Pred sym
    GenValue (What4 sym) -> SBit (What4 sym)
    forall sym. GenValue sym -> SBit sym
    fromVBit (GenValue (What4 sym) -> Pred sym)
    -> W4Eval sym (GenValue (What4 sym)) -> W4Eval sym (Pred sym)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    val)
    updateFrontSym_word What4 sym
    sym (Nat Integer
    _n) TValue
    _eltTy WordValue (What4 sym)
    w (Right WordValue (What4 sym)
    idx) SEval (What4 sym) (GenValue (What4 sym))
    val =
      What4 sym
    -> IndexDirection
    -> WordValue (What4 sym)
    -> WordValue (What4 sym)
    -> SEval (What4 sym) (SBit (What4 sym))
    -> SEval (What4 sym) (WordValue (What4 sym))
    forall sym.
    Backend sym =>
    sym
    -> IndexDirection
    -> WordValue sym
    -> WordValue sym
    -> SEval sym (SBit sym)
    -> SEval sym (WordValue sym)
    updateWordByWord What4 sym
    sym IndexDirection
    IndexForward WordValue (What4 sym)
    w WordValue (What4 sym)
    idx (GenValue (What4 sym) -> Pred sym
    GenValue (What4 sym) -> SBit (What4 sym)
    forall sym. GenValue sym -> SBit sym
    fromVBit (GenValue (What4 sym) -> Pred sym)
    -> W4Eval sym (GenValue (What4 sym)) -> W4Eval sym (Pred sym)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    val)

    updateBackSym_word ::
      W4.IsSymExprBuilder sym =>
      What4 sym ->
      Nat' ->
      TValue ->
      WordValue (What4 sym) ->
      Either (SInteger (What4 sym)) (WordValue (What4 sym)) ->
      SEval (What4 sym) (GenValue (What4 sym)) ->
      SEval (What4 sym) (WordValue (What4 sym))
    updateBackSym_word :: forall sym.
    IsSymExprBuilder sym =>
    What4 sym
    -> Nat'
    -> TValue
    -> WordValue (What4 sym)
    -> Either (SInteger (What4 sym)) (WordValue (What4 sym))
    -> SEval (What4 sym) (GenValue (What4 sym))
    -> SEval (What4 sym) (WordValue (What4 sym))
    updateBackSym_word What4 sym
    _ Nat'
    Inf TValue
    _ WordValue (What4 sym)
    _ Either (SInteger (What4 sym)) (WordValue (What4 sym))
    _ SEval (What4 sym) (GenValue (What4 sym))
    _ = String -> [String] -> W4Eval sym (WordValue (What4 sym))
    forall a. String -> [String] -> a
    evalPanic String
    "Expected finite sequence" [String
    "updateFrontSym_word"]

    updateBackSym_word What4 sym
    sym (Nat Integer
    n) TValue
    _eltTy WordValue (What4 sym)
    w (Left SInteger (What4 sym)
    idx) SEval (What4 sym) (GenValue (What4 sym))
    val =
      do SWord sym
    idx' <- What4 sym
    -> Integer
    -> SInteger (What4 sym)
    -> SEval (What4 sym) (SWord (What4 sym))
    forall sym.
    Backend sym =>
    sym -> Integer -> SInteger sym -> SEval sym (SWord sym)
    wordFromInt What4 sym
    sym Integer
    n SInteger (What4 sym)
    idx
         What4 sym
    -> IndexDirection
    -> WordValue (What4 sym)
    -> WordValue (What4 sym)
    -> SEval (What4 sym) (SBit (What4 sym))
    -> SEval (What4 sym) (WordValue (What4 sym))
    forall sym.
    Backend sym =>
    sym
    -> IndexDirection
    -> WordValue sym
    -> WordValue sym
    -> SEval sym (SBit sym)
    -> SEval sym (WordValue sym)
    updateWordByWord What4 sym
    sym IndexDirection
    IndexBackward WordValue (What4 sym)
    w (SWord (What4 sym) -> WordValue (What4 sym)
    forall sym. SWord sym -> WordValue sym
    wordVal SWord sym
    SWord (What4 sym)
    idx') (GenValue (What4 sym) -> Pred sym
    GenValue (What4 sym) -> SBit (What4 sym)
    forall sym. GenValue sym -> SBit sym
    fromVBit (GenValue (What4 sym) -> Pred sym)
    -> W4Eval sym (GenValue (What4 sym)) -> W4Eval sym (Pred sym)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    val)
    updateBackSym_word What4 sym
    sym (Nat Integer
    _n) TValue
    _eltTy WordValue (What4 sym)
    w (Right WordValue (What4 sym)
    idx) SEval (What4 sym) (GenValue (What4 sym))
    val =
      What4 sym
    -> IndexDirection
    -> WordValue (What4 sym)
    -> WordValue (What4 sym)
    -> SEval (What4 sym) (SBit (What4 sym))
    -> SEval (What4 sym) (WordValue (What4 sym))
    forall sym.
    Backend sym =>
    sym
    -> IndexDirection
    -> WordValue sym
    -> WordValue sym
    -> SEval sym (SBit sym)
    -> SEval sym (WordValue sym)
    updateWordByWord What4 sym
    sym IndexDirection
    IndexBackward WordValue (What4 sym)
    w WordValue (What4 sym)
    idx (GenValue (What4 sym) -> Pred sym
    GenValue (What4 sym) -> SBit (What4 sym)
    forall sym. GenValue sym -> SBit sym
    fromVBit (GenValue (What4 sym) -> Pred sym)
    -> W4Eval sym (GenValue (What4 sym)) -> W4Eval sym (Pred sym)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> SEval (What4 sym) (GenValue (What4 sym))
    W4Eval sym (GenValue (What4 sym))
    val)