undefined4
PeerAuthSanity(undefined4 param_1,int param_2,undefined4 param_3,void *param_4,short *param_5,
              short *param_6,void *param_7,void *param_8)

{
  short sVar1;
  char *pcVar2;
  
  memcpy(param_4,(void *)(param_2 + 10),6)   //possible issue identified - semgrep
  memmove(param_5,(void *)(param_2 + 0x18),2)   //possible issue identified - semgrep
  memmove(param_6,(void *)(param_2 + 0x1a),2)   //possible issue identified - semgrep
  memmove(param_7,(void *)(param_2 + 0x1c),2)   //possible issue identified - semgrep
  if (*param_5 == 0) {
    if ((ushort)(*param_6 - 1U) < 2) {
      return 1;
    }
  }
  else {
    if (*param_5 != 1) {
      if (RTDebugLevel < 3) {
        return 0;
      }
      pcVar2 = "PeerAuthSanity fail - wrong algorithm\n";
      goto LAB_000325c8;
    }
    sVar1 = *param_6;
    if (sVar1 == 1) {
      return 1;
    }
    if (sVar1 == 4) {
      return 1;
    }
    if ((ushort)(sVar1 - 2U) < 2) {
      memmove(param_8,(void *)(param_2 + 0x20),0x80)   //possible issue identified - semgrep
      return 1;
    }
  }
  if (RTDebugLevel < 3) {
    return 0;
  }
  pcVar2 = "PeerAuthSanity fail - wrong Seg#\n";
LAB_000325c8:
  printk(pcVar2);
  return 0;
}