cff_trans_blks isVoid localVars formalArgs ctxtName fname kenv ((l, blk):rest) = 
  let stmts   = lb_stmts blk
      sw       = iid swParamName
      stmts'  = cff_trans_stmts isVoid localVars formalArgs ctxtName fname sw kenv l stmts -- must be all Block Statement
      rest'   = cff_trans_blks isVoid localVars formalArgs ctxtName fname kenv rest
      e       =  AST.CConst (AST.CIntConst (cInteger (unLabPref l)) N.undefNode)
      --- stmts'' = (stmts'++ [AST.CBlockStmt (AST.CBreak N.undefNode)])
      -- need to insert "return;" if it is the last statement; otherwise it loops infinitely
      ret     | isVoid && (null (lb_succs blk)) && (not (endsWithReturn stmts')) = [AST.CBlockStmt (AST.CReturn Nothing N.undefNode)]
              | otherwise = []
  in (cCase e (stmts'++ret))++rest'
cff_trans_blks isVoid localVars formalArgs ctxtName fname kenv ((l, blk):rest) = 
  let stmts   = lb_stmts blk
      sw       = iid swParamName
      stmts'  = cff_trans_stmts isVoid localVars formalArgs ctxtName fname sw kenv l stmts -- must be all Block Statement
      rest'   = cff_trans_blks isVoid localVars formalArgs ctxtName fname kenv rest
      e       =  AST.CConst (AST.CIntConst (cInteger (unLabPref l)) N.undefNode)
      --- stmts'' = (stmts'++ [AST.CBlockStmt (AST.CBreak N.undefNode)])
      -- need to insert "return;" if it is the last statement; otherwise it loops infinitely
      ret     | isVoid && (null (lb_succs blk)) && (not (endsWithReturn stmts')) = [AST.CBlockStmt (AST.CReturn Nothing N.undefNode)]
              | otherwise = []
  in (cCase e (stmts'++ret))++rest'
cff_trans_blks isVoid localVars formalArgs ctxtName fname kenv ((l, blk):rest) = 
  let stmts   = lb_stmts blk
      sw       = iid swParamName
      stmts'  = cff_trans_stmts isVoid localVars formalArgs ctxtName fname sw kenv l stmts -- must be all Block Statement
      rest'   = cff_trans_blks isVoid localVars formalArgs ctxtName fname kenv rest
      e       =  AST.CConst (AST.CIntConst (cInteger (unLabPref l)) N.undefNode)
      --- stmts'' = (stmts'++ [AST.CBlockStmt (AST.CBreak N.undefNode)])
      -- need to insert "return;" if it is the last statement; otherwise it loops infinitely
      ret     | isVoid && (null (lb_succs blk)) && (not (endsWithReturn stmts')) = [AST.CBlockStmt (AST.CReturn Nothing N.undefNode)]
              | otherwise = []
  in (cCase e (stmts'++ret))++rest'