anchor.diff:        (*
          * CAS
          *)
  -      (prim "ICAS" [ Int "destA"; Int "testA" ] [ Int "destB"; Int "testB"; Int "set" ]
  +      (mkPrim "ICAS" [ Int "destA"; Int "testA" ] [ Int "destB"; Int "testB"; Int "set" ]
              [ Branch
                   (iEq (IVar "destB") (IVar "testB"),
                    [ Assign (Int "destA", Int (IVar "set"))
  
positive.code:        * Atomic load
         *)
        // Integer load
        (prim "!ILoad"  [ Int "dest" ] [ Int "src" ]
              [ Assign (Int "dest", Int (IVar "src")) ] )
  
        // Integer load-and-increment
        (prim "!ILoad++"  [ Int "dest"; Int "srcA" ] [ Int "srcB" ]
              [ Assign (Int "dest", Int (IVar "srcB"))
                Assign (Int "srcA", Int (mkAdd2 (IVar "srcB") (IInt 1L))) ] )
  
        // Integer load-and-decrement
        (prim "!ILoad--"  [ Int "dest"; Int "srcA" ] [ Int "srcB" ]
              [ Assign (Int "dest", Int (IVar "srcB"))
                Assign (Int "srcA", Int (mkSub2 (IVar "srcB") (IInt 1L))) ] )
  
        // Integer increment
        (prim "!I++"  [ Int "srcA" ] [ Int "srcB" ]
              [ Assign (Int "srcA", Int (mkAdd2 (IVar "srcB") (IInt 1L))) ] )
  
        // Integer decrement
        (prim "!I--"  [ Int "srcA" ] [ Int "srcB" ]
              [ Assign (Int "srcA", Int (mkSub2 (IVar "srcB") (IInt 1L))) ] )
  
        // Boolean load
        (prim "!BLoad"  [ Bool "dest" ] [ Bool "src" ]
              [ Assign (Bool "dest", Bool (BVar "src")) ] )
  
        (*
  
negative.code:                  [ Assign (Int "destA", Int (IVar "destB"))
                     Assign (Int "testA", Int (IVar "destB")) ] ) ] )
        // Boolean CAS
        (mkPrim "BCAS" [ Bool "destA"; Bool "testA" ] [ Bool "destB"; Bool "testB"; Bool "set" ]
             [ Branch
                  (bEq (BVar "destB") (BVar "testB"),
                   [ Assign (Bool "destA", Bool (BVar "set"))
  