function free_slot_28() /* entry=382 class_id=0x0A0C slot=0x28 */
{
  var
    r1, /* [BP+06h] type=0x69 */
    r2, /* [BP+08h] type=0x69 */
    item1, /* [BP-02h] type=0x24 */
    item2, /* [BP-04h] type=0x24 */
    avatarMap, /* [BP-06h] type=0x69 */
    npc1, /* [BP-08h] type=0x24 */
    npc2, /* [BP-0Ah] type=0x24 */
    x, /* [BP-0Ch] type=0x69 */
    y, /* [BP-0Eh] type=0x69 */
    z; /* [BP-10h] type=0x69 */

  entry:
    item1 = r1;
    item2 = r2;
    /* global_address global_id=0x3C */
    avatarMap = Item.getType();
    if Item.isNpc(item1) goto block_09C7;

  block_099F:
    npc1 = item1;
    if (Item.getType(npc1) != avatarMap) goto block_09C7;

  block_09BE:
    goto block_0AD3;

  block_09C7:
    if Item.isNpc(item2) goto block_09FE;

  block_09D6:
    npc2 = item2;
    if (Item.getType(npc2) != avatarMap) goto block_09FE;

  block_09F5:
    goto block_0AD3;

  block_09FE:
    x = (Intrinsic0013(item1) - Intrinsic0013(item2));
    y = (Item.legal_create(item1) - Item.legal_create(item2));
    z = (Item.getZ(item1) - Item.getZ(item2));
    class_0A0C_slot_3F(x);
    x = retval;
    class_0A0C_slot_3F(y);
    y = retval;
    class_0A0C_slot_3F(z);
    z = retval;
    if ((x > y) && (x > z)) goto block_0A90;

  block_0A87:
    goto block_0AD3;

  block_0A90:
    if ((y > x) && (y > z)) goto block_0AAD;

  block_0AA4:
    goto block_0AD3;

  block_0AAD:
    if ((z > x) && (z > y)) goto block_0ACA;

  block_0AC1:
    goto block_0AD3;

  block_0ACA:
    goto block_0AD3;

  block_0AD3:
    return;

}
