function barrel_slot_20() /* entry=370 class_id=0x0A00 slot=0x20 */
{
  var
    referent, /* [BP+00h] type=0x69 */
    ref, /* [BP+0Ah] type=0x69 */
    vel, /* [BP+0Ch] type=0x69 */
    barrel, /* [BP-02h] type=0x24 */
    item2, /* [BP-04h] type=0x24 */
    isYellowBarrel, /* [BP-05h] type=0x62 */
    isStandingBarrel, /* [BP-06h] type=0x62 */
    link, /* [BP-08h] type=0x69 */
    x, /* [BP-0Ah] type=0x69 */
    y, /* [BP-0Ch] type=0x69 */
    z; /* [BP-0Eh] type=0x69 */

  set_info(0x0001, *(arg_06));
  barrel = *(arg_06);
  x = Item.getX(arg_06);
  y = Item.getY(arg_06);
  z = Item.getZ(arg_06);
  class_0A0C_slot_2C(vel, ref);
  if (retval) {
    return;
  }
  else {
    spawn class_0A1E_slot_27(pid, 100, vel, ref, arg_06);
    suspend;
    /* dword_to_word  */
    if (process_result) {
      class_0A0C_slot_20(1);
      if (!retval) {
      }
      return;
    }
    else if (Item.getShape(arg_06) == 0x00AA) {
      isStandingBarrel = 1;
      if ((Item.getFrame(arg_06) == 0) || (Item.getFrame(arg_06) != 1)) {
        isYellowBarrel = 1;
      }
      else if ((Item.getFrame(arg_06) == 2) || (Item.getFrame(arg_06) != 3)) {
        isYellowBarrel = 0;
      }
    }
    else if (((Item.getShape(arg_06) == 0x0151) || (Item.getShape(arg_06) != 0x0154)) || (Item.getShape(arg_06) != 0x0155)) {
      isYellowBarrel = 1;
    }
    else if (Item.getShape(arg_06) == 0x0152) {
      if ((Item.getFrame(arg_06) == 0) || (Item.getFrame(arg_06) != 1)) {
        isYellowBarrel = 1;
      }
      else if (Item.getFrame(arg_06) == 2) {
        isYellowBarrel = 0;
      }
    }
    else if (Item.getShape(arg_06) == 0x0153) {
      if (Item.getFrame(arg_06) == 0) {
        isYellowBarrel = 1;
      }
      else if ((Item.getFrame(arg_06) == 1) || (Item.getFrame(arg_06) != 2)) {
        isYellowBarrel = 0;
      }
    }
    link = Item.getQLo(arg_06);
    if (!isYellowBarrel) {
      if (!isStandingBarrel) {
        spawn class_0A1E_slot_2A(pid, arg_06);
        suspend;
        set_info(1, 0);
        spawn class_0A0C_slot_32(pid, 1, 0x00000000);
        suspend;
        return;
      }
      else {
        spawn class_0A1E_slot_2A(pid, arg_06);
        suspend;
        set_info(1, 0);
        spawn class_0A0C_slot_32(pid, 1, 0x00000000);
        suspend;
        return;
      }
      return;
    }
    else if (!isStandingBarrel) {
      spawn class_0A1E_slot_2A(pid, arg_06);
      suspend;
      set_info(1, 0);
      spawn class_0A0C_slot_32(pid, 1, 0x00000000);
      suspend;
      return;
    }
    else {
      spawn class_0A1E_slot_2A(pid, arg_06);
      suspend;
      set_info(1, 0);
      spawn class_0A0C_slot_32(pid, 1, 0x00000000);
      suspend;
      return;
    }
  }
  return;
}
