region %rTC33 with {+wCB306 = Const %rTC33; +wCB307 = Direct %rTC33}; region %rTC34 with {+wCB308 = Const %rTC34; +wCB309 = Direct %rTC34}; region %rTC35 with {+wCB310 = Const %rTC35; +wCB311 = Direct %rTC35}; region %rTC37 with {+wCB312 = Const %rTC37; +wCB313 = Direct %rTC37}; region %rTC41 with {+wCB314 = Mutable %rTC41; +wCB315 = Direct %rTC41}; region %rTC42 with {+wCB316 = Const %rTC42; +wCB317 = Direct %rTC42}; region %rTS159 with {+wCB318 = Const %rTS159; +wCB319 = Direct %rTS159}; data Main.Body %rSD502 = Main.Body { mass :: Base.Float %rSD502 ; pos :: Math.Vec2.Vec2 %rSD502 (Base.Float %rSD502) ; vel :: Math.Vec2.Vec2 %rSD502 (Base.Float %rSD502) ; acc :: Math.Vec2.Vec2 %rSD502 (Base.Float %rSD502) ; }; @PCtor Main.Body = forall (%rSD502 :: %). (Base.Float %rSD502 -($xC7)> Math.Vec2.Vec2 %rSD502 (Base.Float %rSD502) -($xC6)> Math.Vec2.Vec2 %rSD502 (Base.Float %rSD502) -($xC5)> Math.Vec2.Vec2 %rSD502 (Base.Float %rSD502) -($xC4)> Main.Body %rSD502) :- $xC7 = $xC6 \ xC0, $xC6 = $xC5 \ xC1, $xC5 = $xC4 \ xC2, $xC4 = ${xC0 : Base.Float %rSD502; xC1 : Math.Vec2.Vec2 %rSD502 (Base.Float %rSD502); xC2 : Math.Vec2.Vec2 %rSD502 (Base.Float %rSD502)} :$ Base.Obj -> Base.Obj -> Base.Obj -> Base.Obj -> Base.Obj; Main.project_Body_mass = /\ %rTC8 -> \ (xDict0 :: Main.Body %rTC8) of (!Read %rTC8) -> [** (Base.Float %rTC8) ] do { xC8 = xDict0; match { | Body { .mass = xDict1 :: Base.Float %rTC8 } <- do { xC8; } = do { xDict1; }; }; }; Main.project_Body_pos = /\ %rTC8 -> \ (xDict2 :: Main.Body %rTC8) of (!Read %rTC8) -> [** (Math.Vec2.Vec2 %rTC8 (Base.Float %rTC8)) ] do { xC9 = xDict2; match { | Body { .pos = xDict3 :: Math.Vec2.Vec2 %rTC8 (Base.Float %rTC8) } <- do { xC9; } = do { xDict3; }; }; }; Main.project_Body_vel = /\ %rTC8 -> \ (xDict4 :: Main.Body %rTC8) of (!Read %rTC8) -> [** (Math.Vec2.Vec2 %rTC8 (Base.Float %rTC8)) ] do { xC10 = xDict4; match { | Body { .vel = xDict5 :: Math.Vec2.Vec2 %rTC8 (Base.Float %rTC8) } <- do { xC10; } = do { xDict5; }; }; }; Main.project_Body_acc = /\ %rTC8 -> \ (xDict6 :: Main.Body %rTC8) of (!Read %rTC8) -> [** (Math.Vec2.Vec2 %rTC8 (Base.Float %rTC8)) ] do { xC11 = xDict6; match { | Body { .acc = xDict7 :: Math.Vec2.Vec2 %rTC8 (Base.Float %rTC8) } <- do { xC11; } = do { xDict7; }; }; }; Main.project_Body_ref_mass = /\ %rTC8 -> \ (xDict9 :: Main.Body %rTC8) of (!Read %rTC8) -> [** (Data.Ref.Ref %rTC8 (Base.Float %rTC8)) ] do { xC12 = xDict9; match { | Body <- do { xC12; } = do { primProjFieldR (Main.Body %rTC8) (Data.Ref.Ref %rTC8 (Base.Float %rTC8)) xDict9 0#32i; }; }; }; Main.project_Body_ref_pos = /\ %rTC8 -> \ (xDict11 :: Main.Body %rTC8) of (!Read %rTC8) -> [** (Data.Ref.Ref %rTC8 (Math.Vec2.Vec2 %rTC8 (Base.Float %rTC8))) ] do { xC13 = xDict11; match { | Body <- do { xC13; } = do { primProjFieldR (Main.Body %rTC8) (Data.Ref.Ref %rTC8 (Math.Vec2.Vec2 %rTC8 (Base.Float %rTC8))) xDict11 1#32i; }; }; }; Main.project_Body_ref_vel = /\ %rTC8 -> \ (xDict13 :: Main.Body %rTC8) of (!Read %rTC8) -> [** (Data.Ref.Ref %rTC8 (Math.Vec2.Vec2 %rTC8 (Base.Float %rTC8))) ] do { xC14 = xDict13; match { | Body <- do { xC14; } = do { primProjFieldR (Main.Body %rTC8) (Data.Ref.Ref %rTC8 (Math.Vec2.Vec2 %rTC8 (Base.Float %rTC8))) xDict13 2#32i; }; }; }; Main.project_Body_ref_acc = /\ %rTC8 -> \ (xDict15 :: Main.Body %rTC8) of (!Read %rTC8) -> [** (Data.Ref.Ref %rTC8 (Math.Vec2.Vec2 %rTC8 (Base.Float %rTC8))) ] do { xC15 = xDict15; match { | Body <- do { xC15; } = do { primProjFieldR (Main.Body %rTC8) (Data.Ref.Ref %rTC8 (Math.Vec2.Vec2 %rTC8 (Base.Float %rTC8))) xDict15 3#32i; }; }; }; Main.project_Body_show = /\ %rTS0, %rTS5 -> \ (xSD503 :: Main.Body %rTS5) of (!Read %rTS5) -> [** (Data.String.String %rTS0) ] do { match { | Body { .0 = mass :: Base.Float %rTS5 , .1 = pos :: Math.Vec2.Vec2 %rTS5 (Base.Float %rTS5) , .2 = vel :: Math.Vec2.Vec2 %rTS5 (Base.Float %rTS5) , .3 = acc :: Math.Vec2.Vec2 %rTS5 (Base.Float %rTS5) } <- do { xSD503; } = do { xCS0 = prim{Box} %rTS0 ("Body "# %rTS0); xCS2 = show (Base.Float %rTS5) %rTS0 (Show (Base.Float %rTS5)) mass; xCS4 = prim{Box} %rTS0 (" ("# %rTS0); xCS6 = project_Vec2_show %rTS5 %rTS5 %rTS0 pos; xCS8 = prim{Box} %rTS0 (")"# %rTS0); xCS10 = prim{Box} %rTS0 (" ("# %rTS0); xCS12 = project_Vec2_show %rTS5 %rTS5 %rTS0 vel; xCS13 = prim{Box} %rTS0 (")"# %rTS0); xCS11 = (%) %rTS0 xCS12 xCS13; xCS9 = (%) %rTS0 xCS10 xCS11; xCS7 = (%) %rTS0 xCS8 xCS9; xCS5 = (%) %rTS0 xCS6 xCS7; xCS3 = (%) %rTS0 xCS4 xCS5; xCS1 = (%) %rTS0 xCS2 xCS3; (%) %rTS0 xCS0 xCS1; }; }; }; Main.project_Body_force2 = /\ %rTS29, %rTS31, %rTS32, %rTS33 -> \ (body0 :: Main.Body %rTS29) of (forceVec : %rTC34) -> \ (body1 :: Main.Body %rTS31) of !{!Read %rTS29; !Read %rTS31; !Read %rTC34} ${forceVec : %rTC34; body0 : %rTS29} -> [** (Math.Vec2.Vec2 %rTS32 (Base.Float %rTS33)) ] do { xCS14 = project_Body_mass %rTS29 body0; xCS15 = project_Body_mass %rTS31 body1; xCS20 = project_Body_pos %rTS29 body0; xCS16 = project_Vec2_x (Base.Float %rTS29) %rTS29 xCS20; xCS21 = project_Body_pos %rTS29 body0; xCS17 = project_Vec2_y (Base.Float %rTS29) %rTS29 xCS21; xCS22 = project_Body_pos %rTS31 body1; xCS18 = project_Vec2_x (Base.Float %rTS31) %rTS31 xCS22; xCS23 = project_Body_pos %rTS31 body1; xCS19 = project_Vec2_y (Base.Float %rTS31) %rTS31 xCS23; project_Body_forceVec %rTS29 %rTS31 %rTS29 %rTS29 %rTS31 %rTS31 %rTS32 %rTS33 xCS14 xCS15 xCS16 xCS17 xCS18 xCS19; }; Main.project_Body_pulse = /\ %rTS47 -> /\ (+xC16 :: Base.Mutable %rTS47) -> \ (body :: Main.Body %rTS47) of !{!Read %rTS47; !Write %rTS47} -> [** Base.Unit ] do { xCS24 = project_Body_vel %rTS47 body; xCS25 = project_Body_acc %rTS47 body; (+=) (Math.Vec2.Vec2 %rTS47 (Base.Float %rTS47)) (Math.Vec2.Vec2 %rTS47 (Base.Float %rTS47)) (Accum (Math.Vec2.Vec2 %rTS47 (Base.Float %rTS47))) (Shape2 (Math.Vec2.Vec2 %rTS47 (Base.Float %rTS47)) (Math.Vec2.Vec2 %rTS47 (Base.Float %rTS47))) (wjoin {Mutable %rTS47; Mutable %rTS47}) xCS24 xCS25; xCS26 = project_Body_pos %rTS47 body; xCS27 = project_Body_vel %rTS47 body; (+=) (Math.Vec2.Vec2 %rTS47 (Base.Float %rTS47)) (Math.Vec2.Vec2 %rTS47 (Base.Float %rTS47)) (Accum (Math.Vec2.Vec2 %rTS47 (Base.Float %rTS47))) (Shape2 (Math.Vec2.Vec2 %rTS47 (Base.Float %rTS47)) (Math.Vec2.Vec2 %rTS47 (Base.Float %rTS47))) (wjoin {Mutable %rTS47; Mutable %rTS47}) xCS26 xCS27; }; Main.project_Body_update = /\ %rTS80, %rTS81, %rTS97, %rTS99 -> /\ (+xC17 :: Base.Mutable %rTS99) -> \ (b1 :: Main.Body %rTS99) of ${sumForces : %rTC34; Main.time_compression : %rTC33} -> \ (body0 :: Data.Array.Array %rTS81 (Main.Body %rTS97)) of ${b1 : %rTS99; sumForces : %rTC34; Main.time_compression : %rTC33} -> \ (i :: Base.Int %rTS80) of !{!Read %rTS81; !Read %rTS80; !Read %rTS99; !Read %rTS97; !Write %rTS99; !Read %rTC34; !Read %rTC33} ${body0 : %rTS81; body0 : %rTS97; b1 : %rTS99; sumForces : %rTC34; Main.time_compression : %rTC33} -> [** Base.Unit ] local %rTC18 with {+wCB0 = Const %rTC18; +wCB1 = Direct %rTC18} in local %rTC19 with {+wCB2 = Const %rTC19; +wCB3 = Direct %rTC19} in local %rTS77 with {+wCB4 = Const %rTS77; +wCB5 = Direct %rTS77} in local %rTS83 with {+wCB6 = Const %rTS83; +wCB7 = Direct %rTS83} in local %rTS86 with {+wCB8 = Const %rTS86; +wCB9 = Direct %rTS86} in local %rTS93 with {+wCB10 = Const %rTS93; +wCB11 = Direct %rTS93} in local %rTS95 with {+wCB12 = Const %rTS95; +wCB13 = Direct %rTS95} in local %rTS101 with {+wCB14 = Const %rTS101; +wCB15 = Direct %rTS101} in local %rTS103 with {+wCB16 = Const %rTS103; +wCB17 = Direct %rTS103} in local %rTS227 with {+wCB18 = Const %rTS227; +wCB19 = Direct %rTS227} in local %rTS228 with {+wCB20 = Const %rTS228; +wCB21 = Direct %rTS228} in local %rTS229 with {+wCB22 = Const %rTS229; +wCB23 = Direct %rTS229} in local %rTS230 with {+wCB24 = Const %rTS230; +wCB25 = Direct %rTS230} in local %rTS231 with {+wCB26 = Const %rTS231; +wCB27 = Direct %rTS231} in local %rTS232 with {+wCB28 = Const %rTS232; +wCB29 = Direct %rTS232} in local %rTS233 with {+wCB30 = Const %rTS233; +wCB31 = Direct %rTS233} in do { b0 = [** (Main.Body %rTS97) ] index (Main.Body %rTS97) %rTS81 %rTS80 body0 i; xCS28 = project_Body_mass %rTS99 b1; xCS29 = project_Body_mass %rTS97 b0; (:=) (Base.Float %rTS99) (Base.Float %rTS97) (Updatable (Base.Float %rTS99)) (Shape2 (Base.Float %rTS99) (Base.Float %rTS97)) +xC17 xCS28 xCS29; fV = [** (Math.Vec2.Vec2 %rTS86 (Base.Float %rTS77)) ] project_Body_sumForces %rTS77 %rTS86 %rTS97 %rTS80 %rTS81 body0 i; xCS30 = project_Body_acc %rTS99 b1; xCS42 = prim{Box} %rTC18 0.0#32f; xCS50 = project_Vec2_x (Base.Float %rTS77) %rTS86 fV; xCS51 = project_Body_mass %rTS97 b0; xCS43 = (/) (Base.Float %rTS77) (Base.Float %rTS97) (Base.Float %rTS228) (Num (Base.Float %rTS77)) (Shape3 (Base.Float %rTS77) (Base.Float %rTS97) (Base.Float %rTS228)) xCS50 xCS51; xCS36 = (-) (Base.Float %rTC18) (Base.Float %rTS228) (Base.Float %rTS227) (Num (Base.Float %rTC18)) (Shape3 (Base.Float %rTC18) (Base.Float %rTS228) (Base.Float %rTS227)) xCS42 xCS43; xCS44 = prim{Box} %rTC19 0.0#32f; xCS52 = project_Vec2_y (Base.Float %rTS77) %rTS86 fV; xCS53 = project_Body_mass %rTS97 b0; xCS45 = (/) (Base.Float %rTS77) (Base.Float %rTS97) (Base.Float %rTS229) (Num (Base.Float %rTS77)) (Shape3 (Base.Float %rTS77) (Base.Float %rTS97) (Base.Float %rTS229)) xCS52 xCS53; xCS37 = (-) (Base.Float %rTC19) (Base.Float %rTS229) (Base.Float %rTS227) (Num (Base.Float %rTC19)) (Shape3 (Base.Float %rTC19) (Base.Float %rTS229) (Base.Float %rTS227)) xCS44 xCS45; xCS31 = Vec2 (Base.Float %rTS227) %rTS83 xCS36 xCS37; (:=) (Math.Vec2.Vec2 %rTS99 (Base.Float %rTS99)) (Math.Vec2.Vec2 %rTS83 (Base.Float %rTS227)) (Updatable (Math.Vec2.Vec2 %rTS99 (Base.Float %rTS99))) (Shape2 (Math.Vec2.Vec2 %rTS99 (Base.Float %rTS99)) (Math.Vec2.Vec2 %rTS83 (Base.Float %rTS227))) (wjoin {Mutable %rTS99; Mutable %rTS99}) xCS30 xCS31; xCS32 = project_Body_vel %rTS99 b1; xCS38 = project_Body_vel %rTS97 b0; xCS46 = project_Body_acc %rTS99 b1; xCS47 = time_compression; xCS39 = project_Vec2_muls %rTS99 %rTC33 %rTS93 %rTS99 %rTS95 xCS46 xCS47; xCS33 = (+) (Math.Vec2.Vec2 %rTS97 (Base.Float %rTS97)) (Math.Vec2.Vec2 %rTS95 (Base.Float %rTS93)) (Math.Vec2.Vec2 %rTS230 (Base.Float %rTS231)) (Num (Math.Vec2.Vec2 %rTS97 (Base.Float %rTS97))) (Shape3 (Math.Vec2.Vec2 %rTS97 (Base.Float %rTS97)) (Math.Vec2.Vec2 %rTS95 (Base.Float %rTS93)) (Math.Vec2.Vec2 %rTS230 (Base.Float %rTS231))) xCS38 xCS39; (:=) (Math.Vec2.Vec2 %rTS99 (Base.Float %rTS99)) (Math.Vec2.Vec2 %rTS230 (Base.Float %rTS231)) (Updatable (Math.Vec2.Vec2 %rTS99 (Base.Float %rTS99))) (Shape2 (Math.Vec2.Vec2 %rTS99 (Base.Float %rTS99)) (Math.Vec2.Vec2 %rTS230 (Base.Float %rTS231))) (wjoin {Mutable %rTS99; Mutable %rTS99}) xCS32 xCS33; xCS34 = project_Body_pos %rTS99 b1; xCS40 = project_Body_pos %rTS97 b0; xCS48 = project_Body_vel %rTS99 b1; xCS49 = time_compression; xCS41 = project_Vec2_muls %rTS99 %rTC33 %rTS101 %rTS99 %rTS103 xCS48 xCS49; xCS35 = (+) (Math.Vec2.Vec2 %rTS97 (Base.Float %rTS97)) (Math.Vec2.Vec2 %rTS103 (Base.Float %rTS101)) (Math.Vec2.Vec2 %rTS232 (Base.Float %rTS233)) (Num (Math.Vec2.Vec2 %rTS97 (Base.Float %rTS97))) (Shape3 (Math.Vec2.Vec2 %rTS97 (Base.Float %rTS97)) (Math.Vec2.Vec2 %rTS103 (Base.Float %rTS101)) (Math.Vec2.Vec2 %rTS232 (Base.Float %rTS233))) xCS40 xCS41; (:=) (Math.Vec2.Vec2 %rTS99 (Base.Float %rTS99)) (Math.Vec2.Vec2 %rTS232 (Base.Float %rTS233)) (Updatable (Math.Vec2.Vec2 %rTS99 (Base.Float %rTS99))) (Shape2 (Math.Vec2.Vec2 %rTS99 (Base.Float %rTS99)) (Math.Vec2.Vec2 %rTS232 (Base.Float %rTS233))) (wjoin {Mutable %rTS99; Mutable %rTS99}) xCS34 xCS35; }; Main.project_Body_clampPos = /\ %rTS139 -> /\ (+xC22 :: Base.Mutable %rTS139) -> \ (b :: Main.Body %rTS139) of !{!Read %rTS139; !Read %rTS159; !Read %rTC37; !Write %rTS139} ${Main.worldSize : %rTS159; Main.worldSize : %rTC37} -> [** Base.Unit ] local %rTC20 with {+wCB44 = Const %rTC20; +wCB45 = Direct %rTC20} in local %rTC21 with {+wCB46 = Const %rTC21; +wCB47 = Direct %rTC21} in local %rTC22 with {+wCB48 = Const %rTC22; +wCB49 = Direct %rTC22} in local %rTC23 with {+wCB50 = Const %rTC23; +wCB51 = Direct %rTC23} in local %rTC24 with {+wCB52 = Const %rTC24; +wCB53 = Direct %rTC24} in local %rTC25 with {+wCB54 = Const %rTC25; +wCB55 = Direct %rTC25} in local %rTS117 with {+wCB56 = Const %rTS117; +wCB57 = Direct %rTS117} in local %rTS136 with {+wCB58 = Const %rTS136; +wCB59 = Direct %rTS136} in do { xCS84 = project_Body_pos %rTS139 b; xCS76 = project_Vec2_x (Base.Float %rTS139) %rTS139 xCS84; xCS77 = prim{Box} %rTC20 0.0#32f; xC18 = (<) (Base.Float %rTS139) (Base.Float %rTC20) %rTC21 (Ord (Base.Float %rTS139)) (Shape2 (Base.Float %rTS139) (Base.Float %rTC20)) xCS76 xCS77; match { | True <- do { xC18; } = local %rTS110 with {+wCB32 = Const %rTS110; +wCB33 = Direct %rTS110} in do { xCS56 = project_Body_pos %rTS139 b; xCS54 = project_Vec2_x (Base.Float %rTS139) %rTS139 xCS56; xCS58 = worldSize; xCS57 = project_Vec2_x (Base.Int %rTC37) %rTS159 xCS58; xCS55 = toFloat %rTC37 %rTS110 xCS57; (+=) (Base.Float %rTS139) (Base.Float %rTS110) (Accum (Base.Float %rTS139)) (Shape2 (Base.Float %rTS139) (Base.Float %rTS110)) +xC22 xCS54 xCS55; }; | otherwise = do { Unit; }; }; xCS85 = project_Body_pos %rTS139 b; xCS78 = project_Vec2_x (Base.Float %rTS139) %rTS139 xCS85; xCS90 = worldSize; xCS86 = project_Vec2_x (Base.Int %rTC37) %rTS159 xCS90; xCS79 = toFloat %rTC37 %rTS117 xCS86; xC19 = (>) (Base.Float %rTS139) (Base.Float %rTS117) %rTC22 (Ord (Base.Float %rTS139)) (Shape2 (Base.Float %rTS139) (Base.Float %rTS117)) xCS78 xCS79; match { | True <- do { xC19; } = local %rTS122 with {+wCB34 = Const %rTS122; +wCB35 = Direct %rTS122} in local %rTS239 with {+wCB36 = Const %rTS239; +wCB37 = Direct %rTS239} in do { xCS61 = project_Body_pos %rTS139 b; xCS59 = project_Vec2_x (Base.Float %rTS139) %rTS139 xCS61; xCS64 = worldSize; xCS63 = project_Vec2_x (Base.Int %rTC37) %rTS159 xCS64; xCS62 = toFloat %rTC37 %rTS122 xCS63; xCS60 = negate (Base.Float %rTS122) (Base.Float %rTS239) (Num (Base.Float %rTS122)) (Shape2 (Base.Float %rTS122) (Base.Float %rTS239)) xCS62; (+=) (Base.Float %rTS139) (Base.Float %rTS239) (Accum (Base.Float %rTS139)) (Shape2 (Base.Float %rTS139) (Base.Float %rTS239)) +xC22 xCS59 xCS60; }; | otherwise = do { Unit; }; }; xCS87 = project_Body_pos %rTS139 b; xCS80 = project_Vec2_y (Base.Float %rTS139) %rTS139 xCS87; xCS81 = prim{Box} %rTC23 0.0#32f; xC20 = (<) (Base.Float %rTS139) (Base.Float %rTC23) %rTC24 (Ord (Base.Float %rTS139)) (Shape2 (Base.Float %rTS139) (Base.Float %rTC23)) xCS80 xCS81; match { | True <- do { xC20; } = local %rTS130 with {+wCB38 = Const %rTS130; +wCB39 = Direct %rTS130} in do { xCS67 = project_Body_pos %rTS139 b; xCS65 = project_Vec2_y (Base.Float %rTS139) %rTS139 xCS67; xCS69 = worldSize; xCS68 = project_Vec2_y (Base.Int %rTC37) %rTS159 xCS69; xCS66 = toFloat %rTC37 %rTS130 xCS68; (+=) (Base.Float %rTS139) (Base.Float %rTS130) (Accum (Base.Float %rTS139)) (Shape2 (Base.Float %rTS139) (Base.Float %rTS130)) +xC22 xCS65 xCS66; }; | otherwise = do { Unit; }; }; xCS88 = project_Body_pos %rTS139 b; xCS82 = project_Vec2_y (Base.Float %rTS139) %rTS139 xCS88; xCS91 = worldSize; xCS89 = project_Vec2_y (Base.Int %rTC37) %rTS159 xCS91; xCS83 = toFloat %rTC37 %rTS136 xCS89; xC21 = (>) (Base.Float %rTS139) (Base.Float %rTS136) %rTC25 (Ord (Base.Float %rTS139)) (Shape2 (Base.Float %rTS139) (Base.Float %rTS136)) xCS82 xCS83; match { | True <- do { xC21; } = local %rTS141 with {+wCB40 = Const %rTS141; +wCB41 = Direct %rTS141} in local %rTS240 with {+wCB42 = Const %rTS240; +wCB43 = Direct %rTS240} in do { xCS72 = project_Body_pos %rTS139 b; xCS70 = project_Vec2_y (Base.Float %rTS139) %rTS139 xCS72; xCS75 = worldSize; xCS74 = project_Vec2_y (Base.Int %rTC37) %rTS159 xCS75; xCS73 = toFloat %rTC37 %rTS141 xCS74; xCS71 = negate (Base.Float %rTS141) (Base.Float %rTS240) (Num (Base.Float %rTS141)) (Shape2 (Base.Float %rTS141) (Base.Float %rTS240)) xCS73; (+=) (Base.Float %rTS139) (Base.Float %rTS240) (Accum (Base.Float %rTS139)) (Shape2 (Base.Float %rTS139) (Base.Float %rTS240)) +xC22 xCS70 xCS71; }; | otherwise = do { Unit; }; }; }; Main.project_Body_draw = /\ %rSD517, %rSD518, %rTC26 -> \ (body :: Main.Body %rTC26) of ${Main.worldSize : %rTS159; Main.worldSize : %rTC37} -> \ (frame :: Graphics.Frame.Frame %rSD518 %rSD517) of !{!Read %rTC26; !Read %rTS159; !Read %rTC37} ${Main.worldSize : %rTS159; Main.worldSize : %rTC37; body : %rTC26} -> [** Base.Unit ] do { match { | Body { .0 = mass :: Base.Float %rTC26 , .1 = pos :: Math.Vec2.Vec2 %rTC26 (Base.Float %rTC26) , .2 = vel :: Math.Vec2.Vec2 %rTC26 (Base.Float %rTC26) , .3 = acc :: Math.Vec2.Vec2 %rTC26 (Base.Float %rTC26) } <- do { body; } , Vec2 { .0 = pX :: Base.Float %rTC26 , .1 = pY :: Base.Float %rTC26 } <- do { pos; } = local %rTC28 with {+wCB70 = Const %rTC28; +wCB71 = Direct %rTC28} in do { match { | True <- local %rTC29 with {+wCB60 = Const %rTC29; +wCB61 = Direct %rTC29} in local %rTS143 with {+wCB62 = Const %rTS143; +wCB63 = Direct %rTS143} in local %rTS144 with {+wCB64 = Const %rTS144; +wCB65 = Direct %rTS144} in local %rTS148 with {+wCB66 = Const %rTS148; +wCB67 = Direct %rTS148} in local %rTS151 with {+wCB68 = Const %rTS151; +wCB69 = Direct %rTS151} in do { xCS94 = truncate %rTC26 %rTS148 pX; xCS95 = prim{Box} %rTC29 0#32i; xCS92 = (<) (Base.Int %rTS148) (Base.Int %rTC29) %rTS143 (Ord (Base.Int %rTS148)) (Shape2 (Base.Int %rTS148) (Base.Int %rTC29)) xCS94 xCS95; xCS96 = truncate %rTC26 %rTS151 pX; xCS98 = worldSize; xCS97 = project_Vec2_x (Base.Int %rTC37) %rTS159 xCS98; xCS93 = (>) (Base.Int %rTS151) (Base.Int %rTC37) %rTS144 (Ord (Base.Int %rTS151)) (Shape2 (Base.Int %rTS151) (Base.Int %rTC37)) xCS96 xCS97; (||) %rTS143 %rTS144 %rTC28 xCS92 xCS93; } = do { Unit; }; | otherwise = do { Unit; }; }; }; }; }; Main.project_Body_sumForces = /\ %rTS53, %rTS54, %rTS62, %rTS73, %rTS75 -> \ (body :: Data.Array.Array %rTS75 (Main.Body %rTS62)) of (forceVec : %rTC34) -> \ (i :: Base.Int %rTS73) of !{!Read %rTS75; !Read %rTS73; !Read %rTS62; !Read %rTC34; !Read %rTS53} ${body : %rTS75; body : %rTS62; forceVec : %rTC34} -> [** (Math.Vec2.Vec2 %rTS54 (Base.Float %rTS53)) ] local %rTC31 with {+wCB72 = Const %rTC31; +wCB73 = Direct %rTC31} in local %rTS52 with {+wCB74 = Const %rTS52; +wCB75 = Direct %rTS52} in local %rTS55 with {+wCB76 = Const %rTS55; +wCB77 = Direct %rTS55} in local %rTS56 with {+wCB78 = Const %rTS56; +wCB79 = Direct %rTS56} in local %rTS57 with {+wCB80 = Const %rTS57; +wCB81 = Direct %rTS57} in local %rTS65 with {+wCB82 = Const %rTS65; +wCB83 = Direct %rTS65} in local %rTS71 with {+wCB84 = Const %rTS71; +wCB85 = Direct %rTS71} in local %rTS72 with {+wCB86 = Const %rTS72; +wCB87 = Direct %rTS72} in local %rTS76 with {+wCB88 = Const %rTS76; +wCB89 = Direct %rTS76} in do { xCS99 = project_Vec2_sum %rTS52 %rTS53 %rTS54 %rTS55 %rTS56; xCS106 = index (Main.Body %rTS62) %rTS75 %rTS73 body i; xCS103 = project_Body_force2 %rTS62 %rTS62 %rTS56 %rTS52 xCS106; xCS101 = map (Main.Body %rTS62) (Math.Vec2.Vec2 %rTS56 (Base.Float %rTS52)) %rTS57 %rTS55 !{!Read %rTS62; !Read %rTC34} ${forceVec : %rTC34; body0 : %rTS62} xCS103; xCS107 = index (Main.Body %rTS62) %rTS75 %rTS73 body; xCS104 = map (Base.Int %rTS73) (Main.Body %rTS62) %rTS65 %rTS57 !{!Read %rTS75; !Read %rTS73} $EMPTY xCS107; xCS108 = (==) (Base.Int %rTS73) (Base.Int %rTS73) %rTS71 (Eq (Base.Int %rTS73)) (Shape2 (Base.Int %rTS73) (Base.Int %rTS73)); xCS110 = prim{Box} %rTS73 0#32i; xCS112 = array_size (Main.Body %rTS62) %rTS75 %rTS76 body; xCS113 = prim{Box} %rTC31 1#32i; xCS111 = (-) (Base.Int %rTS76) (Base.Int %rTC31) (Base.Int %rTS72) (Num (Base.Int %rTS76)) (Shape3 (Base.Int %rTS76) (Base.Int %rTC31) (Base.Int %rTS72)) xCS112 xCS113; xCS109 = rangeInt %rTS72 %rTS73 %rTS65 xCS110 xCS111; xCS105 = deleteF (Base.Int %rTS73) %rTS71 %rTS65 (!Read %rTS73) !PURE (x : %rTS73) $EMPTY xCS108 xCS109 i; xCS102 = ($) (Data.List.List %rTS65 (Base.Int %rTS73)) (Data.List.List %rTS57 (Main.Body %rTS62)) !{!Read %rTS65; !Read %rTS75; !Read %rTS73} $EMPTY xCS104 xCS105; xCS100 = ($) (Data.List.List %rTS57 (Main.Body %rTS62)) (Data.List.List %rTS55 (Math.Vec2.Vec2 %rTS56 (Base.Float %rTS52))) !{!Read %rTS57; !Read %rTS62; !Read %rTC34} ${f : %rTC34; f : %rTS62} xCS101 xCS102; ($) (Data.List.List %rTS55 (Math.Vec2.Vec2 %rTS56 (Base.Float %rTS52))) (Math.Vec2.Vec2 %rTS54 (Base.Float %rTS53)) !{!Read %rTS55; !Read %rTS56; !Read %rTS53; !Read %rTS52} $EMPTY xCS99 xCS100; }; Main.project_Body_forceVec = /\ %rTS14, %rTS15, %rTS16, %rTS17, %rTS18, %rTS19, %rTS24, %rTS25 -> \ (m1 :: Base.Float %rTS14) of (forceVec_work : %rTC34) -> \ (m2 :: Base.Float %rTS15) of ${m1 : %rTS14; forceVec_work : %rTC34} -> \ (x1 :: Base.Float %rTS16) of ${m1 : %rTS14; m2 : %rTS15; forceVec_work : %rTC34} -> \ (y1 :: Base.Float %rTS17) of ${m1 : %rTS14; m2 : %rTS15; x1 : %rTS16; forceVec_work : %rTC34} -> \ (x2 :: Base.Float %rTS18) of ${m1 : %rTS14; m2 : %rTS15; x1 : %rTS16; y1 : %rTS17; forceVec_work : %rTC34} -> \ (y2 :: Base.Float %rTS19) of !{!Read %rTS14; !Read %rTS15; !Read %rTS16; !Read %rTS17; !Read %rTS18; !Read %rTS19; !Read %rTC34} ${m1 : %rTS14; m2 : %rTS15; x1 : %rTS16; y1 : %rTS17; x2 : %rTS18; forceVec_work : %rTC34} -> [** (Math.Vec2.Vec2 %rTS24 (Base.Float %rTS25)) ] do { m1' = [** Base.Float32# ] unboxFloat32 %rTS14 m1; m2' = [** Base.Float32# ] unboxFloat32 %rTS15 m2; x1' = [** Base.Float32# ] unboxFloat32 %rTS16 x1; y1' = [** Base.Float32# ] unboxFloat32 %rTS17 y1; x2' = [** Base.Float32# ] unboxFloat32 %rTS18 x2; y2' = [** Base.Float32# ] unboxFloat32 %rTS19 y2; project_Body_forceVec_work %rTS24 %rTS25 m1' m2' x1' y1' x2' y2'; }; Main.project_Body_forceVec_work = /\ %rTS21, %rTS22 -> \ (m1 :: Base.Float32#) of (Main.attract_range : %rTC34) -> \ (m2 :: Base.Float32#) of (Main.attract_range : %rTC34) -> \ (x1 :: Base.Float32#) of (Main.attract_range : %rTC34) -> \ (y1 :: Base.Float32#) of (Main.attract_range : %rTC34) -> \ (x2 :: Base.Float32#) of (Main.attract_range : %rTC34) -> \ (y2 :: Base.Float32#) of (!Read %rTC34) (Main.attract_range : %rTC34) -> [** (Math.Vec2.Vec2 %rTS21 (Base.Float %rTS22)) ] do { dx = [** Base.Float32# ] (-) Base.Float32# Base.Float32# Base.Float32# (Num Base.Float32#) (Shape3 Base.Float32# Base.Float32# Base.Float32#) x2 x1; dy = [** Base.Float32# ] (-) Base.Float32# Base.Float32# Base.Float32# (Num Base.Float32#) (Shape3 Base.Float32# Base.Float32# Base.Float32#) y2 y1; xCS118 = (*) Base.Float32# Base.Float32# Base.Float32# (Num Base.Float32#) (Shape3 Base.Float32# Base.Float32# Base.Float32#) dx dx; xCS119 = (*) Base.Float32# Base.Float32# Base.Float32# (Num Base.Float32#) (Shape3 Base.Float32# Base.Float32# Base.Float32#) dy dy; d2 = [** Base.Float32# ] (+) Base.Float32# Base.Float32# Base.Float32# (Num Base.Float32#) (Shape3 Base.Float32# Base.Float32# Base.Float32#) xCS118 xCS119; d = [** Base.Float32# ] sqrtU d2; xCS120 = attract_range; attract_rangeU = [** Base.Float32# ] unboxFloat32 %rTC34 xCS120; xCS121 = (/) Base.Float32# Base.Float32# Base.Float32# (Num Base.Float32#) (Shape3 Base.Float32# Base.Float32# Base.Float32#) m2 d2; attract_force = [** Base.Float32# ] (*) Base.Float32# Base.Float32# Base.Float32# (Num Base.Float32#) (Shape3 Base.Float32# Base.Float32# Base.Float32#) m1 xCS121; forceS = [** Base.Float32# ] match { | 1#32i <- do { primFloat32U_lt d attract_rangeU; } = do { xCS116 = (/) Base.Float32# Base.Float32# Base.Float32# (Num Base.Float32#) (Shape3 Base.Float32# Base.Float32# Base.Float32#) d attract_rangeU; xCS114 = (*) Base.Float32# Base.Float32# Base.Float32# (Num Base.Float32#) (Shape3 Base.Float32# Base.Float32# Base.Float32#) attract_force xCS116; xCS117 = (/) Base.Float32# Base.Float32# Base.Float32# (Num Base.Float32#) (Shape3 Base.Float32# Base.Float32# Base.Float32#) attract_rangeU d; xCS115 = (*) Base.Float32# Base.Float32# Base.Float32# (Num Base.Float32#) (Shape3 Base.Float32# Base.Float32# Base.Float32#) attract_force xCS117; (-) Base.Float32# Base.Float32# Base.Float32# (Num Base.Float32#) (Shape3 Base.Float32# Base.Float32# Base.Float32#) xCS114 xCS115; }; | otherwise = do { attract_force; }; }; theta = [** Base.Float32# ] vec2_angleU dx dy; xCS122 = cosU theta; forceX = [** Base.Float32# ] (*) Base.Float32# Base.Float32# Base.Float32# (Num Base.Float32#) (Shape3 Base.Float32# Base.Float32# Base.Float32#) forceS xCS122; xCS123 = sinU theta; forceY = [** Base.Float32# ] (*) Base.Float32# Base.Float32# Base.Float32# (Num Base.Float32#) (Shape3 Base.Float32# Base.Float32# Base.Float32#) forceS xCS123; xCS124 = boxFloat32 %rTS22 forceX; xCS125 = boxFloat32 %rTS22 forceY; Vec2 (Base.Float %rTS22) %rTS21 xCS124 xCS125; }; Main.time_compression = [** (Base.Float %rTC33) ] do { prim{Box} %rTC33 1.0#32f; }; Main.attract_range = [** (Base.Float %rTC34) ] do { prim{Box} %rTC34 20.0#32f; }; Main.draw_force_step = [** (Base.Int %rTC35) ] do { prim{Box} %rTC35 2#32i; }; Main.worldSize = [** (Math.Vec2.Vec2 %rTS159 (Base.Int %rTC37)) ] do { xCS126 = prim{Box} %rTC37 500#32i; xCS127 = prim{Box} %rTC37 500#32i; Vec2 (Base.Int %rTC37) %rTS159 xCS126 xCS127; }; Main.newBody = /\ %rTC40 -> \ (pos :: Math.Vec2.Vec2 %rTC40 (Base.Float %rTC40)) -> \ (vel :: Math.Vec2.Vec2 %rTC40 (Base.Float %rTC40)) of (pos : %rTC40) -> [** (Main.Body %rTC40) ] do { xCS128 = prim{Box} %rTC40 100.0#32f; xCS130 = prim{Box} %rTC40 0.0#32f; xCS131 = prim{Box} %rTC40 0.0#32f; xCS129 = Vec2 (Base.Float %rTC40) %rTC40 xCS130 xCS131; Body %rTC40 xCS128 pos vel xCS129; }; Main.frameCount = /\ (+xC23 :: Base.Mutable %rTC41) -> [** (Base.Int %rTC41) ] do { prim{Box} %rTC41 0#32i; }; Main.frameCount_max = [** (Base.Int %rTC42) ] do { prim{Box} %rTC42 5#32i; }; Main.vec2_angleU = \ (x :: Base.Float32#) -> \ (y :: Base.Float32#) -> [** Base.Float32# ] do { piU = [** Base.Float32# ] 3.1415927410125732#32f; match { | 1#32i <- do { primFloat32U_lt x 0.0#32f; } = do { xCS133 = (/) Base.Float32# Base.Float32# Base.Float32# (Num Base.Float32#) (Shape3 Base.Float32# Base.Float32# Base.Float32#) y x; xCS132 = atanU xCS133; (+) Base.Float32# Base.Float32# Base.Float32# (Num Base.Float32#) (Shape3 Base.Float32# Base.Float32# Base.Float32#) piU xCS132; }; | otherwise = do { xCS134 = (/) Base.Float32# Base.Float32# Base.Float32# (Num Base.Float32#) (Shape3 Base.Float32# Base.Float32# Base.Float32#) y x; atanU xCS134; }; }; }; Main.main = /\ (+xC26 :: Base.Mutable %rTC41) -> \ (xSD539 :: Base.Unit) of !{!Read %rTS159; !Read %rTC37; !Graphics; !Read %rTC42; !Read %rTC41; !Read %rTC34; !Read %rTC33; !Read %rTC35; !Write %rTC41} ${Main.worldSize : %rTS159; Main.worldSize : %rTC37; Main.run : %rTC42; Main.run : %rTC41; Main.run : %rTC34; Main.run : %rTC33; Main.run : %rTS159; Main.run : %rTC37; Main.run : %rTC35} -> [** Base.Unit ] do { match { | Unit <- do { xSD539; } = local %rTC47 with {+wCB92 = Const %rTC47; +wCB93 = Direct %rTC47} in local %rTS157 with {+wCB94 = Mutable %rTS157; +wCB95 = Direct %rTS157} in local %rTS219 with {+wCB96 = Mutable %rTS219; +wCB97 = Lazy %rTS219} in local %rTS221 with {+wCB98 = Mutable %rTS221; +wCB99 = Direct %rTS221} in do { frame = /\ (+xC24 :: Base.Mutable %rTS157) -> [** (Graphics.Frame.Frame %rTC37 %rTS157) ] local %rTC46 with {+wCB90 = Mutable %rTC46; +wCB91 = Direct %rTC46} in do { xCS135 = prim{Box} %rTC46 ("N-Body"# %rTC46); xCS138 = worldSize; xCS136 = project_Vec2_x (Base.Int %rTC37) %rTS159 xCS138; xCS139 = worldSize; xCS137 = project_Vec2_y (Base.Int %rTC37) %rTS159 xCS139; project_Frame_new %rTC46 %rTC37 %rTS157 +wCB90 xCS135 xCS136 xCS137; }; xCS140 = Unit; xC25 = initBodies %rTS219 %rTS219 %rTS221 %rTS221 %rTC47 +wCB97 +wCB98 +wCB98 +wCB97 xCS140; match { | Tuple2 { .0 = body0 :: Data.Array.Array %rTS221 (Main.Body %rTS219) , .1 = body1 :: Data.Array.Array %rTS221 (Main.Body %rTS219) } <- do { xC25; } = do { run %rTS221 %rTS219 %rTC37 %rTS157 +wCB94 +wCB96 +xC26 (frame +wCB94) body0 body1; }; }; }; }; }; Main.run = /\ %rTS348, %rTS351, %rTS352, %rTS353 -> /\ (+xC29 :: Base.Mutable %rTS353) -> /\ (+xC28 :: Base.Mutable %rTS351) -> /\ (+xC27 :: Base.Mutable %rTC41) -> \ (a :: Graphics.Frame.Frame %rTS352 %rTS353) of ${Main.frameCount_max : %rTC42; Main.frameCount : %rTC41; sumForces : %rTC34; Main.time_compression : %rTC33; Main.worldSize : %rTS159; Main.worldSize : %rTC37; Main.draw_force : %rTC35; Main.draw_force : %rTC34; Main.run : %rTC42; Main.run : %rTC41; Main.run : %rTC34; Main.run : %rTC33; Main.run : %rTS159; Main.run : %rTC37; Main.run : %rTC35} -> \ (b :: Data.Array.Array %rTS348 (Main.Body %rTS351)) of ${Main.frameCount_max : %rTC42; Main.frameCount : %rTC41; sumForces : %rTC34; Main.time_compression : %rTC33; Main.worldSize : %rTS159; Main.worldSize : %rTC37; a : %rTS352; a : %rTS353; Main.draw_force : %rTC35; Main.draw_force : %rTC34; Main.run : %rTC42; Main.run : %rTC41; Main.run : %rTC34; Main.run : %rTC33; Main.run : %rTS159; Main.run : %rTC37; Main.run : %rTC35} -> \ (c :: Data.Array.Array %rTS348 (Main.Body %rTS351)) of !{!Read %rTC42; !Read %rTC41; !Read %rTS348; !Read %rTS351; !Write %rTS351; !Read %rTC34; !Read %rTC33; !Read %rTS159; !Read %rTC37; !Read %rTS352; !Read %rTS353; !Write %rTS353; !Read %rTC35; !Graphics; !Write %rTC41} ${Main.frameCount_max : %rTC42; Main.frameCount : %rTC41; sumForces : %rTC34; Main.time_compression : %rTC33; b : %rTS348; b : %rTS351; Main.worldSize : %rTS159; Main.worldSize : %rTC37; a : %rTS352; a : %rTS353; Main.draw_force : %rTC35; Main.draw_force : %rTC34; Main.run : %rTC42; Main.run : %rTC41; Main.run : %rTC34; Main.run : %rTC33; Main.run : %rTS159; Main.run : %rTC37; Main.run : %rTC35} -> [** Base.Unit ] local %rTC48 with {+wCB118 = Const %rTC48; +wCB119 = Direct %rTC48} in local %rTC50 with {+wCB120 = Const %rTC50; +wCB121 = Direct %rTC50} in do { match { | True <- local %rTC49 with {+wCB100 = Const %rTC49; +wCB101 = Direct %rTC49} in do { xCS141 = frameCount_max; xCS142 = prim{Box} %rTC49 0#32i; (/=) (Base.Int %rTC42) (Base.Int %rTC49) %rTC48 (Eq (Base.Int %rTC42)) (Shape2 (Base.Int %rTC42) (Base.Int %rTC49)) xCS141 xCS142; } , True <- do { xCS145 = frameCount; xCS143 = xCS145 +xC27; xCS144 = frameCount_max; (>) (Base.Int %rTC41) (Base.Int %rTC42) %rTC50 (Ord (Base.Int %rTC41)) (Shape2 (Base.Int %rTC41) (Base.Int %rTC42)) xCS143 xCS144; } = do { Unit; }; | otherwise = local %rTC51 with {+wCB102 = Const %rTC51; +wCB103 = Direct %rTC51} in local %rTC52 with {+wCB104 = Const %rTC52; +wCB105 = Direct %rTC52} in local %rTC53 with {+wCB106 = Const %rTC53; +wCB107 = Direct %rTC53} in local %rTC54 with {+wCB108 = Const %rTC54; +wCB109 = Direct %rTC54} in local %rTC55 with {+wCB110 = Const %rTC55; +wCB111 = Direct %rTC55} in local %rTC56 with {+wCB112 = Const %rTC56; +wCB113 = Direct %rTC56} in local %rTS234 with {+wCB114 = Const %rTS234; +wCB115 = Direct %rTS234} in local %rTS248 with {+wCB116 = Const %rTS248; +wCB117 = Direct %rTS248} in do { xCS146 = \ (x :: Main.Body %rTS351) of ${sumForces : %rTC34; Main.time_compression : %rTC33; b : %rTS348; b : %rTS351} -> do { project_Body_update %rTS234 %rTS348 %rTS351 %rTS351 +xC28 x b; }; mapArrayIx_ Base.Unit (Main.Body %rTS351) %rTS234 %rTS348 !{!Read %rTS348; !Read %rTS234; !Read %rTS351; !Write %rTS351; !Read %rTC34; !Read %rTC33} !PURE ${sumForces : %rTC34; Main.time_compression : %rTC33; b : %rTS348; b : %rTS351} ${body0 : %rTS348; body0 : %rTS351; b1 : %rTS351; sumForces : %rTC34; Main.time_compression : %rTC33} xCS146 c; xCS147 = \ (x :: Main.Body %rTS351) of !{!Read %rTS351; !Read %rTS159; !Read %rTC37; !Write %rTS351} ${Main.worldSize : %rTS159; Main.worldSize : %rTC37} -> do { project_Body_clampPos %rTS351 +xC28 x; }; mapArray_ Base.Unit (Main.Body %rTS351) %rTS348 !{!Read %rTS351; !Read %rTS159; !Read %rTC37; !Write %rTS351} ${Main.worldSize : %rTS159; Main.worldSize : %rTC37} xCS147 c; xCS154 = prim{Box} %rTC51 0#32i; xCS155 = prim{Box} %rTC52 0#32i; xCS156 = prim{Box} %rTC53 0#32i; xCS148 = project_Frame_color %rTC51 %rTC52 %rTC53 %rTS248 xCS154 xCS155 xCS156; project_Frame_clear %rTS248 %rTS352 %rTS353 +xC29 a xCS148; xCS149 = prim{Box} %rTC54 0#32i; xCS150 = prim{Box} %rTC55 0#32i; draw_force %rTS348 %rTS351 %rTC54 %rTC55 %rTS352 %rTS353 +xC29 a c xCS149 xCS150; xCS151 = \ (x :: Main.Body %rTS351) of !{!Read %rTS351; !Read %rTS159; !Read %rTC37} ${Main.worldSize : %rTS159; Main.worldSize : %rTC37; a : %rTS352; a : %rTS353} -> do { project_Body_draw %rTS353 %rTS352 %rTS351 x a; }; mapArray_ Base.Unit (Main.Body %rTS351) %rTS348 !{!Read %rTS351; !Read %rTS159; !Read %rTC37} ${Main.worldSize : %rTS159; Main.worldSize : %rTC37; a : %rTS352; a : %rTS353} xCS151 c; project_Frame_update %rTS352 %rTS353 a; xCS157 = frameCount; xCS152 = xCS157 +xC27; xCS153 = prim{Box} %rTC56 1#32i; (+=) (Base.Int %rTC41) (Base.Int %rTC56) (Accum (Base.Int %rTC41)) (Shape2 (Base.Int %rTC41) (Base.Int %rTC56)) +xC27 xCS152 xCS153; run %rTS348 %rTS351 %rTS352 %rTS353 +xC29 +xC28 +xC27 a c b; }; }; }; Main.initBodies = /\ %rTC78, %rTC90, %rTS192, %rTS206, %rTS217 -> /\ (+xC40 :: Base.Lazy %rTC78) -> /\ (+xC39 :: Base.Mutable %rTS192) -> /\ (+xC38 :: Base.Mutable %rTS206) -> /\ (+xC37 :: Base.Lazy %rTC90) -> \ (xSD548 :: Base.Unit) of !{!Read %rTS192; !Write %rTS192; !Read %rTS206; !Write %rTS206} -> [** (Data.Tuple.Tuple2 %rTS217 (Data.Array.Array %rTS192 (Main.Body %rTC78)) (Data.Array.Array %rTS206 (Main.Body %rTC90))) ] do { match { | Unit <- do { xSD548; } = local %rTC84 with {+wCB138 = Const %rTC84; +wCB139 = Direct %rTC84} in local %rTC85 with {+wCB140 = Const %rTC85; +wCB141 = Direct %rTC85} in local %rTC91 with {+wCB142 = Const %rTC91; +wCB143 = Direct %rTC91} in local %rTC92 with {+wCB144 = Const %rTC92; +wCB145 = Direct %rTC92} in local %rTS160 with {+wCB146 = Const %rTS160; +wCB147 = Direct %rTS160} in local %rTS191 with {+wCB148 = Const %rTS191; +wCB149 = Direct %rTS191} in local %rTS195 with {+wCB150 = Const %rTS195; +wCB151 = Direct %rTS195} in local %rTS199 with {+wCB152 = Const %rTS199; +wCB153 = Direct %rTS199} in local %rTS205 with {+wCB154 = Const %rTS205; +wCB155 = Direct %rTS205} in local %rTS212 with {+wCB156 = Const %rTS212; +wCB157 = Direct %rTS212} in local %rTS216 with {+wCB158 = Const %rTS216; +wCB159 = Direct %rTS216} in do { bodies = /\ (+xC30 :: Base.Lazy %rTC78) -> [** (Data.List.List %rTS160 (Main.Body %rTC78)) ] local %rTC59 with {+wCB122 = Const %rTC59; +wCB123 = Direct %rTC59} in local %rTC60 with {+wCB124 = Const %rTC60; +wCB125 = Direct %rTC60} in local %rTC73 with {+wCB126 = Const %rTC73; +wCB127 = Direct %rTC73} in local %rTC74 with {+wCB128 = Const %rTC74; +wCB129 = Direct %rTC74} in do { xCS164 = prim{Box} %rTC78 200.0#32f; xCS165 = prim{Box} %rTC78 300.0#32f; xCS160 = Vec2 (Base.Float %rTC78) %rTC78 xCS164 xCS165; xCS172 = prim{Box} %rTC59 0.0#32f; xCS173 = prim{Box} %rTC60 0.5#32f; xCS166 = (-) (Base.Float %rTC59) (Base.Float %rTC60) (Base.Float %rTC78) (Num (Base.Float %rTC59)) (Shape3 (Base.Float %rTC59) (Base.Float %rTC60) (Base.Float %rTC78)) xCS172 xCS173; xCS167 = prim{Box} %rTC78 0.0#32f; xCS161 = Vec2 (Base.Float %rTC78) %rTC78 xCS166 xCS167; xCS158 = newBody %rTC78 xCS160 xCS161; xCS174 = prim{Box} %rTC78 280.0#32f; xCS175 = prim{Box} %rTC78 350.0#32f; xCS168 = Vec2 (Base.Float %rTC78) %rTC78 xCS174 xCS175; xCS176 = prim{Box} %rTC78 0.5#32f; xCS177 = prim{Box} %rTC78 0.0#32f; xCS169 = Vec2 (Base.Float %rTC78) %rTC78 xCS176 xCS177; xCS162 = newBody %rTC78 xCS168 xCS169; xCS182 = prim{Box} %rTC78 520.0#32f; xCS183 = prim{Box} %rTC78 200.0#32f; xCS178 = Vec2 (Base.Float %rTC78) %rTC78 xCS182 xCS183; xCS184 = prim{Box} %rTC78 0.0#32f; xCS185 = prim{Box} %rTC78 1.0#32f; xCS179 = Vec2 (Base.Float %rTC78) %rTC78 xCS184 xCS185; xCS170 = newBody %rTC78 xCS178 xCS179; xCS190 = prim{Box} %rTC78 100.0#32f; xCS191 = prim{Box} %rTC78 300.0#32f; xCS186 = Vec2 (Base.Float %rTC78) %rTC78 xCS190 xCS191; xCS192 = prim{Box} %rTC78 0.0#32f; xCS198 = prim{Box} %rTC73 0.0#32f; xCS199 = prim{Box} %rTC74 1.0#32f; xCS193 = (-) (Base.Float %rTC73) (Base.Float %rTC74) (Base.Float %rTC78) (Num (Base.Float %rTC73)) (Shape3 (Base.Float %rTC73) (Base.Float %rTC74) (Base.Float %rTC78)) xCS198 xCS199; xCS187 = Vec2 (Base.Float %rTC78) %rTC78 xCS192 xCS193; xCS180 = newBody %rTC78 xCS186 xCS187; xCS200 = prim{Box} %rTC78 280.0#32f; xCS201 = prim{Box} %rTC78 450.0#32f; xCS194 = Vec2 (Base.Float %rTC78) %rTC78 xCS200 xCS201; xCS202 = prim{Box} %rTC78 1.0#32f; xCS203 = prim{Box} %rTC78 1.0#32f; xCS195 = Vec2 (Base.Float %rTC78) %rTC78 xCS202 xCS203; xCS188 = newBody %rTC78 xCS194 xCS195; xCS206 = prim{Box} %rTC78 20.0#32f; xCS207 = prim{Box} %rTC78 200.0#32f; xCS204 = Vec2 (Base.Float %rTC78) %rTC78 xCS206 xCS207; xCS208 = prim{Box} %rTC78 0.0#32f; xCS209 = prim{Box} %rTC78 0.0#32f; xCS205 = Vec2 (Base.Float %rTC78) %rTC78 xCS208 xCS209; xCS196 = newBody %rTC78 xCS204 xCS205; xCS197 = Nil (Main.Body %rTC78) %rTS160; xCS189 = Cons (Main.Body %rTC78) %rTS160 xCS196 xCS197; xCS181 = Cons (Main.Body %rTC78) %rTS160 xCS188 xCS189; xCS171 = Cons (Main.Body %rTC78) %rTS160 xCS180 xCS181; xCS163 = Cons (Main.Body %rTC78) %rTS160 xCS170 xCS171; xCS159 = Cons (Main.Body %rTC78) %rTS160 xCS162 xCS163; Cons (Main.Body %rTC78) %rTS160 xCS158 xCS159; }; body0 = /\ (+xC33 :: Base.Mutable %rTS192) -> /\ (+xC32 :: Base.Lazy %rTC78) -> /\ (+xC31 :: Base.Lazy %rTC78) -> [** (Data.Array.Array %rTS192 (Main.Body %rTC78)) ] local %rTC83 with {+wCB130 = Const %rTC83; +wCB131 = Direct %rTC83} in local %rTS185 with {+wCB132 = Mutable %rTS185; +wCB133 = Direct %rTS185} in do { xCS210 = length (Main.Body %rTC78) %rTS160 %rTS185 +wCB132 (bodies +xC31); xCS212 = errorNoEff (Main.Body %rTC78) %rTC83; xCS213 = prim{Box} %rTC83 ("elem not initialised"# %rTC83); xCS211 = suspend1 (Data.String.String %rTC83) (Main.Body %rTC78) !PURE $EMPTY (Pure !PURE) +xC31 xCS212 xCS213; array_new (Main.Body %rTC78) %rTS185 %rTS192 +xC33 xCS210 xCS211; }; xCS227 = \ (b :: Main.Body %rTC78) of ${body0 : %rTS192; body0 : %rTC78} -> \ (i :: Base.Int %rTC84) of !{!Read %rTS192; !Read %rTC84; !Write %rTS192} ${body0 : %rTS192; body0 : %rTC78; b : %rTC78} -> do { xCS214 = indexR (Main.Body %rTC78) %rTS192 %rTC84 (body0 +xC39 +xC40 +xC40) i; (#=) (Main.Body %rTC78) %rTS192 +xC39 xCS214 b; }; xCS231 = prim{Box} %rTC84 0#32i; xCS235 = array_size (Main.Body %rTC78) %rTS192 %rTS199 (body0 +xC39 +xC40 +xC40); xCS236 = prim{Box} %rTC85 1#32i; xCS232 = (-) (Base.Int %rTS199) (Base.Int %rTC85) (Base.Int %rTS195) (Num (Base.Int %rTS199)) (Shape3 (Base.Int %rTS199) (Base.Int %rTC85) (Base.Int %rTS195)) xCS235 xCS236; xCS228 = rangeInt %rTS195 %rTC84 %rTS191 xCS231 xCS232; zipWith_ (Main.Body %rTC78) (Base.Int %rTC84) %rTS160 %rTS191 !{!Read %rTS192; !Read %rTC84; !Write %rTS192} !PURE ${body0 : %rTS192; body0 : %rTC78; b : %rTC78} ${body0 : %rTS192; body0 : %rTC78} xCS227 (bodies +xC40) xCS228; body1 = /\ (+xC36 :: Base.Mutable %rTS206) -> /\ (+xC35 :: Base.Lazy %rTC90) -> /\ (+xC34 :: Base.Lazy %rTC90) -> [** (Data.Array.Array %rTS206 (Main.Body %rTC90)) ] local %rTC86 with {+wCB134 = Const %rTC86; +wCB135 = Direct %rTC86} in local %rTS200 with {+wCB136 = Mutable %rTS200; +wCB137 = Direct %rTS200} in do { xCS215 = length (Main.Body %rTC78) %rTS160 %rTS200 +wCB136 (bodies +xC40); xCS217 = errorNoEff (Main.Body %rTC90) %rTC86; xCS218 = prim{Box} %rTC86 ("elem not initialised"# %rTC86); xCS216 = suspend1 (Data.String.String %rTC86) (Main.Body %rTC90) !PURE $EMPTY (Pure !PURE) +xC34 xCS217 xCS218; array_new (Main.Body %rTC90) %rTS200 %rTS206 +xC36 xCS215 xCS216; }; xCS229 = \ (i :: Base.Int %rTC91) of !{!Read %rTS206; !Read %rTC91; !Write %rTS206} ${body1 : %rTS206; body1 : %rTC90} -> do { xCS219 = indexR (Main.Body %rTC90) %rTS206 %rTC91 (body1 +xC38 +xC37 +xC37) i; xCS223 = prim{Box} %rTC90 0.0#32f; xCS224 = prim{Box} %rTC90 0.0#32f; xCS221 = Vec2 (Base.Float %rTC90) %rTC90 xCS223 xCS224; xCS225 = prim{Box} %rTC90 0.0#32f; xCS226 = prim{Box} %rTC90 0.0#32f; xCS222 = Vec2 (Base.Float %rTC90) %rTC90 xCS225 xCS226; xCS220 = newBody %rTC90 xCS221 xCS222; (#=) (Main.Body %rTC90) %rTS206 +xC38 xCS219 xCS220; }; xCS233 = prim{Box} %rTC91 0#32i; xCS237 = array_size (Main.Body %rTC90) %rTS206 %rTS216 (body1 +xC38 +xC37 +xC37); xCS238 = prim{Box} %rTC92 1#32i; xCS234 = (-) (Base.Int %rTS216) (Base.Int %rTC92) (Base.Int %rTS212) (Num (Base.Int %rTS216)) (Shape3 (Base.Int %rTS216) (Base.Int %rTC92) (Base.Int %rTS212)) xCS237 xCS238; xCS230 = rangeInt %rTS212 %rTC91 %rTS205 xCS233 xCS234; map_ (Base.Int %rTC91) Base.Unit %rTS205 !{!Read %rTS206; !Read %rTC91; !Write %rTS206} ${body1 : %rTS206; body1 : %rTC90} xCS229 xCS230; Tuple2 (Data.Array.Array %rTS192 (Main.Body %rTC78)) (Data.Array.Array %rTS206 (Main.Body %rTC90)) %rTS217 (body0 +xC39 +xC40 +xC40) (body1 +xC38 +xC37 +xC37); }; }; }; Main.draw_force = /\ %rSD551, %rSD552, %rTC95, %rTS276, %rTS340, %rTS341 -> /\ (+xC43 :: Base.Mutable %rTS341) -> \ (frame :: Graphics.Frame.Frame %rTS340 %rTS341) of ${Main.draw_force : %rTC35; Main.draw_force : %rTC34; Main.draw_force_step : %rTC35; Main.sumAllForces : %rTC34} -> \ (body :: Data.Array.Array %rSD551 (Main.Body %rSD552)) of ${Main.draw_force : %rTC35; Main.draw_force : %rTC34; frame : %rTS340; frame : %rTS341; Main.draw_force_step : %rTC35; Main.sumAllForces : %rTC34} -> \ (x :: Base.Int %rTC95) of ${Main.draw_force : %rTC35; Main.draw_force : %rTC34; frame : %rTS340; frame : %rTS341; body : %rSD551; body : %rSD552; Main.draw_force_step : %rTC35; Main.sumAllForces : %rTC34} -> \ (y :: Base.Int %rTS276) of !{!Read %rTC95; !Read %rTS276; !Read %rTC35; !Read %rSD551; !Read %rSD552; !Read %rTC34; !Read %rTS340; !Read %rTS341; !Write %rTS341} ${Main.draw_force : %rTC35; Main.draw_force : %rTC34; frame : %rTS340; frame : %rTS341; body : %rSD551; body : %rSD552; Main.draw_force_step : %rTC35; x : %rTC95; Main.sumAllForces : %rTC34} -> [** Base.Unit ] local %rTC93 with {+wCB186 = Const %rTC93; +wCB187 = Direct %rTC93} in local %rTC96 with {+wCB188 = Const %rTC96; +wCB189 = Direct %rTC96} in do { match { | True <- local %rTC94 with {+wCB160 = Const %rTC94; +wCB161 = Direct %rTC94} in do { xCS239 = prim{Box} %rTC94 600#32i; (>=) (Base.Int %rTC95) (Base.Int %rTC94) %rTC93 (Ord (Base.Int %rTC95)) (Shape2 (Base.Int %rTC95) (Base.Int %rTC94)) x xCS239; } = do { xCS240 = prim{Box} %rTC95 0#32i; xCS242 = draw_force_step; xCS241 = (+) (Base.Int %rTS276) (Base.Int %rTC35) (Base.Int %rTS276) (Num (Base.Int %rTS276)) (Shape3 (Base.Int %rTS276) (Base.Int %rTC35) (Base.Int %rTS276)) y xCS242; draw_force %rSD551 %rSD552 %rTC95 %rTS276 %rTS340 %rTS341 +xC43 frame body xCS240 xCS241; }; | True <- local %rTC97 with {+wCB162 = Const %rTC97; +wCB163 = Direct %rTC97} in do { xCS243 = prim{Box} %rTC97 600#32i; (>=) (Base.Int %rTS276) (Base.Int %rTC97) %rTC96 (Ord (Base.Int %rTS276)) (Shape2 (Base.Int %rTS276) (Base.Int %rTC97)) y xCS243; } = do { Unit; }; | otherwise = local %rTC99 with {+wCB164 = Mutable %rTC99; +wCB165 = Direct %rTC99} in local %rTC100 with {+wCB166 = Const %rTC100; +wCB167 = Direct %rTC100} in local %rTC101 with {+wCB168 = Const %rTC101; +wCB169 = Direct %rTC101} in local %rTS274 with {+wCB170 = Const %rTS274; +wCB171 = Direct %rTS274} in local %rTS277 with {+wCB172 = Const %rTS277; +wCB173 = Direct %rTS277} in local %rTS278 with {+wCB174 = Mutable %rTS278; +wCB175 = Direct %rTS278} in local %rTS279 with {+wCB176 = Const %rTS279; +wCB177 = Direct %rTS279} in local %rTS281 with {+wCB178 = Const %rTS281; +wCB179 = Direct %rTS281} in local %rTS333 with {+wCB180 = Const %rTS333; +wCB181 = Direct %rTS333} in local %rTS334 with {+wCB182 = Const %rTS334; +wCB183 = Direct %rTS334} in local %rTS336 with {+wCB184 = Const %rTS336; +wCB185 = Direct %rTS336} in do { forceV = /\ (+xC42 :: Base.Mutable %rTS278) -> /\ (+xC41 :: Base.Mutable %rTC99) -> [** (Math.Vec2.Vec2 %rTS278 (Base.Float %rTC99)) ] do { xCS244 = prim{Box} %rTC99 0.0#32f; xCS245 = prim{Box} %rTC99 0.0#32f; Vec2 (Base.Float %rTC99) %rTS278 xCS244 xCS245; }; xCS253 = toFloat %rTC95 %rTS274 x; xCS246 = unboxFloat32 %rTS274 xCS253; xCS254 = toFloat %rTS276 %rTS277 y; xCS247 = unboxFloat32 %rTS277 xCS254; xCS248 = prim{Box} %rTC100 0#32i; sumAllForces %rTS278 %rTC99 %rSD551 %rTC100 %rSD552 +wCB174 +wCB164 xCS246 xCS247 body xCS248 (forceV +wCB174 +wCB164); forceS = [** (Base.Float %rTS279) ] project_Vec2_magnitude %rTS278 %rTS279 %rTC99 (forceV +wCB174 +wCB164); xCS249 = log %rTS281 %rTS279 forceS; xCS250 = prim{Box} %rTC101 6.0#32f; fS = [** (Base.Float %rTS334) ] (+) (Base.Float %rTS281) (Base.Float %rTC101) (Base.Float %rTS334) (Num (Base.Float %rTS281)) (Shape3 (Base.Float %rTS281) (Base.Float %rTC101) (Base.Float %rTS334)) xCS249 xCS250; color = [** (Base.Int %rTS333) ] forceColor %rTS334 %rTS333 fS; xCS255 = project_Frame_sizeY %rTS340 %rTS341 frame; xCS251 = (-) (Base.Int %rTS340) (Base.Int %rTS276) (Base.Int %rTS336) (Num (Base.Int %rTS340)) (Shape3 (Base.Int %rTS340) (Base.Int %rTS276) (Base.Int %rTS336)) xCS255 y; project_Frame_point %rTC95 %rTS336 %rTS333 %rTS340 %rTS341 +xC43 frame x xCS251 color; xCS256 = draw_force_step; xCS252 = (+) (Base.Int %rTC95) (Base.Int %rTC35) (Base.Int %rTC95) (Num (Base.Int %rTC95)) (Shape3 (Base.Int %rTC95) (Base.Int %rTC35) (Base.Int %rTC95)) x xCS256; draw_force %rSD551 %rSD552 %rTC95 %rTS276 %rTS340 %rTS341 +xC43 frame body xCS252 y; }; }; }; Main.sumAllForces = /\ %rSD560, %rSD561, %rTS255, %rTS256, %rTS264 -> /\ (+xC45 :: Base.Mutable %rSD560) -> /\ (+xC44 :: Base.Mutable %rSD561) -> \ (pX :: Base.Float32#) of ${forceVec_work : %rTC34; Main.sumAllForces : %rTC34} -> \ (pY :: Base.Float32#) of ${forceVec_work : %rTC34; Main.sumAllForces : %rTC34} -> \ (array :: Data.Array.Array %rTS255 (Main.Body %rTS264)) of ${forceVec_work : %rTC34; Main.sumAllForces : %rTC34} -> \ (ix :: Base.Int %rTS256) of ${array : %rTS255; array : %rTS264; forceVec_work : %rTC34; Main.sumAllForces : %rTC34} -> \ (vForce :: Math.Vec2.Vec2 %rSD560 (Base.Float %rSD561)) of !{!Read %rTS255; !Read %rTS256; !Read %rTS264; !Read %rTC34; !Read %rSD560; !Read %rSD561; !Write %rSD560; !Write %rSD561} ${ix : %rTS256; array : %rTS255; array : %rTS264; forceVec_work : %rTC34; Main.sumAllForces : %rTC34} -> [** (Math.Vec2.Vec2 %rSD560 (Base.Float %rSD561)) ] local %rTC102 with {+wCB198 = Const %rTC102; +wCB199 = Direct %rTC102} in do { match { | True <- local %rTS254 with {+wCB190 = Const %rTS254; +wCB191 = Direct %rTS254} in do { xCS257 = array_size (Main.Body %rTS264) %rTS255 %rTS254 array; (>=) (Base.Int %rTS256) (Base.Int %rTS254) %rTC102 (Ord (Base.Int %rTS256)) (Shape2 (Base.Int %rTS256) (Base.Int %rTS254)) ix xCS257; } = do { vForce; }; | otherwise = local %rTC104 with {+wCB192 = Const %rTC104; +wCB193 = Direct %rTC104} in local %rTS257 with {+wCB194 = Const %rTS257; +wCB195 = Direct %rTS257} in local %rTS258 with {+wCB196 = Const %rTS258; +wCB197 = Direct %rTS258} in do { body = [** (Main.Body %rTS264) ] index (Main.Body %rTS264) %rTS255 %rTS256 array ix; xCS264 = project_Body_mass %rTS264 body; xCS260 = unboxFloat32 %rTS264 xCS264; xCS267 = project_Body_pos %rTS264 body; xCS265 = project_Vec2_x (Base.Float %rTS264) %rTS264 xCS267; xCS261 = unboxFloat32 %rTS264 xCS265; xCS268 = project_Body_pos %rTS264 body; xCS266 = project_Vec2_y (Base.Float %rTS264) %rTS264 xCS268; xCS262 = unboxFloat32 %rTS264 xCS266; xCS258 = project_Body_forceVec_work %rTS257 %rTS258 1.0#32f xCS260 pX pY xCS261 xCS262; (+=) (Math.Vec2.Vec2 %rSD560 (Base.Float %rSD561)) (Math.Vec2.Vec2 %rTS257 (Base.Float %rTS258)) (Accum (Math.Vec2.Vec2 %rSD560 (Base.Float %rSD561))) (Shape2 (Math.Vec2.Vec2 %rSD560 (Base.Float %rSD561)) (Math.Vec2.Vec2 %rTS257 (Base.Float %rTS258))) (wjoin {Mutable %rSD561; Mutable %rSD560}) vForce xCS258; xCS263 = prim{Box} %rTC104 1#32i; xCS259 = (+) (Base.Int %rTS256) (Base.Int %rTC104) (Base.Int %rTS256) (Num (Base.Int %rTS256)) (Shape3 (Base.Int %rTS256) (Base.Int %rTC104) (Base.Int %rTS256)) ix xCS263; sumAllForces %rSD560 %rSD561 %rTS255 %rTS256 %rTS264 +xC45 +xC44 pX pY array xCS259 vForce; }; }; }; Main.forceColor = /\ %rTS291, %rTS331 -> \ (fS :: Base.Float %rTS291) of (!Read %rTS291) -> [** (Base.Int %rTS331) ] local %rTS283 with {+wCB294 = Const %rTS283; +wCB295 = Direct %rTS283} in local %rTS288 with {+wCB296 = Const %rTS288; +wCB297 = Direct %rTS288} in local %rTS296 with {+wCB298 = Const %rTS296; +wCB299 = Direct %rTS296} in local %rTS304 with {+wCB300 = Const %rTS304; +wCB301 = Direct %rTS304} in local %rTS312 with {+wCB302 = Const %rTS312; +wCB303 = Direct %rTS312} in local %rTS320 with {+wCB304 = Const %rTS320; +wCB305 = Direct %rTS320} in do { match { | True <- local %rTC106 with {+wCB200 = Const %rTC106; +wCB201 = Direct %rTC106} in do { xCS269 = prim{Box} %rTC106 0.0#32f; (<) (Base.Float %rTS291) (Base.Float %rTC106) %rTS283 (Ord (Base.Float %rTS291)) (Shape2 (Base.Float %rTS291) (Base.Float %rTC106)) fS xCS269; } = local %rTS284 with {+wCB202 = Const %rTS284; +wCB203 = Direct %rTS284} in local %rTS285 with {+wCB204 = Const %rTS285; +wCB205 = Direct %rTS285} in local %rTS286 with {+wCB206 = Const %rTS286; +wCB207 = Direct %rTS286} in do { xCS270 = prim{Box} %rTS284 0#32i; xCS271 = prim{Box} %rTS285 0#32i; xCS272 = prim{Box} %rTS286 0#32i; project_Frame_color %rTS284 %rTS285 %rTS286 %rTS331 xCS270 xCS271 xCS272; }; | True <- local %rTC111 with {+wCB208 = Const %rTC111; +wCB209 = Direct %rTC111} in do { xCS273 = prim{Box} %rTC111 1.0#32f; (<) (Base.Float %rTS291) (Base.Float %rTC111) %rTS288 (Ord (Base.Float %rTS291)) (Shape2 (Base.Float %rTS291) (Base.Float %rTC111)) fS xCS273; } = local %rTC112 with {+wCB210 = Const %rTC112; +wCB211 = Direct %rTC112} in local %rTS289 with {+wCB212 = Const %rTS289; +wCB213 = Direct %rTS289} in local %rTS290 with {+wCB214 = Const %rTS290; +wCB215 = Direct %rTS290} in local %rTS292 with {+wCB216 = Const %rTS292; +wCB217 = Direct %rTS292} in local %rTS293 with {+wCB218 = Const %rTS293; +wCB219 = Direct %rTS293} in do { x = [** (Base.Float %rTS291) ] fS; xCS277 = prim{Box} %rTC112 255.0#32f; xCS274 = (*) (Base.Float %rTS291) (Base.Float %rTC112) (Base.Float %rTS289) (Num (Base.Float %rTS291)) (Shape3 (Base.Float %rTS291) (Base.Float %rTC112) (Base.Float %rTS289)) x xCS277; c = [** (Base.Int %rTS290) ] truncate %rTS289 %rTS290 xCS274; xCS275 = prim{Box} %rTS292 0#32i; xCS276 = prim{Box} %rTS293 0#32i; project_Frame_color %rTS292 %rTS293 %rTS290 %rTS331 xCS275 xCS276 c; }; | True <- local %rTC116 with {+wCB220 = Const %rTC116; +wCB221 = Direct %rTC116} in do { xCS278 = prim{Box} %rTC116 2.0#32f; (<) (Base.Float %rTS291) (Base.Float %rTC116) %rTS296 (Ord (Base.Float %rTS291)) (Shape2 (Base.Float %rTS291) (Base.Float %rTC116)) fS xCS278; } = local %rTC117 with {+wCB222 = Const %rTC117; +wCB223 = Direct %rTC117} in local %rTC118 with {+wCB224 = Const %rTC118; +wCB225 = Direct %rTC118} in local %rTC120 with {+wCB226 = Const %rTC120; +wCB227 = Direct %rTC120} in local %rTS297 with {+wCB228 = Const %rTS297; +wCB229 = Direct %rTS297} in local %rTS298 with {+wCB230 = Const %rTS298; +wCB231 = Direct %rTS298} in local %rTS299 with {+wCB232 = Const %rTS299; +wCB233 = Direct %rTS299} in local %rTS300 with {+wCB234 = Const %rTS300; +wCB235 = Direct %rTS300} in local %rTS302 with {+wCB236 = Const %rTS302; +wCB237 = Direct %rTS302} in do { xCS279 = prim{Box} %rTC117 1.0#32f; x = [** (Base.Float %rTS299) ] (-) (Base.Float %rTS291) (Base.Float %rTC117) (Base.Float %rTS299) (Num (Base.Float %rTS291)) (Shape3 (Base.Float %rTS291) (Base.Float %rTC117) (Base.Float %rTS299)) fS xCS279; xCS283 = prim{Box} %rTC118 255.0#32f; xCS280 = (*) (Base.Float %rTS299) (Base.Float %rTC118) (Base.Float %rTS297) (Num (Base.Float %rTS299)) (Shape3 (Base.Float %rTS299) (Base.Float %rTC118) (Base.Float %rTS297)) x xCS283; c = [** (Base.Int %rTS298) ] truncate %rTS297 %rTS298 xCS280; xCS281 = prim{Box} %rTS300 0#32i; xCS284 = prim{Box} %rTC120 255#32i; xCS282 = (-) (Base.Int %rTC120) (Base.Int %rTS298) (Base.Int %rTS302) (Num (Base.Int %rTC120)) (Shape3 (Base.Int %rTC120) (Base.Int %rTS298) (Base.Int %rTS302)) xCS284 c; project_Frame_color %rTS300 %rTS298 %rTS302 %rTS331 xCS281 c xCS282; }; | True <- local %rTC122 with {+wCB238 = Const %rTC122; +wCB239 = Direct %rTC122} in do { xCS285 = prim{Box} %rTC122 3.0#32f; (<) (Base.Float %rTS291) (Base.Float %rTC122) %rTS304 (Ord (Base.Float %rTS291)) (Shape2 (Base.Float %rTS291) (Base.Float %rTC122)) fS xCS285; } = local %rTC123 with {+wCB240 = Const %rTC123; +wCB241 = Direct %rTC123} in local %rTC124 with {+wCB242 = Const %rTC124; +wCB243 = Direct %rTC124} in local %rTC125 with {+wCB244 = Const %rTC125; +wCB245 = Direct %rTC125} in local %rTC126 with {+wCB246 = Const %rTC126; +wCB247 = Direct %rTC126} in local %rTS305 with {+wCB248 = Const %rTS305; +wCB249 = Direct %rTS305} in local %rTS306 with {+wCB250 = Const %rTS306; +wCB251 = Direct %rTS306} in local %rTS307 with {+wCB252 = Const %rTS307; +wCB253 = Direct %rTS307} in local %rTS309 with {+wCB254 = Const %rTS309; +wCB255 = Direct %rTS309} in do { xCS286 = prim{Box} %rTC123 2.0#32f; x = [** (Base.Float %rTS307) ] (-) (Base.Float %rTS291) (Base.Float %rTC123) (Base.Float %rTS307) (Num (Base.Float %rTS291)) (Shape3 (Base.Float %rTS291) (Base.Float %rTC123) (Base.Float %rTS307)) fS xCS286; xCS290 = prim{Box} %rTC124 255.0#32f; xCS287 = (*) (Base.Float %rTS307) (Base.Float %rTC124) (Base.Float %rTS305) (Num (Base.Float %rTS307)) (Shape3 (Base.Float %rTS307) (Base.Float %rTC124) (Base.Float %rTS305)) x xCS290; c = [** (Base.Int %rTS306) ] truncate %rTS305 %rTS306 xCS287; xCS291 = prim{Box} %rTC125 255#32i; xCS288 = (-) (Base.Int %rTC125) (Base.Int %rTS306) (Base.Int %rTS309) (Num (Base.Int %rTC125)) (Shape3 (Base.Int %rTC125) (Base.Int %rTS306) (Base.Int %rTS309)) xCS291 c; xCS289 = prim{Box} %rTC126 0#32i; project_Frame_color %rTS306 %rTS309 %rTC126 %rTS331 c xCS288 xCS289; }; | True <- local %rTC128 with {+wCB256 = Const %rTC128; +wCB257 = Direct %rTC128} in do { xCS292 = prim{Box} %rTC128 4.0#32f; (<) (Base.Float %rTS291) (Base.Float %rTC128) %rTS312 (Ord (Base.Float %rTS291)) (Shape2 (Base.Float %rTS291) (Base.Float %rTC128)) fS xCS292; } = local %rTC129 with {+wCB258 = Const %rTC129; +wCB259 = Direct %rTC129} in local %rTC130 with {+wCB260 = Const %rTC130; +wCB261 = Direct %rTC130} in local %rTC131 with {+wCB262 = Const %rTC131; +wCB263 = Direct %rTC131} in local %rTS313 with {+wCB264 = Const %rTS313; +wCB265 = Direct %rTS313} in local %rTS314 with {+wCB266 = Const %rTS314; +wCB267 = Direct %rTS314} in local %rTS315 with {+wCB268 = Const %rTS315; +wCB269 = Direct %rTS315} in local %rTS316 with {+wCB270 = Const %rTS316; +wCB271 = Direct %rTS316} in do { xCS293 = prim{Box} %rTC129 3.0#32f; x = [** (Base.Float %rTS315) ] (-) (Base.Float %rTS291) (Base.Float %rTC129) (Base.Float %rTS315) (Num (Base.Float %rTS291)) (Shape3 (Base.Float %rTS291) (Base.Float %rTC129) (Base.Float %rTS315)) fS xCS293; xCS296 = prim{Box} %rTC130 255.0#32f; xCS294 = (*) (Base.Float %rTS315) (Base.Float %rTC130) (Base.Float %rTS313) (Num (Base.Float %rTS315)) (Shape3 (Base.Float %rTS315) (Base.Float %rTC130) (Base.Float %rTS313)) x xCS296; c = [** (Base.Int %rTS314) ] truncate %rTS313 %rTS314 xCS294; xCS297 = prim{Box} %rTC131 255#32i; xCS295 = (-) (Base.Int %rTC131) (Base.Int %rTS314) (Base.Int %rTS316) (Num (Base.Int %rTC131)) (Shape3 (Base.Int %rTC131) (Base.Int %rTS314) (Base.Int %rTS316)) xCS297 c; project_Frame_color %rTS316 %rTS314 %rTS314 %rTS331 xCS295 c c; }; | True <- local %rTC133 with {+wCB272 = Const %rTC133; +wCB273 = Direct %rTC133} in do { xCS298 = prim{Box} %rTC133 5.0#32f; (<) (Base.Float %rTS291) (Base.Float %rTC133) %rTS320 (Ord (Base.Float %rTS291)) (Shape2 (Base.Float %rTS291) (Base.Float %rTC133)) fS xCS298; } = local %rTC134 with {+wCB274 = Const %rTC134; +wCB275 = Direct %rTC134} in local %rTC135 with {+wCB276 = Const %rTC135; +wCB277 = Direct %rTC135} in local %rTC136 with {+wCB278 = Const %rTC136; +wCB279 = Direct %rTC136} in local %rTS321 with {+wCB280 = Const %rTS321; +wCB281 = Direct %rTS321} in local %rTS322 with {+wCB282 = Const %rTS322; +wCB283 = Direct %rTS322} in local %rTS323 with {+wCB284 = Const %rTS323; +wCB285 = Direct %rTS323} in local %rTS325 with {+wCB286 = Const %rTS325; +wCB287 = Direct %rTS325} in do { xCS299 = prim{Box} %rTC134 4.0#32f; x = [** (Base.Float %rTS323) ] (-) (Base.Float %rTS291) (Base.Float %rTC134) (Base.Float %rTS323) (Num (Base.Float %rTS291)) (Shape3 (Base.Float %rTS291) (Base.Float %rTC134) (Base.Float %rTS323)) fS xCS299; xCS302 = prim{Box} %rTC135 255.0#32f; xCS300 = (*) (Base.Float %rTS323) (Base.Float %rTC135) (Base.Float %rTS321) (Num (Base.Float %rTS323)) (Shape3 (Base.Float %rTS323) (Base.Float %rTC135) (Base.Float %rTS321)) x xCS302; c = [** (Base.Int %rTS322) ] truncate %rTS321 %rTS322 xCS300; xCS303 = prim{Box} %rTC136 255#32i; xCS301 = (-) (Base.Int %rTC136) (Base.Int %rTS322) (Base.Int %rTS325) (Num (Base.Int %rTC136)) (Shape3 (Base.Int %rTC136) (Base.Int %rTS322) (Base.Int %rTS325)) xCS303 c; project_Frame_color %rTS322 %rTS325 %rTS322 %rTS331 c xCS301 c; }; | otherwise = local %rTS328 with {+wCB288 = Const %rTS328; +wCB289 = Direct %rTS328} in local %rTS329 with {+wCB290 = Const %rTS329; +wCB291 = Direct %rTS329} in local %rTS330 with {+wCB292 = Const %rTS330; +wCB293 = Direct %rTS330} in do { xCS304 = prim{Box} %rTS328 255#32i; xCS305 = prim{Box} %rTS329 255#32i; xCS306 = prim{Box} %rTS330 255#32i; project_Frame_color %rTS328 %rTS329 %rTS330 %rTS331 xCS304 xCS305 xCS306; }; }; };