bcc ((MKCON l loc tag args):xs) = do
    i <- get
    let tab = indent (level i)
    tell $ tab ++ alloc loc tag ++
           tab ++ setArgs 0 args ++ "\n" ++
           tab ++ creg l ++ " = " ++ creg Tmp ++ ";\n"
    bcc xs
  where showArg r = ", " ++ creg r
        setArgs i [] = ""
        setArgs i (x : xs) = "SETARG(" ++ creg Tmp ++ ", " ++ show i ++ ", " ++ creg x ++
                             "); " ++ setArgs (i + 1) xs
        alloc Nothing tag
            = "allocCon(" ++ creg Tmp ++ ", vm, " ++ show tag ++ ", " ++
                    show (length args) ++ ", 0);\n"
        alloc (Just old) tag
            = "updateCon(" ++ creg Tmp ++ ", " ++ creg old ++ ", " ++ show tag ++ ", " ++
                    show (length args) ++ ");\n"
bcc ((MKCON l loc tag args):xs) = do
    i <- get
    let tab = indent (level i)
    tell $ tab ++ alloc loc tag ++
           tab ++ setArgs 0 args ++ "\n" ++
           tab ++ creg l ++ " = " ++ creg Tmp ++ ";\n"
    bcc xs
  where showArg r = ", " ++ creg r
        setArgs i [] = ""
        setArgs i (x : xs) = "SETARG(" ++ creg Tmp ++ ", " ++ show i ++ ", " ++ creg x ++
                             "); " ++ setArgs (i + 1) xs
        alloc Nothing tag
            = "allocCon(" ++ creg Tmp ++ ", vm, " ++ show tag ++ ", " ++
                    show (length args) ++ ", 0);\n"
        alloc (Just old) tag
            = "updateCon(" ++ creg Tmp ++ ", " ++ creg old ++ ", " ++ show tag ++ ", " ++
                    show (length args) ++ ");\n"
bcc ((MKCON l loc tag args):xs) = do
    i <- get
    let tab = indent (level i)
    tell $ tab ++ alloc loc tag ++
           tab ++ setArgs 0 args ++ "\n" ++
           tab ++ creg l ++ " = " ++ creg Tmp ++ ";\n"
    bcc xs
  where showArg r = ", " ++ creg r
        setArgs i [] = ""
        setArgs i (x : xs) = "SETARG(" ++ creg Tmp ++ ", " ++ show i ++ ", " ++ creg x ++
                             "); " ++ setArgs (i + 1) xs
        alloc Nothing tag
            = "allocCon(" ++ creg Tmp ++ ", vm, " ++ show tag ++ ", " ++
                    show (length args) ++ ", 0);\n"
        alloc (Just old) tag
            = "updateCon(" ++ creg Tmp ++ ", " ++ creg old ++ ", " ++ show tag ++ ", " ++
                    show (length args) ++ ");\n"