     e H nth-unsafe S1-256 w+
     h H nth-unsafe w+ ; inline
 
-: T2-256 ( H -- T2 )
-    [ a swap nth-unsafe S0-256 ]
-    [ a swap slice3 maj w+ ] bi ; inline
+:: T2-256 ( H -- T2 )
+    a H nth-unsafe S0-256
+    a H slice3 maj w+ ; inline
 
 :: T1-512 ( n M H sha2 -- T1 )
     n M nth-unsafe

    e H nth-unsafe S1-512 w+
    h H nth-unsafe w+ ; inline

: T2-512 ( H -- T2 )
    [ a swap nth-unsafe S0-512 ]
    [ a swap slice3 maj w+ ] bi ; inline

: update-H ( T1 T2 H -- )
    h g pick exchange-unsafe
    g f pick exchange-unsafe
    f e pick exchange-unsafe
    pick d pick nth-unsafe w+ e pick set-nth-unsafe
    d c pick exchange-unsafe
    c b pick exchange-unsafe
    b a pick exchange-unsafe
    [ w+ a ] dip set-nth-unsafe ; inline

: prepare-message-schedule ( seq sha2 -- w-seq )
    [ word-size>> <groups> [ be> ] map ]

    } 2cleave set-nth-unsafe ; inline

: prepare-M-512 ( n seq -- )
    { array } declare
    {
        [ [ 16 - ] dip nth-unsafe ]
        [ [ 15 - ] dip nth-unsafe s0-512 ]
