function bbetty_slot_21() /* entry=371 class_id=0x0A01 slot=0x21 */
{
  var
    referent, /* [BP+00h] type=0x69 */
    x, /* [BP-02h] type=0x69 */
    y, /* [BP-04h] type=0x69 */
    xx, /* [BP-06h] type=0x69 */
    yy, /* [BP-08h] type=0x69 */
    counter, /* [BP-0Ah] type=0x69 */
    dir, /* [BP-0Bh] type=0x62 */
    item3; /* [BP-0Dh] type=0x24 */

  entry:
    set_info(0x00F0, *(arg_06));
    spawn FREE.waitNTimerTicks(pid, 60, 0x00000000);
    suspend;

  block_02BB:
    suspend;
    if Item.getQHi(arg_06) goto block_0312;

  block_02D7:
    /* global_address global_id=0x3C */
    /* global_address global_id=0x3C */
    dir = getClosestDirectionInRange(Item.getX(Item.getY(8, 0, 8)), Item.getY(arg_06), Item.getX(arg_06));
    goto block_0331;

  block_0312:
    dir = (1 + dir);
    if (dir > 7) goto block_0331;

  block_032A:
    dir = 0;

  block_0331:
    if (dir == 0) {
      x = 0;
      y = -1;
      xx = -16;
      yy = -48;
    }
    else if (dir == 1) {
      x = 1;
      y = -1;
      xx = 16;
      yy = -48;
    }
    else if (dir == 2) {
      x = 1;
      y = 0;
      xx = 16;
      yy = -16;
    }
    else if (dir == 3) {
      x = 1;
      y = 1;
      xx = 16;
      yy = 16;
    }
    else if (dir == 4) {
      x = 0;
      y = 1;
      xx = -16;
      yy = 16;
    }
    else if (dir == 5) {
      x = -1;
      y = 1;
      xx = -48;
      yy = 16;
    }
    else if (dir == 6) {
      x = -1;
      y = 0;
      xx = -48;
      yy = -16;
    }
    else if (dir == 7) {
      x = -1;
      y = -1;
      xx = -48;
      yy = -48;
    }

  block_0469:
    FREE.slot_20(8, 30, 15);
    spawn FREE.waitNTimerTicks(pid, ((5 - Game.getDifficultyLevel()) * 20), 0x00000000);
    suspend;
    goto block_02BB;

  block_051B:
    return;

}
