cff_trans_stmt :: Bool -> -- ^ is return type void
                  S.Set Ident -> -- ^ local vars
                  S.Set Ident -> -- ^ formal args
                  ContextName -> 
                  Ident -> -- ^ fname 
                  Ident -> -- ^ sw
                  M.Map Ident LabeledBlock ->  -- ^ \bar{b} kenv
                  Ident -> -- ^ label for the current block
                  AST.CCompoundBlockItem N.NodeInfo ->  -- ^ stmt
                  [AST.CCompoundBlockItem N.NodeInfo]
{-                  
CS_cff (goto l_i) kenv lj = \overline{X = E}; sw = i; break;
where (\overline{\phi}, s) = kenv l_i
             \overline{(X,E)} = CF_cff \overline{\phi} l_j
-}
cff_trans_stmt isReturnVoid localVars fargs ctxtName fname sw kenv l_j (AST.CBlockStmt (AST.CGoto l_i nodeInfo)) = case M.lookup l_i kenv of 
  { Just lb -> 
       let 
           asgmts  = cff_trans_phis ctxtName l_j l_i (lb_phis lb)
           i = AST.CConst (AST.CIntConst (cInteger (unLabPref l_i)) N.undefNode)
           sw_assg = AST.CBlockStmt (AST.CExpr (Just ((cvar sw) .=. i)) N.undefNode)
           
       in asgmts ++ [ sw_assg, cBreak ]
  ; Nothing -> error "cff_trans_stmt failed at a non existent label."
  }
cff_trans_stmt :: Bool -> -- ^ is return type void
                  S.Set Ident -> -- ^ local vars
                  S.Set Ident -> -- ^ formal args
                  ContextName -> 
                  Ident -> -- ^ fname 
                  Ident -> -- ^ sw
                  M.Map Ident LabeledBlock ->  -- ^ \bar{b} kenv
                  Ident -> -- ^ label for the current block
                  AST.CCompoundBlockItem N.NodeInfo ->  -- ^ stmt
                  [AST.CCompoundBlockItem N.NodeInfo]
cff_trans_stmt isReturnVoid localVars fargs ctxtName fname sw kenv l_j (AST.CBlockStmt (AST.CGoto l_i nodeInfo)) = case M.lookup l_i kenv of 
  { Just lb -> 
       let 
           asgmts  = cff_trans_phis ctxtName l_j l_i (lb_phis lb)
           i = AST.CConst (AST.CIntConst (cInteger (unLabPref l_i)) N.undefNode)
           sw_assg = AST.CBlockStmt (AST.CExpr (Just ((cvar sw) .=. i)) N.undefNode)
           
       in asgmts ++ [ sw_assg, cBreak ]
  ; Nothing -> error "cff_trans_stmt failed at a non existent label."
  }
cff_trans_stmt isReturnVoid localVars fargs ctxtName fname sw kenv l_j (AST.CBlockStmt (AST.CGoto l_i nodeInfo)) = case M.lookup l_i kenv of 
  { Just lb -> 
       let 
           asgmts  = cff_trans_phis ctxtName l_j l_i (lb_phis lb)
           i = AST.CConst (AST.CIntConst (cInteger (unLabPref l_i)) N.undefNode)
           sw_assg = AST.CBlockStmt (AST.CExpr (Just ((cvar sw) .=. i)) N.undefNode)
           
       in asgmts ++ [ sw_assg, cBreak ]
  ; Nothing -> error "cff_trans_stmt failed at a non existent label."
  }