spinlock (pulong -w pointer, ulong set_release)
      if (set_release == 1)
{
  asm () / R0..R3        
  {
    SETPTR R1, pointer                                                         /* R1 = pointer                   */

    DO:       DO R2                                                            /* do (R2) {                      */

              LDREX R0, R1                                                     /*     R0 = load_ex (^R1)         */
              CR R3, R0, 0, CR_EQ                                              /*     R3 = [= 0], R0, 0          */

              IF:     BC/R R3, ->.END                                          /*     if (![= 0], R3) {          */

                      STREX R0, R1, 1                                          /*         R0 = store_ex (^R1, 1) */
                      CR R3, R0, 0, CR_EQ                                      /*         R3 = [= 0], R0, 0      */

              END:                                                             /*     }                          */

    NEXT:     NEXT R2, R3                                                      /* } next ([= 0], R3)             */
  }
}

spinlock (pulong -w pointer, ulong set_release)
      if (set_release == 0)
{
  ...
}
