
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* DWARF original name: __adjust_heap<__gnu_cxx::__normal_iterator<std::pair<unsigned int, unsigned
   int>*, std::vector<std::pair<unsigned int, unsigned int> > >, long int, std::pair<unsigned int,
   unsigned int>, __gnu_cxx::__ops::_Iter_comp_iter<gold::Eh_frame_hdr::Fde_address_compare<32> > >
    */

void std::
     __adjust_heap<__gnu_cxx::__normal_iterator<std::pair<unsigned_int,_unsigned_int>*,_std::vector<std::pair<unsigned_int,_unsigned_int>_>_>,_long_int,_std::pair<unsigned_int,_unsigned_int>,___gnu_cxx::__ops::_Iter_comp_iter<gold::Eh_frame_hdr::Fde_address_compare<32>_>_>
               (long __first,long __holeIndex,ulong __len,undefined8 __value)

{
  uint *puVar1;
  uint uVar2;
  long lVar3;
  uint *puVar4;
  long lVar5;
  long lVar6;
  long __topIndex;
  long lVar7;
  uint *puVar8;
  uint uVar9;
  
  lVar6 = (long)(__len - 1) / 2;
  lVar5 = __holeIndex;
  if (__holeIndex < lVar6) {
    do {
      lVar3 = (lVar5 + 1) * 2;
      lVar7 = lVar3 + -1;
      puVar4 = (uint *)((lVar5 + 1) * 0x10 + __first);
      puVar8 = (uint *)(__first + lVar7 * 8);
      uVar2 = *puVar4;
      uVar9 = *puVar8;
      if (uVar9 <= uVar2) {
        lVar7 = lVar3;
        puVar8 = puVar4;
        uVar9 = uVar2;
      }
      puVar4 = (uint *)(__first + lVar5 * 8);
      *puVar4 = uVar9;
      puVar4[1] = puVar8[1];
      lVar5 = lVar7;
    } while (lVar7 < lVar6);
    if ((__len & 1) == 0) goto LAB_002af870;
  }
  else {
    puVar8 = (uint *)(__first + __holeIndex * 8);
    lVar7 = __holeIndex;
    if ((__len & 1) != 0) goto LAB_002af84b;
LAB_002af870:
    if ((long)(__len - 2) / 2 == lVar7) {
      lVar7 = lVar7 * 2 + 1;
      puVar4 = (uint *)(__first + lVar7 * 8);
      *puVar8 = *puVar4;
      puVar8[1] = puVar4[1];
      puVar8 = puVar4;
    }
  }
  lVar5 = (lVar7 + -1) / 2;
  if (__holeIndex < lVar7) {
    puVar4 = (uint *)(__first + lVar5 * 8);
    uVar2 = *puVar4;
    while (lVar6 = lVar5, uVar2 < (uint)__value) {
      puVar1 = (uint *)(__first + lVar7 * 8);
      puVar8 = (uint *)(__first + lVar6 * 8);
      *puVar1 = uVar2;
      puVar1[1] = puVar4[1];
      lVar5 = (lVar6 + -1) / 2;
      if (lVar6 <= __holeIndex) break;
      puVar4 = (uint *)(__first + lVar5 * 8);
      lVar7 = lVar6;
      uVar2 = *puVar4;
    }
  }
LAB_002af84b:
  *(undefined8 *)puVar8 = __value;
  return;
}



void FUN_002af770(long param_1,long param_2,ulong param_3,undefined8 param_4)

{
  uint *puVar1;
  uint uVar2;
  long lVar3;
  uint *puVar4;
  long lVar5;
  long lVar6;
  long lVar7;
  uint *puVar8;
  uint uVar9;
  
  lVar6 = (long)(param_3 - 1) / 2;
  lVar5 = param_2;
  if (param_2 < lVar6) {
    do {
      lVar3 = (lVar5 + 1) * 2;
      lVar7 = lVar3 + -1;
      puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1);
      puVar8 = (uint *)(param_1 + lVar7 * 8);
      uVar2 = *puVar4;
      uVar9 = *puVar8;
      if (uVar9 <= uVar2) {
        lVar7 = lVar3;
        puVar8 = puVar4;
        uVar9 = uVar2;
      }
      puVar4 = (uint *)(param_1 + lVar5 * 8);
      *puVar4 = uVar9;
      puVar4[1] = puVar8[1];
      lVar5 = lVar7;
    } while (lVar7 < lVar6);
    if ((param_3 & 1) == 0) goto LAB_002af870;
  }
  else {
    puVar8 = (uint *)(param_1 + param_2 * 8);
    lVar7 = param_2;
    if ((param_3 & 1) != 0) goto LAB_002af84b;
LAB_002af870:
    if ((long)(param_3 - 2) / 2 == lVar7) {
      lVar7 = lVar7 * 2 + 1;
      puVar4 = (uint *)(param_1 + lVar7 * 8);
      *puVar8 = *puVar4;
      puVar8[1] = puVar4[1];
      puVar8 = puVar4;
    }
  }
  lVar5 = (lVar7 + -1) / 2;
  if (param_2 < lVar7) {
    puVar4 = (uint *)(param_1 + lVar5 * 8);
    uVar2 = *puVar4;
    while (lVar6 = lVar5, uVar2 < (uint)param_4) {
      puVar1 = (uint *)(param_1 + lVar7 * 8);
      puVar8 = (uint *)(param_1 + lVar6 * 8);
      *puVar1 = uVar2;
      puVar1[1] = puVar4[1];
      lVar5 = (lVar6 + -1) / 2;
      if (lVar6 <= param_2) break;
      puVar4 = (uint *)(param_1 + lVar5 * 8);
      lVar7 = lVar6;
      uVar2 = *puVar4;
    }
  }
LAB_002af84b:
  *(undefined8 *)puVar8 = param_4;
  return;
}


LEA RAX,[RDX + -0x1]
PUSH R14
MOV R10D,ECX
PUSH R13
PUSH R12
MOV R12,RDX
PUSH RBP
MOV RBP,RAX
AND R12D,0x1
SHR RBP,0x3f
PUSH RBX
ADD RBP,RAX
SAR RBP,0x1
CMP RSI,RBP
JGE 0x002af860
MOV RBX,RSI
NOP
LEA RAX,[RBX + 0x1]
LEA R13,[RAX + RAX*0x1]
SHL RAX,0x4
LEA R8,[R13 + -0x1]
ADD RAX,RDI
LEA R9,[RDI + R8*0x8]
MOV R14D,dword ptr [RAX]
MOV R11D,dword ptr [R9]
CMP R11D,R14D
JA 0x002af7cb
MOV R9,RAX
MOV R11D,R14D
MOV R8,R13
LEA RAX,[RDI + RBX*0x8]
MOV RBX,R8
MOV dword ptr [RAX],R11D
MOV R11D,dword ptr [R9 + 0x4]
MOV dword ptr [RAX + 0x4],R11D
CMP R8,RBP
JL 0x002af7a0
TEST R12,R12
JZ 0x002af870
LEA RAX,[R8 + -0x1]
MOV RDX,RAX
SHR RDX,0x3f
ADD RDX,RAX
SAR RDX,0x1
CMP R8,RSI
JLE 0x002af84b
LEA RBX,[RDI + RDX*0x8]
MOV R11D,dword ptr [RBX]
CMP R11D,ECX
JC 0x002af822
JMP 0x002af84b
LEA RBX,[RDI + RAX*0x8]
MOV R8,RDX
MOV RDX,RAX
MOV R11D,dword ptr [RBX]
CMP R11D,R10D
JNC 0x002af84b
LEA RAX,[RDI + R8*0x8]
LEA R9,[RDI + RDX*0x8]
MOV dword ptr [RAX],R11D
MOV R8D,dword ptr [RBX + 0x4]
MOV dword ptr [RAX + 0x4],R8D
LEA R8,[RDX + -0x1]
MOV RAX,R8
SHR RAX,0x3f
ADD RAX,R8
SAR RAX,0x1
CMP RSI,RDX
JL 0x002af810
MOV qword ptr [R9],RCX
POP RBX
POP RBP
POP R12
POP R13
POP R14
RET
LEA R9,[RDI + RSI*0x8]
TEST R12,R12
JNZ 0x002af84b
MOV R8,RSI
NOP dword ptr [RAX]
LEA RAX,[RDX + -0x2]
MOV RDX,RAX
SHR RDX,0x3f
ADD RDX,RAX
SAR RDX,0x1
CMP RDX,R8
JNZ 0x002af7eb
LEA R8,[R8 + R8*0x1 + 0x1]
LEA RAX,[RDI + R8*0x8]
MOV EDX,dword ptr [RAX]
MOV dword ptr [R9],EDX
MOV EDX,dword ptr [RAX + 0x4]
MOV dword ptr [R9 + 0x4],EDX
MOV R9,RAX
JMP 0x002af7eb
(translation_unit "void FUN_002af770(long param_1,long param_2,ulong param_3,undefined8 param_4)\n\n{\n  uint *puVar1;\n  uint uVar2;\n  long lVar3;\n  uint *puVar4;\n  long lVar5;\n  long lVar6;\n  long lVar7;\n  uint *puVar8;\n  uint uVar9;\n  \n  lVar6 = (long)(param_3 - 1) / 2;\n  lVar5 = param_2;\n  if (param_2 < lVar6) {\n    do {\n      lVar3 = (lVar5 + 1) * 2;\n      lVar7 = lVar3 + -1;\n      puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1);\n      puVar8 = (uint *)(param_1 + lVar7 * 8);\n      uVar2 = *puVar4;\n      uVar9 = *puVar8;\n      if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      *puVar4 = uVar9;\n      puVar4[1] = puVar8[1];\n      lVar5 = lVar7;\n    } while (lVar7 < lVar6);\n    if ((param_3 & 1) == 0) goto LAB_002af870;\n  }\n  else {\n    puVar8 = (uint *)(param_1 + param_2 * 8);\n    lVar7 = param_2;\n    if ((param_3 & 1) != 0) goto LAB_002af84b;\nLAB_002af870:\n    if ((long)(param_3 - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(param_1 + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }\n  }\n  lVar5 = (lVar7 + -1) / 2;\n  if (param_2 < lVar7) {\n    puVar4 = (uint *)(param_1 + lVar5 * 8);\n    uVar2 = *puVar4;\n    while (lVar6 = lVar5, uVar2 < (uint)param_4) {\n      puVar1 = (uint *)(param_1 + lVar7 * 8);\n      puVar8 = (uint *)(param_1 + lVar6 * 8);\n      *puVar1 = uVar2;\n      puVar1[1] = puVar4[1];\n      lVar5 = (lVar6 + -1) / 2;\n      if (lVar6 <= param_2) break;\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      lVar7 = lVar6;\n      uVar2 = *puVar4;\n    }\n  }\nLAB_002af84b:\n  *(undefined8 *)puVar8 = param_4;\n  return;\n}\n\n" (function_definition "void FUN_002af770(long param_1,long param_2,ulong param_3,undefined8 param_4)\n\n{\n  uint *puVar1;\n  uint uVar2;\n  long lVar3;\n  uint *puVar4;\n  long lVar5;\n  long lVar6;\n  long lVar7;\n  uint *puVar8;\n  uint uVar9;\n  \n  lVar6 = (long)(param_3 - 1) / 2;\n  lVar5 = param_2;\n  if (param_2 < lVar6) {\n    do {\n      lVar3 = (lVar5 + 1) * 2;\n      lVar7 = lVar3 + -1;\n      puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1);\n      puVar8 = (uint *)(param_1 + lVar7 * 8);\n      uVar2 = *puVar4;\n      uVar9 = *puVar8;\n      if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      *puVar4 = uVar9;\n      puVar4[1] = puVar8[1];\n      lVar5 = lVar7;\n    } while (lVar7 < lVar6);\n    if ((param_3 & 1) == 0) goto LAB_002af870;\n  }\n  else {\n    puVar8 = (uint *)(param_1 + param_2 * 8);\n    lVar7 = param_2;\n    if ((param_3 & 1) != 0) goto LAB_002af84b;\nLAB_002af870:\n    if ((long)(param_3 - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(param_1 + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }\n  }\n  lVar5 = (lVar7 + -1) / 2;\n  if (param_2 < lVar7) {\n    puVar4 = (uint *)(param_1 + lVar5 * 8);\n    uVar2 = *puVar4;\n    while (lVar6 = lVar5, uVar2 < (uint)param_4) {\n      puVar1 = (uint *)(param_1 + lVar7 * 8);\n      puVar8 = (uint *)(param_1 + lVar6 * 8);\n      *puVar1 = uVar2;\n      puVar1[1] = puVar4[1];\n      lVar5 = (lVar6 + -1) / 2;\n      if (lVar6 <= param_2) break;\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      lVar7 = lVar6;\n      uVar2 = *puVar4;\n    }\n  }\nLAB_002af84b:\n  *(undefined8 *)puVar8 = param_4;\n  return;\n}" primitive_type (function_declarator "FUN_002af770(long param_1,long param_2,ulong param_3,undefined8 param_4)" identifier (parameter_list "(long param_1,long param_2,ulong param_3,undefined8 param_4)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "ulong param_3" type_identifier identifier) , (parameter_declaration "undefined8 param_4" type_identifier identifier) ))) (compound_statement "{\n  uint *puVar1;\n  uint uVar2;\n  long lVar3;\n  uint *puVar4;\n  long lVar5;\n  long lVar6;\n  long lVar7;\n  uint *puVar8;\n  uint uVar9;\n  \n  lVar6 = (long)(param_3 - 1) / 2;\n  lVar5 = param_2;\n  if (param_2 < lVar6) {\n    do {\n      lVar3 = (lVar5 + 1) * 2;\n      lVar7 = lVar3 + -1;\n      puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1);\n      puVar8 = (uint *)(param_1 + lVar7 * 8);\n      uVar2 = *puVar4;\n      uVar9 = *puVar8;\n      if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      *puVar4 = uVar9;\n      puVar4[1] = puVar8[1];\n      lVar5 = lVar7;\n    } while (lVar7 < lVar6);\n    if ((param_3 & 1) == 0) goto LAB_002af870;\n  }\n  else {\n    puVar8 = (uint *)(param_1 + param_2 * 8);\n    lVar7 = param_2;\n    if ((param_3 & 1) != 0) goto LAB_002af84b;\nLAB_002af870:\n    if ((long)(param_3 - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(param_1 + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }\n  }\n  lVar5 = (lVar7 + -1) / 2;\n  if (param_2 < lVar7) {\n    puVar4 = (uint *)(param_1 + lVar5 * 8);\n    uVar2 = *puVar4;\n    while (lVar6 = lVar5, uVar2 < (uint)param_4) {\n      puVar1 = (uint *)(param_1 + lVar7 * 8);\n      puVar8 = (uint *)(param_1 + lVar6 * 8);\n      *puVar1 = uVar2;\n      puVar1[1] = puVar4[1];\n      lVar5 = (lVar6 + -1) / 2;\n      if (lVar6 <= param_2) break;\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      lVar7 = lVar6;\n      uVar2 = *puVar4;\n    }\n  }\nLAB_002af84b:\n  *(undefined8 *)puVar8 = param_4;\n  return;\n}" { (declaration "uint *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "uint *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar6;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar7;" (sized_type_specifier "long" long) identifier ;) (declaration "uint *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "uint uVar9;" type_identifier identifier ;) (expression_statement "lVar6 = (long)(param_3 - 1) / 2;" (assignment_expression "lVar6 = (long)(param_3 - 1) / 2" identifier = (binary_expression "(long)(param_3 - 1) / 2" (cast_expression "(long)(param_3 - 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(param_3 - 1)" ( (binary_expression "param_3 - 1" identifier - number_literal) ))) / number_literal)) ;) (expression_statement "lVar5 = param_2;" (assignment_expression "lVar5 = param_2" identifier = identifier) ;) (if_statement "if (param_2 < lVar6) {\n    do {\n      lVar3 = (lVar5 + 1) * 2;\n      lVar7 = lVar3 + -1;\n      puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1);\n      puVar8 = (uint *)(param_1 + lVar7 * 8);\n      uVar2 = *puVar4;\n      uVar9 = *puVar8;\n      if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      *puVar4 = uVar9;\n      puVar4[1] = puVar8[1];\n      lVar5 = lVar7;\n    } while (lVar7 < lVar6);\n    if ((param_3 & 1) == 0) goto LAB_002af870;\n  }\n  else {\n    puVar8 = (uint *)(param_1 + param_2 * 8);\n    lVar7 = param_2;\n    if ((param_3 & 1) != 0) goto LAB_002af84b;\nLAB_002af870:\n    if ((long)(param_3 - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(param_1 + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }\n  }" if (parenthesized_expression "(param_2 < lVar6)" ( (binary_expression "param_2 < lVar6" identifier < identifier) )) (compound_statement "{\n    do {\n      lVar3 = (lVar5 + 1) * 2;\n      lVar7 = lVar3 + -1;\n      puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1);\n      puVar8 = (uint *)(param_1 + lVar7 * 8);\n      uVar2 = *puVar4;\n      uVar9 = *puVar8;\n      if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      *puVar4 = uVar9;\n      puVar4[1] = puVar8[1];\n      lVar5 = lVar7;\n    } while (lVar7 < lVar6);\n    if ((param_3 & 1) == 0) goto LAB_002af870;\n  }" { (do_statement "do {\n      lVar3 = (lVar5 + 1) * 2;\n      lVar7 = lVar3 + -1;\n      puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1);\n      puVar8 = (uint *)(param_1 + lVar7 * 8);\n      uVar2 = *puVar4;\n      uVar9 = *puVar8;\n      if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      *puVar4 = uVar9;\n      puVar4[1] = puVar8[1];\n      lVar5 = lVar7;\n    } while (lVar7 < lVar6);" do (compound_statement "{\n      lVar3 = (lVar5 + 1) * 2;\n      lVar7 = lVar3 + -1;\n      puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1);\n      puVar8 = (uint *)(param_1 + lVar7 * 8);\n      uVar2 = *puVar4;\n      uVar9 = *puVar8;\n      if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      *puVar4 = uVar9;\n      puVar4[1] = puVar8[1];\n      lVar5 = lVar7;\n    }" { (expression_statement "lVar3 = (lVar5 + 1) * 2;" (assignment_expression "lVar3 = (lVar5 + 1) * 2" identifier = (binary_expression "(lVar5 + 1) * 2" (parenthesized_expression "(lVar5 + 1)" ( (binary_expression "lVar5 + 1" identifier + number_literal) )) * number_literal)) ;) (expression_statement "lVar7 = lVar3 + -1;" (assignment_expression "lVar7 = lVar3 + -1" identifier = (binary_expression "lVar3 + -1" identifier + number_literal)) ;) (expression_statement "puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1);" (assignment_expression "puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1)" identifier = (cast_expression "(uint *)((lVar5 + 1) * 0x10 + param_1)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((lVar5 + 1) * 0x10 + param_1)" ( (binary_expression "(lVar5 + 1) * 0x10 + param_1" (binary_expression "(lVar5 + 1) * 0x10" (parenthesized_expression "(lVar5 + 1)" ( (binary_expression "lVar5 + 1" identifier + number_literal) )) * number_literal) + identifier) )))) ;) (expression_statement "puVar8 = (uint *)(param_1 + lVar7 * 8);" (assignment_expression "puVar8 = (uint *)(param_1 + lVar7 * 8)" identifier = (cast_expression "(uint *)(param_1 + lVar7 * 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + lVar7 * 8)" ( (binary_expression "param_1 + lVar7 * 8" identifier + (binary_expression "lVar7 * 8" identifier * number_literal)) )))) ;) (expression_statement "uVar2 = *puVar4;" (assignment_expression "uVar2 = *puVar4" identifier = (pointer_expression "*puVar4" * identifier)) ;) (expression_statement "uVar9 = *puVar8;" (assignment_expression "uVar9 = *puVar8" identifier = (pointer_expression "*puVar8" * identifier)) ;) (if_statement "if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }" if (parenthesized_expression "(uVar9 <= uVar2)" ( (binary_expression "uVar9 <= uVar2" identifier <= identifier) )) (compound_statement "{\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }" { (expression_statement "lVar7 = lVar3;" (assignment_expression "lVar7 = lVar3" identifier = identifier) ;) (expression_statement "puVar8 = puVar4;" (assignment_expression "puVar8 = puVar4" identifier = identifier) ;) (expression_statement "uVar9 = uVar2;" (assignment_expression "uVar9 = uVar2" identifier = identifier) ;) })) (expression_statement "puVar4 = (uint *)(param_1 + lVar5 * 8);" (assignment_expression "puVar4 = (uint *)(param_1 + lVar5 * 8)" identifier = (cast_expression "(uint *)(param_1 + lVar5 * 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + lVar5 * 8)" ( (binary_expression "param_1 + lVar5 * 8" identifier + (binary_expression "lVar5 * 8" identifier * number_literal)) )))) ;) (expression_statement "*puVar4 = uVar9;" (assignment_expression "*puVar4 = uVar9" (pointer_expression "*puVar4" * identifier) = identifier) ;) (expression_statement "puVar4[1] = puVar8[1];" (assignment_expression "puVar4[1] = puVar8[1]" (subscript_expression "puVar4[1]" identifier [ number_literal ]) = (subscript_expression "puVar8[1]" identifier [ number_literal ])) ;) (expression_statement "lVar5 = lVar7;" (assignment_expression "lVar5 = lVar7" identifier = identifier) ;) }) while (parenthesized_expression "(lVar7 < lVar6)" ( (binary_expression "lVar7 < lVar6" identifier < identifier) )) ;) (if_statement "if ((param_3 & 1) == 0) goto LAB_002af870;" if (parenthesized_expression "((param_3 & 1) == 0)" ( (binary_expression "(param_3 & 1) == 0" (parenthesized_expression "(param_3 & 1)" ( (binary_expression "param_3 & 1" identifier & number_literal) )) == number_literal) )) (goto_statement "goto LAB_002af870;" goto statement_identifier ;)) }) (else_clause "else {\n    puVar8 = (uint *)(param_1 + param_2 * 8);\n    lVar7 = param_2;\n    if ((param_3 & 1) != 0) goto LAB_002af84b;\nLAB_002af870:\n    if ((long)(param_3 - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(param_1 + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }\n  }" else (compound_statement "{\n    puVar8 = (uint *)(param_1 + param_2 * 8);\n    lVar7 = param_2;\n    if ((param_3 & 1) != 0) goto LAB_002af84b;\nLAB_002af870:\n    if ((long)(param_3 - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(param_1 + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }\n  }" { (expression_statement "puVar8 = (uint *)(param_1 + param_2 * 8);" (assignment_expression "puVar8 = (uint *)(param_1 + param_2 * 8)" identifier = (cast_expression "(uint *)(param_1 + param_2 * 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + param_2 * 8)" ( (binary_expression "param_1 + param_2 * 8" identifier + (binary_expression "param_2 * 8" identifier * number_literal)) )))) ;) (expression_statement "lVar7 = param_2;" (assignment_expression "lVar7 = param_2" identifier = identifier) ;) (if_statement "if ((param_3 & 1) != 0) goto LAB_002af84b;" if (parenthesized_expression "((param_3 & 1) != 0)" ( (binary_expression "(param_3 & 1) != 0" (parenthesized_expression "(param_3 & 1)" ( (binary_expression "param_3 & 1" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_002af84b;" goto statement_identifier ;)) (labeled_statement "LAB_002af870:\n    if ((long)(param_3 - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(param_1 + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }" statement_identifier : (if_statement "if ((long)(param_3 - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(param_1 + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }" if (parenthesized_expression "((long)(param_3 - 2) / 2 == lVar7)" ( (binary_expression "(long)(param_3 - 2) / 2 == lVar7" (binary_expression "(long)(param_3 - 2) / 2" (cast_expression "(long)(param_3 - 2)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(param_3 - 2)" ( (binary_expression "param_3 - 2" identifier - number_literal) ))) / number_literal) == identifier) )) (compound_statement "{\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(param_1 + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }" { (expression_statement "lVar7 = lVar7 * 2 + 1;" (assignment_expression "lVar7 = lVar7 * 2 + 1" identifier = (binary_expression "lVar7 * 2 + 1" (binary_expression "lVar7 * 2" identifier * number_literal) + number_literal)) ;) (expression_statement "puVar4 = (uint *)(param_1 + lVar7 * 8);" (assignment_expression "puVar4 = (uint *)(param_1 + lVar7 * 8)" identifier = (cast_expression "(uint *)(param_1 + lVar7 * 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + lVar7 * 8)" ( (binary_expression "param_1 + lVar7 * 8" identifier + (binary_expression "lVar7 * 8" identifier * number_literal)) )))) ;) (expression_statement "*puVar8 = *puVar4;" (assignment_expression "*puVar8 = *puVar4" (pointer_expression "*puVar8" * identifier) = (pointer_expression "*puVar4" * identifier)) ;) (expression_statement "puVar8[1] = puVar4[1];" (assignment_expression "puVar8[1] = puVar4[1]" (subscript_expression "puVar8[1]" identifier [ number_literal ]) = (subscript_expression "puVar4[1]" identifier [ number_literal ])) ;) (expression_statement "puVar8 = puVar4;" (assignment_expression "puVar8 = puVar4" identifier = identifier) ;) }))) }))) (expression_statement "lVar5 = (lVar7 + -1) / 2;" (assignment_expression "lVar5 = (lVar7 + -1) / 2" identifier = (binary_expression "(lVar7 + -1) / 2" (parenthesized_expression "(lVar7 + -1)" ( (binary_expression "lVar7 + -1" identifier + number_literal) )) / number_literal)) ;) (if_statement "if (param_2 < lVar7) {\n    puVar4 = (uint *)(param_1 + lVar5 * 8);\n    uVar2 = *puVar4;\n    while (lVar6 = lVar5, uVar2 < (uint)param_4) {\n      puVar1 = (uint *)(param_1 + lVar7 * 8);\n      puVar8 = (uint *)(param_1 + lVar6 * 8);\n      *puVar1 = uVar2;\n      puVar1[1] = puVar4[1];\n      lVar5 = (lVar6 + -1) / 2;\n      if (lVar6 <= param_2) break;\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      lVar7 = lVar6;\n      uVar2 = *puVar4;\n    }\n  }" if (parenthesized_expression "(param_2 < lVar7)" ( (binary_expression "param_2 < lVar7" identifier < identifier) )) (compound_statement "{\n    puVar4 = (uint *)(param_1 + lVar5 * 8);\n    uVar2 = *puVar4;\n    while (lVar6 = lVar5, uVar2 < (uint)param_4) {\n      puVar1 = (uint *)(param_1 + lVar7 * 8);\n      puVar8 = (uint *)(param_1 + lVar6 * 8);\n      *puVar1 = uVar2;\n      puVar1[1] = puVar4[1];\n      lVar5 = (lVar6 + -1) / 2;\n      if (lVar6 <= param_2) break;\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      lVar7 = lVar6;\n      uVar2 = *puVar4;\n    }\n  }" { (expression_statement "puVar4 = (uint *)(param_1 + lVar5 * 8);" (assignment_expression "puVar4 = (uint *)(param_1 + lVar5 * 8)" identifier = (cast_expression "(uint *)(param_1 + lVar5 * 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + lVar5 * 8)" ( (binary_expression "param_1 + lVar5 * 8" identifier + (binary_expression "lVar5 * 8" identifier * number_literal)) )))) ;) (expression_statement "uVar2 = *puVar4;" (assignment_expression "uVar2 = *puVar4" identifier = (pointer_expression "*puVar4" * identifier)) ;) (while_statement "while (lVar6 = lVar5, uVar2 < (uint)param_4) {\n      puVar1 = (uint *)(param_1 + lVar7 * 8);\n      puVar8 = (uint *)(param_1 + lVar6 * 8);\n      *puVar1 = uVar2;\n      puVar1[1] = puVar4[1];\n      lVar5 = (lVar6 + -1) / 2;\n      if (lVar6 <= param_2) break;\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      lVar7 = lVar6;\n      uVar2 = *puVar4;\n    }" while (parenthesized_expression "(lVar6 = lVar5, uVar2 < (uint)param_4)" ( (comma_expression "lVar6 = lVar5, uVar2 < (uint)param_4" (assignment_expression "lVar6 = lVar5" identifier = identifier) , (binary_expression "uVar2 < (uint)param_4" identifier < (cast_expression "(uint)param_4" ( (type_descriptor "uint" type_identifier) ) identifier))) )) (compound_statement "{\n      puVar1 = (uint *)(param_1 + lVar7 * 8);\n      puVar8 = (uint *)(param_1 + lVar6 * 8);\n      *puVar1 = uVar2;\n      puVar1[1] = puVar4[1];\n      lVar5 = (lVar6 + -1) / 2;\n      if (lVar6 <= param_2) break;\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      lVar7 = lVar6;\n      uVar2 = *puVar4;\n    }" { (expression_statement "puVar1 = (uint *)(param_1 + lVar7 * 8);" (assignment_expression "puVar1 = (uint *)(param_1 + lVar7 * 8)" identifier = (cast_expression "(uint *)(param_1 + lVar7 * 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + lVar7 * 8)" ( (binary_expression "param_1 + lVar7 * 8" identifier + (binary_expression "lVar7 * 8" identifier * number_literal)) )))) ;) (expression_statement "puVar8 = (uint *)(param_1 + lVar6 * 8);" (assignment_expression "puVar8 = (uint *)(param_1 + lVar6 * 8)" identifier = (cast_expression "(uint *)(param_1 + lVar6 * 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + lVar6 * 8)" ( (binary_expression "param_1 + lVar6 * 8" identifier + (binary_expression "lVar6 * 8" identifier * number_literal)) )))) ;) (expression_statement "*puVar1 = uVar2;" (assignment_expression "*puVar1 = uVar2" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "puVar1[1] = puVar4[1];" (assignment_expression "puVar1[1] = puVar4[1]" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = (subscript_expression "puVar4[1]" identifier [ number_literal ])) ;) (expression_statement "lVar5 = (lVar6 + -1) / 2;" (assignment_expression "lVar5 = (lVar6 + -1) / 2" identifier = (binary_expression "(lVar6 + -1) / 2" (parenthesized_expression "(lVar6 + -1)" ( (binary_expression "lVar6 + -1" identifier + number_literal) )) / number_literal)) ;) (if_statement "if (lVar6 <= param_2) break;" if (parenthesized_expression "(lVar6 <= param_2)" ( (binary_expression "lVar6 <= param_2" identifier <= identifier) )) (break_statement "break;" break ;)) (expression_statement "puVar4 = (uint *)(param_1 + lVar5 * 8);" (assignment_expression "puVar4 = (uint *)(param_1 + lVar5 * 8)" identifier = (cast_expression "(uint *)(param_1 + lVar5 * 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + lVar5 * 8)" ( (binary_expression "param_1 + lVar5 * 8" identifier + (binary_expression "lVar5 * 8" identifier * number_literal)) )))) ;) (expression_statement "lVar7 = lVar6;" (assignment_expression "lVar7 = lVar6" identifier = identifier) ;) (expression_statement "uVar2 = *puVar4;" (assignment_expression "uVar2 = *puVar4" identifier = (pointer_expression "*puVar4" * identifier)) ;) })) })) (labeled_statement "LAB_002af84b:\n  *(undefined8 *)puVar8 = param_4;" statement_identifier : (expression_statement "*(undefined8 *)puVar8 = param_4;" (assignment_expression "*(undefined8 *)puVar8 = param_4" (pointer_expression "*(undefined8 *)puVar8" * (cast_expression "(undefined8 *)puVar8" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = identifier) ;)) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Unknown calling convention -- yet parameter storage is locked */\n/* DWARF original name: __adjust_heap<__gnu_cxx::__normal_iterator<std::pair<unsigned int, unsigned\n   int>*, std::vector<std::pair<unsigned int, unsigned int> > >, long int, std::pair<unsigned int,\n   unsigned int>, __gnu_cxx::__ops::_Iter_comp_iter<gold::Eh_frame_hdr::Fde_address_compare<32> > >\n    */\n\nvoid std::\n     __adjust_heap<__gnu_cxx::__normal_iterator<std::pair<unsigned_int,_unsigned_int>*,_std::vector<std::pair<unsigned_int,_unsigned_int>_>_>,_long_int,_std::pair<unsigned_int,_unsigned_int>,___gnu_cxx::__ops::_Iter_comp_iter<gold::Eh_frame_hdr::Fde_address_compare<32>_>_>\n               (long __first,long __holeIndex,ulong __len,undefined8 __value)\n\n{\n  uint *puVar1;\n  uint uVar2;\n  long lVar3;\n  uint *puVar4;\n  long lVar5;\n  long lVar6;\n  long __topIndex;\n  long lVar7;\n  uint *puVar8;\n  uint uVar9;\n  \n  lVar6 = (long)(__len - 1) / 2;\n  lVar5 = __holeIndex;\n  if (__holeIndex < lVar6) {\n    do {\n      lVar3 = (lVar5 + 1) * 2;\n      lVar7 = lVar3 + -1;\n      puVar4 = (uint *)((lVar5 + 1) * 0x10 + __first);\n      puVar8 = (uint *)(__first + lVar7 * 8);\n      uVar2 = *puVar4;\n      uVar9 = *puVar8;\n      if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }\n      puVar4 = (uint *)(__first + lVar5 * 8);\n      *puVar4 = uVar9;\n      puVar4[1] = puVar8[1];\n      lVar5 = lVar7;\n    } while (lVar7 < lVar6);\n    if ((__len & 1) == 0) goto LAB_002af870;\n  }\n  else {\n    puVar8 = (uint *)(__first + __holeIndex * 8);\n    lVar7 = __holeIndex;\n    if ((__len & 1) != 0) goto LAB_002af84b;\nLAB_002af870:\n    if ((long)(__len - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(__first + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }\n  }\n  lVar5 = (lVar7 + -1) / 2;\n  if (__holeIndex < lVar7) {\n    puVar4 = (uint *)(__first + lVar5 * 8);\n    uVar2 = *puVar4;\n    while (lVar6 = lVar5, uVar2 < (uint)__value) {\n      puVar1 = (uint *)(__first + lVar7 * 8);\n      puVar8 = (uint *)(__first + lVar6 * 8);\n      *puVar1 = uVar2;\n      puVar1[1] = puVar4[1];\n      lVar5 = (lVar6 + -1) / 2;\n      if (lVar6 <= __holeIndex) break;\n      puVar4 = (uint *)(__first + lVar5 * 8);\n      lVar7 = lVar6;\n      uVar2 = *puVar4;\n    }\n  }\nLAB_002af84b:\n  *(undefined8 *)puVar8 = __value;\n  return;\n}\n\n" comment comment (declaration "void std::\n     __adjust_heap<__gnu_cxx::__normal_iterator<std::pair<unsigned_int,_unsigned_int>*,_std::vector<std::pair<unsigned_int,_unsigned_int>_>_>,_long_int,_std::pair<unsigned_int,_unsigned_int>,___gnu_cxx::__ops::_Iter_comp_iter<gold::Eh_frame_hdr::Fde_address_compare<32>_>_>\n               (long __first,long __holeIndex,ulong __len,undefined8 __value)\n\n{\n  uint *puVar1;" primitive_type (ERROR "std::\n     __adjust_heap<__gnu_cxx::__normal_iterator<std::pair<" identifier : : identifier < identifier : : identifier < identifier : : identifier <) identifier , identifier (ERROR ">*" > *) , (ERROR "_std::vector<std::pair<" identifier : : identifier < identifier : : identifier <) identifier , identifier (ERROR ">_>_>" > identifier > identifier >) , identifier , (ERROR "_std::pair<" identifier : : identifier <) identifier , identifier (ERROR ">" >) , (ERROR "___gnu_cxx::__ops::_Iter_comp_iter<gold::Eh_frame_hdr::Fde_address_compare<32>_>_>\n               (long __first,long __holeIndex,ulong __len,undefined8 __value)\n\n{\n  uint" identifier : : identifier : : identifier < identifier : : identifier : : identifier < number_literal > identifier > (function_declarator "_>\n               (long __first,long __holeIndex,ulong __len,undefined8 __value)" identifier (ERROR ">" >) (parameter_list "(long __first,long __holeIndex,ulong __len,undefined8 __value)" ( (parameter_declaration "long __first" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long __holeIndex" (sized_type_specifier "long" long) identifier) , (parameter_declaration "ulong __len" type_identifier identifier) , (parameter_declaration "undefined8 __value" type_identifier identifier) ))) { identifier) (pointer_declarator "*puVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "uint *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar6;" (sized_type_specifier "long" long) identifier ;) (declaration "long __topIndex;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar7;" (sized_type_specifier "long" long) identifier ;) (declaration "uint *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "uint uVar9;" type_identifier identifier ;) (expression_statement "lVar6 = (long)(__len - 1) / 2;" (assignment_expression "lVar6 = (long)(__len - 1) / 2" identifier = (binary_expression "(long)(__len - 1) / 2" (cast_expression "(long)(__len - 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(__len - 1)" ( (binary_expression "__len - 1" identifier - number_literal) ))) / number_literal)) ;) (expression_statement "lVar5 = __holeIndex;" (assignment_expression "lVar5 = __holeIndex" identifier = identifier) ;) (if_statement "if (__holeIndex < lVar6) {\n    do {\n      lVar3 = (lVar5 + 1) * 2;\n      lVar7 = lVar3 + -1;\n      puVar4 = (uint *)((lVar5 + 1) * 0x10 + __first);\n      puVar8 = (uint *)(__first + lVar7 * 8);\n      uVar2 = *puVar4;\n      uVar9 = *puVar8;\n      if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }\n      puVar4 = (uint *)(__first + lVar5 * 8);\n      *puVar4 = uVar9;\n      puVar4[1] = puVar8[1];\n      lVar5 = lVar7;\n    } while (lVar7 < lVar6);\n    if ((__len & 1) == 0) goto LAB_002af870;\n  }\n  else {\n    puVar8 = (uint *)(__first + __holeIndex * 8);\n    lVar7 = __holeIndex;\n    if ((__len & 1) != 0) goto LAB_002af84b;\nLAB_002af870:\n    if ((long)(__len - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(__first + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }\n  }" if (parenthesized_expression "(__holeIndex < lVar6)" ( (binary_expression "__holeIndex < lVar6" identifier < identifier) )) (compound_statement "{\n    do {\n      lVar3 = (lVar5 + 1) * 2;\n      lVar7 = lVar3 + -1;\n      puVar4 = (uint *)((lVar5 + 1) * 0x10 + __first);\n      puVar8 = (uint *)(__first + lVar7 * 8);\n      uVar2 = *puVar4;\n      uVar9 = *puVar8;\n      if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }\n      puVar4 = (uint *)(__first + lVar5 * 8);\n      *puVar4 = uVar9;\n      puVar4[1] = puVar8[1];\n      lVar5 = lVar7;\n    } while (lVar7 < lVar6);\n    if ((__len & 1) == 0) goto LAB_002af870;\n  }" { (do_statement "do {\n      lVar3 = (lVar5 + 1) * 2;\n      lVar7 = lVar3 + -1;\n      puVar4 = (uint *)((lVar5 + 1) * 0x10 + __first);\n      puVar8 = (uint *)(__first + lVar7 * 8);\n      uVar2 = *puVar4;\n      uVar9 = *puVar8;\n      if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }\n      puVar4 = (uint *)(__first + lVar5 * 8);\n      *puVar4 = uVar9;\n      puVar4[1] = puVar8[1];\n      lVar5 = lVar7;\n    } while (lVar7 < lVar6);" do (compound_statement "{\n      lVar3 = (lVar5 + 1) * 2;\n      lVar7 = lVar3 + -1;\n      puVar4 = (uint *)((lVar5 + 1) * 0x10 + __first);\n      puVar8 = (uint *)(__first + lVar7 * 8);\n      uVar2 = *puVar4;\n      uVar9 = *puVar8;\n      if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }\n      puVar4 = (uint *)(__first + lVar5 * 8);\n      *puVar4 = uVar9;\n      puVar4[1] = puVar8[1];\n      lVar5 = lVar7;\n    }" { (expression_statement "lVar3 = (lVar5 + 1) * 2;" (assignment_expression "lVar3 = (lVar5 + 1) * 2" identifier = (binary_expression "(lVar5 + 1) * 2" (parenthesized_expression "(lVar5 + 1)" ( (binary_expression "lVar5 + 1" identifier + number_literal) )) * number_literal)) ;) (expression_statement "lVar7 = lVar3 + -1;" (assignment_expression "lVar7 = lVar3 + -1" identifier = (binary_expression "lVar3 + -1" identifier + number_literal)) ;) (expression_statement "puVar4 = (uint *)((lVar5 + 1) * 0x10 + __first);" (assignment_expression "puVar4 = (uint *)((lVar5 + 1) * 0x10 + __first)" identifier = (cast_expression "(uint *)((lVar5 + 1) * 0x10 + __first)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((lVar5 + 1) * 0x10 + __first)" ( (binary_expression "(lVar5 + 1) * 0x10 + __first" (binary_expression "(lVar5 + 1) * 0x10" (parenthesized_expression "(lVar5 + 1)" ( (binary_expression "lVar5 + 1" identifier + number_literal) )) * number_literal) + identifier) )))) ;) (expression_statement "puVar8 = (uint *)(__first + lVar7 * 8);" (assignment_expression "puVar8 = (uint *)(__first + lVar7 * 8)" identifier = (cast_expression "(uint *)(__first + lVar7 * 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__first + lVar7 * 8)" ( (binary_expression "__first + lVar7 * 8" identifier + (binary_expression "lVar7 * 8" identifier * number_literal)) )))) ;) (expression_statement "uVar2 = *puVar4;" (assignment_expression "uVar2 = *puVar4" identifier = (pointer_expression "*puVar4" * identifier)) ;) (expression_statement "uVar9 = *puVar8;" (assignment_expression "uVar9 = *puVar8" identifier = (pointer_expression "*puVar8" * identifier)) ;) (if_statement "if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }" if (parenthesized_expression "(uVar9 <= uVar2)" ( (binary_expression "uVar9 <= uVar2" identifier <= identifier) )) (compound_statement "{\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }" { (expression_statement "lVar7 = lVar3;" (assignment_expression "lVar7 = lVar3" identifier = identifier) ;) (expression_statement "puVar8 = puVar4;" (assignment_expression "puVar8 = puVar4" identifier = identifier) ;) (expression_statement "uVar9 = uVar2;" (assignment_expression "uVar9 = uVar2" identifier = identifier) ;) })) (expression_statement "puVar4 = (uint *)(__first + lVar5 * 8);" (assignment_expression "puVar4 = (uint *)(__first + lVar5 * 8)" identifier = (cast_expression "(uint *)(__first + lVar5 * 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__first + lVar5 * 8)" ( (binary_expression "__first + lVar5 * 8" identifier + (binary_expression "lVar5 * 8" identifier * number_literal)) )))) ;) (expression_statement "*puVar4 = uVar9;" (assignment_expression "*puVar4 = uVar9" (pointer_expression "*puVar4" * identifier) = identifier) ;) (expression_statement "puVar4[1] = puVar8[1];" (assignment_expression "puVar4[1] = puVar8[1]" (subscript_expression "puVar4[1]" identifier [ number_literal ]) = (subscript_expression "puVar8[1]" identifier [ number_literal ])) ;) (expression_statement "lVar5 = lVar7;" (assignment_expression "lVar5 = lVar7" identifier = identifier) ;) }) while (parenthesized_expression "(lVar7 < lVar6)" ( (binary_expression "lVar7 < lVar6" identifier < identifier) )) ;) (if_statement "if ((__len & 1) == 0) goto LAB_002af870;" if (parenthesized_expression "((__len & 1) == 0)" ( (binary_expression "(__len & 1) == 0" (parenthesized_expression "(__len & 1)" ( (binary_expression "__len & 1" identifier & number_literal) )) == number_literal) )) (goto_statement "goto LAB_002af870;" goto statement_identifier ;)) }) (else_clause "else {\n    puVar8 = (uint *)(__first + __holeIndex * 8);\n    lVar7 = __holeIndex;\n    if ((__len & 1) != 0) goto LAB_002af84b;\nLAB_002af870:\n    if ((long)(__len - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(__first + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }\n  }" else (compound_statement "{\n    puVar8 = (uint *)(__first + __holeIndex * 8);\n    lVar7 = __holeIndex;\n    if ((__len & 1) != 0) goto LAB_002af84b;\nLAB_002af870:\n    if ((long)(__len - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(__first + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }\n  }" { (expression_statement "puVar8 = (uint *)(__first + __holeIndex * 8);" (assignment_expression "puVar8 = (uint *)(__first + __holeIndex * 8)" identifier = (cast_expression "(uint *)(__first + __holeIndex * 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__first + __holeIndex * 8)" ( (binary_expression "__first + __holeIndex * 8" identifier + (binary_expression "__holeIndex * 8" identifier * number_literal)) )))) ;) (expression_statement "lVar7 = __holeIndex;" (assignment_expression "lVar7 = __holeIndex" identifier = identifier) ;) (if_statement "if ((__len & 1) != 0) goto LAB_002af84b;" if (parenthesized_expression "((__len & 1) != 0)" ( (binary_expression "(__len & 1) != 0" (parenthesized_expression "(__len & 1)" ( (binary_expression "__len & 1" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_002af84b;" goto statement_identifier ;)) (labeled_statement "LAB_002af870:\n    if ((long)(__len - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(__first + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }" statement_identifier : (if_statement "if ((long)(__len - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(__first + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }" if (parenthesized_expression "((long)(__len - 2) / 2 == lVar7)" ( (binary_expression "(long)(__len - 2) / 2 == lVar7" (binary_expression "(long)(__len - 2) / 2" (cast_expression "(long)(__len - 2)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(__len - 2)" ( (binary_expression "__len - 2" identifier - number_literal) ))) / number_literal) == identifier) )) (compound_statement "{\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(__first + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }" { (expression_statement "lVar7 = lVar7 * 2 + 1;" (assignment_expression "lVar7 = lVar7 * 2 + 1" identifier = (binary_expression "lVar7 * 2 + 1" (binary_expression "lVar7 * 2" identifier * number_literal) + number_literal)) ;) (expression_statement "puVar4 = (uint *)(__first + lVar7 * 8);" (assignment_expression "puVar4 = (uint *)(__first + lVar7 * 8)" identifier = (cast_expression "(uint *)(__first + lVar7 * 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__first + lVar7 * 8)" ( (binary_expression "__first + lVar7 * 8" identifier + (binary_expression "lVar7 * 8" identifier * number_literal)) )))) ;) (expression_statement "*puVar8 = *puVar4;" (assignment_expression "*puVar8 = *puVar4" (pointer_expression "*puVar8" * identifier) = (pointer_expression "*puVar4" * identifier)) ;) (expression_statement "puVar8[1] = puVar4[1];" (assignment_expression "puVar8[1] = puVar4[1]" (subscript_expression "puVar8[1]" identifier [ number_literal ]) = (subscript_expression "puVar4[1]" identifier [ number_literal ])) ;) (expression_statement "puVar8 = puVar4;" (assignment_expression "puVar8 = puVar4" identifier = identifier) ;) }))) }))) (expression_statement "lVar5 = (lVar7 + -1) / 2;" (assignment_expression "lVar5 = (lVar7 + -1) / 2" identifier = (binary_expression "(lVar7 + -1) / 2" (parenthesized_expression "(lVar7 + -1)" ( (binary_expression "lVar7 + -1" identifier + number_literal) )) / number_literal)) ;) (if_statement "if (__holeIndex < lVar7) {\n    puVar4 = (uint *)(__first + lVar5 * 8);\n    uVar2 = *puVar4;\n    while (lVar6 = lVar5, uVar2 < (uint)__value) {\n      puVar1 = (uint *)(__first + lVar7 * 8);\n      puVar8 = (uint *)(__first + lVar6 * 8);\n      *puVar1 = uVar2;\n      puVar1[1] = puVar4[1];\n      lVar5 = (lVar6 + -1) / 2;\n      if (lVar6 <= __holeIndex) break;\n      puVar4 = (uint *)(__first + lVar5 * 8);\n      lVar7 = lVar6;\n      uVar2 = *puVar4;\n    }\n  }" if (parenthesized_expression "(__holeIndex < lVar7)" ( (binary_expression "__holeIndex < lVar7" identifier < identifier) )) (compound_statement "{\n    puVar4 = (uint *)(__first + lVar5 * 8);\n    uVar2 = *puVar4;\n    while (lVar6 = lVar5, uVar2 < (uint)__value) {\n      puVar1 = (uint *)(__first + lVar7 * 8);\n      puVar8 = (uint *)(__first + lVar6 * 8);\n      *puVar1 = uVar2;\n      puVar1[1] = puVar4[1];\n      lVar5 = (lVar6 + -1) / 2;\n      if (lVar6 <= __holeIndex) break;\n      puVar4 = (uint *)(__first + lVar5 * 8);\n      lVar7 = lVar6;\n      uVar2 = *puVar4;\n    }\n  }" { (expression_statement "puVar4 = (uint *)(__first + lVar5 * 8);" (assignment_expression "puVar4 = (uint *)(__first + lVar5 * 8)" identifier = (cast_expression "(uint *)(__first + lVar5 * 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__first + lVar5 * 8)" ( (binary_expression "__first + lVar5 * 8" identifier + (binary_expression "lVar5 * 8" identifier * number_literal)) )))) ;) (expression_statement "uVar2 = *puVar4;" (assignment_expression "uVar2 = *puVar4" identifier = (pointer_expression "*puVar4" * identifier)) ;) (while_statement "while (lVar6 = lVar5, uVar2 < (uint)__value) {\n      puVar1 = (uint *)(__first + lVar7 * 8);\n      puVar8 = (uint *)(__first + lVar6 * 8);\n      *puVar1 = uVar2;\n      puVar1[1] = puVar4[1];\n      lVar5 = (lVar6 + -1) / 2;\n      if (lVar6 <= __holeIndex) break;\n      puVar4 = (uint *)(__first + lVar5 * 8);\n      lVar7 = lVar6;\n      uVar2 = *puVar4;\n    }" while (parenthesized_expression "(lVar6 = lVar5, uVar2 < (uint)__value)" ( (comma_expression "lVar6 = lVar5, uVar2 < (uint)__value" (assignment_expression "lVar6 = lVar5" identifier = identifier) , (binary_expression "uVar2 < (uint)__value" identifier < (cast_expression "(uint)__value" ( (type_descriptor "uint" type_identifier) ) identifier))) )) (compound_statement "{\n      puVar1 = (uint *)(__first + lVar7 * 8);\n      puVar8 = (uint *)(__first + lVar6 * 8);\n      *puVar1 = uVar2;\n      puVar1[1] = puVar4[1];\n      lVar5 = (lVar6 + -1) / 2;\n      if (lVar6 <= __holeIndex) break;\n      puVar4 = (uint *)(__first + lVar5 * 8);\n      lVar7 = lVar6;\n      uVar2 = *puVar4;\n    }" { (expression_statement "puVar1 = (uint *)(__first + lVar7 * 8);" (assignment_expression "puVar1 = (uint *)(__first + lVar7 * 8)" identifier = (cast_expression "(uint *)(__first + lVar7 * 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__first + lVar7 * 8)" ( (binary_expression "__first + lVar7 * 8" identifier + (binary_expression "lVar7 * 8" identifier * number_literal)) )))) ;) (expression_statement "puVar8 = (uint *)(__first + lVar6 * 8);" (assignment_expression "puVar8 = (uint *)(__first + lVar6 * 8)" identifier = (cast_expression "(uint *)(__first + lVar6 * 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__first + lVar6 * 8)" ( (binary_expression "__first + lVar6 * 8" identifier + (binary_expression "lVar6 * 8" identifier * number_literal)) )))) ;) (expression_statement "*puVar1 = uVar2;" (assignment_expression "*puVar1 = uVar2" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "puVar1[1] = puVar4[1];" (assignment_expression "puVar1[1] = puVar4[1]" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = (subscript_expression "puVar4[1]" identifier [ number_literal ])) ;) (expression_statement "lVar5 = (lVar6 + -1) / 2;" (assignment_expression "lVar5 = (lVar6 + -1) / 2" identifier = (binary_expression "(lVar6 + -1) / 2" (parenthesized_expression "(lVar6 + -1)" ( (binary_expression "lVar6 + -1" identifier + number_literal) )) / number_literal)) ;) (if_statement "if (lVar6 <= __holeIndex) break;" if (parenthesized_expression "(lVar6 <= __holeIndex)" ( (binary_expression "lVar6 <= __holeIndex" identifier <= identifier) )) (break_statement "break;" break ;)) (expression_statement "puVar4 = (uint *)(__first + lVar5 * 8);" (assignment_expression "puVar4 = (uint *)(__first + lVar5 * 8)" identifier = (cast_expression "(uint *)(__first + lVar5 * 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__first + lVar5 * 8)" ( (binary_expression "__first + lVar5 * 8" identifier + (binary_expression "lVar5 * 8" identifier * number_literal)) )))) ;) (expression_statement "lVar7 = lVar6;" (assignment_expression "lVar7 = lVar6" identifier = identifier) ;) (expression_statement "uVar2 = *puVar4;" (assignment_expression "uVar2 = *puVar4" identifier = (pointer_expression "*puVar4" * identifier)) ;) })) })) (labeled_statement "LAB_002af84b:\n  *(undefined8 *)puVar8 = __value;" statement_identifier : (expression_statement "*(undefined8 *)puVar8 = __value;" (assignment_expression "*(undefined8 *)puVar8 = __value" (pointer_expression "*(undefined8 *)puVar8" * (cast_expression "(undefined8 *)puVar8" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = identifier) ;)) (return_statement "return;" return ;) (ERROR "}" }))
(translation_unit "void FUN_002af770(long param_1,long param_2,ulong param_3,undefined8 param_4)\n\n{\n  uint *puVar1;\n  uint uVar2;\n  long lVar3;\n  uint *puVar4;\n  long lVar5;\n  long lVar6;\n  long lVar7;\n  uint *puVar8;\n  uint uVar9;\n  \n  lVar6 = (long)(param_3 - 1) / 2;\n  lVar5 = param_2;\n  if (param_2 < lVar6) {\n    do {\n      lVar3 = (lVar5 + 1) * 2;\n      lVar7 = lVar3 + -1;\n      puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1);\n      puVar8 = (uint *)(param_1 + lVar7 * 8);\n      uVar2 = *puVar4;\n      uVar9 = *puVar8;\n      if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      *puVar4 = uVar9;\n      puVar4[1] = puVar8[1];\n      lVar5 = lVar7;\n    } while (lVar7 < lVar6);\n    if ((param_3 & 1) == 0) goto LAB_002af870;\n  }\n  else {\n    puVar8 = (uint *)(param_1 + param_2 * 8);\n    lVar7 = param_2;\n    if ((param_3 & 1) != 0) goto LAB_002af84b;\nLAB_002af870:\n    if ((long)(param_3 - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(param_1 + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }\n  }\n  lVar5 = (lVar7 + -1) / 2;\n  if (param_2 < lVar7) {\n    puVar4 = (uint *)(param_1 + lVar5 * 8);\n    uVar2 = *puVar4;\n    while (lVar6 = lVar5, uVar2 < (uint)param_4) {\n      puVar1 = (uint *)(param_1 + lVar7 * 8);\n      puVar8 = (uint *)(param_1 + lVar6 * 8);\n      *puVar1 = uVar2;\n      puVar1[1] = puVar4[1];\n      lVar5 = (lVar6 + -1) / 2;\n      if (lVar6 <= param_2) break;\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      lVar7 = lVar6;\n      uVar2 = *puVar4;\n    }\n  }\nLAB_002af84b:\n  *(undefined8 *)puVar8 = param_4;\n  return;\n}\n\n" (function_definition "void FUN_002af770(long param_1,long param_2,ulong param_3,undefined8 param_4)\n\n{\n  uint *puVar1;\n  uint uVar2;\n  long lVar3;\n  uint *puVar4;\n  long lVar5;\n  long lVar6;\n  long lVar7;\n  uint *puVar8;\n  uint uVar9;\n  \n  lVar6 = (long)(param_3 - 1) / 2;\n  lVar5 = param_2;\n  if (param_2 < lVar6) {\n    do {\n      lVar3 = (lVar5 + 1) * 2;\n      lVar7 = lVar3 + -1;\n      puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1);\n      puVar8 = (uint *)(param_1 + lVar7 * 8);\n      uVar2 = *puVar4;\n      uVar9 = *puVar8;\n      if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      *puVar4 = uVar9;\n      puVar4[1] = puVar8[1];\n      lVar5 = lVar7;\n    } while (lVar7 < lVar6);\n    if ((param_3 & 1) == 0) goto LAB_002af870;\n  }\n  else {\n    puVar8 = (uint *)(param_1 + param_2 * 8);\n    lVar7 = param_2;\n    if ((param_3 & 1) != 0) goto LAB_002af84b;\nLAB_002af870:\n    if ((long)(param_3 - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(param_1 + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }\n  }\n  lVar5 = (lVar7 + -1) / 2;\n  if (param_2 < lVar7) {\n    puVar4 = (uint *)(param_1 + lVar5 * 8);\n    uVar2 = *puVar4;\n    while (lVar6 = lVar5, uVar2 < (uint)param_4) {\n      puVar1 = (uint *)(param_1 + lVar7 * 8);\n      puVar8 = (uint *)(param_1 + lVar6 * 8);\n      *puVar1 = uVar2;\n      puVar1[1] = puVar4[1];\n      lVar5 = (lVar6 + -1) / 2;\n      if (lVar6 <= param_2) break;\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      lVar7 = lVar6;\n      uVar2 = *puVar4;\n    }\n  }\nLAB_002af84b:\n  *(undefined8 *)puVar8 = param_4;\n  return;\n}" primitive_type (function_declarator "FUN_002af770(long param_1,long param_2,ulong param_3,undefined8 param_4)" identifier (parameter_list "(long param_1,long param_2,ulong param_3,undefined8 param_4)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "ulong param_3" type_identifier identifier) , (parameter_declaration "undefined8 param_4" type_identifier identifier) ))) (compound_statement "{\n  uint *puVar1;\n  uint uVar2;\n  long lVar3;\n  uint *puVar4;\n  long lVar5;\n  long lVar6;\n  long lVar7;\n  uint *puVar8;\n  uint uVar9;\n  \n  lVar6 = (long)(param_3 - 1) / 2;\n  lVar5 = param_2;\n  if (param_2 < lVar6) {\n    do {\n      lVar3 = (lVar5 + 1) * 2;\n      lVar7 = lVar3 + -1;\n      puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1);\n      puVar8 = (uint *)(param_1 + lVar7 * 8);\n      uVar2 = *puVar4;\n      uVar9 = *puVar8;\n      if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      *puVar4 = uVar9;\n      puVar4[1] = puVar8[1];\n      lVar5 = lVar7;\n    } while (lVar7 < lVar6);\n    if ((param_3 & 1) == 0) goto LAB_002af870;\n  }\n  else {\n    puVar8 = (uint *)(param_1 + param_2 * 8);\n    lVar7 = param_2;\n    if ((param_3 & 1) != 0) goto LAB_002af84b;\nLAB_002af870:\n    if ((long)(param_3 - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(param_1 + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }\n  }\n  lVar5 = (lVar7 + -1) / 2;\n  if (param_2 < lVar7) {\n    puVar4 = (uint *)(param_1 + lVar5 * 8);\n    uVar2 = *puVar4;\n    while (lVar6 = lVar5, uVar2 < (uint)param_4) {\n      puVar1 = (uint *)(param_1 + lVar7 * 8);\n      puVar8 = (uint *)(param_1 + lVar6 * 8);\n      *puVar1 = uVar2;\n      puVar1[1] = puVar4[1];\n      lVar5 = (lVar6 + -1) / 2;\n      if (lVar6 <= param_2) break;\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      lVar7 = lVar6;\n      uVar2 = *puVar4;\n    }\n  }\nLAB_002af84b:\n  *(undefined8 *)puVar8 = param_4;\n  return;\n}" { (declaration "uint *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "uint *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar6;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar7;" (sized_type_specifier "long" long) identifier ;) (declaration "uint *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "uint uVar9;" type_identifier identifier ;) (expression_statement "lVar6 = (long)(param_3 - 1) / 2;" (assignment_expression "lVar6 = (long)(param_3 - 1) / 2" identifier = (binary_expression "(long)(param_3 - 1) / 2" (cast_expression "(long)(param_3 - 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(param_3 - 1)" ( (binary_expression "param_3 - 1" identifier - number_literal) ))) / number_literal)) ;) (expression_statement "lVar5 = param_2;" (assignment_expression "lVar5 = param_2" identifier = identifier) ;) (if_statement "if (param_2 < lVar6) {\n    do {\n      lVar3 = (lVar5 + 1) * 2;\n      lVar7 = lVar3 + -1;\n      puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1);\n      puVar8 = (uint *)(param_1 + lVar7 * 8);\n      uVar2 = *puVar4;\n      uVar9 = *puVar8;\n      if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      *puVar4 = uVar9;\n      puVar4[1] = puVar8[1];\n      lVar5 = lVar7;\n    } while (lVar7 < lVar6);\n    if ((param_3 & 1) == 0) goto LAB_002af870;\n  }\n  else {\n    puVar8 = (uint *)(param_1 + param_2 * 8);\n    lVar7 = param_2;\n    if ((param_3 & 1) != 0) goto LAB_002af84b;\nLAB_002af870:\n    if ((long)(param_3 - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(param_1 + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }\n  }" if (parenthesized_expression "(param_2 < lVar6)" ( (binary_expression "param_2 < lVar6" identifier < identifier) )) (compound_statement "{\n    do {\n      lVar3 = (lVar5 + 1) * 2;\n      lVar7 = lVar3 + -1;\n      puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1);\n      puVar8 = (uint *)(param_1 + lVar7 * 8);\n      uVar2 = *puVar4;\n      uVar9 = *puVar8;\n      if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      *puVar4 = uVar9;\n      puVar4[1] = puVar8[1];\n      lVar5 = lVar7;\n    } while (lVar7 < lVar6);\n    if ((param_3 & 1) == 0) goto LAB_002af870;\n  }" { (do_statement "do {\n      lVar3 = (lVar5 + 1) * 2;\n      lVar7 = lVar3 + -1;\n      puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1);\n      puVar8 = (uint *)(param_1 + lVar7 * 8);\n      uVar2 = *puVar4;\n      uVar9 = *puVar8;\n      if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      *puVar4 = uVar9;\n      puVar4[1] = puVar8[1];\n      lVar5 = lVar7;\n    } while (lVar7 < lVar6);" do (compound_statement "{\n      lVar3 = (lVar5 + 1) * 2;\n      lVar7 = lVar3 + -1;\n      puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1);\n      puVar8 = (uint *)(param_1 + lVar7 * 8);\n      uVar2 = *puVar4;\n      uVar9 = *puVar8;\n      if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      *puVar4 = uVar9;\n      puVar4[1] = puVar8[1];\n      lVar5 = lVar7;\n    }" { (expression_statement "lVar3 = (lVar5 + 1) * 2;" (assignment_expression "lVar3 = (lVar5 + 1) * 2" identifier = (binary_expression "(lVar5 + 1) * 2" (parenthesized_expression "(lVar5 + 1)" ( (binary_expression "lVar5 + 1" identifier + number_literal) )) * number_literal)) ;) (expression_statement "lVar7 = lVar3 + -1;" (assignment_expression "lVar7 = lVar3 + -1" identifier = (binary_expression "lVar3 + -1" identifier + number_literal)) ;) (expression_statement "puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1);" (assignment_expression "puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1)" identifier = (cast_expression "(uint *)((lVar5 + 1) * 0x10 + param_1)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((lVar5 + 1) * 0x10 + param_1)" ( (binary_expression "(lVar5 + 1) * 0x10 + param_1" (binary_expression "(lVar5 + 1) * 0x10" (parenthesized_expression "(lVar5 + 1)" ( (binary_expression "lVar5 + 1" identifier + number_literal) )) * number_literal) + identifier) )))) ;) (expression_statement "puVar8 = (uint *)(param_1 + lVar7 * 8);" (assignment_expression "puVar8 = (uint *)(param_1 + lVar7 * 8)" identifier = (cast_expression "(uint *)(param_1 + lVar7 * 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + lVar7 * 8)" ( (binary_expression "param_1 + lVar7 * 8" identifier + (binary_expression "lVar7 * 8" identifier * number_literal)) )))) ;) (expression_statement "uVar2 = *puVar4;" (assignment_expression "uVar2 = *puVar4" identifier = (pointer_expression "*puVar4" * identifier)) ;) (expression_statement "uVar9 = *puVar8;" (assignment_expression "uVar9 = *puVar8" identifier = (pointer_expression "*puVar8" * identifier)) ;) (if_statement "if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }" if (parenthesized_expression "(uVar9 <= uVar2)" ( (binary_expression "uVar9 <= uVar2" identifier <= identifier) )) (compound_statement "{\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }" { (expression_statement "lVar7 = lVar3;" (assignment_expression "lVar7 = lVar3" identifier = identifier) ;) (expression_statement "puVar8 = puVar4;" (assignment_expression "puVar8 = puVar4" identifier = identifier) ;) (expression_statement "uVar9 = uVar2;" (assignment_expression "uVar9 = uVar2" identifier = identifier) ;) })) (expression_statement "puVar4 = (uint *)(param_1 + lVar5 * 8);" (assignment_expression "puVar4 = (uint *)(param_1 + lVar5 * 8)" identifier = (cast_expression "(uint *)(param_1 + lVar5 * 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + lVar5 * 8)" ( (binary_expression "param_1 + lVar5 * 8" identifier + (binary_expression "lVar5 * 8" identifier * number_literal)) )))) ;) (expression_statement "*puVar4 = uVar9;" (assignment_expression "*puVar4 = uVar9" (pointer_expression "*puVar4" * identifier) = identifier) ;) (expression_statement "puVar4[1] = puVar8[1];" (assignment_expression "puVar4[1] = puVar8[1]" (subscript_expression "puVar4[1]" identifier [ number_literal ]) = (subscript_expression "puVar8[1]" identifier [ number_literal ])) ;) (expression_statement "lVar5 = lVar7;" (assignment_expression "lVar5 = lVar7" identifier = identifier) ;) }) while (parenthesized_expression "(lVar7 < lVar6)" ( (binary_expression "lVar7 < lVar6" identifier < identifier) )) ;) (if_statement "if ((param_3 & 1) == 0) goto LAB_002af870;" if (parenthesized_expression "((param_3 & 1) == 0)" ( (binary_expression "(param_3 & 1) == 0" (parenthesized_expression "(param_3 & 1)" ( (binary_expression "param_3 & 1" identifier & number_literal) )) == number_literal) )) (goto_statement "goto LAB_002af870;" goto statement_identifier ;)) }) (else_clause "else {\n    puVar8 = (uint *)(param_1 + param_2 * 8);\n    lVar7 = param_2;\n    if ((param_3 & 1) != 0) goto LAB_002af84b;\nLAB_002af870:\n    if ((long)(param_3 - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(param_1 + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }\n  }" else (compound_statement "{\n    puVar8 = (uint *)(param_1 + param_2 * 8);\n    lVar7 = param_2;\n    if ((param_3 & 1) != 0) goto LAB_002af84b;\nLAB_002af870:\n    if ((long)(param_3 - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(param_1 + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }\n  }" { (expression_statement "puVar8 = (uint *)(param_1 + param_2 * 8);" (assignment_expression "puVar8 = (uint *)(param_1 + param_2 * 8)" identifier = (cast_expression "(uint *)(param_1 + param_2 * 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + param_2 * 8)" ( (binary_expression "param_1 + param_2 * 8" identifier + (binary_expression "param_2 * 8" identifier * number_literal)) )))) ;) (expression_statement "lVar7 = param_2;" (assignment_expression "lVar7 = param_2" identifier = identifier) ;) (if_statement "if ((param_3 & 1) != 0) goto LAB_002af84b;" if (parenthesized_expression "((param_3 & 1) != 0)" ( (binary_expression "(param_3 & 1) != 0" (parenthesized_expression "(param_3 & 1)" ( (binary_expression "param_3 & 1" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_002af84b;" goto statement_identifier ;)) (labeled_statement "LAB_002af870:\n    if ((long)(param_3 - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(param_1 + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }" statement_identifier : (if_statement "if ((long)(param_3 - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(param_1 + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }" if (parenthesized_expression "((long)(param_3 - 2) / 2 == lVar7)" ( (binary_expression "(long)(param_3 - 2) / 2 == lVar7" (binary_expression "(long)(param_3 - 2) / 2" (cast_expression "(long)(param_3 - 2)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(param_3 - 2)" ( (binary_expression "param_3 - 2" identifier - number_literal) ))) / number_literal) == identifier) )) (compound_statement "{\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(param_1 + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }" { (expression_statement "lVar7 = lVar7 * 2 + 1;" (assignment_expression "lVar7 = lVar7 * 2 + 1" identifier = (binary_expression "lVar7 * 2 + 1" (binary_expression "lVar7 * 2" identifier * number_literal) + number_literal)) ;) (expression_statement "puVar4 = (uint *)(param_1 + lVar7 * 8);" (assignment_expression "puVar4 = (uint *)(param_1 + lVar7 * 8)" identifier = (cast_expression "(uint *)(param_1 + lVar7 * 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + lVar7 * 8)" ( (binary_expression "param_1 + lVar7 * 8" identifier + (binary_expression "lVar7 * 8" identifier * number_literal)) )))) ;) (expression_statement "*puVar8 = *puVar4;" (assignment_expression "*puVar8 = *puVar4" (pointer_expression "*puVar8" * identifier) = (pointer_expression "*puVar4" * identifier)) ;) (expression_statement "puVar8[1] = puVar4[1];" (assignment_expression "puVar8[1] = puVar4[1]" (subscript_expression "puVar8[1]" identifier [ number_literal ]) = (subscript_expression "puVar4[1]" identifier [ number_literal ])) ;) (expression_statement "puVar8 = puVar4;" (assignment_expression "puVar8 = puVar4" identifier = identifier) ;) }))) }))) (expression_statement "lVar5 = (lVar7 + -1) / 2;" (assignment_expression "lVar5 = (lVar7 + -1) / 2" identifier = (binary_expression "(lVar7 + -1) / 2" (parenthesized_expression "(lVar7 + -1)" ( (binary_expression "lVar7 + -1" identifier + number_literal) )) / number_literal)) ;) (if_statement "if (param_2 < lVar7) {\n    puVar4 = (uint *)(param_1 + lVar5 * 8);\n    uVar2 = *puVar4;\n    while (lVar6 = lVar5, uVar2 < (uint)param_4) {\n      puVar1 = (uint *)(param_1 + lVar7 * 8);\n      puVar8 = (uint *)(param_1 + lVar6 * 8);\n      *puVar1 = uVar2;\n      puVar1[1] = puVar4[1];\n      lVar5 = (lVar6 + -1) / 2;\n      if (lVar6 <= param_2) break;\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      lVar7 = lVar6;\n      uVar2 = *puVar4;\n    }\n  }" if (parenthesized_expression "(param_2 < lVar7)" ( (binary_expression "param_2 < lVar7" identifier < identifier) )) (compound_statement "{\n    puVar4 = (uint *)(param_1 + lVar5 * 8);\n    uVar2 = *puVar4;\n    while (lVar6 = lVar5, uVar2 < (uint)param_4) {\n      puVar1 = (uint *)(param_1 + lVar7 * 8);\n      puVar8 = (uint *)(param_1 + lVar6 * 8);\n      *puVar1 = uVar2;\n      puVar1[1] = puVar4[1];\n      lVar5 = (lVar6 + -1) / 2;\n      if (lVar6 <= param_2) break;\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      lVar7 = lVar6;\n      uVar2 = *puVar4;\n    }\n  }" { (expression_statement "puVar4 = (uint *)(param_1 + lVar5 * 8);" (assignment_expression "puVar4 = (uint *)(param_1 + lVar5 * 8)" identifier = (cast_expression "(uint *)(param_1 + lVar5 * 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + lVar5 * 8)" ( (binary_expression "param_1 + lVar5 * 8" identifier + (binary_expression "lVar5 * 8" identifier * number_literal)) )))) ;) (expression_statement "uVar2 = *puVar4;" (assignment_expression "uVar2 = *puVar4" identifier = (pointer_expression "*puVar4" * identifier)) ;) (while_statement "while (lVar6 = lVar5, uVar2 < (uint)param_4) {\n      puVar1 = (uint *)(param_1 + lVar7 * 8);\n      puVar8 = (uint *)(param_1 + lVar6 * 8);\n      *puVar1 = uVar2;\n      puVar1[1] = puVar4[1];\n      lVar5 = (lVar6 + -1) / 2;\n      if (lVar6 <= param_2) break;\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      lVar7 = lVar6;\n      uVar2 = *puVar4;\n    }" while (parenthesized_expression "(lVar6 = lVar5, uVar2 < (uint)param_4)" ( (comma_expression "lVar6 = lVar5, uVar2 < (uint)param_4" (assignment_expression "lVar6 = lVar5" identifier = identifier) , (binary_expression "uVar2 < (uint)param_4" identifier < (cast_expression "(uint)param_4" ( (type_descriptor "uint" type_identifier) ) identifier))) )) (compound_statement "{\n      puVar1 = (uint *)(param_1 + lVar7 * 8);\n      puVar8 = (uint *)(param_1 + lVar6 * 8);\n      *puVar1 = uVar2;\n      puVar1[1] = puVar4[1];\n      lVar5 = (lVar6 + -1) / 2;\n      if (lVar6 <= param_2) break;\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      lVar7 = lVar6;\n      uVar2 = *puVar4;\n    }" { (expression_statement "puVar1 = (uint *)(param_1 + lVar7 * 8);" (assignment_expression "puVar1 = (uint *)(param_1 + lVar7 * 8)" identifier = (cast_expression "(uint *)(param_1 + lVar7 * 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + lVar7 * 8)" ( (binary_expression "param_1 + lVar7 * 8" identifier + (binary_expression "lVar7 * 8" identifier * number_literal)) )))) ;) (expression_statement "puVar8 = (uint *)(param_1 + lVar6 * 8);" (assignment_expression "puVar8 = (uint *)(param_1 + lVar6 * 8)" identifier = (cast_expression "(uint *)(param_1 + lVar6 * 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + lVar6 * 8)" ( (binary_expression "param_1 + lVar6 * 8" identifier + (binary_expression "lVar6 * 8" identifier * number_literal)) )))) ;) (expression_statement "*puVar1 = uVar2;" (assignment_expression "*puVar1 = uVar2" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "puVar1[1] = puVar4[1];" (assignment_expression "puVar1[1] = puVar4[1]" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = (subscript_expression "puVar4[1]" identifier [ number_literal ])) ;) (expression_statement "lVar5 = (lVar6 + -1) / 2;" (assignment_expression "lVar5 = (lVar6 + -1) / 2" identifier = (binary_expression "(lVar6 + -1) / 2" (parenthesized_expression "(lVar6 + -1)" ( (binary_expression "lVar6 + -1" identifier + number_literal) )) / number_literal)) ;) (if_statement "if (lVar6 <= param_2) break;" if (parenthesized_expression "(lVar6 <= param_2)" ( (binary_expression "lVar6 <= param_2" identifier <= identifier) )) (break_statement "break;" break ;)) (expression_statement "puVar4 = (uint *)(param_1 + lVar5 * 8);" (assignment_expression "puVar4 = (uint *)(param_1 + lVar5 * 8)" identifier = (cast_expression "(uint *)(param_1 + lVar5 * 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + lVar5 * 8)" ( (binary_expression "param_1 + lVar5 * 8" identifier + (binary_expression "lVar5 * 8" identifier * number_literal)) )))) ;) (expression_statement "lVar7 = lVar6;" (assignment_expression "lVar7 = lVar6" identifier = identifier) ;) (expression_statement "uVar2 = *puVar4;" (assignment_expression "uVar2 = *puVar4" identifier = (pointer_expression "*puVar4" * identifier)) ;) })) })) (labeled_statement "LAB_002af84b:\n  *(undefined8 *)puVar8 = param_4;" statement_identifier : (expression_statement "*(undefined8 *)puVar8 = param_4;" (assignment_expression "*(undefined8 *)puVar8 = param_4" (pointer_expression "*(undefined8 *)puVar8" * (cast_expression "(undefined8 *)puVar8" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = identifier) ;)) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (parenthesized_expression ( (binary_expression IDENT - LIT) ))) / LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) * LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) * LIT) + IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT < IDENT) )) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (goto_statement goto statement_identifier ;)) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (goto_statement goto statement_identifier ;)) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (parenthesized_expression ( (binary_expression IDENT - LIT) ))) / LIT) == IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT * LIT) + LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }))) }))) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) / LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (while_statement while (parenthesized_expression ( (comma_expression (assignment_expression IDENT = IDENT) , (binary_expression IDENT < (cast_expression ( (type_descriptor TYPE) ) IDENT))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) / LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) })) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) = IDENT) ;)) (return_statement return ;) })))
(function_definition "void FUN_002af770(long param_1,long param_2,ulong param_3,undefined8 param_4)\n\n{\n  uint *puVar1;\n  uint uVar2;\n  long lVar3;\n  uint *puVar4;\n  long lVar5;\n  long lVar6;\n  long lVar7;\n  uint *puVar8;\n  uint uVar9;\n  \n  lVar6 = (long)(param_3 - 1) / 2;\n  lVar5 = param_2;\n  if (param_2 < lVar6) {\n    do {\n      lVar3 = (lVar5 + 1) * 2;\n      lVar7 = lVar3 + -1;\n      puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1);\n      puVar8 = (uint *)(param_1 + lVar7 * 8);\n      uVar2 = *puVar4;\n      uVar9 = *puVar8;\n      if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      *puVar4 = uVar9;\n      puVar4[1] = puVar8[1];\n      lVar5 = lVar7;\n    } while (lVar7 < lVar6);\n    if ((param_3 & 1) == 0) goto LAB_002af870;\n  }\n  else {\n    puVar8 = (uint *)(param_1 + param_2 * 8);\n    lVar7 = param_2;\n    if ((param_3 & 1) != 0) goto LAB_002af84b;\nLAB_002af870:\n    if ((long)(param_3 - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(param_1 + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }\n  }\n  lVar5 = (lVar7 + -1) / 2;\n  if (param_2 < lVar7) {\n    puVar4 = (uint *)(param_1 + lVar5 * 8);\n    uVar2 = *puVar4;\n    while (lVar6 = lVar5, uVar2 < (uint)param_4) {\n      puVar1 = (uint *)(param_1 + lVar7 * 8);\n      puVar8 = (uint *)(param_1 + lVar6 * 8);\n      *puVar1 = uVar2;\n      puVar1[1] = puVar4[1];\n      lVar5 = (lVar6 + -1) / 2;\n      if (lVar6 <= param_2) break;\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      lVar7 = lVar6;\n      uVar2 = *puVar4;\n    }\n  }\nLAB_002af84b:\n  *(undefined8 *)puVar8 = param_4;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_002af770(long param_1,long param_2,ulong param_3,undefined8 param_4)" (identifier "FUN_002af770") (parameter_list "(long param_1,long param_2,ulong param_3,undefined8 param_4)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "long param_2" (sized_type_specifier "long" (long "long")) (identifier "param_2")) (, ",") (parameter_declaration "ulong param_3" (type_identifier "ulong") (identifier "param_3")) (, ",") (parameter_declaration "undefined8 param_4" (type_identifier "undefined8") (identifier "param_4")) () ")"))) (compound_statement "{\n  uint *puVar1;\n  uint uVar2;\n  long lVar3;\n  uint *puVar4;\n  long lVar5;\n  long lVar6;\n  long lVar7;\n  uint *puVar8;\n  uint uVar9;\n  \n  lVar6 = (long)(param_3 - 1) / 2;\n  lVar5 = param_2;\n  if (param_2 < lVar6) {\n    do {\n      lVar3 = (lVar5 + 1) * 2;\n      lVar7 = lVar3 + -1;\n      puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1);\n      puVar8 = (uint *)(param_1 + lVar7 * 8);\n      uVar2 = *puVar4;\n      uVar9 = *puVar8;\n      if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      *puVar4 = uVar9;\n      puVar4[1] = puVar8[1];\n      lVar5 = lVar7;\n    } while (lVar7 < lVar6);\n    if ((param_3 & 1) == 0) goto LAB_002af870;\n  }\n  else {\n    puVar8 = (uint *)(param_1 + param_2 * 8);\n    lVar7 = param_2;\n    if ((param_3 & 1) != 0) goto LAB_002af84b;\nLAB_002af870:\n    if ((long)(param_3 - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(param_1 + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }\n  }\n  lVar5 = (lVar7 + -1) / 2;\n  if (param_2 < lVar7) {\n    puVar4 = (uint *)(param_1 + lVar5 * 8);\n    uVar2 = *puVar4;\n    while (lVar6 = lVar5, uVar2 < (uint)param_4) {\n      puVar1 = (uint *)(param_1 + lVar7 * 8);\n      puVar8 = (uint *)(param_1 + lVar6 * 8);\n      *puVar1 = uVar2;\n      puVar1[1] = puVar4[1];\n      lVar5 = (lVar6 + -1) / 2;\n      if (lVar6 <= param_2) break;\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      lVar7 = lVar6;\n      uVar2 = *puVar4;\n    }\n  }\nLAB_002af84b:\n  *(undefined8 *)puVar8 = param_4;\n  return;\n}" ({ "{") (declaration "uint *puVar1;" (type_identifier "uint") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "long lVar3;" (sized_type_specifier "long" (long "long")) (identifier "lVar3") (; ";")) (declaration "uint *puVar4;" (type_identifier "uint") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "long lVar5;" (sized_type_specifier "long" (long "long")) (identifier "lVar5") (; ";")) (declaration "long lVar6;" (sized_type_specifier "long" (long "long")) (identifier "lVar6") (; ";")) (declaration "long lVar7;" (sized_type_specifier "long" (long "long")) (identifier "lVar7") (; ";")) (declaration "uint *puVar8;" (type_identifier "uint") (pointer_declarator "*puVar8" (* "*") (identifier "puVar8")) (; ";")) (declaration "uint uVar9;" (type_identifier "uint") (identifier "uVar9") (; ";")) (expression_statement "lVar6 = (long)(param_3 - 1) / 2;" (assignment_expression "lVar6 = (long)(param_3 - 1) / 2" (identifier "lVar6") (= "=") (binary_expression "(long)(param_3 - 1) / 2" (cast_expression "(long)(param_3 - 1)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (parenthesized_expression "(param_3 - 1)" (( "(") (binary_expression "param_3 - 1" (identifier "param_3") (- "-") (number_literal "1")) () ")"))) (/ "/") (number_literal "2"))) (; ";")) (expression_statement "lVar5 = param_2;" (assignment_expression "lVar5 = param_2" (identifier "lVar5") (= "=") (identifier "param_2")) (; ";")) (if_statement "if (param_2 < lVar6) {\n    do {\n      lVar3 = (lVar5 + 1) * 2;\n      lVar7 = lVar3 + -1;\n      puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1);\n      puVar8 = (uint *)(param_1 + lVar7 * 8);\n      uVar2 = *puVar4;\n      uVar9 = *puVar8;\n      if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      *puVar4 = uVar9;\n      puVar4[1] = puVar8[1];\n      lVar5 = lVar7;\n    } while (lVar7 < lVar6);\n    if ((param_3 & 1) == 0) goto LAB_002af870;\n  }\n  else {\n    puVar8 = (uint *)(param_1 + param_2 * 8);\n    lVar7 = param_2;\n    if ((param_3 & 1) != 0) goto LAB_002af84b;\nLAB_002af870:\n    if ((long)(param_3 - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(param_1 + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }\n  }" (if "if") (parenthesized_expression "(param_2 < lVar6)" (( "(") (binary_expression "param_2 < lVar6" (identifier "param_2") (< "<") (identifier "lVar6")) () ")")) (compound_statement "{\n    do {\n      lVar3 = (lVar5 + 1) * 2;\n      lVar7 = lVar3 + -1;\n      puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1);\n      puVar8 = (uint *)(param_1 + lVar7 * 8);\n      uVar2 = *puVar4;\n      uVar9 = *puVar8;\n      if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      *puVar4 = uVar9;\n      puVar4[1] = puVar8[1];\n      lVar5 = lVar7;\n    } while (lVar7 < lVar6);\n    if ((param_3 & 1) == 0) goto LAB_002af870;\n  }" ({ "{") (do_statement "do {\n      lVar3 = (lVar5 + 1) * 2;\n      lVar7 = lVar3 + -1;\n      puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1);\n      puVar8 = (uint *)(param_1 + lVar7 * 8);\n      uVar2 = *puVar4;\n      uVar9 = *puVar8;\n      if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      *puVar4 = uVar9;\n      puVar4[1] = puVar8[1];\n      lVar5 = lVar7;\n    } while (lVar7 < lVar6);" (do "do") (compound_statement "{\n      lVar3 = (lVar5 + 1) * 2;\n      lVar7 = lVar3 + -1;\n      puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1);\n      puVar8 = (uint *)(param_1 + lVar7 * 8);\n      uVar2 = *puVar4;\n      uVar9 = *puVar8;\n      if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      *puVar4 = uVar9;\n      puVar4[1] = puVar8[1];\n      lVar5 = lVar7;\n    }" ({ "{") (expression_statement "lVar3 = (lVar5 + 1) * 2;" (assignment_expression "lVar3 = (lVar5 + 1) * 2" (identifier "lVar3") (= "=") (binary_expression "(lVar5 + 1) * 2" (parenthesized_expression "(lVar5 + 1)" (( "(") (binary_expression "lVar5 + 1" (identifier "lVar5") (+ "+") (number_literal "1")) () ")")) (* "*") (number_literal "2"))) (; ";")) (expression_statement "lVar7 = lVar3 + -1;" (assignment_expression "lVar7 = lVar3 + -1" (identifier "lVar7") (= "=") (binary_expression "lVar3 + -1" (identifier "lVar3") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1);" (assignment_expression "puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1)" (identifier "puVar4") (= "=") (cast_expression "(uint *)((lVar5 + 1) * 0x10 + param_1)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((lVar5 + 1) * 0x10 + param_1)" (( "(") (binary_expression "(lVar5 + 1) * 0x10 + param_1" (binary_expression "(lVar5 + 1) * 0x10" (parenthesized_expression "(lVar5 + 1)" (( "(") (binary_expression "lVar5 + 1" (identifier "lVar5") (+ "+") (number_literal "1")) () ")")) (* "*") (number_literal "0x10")) (+ "+") (identifier "param_1")) () ")")))) (; ";")) (expression_statement "puVar8 = (uint *)(param_1 + lVar7 * 8);" (assignment_expression "puVar8 = (uint *)(param_1 + lVar7 * 8)" (identifier "puVar8") (= "=") (cast_expression "(uint *)(param_1 + lVar7 * 8)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + lVar7 * 8)" (( "(") (binary_expression "param_1 + lVar7 * 8" (identifier "param_1") (+ "+") (binary_expression "lVar7 * 8" (identifier "lVar7") (* "*") (number_literal "8"))) () ")")))) (; ";")) (expression_statement "uVar2 = *puVar4;" (assignment_expression "uVar2 = *puVar4" (identifier "uVar2") (= "=") (pointer_expression "*puVar4" (* "*") (identifier "puVar4"))) (; ";")) (expression_statement "uVar9 = *puVar8;" (assignment_expression "uVar9 = *puVar8" (identifier "uVar9") (= "=") (pointer_expression "*puVar8" (* "*") (identifier "puVar8"))) (; ";")) (if_statement "if (uVar9 <= uVar2) {\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }" (if "if") (parenthesized_expression "(uVar9 <= uVar2)" (( "(") (binary_expression "uVar9 <= uVar2" (identifier "uVar9") (<= "<=") (identifier "uVar2")) () ")")) (compound_statement "{\n        lVar7 = lVar3;\n        puVar8 = puVar4;\n        uVar9 = uVar2;\n      }" ({ "{") (expression_statement "lVar7 = lVar3;" (assignment_expression "lVar7 = lVar3" (identifier "lVar7") (= "=") (identifier "lVar3")) (; ";")) (expression_statement "puVar8 = puVar4;" (assignment_expression "puVar8 = puVar4" (identifier "puVar8") (= "=") (identifier "puVar4")) (; ";")) (expression_statement "uVar9 = uVar2;" (assignment_expression "uVar9 = uVar2" (identifier "uVar9") (= "=") (identifier "uVar2")) (; ";")) (} "}"))) (expression_statement "puVar4 = (uint *)(param_1 + lVar5 * 8);" (assignment_expression "puVar4 = (uint *)(param_1 + lVar5 * 8)" (identifier "puVar4") (= "=") (cast_expression "(uint *)(param_1 + lVar5 * 8)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + lVar5 * 8)" (( "(") (binary_expression "param_1 + lVar5 * 8" (identifier "param_1") (+ "+") (binary_expression "lVar5 * 8" (identifier "lVar5") (* "*") (number_literal "8"))) () ")")))) (; ";")) (expression_statement "*puVar4 = uVar9;" (assignment_expression "*puVar4 = uVar9" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (identifier "uVar9")) (; ";")) (expression_statement "puVar4[1] = puVar8[1];" (assignment_expression "puVar4[1] = puVar8[1]" (subscript_expression "puVar4[1]" (identifier "puVar4") ([ "[") (number_literal "1") (] "]")) (= "=") (subscript_expression "puVar8[1]" (identifier "puVar8") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "lVar5 = lVar7;" (assignment_expression "lVar5 = lVar7" (identifier "lVar5") (= "=") (identifier "lVar7")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(lVar7 < lVar6)" (( "(") (binary_expression "lVar7 < lVar6" (identifier "lVar7") (< "<") (identifier "lVar6")) () ")")) (; ";")) (if_statement "if ((param_3 & 1) == 0) goto LAB_002af870;" (if "if") (parenthesized_expression "((param_3 & 1) == 0)" (( "(") (binary_expression "(param_3 & 1) == 0" (parenthesized_expression "(param_3 & 1)" (( "(") (binary_expression "param_3 & 1" (identifier "param_3") (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_002af870;" (goto "goto") (statement_identifier "LAB_002af870") (; ";"))) (} "}")) (else_clause "else {\n    puVar8 = (uint *)(param_1 + param_2 * 8);\n    lVar7 = param_2;\n    if ((param_3 & 1) != 0) goto LAB_002af84b;\nLAB_002af870:\n    if ((long)(param_3 - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(param_1 + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }\n  }" (else "else") (compound_statement "{\n    puVar8 = (uint *)(param_1 + param_2 * 8);\n    lVar7 = param_2;\n    if ((param_3 & 1) != 0) goto LAB_002af84b;\nLAB_002af870:\n    if ((long)(param_3 - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(param_1 + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }\n  }" ({ "{") (expression_statement "puVar8 = (uint *)(param_1 + param_2 * 8);" (assignment_expression "puVar8 = (uint *)(param_1 + param_2 * 8)" (identifier "puVar8") (= "=") (cast_expression "(uint *)(param_1 + param_2 * 8)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + param_2 * 8)" (( "(") (binary_expression "param_1 + param_2 * 8" (identifier "param_1") (+ "+") (binary_expression "param_2 * 8" (identifier "param_2") (* "*") (number_literal "8"))) () ")")))) (; ";")) (expression_statement "lVar7 = param_2;" (assignment_expression "lVar7 = param_2" (identifier "lVar7") (= "=") (identifier "param_2")) (; ";")) (if_statement "if ((param_3 & 1) != 0) goto LAB_002af84b;" (if "if") (parenthesized_expression "((param_3 & 1) != 0)" (( "(") (binary_expression "(param_3 & 1) != 0" (parenthesized_expression "(param_3 & 1)" (( "(") (binary_expression "param_3 & 1" (identifier "param_3") (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_002af84b;" (goto "goto") (statement_identifier "LAB_002af84b") (; ";"))) (labeled_statement "LAB_002af870:\n    if ((long)(param_3 - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(param_1 + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }" (statement_identifier "LAB_002af870") (: ":") (if_statement "if ((long)(param_3 - 2) / 2 == lVar7) {\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(param_1 + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }" (if "if") (parenthesized_expression "((long)(param_3 - 2) / 2 == lVar7)" (( "(") (binary_expression "(long)(param_3 - 2) / 2 == lVar7" (binary_expression "(long)(param_3 - 2) / 2" (cast_expression "(long)(param_3 - 2)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (parenthesized_expression "(param_3 - 2)" (( "(") (binary_expression "param_3 - 2" (identifier "param_3") (- "-") (number_literal "2")) () ")"))) (/ "/") (number_literal "2")) (== "==") (identifier "lVar7")) () ")")) (compound_statement "{\n      lVar7 = lVar7 * 2 + 1;\n      puVar4 = (uint *)(param_1 + lVar7 * 8);\n      *puVar8 = *puVar4;\n      puVar8[1] = puVar4[1];\n      puVar8 = puVar4;\n    }" ({ "{") (expression_statement "lVar7 = lVar7 * 2 + 1;" (assignment_expression "lVar7 = lVar7 * 2 + 1" (identifier "lVar7") (= "=") (binary_expression "lVar7 * 2 + 1" (binary_expression "lVar7 * 2" (identifier "lVar7") (* "*") (number_literal "2")) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "puVar4 = (uint *)(param_1 + lVar7 * 8);" (assignment_expression "puVar4 = (uint *)(param_1 + lVar7 * 8)" (identifier "puVar4") (= "=") (cast_expression "(uint *)(param_1 + lVar7 * 8)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + lVar7 * 8)" (( "(") (binary_expression "param_1 + lVar7 * 8" (identifier "param_1") (+ "+") (binary_expression "lVar7 * 8" (identifier "lVar7") (* "*") (number_literal "8"))) () ")")))) (; ";")) (expression_statement "*puVar8 = *puVar4;" (assignment_expression "*puVar8 = *puVar4" (pointer_expression "*puVar8" (* "*") (identifier "puVar8")) (= "=") (pointer_expression "*puVar4" (* "*") (identifier "puVar4"))) (; ";")) (expression_statement "puVar8[1] = puVar4[1];" (assignment_expression "puVar8[1] = puVar4[1]" (subscript_expression "puVar8[1]" (identifier "puVar8") ([ "[") (number_literal "1") (] "]")) (= "=") (subscript_expression "puVar4[1]" (identifier "puVar4") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "puVar8 = puVar4;" (assignment_expression "puVar8 = puVar4" (identifier "puVar8") (= "=") (identifier "puVar4")) (; ";")) (} "}")))) (} "}")))) (expression_statement "lVar5 = (lVar7 + -1) / 2;" (assignment_expression "lVar5 = (lVar7 + -1) / 2" (identifier "lVar5") (= "=") (binary_expression "(lVar7 + -1) / 2" (parenthesized_expression "(lVar7 + -1)" (( "(") (binary_expression "lVar7 + -1" (identifier "lVar7") (+ "+") (number_literal "-1")) () ")")) (/ "/") (number_literal "2"))) (; ";")) (if_statement "if (param_2 < lVar7) {\n    puVar4 = (uint *)(param_1 + lVar5 * 8);\n    uVar2 = *puVar4;\n    while (lVar6 = lVar5, uVar2 < (uint)param_4) {\n      puVar1 = (uint *)(param_1 + lVar7 * 8);\n      puVar8 = (uint *)(param_1 + lVar6 * 8);\n      *puVar1 = uVar2;\n      puVar1[1] = puVar4[1];\n      lVar5 = (lVar6 + -1) / 2;\n      if (lVar6 <= param_2) break;\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      lVar7 = lVar6;\n      uVar2 = *puVar4;\n    }\n  }" (if "if") (parenthesized_expression "(param_2 < lVar7)" (( "(") (binary_expression "param_2 < lVar7" (identifier "param_2") (< "<") (identifier "lVar7")) () ")")) (compound_statement "{\n    puVar4 = (uint *)(param_1 + lVar5 * 8);\n    uVar2 = *puVar4;\n    while (lVar6 = lVar5, uVar2 < (uint)param_4) {\n      puVar1 = (uint *)(param_1 + lVar7 * 8);\n      puVar8 = (uint *)(param_1 + lVar6 * 8);\n      *puVar1 = uVar2;\n      puVar1[1] = puVar4[1];\n      lVar5 = (lVar6 + -1) / 2;\n      if (lVar6 <= param_2) break;\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      lVar7 = lVar6;\n      uVar2 = *puVar4;\n    }\n  }" ({ "{") (expression_statement "puVar4 = (uint *)(param_1 + lVar5 * 8);" (assignment_expression "puVar4 = (uint *)(param_1 + lVar5 * 8)" (identifier "puVar4") (= "=") (cast_expression "(uint *)(param_1 + lVar5 * 8)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + lVar5 * 8)" (( "(") (binary_expression "param_1 + lVar5 * 8" (identifier "param_1") (+ "+") (binary_expression "lVar5 * 8" (identifier "lVar5") (* "*") (number_literal "8"))) () ")")))) (; ";")) (expression_statement "uVar2 = *puVar4;" (assignment_expression "uVar2 = *puVar4" (identifier "uVar2") (= "=") (pointer_expression "*puVar4" (* "*") (identifier "puVar4"))) (; ";")) (while_statement "while (lVar6 = lVar5, uVar2 < (uint)param_4) {\n      puVar1 = (uint *)(param_1 + lVar7 * 8);\n      puVar8 = (uint *)(param_1 + lVar6 * 8);\n      *puVar1 = uVar2;\n      puVar1[1] = puVar4[1];\n      lVar5 = (lVar6 + -1) / 2;\n      if (lVar6 <= param_2) break;\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      lVar7 = lVar6;\n      uVar2 = *puVar4;\n    }" (while "while") (parenthesized_expression "(lVar6 = lVar5, uVar2 < (uint)param_4)" (( "(") (comma_expression "lVar6 = lVar5, uVar2 < (uint)param_4" (assignment_expression "lVar6 = lVar5" (identifier "lVar6") (= "=") (identifier "lVar5")) (, ",") (binary_expression "uVar2 < (uint)param_4" (identifier "uVar2") (< "<") (cast_expression "(uint)param_4" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "param_4")))) () ")")) (compound_statement "{\n      puVar1 = (uint *)(param_1 + lVar7 * 8);\n      puVar8 = (uint *)(param_1 + lVar6 * 8);\n      *puVar1 = uVar2;\n      puVar1[1] = puVar4[1];\n      lVar5 = (lVar6 + -1) / 2;\n      if (lVar6 <= param_2) break;\n      puVar4 = (uint *)(param_1 + lVar5 * 8);\n      lVar7 = lVar6;\n      uVar2 = *puVar4;\n    }" ({ "{") (expression_statement "puVar1 = (uint *)(param_1 + lVar7 * 8);" (assignment_expression "puVar1 = (uint *)(param_1 + lVar7 * 8)" (identifier "puVar1") (= "=") (cast_expression "(uint *)(param_1 + lVar7 * 8)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + lVar7 * 8)" (( "(") (binary_expression "param_1 + lVar7 * 8" (identifier "param_1") (+ "+") (binary_expression "lVar7 * 8" (identifier "lVar7") (* "*") (number_literal "8"))) () ")")))) (; ";")) (expression_statement "puVar8 = (uint *)(param_1 + lVar6 * 8);" (assignment_expression "puVar8 = (uint *)(param_1 + lVar6 * 8)" (identifier "puVar8") (= "=") (cast_expression "(uint *)(param_1 + lVar6 * 8)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + lVar6 * 8)" (( "(") (binary_expression "param_1 + lVar6 * 8" (identifier "param_1") (+ "+") (binary_expression "lVar6 * 8" (identifier "lVar6") (* "*") (number_literal "8"))) () ")")))) (; ";")) (expression_statement "*puVar1 = uVar2;" (assignment_expression "*puVar1 = uVar2" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "puVar1[1] = puVar4[1];" (assignment_expression "puVar1[1] = puVar4[1]" (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]")) (= "=") (subscript_expression "puVar4[1]" (identifier "puVar4") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "lVar5 = (lVar6 + -1) / 2;" (assignment_expression "lVar5 = (lVar6 + -1) / 2" (identifier "lVar5") (= "=") (binary_expression "(lVar6 + -1) / 2" (parenthesized_expression "(lVar6 + -1)" (( "(") (binary_expression "lVar6 + -1" (identifier "lVar6") (+ "+") (number_literal "-1")) () ")")) (/ "/") (number_literal "2"))) (; ";")) (if_statement "if (lVar6 <= param_2) break;" (if "if") (parenthesized_expression "(lVar6 <= param_2)" (( "(") (binary_expression "lVar6 <= param_2" (identifier "lVar6") (<= "<=") (identifier "param_2")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "puVar4 = (uint *)(param_1 + lVar5 * 8);" (assignment_expression "puVar4 = (uint *)(param_1 + lVar5 * 8)" (identifier "puVar4") (= "=") (cast_expression "(uint *)(param_1 + lVar5 * 8)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + lVar5 * 8)" (( "(") (binary_expression "param_1 + lVar5 * 8" (identifier "param_1") (+ "+") (binary_expression "lVar5 * 8" (identifier "lVar5") (* "*") (number_literal "8"))) () ")")))) (; ";")) (expression_statement "lVar7 = lVar6;" (assignment_expression "lVar7 = lVar6" (identifier "lVar7") (= "=") (identifier "lVar6")) (; ";")) (expression_statement "uVar2 = *puVar4;" (assignment_expression "uVar2 = *puVar4" (identifier "uVar2") (= "=") (pointer_expression "*puVar4" (* "*") (identifier "puVar4"))) (; ";")) (} "}"))) (} "}"))) (labeled_statement "LAB_002af84b:\n  *(undefined8 *)puVar8 = param_4;" (statement_identifier "LAB_002af84b") (: ":") (expression_statement "*(undefined8 *)puVar8 = param_4;" (assignment_expression "*(undefined8 *)puVar8 = param_4" (pointer_expression "*(undefined8 *)puVar8" (* "*") (cast_expression "(undefined8 *)puVar8" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar8"))) (= "=") (identifier "param_4")) (; ";"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* DWARF original name: __adjust_heap<__gnu_cxx::__normal_iterator<std::pair<unsigned int, unsigned
   int>*, std::vector<std::pair<unsigned int, unsigned int> > >, long int, std::pair<unsigned int,
   unsigned int>, __gnu_cxx::__ops::_Iter_comp_iter<gold::Eh_frame_hdr::Fde_address_compare<32> > >
    */

void std::
     __adjust_heap<__gnu_cxx::__normal_iterator<std::pair<unsigned_int,_unsigned_int>*,_std::vector<std::pair<unsigned_int,_unsigned_int>_>_>,_long_int,_std::pair<unsigned_int,_unsigned_int>,___gnu_cxx::__ops::_Iter_comp_iter<gold::Eh_frame_hdr::Fde_address_compare<32>_>_>
               (long var_6,long var_2,ulong var_1,type_2 __value)

{
  type_1 *puVar1;
  type_1 var_9;
  long var_5;
  type_1 *puVar4;
  long var_4;
  long var_3;
  long __topIndex;
  long var_7;
  type_1 *puVar8;
  type_1 var_8;
  
  var_3 = (long)(var_1 - 1) / 2;
  var_4 = var_2;
  if (var_2 < var_3) {
    do {
      var_5 = (var_4 + 1) * 2;
      var_7 = var_5 + -1;
      puVar4 = (type_1 *)((var_4 + 1) * 0x10 + var_6);
      puVar8 = (type_1 *)(var_6 + var_7 * 8);
      var_9 = *puVar4;
      var_8 = *puVar8;
      if (var_8 <= var_9) {
        var_7 = var_5;
        puVar8 = puVar4;
        var_8 = var_9;
      }
      puVar4 = (type_1 *)(var_6 + var_4 * 8);
      *puVar4 = var_8;
      puVar4[1] = puVar8[1];
      var_4 = var_7;
    } while (var_7 < var_3);
    if ((var_1 & 1) == 0) goto LAB_002af870;
  }
  else {
    puVar8 = (type_1 *)(var_6 + var_2 * 8);
    var_7 = var_2;
    if ((var_1 & 1) != 0) goto LAB_002af84b;
LAB_002af870:
    if ((long)(var_1 - 2) / 2 == var_7) {
      var_7 = var_7 * 2 + 1;
      puVar4 = (type_1 *)(var_6 + var_7 * 8);
      *puVar8 = *puVar4;
      puVar8[1] = puVar4[1];
      puVar8 = puVar4;
    }
  }
  var_4 = (var_7 + -1) / 2;
  if (var_2 < var_7) {
    puVar4 = (type_1 *)(var_6 + var_4 * 8);
    var_9 = *puVar4;
    while (var_3 = var_4, var_9 < (type_1)__value) {
      puVar1 = (type_1 *)(var_6 + var_7 * 8);
      puVar8 = (type_1 *)(var_6 + var_3 * 8);
      *puVar1 = var_9;
      puVar1[1] = puVar4[1];
      var_4 = (var_3 + -1) / 2;
      if (var_3 <= var_2) break;
      puVar4 = (type_1 *)(var_6 + var_4 * 8);
      var_7 = var_3;
      var_9 = *puVar4;
    }
  }
LAB_002af84b:
  *(type_2 *)puVar8 = __value;
  return;
}


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

void MASKED(long param_1,long param_2,ulong param_3,undefined8 param_4)

{
  uint *puVar1;
  uint uVar2;
  long lVar3;
  uint *puVar4;
  long lVar5;
  long lVar6;
  long lVar7;
  uint *puVar8;
  uint uVar9;
  
  lVar6 = (long)(param_3 - 1) / 2;
  lVar5 = param_2;
  if (param_2 < lVar6) {
    do {
      lVar3 = (lVar5 + 1) * 2;
      lVar7 = lVar3 + -1;
      puVar4 = (uint *)((lVar5 + 1) * 0x10 + param_1);
      puVar8 = (uint *)(param_1 + lVar7 * 8);
      uVar2 = *puVar4;
      uVar9 = *puVar8;
      if (uVar9 <= uVar2) {
        lVar7 = lVar3;
        puVar8 = puVar4;
        uVar9 = uVar2;
      }
      puVar4 = (uint *)(param_1 + lVar5 * 8);
      *puVar4 = uVar9;
      puVar4[1] = puVar8[1];
      lVar5 = lVar7;
    } while (lVar7 < lVar6);
    if ((param_3 & 1) == 0) goto LAB_002af870;
  }
  else {
    puVar8 = (uint *)(param_1 + param_2 * 8);
    lVar7 = param_2;
    if ((param_3 & 1) != 0) goto LAB_002af84b;
LAB_002af870:
    if ((long)(param_3 - 2) / 2 == lVar7) {
      lVar7 = lVar7 * 2 + 1;
      puVar4 = (uint *)(param_1 + lVar7 * 8);
      *puVar8 = *puVar4;
      puVar8[1] = puVar4[1];
      puVar8 = puVar4;
    }
  }
  lVar5 = (lVar7 + -1) / 2;
  if (param_2 < lVar7) {
    puVar4 = (uint *)(param_1 + lVar5 * 8);
    uVar2 = *puVar4;
    while (lVar6 = lVar5, uVar2 < (uint)param_4) {
      puVar1 = (uint *)(param_1 + lVar7 * 8);
      puVar8 = (uint *)(param_1 + lVar6 * 8);
      *puVar1 = uVar2;
      puVar1[1] = puVar4[1];
      lVar5 = (lVar6 + -1) / 2;
      if (lVar6 <= param_2) break;
      puVar4 = (uint *)(param_1 + lVar5 * 8);
      lVar7 = lVar6;
      uVar2 = *puVar4;
    }
  }
LAB_002af84b:
  *(undefined8 *)puVar8 = param_4;
  return;
}

