{-# OPTIONS_GHC -fffi -fglasgow-exts -cpp #-} module Main(main) where import System.IO.Unsafe import System.IO import Foreign.C.Types import GHC.Base (realWorld#) import GHC.IOBase (IO(IO), unIO, unsafePerformIO) import GHC.Prim (State#,RealWorld) main = IO main_generated overlay_get_char = unIO $ do c <- getchar return $ fromIntegral c system_IO_hPutChar h c = unIO $ hPutChar h (toEnum c) foreign import ccall unsafe "stdio.h getchar" getchar :: IO CInt foreign import ccall unsafe "ctype.h iswspace" isspace :: CInt -> CInt typeRealWorld :: State# RealWorld -> State# RealWorld typeRealWorld x = x prelude_seq = seq prelude_error x = error (map toEnum x) aDD_W = (+) :: Int -> Int -> Int eQ_W = (==) :: Int -> Int -> Bool gT_W = (>) :: Int -> Int -> Bool lT_W = (<) :: Int -> Int -> Bool qUOT = quot :: Int -> Int -> Int rEM = rem :: Int -> Int -> Int nEG_W = negate :: Int -> Int int_ x = x :: Int chr_ x = fromEnum x str_ x = map chr_ x system_IO_stdin = stdin system_IO_stdout = stdout data_Char_isSpace c = isspace (toEnum c) /= 0 {- OLD PREFIX inlinePerformIO :: IO a -> a inlinePerformIO (IO m) = case m realWorld# of (# _, r #) -> r main = main_generated `seq` (return () :: IO ()) overlay_get_char = unIO $ do c <- getchar return $ fromIntegral c overlay_token = 0 :: Int overlay_put_char h c = inlinePerformIO (hPutChar h (toEnum c) >> overlay_get_char h = inlinePerformIO (getCharIO h) -# NOINLINE getCharIO #- getCharIO h = do c <- getchar return $ if c == (-1) then h `seq` (-1) else fromIntegral c -} prelude_Num_Int_negate21 = nEG_W (int_ 0) prelude_1107_showPosInt v26412 v26413 = let v6 = qUOT v26412 (int_ 10) in case (eQ_W v6 (int_ 0)) of True -> f69 v26412 v26413 False -> prelude_1107_showPosInt v6 (f69 v26412 v26413) prelude_1107_showPosInt19 = prelude_1107_showPosInt prelude_Num_Int_negate21 prelude_showChar22 prelude_1107_showPosInt31 = prelude_1107_showPosInt prelude_Num_Int_negate21 prelude__LAMBDA23 prelude_1107_showPosInt33 = prelude_1107_showPosInt (int_ 0) prelude__LAMBDA23 prelude_942_ll55 v1 v2 v3 = case (eQ_W v2 (chr_ '\n')) of True -> f56 v3 v1 False -> f60 v3 v1 prelude__LAMBDA23 = str_ "" prelude_showChar22 = (:) (chr_ ')') prelude__LAMBDA23 f10 v1 v2 = case (str_ "2147483648") of [] -> f11 v1 v2 (:) v5 v6 -> f16 v2 v5 v6 v1 f11 v1 v2 = case (system_IO_hPutChar v2 (chr_ ')') (typeRealWorld v1)) of (# v5 :: State# RealWorld , v6 #) -> case (str_ "") of [] -> f13 v5 (:) v7 v8 -> f14 v2 v7 v8 v5 f13 v1 = system_IO_hPutChar system_IO_stdout (chr_ '\n') v1 f14 v1 v2 v3 v4 = case (system_IO_hPutChar v1 v2 (typeRealWorld v4)) of (# v9 :: State# RealWorld , v10 #) -> case v3 of [] -> f13 v9 (:) v10 v11 -> f14 v1 v10 v11 v9 f16 v1 v2 v3 v4 = case (system_IO_hPutChar v1 v2 (typeRealWorld v4)) of (# v9 :: State# RealWorld , v10 #) -> case v3 of [] -> f11 v9 v1 (:) v10 v11 -> f16 v1 v10 v11 v9 f26 v1 v2 = case (str_ "2147483648") of [] -> f27 v1 v2 (:) v5 v6 -> f28 v2 v5 v6 v1 f27 v1 v2 = case (str_ "") of [] -> f13 v1 (:) v5 v6 -> f14 v2 v5 v6 v1 f28 v1 v2 v3 v4 = case (system_IO_hPutChar v1 v2 (typeRealWorld v4)) of (# v9 :: State# RealWorld , v10 #) -> case v3 of [] -> f27 v9 v1 (:) v10 v11 -> f28 v1 v10 v11 v9 f51 v1 = case (overlay_get_char (typeRealWorld (typeRealWorld v1))) of (# v3 :: State# RealWorld , v4 #) -> case (eQ_W v4 (int_ (-1))) of True -> int_ 1 False -> let v8 = aDD_W (int_ 1) (int_ 1) in seq v8 (prelude_942_ll55 v8 v4 (typeRealWorld v3)) f56 v1 v2 = case (overlay_get_char (typeRealWorld (typeRealWorld v1))) of (# v5 :: State# RealWorld , v6 #) -> case (eQ_W v6 (int_ (-1))) of True -> v2 False -> let v10 = aDD_W v2 (int_ 1) in seq v10 (prelude_942_ll55 v10 v6 (typeRealWorld v5)) f60 v1 v2 = case (overlay_get_char (typeRealWorld (typeRealWorld v1))) of (# v7 :: State# RealWorld , v8 #) -> case (eQ_W v8 (int_ (-1))) of True -> v2 False -> case (eQ_W v8 (chr_ '\n')) of True -> f56 (typeRealWorld v7) v2 False -> f60 (typeRealWorld v7) v2 f64 v1 = case (overlay_get_char (typeRealWorld (typeRealWorld v1))) of (# v5 :: State# RealWorld , v6 #) -> case (eQ_W v6 (int_ (-1))) of True -> int_ 1 False -> case (eQ_W v6 (chr_ '\n')) of True -> f51 (typeRealWorld v5) False -> f64 (typeRealWorld v5) f69 v1 v2 = (:) (aDD_W (int_ 48) (rEM v1 (int_ 10))) v2 main_generated real = case (overlay_get_char (typeRealWorld (typeRealWorld real))) of (# v5 :: State# RealWorld , v6 #) -> case (eQ_W v6 (int_ (-1))) of True -> case (lT_W (int_ 0) (int_ 0)) of True -> case (gT_W (int_ 0) (int_ 6)) of True -> let v10 = system_IO_stdout in case (system_IO_hPutChar v10 (chr_ '(') (typeRealWorld (typeRealWorld v5))) of (# v8 :: State# RealWorld , v9 #) -> case (system_IO_hPutChar v10 (chr_ '-') (typeRealWorld v8)) of (# v5 :: State# RealWorld , v9 #) -> case (eQ_W (int_ 0) (int_ (-2147483648))) of True -> f10 v5 v10 False -> case prelude_1107_showPosInt19 of [] -> f13 v5 (:) v8 v9 -> f14 v10 v8 v9 v5 False -> let v10 = system_IO_stdout in case (system_IO_hPutChar v10 (chr_ '-') (typeRealWorld (typeRealWorld v5))) of (# v8 :: State# RealWorld , v9 #) -> case (eQ_W (int_ 0) (int_ (-2147483648))) of True -> f26 v8 v10 False -> case prelude_1107_showPosInt31 of [] -> f13 v8 (:) v5 v9 -> f14 v10 v5 v9 v8 False -> case prelude_1107_showPosInt33 of [] -> f13 (typeRealWorld v5) (:) v8 v9 -> f14 system_IO_stdout v8 v9 (typeRealWorld v5) False -> let v7 = typeRealWorld v5 in let v8 = case (eQ_W v6 (chr_ '\n')) of True -> f51 v7 False -> f64 v7 in case (lT_W v8 (int_ 0)) of True -> case (gT_W (int_ 0) (int_ 6)) of True -> let v11 = system_IO_stdout in case (system_IO_hPutChar v11 (chr_ '(') (typeRealWorld (typeRealWorld v7))) of (# v9 :: State# RealWorld , v10 #) -> case (system_IO_hPutChar v11 (chr_ '-') (typeRealWorld v9)) of (# v10 :: State# RealWorld , v12 #) -> case (eQ_W v8 (int_ (-2147483648))) of True -> f10 v10 v11 False -> case (prelude_1107_showPosInt (nEG_W v8) prelude_showChar22) of [] -> f13 v10 (:) v9 v12 -> f14 v11 v9 v12 v10 False -> let v11 = system_IO_stdout in case (system_IO_hPutChar v11 (chr_ '-') (typeRealWorld (typeRealWorld v7))) of (# v9 :: State# RealWorld , v10 #) -> case (eQ_W v8 (int_ (-2147483648))) of True -> f26 v9 v11 False -> case (prelude_1107_showPosInt (nEG_W v8) prelude__LAMBDA23) of [] -> f13 v9 (:) v10 v12 -> f14 v11 v10 v12 v9 False -> case (prelude_1107_showPosInt v8 prelude__LAMBDA23) of [] -> f13 (typeRealWorld v7) (:) v9 v10 -> f14 system_IO_stdout v9 v10 (typeRealWorld v7)