
/* WARNING: Unknown calling convention */

ps_index_t bgp_getindex(void)

{
  ps_index_t pVar1;
  int iVar2;
  ps_index_t *ppVar3;
  pidstat *ppVar4;
  ulong uVar5;
  pidstat *ppVar6;
  int iVar7;
  int iVar8;
  
  pVar1 = bgpids.nalloc;
  iVar8 = (int)js.c_childmax;
  uVar5 = js.c_childmax & 0xffffffff;
  iVar7 = bgpids.nalloc;
  if ((iVar8 <= bgpids.nalloc) && (bgpids.head < bgpids.nalloc)) goto LAB_00154382;
  if (bgpids.nalloc == 0) {
    ppVar3 = pidstat_table;
    do {
      *ppVar3 = -1;
      ppVar3 = ppVar3 + 1;
    } while (ppVar3 != (ps_index_t *)&ifs_firstc);
    bgpids.head = 0;
    if (iVar8 < 0) {
      uVar5 = 0x8000;
      iVar7 = 0x200;
LAB_0015433a:
      do {
        iVar8 = (int)uVar5;
        iVar7 = iVar7 * 2;
        if (iVar7 < 1) break;
      } while (iVar7 < iVar8);
      goto LAB_00154344;
    }
    iVar7 = 0x200;
    iVar2 = 0x7fffffff;
    if (0x200 < iVar8) goto LAB_0015433a;
  }
  else {
    if (iVar8 < 0) {
      uVar5 = 0x8000;
    }
    iVar8 = (int)uVar5;
    if ((0 < bgpids.nalloc) && (bgpids.nalloc < iVar8)) goto LAB_0015433a;
LAB_00154344:
    iVar2 = (-(uint)(iVar7 - 1U < 0x8000) & 0x7fff7fff) + 0x8000;
    if (0x7fff < iVar7 - 1U) {
      iVar7 = 0x8000;
    }
  }
  if (iVar8 < iVar2) {
    iVar2 = iVar8;
  }
  if (pVar1 < iVar2) {
    bgpids.storage = (pidstat *)xrealloc(bgpids.storage,(long)iVar7 << 4);
    if (bgpids.nalloc < iVar7) {
      ppVar6 = bgpids.storage + bgpids.nalloc;
      ppVar4 = bgpids.storage + (long)bgpids.nalloc + 1 + (ulong)(uint)(~bgpids.nalloc + iVar7);
      do {
        ppVar6->pid = -1;
        ppVar6 = ppVar6 + 1;
      } while (ppVar6 != ppVar4);
    }
  }
  else {
    iVar7 = bgpids.nalloc;
    if (pVar1 <= bgpids.head) {
      bgpids.head = 0;
    }
  }
LAB_00154382:
  bgpids.nalloc = iVar7;
  pshash_delindex(bgpids.head);
  pVar1 = bgpids.head;
  bgpids.head = bgpids.head + 1;
  return pVar1;
}



void FUN_001542bf(void)

{
  uint uVar1;
  int iVar2;
  undefined4 *puVar3;
  long lVar4;
  ulong uVar5;
  long lVar6;
  uint uVar7;
  int iVar8;
  
  uVar1 = DAT_0021463c;
  iVar8 = (int)js;
  uVar5 = js & 0xffffffff;
  uVar7 = DAT_0021463c;
  if ((iVar8 <= (int)DAT_0021463c) && (DAT_00214638 < (int)DAT_0021463c)) goto LAB_00154382;
  if (DAT_0021463c == 0) {
    puVar3 = &pidstat_table;
    do {
      *puVar3 = 0xffffffff;
      puVar3 = puVar3 + 1;
    } while (puVar3 != (undefined4 *)&ifs_firstc);
    DAT_00214638 = 0;
    if (iVar8 < 0) {
      uVar5 = 0x8000;
      uVar7 = 0x200;
LAB_0015433a:
      do {
        iVar8 = (int)uVar5;
        uVar7 = uVar7 * 2;
        if ((int)uVar7 < 1) break;
      } while ((int)uVar7 < iVar8);
      goto LAB_00154344;
    }
    uVar7 = 0x200;
    iVar2 = 0x7fffffff;
    if (0x200 < iVar8) goto LAB_0015433a;
  }
  else {
    if (iVar8 < 0) {
      uVar5 = 0x8000;
    }
    iVar8 = (int)uVar5;
    if ((0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8)) goto LAB_0015433a;
LAB_00154344:
    iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000;
    if (0x7fff < uVar7 - 1) {
      uVar7 = 0x8000;
    }
  }
  if (iVar8 < iVar2) {
    iVar2 = iVar8;
  }
  if ((int)uVar1 < iVar2) {
    bgpids = xrealloc(bgpids,(long)(int)uVar7 << 4);
    if ((int)DAT_0021463c < (int)uVar7) {
      lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids;
      lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10;
      do {
        *(undefined4 *)(lVar6 + 8) = 0xffffffff;
        lVar6 = lVar6 + 0x10;
      } while (lVar6 != lVar4);
    }
  }
  else {
    uVar7 = DAT_0021463c;
    if ((int)uVar1 <= DAT_00214638) {
      DAT_00214638 = 0;
    }
  }
LAB_00154382:
  DAT_0021463c = uVar7;
  FUN_00153be4(DAT_00214638);
  DAT_00214638 = DAT_00214638 + 1;
  return;
}


PUSH RBX
MOV EDX,dword ptr [0x0021463c]
MOV RSI,qword ptr [0x0020ae40]
MOV ECX,ESI
CMP EDX,ESI
JL 0x001542df
CMP EDX,dword ptr [0x00214638]
JG 0x00154382
TEST EDX,EDX
JNZ 0x00154326
LEA RAX,[0x217c00]
LEA RDI,[RAX + 0x4000]
MOV dword ptr [RAX],0xffffffff
ADD RAX,0x4
CMP RAX,RDI
JNZ 0x001542f1
MOV dword ptr [0x00214638],0x0
TEST ESI,ESI
JS 0x0015439e
MOV EBX,0x200
MOV EAX,0x7fffffff
CMP ESI,0x200
JG 0x0015433a
JMP 0x00154367
TEST ESI,ESI
MOV EAX,0x8000
CMOVS ECX,EAX
TEST EDX,EDX
JLE 0x001543aa
MOV EBX,EDX
CMP EDX,ECX
JGE 0x001543aa
ADD EBX,EBX
TEST EBX,EBX
JLE 0x00154344
CMP ECX,EBX
JG 0x0015433a
LEA ESI,[RBX + -0x1]
CMP ESI,0x8000
SBB EAX,EAX
AND EAX,0x7fff7fff
ADD EAX,0x8000
CMP ESI,0x8000
MOV ESI,0x8000
CMOVNC EBX,ESI
CMP EAX,ECX
CMOVG EAX,ECX
CMP EDX,EAX
JL 0x001543ae
CMP EDX,dword ptr [0x00214638]
JG 0x00154382
MOV dword ptr [0x00214638],0x0
MOV EDI,dword ptr [0x00214638]
CALL 0x00153be4
MOV EAX,dword ptr [0x00214638]
LEA EDX,[RAX + 0x1]
MOV dword ptr [0x00214638],EDX
POP RBX
RET
MOV ECX,0x8000
MOV EBX,0x200
JMP 0x0015433a
MOV EBX,EDX
JMP 0x00154344
MOVSXD RSI,EBX
SHL RSI,0x4
MOV RDI,qword ptr [0x00214630]
CALL 0x001881a0
MOV qword ptr [0x00214630],RAX
MOV ECX,dword ptr [0x0021463c]
CMP EBX,ECX
JLE 0x00154400
MOVSXD RSI,ECX
MOV RDX,RSI
SHL RDX,0x4
ADD RDX,RAX
NOT ECX
LEA ECX,[RCX + RBX*0x1]
LEA RCX,[RSI + RCX*0x1 + 0x1]
SHL RCX,0x4
ADD RAX,RCX
MOV dword ptr [RDX + 0x8],0xffffffff
ADD RDX,0x10
CMP RDX,RAX
JNZ 0x001543f0
MOV dword ptr [0x0021463c],EBX
JMP 0x00154382
(translation_unit "void FUN_001542bf(void)\n\n{\n  uint uVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  long lVar4;\n  ulong uVar5;\n  long lVar6;\n  uint uVar7;\n  int iVar8;\n  \n  uVar1 = DAT_0021463c;\n  iVar8 = (int)js;\n  uVar5 = js & 0xffffffff;\n  uVar7 = DAT_0021463c;\n  if ((iVar8 <= (int)DAT_0021463c) && (DAT_00214638 < (int)DAT_0021463c)) goto LAB_00154382;\n  if (DAT_0021463c == 0) {\n    puVar3 = &pidstat_table;\n    do {\n      *puVar3 = 0xffffffff;\n      puVar3 = puVar3 + 1;\n    } while (puVar3 != (undefined4 *)&ifs_firstc);\n    DAT_00214638 = 0;\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n      uVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      } while ((int)uVar7 < iVar8);\n      goto LAB_00154344;\n    }\n    uVar7 = 0x200;\n    iVar2 = 0x7fffffff;\n    if (0x200 < iVar8) goto LAB_0015433a;\n  }\n  else {\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }\n    iVar8 = (int)uVar5;\n    if ((0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8)) goto LAB_0015433a;\nLAB_00154344:\n    iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000;\n    if (0x7fff < uVar7 - 1) {\n      uVar7 = 0x8000;\n    }\n  }\n  if (iVar8 < iVar2) {\n    iVar2 = iVar8;\n  }\n  if ((int)uVar1 < iVar2) {\n    bgpids = xrealloc(bgpids,(long)(int)uVar7 << 4);\n    if ((int)DAT_0021463c < (int)uVar7) {\n      lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids;\n      lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10;\n      do {\n        *(undefined4 *)(lVar6 + 8) = 0xffffffff;\n        lVar6 = lVar6 + 0x10;\n      } while (lVar6 != lVar4);\n    }\n  }\n  else {\n    uVar7 = DAT_0021463c;\n    if ((int)uVar1 <= DAT_00214638) {\n      DAT_00214638 = 0;\n    }\n  }\nLAB_00154382:\n  DAT_0021463c = uVar7;\n  FUN_00153be4(DAT_00214638);\n  DAT_00214638 = DAT_00214638 + 1;\n  return;\n}\n\n" (function_definition "void FUN_001542bf(void)\n\n{\n  uint uVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  long lVar4;\n  ulong uVar5;\n  long lVar6;\n  uint uVar7;\n  int iVar8;\n  \n  uVar1 = DAT_0021463c;\n  iVar8 = (int)js;\n  uVar5 = js & 0xffffffff;\n  uVar7 = DAT_0021463c;\n  if ((iVar8 <= (int)DAT_0021463c) && (DAT_00214638 < (int)DAT_0021463c)) goto LAB_00154382;\n  if (DAT_0021463c == 0) {\n    puVar3 = &pidstat_table;\n    do {\n      *puVar3 = 0xffffffff;\n      puVar3 = puVar3 + 1;\n    } while (puVar3 != (undefined4 *)&ifs_firstc);\n    DAT_00214638 = 0;\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n      uVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      } while ((int)uVar7 < iVar8);\n      goto LAB_00154344;\n    }\n    uVar7 = 0x200;\n    iVar2 = 0x7fffffff;\n    if (0x200 < iVar8) goto LAB_0015433a;\n  }\n  else {\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }\n    iVar8 = (int)uVar5;\n    if ((0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8)) goto LAB_0015433a;\nLAB_00154344:\n    iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000;\n    if (0x7fff < uVar7 - 1) {\n      uVar7 = 0x8000;\n    }\n  }\n  if (iVar8 < iVar2) {\n    iVar2 = iVar8;\n  }\n  if ((int)uVar1 < iVar2) {\n    bgpids = xrealloc(bgpids,(long)(int)uVar7 << 4);\n    if ((int)DAT_0021463c < (int)uVar7) {\n      lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids;\n      lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10;\n      do {\n        *(undefined4 *)(lVar6 + 8) = 0xffffffff;\n        lVar6 = lVar6 + 0x10;\n      } while (lVar6 != lVar4);\n    }\n  }\n  else {\n    uVar7 = DAT_0021463c;\n    if ((int)uVar1 <= DAT_00214638) {\n      DAT_00214638 = 0;\n    }\n  }\nLAB_00154382:\n  DAT_0021463c = uVar7;\n  FUN_00153be4(DAT_00214638);\n  DAT_00214638 = DAT_00214638 + 1;\n  return;\n}" primitive_type (function_declarator "FUN_001542bf(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  long lVar4;\n  ulong uVar5;\n  long lVar6;\n  uint uVar7;\n  int iVar8;\n  \n  uVar1 = DAT_0021463c;\n  iVar8 = (int)js;\n  uVar5 = js & 0xffffffff;\n  uVar7 = DAT_0021463c;\n  if ((iVar8 <= (int)DAT_0021463c) && (DAT_00214638 < (int)DAT_0021463c)) goto LAB_00154382;\n  if (DAT_0021463c == 0) {\n    puVar3 = &pidstat_table;\n    do {\n      *puVar3 = 0xffffffff;\n      puVar3 = puVar3 + 1;\n    } while (puVar3 != (undefined4 *)&ifs_firstc);\n    DAT_00214638 = 0;\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n      uVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      } while ((int)uVar7 < iVar8);\n      goto LAB_00154344;\n    }\n    uVar7 = 0x200;\n    iVar2 = 0x7fffffff;\n    if (0x200 < iVar8) goto LAB_0015433a;\n  }\n  else {\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }\n    iVar8 = (int)uVar5;\n    if ((0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8)) goto LAB_0015433a;\nLAB_00154344:\n    iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000;\n    if (0x7fff < uVar7 - 1) {\n      uVar7 = 0x8000;\n    }\n  }\n  if (iVar8 < iVar2) {\n    iVar2 = iVar8;\n  }\n  if ((int)uVar1 < iVar2) {\n    bgpids = xrealloc(bgpids,(long)(int)uVar7 << 4);\n    if ((int)DAT_0021463c < (int)uVar7) {\n      lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids;\n      lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10;\n      do {\n        *(undefined4 *)(lVar6 + 8) = 0xffffffff;\n        lVar6 = lVar6 + 0x10;\n      } while (lVar6 != lVar4);\n    }\n  }\n  else {\n    uVar7 = DAT_0021463c;\n    if ((int)uVar1 <= DAT_00214638) {\n      DAT_00214638 = 0;\n    }\n  }\nLAB_00154382:\n  DAT_0021463c = uVar7;\n  FUN_00153be4(DAT_00214638);\n  DAT_00214638 = DAT_00214638 + 1;\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "long lVar4;" (sized_type_specifier "long" long) identifier ;) (declaration "ulong uVar5;" type_identifier identifier ;) (declaration "long lVar6;" (sized_type_specifier "long" long) identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (expression_statement "uVar1 = DAT_0021463c;" (assignment_expression "uVar1 = DAT_0021463c" identifier = identifier) ;) (expression_statement "iVar8 = (int)js;" (assignment_expression "iVar8 = (int)js" identifier = (cast_expression "(int)js" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "uVar5 = js & 0xffffffff;" (assignment_expression "uVar5 = js & 0xffffffff" identifier = (binary_expression "js & 0xffffffff" identifier & number_literal)) ;) (expression_statement "uVar7 = DAT_0021463c;" (assignment_expression "uVar7 = DAT_0021463c" identifier = identifier) ;) (if_statement "if ((iVar8 <= (int)DAT_0021463c) && (DAT_00214638 < (int)DAT_0021463c)) goto LAB_00154382;" if (parenthesized_expression "((iVar8 <= (int)DAT_0021463c) && (DAT_00214638 < (int)DAT_0021463c))" ( (binary_expression "(iVar8 <= (int)DAT_0021463c) && (DAT_00214638 < (int)DAT_0021463c)" (parenthesized_expression "(iVar8 <= (int)DAT_0021463c)" ( (binary_expression "iVar8 <= (int)DAT_0021463c" identifier <= (cast_expression "(int)DAT_0021463c" ( (type_descriptor "int" primitive_type) ) identifier)) )) && (parenthesized_expression "(DAT_00214638 < (int)DAT_0021463c)" ( (binary_expression "DAT_00214638 < (int)DAT_0021463c" identifier < (cast_expression "(int)DAT_0021463c" ( (type_descriptor "int" primitive_type) ) identifier)) ))) )) (goto_statement "goto LAB_00154382;" goto statement_identifier ;)) (if_statement "if (DAT_0021463c == 0) {\n    puVar3 = &pidstat_table;\n    do {\n      *puVar3 = 0xffffffff;\n      puVar3 = puVar3 + 1;\n    } while (puVar3 != (undefined4 *)&ifs_firstc);\n    DAT_00214638 = 0;\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n      uVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      } while ((int)uVar7 < iVar8);\n      goto LAB_00154344;\n    }\n    uVar7 = 0x200;\n    iVar2 = 0x7fffffff;\n    if (0x200 < iVar8) goto LAB_0015433a;\n  }\n  else {\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }\n    iVar8 = (int)uVar5;\n    if ((0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8)) goto LAB_0015433a;\nLAB_00154344:\n    iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000;\n    if (0x7fff < uVar7 - 1) {\n      uVar7 = 0x8000;\n    }\n  }" if (parenthesized_expression "(DAT_0021463c == 0)" ( (binary_expression "DAT_0021463c == 0" identifier == number_literal) )) (compound_statement "{\n    puVar3 = &pidstat_table;\n    do {\n      *puVar3 = 0xffffffff;\n      puVar3 = puVar3 + 1;\n    } while (puVar3 != (undefined4 *)&ifs_firstc);\n    DAT_00214638 = 0;\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n      uVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      } while ((int)uVar7 < iVar8);\n      goto LAB_00154344;\n    }\n    uVar7 = 0x200;\n    iVar2 = 0x7fffffff;\n    if (0x200 < iVar8) goto LAB_0015433a;\n  }" { (expression_statement "puVar3 = &pidstat_table;" (assignment_expression "puVar3 = &pidstat_table" identifier = (pointer_expression "&pidstat_table" & identifier)) ;) (do_statement "do {\n      *puVar3 = 0xffffffff;\n      puVar3 = puVar3 + 1;\n    } while (puVar3 != (undefined4 *)&ifs_firstc);" do (compound_statement "{\n      *puVar3 = 0xffffffff;\n      puVar3 = puVar3 + 1;\n    }" { (expression_statement "*puVar3 = 0xffffffff;" (assignment_expression "*puVar3 = 0xffffffff" (pointer_expression "*puVar3" * identifier) = number_literal) ;) (expression_statement "puVar3 = puVar3 + 1;" (assignment_expression "puVar3 = puVar3 + 1" identifier = (binary_expression "puVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(puVar3 != (undefined4 *)&ifs_firstc)" ( (binary_expression "puVar3 != (undefined4 *)&ifs_firstc" identifier != (cast_expression "(undefined4 *)&ifs_firstc" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&ifs_firstc" & identifier))) )) ;) (expression_statement "DAT_00214638 = 0;" (assignment_expression "DAT_00214638 = 0" identifier = number_literal) ;) (if_statement "if (iVar8 < 0) {\n      uVar5 = 0x8000;\n      uVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      } while ((int)uVar7 < iVar8);\n      goto LAB_00154344;\n    }" if (parenthesized_expression "(iVar8 < 0)" ( (binary_expression "iVar8 < 0" identifier < number_literal) )) (compound_statement "{\n      uVar5 = 0x8000;\n      uVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      } while ((int)uVar7 < iVar8);\n      goto LAB_00154344;\n    }" { (expression_statement "uVar5 = 0x8000;" (assignment_expression "uVar5 = 0x8000" identifier = number_literal) ;) (expression_statement "uVar7 = 0x200;" (assignment_expression "uVar7 = 0x200" identifier = number_literal) ;) (labeled_statement "LAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      } while ((int)uVar7 < iVar8);" statement_identifier : (do_statement "do {\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      } while ((int)uVar7 < iVar8);" do (compound_statement "{\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      }" { (expression_statement "iVar8 = (int)uVar5;" (assignment_expression "iVar8 = (int)uVar5" identifier = (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "uVar7 = uVar7 * 2;" (assignment_expression "uVar7 = uVar7 * 2" identifier = (binary_expression "uVar7 * 2" identifier * number_literal)) ;) (if_statement "if ((int)uVar7 < 1) break;" if (parenthesized_expression "((int)uVar7 < 1)" ( (binary_expression "(int)uVar7 < 1" (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "((int)uVar7 < iVar8)" ( (binary_expression "(int)uVar7 < iVar8" (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier) < identifier) )) ;)) (goto_statement "goto LAB_00154344;" goto statement_identifier ;) })) (expression_statement "uVar7 = 0x200;" (assignment_expression "uVar7 = 0x200" identifier = number_literal) ;) (expression_statement "iVar2 = 0x7fffffff;" (assignment_expression "iVar2 = 0x7fffffff" identifier = number_literal) ;) (if_statement "if (0x200 < iVar8) goto LAB_0015433a;" if (parenthesized_expression "(0x200 < iVar8)" ( (binary_expression "0x200 < iVar8" number_literal < identifier) )) (goto_statement "goto LAB_0015433a;" goto statement_identifier ;)) }) (else_clause "else {\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }\n    iVar8 = (int)uVar5;\n    if ((0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8)) goto LAB_0015433a;\nLAB_00154344:\n    iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000;\n    if (0x7fff < uVar7 - 1) {\n      uVar7 = 0x8000;\n    }\n  }" else (compound_statement "{\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }\n    iVar8 = (int)uVar5;\n    if ((0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8)) goto LAB_0015433a;\nLAB_00154344:\n    iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000;\n    if (0x7fff < uVar7 - 1) {\n      uVar7 = 0x8000;\n    }\n  }" { (if_statement "if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }" if (parenthesized_expression "(iVar8 < 0)" ( (binary_expression "iVar8 < 0" identifier < number_literal) )) (compound_statement "{\n      uVar5 = 0x8000;\n    }" { (expression_statement "uVar5 = 0x8000;" (assignment_expression "uVar5 = 0x8000" identifier = number_literal) ;) })) (expression_statement "iVar8 = (int)uVar5;" (assignment_expression "iVar8 = (int)uVar5" identifier = (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if ((0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8)) goto LAB_0015433a;" if (parenthesized_expression "((0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8))" ( (binary_expression "(0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8)" (parenthesized_expression "(0 < (int)DAT_0021463c)" ( (binary_expression "0 < (int)DAT_0021463c" number_literal < (cast_expression "(int)DAT_0021463c" ( (type_descriptor "int" primitive_type) ) identifier)) )) && (parenthesized_expression "((int)DAT_0021463c < iVar8)" ( (binary_expression "(int)DAT_0021463c < iVar8" (cast_expression "(int)DAT_0021463c" ( (type_descriptor "int" primitive_type) ) identifier) < identifier) ))) )) (goto_statement "goto LAB_0015433a;" goto statement_identifier ;)) (labeled_statement "LAB_00154344:\n    iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000;" statement_identifier : (expression_statement "iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000;" (assignment_expression "iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000" identifier = (binary_expression "(-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000" (parenthesized_expression "(-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff)" ( (binary_expression "-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff" (unary_expression "-(uint)(uVar7 - 1 < 0x8000)" - (call_expression "(uint)(uVar7 - 1 < 0x8000)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar7 - 1 < 0x8000)" ( (binary_expression "uVar7 - 1 < 0x8000" (binary_expression "uVar7 - 1" identifier - number_literal) < number_literal) )))) & number_literal) )) + number_literal)) ;)) (if_statement "if (0x7fff < uVar7 - 1) {\n      uVar7 = 0x8000;\n    }" if (parenthesized_expression "(0x7fff < uVar7 - 1)" ( (binary_expression "0x7fff < uVar7 - 1" number_literal < (binary_expression "uVar7 - 1" identifier - number_literal)) )) (compound_statement "{\n      uVar7 = 0x8000;\n    }" { (expression_statement "uVar7 = 0x8000;" (assignment_expression "uVar7 = 0x8000" identifier = number_literal) ;) })) }))) (if_statement "if (iVar8 < iVar2) {\n    iVar2 = iVar8;\n  }" if (parenthesized_expression "(iVar8 < iVar2)" ( (binary_expression "iVar8 < iVar2" identifier < identifier) )) (compound_statement "{\n    iVar2 = iVar8;\n  }" { (expression_statement "iVar2 = iVar8;" (assignment_expression "iVar2 = iVar8" identifier = identifier) ;) })) (if_statement "if ((int)uVar1 < iVar2) {\n    bgpids = xrealloc(bgpids,(long)(int)uVar7 << 4);\n    if ((int)DAT_0021463c < (int)uVar7) {\n      lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids;\n      lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10;\n      do {\n        *(undefined4 *)(lVar6 + 8) = 0xffffffff;\n        lVar6 = lVar6 + 0x10;\n      } while (lVar6 != lVar4);\n    }\n  }\n  else {\n    uVar7 = DAT_0021463c;\n    if ((int)uVar1 <= DAT_00214638) {\n      DAT_00214638 = 0;\n    }\n  }" if (parenthesized_expression "((int)uVar1 < iVar2)" ( (binary_expression "(int)uVar1 < iVar2" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) < identifier) )) (compound_statement "{\n    bgpids = xrealloc(bgpids,(long)(int)uVar7 << 4);\n    if ((int)DAT_0021463c < (int)uVar7) {\n      lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids;\n      lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10;\n      do {\n        *(undefined4 *)(lVar6 + 8) = 0xffffffff;\n        lVar6 = lVar6 + 0x10;\n      } while (lVar6 != lVar4);\n    }\n  }" { (expression_statement "bgpids = xrealloc(bgpids,(long)(int)uVar7 << 4);" (assignment_expression "bgpids = xrealloc(bgpids,(long)(int)uVar7 << 4)" identifier = (call_expression "xrealloc(bgpids,(long)(int)uVar7 << 4)" identifier (argument_list "(bgpids,(long)(int)uVar7 << 4)" ( identifier , (binary_expression "(long)(int)uVar7 << 4" (cast_expression "(long)(int)uVar7" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier)) << number_literal) )))) ;) (if_statement "if ((int)DAT_0021463c < (int)uVar7) {\n      lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids;\n      lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10;\n      do {\n        *(undefined4 *)(lVar6 + 8) = 0xffffffff;\n        lVar6 = lVar6 + 0x10;\n      } while (lVar6 != lVar4);\n    }" if (parenthesized_expression "((int)DAT_0021463c < (int)uVar7)" ( (binary_expression "(int)DAT_0021463c < (int)uVar7" (cast_expression "(int)DAT_0021463c" ( (type_descriptor "int" primitive_type) ) identifier) < (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids;\n      lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10;\n      do {\n        *(undefined4 *)(lVar6 + 8) = 0xffffffff;\n        lVar6 = lVar6 + 0x10;\n      } while (lVar6 != lVar4);\n    }" { (expression_statement "lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids;" (assignment_expression "lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids" identifier = (binary_expression "(long)(int)DAT_0021463c * 0x10 + bgpids" (binary_expression "(long)(int)DAT_0021463c * 0x10" (cast_expression "(long)(int)DAT_0021463c" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)DAT_0021463c" ( (type_descriptor "int" primitive_type) ) identifier)) * number_literal) + identifier)) ;) (expression_statement "lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10;" (assignment_expression "lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10" identifier = (binary_expression "bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10" identifier + (binary_expression "((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10" (parenthesized_expression "((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7))" ( (binary_expression "(long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)" (binary_expression "(long)(int)DAT_0021463c + 1" (cast_expression "(long)(int)DAT_0021463c" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)DAT_0021463c" ( (type_descriptor "int" primitive_type) ) identifier)) + number_literal) + (call_expression "(ulong)(~DAT_0021463c + uVar7)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(~DAT_0021463c + uVar7)" ( (binary_expression "~DAT_0021463c + uVar7" (unary_expression "~DAT_0021463c" ~ identifier) + identifier) )))) )) * number_literal))) ;) (do_statement "do {\n        *(undefined4 *)(lVar6 + 8) = 0xffffffff;\n        lVar6 = lVar6 + 0x10;\n      } while (lVar6 != lVar4);" do (compound_statement "{\n        *(undefined4 *)(lVar6 + 8) = 0xffffffff;\n        lVar6 = lVar6 + 0x10;\n      }" { (expression_statement "*(undefined4 *)(lVar6 + 8) = 0xffffffff;" (assignment_expression "*(undefined4 *)(lVar6 + 8) = 0xffffffff" (pointer_expression "*(undefined4 *)(lVar6 + 8)" * (cast_expression "(undefined4 *)(lVar6 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar6 + 8)" ( (binary_expression "lVar6 + 8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "lVar6 = lVar6 + 0x10;" (assignment_expression "lVar6 = lVar6 + 0x10" identifier = (binary_expression "lVar6 + 0x10" identifier + number_literal)) ;) }) while (parenthesized_expression "(lVar6 != lVar4)" ( (binary_expression "lVar6 != lVar4" identifier != identifier) )) ;) })) }) (else_clause "else {\n    uVar7 = DAT_0021463c;\n    if ((int)uVar1 <= DAT_00214638) {\n      DAT_00214638 = 0;\n    }\n  }" else (compound_statement "{\n    uVar7 = DAT_0021463c;\n    if ((int)uVar1 <= DAT_00214638) {\n      DAT_00214638 = 0;\n    }\n  }" { (expression_statement "uVar7 = DAT_0021463c;" (assignment_expression "uVar7 = DAT_0021463c" identifier = identifier) ;) (if_statement "if ((int)uVar1 <= DAT_00214638) {\n      DAT_00214638 = 0;\n    }" if (parenthesized_expression "((int)uVar1 <= DAT_00214638)" ( (binary_expression "(int)uVar1 <= DAT_00214638" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) <= identifier) )) (compound_statement "{\n      DAT_00214638 = 0;\n    }" { (expression_statement "DAT_00214638 = 0;" (assignment_expression "DAT_00214638 = 0" identifier = number_literal) ;) })) }))) (labeled_statement "LAB_00154382:\n  DAT_0021463c = uVar7;" statement_identifier : (expression_statement "DAT_0021463c = uVar7;" (assignment_expression "DAT_0021463c = uVar7" identifier = identifier) ;)) (expression_statement "FUN_00153be4(DAT_00214638);" (call_expression "FUN_00153be4(DAT_00214638)" identifier (argument_list "(DAT_00214638)" ( identifier ))) ;) (expression_statement "DAT_00214638 = DAT_00214638 + 1;" (assignment_expression "DAT_00214638 = DAT_00214638 + 1" identifier = (binary_expression "DAT_00214638 + 1" identifier + number_literal)) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nps_index_t bgp_getindex(void)\n\n{\n  ps_index_t pVar1;\n  int iVar2;\n  ps_index_t *ppVar3;\n  pidstat *ppVar4;\n  ulong uVar5;\n  pidstat *ppVar6;\n  int iVar7;\n  int iVar8;\n  \n  pVar1 = bgpids.nalloc;\n  iVar8 = (int)js.c_childmax;\n  uVar5 = js.c_childmax & 0xffffffff;\n  iVar7 = bgpids.nalloc;\n  if ((iVar8 <= bgpids.nalloc) && (bgpids.head < bgpids.nalloc)) goto LAB_00154382;\n  if (bgpids.nalloc == 0) {\n    ppVar3 = pidstat_table;\n    do {\n      *ppVar3 = -1;\n      ppVar3 = ppVar3 + 1;\n    } while (ppVar3 != (ps_index_t *)&ifs_firstc);\n    bgpids.head = 0;\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n      iVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        iVar7 = iVar7 * 2;\n        if (iVar7 < 1) break;\n      } while (iVar7 < iVar8);\n      goto LAB_00154344;\n    }\n    iVar7 = 0x200;\n    iVar2 = 0x7fffffff;\n    if (0x200 < iVar8) goto LAB_0015433a;\n  }\n  else {\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }\n    iVar8 = (int)uVar5;\n    if ((0 < bgpids.nalloc) && (bgpids.nalloc < iVar8)) goto LAB_0015433a;\nLAB_00154344:\n    iVar2 = (-(uint)(iVar7 - 1U < 0x8000) & 0x7fff7fff) + 0x8000;\n    if (0x7fff < iVar7 - 1U) {\n      iVar7 = 0x8000;\n    }\n  }\n  if (iVar8 < iVar2) {\n    iVar2 = iVar8;\n  }\n  if (pVar1 < iVar2) {\n    bgpids.storage = (pidstat *)xrealloc(bgpids.storage,(long)iVar7 << 4);\n    if (bgpids.nalloc < iVar7) {\n      ppVar6 = bgpids.storage + bgpids.nalloc;\n      ppVar4 = bgpids.storage + (long)bgpids.nalloc + 1 + (ulong)(uint)(~bgpids.nalloc + iVar7);\n      do {\n        ppVar6->pid = -1;\n        ppVar6 = ppVar6 + 1;\n      } while (ppVar6 != ppVar4);\n    }\n  }\n  else {\n    iVar7 = bgpids.nalloc;\n    if (pVar1 <= bgpids.head) {\n      bgpids.head = 0;\n    }\n  }\nLAB_00154382:\n  bgpids.nalloc = iVar7;\n  pshash_delindex(bgpids.head);\n  pVar1 = bgpids.head;\n  bgpids.head = bgpids.head + 1;\n  return pVar1;\n}\n\n" comment (function_definition "ps_index_t bgp_getindex(void)\n\n{\n  ps_index_t pVar1;\n  int iVar2;\n  ps_index_t *ppVar3;\n  pidstat *ppVar4;\n  ulong uVar5;\n  pidstat *ppVar6;\n  int iVar7;\n  int iVar8;\n  \n  pVar1 = bgpids.nalloc;\n  iVar8 = (int)js.c_childmax;\n  uVar5 = js.c_childmax & 0xffffffff;\n  iVar7 = bgpids.nalloc;\n  if ((iVar8 <= bgpids.nalloc) && (bgpids.head < bgpids.nalloc)) goto LAB_00154382;\n  if (bgpids.nalloc == 0) {\n    ppVar3 = pidstat_table;\n    do {\n      *ppVar3 = -1;\n      ppVar3 = ppVar3 + 1;\n    } while (ppVar3 != (ps_index_t *)&ifs_firstc);\n    bgpids.head = 0;\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n      iVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        iVar7 = iVar7 * 2;\n        if (iVar7 < 1) break;\n      } while (iVar7 < iVar8);\n      goto LAB_00154344;\n    }\n    iVar7 = 0x200;\n    iVar2 = 0x7fffffff;\n    if (0x200 < iVar8) goto LAB_0015433a;\n  }\n  else {\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }\n    iVar8 = (int)uVar5;\n    if ((0 < bgpids.nalloc) && (bgpids.nalloc < iVar8)) goto LAB_0015433a;\nLAB_00154344:\n    iVar2 = (-(uint)(iVar7 - 1U < 0x8000) & 0x7fff7fff) + 0x8000;\n    if (0x7fff < iVar7 - 1U) {\n      iVar7 = 0x8000;\n    }\n  }\n  if (iVar8 < iVar2) {\n    iVar2 = iVar8;\n  }\n  if (pVar1 < iVar2) {\n    bgpids.storage = (pidstat *)xrealloc(bgpids.storage,(long)iVar7 << 4);\n    if (bgpids.nalloc < iVar7) {\n      ppVar6 = bgpids.storage + bgpids.nalloc;\n      ppVar4 = bgpids.storage + (long)bgpids.nalloc + 1 + (ulong)(uint)(~bgpids.nalloc + iVar7);\n      do {\n        ppVar6->pid = -1;\n        ppVar6 = ppVar6 + 1;\n      } while (ppVar6 != ppVar4);\n    }\n  }\n  else {\n    iVar7 = bgpids.nalloc;\n    if (pVar1 <= bgpids.head) {\n      bgpids.head = 0;\n    }\n  }\nLAB_00154382:\n  bgpids.nalloc = iVar7;\n  pshash_delindex(bgpids.head);\n  pVar1 = bgpids.head;\n  bgpids.head = bgpids.head + 1;\n  return pVar1;\n}" type_identifier (function_declarator "bgp_getindex(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  ps_index_t pVar1;\n  int iVar2;\n  ps_index_t *ppVar3;\n  pidstat *ppVar4;\n  ulong uVar5;\n  pidstat *ppVar6;\n  int iVar7;\n  int iVar8;\n  \n  pVar1 = bgpids.nalloc;\n  iVar8 = (int)js.c_childmax;\n  uVar5 = js.c_childmax & 0xffffffff;\n  iVar7 = bgpids.nalloc;\n  if ((iVar8 <= bgpids.nalloc) && (bgpids.head < bgpids.nalloc)) goto LAB_00154382;\n  if (bgpids.nalloc == 0) {\n    ppVar3 = pidstat_table;\n    do {\n      *ppVar3 = -1;\n      ppVar3 = ppVar3 + 1;\n    } while (ppVar3 != (ps_index_t *)&ifs_firstc);\n    bgpids.head = 0;\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n      iVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        iVar7 = iVar7 * 2;\n        if (iVar7 < 1) break;\n      } while (iVar7 < iVar8);\n      goto LAB_00154344;\n    }\n    iVar7 = 0x200;\n    iVar2 = 0x7fffffff;\n    if (0x200 < iVar8) goto LAB_0015433a;\n  }\n  else {\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }\n    iVar8 = (int)uVar5;\n    if ((0 < bgpids.nalloc) && (bgpids.nalloc < iVar8)) goto LAB_0015433a;\nLAB_00154344:\n    iVar2 = (-(uint)(iVar7 - 1U < 0x8000) & 0x7fff7fff) + 0x8000;\n    if (0x7fff < iVar7 - 1U) {\n      iVar7 = 0x8000;\n    }\n  }\n  if (iVar8 < iVar2) {\n    iVar2 = iVar8;\n  }\n  if (pVar1 < iVar2) {\n    bgpids.storage = (pidstat *)xrealloc(bgpids.storage,(long)iVar7 << 4);\n    if (bgpids.nalloc < iVar7) {\n      ppVar6 = bgpids.storage + bgpids.nalloc;\n      ppVar4 = bgpids.storage + (long)bgpids.nalloc + 1 + (ulong)(uint)(~bgpids.nalloc + iVar7);\n      do {\n        ppVar6->pid = -1;\n        ppVar6 = ppVar6 + 1;\n      } while (ppVar6 != ppVar4);\n    }\n  }\n  else {\n    iVar7 = bgpids.nalloc;\n    if (pVar1 <= bgpids.head) {\n      bgpids.head = 0;\n    }\n  }\nLAB_00154382:\n  bgpids.nalloc = iVar7;\n  pshash_delindex(bgpids.head);\n  pVar1 = bgpids.head;\n  bgpids.head = bgpids.head + 1;\n  return pVar1;\n}" { (declaration "ps_index_t pVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "ps_index_t *ppVar3;" type_identifier (pointer_declarator "*ppVar3" * identifier) ;) (declaration "pidstat *ppVar4;" type_identifier (pointer_declarator "*ppVar4" * identifier) ;) (declaration "ulong uVar5;" type_identifier identifier ;) (declaration "pidstat *ppVar6;" type_identifier (pointer_declarator "*ppVar6" * identifier) ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (expression_statement "pVar1 = bgpids.nalloc;" (assignment_expression "pVar1 = bgpids.nalloc" identifier = (field_expression "bgpids.nalloc" identifier . field_identifier)) ;) (expression_statement "iVar8 = (int)js.c_childmax;" (assignment_expression "iVar8 = (int)js.c_childmax" identifier = (cast_expression "(int)js.c_childmax" ( (type_descriptor "int" primitive_type) ) (field_expression "js.c_childmax" identifier . field_identifier))) ;) (expression_statement "uVar5 = js.c_childmax & 0xffffffff;" (assignment_expression "uVar5 = js.c_childmax & 0xffffffff" identifier = (binary_expression "js.c_childmax & 0xffffffff" (field_expression "js.c_childmax" identifier . field_identifier) & number_literal)) ;) (expression_statement "iVar7 = bgpids.nalloc;" (assignment_expression "iVar7 = bgpids.nalloc" identifier = (field_expression "bgpids.nalloc" identifier . field_identifier)) ;) (if_statement "if ((iVar8 <= bgpids.nalloc) && (bgpids.head < bgpids.nalloc)) goto LAB_00154382;" if (parenthesized_expression "((iVar8 <= bgpids.nalloc) && (bgpids.head < bgpids.nalloc))" ( (binary_expression "(iVar8 <= bgpids.nalloc) && (bgpids.head < bgpids.nalloc)" (parenthesized_expression "(iVar8 <= bgpids.nalloc)" ( (binary_expression "iVar8 <= bgpids.nalloc" identifier <= (field_expression "bgpids.nalloc" identifier . field_identifier)) )) && (parenthesized_expression "(bgpids.head < bgpids.nalloc)" ( (binary_expression "bgpids.head < bgpids.nalloc" (field_expression "bgpids.head" identifier . field_identifier) < (field_expression "bgpids.nalloc" identifier . field_identifier)) ))) )) (goto_statement "goto LAB_00154382;" goto statement_identifier ;)) (if_statement "if (bgpids.nalloc == 0) {\n    ppVar3 = pidstat_table;\n    do {\n      *ppVar3 = -1;\n      ppVar3 = ppVar3 + 1;\n    } while (ppVar3 != (ps_index_t *)&ifs_firstc);\n    bgpids.head = 0;\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n      iVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        iVar7 = iVar7 * 2;\n        if (iVar7 < 1) break;\n      } while (iVar7 < iVar8);\n      goto LAB_00154344;\n    }\n    iVar7 = 0x200;\n    iVar2 = 0x7fffffff;\n    if (0x200 < iVar8) goto LAB_0015433a;\n  }\n  else {\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }\n    iVar8 = (int)uVar5;\n    if ((0 < bgpids.nalloc) && (bgpids.nalloc < iVar8)) goto LAB_0015433a;\nLAB_00154344:\n    iVar2 = (-(uint)(iVar7 - 1U < 0x8000) & 0x7fff7fff) + 0x8000;\n    if (0x7fff < iVar7 - 1U) {\n      iVar7 = 0x8000;\n    }\n  }" if (parenthesized_expression "(bgpids.nalloc == 0)" ( (binary_expression "bgpids.nalloc == 0" (field_expression "bgpids.nalloc" identifier . field_identifier) == number_literal) )) (compound_statement "{\n    ppVar3 = pidstat_table;\n    do {\n      *ppVar3 = -1;\n      ppVar3 = ppVar3 + 1;\n    } while (ppVar3 != (ps_index_t *)&ifs_firstc);\n    bgpids.head = 0;\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n      iVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        iVar7 = iVar7 * 2;\n        if (iVar7 < 1) break;\n      } while (iVar7 < iVar8);\n      goto LAB_00154344;\n    }\n    iVar7 = 0x200;\n    iVar2 = 0x7fffffff;\n    if (0x200 < iVar8) goto LAB_0015433a;\n  }" { (expression_statement "ppVar3 = pidstat_table;" (assignment_expression "ppVar3 = pidstat_table" identifier = identifier) ;) (do_statement "do {\n      *ppVar3 = -1;\n      ppVar3 = ppVar3 + 1;\n    } while (ppVar3 != (ps_index_t *)&ifs_firstc);" do (compound_statement "{\n      *ppVar3 = -1;\n      ppVar3 = ppVar3 + 1;\n    }" { (expression_statement "*ppVar3 = -1;" (assignment_expression "*ppVar3 = -1" (pointer_expression "*ppVar3" * identifier) = number_literal) ;) (expression_statement "ppVar3 = ppVar3 + 1;" (assignment_expression "ppVar3 = ppVar3 + 1" identifier = (binary_expression "ppVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(ppVar3 != (ps_index_t *)&ifs_firstc)" ( (binary_expression "ppVar3 != (ps_index_t *)&ifs_firstc" identifier != (cast_expression "(ps_index_t *)&ifs_firstc" ( (type_descriptor "ps_index_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&ifs_firstc" & identifier))) )) ;) (expression_statement "bgpids.head = 0;" (assignment_expression "bgpids.head = 0" (field_expression "bgpids.head" identifier . field_identifier) = number_literal) ;) (if_statement "if (iVar8 < 0) {\n      uVar5 = 0x8000;\n      iVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        iVar7 = iVar7 * 2;\n        if (iVar7 < 1) break;\n      } while (iVar7 < iVar8);\n      goto LAB_00154344;\n    }" if (parenthesized_expression "(iVar8 < 0)" ( (binary_expression "iVar8 < 0" identifier < number_literal) )) (compound_statement "{\n      uVar5 = 0x8000;\n      iVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        iVar7 = iVar7 * 2;\n        if (iVar7 < 1) break;\n      } while (iVar7 < iVar8);\n      goto LAB_00154344;\n    }" { (expression_statement "uVar5 = 0x8000;" (assignment_expression "uVar5 = 0x8000" identifier = number_literal) ;) (expression_statement "iVar7 = 0x200;" (assignment_expression "iVar7 = 0x200" identifier = number_literal) ;) (labeled_statement "LAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        iVar7 = iVar7 * 2;\n        if (iVar7 < 1) break;\n      } while (iVar7 < iVar8);" statement_identifier : (do_statement "do {\n        iVar8 = (int)uVar5;\n        iVar7 = iVar7 * 2;\n        if (iVar7 < 1) break;\n      } while (iVar7 < iVar8);" do (compound_statement "{\n        iVar8 = (int)uVar5;\n        iVar7 = iVar7 * 2;\n        if (iVar7 < 1) break;\n      }" { (expression_statement "iVar8 = (int)uVar5;" (assignment_expression "iVar8 = (int)uVar5" identifier = (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "iVar7 = iVar7 * 2;" (assignment_expression "iVar7 = iVar7 * 2" identifier = (binary_expression "iVar7 * 2" identifier * number_literal)) ;) (if_statement "if (iVar7 < 1) break;" if (parenthesized_expression "(iVar7 < 1)" ( (binary_expression "iVar7 < 1" identifier < number_literal) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "(iVar7 < iVar8)" ( (binary_expression "iVar7 < iVar8" identifier < identifier) )) ;)) (goto_statement "goto LAB_00154344;" goto statement_identifier ;) })) (expression_statement "iVar7 = 0x200;" (assignment_expression "iVar7 = 0x200" identifier = number_literal) ;) (expression_statement "iVar2 = 0x7fffffff;" (assignment_expression "iVar2 = 0x7fffffff" identifier = number_literal) ;) (if_statement "if (0x200 < iVar8) goto LAB_0015433a;" if (parenthesized_expression "(0x200 < iVar8)" ( (binary_expression "0x200 < iVar8" number_literal < identifier) )) (goto_statement "goto LAB_0015433a;" goto statement_identifier ;)) }) (else_clause "else {\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }\n    iVar8 = (int)uVar5;\n    if ((0 < bgpids.nalloc) && (bgpids.nalloc < iVar8)) goto LAB_0015433a;\nLAB_00154344:\n    iVar2 = (-(uint)(iVar7 - 1U < 0x8000) & 0x7fff7fff) + 0x8000;\n    if (0x7fff < iVar7 - 1U) {\n      iVar7 = 0x8000;\n    }\n  }" else (compound_statement "{\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }\n    iVar8 = (int)uVar5;\n    if ((0 < bgpids.nalloc) && (bgpids.nalloc < iVar8)) goto LAB_0015433a;\nLAB_00154344:\n    iVar2 = (-(uint)(iVar7 - 1U < 0x8000) & 0x7fff7fff) + 0x8000;\n    if (0x7fff < iVar7 - 1U) {\n      iVar7 = 0x8000;\n    }\n  }" { (if_statement "if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }" if (parenthesized_expression "(iVar8 < 0)" ( (binary_expression "iVar8 < 0" identifier < number_literal) )) (compound_statement "{\n      uVar5 = 0x8000;\n    }" { (expression_statement "uVar5 = 0x8000;" (assignment_expression "uVar5 = 0x8000" identifier = number_literal) ;) })) (expression_statement "iVar8 = (int)uVar5;" (assignment_expression "iVar8 = (int)uVar5" identifier = (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if ((0 < bgpids.nalloc) && (bgpids.nalloc < iVar8)) goto LAB_0015433a;" if (parenthesized_expression "((0 < bgpids.nalloc) && (bgpids.nalloc < iVar8))" ( (binary_expression "(0 < bgpids.nalloc) && (bgpids.nalloc < iVar8)" (parenthesized_expression "(0 < bgpids.nalloc)" ( (binary_expression "0 < bgpids.nalloc" number_literal < (field_expression "bgpids.nalloc" identifier . field_identifier)) )) && (parenthesized_expression "(bgpids.nalloc < iVar8)" ( (binary_expression "bgpids.nalloc < iVar8" (field_expression "bgpids.nalloc" identifier . field_identifier) < identifier) ))) )) (goto_statement "goto LAB_0015433a;" goto statement_identifier ;)) (labeled_statement "LAB_00154344:\n    iVar2 = (-(uint)(iVar7 - 1U < 0x8000) & 0x7fff7fff) + 0x8000;" statement_identifier : (expression_statement "iVar2 = (-(uint)(iVar7 - 1U < 0x8000) & 0x7fff7fff) + 0x8000;" (assignment_expression "iVar2 = (-(uint)(iVar7 - 1U < 0x8000) & 0x7fff7fff) + 0x8000" identifier = (binary_expression "(-(uint)(iVar7 - 1U < 0x8000) & 0x7fff7fff) + 0x8000" (parenthesized_expression "(-(uint)(iVar7 - 1U < 0x8000) & 0x7fff7fff)" ( (binary_expression "-(uint)(iVar7 - 1U < 0x8000) & 0x7fff7fff" (unary_expression "-(uint)(iVar7 - 1U < 0x8000)" - (call_expression "(uint)(iVar7 - 1U < 0x8000)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar7 - 1U < 0x8000)" ( (binary_expression "iVar7 - 1U < 0x8000" (binary_expression "iVar7 - 1U" identifier - number_literal) < number_literal) )))) & number_literal) )) + number_literal)) ;)) (if_statement "if (0x7fff < iVar7 - 1U) {\n      iVar7 = 0x8000;\n    }" if (parenthesized_expression "(0x7fff < iVar7 - 1U)" ( (binary_expression "0x7fff < iVar7 - 1U" number_literal < (binary_expression "iVar7 - 1U" identifier - number_literal)) )) (compound_statement "{\n      iVar7 = 0x8000;\n    }" { (expression_statement "iVar7 = 0x8000;" (assignment_expression "iVar7 = 0x8000" identifier = number_literal) ;) })) }))) (if_statement "if (iVar8 < iVar2) {\n    iVar2 = iVar8;\n  }" if (parenthesized_expression "(iVar8 < iVar2)" ( (binary_expression "iVar8 < iVar2" identifier < identifier) )) (compound_statement "{\n    iVar2 = iVar8;\n  }" { (expression_statement "iVar2 = iVar8;" (assignment_expression "iVar2 = iVar8" identifier = identifier) ;) })) (if_statement "if (pVar1 < iVar2) {\n    bgpids.storage = (pidstat *)xrealloc(bgpids.storage,(long)iVar7 << 4);\n    if (bgpids.nalloc < iVar7) {\n      ppVar6 = bgpids.storage + bgpids.nalloc;\n      ppVar4 = bgpids.storage + (long)bgpids.nalloc + 1 + (ulong)(uint)(~bgpids.nalloc + iVar7);\n      do {\n        ppVar6->pid = -1;\n        ppVar6 = ppVar6 + 1;\n      } while (ppVar6 != ppVar4);\n    }\n  }\n  else {\n    iVar7 = bgpids.nalloc;\n    if (pVar1 <= bgpids.head) {\n      bgpids.head = 0;\n    }\n  }" if (parenthesized_expression "(pVar1 < iVar2)" ( (binary_expression "pVar1 < iVar2" identifier < identifier) )) (compound_statement "{\n    bgpids.storage = (pidstat *)xrealloc(bgpids.storage,(long)iVar7 << 4);\n    if (bgpids.nalloc < iVar7) {\n      ppVar6 = bgpids.storage + bgpids.nalloc;\n      ppVar4 = bgpids.storage + (long)bgpids.nalloc + 1 + (ulong)(uint)(~bgpids.nalloc + iVar7);\n      do {\n        ppVar6->pid = -1;\n        ppVar6 = ppVar6 + 1;\n      } while (ppVar6 != ppVar4);\n    }\n  }" { (expression_statement "bgpids.storage = (pidstat *)xrealloc(bgpids.storage,(long)iVar7 << 4);" (assignment_expression "bgpids.storage = (pidstat *)xrealloc(bgpids.storage,(long)iVar7 << 4)" (field_expression "bgpids.storage" identifier . field_identifier) = (cast_expression "(pidstat *)xrealloc(bgpids.storage,(long)iVar7 << 4)" ( (type_descriptor "pidstat *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xrealloc(bgpids.storage,(long)iVar7 << 4)" identifier (argument_list "(bgpids.storage,(long)iVar7 << 4)" ( (field_expression "bgpids.storage" identifier . field_identifier) , (binary_expression "(long)iVar7 << 4" (cast_expression "(long)iVar7" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) << number_literal) ))))) ;) (if_statement "if (bgpids.nalloc < iVar7) {\n      ppVar6 = bgpids.storage + bgpids.nalloc;\n      ppVar4 = bgpids.storage + (long)bgpids.nalloc + 1 + (ulong)(uint)(~bgpids.nalloc + iVar7);\n      do {\n        ppVar6->pid = -1;\n        ppVar6 = ppVar6 + 1;\n      } while (ppVar6 != ppVar4);\n    }" if (parenthesized_expression "(bgpids.nalloc < iVar7)" ( (binary_expression "bgpids.nalloc < iVar7" (field_expression "bgpids.nalloc" identifier . field_identifier) < identifier) )) (compound_statement "{\n      ppVar6 = bgpids.storage + bgpids.nalloc;\n      ppVar4 = bgpids.storage + (long)bgpids.nalloc + 1 + (ulong)(uint)(~bgpids.nalloc + iVar7);\n      do {\n        ppVar6->pid = -1;\n        ppVar6 = ppVar6 + 1;\n      } while (ppVar6 != ppVar4);\n    }" { (expression_statement "ppVar6 = bgpids.storage + bgpids.nalloc;" (assignment_expression "ppVar6 = bgpids.storage + bgpids.nalloc" identifier = (binary_expression "bgpids.storage + bgpids.nalloc" (field_expression "bgpids.storage" identifier . field_identifier) + (field_expression "bgpids.nalloc" identifier . field_identifier))) ;) (expression_statement "ppVar4 = bgpids.storage + (long)bgpids.nalloc + 1 + (ulong)(uint)(~bgpids.nalloc + iVar7);" (assignment_expression "ppVar4 = bgpids.storage + (long)bgpids.nalloc + 1 + (ulong)(uint)(~bgpids.nalloc + iVar7)" identifier = (binary_expression "bgpids.storage + (long)bgpids.nalloc + 1 + (ulong)(uint)(~bgpids.nalloc + iVar7)" (binary_expression "bgpids.storage + (long)bgpids.nalloc + 1" (binary_expression "bgpids.storage + (long)bgpids.nalloc" (field_expression "bgpids.storage" identifier . field_identifier) + (cast_expression "(long)bgpids.nalloc" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (field_expression "bgpids.nalloc" identifier . field_identifier))) + number_literal) + (call_expression "(ulong)(uint)(~bgpids.nalloc + iVar7)" (call_expression "(ulong)(uint)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(uint)" ( identifier ))) (argument_list "(~bgpids.nalloc + iVar7)" ( (binary_expression "~bgpids.nalloc + iVar7" (unary_expression "~bgpids.nalloc" ~ (field_expression "bgpids.nalloc" identifier . field_identifier)) + identifier) ))))) ;) (do_statement "do {\n        ppVar6->pid = -1;\n        ppVar6 = ppVar6 + 1;\n      } while (ppVar6 != ppVar4);" do (compound_statement "{\n        ppVar6->pid = -1;\n        ppVar6 = ppVar6 + 1;\n      }" { (expression_statement "ppVar6->pid = -1;" (assignment_expression "ppVar6->pid = -1" (field_expression "ppVar6->pid" identifier -> field_identifier) = number_literal) ;) (expression_statement "ppVar6 = ppVar6 + 1;" (assignment_expression "ppVar6 = ppVar6 + 1" identifier = (binary_expression "ppVar6 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(ppVar6 != ppVar4)" ( (binary_expression "ppVar6 != ppVar4" identifier != identifier) )) ;) })) }) (else_clause "else {\n    iVar7 = bgpids.nalloc;\n    if (pVar1 <= bgpids.head) {\n      bgpids.head = 0;\n    }\n  }" else (compound_statement "{\n    iVar7 = bgpids.nalloc;\n    if (pVar1 <= bgpids.head) {\n      bgpids.head = 0;\n    }\n  }" { (expression_statement "iVar7 = bgpids.nalloc;" (assignment_expression "iVar7 = bgpids.nalloc" identifier = (field_expression "bgpids.nalloc" identifier . field_identifier)) ;) (if_statement "if (pVar1 <= bgpids.head) {\n      bgpids.head = 0;\n    }" if (parenthesized_expression "(pVar1 <= bgpids.head)" ( (binary_expression "pVar1 <= bgpids.head" identifier <= (field_expression "bgpids.head" identifier . field_identifier)) )) (compound_statement "{\n      bgpids.head = 0;\n    }" { (expression_statement "bgpids.head = 0;" (assignment_expression "bgpids.head = 0" (field_expression "bgpids.head" identifier . field_identifier) = number_literal) ;) })) }))) (labeled_statement "LAB_00154382:\n  bgpids.nalloc = iVar7;" statement_identifier : (expression_statement "bgpids.nalloc = iVar7;" (assignment_expression "bgpids.nalloc = iVar7" (field_expression "bgpids.nalloc" identifier . field_identifier) = identifier) ;)) (expression_statement "pshash_delindex(bgpids.head);" (call_expression "pshash_delindex(bgpids.head)" identifier (argument_list "(bgpids.head)" ( (field_expression "bgpids.head" identifier . field_identifier) ))) ;) (expression_statement "pVar1 = bgpids.head;" (assignment_expression "pVar1 = bgpids.head" identifier = (field_expression "bgpids.head" identifier . field_identifier)) ;) (expression_statement "bgpids.head = bgpids.head + 1;" (assignment_expression "bgpids.head = bgpids.head + 1" (field_expression "bgpids.head" identifier . field_identifier) = (binary_expression "bgpids.head + 1" (field_expression "bgpids.head" identifier . field_identifier) + number_literal)) ;) (return_statement "return pVar1;" return identifier ;) })))
(translation_unit "void FUN_001542bf(void)\n\n{\n  uint uVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  long lVar4;\n  ulong uVar5;\n  long lVar6;\n  uint uVar7;\n  int iVar8;\n  \n  uVar1 = DAT_0021463c;\n  iVar8 = (int)js;\n  uVar5 = js & 0xffffffff;\n  uVar7 = DAT_0021463c;\n  if ((iVar8 <= (int)DAT_0021463c) && (DAT_00214638 < (int)DAT_0021463c)) goto LAB_00154382;\n  if (DAT_0021463c == 0) {\n    puVar3 = &pidstat_table;\n    do {\n      *puVar3 = 0xffffffff;\n      puVar3 = puVar3 + 1;\n    } while (puVar3 != (undefined4 *)&ifs_firstc);\n    DAT_00214638 = 0;\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n      uVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      } while ((int)uVar7 < iVar8);\n      goto LAB_00154344;\n    }\n    uVar7 = 0x200;\n    iVar2 = 0x7fffffff;\n    if (0x200 < iVar8) goto LAB_0015433a;\n  }\n  else {\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }\n    iVar8 = (int)uVar5;\n    if ((0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8)) goto LAB_0015433a;\nLAB_00154344:\n    iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000;\n    if (0x7fff < uVar7 - 1) {\n      uVar7 = 0x8000;\n    }\n  }\n  if (iVar8 < iVar2) {\n    iVar2 = iVar8;\n  }\n  if ((int)uVar1 < iVar2) {\n    bgpids = xrealloc(bgpids,(long)(int)uVar7 << 4);\n    if ((int)DAT_0021463c < (int)uVar7) {\n      lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids;\n      lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10;\n      do {\n        *(undefined4 *)(lVar6 + 8) = 0xffffffff;\n        lVar6 = lVar6 + 0x10;\n      } while (lVar6 != lVar4);\n    }\n  }\n  else {\n    uVar7 = DAT_0021463c;\n    if ((int)uVar1 <= DAT_00214638) {\n      DAT_00214638 = 0;\n    }\n  }\nLAB_00154382:\n  DAT_0021463c = uVar7;\n  FUN_00153be4(DAT_00214638);\n  DAT_00214638 = DAT_00214638 + 1;\n  return;\n}\n\n" (function_definition "void FUN_001542bf(void)\n\n{\n  uint uVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  long lVar4;\n  ulong uVar5;\n  long lVar6;\n  uint uVar7;\n  int iVar8;\n  \n  uVar1 = DAT_0021463c;\n  iVar8 = (int)js;\n  uVar5 = js & 0xffffffff;\n  uVar7 = DAT_0021463c;\n  if ((iVar8 <= (int)DAT_0021463c) && (DAT_00214638 < (int)DAT_0021463c)) goto LAB_00154382;\n  if (DAT_0021463c == 0) {\n    puVar3 = &pidstat_table;\n    do {\n      *puVar3 = 0xffffffff;\n      puVar3 = puVar3 + 1;\n    } while (puVar3 != (undefined4 *)&ifs_firstc);\n    DAT_00214638 = 0;\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n      uVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      } while ((int)uVar7 < iVar8);\n      goto LAB_00154344;\n    }\n    uVar7 = 0x200;\n    iVar2 = 0x7fffffff;\n    if (0x200 < iVar8) goto LAB_0015433a;\n  }\n  else {\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }\n    iVar8 = (int)uVar5;\n    if ((0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8)) goto LAB_0015433a;\nLAB_00154344:\n    iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000;\n    if (0x7fff < uVar7 - 1) {\n      uVar7 = 0x8000;\n    }\n  }\n  if (iVar8 < iVar2) {\n    iVar2 = iVar8;\n  }\n  if ((int)uVar1 < iVar2) {\n    bgpids = xrealloc(bgpids,(long)(int)uVar7 << 4);\n    if ((int)DAT_0021463c < (int)uVar7) {\n      lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids;\n      lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10;\n      do {\n        *(undefined4 *)(lVar6 + 8) = 0xffffffff;\n        lVar6 = lVar6 + 0x10;\n      } while (lVar6 != lVar4);\n    }\n  }\n  else {\n    uVar7 = DAT_0021463c;\n    if ((int)uVar1 <= DAT_00214638) {\n      DAT_00214638 = 0;\n    }\n  }\nLAB_00154382:\n  DAT_0021463c = uVar7;\n  FUN_00153be4(DAT_00214638);\n  DAT_00214638 = DAT_00214638 + 1;\n  return;\n}" primitive_type (function_declarator "FUN_001542bf(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  long lVar4;\n  ulong uVar5;\n  long lVar6;\n  uint uVar7;\n  int iVar8;\n  \n  uVar1 = DAT_0021463c;\n  iVar8 = (int)js;\n  uVar5 = js & 0xffffffff;\n  uVar7 = DAT_0021463c;\n  if ((iVar8 <= (int)DAT_0021463c) && (DAT_00214638 < (int)DAT_0021463c)) goto LAB_00154382;\n  if (DAT_0021463c == 0) {\n    puVar3 = &pidstat_table;\n    do {\n      *puVar3 = 0xffffffff;\n      puVar3 = puVar3 + 1;\n    } while (puVar3 != (undefined4 *)&ifs_firstc);\n    DAT_00214638 = 0;\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n      uVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      } while ((int)uVar7 < iVar8);\n      goto LAB_00154344;\n    }\n    uVar7 = 0x200;\n    iVar2 = 0x7fffffff;\n    if (0x200 < iVar8) goto LAB_0015433a;\n  }\n  else {\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }\n    iVar8 = (int)uVar5;\n    if ((0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8)) goto LAB_0015433a;\nLAB_00154344:\n    iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000;\n    if (0x7fff < uVar7 - 1) {\n      uVar7 = 0x8000;\n    }\n  }\n  if (iVar8 < iVar2) {\n    iVar2 = iVar8;\n  }\n  if ((int)uVar1 < iVar2) {\n    bgpids = xrealloc(bgpids,(long)(int)uVar7 << 4);\n    if ((int)DAT_0021463c < (int)uVar7) {\n      lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids;\n      lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10;\n      do {\n        *(undefined4 *)(lVar6 + 8) = 0xffffffff;\n        lVar6 = lVar6 + 0x10;\n      } while (lVar6 != lVar4);\n    }\n  }\n  else {\n    uVar7 = DAT_0021463c;\n    if ((int)uVar1 <= DAT_00214638) {\n      DAT_00214638 = 0;\n    }\n  }\nLAB_00154382:\n  DAT_0021463c = uVar7;\n  FUN_00153be4(DAT_00214638);\n  DAT_00214638 = DAT_00214638 + 1;\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "long lVar4;" (sized_type_specifier "long" long) identifier ;) (declaration "ulong uVar5;" type_identifier identifier ;) (declaration "long lVar6;" (sized_type_specifier "long" long) identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (expression_statement "uVar1 = DAT_0021463c;" (assignment_expression "uVar1 = DAT_0021463c" identifier = identifier) ;) (expression_statement "iVar8 = (int)js;" (assignment_expression "iVar8 = (int)js" identifier = (cast_expression "(int)js" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "uVar5 = js & 0xffffffff;" (assignment_expression "uVar5 = js & 0xffffffff" identifier = (binary_expression "js & 0xffffffff" identifier & number_literal)) ;) (expression_statement "uVar7 = DAT_0021463c;" (assignment_expression "uVar7 = DAT_0021463c" identifier = identifier) ;) (if_statement "if ((iVar8 <= (int)DAT_0021463c) && (DAT_00214638 < (int)DAT_0021463c)) goto LAB_00154382;" if (parenthesized_expression "((iVar8 <= (int)DAT_0021463c) && (DAT_00214638 < (int)DAT_0021463c))" ( (binary_expression "(iVar8 <= (int)DAT_0021463c) && (DAT_00214638 < (int)DAT_0021463c)" (parenthesized_expression "(iVar8 <= (int)DAT_0021463c)" ( (binary_expression "iVar8 <= (int)DAT_0021463c" identifier <= (cast_expression "(int)DAT_0021463c" ( (type_descriptor "int" primitive_type) ) identifier)) )) && (parenthesized_expression "(DAT_00214638 < (int)DAT_0021463c)" ( (binary_expression "DAT_00214638 < (int)DAT_0021463c" identifier < (cast_expression "(int)DAT_0021463c" ( (type_descriptor "int" primitive_type) ) identifier)) ))) )) (goto_statement "goto LAB_00154382;" goto statement_identifier ;)) (if_statement "if (DAT_0021463c == 0) {\n    puVar3 = &pidstat_table;\n    do {\n      *puVar3 = 0xffffffff;\n      puVar3 = puVar3 + 1;\n    } while (puVar3 != (undefined4 *)&ifs_firstc);\n    DAT_00214638 = 0;\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n      uVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      } while ((int)uVar7 < iVar8);\n      goto LAB_00154344;\n    }\n    uVar7 = 0x200;\n    iVar2 = 0x7fffffff;\n    if (0x200 < iVar8) goto LAB_0015433a;\n  }\n  else {\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }\n    iVar8 = (int)uVar5;\n    if ((0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8)) goto LAB_0015433a;\nLAB_00154344:\n    iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000;\n    if (0x7fff < uVar7 - 1) {\n      uVar7 = 0x8000;\n    }\n  }" if (parenthesized_expression "(DAT_0021463c == 0)" ( (binary_expression "DAT_0021463c == 0" identifier == number_literal) )) (compound_statement "{\n    puVar3 = &pidstat_table;\n    do {\n      *puVar3 = 0xffffffff;\n      puVar3 = puVar3 + 1;\n    } while (puVar3 != (undefined4 *)&ifs_firstc);\n    DAT_00214638 = 0;\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n      uVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      } while ((int)uVar7 < iVar8);\n      goto LAB_00154344;\n    }\n    uVar7 = 0x200;\n    iVar2 = 0x7fffffff;\n    if (0x200 < iVar8) goto LAB_0015433a;\n  }" { (expression_statement "puVar3 = &pidstat_table;" (assignment_expression "puVar3 = &pidstat_table" identifier = (pointer_expression "&pidstat_table" & identifier)) ;) (do_statement "do {\n      *puVar3 = 0xffffffff;\n      puVar3 = puVar3 + 1;\n    } while (puVar3 != (undefined4 *)&ifs_firstc);" do (compound_statement "{\n      *puVar3 = 0xffffffff;\n      puVar3 = puVar3 + 1;\n    }" { (expression_statement "*puVar3 = 0xffffffff;" (assignment_expression "*puVar3 = 0xffffffff" (pointer_expression "*puVar3" * identifier) = number_literal) ;) (expression_statement "puVar3 = puVar3 + 1;" (assignment_expression "puVar3 = puVar3 + 1" identifier = (binary_expression "puVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(puVar3 != (undefined4 *)&ifs_firstc)" ( (binary_expression "puVar3 != (undefined4 *)&ifs_firstc" identifier != (cast_expression "(undefined4 *)&ifs_firstc" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&ifs_firstc" & identifier))) )) ;) (expression_statement "DAT_00214638 = 0;" (assignment_expression "DAT_00214638 = 0" identifier = number_literal) ;) (if_statement "if (iVar8 < 0) {\n      uVar5 = 0x8000;\n      uVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      } while ((int)uVar7 < iVar8);\n      goto LAB_00154344;\n    }" if (parenthesized_expression "(iVar8 < 0)" ( (binary_expression "iVar8 < 0" identifier < number_literal) )) (compound_statement "{\n      uVar5 = 0x8000;\n      uVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      } while ((int)uVar7 < iVar8);\n      goto LAB_00154344;\n    }" { (expression_statement "uVar5 = 0x8000;" (assignment_expression "uVar5 = 0x8000" identifier = number_literal) ;) (expression_statement "uVar7 = 0x200;" (assignment_expression "uVar7 = 0x200" identifier = number_literal) ;) (labeled_statement "LAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      } while ((int)uVar7 < iVar8);" statement_identifier : (do_statement "do {\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      } while ((int)uVar7 < iVar8);" do (compound_statement "{\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      }" { (expression_statement "iVar8 = (int)uVar5;" (assignment_expression "iVar8 = (int)uVar5" identifier = (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "uVar7 = uVar7 * 2;" (assignment_expression "uVar7 = uVar7 * 2" identifier = (binary_expression "uVar7 * 2" identifier * number_literal)) ;) (if_statement "if ((int)uVar7 < 1) break;" if (parenthesized_expression "((int)uVar7 < 1)" ( (binary_expression "(int)uVar7 < 1" (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "((int)uVar7 < iVar8)" ( (binary_expression "(int)uVar7 < iVar8" (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier) < identifier) )) ;)) (goto_statement "goto LAB_00154344;" goto statement_identifier ;) })) (expression_statement "uVar7 = 0x200;" (assignment_expression "uVar7 = 0x200" identifier = number_literal) ;) (expression_statement "iVar2 = 0x7fffffff;" (assignment_expression "iVar2 = 0x7fffffff" identifier = number_literal) ;) (if_statement "if (0x200 < iVar8) goto LAB_0015433a;" if (parenthesized_expression "(0x200 < iVar8)" ( (binary_expression "0x200 < iVar8" number_literal < identifier) )) (goto_statement "goto LAB_0015433a;" goto statement_identifier ;)) }) (else_clause "else {\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }\n    iVar8 = (int)uVar5;\n    if ((0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8)) goto LAB_0015433a;\nLAB_00154344:\n    iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000;\n    if (0x7fff < uVar7 - 1) {\n      uVar7 = 0x8000;\n    }\n  }" else (compound_statement "{\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }\n    iVar8 = (int)uVar5;\n    if ((0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8)) goto LAB_0015433a;\nLAB_00154344:\n    iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000;\n    if (0x7fff < uVar7 - 1) {\n      uVar7 = 0x8000;\n    }\n  }" { (if_statement "if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }" if (parenthesized_expression "(iVar8 < 0)" ( (binary_expression "iVar8 < 0" identifier < number_literal) )) (compound_statement "{\n      uVar5 = 0x8000;\n    }" { (expression_statement "uVar5 = 0x8000;" (assignment_expression "uVar5 = 0x8000" identifier = number_literal) ;) })) (expression_statement "iVar8 = (int)uVar5;" (assignment_expression "iVar8 = (int)uVar5" identifier = (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if ((0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8)) goto LAB_0015433a;" if (parenthesized_expression "((0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8))" ( (binary_expression "(0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8)" (parenthesized_expression "(0 < (int)DAT_0021463c)" ( (binary_expression "0 < (int)DAT_0021463c" number_literal < (cast_expression "(int)DAT_0021463c" ( (type_descriptor "int" primitive_type) ) identifier)) )) && (parenthesized_expression "((int)DAT_0021463c < iVar8)" ( (binary_expression "(int)DAT_0021463c < iVar8" (cast_expression "(int)DAT_0021463c" ( (type_descriptor "int" primitive_type) ) identifier) < identifier) ))) )) (goto_statement "goto LAB_0015433a;" goto statement_identifier ;)) (labeled_statement "LAB_00154344:\n    iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000;" statement_identifier : (expression_statement "iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000;" (assignment_expression "iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000" identifier = (binary_expression "(-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000" (parenthesized_expression "(-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff)" ( (binary_expression "-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff" (unary_expression "-(uint)(uVar7 - 1 < 0x8000)" - (call_expression "(uint)(uVar7 - 1 < 0x8000)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar7 - 1 < 0x8000)" ( (binary_expression "uVar7 - 1 < 0x8000" (binary_expression "uVar7 - 1" identifier - number_literal) < number_literal) )))) & number_literal) )) + number_literal)) ;)) (if_statement "if (0x7fff < uVar7 - 1) {\n      uVar7 = 0x8000;\n    }" if (parenthesized_expression "(0x7fff < uVar7 - 1)" ( (binary_expression "0x7fff < uVar7 - 1" number_literal < (binary_expression "uVar7 - 1" identifier - number_literal)) )) (compound_statement "{\n      uVar7 = 0x8000;\n    }" { (expression_statement "uVar7 = 0x8000;" (assignment_expression "uVar7 = 0x8000" identifier = number_literal) ;) })) }))) (if_statement "if (iVar8 < iVar2) {\n    iVar2 = iVar8;\n  }" if (parenthesized_expression "(iVar8 < iVar2)" ( (binary_expression "iVar8 < iVar2" identifier < identifier) )) (compound_statement "{\n    iVar2 = iVar8;\n  }" { (expression_statement "iVar2 = iVar8;" (assignment_expression "iVar2 = iVar8" identifier = identifier) ;) })) (if_statement "if ((int)uVar1 < iVar2) {\n    bgpids = xrealloc(bgpids,(long)(int)uVar7 << 4);\n    if ((int)DAT_0021463c < (int)uVar7) {\n      lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids;\n      lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10;\n      do {\n        *(undefined4 *)(lVar6 + 8) = 0xffffffff;\n        lVar6 = lVar6 + 0x10;\n      } while (lVar6 != lVar4);\n    }\n  }\n  else {\n    uVar7 = DAT_0021463c;\n    if ((int)uVar1 <= DAT_00214638) {\n      DAT_00214638 = 0;\n    }\n  }" if (parenthesized_expression "((int)uVar1 < iVar2)" ( (binary_expression "(int)uVar1 < iVar2" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) < identifier) )) (compound_statement "{\n    bgpids = xrealloc(bgpids,(long)(int)uVar7 << 4);\n    if ((int)DAT_0021463c < (int)uVar7) {\n      lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids;\n      lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10;\n      do {\n        *(undefined4 *)(lVar6 + 8) = 0xffffffff;\n        lVar6 = lVar6 + 0x10;\n      } while (lVar6 != lVar4);\n    }\n  }" { (expression_statement "bgpids = xrealloc(bgpids,(long)(int)uVar7 << 4);" (assignment_expression "bgpids = xrealloc(bgpids,(long)(int)uVar7 << 4)" identifier = (call_expression "xrealloc(bgpids,(long)(int)uVar7 << 4)" identifier (argument_list "(bgpids,(long)(int)uVar7 << 4)" ( identifier , (binary_expression "(long)(int)uVar7 << 4" (cast_expression "(long)(int)uVar7" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier)) << number_literal) )))) ;) (if_statement "if ((int)DAT_0021463c < (int)uVar7) {\n      lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids;\n      lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10;\n      do {\n        *(undefined4 *)(lVar6 + 8) = 0xffffffff;\n        lVar6 = lVar6 + 0x10;\n      } while (lVar6 != lVar4);\n    }" if (parenthesized_expression "((int)DAT_0021463c < (int)uVar7)" ( (binary_expression "(int)DAT_0021463c < (int)uVar7" (cast_expression "(int)DAT_0021463c" ( (type_descriptor "int" primitive_type) ) identifier) < (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids;\n      lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10;\n      do {\n        *(undefined4 *)(lVar6 + 8) = 0xffffffff;\n        lVar6 = lVar6 + 0x10;\n      } while (lVar6 != lVar4);\n    }" { (expression_statement "lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids;" (assignment_expression "lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids" identifier = (binary_expression "(long)(int)DAT_0021463c * 0x10 + bgpids" (binary_expression "(long)(int)DAT_0021463c * 0x10" (cast_expression "(long)(int)DAT_0021463c" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)DAT_0021463c" ( (type_descriptor "int" primitive_type) ) identifier)) * number_literal) + identifier)) ;) (expression_statement "lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10;" (assignment_expression "lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10" identifier = (binary_expression "bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10" identifier + (binary_expression "((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10" (parenthesized_expression "((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7))" ( (binary_expression "(long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)" (binary_expression "(long)(int)DAT_0021463c + 1" (cast_expression "(long)(int)DAT_0021463c" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)DAT_0021463c" ( (type_descriptor "int" primitive_type) ) identifier)) + number_literal) + (call_expression "(ulong)(~DAT_0021463c + uVar7)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(~DAT_0021463c + uVar7)" ( (binary_expression "~DAT_0021463c + uVar7" (unary_expression "~DAT_0021463c" ~ identifier) + identifier) )))) )) * number_literal))) ;) (do_statement "do {\n        *(undefined4 *)(lVar6 + 8) = 0xffffffff;\n        lVar6 = lVar6 + 0x10;\n      } while (lVar6 != lVar4);" do (compound_statement "{\n        *(undefined4 *)(lVar6 + 8) = 0xffffffff;\n        lVar6 = lVar6 + 0x10;\n      }" { (expression_statement "*(undefined4 *)(lVar6 + 8) = 0xffffffff;" (assignment_expression "*(undefined4 *)(lVar6 + 8) = 0xffffffff" (pointer_expression "*(undefined4 *)(lVar6 + 8)" * (cast_expression "(undefined4 *)(lVar6 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar6 + 8)" ( (binary_expression "lVar6 + 8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "lVar6 = lVar6 + 0x10;" (assignment_expression "lVar6 = lVar6 + 0x10" identifier = (binary_expression "lVar6 + 0x10" identifier + number_literal)) ;) }) while (parenthesized_expression "(lVar6 != lVar4)" ( (binary_expression "lVar6 != lVar4" identifier != identifier) )) ;) })) }) (else_clause "else {\n    uVar7 = DAT_0021463c;\n    if ((int)uVar1 <= DAT_00214638) {\n      DAT_00214638 = 0;\n    }\n  }" else (compound_statement "{\n    uVar7 = DAT_0021463c;\n    if ((int)uVar1 <= DAT_00214638) {\n      DAT_00214638 = 0;\n    }\n  }" { (expression_statement "uVar7 = DAT_0021463c;" (assignment_expression "uVar7 = DAT_0021463c" identifier = identifier) ;) (if_statement "if ((int)uVar1 <= DAT_00214638) {\n      DAT_00214638 = 0;\n    }" if (parenthesized_expression "((int)uVar1 <= DAT_00214638)" ( (binary_expression "(int)uVar1 <= DAT_00214638" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) <= identifier) )) (compound_statement "{\n      DAT_00214638 = 0;\n    }" { (expression_statement "DAT_00214638 = 0;" (assignment_expression "DAT_00214638 = 0" identifier = number_literal) ;) })) }))) (labeled_statement "LAB_00154382:\n  DAT_0021463c = uVar7;" statement_identifier : (expression_statement "DAT_0021463c = uVar7;" (assignment_expression "DAT_0021463c = uVar7" identifier = identifier) ;)) (expression_statement "FUN_00153be4(DAT_00214638);" (call_expression "FUN_00153be4(DAT_00214638)" identifier (argument_list "(DAT_00214638)" ( identifier ))) ;) (expression_statement "DAT_00214638 = DAT_00214638 + 1;" (assignment_expression "DAT_00214638 = DAT_00214638 + 1" identifier = (binary_expression "DAT_00214638 + 1" identifier + number_literal)) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT <= (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) && (parenthesized_expression ( (binary_expression IDENT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression & IDENT))) )) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (labeled_statement statement_identifier : (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT * LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) (break_statement break ;)) }) while (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < IDENT) )) ;)) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (goto_statement goto statement_identifier ;)) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) && (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < IDENT) ))) )) (goto_statement goto statement_identifier ;)) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression (unary_expression - (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (binary_expression IDENT - LIT) < LIT) )))) & LIT) )) + LIT)) ;)) (if_statement if (parenthesized_expression ( (binary_expression LIT < (binary_expression IDENT - LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (cast_expression ( (type_descriptor TYPE) ) IDENT)) << LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (cast_expression ( (type_descriptor TYPE) ) IDENT)) * LIT) + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (binary_expression (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (cast_expression ( (type_descriptor TYPE) ) IDENT)) + LIT) + (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (unary_expression ~ IDENT) + IDENT) )))) )) * LIT))) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) }))) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = IDENT) ;)) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (return_statement return ;) })))
(function_definition "void FUN_001542bf(void)\n\n{\n  uint uVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  long lVar4;\n  ulong uVar5;\n  long lVar6;\n  uint uVar7;\n  int iVar8;\n  \n  uVar1 = DAT_0021463c;\n  iVar8 = (int)js;\n  uVar5 = js & 0xffffffff;\n  uVar7 = DAT_0021463c;\n  if ((iVar8 <= (int)DAT_0021463c) && (DAT_00214638 < (int)DAT_0021463c)) goto LAB_00154382;\n  if (DAT_0021463c == 0) {\n    puVar3 = &pidstat_table;\n    do {\n      *puVar3 = 0xffffffff;\n      puVar3 = puVar3 + 1;\n    } while (puVar3 != (undefined4 *)&ifs_firstc);\n    DAT_00214638 = 0;\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n      uVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      } while ((int)uVar7 < iVar8);\n      goto LAB_00154344;\n    }\n    uVar7 = 0x200;\n    iVar2 = 0x7fffffff;\n    if (0x200 < iVar8) goto LAB_0015433a;\n  }\n  else {\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }\n    iVar8 = (int)uVar5;\n    if ((0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8)) goto LAB_0015433a;\nLAB_00154344:\n    iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000;\n    if (0x7fff < uVar7 - 1) {\n      uVar7 = 0x8000;\n    }\n  }\n  if (iVar8 < iVar2) {\n    iVar2 = iVar8;\n  }\n  if ((int)uVar1 < iVar2) {\n    bgpids = xrealloc(bgpids,(long)(int)uVar7 << 4);\n    if ((int)DAT_0021463c < (int)uVar7) {\n      lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids;\n      lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10;\n      do {\n        *(undefined4 *)(lVar6 + 8) = 0xffffffff;\n        lVar6 = lVar6 + 0x10;\n      } while (lVar6 != lVar4);\n    }\n  }\n  else {\n    uVar7 = DAT_0021463c;\n    if ((int)uVar1 <= DAT_00214638) {\n      DAT_00214638 = 0;\n    }\n  }\nLAB_00154382:\n  DAT_0021463c = uVar7;\n  FUN_00153be4(DAT_00214638);\n  DAT_00214638 = DAT_00214638 + 1;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_001542bf(void)" (identifier "FUN_001542bf") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  long lVar4;\n  ulong uVar5;\n  long lVar6;\n  uint uVar7;\n  int iVar8;\n  \n  uVar1 = DAT_0021463c;\n  iVar8 = (int)js;\n  uVar5 = js & 0xffffffff;\n  uVar7 = DAT_0021463c;\n  if ((iVar8 <= (int)DAT_0021463c) && (DAT_00214638 < (int)DAT_0021463c)) goto LAB_00154382;\n  if (DAT_0021463c == 0) {\n    puVar3 = &pidstat_table;\n    do {\n      *puVar3 = 0xffffffff;\n      puVar3 = puVar3 + 1;\n    } while (puVar3 != (undefined4 *)&ifs_firstc);\n    DAT_00214638 = 0;\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n      uVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      } while ((int)uVar7 < iVar8);\n      goto LAB_00154344;\n    }\n    uVar7 = 0x200;\n    iVar2 = 0x7fffffff;\n    if (0x200 < iVar8) goto LAB_0015433a;\n  }\n  else {\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }\n    iVar8 = (int)uVar5;\n    if ((0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8)) goto LAB_0015433a;\nLAB_00154344:\n    iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000;\n    if (0x7fff < uVar7 - 1) {\n      uVar7 = 0x8000;\n    }\n  }\n  if (iVar8 < iVar2) {\n    iVar2 = iVar8;\n  }\n  if ((int)uVar1 < iVar2) {\n    bgpids = xrealloc(bgpids,(long)(int)uVar7 << 4);\n    if ((int)DAT_0021463c < (int)uVar7) {\n      lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids;\n      lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10;\n      do {\n        *(undefined4 *)(lVar6 + 8) = 0xffffffff;\n        lVar6 = lVar6 + 0x10;\n      } while (lVar6 != lVar4);\n    }\n  }\n  else {\n    uVar7 = DAT_0021463c;\n    if ((int)uVar1 <= DAT_00214638) {\n      DAT_00214638 = 0;\n    }\n  }\nLAB_00154382:\n  DAT_0021463c = uVar7;\n  FUN_00153be4(DAT_00214638);\n  DAT_00214638 = DAT_00214638 + 1;\n  return;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 *puVar3;" (type_identifier "undefined4") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "long lVar4;" (sized_type_specifier "long" (long "long")) (identifier "lVar4") (; ";")) (declaration "ulong uVar5;" (type_identifier "ulong") (identifier "uVar5") (; ";")) (declaration "long lVar6;" (sized_type_specifier "long" (long "long")) (identifier "lVar6") (; ";")) (declaration "uint uVar7;" (type_identifier "uint") (identifier "uVar7") (; ";")) (declaration "int iVar8;" (primitive_type "int") (identifier "iVar8") (; ";")) (expression_statement "uVar1 = DAT_0021463c;" (assignment_expression "uVar1 = DAT_0021463c" (identifier "uVar1") (= "=") (identifier "DAT_0021463c")) (; ";")) (expression_statement "iVar8 = (int)js;" (assignment_expression "iVar8 = (int)js" (identifier "iVar8") (= "=") (cast_expression "(int)js" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "js"))) (; ";")) (expression_statement "uVar5 = js & 0xffffffff;" (assignment_expression "uVar5 = js & 0xffffffff" (identifier "uVar5") (= "=") (binary_expression "js & 0xffffffff" (identifier "js") (& "&") (number_literal "0xffffffff"))) (; ";")) (expression_statement "uVar7 = DAT_0021463c;" (assignment_expression "uVar7 = DAT_0021463c" (identifier "uVar7") (= "=") (identifier "DAT_0021463c")) (; ";")) (if_statement "if ((iVar8 <= (int)DAT_0021463c) && (DAT_00214638 < (int)DAT_0021463c)) goto LAB_00154382;" (if "if") (parenthesized_expression "((iVar8 <= (int)DAT_0021463c) && (DAT_00214638 < (int)DAT_0021463c))" (( "(") (binary_expression "(iVar8 <= (int)DAT_0021463c) && (DAT_00214638 < (int)DAT_0021463c)" (parenthesized_expression "(iVar8 <= (int)DAT_0021463c)" (( "(") (binary_expression "iVar8 <= (int)DAT_0021463c" (identifier "iVar8") (<= "<=") (cast_expression "(int)DAT_0021463c" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "DAT_0021463c"))) () ")")) (&& "&&") (parenthesized_expression "(DAT_00214638 < (int)DAT_0021463c)" (( "(") (binary_expression "DAT_00214638 < (int)DAT_0021463c" (identifier "DAT_00214638") (< "<") (cast_expression "(int)DAT_0021463c" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "DAT_0021463c"))) () ")"))) () ")")) (goto_statement "goto LAB_00154382;" (goto "goto") (statement_identifier "LAB_00154382") (; ";"))) (if_statement "if (DAT_0021463c == 0) {\n    puVar3 = &pidstat_table;\n    do {\n      *puVar3 = 0xffffffff;\n      puVar3 = puVar3 + 1;\n    } while (puVar3 != (undefined4 *)&ifs_firstc);\n    DAT_00214638 = 0;\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n      uVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      } while ((int)uVar7 < iVar8);\n      goto LAB_00154344;\n    }\n    uVar7 = 0x200;\n    iVar2 = 0x7fffffff;\n    if (0x200 < iVar8) goto LAB_0015433a;\n  }\n  else {\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }\n    iVar8 = (int)uVar5;\n    if ((0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8)) goto LAB_0015433a;\nLAB_00154344:\n    iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000;\n    if (0x7fff < uVar7 - 1) {\n      uVar7 = 0x8000;\n    }\n  }" (if "if") (parenthesized_expression "(DAT_0021463c == 0)" (( "(") (binary_expression "DAT_0021463c == 0" (identifier "DAT_0021463c") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    puVar3 = &pidstat_table;\n    do {\n      *puVar3 = 0xffffffff;\n      puVar3 = puVar3 + 1;\n    } while (puVar3 != (undefined4 *)&ifs_firstc);\n    DAT_00214638 = 0;\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n      uVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      } while ((int)uVar7 < iVar8);\n      goto LAB_00154344;\n    }\n    uVar7 = 0x200;\n    iVar2 = 0x7fffffff;\n    if (0x200 < iVar8) goto LAB_0015433a;\n  }" ({ "{") (expression_statement "puVar3 = &pidstat_table;" (assignment_expression "puVar3 = &pidstat_table" (identifier "puVar3") (= "=") (pointer_expression "&pidstat_table" (& "&") (identifier "pidstat_table"))) (; ";")) (do_statement "do {\n      *puVar3 = 0xffffffff;\n      puVar3 = puVar3 + 1;\n    } while (puVar3 != (undefined4 *)&ifs_firstc);" (do "do") (compound_statement "{\n      *puVar3 = 0xffffffff;\n      puVar3 = puVar3 + 1;\n    }" ({ "{") (expression_statement "*puVar3 = 0xffffffff;" (assignment_expression "*puVar3 = 0xffffffff" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (number_literal "0xffffffff")) (; ";")) (expression_statement "puVar3 = puVar3 + 1;" (assignment_expression "puVar3 = puVar3 + 1" (identifier "puVar3") (= "=") (binary_expression "puVar3 + 1" (identifier "puVar3") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(puVar3 != (undefined4 *)&ifs_firstc)" (( "(") (binary_expression "puVar3 != (undefined4 *)&ifs_firstc" (identifier "puVar3") (!= "!=") (cast_expression "(undefined4 *)&ifs_firstc" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "&ifs_firstc" (& "&") (identifier "ifs_firstc")))) () ")")) (; ";")) (expression_statement "DAT_00214638 = 0;" (assignment_expression "DAT_00214638 = 0" (identifier "DAT_00214638") (= "=") (number_literal "0")) (; ";")) (if_statement "if (iVar8 < 0) {\n      uVar5 = 0x8000;\n      uVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      } while ((int)uVar7 < iVar8);\n      goto LAB_00154344;\n    }" (if "if") (parenthesized_expression "(iVar8 < 0)" (( "(") (binary_expression "iVar8 < 0" (identifier "iVar8") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      uVar5 = 0x8000;\n      uVar7 = 0x200;\nLAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      } while ((int)uVar7 < iVar8);\n      goto LAB_00154344;\n    }" ({ "{") (expression_statement "uVar5 = 0x8000;" (assignment_expression "uVar5 = 0x8000" (identifier "uVar5") (= "=") (number_literal "0x8000")) (; ";")) (expression_statement "uVar7 = 0x200;" (assignment_expression "uVar7 = 0x200" (identifier "uVar7") (= "=") (number_literal "0x200")) (; ";")) (labeled_statement "LAB_0015433a:\n      do {\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      } while ((int)uVar7 < iVar8);" (statement_identifier "LAB_0015433a") (: ":") (do_statement "do {\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      } while ((int)uVar7 < iVar8);" (do "do") (compound_statement "{\n        iVar8 = (int)uVar5;\n        uVar7 = uVar7 * 2;\n        if ((int)uVar7 < 1) break;\n      }" ({ "{") (expression_statement "iVar8 = (int)uVar5;" (assignment_expression "iVar8 = (int)uVar5" (identifier "iVar8") (= "=") (cast_expression "(int)uVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar5"))) (; ";")) (expression_statement "uVar7 = uVar7 * 2;" (assignment_expression "uVar7 = uVar7 * 2" (identifier "uVar7") (= "=") (binary_expression "uVar7 * 2" (identifier "uVar7") (* "*") (number_literal "2"))) (; ";")) (if_statement "if ((int)uVar7 < 1) break;" (if "if") (parenthesized_expression "((int)uVar7 < 1)" (( "(") (binary_expression "(int)uVar7 < 1" (cast_expression "(int)uVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar7")) (< "<") (number_literal "1")) () ")")) (break_statement "break;" (break "break") (; ";"))) (} "}")) (while "while") (parenthesized_expression "((int)uVar7 < iVar8)" (( "(") (binary_expression "(int)uVar7 < iVar8" (cast_expression "(int)uVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar7")) (< "<") (identifier "iVar8")) () ")")) (; ";"))) (goto_statement "goto LAB_00154344;" (goto "goto") (statement_identifier "LAB_00154344") (; ";")) (} "}"))) (expression_statement "uVar7 = 0x200;" (assignment_expression "uVar7 = 0x200" (identifier "uVar7") (= "=") (number_literal "0x200")) (; ";")) (expression_statement "iVar2 = 0x7fffffff;" (assignment_expression "iVar2 = 0x7fffffff" (identifier "iVar2") (= "=") (number_literal "0x7fffffff")) (; ";")) (if_statement "if (0x200 < iVar8) goto LAB_0015433a;" (if "if") (parenthesized_expression "(0x200 < iVar8)" (( "(") (binary_expression "0x200 < iVar8" (number_literal "0x200") (< "<") (identifier "iVar8")) () ")")) (goto_statement "goto LAB_0015433a;" (goto "goto") (statement_identifier "LAB_0015433a") (; ";"))) (} "}")) (else_clause "else {\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }\n    iVar8 = (int)uVar5;\n    if ((0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8)) goto LAB_0015433a;\nLAB_00154344:\n    iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000;\n    if (0x7fff < uVar7 - 1) {\n      uVar7 = 0x8000;\n    }\n  }" (else "else") (compound_statement "{\n    if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }\n    iVar8 = (int)uVar5;\n    if ((0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8)) goto LAB_0015433a;\nLAB_00154344:\n    iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000;\n    if (0x7fff < uVar7 - 1) {\n      uVar7 = 0x8000;\n    }\n  }" ({ "{") (if_statement "if (iVar8 < 0) {\n      uVar5 = 0x8000;\n    }" (if "if") (parenthesized_expression "(iVar8 < 0)" (( "(") (binary_expression "iVar8 < 0" (identifier "iVar8") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      uVar5 = 0x8000;\n    }" ({ "{") (expression_statement "uVar5 = 0x8000;" (assignment_expression "uVar5 = 0x8000" (identifier "uVar5") (= "=") (number_literal "0x8000")) (; ";")) (} "}"))) (expression_statement "iVar8 = (int)uVar5;" (assignment_expression "iVar8 = (int)uVar5" (identifier "iVar8") (= "=") (cast_expression "(int)uVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar5"))) (; ";")) (if_statement "if ((0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8)) goto LAB_0015433a;" (if "if") (parenthesized_expression "((0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8))" (( "(") (binary_expression "(0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8)" (parenthesized_expression "(0 < (int)DAT_0021463c)" (( "(") (binary_expression "0 < (int)DAT_0021463c" (number_literal "0") (< "<") (cast_expression "(int)DAT_0021463c" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "DAT_0021463c"))) () ")")) (&& "&&") (parenthesized_expression "((int)DAT_0021463c < iVar8)" (( "(") (binary_expression "(int)DAT_0021463c < iVar8" (cast_expression "(int)DAT_0021463c" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "DAT_0021463c")) (< "<") (identifier "iVar8")) () ")"))) () ")")) (goto_statement "goto LAB_0015433a;" (goto "goto") (statement_identifier "LAB_0015433a") (; ";"))) (labeled_statement "LAB_00154344:\n    iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000;" (statement_identifier "LAB_00154344") (: ":") (expression_statement "iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000;" (assignment_expression "iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000" (identifier "iVar2") (= "=") (binary_expression "(-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000" (parenthesized_expression "(-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff)" (( "(") (binary_expression "-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff" (unary_expression "-(uint)(uVar7 - 1 < 0x8000)" (- "-") (call_expression "(uint)(uVar7 - 1 < 0x8000)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(uVar7 - 1 < 0x8000)" (( "(") (binary_expression "uVar7 - 1 < 0x8000" (binary_expression "uVar7 - 1" (identifier "uVar7") (- "-") (number_literal "1")) (< "<") (number_literal "0x8000")) () ")")))) (& "&") (number_literal "0x7fff7fff")) () ")")) (+ "+") (number_literal "0x8000"))) (; ";"))) (if_statement "if (0x7fff < uVar7 - 1) {\n      uVar7 = 0x8000;\n    }" (if "if") (parenthesized_expression "(0x7fff < uVar7 - 1)" (( "(") (binary_expression "0x7fff < uVar7 - 1" (number_literal "0x7fff") (< "<") (binary_expression "uVar7 - 1" (identifier "uVar7") (- "-") (number_literal "1"))) () ")")) (compound_statement "{\n      uVar7 = 0x8000;\n    }" ({ "{") (expression_statement "uVar7 = 0x8000;" (assignment_expression "uVar7 = 0x8000" (identifier "uVar7") (= "=") (number_literal "0x8000")) (; ";")) (} "}"))) (} "}")))) (if_statement "if (iVar8 < iVar2) {\n    iVar2 = iVar8;\n  }" (if "if") (parenthesized_expression "(iVar8 < iVar2)" (( "(") (binary_expression "iVar8 < iVar2" (identifier "iVar8") (< "<") (identifier "iVar2")) () ")")) (compound_statement "{\n    iVar2 = iVar8;\n  }" ({ "{") (expression_statement "iVar2 = iVar8;" (assignment_expression "iVar2 = iVar8" (identifier "iVar2") (= "=") (identifier "iVar8")) (; ";")) (} "}"))) (if_statement "if ((int)uVar1 < iVar2) {\n    bgpids = xrealloc(bgpids,(long)(int)uVar7 << 4);\n    if ((int)DAT_0021463c < (int)uVar7) {\n      lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids;\n      lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10;\n      do {\n        *(undefined4 *)(lVar6 + 8) = 0xffffffff;\n        lVar6 = lVar6 + 0x10;\n      } while (lVar6 != lVar4);\n    }\n  }\n  else {\n    uVar7 = DAT_0021463c;\n    if ((int)uVar1 <= DAT_00214638) {\n      DAT_00214638 = 0;\n    }\n  }" (if "if") (parenthesized_expression "((int)uVar1 < iVar2)" (( "(") (binary_expression "(int)uVar1 < iVar2" (cast_expression "(int)uVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar1")) (< "<") (identifier "iVar2")) () ")")) (compound_statement "{\n    bgpids = xrealloc(bgpids,(long)(int)uVar7 << 4);\n    if ((int)DAT_0021463c < (int)uVar7) {\n      lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids;\n      lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10;\n      do {\n        *(undefined4 *)(lVar6 + 8) = 0xffffffff;\n        lVar6 = lVar6 + 0x10;\n      } while (lVar6 != lVar4);\n    }\n  }" ({ "{") (expression_statement "bgpids = xrealloc(bgpids,(long)(int)uVar7 << 4);" (assignment_expression "bgpids = xrealloc(bgpids,(long)(int)uVar7 << 4)" (identifier "bgpids") (= "=") (call_expression "xrealloc(bgpids,(long)(int)uVar7 << 4)" (identifier "xrealloc") (argument_list "(bgpids,(long)(int)uVar7 << 4)" (( "(") (identifier "bgpids") (, ",") (binary_expression "(long)(int)uVar7 << 4" (cast_expression "(long)(int)uVar7" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (cast_expression "(int)uVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar7"))) (<< "<<") (number_literal "4")) () ")")))) (; ";")) (if_statement "if ((int)DAT_0021463c < (int)uVar7) {\n      lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids;\n      lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10;\n      do {\n        *(undefined4 *)(lVar6 + 8) = 0xffffffff;\n        lVar6 = lVar6 + 0x10;\n      } while (lVar6 != lVar4);\n    }" (if "if") (parenthesized_expression "((int)DAT_0021463c < (int)uVar7)" (( "(") (binary_expression "(int)DAT_0021463c < (int)uVar7" (cast_expression "(int)DAT_0021463c" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "DAT_0021463c")) (< "<") (cast_expression "(int)uVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar7"))) () ")")) (compound_statement "{\n      lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids;\n      lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10;\n      do {\n        *(undefined4 *)(lVar6 + 8) = 0xffffffff;\n        lVar6 = lVar6 + 0x10;\n      } while (lVar6 != lVar4);\n    }" ({ "{") (expression_statement "lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids;" (assignment_expression "lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids" (identifier "lVar6") (= "=") (binary_expression "(long)(int)DAT_0021463c * 0x10 + bgpids" (binary_expression "(long)(int)DAT_0021463c * 0x10" (cast_expression "(long)(int)DAT_0021463c" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (cast_expression "(int)DAT_0021463c" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "DAT_0021463c"))) (* "*") (number_literal "0x10")) (+ "+") (identifier "bgpids"))) (; ";")) (expression_statement "lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10;" (assignment_expression "lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10" (identifier "lVar4") (= "=") (binary_expression "bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10" (identifier "bgpids") (+ "+") (binary_expression "((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10" (parenthesized_expression "((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7))" (( "(") (binary_expression "(long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)" (binary_expression "(long)(int)DAT_0021463c + 1" (cast_expression "(long)(int)DAT_0021463c" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (cast_expression "(int)DAT_0021463c" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "DAT_0021463c"))) (+ "+") (number_literal "1")) (+ "+") (call_expression "(ulong)(~DAT_0021463c + uVar7)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(~DAT_0021463c + uVar7)" (( "(") (binary_expression "~DAT_0021463c + uVar7" (unary_expression "~DAT_0021463c" (~ "~") (identifier "DAT_0021463c")) (+ "+") (identifier "uVar7")) () ")")))) () ")")) (* "*") (number_literal "0x10")))) (; ";")) (do_statement "do {\n        *(undefined4 *)(lVar6 + 8) = 0xffffffff;\n        lVar6 = lVar6 + 0x10;\n      } while (lVar6 != lVar4);" (do "do") (compound_statement "{\n        *(undefined4 *)(lVar6 + 8) = 0xffffffff;\n        lVar6 = lVar6 + 0x10;\n      }" ({ "{") (expression_statement "*(undefined4 *)(lVar6 + 8) = 0xffffffff;" (assignment_expression "*(undefined4 *)(lVar6 + 8) = 0xffffffff" (pointer_expression "*(undefined4 *)(lVar6 + 8)" (* "*") (cast_expression "(undefined4 *)(lVar6 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar6 + 8)" (( "(") (binary_expression "lVar6 + 8" (identifier "lVar6") (+ "+") (number_literal "8")) () ")")))) (= "=") (number_literal "0xffffffff")) (; ";")) (expression_statement "lVar6 = lVar6 + 0x10;" (assignment_expression "lVar6 = lVar6 + 0x10" (identifier "lVar6") (= "=") (binary_expression "lVar6 + 0x10" (identifier "lVar6") (+ "+") (number_literal "0x10"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(lVar6 != lVar4)" (( "(") (binary_expression "lVar6 != lVar4" (identifier "lVar6") (!= "!=") (identifier "lVar4")) () ")")) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    uVar7 = DAT_0021463c;\n    if ((int)uVar1 <= DAT_00214638) {\n      DAT_00214638 = 0;\n    }\n  }" (else "else") (compound_statement "{\n    uVar7 = DAT_0021463c;\n    if ((int)uVar1 <= DAT_00214638) {\n      DAT_00214638 = 0;\n    }\n  }" ({ "{") (expression_statement "uVar7 = DAT_0021463c;" (assignment_expression "uVar7 = DAT_0021463c" (identifier "uVar7") (= "=") (identifier "DAT_0021463c")) (; ";")) (if_statement "if ((int)uVar1 <= DAT_00214638) {\n      DAT_00214638 = 0;\n    }" (if "if") (parenthesized_expression "((int)uVar1 <= DAT_00214638)" (( "(") (binary_expression "(int)uVar1 <= DAT_00214638" (cast_expression "(int)uVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar1")) (<= "<=") (identifier "DAT_00214638")) () ")")) (compound_statement "{\n      DAT_00214638 = 0;\n    }" ({ "{") (expression_statement "DAT_00214638 = 0;" (assignment_expression "DAT_00214638 = 0" (identifier "DAT_00214638") (= "=") (number_literal "0")) (; ";")) (} "}"))) (} "}")))) (labeled_statement "LAB_00154382:\n  DAT_0021463c = uVar7;" (statement_identifier "LAB_00154382") (: ":") (expression_statement "DAT_0021463c = uVar7;" (assignment_expression "DAT_0021463c = uVar7" (identifier "DAT_0021463c") (= "=") (identifier "uVar7")) (; ";"))) (expression_statement "FUN_00153be4(DAT_00214638);" (call_expression "FUN_00153be4(DAT_00214638)" (identifier "FUN_00153be4") (argument_list "(DAT_00214638)" (( "(") (identifier "DAT_00214638") () ")"))) (; ";")) (expression_statement "DAT_00214638 = DAT_00214638 + 1;" (assignment_expression "DAT_00214638 = DAT_00214638 + 1" (identifier "DAT_00214638") (= "=") (binary_expression "DAT_00214638 + 1" (identifier "DAT_00214638") (+ "+") (number_literal "1"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

type_1 function_1(void)

{
  type_1 var_5;
  int var_4;
  type_1 *var_2;
  type_2 *var_8;
  type_3 uVar5;
  type_2 *var_7;
  int var_3;
  int var_1;
  
  var_5 = bgpids.nalloc;
  var_1 = (int)js.c_childmax;
  uVar5 = js.c_childmax & 0xffffffff;
  var_3 = bgpids.nalloc;
  if ((var_1 <= bgpids.nalloc) && (bgpids.head < bgpids.nalloc)) goto LAB_00154382;
  if (bgpids.nalloc == 0) {
    var_2 = pidstat_table;
    do {
      *var_2 = -1;
      var_2 = var_2 + 1;
    } while (var_2 != (type_1 *)&ifs_firstc);
    bgpids.head = 0;
    if (var_1 < 0) {
      uVar5 = 0x8000;
      var_3 = 0x200;
LAB_0015433a:
      do {
        var_1 = (int)uVar5;
        var_3 = var_3 * 2;
        if (var_3 < 1) break;
      } while (var_3 < var_1);
      goto LAB_00154344;
    }
    var_3 = 0x200;
    var_4 = 0x7fffffff;
    if (0x200 < var_1) goto LAB_0015433a;
  }
  else {
    if (var_1 < 0) {
      uVar5 = 0x8000;
    }
    var_1 = (int)uVar5;
    if ((0 < bgpids.nalloc) && (bgpids.nalloc < var_1)) goto LAB_0015433a;
LAB_00154344:
    var_4 = (-(uint)(var_3 - 1U < 0x8000) & 0x7fff7fff) + 0x8000;
    if (0x7fff < var_3 - 1U) {
      var_3 = 0x8000;
    }
  }
  if (var_1 < var_4) {
    var_4 = var_1;
  }
  if (var_5 < var_4) {
    bgpids.storage = (type_2 *)var_6(bgpids.storage,(long)var_3 << 4);
    if (bgpids.nalloc < var_3) {
      var_7 = bgpids.storage + bgpids.nalloc;
      var_8 = bgpids.storage + (long)bgpids.nalloc + 1 + (type_3)(uint)(~bgpids.nalloc + var_3);
      do {
        var_7->pid = -1;
        var_7 = var_7 + 1;
      } while (var_7 != var_8);
    }
  }
  else {
    var_3 = bgpids.nalloc;
    if (var_5 <= bgpids.head) {
      bgpids.head = 0;
    }
  }
LAB_00154382:
  bgpids.nalloc = var_3;
  var_9(bgpids.head);
  var_5 = bgpids.head;
  bgpids.head = bgpids.head + 1;
  return var_5;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) right: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))))) consequence: (goto_statement label: (statement_identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (labeled_statement label: (statement_identifier) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))) consequence: (break_statement))) condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (identifier))))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (goto_statement label: (statement_identifier)))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) right: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (identifier))))) consequence: (goto_statement label: (statement_identifier))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (unary_expression argument: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal))))) right: (number_literal))) right: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (binary_expression left: (identifier) right: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))) right: (number_literal)) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))) right: (number_literal)) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (unary_expression argument: (identifier)) right: (identifier)))))) right: (number_literal))))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))))))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (return_statement))))

void MASKED(void)

{
  uint uVar1;
  int iVar2;
  undefined4 *puVar3;
  long lVar4;
  ulong uVar5;
  long lVar6;
  uint uVar7;
  int iVar8;
  
  uVar1 = DAT_0021463c;
  iVar8 = (int)js;
  uVar5 = js & 0xffffffff;
  uVar7 = DAT_0021463c;
  if ((iVar8 <= (int)DAT_0021463c) && (DAT_00214638 < (int)DAT_0021463c)) goto LAB_00154382;
  if (DAT_0021463c == 0) {
    puVar3 = &pidstat_table;
    do {
      *puVar3 = 0xffffffff;
      puVar3 = puVar3 + 1;
    } while (puVar3 != (undefined4 *)&ifs_firstc);
    DAT_00214638 = 0;
    if (iVar8 < 0) {
      uVar5 = 0x8000;
      uVar7 = 0x200;
LAB_0015433a:
      do {
        iVar8 = (int)uVar5;
        uVar7 = uVar7 * 2;
        if ((int)uVar7 < 1) break;
      } while ((int)uVar7 < iVar8);
      goto LAB_00154344;
    }
    uVar7 = 0x200;
    iVar2 = 0x7fffffff;
    if (0x200 < iVar8) goto LAB_0015433a;
  }
  else {
    if (iVar8 < 0) {
      uVar5 = 0x8000;
    }
    iVar8 = (int)uVar5;
    if ((0 < (int)DAT_0021463c) && ((int)DAT_0021463c < iVar8)) goto LAB_0015433a;
LAB_00154344:
    iVar2 = (-(uint)(uVar7 - 1 < 0x8000) & 0x7fff7fff) + 0x8000;
    if (0x7fff < uVar7 - 1) {
      uVar7 = 0x8000;
    }
  }
  if (iVar8 < iVar2) {
    iVar2 = iVar8;
  }
  if ((int)uVar1 < iVar2) {
    bgpids = xrealloc(bgpids,(long)(int)uVar7 << 4);
    if ((int)DAT_0021463c < (int)uVar7) {
      lVar6 = (long)(int)DAT_0021463c * 0x10 + bgpids;
      lVar4 = bgpids + ((long)(int)DAT_0021463c + 1 + (ulong)(~DAT_0021463c + uVar7)) * 0x10;
      do {
        *(undefined4 *)(lVar6 + 8) = 0xffffffff;
        lVar6 = lVar6 + 0x10;
      } while (lVar6 != lVar4);
    }
  }
  else {
    uVar7 = DAT_0021463c;
    if ((int)uVar1 <= DAT_00214638) {
      DAT_00214638 = 0;
    }
  }
LAB_00154382:
  DAT_0021463c = uVar7;
  FUN_00153be4(DAT_00214638);
  DAT_00214638 = DAT_00214638 + 1;
  return;
}

