function keypad_slot_20() /* entry=384 class_id=0x0A0E slot=0x20 */
{
  var
    referent, /* [BP+00h] type=0x69 */
    valueBox, /* [BP-02h] type=0x24 */
    boxesInArea, /* [BP-04h] type=0x69 */
    linkedWithSwitch, /* [BP-05h] type=0x62 */
    wrongCode, /* [BP-06h] type=0x62 */
    userInput, /* [BP-08h] type=0x69 */
    boxPasscode, /* [BP-0Ah] type=0x69 */
    keycode; /* [BP-0Ch] type=0x69 */

  set_info(0x0207, *(arg_06));
  wrongCode = 0;
  userInput = 0;
  /* loopscr value_u8=0x24 */
  /* loopscr value_u8=0x3D */
  /* loopscr value_u8=0x40 */
  /* loopscr value_u8=0x25 */
  /* loop current_var=0xFE string_bytes=0x6 loop_type=0x2 */
  while (!condition) {
    if (Item.getQLo(valueBox) == Item.getQLo(arg_06)) {
      class_0A19_slot_20(valueBox);
      boxPasscode = retval;
      if (boxPasscode <= 0x03E7) {
        return;
      }
    }
    /* loopnext  */
  }
  if ((Item.getStatus(arg_06) & 0x1000) == 0) {
    keycode = KeypadGump.showKeypad(boxPasscode);
    if (keycode == -1) {
      /* bit_not  */
      return;
    }
    else if (keycode == boxPasscode) {
      spawn class_0A0C_slot_32(pid, 60, 0x00000000);
      suspend;
      spawn class_0A18_slot_20(pid, 0, *(arg_06), arg_06);
      suspend;
    }
    else {
      spawn class_0A18_slot_20(pid, 1, *(arg_06), arg_06);
      suspend;
      spawn class_0A0C_slot_32(pid, 60, 0x00000000);
      suspend;
      if (World.getAlertActive()) {
        spawn class_0A0C_slot_3B(0x00000000);
      }
    }
    /* bit_not  */
  }
  return;
}
