Skip to content

Instantly share code, notes, and snippets.

@jtobin jtobin/speedy.hs
Last active Nov 12, 2016

Embed
What would you like to do?
such speed
import Data.Vector.Unboxed as U
import System.Random.MWC
main :: IO ()
main = withSystemRandom . asGenIO $ \gen -> do
x <- uniformVector gen 10000000 :: IO (U.Vector Double)
print (U.sum x)
-- jtobin@castor:~/sandbox$ time ./Rand +RTS -s
-- 4999721.338394913
-- 80,204,064 bytes allocated in the heap
-- 7,816 bytes copied during GC
-- 44,384 bytes maximum residency (1 sample(s))
-- 727,888 bytes maximum slop
-- 78 MB total memory in use (0 MB lost due to fragmentation)
--
-- Tot time (elapsed) Avg pause Max pause
-- Gen 0 1 colls, 0 par 0.000s 0.003s 0.0027s 0.0027s
-- Gen 1 1 colls, 0 par 0.000s 0.012s 0.0123s 0.0123s
--
-- INIT time 0.000s ( 0.004s elapsed)
-- MUT time 0.176s ( 0.230s elapsed)
-- GC time 0.000s ( 0.015s elapsed)
-- EXIT time 0.000s ( 0.012s elapsed)
-- Total time 0.179s ( 0.261s elapsed)
--
-- %GC time 0.2% (5.7% elapsed)
--
-- Alloc rate 455,658,307 bytes per MUT second
--
-- Productivity 99.8% of total user, 68.4% of total elapsed
--
--
-- real 0m0.296s <-------- close to C++
-- user 0m0.179s
-- sys 0m0.055s
@eggplantbren

This comment has been minimized.

Copy link

eggplantbren commented Nov 11, 2016

On my laptop, with this exact code I get
real 0m16.599s
user 0m16.284s
sys 0m0.312s

@jtobin

This comment has been minimized.

Copy link
Owner Author

jtobin commented Nov 12, 2016

Strange. Mine is compiled with -O2 using:

  • GHC 8.0.1
  • mwc-random-0.13.4.0
  • vector-0.11.0.0

Same stuff on your end?

@jtobin

This comment has been minimized.

Copy link
Owner Author

jtobin commented Nov 12, 2016

Compiling w/out -O2:

==================== Tidy Core ====================
Result size of Tidy Core = {terms: 35, types: 31, coercions: 0}

-- RHS size: {terms: 2, types: 0, coercions: 0}
$trModule1_r6JY :: GHC.Types.TrName
[GblId, Caf=NoCafRefs, Str=DmdType]
$trModule1_r6JY = GHC.Types.TrNameS "main"#

-- RHS size: {terms: 2, types: 0, coercions: 0}
$trModule2_r6NT :: GHC.Types.TrName
[GblId, Caf=NoCafRefs, Str=DmdType]
$trModule2_r6NT = GHC.Types.TrNameS "Main"#

-- RHS size: {terms: 3, types: 0, coercions: 0}
Main.$trModule :: GHC.Types.Module
[GblId, Caf=NoCafRefs, Str=DmdType]
Main.$trModule = GHC.Types.Module $trModule1_r6JY $trModule2_r6NT

-- RHS size: {terms: 21, types: 23, coercions: 0}
main :: IO ()
[GblId, Str=DmdType]
main =
  . @ (GenIO -> IO ())
    @ (IO ())
    @ (GenIO -> IO ())
    (withSystemRandom @ IO @ () Control.Monad.Primitive.$fPrimBaseIO)
    (asGenIO @ ())
    (\ (gen_a5bU :: GenIO) ->
       >>=
         @ IO
         GHC.Base.$fMonadIO
         @ (Vector Double)
         @ ()
         (uniformVector
            @ IO
            @ Double
            @ Vector
            Control.Monad.Primitive.$fPrimMonadIO
            System.Random.MWC.$fVariateDouble
            Data.Vector.Unboxed.Base.$fVectorVectorDouble
            gen_a5bU
            (GHC.Types.I# 10000000#))
         (\ (x_a5bV :: Vector Double) ->
            print
              @ Double
              GHC.Float.$fShowDouble
              (U.sum
                 @ Double
                 Data.Vector.Unboxed.Base.$fUnboxDouble
                 GHC.Float.$fNumDouble
                 x_a5bV)))

-- RHS size: {terms: 2, types: 1, coercions: 0}
:Main.main :: IO ()
[GblId, Str=DmdType]
:Main.main = GHC.TopHandler.runMainIO @ () main
@jtobin

This comment has been minimized.

Copy link
Owner Author

jtobin commented Nov 12, 2016

In comparison, compiling with -O2 seems to do a lot of aggressive transformation and inlining:

==================== Tidy Core ====================
Result size of Tidy Core
  = {terms: 2,336, types: 1,128, coercions: 89}

-- RHS size: {terms: 2, types: 0, coercions: 0}
lvl2_rcNp :: [Char]
[GblId, Str=DmdType]
lvl2_rcNp = GHC.CString.unpackCString# "error"#

-- RHS size: {terms: 2, types: 0, coercions: 0}
lvl3_rcNq :: [Char]
[GblId, Str=DmdType]
lvl3_rcNq =
  GHC.CString.unpackCString#
    "vector-0.11.0.0-BEDZb5o2QOhGbIm6ky7rl6"#

-- RHS size: {terms: 2, types: 0, coercions: 0}
lvl4_rcNr :: [Char]
[GblId, Str=DmdType]
lvl4_rcNr =
  GHC.CString.unpackCString# "Data.Vector.Primitive.Mutable"#

-- RHS size: {terms: 2, types: 0, coercions: 0}
lvl5_rcNs :: [Char]
[GblId, Str=DmdType]
lvl5_rcNs =
  GHC.CString.unpackCString# "./Data/Vector/Primitive/Mutable.hs"#

-- RHS size: {terms: 2, types: 0, coercions: 0}
lvl6_rcNt :: Int
[GblId, Caf=NoCafRefs, Str=DmdType]
lvl6_rcNt = GHC.Types.I# 97#

-- RHS size: {terms: 2, types: 0, coercions: 0}
lvl7_rcNu :: Int
[GblId, Caf=NoCafRefs, Str=DmdType]
lvl7_rcNu = GHC.Types.I# 16#

-- RHS size: {terms: 2, types: 0, coercions: 0}
lvl8_rcNv :: Int
[GblId, Caf=NoCafRefs, Str=DmdType]
lvl8_rcNv = GHC.Types.I# 79#

-- RHS size: {terms: 8, types: 0, coercions: 0}
lvl9_rcNw :: GHC.Stack.Types.SrcLoc
[GblId, Str=DmdType]
lvl9_rcNw =
  GHC.Stack.Types.SrcLoc
    lvl3_rcNq
    lvl4_rcNr
    lvl5_rcNs
    lvl6_rcNt
    lvl7_rcNu
    lvl6_rcNt
    lvl8_rcNv

-- RHS size: {terms: 4, types: 0, coercions: 0}
lvl10_rcNx :: GHC.Stack.Types.CallStack
[GblId, Str=DmdType]
lvl10_rcNx =
  GHC.Stack.Types.PushCallStack
    lvl2_rcNp lvl9_rcNw GHC.Stack.Types.EmptyCallStack

-- RHS size: {terms: 2, types: 0, coercions: 0}
Main.$trModule2 :: GHC.Types.TrName
[GblId,
 Caf=NoCafRefs,
 Str=DmdType m1,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 20}]
Main.$trModule2 = GHC.Types.TrNameS "main"#

-- RHS size: {terms: 2, types: 0, coercions: 0}
Main.$trModule1 :: GHC.Types.TrName
[GblId,
 Caf=NoCafRefs,
 Str=DmdType m1,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 20}]
Main.$trModule1 = GHC.Types.TrNameS "Main"#

-- RHS size: {terms: 3, types: 0, coercions: 0}
Main.$trModule :: GHC.Types.Module
[GblId,
 Caf=NoCafRefs,
 Str=DmdType m,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
Main.$trModule = GHC.Types.Module Main.$trModule2 Main.$trModule1

-- RHS size: {terms: 9, types: 11, coercions: 0}
lvl18_rcNH :: [Char]
[GblId, Str=DmdType]
lvl18_rcNH =
  case GHC.Show.$wshowSignedInt 0# 10000000# (GHC.Types.[] @ Char)
  of _ [Occ=Dead] { (# ww5_abmR, ww6_abmS #) ->
  GHC.Types.: @ Char ww5_abmR ww6_abmS
  }

-- RHS size: {terms: 3, types: 0, coercions: 0}
lvl19_rcNI :: [Char]
[GblId, Str=DmdType]
lvl19_rcNI =
  GHC.CString.unpackAppendCString#
    "Primitive.basicUnsafeNew: length to large: "# lvl18_rcNH

-- RHS size: {terms: 3, types: 6, coercions: 4}
lvl20_rcNJ
  :: IO
       (Data.Vector.Primitive.Mutable.MVector
          (Control.Monad.Primitive.PrimState IO) Double)
[GblId, Str=DmdType x]
lvl20_rcNJ =
  error
    @ 'GHC.Types.PtrRepLifted
    @ (IO
         (Data.Vector.Primitive.Mutable.MVector
            (Control.Monad.Primitive.PrimState IO) Double))
    (lvl10_rcNx
     `cast` (Sym
               (GHC.Classes.N:IP[0] <"callStack">_N <GHC.Stack.Types.CallStack>_N)
             :: (GHC.Stack.Types.CallStack :: *)
                ~R#
                ((?callStack::GHC.Stack.Types.CallStack) :: Constraint)))
    lvl19_rcNI

-- RHS size: {terms: 2,261, types: 1,054, coercions: 71}
Main.main2
  :: GenIO
     -> GHC.Prim.State# GHC.Prim.RealWorld
     -> (# GHC.Prim.State# GHC.Prim.RealWorld, () #)
[GblId, Arity=2, Str=DmdType <L,U(U,A,U)><S,U>]
Main.main2 =
  \ (gen_a5ih :: GenIO)
    (s_a8I0 [OS=OneShot] :: GHC.Prim.State# GHC.Prim.RealWorld) ->
    case GHC.Classes.divInt# 9223372036854775807# 8#
    of ww4_abm5 { __DEFAULT ->
    case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.># 10000000# ww4_abm5)
    of _ [Occ=Dead] {
      False ->
        case GHC.Prim.newByteArray#
               @ (Control.Monad.Primitive.PrimState IO)
               80000000#
               (s_a8I0
                `cast` ((GHC.Prim.State#
                           (Sym Control.Monad.Primitive.D:R:PrimStateIO[0]))_R
                        :: (GHC.Prim.State# GHC.Prim.RealWorld :: TYPE 'GHC.Types.VoidRep)
                           ~R#
                           (GHC.Prim.State# (Control.Monad.Primitive.PrimState IO) :: TYPE
                                                                                        'GHC.Types.VoidRep)))
        of _ [Occ=Dead] { (# ipv_abjY, ipv1_abjZ #) ->
        case gen_a5ih
             `cast` (System.Random.MWC.N:Gen[0]
                       <Control.Monad.Primitive.PrimState IO>_N
                     ; Data.Vector.Unboxed.Base.D:R:MVectorsWord320[0]
                         <Control.Monad.Primitive.PrimState IO>_N
                     ; Data.Vector.Unboxed.Base.N:R:MVectorsWord32[0]
                         <Control.Monad.Primitive.PrimState IO>_N
                     :: (Gen (Control.Monad.Primitive.PrimState IO) :: *)
                        ~R#
                        (Data.Vector.Primitive.Mutable.MVector
                           (Control.Monad.Primitive.PrimState IO) GHC.Word.Word32 :: *))
        of _ [Occ=Dead]
        { Data.Vector.Primitive.Mutable.MVector dt_a8Kf dt1_a8Kg
                                                dt2_a8Kh ->
        case GHC.Prim.readWord32Array#
               @ (Control.Monad.Primitive.PrimState IO)
               dt2_a8Kh
               (GHC.Prim.+# dt_a8Kf 256#)
               ipv_abjY
        of _ [Occ=Dead] { (# ipv2_a8PW, ipv3_a8PX #) ->
        case GHC.Prim.readWord32Array#
               @ (Control.Monad.Primitive.PrimState IO)
               dt2_a8Kh
               (GHC.Prim.+# dt_a8Kf 257#)
               ipv2_a8PW
        of _ [Occ=Dead] { (# ipv4_X8Rx, ipv5_X8Rz #) ->
        let {
          ipv6_s9pG [Dmd=<S,U>] :: GHC.Prim.Int#
          [LclId, Str=DmdType]
          ipv6_s9pG =
            GHC.Prim.word2Int#
              (GHC.Prim.narrow8Word# (GHC.Prim.plusWord# ipv3_a8PX 1##)) } in
        case GHC.Prim.readWord32Array#
               @ (Control.Monad.Primitive.PrimState IO)
               dt2_a8Kh
               (GHC.Prim.+# dt_a8Kf ipv6_s9pG)
               ipv4_X8Rx
        of _ [Occ=Dead] { (# ipv7_X8Ry, ipv8_X8RA #) ->
        let {
          j_s9pH [Dmd=<S,U>] :: GHC.Prim.Int#
          [LclId, Str=DmdType]
          j_s9pH =
            GHC.Prim.word2Int#
              (GHC.Prim.narrow8Word#
                 (GHC.Prim.int2Word# (GHC.Prim.+# ipv6_s9pG 1#))) } in
        case GHC.Prim.readWord32Array#
               @ (Control.Monad.Primitive.PrimState IO)
               dt2_a8Kh
               (GHC.Prim.+# dt_a8Kf j_s9pH)
               ipv7_X8Ry
        of _ [Occ=Dead] { (# ipv9_X8RD, ipv10_X8RF #) ->
        let {
          t_s9pl [Dmd=<S,U>] :: GHC.Prim.Word#
          [LclId, Str=DmdType]
          t_s9pl =
            GHC.Prim.plusWord#
              (GHC.Prim.timesWord# 1540315826## ipv8_X8RA) ipv5_X8Rz } in
        let {
          c'_s9pm [Dmd=<S,U>] :: GHC.Prim.Word#
          [LclId, Str=DmdType]
          c'_s9pm =
            GHC.Prim.narrow32Word# (GHC.Prim.uncheckedShiftRL# t_s9pl 32#) } in
        let {
          x_s9pn [Dmd=<S,U>] :: GHC.Prim.Word#
          [LclId, Str=DmdType]
          x_s9pn =
            GHC.Prim.narrow32Word#
              (GHC.Prim.plusWord# (GHC.Prim.narrow32Word# t_s9pl) c'_s9pm) } in
        let {
          $j_scj4
            :: GHC.Prim.State# GHC.Prim.RealWorld
               -> Int -> (# GHC.Prim.State# GHC.Prim.RealWorld, () #)
          [LclId, Arity=2, Str=DmdType]
          $j_scj4 =
            \ (ipv11_X8Je [OS=OneShot] :: GHC.Prim.State# GHC.Prim.RealWorld)
              (ipv12_X8Jg [OS=OneShot] :: Int) ->
              case ipv12_X8Jg of _ [Occ=Dead] { GHC.Types.I# dt4_abo2 ->
              case GHC.Prim.unsafeFreezeByteArray#
                     @ (Control.Monad.Primitive.PrimState IO)
                     ipv1_abjZ
                     (ipv11_X8Je
                      `cast` ((GHC.Prim.State#
                                 (Sym Control.Monad.Primitive.D:R:PrimStateIO[0]))_R
                              :: (GHC.Prim.State# GHC.Prim.RealWorld :: TYPE 'GHC.Types.VoidRep)
                                 ~R#
                                 (GHC.Prim.State# (Control.Monad.Primitive.PrimState IO) :: TYPE
                                                                                              'GHC.Types.VoidRep)))
              of _ [Occ=Dead] { (# ipv13_aboP, ipv14_aboQ #) ->
              GHC.IO.Handle.Text.hPutStr2
                GHC.IO.Handle.FD.stdout
                (letrec {
                   $s$wfoldlM'_loop_scsu [Occ=LoopBreaker]
                     :: GHC.Prim.Int# -> GHC.Prim.Double# -> GHC.Prim.Double#
                   [LclId, Arity=2, Str=DmdType <S,U><L,U>]
                   $s$wfoldlM'_loop_scsu =
                     \ (sc_scst :: GHC.Prim.Int#) (sc1_scss :: GHC.Prim.Double#) ->
                       case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.>=# sc_scst dt4_abo2)
                       of _ [Occ=Dead] {
                         False ->
                           case GHC.Prim.indexDoubleArray# ipv14_aboQ sc_scst
                           of wild3_a8GE { __DEFAULT ->
                           $s$wfoldlM'_loop_scsu
                             (GHC.Prim.+# sc_scst 1#) (GHC.Prim.+## sc1_scss wild3_a8GE)
                           };
                         True -> sc1_scss
                       }; } in
                 case $s$wfoldlM'_loop_scsu 0# 0.0## of ww_sc3J { __DEFAULT ->
                 GHC.Float.$w$sshowSignedFloat
                   GHC.Float.$fShowDouble_$sshowFloat
                   GHC.Show.shows22
                   ww_sc3J
                   (GHC.Types.[] @ Char)
                 })
                GHC.Types.True
                (ipv13_aboP
                 `cast` ((GHC.Prim.State#
                            Control.Monad.Primitive.D:R:PrimStateIO[0])_R
                         :: (GHC.Prim.State# (Control.Monad.Primitive.PrimState IO) :: TYPE
                                                                                         'GHC.Types.VoidRep)
                            ~R#
                            (GHC.Prim.State# GHC.Prim.RealWorld :: TYPE 'GHC.Types.VoidRep)))
              }
              } } in
        case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.ltWord# x_s9pn c'_s9pm)
        of _ [Occ=Dead] {
          False ->
            let {
              u_sbwP [Dmd=<S,U>] :: GHC.Prim.Word#
              [LclId, Str=DmdType]
              u_sbwP =
                GHC.Prim.plusWord#
                  (GHC.Prim.timesWord# 1540315826## ipv10_X8RF) c'_s9pm } in
            let {
              y#_X8Sz [Dmd=<S,U>] :: GHC.Prim.Word#
              [LclId, Str=DmdType]
              y#_X8Sz =
                GHC.Prim.narrow32Word# (GHC.Prim.uncheckedShiftRL# u_sbwP 32#) } in
            let {
              x1_a8TF [Dmd=<S,U>] :: GHC.Prim.Word#
              [LclId, Str=DmdType]
              x1_a8TF =
                GHC.Prim.narrow32Word#
                  (GHC.Prim.plusWord# (GHC.Prim.narrow32Word# u_sbwP) y#_X8Sz) } in
            case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.ltWord# x1_a8TF y#_X8Sz)
            of _ [Occ=Dead] {
              False ->
                case GHC.Prim.writeWord32Array#
                       @ (Control.Monad.Primitive.PrimState IO)
                       dt2_a8Kh
                       (GHC.Prim.+# dt_a8Kf ipv6_s9pG)
                       x_s9pn
                       ipv9_X8RD
                of s'#_a8MP [OS=OneShot] { __DEFAULT ->
                case GHC.Prim.writeWord32Array#
                       @ (Control.Monad.Primitive.PrimState IO)
                       dt2_a8Kh
                       (GHC.Prim.+# dt_a8Kf j_s9pH)
                       x1_a8TF
                       s'#_a8MP
                of s'#1_a8N7 [OS=OneShot] { __DEFAULT ->
                case GHC.Prim.writeWord32Array#
                       @ (Control.Monad.Primitive.PrimState IO)
                       dt2_a8Kh
                       (GHC.Prim.+# dt_a8Kf 256#)
                       (GHC.Prim.narrow32Word# (GHC.Prim.int2Word# j_s9pH))
                       s'#1_a8N7
                of s'#2_a8Np [OS=OneShot] { __DEFAULT ->
                case GHC.Prim.writeWord32Array#
                       @ (Control.Monad.Primitive.PrimState IO)
                       dt2_a8Kh
                       (GHC.Prim.+# dt_a8Kf 257#)
                       y#_X8Sz
                       s'#2_a8Np
                of s'#3_a8NH [OS=OneShot] { __DEFAULT ->
                case GHC.Prim.writeDoubleArray#
                       @ (Control.Monad.Primitive.PrimState IO)
                       ipv1_abjZ
                       0#
                       (GHC.Prim.+##
                          (GHC.Prim.+##
                             (GHC.Prim.*##
                                (GHC.Prim.int2Double#
                                   (GHC.Prim.narrow32Int# (GHC.Prim.word2Int# x_s9pn)))
                                2.3283064365386963e-10##)
                             0.5000000000000001##)
                          (GHC.Prim.*##
                             (GHC.Prim.int2Double#
                                (GHC.Prim.word2Int#
                                   (GHC.Prim.and#
                                      (GHC.Prim.int2Word#
                                         (GHC.Prim.narrow32Int# (GHC.Prim.word2Int# x1_a8TF)))
                                      1048575##)))
                             2.220446049250313e-16##))
                       s'#3_a8NH
                of s'#4_abnm [OS=OneShot] { __DEFAULT ->
                letrec {
                  $s$wfoldlM'_loop_scsB [Occ=LoopBreaker]
                    :: GHC.Prim.State# GHC.Prim.RealWorld
                       -> GHC.Prim.Int#
                       -> GHC.Prim.Int#
                       -> (# GHC.Prim.State# GHC.Prim.RealWorld, Int #)
                  [LclId, Arity=3, Str=DmdType <S,U><S,U><L,U>]
                  $s$wfoldlM'_loop_scsB =
                    \ (sc_scsA [OS=OneShot] :: GHC.Prim.State# GHC.Prim.RealWorld)
                      (sc1_scsy :: GHC.Prim.Int#)
                      (sc2_scsx :: GHC.Prim.Int#) ->
                      case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<=# sc1_scsy 0#)
                      of _ [Occ=Dead] {
                        False ->
                          case GHC.Prim.readWord32Array#
                                 @ (Control.Monad.Primitive.PrimState IO)
                                 dt2_a8Kh
                                 (GHC.Prim.+# dt_a8Kf 256#)
                                 (sc_scsA
                                  `cast` ((GHC.Prim.State#
                                             (Sym Control.Monad.Primitive.D:R:PrimStateIO[0]))_R
                                          :: (GHC.Prim.State# GHC.Prim.RealWorld :: TYPE
                                                                                      'GHC.Types.VoidRep)
                                             ~R#
                                             (GHC.Prim.State#
                                                (Control.Monad.Primitive.PrimState IO) :: TYPE
                                                                                            'GHC.Types.VoidRep)))
                          of _ [Occ=Dead] { (# ipv11_X8Sp, ipv12_X8Sr #) ->
                          case GHC.Prim.readWord32Array#
                                 @ (Control.Monad.Primitive.PrimState IO)
                                 dt2_a8Kh
                                 (GHC.Prim.+# dt_a8Kf 257#)
                                 ipv11_X8Sp
                          of _ [Occ=Dead] { (# ipv13_X8U4, ipv14_X8U7 #) ->
                          let {
                            ipv15_X9sg [Dmd=<S,U>] :: GHC.Prim.Int#
                            [LclId, Str=DmdType]
                            ipv15_X9sg =
                              GHC.Prim.word2Int#
                                (GHC.Prim.narrow8Word# (GHC.Prim.plusWord# ipv12_X8Sr 1##)) } in
                          case GHC.Prim.readWord32Array#
                                 @ (Control.Monad.Primitive.PrimState IO)
                                 dt2_a8Kh
                                 (GHC.Prim.+# dt_a8Kf ipv15_X9sg)
                                 ipv13_X8U4
                          of _ [Occ=Dead] { (# ipv16_X8Ub, ipv17_X8Ue #) ->
                          let {
                            j1_X9sn [Dmd=<S,U>] :: GHC.Prim.Int#
                            [LclId, Str=DmdType]
                            j1_X9sn =
                              GHC.Prim.word2Int#
                                (GHC.Prim.narrow8Word#
                                   (GHC.Prim.int2Word# (GHC.Prim.+# ipv15_X9sg 1#))) } in
                          case GHC.Prim.readWord32Array#
                                 @ (Control.Monad.Primitive.PrimState IO)
                                 dt2_a8Kh
                                 (GHC.Prim.+# dt_a8Kf j1_X9sn)
                                 ipv16_X8Ub
                          of _ [Occ=Dead] { (# ipv18_X8Um, ipv19_X8Up #) ->
                          let {
                            t1_X9s7 [Dmd=<S,U>] :: GHC.Prim.Word#
                            [LclId, Str=DmdType]
                            t1_X9s7 =
                              GHC.Prim.plusWord#
                                (GHC.Prim.timesWord# 1540315826## ipv17_X8Ue) ipv14_X8U7 } in
                          let {
                            c'1_X9sa [Dmd=<S,U>] :: GHC.Prim.Word#
                            [LclId, Str=DmdType]
                            c'1_X9sa =
                              GHC.Prim.narrow32Word#
                                (GHC.Prim.uncheckedShiftRL# t1_X9s7 32#) } in
                          let {
                            x2_X9sd [Dmd=<S,U>] :: GHC.Prim.Word#
                            [LclId, Str=DmdType]
                            x2_X9sd =
                              GHC.Prim.narrow32Word#
                                (GHC.Prim.plusWord# (GHC.Prim.narrow32Word# t1_X9s7) c'1_X9sa) } in
                          case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.ltWord# x2_X9sd c'1_X9sa)
                          of _ [Occ=Dead] {
                            False ->
                              let {
                                u1_XbzJ [Dmd=<S,U>] :: GHC.Prim.Word#
                                [LclId, Str=DmdType]
                                u1_XbzJ =
                                  GHC.Prim.plusWord#
                                    (GHC.Prim.timesWord# 1540315826## ipv19_X8Up) c'1_X9sa } in
                              let {
                                y#1_X8Vv [Dmd=<S,U>] :: GHC.Prim.Word#
                                [LclId, Str=DmdType]
                                y#1_X8Vv =
                                  GHC.Prim.narrow32Word#
                                    (GHC.Prim.uncheckedShiftRL# u1_XbzJ 32#) } in
                              let {
                                x3_X8WD [Dmd=<S,U>] :: GHC.Prim.Word#
                                [LclId, Str=DmdType]
                                x3_X8WD =
                                  GHC.Prim.narrow32Word#
                                    (GHC.Prim.plusWord#
                                       (GHC.Prim.narrow32Word# u1_XbzJ) y#1_X8Vv) } in
                              case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.ltWord# x3_X8WD y#1_X8Vv)
                              of _ [Occ=Dead] {
                                False ->
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf ipv15_X9sg)
                                         x2_X9sd
                                         ipv18_X8Um
                                  of s'#5_X8PR [OS=OneShot] { __DEFAULT ->
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf j1_X9sn)
                                         x3_X8WD
                                         s'#5_X8PR
                                  of s'#6_X8Qb [OS=OneShot] { __DEFAULT ->
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf 256#)
                                         (GHC.Prim.narrow32Word# (GHC.Prim.int2Word# j1_X9sn))
                                         s'#6_X8Qb
                                  of s'#7_X8Qv [OS=OneShot] { __DEFAULT ->
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf 257#)
                                         y#1_X8Vv
                                         s'#7_X8Qv
                                  of s'#8_X8QP [OS=OneShot] { __DEFAULT ->
                                  case GHC.Prim.writeDoubleArray#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         ipv1_abjZ
                                         sc2_scsx
                                         (GHC.Prim.+##
                                            (GHC.Prim.+##
                                               (GHC.Prim.*##
                                                  (GHC.Prim.int2Double#
                                                     (GHC.Prim.narrow32Int#
                                                        (GHC.Prim.word2Int# x2_X9sd)))
                                                  2.3283064365386963e-10##)
                                               0.5000000000000001##)
                                            (GHC.Prim.*##
                                               (GHC.Prim.int2Double#
                                                  (GHC.Prim.word2Int#
                                                     (GHC.Prim.and#
                                                        (GHC.Prim.int2Word#
                                                           (GHC.Prim.narrow32Int#
                                                              (GHC.Prim.word2Int# x3_X8WD)))
                                                        1048575##)))
                                               2.220446049250313e-16##))
                                         s'#8_X8QP
                                  of s'#9_Xbqw [OS=OneShot] { __DEFAULT ->
                                  $s$wfoldlM'_loop_scsB
                                    (s'#9_Xbqw
                                     `cast` ((GHC.Prim.State#
                                                Control.Monad.Primitive.D:R:PrimStateIO[0])_R
                                             :: (GHC.Prim.State#
                                                   (Control.Monad.Primitive.PrimState IO) :: TYPE
                                                                                               'GHC.Types.VoidRep)
                                                ~R#
                                                (GHC.Prim.State# GHC.Prim.RealWorld :: TYPE
                                                                                         'GHC.Types.VoidRep)))
                                    (GHC.Prim.-# sc1_scsy 1#)
                                    (GHC.Prim.+# sc2_scsx 1#)
                                  }
                                  }
                                  }
                                  }
                                  };
                                True ->
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf ipv15_X9sg)
                                         x2_X9sd
                                         ipv18_X8Um
                                  of s'#5_X8PR [OS=OneShot] { __DEFAULT ->
                                  let {
                                    x#_a8N5 [Dmd=<S,U>] :: GHC.Prim.Word#
                                    [LclId, Str=DmdType]
                                    x#_a8N5 =
                                      GHC.Prim.narrow32Word# (GHC.Prim.plusWord# x3_X8WD 1##) } in
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf j1_X9sn)
                                         x#_a8N5
                                         s'#5_X8PR
                                  of s'#6_X8Qd [OS=OneShot] { __DEFAULT ->
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf 256#)
                                         (GHC.Prim.narrow32Word# (GHC.Prim.int2Word# j1_X9sn))
                                         s'#6_X8Qd
                                  of s'#7_X8Qx [OS=OneShot] { __DEFAULT ->
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf 257#)
                                         (GHC.Prim.narrow32Word# (GHC.Prim.plusWord# y#1_X8Vv 1##))
                                         s'#7_X8Qx
                                  of s'#8_X8QR [OS=OneShot] { __DEFAULT ->
                                  case GHC.Prim.writeDoubleArray#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         ipv1_abjZ
                                         sc2_scsx
                                         (GHC.Prim.+##
                                            (GHC.Prim.+##
                                               (GHC.Prim.*##
                                                  (GHC.Prim.int2Double#
                                                     (GHC.Prim.narrow32Int#
                                                        (GHC.Prim.word2Int# x2_X9sd)))
                                                  2.3283064365386963e-10##)
                                               0.5000000000000001##)
                                            (GHC.Prim.*##
                                               (GHC.Prim.int2Double#
                                                  (GHC.Prim.word2Int#
                                                     (GHC.Prim.and#
                                                        (GHC.Prim.int2Word#
                                                           (GHC.Prim.narrow32Int#
                                                              (GHC.Prim.word2Int# x#_a8N5)))
                                                        1048575##)))
                                               2.220446049250313e-16##))
                                         s'#8_X8QR
                                  of s'#9_Xbqy [OS=OneShot] { __DEFAULT ->
                                  $s$wfoldlM'_loop_scsB
                                    (s'#9_Xbqy
                                     `cast` ((GHC.Prim.State#
                                                Control.Monad.Primitive.D:R:PrimStateIO[0])_R
                                             :: (GHC.Prim.State#
                                                   (Control.Monad.Primitive.PrimState IO) :: TYPE
                                                                                               'GHC.Types.VoidRep)
                                                ~R#
                                                (GHC.Prim.State# GHC.Prim.RealWorld :: TYPE
                                                                                         'GHC.Types.VoidRep)))
                                    (GHC.Prim.-# sc1_scsy 1#)
                                    (GHC.Prim.+# sc2_scsx 1#)
                                  }
                                  }
                                  }
                                  }
                                  }
                              };
                            True ->
                              let {
                                u1_sbx0 [Dmd=<S,U>] :: GHC.Prim.Word#
                                [LclId, Str=DmdType]
                                u1_sbx0 =
                                  GHC.Prim.plusWord#
                                    (GHC.Prim.timesWord# 1540315826## ipv19_X8Up)
                                    (GHC.Prim.narrow32Word# (GHC.Prim.plusWord# c'1_X9sa 1##)) } in
                              let {
                                y#1_X8Vv [Dmd=<S,U>] :: GHC.Prim.Word#
                                [LclId, Str=DmdType]
                                y#1_X8Vv =
                                  GHC.Prim.narrow32Word#
                                    (GHC.Prim.uncheckedShiftRL# u1_sbx0 32#) } in
                              let {
                                x3_X8WD [Dmd=<S,U>] :: GHC.Prim.Word#
                                [LclId, Str=DmdType]
                                x3_X8WD =
                                  GHC.Prim.narrow32Word#
                                    (GHC.Prim.plusWord#
                                       (GHC.Prim.narrow32Word# u1_sbx0) y#1_X8Vv) } in
                              let {
                                ipv20_sbwZ [Dmd=<S,U>] :: GHC.Prim.Word#
                                [LclId, Str=DmdType]
                                ipv20_sbwZ =
                                  GHC.Prim.narrow32Word# (GHC.Prim.plusWord# x2_X9sd 1##) } in
                              case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.ltWord# x3_X8WD y#1_X8Vv)
                              of _ [Occ=Dead] {
                                False ->
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf ipv15_X9sg)
                                         ipv20_sbwZ
                                         ipv18_X8Um
                                  of s'#5_X8PT [OS=OneShot] { __DEFAULT ->
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf j1_X9sn)
                                         x3_X8WD
                                         s'#5_X8PT
                                  of s'#6_X8Qd [OS=OneShot] { __DEFAULT ->
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf 256#)
                                         (GHC.Prim.narrow32Word# (GHC.Prim.int2Word# j1_X9sn))
                                         s'#6_X8Qd
                                  of s'#7_X8Qx [OS=OneShot] { __DEFAULT ->
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf 257#)
                                         y#1_X8Vv
                                         s'#7_X8Qx
                                  of s'#8_X8QR [OS=OneShot] { __DEFAULT ->
                                  case GHC.Prim.writeDoubleArray#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         ipv1_abjZ
                                         sc2_scsx
                                         (GHC.Prim.+##
                                            (GHC.Prim.+##
                                               (GHC.Prim.*##
                                                  (GHC.Prim.int2Double#
                                                     (GHC.Prim.narrow32Int#
                                                        (GHC.Prim.word2Int# ipv20_sbwZ)))
                                                  2.3283064365386963e-10##)
                                               0.5000000000000001##)
                                            (GHC.Prim.*##
                                               (GHC.Prim.int2Double#
                                                  (GHC.Prim.word2Int#
                                                     (GHC.Prim.and#
                                                        (GHC.Prim.int2Word#
                                                           (GHC.Prim.narrow32Int#
                                                              (GHC.Prim.word2Int# x3_X8WD)))
                                                        1048575##)))
                                               2.220446049250313e-16##))
                                         s'#8_X8QR
                                  of s'#9_Xbqy [OS=OneShot] { __DEFAULT ->
                                  $s$wfoldlM'_loop_scsB
                                    (s'#9_Xbqy
                                     `cast` ((GHC.Prim.State#
                                                Control.Monad.Primitive.D:R:PrimStateIO[0])_R
                                             :: (GHC.Prim.State#
                                                   (Control.Monad.Primitive.PrimState IO) :: TYPE
                                                                                               'GHC.Types.VoidRep)
                                                ~R#
                                                (GHC.Prim.State# GHC.Prim.RealWorld :: TYPE
                                                                                         'GHC.Types.VoidRep)))
                                    (GHC.Prim.-# sc1_scsy 1#)
                                    (GHC.Prim.+# sc2_scsx 1#)
                                  }
                                  }
                                  }
                                  }
                                  };
                                True ->
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf ipv15_X9sg)
                                         ipv20_sbwZ
                                         ipv18_X8Um
                                  of s'#5_X8PT [OS=OneShot] { __DEFAULT ->
                                  let {
                                    x#_a8N5 [Dmd=<S,U>] :: GHC.Prim.Word#
                                    [LclId, Str=DmdType]
                                    x#_a8N5 =
                                      GHC.Prim.narrow32Word# (GHC.Prim.plusWord# x3_X8WD 1##) } in
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf j1_X9sn)
                                         x#_a8N5
                                         s'#5_X8PT
                                  of s'#6_X8Qf [OS=OneShot] { __DEFAULT ->
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf 256#)
                                         (GHC.Prim.narrow32Word# (GHC.Prim.int2Word# j1_X9sn))
                                         s'#6_X8Qf
                                  of s'#7_X8Qz [OS=OneShot] { __DEFAULT ->
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf 257#)
                                         (GHC.Prim.narrow32Word# (GHC.Prim.plusWord# y#1_X8Vv 1##))
                                         s'#7_X8Qz
                                  of s'#8_X8QT [OS=OneShot] { __DEFAULT ->
                                  case GHC.Prim.writeDoubleArray#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         ipv1_abjZ
                                         sc2_scsx
                                         (GHC.Prim.+##
                                            (GHC.Prim.+##
                                               (GHC.Prim.*##
                                                  (GHC.Prim.int2Double#
                                                     (GHC.Prim.narrow32Int#
                                                        (GHC.Prim.word2Int# ipv20_sbwZ)))
                                                  2.3283064365386963e-10##)
                                               0.5000000000000001##)
                                            (GHC.Prim.*##
                                               (GHC.Prim.int2Double#
                                                  (GHC.Prim.word2Int#
                                                     (GHC.Prim.and#
                                                        (GHC.Prim.int2Word#
                                                           (GHC.Prim.narrow32Int#
                                                              (GHC.Prim.word2Int# x#_a8N5)))
                                                        1048575##)))
                                               2.220446049250313e-16##))
                                         s'#8_X8QT
                                  of s'#9_XbqA [OS=OneShot] { __DEFAULT ->
                                  $s$wfoldlM'_loop_scsB
                                    (s'#9_XbqA
                                     `cast` ((GHC.Prim.State#
                                                Control.Monad.Primitive.D:R:PrimStateIO[0])_R
                                             :: (GHC.Prim.State#
                                                   (Control.Monad.Primitive.PrimState IO) :: TYPE
                                                                                               'GHC.Types.VoidRep)
                                                ~R#
                                                (GHC.Prim.State# GHC.Prim.RealWorld :: TYPE
                                                                                         'GHC.Types.VoidRep)))
                                    (GHC.Prim.-# sc1_scsy 1#)
                                    (GHC.Prim.+# sc2_scsx 1#)
                                  }
                                  }
                                  }
                                  }
                                  }
                              }
                          }
                          }
                          }
                          }
                          };
                        True -> (# sc_scsA, GHC.Types.I# sc2_scsx #)
                      }; } in
                case $s$wfoldlM'_loop_scsB
                       (s'#4_abnm
                        `cast` ((GHC.Prim.State#
                                   Control.Monad.Primitive.D:R:PrimStateIO[0])_R
                                :: (GHC.Prim.State# (Control.Monad.Primitive.PrimState IO) :: TYPE
                                                                                                'GHC.Types.VoidRep)
                                   ~R#
                                   (GHC.Prim.State# GHC.Prim.RealWorld :: TYPE 'GHC.Types.VoidRep)))
                       9999999#
                       1#
                of _ [Occ=Dead] { (# ipv11_X8Je, ipv12_X8Jg #) ->
                $j_scj4 ipv11_X8Je ipv12_X8Jg
                }
                }
                }
                }
                }
                };
              True ->
                case GHC.Prim.writeWord32Array#
                       @ (Control.Monad.Primitive.PrimState IO)
                       dt2_a8Kh
                       (GHC.Prim.+# dt_a8Kf ipv6_s9pG)
                       x_s9pn
                       ipv9_X8RD
                of s'#_a8MP [OS=OneShot] { __DEFAULT ->
                let {
                  x#_a8N5 [Dmd=<S,U>] :: GHC.Prim.Word#
                  [LclId, Str=DmdType]
                  x#_a8N5 =
                    GHC.Prim.narrow32Word# (GHC.Prim.plusWord# x1_a8TF 1##) } in
                case GHC.Prim.writeWord32Array#
                       @ (Control.Monad.Primitive.PrimState IO)
                       dt2_a8Kh
                       (GHC.Prim.+# dt_a8Kf j_s9pH)
                       x#_a8N5
                       s'#_a8MP
                of s'#1_a8N7 [OS=OneShot] { __DEFAULT ->
                case GHC.Prim.writeWord32Array#
                       @ (Control.Monad.Primitive.PrimState IO)
                       dt2_a8Kh
                       (GHC.Prim.+# dt_a8Kf 256#)
                       (GHC.Prim.narrow32Word# (GHC.Prim.int2Word# j_s9pH))
                       s'#1_a8N7
                of s'#2_a8Np [OS=OneShot] { __DEFAULT ->
                case GHC.Prim.writeWord32Array#
                       @ (Control.Monad.Primitive.PrimState IO)
                       dt2_a8Kh
                       (GHC.Prim.+# dt_a8Kf 257#)
                       (GHC.Prim.narrow32Word# (GHC.Prim.plusWord# y#_X8Sz 1##))
                       s'#2_a8Np
                of s'#3_a8NH [OS=OneShot] { __DEFAULT ->
                case GHC.Prim.writeDoubleArray#
                       @ (Control.Monad.Primitive.PrimState IO)
                       ipv1_abjZ
                       0#
                       (GHC.Prim.+##
                          (GHC.Prim.+##
                             (GHC.Prim.*##
                                (GHC.Prim.int2Double#
                                   (GHC.Prim.narrow32Int# (GHC.Prim.word2Int# x_s9pn)))
                                2.3283064365386963e-10##)
                             0.5000000000000001##)
                          (GHC.Prim.*##
                             (GHC.Prim.int2Double#
                                (GHC.Prim.word2Int#
                                   (GHC.Prim.and#
                                      (GHC.Prim.int2Word#
                                         (GHC.Prim.narrow32Int# (GHC.Prim.word2Int# x#_a8N5)))
                                      1048575##)))
                             2.220446049250313e-16##))
                       s'#3_a8NH
                of s'#4_abnm [OS=OneShot] { __DEFAULT ->
                letrec {
                  $s$wfoldlM'_loop_scsW [Occ=LoopBreaker]
                    :: GHC.Prim.State# GHC.Prim.RealWorld
                       -> GHC.Prim.Int#
                       -> GHC.Prim.Int#
                       -> (# GHC.Prim.State# GHC.Prim.RealWorld, Int #)
                  [LclId, Arity=3, Str=DmdType <S,U><S,U><L,U>]
                  $s$wfoldlM'_loop_scsW =
                    \ (sc_scsV [OS=OneShot] :: GHC.Prim.State# GHC.Prim.RealWorld)
                      (sc1_scsT :: GHC.Prim.Int#)
                      (sc2_scsS :: GHC.Prim.Int#) ->
                      case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<=# sc1_scsT 0#)
                      of _ [Occ=Dead] {
                        False ->
                          case GHC.Prim.readWord32Array#
                                 @ (Control.Monad.Primitive.PrimState IO)
                                 dt2_a8Kh
                                 (GHC.Prim.+# dt_a8Kf 256#)
                                 (sc_scsV
                                  `cast` ((GHC.Prim.State#
                                             (Sym Control.Monad.Primitive.D:R:PrimStateIO[0]))_R
                                          :: (GHC.Prim.State# GHC.Prim.RealWorld :: TYPE
                                                                                      'GHC.Types.VoidRep)
                                             ~R#
                                             (GHC.Prim.State#
                                                (Control.Monad.Primitive.PrimState IO) :: TYPE
                                                                                            'GHC.Types.VoidRep)))
                          of _ [Occ=Dead] { (# ipv11_X8Sr, ipv12_X8St #) ->
                          case GHC.Prim.readWord32Array#
                                 @ (Control.Monad.Primitive.PrimState IO)
                                 dt2_a8Kh
                                 (GHC.Prim.+# dt_a8Kf 257#)
                                 ipv11_X8Sr
                          of _ [Occ=Dead] { (# ipv13_X8U6, ipv14_X8U9 #) ->
                          let {
                            ipv15_X9si [Dmd=<S,U>] :: GHC.Prim.Int#
                            [LclId, Str=DmdType]
                            ipv15_X9si =
                              GHC.Prim.word2Int#
                                (GHC.Prim.narrow8Word# (GHC.Prim.plusWord# ipv12_X8St 1##)) } in
                          case GHC.Prim.readWord32Array#
                                 @ (Control.Monad.Primitive.PrimState IO)
                                 dt2_a8Kh
                                 (GHC.Prim.+# dt_a8Kf ipv15_X9si)
                                 ipv13_X8U6
                          of _ [Occ=Dead] { (# ipv16_X8Ud, ipv17_X8Ug #) ->
                          let {
                            j1_X9sp [Dmd=<S,U>] :: GHC.Prim.Int#
                            [LclId, Str=DmdType]
                            j1_X9sp =
                              GHC.Prim.word2Int#
                                (GHC.Prim.narrow8Word#
                                   (GHC.Prim.int2Word# (GHC.Prim.+# ipv15_X9si 1#))) } in
                          case GHC.Prim.readWord32Array#
                                 @ (Control.Monad.Primitive.PrimState IO)
                                 dt2_a8Kh
                                 (GHC.Prim.+# dt_a8Kf j1_X9sp)
                                 ipv16_X8Ud
                          of _ [Occ=Dead] { (# ipv18_X8Uo, ipv19_X8Ur #) ->
                          let {
                            t1_X9s9 [Dmd=<S,U>] :: GHC.Prim.Word#
                            [LclId, Str=DmdType]
                            t1_X9s9 =
                              GHC.Prim.plusWord#
                                (GHC.Prim.timesWord# 1540315826## ipv17_X8Ug) ipv14_X8U9 } in
                          let {
                            c'1_X9sc [Dmd=<S,U>] :: GHC.Prim.Word#
                            [LclId, Str=DmdType]
                            c'1_X9sc =
                              GHC.Prim.narrow32Word#
                                (GHC.Prim.uncheckedShiftRL# t1_X9s9 32#) } in
                          let {
                            x2_X9sf [Dmd=<S,U>] :: GHC.Prim.Word#
                            [LclId, Str=DmdType]
                            x2_X9sf =
                              GHC.Prim.narrow32Word#
                                (GHC.Prim.plusWord# (GHC.Prim.narrow32Word# t1_X9s9) c'1_X9sc) } in
                          case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.ltWord# x2_X9sf c'1_X9sc)
                          of _ [Occ=Dead] {
                            False ->
                              let {
                                u1_XbzL [Dmd=<S,U>] :: GHC.Prim.Word#
                                [LclId, Str=DmdType]
                                u1_XbzL =
                                  GHC.Prim.plusWord#
                                    (GHC.Prim.timesWord# 1540315826## ipv19_X8Ur) c'1_X9sc } in
                              let {
                                y#1_X8Vx [Dmd=<S,U>] :: GHC.Prim.Word#
                                [LclId, Str=DmdType]
                                y#1_X8Vx =
                                  GHC.Prim.narrow32Word#
                                    (GHC.Prim.uncheckedShiftRL# u1_XbzL 32#) } in
                              let {
                                x3_X8WF [Dmd=<S,U>] :: GHC.Prim.Word#
                                [LclId, Str=DmdType]
                                x3_X8WF =
                                  GHC.Prim.narrow32Word#
                                    (GHC.Prim.plusWord#
                                       (GHC.Prim.narrow32Word# u1_XbzL) y#1_X8Vx) } in
                              case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.ltWord# x3_X8WF y#1_X8Vx)
                              of _ [Occ=Dead] {
                                False ->
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf ipv15_X9si)
                                         x2_X9sf
                                         ipv18_X8Uo
                                  of s'#5_X8PT [OS=OneShot] { __DEFAULT ->
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf j1_X9sp)
                                         x3_X8WF
                                         s'#5_X8PT
                                  of s'#6_X8Qd [OS=OneShot] { __DEFAULT ->
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf 256#)
                                         (GHC.Prim.narrow32Word# (GHC.Prim.int2Word# j1_X9sp))
                                         s'#6_X8Qd
                                  of s'#7_X8Qx [OS=OneShot] { __DEFAULT ->
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf 257#)
                                         y#1_X8Vx
                                         s'#7_X8Qx
                                  of s'#8_X8QR [OS=OneShot] { __DEFAULT ->
                                  case GHC.Prim.writeDoubleArray#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         ipv1_abjZ
                                         sc2_scsS
                                         (GHC.Prim.+##
                                            (GHC.Prim.+##
                                               (GHC.Prim.*##
                                                  (GHC.Prim.int2Double#
                                                     (GHC.Prim.narrow32Int#
                                                        (GHC.Prim.word2Int# x2_X9sf)))
                                                  2.3283064365386963e-10##)
                                               0.5000000000000001##)
                                            (GHC.Prim.*##
                                               (GHC.Prim.int2Double#
                                                  (GHC.Prim.word2Int#
                                                     (GHC.Prim.and#
                                                        (GHC.Prim.int2Word#
                                                           (GHC.Prim.narrow32Int#
                                                              (GHC.Prim.word2Int# x3_X8WF)))
                                                        1048575##)))
                                               2.220446049250313e-16##))
                                         s'#8_X8QR
                                  of s'#9_Xbqy [OS=OneShot] { __DEFAULT ->
                                  $s$wfoldlM'_loop_scsW
                                    (s'#9_Xbqy
                                     `cast` ((GHC.Prim.State#
                                                Control.Monad.Primitive.D:R:PrimStateIO[0])_R
                                             :: (GHC.Prim.State#
                                                   (Control.Monad.Primitive.PrimState IO) :: TYPE
                                                                                               'GHC.Types.VoidRep)
                                                ~R#
                                                (GHC.Prim.State# GHC.Prim.RealWorld :: TYPE
                                                                                         'GHC.Types.VoidRep)))
                                    (GHC.Prim.-# sc1_scsT 1#)
                                    (GHC.Prim.+# sc2_scsS 1#)
                                  }
                                  }
                                  }
                                  }
                                  };
                                True ->
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf ipv15_X9si)
                                         x2_X9sf
                                         ipv18_X8Uo
                                  of s'#5_X8PT [OS=OneShot] { __DEFAULT ->
                                  let {
                                    x#1_X8Qb [Dmd=<S,U>] :: GHC.Prim.Word#
                                    [LclId, Str=DmdType]
                                    x#1_X8Qb =
                                      GHC.Prim.narrow32Word# (GHC.Prim.plusWord# x3_X8WF 1##) } in
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf j1_X9sp)
                                         x#1_X8Qb
                                         s'#5_X8PT
                                  of s'#6_X8Qf [OS=OneShot] { __DEFAULT ->
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf 256#)
                                         (GHC.Prim.narrow32Word# (GHC.Prim.int2Word# j1_X9sp))
                                         s'#6_X8Qf
                                  of s'#7_X8Qz [OS=OneShot] { __DEFAULT ->
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf 257#)
                                         (GHC.Prim.narrow32Word# (GHC.Prim.plusWord# y#1_X8Vx 1##))
                                         s'#7_X8Qz
                                  of s'#8_X8QT [OS=OneShot] { __DEFAULT ->
                                  case GHC.Prim.writeDoubleArray#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         ipv1_abjZ
                                         sc2_scsS
                                         (GHC.Prim.+##
                                            (GHC.Prim.+##
                                               (GHC.Prim.*##
                                                  (GHC.Prim.int2Double#
                                                     (GHC.Prim.narrow32Int#
                                                        (GHC.Prim.word2Int# x2_X9sf)))
                                                  2.3283064365386963e-10##)
                                               0.5000000000000001##)
                                            (GHC.Prim.*##
                                               (GHC.Prim.int2Double#
                                                  (GHC.Prim.word2Int#
                                                     (GHC.Prim.and#
                                                        (GHC.Prim.int2Word#
                                                           (GHC.Prim.narrow32Int#
                                                              (GHC.Prim.word2Int# x#1_X8Qb)))
                                                        1048575##)))
                                               2.220446049250313e-16##))
                                         s'#8_X8QT
                                  of s'#9_XbqA [OS=OneShot] { __DEFAULT ->
                                  $s$wfoldlM'_loop_scsW
                                    (s'#9_XbqA
                                     `cast` ((GHC.Prim.State#
                                                Control.Monad.Primitive.D:R:PrimStateIO[0])_R
                                             :: (GHC.Prim.State#
                                                   (Control.Monad.Primitive.PrimState IO) :: TYPE
                                                                                               'GHC.Types.VoidRep)
                                                ~R#
                                                (GHC.Prim.State# GHC.Prim.RealWorld :: TYPE
                                                                                         'GHC.Types.VoidRep)))
                                    (GHC.Prim.-# sc1_scsT 1#)
                                    (GHC.Prim.+# sc2_scsS 1#)
                                  }
                                  }
                                  }
                                  }
                                  }
                              };
                            True ->
                              let {
                                u1_sbx0 [Dmd=<S,U>] :: GHC.Prim.Word#
                                [LclId, Str=DmdType]
                                u1_sbx0 =
                                  GHC.Prim.plusWord#
                                    (GHC.Prim.timesWord# 1540315826## ipv19_X8Ur)
                                    (GHC.Prim.narrow32Word# (GHC.Prim.plusWord# c'1_X9sc 1##)) } in
                              let {
                                y#1_X8Vx [Dmd=<S,U>] :: GHC.Prim.Word#
                                [LclId, Str=DmdType]
                                y#1_X8Vx =
                                  GHC.Prim.narrow32Word#
                                    (GHC.Prim.uncheckedShiftRL# u1_sbx0 32#) } in
                              let {
                                x3_X8WF [Dmd=<S,U>] :: GHC.Prim.Word#
                                [LclId, Str=DmdType]
                                x3_X8WF =
                                  GHC.Prim.narrow32Word#
                                    (GHC.Prim.plusWord#
                                       (GHC.Prim.narrow32Word# u1_sbx0) y#1_X8Vx) } in
                              let {
                                ipv20_sbwZ [Dmd=<S,U>] :: GHC.Prim.Word#
                                [LclId, Str=DmdType]
                                ipv20_sbwZ =
                                  GHC.Prim.narrow32Word# (GHC.Prim.plusWord# x2_X9sf 1##) } in
                              case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.ltWord# x3_X8WF y#1_X8Vx)
                              of _ [Occ=Dead] {
                                False ->
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf ipv15_X9si)
                                         ipv20_sbwZ
                                         ipv18_X8Uo
                                  of s'#5_X8PV [OS=OneShot] { __DEFAULT ->
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf j1_X9sp)
                                         x3_X8WF
                                         s'#5_X8PV
                                  of s'#6_X8Qf [OS=OneShot] { __DEFAULT ->
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf 256#)
                                         (GHC.Prim.narrow32Word# (GHC.Prim.int2Word# j1_X9sp))
                                         s'#6_X8Qf
                                  of s'#7_X8Qz [OS=OneShot] { __DEFAULT ->
                                  case GHC.Prim.writeWord32Array#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         dt2_a8Kh
                                         (GHC.Prim.+# dt_a8Kf 257#)
                                         y#1_X8Vx
                                         s'#7_X8Qz
                                  of s'#8_X8QT [OS=OneShot] { __DEFAULT ->
                                  case GHC.Prim.writeDoubleArray#
                                         @ (Control.Monad.Primitive.PrimState IO)
                                         ipv1_abjZ
                                         sc2_scsS
                                         (GHC.Prim.+##
                                            (GHC.Prim.+##
                                               (GHC.Prim.*##
                                                  (GHC.Prim.int2Double#
                                                     (GHC.Prim.narrow32Int#
                                                        (GHC.Prim.word2Int# ipv20_sbwZ)))
                                                  2.3283064365386963e-10##)
                                               0.5000000000000001##)
                                            (GHC.Prim.*##
                                               (GHC.Prim.int2Double#
                          
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.