
FTSENT * fts_sort(FTS *sp,FTSENT *head,size_t nitems)

{
  _ftsent **pp_Var1;
  FTSENT *pFVar2;
  FTSENT *pFVar3;
  _ftsent **pp_Var4;
  int iVar5;
  uint uVar6;
  _ftsent *p_Var7;
  _ftsent **pp_Var8;
  
  pp_Var4 = sp->fts_array;
  if (nitems <= sp->fts_nitems) {
LAB_00038c00:
    pp_Var8 = pp_Var4;
    if (head != (FTSENT *)0x0) {
      do {
        *pp_Var8 = head;
        head = head->fts_link;
        pp_Var8 = pp_Var8 + 1;
      } while (head != (_ftsent *)0x0);
    }
    (*(code *)PTR_qsort_00056380)(pp_Var4,nitems,4);
    iVar5 = nitems - 1;
    pp_Var8 = sp->fts_array;
    pFVar2 = *pp_Var8;
    pFVar3 = pFVar2;
    pp_Var4 = pp_Var8;
    if (iVar5 != 0) {
      do {
        p_Var7 = *pp_Var4;
        iVar5 = iVar5 + -1;
        pp_Var1 = pp_Var4 + 1;
        pp_Var4 = pp_Var4 + 1;
        p_Var7->fts_link = *pp_Var1;
      } while (iVar5 != 0);
      pFVar3 = pp_Var8[nitems - 1];
    }
    pFVar3->fts_link = (_ftsent *)0x0;
    return pFVar2;
  }
  uVar6 = nitems + 0x28;
  sp->fts_nitems = uVar6;
  if (uVar6 < 0x40000000) {
    pp_Var4 = (_ftsent **)(*(code *)PTR_realloc_00056448)(pp_Var4,uVar6 * 4);
    if (pp_Var4 != (_ftsent **)0x0) {
      sp->fts_array = pp_Var4;
      goto LAB_00038c00;
    }
    pp_Var4 = sp->fts_array;
  }
  (*(code *)PTR_free_000564c0)(pp_Var4);
  sp->fts_array = (_ftsent **)0x0;
  sp->fts_nitems = 0;
  return head;
}



int FUN_00038b84(int param_1,int param_2,uint param_3)

{
  int *piVar1;
  int iVar2;
  int *piVar3;
  int iVar4;
  uint uVar5;
  int iVar6;
  int *piVar7;
  
  piVar3 = *(int **)(param_1 + 8);
  if (param_3 <= *(uint *)(param_1 + 0x28)) {
LAB_00038c00:
    piVar7 = piVar3;
    if (param_2 != 0) {
      do {
        *piVar7 = param_2;
        param_2 = *(int *)(param_2 + 8);
        piVar7 = piVar7 + 1;
      } while (param_2 != 0);
    }
    (*(code *)PTR_qsort_00056380)(piVar3,param_3,4);
    iVar4 = param_3 - 1;
    piVar7 = *(int **)(param_1 + 8);
    iVar2 = *piVar7;
    iVar6 = iVar2;
    piVar3 = piVar7;
    if (iVar4 != 0) {
      do {
        iVar6 = *piVar3;
        iVar4 = iVar4 + -1;
        piVar1 = piVar3 + 1;
        piVar3 = piVar3 + 1;
        *(int *)(iVar6 + 8) = *piVar1;
      } while (iVar4 != 0);
      iVar6 = piVar7[param_3 - 1];
    }
    *(undefined4 *)(iVar6 + 8) = 0;
    return iVar2;
  }
  uVar5 = param_3 + 0x28;
  *(uint *)(param_1 + 0x28) = uVar5;
  if (uVar5 < 0x40000000) {
    piVar3 = (int *)(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4);
    if (piVar3 != (int *)0x0) {
      *(int **)(param_1 + 8) = piVar3;
      goto LAB_00038c00;
    }
    piVar3 = *(int **)(param_1 + 8);
  }
  (*(code *)PTR_free_000564c0)(piVar3);
  *(undefined4 *)(param_1 + 8) = 0;
  *(undefined4 *)(param_1 + 0x28) = 0;
  return param_2;
}


lui gp,0x2
addiu gp,gp,0x555c
addu gp,gp,t9
addiu sp,sp,-0x30
lw v0,0x28(a0)
lw a3,0x2c(a0)
sw gp,0x10(sp)
sltu v0,v0,a2
sw s2,0x28(sp)
or s2,a0,zero
sw s1,0x24(sp)
or s1,a2,zero
sw s0,0x20(sp)
or s0,a1,zero
sw ra,0x2c(sp)
beq v0,zero,0x00038c00
_lw a0,0x8(a0)
addiu a1,a2,0x28
sw a3,0x1c(sp)
lui v0,0x4000
sltu v0,a1,v0
beq v0,zero,0x00038c84
_sw a1,0x28(s2)
lw t9,-0x7c98(gp)
jalr t9
_sll a1,a1,0x2
lw gp,0x10(sp)
or a0,v0,zero
beq v0,zero,0x00038c80
_lw a3,0x1c(sp)
sw v0,0x8(s2)
beq s0,zero,0x00038c1c
_or v1,a0,zero
addiu v1,v1,0x4
sw s0,-0x4(v1)
lw s0,0x8(s0)
bne s0,zero,0x00038c0c
_addiu v1,v1,0x4
lw t9,-0x7d60(gp)
li a2,0x4
jalr t9
_or a1,s1,zero
addiu a0,s1,-0x1
lw a3,0x8(s2)
or v1,a3,zero
beq a0,zero,0x00038cb4
_lw v0,0x0(a3)
lw a1,0x0(v1)
addiu a0,a0,-0x1
lw a2,0x4(v1)
addiu v1,v1,0x4
bne a0,zero,0x00038c40
_sw a2,0x8(a1)
sll s1,s1,0x2
addu s1,a3,s1
lw v1,-0x4(s1)
lw ra,0x2c(sp)
lw s2,0x28(sp)
lw s1,0x24(sp)
lw s0,0x20(sp)
sw zero,0x8(v1)
jr ra
_addiu sp,sp,0x30
lw a0,0x8(s2)
lw t9,-0x7c20(gp)
jalr t9
_nop
or v0,s0,zero
lw ra,0x2c(sp)
lw s1,0x24(sp)
lw s0,0x20(sp)
sw zero,0x8(s2)
sw zero,0x28(s2)
lw s2,0x28(sp)
jr ra
_addiu sp,sp,0x30
b 0x00038c64
_or v1,v0,zero
(translation_unit "int FUN_00038b84(int param_1,int param_2,uint param_3)\n\n{\n  int *piVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  int *piVar7;\n  \n  piVar3 = *(int **)(param_1 + 8);\n  if (param_3 <= *(uint *)(param_1 + 0x28)) {\nLAB_00038c00:\n    piVar7 = piVar3;\n    if (param_2 != 0) {\n      do {\n        *piVar7 = param_2;\n        param_2 = *(int *)(param_2 + 8);\n        piVar7 = piVar7 + 1;\n      } while (param_2 != 0);\n    }\n    (*(code *)PTR_qsort_00056380)(piVar3,param_3,4);\n    iVar4 = param_3 - 1;\n    piVar7 = *(int **)(param_1 + 8);\n    iVar2 = *piVar7;\n    iVar6 = iVar2;\n    piVar3 = piVar7;\n    if (iVar4 != 0) {\n      do {\n        iVar6 = *piVar3;\n        iVar4 = iVar4 + -1;\n        piVar1 = piVar3 + 1;\n        piVar3 = piVar3 + 1;\n        *(int *)(iVar6 + 8) = *piVar1;\n      } while (iVar4 != 0);\n      iVar6 = piVar7[param_3 - 1];\n    }\n    *(undefined4 *)(iVar6 + 8) = 0;\n    return iVar2;\n  }\n  uVar5 = param_3 + 0x28;\n  *(uint *)(param_1 + 0x28) = uVar5;\n  if (uVar5 < 0x40000000) {\n    piVar3 = (int *)(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4);\n    if (piVar3 != (int *)0x0) {\n      *(int **)(param_1 + 8) = piVar3;\n      goto LAB_00038c00;\n    }\n    piVar3 = *(int **)(param_1 + 8);\n  }\n  (*(code *)PTR_free_000564c0)(piVar3);\n  *(undefined4 *)(param_1 + 8) = 0;\n  *(undefined4 *)(param_1 + 0x28) = 0;\n  return param_2;\n}\n\n" (function_definition "int FUN_00038b84(int param_1,int param_2,uint param_3)\n\n{\n  int *piVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  int *piVar7;\n  \n  piVar3 = *(int **)(param_1 + 8);\n  if (param_3 <= *(uint *)(param_1 + 0x28)) {\nLAB_00038c00:\n    piVar7 = piVar3;\n    if (param_2 != 0) {\n      do {\n        *piVar7 = param_2;\n        param_2 = *(int *)(param_2 + 8);\n        piVar7 = piVar7 + 1;\n      } while (param_2 != 0);\n    }\n    (*(code *)PTR_qsort_00056380)(piVar3,param_3,4);\n    iVar4 = param_3 - 1;\n    piVar7 = *(int **)(param_1 + 8);\n    iVar2 = *piVar7;\n    iVar6 = iVar2;\n    piVar3 = piVar7;\n    if (iVar4 != 0) {\n      do {\n        iVar6 = *piVar3;\n        iVar4 = iVar4 + -1;\n        piVar1 = piVar3 + 1;\n        piVar3 = piVar3 + 1;\n        *(int *)(iVar6 + 8) = *piVar1;\n      } while (iVar4 != 0);\n      iVar6 = piVar7[param_3 - 1];\n    }\n    *(undefined4 *)(iVar6 + 8) = 0;\n    return iVar2;\n  }\n  uVar5 = param_3 + 0x28;\n  *(uint *)(param_1 + 0x28) = uVar5;\n  if (uVar5 < 0x40000000) {\n    piVar3 = (int *)(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4);\n    if (piVar3 != (int *)0x0) {\n      *(int **)(param_1 + 8) = piVar3;\n      goto LAB_00038c00;\n    }\n    piVar3 = *(int **)(param_1 + 8);\n  }\n  (*(code *)PTR_free_000564c0)(piVar3);\n  *(undefined4 *)(param_1 + 8) = 0;\n  *(undefined4 *)(param_1 + 0x28) = 0;\n  return param_2;\n}" primitive_type (function_declarator "FUN_00038b84(int param_1,int param_2,uint param_3)" identifier (parameter_list "(int param_1,int param_2,uint param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  int *piVar7;\n  \n  piVar3 = *(int **)(param_1 + 8);\n  if (param_3 <= *(uint *)(param_1 + 0x28)) {\nLAB_00038c00:\n    piVar7 = piVar3;\n    if (param_2 != 0) {\n      do {\n        *piVar7 = param_2;\n        param_2 = *(int *)(param_2 + 8);\n        piVar7 = piVar7 + 1;\n      } while (param_2 != 0);\n    }\n    (*(code *)PTR_qsort_00056380)(piVar3,param_3,4);\n    iVar4 = param_3 - 1;\n    piVar7 = *(int **)(param_1 + 8);\n    iVar2 = *piVar7;\n    iVar6 = iVar2;\n    piVar3 = piVar7;\n    if (iVar4 != 0) {\n      do {\n        iVar6 = *piVar3;\n        iVar4 = iVar4 + -1;\n        piVar1 = piVar3 + 1;\n        piVar3 = piVar3 + 1;\n        *(int *)(iVar6 + 8) = *piVar1;\n      } while (iVar4 != 0);\n      iVar6 = piVar7[param_3 - 1];\n    }\n    *(undefined4 *)(iVar6 + 8) = 0;\n    return iVar2;\n  }\n  uVar5 = param_3 + 0x28;\n  *(uint *)(param_1 + 0x28) = uVar5;\n  if (uVar5 < 0x40000000) {\n    piVar3 = (int *)(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4);\n    if (piVar3 != (int *)0x0) {\n      *(int **)(param_1 + 8) = piVar3;\n      goto LAB_00038c00;\n    }\n    piVar3 = *(int **)(param_1 + 8);\n  }\n  (*(code *)PTR_free_000564c0)(piVar3);\n  *(undefined4 *)(param_1 + 8) = 0;\n  *(undefined4 *)(param_1 + 0x28) = 0;\n  return param_2;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int *piVar7;" primitive_type (pointer_declarator "*piVar7" * identifier) ;) (expression_statement "piVar3 = *(int **)(param_1 + 8);" (assignment_expression "piVar3 = *(int **)(param_1 + 8)" identifier = (pointer_expression "*(int **)(param_1 + 8)" * (cast_expression "(int **)(param_1 + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (if_statement "if (param_3 <= *(uint *)(param_1 + 0x28)) {\nLAB_00038c00:\n    piVar7 = piVar3;\n    if (param_2 != 0) {\n      do {\n        *piVar7 = param_2;\n        param_2 = *(int *)(param_2 + 8);\n        piVar7 = piVar7 + 1;\n      } while (param_2 != 0);\n    }\n    (*(code *)PTR_qsort_00056380)(piVar3,param_3,4);\n    iVar4 = param_3 - 1;\n    piVar7 = *(int **)(param_1 + 8);\n    iVar2 = *piVar7;\n    iVar6 = iVar2;\n    piVar3 = piVar7;\n    if (iVar4 != 0) {\n      do {\n        iVar6 = *piVar3;\n        iVar4 = iVar4 + -1;\n        piVar1 = piVar3 + 1;\n        piVar3 = piVar3 + 1;\n        *(int *)(iVar6 + 8) = *piVar1;\n      } while (iVar4 != 0);\n      iVar6 = piVar7[param_3 - 1];\n    }\n    *(undefined4 *)(iVar6 + 8) = 0;\n    return iVar2;\n  }" if (parenthesized_expression "(param_3 <= *(uint *)(param_1 + 0x28))" ( (binary_expression "param_3 <= *(uint *)(param_1 + 0x28)" identifier <= (pointer_expression "*(uint *)(param_1 + 0x28)" * (cast_expression "(uint *)(param_1 + 0x28)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\nLAB_00038c00:\n    piVar7 = piVar3;\n    if (param_2 != 0) {\n      do {\n        *piVar7 = param_2;\n        param_2 = *(int *)(param_2 + 8);\n        piVar7 = piVar7 + 1;\n      } while (param_2 != 0);\n    }\n    (*(code *)PTR_qsort_00056380)(piVar3,param_3,4);\n    iVar4 = param_3 - 1;\n    piVar7 = *(int **)(param_1 + 8);\n    iVar2 = *piVar7;\n    iVar6 = iVar2;\n    piVar3 = piVar7;\n    if (iVar4 != 0) {\n      do {\n        iVar6 = *piVar3;\n        iVar4 = iVar4 + -1;\n        piVar1 = piVar3 + 1;\n        piVar3 = piVar3 + 1;\n        *(int *)(iVar6 + 8) = *piVar1;\n      } while (iVar4 != 0);\n      iVar6 = piVar7[param_3 - 1];\n    }\n    *(undefined4 *)(iVar6 + 8) = 0;\n    return iVar2;\n  }" { (labeled_statement "LAB_00038c00:\n    piVar7 = piVar3;" statement_identifier : (expression_statement "piVar7 = piVar3;" (assignment_expression "piVar7 = piVar3" identifier = identifier) ;)) (if_statement "if (param_2 != 0) {\n      do {\n        *piVar7 = param_2;\n        param_2 = *(int *)(param_2 + 8);\n        piVar7 = piVar7 + 1;\n      } while (param_2 != 0);\n    }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n      do {\n        *piVar7 = param_2;\n        param_2 = *(int *)(param_2 + 8);\n        piVar7 = piVar7 + 1;\n      } while (param_2 != 0);\n    }" { (do_statement "do {\n        *piVar7 = param_2;\n        param_2 = *(int *)(param_2 + 8);\n        piVar7 = piVar7 + 1;\n      } while (param_2 != 0);" do (compound_statement "{\n        *piVar7 = param_2;\n        param_2 = *(int *)(param_2 + 8);\n        piVar7 = piVar7 + 1;\n      }" { (expression_statement "*piVar7 = param_2;" (assignment_expression "*piVar7 = param_2" (pointer_expression "*piVar7" * identifier) = identifier) ;) (expression_statement "param_2 = *(int *)(param_2 + 8);" (assignment_expression "param_2 = *(int *)(param_2 + 8)" identifier = (pointer_expression "*(int *)(param_2 + 8)" * (cast_expression "(int *)(param_2 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) ))))) ;) (expression_statement "piVar7 = piVar7 + 1;" (assignment_expression "piVar7 = piVar7 + 1" identifier = (binary_expression "piVar7 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) ;) })) (expression_statement "(*(code *)PTR_qsort_00056380)(piVar3,param_3,4);" (call_expression "(*(code *)PTR_qsort_00056380)(piVar3,param_3,4)" (parenthesized_expression "(*(code *)PTR_qsort_00056380)" ( (pointer_expression "*(code *)PTR_qsort_00056380" * (cast_expression "(code *)PTR_qsort_00056380" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar3,param_3,4)" ( identifier , identifier , number_literal ))) ;) (expression_statement "iVar4 = param_3 - 1;" (assignment_expression "iVar4 = param_3 - 1" identifier = (binary_expression "param_3 - 1" identifier - number_literal)) ;) (expression_statement "piVar7 = *(int **)(param_1 + 8);" (assignment_expression "piVar7 = *(int **)(param_1 + 8)" identifier = (pointer_expression "*(int **)(param_1 + 8)" * (cast_expression "(int **)(param_1 + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = *piVar7;" (assignment_expression "iVar2 = *piVar7" identifier = (pointer_expression "*piVar7" * identifier)) ;) (expression_statement "iVar6 = iVar2;" (assignment_expression "iVar6 = iVar2" identifier = identifier) ;) (expression_statement "piVar3 = piVar7;" (assignment_expression "piVar3 = piVar7" identifier = identifier) ;) (if_statement "if (iVar4 != 0) {\n      do {\n        iVar6 = *piVar3;\n        iVar4 = iVar4 + -1;\n        piVar1 = piVar3 + 1;\n        piVar3 = piVar3 + 1;\n        *(int *)(iVar6 + 8) = *piVar1;\n      } while (iVar4 != 0);\n      iVar6 = piVar7[param_3 - 1];\n    }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n      do {\n        iVar6 = *piVar3;\n        iVar4 = iVar4 + -1;\n        piVar1 = piVar3 + 1;\n        piVar3 = piVar3 + 1;\n        *(int *)(iVar6 + 8) = *piVar1;\n      } while (iVar4 != 0);\n      iVar6 = piVar7[param_3 - 1];\n    }" { (do_statement "do {\n        iVar6 = *piVar3;\n        iVar4 = iVar4 + -1;\n        piVar1 = piVar3 + 1;\n        piVar3 = piVar3 + 1;\n        *(int *)(iVar6 + 8) = *piVar1;\n      } while (iVar4 != 0);" do (compound_statement "{\n        iVar6 = *piVar3;\n        iVar4 = iVar4 + -1;\n        piVar1 = piVar3 + 1;\n        piVar3 = piVar3 + 1;\n        *(int *)(iVar6 + 8) = *piVar1;\n      }" { (expression_statement "iVar6 = *piVar3;" (assignment_expression "iVar6 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) (expression_statement "piVar1 = piVar3 + 1;" (assignment_expression "piVar1 = piVar3 + 1" identifier = (binary_expression "piVar3 + 1" identifier + number_literal)) ;) (expression_statement "piVar3 = piVar3 + 1;" (assignment_expression "piVar3 = piVar3 + 1" identifier = (binary_expression "piVar3 + 1" identifier + number_literal)) ;) (expression_statement "*(int *)(iVar6 + 8) = *piVar1;" (assignment_expression "*(int *)(iVar6 + 8) = *piVar1" (pointer_expression "*(int *)(iVar6 + 8)" * (cast_expression "(int *)(iVar6 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 8)" ( (binary_expression "iVar6 + 8" identifier + number_literal) )))) = (pointer_expression "*piVar1" * identifier)) ;) }) while (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) ;) (expression_statement "iVar6 = piVar7[param_3 - 1];" (assignment_expression "iVar6 = piVar7[param_3 - 1]" identifier = (subscript_expression "piVar7[param_3 - 1]" identifier [ (binary_expression "param_3 - 1" identifier - number_literal) ])) ;) })) (expression_statement "*(undefined4 *)(iVar6 + 8) = 0;" (assignment_expression "*(undefined4 *)(iVar6 + 8) = 0" (pointer_expression "*(undefined4 *)(iVar6 + 8)" * (cast_expression "(undefined4 *)(iVar6 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 8)" ( (binary_expression "iVar6 + 8" identifier + number_literal) )))) = number_literal) ;) (return_statement "return iVar2;" return identifier ;) })) (expression_statement "uVar5 = param_3 + 0x28;" (assignment_expression "uVar5 = param_3 + 0x28" identifier = (binary_expression "param_3 + 0x28" identifier + number_literal)) ;) (expression_statement "*(uint *)(param_1 + 0x28) = uVar5;" (assignment_expression "*(uint *)(param_1 + 0x28) = uVar5" (pointer_expression "*(uint *)(param_1 + 0x28)" * (cast_expression "(uint *)(param_1 + 0x28)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) = identifier) ;) (if_statement "if (uVar5 < 0x40000000) {\n    piVar3 = (int *)(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4);\n    if (piVar3 != (int *)0x0) {\n      *(int **)(param_1 + 8) = piVar3;\n      goto LAB_00038c00;\n    }\n    piVar3 = *(int **)(param_1 + 8);\n  }" if (parenthesized_expression "(uVar5 < 0x40000000)" ( (binary_expression "uVar5 < 0x40000000" identifier < number_literal) )) (compound_statement "{\n    piVar3 = (int *)(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4);\n    if (piVar3 != (int *)0x0) {\n      *(int **)(param_1 + 8) = piVar3;\n      goto LAB_00038c00;\n    }\n    piVar3 = *(int **)(param_1 + 8);\n  }" { (expression_statement "piVar3 = (int *)(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4);" (assignment_expression "piVar3 = (int *)(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4)" identifier = (cast_expression "(int *)(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4)" (parenthesized_expression "(*(code *)PTR_realloc_00056448)" ( (pointer_expression "*(code *)PTR_realloc_00056448" * (cast_expression "(code *)PTR_realloc_00056448" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar3,uVar5 * 4)" ( identifier , (binary_expression "uVar5 * 4" identifier * number_literal) ))))) ;) (if_statement "if (piVar3 != (int *)0x0) {\n      *(int **)(param_1 + 8) = piVar3;\n      goto LAB_00038c00;\n    }" if (parenthesized_expression "(piVar3 != (int *)0x0)" ( (binary_expression "piVar3 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *(int **)(param_1 + 8) = piVar3;\n      goto LAB_00038c00;\n    }" { (expression_statement "*(int **)(param_1 + 8) = piVar3;" (assignment_expression "*(int **)(param_1 + 8) = piVar3" (pointer_expression "*(int **)(param_1 + 8)" * (cast_expression "(int **)(param_1 + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = identifier) ;) (goto_statement "goto LAB_00038c00;" goto statement_identifier ;) })) (expression_statement "piVar3 = *(int **)(param_1 + 8);" (assignment_expression "piVar3 = *(int **)(param_1 + 8)" identifier = (pointer_expression "*(int **)(param_1 + 8)" * (cast_expression "(int **)(param_1 + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) })) (expression_statement "(*(code *)PTR_free_000564c0)(piVar3);" (call_expression "(*(code *)PTR_free_000564c0)(piVar3)" (parenthesized_expression "(*(code *)PTR_free_000564c0)" ( (pointer_expression "*(code *)PTR_free_000564c0" * (cast_expression "(code *)PTR_free_000564c0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar3)" ( identifier ))) ;) (expression_statement "*(undefined4 *)(param_1 + 8) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 8) = 0" (pointer_expression "*(undefined4 *)(param_1 + 8)" * (cast_expression "(undefined4 *)(param_1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x28) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x28) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x28)" * (cast_expression "(undefined4 *)(param_1 + 0x28)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) = number_literal) ;) (return_statement "return param_2;" return identifier ;) })))
(translation_unit "FTSENT * fts_sort(FTS *sp,FTSENT *head,size_t nitems)\n\n{\n  _ftsent **pp_Var1;\n  FTSENT *pFVar2;\n  FTSENT *pFVar3;\n  _ftsent **pp_Var4;\n  int iVar5;\n  uint uVar6;\n  _ftsent *p_Var7;\n  _ftsent **pp_Var8;\n  \n  pp_Var4 = sp->fts_array;\n  if (nitems <= sp->fts_nitems) {\nLAB_00038c00:\n    pp_Var8 = pp_Var4;\n    if (head != (FTSENT *)0x0) {\n      do {\n        *pp_Var8 = head;\n        head = head->fts_link;\n        pp_Var8 = pp_Var8 + 1;\n      } while (head != (_ftsent *)0x0);\n    }\n    (*(code *)PTR_qsort_00056380)(pp_Var4,nitems,4);\n    iVar5 = nitems - 1;\n    pp_Var8 = sp->fts_array;\n    pFVar2 = *pp_Var8;\n    pFVar3 = pFVar2;\n    pp_Var4 = pp_Var8;\n    if (iVar5 != 0) {\n      do {\n        p_Var7 = *pp_Var4;\n        iVar5 = iVar5 + -1;\n        pp_Var1 = pp_Var4 + 1;\n        pp_Var4 = pp_Var4 + 1;\n        p_Var7->fts_link = *pp_Var1;\n      } while (iVar5 != 0);\n      pFVar3 = pp_Var8[nitems - 1];\n    }\n    pFVar3->fts_link = (_ftsent *)0x0;\n    return pFVar2;\n  }\n  uVar6 = nitems + 0x28;\n  sp->fts_nitems = uVar6;\n  if (uVar6 < 0x40000000) {\n    pp_Var4 = (_ftsent **)(*(code *)PTR_realloc_00056448)(pp_Var4,uVar6 * 4);\n    if (pp_Var4 != (_ftsent **)0x0) {\n      sp->fts_array = pp_Var4;\n      goto LAB_00038c00;\n    }\n    pp_Var4 = sp->fts_array;\n  }\n  (*(code *)PTR_free_000564c0)(pp_Var4);\n  sp->fts_array = (_ftsent **)0x0;\n  sp->fts_nitems = 0;\n  return head;\n}\n\n" (function_definition "FTSENT * fts_sort(FTS *sp,FTSENT *head,size_t nitems)\n\n{\n  _ftsent **pp_Var1;\n  FTSENT *pFVar2;\n  FTSENT *pFVar3;\n  _ftsent **pp_Var4;\n  int iVar5;\n  uint uVar6;\n  _ftsent *p_Var7;\n  _ftsent **pp_Var8;\n  \n  pp_Var4 = sp->fts_array;\n  if (nitems <= sp->fts_nitems) {\nLAB_00038c00:\n    pp_Var8 = pp_Var4;\n    if (head != (FTSENT *)0x0) {\n      do {\n        *pp_Var8 = head;\n        head = head->fts_link;\n        pp_Var8 = pp_Var8 + 1;\n      } while (head != (_ftsent *)0x0);\n    }\n    (*(code *)PTR_qsort_00056380)(pp_Var4,nitems,4);\n    iVar5 = nitems - 1;\n    pp_Var8 = sp->fts_array;\n    pFVar2 = *pp_Var8;\n    pFVar3 = pFVar2;\n    pp_Var4 = pp_Var8;\n    if (iVar5 != 0) {\n      do {\n        p_Var7 = *pp_Var4;\n        iVar5 = iVar5 + -1;\n        pp_Var1 = pp_Var4 + 1;\n        pp_Var4 = pp_Var4 + 1;\n        p_Var7->fts_link = *pp_Var1;\n      } while (iVar5 != 0);\n      pFVar3 = pp_Var8[nitems - 1];\n    }\n    pFVar3->fts_link = (_ftsent *)0x0;\n    return pFVar2;\n  }\n  uVar6 = nitems + 0x28;\n  sp->fts_nitems = uVar6;\n  if (uVar6 < 0x40000000) {\n    pp_Var4 = (_ftsent **)(*(code *)PTR_realloc_00056448)(pp_Var4,uVar6 * 4);\n    if (pp_Var4 != (_ftsent **)0x0) {\n      sp->fts_array = pp_Var4;\n      goto LAB_00038c00;\n    }\n    pp_Var4 = sp->fts_array;\n  }\n  (*(code *)PTR_free_000564c0)(pp_Var4);\n  sp->fts_array = (_ftsent **)0x0;\n  sp->fts_nitems = 0;\n  return head;\n}" type_identifier (pointer_declarator "* fts_sort(FTS *sp,FTSENT *head,size_t nitems)" * (function_declarator "fts_sort(FTS *sp,FTSENT *head,size_t nitems)" identifier (parameter_list "(FTS *sp,FTSENT *head,size_t nitems)" ( (parameter_declaration "FTS *sp" type_identifier (pointer_declarator "*sp" * identifier)) , (parameter_declaration "FTSENT *head" type_identifier (pointer_declarator "*head" * identifier)) , (parameter_declaration "size_t nitems" primitive_type identifier) )))) (compound_statement "{\n  _ftsent **pp_Var1;\n  FTSENT *pFVar2;\n  FTSENT *pFVar3;\n  _ftsent **pp_Var4;\n  int iVar5;\n  uint uVar6;\n  _ftsent *p_Var7;\n  _ftsent **pp_Var8;\n  \n  pp_Var4 = sp->fts_array;\n  if (nitems <= sp->fts_nitems) {\nLAB_00038c00:\n    pp_Var8 = pp_Var4;\n    if (head != (FTSENT *)0x0) {\n      do {\n        *pp_Var8 = head;\n        head = head->fts_link;\n        pp_Var8 = pp_Var8 + 1;\n      } while (head != (_ftsent *)0x0);\n    }\n    (*(code *)PTR_qsort_00056380)(pp_Var4,nitems,4);\n    iVar5 = nitems - 1;\n    pp_Var8 = sp->fts_array;\n    pFVar2 = *pp_Var8;\n    pFVar3 = pFVar2;\n    pp_Var4 = pp_Var8;\n    if (iVar5 != 0) {\n      do {\n        p_Var7 = *pp_Var4;\n        iVar5 = iVar5 + -1;\n        pp_Var1 = pp_Var4 + 1;\n        pp_Var4 = pp_Var4 + 1;\n        p_Var7->fts_link = *pp_Var1;\n      } while (iVar5 != 0);\n      pFVar3 = pp_Var8[nitems - 1];\n    }\n    pFVar3->fts_link = (_ftsent *)0x0;\n    return pFVar2;\n  }\n  uVar6 = nitems + 0x28;\n  sp->fts_nitems = uVar6;\n  if (uVar6 < 0x40000000) {\n    pp_Var4 = (_ftsent **)(*(code *)PTR_realloc_00056448)(pp_Var4,uVar6 * 4);\n    if (pp_Var4 != (_ftsent **)0x0) {\n      sp->fts_array = pp_Var4;\n      goto LAB_00038c00;\n    }\n    pp_Var4 = sp->fts_array;\n  }\n  (*(code *)PTR_free_000564c0)(pp_Var4);\n  sp->fts_array = (_ftsent **)0x0;\n  sp->fts_nitems = 0;\n  return head;\n}" { (declaration "_ftsent **pp_Var1;" type_identifier (pointer_declarator "**pp_Var1" * (pointer_declarator "*pp_Var1" * identifier)) ;) (declaration "FTSENT *pFVar2;" type_identifier (pointer_declarator "*pFVar2" * identifier) ;) (declaration "FTSENT *pFVar3;" type_identifier (pointer_declarator "*pFVar3" * identifier) ;) (declaration "_ftsent **pp_Var4;" type_identifier (pointer_declarator "**pp_Var4" * (pointer_declarator "*pp_Var4" * identifier)) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "_ftsent *p_Var7;" type_identifier (pointer_declarator "*p_Var7" * identifier) ;) (declaration "_ftsent **pp_Var8;" type_identifier (pointer_declarator "**pp_Var8" * (pointer_declarator "*pp_Var8" * identifier)) ;) (expression_statement "pp_Var4 = sp->fts_array;" (assignment_expression "pp_Var4 = sp->fts_array" identifier = (field_expression "sp->fts_array" identifier -> field_identifier)) ;) (if_statement "if (nitems <= sp->fts_nitems) {\nLAB_00038c00:\n    pp_Var8 = pp_Var4;\n    if (head != (FTSENT *)0x0) {\n      do {\n        *pp_Var8 = head;\n        head = head->fts_link;\n        pp_Var8 = pp_Var8 + 1;\n      } while (head != (_ftsent *)0x0);\n    }\n    (*(code *)PTR_qsort_00056380)(pp_Var4,nitems,4);\n    iVar5 = nitems - 1;\n    pp_Var8 = sp->fts_array;\n    pFVar2 = *pp_Var8;\n    pFVar3 = pFVar2;\n    pp_Var4 = pp_Var8;\n    if (iVar5 != 0) {\n      do {\n        p_Var7 = *pp_Var4;\n        iVar5 = iVar5 + -1;\n        pp_Var1 = pp_Var4 + 1;\n        pp_Var4 = pp_Var4 + 1;\n        p_Var7->fts_link = *pp_Var1;\n      } while (iVar5 != 0);\n      pFVar3 = pp_Var8[nitems - 1];\n    }\n    pFVar3->fts_link = (_ftsent *)0x0;\n    return pFVar2;\n  }" if (parenthesized_expression "(nitems <= sp->fts_nitems)" ( (binary_expression "nitems <= sp->fts_nitems" identifier <= (field_expression "sp->fts_nitems" identifier -> field_identifier)) )) (compound_statement "{\nLAB_00038c00:\n    pp_Var8 = pp_Var4;\n    if (head != (FTSENT *)0x0) {\n      do {\n        *pp_Var8 = head;\n        head = head->fts_link;\n        pp_Var8 = pp_Var8 + 1;\n      } while (head != (_ftsent *)0x0);\n    }\n    (*(code *)PTR_qsort_00056380)(pp_Var4,nitems,4);\n    iVar5 = nitems - 1;\n    pp_Var8 = sp->fts_array;\n    pFVar2 = *pp_Var8;\n    pFVar3 = pFVar2;\n    pp_Var4 = pp_Var8;\n    if (iVar5 != 0) {\n      do {\n        p_Var7 = *pp_Var4;\n        iVar5 = iVar5 + -1;\n        pp_Var1 = pp_Var4 + 1;\n        pp_Var4 = pp_Var4 + 1;\n        p_Var7->fts_link = *pp_Var1;\n      } while (iVar5 != 0);\n      pFVar3 = pp_Var8[nitems - 1];\n    }\n    pFVar3->fts_link = (_ftsent *)0x0;\n    return pFVar2;\n  }" { (labeled_statement "LAB_00038c00:\n    pp_Var8 = pp_Var4;" statement_identifier : (expression_statement "pp_Var8 = pp_Var4;" (assignment_expression "pp_Var8 = pp_Var4" identifier = identifier) ;)) (if_statement "if (head != (FTSENT *)0x0) {\n      do {\n        *pp_Var8 = head;\n        head = head->fts_link;\n        pp_Var8 = pp_Var8 + 1;\n      } while (head != (_ftsent *)0x0);\n    }" if (parenthesized_expression "(head != (FTSENT *)0x0)" ( (binary_expression "head != (FTSENT *)0x0" identifier != (cast_expression "(FTSENT *)0x0" ( (type_descriptor "FTSENT *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      do {\n        *pp_Var8 = head;\n        head = head->fts_link;\n        pp_Var8 = pp_Var8 + 1;\n      } while (head != (_ftsent *)0x0);\n    }" { (do_statement "do {\n        *pp_Var8 = head;\n        head = head->fts_link;\n        pp_Var8 = pp_Var8 + 1;\n      } while (head != (_ftsent *)0x0);" do (compound_statement "{\n        *pp_Var8 = head;\n        head = head->fts_link;\n        pp_Var8 = pp_Var8 + 1;\n      }" { (expression_statement "*pp_Var8 = head;" (assignment_expression "*pp_Var8 = head" (pointer_expression "*pp_Var8" * identifier) = identifier) ;) (expression_statement "head = head->fts_link;" (assignment_expression "head = head->fts_link" identifier = (field_expression "head->fts_link" identifier -> field_identifier)) ;) (expression_statement "pp_Var8 = pp_Var8 + 1;" (assignment_expression "pp_Var8 = pp_Var8 + 1" identifier = (binary_expression "pp_Var8 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(head != (_ftsent *)0x0)" ( (binary_expression "head != (_ftsent *)0x0" identifier != (cast_expression "(_ftsent *)0x0" ( (type_descriptor "_ftsent *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) (expression_statement "(*(code *)PTR_qsort_00056380)(pp_Var4,nitems,4);" (call_expression "(*(code *)PTR_qsort_00056380)(pp_Var4,nitems,4)" (parenthesized_expression "(*(code *)PTR_qsort_00056380)" ( (pointer_expression "*(code *)PTR_qsort_00056380" * (cast_expression "(code *)PTR_qsort_00056380" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pp_Var4,nitems,4)" ( identifier , identifier , number_literal ))) ;) (expression_statement "iVar5 = nitems - 1;" (assignment_expression "iVar5 = nitems - 1" identifier = (binary_expression "nitems - 1" identifier - number_literal)) ;) (expression_statement "pp_Var8 = sp->fts_array;" (assignment_expression "pp_Var8 = sp->fts_array" identifier = (field_expression "sp->fts_array" identifier -> field_identifier)) ;) (expression_statement "pFVar2 = *pp_Var8;" (assignment_expression "pFVar2 = *pp_Var8" identifier = (pointer_expression "*pp_Var8" * identifier)) ;) (expression_statement "pFVar3 = pFVar2;" (assignment_expression "pFVar3 = pFVar2" identifier = identifier) ;) (expression_statement "pp_Var4 = pp_Var8;" (assignment_expression "pp_Var4 = pp_Var8" identifier = identifier) ;) (if_statement "if (iVar5 != 0) {\n      do {\n        p_Var7 = *pp_Var4;\n        iVar5 = iVar5 + -1;\n        pp_Var1 = pp_Var4 + 1;\n        pp_Var4 = pp_Var4 + 1;\n        p_Var7->fts_link = *pp_Var1;\n      } while (iVar5 != 0);\n      pFVar3 = pp_Var8[nitems - 1];\n    }" if (parenthesized_expression "(iVar5 != 0)" ( (binary_expression "iVar5 != 0" identifier != number_literal) )) (compound_statement "{\n      do {\n        p_Var7 = *pp_Var4;\n        iVar5 = iVar5 + -1;\n        pp_Var1 = pp_Var4 + 1;\n        pp_Var4 = pp_Var4 + 1;\n        p_Var7->fts_link = *pp_Var1;\n      } while (iVar5 != 0);\n      pFVar3 = pp_Var8[nitems - 1];\n    }" { (do_statement "do {\n        p_Var7 = *pp_Var4;\n        iVar5 = iVar5 + -1;\n        pp_Var1 = pp_Var4 + 1;\n        pp_Var4 = pp_Var4 + 1;\n        p_Var7->fts_link = *pp_Var1;\n      } while (iVar5 != 0);" do (compound_statement "{\n        p_Var7 = *pp_Var4;\n        iVar5 = iVar5 + -1;\n        pp_Var1 = pp_Var4 + 1;\n        pp_Var4 = pp_Var4 + 1;\n        p_Var7->fts_link = *pp_Var1;\n      }" { (expression_statement "p_Var7 = *pp_Var4;" (assignment_expression "p_Var7 = *pp_Var4" identifier = (pointer_expression "*pp_Var4" * identifier)) ;) (expression_statement "iVar5 = iVar5 + -1;" (assignment_expression "iVar5 = iVar5 + -1" identifier = (binary_expression "iVar5 + -1" identifier + number_literal)) ;) (expression_statement "pp_Var1 = pp_Var4 + 1;" (assignment_expression "pp_Var1 = pp_Var4 + 1" identifier = (binary_expression "pp_Var4 + 1" identifier + number_literal)) ;) (expression_statement "pp_Var4 = pp_Var4 + 1;" (assignment_expression "pp_Var4 = pp_Var4 + 1" identifier = (binary_expression "pp_Var4 + 1" identifier + number_literal)) ;) (expression_statement "p_Var7->fts_link = *pp_Var1;" (assignment_expression "p_Var7->fts_link = *pp_Var1" (field_expression "p_Var7->fts_link" identifier -> field_identifier) = (pointer_expression "*pp_Var1" * identifier)) ;) }) while (parenthesized_expression "(iVar5 != 0)" ( (binary_expression "iVar5 != 0" identifier != number_literal) )) ;) (expression_statement "pFVar3 = pp_Var8[nitems - 1];" (assignment_expression "pFVar3 = pp_Var8[nitems - 1]" identifier = (subscript_expression "pp_Var8[nitems - 1]" identifier [ (binary_expression "nitems - 1" identifier - number_literal) ])) ;) })) (expression_statement "pFVar3->fts_link = (_ftsent *)0x0;" (assignment_expression "pFVar3->fts_link = (_ftsent *)0x0" (field_expression "pFVar3->fts_link" identifier -> field_identifier) = (cast_expression "(_ftsent *)0x0" ( (type_descriptor "_ftsent *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (return_statement "return pFVar2;" return identifier ;) })) (expression_statement "uVar6 = nitems + 0x28;" (assignment_expression "uVar6 = nitems + 0x28" identifier = (binary_expression "nitems + 0x28" identifier + number_literal)) ;) (expression_statement "sp->fts_nitems = uVar6;" (assignment_expression "sp->fts_nitems = uVar6" (field_expression "sp->fts_nitems" identifier -> field_identifier) = identifier) ;) (if_statement "if (uVar6 < 0x40000000) {\n    pp_Var4 = (_ftsent **)(*(code *)PTR_realloc_00056448)(pp_Var4,uVar6 * 4);\n    if (pp_Var4 != (_ftsent **)0x0) {\n      sp->fts_array = pp_Var4;\n      goto LAB_00038c00;\n    }\n    pp_Var4 = sp->fts_array;\n  }" if (parenthesized_expression "(uVar6 < 0x40000000)" ( (binary_expression "uVar6 < 0x40000000" identifier < number_literal) )) (compound_statement "{\n    pp_Var4 = (_ftsent **)(*(code *)PTR_realloc_00056448)(pp_Var4,uVar6 * 4);\n    if (pp_Var4 != (_ftsent **)0x0) {\n      sp->fts_array = pp_Var4;\n      goto LAB_00038c00;\n    }\n    pp_Var4 = sp->fts_array;\n  }" { (expression_statement "pp_Var4 = (_ftsent **)(*(code *)PTR_realloc_00056448)(pp_Var4,uVar6 * 4);" (assignment_expression "pp_Var4 = (_ftsent **)(*(code *)PTR_realloc_00056448)(pp_Var4,uVar6 * 4)" identifier = (cast_expression "(_ftsent **)(*(code *)PTR_realloc_00056448)(pp_Var4,uVar6 * 4)" ( (type_descriptor "_ftsent **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (call_expression "(*(code *)PTR_realloc_00056448)(pp_Var4,uVar6 * 4)" (parenthesized_expression "(*(code *)PTR_realloc_00056448)" ( (pointer_expression "*(code *)PTR_realloc_00056448" * (cast_expression "(code *)PTR_realloc_00056448" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pp_Var4,uVar6 * 4)" ( identifier , (binary_expression "uVar6 * 4" identifier * number_literal) ))))) ;) (if_statement "if (pp_Var4 != (_ftsent **)0x0) {\n      sp->fts_array = pp_Var4;\n      goto LAB_00038c00;\n    }" if (parenthesized_expression "(pp_Var4 != (_ftsent **)0x0)" ( (binary_expression "pp_Var4 != (_ftsent **)0x0" identifier != (cast_expression "(_ftsent **)0x0" ( (type_descriptor "_ftsent **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) (compound_statement "{\n      sp->fts_array = pp_Var4;\n      goto LAB_00038c00;\n    }" { (expression_statement "sp->fts_array = pp_Var4;" (assignment_expression "sp->fts_array = pp_Var4" (field_expression "sp->fts_array" identifier -> field_identifier) = identifier) ;) (goto_statement "goto LAB_00038c00;" goto statement_identifier ;) })) (expression_statement "pp_Var4 = sp->fts_array;" (assignment_expression "pp_Var4 = sp->fts_array" identifier = (field_expression "sp->fts_array" identifier -> field_identifier)) ;) })) (expression_statement "(*(code *)PTR_free_000564c0)(pp_Var4);" (call_expression "(*(code *)PTR_free_000564c0)(pp_Var4)" (parenthesized_expression "(*(code *)PTR_free_000564c0)" ( (pointer_expression "*(code *)PTR_free_000564c0" * (cast_expression "(code *)PTR_free_000564c0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pp_Var4)" ( identifier ))) ;) (expression_statement "sp->fts_array = (_ftsent **)0x0;" (assignment_expression "sp->fts_array = (_ftsent **)0x0" (field_expression "sp->fts_array" identifier -> field_identifier) = (cast_expression "(_ftsent **)0x0" ( (type_descriptor "_ftsent **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) ;) (expression_statement "sp->fts_nitems = 0;" (assignment_expression "sp->fts_nitems = 0" (field_expression "sp->fts_nitems" identifier -> field_identifier) = number_literal) ;) (return_statement "return head;" return identifier ;) })))
(translation_unit "int FUN_00038b84(int param_1,int param_2,uint param_3)\n\n{\n  int *piVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  int *piVar7;\n  \n  piVar3 = *(int **)(param_1 + 8);\n  if (param_3 <= *(uint *)(param_1 + 0x28)) {\nLAB_00038c00:\n    piVar7 = piVar3;\n    if (param_2 != 0) {\n      do {\n        *piVar7 = param_2;\n        param_2 = *(int *)(param_2 + 8);\n        piVar7 = piVar7 + 1;\n      } while (param_2 != 0);\n    }\n    (*(code *)PTR_qsort_00056380)(piVar3,param_3,4);\n    iVar4 = param_3 - 1;\n    piVar7 = *(int **)(param_1 + 8);\n    iVar2 = *piVar7;\n    iVar6 = iVar2;\n    piVar3 = piVar7;\n    if (iVar4 != 0) {\n      do {\n        iVar6 = *piVar3;\n        iVar4 = iVar4 + -1;\n        piVar1 = piVar3 + 1;\n        piVar3 = piVar3 + 1;\n        *(int *)(iVar6 + 8) = *piVar1;\n      } while (iVar4 != 0);\n      iVar6 = piVar7[param_3 - 1];\n    }\n    *(undefined4 *)(iVar6 + 8) = 0;\n    return iVar2;\n  }\n  uVar5 = param_3 + 0x28;\n  *(uint *)(param_1 + 0x28) = uVar5;\n  if (uVar5 < 0x40000000) {\n    piVar3 = (int *)(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4);\n    if (piVar3 != (int *)0x0) {\n      *(int **)(param_1 + 8) = piVar3;\n      goto LAB_00038c00;\n    }\n    piVar3 = *(int **)(param_1 + 8);\n  }\n  (*(code *)PTR_free_000564c0)(piVar3);\n  *(undefined4 *)(param_1 + 8) = 0;\n  *(undefined4 *)(param_1 + 0x28) = 0;\n  return param_2;\n}\n\n" (function_definition "int FUN_00038b84(int param_1,int param_2,uint param_3)\n\n{\n  int *piVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  int *piVar7;\n  \n  piVar3 = *(int **)(param_1 + 8);\n  if (param_3 <= *(uint *)(param_1 + 0x28)) {\nLAB_00038c00:\n    piVar7 = piVar3;\n    if (param_2 != 0) {\n      do {\n        *piVar7 = param_2;\n        param_2 = *(int *)(param_2 + 8);\n        piVar7 = piVar7 + 1;\n      } while (param_2 != 0);\n    }\n    (*(code *)PTR_qsort_00056380)(piVar3,param_3,4);\n    iVar4 = param_3 - 1;\n    piVar7 = *(int **)(param_1 + 8);\n    iVar2 = *piVar7;\n    iVar6 = iVar2;\n    piVar3 = piVar7;\n    if (iVar4 != 0) {\n      do {\n        iVar6 = *piVar3;\n        iVar4 = iVar4 + -1;\n        piVar1 = piVar3 + 1;\n        piVar3 = piVar3 + 1;\n        *(int *)(iVar6 + 8) = *piVar1;\n      } while (iVar4 != 0);\n      iVar6 = piVar7[param_3 - 1];\n    }\n    *(undefined4 *)(iVar6 + 8) = 0;\n    return iVar2;\n  }\n  uVar5 = param_3 + 0x28;\n  *(uint *)(param_1 + 0x28) = uVar5;\n  if (uVar5 < 0x40000000) {\n    piVar3 = (int *)(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4);\n    if (piVar3 != (int *)0x0) {\n      *(int **)(param_1 + 8) = piVar3;\n      goto LAB_00038c00;\n    }\n    piVar3 = *(int **)(param_1 + 8);\n  }\n  (*(code *)PTR_free_000564c0)(piVar3);\n  *(undefined4 *)(param_1 + 8) = 0;\n  *(undefined4 *)(param_1 + 0x28) = 0;\n  return param_2;\n}" primitive_type (function_declarator "FUN_00038b84(int param_1,int param_2,uint param_3)" identifier (parameter_list "(int param_1,int param_2,uint param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  int *piVar7;\n  \n  piVar3 = *(int **)(param_1 + 8);\n  if (param_3 <= *(uint *)(param_1 + 0x28)) {\nLAB_00038c00:\n    piVar7 = piVar3;\n    if (param_2 != 0) {\n      do {\n        *piVar7 = param_2;\n        param_2 = *(int *)(param_2 + 8);\n        piVar7 = piVar7 + 1;\n      } while (param_2 != 0);\n    }\n    (*(code *)PTR_qsort_00056380)(piVar3,param_3,4);\n    iVar4 = param_3 - 1;\n    piVar7 = *(int **)(param_1 + 8);\n    iVar2 = *piVar7;\n    iVar6 = iVar2;\n    piVar3 = piVar7;\n    if (iVar4 != 0) {\n      do {\n        iVar6 = *piVar3;\n        iVar4 = iVar4 + -1;\n        piVar1 = piVar3 + 1;\n        piVar3 = piVar3 + 1;\n        *(int *)(iVar6 + 8) = *piVar1;\n      } while (iVar4 != 0);\n      iVar6 = piVar7[param_3 - 1];\n    }\n    *(undefined4 *)(iVar6 + 8) = 0;\n    return iVar2;\n  }\n  uVar5 = param_3 + 0x28;\n  *(uint *)(param_1 + 0x28) = uVar5;\n  if (uVar5 < 0x40000000) {\n    piVar3 = (int *)(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4);\n    if (piVar3 != (int *)0x0) {\n      *(int **)(param_1 + 8) = piVar3;\n      goto LAB_00038c00;\n    }\n    piVar3 = *(int **)(param_1 + 8);\n  }\n  (*(code *)PTR_free_000564c0)(piVar3);\n  *(undefined4 *)(param_1 + 8) = 0;\n  *(undefined4 *)(param_1 + 0x28) = 0;\n  return param_2;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int *piVar7;" primitive_type (pointer_declarator "*piVar7" * identifier) ;) (expression_statement "piVar3 = *(int **)(param_1 + 8);" (assignment_expression "piVar3 = *(int **)(param_1 + 8)" identifier = (pointer_expression "*(int **)(param_1 + 8)" * (cast_expression "(int **)(param_1 + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (if_statement "if (param_3 <= *(uint *)(param_1 + 0x28)) {\nLAB_00038c00:\n    piVar7 = piVar3;\n    if (param_2 != 0) {\n      do {\n        *piVar7 = param_2;\n        param_2 = *(int *)(param_2 + 8);\n        piVar7 = piVar7 + 1;\n      } while (param_2 != 0);\n    }\n    (*(code *)PTR_qsort_00056380)(piVar3,param_3,4);\n    iVar4 = param_3 - 1;\n    piVar7 = *(int **)(param_1 + 8);\n    iVar2 = *piVar7;\n    iVar6 = iVar2;\n    piVar3 = piVar7;\n    if (iVar4 != 0) {\n      do {\n        iVar6 = *piVar3;\n        iVar4 = iVar4 + -1;\n        piVar1 = piVar3 + 1;\n        piVar3 = piVar3 + 1;\n        *(int *)(iVar6 + 8) = *piVar1;\n      } while (iVar4 != 0);\n      iVar6 = piVar7[param_3 - 1];\n    }\n    *(undefined4 *)(iVar6 + 8) = 0;\n    return iVar2;\n  }" if (parenthesized_expression "(param_3 <= *(uint *)(param_1 + 0x28))" ( (binary_expression "param_3 <= *(uint *)(param_1 + 0x28)" identifier <= (pointer_expression "*(uint *)(param_1 + 0x28)" * (cast_expression "(uint *)(param_1 + 0x28)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\nLAB_00038c00:\n    piVar7 = piVar3;\n    if (param_2 != 0) {\n      do {\n        *piVar7 = param_2;\n        param_2 = *(int *)(param_2 + 8);\n        piVar7 = piVar7 + 1;\n      } while (param_2 != 0);\n    }\n    (*(code *)PTR_qsort_00056380)(piVar3,param_3,4);\n    iVar4 = param_3 - 1;\n    piVar7 = *(int **)(param_1 + 8);\n    iVar2 = *piVar7;\n    iVar6 = iVar2;\n    piVar3 = piVar7;\n    if (iVar4 != 0) {\n      do {\n        iVar6 = *piVar3;\n        iVar4 = iVar4 + -1;\n        piVar1 = piVar3 + 1;\n        piVar3 = piVar3 + 1;\n        *(int *)(iVar6 + 8) = *piVar1;\n      } while (iVar4 != 0);\n      iVar6 = piVar7[param_3 - 1];\n    }\n    *(undefined4 *)(iVar6 + 8) = 0;\n    return iVar2;\n  }" { (labeled_statement "LAB_00038c00:\n    piVar7 = piVar3;" statement_identifier : (expression_statement "piVar7 = piVar3;" (assignment_expression "piVar7 = piVar3" identifier = identifier) ;)) (if_statement "if (param_2 != 0) {\n      do {\n        *piVar7 = param_2;\n        param_2 = *(int *)(param_2 + 8);\n        piVar7 = piVar7 + 1;\n      } while (param_2 != 0);\n    }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n      do {\n        *piVar7 = param_2;\n        param_2 = *(int *)(param_2 + 8);\n        piVar7 = piVar7 + 1;\n      } while (param_2 != 0);\n    }" { (do_statement "do {\n        *piVar7 = param_2;\n        param_2 = *(int *)(param_2 + 8);\n        piVar7 = piVar7 + 1;\n      } while (param_2 != 0);" do (compound_statement "{\n        *piVar7 = param_2;\n        param_2 = *(int *)(param_2 + 8);\n        piVar7 = piVar7 + 1;\n      }" { (expression_statement "*piVar7 = param_2;" (assignment_expression "*piVar7 = param_2" (pointer_expression "*piVar7" * identifier) = identifier) ;) (expression_statement "param_2 = *(int *)(param_2 + 8);" (assignment_expression "param_2 = *(int *)(param_2 + 8)" identifier = (pointer_expression "*(int *)(param_2 + 8)" * (cast_expression "(int *)(param_2 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) ))))) ;) (expression_statement "piVar7 = piVar7 + 1;" (assignment_expression "piVar7 = piVar7 + 1" identifier = (binary_expression "piVar7 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) ;) })) (expression_statement "(*(code *)PTR_qsort_00056380)(piVar3,param_3,4);" (call_expression "(*(code *)PTR_qsort_00056380)(piVar3,param_3,4)" (parenthesized_expression "(*(code *)PTR_qsort_00056380)" ( (pointer_expression "*(code *)PTR_qsort_00056380" * (cast_expression "(code *)PTR_qsort_00056380" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar3,param_3,4)" ( identifier , identifier , number_literal ))) ;) (expression_statement "iVar4 = param_3 - 1;" (assignment_expression "iVar4 = param_3 - 1" identifier = (binary_expression "param_3 - 1" identifier - number_literal)) ;) (expression_statement "piVar7 = *(int **)(param_1 + 8);" (assignment_expression "piVar7 = *(int **)(param_1 + 8)" identifier = (pointer_expression "*(int **)(param_1 + 8)" * (cast_expression "(int **)(param_1 + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = *piVar7;" (assignment_expression "iVar2 = *piVar7" identifier = (pointer_expression "*piVar7" * identifier)) ;) (expression_statement "iVar6 = iVar2;" (assignment_expression "iVar6 = iVar2" identifier = identifier) ;) (expression_statement "piVar3 = piVar7;" (assignment_expression "piVar3 = piVar7" identifier = identifier) ;) (if_statement "if (iVar4 != 0) {\n      do {\n        iVar6 = *piVar3;\n        iVar4 = iVar4 + -1;\n        piVar1 = piVar3 + 1;\n        piVar3 = piVar3 + 1;\n        *(int *)(iVar6 + 8) = *piVar1;\n      } while (iVar4 != 0);\n      iVar6 = piVar7[param_3 - 1];\n    }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n      do {\n        iVar6 = *piVar3;\n        iVar4 = iVar4 + -1;\n        piVar1 = piVar3 + 1;\n        piVar3 = piVar3 + 1;\n        *(int *)(iVar6 + 8) = *piVar1;\n      } while (iVar4 != 0);\n      iVar6 = piVar7[param_3 - 1];\n    }" { (do_statement "do {\n        iVar6 = *piVar3;\n        iVar4 = iVar4 + -1;\n        piVar1 = piVar3 + 1;\n        piVar3 = piVar3 + 1;\n        *(int *)(iVar6 + 8) = *piVar1;\n      } while (iVar4 != 0);" do (compound_statement "{\n        iVar6 = *piVar3;\n        iVar4 = iVar4 + -1;\n        piVar1 = piVar3 + 1;\n        piVar3 = piVar3 + 1;\n        *(int *)(iVar6 + 8) = *piVar1;\n      }" { (expression_statement "iVar6 = *piVar3;" (assignment_expression "iVar6 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) (expression_statement "piVar1 = piVar3 + 1;" (assignment_expression "piVar1 = piVar3 + 1" identifier = (binary_expression "piVar3 + 1" identifier + number_literal)) ;) (expression_statement "piVar3 = piVar3 + 1;" (assignment_expression "piVar3 = piVar3 + 1" identifier = (binary_expression "piVar3 + 1" identifier + number_literal)) ;) (expression_statement "*(int *)(iVar6 + 8) = *piVar1;" (assignment_expression "*(int *)(iVar6 + 8) = *piVar1" (pointer_expression "*(int *)(iVar6 + 8)" * (cast_expression "(int *)(iVar6 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 8)" ( (binary_expression "iVar6 + 8" identifier + number_literal) )))) = (pointer_expression "*piVar1" * identifier)) ;) }) while (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) ;) (expression_statement "iVar6 = piVar7[param_3 - 1];" (assignment_expression "iVar6 = piVar7[param_3 - 1]" identifier = (subscript_expression "piVar7[param_3 - 1]" identifier [ (binary_expression "param_3 - 1" identifier - number_literal) ])) ;) })) (expression_statement "*(undefined4 *)(iVar6 + 8) = 0;" (assignment_expression "*(undefined4 *)(iVar6 + 8) = 0" (pointer_expression "*(undefined4 *)(iVar6 + 8)" * (cast_expression "(undefined4 *)(iVar6 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 8)" ( (binary_expression "iVar6 + 8" identifier + number_literal) )))) = number_literal) ;) (return_statement "return iVar2;" return identifier ;) })) (expression_statement "uVar5 = param_3 + 0x28;" (assignment_expression "uVar5 = param_3 + 0x28" identifier = (binary_expression "param_3 + 0x28" identifier + number_literal)) ;) (expression_statement "*(uint *)(param_1 + 0x28) = uVar5;" (assignment_expression "*(uint *)(param_1 + 0x28) = uVar5" (pointer_expression "*(uint *)(param_1 + 0x28)" * (cast_expression "(uint *)(param_1 + 0x28)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) = identifier) ;) (if_statement "if (uVar5 < 0x40000000) {\n    piVar3 = (int *)(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4);\n    if (piVar3 != (int *)0x0) {\n      *(int **)(param_1 + 8) = piVar3;\n      goto LAB_00038c00;\n    }\n    piVar3 = *(int **)(param_1 + 8);\n  }" if (parenthesized_expression "(uVar5 < 0x40000000)" ( (binary_expression "uVar5 < 0x40000000" identifier < number_literal) )) (compound_statement "{\n    piVar3 = (int *)(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4);\n    if (piVar3 != (int *)0x0) {\n      *(int **)(param_1 + 8) = piVar3;\n      goto LAB_00038c00;\n    }\n    piVar3 = *(int **)(param_1 + 8);\n  }" { (expression_statement "piVar3 = (int *)(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4);" (assignment_expression "piVar3 = (int *)(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4)" identifier = (cast_expression "(int *)(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4)" (parenthesized_expression "(*(code *)PTR_realloc_00056448)" ( (pointer_expression "*(code *)PTR_realloc_00056448" * (cast_expression "(code *)PTR_realloc_00056448" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar3,uVar5 * 4)" ( identifier , (binary_expression "uVar5 * 4" identifier * number_literal) ))))) ;) (if_statement "if (piVar3 != (int *)0x0) {\n      *(int **)(param_1 + 8) = piVar3;\n      goto LAB_00038c00;\n    }" if (parenthesized_expression "(piVar3 != (int *)0x0)" ( (binary_expression "piVar3 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *(int **)(param_1 + 8) = piVar3;\n      goto LAB_00038c00;\n    }" { (expression_statement "*(int **)(param_1 + 8) = piVar3;" (assignment_expression "*(int **)(param_1 + 8) = piVar3" (pointer_expression "*(int **)(param_1 + 8)" * (cast_expression "(int **)(param_1 + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = identifier) ;) (goto_statement "goto LAB_00038c00;" goto statement_identifier ;) })) (expression_statement "piVar3 = *(int **)(param_1 + 8);" (assignment_expression "piVar3 = *(int **)(param_1 + 8)" identifier = (pointer_expression "*(int **)(param_1 + 8)" * (cast_expression "(int **)(param_1 + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) })) (expression_statement "(*(code *)PTR_free_000564c0)(piVar3);" (call_expression "(*(code *)PTR_free_000564c0)(piVar3)" (parenthesized_expression "(*(code *)PTR_free_000564c0)" ( (pointer_expression "*(code *)PTR_free_000564c0" * (cast_expression "(code *)PTR_free_000564c0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar3)" ( identifier ))) ;) (expression_statement "*(undefined4 *)(param_1 + 8) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 8) = 0" (pointer_expression "*(undefined4 *)(param_1 + 8)" * (cast_expression "(undefined4 *)(param_1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x28) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x28) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x28)" * (cast_expression "(undefined4 *)(param_1 + 0x28)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) = number_literal) ;) (return_statement "return param_2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = IDENT) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = 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 IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * IDENT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (expression_statement (assignment_expression IDENT = (subscript_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) )))) = LIT) ;) (return_statement return IDENT ;) })) (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) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (binary_expression IDENT * LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return IDENT ;) })))
(function_definition "int FUN_00038b84(int param_1,int param_2,uint param_3)\n\n{\n  int *piVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  int *piVar7;\n  \n  piVar3 = *(int **)(param_1 + 8);\n  if (param_3 <= *(uint *)(param_1 + 0x28)) {\nLAB_00038c00:\n    piVar7 = piVar3;\n    if (param_2 != 0) {\n      do {\n        *piVar7 = param_2;\n        param_2 = *(int *)(param_2 + 8);\n        piVar7 = piVar7 + 1;\n      } while (param_2 != 0);\n    }\n    (*(code *)PTR_qsort_00056380)(piVar3,param_3,4);\n    iVar4 = param_3 - 1;\n    piVar7 = *(int **)(param_1 + 8);\n    iVar2 = *piVar7;\n    iVar6 = iVar2;\n    piVar3 = piVar7;\n    if (iVar4 != 0) {\n      do {\n        iVar6 = *piVar3;\n        iVar4 = iVar4 + -1;\n        piVar1 = piVar3 + 1;\n        piVar3 = piVar3 + 1;\n        *(int *)(iVar6 + 8) = *piVar1;\n      } while (iVar4 != 0);\n      iVar6 = piVar7[param_3 - 1];\n    }\n    *(undefined4 *)(iVar6 + 8) = 0;\n    return iVar2;\n  }\n  uVar5 = param_3 + 0x28;\n  *(uint *)(param_1 + 0x28) = uVar5;\n  if (uVar5 < 0x40000000) {\n    piVar3 = (int *)(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4);\n    if (piVar3 != (int *)0x0) {\n      *(int **)(param_1 + 8) = piVar3;\n      goto LAB_00038c00;\n    }\n    piVar3 = *(int **)(param_1 + 8);\n  }\n  (*(code *)PTR_free_000564c0)(piVar3);\n  *(undefined4 *)(param_1 + 8) = 0;\n  *(undefined4 *)(param_1 + 0x28) = 0;\n  return param_2;\n}" (primitive_type "int") (function_declarator "FUN_00038b84(int param_1,int param_2,uint param_3)" (identifier "FUN_00038b84") (parameter_list "(int param_1,int param_2,uint param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) () ")"))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  int *piVar7;\n  \n  piVar3 = *(int **)(param_1 + 8);\n  if (param_3 <= *(uint *)(param_1 + 0x28)) {\nLAB_00038c00:\n    piVar7 = piVar3;\n    if (param_2 != 0) {\n      do {\n        *piVar7 = param_2;\n        param_2 = *(int *)(param_2 + 8);\n        piVar7 = piVar7 + 1;\n      } while (param_2 != 0);\n    }\n    (*(code *)PTR_qsort_00056380)(piVar3,param_3,4);\n    iVar4 = param_3 - 1;\n    piVar7 = *(int **)(param_1 + 8);\n    iVar2 = *piVar7;\n    iVar6 = iVar2;\n    piVar3 = piVar7;\n    if (iVar4 != 0) {\n      do {\n        iVar6 = *piVar3;\n        iVar4 = iVar4 + -1;\n        piVar1 = piVar3 + 1;\n        piVar3 = piVar3 + 1;\n        *(int *)(iVar6 + 8) = *piVar1;\n      } while (iVar4 != 0);\n      iVar6 = piVar7[param_3 - 1];\n    }\n    *(undefined4 *)(iVar6 + 8) = 0;\n    return iVar2;\n  }\n  uVar5 = param_3 + 0x28;\n  *(uint *)(param_1 + 0x28) = uVar5;\n  if (uVar5 < 0x40000000) {\n    piVar3 = (int *)(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4);\n    if (piVar3 != (int *)0x0) {\n      *(int **)(param_1 + 8) = piVar3;\n      goto LAB_00038c00;\n    }\n    piVar3 = *(int **)(param_1 + 8);\n  }\n  (*(code *)PTR_free_000564c0)(piVar3);\n  *(undefined4 *)(param_1 + 8) = 0;\n  *(undefined4 *)(param_1 + 0x28) = 0;\n  return param_2;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "int *piVar7;" (primitive_type "int") (pointer_declarator "*piVar7" (* "*") (identifier "piVar7")) (; ";")) (expression_statement "piVar3 = *(int **)(param_1 + 8);" (assignment_expression "piVar3 = *(int **)(param_1 + 8)" (identifier "piVar3") (= "=") (pointer_expression "*(int **)(param_1 + 8)" (* "*") (cast_expression "(int **)(param_1 + 8)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (if_statement "if (param_3 <= *(uint *)(param_1 + 0x28)) {\nLAB_00038c00:\n    piVar7 = piVar3;\n    if (param_2 != 0) {\n      do {\n        *piVar7 = param_2;\n        param_2 = *(int *)(param_2 + 8);\n        piVar7 = piVar7 + 1;\n      } while (param_2 != 0);\n    }\n    (*(code *)PTR_qsort_00056380)(piVar3,param_3,4);\n    iVar4 = param_3 - 1;\n    piVar7 = *(int **)(param_1 + 8);\n    iVar2 = *piVar7;\n    iVar6 = iVar2;\n    piVar3 = piVar7;\n    if (iVar4 != 0) {\n      do {\n        iVar6 = *piVar3;\n        iVar4 = iVar4 + -1;\n        piVar1 = piVar3 + 1;\n        piVar3 = piVar3 + 1;\n        *(int *)(iVar6 + 8) = *piVar1;\n      } while (iVar4 != 0);\n      iVar6 = piVar7[param_3 - 1];\n    }\n    *(undefined4 *)(iVar6 + 8) = 0;\n    return iVar2;\n  }" (if "if") (parenthesized_expression "(param_3 <= *(uint *)(param_1 + 0x28))" (( "(") (binary_expression "param_3 <= *(uint *)(param_1 + 0x28)" (identifier "param_3") (<= "<=") (pointer_expression "*(uint *)(param_1 + 0x28)" (* "*") (cast_expression "(uint *)(param_1 + 0x28)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")"))))) () ")")) (compound_statement "{\nLAB_00038c00:\n    piVar7 = piVar3;\n    if (param_2 != 0) {\n      do {\n        *piVar7 = param_2;\n        param_2 = *(int *)(param_2 + 8);\n        piVar7 = piVar7 + 1;\n      } while (param_2 != 0);\n    }\n    (*(code *)PTR_qsort_00056380)(piVar3,param_3,4);\n    iVar4 = param_3 - 1;\n    piVar7 = *(int **)(param_1 + 8);\n    iVar2 = *piVar7;\n    iVar6 = iVar2;\n    piVar3 = piVar7;\n    if (iVar4 != 0) {\n      do {\n        iVar6 = *piVar3;\n        iVar4 = iVar4 + -1;\n        piVar1 = piVar3 + 1;\n        piVar3 = piVar3 + 1;\n        *(int *)(iVar6 + 8) = *piVar1;\n      } while (iVar4 != 0);\n      iVar6 = piVar7[param_3 - 1];\n    }\n    *(undefined4 *)(iVar6 + 8) = 0;\n    return iVar2;\n  }" ({ "{") (labeled_statement "LAB_00038c00:\n    piVar7 = piVar3;" (statement_identifier "LAB_00038c00") (: ":") (expression_statement "piVar7 = piVar3;" (assignment_expression "piVar7 = piVar3" (identifier "piVar7") (= "=") (identifier "piVar3")) (; ";"))) (if_statement "if (param_2 != 0) {\n      do {\n        *piVar7 = param_2;\n        param_2 = *(int *)(param_2 + 8);\n        piVar7 = piVar7 + 1;\n      } while (param_2 != 0);\n    }" (if "if") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      do {\n        *piVar7 = param_2;\n        param_2 = *(int *)(param_2 + 8);\n        piVar7 = piVar7 + 1;\n      } while (param_2 != 0);\n    }" ({ "{") (do_statement "do {\n        *piVar7 = param_2;\n        param_2 = *(int *)(param_2 + 8);\n        piVar7 = piVar7 + 1;\n      } while (param_2 != 0);" (do "do") (compound_statement "{\n        *piVar7 = param_2;\n        param_2 = *(int *)(param_2 + 8);\n        piVar7 = piVar7 + 1;\n      }" ({ "{") (expression_statement "*piVar7 = param_2;" (assignment_expression "*piVar7 = param_2" (pointer_expression "*piVar7" (* "*") (identifier "piVar7")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "param_2 = *(int *)(param_2 + 8);" (assignment_expression "param_2 = *(int *)(param_2 + 8)" (identifier "param_2") (= "=") (pointer_expression "*(int *)(param_2 + 8)" (* "*") (cast_expression "(int *)(param_2 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (expression_statement "piVar7 = piVar7 + 1;" (assignment_expression "piVar7 = piVar7 + 1" (identifier "piVar7") (= "=") (binary_expression "piVar7 + 1" (identifier "piVar7") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (; ";")) (} "}"))) (expression_statement "(*(code *)PTR_qsort_00056380)(piVar3,param_3,4);" (call_expression "(*(code *)PTR_qsort_00056380)(piVar3,param_3,4)" (parenthesized_expression "(*(code *)PTR_qsort_00056380)" (( "(") (pointer_expression "*(code *)PTR_qsort_00056380" (* "*") (cast_expression "(code *)PTR_qsort_00056380" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_qsort_00056380"))) () ")")) (argument_list "(piVar3,param_3,4)" (( "(") (identifier "piVar3") (, ",") (identifier "param_3") (, ",") (number_literal "4") () ")"))) (; ";")) (expression_statement "iVar4 = param_3 - 1;" (assignment_expression "iVar4 = param_3 - 1" (identifier "iVar4") (= "=") (binary_expression "param_3 - 1" (identifier "param_3") (- "-") (number_literal "1"))) (; ";")) (expression_statement "piVar7 = *(int **)(param_1 + 8);" (assignment_expression "piVar7 = *(int **)(param_1 + 8)" (identifier "piVar7") (= "=") (pointer_expression "*(int **)(param_1 + 8)" (* "*") (cast_expression "(int **)(param_1 + 8)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (expression_statement "iVar2 = *piVar7;" (assignment_expression "iVar2 = *piVar7" (identifier "iVar2") (= "=") (pointer_expression "*piVar7" (* "*") (identifier "piVar7"))) (; ";")) (expression_statement "iVar6 = iVar2;" (assignment_expression "iVar6 = iVar2" (identifier "iVar6") (= "=") (identifier "iVar2")) (; ";")) (expression_statement "piVar3 = piVar7;" (assignment_expression "piVar3 = piVar7" (identifier "piVar3") (= "=") (identifier "piVar7")) (; ";")) (if_statement "if (iVar4 != 0) {\n      do {\n        iVar6 = *piVar3;\n        iVar4 = iVar4 + -1;\n        piVar1 = piVar3 + 1;\n        piVar3 = piVar3 + 1;\n        *(int *)(iVar6 + 8) = *piVar1;\n      } while (iVar4 != 0);\n      iVar6 = piVar7[param_3 - 1];\n    }" (if "if") (parenthesized_expression "(iVar4 != 0)" (( "(") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      do {\n        iVar6 = *piVar3;\n        iVar4 = iVar4 + -1;\n        piVar1 = piVar3 + 1;\n        piVar3 = piVar3 + 1;\n        *(int *)(iVar6 + 8) = *piVar1;\n      } while (iVar4 != 0);\n      iVar6 = piVar7[param_3 - 1];\n    }" ({ "{") (do_statement "do {\n        iVar6 = *piVar3;\n        iVar4 = iVar4 + -1;\n        piVar1 = piVar3 + 1;\n        piVar3 = piVar3 + 1;\n        *(int *)(iVar6 + 8) = *piVar1;\n      } while (iVar4 != 0);" (do "do") (compound_statement "{\n        iVar6 = *piVar3;\n        iVar4 = iVar4 + -1;\n        piVar1 = piVar3 + 1;\n        piVar3 = piVar3 + 1;\n        *(int *)(iVar6 + 8) = *piVar1;\n      }" ({ "{") (expression_statement "iVar6 = *piVar3;" (assignment_expression "iVar6 = *piVar3" (identifier "iVar6") (= "=") (pointer_expression "*piVar3" (* "*") (identifier "piVar3"))) (; ";")) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + -1" (identifier "iVar4") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "piVar1 = piVar3 + 1;" (assignment_expression "piVar1 = piVar3 + 1" (identifier "piVar1") (= "=") (binary_expression "piVar3 + 1" (identifier "piVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "piVar3 = piVar3 + 1;" (assignment_expression "piVar3 = piVar3 + 1" (identifier "piVar3") (= "=") (binary_expression "piVar3 + 1" (identifier "piVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*(int *)(iVar6 + 8) = *piVar1;" (assignment_expression "*(int *)(iVar6 + 8) = *piVar1" (pointer_expression "*(int *)(iVar6 + 8)" (* "*") (cast_expression "(int *)(iVar6 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar6 + 8)" (( "(") (binary_expression "iVar6 + 8" (identifier "iVar6") (+ "+") (number_literal "8")) () ")")))) (= "=") (pointer_expression "*piVar1" (* "*") (identifier "piVar1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar4 != 0)" (( "(") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) () ")")) (; ";")) (expression_statement "iVar6 = piVar7[param_3 - 1];" (assignment_expression "iVar6 = piVar7[param_3 - 1]" (identifier "iVar6") (= "=") (subscript_expression "piVar7[param_3 - 1]" (identifier "piVar7") ([ "[") (binary_expression "param_3 - 1" (identifier "param_3") (- "-") (number_literal "1")) (] "]"))) (; ";")) (} "}"))) (expression_statement "*(undefined4 *)(iVar6 + 8) = 0;" (assignment_expression "*(undefined4 *)(iVar6 + 8) = 0" (pointer_expression "*(undefined4 *)(iVar6 + 8)" (* "*") (cast_expression "(undefined4 *)(iVar6 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar6 + 8)" (( "(") (binary_expression "iVar6 + 8" (identifier "iVar6") (+ "+") (number_literal "8")) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}"))) (expression_statement "uVar5 = param_3 + 0x28;" (assignment_expression "uVar5 = param_3 + 0x28" (identifier "uVar5") (= "=") (binary_expression "param_3 + 0x28" (identifier "param_3") (+ "+") (number_literal "0x28"))) (; ";")) (expression_statement "*(uint *)(param_1 + 0x28) = uVar5;" (assignment_expression "*(uint *)(param_1 + 0x28) = uVar5" (pointer_expression "*(uint *)(param_1 + 0x28)" (* "*") (cast_expression "(uint *)(param_1 + 0x28)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")")))) (= "=") (identifier "uVar5")) (; ";")) (if_statement "if (uVar5 < 0x40000000) {\n    piVar3 = (int *)(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4);\n    if (piVar3 != (int *)0x0) {\n      *(int **)(param_1 + 8) = piVar3;\n      goto LAB_00038c00;\n    }\n    piVar3 = *(int **)(param_1 + 8);\n  }" (if "if") (parenthesized_expression "(uVar5 < 0x40000000)" (( "(") (binary_expression "uVar5 < 0x40000000" (identifier "uVar5") (< "<") (number_literal "0x40000000")) () ")")) (compound_statement "{\n    piVar3 = (int *)(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4);\n    if (piVar3 != (int *)0x0) {\n      *(int **)(param_1 + 8) = piVar3;\n      goto LAB_00038c00;\n    }\n    piVar3 = *(int **)(param_1 + 8);\n  }" ({ "{") (expression_statement "piVar3 = (int *)(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4);" (assignment_expression "piVar3 = (int *)(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4)" (identifier "piVar3") (= "=") (cast_expression "(int *)(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4)" (parenthesized_expression "(*(code *)PTR_realloc_00056448)" (( "(") (pointer_expression "*(code *)PTR_realloc_00056448" (* "*") (cast_expression "(code *)PTR_realloc_00056448" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_realloc_00056448"))) () ")")) (argument_list "(piVar3,uVar5 * 4)" (( "(") (identifier "piVar3") (, ",") (binary_expression "uVar5 * 4" (identifier "uVar5") (* "*") (number_literal "4")) () ")"))))) (; ";")) (if_statement "if (piVar3 != (int *)0x0) {\n      *(int **)(param_1 + 8) = piVar3;\n      goto LAB_00038c00;\n    }" (if "if") (parenthesized_expression "(piVar3 != (int *)0x0)" (( "(") (binary_expression "piVar3 != (int *)0x0" (identifier "piVar3") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      *(int **)(param_1 + 8) = piVar3;\n      goto LAB_00038c00;\n    }" ({ "{") (expression_statement "*(int **)(param_1 + 8) = piVar3;" (assignment_expression "*(int **)(param_1 + 8) = piVar3" (pointer_expression "*(int **)(param_1 + 8)" (* "*") (cast_expression "(int **)(param_1 + 8)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (= "=") (identifier "piVar3")) (; ";")) (goto_statement "goto LAB_00038c00;" (goto "goto") (statement_identifier "LAB_00038c00") (; ";")) (} "}"))) (expression_statement "piVar3 = *(int **)(param_1 + 8);" (assignment_expression "piVar3 = *(int **)(param_1 + 8)" (identifier "piVar3") (= "=") (pointer_expression "*(int **)(param_1 + 8)" (* "*") (cast_expression "(int **)(param_1 + 8)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (} "}"))) (expression_statement "(*(code *)PTR_free_000564c0)(piVar3);" (call_expression "(*(code *)PTR_free_000564c0)(piVar3)" (parenthesized_expression "(*(code *)PTR_free_000564c0)" (( "(") (pointer_expression "*(code *)PTR_free_000564c0" (* "*") (cast_expression "(code *)PTR_free_000564c0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_free_000564c0"))) () ")")) (argument_list "(piVar3)" (( "(") (identifier "piVar3") () ")"))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 8) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 8) = 0" (pointer_expression "*(undefined4 *)(param_1 + 8)" (* "*") (cast_expression "(undefined4 *)(param_1 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x28) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x28) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x28)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x28)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return param_2;" (return "return") (identifier "param_2") (; ";")) (} "}")))
(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_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))))))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (do_statement body: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (identifier) (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (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: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (pointer_expression argument: (identifier))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (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: (number_literal))) (return_statement (identifier)))) (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: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (return_statement (identifier)))))

int MASKED(int param_1,int param_2,uint param_3)

{
  int *piVar1;
  int iVar2;
  int *piVar3;
  int iVar4;
  uint uVar5;
  int iVar6;
  int *piVar7;
  
  piVar3 = *(int **)(param_1 + 8);
  if (param_3 <= *(uint *)(param_1 + 0x28)) {
LAB_00038c00:
    piVar7 = piVar3;
    if (param_2 != 0) {
      do {
        *piVar7 = param_2;
        param_2 = *(int *)(param_2 + 8);
        piVar7 = piVar7 + 1;
      } while (param_2 != 0);
    }
    (*(code *)PTR_qsort_00056380)(piVar3,param_3,4);
    iVar4 = param_3 - 1;
    piVar7 = *(int **)(param_1 + 8);
    iVar2 = *piVar7;
    iVar6 = iVar2;
    piVar3 = piVar7;
    if (iVar4 != 0) {
      do {
        iVar6 = *piVar3;
        iVar4 = iVar4 + -1;
        piVar1 = piVar3 + 1;
        piVar3 = piVar3 + 1;
        *(int *)(iVar6 + 8) = *piVar1;
      } while (iVar4 != 0);
      iVar6 = piVar7[param_3 - 1];
    }
    *(undefined4 *)(iVar6 + 8) = 0;
    return iVar2;
  }
  uVar5 = param_3 + 0x28;
  *(uint *)(param_1 + 0x28) = uVar5;
  if (uVar5 < 0x40000000) {
    piVar3 = (int *)(*(code *)PTR_realloc_00056448)(piVar3,uVar5 * 4);
    if (piVar3 != (int *)0x0) {
      *(int **)(param_1 + 8) = piVar3;
      goto LAB_00038c00;
    }
    piVar3 = *(int **)(param_1 + 8);
  }
  (*(code *)PTR_free_000564c0)(piVar3);
  *(undefined4 *)(param_1 + 8) = 0;
  *(undefined4 *)(param_1 + 0x28) = 0;
  return param_2;
}

