
void frame_heapsort(undefined8 param_1,undefined8 param_2,long param_3)

{
  undefined8 uVar1;
  int iVar2;
  int iVar3;
  ulong uVar4;
  ulong uVar5;
  undefined4 local_40;
  
  uVar4 = *(ulong *)(param_3 + 8);
  iVar2 = (int)(uVar4 >> 1) + -1;
  if (-1 < iVar2) {
    do {
      iVar3 = iVar2 + -1;
      frame_downheap(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);
      iVar2 = iVar3;
    } while (iVar3 != -1);
  }
  local_40 = (int)uVar4;
  local_40 = local_40 + -1;
  uVar4 = (ulong)local_40;
  while (0 < local_40) {
    uVar1 = *(undefined8 *)(param_3 + 0x10);
    uVar5 = uVar4 & 0xffffffff;
    *(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8);
    *(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1;
    uVar4 = uVar4 - 1;
    frame_downheap(param_1,param_2,param_3 + 0x10,0,uVar5);
    local_40 = (int)uVar4;
  }
  return;
}



void FUN_00330ac0(undefined8 param_1,undefined8 param_2,long param_3)

{
  undefined8 uVar1;
  int iVar2;
  int iVar3;
  ulong uVar4;
  ulong uVar5;
  undefined4 local_40;
  
  uVar4 = *(ulong *)(param_3 + 8);
  iVar2 = (int)(uVar4 >> 1) + -1;
  if (-1 < iVar2) {
    do {
      iVar3 = iVar2 + -1;
      FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);
      iVar2 = iVar3;
    } while (iVar3 != -1);
  }
  local_40 = (int)uVar4;
  local_40 = local_40 + -1;
  uVar4 = (ulong)local_40;
  while (0 < local_40) {
    uVar1 = *(undefined8 *)(param_3 + 0x10);
    uVar5 = uVar4 & 0xffffffff;
    *(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8);
    *(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1;
    uVar4 = uVar4 - 1;
    FUN_00330a00(param_1,param_2,param_3 + 0x10,0,uVar5);
    local_40 = (int)uVar4;
  }
  return;
}


PUSH R15
MOV R15,RDX
PUSH R14
PUSH R13
MOV R13,RSI
PUSH R12
MOV R12,RDI
PUSH RBP
LEA RBP,[RDX + 0x10]
PUSH RBX
SUB RSP,0x18
MOV RAX,qword ptr [RDX + 0x8]
MOV RBX,RAX
MOV qword ptr [RSP + 0x8],RAX
MOV R14D,EAX
SHR RBX,0x1
SUB EBX,0x1
JS 0x00330b13
NOP word ptr [RAX + RAX*0x1]
MOV ECX,EBX
MOV R8D,R14D
MOV RDX,RBP
MOV RSI,R13
MOV RDI,R12
SUB EBX,0x1
CALL 0x00330a00
CMP EBX,-0x1
JNZ 0x00330af8
MOV EAX,dword ptr [RSP + 0x8]
SUB EAX,0x1
MOVSXD RBX,EAX
TEST EAX,EAX
JLE 0x00330b55
NOP dword ptr [RAX]
MOV RCX,qword ptr [R15 + RBX*0x8 + 0x10]
MOV RDX,qword ptr [R15 + 0x10]
MOV R8D,EBX
MOV RSI,R13
MOV RDI,R12
MOV qword ptr [R15 + 0x10],RCX
XOR ECX,ECX
MOV qword ptr [R15 + RBX*0x8 + 0x10],RDX
MOV RDX,RBP
SUB RBX,0x1
CALL 0x00330a00
TEST EBX,EBX
JG 0x00330b28
ADD RSP,0x18
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
(translation_unit "void FUN_00330ac0(undefined8 param_1,undefined8 param_2,long param_3)\n\n{\n  undefined8 uVar1;\n  int iVar2;\n  int iVar3;\n  ulong uVar4;\n  ulong uVar5;\n  undefined4 local_40;\n  \n  uVar4 = *(ulong *)(param_3 + 8);\n  iVar2 = (int)(uVar4 >> 1) + -1;\n  if (-1 < iVar2) {\n    do {\n      iVar3 = iVar2 + -1;\n      FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    } while (iVar3 != -1);\n  }\n  local_40 = (int)uVar4;\n  local_40 = local_40 + -1;\n  uVar4 = (ulong)local_40;\n  while (0 < local_40) {\n    uVar1 = *(undefined8 *)(param_3 + 0x10);\n    uVar5 = uVar4 & 0xffffffff;\n    *(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8);\n    *(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1;\n    uVar4 = uVar4 - 1;\n    FUN_00330a00(param_1,param_2,param_3 + 0x10,0,uVar5);\n    local_40 = (int)uVar4;\n  }\n  return;\n}\n\n" (function_definition "void FUN_00330ac0(undefined8 param_1,undefined8 param_2,long param_3)\n\n{\n  undefined8 uVar1;\n  int iVar2;\n  int iVar3;\n  ulong uVar4;\n  ulong uVar5;\n  undefined4 local_40;\n  \n  uVar4 = *(ulong *)(param_3 + 8);\n  iVar2 = (int)(uVar4 >> 1) + -1;\n  if (-1 < iVar2) {\n    do {\n      iVar3 = iVar2 + -1;\n      FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    } while (iVar3 != -1);\n  }\n  local_40 = (int)uVar4;\n  local_40 = local_40 + -1;\n  uVar4 = (ulong)local_40;\n  while (0 < local_40) {\n    uVar1 = *(undefined8 *)(param_3 + 0x10);\n    uVar5 = uVar4 & 0xffffffff;\n    *(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8);\n    *(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1;\n    uVar4 = uVar4 - 1;\n    FUN_00330a00(param_1,param_2,param_3 + 0x10,0,uVar5);\n    local_40 = (int)uVar4;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00330ac0(undefined8 param_1,undefined8 param_2,long param_3)" identifier (parameter_list "(undefined8 param_1,undefined8 param_2,long param_3)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) , (parameter_declaration "long param_3" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  undefined8 uVar1;\n  int iVar2;\n  int iVar3;\n  ulong uVar4;\n  ulong uVar5;\n  undefined4 local_40;\n  \n  uVar4 = *(ulong *)(param_3 + 8);\n  iVar2 = (int)(uVar4 >> 1) + -1;\n  if (-1 < iVar2) {\n    do {\n      iVar3 = iVar2 + -1;\n      FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    } while (iVar3 != -1);\n  }\n  local_40 = (int)uVar4;\n  local_40 = local_40 + -1;\n  uVar4 = (ulong)local_40;\n  while (0 < local_40) {\n    uVar1 = *(undefined8 *)(param_3 + 0x10);\n    uVar5 = uVar4 & 0xffffffff;\n    *(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8);\n    *(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1;\n    uVar4 = uVar4 - 1;\n    FUN_00330a00(param_1,param_2,param_3 + 0x10,0,uVar5);\n    local_40 = (int)uVar4;\n  }\n  return;\n}" { (declaration "undefined8 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "ulong uVar5;" type_identifier identifier ;) (declaration "undefined4 local_40;" type_identifier identifier ;) (expression_statement "uVar4 = *(ulong *)(param_3 + 8);" (assignment_expression "uVar4 = *(ulong *)(param_3 + 8)" identifier = (pointer_expression "*(ulong *)(param_3 + 8)" * (cast_expression "(ulong *)(param_3 + 8)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 8)" ( (binary_expression "param_3 + 8" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = (int)(uVar4 >> 1) + -1;" (assignment_expression "iVar2 = (int)(uVar4 >> 1) + -1" identifier = (binary_expression "(int)(uVar4 >> 1) + -1" (cast_expression "(int)(uVar4 >> 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar4 >> 1)" ( (binary_expression "uVar4 >> 1" identifier >> number_literal) ))) + number_literal)) ;) (if_statement "if (-1 < iVar2) {\n    do {\n      iVar3 = iVar2 + -1;\n      FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    } while (iVar3 != -1);\n  }" if (parenthesized_expression "(-1 < iVar2)" ( (binary_expression "-1 < iVar2" number_literal < identifier) )) (compound_statement "{\n    do {\n      iVar3 = iVar2 + -1;\n      FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    } while (iVar3 != -1);\n  }" { (do_statement "do {\n      iVar3 = iVar2 + -1;\n      FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    } while (iVar3 != -1);" do (compound_statement "{\n      iVar3 = iVar2 + -1;\n      FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    }" { (expression_statement "iVar3 = iVar2 + -1;" (assignment_expression "iVar3 = iVar2 + -1" identifier = (binary_expression "iVar2 + -1" identifier + number_literal)) ;) (expression_statement "FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);" (call_expression "FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff)" identifier (argument_list "(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff)" ( identifier , identifier , (binary_expression "param_3 + 0x10" identifier + number_literal) , identifier , (binary_expression "uVar4 & 0xffffffff" identifier & number_literal) ))) ;) (expression_statement "iVar2 = iVar3;" (assignment_expression "iVar2 = iVar3" identifier = identifier) ;) }) while (parenthesized_expression "(iVar3 != -1)" ( (binary_expression "iVar3 != -1" identifier != number_literal) )) ;) })) (expression_statement "local_40 = (int)uVar4;" (assignment_expression "local_40 = (int)uVar4" identifier = (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "local_40 = local_40 + -1;" (assignment_expression "local_40 = local_40 + -1" identifier = (binary_expression "local_40 + -1" identifier + number_literal)) ;) (expression_statement "uVar4 = (ulong)local_40;" (assignment_expression "uVar4 = (ulong)local_40" identifier = (cast_expression "(ulong)local_40" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) (while_statement "while (0 < local_40) {\n    uVar1 = *(undefined8 *)(param_3 + 0x10);\n    uVar5 = uVar4 & 0xffffffff;\n    *(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8);\n    *(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1;\n    uVar4 = uVar4 - 1;\n    FUN_00330a00(param_1,param_2,param_3 + 0x10,0,uVar5);\n    local_40 = (int)uVar4;\n  }" while (parenthesized_expression "(0 < local_40)" ( (binary_expression "0 < local_40" number_literal < identifier) )) (compound_statement "{\n    uVar1 = *(undefined8 *)(param_3 + 0x10);\n    uVar5 = uVar4 & 0xffffffff;\n    *(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8);\n    *(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1;\n    uVar4 = uVar4 - 1;\n    FUN_00330a00(param_1,param_2,param_3 + 0x10,0,uVar5);\n    local_40 = (int)uVar4;\n  }" { (expression_statement "uVar1 = *(undefined8 *)(param_3 + 0x10);" (assignment_expression "uVar1 = *(undefined8 *)(param_3 + 0x10)" identifier = (pointer_expression "*(undefined8 *)(param_3 + 0x10)" * (cast_expression "(undefined8 *)(param_3 + 0x10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x10)" ( (binary_expression "param_3 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "uVar5 = uVar4 & 0xffffffff;" (assignment_expression "uVar5 = uVar4 & 0xffffffff" identifier = (binary_expression "uVar4 & 0xffffffff" identifier & number_literal)) ;) (expression_statement "*(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8);" (assignment_expression "*(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8)" (pointer_expression "*(undefined8 *)(param_3 + 0x10)" * (cast_expression "(undefined8 *)(param_3 + 0x10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x10)" ( (binary_expression "param_3 + 0x10" identifier + number_literal) )))) = (pointer_expression "*(undefined8 *)(param_3 + 0x10 + uVar4 * 8)" * (cast_expression "(undefined8 *)(param_3 + 0x10 + uVar4 * 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x10 + uVar4 * 8)" ( (binary_expression "param_3 + 0x10 + uVar4 * 8" (binary_expression "param_3 + 0x10" identifier + number_literal) + (binary_expression "uVar4 * 8" identifier * number_literal)) ))))) ;) (expression_statement "*(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1;" (assignment_expression "*(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1" (pointer_expression "*(undefined8 *)(param_3 + 0x10 + uVar4 * 8)" * (cast_expression "(undefined8 *)(param_3 + 0x10 + uVar4 * 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x10 + uVar4 * 8)" ( (binary_expression "param_3 + 0x10 + uVar4 * 8" (binary_expression "param_3 + 0x10" identifier + number_literal) + (binary_expression "uVar4 * 8" identifier * number_literal)) )))) = identifier) ;) (expression_statement "uVar4 = uVar4 - 1;" (assignment_expression "uVar4 = uVar4 - 1" identifier = (binary_expression "uVar4 - 1" identifier - number_literal)) ;) (expression_statement "FUN_00330a00(param_1,param_2,param_3 + 0x10,0,uVar5);" (call_expression "FUN_00330a00(param_1,param_2,param_3 + 0x10,0,uVar5)" identifier (argument_list "(param_1,param_2,param_3 + 0x10,0,uVar5)" ( identifier , identifier , (binary_expression "param_3 + 0x10" identifier + number_literal) , number_literal , identifier ))) ;) (expression_statement "local_40 = (int)uVar4;" (assignment_expression "local_40 = (int)uVar4" identifier = (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier)) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void frame_heapsort(undefined8 param_1,undefined8 param_2,long param_3)\n\n{\n  undefined8 uVar1;\n  int iVar2;\n  int iVar3;\n  ulong uVar4;\n  ulong uVar5;\n  undefined4 local_40;\n  \n  uVar4 = *(ulong *)(param_3 + 8);\n  iVar2 = (int)(uVar4 >> 1) + -1;\n  if (-1 < iVar2) {\n    do {\n      iVar3 = iVar2 + -1;\n      frame_downheap(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    } while (iVar3 != -1);\n  }\n  local_40 = (int)uVar4;\n  local_40 = local_40 + -1;\n  uVar4 = (ulong)local_40;\n  while (0 < local_40) {\n    uVar1 = *(undefined8 *)(param_3 + 0x10);\n    uVar5 = uVar4 & 0xffffffff;\n    *(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8);\n    *(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1;\n    uVar4 = uVar4 - 1;\n    frame_downheap(param_1,param_2,param_3 + 0x10,0,uVar5);\n    local_40 = (int)uVar4;\n  }\n  return;\n}\n\n" (function_definition "void frame_heapsort(undefined8 param_1,undefined8 param_2,long param_3)\n\n{\n  undefined8 uVar1;\n  int iVar2;\n  int iVar3;\n  ulong uVar4;\n  ulong uVar5;\n  undefined4 local_40;\n  \n  uVar4 = *(ulong *)(param_3 + 8);\n  iVar2 = (int)(uVar4 >> 1) + -1;\n  if (-1 < iVar2) {\n    do {\n      iVar3 = iVar2 + -1;\n      frame_downheap(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    } while (iVar3 != -1);\n  }\n  local_40 = (int)uVar4;\n  local_40 = local_40 + -1;\n  uVar4 = (ulong)local_40;\n  while (0 < local_40) {\n    uVar1 = *(undefined8 *)(param_3 + 0x10);\n    uVar5 = uVar4 & 0xffffffff;\n    *(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8);\n    *(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1;\n    uVar4 = uVar4 - 1;\n    frame_downheap(param_1,param_2,param_3 + 0x10,0,uVar5);\n    local_40 = (int)uVar4;\n  }\n  return;\n}" primitive_type (function_declarator "frame_heapsort(undefined8 param_1,undefined8 param_2,long param_3)" identifier (parameter_list "(undefined8 param_1,undefined8 param_2,long param_3)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) , (parameter_declaration "long param_3" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  undefined8 uVar1;\n  int iVar2;\n  int iVar3;\n  ulong uVar4;\n  ulong uVar5;\n  undefined4 local_40;\n  \n  uVar4 = *(ulong *)(param_3 + 8);\n  iVar2 = (int)(uVar4 >> 1) + -1;\n  if (-1 < iVar2) {\n    do {\n      iVar3 = iVar2 + -1;\n      frame_downheap(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    } while (iVar3 != -1);\n  }\n  local_40 = (int)uVar4;\n  local_40 = local_40 + -1;\n  uVar4 = (ulong)local_40;\n  while (0 < local_40) {\n    uVar1 = *(undefined8 *)(param_3 + 0x10);\n    uVar5 = uVar4 & 0xffffffff;\n    *(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8);\n    *(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1;\n    uVar4 = uVar4 - 1;\n    frame_downheap(param_1,param_2,param_3 + 0x10,0,uVar5);\n    local_40 = (int)uVar4;\n  }\n  return;\n}" { (declaration "undefined8 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "ulong uVar5;" type_identifier identifier ;) (declaration "undefined4 local_40;" type_identifier identifier ;) (expression_statement "uVar4 = *(ulong *)(param_3 + 8);" (assignment_expression "uVar4 = *(ulong *)(param_3 + 8)" identifier = (pointer_expression "*(ulong *)(param_3 + 8)" * (cast_expression "(ulong *)(param_3 + 8)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 8)" ( (binary_expression "param_3 + 8" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = (int)(uVar4 >> 1) + -1;" (assignment_expression "iVar2 = (int)(uVar4 >> 1) + -1" identifier = (binary_expression "(int)(uVar4 >> 1) + -1" (cast_expression "(int)(uVar4 >> 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar4 >> 1)" ( (binary_expression "uVar4 >> 1" identifier >> number_literal) ))) + number_literal)) ;) (if_statement "if (-1 < iVar2) {\n    do {\n      iVar3 = iVar2 + -1;\n      frame_downheap(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    } while (iVar3 != -1);\n  }" if (parenthesized_expression "(-1 < iVar2)" ( (binary_expression "-1 < iVar2" number_literal < identifier) )) (compound_statement "{\n    do {\n      iVar3 = iVar2 + -1;\n      frame_downheap(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    } while (iVar3 != -1);\n  }" { (do_statement "do {\n      iVar3 = iVar2 + -1;\n      frame_downheap(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    } while (iVar3 != -1);" do (compound_statement "{\n      iVar3 = iVar2 + -1;\n      frame_downheap(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    }" { (expression_statement "iVar3 = iVar2 + -1;" (assignment_expression "iVar3 = iVar2 + -1" identifier = (binary_expression "iVar2 + -1" identifier + number_literal)) ;) (expression_statement "frame_downheap(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);" (call_expression "frame_downheap(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff)" identifier (argument_list "(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff)" ( identifier , identifier , (binary_expression "param_3 + 0x10" identifier + number_literal) , identifier , (binary_expression "uVar4 & 0xffffffff" identifier & number_literal) ))) ;) (expression_statement "iVar2 = iVar3;" (assignment_expression "iVar2 = iVar3" identifier = identifier) ;) }) while (parenthesized_expression "(iVar3 != -1)" ( (binary_expression "iVar3 != -1" identifier != number_literal) )) ;) })) (expression_statement "local_40 = (int)uVar4;" (assignment_expression "local_40 = (int)uVar4" identifier = (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "local_40 = local_40 + -1;" (assignment_expression "local_40 = local_40 + -1" identifier = (binary_expression "local_40 + -1" identifier + number_literal)) ;) (expression_statement "uVar4 = (ulong)local_40;" (assignment_expression "uVar4 = (ulong)local_40" identifier = (cast_expression "(ulong)local_40" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) (while_statement "while (0 < local_40) {\n    uVar1 = *(undefined8 *)(param_3 + 0x10);\n    uVar5 = uVar4 & 0xffffffff;\n    *(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8);\n    *(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1;\n    uVar4 = uVar4 - 1;\n    frame_downheap(param_1,param_2,param_3 + 0x10,0,uVar5);\n    local_40 = (int)uVar4;\n  }" while (parenthesized_expression "(0 < local_40)" ( (binary_expression "0 < local_40" number_literal < identifier) )) (compound_statement "{\n    uVar1 = *(undefined8 *)(param_3 + 0x10);\n    uVar5 = uVar4 & 0xffffffff;\n    *(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8);\n    *(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1;\n    uVar4 = uVar4 - 1;\n    frame_downheap(param_1,param_2,param_3 + 0x10,0,uVar5);\n    local_40 = (int)uVar4;\n  }" { (expression_statement "uVar1 = *(undefined8 *)(param_3 + 0x10);" (assignment_expression "uVar1 = *(undefined8 *)(param_3 + 0x10)" identifier = (pointer_expression "*(undefined8 *)(param_3 + 0x10)" * (cast_expression "(undefined8 *)(param_3 + 0x10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x10)" ( (binary_expression "param_3 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "uVar5 = uVar4 & 0xffffffff;" (assignment_expression "uVar5 = uVar4 & 0xffffffff" identifier = (binary_expression "uVar4 & 0xffffffff" identifier & number_literal)) ;) (expression_statement "*(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8);" (assignment_expression "*(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8)" (pointer_expression "*(undefined8 *)(param_3 + 0x10)" * (cast_expression "(undefined8 *)(param_3 + 0x10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x10)" ( (binary_expression "param_3 + 0x10" identifier + number_literal) )))) = (pointer_expression "*(undefined8 *)(param_3 + 0x10 + uVar4 * 8)" * (cast_expression "(undefined8 *)(param_3 + 0x10 + uVar4 * 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x10 + uVar4 * 8)" ( (binary_expression "param_3 + 0x10 + uVar4 * 8" (binary_expression "param_3 + 0x10" identifier + number_literal) + (binary_expression "uVar4 * 8" identifier * number_literal)) ))))) ;) (expression_statement "*(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1;" (assignment_expression "*(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1" (pointer_expression "*(undefined8 *)(param_3 + 0x10 + uVar4 * 8)" * (cast_expression "(undefined8 *)(param_3 + 0x10 + uVar4 * 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x10 + uVar4 * 8)" ( (binary_expression "param_3 + 0x10 + uVar4 * 8" (binary_expression "param_3 + 0x10" identifier + number_literal) + (binary_expression "uVar4 * 8" identifier * number_literal)) )))) = identifier) ;) (expression_statement "uVar4 = uVar4 - 1;" (assignment_expression "uVar4 = uVar4 - 1" identifier = (binary_expression "uVar4 - 1" identifier - number_literal)) ;) (expression_statement "frame_downheap(param_1,param_2,param_3 + 0x10,0,uVar5);" (call_expression "frame_downheap(param_1,param_2,param_3 + 0x10,0,uVar5)" identifier (argument_list "(param_1,param_2,param_3 + 0x10,0,uVar5)" ( identifier , identifier , (binary_expression "param_3 + 0x10" identifier + number_literal) , number_literal , identifier ))) ;) (expression_statement "local_40 = (int)uVar4;" (assignment_expression "local_40 = (int)uVar4" identifier = (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier)) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00330ac0(undefined8 param_1,undefined8 param_2,long param_3)\n\n{\n  undefined8 uVar1;\n  int iVar2;\n  int iVar3;\n  ulong uVar4;\n  ulong uVar5;\n  undefined4 local_40;\n  \n  uVar4 = *(ulong *)(param_3 + 8);\n  iVar2 = (int)(uVar4 >> 1) + -1;\n  if (-1 < iVar2) {\n    do {\n      iVar3 = iVar2 + -1;\n      FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    } while (iVar3 != -1);\n  }\n  local_40 = (int)uVar4;\n  local_40 = local_40 + -1;\n  uVar4 = (ulong)local_40;\n  while (0 < local_40) {\n    uVar1 = *(undefined8 *)(param_3 + 0x10);\n    uVar5 = uVar4 & 0xffffffff;\n    *(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8);\n    *(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1;\n    uVar4 = uVar4 - 1;\n    FUN_00330a00(param_1,param_2,param_3 + 0x10,0,uVar5);\n    local_40 = (int)uVar4;\n  }\n  return;\n}\n\n" (function_definition "void FUN_00330ac0(undefined8 param_1,undefined8 param_2,long param_3)\n\n{\n  undefined8 uVar1;\n  int iVar2;\n  int iVar3;\n  ulong uVar4;\n  ulong uVar5;\n  undefined4 local_40;\n  \n  uVar4 = *(ulong *)(param_3 + 8);\n  iVar2 = (int)(uVar4 >> 1) + -1;\n  if (-1 < iVar2) {\n    do {\n      iVar3 = iVar2 + -1;\n      FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    } while (iVar3 != -1);\n  }\n  local_40 = (int)uVar4;\n  local_40 = local_40 + -1;\n  uVar4 = (ulong)local_40;\n  while (0 < local_40) {\n    uVar1 = *(undefined8 *)(param_3 + 0x10);\n    uVar5 = uVar4 & 0xffffffff;\n    *(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8);\n    *(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1;\n    uVar4 = uVar4 - 1;\n    FUN_00330a00(param_1,param_2,param_3 + 0x10,0,uVar5);\n    local_40 = (int)uVar4;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00330ac0(undefined8 param_1,undefined8 param_2,long param_3)" identifier (parameter_list "(undefined8 param_1,undefined8 param_2,long param_3)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) , (parameter_declaration "long param_3" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  undefined8 uVar1;\n  int iVar2;\n  int iVar3;\n  ulong uVar4;\n  ulong uVar5;\n  undefined4 local_40;\n  \n  uVar4 = *(ulong *)(param_3 + 8);\n  iVar2 = (int)(uVar4 >> 1) + -1;\n  if (-1 < iVar2) {\n    do {\n      iVar3 = iVar2 + -1;\n      FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    } while (iVar3 != -1);\n  }\n  local_40 = (int)uVar4;\n  local_40 = local_40 + -1;\n  uVar4 = (ulong)local_40;\n  while (0 < local_40) {\n    uVar1 = *(undefined8 *)(param_3 + 0x10);\n    uVar5 = uVar4 & 0xffffffff;\n    *(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8);\n    *(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1;\n    uVar4 = uVar4 - 1;\n    FUN_00330a00(param_1,param_2,param_3 + 0x10,0,uVar5);\n    local_40 = (int)uVar4;\n  }\n  return;\n}" { (declaration "undefined8 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "ulong uVar5;" type_identifier identifier ;) (declaration "undefined4 local_40;" type_identifier identifier ;) (expression_statement "uVar4 = *(ulong *)(param_3 + 8);" (assignment_expression "uVar4 = *(ulong *)(param_3 + 8)" identifier = (pointer_expression "*(ulong *)(param_3 + 8)" * (cast_expression "(ulong *)(param_3 + 8)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 8)" ( (binary_expression "param_3 + 8" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = (int)(uVar4 >> 1) + -1;" (assignment_expression "iVar2 = (int)(uVar4 >> 1) + -1" identifier = (binary_expression "(int)(uVar4 >> 1) + -1" (cast_expression "(int)(uVar4 >> 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar4 >> 1)" ( (binary_expression "uVar4 >> 1" identifier >> number_literal) ))) + number_literal)) ;) (if_statement "if (-1 < iVar2) {\n    do {\n      iVar3 = iVar2 + -1;\n      FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    } while (iVar3 != -1);\n  }" if (parenthesized_expression "(-1 < iVar2)" ( (binary_expression "-1 < iVar2" number_literal < identifier) )) (compound_statement "{\n    do {\n      iVar3 = iVar2 + -1;\n      FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    } while (iVar3 != -1);\n  }" { (do_statement "do {\n      iVar3 = iVar2 + -1;\n      FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    } while (iVar3 != -1);" do (compound_statement "{\n      iVar3 = iVar2 + -1;\n      FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    }" { (expression_statement "iVar3 = iVar2 + -1;" (assignment_expression "iVar3 = iVar2 + -1" identifier = (binary_expression "iVar2 + -1" identifier + number_literal)) ;) (expression_statement "FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);" (call_expression "FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff)" identifier (argument_list "(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff)" ( identifier , identifier , (binary_expression "param_3 + 0x10" identifier + number_literal) , identifier , (binary_expression "uVar4 & 0xffffffff" identifier & number_literal) ))) ;) (expression_statement "iVar2 = iVar3;" (assignment_expression "iVar2 = iVar3" identifier = identifier) ;) }) while (parenthesized_expression "(iVar3 != -1)" ( (binary_expression "iVar3 != -1" identifier != number_literal) )) ;) })) (expression_statement "local_40 = (int)uVar4;" (assignment_expression "local_40 = (int)uVar4" identifier = (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "local_40 = local_40 + -1;" (assignment_expression "local_40 = local_40 + -1" identifier = (binary_expression "local_40 + -1" identifier + number_literal)) ;) (expression_statement "uVar4 = (ulong)local_40;" (assignment_expression "uVar4 = (ulong)local_40" identifier = (cast_expression "(ulong)local_40" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) (while_statement "while (0 < local_40) {\n    uVar1 = *(undefined8 *)(param_3 + 0x10);\n    uVar5 = uVar4 & 0xffffffff;\n    *(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8);\n    *(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1;\n    uVar4 = uVar4 - 1;\n    FUN_00330a00(param_1,param_2,param_3 + 0x10,0,uVar5);\n    local_40 = (int)uVar4;\n  }" while (parenthesized_expression "(0 < local_40)" ( (binary_expression "0 < local_40" number_literal < identifier) )) (compound_statement "{\n    uVar1 = *(undefined8 *)(param_3 + 0x10);\n    uVar5 = uVar4 & 0xffffffff;\n    *(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8);\n    *(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1;\n    uVar4 = uVar4 - 1;\n    FUN_00330a00(param_1,param_2,param_3 + 0x10,0,uVar5);\n    local_40 = (int)uVar4;\n  }" { (expression_statement "uVar1 = *(undefined8 *)(param_3 + 0x10);" (assignment_expression "uVar1 = *(undefined8 *)(param_3 + 0x10)" identifier = (pointer_expression "*(undefined8 *)(param_3 + 0x10)" * (cast_expression "(undefined8 *)(param_3 + 0x10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x10)" ( (binary_expression "param_3 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "uVar5 = uVar4 & 0xffffffff;" (assignment_expression "uVar5 = uVar4 & 0xffffffff" identifier = (binary_expression "uVar4 & 0xffffffff" identifier & number_literal)) ;) (expression_statement "*(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8);" (assignment_expression "*(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8)" (pointer_expression "*(undefined8 *)(param_3 + 0x10)" * (cast_expression "(undefined8 *)(param_3 + 0x10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x10)" ( (binary_expression "param_3 + 0x10" identifier + number_literal) )))) = (pointer_expression "*(undefined8 *)(param_3 + 0x10 + uVar4 * 8)" * (cast_expression "(undefined8 *)(param_3 + 0x10 + uVar4 * 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x10 + uVar4 * 8)" ( (binary_expression "param_3 + 0x10 + uVar4 * 8" (binary_expression "param_3 + 0x10" identifier + number_literal) + (binary_expression "uVar4 * 8" identifier * number_literal)) ))))) ;) (expression_statement "*(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1;" (assignment_expression "*(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1" (pointer_expression "*(undefined8 *)(param_3 + 0x10 + uVar4 * 8)" * (cast_expression "(undefined8 *)(param_3 + 0x10 + uVar4 * 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x10 + uVar4 * 8)" ( (binary_expression "param_3 + 0x10 + uVar4 * 8" (binary_expression "param_3 + 0x10" identifier + number_literal) + (binary_expression "uVar4 * 8" identifier * number_literal)) )))) = identifier) ;) (expression_statement "uVar4 = uVar4 - 1;" (assignment_expression "uVar4 = uVar4 - 1" identifier = (binary_expression "uVar4 - 1" identifier - number_literal)) ;) (expression_statement "FUN_00330a00(param_1,param_2,param_3 + 0x10,0,uVar5);" (call_expression "FUN_00330a00(param_1,param_2,param_3 + 0x10,0,uVar5)" identifier (argument_list "(param_1,param_2,param_3 + 0x10,0,uVar5)" ( identifier , identifier , (binary_expression "param_3 + 0x10" identifier + number_literal) , number_literal , identifier ))) ;) (expression_statement "local_40 = (int)uVar4;" (assignment_expression "local_40 = (int)uVar4" identifier = (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier)) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT >> LIT) ))) + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (binary_expression IDENT + LIT) , IDENT , (binary_expression IDENT & LIT) ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (while_statement while (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression IDENT * LIT)) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression IDENT * LIT)) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (binary_expression IDENT + LIT) , LIT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) })) (return_statement return ;) })))
(function_definition "void FUN_00330ac0(undefined8 param_1,undefined8 param_2,long param_3)\n\n{\n  undefined8 uVar1;\n  int iVar2;\n  int iVar3;\n  ulong uVar4;\n  ulong uVar5;\n  undefined4 local_40;\n  \n  uVar4 = *(ulong *)(param_3 + 8);\n  iVar2 = (int)(uVar4 >> 1) + -1;\n  if (-1 < iVar2) {\n    do {\n      iVar3 = iVar2 + -1;\n      FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    } while (iVar3 != -1);\n  }\n  local_40 = (int)uVar4;\n  local_40 = local_40 + -1;\n  uVar4 = (ulong)local_40;\n  while (0 < local_40) {\n    uVar1 = *(undefined8 *)(param_3 + 0x10);\n    uVar5 = uVar4 & 0xffffffff;\n    *(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8);\n    *(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1;\n    uVar4 = uVar4 - 1;\n    FUN_00330a00(param_1,param_2,param_3 + 0x10,0,uVar5);\n    local_40 = (int)uVar4;\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00330ac0(undefined8 param_1,undefined8 param_2,long param_3)" (identifier "FUN_00330ac0") (parameter_list "(undefined8 param_1,undefined8 param_2,long param_3)" (( "(") (parameter_declaration "undefined8 param_1" (type_identifier "undefined8") (identifier "param_1")) (, ",") (parameter_declaration "undefined8 param_2" (type_identifier "undefined8") (identifier "param_2")) (, ",") (parameter_declaration "long param_3" (sized_type_specifier "long" (long "long")) (identifier "param_3")) () ")"))) (compound_statement "{\n  undefined8 uVar1;\n  int iVar2;\n  int iVar3;\n  ulong uVar4;\n  ulong uVar5;\n  undefined4 local_40;\n  \n  uVar4 = *(ulong *)(param_3 + 8);\n  iVar2 = (int)(uVar4 >> 1) + -1;\n  if (-1 < iVar2) {\n    do {\n      iVar3 = iVar2 + -1;\n      FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    } while (iVar3 != -1);\n  }\n  local_40 = (int)uVar4;\n  local_40 = local_40 + -1;\n  uVar4 = (ulong)local_40;\n  while (0 < local_40) {\n    uVar1 = *(undefined8 *)(param_3 + 0x10);\n    uVar5 = uVar4 & 0xffffffff;\n    *(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8);\n    *(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1;\n    uVar4 = uVar4 - 1;\n    FUN_00330a00(param_1,param_2,param_3 + 0x10,0,uVar5);\n    local_40 = (int)uVar4;\n  }\n  return;\n}" ({ "{") (declaration "undefined8 uVar1;" (type_identifier "undefined8") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "ulong uVar4;" (type_identifier "ulong") (identifier "uVar4") (; ";")) (declaration "ulong uVar5;" (type_identifier "ulong") (identifier "uVar5") (; ";")) (declaration "undefined4 local_40;" (type_identifier "undefined4") (identifier "local_40") (; ";")) (expression_statement "uVar4 = *(ulong *)(param_3 + 8);" (assignment_expression "uVar4 = *(ulong *)(param_3 + 8)" (identifier "uVar4") (= "=") (pointer_expression "*(ulong *)(param_3 + 8)" (* "*") (cast_expression "(ulong *)(param_3 + 8)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 8)" (( "(") (binary_expression "param_3 + 8" (identifier "param_3") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (expression_statement "iVar2 = (int)(uVar4 >> 1) + -1;" (assignment_expression "iVar2 = (int)(uVar4 >> 1) + -1" (identifier "iVar2") (= "=") (binary_expression "(int)(uVar4 >> 1) + -1" (cast_expression "(int)(uVar4 >> 1)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(uVar4 >> 1)" (( "(") (binary_expression "uVar4 >> 1" (identifier "uVar4") (>> ">>") (number_literal "1")) () ")"))) (+ "+") (number_literal "-1"))) (; ";")) (if_statement "if (-1 < iVar2) {\n    do {\n      iVar3 = iVar2 + -1;\n      FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    } while (iVar3 != -1);\n  }" (if "if") (parenthesized_expression "(-1 < iVar2)" (( "(") (binary_expression "-1 < iVar2" (number_literal "-1") (< "<") (identifier "iVar2")) () ")")) (compound_statement "{\n    do {\n      iVar3 = iVar2 + -1;\n      FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    } while (iVar3 != -1);\n  }" ({ "{") (do_statement "do {\n      iVar3 = iVar2 + -1;\n      FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    } while (iVar3 != -1);" (do "do") (compound_statement "{\n      iVar3 = iVar2 + -1;\n      FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);\n      iVar2 = iVar3;\n    }" ({ "{") (expression_statement "iVar3 = iVar2 + -1;" (assignment_expression "iVar3 = iVar2 + -1" (identifier "iVar3") (= "=") (binary_expression "iVar2 + -1" (identifier "iVar2") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);" (call_expression "FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff)" (identifier "FUN_00330a00") (argument_list "(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (binary_expression "param_3 + 0x10" (identifier "param_3") (+ "+") (number_literal "0x10")) (, ",") (identifier "iVar2") (, ",") (binary_expression "uVar4 & 0xffffffff" (identifier "uVar4") (& "&") (number_literal "0xffffffff")) () ")"))) (; ";")) (expression_statement "iVar2 = iVar3;" (assignment_expression "iVar2 = iVar3" (identifier "iVar2") (= "=") (identifier "iVar3")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar3 != -1)" (( "(") (binary_expression "iVar3 != -1" (identifier "iVar3") (!= "!=") (number_literal "-1")) () ")")) (; ";")) (} "}"))) (expression_statement "local_40 = (int)uVar4;" (assignment_expression "local_40 = (int)uVar4" (identifier "local_40") (= "=") (cast_expression "(int)uVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar4"))) (; ";")) (expression_statement "local_40 = local_40 + -1;" (assignment_expression "local_40 = local_40 + -1" (identifier "local_40") (= "=") (binary_expression "local_40 + -1" (identifier "local_40") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "uVar4 = (ulong)local_40;" (assignment_expression "uVar4 = (ulong)local_40" (identifier "uVar4") (= "=") (cast_expression "(ulong)local_40" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "local_40"))) (; ";")) (while_statement "while (0 < local_40) {\n    uVar1 = *(undefined8 *)(param_3 + 0x10);\n    uVar5 = uVar4 & 0xffffffff;\n    *(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8);\n    *(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1;\n    uVar4 = uVar4 - 1;\n    FUN_00330a00(param_1,param_2,param_3 + 0x10,0,uVar5);\n    local_40 = (int)uVar4;\n  }" (while "while") (parenthesized_expression "(0 < local_40)" (( "(") (binary_expression "0 < local_40" (number_literal "0") (< "<") (identifier "local_40")) () ")")) (compound_statement "{\n    uVar1 = *(undefined8 *)(param_3 + 0x10);\n    uVar5 = uVar4 & 0xffffffff;\n    *(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8);\n    *(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1;\n    uVar4 = uVar4 - 1;\n    FUN_00330a00(param_1,param_2,param_3 + 0x10,0,uVar5);\n    local_40 = (int)uVar4;\n  }" ({ "{") (expression_statement "uVar1 = *(undefined8 *)(param_3 + 0x10);" (assignment_expression "uVar1 = *(undefined8 *)(param_3 + 0x10)" (identifier "uVar1") (= "=") (pointer_expression "*(undefined8 *)(param_3 + 0x10)" (* "*") (cast_expression "(undefined8 *)(param_3 + 0x10)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0x10)" (( "(") (binary_expression "param_3 + 0x10" (identifier "param_3") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (expression_statement "uVar5 = uVar4 & 0xffffffff;" (assignment_expression "uVar5 = uVar4 & 0xffffffff" (identifier "uVar5") (= "=") (binary_expression "uVar4 & 0xffffffff" (identifier "uVar4") (& "&") (number_literal "0xffffffff"))) (; ";")) (expression_statement "*(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8);" (assignment_expression "*(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8)" (pointer_expression "*(undefined8 *)(param_3 + 0x10)" (* "*") (cast_expression "(undefined8 *)(param_3 + 0x10)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0x10)" (( "(") (binary_expression "param_3 + 0x10" (identifier "param_3") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (pointer_expression "*(undefined8 *)(param_3 + 0x10 + uVar4 * 8)" (* "*") (cast_expression "(undefined8 *)(param_3 + 0x10 + uVar4 * 8)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0x10 + uVar4 * 8)" (( "(") (binary_expression "param_3 + 0x10 + uVar4 * 8" (binary_expression "param_3 + 0x10" (identifier "param_3") (+ "+") (number_literal "0x10")) (+ "+") (binary_expression "uVar4 * 8" (identifier "uVar4") (* "*") (number_literal "8"))) () ")"))))) (; ";")) (expression_statement "*(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1;" (assignment_expression "*(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1" (pointer_expression "*(undefined8 *)(param_3 + 0x10 + uVar4 * 8)" (* "*") (cast_expression "(undefined8 *)(param_3 + 0x10 + uVar4 * 8)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0x10 + uVar4 * 8)" (( "(") (binary_expression "param_3 + 0x10 + uVar4 * 8" (binary_expression "param_3 + 0x10" (identifier "param_3") (+ "+") (number_literal "0x10")) (+ "+") (binary_expression "uVar4 * 8" (identifier "uVar4") (* "*") (number_literal "8"))) () ")")))) (= "=") (identifier "uVar1")) (; ";")) (expression_statement "uVar4 = uVar4 - 1;" (assignment_expression "uVar4 = uVar4 - 1" (identifier "uVar4") (= "=") (binary_expression "uVar4 - 1" (identifier "uVar4") (- "-") (number_literal "1"))) (; ";")) (expression_statement "FUN_00330a00(param_1,param_2,param_3 + 0x10,0,uVar5);" (call_expression "FUN_00330a00(param_1,param_2,param_3 + 0x10,0,uVar5)" (identifier "FUN_00330a00") (argument_list "(param_1,param_2,param_3 + 0x10,0,uVar5)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (binary_expression "param_3 + 0x10" (identifier "param_3") (+ "+") (number_literal "0x10")) (, ",") (number_literal "0") (, ",") (identifier "uVar5") () ")"))) (; ";")) (expression_statement "local_40 = (int)uVar4;" (assignment_expression "local_40 = (int)uVar4" (identifier "local_40") (= "=") (cast_expression "(int)uVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar4"))) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(type_1 param_1,type_1 param_2,long var_1)

{
  type_1 uVar1;
  int var_3;
  int var_5;
  type_2 var_2;
  type_2 uVar5;
  type_3 var_6;
  
  var_2 = *(type_2 *)(var_1 + 8);
  var_3 = (int)(var_2 >> 1) + -1;
  if (-1 < var_3) {
    do {
      var_5 = var_3 + -1;
      var_4(param_1,param_2,var_1 + 0x10,var_3,var_2 & 0xffffffff);
      var_3 = var_5;
    } while (var_5 != -1);
  }
  var_6 = (int)var_2;
  var_6 = var_6 + -1;
  var_2 = (type_2)var_6;
  while (0 < var_6) {
    uVar1 = *(type_1 *)(var_1 + 0x10);
    uVar5 = var_2 & 0xffffffff;
    *(type_1 *)(var_1 + 0x10) = *(type_1 *)(var_1 + 0x10 + var_2 * 8);
    *(type_1 *)(var_1 + 0x10 + var_2 * 8) = uVar1;
    var_2 = var_2 - 1;
    var_4(param_1,param_2,var_1 + 0x10,0,uVar5);
    var_6 = (int)var_2;
  }
  return;
}


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

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

{
  undefined8 uVar1;
  int iVar2;
  int iVar3;
  ulong uVar4;
  ulong uVar5;
  undefined4 local_40;
  
  uVar4 = *(ulong *)(param_3 + 8);
  iVar2 = (int)(uVar4 >> 1) + -1;
  if (-1 < iVar2) {
    do {
      iVar3 = iVar2 + -1;
      FUN_00330a00(param_1,param_2,param_3 + 0x10,iVar2,uVar4 & 0xffffffff);
      iVar2 = iVar3;
    } while (iVar3 != -1);
  }
  local_40 = (int)uVar4;
  local_40 = local_40 + -1;
  uVar4 = (ulong)local_40;
  while (0 < local_40) {
    uVar1 = *(undefined8 *)(param_3 + 0x10);
    uVar5 = uVar4 & 0xffffffff;
    *(undefined8 *)(param_3 + 0x10) = *(undefined8 *)(param_3 + 0x10 + uVar4 * 8);
    *(undefined8 *)(param_3 + 0x10 + uVar4 * 8) = uVar1;
    uVar4 = uVar4 - 1;
    FUN_00330a00(param_1,param_2,param_3 + 0x10,0,uVar5);
    local_40 = (int)uVar4;
  }
  return;
}

