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 class_0A0C_slot_32(pid, 60, 0x00000000);
    suspend;

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

  block_02D7:
    /* global_address global_id=0x3C */
    /* global_address global_id=0x3C */
    dir = Intrinsic0027(Intrinsic0013(Item.legal_create(8, 0, 8)), Item.legal_create(arg_06), Intrinsic0013(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) goto block_0358;

  block_0339:
    x = 0;
    y = -1;
    xx = -16;
    yy = -48;
    goto block_0469;

  block_0358:
    if (dir != 1) goto block_037F;

  block_0360:
    x = 1;
    y = -1;
    xx = 16;
    yy = -48;
    goto block_0469;

  block_037F:
    if (dir != 2) goto block_03A6;

  block_0387:
    x = 1;
    y = 0;
    xx = 16;
    yy = -16;
    goto block_0469;

  block_03A6:
    if (dir != 3) goto block_03CD;

  block_03AE:
    x = 1;
    y = 1;
    xx = 16;
    yy = 16;
    goto block_0469;

  block_03CD:
    if (dir != 4) goto block_03F4;

  block_03D5:
    x = 0;
    y = 1;
    xx = -16;
    yy = 16;
    goto block_0469;

  block_03F4:
    if (dir != 5) goto block_041B;

  block_03FC:
    x = -1;
    y = 1;
    xx = -48;
    yy = 16;
    goto block_0469;

  block_041B:
    if (dir != 6) goto block_0442;

  block_0423:
    x = -1;
    y = 0;
    xx = -48;
    yy = -16;
    goto block_0469;

  block_0442:
    if (dir != 7) goto block_0469;

  block_044A:
    x = -1;
    y = -1;
    xx = -48;
    yy = -48;
    goto block_0469;

  block_0469:
    class_0A0C_slot_20(8, 30, 15);
    spawn class_0A0C_slot_32(pid, ((5 - Intrinsic0029()) * 20), 0x00000000);
    suspend;
    goto block_02BB;

  block_051B:
    return;

}
