function surcamns_slot_22() /* entry=269 class_id=0x04C6 slot=0x22 */
{
  var
    referent, /* [BP+00h] type=0x69 */
    eventTrigger, /* [BP+0Ah] type=0x24 */
    n, /* [BP-02h] type=0x24 */
    foundGun; /* [BP-03h] type=0x62 */

  set_info(0x00F0, 0);
  /* loopscr value_u8=0x24 */
  /* loopscr value_u8=0x42 */
  /* loop current_var=0xFE string_bytes=0x6 loop_type=0x2 */
  while (!condition) {
    if (!Actor.isNPC(n)) {
      foundGun = 1;
    }
    /* loopnext  */
  }
  /* global_address global_id=0x3C */
  spawn class_0A0C_slot_32(pid, 10, 0x00000000);
  suspend;
  if (!foundGun) {
    while (getTargetNPCNumMaybe() == 1) {
      spawn class_0A0C_slot_32(pid, 5, 0x00000000);
      suspend;
    }
  }
  else {
    spawn class_0A0C_slot_32(pid, 0x00C8, 0x00000000);
    suspend;
  }
  /* global_address global_id=0x3C */
  /* global_address global_id=0x3C */
  /* global_address global_id=0x3C */
  /* global_address global_id=0x3C */
  return;
}
