waitLoop :: Def ('[Sint32, Sint32, Ref s (Stored Sint32)] :-> ())
waitLoop = proc "waitLoop" $ \ n i iters ->
  requires (checkStored iters (>=? 0)) $
  ensures_ (checkStored iters (>=? 0)) $    -- XXX How are these passing?  Is this a problem with recursion?
  body $ do
    ifte_ (n >? 0)
      ( do
        itersValue <- deref iters
        store iters $ itersValue + 1
        assert $ n >? i
        assert $ i >? 0
        call_ waitLoop (n - i) i iters
        retVoid
      )
      retVoid

-- Factorial of a number.
waitLoop :: Def ('[Sint32, Sint32, Ref s (Stored Sint32)] :-> ())
waitLoop = proc "waitLoop" $ \ n i iters ->
  requires (checkStored iters (>=? 0)) $
  ensures_ (checkStored iters (>=? 0)) $    -- XXX How are these passing?  Is this a problem with recursion?
  body $ do
    ifte_ (n >? 0)
      ( do
        itersValue <- deref iters
        store iters $ itersValue + 1
        assert $ n >? i
        assert $ i >? 0
        call_ waitLoop (n - i) i iters
        retVoid
      )
      retVoid

-- Factorial of a number.
waitLoop = proc "waitLoop" $ \ n i iters ->
  requires (checkStored iters (>=? 0)) $
  ensures_ (checkStored iters (>=? 0)) $    -- XXX How are these passing?  Is this a problem with recursion?
  body $ do
    ifte_ (n >? 0)
      ( do
        itersValue <- deref iters
        store iters $ itersValue + 1
        assert $ n >? i
        assert $ i >? 0
        call_ waitLoop (n - i) i iters
        retVoid
      )
      retVoid

-- Factorial of a number.