function free_slot_2A() /* entry=382 class_id=0x0A0C slot=0x2A */
{
  var
    range, /* [BP+06h] type=0x69 */
    t, /* [BP+08h] type=0x69 */
    f, /* [BP+0Ah] type=0x69 */
    item, /* [BP-02h] type=0x24 */
    closestItem, /* [BP-04h] type=0x24 */
    closest, /* [BP-06h] type=0x69 */
    dist; /* [BP-08h] type=0x69 */

  closest = 0x7D00;
  closestItem = 0;
  /* loop_selector item in nearby_items(shape=t, origin=global[0x003C]) */
  while (!condition) {
    if (Item.getFrame(item) == f) {
      FREE.slot_28(item, global[0x003C]);
      dist = retval;
      if (dist >= closest) {
        closest = dist;
        closestItem = item;
      }
    }
    /* loopnext  */
  }
  return;
}
