
/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

reg_errcode_t re_node_set_merge(re_node_set *dest,re_node_set *src)

{
  int *piVar1;
  Idx *pIVar2;
  int iVar3;
  int iVar4;
  Idx *pIVar5;
  int iVar6;
  uint uVar7;
  uint uVar8;
  int iVar9;
  int local_24;
  
  if ((src != (re_node_set *)0x0) && (iVar9 = src->nelem, iVar9 != 0)) {
    iVar3 = dest->nelem;
    if (dest->alloc < iVar3 + iVar9 * 2) {
      iVar9 = iVar9 + dest->alloc;
      pIVar5 = (Idx *)realloc(dest->elems,iVar9 * 8);
      if (pIVar5 == (Idx *)0x0) {
        return _REG_ESPACE;
      }
      dest->elems = pIVar5;
      dest->alloc = iVar9 * 2;
      iVar3 = dest->nelem;
      iVar9 = src->nelem;
    }
    if (iVar3 == 0) {
      dest->nelem = iVar9;
      memcpy(dest->elems,src->elems,src->nelem << 2);
      return _REG_NOERROR;
    }
    local_24 = iVar3 + iVar9 * 2;
    uVar7 = iVar9 - 1;
    iVar3 = iVar3 + -1;
    if ((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)) {
      pIVar5 = dest->elems;
      pIVar2 = src->elems;
      do {
        iVar9 = pIVar2[uVar7];
        iVar6 = pIVar5[iVar3];
        if (iVar6 == iVar9) {
          uVar7 = uVar7 - 1;
          iVar3 = iVar3 + -1;
          uVar8 = ~uVar7;
          if ((int)uVar7 < 0) break;
        }
        else {
          if (iVar6 < iVar9) {
            local_24 = local_24 + -1;
            uVar7 = uVar7 - 1;
            pIVar5[local_24] = iVar9;
            uVar8 = ~uVar7;
          }
          else {
            iVar3 = iVar3 + -1;
          }
          if (-1 < (int)uVar8) break;
        }
      } while (-1 < iVar3);
    }
    if (-1 < (int)uVar7) {
      local_24 = local_24 - (uVar7 + 1);
      memcpy(dest->elems + local_24,src->elems,(uVar7 + 1) * 4);
    }
    iVar3 = dest->nelem;
    iVar9 = iVar3 + -1 + src->nelem * 2;
    iVar6 = (iVar9 - local_24) + 1;
    if (iVar6 != 0) {
      iVar4 = iVar3 + -1;
      dest->nelem = iVar3 + iVar6;
      pIVar5 = dest->elems;
      do {
        while( true ) {
          piVar1 = pIVar5 + iVar9;
          if (*piVar1 <= pIVar5[iVar4]) break;
          iVar9 = iVar9 + -1;
          pIVar5[iVar4 + iVar6] = *piVar1;
          iVar6 = iVar6 + -1;
          if (iVar6 == 0) {
            return _REG_NOERROR;
          }
        }
        pIVar5[iVar4 + iVar6] = pIVar5[iVar4];
        iVar4 = iVar4 + -1;
      } while (-1 < iVar4);
      memcpy(pIVar5,pIVar5 + local_24,iVar6 << 2);
    }
  }
  return _REG_NOERROR;
}



/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

undefined4 FUN_00017bd0(int *param_1,int param_2)

{
  int *piVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  void *pvVar5;
  int iVar6;
  uint uVar7;
  uint uVar8;
  int iVar9;
  int local_24;
  
  if ((param_2 != 0) && (iVar9 = *(int *)(param_2 + 4), iVar9 != 0)) {
    iVar3 = param_1[1];
    if (*param_1 < iVar3 + iVar9 * 2) {
      iVar9 = iVar9 + *param_1;
      pvVar5 = realloc((void *)param_1[2],iVar9 * 8);
      if (pvVar5 == (void *)0x0) {
        return 0xc;
      }
      param_1[2] = (int)pvVar5;
      *param_1 = iVar9 * 2;
      iVar3 = param_1[1];
      iVar9 = *(int *)(param_2 + 4);
    }
    if (iVar3 == 0) {
      param_1[1] = iVar9;
      memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2);
      return 0;
    }
    local_24 = iVar3 + iVar9 * 2;
    uVar7 = iVar9 - 1;
    iVar3 = iVar3 + -1;
    if ((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)) {
      iVar9 = param_1[2];
      iVar6 = *(int *)(param_2 + 8);
      do {
        iVar4 = *(int *)(iVar6 + uVar7 * 4);
        iVar2 = *(int *)(iVar9 + iVar3 * 4);
        if (iVar2 == iVar4) {
          uVar7 = uVar7 - 1;
          iVar3 = iVar3 + -1;
          uVar8 = ~uVar7;
          if ((int)uVar7 < 0) break;
        }
        else {
          if (iVar2 < iVar4) {
            local_24 = local_24 + -1;
            uVar7 = uVar7 - 1;
            *(int *)(iVar9 + local_24 * 4) = iVar4;
            uVar8 = ~uVar7;
          }
          else {
            iVar3 = iVar3 + -1;
          }
          if (-1 < (int)uVar8) break;
        }
      } while (-1 < iVar3);
    }
    if (-1 < (int)uVar7) {
      local_24 = local_24 - (uVar7 + 1);
      memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4);
    }
    iVar3 = param_1[1];
    iVar9 = iVar3 + -1 + *(int *)(param_2 + 4) * 2;
    iVar6 = (iVar9 - local_24) + 1;
    if (iVar6 != 0) {
      iVar4 = iVar3 + -1;
      param_1[1] = iVar3 + iVar6;
      pvVar5 = (void *)param_1[2];
      do {
        while( true ) {
          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);
          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);
          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);
          if (iVar3 <= iVar2) break;
          iVar9 = iVar9 + -1;
          *piVar1 = iVar3;
          iVar6 = iVar6 + -1;
          if (iVar6 == 0) {
            return 0;
          }
        }
        *piVar1 = iVar2;
        iVar4 = iVar4 + -1;
      } while (-1 < iVar4);
      memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2);
    }
  }
  return 0;
}


CALL 0x0001294c
ADD EAX,0x1b42b
PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
SUB ESP,0x1c
MOV dword ptr [ESP + 0xc],EAX
MOV EAX,dword ptr [ESP + 0x34]
MOV EBP,dword ptr [ESP + 0x30]
TEST EAX,EAX
JZ 0x00017d08
MOV EAX,dword ptr [ESP + 0x34]
MOV EDX,dword ptr [EAX + 0x4]
TEST EDX,EDX
JZ 0x00017d08
MOV ESI,dword ptr [EBP + 0x4]
MOV EAX,dword ptr [EBP]
LEA ECX,[ESI + EDX*0x2]
CMP EAX,ECX
JL 0x00017d50
TEST ESI,ESI
JZ 0x00017d87
LEA ECX,[ESI + EDX*0x2]
MOV EAX,ESI
SUB EDX,0x1
MOV dword ptr [ESP + 0x8],ECX
SUB EAX,0x1
JS 0x00017c90
MOV EBX,EDX
XOR EBX,0xffffffff
JNS 0x00017c90
MOV EDI,dword ptr [ESP + 0x34]
MOV ESI,dword ptr [EBP + 0x8]
MOV dword ptr [ESP + 0x30],EBP
MOV EBP,ECX
MOV EDI,dword ptr [EDI + 0x8]
JMP 0x00017c6b
JGE 0x00017d18
SUB EBP,0x1
SUB EDX,0x1
MOV dword ptr [ESI + EBP*0x4],ECX
MOV EBX,EDX
NOT EBX
TEST EBX,EBX
JNS 0x00017c88
TEST EAX,EAX
JS 0x00017c88
MOV ECX,dword ptr [EDI + EDX*0x4]
CMP dword ptr [ESI + EAX*0x4],ECX
JNZ 0x00017c50
SUB EDX,0x1
SUB EAX,0x1
MOV EBX,EDX
NOT EBX
TEST EBX,EBX
JS 0x00017c67
LEA ESI,[ESI]
MOV dword ptr [ESP + 0x8],EBP
MOV EBP,dword ptr [ESP + 0x30]
TEST EDX,EDX
JS 0x00017cc0
MOV EAX,dword ptr [EBP + 0x8]
ADD EDX,0x1
SUB dword ptr [ESP + 0x8],EDX
SUB ESP,0x4
MOV EDI,dword ptr [ESP + 0xc]
SHL EDX,0x2
PUSH EDX
LEA EAX,[EAX + EDI*0x4]
MOV EDI,dword ptr [ESP + 0x3c]
PUSH dword ptr [EDI + 0x8]
PUSH EAX
MOV EBX,dword ptr [ESP + 0x1c]
CALL 0x000110e0
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x34]
MOV EDX,dword ptr [EBP + 0x4]
MOV EAX,dword ptr [EAX + 0x4]
LEA EDI,[EDX + EAX*0x2 + -0x1]
MOV ECX,EDI
SUB ECX,dword ptr [ESP + 0x8]
ADD ECX,0x1
JZ 0x00017d08
LEA EAX,[EDX + -0x1]
ADD EDX,ECX
MOV dword ptr [EBP + 0x4],EDX
MOV EDX,dword ptr [EBP + 0x8]
LEA ESI,[ESI]
MOV ESI,dword ptr [EDX + EDI*0x4]
MOV EBX,dword ptr [EDX + EAX*0x4]
LEA EBP,[EAX + ECX*0x1]
LEA EBP,[EDX + EBP*0x4]
CMP ESI,EBX
JLE 0x00017d20
SUB EDI,0x1
MOV dword ptr [EBP],ESI
SUB ECX,0x1
JNZ 0x00017ce8
LEA ESI,[ESI]
NOP
XOR ESI,ESI
ADD ESP,0x1c
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB EAX,0x1
JMP 0x00017c63
MOV dword ptr [EBP],EBX
SUB EAX,0x1
JNS 0x00017ce8
MOV EAX,dword ptr [ESP + 0x8]
SHL ECX,0x2
SUB ESP,0x4
PUSH ECX
LEA EAX,[EDX + EAX*0x4]
PUSH EAX
PUSH EDX
MOV EBX,dword ptr [ESP + 0x1c]
CALL 0x000110e0
ADD ESP,0x10
JMP 0x00017d08
ADD EDX,EAX
SUB ESP,0x8
LEA ESI,[EDX + EDX*0x1]
SHL EDX,0x3
PUSH EDX
PUSH dword ptr [EBP + 0x8]
MOV EBX,dword ptr [ESP + 0x1c]
CALL 0x00011240
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00017db7
MOV dword ptr [EBP + 0x8],EAX
MOV EAX,dword ptr [ESP + 0x34]
MOV dword ptr [EBP],ESI
MOV ESI,dword ptr [EBP + 0x4]
MOV EDX,dword ptr [EAX + 0x4]
TEST ESI,ESI
JNZ 0x00017c1d
MOV EAX,dword ptr [ESP + 0x34]
MOV dword ptr [EBP + 0x4],EDX
SUB ESP,0x4
MOV EAX,dword ptr [EAX + 0x4]
MOV dword ptr [ESP + 0xc],EAX
SHL EAX,0x2
PUSH EAX
MOV EAX,dword ptr [ESP + 0x3c]
PUSH dword ptr [EAX + 0x8]
PUSH dword ptr [EBP + 0x8]
MOV EBX,dword ptr [ESP + 0x1c]
CALL 0x000110e0
ADD ESP,0x10
JMP 0x00017d0a
MOV ESI,0xc
JMP 0x00017d0a
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n\nundefined4 FUN_00017bd0(int *param_1,int param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  void *pvVar5;\n  int iVar6;\n  uint uVar7;\n  uint uVar8;\n  int iVar9;\n  int local_24;\n  \n  if ((param_2 != 0) && (iVar9 = *(int *)(param_2 + 4), iVar9 != 0)) {\n    iVar3 = param_1[1];\n    if (*param_1 < iVar3 + iVar9 * 2) {\n      iVar9 = iVar9 + *param_1;\n      pvVar5 = realloc((void *)param_1[2],iVar9 * 8);\n      if (pvVar5 == (void *)0x0) {\n        return 0xc;\n      }\n      param_1[2] = (int)pvVar5;\n      *param_1 = iVar9 * 2;\n      iVar3 = param_1[1];\n      iVar9 = *(int *)(param_2 + 4);\n    }\n    if (iVar3 == 0) {\n      param_1[1] = iVar9;\n      memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2);\n      return 0;\n    }\n    local_24 = iVar3 + iVar9 * 2;\n    uVar7 = iVar9 - 1;\n    iVar3 = iVar3 + -1;\n    if ((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)) {\n      iVar9 = param_1[2];\n      iVar6 = *(int *)(param_2 + 8);\n      do {\n        iVar4 = *(int *)(iVar6 + uVar7 * 4);\n        iVar2 = *(int *)(iVar9 + iVar3 * 4);\n        if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }\n    if (-1 < (int)uVar7) {\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4);\n    }\n    iVar3 = param_1[1];\n    iVar9 = iVar3 + -1 + *(int *)(param_2 + 4) * 2;\n    iVar6 = (iVar9 - local_24) + 1;\n    if (iVar6 != 0) {\n      iVar4 = iVar3 + -1;\n      param_1[1] = iVar3 + iVar6;\n      pvVar5 = (void *)param_1[2];\n      do {\n        while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }\n        *piVar1 = iVar2;\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2);\n    }\n  }\n  return 0;\n}\n\n" comment (function_definition "undefined4 FUN_00017bd0(int *param_1,int param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  void *pvVar5;\n  int iVar6;\n  uint uVar7;\n  uint uVar8;\n  int iVar9;\n  int local_24;\n  \n  if ((param_2 != 0) && (iVar9 = *(int *)(param_2 + 4), iVar9 != 0)) {\n    iVar3 = param_1[1];\n    if (*param_1 < iVar3 + iVar9 * 2) {\n      iVar9 = iVar9 + *param_1;\n      pvVar5 = realloc((void *)param_1[2],iVar9 * 8);\n      if (pvVar5 == (void *)0x0) {\n        return 0xc;\n      }\n      param_1[2] = (int)pvVar5;\n      *param_1 = iVar9 * 2;\n      iVar3 = param_1[1];\n      iVar9 = *(int *)(param_2 + 4);\n    }\n    if (iVar3 == 0) {\n      param_1[1] = iVar9;\n      memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2);\n      return 0;\n    }\n    local_24 = iVar3 + iVar9 * 2;\n    uVar7 = iVar9 - 1;\n    iVar3 = iVar3 + -1;\n    if ((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)) {\n      iVar9 = param_1[2];\n      iVar6 = *(int *)(param_2 + 8);\n      do {\n        iVar4 = *(int *)(iVar6 + uVar7 * 4);\n        iVar2 = *(int *)(iVar9 + iVar3 * 4);\n        if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }\n    if (-1 < (int)uVar7) {\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4);\n    }\n    iVar3 = param_1[1];\n    iVar9 = iVar3 + -1 + *(int *)(param_2 + 4) * 2;\n    iVar6 = (iVar9 - local_24) + 1;\n    if (iVar6 != 0) {\n      iVar4 = iVar3 + -1;\n      param_1[1] = iVar3 + iVar6;\n      pvVar5 = (void *)param_1[2];\n      do {\n        while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }\n        *piVar1 = iVar2;\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2);\n    }\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_00017bd0(int *param_1,int param_2)" identifier (parameter_list "(int *param_1,int param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  void *pvVar5;\n  int iVar6;\n  uint uVar7;\n  uint uVar8;\n  int iVar9;\n  int local_24;\n  \n  if ((param_2 != 0) && (iVar9 = *(int *)(param_2 + 4), iVar9 != 0)) {\n    iVar3 = param_1[1];\n    if (*param_1 < iVar3 + iVar9 * 2) {\n      iVar9 = iVar9 + *param_1;\n      pvVar5 = realloc((void *)param_1[2],iVar9 * 8);\n      if (pvVar5 == (void *)0x0) {\n        return 0xc;\n      }\n      param_1[2] = (int)pvVar5;\n      *param_1 = iVar9 * 2;\n      iVar3 = param_1[1];\n      iVar9 = *(int *)(param_2 + 4);\n    }\n    if (iVar3 == 0) {\n      param_1[1] = iVar9;\n      memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2);\n      return 0;\n    }\n    local_24 = iVar3 + iVar9 * 2;\n    uVar7 = iVar9 - 1;\n    iVar3 = iVar3 + -1;\n    if ((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)) {\n      iVar9 = param_1[2];\n      iVar6 = *(int *)(param_2 + 8);\n      do {\n        iVar4 = *(int *)(iVar6 + uVar7 * 4);\n        iVar2 = *(int *)(iVar9 + iVar3 * 4);\n        if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }\n    if (-1 < (int)uVar7) {\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4);\n    }\n    iVar3 = param_1[1];\n    iVar9 = iVar3 + -1 + *(int *)(param_2 + 4) * 2;\n    iVar6 = (iVar9 - local_24) + 1;\n    if (iVar6 != 0) {\n      iVar4 = iVar3 + -1;\n      param_1[1] = iVar3 + iVar6;\n      pvVar5 = (void *)param_1[2];\n      do {\n        while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }\n        *piVar1 = iVar2;\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2);\n    }\n  }\n  return 0;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "void *pvVar5;" primitive_type (pointer_declarator "*pvVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "uint uVar8;" type_identifier identifier ;) (declaration "int iVar9;" primitive_type identifier ;) (declaration "int local_24;" primitive_type identifier ;) (if_statement "if ((param_2 != 0) && (iVar9 = *(int *)(param_2 + 4), iVar9 != 0)) {\n    iVar3 = param_1[1];\n    if (*param_1 < iVar3 + iVar9 * 2) {\n      iVar9 = iVar9 + *param_1;\n      pvVar5 = realloc((void *)param_1[2],iVar9 * 8);\n      if (pvVar5 == (void *)0x0) {\n        return 0xc;\n      }\n      param_1[2] = (int)pvVar5;\n      *param_1 = iVar9 * 2;\n      iVar3 = param_1[1];\n      iVar9 = *(int *)(param_2 + 4);\n    }\n    if (iVar3 == 0) {\n      param_1[1] = iVar9;\n      memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2);\n      return 0;\n    }\n    local_24 = iVar3 + iVar9 * 2;\n    uVar7 = iVar9 - 1;\n    iVar3 = iVar3 + -1;\n    if ((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)) {\n      iVar9 = param_1[2];\n      iVar6 = *(int *)(param_2 + 8);\n      do {\n        iVar4 = *(int *)(iVar6 + uVar7 * 4);\n        iVar2 = *(int *)(iVar9 + iVar3 * 4);\n        if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }\n    if (-1 < (int)uVar7) {\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4);\n    }\n    iVar3 = param_1[1];\n    iVar9 = iVar3 + -1 + *(int *)(param_2 + 4) * 2;\n    iVar6 = (iVar9 - local_24) + 1;\n    if (iVar6 != 0) {\n      iVar4 = iVar3 + -1;\n      param_1[1] = iVar3 + iVar6;\n      pvVar5 = (void *)param_1[2];\n      do {\n        while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }\n        *piVar1 = iVar2;\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2);\n    }\n  }" if (parenthesized_expression "((param_2 != 0) && (iVar9 = *(int *)(param_2 + 4), iVar9 != 0))" ( (binary_expression "(param_2 != 0) && (iVar9 = *(int *)(param_2 + 4), iVar9 != 0)" (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) && (parenthesized_expression "(iVar9 = *(int *)(param_2 + 4), iVar9 != 0)" ( (comma_expression "iVar9 = *(int *)(param_2 + 4), iVar9 != 0" (assignment_expression "iVar9 = *(int *)(param_2 + 4)" identifier = (pointer_expression "*(int *)(param_2 + 4)" * (cast_expression "(int *)(param_2 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) ))))) , (binary_expression "iVar9 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n    iVar3 = param_1[1];\n    if (*param_1 < iVar3 + iVar9 * 2) {\n      iVar9 = iVar9 + *param_1;\n      pvVar5 = realloc((void *)param_1[2],iVar9 * 8);\n      if (pvVar5 == (void *)0x0) {\n        return 0xc;\n      }\n      param_1[2] = (int)pvVar5;\n      *param_1 = iVar9 * 2;\n      iVar3 = param_1[1];\n      iVar9 = *(int *)(param_2 + 4);\n    }\n    if (iVar3 == 0) {\n      param_1[1] = iVar9;\n      memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2);\n      return 0;\n    }\n    local_24 = iVar3 + iVar9 * 2;\n    uVar7 = iVar9 - 1;\n    iVar3 = iVar3 + -1;\n    if ((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)) {\n      iVar9 = param_1[2];\n      iVar6 = *(int *)(param_2 + 8);\n      do {\n        iVar4 = *(int *)(iVar6 + uVar7 * 4);\n        iVar2 = *(int *)(iVar9 + iVar3 * 4);\n        if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }\n    if (-1 < (int)uVar7) {\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4);\n    }\n    iVar3 = param_1[1];\n    iVar9 = iVar3 + -1 + *(int *)(param_2 + 4) * 2;\n    iVar6 = (iVar9 - local_24) + 1;\n    if (iVar6 != 0) {\n      iVar4 = iVar3 + -1;\n      param_1[1] = iVar3 + iVar6;\n      pvVar5 = (void *)param_1[2];\n      do {\n        while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }\n        *piVar1 = iVar2;\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2);\n    }\n  }" { (expression_statement "iVar3 = param_1[1];" (assignment_expression "iVar3 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (if_statement "if (*param_1 < iVar3 + iVar9 * 2) {\n      iVar9 = iVar9 + *param_1;\n      pvVar5 = realloc((void *)param_1[2],iVar9 * 8);\n      if (pvVar5 == (void *)0x0) {\n        return 0xc;\n      }\n      param_1[2] = (int)pvVar5;\n      *param_1 = iVar9 * 2;\n      iVar3 = param_1[1];\n      iVar9 = *(int *)(param_2 + 4);\n    }" if (parenthesized_expression "(*param_1 < iVar3 + iVar9 * 2)" ( (binary_expression "*param_1 < iVar3 + iVar9 * 2" (pointer_expression "*param_1" * identifier) < (binary_expression "iVar3 + iVar9 * 2" identifier + (binary_expression "iVar9 * 2" identifier * number_literal))) )) (compound_statement "{\n      iVar9 = iVar9 + *param_1;\n      pvVar5 = realloc((void *)param_1[2],iVar9 * 8);\n      if (pvVar5 == (void *)0x0) {\n        return 0xc;\n      }\n      param_1[2] = (int)pvVar5;\n      *param_1 = iVar9 * 2;\n      iVar3 = param_1[1];\n      iVar9 = *(int *)(param_2 + 4);\n    }" { (expression_statement "iVar9 = iVar9 + *param_1;" (assignment_expression "iVar9 = iVar9 + *param_1" identifier = (binary_expression "iVar9 + *param_1" identifier + (pointer_expression "*param_1" * identifier))) ;) (expression_statement "pvVar5 = realloc((void *)param_1[2],iVar9 * 8);" (assignment_expression "pvVar5 = realloc((void *)param_1[2],iVar9 * 8)" identifier = (call_expression "realloc((void *)param_1[2],iVar9 * 8)" identifier (argument_list "((void *)param_1[2],iVar9 * 8)" ( (cast_expression "(void *)param_1[2]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[2]" identifier [ number_literal ])) , (binary_expression "iVar9 * 8" identifier * number_literal) )))) ;) (if_statement "if (pvVar5 == (void *)0x0) {\n        return 0xc;\n      }" if (parenthesized_expression "(pvVar5 == (void *)0x0)" ( (binary_expression "pvVar5 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return 0xc;\n      }" { (return_statement "return 0xc;" return number_literal ;) })) (expression_statement "param_1[2] = (int)pvVar5;" (assignment_expression "param_1[2] = (int)pvVar5" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (cast_expression "(int)pvVar5" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "*param_1 = iVar9 * 2;" (assignment_expression "*param_1 = iVar9 * 2" (pointer_expression "*param_1" * identifier) = (binary_expression "iVar9 * 2" identifier * number_literal)) ;) (expression_statement "iVar3 = param_1[1];" (assignment_expression "iVar3 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "iVar9 = *(int *)(param_2 + 4);" (assignment_expression "iVar9 = *(int *)(param_2 + 4)" identifier = (pointer_expression "*(int *)(param_2 + 4)" * (cast_expression "(int *)(param_2 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) ))))) ;) })) (if_statement "if (iVar3 == 0) {\n      param_1[1] = iVar9;\n      memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2);\n      return 0;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      param_1[1] = iVar9;\n      memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2);\n      return 0;\n    }" { (expression_statement "param_1[1] = iVar9;" (assignment_expression "param_1[1] = iVar9" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2);" (call_expression "memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2)" identifier (argument_list "((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2)" ( (cast_expression "(void *)param_1[2]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[2]" identifier [ number_literal ])) , (pointer_expression "*(void **)(param_2 + 8)" * (cast_expression "(void **)(param_2 + 8)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) , (binary_expression "*(int *)(param_2 + 4) << 2" (pointer_expression "*(int *)(param_2 + 4)" * (cast_expression "(int *)(param_2 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) )))) << number_literal) ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "local_24 = iVar3 + iVar9 * 2;" (assignment_expression "local_24 = iVar3 + iVar9 * 2" identifier = (binary_expression "iVar3 + iVar9 * 2" identifier + (binary_expression "iVar9 * 2" identifier * number_literal))) ;) (expression_statement "uVar7 = iVar9 - 1;" (assignment_expression "uVar7 = iVar9 - 1" identifier = (binary_expression "iVar9 - 1" identifier - number_literal)) ;) (expression_statement "iVar3 = iVar3 + -1;" (assignment_expression "iVar3 = iVar3 + -1" identifier = (binary_expression "iVar3 + -1" identifier + number_literal)) ;) (if_statement "if ((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)) {\n      iVar9 = param_1[2];\n      iVar6 = *(int *)(param_2 + 8);\n      do {\n        iVar4 = *(int *)(iVar6 + uVar7 * 4);\n        iVar2 = *(int *)(iVar9 + iVar3 * 4);\n        if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }" if (parenthesized_expression "((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0))" ( (binary_expression "(-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)" (parenthesized_expression "(-1 < iVar3)" ( (binary_expression "-1 < iVar3" number_literal < identifier) )) && (parenthesized_expression "(uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)" ( (comma_expression "uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0" (assignment_expression "uVar8 = uVar7 ^ 0xffffffff" identifier = (binary_expression "uVar7 ^ 0xffffffff" identifier ^ number_literal)) , (binary_expression "(int)uVar8 < 0" (cast_expression "(int)uVar8" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal)) ))) )) (compound_statement "{\n      iVar9 = param_1[2];\n      iVar6 = *(int *)(param_2 + 8);\n      do {\n        iVar4 = *(int *)(iVar6 + uVar7 * 4);\n        iVar2 = *(int *)(iVar9 + iVar3 * 4);\n        if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }" { (expression_statement "iVar9 = param_1[2];" (assignment_expression "iVar9 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) (expression_statement "iVar6 = *(int *)(param_2 + 8);" (assignment_expression "iVar6 = *(int *)(param_2 + 8)" identifier = (pointer_expression "*(int *)(param_2 + 8)" * (cast_expression "(int *)(param_2 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) ))))) ;) (do_statement "do {\n        iVar4 = *(int *)(iVar6 + uVar7 * 4);\n        iVar2 = *(int *)(iVar9 + iVar3 * 4);\n        if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);" do (compound_statement "{\n        iVar4 = *(int *)(iVar6 + uVar7 * 4);\n        iVar2 = *(int *)(iVar9 + iVar3 * 4);\n        if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      }" { (expression_statement "iVar4 = *(int *)(iVar6 + uVar7 * 4);" (assignment_expression "iVar4 = *(int *)(iVar6 + uVar7 * 4)" identifier = (pointer_expression "*(int *)(iVar6 + uVar7 * 4)" * (cast_expression "(int *)(iVar6 + uVar7 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + uVar7 * 4)" ( (binary_expression "iVar6 + uVar7 * 4" identifier + (binary_expression "uVar7 * 4" identifier * number_literal)) ))))) ;) (expression_statement "iVar2 = *(int *)(iVar9 + iVar3 * 4);" (assignment_expression "iVar2 = *(int *)(iVar9 + iVar3 * 4)" identifier = (pointer_expression "*(int *)(iVar9 + iVar3 * 4)" * (cast_expression "(int *)(iVar9 + iVar3 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar9 + iVar3 * 4)" ( (binary_expression "iVar9 + iVar3 * 4" identifier + (binary_expression "iVar3 * 4" identifier * number_literal)) ))))) ;) (if_statement "if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }" if (parenthesized_expression "(iVar2 == iVar4)" ( (binary_expression "iVar2 == iVar4" identifier == identifier) )) (compound_statement "{\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }" { (expression_statement "uVar7 = uVar7 - 1;" (assignment_expression "uVar7 = uVar7 - 1" identifier = (binary_expression "uVar7 - 1" identifier - number_literal)) ;) (expression_statement "iVar3 = iVar3 + -1;" (assignment_expression "iVar3 = iVar3 + -1" identifier = (binary_expression "iVar3 + -1" identifier + number_literal)) ;) (expression_statement "uVar8 = ~uVar7;" (assignment_expression "uVar8 = ~uVar7" identifier = (unary_expression "~uVar7" ~ identifier)) ;) (if_statement "if ((int)uVar7 < 0) break;" if (parenthesized_expression "((int)uVar7 < 0)" ( (binary_expression "(int)uVar7 < 0" (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (break_statement "break;" break ;)) }) (else_clause "else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }" else (compound_statement "{\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }" { (if_statement "if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }" if (parenthesized_expression "(iVar2 < iVar4)" ( (binary_expression "iVar2 < iVar4" identifier < identifier) )) (compound_statement "{\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }" { (expression_statement "local_24 = local_24 + -1;" (assignment_expression "local_24 = local_24 + -1" identifier = (binary_expression "local_24 + -1" identifier + number_literal)) ;) (expression_statement "uVar7 = uVar7 - 1;" (assignment_expression "uVar7 = uVar7 - 1" identifier = (binary_expression "uVar7 - 1" identifier - number_literal)) ;) (expression_statement "*(int *)(iVar9 + local_24 * 4) = iVar4;" (assignment_expression "*(int *)(iVar9 + local_24 * 4) = iVar4" (pointer_expression "*(int *)(iVar9 + local_24 * 4)" * (cast_expression "(int *)(iVar9 + local_24 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar9 + local_24 * 4)" ( (binary_expression "iVar9 + local_24 * 4" identifier + (binary_expression "local_24 * 4" identifier * number_literal)) )))) = identifier) ;) (expression_statement "uVar8 = ~uVar7;" (assignment_expression "uVar8 = ~uVar7" identifier = (unary_expression "~uVar7" ~ identifier)) ;) }) (else_clause "else {\n            iVar3 = iVar3 + -1;\n          }" else (compound_statement "{\n            iVar3 = iVar3 + -1;\n          }" { (expression_statement "iVar3 = iVar3 + -1;" (assignment_expression "iVar3 = iVar3 + -1" identifier = (binary_expression "iVar3 + -1" identifier + number_literal)) ;) }))) (if_statement "if (-1 < (int)uVar8) break;" if (parenthesized_expression "(-1 < (int)uVar8)" ( (binary_expression "-1 < (int)uVar8" number_literal < (cast_expression "(int)uVar8" ( (type_descriptor "int" primitive_type) ) identifier)) )) (break_statement "break;" break ;)) }))) }) while (parenthesized_expression "(-1 < iVar3)" ( (binary_expression "-1 < iVar3" number_literal < identifier) )) ;) })) (if_statement "if (-1 < (int)uVar7) {\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4);\n    }" if (parenthesized_expression "(-1 < (int)uVar7)" ( (binary_expression "-1 < (int)uVar7" number_literal < (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4);\n    }" { (expression_statement "local_24 = local_24 - (uVar7 + 1);" (assignment_expression "local_24 = local_24 - (uVar7 + 1)" identifier = (binary_expression "local_24 - (uVar7 + 1)" identifier - (parenthesized_expression "(uVar7 + 1)" ( (binary_expression "uVar7 + 1" identifier + number_literal) )))) ;) (expression_statement "memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4);" (call_expression "memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4)" identifier (argument_list "((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4)" ( (cast_expression "(void *)(param_1[2] + local_24 * 4)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[2] + local_24 * 4)" ( (binary_expression "param_1[2] + local_24 * 4" (subscript_expression "param_1[2]" identifier [ number_literal ]) + (binary_expression "local_24 * 4" identifier * number_literal)) ))) , (pointer_expression "*(void **)(param_2 + 8)" * (cast_expression "(void **)(param_2 + 8)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) , (binary_expression "(uVar7 + 1) * 4" (parenthesized_expression "(uVar7 + 1)" ( (binary_expression "uVar7 + 1" identifier + number_literal) )) * number_literal) ))) ;) })) (expression_statement "iVar3 = param_1[1];" (assignment_expression "iVar3 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "iVar9 = iVar3 + -1 + *(int *)(param_2 + 4) * 2;" (assignment_expression "iVar9 = iVar3 + -1 + *(int *)(param_2 + 4) * 2" identifier = (binary_expression "iVar3 + -1 + *(int *)(param_2 + 4) * 2" (binary_expression "iVar3 + -1" identifier + number_literal) + (binary_expression "*(int *)(param_2 + 4) * 2" (pointer_expression "*(int *)(param_2 + 4)" * (cast_expression "(int *)(param_2 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) )))) * number_literal))) ;) (expression_statement "iVar6 = (iVar9 - local_24) + 1;" (assignment_expression "iVar6 = (iVar9 - local_24) + 1" identifier = (binary_expression "(iVar9 - local_24) + 1" (parenthesized_expression "(iVar9 - local_24)" ( (binary_expression "iVar9 - local_24" identifier - identifier) )) + number_literal)) ;) (if_statement "if (iVar6 != 0) {\n      iVar4 = iVar3 + -1;\n      param_1[1] = iVar3 + iVar6;\n      pvVar5 = (void *)param_1[2];\n      do {\n        while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }\n        *piVar1 = iVar2;\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2);\n    }" if (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar4 = iVar3 + -1;\n      param_1[1] = iVar3 + iVar6;\n      pvVar5 = (void *)param_1[2];\n      do {\n        while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }\n        *piVar1 = iVar2;\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2);\n    }" { (expression_statement "iVar4 = iVar3 + -1;" (assignment_expression "iVar4 = iVar3 + -1" identifier = (binary_expression "iVar3 + -1" identifier + number_literal)) ;) (expression_statement "param_1[1] = iVar3 + iVar6;" (assignment_expression "param_1[1] = iVar3 + iVar6" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "iVar3 + iVar6" identifier + identifier)) ;) (expression_statement "pvVar5 = (void *)param_1[2];" (assignment_expression "pvVar5 = (void *)param_1[2]" identifier = (cast_expression "(void *)param_1[2]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[2]" identifier [ number_literal ]))) ;) (do_statement "do {\n        while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }\n        *piVar1 = iVar2;\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);" do (compound_statement "{\n        while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }\n        *piVar1 = iVar2;\n        iVar4 = iVar4 + -1;\n      }" { (while_statement "while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }" { (expression_statement "iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);" (assignment_expression "iVar3 = *(int *)((int)pvVar5 + iVar9 * 4)" identifier = (pointer_expression "*(int *)((int)pvVar5 + iVar9 * 4)" * (cast_expression "(int *)((int)pvVar5 + iVar9 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar5 + iVar9 * 4)" ( (binary_expression "(int)pvVar5 + iVar9 * 4" (cast_expression "(int)pvVar5" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "iVar9 * 4" identifier * number_literal)) ))))) ;) (expression_statement "iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);" (assignment_expression "iVar2 = *(int *)((int)pvVar5 + iVar4 * 4)" identifier = (pointer_expression "*(int *)((int)pvVar5 + iVar4 * 4)" * (cast_expression "(int *)((int)pvVar5 + iVar4 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar5 + iVar4 * 4)" ( (binary_expression "(int)pvVar5 + iVar4 * 4" (cast_expression "(int)pvVar5" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "iVar4 * 4" identifier * number_literal)) ))))) ;) (expression_statement "piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);" (assignment_expression "piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4)" identifier = (cast_expression "(int *)((int)pvVar5 + (iVar4 + iVar6) * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar5 + (iVar4 + iVar6) * 4)" ( (binary_expression "(int)pvVar5 + (iVar4 + iVar6) * 4" (cast_expression "(int)pvVar5" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "(iVar4 + iVar6) * 4" (parenthesized_expression "(iVar4 + iVar6)" ( (binary_expression "iVar4 + iVar6" identifier + identifier) )) * number_literal)) )))) ;) (if_statement "if (iVar3 <= iVar2) break;" if (parenthesized_expression "(iVar3 <= iVar2)" ( (binary_expression "iVar3 <= iVar2" identifier <= identifier) )) (break_statement "break;" break ;)) (expression_statement "iVar9 = iVar9 + -1;" (assignment_expression "iVar9 = iVar9 + -1" identifier = (binary_expression "iVar9 + -1" identifier + number_literal)) ;) (expression_statement "*piVar1 = iVar3;" (assignment_expression "*piVar1 = iVar3" (pointer_expression "*piVar1" * identifier) = identifier) ;) (expression_statement "iVar6 = iVar6 + -1;" (assignment_expression "iVar6 = iVar6 + -1" identifier = (binary_expression "iVar6 + -1" identifier + number_literal)) ;) (if_statement "if (iVar6 == 0) {\n            return 0;\n          }" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (compound_statement "{\n            return 0;\n          }" { (return_statement "return 0;" return number_literal ;) })) })) (expression_statement "*piVar1 = iVar2;" (assignment_expression "*piVar1 = iVar2" (pointer_expression "*piVar1" * identifier) = identifier) ;) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(-1 < iVar4)" ( (binary_expression "-1 < iVar4" number_literal < identifier) )) ;) (expression_statement "memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2);" (call_expression "memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2)" identifier (argument_list "(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2)" ( identifier , (cast_expression "(void *)((int)pvVar5 + local_24 * 4)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar5 + local_24 * 4)" ( (binary_expression "(int)pvVar5 + local_24 * 4" (cast_expression "(int)pvVar5" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "local_24 * 4" identifier * number_literal)) ))) , (binary_expression "iVar6 << 2" identifier << number_literal) ))) ;) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n\nreg_errcode_t re_node_set_merge(re_node_set *dest,re_node_set *src)\n\n{\n  int *piVar1;\n  Idx *pIVar2;\n  int iVar3;\n  int iVar4;\n  Idx *pIVar5;\n  int iVar6;\n  uint uVar7;\n  uint uVar8;\n  int iVar9;\n  int local_24;\n  \n  if ((src != (re_node_set *)0x0) && (iVar9 = src->nelem, iVar9 != 0)) {\n    iVar3 = dest->nelem;\n    if (dest->alloc < iVar3 + iVar9 * 2) {\n      iVar9 = iVar9 + dest->alloc;\n      pIVar5 = (Idx *)realloc(dest->elems,iVar9 * 8);\n      if (pIVar5 == (Idx *)0x0) {\n        return _REG_ESPACE;\n      }\n      dest->elems = pIVar5;\n      dest->alloc = iVar9 * 2;\n      iVar3 = dest->nelem;\n      iVar9 = src->nelem;\n    }\n    if (iVar3 == 0) {\n      dest->nelem = iVar9;\n      memcpy(dest->elems,src->elems,src->nelem << 2);\n      return _REG_NOERROR;\n    }\n    local_24 = iVar3 + iVar9 * 2;\n    uVar7 = iVar9 - 1;\n    iVar3 = iVar3 + -1;\n    if ((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)) {\n      pIVar5 = dest->elems;\n      pIVar2 = src->elems;\n      do {\n        iVar9 = pIVar2[uVar7];\n        iVar6 = pIVar5[iVar3];\n        if (iVar6 == iVar9) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar6 < iVar9) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            pIVar5[local_24] = iVar9;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }\n    if (-1 < (int)uVar7) {\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy(dest->elems + local_24,src->elems,(uVar7 + 1) * 4);\n    }\n    iVar3 = dest->nelem;\n    iVar9 = iVar3 + -1 + src->nelem * 2;\n    iVar6 = (iVar9 - local_24) + 1;\n    if (iVar6 != 0) {\n      iVar4 = iVar3 + -1;\n      dest->nelem = iVar3 + iVar6;\n      pIVar5 = dest->elems;\n      do {\n        while( true ) {\n          piVar1 = pIVar5 + iVar9;\n          if (*piVar1 <= pIVar5[iVar4]) break;\n          iVar9 = iVar9 + -1;\n          pIVar5[iVar4 + iVar6] = *piVar1;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return _REG_NOERROR;\n          }\n        }\n        pIVar5[iVar4 + iVar6] = pIVar5[iVar4];\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pIVar5,pIVar5 + local_24,iVar6 << 2);\n    }\n  }\n  return _REG_NOERROR;\n}\n\n" comment (function_definition "reg_errcode_t re_node_set_merge(re_node_set *dest,re_node_set *src)\n\n{\n  int *piVar1;\n  Idx *pIVar2;\n  int iVar3;\n  int iVar4;\n  Idx *pIVar5;\n  int iVar6;\n  uint uVar7;\n  uint uVar8;\n  int iVar9;\n  int local_24;\n  \n  if ((src != (re_node_set *)0x0) && (iVar9 = src->nelem, iVar9 != 0)) {\n    iVar3 = dest->nelem;\n    if (dest->alloc < iVar3 + iVar9 * 2) {\n      iVar9 = iVar9 + dest->alloc;\n      pIVar5 = (Idx *)realloc(dest->elems,iVar9 * 8);\n      if (pIVar5 == (Idx *)0x0) {\n        return _REG_ESPACE;\n      }\n      dest->elems = pIVar5;\n      dest->alloc = iVar9 * 2;\n      iVar3 = dest->nelem;\n      iVar9 = src->nelem;\n    }\n    if (iVar3 == 0) {\n      dest->nelem = iVar9;\n      memcpy(dest->elems,src->elems,src->nelem << 2);\n      return _REG_NOERROR;\n    }\n    local_24 = iVar3 + iVar9 * 2;\n    uVar7 = iVar9 - 1;\n    iVar3 = iVar3 + -1;\n    if ((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)) {\n      pIVar5 = dest->elems;\n      pIVar2 = src->elems;\n      do {\n        iVar9 = pIVar2[uVar7];\n        iVar6 = pIVar5[iVar3];\n        if (iVar6 == iVar9) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar6 < iVar9) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            pIVar5[local_24] = iVar9;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }\n    if (-1 < (int)uVar7) {\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy(dest->elems + local_24,src->elems,(uVar7 + 1) * 4);\n    }\n    iVar3 = dest->nelem;\n    iVar9 = iVar3 + -1 + src->nelem * 2;\n    iVar6 = (iVar9 - local_24) + 1;\n    if (iVar6 != 0) {\n      iVar4 = iVar3 + -1;\n      dest->nelem = iVar3 + iVar6;\n      pIVar5 = dest->elems;\n      do {\n        while( true ) {\n          piVar1 = pIVar5 + iVar9;\n          if (*piVar1 <= pIVar5[iVar4]) break;\n          iVar9 = iVar9 + -1;\n          pIVar5[iVar4 + iVar6] = *piVar1;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return _REG_NOERROR;\n          }\n        }\n        pIVar5[iVar4 + iVar6] = pIVar5[iVar4];\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pIVar5,pIVar5 + local_24,iVar6 << 2);\n    }\n  }\n  return _REG_NOERROR;\n}" type_identifier (function_declarator "re_node_set_merge(re_node_set *dest,re_node_set *src)" identifier (parameter_list "(re_node_set *dest,re_node_set *src)" ( (parameter_declaration "re_node_set *dest" type_identifier (pointer_declarator "*dest" * identifier)) , (parameter_declaration "re_node_set *src" type_identifier (pointer_declarator "*src" * identifier)) ))) (compound_statement "{\n  int *piVar1;\n  Idx *pIVar2;\n  int iVar3;\n  int iVar4;\n  Idx *pIVar5;\n  int iVar6;\n  uint uVar7;\n  uint uVar8;\n  int iVar9;\n  int local_24;\n  \n  if ((src != (re_node_set *)0x0) && (iVar9 = src->nelem, iVar9 != 0)) {\n    iVar3 = dest->nelem;\n    if (dest->alloc < iVar3 + iVar9 * 2) {\n      iVar9 = iVar9 + dest->alloc;\n      pIVar5 = (Idx *)realloc(dest->elems,iVar9 * 8);\n      if (pIVar5 == (Idx *)0x0) {\n        return _REG_ESPACE;\n      }\n      dest->elems = pIVar5;\n      dest->alloc = iVar9 * 2;\n      iVar3 = dest->nelem;\n      iVar9 = src->nelem;\n    }\n    if (iVar3 == 0) {\n      dest->nelem = iVar9;\n      memcpy(dest->elems,src->elems,src->nelem << 2);\n      return _REG_NOERROR;\n    }\n    local_24 = iVar3 + iVar9 * 2;\n    uVar7 = iVar9 - 1;\n    iVar3 = iVar3 + -1;\n    if ((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)) {\n      pIVar5 = dest->elems;\n      pIVar2 = src->elems;\n      do {\n        iVar9 = pIVar2[uVar7];\n        iVar6 = pIVar5[iVar3];\n        if (iVar6 == iVar9) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar6 < iVar9) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            pIVar5[local_24] = iVar9;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }\n    if (-1 < (int)uVar7) {\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy(dest->elems + local_24,src->elems,(uVar7 + 1) * 4);\n    }\n    iVar3 = dest->nelem;\n    iVar9 = iVar3 + -1 + src->nelem * 2;\n    iVar6 = (iVar9 - local_24) + 1;\n    if (iVar6 != 0) {\n      iVar4 = iVar3 + -1;\n      dest->nelem = iVar3 + iVar6;\n      pIVar5 = dest->elems;\n      do {\n        while( true ) {\n          piVar1 = pIVar5 + iVar9;\n          if (*piVar1 <= pIVar5[iVar4]) break;\n          iVar9 = iVar9 + -1;\n          pIVar5[iVar4 + iVar6] = *piVar1;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return _REG_NOERROR;\n          }\n        }\n        pIVar5[iVar4 + iVar6] = pIVar5[iVar4];\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pIVar5,pIVar5 + local_24,iVar6 << 2);\n    }\n  }\n  return _REG_NOERROR;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "Idx *pIVar2;" type_identifier (pointer_declarator "*pIVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "Idx *pIVar5;" type_identifier (pointer_declarator "*pIVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "uint uVar8;" type_identifier identifier ;) (declaration "int iVar9;" primitive_type identifier ;) (declaration "int local_24;" primitive_type identifier ;) (if_statement "if ((src != (re_node_set *)0x0) && (iVar9 = src->nelem, iVar9 != 0)) {\n    iVar3 = dest->nelem;\n    if (dest->alloc < iVar3 + iVar9 * 2) {\n      iVar9 = iVar9 + dest->alloc;\n      pIVar5 = (Idx *)realloc(dest->elems,iVar9 * 8);\n      if (pIVar5 == (Idx *)0x0) {\n        return _REG_ESPACE;\n      }\n      dest->elems = pIVar5;\n      dest->alloc = iVar9 * 2;\n      iVar3 = dest->nelem;\n      iVar9 = src->nelem;\n    }\n    if (iVar3 == 0) {\n      dest->nelem = iVar9;\n      memcpy(dest->elems,src->elems,src->nelem << 2);\n      return _REG_NOERROR;\n    }\n    local_24 = iVar3 + iVar9 * 2;\n    uVar7 = iVar9 - 1;\n    iVar3 = iVar3 + -1;\n    if ((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)) {\n      pIVar5 = dest->elems;\n      pIVar2 = src->elems;\n      do {\n        iVar9 = pIVar2[uVar7];\n        iVar6 = pIVar5[iVar3];\n        if (iVar6 == iVar9) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar6 < iVar9) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            pIVar5[local_24] = iVar9;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }\n    if (-1 < (int)uVar7) {\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy(dest->elems + local_24,src->elems,(uVar7 + 1) * 4);\n    }\n    iVar3 = dest->nelem;\n    iVar9 = iVar3 + -1 + src->nelem * 2;\n    iVar6 = (iVar9 - local_24) + 1;\n    if (iVar6 != 0) {\n      iVar4 = iVar3 + -1;\n      dest->nelem = iVar3 + iVar6;\n      pIVar5 = dest->elems;\n      do {\n        while( true ) {\n          piVar1 = pIVar5 + iVar9;\n          if (*piVar1 <= pIVar5[iVar4]) break;\n          iVar9 = iVar9 + -1;\n          pIVar5[iVar4 + iVar6] = *piVar1;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return _REG_NOERROR;\n          }\n        }\n        pIVar5[iVar4 + iVar6] = pIVar5[iVar4];\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pIVar5,pIVar5 + local_24,iVar6 << 2);\n    }\n  }" if (parenthesized_expression "((src != (re_node_set *)0x0) && (iVar9 = src->nelem, iVar9 != 0))" ( (binary_expression "(src != (re_node_set *)0x0) && (iVar9 = src->nelem, iVar9 != 0)" (parenthesized_expression "(src != (re_node_set *)0x0)" ( (binary_expression "src != (re_node_set *)0x0" identifier != (cast_expression "(re_node_set *)0x0" ( (type_descriptor "re_node_set *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(iVar9 = src->nelem, iVar9 != 0)" ( (comma_expression "iVar9 = src->nelem, iVar9 != 0" (assignment_expression "iVar9 = src->nelem" identifier = (field_expression "src->nelem" identifier -> field_identifier)) , (binary_expression "iVar9 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n    iVar3 = dest->nelem;\n    if (dest->alloc < iVar3 + iVar9 * 2) {\n      iVar9 = iVar9 + dest->alloc;\n      pIVar5 = (Idx *)realloc(dest->elems,iVar9 * 8);\n      if (pIVar5 == (Idx *)0x0) {\n        return _REG_ESPACE;\n      }\n      dest->elems = pIVar5;\n      dest->alloc = iVar9 * 2;\n      iVar3 = dest->nelem;\n      iVar9 = src->nelem;\n    }\n    if (iVar3 == 0) {\n      dest->nelem = iVar9;\n      memcpy(dest->elems,src->elems,src->nelem << 2);\n      return _REG_NOERROR;\n    }\n    local_24 = iVar3 + iVar9 * 2;\n    uVar7 = iVar9 - 1;\n    iVar3 = iVar3 + -1;\n    if ((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)) {\n      pIVar5 = dest->elems;\n      pIVar2 = src->elems;\n      do {\n        iVar9 = pIVar2[uVar7];\n        iVar6 = pIVar5[iVar3];\n        if (iVar6 == iVar9) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar6 < iVar9) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            pIVar5[local_24] = iVar9;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }\n    if (-1 < (int)uVar7) {\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy(dest->elems + local_24,src->elems,(uVar7 + 1) * 4);\n    }\n    iVar3 = dest->nelem;\n    iVar9 = iVar3 + -1 + src->nelem * 2;\n    iVar6 = (iVar9 - local_24) + 1;\n    if (iVar6 != 0) {\n      iVar4 = iVar3 + -1;\n      dest->nelem = iVar3 + iVar6;\n      pIVar5 = dest->elems;\n      do {\n        while( true ) {\n          piVar1 = pIVar5 + iVar9;\n          if (*piVar1 <= pIVar5[iVar4]) break;\n          iVar9 = iVar9 + -1;\n          pIVar5[iVar4 + iVar6] = *piVar1;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return _REG_NOERROR;\n          }\n        }\n        pIVar5[iVar4 + iVar6] = pIVar5[iVar4];\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pIVar5,pIVar5 + local_24,iVar6 << 2);\n    }\n  }" { (expression_statement "iVar3 = dest->nelem;" (assignment_expression "iVar3 = dest->nelem" identifier = (field_expression "dest->nelem" identifier -> field_identifier)) ;) (if_statement "if (dest->alloc < iVar3 + iVar9 * 2) {\n      iVar9 = iVar9 + dest->alloc;\n      pIVar5 = (Idx *)realloc(dest->elems,iVar9 * 8);\n      if (pIVar5 == (Idx *)0x0) {\n        return _REG_ESPACE;\n      }\n      dest->elems = pIVar5;\n      dest->alloc = iVar9 * 2;\n      iVar3 = dest->nelem;\n      iVar9 = src->nelem;\n    }" if (parenthesized_expression "(dest->alloc < iVar3 + iVar9 * 2)" ( (binary_expression "dest->alloc < iVar3 + iVar9 * 2" (field_expression "dest->alloc" identifier -> field_identifier) < (binary_expression "iVar3 + iVar9 * 2" identifier + (binary_expression "iVar9 * 2" identifier * number_literal))) )) (compound_statement "{\n      iVar9 = iVar9 + dest->alloc;\n      pIVar5 = (Idx *)realloc(dest->elems,iVar9 * 8);\n      if (pIVar5 == (Idx *)0x0) {\n        return _REG_ESPACE;\n      }\n      dest->elems = pIVar5;\n      dest->alloc = iVar9 * 2;\n      iVar3 = dest->nelem;\n      iVar9 = src->nelem;\n    }" { (expression_statement "iVar9 = iVar9 + dest->alloc;" (assignment_expression "iVar9 = iVar9 + dest->alloc" identifier = (binary_expression "iVar9 + dest->alloc" identifier + (field_expression "dest->alloc" identifier -> field_identifier))) ;) (expression_statement "pIVar5 = (Idx *)realloc(dest->elems,iVar9 * 8);" (assignment_expression "pIVar5 = (Idx *)realloc(dest->elems,iVar9 * 8)" identifier = (cast_expression "(Idx *)realloc(dest->elems,iVar9 * 8)" ( (type_descriptor "Idx *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "realloc(dest->elems,iVar9 * 8)" identifier (argument_list "(dest->elems,iVar9 * 8)" ( (field_expression "dest->elems" identifier -> field_identifier) , (binary_expression "iVar9 * 8" identifier * number_literal) ))))) ;) (if_statement "if (pIVar5 == (Idx *)0x0) {\n        return _REG_ESPACE;\n      }" if (parenthesized_expression "(pIVar5 == (Idx *)0x0)" ( (binary_expression "pIVar5 == (Idx *)0x0" identifier == (cast_expression "(Idx *)0x0" ( (type_descriptor "Idx *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return _REG_ESPACE;\n      }" { (return_statement "return _REG_ESPACE;" return identifier ;) })) (expression_statement "dest->elems = pIVar5;" (assignment_expression "dest->elems = pIVar5" (field_expression "dest->elems" identifier -> field_identifier) = identifier) ;) (expression_statement "dest->alloc = iVar9 * 2;" (assignment_expression "dest->alloc = iVar9 * 2" (field_expression "dest->alloc" identifier -> field_identifier) = (binary_expression "iVar9 * 2" identifier * number_literal)) ;) (expression_statement "iVar3 = dest->nelem;" (assignment_expression "iVar3 = dest->nelem" identifier = (field_expression "dest->nelem" identifier -> field_identifier)) ;) (expression_statement "iVar9 = src->nelem;" (assignment_expression "iVar9 = src->nelem" identifier = (field_expression "src->nelem" identifier -> field_identifier)) ;) })) (if_statement "if (iVar3 == 0) {\n      dest->nelem = iVar9;\n      memcpy(dest->elems,src->elems,src->nelem << 2);\n      return _REG_NOERROR;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      dest->nelem = iVar9;\n      memcpy(dest->elems,src->elems,src->nelem << 2);\n      return _REG_NOERROR;\n    }" { (expression_statement "dest->nelem = iVar9;" (assignment_expression "dest->nelem = iVar9" (field_expression "dest->nelem" identifier -> field_identifier) = identifier) ;) (expression_statement "memcpy(dest->elems,src->elems,src->nelem << 2);" (call_expression "memcpy(dest->elems,src->elems,src->nelem << 2)" identifier (argument_list "(dest->elems,src->elems,src->nelem << 2)" ( (field_expression "dest->elems" identifier -> field_identifier) , (field_expression "src->elems" identifier -> field_identifier) , (binary_expression "src->nelem << 2" (field_expression "src->nelem" identifier -> field_identifier) << number_literal) ))) ;) (return_statement "return _REG_NOERROR;" return identifier ;) })) (expression_statement "local_24 = iVar3 + iVar9 * 2;" (assignment_expression "local_24 = iVar3 + iVar9 * 2" identifier = (binary_expression "iVar3 + iVar9 * 2" identifier + (binary_expression "iVar9 * 2" identifier * number_literal))) ;) (expression_statement "uVar7 = iVar9 - 1;" (assignment_expression "uVar7 = iVar9 - 1" identifier = (binary_expression "iVar9 - 1" identifier - number_literal)) ;) (expression_statement "iVar3 = iVar3 + -1;" (assignment_expression "iVar3 = iVar3 + -1" identifier = (binary_expression "iVar3 + -1" identifier + number_literal)) ;) (if_statement "if ((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)) {\n      pIVar5 = dest->elems;\n      pIVar2 = src->elems;\n      do {\n        iVar9 = pIVar2[uVar7];\n        iVar6 = pIVar5[iVar3];\n        if (iVar6 == iVar9) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar6 < iVar9) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            pIVar5[local_24] = iVar9;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }" if (parenthesized_expression "((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0))" ( (binary_expression "(-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)" (parenthesized_expression "(-1 < iVar3)" ( (binary_expression "-1 < iVar3" number_literal < identifier) )) && (parenthesized_expression "(uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)" ( (comma_expression "uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0" (assignment_expression "uVar8 = uVar7 ^ 0xffffffff" identifier = (binary_expression "uVar7 ^ 0xffffffff" identifier ^ number_literal)) , (binary_expression "(int)uVar8 < 0" (cast_expression "(int)uVar8" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal)) ))) )) (compound_statement "{\n      pIVar5 = dest->elems;\n      pIVar2 = src->elems;\n      do {\n        iVar9 = pIVar2[uVar7];\n        iVar6 = pIVar5[iVar3];\n        if (iVar6 == iVar9) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar6 < iVar9) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            pIVar5[local_24] = iVar9;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }" { (expression_statement "pIVar5 = dest->elems;" (assignment_expression "pIVar5 = dest->elems" identifier = (field_expression "dest->elems" identifier -> field_identifier)) ;) (expression_statement "pIVar2 = src->elems;" (assignment_expression "pIVar2 = src->elems" identifier = (field_expression "src->elems" identifier -> field_identifier)) ;) (do_statement "do {\n        iVar9 = pIVar2[uVar7];\n        iVar6 = pIVar5[iVar3];\n        if (iVar6 == iVar9) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar6 < iVar9) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            pIVar5[local_24] = iVar9;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);" do (compound_statement "{\n        iVar9 = pIVar2[uVar7];\n        iVar6 = pIVar5[iVar3];\n        if (iVar6 == iVar9) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar6 < iVar9) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            pIVar5[local_24] = iVar9;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      }" { (expression_statement "iVar9 = pIVar2[uVar7];" (assignment_expression "iVar9 = pIVar2[uVar7]" identifier = (subscript_expression "pIVar2[uVar7]" identifier [ identifier ])) ;) (expression_statement "iVar6 = pIVar5[iVar3];" (assignment_expression "iVar6 = pIVar5[iVar3]" identifier = (subscript_expression "pIVar5[iVar3]" identifier [ identifier ])) ;) (if_statement "if (iVar6 == iVar9) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar6 < iVar9) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            pIVar5[local_24] = iVar9;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }" if (parenthesized_expression "(iVar6 == iVar9)" ( (binary_expression "iVar6 == iVar9" identifier == identifier) )) (compound_statement "{\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }" { (expression_statement "uVar7 = uVar7 - 1;" (assignment_expression "uVar7 = uVar7 - 1" identifier = (binary_expression "uVar7 - 1" identifier - number_literal)) ;) (expression_statement "iVar3 = iVar3 + -1;" (assignment_expression "iVar3 = iVar3 + -1" identifier = (binary_expression "iVar3 + -1" identifier + number_literal)) ;) (expression_statement "uVar8 = ~uVar7;" (assignment_expression "uVar8 = ~uVar7" identifier = (unary_expression "~uVar7" ~ identifier)) ;) (if_statement "if ((int)uVar7 < 0) break;" if (parenthesized_expression "((int)uVar7 < 0)" ( (binary_expression "(int)uVar7 < 0" (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (break_statement "break;" break ;)) }) (else_clause "else {\n          if (iVar6 < iVar9) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            pIVar5[local_24] = iVar9;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }" else (compound_statement "{\n          if (iVar6 < iVar9) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            pIVar5[local_24] = iVar9;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }" { (if_statement "if (iVar6 < iVar9) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            pIVar5[local_24] = iVar9;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }" if (parenthesized_expression "(iVar6 < iVar9)" ( (binary_expression "iVar6 < iVar9" identifier < identifier) )) (compound_statement "{\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            pIVar5[local_24] = iVar9;\n            uVar8 = ~uVar7;\n          }" { (expression_statement "local_24 = local_24 + -1;" (assignment_expression "local_24 = local_24 + -1" identifier = (binary_expression "local_24 + -1" identifier + number_literal)) ;) (expression_statement "uVar7 = uVar7 - 1;" (assignment_expression "uVar7 = uVar7 - 1" identifier = (binary_expression "uVar7 - 1" identifier - number_literal)) ;) (expression_statement "pIVar5[local_24] = iVar9;" (assignment_expression "pIVar5[local_24] = iVar9" (subscript_expression "pIVar5[local_24]" identifier [ identifier ]) = identifier) ;) (expression_statement "uVar8 = ~uVar7;" (assignment_expression "uVar8 = ~uVar7" identifier = (unary_expression "~uVar7" ~ identifier)) ;) }) (else_clause "else {\n            iVar3 = iVar3 + -1;\n          }" else (compound_statement "{\n            iVar3 = iVar3 + -1;\n          }" { (expression_statement "iVar3 = iVar3 + -1;" (assignment_expression "iVar3 = iVar3 + -1" identifier = (binary_expression "iVar3 + -1" identifier + number_literal)) ;) }))) (if_statement "if (-1 < (int)uVar8) break;" if (parenthesized_expression "(-1 < (int)uVar8)" ( (binary_expression "-1 < (int)uVar8" number_literal < (cast_expression "(int)uVar8" ( (type_descriptor "int" primitive_type) ) identifier)) )) (break_statement "break;" break ;)) }))) }) while (parenthesized_expression "(-1 < iVar3)" ( (binary_expression "-1 < iVar3" number_literal < identifier) )) ;) })) (if_statement "if (-1 < (int)uVar7) {\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy(dest->elems + local_24,src->elems,(uVar7 + 1) * 4);\n    }" if (parenthesized_expression "(-1 < (int)uVar7)" ( (binary_expression "-1 < (int)uVar7" number_literal < (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy(dest->elems + local_24,src->elems,(uVar7 + 1) * 4);\n    }" { (expression_statement "local_24 = local_24 - (uVar7 + 1);" (assignment_expression "local_24 = local_24 - (uVar7 + 1)" identifier = (binary_expression "local_24 - (uVar7 + 1)" identifier - (parenthesized_expression "(uVar7 + 1)" ( (binary_expression "uVar7 + 1" identifier + number_literal) )))) ;) (expression_statement "memcpy(dest->elems + local_24,src->elems,(uVar7 + 1) * 4);" (call_expression "memcpy(dest->elems + local_24,src->elems,(uVar7 + 1) * 4)" identifier (argument_list "(dest->elems + local_24,src->elems,(uVar7 + 1) * 4)" ( (binary_expression "dest->elems + local_24" (field_expression "dest->elems" identifier -> field_identifier) + identifier) , (field_expression "src->elems" identifier -> field_identifier) , (binary_expression "(uVar7 + 1) * 4" (parenthesized_expression "(uVar7 + 1)" ( (binary_expression "uVar7 + 1" identifier + number_literal) )) * number_literal) ))) ;) })) (expression_statement "iVar3 = dest->nelem;" (assignment_expression "iVar3 = dest->nelem" identifier = (field_expression "dest->nelem" identifier -> field_identifier)) ;) (expression_statement "iVar9 = iVar3 + -1 + src->nelem * 2;" (assignment_expression "iVar9 = iVar3 + -1 + src->nelem * 2" identifier = (binary_expression "iVar3 + -1 + src->nelem * 2" (binary_expression "iVar3 + -1" identifier + number_literal) + (binary_expression "src->nelem * 2" (field_expression "src->nelem" identifier -> field_identifier) * number_literal))) ;) (expression_statement "iVar6 = (iVar9 - local_24) + 1;" (assignment_expression "iVar6 = (iVar9 - local_24) + 1" identifier = (binary_expression "(iVar9 - local_24) + 1" (parenthesized_expression "(iVar9 - local_24)" ( (binary_expression "iVar9 - local_24" identifier - identifier) )) + number_literal)) ;) (if_statement "if (iVar6 != 0) {\n      iVar4 = iVar3 + -1;\n      dest->nelem = iVar3 + iVar6;\n      pIVar5 = dest->elems;\n      do {\n        while( true ) {\n          piVar1 = pIVar5 + iVar9;\n          if (*piVar1 <= pIVar5[iVar4]) break;\n          iVar9 = iVar9 + -1;\n          pIVar5[iVar4 + iVar6] = *piVar1;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return _REG_NOERROR;\n          }\n        }\n        pIVar5[iVar4 + iVar6] = pIVar5[iVar4];\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pIVar5,pIVar5 + local_24,iVar6 << 2);\n    }" if (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar4 = iVar3 + -1;\n      dest->nelem = iVar3 + iVar6;\n      pIVar5 = dest->elems;\n      do {\n        while( true ) {\n          piVar1 = pIVar5 + iVar9;\n          if (*piVar1 <= pIVar5[iVar4]) break;\n          iVar9 = iVar9 + -1;\n          pIVar5[iVar4 + iVar6] = *piVar1;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return _REG_NOERROR;\n          }\n        }\n        pIVar5[iVar4 + iVar6] = pIVar5[iVar4];\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pIVar5,pIVar5 + local_24,iVar6 << 2);\n    }" { (expression_statement "iVar4 = iVar3 + -1;" (assignment_expression "iVar4 = iVar3 + -1" identifier = (binary_expression "iVar3 + -1" identifier + number_literal)) ;) (expression_statement "dest->nelem = iVar3 + iVar6;" (assignment_expression "dest->nelem = iVar3 + iVar6" (field_expression "dest->nelem" identifier -> field_identifier) = (binary_expression "iVar3 + iVar6" identifier + identifier)) ;) (expression_statement "pIVar5 = dest->elems;" (assignment_expression "pIVar5 = dest->elems" identifier = (field_expression "dest->elems" identifier -> field_identifier)) ;) (do_statement "do {\n        while( true ) {\n          piVar1 = pIVar5 + iVar9;\n          if (*piVar1 <= pIVar5[iVar4]) break;\n          iVar9 = iVar9 + -1;\n          pIVar5[iVar4 + iVar6] = *piVar1;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return _REG_NOERROR;\n          }\n        }\n        pIVar5[iVar4 + iVar6] = pIVar5[iVar4];\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);" do (compound_statement "{\n        while( true ) {\n          piVar1 = pIVar5 + iVar9;\n          if (*piVar1 <= pIVar5[iVar4]) break;\n          iVar9 = iVar9 + -1;\n          pIVar5[iVar4 + iVar6] = *piVar1;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return _REG_NOERROR;\n          }\n        }\n        pIVar5[iVar4 + iVar6] = pIVar5[iVar4];\n        iVar4 = iVar4 + -1;\n      }" { (while_statement "while( true ) {\n          piVar1 = pIVar5 + iVar9;\n          if (*piVar1 <= pIVar5[iVar4]) break;\n          iVar9 = iVar9 + -1;\n          pIVar5[iVar4 + iVar6] = *piVar1;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return _REG_NOERROR;\n          }\n        }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n          piVar1 = pIVar5 + iVar9;\n          if (*piVar1 <= pIVar5[iVar4]) break;\n          iVar9 = iVar9 + -1;\n          pIVar5[iVar4 + iVar6] = *piVar1;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return _REG_NOERROR;\n          }\n        }" { (expression_statement "piVar1 = pIVar5 + iVar9;" (assignment_expression "piVar1 = pIVar5 + iVar9" identifier = (binary_expression "pIVar5 + iVar9" identifier + identifier)) ;) (if_statement "if (*piVar1 <= pIVar5[iVar4]) break;" if (parenthesized_expression "(*piVar1 <= pIVar5[iVar4])" ( (binary_expression "*piVar1 <= pIVar5[iVar4]" (pointer_expression "*piVar1" * identifier) <= (subscript_expression "pIVar5[iVar4]" identifier [ identifier ])) )) (break_statement "break;" break ;)) (expression_statement "iVar9 = iVar9 + -1;" (assignment_expression "iVar9 = iVar9 + -1" identifier = (binary_expression "iVar9 + -1" identifier + number_literal)) ;) (expression_statement "pIVar5[iVar4 + iVar6] = *piVar1;" (assignment_expression "pIVar5[iVar4 + iVar6] = *piVar1" (subscript_expression "pIVar5[iVar4 + iVar6]" identifier [ (binary_expression "iVar4 + iVar6" identifier + identifier) ]) = (pointer_expression "*piVar1" * identifier)) ;) (expression_statement "iVar6 = iVar6 + -1;" (assignment_expression "iVar6 = iVar6 + -1" identifier = (binary_expression "iVar6 + -1" identifier + number_literal)) ;) (if_statement "if (iVar6 == 0) {\n            return _REG_NOERROR;\n          }" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (compound_statement "{\n            return _REG_NOERROR;\n          }" { (return_statement "return _REG_NOERROR;" return identifier ;) })) })) (expression_statement "pIVar5[iVar4 + iVar6] = pIVar5[iVar4];" (assignment_expression "pIVar5[iVar4 + iVar6] = pIVar5[iVar4]" (subscript_expression "pIVar5[iVar4 + iVar6]" identifier [ (binary_expression "iVar4 + iVar6" identifier + identifier) ]) = (subscript_expression "pIVar5[iVar4]" identifier [ identifier ])) ;) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(-1 < iVar4)" ( (binary_expression "-1 < iVar4" number_literal < identifier) )) ;) (expression_statement "memcpy(pIVar5,pIVar5 + local_24,iVar6 << 2);" (call_expression "memcpy(pIVar5,pIVar5 + local_24,iVar6 << 2)" identifier (argument_list "(pIVar5,pIVar5 + local_24,iVar6 << 2)" ( identifier , (binary_expression "pIVar5 + local_24" identifier + identifier) , (binary_expression "iVar6 << 2" identifier << number_literal) ))) ;) })) })) (return_statement "return _REG_NOERROR;" return identifier ;) })))
(translation_unit "undefined4 FUN_00017bd0(int *param_1,int param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  void *pvVar5;\n  int iVar6;\n  uint uVar7;\n  uint uVar8;\n  int iVar9;\n  int local_24;\n  \n  if ((param_2 != 0) && (iVar9 = *(int *)(param_2 + 4), iVar9 != 0)) {\n    iVar3 = param_1[1];\n    if (*param_1 < iVar3 + iVar9 * 2) {\n      iVar9 = iVar9 + *param_1;\n      pvVar5 = realloc((void *)param_1[2],iVar9 * 8);\n      if (pvVar5 == (void *)0x0) {\n        return 0xc;\n      }\n      param_1[2] = (int)pvVar5;\n      *param_1 = iVar9 * 2;\n      iVar3 = param_1[1];\n      iVar9 = *(int *)(param_2 + 4);\n    }\n    if (iVar3 == 0) {\n      param_1[1] = iVar9;\n      memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2);\n      return 0;\n    }\n    local_24 = iVar3 + iVar9 * 2;\n    uVar7 = iVar9 - 1;\n    iVar3 = iVar3 + -1;\n    if ((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)) {\n      iVar9 = param_1[2];\n      iVar6 = *(int *)(param_2 + 8);\n      do {\n        iVar4 = *(int *)(iVar6 + uVar7 * 4);\n        iVar2 = *(int *)(iVar9 + iVar3 * 4);\n        if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }\n    if (-1 < (int)uVar7) {\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4);\n    }\n    iVar3 = param_1[1];\n    iVar9 = iVar3 + -1 + *(int *)(param_2 + 4) * 2;\n    iVar6 = (iVar9 - local_24) + 1;\n    if (iVar6 != 0) {\n      iVar4 = iVar3 + -1;\n      param_1[1] = iVar3 + iVar6;\n      pvVar5 = (void *)param_1[2];\n      do {\n        while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }\n        *piVar1 = iVar2;\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2);\n    }\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_00017bd0(int *param_1,int param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  void *pvVar5;\n  int iVar6;\n  uint uVar7;\n  uint uVar8;\n  int iVar9;\n  int local_24;\n  \n  if ((param_2 != 0) && (iVar9 = *(int *)(param_2 + 4), iVar9 != 0)) {\n    iVar3 = param_1[1];\n    if (*param_1 < iVar3 + iVar9 * 2) {\n      iVar9 = iVar9 + *param_1;\n      pvVar5 = realloc((void *)param_1[2],iVar9 * 8);\n      if (pvVar5 == (void *)0x0) {\n        return 0xc;\n      }\n      param_1[2] = (int)pvVar5;\n      *param_1 = iVar9 * 2;\n      iVar3 = param_1[1];\n      iVar9 = *(int *)(param_2 + 4);\n    }\n    if (iVar3 == 0) {\n      param_1[1] = iVar9;\n      memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2);\n      return 0;\n    }\n    local_24 = iVar3 + iVar9 * 2;\n    uVar7 = iVar9 - 1;\n    iVar3 = iVar3 + -1;\n    if ((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)) {\n      iVar9 = param_1[2];\n      iVar6 = *(int *)(param_2 + 8);\n      do {\n        iVar4 = *(int *)(iVar6 + uVar7 * 4);\n        iVar2 = *(int *)(iVar9 + iVar3 * 4);\n        if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }\n    if (-1 < (int)uVar7) {\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4);\n    }\n    iVar3 = param_1[1];\n    iVar9 = iVar3 + -1 + *(int *)(param_2 + 4) * 2;\n    iVar6 = (iVar9 - local_24) + 1;\n    if (iVar6 != 0) {\n      iVar4 = iVar3 + -1;\n      param_1[1] = iVar3 + iVar6;\n      pvVar5 = (void *)param_1[2];\n      do {\n        while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }\n        *piVar1 = iVar2;\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2);\n    }\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_00017bd0(int *param_1,int param_2)" identifier (parameter_list "(int *param_1,int param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  void *pvVar5;\n  int iVar6;\n  uint uVar7;\n  uint uVar8;\n  int iVar9;\n  int local_24;\n  \n  if ((param_2 != 0) && (iVar9 = *(int *)(param_2 + 4), iVar9 != 0)) {\n    iVar3 = param_1[1];\n    if (*param_1 < iVar3 + iVar9 * 2) {\n      iVar9 = iVar9 + *param_1;\n      pvVar5 = realloc((void *)param_1[2],iVar9 * 8);\n      if (pvVar5 == (void *)0x0) {\n        return 0xc;\n      }\n      param_1[2] = (int)pvVar5;\n      *param_1 = iVar9 * 2;\n      iVar3 = param_1[1];\n      iVar9 = *(int *)(param_2 + 4);\n    }\n    if (iVar3 == 0) {\n      param_1[1] = iVar9;\n      memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2);\n      return 0;\n    }\n    local_24 = iVar3 + iVar9 * 2;\n    uVar7 = iVar9 - 1;\n    iVar3 = iVar3 + -1;\n    if ((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)) {\n      iVar9 = param_1[2];\n      iVar6 = *(int *)(param_2 + 8);\n      do {\n        iVar4 = *(int *)(iVar6 + uVar7 * 4);\n        iVar2 = *(int *)(iVar9 + iVar3 * 4);\n        if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }\n    if (-1 < (int)uVar7) {\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4);\n    }\n    iVar3 = param_1[1];\n    iVar9 = iVar3 + -1 + *(int *)(param_2 + 4) * 2;\n    iVar6 = (iVar9 - local_24) + 1;\n    if (iVar6 != 0) {\n      iVar4 = iVar3 + -1;\n      param_1[1] = iVar3 + iVar6;\n      pvVar5 = (void *)param_1[2];\n      do {\n        while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }\n        *piVar1 = iVar2;\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2);\n    }\n  }\n  return 0;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "void *pvVar5;" primitive_type (pointer_declarator "*pvVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "uint uVar8;" type_identifier identifier ;) (declaration "int iVar9;" primitive_type identifier ;) (declaration "int local_24;" primitive_type identifier ;) (if_statement "if ((param_2 != 0) && (iVar9 = *(int *)(param_2 + 4), iVar9 != 0)) {\n    iVar3 = param_1[1];\n    if (*param_1 < iVar3 + iVar9 * 2) {\n      iVar9 = iVar9 + *param_1;\n      pvVar5 = realloc((void *)param_1[2],iVar9 * 8);\n      if (pvVar5 == (void *)0x0) {\n        return 0xc;\n      }\n      param_1[2] = (int)pvVar5;\n      *param_1 = iVar9 * 2;\n      iVar3 = param_1[1];\n      iVar9 = *(int *)(param_2 + 4);\n    }\n    if (iVar3 == 0) {\n      param_1[1] = iVar9;\n      memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2);\n      return 0;\n    }\n    local_24 = iVar3 + iVar9 * 2;\n    uVar7 = iVar9 - 1;\n    iVar3 = iVar3 + -1;\n    if ((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)) {\n      iVar9 = param_1[2];\n      iVar6 = *(int *)(param_2 + 8);\n      do {\n        iVar4 = *(int *)(iVar6 + uVar7 * 4);\n        iVar2 = *(int *)(iVar9 + iVar3 * 4);\n        if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }\n    if (-1 < (int)uVar7) {\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4);\n    }\n    iVar3 = param_1[1];\n    iVar9 = iVar3 + -1 + *(int *)(param_2 + 4) * 2;\n    iVar6 = (iVar9 - local_24) + 1;\n    if (iVar6 != 0) {\n      iVar4 = iVar3 + -1;\n      param_1[1] = iVar3 + iVar6;\n      pvVar5 = (void *)param_1[2];\n      do {\n        while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }\n        *piVar1 = iVar2;\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2);\n    }\n  }" if (parenthesized_expression "((param_2 != 0) && (iVar9 = *(int *)(param_2 + 4), iVar9 != 0))" ( (binary_expression "(param_2 != 0) && (iVar9 = *(int *)(param_2 + 4), iVar9 != 0)" (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) && (parenthesized_expression "(iVar9 = *(int *)(param_2 + 4), iVar9 != 0)" ( (comma_expression "iVar9 = *(int *)(param_2 + 4), iVar9 != 0" (assignment_expression "iVar9 = *(int *)(param_2 + 4)" identifier = (pointer_expression "*(int *)(param_2 + 4)" * (cast_expression "(int *)(param_2 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) ))))) , (binary_expression "iVar9 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n    iVar3 = param_1[1];\n    if (*param_1 < iVar3 + iVar9 * 2) {\n      iVar9 = iVar9 + *param_1;\n      pvVar5 = realloc((void *)param_1[2],iVar9 * 8);\n      if (pvVar5 == (void *)0x0) {\n        return 0xc;\n      }\n      param_1[2] = (int)pvVar5;\n      *param_1 = iVar9 * 2;\n      iVar3 = param_1[1];\n      iVar9 = *(int *)(param_2 + 4);\n    }\n    if (iVar3 == 0) {\n      param_1[1] = iVar9;\n      memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2);\n      return 0;\n    }\n    local_24 = iVar3 + iVar9 * 2;\n    uVar7 = iVar9 - 1;\n    iVar3 = iVar3 + -1;\n    if ((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)) {\n      iVar9 = param_1[2];\n      iVar6 = *(int *)(param_2 + 8);\n      do {\n        iVar4 = *(int *)(iVar6 + uVar7 * 4);\n        iVar2 = *(int *)(iVar9 + iVar3 * 4);\n        if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }\n    if (-1 < (int)uVar7) {\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4);\n    }\n    iVar3 = param_1[1];\n    iVar9 = iVar3 + -1 + *(int *)(param_2 + 4) * 2;\n    iVar6 = (iVar9 - local_24) + 1;\n    if (iVar6 != 0) {\n      iVar4 = iVar3 + -1;\n      param_1[1] = iVar3 + iVar6;\n      pvVar5 = (void *)param_1[2];\n      do {\n        while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }\n        *piVar1 = iVar2;\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2);\n    }\n  }" { (expression_statement "iVar3 = param_1[1];" (assignment_expression "iVar3 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (if_statement "if (*param_1 < iVar3 + iVar9 * 2) {\n      iVar9 = iVar9 + *param_1;\n      pvVar5 = realloc((void *)param_1[2],iVar9 * 8);\n      if (pvVar5 == (void *)0x0) {\n        return 0xc;\n      }\n      param_1[2] = (int)pvVar5;\n      *param_1 = iVar9 * 2;\n      iVar3 = param_1[1];\n      iVar9 = *(int *)(param_2 + 4);\n    }" if (parenthesized_expression "(*param_1 < iVar3 + iVar9 * 2)" ( (binary_expression "*param_1 < iVar3 + iVar9 * 2" (pointer_expression "*param_1" * identifier) < (binary_expression "iVar3 + iVar9 * 2" identifier + (binary_expression "iVar9 * 2" identifier * number_literal))) )) (compound_statement "{\n      iVar9 = iVar9 + *param_1;\n      pvVar5 = realloc((void *)param_1[2],iVar9 * 8);\n      if (pvVar5 == (void *)0x0) {\n        return 0xc;\n      }\n      param_1[2] = (int)pvVar5;\n      *param_1 = iVar9 * 2;\n      iVar3 = param_1[1];\n      iVar9 = *(int *)(param_2 + 4);\n    }" { (expression_statement "iVar9 = iVar9 + *param_1;" (assignment_expression "iVar9 = iVar9 + *param_1" identifier = (binary_expression "iVar9 + *param_1" identifier + (pointer_expression "*param_1" * identifier))) ;) (expression_statement "pvVar5 = realloc((void *)param_1[2],iVar9 * 8);" (assignment_expression "pvVar5 = realloc((void *)param_1[2],iVar9 * 8)" identifier = (call_expression "realloc((void *)param_1[2],iVar9 * 8)" identifier (argument_list "((void *)param_1[2],iVar9 * 8)" ( (cast_expression "(void *)param_1[2]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[2]" identifier [ number_literal ])) , (binary_expression "iVar9 * 8" identifier * number_literal) )))) ;) (if_statement "if (pvVar5 == (void *)0x0) {\n        return 0xc;\n      }" if (parenthesized_expression "(pvVar5 == (void *)0x0)" ( (binary_expression "pvVar5 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return 0xc;\n      }" { (return_statement "return 0xc;" return number_literal ;) })) (expression_statement "param_1[2] = (int)pvVar5;" (assignment_expression "param_1[2] = (int)pvVar5" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (cast_expression "(int)pvVar5" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "*param_1 = iVar9 * 2;" (assignment_expression "*param_1 = iVar9 * 2" (pointer_expression "*param_1" * identifier) = (binary_expression "iVar9 * 2" identifier * number_literal)) ;) (expression_statement "iVar3 = param_1[1];" (assignment_expression "iVar3 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "iVar9 = *(int *)(param_2 + 4);" (assignment_expression "iVar9 = *(int *)(param_2 + 4)" identifier = (pointer_expression "*(int *)(param_2 + 4)" * (cast_expression "(int *)(param_2 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) ))))) ;) })) (if_statement "if (iVar3 == 0) {\n      param_1[1] = iVar9;\n      memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2);\n      return 0;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      param_1[1] = iVar9;\n      memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2);\n      return 0;\n    }" { (expression_statement "param_1[1] = iVar9;" (assignment_expression "param_1[1] = iVar9" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2);" (call_expression "memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2)" identifier (argument_list "((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2)" ( (cast_expression "(void *)param_1[2]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[2]" identifier [ number_literal ])) , (pointer_expression "*(void **)(param_2 + 8)" * (cast_expression "(void **)(param_2 + 8)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) , (binary_expression "*(int *)(param_2 + 4) << 2" (pointer_expression "*(int *)(param_2 + 4)" * (cast_expression "(int *)(param_2 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) )))) << number_literal) ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "local_24 = iVar3 + iVar9 * 2;" (assignment_expression "local_24 = iVar3 + iVar9 * 2" identifier = (binary_expression "iVar3 + iVar9 * 2" identifier + (binary_expression "iVar9 * 2" identifier * number_literal))) ;) (expression_statement "uVar7 = iVar9 - 1;" (assignment_expression "uVar7 = iVar9 - 1" identifier = (binary_expression "iVar9 - 1" identifier - number_literal)) ;) (expression_statement "iVar3 = iVar3 + -1;" (assignment_expression "iVar3 = iVar3 + -1" identifier = (binary_expression "iVar3 + -1" identifier + number_literal)) ;) (if_statement "if ((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)) {\n      iVar9 = param_1[2];\n      iVar6 = *(int *)(param_2 + 8);\n      do {\n        iVar4 = *(int *)(iVar6 + uVar7 * 4);\n        iVar2 = *(int *)(iVar9 + iVar3 * 4);\n        if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }" if (parenthesized_expression "((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0))" ( (binary_expression "(-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)" (parenthesized_expression "(-1 < iVar3)" ( (binary_expression "-1 < iVar3" number_literal < identifier) )) && (parenthesized_expression "(uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)" ( (comma_expression "uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0" (assignment_expression "uVar8 = uVar7 ^ 0xffffffff" identifier = (binary_expression "uVar7 ^ 0xffffffff" identifier ^ number_literal)) , (binary_expression "(int)uVar8 < 0" (cast_expression "(int)uVar8" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal)) ))) )) (compound_statement "{\n      iVar9 = param_1[2];\n      iVar6 = *(int *)(param_2 + 8);\n      do {\n        iVar4 = *(int *)(iVar6 + uVar7 * 4);\n        iVar2 = *(int *)(iVar9 + iVar3 * 4);\n        if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }" { (expression_statement "iVar9 = param_1[2];" (assignment_expression "iVar9 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) (expression_statement "iVar6 = *(int *)(param_2 + 8);" (assignment_expression "iVar6 = *(int *)(param_2 + 8)" identifier = (pointer_expression "*(int *)(param_2 + 8)" * (cast_expression "(int *)(param_2 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) ))))) ;) (do_statement "do {\n        iVar4 = *(int *)(iVar6 + uVar7 * 4);\n        iVar2 = *(int *)(iVar9 + iVar3 * 4);\n        if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);" do (compound_statement "{\n        iVar4 = *(int *)(iVar6 + uVar7 * 4);\n        iVar2 = *(int *)(iVar9 + iVar3 * 4);\n        if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      }" { (expression_statement "iVar4 = *(int *)(iVar6 + uVar7 * 4);" (assignment_expression "iVar4 = *(int *)(iVar6 + uVar7 * 4)" identifier = (pointer_expression "*(int *)(iVar6 + uVar7 * 4)" * (cast_expression "(int *)(iVar6 + uVar7 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + uVar7 * 4)" ( (binary_expression "iVar6 + uVar7 * 4" identifier + (binary_expression "uVar7 * 4" identifier * number_literal)) ))))) ;) (expression_statement "iVar2 = *(int *)(iVar9 + iVar3 * 4);" (assignment_expression "iVar2 = *(int *)(iVar9 + iVar3 * 4)" identifier = (pointer_expression "*(int *)(iVar9 + iVar3 * 4)" * (cast_expression "(int *)(iVar9 + iVar3 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar9 + iVar3 * 4)" ( (binary_expression "iVar9 + iVar3 * 4" identifier + (binary_expression "iVar3 * 4" identifier * number_literal)) ))))) ;) (if_statement "if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }" if (parenthesized_expression "(iVar2 == iVar4)" ( (binary_expression "iVar2 == iVar4" identifier == identifier) )) (compound_statement "{\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }" { (expression_statement "uVar7 = uVar7 - 1;" (assignment_expression "uVar7 = uVar7 - 1" identifier = (binary_expression "uVar7 - 1" identifier - number_literal)) ;) (expression_statement "iVar3 = iVar3 + -1;" (assignment_expression "iVar3 = iVar3 + -1" identifier = (binary_expression "iVar3 + -1" identifier + number_literal)) ;) (expression_statement "uVar8 = ~uVar7;" (assignment_expression "uVar8 = ~uVar7" identifier = (unary_expression "~uVar7" ~ identifier)) ;) (if_statement "if ((int)uVar7 < 0) break;" if (parenthesized_expression "((int)uVar7 < 0)" ( (binary_expression "(int)uVar7 < 0" (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (break_statement "break;" break ;)) }) (else_clause "else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }" else (compound_statement "{\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }" { (if_statement "if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }" if (parenthesized_expression "(iVar2 < iVar4)" ( (binary_expression "iVar2 < iVar4" identifier < identifier) )) (compound_statement "{\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }" { (expression_statement "local_24 = local_24 + -1;" (assignment_expression "local_24 = local_24 + -1" identifier = (binary_expression "local_24 + -1" identifier + number_literal)) ;) (expression_statement "uVar7 = uVar7 - 1;" (assignment_expression "uVar7 = uVar7 - 1" identifier = (binary_expression "uVar7 - 1" identifier - number_literal)) ;) (expression_statement "*(int *)(iVar9 + local_24 * 4) = iVar4;" (assignment_expression "*(int *)(iVar9 + local_24 * 4) = iVar4" (pointer_expression "*(int *)(iVar9 + local_24 * 4)" * (cast_expression "(int *)(iVar9 + local_24 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar9 + local_24 * 4)" ( (binary_expression "iVar9 + local_24 * 4" identifier + (binary_expression "local_24 * 4" identifier * number_literal)) )))) = identifier) ;) (expression_statement "uVar8 = ~uVar7;" (assignment_expression "uVar8 = ~uVar7" identifier = (unary_expression "~uVar7" ~ identifier)) ;) }) (else_clause "else {\n            iVar3 = iVar3 + -1;\n          }" else (compound_statement "{\n            iVar3 = iVar3 + -1;\n          }" { (expression_statement "iVar3 = iVar3 + -1;" (assignment_expression "iVar3 = iVar3 + -1" identifier = (binary_expression "iVar3 + -1" identifier + number_literal)) ;) }))) (if_statement "if (-1 < (int)uVar8) break;" if (parenthesized_expression "(-1 < (int)uVar8)" ( (binary_expression "-1 < (int)uVar8" number_literal < (cast_expression "(int)uVar8" ( (type_descriptor "int" primitive_type) ) identifier)) )) (break_statement "break;" break ;)) }))) }) while (parenthesized_expression "(-1 < iVar3)" ( (binary_expression "-1 < iVar3" number_literal < identifier) )) ;) })) (if_statement "if (-1 < (int)uVar7) {\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4);\n    }" if (parenthesized_expression "(-1 < (int)uVar7)" ( (binary_expression "-1 < (int)uVar7" number_literal < (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4);\n    }" { (expression_statement "local_24 = local_24 - (uVar7 + 1);" (assignment_expression "local_24 = local_24 - (uVar7 + 1)" identifier = (binary_expression "local_24 - (uVar7 + 1)" identifier - (parenthesized_expression "(uVar7 + 1)" ( (binary_expression "uVar7 + 1" identifier + number_literal) )))) ;) (expression_statement "memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4);" (call_expression "memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4)" identifier (argument_list "((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4)" ( (cast_expression "(void *)(param_1[2] + local_24 * 4)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[2] + local_24 * 4)" ( (binary_expression "param_1[2] + local_24 * 4" (subscript_expression "param_1[2]" identifier [ number_literal ]) + (binary_expression "local_24 * 4" identifier * number_literal)) ))) , (pointer_expression "*(void **)(param_2 + 8)" * (cast_expression "(void **)(param_2 + 8)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) , (binary_expression "(uVar7 + 1) * 4" (parenthesized_expression "(uVar7 + 1)" ( (binary_expression "uVar7 + 1" identifier + number_literal) )) * number_literal) ))) ;) })) (expression_statement "iVar3 = param_1[1];" (assignment_expression "iVar3 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "iVar9 = iVar3 + -1 + *(int *)(param_2 + 4) * 2;" (assignment_expression "iVar9 = iVar3 + -1 + *(int *)(param_2 + 4) * 2" identifier = (binary_expression "iVar3 + -1 + *(int *)(param_2 + 4) * 2" (binary_expression "iVar3 + -1" identifier + number_literal) + (binary_expression "*(int *)(param_2 + 4) * 2" (pointer_expression "*(int *)(param_2 + 4)" * (cast_expression "(int *)(param_2 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) )))) * number_literal))) ;) (expression_statement "iVar6 = (iVar9 - local_24) + 1;" (assignment_expression "iVar6 = (iVar9 - local_24) + 1" identifier = (binary_expression "(iVar9 - local_24) + 1" (parenthesized_expression "(iVar9 - local_24)" ( (binary_expression "iVar9 - local_24" identifier - identifier) )) + number_literal)) ;) (if_statement "if (iVar6 != 0) {\n      iVar4 = iVar3 + -1;\n      param_1[1] = iVar3 + iVar6;\n      pvVar5 = (void *)param_1[2];\n      do {\n        while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }\n        *piVar1 = iVar2;\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2);\n    }" if (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar4 = iVar3 + -1;\n      param_1[1] = iVar3 + iVar6;\n      pvVar5 = (void *)param_1[2];\n      do {\n        while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }\n        *piVar1 = iVar2;\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2);\n    }" { (expression_statement "iVar4 = iVar3 + -1;" (assignment_expression "iVar4 = iVar3 + -1" identifier = (binary_expression "iVar3 + -1" identifier + number_literal)) ;) (expression_statement "param_1[1] = iVar3 + iVar6;" (assignment_expression "param_1[1] = iVar3 + iVar6" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "iVar3 + iVar6" identifier + identifier)) ;) (expression_statement "pvVar5 = (void *)param_1[2];" (assignment_expression "pvVar5 = (void *)param_1[2]" identifier = (cast_expression "(void *)param_1[2]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[2]" identifier [ number_literal ]))) ;) (do_statement "do {\n        while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }\n        *piVar1 = iVar2;\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);" do (compound_statement "{\n        while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }\n        *piVar1 = iVar2;\n        iVar4 = iVar4 + -1;\n      }" { (while_statement "while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }" { (expression_statement "iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);" (assignment_expression "iVar3 = *(int *)((int)pvVar5 + iVar9 * 4)" identifier = (pointer_expression "*(int *)((int)pvVar5 + iVar9 * 4)" * (cast_expression "(int *)((int)pvVar5 + iVar9 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar5 + iVar9 * 4)" ( (binary_expression "(int)pvVar5 + iVar9 * 4" (cast_expression "(int)pvVar5" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "iVar9 * 4" identifier * number_literal)) ))))) ;) (expression_statement "iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);" (assignment_expression "iVar2 = *(int *)((int)pvVar5 + iVar4 * 4)" identifier = (pointer_expression "*(int *)((int)pvVar5 + iVar4 * 4)" * (cast_expression "(int *)((int)pvVar5 + iVar4 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar5 + iVar4 * 4)" ( (binary_expression "(int)pvVar5 + iVar4 * 4" (cast_expression "(int)pvVar5" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "iVar4 * 4" identifier * number_literal)) ))))) ;) (expression_statement "piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);" (assignment_expression "piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4)" identifier = (cast_expression "(int *)((int)pvVar5 + (iVar4 + iVar6) * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar5 + (iVar4 + iVar6) * 4)" ( (binary_expression "(int)pvVar5 + (iVar4 + iVar6) * 4" (cast_expression "(int)pvVar5" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "(iVar4 + iVar6) * 4" (parenthesized_expression "(iVar4 + iVar6)" ( (binary_expression "iVar4 + iVar6" identifier + identifier) )) * number_literal)) )))) ;) (if_statement "if (iVar3 <= iVar2) break;" if (parenthesized_expression "(iVar3 <= iVar2)" ( (binary_expression "iVar3 <= iVar2" identifier <= identifier) )) (break_statement "break;" break ;)) (expression_statement "iVar9 = iVar9 + -1;" (assignment_expression "iVar9 = iVar9 + -1" identifier = (binary_expression "iVar9 + -1" identifier + number_literal)) ;) (expression_statement "*piVar1 = iVar3;" (assignment_expression "*piVar1 = iVar3" (pointer_expression "*piVar1" * identifier) = identifier) ;) (expression_statement "iVar6 = iVar6 + -1;" (assignment_expression "iVar6 = iVar6 + -1" identifier = (binary_expression "iVar6 + -1" identifier + number_literal)) ;) (if_statement "if (iVar6 == 0) {\n            return 0;\n          }" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (compound_statement "{\n            return 0;\n          }" { (return_statement "return 0;" return number_literal ;) })) })) (expression_statement "*piVar1 = iVar2;" (assignment_expression "*piVar1 = iVar2" (pointer_expression "*piVar1" * identifier) = identifier) ;) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(-1 < iVar4)" ( (binary_expression "-1 < iVar4" number_literal < identifier) )) ;) (expression_statement "memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2);" (call_expression "memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2)" identifier (argument_list "(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2)" ( identifier , (cast_expression "(void *)((int)pvVar5 + local_24 * 4)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar5 + local_24 * 4)" ( (binary_expression "(int)pvVar5 + local_24 * 4" (cast_expression "(int)pvVar5" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "local_24 * 4" identifier * number_literal)) ))) , (binary_expression "iVar6 << 2" identifier << number_literal) ))) ;) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) , (binary_expression IDENT != LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) < (binary_expression IDENT + (binary_expression IDENT * LIT))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ])) , (binary_expression IDENT * LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT * LIT)) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ])) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) << LIT) ))) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (binary_expression IDENT * LIT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < IDENT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (binary_expression IDENT ^ LIT)) , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (unary_expression ~ IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) (break_statement break ;)) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (unary_expression ~ IDENT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (break_statement break ;)) }))) }) while (parenthesized_expression ( (binary_expression LIT < IDENT) )) ;) })) (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + (binary_expression IDENT * LIT)) ))) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) * LIT) ))) ;) })) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + LIT) + (binary_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 (parenthesized_expression ( (binary_expression IDENT - IDENT) )) + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (do_statement do (compound_statement { (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (binary_expression IDENT * LIT)) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (binary_expression IDENT * LIT)) ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (binary_expression (parenthesized_expression ( (binary_expression IDENT + IDENT) )) * LIT)) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression LIT < IDENT) )) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (binary_expression IDENT * LIT)) ))) , (binary_expression IDENT << LIT) ))) ;) })) })) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_00017bd0(int *param_1,int param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  void *pvVar5;\n  int iVar6;\n  uint uVar7;\n  uint uVar8;\n  int iVar9;\n  int local_24;\n  \n  if ((param_2 != 0) && (iVar9 = *(int *)(param_2 + 4), iVar9 != 0)) {\n    iVar3 = param_1[1];\n    if (*param_1 < iVar3 + iVar9 * 2) {\n      iVar9 = iVar9 + *param_1;\n      pvVar5 = realloc((void *)param_1[2],iVar9 * 8);\n      if (pvVar5 == (void *)0x0) {\n        return 0xc;\n      }\n      param_1[2] = (int)pvVar5;\n      *param_1 = iVar9 * 2;\n      iVar3 = param_1[1];\n      iVar9 = *(int *)(param_2 + 4);\n    }\n    if (iVar3 == 0) {\n      param_1[1] = iVar9;\n      memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2);\n      return 0;\n    }\n    local_24 = iVar3 + iVar9 * 2;\n    uVar7 = iVar9 - 1;\n    iVar3 = iVar3 + -1;\n    if ((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)) {\n      iVar9 = param_1[2];\n      iVar6 = *(int *)(param_2 + 8);\n      do {\n        iVar4 = *(int *)(iVar6 + uVar7 * 4);\n        iVar2 = *(int *)(iVar9 + iVar3 * 4);\n        if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }\n    if (-1 < (int)uVar7) {\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4);\n    }\n    iVar3 = param_1[1];\n    iVar9 = iVar3 + -1 + *(int *)(param_2 + 4) * 2;\n    iVar6 = (iVar9 - local_24) + 1;\n    if (iVar6 != 0) {\n      iVar4 = iVar3 + -1;\n      param_1[1] = iVar3 + iVar6;\n      pvVar5 = (void *)param_1[2];\n      do {\n        while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }\n        *piVar1 = iVar2;\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2);\n    }\n  }\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_00017bd0(int *param_1,int param_2)" (identifier "FUN_00017bd0") (parameter_list "(int *param_1,int param_2)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  void *pvVar5;\n  int iVar6;\n  uint uVar7;\n  uint uVar8;\n  int iVar9;\n  int local_24;\n  \n  if ((param_2 != 0) && (iVar9 = *(int *)(param_2 + 4), iVar9 != 0)) {\n    iVar3 = param_1[1];\n    if (*param_1 < iVar3 + iVar9 * 2) {\n      iVar9 = iVar9 + *param_1;\n      pvVar5 = realloc((void *)param_1[2],iVar9 * 8);\n      if (pvVar5 == (void *)0x0) {\n        return 0xc;\n      }\n      param_1[2] = (int)pvVar5;\n      *param_1 = iVar9 * 2;\n      iVar3 = param_1[1];\n      iVar9 = *(int *)(param_2 + 4);\n    }\n    if (iVar3 == 0) {\n      param_1[1] = iVar9;\n      memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2);\n      return 0;\n    }\n    local_24 = iVar3 + iVar9 * 2;\n    uVar7 = iVar9 - 1;\n    iVar3 = iVar3 + -1;\n    if ((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)) {\n      iVar9 = param_1[2];\n      iVar6 = *(int *)(param_2 + 8);\n      do {\n        iVar4 = *(int *)(iVar6 + uVar7 * 4);\n        iVar2 = *(int *)(iVar9 + iVar3 * 4);\n        if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }\n    if (-1 < (int)uVar7) {\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4);\n    }\n    iVar3 = param_1[1];\n    iVar9 = iVar3 + -1 + *(int *)(param_2 + 4) * 2;\n    iVar6 = (iVar9 - local_24) + 1;\n    if (iVar6 != 0) {\n      iVar4 = iVar3 + -1;\n      param_1[1] = iVar3 + iVar6;\n      pvVar5 = (void *)param_1[2];\n      do {\n        while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }\n        *piVar1 = iVar2;\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2);\n    }\n  }\n  return 0;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "void *pvVar5;" (primitive_type "void") (pointer_declarator "*pvVar5" (* "*") (identifier "pvVar5")) (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "uint uVar7;" (type_identifier "uint") (identifier "uVar7") (; ";")) (declaration "uint uVar8;" (type_identifier "uint") (identifier "uVar8") (; ";")) (declaration "int iVar9;" (primitive_type "int") (identifier "iVar9") (; ";")) (declaration "int local_24;" (primitive_type "int") (identifier "local_24") (; ";")) (if_statement "if ((param_2 != 0) && (iVar9 = *(int *)(param_2 + 4), iVar9 != 0)) {\n    iVar3 = param_1[1];\n    if (*param_1 < iVar3 + iVar9 * 2) {\n      iVar9 = iVar9 + *param_1;\n      pvVar5 = realloc((void *)param_1[2],iVar9 * 8);\n      if (pvVar5 == (void *)0x0) {\n        return 0xc;\n      }\n      param_1[2] = (int)pvVar5;\n      *param_1 = iVar9 * 2;\n      iVar3 = param_1[1];\n      iVar9 = *(int *)(param_2 + 4);\n    }\n    if (iVar3 == 0) {\n      param_1[1] = iVar9;\n      memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2);\n      return 0;\n    }\n    local_24 = iVar3 + iVar9 * 2;\n    uVar7 = iVar9 - 1;\n    iVar3 = iVar3 + -1;\n    if ((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)) {\n      iVar9 = param_1[2];\n      iVar6 = *(int *)(param_2 + 8);\n      do {\n        iVar4 = *(int *)(iVar6 + uVar7 * 4);\n        iVar2 = *(int *)(iVar9 + iVar3 * 4);\n        if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }\n    if (-1 < (int)uVar7) {\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4);\n    }\n    iVar3 = param_1[1];\n    iVar9 = iVar3 + -1 + *(int *)(param_2 + 4) * 2;\n    iVar6 = (iVar9 - local_24) + 1;\n    if (iVar6 != 0) {\n      iVar4 = iVar3 + -1;\n      param_1[1] = iVar3 + iVar6;\n      pvVar5 = (void *)param_1[2];\n      do {\n        while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }\n        *piVar1 = iVar2;\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2);\n    }\n  }" (if "if") (parenthesized_expression "((param_2 != 0) && (iVar9 = *(int *)(param_2 + 4), iVar9 != 0))" (( "(") (binary_expression "(param_2 != 0) && (iVar9 = *(int *)(param_2 + 4), iVar9 != 0)" (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(iVar9 = *(int *)(param_2 + 4), iVar9 != 0)" (( "(") (comma_expression "iVar9 = *(int *)(param_2 + 4), iVar9 != 0" (assignment_expression "iVar9 = *(int *)(param_2 + 4)" (identifier "iVar9") (= "=") (pointer_expression "*(int *)(param_2 + 4)" (* "*") (cast_expression "(int *)(param_2 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 4)" (( "(") (binary_expression "param_2 + 4" (identifier "param_2") (+ "+") (number_literal "4")) () ")"))))) (, ",") (binary_expression "iVar9 != 0" (identifier "iVar9") (!= "!=") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n    iVar3 = param_1[1];\n    if (*param_1 < iVar3 + iVar9 * 2) {\n      iVar9 = iVar9 + *param_1;\n      pvVar5 = realloc((void *)param_1[2],iVar9 * 8);\n      if (pvVar5 == (void *)0x0) {\n        return 0xc;\n      }\n      param_1[2] = (int)pvVar5;\n      *param_1 = iVar9 * 2;\n      iVar3 = param_1[1];\n      iVar9 = *(int *)(param_2 + 4);\n    }\n    if (iVar3 == 0) {\n      param_1[1] = iVar9;\n      memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2);\n      return 0;\n    }\n    local_24 = iVar3 + iVar9 * 2;\n    uVar7 = iVar9 - 1;\n    iVar3 = iVar3 + -1;\n    if ((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)) {\n      iVar9 = param_1[2];\n      iVar6 = *(int *)(param_2 + 8);\n      do {\n        iVar4 = *(int *)(iVar6 + uVar7 * 4);\n        iVar2 = *(int *)(iVar9 + iVar3 * 4);\n        if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }\n    if (-1 < (int)uVar7) {\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4);\n    }\n    iVar3 = param_1[1];\n    iVar9 = iVar3 + -1 + *(int *)(param_2 + 4) * 2;\n    iVar6 = (iVar9 - local_24) + 1;\n    if (iVar6 != 0) {\n      iVar4 = iVar3 + -1;\n      param_1[1] = iVar3 + iVar6;\n      pvVar5 = (void *)param_1[2];\n      do {\n        while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }\n        *piVar1 = iVar2;\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2);\n    }\n  }" ({ "{") (expression_statement "iVar3 = param_1[1];" (assignment_expression "iVar3 = param_1[1]" (identifier "iVar3") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (if_statement "if (*param_1 < iVar3 + iVar9 * 2) {\n      iVar9 = iVar9 + *param_1;\n      pvVar5 = realloc((void *)param_1[2],iVar9 * 8);\n      if (pvVar5 == (void *)0x0) {\n        return 0xc;\n      }\n      param_1[2] = (int)pvVar5;\n      *param_1 = iVar9 * 2;\n      iVar3 = param_1[1];\n      iVar9 = *(int *)(param_2 + 4);\n    }" (if "if") (parenthesized_expression "(*param_1 < iVar3 + iVar9 * 2)" (( "(") (binary_expression "*param_1 < iVar3 + iVar9 * 2" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (< "<") (binary_expression "iVar3 + iVar9 * 2" (identifier "iVar3") (+ "+") (binary_expression "iVar9 * 2" (identifier "iVar9") (* "*") (number_literal "2")))) () ")")) (compound_statement "{\n      iVar9 = iVar9 + *param_1;\n      pvVar5 = realloc((void *)param_1[2],iVar9 * 8);\n      if (pvVar5 == (void *)0x0) {\n        return 0xc;\n      }\n      param_1[2] = (int)pvVar5;\n      *param_1 = iVar9 * 2;\n      iVar3 = param_1[1];\n      iVar9 = *(int *)(param_2 + 4);\n    }" ({ "{") (expression_statement "iVar9 = iVar9 + *param_1;" (assignment_expression "iVar9 = iVar9 + *param_1" (identifier "iVar9") (= "=") (binary_expression "iVar9 + *param_1" (identifier "iVar9") (+ "+") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "pvVar5 = realloc((void *)param_1[2],iVar9 * 8);" (assignment_expression "pvVar5 = realloc((void *)param_1[2],iVar9 * 8)" (identifier "pvVar5") (= "=") (call_expression "realloc((void *)param_1[2],iVar9 * 8)" (identifier "realloc") (argument_list "((void *)param_1[2],iVar9 * 8)" (( "(") (cast_expression "(void *)param_1[2]" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]"))) (, ",") (binary_expression "iVar9 * 8" (identifier "iVar9") (* "*") (number_literal "8")) () ")")))) (; ";")) (if_statement "if (pvVar5 == (void *)0x0) {\n        return 0xc;\n      }" (if "if") (parenthesized_expression "(pvVar5 == (void *)0x0)" (( "(") (binary_expression "pvVar5 == (void *)0x0" (identifier "pvVar5") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        return 0xc;\n      }" ({ "{") (return_statement "return 0xc;" (return "return") (number_literal "0xc") (; ";")) (} "}"))) (expression_statement "param_1[2] = (int)pvVar5;" (assignment_expression "param_1[2] = (int)pvVar5" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (cast_expression "(int)pvVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar5"))) (; ";")) (expression_statement "*param_1 = iVar9 * 2;" (assignment_expression "*param_1 = iVar9 * 2" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (binary_expression "iVar9 * 2" (identifier "iVar9") (* "*") (number_literal "2"))) (; ";")) (expression_statement "iVar3 = param_1[1];" (assignment_expression "iVar3 = param_1[1]" (identifier "iVar3") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "iVar9 = *(int *)(param_2 + 4);" (assignment_expression "iVar9 = *(int *)(param_2 + 4)" (identifier "iVar9") (= "=") (pointer_expression "*(int *)(param_2 + 4)" (* "*") (cast_expression "(int *)(param_2 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 4)" (( "(") (binary_expression "param_2 + 4" (identifier "param_2") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (} "}"))) (if_statement "if (iVar3 == 0) {\n      param_1[1] = iVar9;\n      memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2);\n      return 0;\n    }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      param_1[1] = iVar9;\n      memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2);\n      return 0;\n    }" ({ "{") (expression_statement "param_1[1] = iVar9;" (assignment_expression "param_1[1] = iVar9" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "iVar9")) (; ";")) (expression_statement "memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2);" (call_expression "memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2)" (identifier "memcpy") (argument_list "((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2)" (( "(") (cast_expression "(void *)param_1[2]" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]"))) (, ",") (pointer_expression "*(void **)(param_2 + 8)" (* "*") (cast_expression "(void **)(param_2 + 8)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")")))) (, ",") (binary_expression "*(int *)(param_2 + 4) << 2" (pointer_expression "*(int *)(param_2 + 4)" (* "*") (cast_expression "(int *)(param_2 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 4)" (( "(") (binary_expression "param_2 + 4" (identifier "param_2") (+ "+") (number_literal "4")) () ")")))) (<< "<<") (number_literal "2")) () ")"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "local_24 = iVar3 + iVar9 * 2;" (assignment_expression "local_24 = iVar3 + iVar9 * 2" (identifier "local_24") (= "=") (binary_expression "iVar3 + iVar9 * 2" (identifier "iVar3") (+ "+") (binary_expression "iVar9 * 2" (identifier "iVar9") (* "*") (number_literal "2")))) (; ";")) (expression_statement "uVar7 = iVar9 - 1;" (assignment_expression "uVar7 = iVar9 - 1" (identifier "uVar7") (= "=") (binary_expression "iVar9 - 1" (identifier "iVar9") (- "-") (number_literal "1"))) (; ";")) (expression_statement "iVar3 = iVar3 + -1;" (assignment_expression "iVar3 = iVar3 + -1" (identifier "iVar3") (= "=") (binary_expression "iVar3 + -1" (identifier "iVar3") (+ "+") (number_literal "-1"))) (; ";")) (if_statement "if ((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)) {\n      iVar9 = param_1[2];\n      iVar6 = *(int *)(param_2 + 8);\n      do {\n        iVar4 = *(int *)(iVar6 + uVar7 * 4);\n        iVar2 = *(int *)(iVar9 + iVar3 * 4);\n        if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }" (if "if") (parenthesized_expression "((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0))" (( "(") (binary_expression "(-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)" (parenthesized_expression "(-1 < iVar3)" (( "(") (binary_expression "-1 < iVar3" (number_literal "-1") (< "<") (identifier "iVar3")) () ")")) (&& "&&") (parenthesized_expression "(uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)" (( "(") (comma_expression "uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0" (assignment_expression "uVar8 = uVar7 ^ 0xffffffff" (identifier "uVar8") (= "=") (binary_expression "uVar7 ^ 0xffffffff" (identifier "uVar7") (^ "^") (number_literal "0xffffffff"))) (, ",") (binary_expression "(int)uVar8 < 0" (cast_expression "(int)uVar8" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar8")) (< "<") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n      iVar9 = param_1[2];\n      iVar6 = *(int *)(param_2 + 8);\n      do {\n        iVar4 = *(int *)(iVar6 + uVar7 * 4);\n        iVar2 = *(int *)(iVar9 + iVar3 * 4);\n        if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);\n    }" ({ "{") (expression_statement "iVar9 = param_1[2];" (assignment_expression "iVar9 = param_1[2]" (identifier "iVar9") (= "=") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]"))) (; ";")) (expression_statement "iVar6 = *(int *)(param_2 + 8);" (assignment_expression "iVar6 = *(int *)(param_2 + 8)" (identifier "iVar6") (= "=") (pointer_expression "*(int *)(param_2 + 8)" (* "*") (cast_expression "(int *)(param_2 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (do_statement "do {\n        iVar4 = *(int *)(iVar6 + uVar7 * 4);\n        iVar2 = *(int *)(iVar9 + iVar3 * 4);\n        if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      } while (-1 < iVar3);" (do "do") (compound_statement "{\n        iVar4 = *(int *)(iVar6 + uVar7 * 4);\n        iVar2 = *(int *)(iVar9 + iVar3 * 4);\n        if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }\n      }" ({ "{") (expression_statement "iVar4 = *(int *)(iVar6 + uVar7 * 4);" (assignment_expression "iVar4 = *(int *)(iVar6 + uVar7 * 4)" (identifier "iVar4") (= "=") (pointer_expression "*(int *)(iVar6 + uVar7 * 4)" (* "*") (cast_expression "(int *)(iVar6 + uVar7 * 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar6 + uVar7 * 4)" (( "(") (binary_expression "iVar6 + uVar7 * 4" (identifier "iVar6") (+ "+") (binary_expression "uVar7 * 4" (identifier "uVar7") (* "*") (number_literal "4"))) () ")"))))) (; ";")) (expression_statement "iVar2 = *(int *)(iVar9 + iVar3 * 4);" (assignment_expression "iVar2 = *(int *)(iVar9 + iVar3 * 4)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(iVar9 + iVar3 * 4)" (* "*") (cast_expression "(int *)(iVar9 + iVar3 * 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar9 + iVar3 * 4)" (( "(") (binary_expression "iVar9 + iVar3 * 4" (identifier "iVar9") (+ "+") (binary_expression "iVar3 * 4" (identifier "iVar3") (* "*") (number_literal "4"))) () ")"))))) (; ";")) (if_statement "if (iVar2 == iVar4) {\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }\n        else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }" (if "if") (parenthesized_expression "(iVar2 == iVar4)" (( "(") (binary_expression "iVar2 == iVar4" (identifier "iVar2") (== "==") (identifier "iVar4")) () ")")) (compound_statement "{\n          uVar7 = uVar7 - 1;\n          iVar3 = iVar3 + -1;\n          uVar8 = ~uVar7;\n          if ((int)uVar7 < 0) break;\n        }" ({ "{") (expression_statement "uVar7 = uVar7 - 1;" (assignment_expression "uVar7 = uVar7 - 1" (identifier "uVar7") (= "=") (binary_expression "uVar7 - 1" (identifier "uVar7") (- "-") (number_literal "1"))) (; ";")) (expression_statement "iVar3 = iVar3 + -1;" (assignment_expression "iVar3 = iVar3 + -1" (identifier "iVar3") (= "=") (binary_expression "iVar3 + -1" (identifier "iVar3") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "uVar8 = ~uVar7;" (assignment_expression "uVar8 = ~uVar7" (identifier "uVar8") (= "=") (unary_expression "~uVar7" (~ "~") (identifier "uVar7"))) (; ";")) (if_statement "if ((int)uVar7 < 0) break;" (if "if") (parenthesized_expression "((int)uVar7 < 0)" (( "(") (binary_expression "(int)uVar7 < 0" (cast_expression "(int)uVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar7")) (< "<") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (} "}")) (else_clause "else {\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }" (else "else") (compound_statement "{\n          if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }\n          if (-1 < (int)uVar8) break;\n        }" ({ "{") (if_statement "if (iVar2 < iVar4) {\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }\n          else {\n            iVar3 = iVar3 + -1;\n          }" (if "if") (parenthesized_expression "(iVar2 < iVar4)" (( "(") (binary_expression "iVar2 < iVar4" (identifier "iVar2") (< "<") (identifier "iVar4")) () ")")) (compound_statement "{\n            local_24 = local_24 + -1;\n            uVar7 = uVar7 - 1;\n            *(int *)(iVar9 + local_24 * 4) = iVar4;\n            uVar8 = ~uVar7;\n          }" ({ "{") (expression_statement "local_24 = local_24 + -1;" (assignment_expression "local_24 = local_24 + -1" (identifier "local_24") (= "=") (binary_expression "local_24 + -1" (identifier "local_24") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "uVar7 = uVar7 - 1;" (assignment_expression "uVar7 = uVar7 - 1" (identifier "uVar7") (= "=") (binary_expression "uVar7 - 1" (identifier "uVar7") (- "-") (number_literal "1"))) (; ";")) (expression_statement "*(int *)(iVar9 + local_24 * 4) = iVar4;" (assignment_expression "*(int *)(iVar9 + local_24 * 4) = iVar4" (pointer_expression "*(int *)(iVar9 + local_24 * 4)" (* "*") (cast_expression "(int *)(iVar9 + local_24 * 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar9 + local_24 * 4)" (( "(") (binary_expression "iVar9 + local_24 * 4" (identifier "iVar9") (+ "+") (binary_expression "local_24 * 4" (identifier "local_24") (* "*") (number_literal "4"))) () ")")))) (= "=") (identifier "iVar4")) (; ";")) (expression_statement "uVar8 = ~uVar7;" (assignment_expression "uVar8 = ~uVar7" (identifier "uVar8") (= "=") (unary_expression "~uVar7" (~ "~") (identifier "uVar7"))) (; ";")) (} "}")) (else_clause "else {\n            iVar3 = iVar3 + -1;\n          }" (else "else") (compound_statement "{\n            iVar3 = iVar3 + -1;\n          }" ({ "{") (expression_statement "iVar3 = iVar3 + -1;" (assignment_expression "iVar3 = iVar3 + -1" (identifier "iVar3") (= "=") (binary_expression "iVar3 + -1" (identifier "iVar3") (+ "+") (number_literal "-1"))) (; ";")) (} "}")))) (if_statement "if (-1 < (int)uVar8) break;" (if "if") (parenthesized_expression "(-1 < (int)uVar8)" (( "(") (binary_expression "-1 < (int)uVar8" (number_literal "-1") (< "<") (cast_expression "(int)uVar8" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar8"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (} "}")))) (} "}")) (while "while") (parenthesized_expression "(-1 < iVar3)" (( "(") (binary_expression "-1 < iVar3" (number_literal "-1") (< "<") (identifier "iVar3")) () ")")) (; ";")) (} "}"))) (if_statement "if (-1 < (int)uVar7) {\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4);\n    }" (if "if") (parenthesized_expression "(-1 < (int)uVar7)" (( "(") (binary_expression "-1 < (int)uVar7" (number_literal "-1") (< "<") (cast_expression "(int)uVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar7"))) () ")")) (compound_statement "{\n      local_24 = local_24 - (uVar7 + 1);\n      memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4);\n    }" ({ "{") (expression_statement "local_24 = local_24 - (uVar7 + 1);" (assignment_expression "local_24 = local_24 - (uVar7 + 1)" (identifier "local_24") (= "=") (binary_expression "local_24 - (uVar7 + 1)" (identifier "local_24") (- "-") (parenthesized_expression "(uVar7 + 1)" (( "(") (binary_expression "uVar7 + 1" (identifier "uVar7") (+ "+") (number_literal "1")) () ")")))) (; ";")) (expression_statement "memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4);" (call_expression "memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4)" (identifier "memcpy") (argument_list "((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4)" (( "(") (cast_expression "(void *)(param_1[2] + local_24 * 4)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1[2] + local_24 * 4)" (( "(") (binary_expression "param_1[2] + local_24 * 4" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (+ "+") (binary_expression "local_24 * 4" (identifier "local_24") (* "*") (number_literal "4"))) () ")"))) (, ",") (pointer_expression "*(void **)(param_2 + 8)" (* "*") (cast_expression "(void **)(param_2 + 8)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")")))) (, ",") (binary_expression "(uVar7 + 1) * 4" (parenthesized_expression "(uVar7 + 1)" (( "(") (binary_expression "uVar7 + 1" (identifier "uVar7") (+ "+") (number_literal "1")) () ")")) (* "*") (number_literal "4")) () ")"))) (; ";")) (} "}"))) (expression_statement "iVar3 = param_1[1];" (assignment_expression "iVar3 = param_1[1]" (identifier "iVar3") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "iVar9 = iVar3 + -1 + *(int *)(param_2 + 4) * 2;" (assignment_expression "iVar9 = iVar3 + -1 + *(int *)(param_2 + 4) * 2" (identifier "iVar9") (= "=") (binary_expression "iVar3 + -1 + *(int *)(param_2 + 4) * 2" (binary_expression "iVar3 + -1" (identifier "iVar3") (+ "+") (number_literal "-1")) (+ "+") (binary_expression "*(int *)(param_2 + 4) * 2" (pointer_expression "*(int *)(param_2 + 4)" (* "*") (cast_expression "(int *)(param_2 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 4)" (( "(") (binary_expression "param_2 + 4" (identifier "param_2") (+ "+") (number_literal "4")) () ")")))) (* "*") (number_literal "2")))) (; ";")) (expression_statement "iVar6 = (iVar9 - local_24) + 1;" (assignment_expression "iVar6 = (iVar9 - local_24) + 1" (identifier "iVar6") (= "=") (binary_expression "(iVar9 - local_24) + 1" (parenthesized_expression "(iVar9 - local_24)" (( "(") (binary_expression "iVar9 - local_24" (identifier "iVar9") (- "-") (identifier "local_24")) () ")")) (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (iVar6 != 0) {\n      iVar4 = iVar3 + -1;\n      param_1[1] = iVar3 + iVar6;\n      pvVar5 = (void *)param_1[2];\n      do {\n        while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }\n        *piVar1 = iVar2;\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2);\n    }" (if "if") (parenthesized_expression "(iVar6 != 0)" (( "(") (binary_expression "iVar6 != 0" (identifier "iVar6") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      iVar4 = iVar3 + -1;\n      param_1[1] = iVar3 + iVar6;\n      pvVar5 = (void *)param_1[2];\n      do {\n        while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }\n        *piVar1 = iVar2;\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);\n      memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2);\n    }" ({ "{") (expression_statement "iVar4 = iVar3 + -1;" (assignment_expression "iVar4 = iVar3 + -1" (identifier "iVar4") (= "=") (binary_expression "iVar3 + -1" (identifier "iVar3") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "param_1[1] = iVar3 + iVar6;" (assignment_expression "param_1[1] = iVar3 + iVar6" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "iVar3 + iVar6" (identifier "iVar3") (+ "+") (identifier "iVar6"))) (; ";")) (expression_statement "pvVar5 = (void *)param_1[2];" (assignment_expression "pvVar5 = (void *)param_1[2]" (identifier "pvVar5") (= "=") (cast_expression "(void *)param_1[2]" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")))) (; ";")) (do_statement "do {\n        while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }\n        *piVar1 = iVar2;\n        iVar4 = iVar4 + -1;\n      } while (-1 < iVar4);" (do "do") (compound_statement "{\n        while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }\n        *piVar1 = iVar2;\n        iVar4 = iVar4 + -1;\n      }" ({ "{") (while_statement "while( true ) {\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);\n          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);\n          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);\n          if (iVar3 <= iVar2) break;\n          iVar9 = iVar9 + -1;\n          *piVar1 = iVar3;\n          iVar6 = iVar6 + -1;\n          if (iVar6 == 0) {\n            return 0;\n          }\n        }" ({ "{") (expression_statement "iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);" (assignment_expression "iVar3 = *(int *)((int)pvVar5 + iVar9 * 4)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)((int)pvVar5 + iVar9 * 4)" (* "*") (cast_expression "(int *)((int)pvVar5 + iVar9 * 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)pvVar5 + iVar9 * 4)" (( "(") (binary_expression "(int)pvVar5 + iVar9 * 4" (cast_expression "(int)pvVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar5")) (+ "+") (binary_expression "iVar9 * 4" (identifier "iVar9") (* "*") (number_literal "4"))) () ")"))))) (; ";")) (expression_statement "iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);" (assignment_expression "iVar2 = *(int *)((int)pvVar5 + iVar4 * 4)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)((int)pvVar5 + iVar4 * 4)" (* "*") (cast_expression "(int *)((int)pvVar5 + iVar4 * 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)pvVar5 + iVar4 * 4)" (( "(") (binary_expression "(int)pvVar5 + iVar4 * 4" (cast_expression "(int)pvVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar5")) (+ "+") (binary_expression "iVar4 * 4" (identifier "iVar4") (* "*") (number_literal "4"))) () ")"))))) (; ";")) (expression_statement "piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);" (assignment_expression "piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4)" (identifier "piVar1") (= "=") (cast_expression "(int *)((int)pvVar5 + (iVar4 + iVar6) * 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)pvVar5 + (iVar4 + iVar6) * 4)" (( "(") (binary_expression "(int)pvVar5 + (iVar4 + iVar6) * 4" (cast_expression "(int)pvVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar5")) (+ "+") (binary_expression "(iVar4 + iVar6) * 4" (parenthesized_expression "(iVar4 + iVar6)" (( "(") (binary_expression "iVar4 + iVar6" (identifier "iVar4") (+ "+") (identifier "iVar6")) () ")")) (* "*") (number_literal "4"))) () ")")))) (; ";")) (if_statement "if (iVar3 <= iVar2) break;" (if "if") (parenthesized_expression "(iVar3 <= iVar2)" (( "(") (binary_expression "iVar3 <= iVar2" (identifier "iVar3") (<= "<=") (identifier "iVar2")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar9 = iVar9 + -1;" (assignment_expression "iVar9 = iVar9 + -1" (identifier "iVar9") (= "=") (binary_expression "iVar9 + -1" (identifier "iVar9") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "*piVar1 = iVar3;" (assignment_expression "*piVar1 = iVar3" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (= "=") (identifier "iVar3")) (; ";")) (expression_statement "iVar6 = iVar6 + -1;" (assignment_expression "iVar6 = iVar6 + -1" (identifier "iVar6") (= "=") (binary_expression "iVar6 + -1" (identifier "iVar6") (+ "+") (number_literal "-1"))) (; ";")) (if_statement "if (iVar6 == 0) {\n            return 0;\n          }" (if "if") (parenthesized_expression "(iVar6 == 0)" (( "(") (binary_expression "iVar6 == 0" (identifier "iVar6") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n            return 0;\n          }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (} "}"))) (expression_statement "*piVar1 = iVar2;" (assignment_expression "*piVar1 = iVar2" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (= "=") (identifier "iVar2")) (; ";")) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + -1" (identifier "iVar4") (+ "+") (number_literal "-1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(-1 < iVar4)" (( "(") (binary_expression "-1 < iVar4" (number_literal "-1") (< "<") (identifier "iVar4")) () ")")) (; ";")) (expression_statement "memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2);" (call_expression "memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2)" (identifier "memcpy") (argument_list "(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2)" (( "(") (identifier "pvVar5") (, ",") (cast_expression "(void *)((int)pvVar5 + local_24 * 4)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)pvVar5 + local_24 * 4)" (( "(") (binary_expression "(int)pvVar5 + local_24 * 4" (cast_expression "(int)pvVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar5")) (+ "+") (binary_expression "local_24 * 4" (identifier "local_24") (* "*") (number_literal "4"))) () ")"))) (, ",") (binary_expression "iVar6 << 2" (identifier "iVar6") (<< "<<") (number_literal "2")) () ")"))) (; ";")) (} "}"))) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

type_1 function_1(type_2 *dest,type_2 *var_1)

{
  int *piVar1;
  type_3 *pIVar2;
  int var_3;
  int var_10;
  type_3 *var_5;
  int var_8;
  type_4 var_7;
  type_4 uVar8;
  int var_2;
  int var_9;
  
  if ((var_1 != (type_2 *)0x0) && (var_2 = var_1->nelem, var_2 != 0)) {
    var_3 = dest->nelem;
    if (dest->alloc < var_3 + var_2 * 2) {
      var_2 = var_2 + dest->alloc;
      var_5 = (type_3 *)var_4(dest->elems,var_2 * 8);
      if (var_5 == (type_3 *)0x0) {
        return _REG_ESPACE;
      }
      dest->elems = var_5;
      dest->alloc = var_2 * 2;
      var_3 = dest->nelem;
      var_2 = var_1->nelem;
    }
    if (var_3 == 0) {
      dest->nelem = var_2;
      var_6(dest->elems,var_1->elems,var_1->nelem << 2);
      return _REG_NOERROR;
    }
    var_9 = var_3 + var_2 * 2;
    var_7 = var_2 - 1;
    var_3 = var_3 + -1;
    if ((-1 < var_3) && (uVar8 = var_7 ^ 0xffffffff, (int)uVar8 < 0)) {
      var_5 = dest->elems;
      pIVar2 = var_1->elems;
      do {
        var_2 = pIVar2[var_7];
        var_8 = var_5[var_3];
        if (var_8 == var_2) {
          var_7 = var_7 - 1;
          var_3 = var_3 + -1;
          uVar8 = ~var_7;
          if ((int)var_7 < 0) break;
        }
        else {
          if (var_8 < var_2) {
            var_9 = var_9 + -1;
            var_7 = var_7 - 1;
            var_5[var_9] = var_2;
            uVar8 = ~var_7;
          }
          else {
            var_3 = var_3 + -1;
          }
          if (-1 < (int)uVar8) break;
        }
      } while (-1 < var_3);
    }
    if (-1 < (int)var_7) {
      var_9 = var_9 - (var_7 + 1);
      var_6(dest->elems + var_9,var_1->elems,(var_7 + 1) * 4);
    }
    var_3 = dest->nelem;
    var_2 = var_3 + -1 + var_1->nelem * 2;
    var_8 = (var_2 - var_9) + 1;
    if (var_8 != 0) {
      var_10 = var_3 + -1;
      dest->nelem = var_3 + var_8;
      var_5 = dest->elems;
      do {
        while( true ) {
          piVar1 = var_5 + var_2;
          if (*piVar1 <= var_5[var_10]) break;
          var_2 = var_2 + -1;
          var_5[var_10 + var_8] = *piVar1;
          var_8 = var_8 + -1;
          if (var_8 == 0) {
            return _REG_NOERROR;
          }
        }
        var_5[var_10 + var_8] = var_5[var_10];
        var_10 = var_10 + -1;
      } while (-1 < var_10);
      var_6(var_5,var_5 + var_9,var_8 << 2);
    }
  }
  return _REG_NOERROR;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))) (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_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: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))) (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))))) (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (binary_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: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (unary_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))) consequence: (break_statement))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (unary_expression argument: (identifier))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) consequence: (break_statement)))))) condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal))))) (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) 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: (parenthesized_expression (binary_expression left: (identifier) right: (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: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) (do_statement body: (compound_statement (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (binary_expression left: (identifier) right: (number_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (binary_expression left: (identifier) right: (number_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (binary_expression left: (identifier) right: (number_literal))))) (binary_expression left: (identifier) right: (number_literal))))))))) (return_statement (number_literal)))))

/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

undefined4 MASKED(int *param_1,int param_2)

{
  int *piVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  void *pvVar5;
  int iVar6;
  uint uVar7;
  uint uVar8;
  int iVar9;
  int local_24;
  
  if ((param_2 != 0) && (iVar9 = *(int *)(param_2 + 4), iVar9 != 0)) {
    iVar3 = param_1[1];
    if (*param_1 < iVar3 + iVar9 * 2) {
      iVar9 = iVar9 + *param_1;
      pvVar5 = realloc((void *)param_1[2],iVar9 * 8);
      if (pvVar5 == (void *)0x0) {
        return 0xc;
      }
      param_1[2] = (int)pvVar5;
      *param_1 = iVar9 * 2;
      iVar3 = param_1[1];
      iVar9 = *(int *)(param_2 + 4);
    }
    if (iVar3 == 0) {
      param_1[1] = iVar9;
      memcpy((void *)param_1[2],*(void **)(param_2 + 8),*(int *)(param_2 + 4) << 2);
      return 0;
    }
    local_24 = iVar3 + iVar9 * 2;
    uVar7 = iVar9 - 1;
    iVar3 = iVar3 + -1;
    if ((-1 < iVar3) && (uVar8 = uVar7 ^ 0xffffffff, (int)uVar8 < 0)) {
      iVar9 = param_1[2];
      iVar6 = *(int *)(param_2 + 8);
      do {
        iVar4 = *(int *)(iVar6 + uVar7 * 4);
        iVar2 = *(int *)(iVar9 + iVar3 * 4);
        if (iVar2 == iVar4) {
          uVar7 = uVar7 - 1;
          iVar3 = iVar3 + -1;
          uVar8 = ~uVar7;
          if ((int)uVar7 < 0) break;
        }
        else {
          if (iVar2 < iVar4) {
            local_24 = local_24 + -1;
            uVar7 = uVar7 - 1;
            *(int *)(iVar9 + local_24 * 4) = iVar4;
            uVar8 = ~uVar7;
          }
          else {
            iVar3 = iVar3 + -1;
          }
          if (-1 < (int)uVar8) break;
        }
      } while (-1 < iVar3);
    }
    if (-1 < (int)uVar7) {
      local_24 = local_24 - (uVar7 + 1);
      memcpy((void *)(param_1[2] + local_24 * 4),*(void **)(param_2 + 8),(uVar7 + 1) * 4);
    }
    iVar3 = param_1[1];
    iVar9 = iVar3 + -1 + *(int *)(param_2 + 4) * 2;
    iVar6 = (iVar9 - local_24) + 1;
    if (iVar6 != 0) {
      iVar4 = iVar3 + -1;
      param_1[1] = iVar3 + iVar6;
      pvVar5 = (void *)param_1[2];
      do {
        while( true ) {
          iVar3 = *(int *)((int)pvVar5 + iVar9 * 4);
          iVar2 = *(int *)((int)pvVar5 + iVar4 * 4);
          piVar1 = (int *)((int)pvVar5 + (iVar4 + iVar6) * 4);
          if (iVar3 <= iVar2) break;
          iVar9 = iVar9 + -1;
          *piVar1 = iVar3;
          iVar6 = iVar6 + -1;
          if (iVar6 == 0) {
            return 0;
          }
        }
        *piVar1 = iVar2;
        iVar4 = iVar4 + -1;
      } while (-1 < iVar4);
      memcpy(pvVar5,(void *)((int)pvVar5 + local_24 * 4),iVar6 << 2);
    }
  }
  return 0;
}

