/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

bool compatible_revision(char *param_1,byte param_2,int param_3)

{
  int __fd;
  int *piVar1;
  char *pcVar2;
  int iVar3;
  FILE *__stream;
  char *__format;
  uint uVar4;
  socklen_t local_48;
  char acStack_44 [29];
  byte local_27;
  
  local_48 = 0x1e;
  uVar4 = (uint)param_2;
  __fd = socket((uint)*(byte *)(afinfo + 8),3,0xff);
  if (__fd < 0) {
    piVar1 = __errno_location();
    __stream = _stderr;
    if (*piVar1 != 1) {
      pcVar2 = strerror(*piVar1);
      __format = (char *)0x58d0;
LAB_00012ed8:
      fprintf(__stream,__format,pcVar2)   //possible issue identified - semgrep
                    /* WARNING: Subroutine does not return */
      exit(1);
    }
    if (uVar4 == 0) {
      return true;
    }
    fprintf(_stderr,(char *)0x5888,uVar4)   //possible issue identified - semgrep
  }
  else {
    xtables_load_ko(xtables_modprobe_program,1);
    strcpy(acStack_44,param_1)   //possible issue identified - semgrep
    local_27 = param_2;
    iVar3 = getsockopt(__fd,(uint)*(byte *)(afinfo + 9),param_3,acStack_44,&local_48);
    if (iVar3 < 0) {
      piVar1 = __errno_location();
      __stream = _stderr;
      iVar3 = *piVar1;
      if ((iVar3 == 2) || (iVar3 == 0x5d)) {
        close(__fd);
        return false;
      }
      if (iVar3 == 0x5c) {
        close(__fd);
        return uVar4 == 0;
      }
      pcVar2 = strerror(iVar3);
      __format = (char *)0x58f8;
      goto LAB_00012ed8;
    }
    close(__fd);
  }
  return true;
}