
/* WARNING: Unknown calling convention -- yet parameter storage is locked */

void do_stats(void)

{
  FILE *fp;
  int *piVar1;
  undefined4 *puVar2;
  undefined4 *puVar3;
  int iVar4;
  uint uVar5;
  int iVar6;
  int *piVar7;
  int iVar8;
  uint uVar9;
  int iVar10;
  int *piVar11;
  uint uVar12;
  
  fp = (FILE *)(*(code *)PTR_xfopen_for_read_001313c0)(PTR_bdcommands_4__name_4__001311a4 + -0x63c4)
  ;
  piVar11 = *(int **)PTR_ptr_to_globals_00131330;
  piVar1 = piVar11 + 0x18;
  piVar7 = piVar11 + 0x2c;
  do {
    iVar8 = piVar1[1];
    iVar6 = piVar1[2];
    iVar4 = piVar1[3];
    *piVar7 = *piVar1;
    piVar7[1] = iVar8;
    piVar7[2] = iVar6;
    piVar7[3] = iVar4;
    piVar1 = piVar1 + 4;
    piVar7 = piVar7 + 4;
  } while (piVar1 != piVar11 + 0x2c);
  iVar4 = read_cpu_jiffy(fp,(jiffy_counts_t *)(piVar11 + 0x18));
  if (iVar4 < 4) {
    (*(code *)PTR_bb_error_msg_and_die_001311f0)
              (PTR_bdcommands_4__name_4__001311a4 + -0x1eb8,
               PTR_bdcommands_4__name_4__001311a4 + -0x1ec4);
  }
  (*(code *)PTR_fclose_00131d88)(fp);
  piVar11[0x40] = 0;
  puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_00131240)(piVar11[1] << 3);
  if (0 < piVar11[1]) {
    iVar6 = 0;
    uVar5 = 0;
    iVar4 = 0;
    puVar3 = puVar2;
    do {
      iVar8 = *piVar11 + iVar6;
      iVar10 = *(int *)(iVar8 + 0xc);
      *puVar3 = *(undefined4 *)(iVar8 + 4);
      puVar3[1] = iVar10;
      *(undefined4 *)(iVar8 + 8) = 0;
      uVar9 = piVar11[0x16];
      if (uVar9 != 0) {
        uVar12 = uVar5;
        do {
          piVar7 = (int *)(piVar11[0x15] + uVar12 * 8);
          if (piVar7[1] == iVar10) {
            iVar10 = *(int *)(iVar8 + 4) - *piVar7;
            *(int *)(iVar8 + 8) = iVar10;
            piVar11[0x40] = piVar11[0x40] + iVar10;
            uVar5 = uVar12;
            break;
          }
          if (uVar9 == 0) {
            trap(7);
          }
          uVar12 = (uVar12 + 1) % uVar9;
        } while (uVar12 != uVar5);
      }
      iVar4 = iVar4 + 1;
      iVar6 = iVar6 + 0x2c;
      puVar3 = puVar3 + 2;
    } while (iVar4 < piVar11[1]);
  }
  (*(code *)PTR_free_00132180)(piVar11[0x15]);
  piVar11[0x15] = (int)puVar2;
  piVar11[0x16] = piVar11[1];
  return;
}



void FUN_0006ddd8(void)

{
  undefined4 uVar1;
  int *piVar2;
  undefined4 *puVar3;
  undefined4 *puVar4;
  int iVar5;
  uint uVar6;
  int iVar7;
  int *piVar8;
  int iVar9;
  uint uVar10;
  int iVar11;
  int *piVar12;
  uint uVar13;
  
  uVar1 = (*(code *)PTR_FUN_001313c0)(PTR_FUN_001311a4 + -0x63c4);
  piVar12 = *(int **)PTR_DAT_00131330;
  piVar2 = piVar12 + 0x18;
  piVar8 = piVar12 + 0x2c;
  do {
    iVar9 = piVar2[1];
    iVar7 = piVar2[2];
    iVar5 = piVar2[3];
    *piVar8 = *piVar2;
    piVar8[1] = iVar9;
    piVar8[2] = iVar7;
    piVar8[3] = iVar5;
    piVar2 = piVar2 + 4;
    piVar8 = piVar8 + 4;
  } while (piVar2 != piVar12 + 0x2c);
  iVar5 = FUN_0006dc14(uVar1,piVar12 + 0x18);
  if (iVar5 < 4) {
    (*(code *)PTR_FUN_001311f0)(PTR_FUN_001311a4 + -0x1eb8,PTR_FUN_001311a4 + -0x1ec4);
  }
  (*(code *)PTR_fclose_00131d88)(uVar1);
  piVar12[0x40] = 0;
  puVar3 = (undefined4 *)(*(code *)PTR_FUN_00131240)(piVar12[1] << 3);
  if (0 < piVar12[1]) {
    iVar7 = 0;
    uVar6 = 0;
    iVar5 = 0;
    puVar4 = puVar3;
    do {
      iVar9 = *piVar12 + iVar7;
      iVar11 = *(int *)(iVar9 + 0xc);
      *puVar4 = *(undefined4 *)(iVar9 + 4);
      puVar4[1] = iVar11;
      *(undefined4 *)(iVar9 + 8) = 0;
      uVar10 = piVar12[0x16];
      if (uVar10 != 0) {
        uVar13 = uVar6;
        do {
          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);
          if (piVar8[1] == iVar11) {
            iVar11 = *(int *)(iVar9 + 4) - *piVar8;
            *(int *)(iVar9 + 8) = iVar11;
            piVar12[0x40] = piVar12[0x40] + iVar11;
            uVar6 = uVar13;
            break;
          }
          if (uVar10 == 0) {
            trap(7);
          }
          uVar13 = (uVar13 + 1) % uVar10;
        } while (uVar13 != uVar6);
      }
      iVar5 = iVar5 + 1;
      iVar7 = iVar7 + 0x2c;
      puVar4 = puVar4 + 2;
    } while (iVar5 < piVar12[1]);
  }
  (*(code *)PTR_free_00132180)(piVar12[0x15]);
  piVar12[0x15] = (int)puVar3;
  piVar12[0x16] = piVar12[1];
  return;
}


lui gp,0xd
addiu gp,gp,-0x4c88
addu gp,gp,t9
addiu sp,sp,-0x28
sw ra,0x24(sp)
sw s1,0x20(sp)
sw s0,0x1c(sp)
sw gp,0x10(sp)
lw a0,-0x7fac(gp)
addiu a0,a0,-0x63c4
lw t9,-0x7d90(gp)
jalr t9
_nop
lw gp,0x10(sp)
or s1,v0,zero
lw v0,-0x7e20(gp)
lw s0,0x0(v0)
addiu v0,s0,0x60
addiu v1,s0,0xb0
or a0,v1,zero
lw t0,0x0(v0)
lw a3,0x4(v0)
lw a2,0x8(v0)
lw a1,0xc(v0)
sw t0,0x0(v1)
sw a3,0x4(v1)
sw a2,0x8(v1)
sw a1,0xc(v1)
addiu v0,v0,0x10
bne v0,a0,0x0006de28
_addiu v1,v1,0x10
addiu a1,s0,0x60
or a0,s1,zero
lw t9,-0x7938(gp)
addiu t9,t9,-0x23ec
bal 0x0006dc14
_nop
lw gp,0x10(sp)
slti v0,v0,0x4
beq v0,zero,0x0006de94
_lw a1,-0x7fac(gp)
addiu a1,a1,-0x1ec4
lw a0,-0x7fac(gp)
addiu a0,a0,-0x1eb8
lw t9,-0x7f60(gp)
jalr t9
_nop
or a0,s1,zero
lw t9,-0x73c8(gp)
jalr t9
_nop
lw gp,0x10(sp)
sw zero,0x100(s0)
lw a0,0x4(s0)
sll a0,a0,0x3
lw t9,-0x7f10(gp)
jalr t9
_nop
lw gp,0x10(sp)
or s1,v0,zero
lw v0,0x4(s0)
blez v0,0x0006df58
_or a0,s1,zero
or t0,zero,zero
or a1,zero,zero
or a3,zero,zero
lw v1,0x0(s0)
addu v1,v1,t0
lw t2,0xc(v1)
lw v0,0x4(v1)
sw v0,0x0(a0)
sw t2,0x4(a0)
sw zero,0x8(v1)
lw t1,0x58(s0)
beq t1,zero,0x0006df40
_or v0,a1,zero
lw t3,0x54(s0)
sll a2,v0,0x3
addu a2,t3,a2
lw t4,0x4(a2)
bne t4,t2,0x0006df8c
_nop
lw a1,0x4(v1)
lw a2,0x0(a2)
subu a1,a1,a2
sw a1,0x8(v1)
lw v1,0x100(s0)
addu a1,v1,a1
sw a1,0x100(s0)
or a1,v0,zero
addiu a3,a3,0x1
addiu t0,t0,0x2c
lw v0,0x4(s0)
slt v0,a3,v0
bne v0,zero,0x0006dee0
_addiu a0,a0,0x8
lw a0,0x54(s0)
lw t9,-0x6fd0(gp)
jalr t9
_nop
lw gp,0x10(sp)
sw s1,0x54(s0)
lw v0,0x4(s0)
sw v0,0x58(s0)
lw ra,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x28
addiu v0,v0,0x1
teq t1,zero
divu v0,t1
mfhi v0
bne v0,a1,0x0006df10
_sll a2,v0,0x3
b 0x0006df44
_addiu a3,a3,0x1
(translation_unit "void FUN_0006ddd8(void)\n\n{\n  undefined4 uVar1;\n  int *piVar2;\n  undefined4 *puVar3;\n  undefined4 *puVar4;\n  int iVar5;\n  uint uVar6;\n  int iVar7;\n  int *piVar8;\n  int iVar9;\n  uint uVar10;\n  int iVar11;\n  int *piVar12;\n  uint uVar13;\n  \n  uVar1 = (*(code *)PTR_FUN_001313c0)(PTR_FUN_001311a4 + -0x63c4);\n  piVar12 = *(int **)PTR_DAT_00131330;\n  piVar2 = piVar12 + 0x18;\n  piVar8 = piVar12 + 0x2c;\n  do {\n    iVar9 = piVar2[1];\n    iVar7 = piVar2[2];\n    iVar5 = piVar2[3];\n    *piVar8 = *piVar2;\n    piVar8[1] = iVar9;\n    piVar8[2] = iVar7;\n    piVar8[3] = iVar5;\n    piVar2 = piVar2 + 4;\n    piVar8 = piVar8 + 4;\n  } while (piVar2 != piVar12 + 0x2c);\n  iVar5 = FUN_0006dc14(uVar1,piVar12 + 0x18);\n  if (iVar5 < 4) {\n    (*(code *)PTR_FUN_001311f0)(PTR_FUN_001311a4 + -0x1eb8,PTR_FUN_001311a4 + -0x1ec4);\n  }\n  (*(code *)PTR_fclose_00131d88)(uVar1);\n  piVar12[0x40] = 0;\n  puVar3 = (undefined4 *)(*(code *)PTR_FUN_00131240)(piVar12[1] << 3);\n  if (0 < piVar12[1]) {\n    iVar7 = 0;\n    uVar6 = 0;\n    iVar5 = 0;\n    puVar4 = puVar3;\n    do {\n      iVar9 = *piVar12 + iVar7;\n      iVar11 = *(int *)(iVar9 + 0xc);\n      *puVar4 = *(undefined4 *)(iVar9 + 4);\n      puVar4[1] = iVar11;\n      *(undefined4 *)(iVar9 + 8) = 0;\n      uVar10 = piVar12[0x16];\n      if (uVar10 != 0) {\n        uVar13 = uVar6;\n        do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);\n      }\n      iVar5 = iVar5 + 1;\n      iVar7 = iVar7 + 0x2c;\n      puVar4 = puVar4 + 2;\n    } while (iVar5 < piVar12[1]);\n  }\n  (*(code *)PTR_free_00132180)(piVar12[0x15]);\n  piVar12[0x15] = (int)puVar3;\n  piVar12[0x16] = piVar12[1];\n  return;\n}\n\n" (function_definition "void FUN_0006ddd8(void)\n\n{\n  undefined4 uVar1;\n  int *piVar2;\n  undefined4 *puVar3;\n  undefined4 *puVar4;\n  int iVar5;\n  uint uVar6;\n  int iVar7;\n  int *piVar8;\n  int iVar9;\n  uint uVar10;\n  int iVar11;\n  int *piVar12;\n  uint uVar13;\n  \n  uVar1 = (*(code *)PTR_FUN_001313c0)(PTR_FUN_001311a4 + -0x63c4);\n  piVar12 = *(int **)PTR_DAT_00131330;\n  piVar2 = piVar12 + 0x18;\n  piVar8 = piVar12 + 0x2c;\n  do {\n    iVar9 = piVar2[1];\n    iVar7 = piVar2[2];\n    iVar5 = piVar2[3];\n    *piVar8 = *piVar2;\n    piVar8[1] = iVar9;\n    piVar8[2] = iVar7;\n    piVar8[3] = iVar5;\n    piVar2 = piVar2 + 4;\n    piVar8 = piVar8 + 4;\n  } while (piVar2 != piVar12 + 0x2c);\n  iVar5 = FUN_0006dc14(uVar1,piVar12 + 0x18);\n  if (iVar5 < 4) {\n    (*(code *)PTR_FUN_001311f0)(PTR_FUN_001311a4 + -0x1eb8,PTR_FUN_001311a4 + -0x1ec4);\n  }\n  (*(code *)PTR_fclose_00131d88)(uVar1);\n  piVar12[0x40] = 0;\n  puVar3 = (undefined4 *)(*(code *)PTR_FUN_00131240)(piVar12[1] << 3);\n  if (0 < piVar12[1]) {\n    iVar7 = 0;\n    uVar6 = 0;\n    iVar5 = 0;\n    puVar4 = puVar3;\n    do {\n      iVar9 = *piVar12 + iVar7;\n      iVar11 = *(int *)(iVar9 + 0xc);\n      *puVar4 = *(undefined4 *)(iVar9 + 4);\n      puVar4[1] = iVar11;\n      *(undefined4 *)(iVar9 + 8) = 0;\n      uVar10 = piVar12[0x16];\n      if (uVar10 != 0) {\n        uVar13 = uVar6;\n        do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);\n      }\n      iVar5 = iVar5 + 1;\n      iVar7 = iVar7 + 0x2c;\n      puVar4 = puVar4 + 2;\n    } while (iVar5 < piVar12[1]);\n  }\n  (*(code *)PTR_free_00132180)(piVar12[0x15]);\n  piVar12[0x15] = (int)puVar3;\n  piVar12[0x16] = piVar12[1];\n  return;\n}" primitive_type (function_declarator "FUN_0006ddd8(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  undefined4 uVar1;\n  int *piVar2;\n  undefined4 *puVar3;\n  undefined4 *puVar4;\n  int iVar5;\n  uint uVar6;\n  int iVar7;\n  int *piVar8;\n  int iVar9;\n  uint uVar10;\n  int iVar11;\n  int *piVar12;\n  uint uVar13;\n  \n  uVar1 = (*(code *)PTR_FUN_001313c0)(PTR_FUN_001311a4 + -0x63c4);\n  piVar12 = *(int **)PTR_DAT_00131330;\n  piVar2 = piVar12 + 0x18;\n  piVar8 = piVar12 + 0x2c;\n  do {\n    iVar9 = piVar2[1];\n    iVar7 = piVar2[2];\n    iVar5 = piVar2[3];\n    *piVar8 = *piVar2;\n    piVar8[1] = iVar9;\n    piVar8[2] = iVar7;\n    piVar8[3] = iVar5;\n    piVar2 = piVar2 + 4;\n    piVar8 = piVar8 + 4;\n  } while (piVar2 != piVar12 + 0x2c);\n  iVar5 = FUN_0006dc14(uVar1,piVar12 + 0x18);\n  if (iVar5 < 4) {\n    (*(code *)PTR_FUN_001311f0)(PTR_FUN_001311a4 + -0x1eb8,PTR_FUN_001311a4 + -0x1ec4);\n  }\n  (*(code *)PTR_fclose_00131d88)(uVar1);\n  piVar12[0x40] = 0;\n  puVar3 = (undefined4 *)(*(code *)PTR_FUN_00131240)(piVar12[1] << 3);\n  if (0 < piVar12[1]) {\n    iVar7 = 0;\n    uVar6 = 0;\n    iVar5 = 0;\n    puVar4 = puVar3;\n    do {\n      iVar9 = *piVar12 + iVar7;\n      iVar11 = *(int *)(iVar9 + 0xc);\n      *puVar4 = *(undefined4 *)(iVar9 + 4);\n      puVar4[1] = iVar11;\n      *(undefined4 *)(iVar9 + 8) = 0;\n      uVar10 = piVar12[0x16];\n      if (uVar10 != 0) {\n        uVar13 = uVar6;\n        do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);\n      }\n      iVar5 = iVar5 + 1;\n      iVar7 = iVar7 + 0x2c;\n      puVar4 = puVar4 + 2;\n    } while (iVar5 < piVar12[1]);\n  }\n  (*(code *)PTR_free_00132180)(piVar12[0x15]);\n  piVar12[0x15] = (int)puVar3;\n  piVar12[0x16] = piVar12[1];\n  return;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "int *piVar8;" primitive_type (pointer_declarator "*piVar8" * identifier) ;) (declaration "int iVar9;" primitive_type identifier ;) (declaration "uint uVar10;" type_identifier identifier ;) (declaration "int iVar11;" primitive_type identifier ;) (declaration "int *piVar12;" primitive_type (pointer_declarator "*piVar12" * identifier) ;) (declaration "uint uVar13;" type_identifier identifier ;) (expression_statement "uVar1 = (*(code *)PTR_FUN_001313c0)(PTR_FUN_001311a4 + -0x63c4);" (assignment_expression "uVar1 = (*(code *)PTR_FUN_001313c0)(PTR_FUN_001311a4 + -0x63c4)" identifier = (call_expression "(*(code *)PTR_FUN_001313c0)(PTR_FUN_001311a4 + -0x63c4)" (parenthesized_expression "(*(code *)PTR_FUN_001313c0)" ( (pointer_expression "*(code *)PTR_FUN_001313c0" * (cast_expression "(code *)PTR_FUN_001313c0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_FUN_001311a4 + -0x63c4)" ( (binary_expression "PTR_FUN_001311a4 + -0x63c4" identifier + number_literal) )))) ;) (expression_statement "piVar12 = *(int **)PTR_DAT_00131330;" (assignment_expression "piVar12 = *(int **)PTR_DAT_00131330" identifier = (pointer_expression "*(int **)PTR_DAT_00131330" * (cast_expression "(int **)PTR_DAT_00131330" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "piVar2 = piVar12 + 0x18;" (assignment_expression "piVar2 = piVar12 + 0x18" identifier = (binary_expression "piVar12 + 0x18" identifier + number_literal)) ;) (expression_statement "piVar8 = piVar12 + 0x2c;" (assignment_expression "piVar8 = piVar12 + 0x2c" identifier = (binary_expression "piVar12 + 0x2c" identifier + number_literal)) ;) (do_statement "do {\n    iVar9 = piVar2[1];\n    iVar7 = piVar2[2];\n    iVar5 = piVar2[3];\n    *piVar8 = *piVar2;\n    piVar8[1] = iVar9;\n    piVar8[2] = iVar7;\n    piVar8[3] = iVar5;\n    piVar2 = piVar2 + 4;\n    piVar8 = piVar8 + 4;\n  } while (piVar2 != piVar12 + 0x2c);" do (compound_statement "{\n    iVar9 = piVar2[1];\n    iVar7 = piVar2[2];\n    iVar5 = piVar2[3];\n    *piVar8 = *piVar2;\n    piVar8[1] = iVar9;\n    piVar8[2] = iVar7;\n    piVar8[3] = iVar5;\n    piVar2 = piVar2 + 4;\n    piVar8 = piVar8 + 4;\n  }" { (expression_statement "iVar9 = piVar2[1];" (assignment_expression "iVar9 = piVar2[1]" identifier = (subscript_expression "piVar2[1]" identifier [ number_literal ])) ;) (expression_statement "iVar7 = piVar2[2];" (assignment_expression "iVar7 = piVar2[2]" identifier = (subscript_expression "piVar2[2]" identifier [ number_literal ])) ;) (expression_statement "iVar5 = piVar2[3];" (assignment_expression "iVar5 = piVar2[3]" identifier = (subscript_expression "piVar2[3]" identifier [ number_literal ])) ;) (expression_statement "*piVar8 = *piVar2;" (assignment_expression "*piVar8 = *piVar2" (pointer_expression "*piVar8" * identifier) = (pointer_expression "*piVar2" * identifier)) ;) (expression_statement "piVar8[1] = iVar9;" (assignment_expression "piVar8[1] = iVar9" (subscript_expression "piVar8[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "piVar8[2] = iVar7;" (assignment_expression "piVar8[2] = iVar7" (subscript_expression "piVar8[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "piVar8[3] = iVar5;" (assignment_expression "piVar8[3] = iVar5" (subscript_expression "piVar8[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "piVar2 = piVar2 + 4;" (assignment_expression "piVar2 = piVar2 + 4" identifier = (binary_expression "piVar2 + 4" identifier + number_literal)) ;) (expression_statement "piVar8 = piVar8 + 4;" (assignment_expression "piVar8 = piVar8 + 4" identifier = (binary_expression "piVar8 + 4" identifier + number_literal)) ;) }) while (parenthesized_expression "(piVar2 != piVar12 + 0x2c)" ( (binary_expression "piVar2 != piVar12 + 0x2c" identifier != (binary_expression "piVar12 + 0x2c" identifier + number_literal)) )) ;) (expression_statement "iVar5 = FUN_0006dc14(uVar1,piVar12 + 0x18);" (assignment_expression "iVar5 = FUN_0006dc14(uVar1,piVar12 + 0x18)" identifier = (call_expression "FUN_0006dc14(uVar1,piVar12 + 0x18)" identifier (argument_list "(uVar1,piVar12 + 0x18)" ( identifier , (binary_expression "piVar12 + 0x18" identifier + number_literal) )))) ;) (if_statement "if (iVar5 < 4) {\n    (*(code *)PTR_FUN_001311f0)(PTR_FUN_001311a4 + -0x1eb8,PTR_FUN_001311a4 + -0x1ec4);\n  }" if (parenthesized_expression "(iVar5 < 4)" ( (binary_expression "iVar5 < 4" identifier < number_literal) )) (compound_statement "{\n    (*(code *)PTR_FUN_001311f0)(PTR_FUN_001311a4 + -0x1eb8,PTR_FUN_001311a4 + -0x1ec4);\n  }" { (expression_statement "(*(code *)PTR_FUN_001311f0)(PTR_FUN_001311a4 + -0x1eb8,PTR_FUN_001311a4 + -0x1ec4);" (call_expression "(*(code *)PTR_FUN_001311f0)(PTR_FUN_001311a4 + -0x1eb8,PTR_FUN_001311a4 + -0x1ec4)" (parenthesized_expression "(*(code *)PTR_FUN_001311f0)" ( (pointer_expression "*(code *)PTR_FUN_001311f0" * (cast_expression "(code *)PTR_FUN_001311f0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_FUN_001311a4 + -0x1eb8,PTR_FUN_001311a4 + -0x1ec4)" ( (binary_expression "PTR_FUN_001311a4 + -0x1eb8" identifier + number_literal) , (binary_expression "PTR_FUN_001311a4 + -0x1ec4" identifier + number_literal) ))) ;) })) (expression_statement "(*(code *)PTR_fclose_00131d88)(uVar1);" (call_expression "(*(code *)PTR_fclose_00131d88)(uVar1)" (parenthesized_expression "(*(code *)PTR_fclose_00131d88)" ( (pointer_expression "*(code *)PTR_fclose_00131d88" * (cast_expression "(code *)PTR_fclose_00131d88" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar1)" ( identifier ))) ;) (expression_statement "piVar12[0x40] = 0;" (assignment_expression "piVar12[0x40] = 0" (subscript_expression "piVar12[0x40]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3 = (undefined4 *)(*(code *)PTR_FUN_00131240)(piVar12[1] << 3);" (assignment_expression "puVar3 = (undefined4 *)(*(code *)PTR_FUN_00131240)(piVar12[1] << 3)" identifier = (cast_expression "(undefined4 *)(*(code *)PTR_FUN_00131240)(piVar12[1] << 3)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_FUN_00131240)(piVar12[1] << 3)" (parenthesized_expression "(*(code *)PTR_FUN_00131240)" ( (pointer_expression "*(code *)PTR_FUN_00131240" * (cast_expression "(code *)PTR_FUN_00131240" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar12[1] << 3)" ( (binary_expression "piVar12[1] << 3" (subscript_expression "piVar12[1]" identifier [ number_literal ]) << number_literal) ))))) ;) (if_statement "if (0 < piVar12[1]) {\n    iVar7 = 0;\n    uVar6 = 0;\n    iVar5 = 0;\n    puVar4 = puVar3;\n    do {\n      iVar9 = *piVar12 + iVar7;\n      iVar11 = *(int *)(iVar9 + 0xc);\n      *puVar4 = *(undefined4 *)(iVar9 + 4);\n      puVar4[1] = iVar11;\n      *(undefined4 *)(iVar9 + 8) = 0;\n      uVar10 = piVar12[0x16];\n      if (uVar10 != 0) {\n        uVar13 = uVar6;\n        do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);\n      }\n      iVar5 = iVar5 + 1;\n      iVar7 = iVar7 + 0x2c;\n      puVar4 = puVar4 + 2;\n    } while (iVar5 < piVar12[1]);\n  }" if (parenthesized_expression "(0 < piVar12[1])" ( (binary_expression "0 < piVar12[1]" number_literal < (subscript_expression "piVar12[1]" identifier [ number_literal ])) )) (compound_statement "{\n    iVar7 = 0;\n    uVar6 = 0;\n    iVar5 = 0;\n    puVar4 = puVar3;\n    do {\n      iVar9 = *piVar12 + iVar7;\n      iVar11 = *(int *)(iVar9 + 0xc);\n      *puVar4 = *(undefined4 *)(iVar9 + 4);\n      puVar4[1] = iVar11;\n      *(undefined4 *)(iVar9 + 8) = 0;\n      uVar10 = piVar12[0x16];\n      if (uVar10 != 0) {\n        uVar13 = uVar6;\n        do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);\n      }\n      iVar5 = iVar5 + 1;\n      iVar7 = iVar7 + 0x2c;\n      puVar4 = puVar4 + 2;\n    } while (iVar5 < piVar12[1]);\n  }" { (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" identifier = number_literal) ;) (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" identifier = number_literal) ;) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (expression_statement "puVar4 = puVar3;" (assignment_expression "puVar4 = puVar3" identifier = identifier) ;) (do_statement "do {\n      iVar9 = *piVar12 + iVar7;\n      iVar11 = *(int *)(iVar9 + 0xc);\n      *puVar4 = *(undefined4 *)(iVar9 + 4);\n      puVar4[1] = iVar11;\n      *(undefined4 *)(iVar9 + 8) = 0;\n      uVar10 = piVar12[0x16];\n      if (uVar10 != 0) {\n        uVar13 = uVar6;\n        do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);\n      }\n      iVar5 = iVar5 + 1;\n      iVar7 = iVar7 + 0x2c;\n      puVar4 = puVar4 + 2;\n    } while (iVar5 < piVar12[1]);" do (compound_statement "{\n      iVar9 = *piVar12 + iVar7;\n      iVar11 = *(int *)(iVar9 + 0xc);\n      *puVar4 = *(undefined4 *)(iVar9 + 4);\n      puVar4[1] = iVar11;\n      *(undefined4 *)(iVar9 + 8) = 0;\n      uVar10 = piVar12[0x16];\n      if (uVar10 != 0) {\n        uVar13 = uVar6;\n        do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);\n      }\n      iVar5 = iVar5 + 1;\n      iVar7 = iVar7 + 0x2c;\n      puVar4 = puVar4 + 2;\n    }" { (expression_statement "iVar9 = *piVar12 + iVar7;" (assignment_expression "iVar9 = *piVar12 + iVar7" identifier = (binary_expression "*piVar12 + iVar7" (pointer_expression "*piVar12" * identifier) + identifier)) ;) (expression_statement "iVar11 = *(int *)(iVar9 + 0xc);" (assignment_expression "iVar11 = *(int *)(iVar9 + 0xc)" identifier = (pointer_expression "*(int *)(iVar9 + 0xc)" * (cast_expression "(int *)(iVar9 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar9 + 0xc)" ( (binary_expression "iVar9 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "*puVar4 = *(undefined4 *)(iVar9 + 4);" (assignment_expression "*puVar4 = *(undefined4 *)(iVar9 + 4)" (pointer_expression "*puVar4" * identifier) = (pointer_expression "*(undefined4 *)(iVar9 + 4)" * (cast_expression "(undefined4 *)(iVar9 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar9 + 4)" ( (binary_expression "iVar9 + 4" identifier + number_literal) ))))) ;) (expression_statement "puVar4[1] = iVar11;" (assignment_expression "puVar4[1] = iVar11" (subscript_expression "puVar4[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*(undefined4 *)(iVar9 + 8) = 0;" (assignment_expression "*(undefined4 *)(iVar9 + 8) = 0" (pointer_expression "*(undefined4 *)(iVar9 + 8)" * (cast_expression "(undefined4 *)(iVar9 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar9 + 8)" ( (binary_expression "iVar9 + 8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "uVar10 = piVar12[0x16];" (assignment_expression "uVar10 = piVar12[0x16]" identifier = (subscript_expression "piVar12[0x16]" identifier [ number_literal ])) ;) (if_statement "if (uVar10 != 0) {\n        uVar13 = uVar6;\n        do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);\n      }" if (parenthesized_expression "(uVar10 != 0)" ( (binary_expression "uVar10 != 0" identifier != number_literal) )) (compound_statement "{\n        uVar13 = uVar6;\n        do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);\n      }" { (expression_statement "uVar13 = uVar6;" (assignment_expression "uVar13 = uVar6" identifier = identifier) ;) (do_statement "do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);" do (compound_statement "{\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        }" { (expression_statement "piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);" (assignment_expression "piVar8 = (int *)(piVar12[0x15] + uVar13 * 8)" identifier = (cast_expression "(int *)(piVar12[0x15] + uVar13 * 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar12[0x15] + uVar13 * 8)" ( (binary_expression "piVar12[0x15] + uVar13 * 8" (subscript_expression "piVar12[0x15]" identifier [ number_literal ]) + (binary_expression "uVar13 * 8" identifier * number_literal)) )))) ;) (if_statement "if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }" if (parenthesized_expression "(piVar8[1] == iVar11)" ( (binary_expression "piVar8[1] == iVar11" (subscript_expression "piVar8[1]" identifier [ number_literal ]) == identifier) )) (compound_statement "{\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }" { (expression_statement "iVar11 = *(int *)(iVar9 + 4) - *piVar8;" (assignment_expression "iVar11 = *(int *)(iVar9 + 4) - *piVar8" identifier = (binary_expression "*(int *)(iVar9 + 4) - *piVar8" (pointer_expression "*(int *)(iVar9 + 4)" * (cast_expression "(int *)(iVar9 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar9 + 4)" ( (binary_expression "iVar9 + 4" identifier + number_literal) )))) - (pointer_expression "*piVar8" * identifier))) ;) (expression_statement "*(int *)(iVar9 + 8) = iVar11;" (assignment_expression "*(int *)(iVar9 + 8) = iVar11" (pointer_expression "*(int *)(iVar9 + 8)" * (cast_expression "(int *)(iVar9 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar9 + 8)" ( (binary_expression "iVar9 + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "piVar12[0x40] = piVar12[0x40] + iVar11;" (assignment_expression "piVar12[0x40] = piVar12[0x40] + iVar11" (subscript_expression "piVar12[0x40]" identifier [ number_literal ]) = (binary_expression "piVar12[0x40] + iVar11" (subscript_expression "piVar12[0x40]" identifier [ number_literal ]) + identifier)) ;) (expression_statement "uVar6 = uVar13;" (assignment_expression "uVar6 = uVar13" identifier = identifier) ;) (break_statement "break;" break ;) })) (if_statement "if (uVar10 == 0) {\n            trap(7);\n          }" if (parenthesized_expression "(uVar10 == 0)" ( (binary_expression "uVar10 == 0" identifier == number_literal) )) (compound_statement "{\n            trap(7);\n          }" { (expression_statement "trap(7);" (call_expression "trap(7)" identifier (argument_list "(7)" ( number_literal ))) ;) })) (expression_statement "uVar13 = (uVar13 + 1) % uVar10;" (assignment_expression "uVar13 = (uVar13 + 1) % uVar10" identifier = (binary_expression "(uVar13 + 1) % uVar10" (parenthesized_expression "(uVar13 + 1)" ( (binary_expression "uVar13 + 1" identifier + number_literal) )) % identifier)) ;) }) while (parenthesized_expression "(uVar13 != uVar6)" ( (binary_expression "uVar13 != uVar6" identifier != identifier) )) ;) })) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "iVar7 = iVar7 + 0x2c;" (assignment_expression "iVar7 = iVar7 + 0x2c" identifier = (binary_expression "iVar7 + 0x2c" identifier + number_literal)) ;) (expression_statement "puVar4 = puVar4 + 2;" (assignment_expression "puVar4 = puVar4 + 2" identifier = (binary_expression "puVar4 + 2" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar5 < piVar12[1])" ( (binary_expression "iVar5 < piVar12[1]" identifier < (subscript_expression "piVar12[1]" identifier [ number_literal ])) )) ;) })) (expression_statement "(*(code *)PTR_free_00132180)(piVar12[0x15]);" (call_expression "(*(code *)PTR_free_00132180)(piVar12[0x15])" (parenthesized_expression "(*(code *)PTR_free_00132180)" ( (pointer_expression "*(code *)PTR_free_00132180" * (cast_expression "(code *)PTR_free_00132180" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar12[0x15])" ( (subscript_expression "piVar12[0x15]" identifier [ number_literal ]) ))) ;) (expression_statement "piVar12[0x15] = (int)puVar3;" (assignment_expression "piVar12[0x15] = (int)puVar3" (subscript_expression "piVar12[0x15]" identifier [ number_literal ]) = (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "piVar12[0x16] = piVar12[1];" (assignment_expression "piVar12[0x16] = piVar12[1]" (subscript_expression "piVar12[0x16]" identifier [ number_literal ]) = (subscript_expression "piVar12[1]" identifier [ number_literal ])) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Unknown calling convention -- yet parameter storage is locked */\n\nvoid do_stats(void)\n\n{\n  FILE *fp;\n  int *piVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  int *piVar7;\n  int iVar8;\n  uint uVar9;\n  int iVar10;\n  int *piVar11;\n  uint uVar12;\n  \n  fp = (FILE *)(*(code *)PTR_xfopen_for_read_001313c0)(PTR_bdcommands_4__name_4__001311a4 + -0x63c4)\n  ;\n  piVar11 = *(int **)PTR_ptr_to_globals_00131330;\n  piVar1 = piVar11 + 0x18;\n  piVar7 = piVar11 + 0x2c;\n  do {\n    iVar8 = piVar1[1];\n    iVar6 = piVar1[2];\n    iVar4 = piVar1[3];\n    *piVar7 = *piVar1;\n    piVar7[1] = iVar8;\n    piVar7[2] = iVar6;\n    piVar7[3] = iVar4;\n    piVar1 = piVar1 + 4;\n    piVar7 = piVar7 + 4;\n  } while (piVar1 != piVar11 + 0x2c);\n  iVar4 = read_cpu_jiffy(fp,(jiffy_counts_t *)(piVar11 + 0x18));\n  if (iVar4 < 4) {\n    (*(code *)PTR_bb_error_msg_and_die_001311f0)\n              (PTR_bdcommands_4__name_4__001311a4 + -0x1eb8,\n               PTR_bdcommands_4__name_4__001311a4 + -0x1ec4);\n  }\n  (*(code *)PTR_fclose_00131d88)(fp);\n  piVar11[0x40] = 0;\n  puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_00131240)(piVar11[1] << 3);\n  if (0 < piVar11[1]) {\n    iVar6 = 0;\n    uVar5 = 0;\n    iVar4 = 0;\n    puVar3 = puVar2;\n    do {\n      iVar8 = *piVar11 + iVar6;\n      iVar10 = *(int *)(iVar8 + 0xc);\n      *puVar3 = *(undefined4 *)(iVar8 + 4);\n      puVar3[1] = iVar10;\n      *(undefined4 *)(iVar8 + 8) = 0;\n      uVar9 = piVar11[0x16];\n      if (uVar9 != 0) {\n        uVar12 = uVar5;\n        do {\n          piVar7 = (int *)(piVar11[0x15] + uVar12 * 8);\n          if (piVar7[1] == iVar10) {\n            iVar10 = *(int *)(iVar8 + 4) - *piVar7;\n            *(int *)(iVar8 + 8) = iVar10;\n            piVar11[0x40] = piVar11[0x40] + iVar10;\n            uVar5 = uVar12;\n            break;\n          }\n          if (uVar9 == 0) {\n            trap(7);\n          }\n          uVar12 = (uVar12 + 1) % uVar9;\n        } while (uVar12 != uVar5);\n      }\n      iVar4 = iVar4 + 1;\n      iVar6 = iVar6 + 0x2c;\n      puVar3 = puVar3 + 2;\n    } while (iVar4 < piVar11[1]);\n  }\n  (*(code *)PTR_free_00132180)(piVar11[0x15]);\n  piVar11[0x15] = (int)puVar2;\n  piVar11[0x16] = piVar11[1];\n  return;\n}\n\n" comment (function_definition "void do_stats(void)\n\n{\n  FILE *fp;\n  int *piVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  int *piVar7;\n  int iVar8;\n  uint uVar9;\n  int iVar10;\n  int *piVar11;\n  uint uVar12;\n  \n  fp = (FILE *)(*(code *)PTR_xfopen_for_read_001313c0)(PTR_bdcommands_4__name_4__001311a4 + -0x63c4)\n  ;\n  piVar11 = *(int **)PTR_ptr_to_globals_00131330;\n  piVar1 = piVar11 + 0x18;\n  piVar7 = piVar11 + 0x2c;\n  do {\n    iVar8 = piVar1[1];\n    iVar6 = piVar1[2];\n    iVar4 = piVar1[3];\n    *piVar7 = *piVar1;\n    piVar7[1] = iVar8;\n    piVar7[2] = iVar6;\n    piVar7[3] = iVar4;\n    piVar1 = piVar1 + 4;\n    piVar7 = piVar7 + 4;\n  } while (piVar1 != piVar11 + 0x2c);\n  iVar4 = read_cpu_jiffy(fp,(jiffy_counts_t *)(piVar11 + 0x18));\n  if (iVar4 < 4) {\n    (*(code *)PTR_bb_error_msg_and_die_001311f0)\n              (PTR_bdcommands_4__name_4__001311a4 + -0x1eb8,\n               PTR_bdcommands_4__name_4__001311a4 + -0x1ec4);\n  }\n  (*(code *)PTR_fclose_00131d88)(fp);\n  piVar11[0x40] = 0;\n  puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_00131240)(piVar11[1] << 3);\n  if (0 < piVar11[1]) {\n    iVar6 = 0;\n    uVar5 = 0;\n    iVar4 = 0;\n    puVar3 = puVar2;\n    do {\n      iVar8 = *piVar11 + iVar6;\n      iVar10 = *(int *)(iVar8 + 0xc);\n      *puVar3 = *(undefined4 *)(iVar8 + 4);\n      puVar3[1] = iVar10;\n      *(undefined4 *)(iVar8 + 8) = 0;\n      uVar9 = piVar11[0x16];\n      if (uVar9 != 0) {\n        uVar12 = uVar5;\n        do {\n          piVar7 = (int *)(piVar11[0x15] + uVar12 * 8);\n          if (piVar7[1] == iVar10) {\n            iVar10 = *(int *)(iVar8 + 4) - *piVar7;\n            *(int *)(iVar8 + 8) = iVar10;\n            piVar11[0x40] = piVar11[0x40] + iVar10;\n            uVar5 = uVar12;\n            break;\n          }\n          if (uVar9 == 0) {\n            trap(7);\n          }\n          uVar12 = (uVar12 + 1) % uVar9;\n        } while (uVar12 != uVar5);\n      }\n      iVar4 = iVar4 + 1;\n      iVar6 = iVar6 + 0x2c;\n      puVar3 = puVar3 + 2;\n    } while (iVar4 < piVar11[1]);\n  }\n  (*(code *)PTR_free_00132180)(piVar11[0x15]);\n  piVar11[0x15] = (int)puVar2;\n  piVar11[0x16] = piVar11[1];\n  return;\n}" primitive_type (function_declarator "do_stats(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  FILE *fp;\n  int *piVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  int *piVar7;\n  int iVar8;\n  uint uVar9;\n  int iVar10;\n  int *piVar11;\n  uint uVar12;\n  \n  fp = (FILE *)(*(code *)PTR_xfopen_for_read_001313c0)(PTR_bdcommands_4__name_4__001311a4 + -0x63c4)\n  ;\n  piVar11 = *(int **)PTR_ptr_to_globals_00131330;\n  piVar1 = piVar11 + 0x18;\n  piVar7 = piVar11 + 0x2c;\n  do {\n    iVar8 = piVar1[1];\n    iVar6 = piVar1[2];\n    iVar4 = piVar1[3];\n    *piVar7 = *piVar1;\n    piVar7[1] = iVar8;\n    piVar7[2] = iVar6;\n    piVar7[3] = iVar4;\n    piVar1 = piVar1 + 4;\n    piVar7 = piVar7 + 4;\n  } while (piVar1 != piVar11 + 0x2c);\n  iVar4 = read_cpu_jiffy(fp,(jiffy_counts_t *)(piVar11 + 0x18));\n  if (iVar4 < 4) {\n    (*(code *)PTR_bb_error_msg_and_die_001311f0)\n              (PTR_bdcommands_4__name_4__001311a4 + -0x1eb8,\n               PTR_bdcommands_4__name_4__001311a4 + -0x1ec4);\n  }\n  (*(code *)PTR_fclose_00131d88)(fp);\n  piVar11[0x40] = 0;\n  puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_00131240)(piVar11[1] << 3);\n  if (0 < piVar11[1]) {\n    iVar6 = 0;\n    uVar5 = 0;\n    iVar4 = 0;\n    puVar3 = puVar2;\n    do {\n      iVar8 = *piVar11 + iVar6;\n      iVar10 = *(int *)(iVar8 + 0xc);\n      *puVar3 = *(undefined4 *)(iVar8 + 4);\n      puVar3[1] = iVar10;\n      *(undefined4 *)(iVar8 + 8) = 0;\n      uVar9 = piVar11[0x16];\n      if (uVar9 != 0) {\n        uVar12 = uVar5;\n        do {\n          piVar7 = (int *)(piVar11[0x15] + uVar12 * 8);\n          if (piVar7[1] == iVar10) {\n            iVar10 = *(int *)(iVar8 + 4) - *piVar7;\n            *(int *)(iVar8 + 8) = iVar10;\n            piVar11[0x40] = piVar11[0x40] + iVar10;\n            uVar5 = uVar12;\n            break;\n          }\n          if (uVar9 == 0) {\n            trap(7);\n          }\n          uVar12 = (uVar12 + 1) % uVar9;\n        } while (uVar12 != uVar5);\n      }\n      iVar4 = iVar4 + 1;\n      iVar6 = iVar6 + 0x2c;\n      puVar3 = puVar3 + 2;\n    } while (iVar4 < piVar11[1]);\n  }\n  (*(code *)PTR_free_00132180)(piVar11[0x15]);\n  piVar11[0x15] = (int)puVar2;\n  piVar11[0x16] = piVar11[1];\n  return;\n}" { (declaration "FILE *fp;" type_identifier (pointer_declarator "*fp" * identifier) ;) (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * 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) ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "uint uVar9;" type_identifier identifier ;) (declaration "int iVar10;" primitive_type identifier ;) (declaration "int *piVar11;" primitive_type (pointer_declarator "*piVar11" * identifier) ;) (declaration "uint uVar12;" type_identifier identifier ;) (expression_statement "fp = (FILE *)(*(code *)PTR_xfopen_for_read_001313c0)(PTR_bdcommands_4__name_4__001311a4 + -0x63c4)\n  ;" (assignment_expression "fp = (FILE *)(*(code *)PTR_xfopen_for_read_001313c0)(PTR_bdcommands_4__name_4__001311a4 + -0x63c4)" identifier = (cast_expression "(FILE *)(*(code *)PTR_xfopen_for_read_001313c0)(PTR_bdcommands_4__name_4__001311a4 + -0x63c4)" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_xfopen_for_read_001313c0)(PTR_bdcommands_4__name_4__001311a4 + -0x63c4)" (parenthesized_expression "(*(code *)PTR_xfopen_for_read_001313c0)" ( (pointer_expression "*(code *)PTR_xfopen_for_read_001313c0" * (cast_expression "(code *)PTR_xfopen_for_read_001313c0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_bdcommands_4__name_4__001311a4 + -0x63c4)" ( (binary_expression "PTR_bdcommands_4__name_4__001311a4 + -0x63c4" identifier + number_literal) ))))) ;) (expression_statement "piVar11 = *(int **)PTR_ptr_to_globals_00131330;" (assignment_expression "piVar11 = *(int **)PTR_ptr_to_globals_00131330" identifier = (pointer_expression "*(int **)PTR_ptr_to_globals_00131330" * (cast_expression "(int **)PTR_ptr_to_globals_00131330" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "piVar1 = piVar11 + 0x18;" (assignment_expression "piVar1 = piVar11 + 0x18" identifier = (binary_expression "piVar11 + 0x18" identifier + number_literal)) ;) (expression_statement "piVar7 = piVar11 + 0x2c;" (assignment_expression "piVar7 = piVar11 + 0x2c" identifier = (binary_expression "piVar11 + 0x2c" identifier + number_literal)) ;) (do_statement "do {\n    iVar8 = piVar1[1];\n    iVar6 = piVar1[2];\n    iVar4 = piVar1[3];\n    *piVar7 = *piVar1;\n    piVar7[1] = iVar8;\n    piVar7[2] = iVar6;\n    piVar7[3] = iVar4;\n    piVar1 = piVar1 + 4;\n    piVar7 = piVar7 + 4;\n  } while (piVar1 != piVar11 + 0x2c);" do (compound_statement "{\n    iVar8 = piVar1[1];\n    iVar6 = piVar1[2];\n    iVar4 = piVar1[3];\n    *piVar7 = *piVar1;\n    piVar7[1] = iVar8;\n    piVar7[2] = iVar6;\n    piVar7[3] = iVar4;\n    piVar1 = piVar1 + 4;\n    piVar7 = piVar7 + 4;\n  }" { (expression_statement "iVar8 = piVar1[1];" (assignment_expression "iVar8 = piVar1[1]" identifier = (subscript_expression "piVar1[1]" identifier [ number_literal ])) ;) (expression_statement "iVar6 = piVar1[2];" (assignment_expression "iVar6 = piVar1[2]" identifier = (subscript_expression "piVar1[2]" identifier [ number_literal ])) ;) (expression_statement "iVar4 = piVar1[3];" (assignment_expression "iVar4 = piVar1[3]" identifier = (subscript_expression "piVar1[3]" identifier [ number_literal ])) ;) (expression_statement "*piVar7 = *piVar1;" (assignment_expression "*piVar7 = *piVar1" (pointer_expression "*piVar7" * identifier) = (pointer_expression "*piVar1" * identifier)) ;) (expression_statement "piVar7[1] = iVar8;" (assignment_expression "piVar7[1] = iVar8" (subscript_expression "piVar7[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "piVar7[2] = iVar6;" (assignment_expression "piVar7[2] = iVar6" (subscript_expression "piVar7[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "piVar7[3] = iVar4;" (assignment_expression "piVar7[3] = iVar4" (subscript_expression "piVar7[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "piVar1 = piVar1 + 4;" (assignment_expression "piVar1 = piVar1 + 4" identifier = (binary_expression "piVar1 + 4" identifier + number_literal)) ;) (expression_statement "piVar7 = piVar7 + 4;" (assignment_expression "piVar7 = piVar7 + 4" identifier = (binary_expression "piVar7 + 4" identifier + number_literal)) ;) }) while (parenthesized_expression "(piVar1 != piVar11 + 0x2c)" ( (binary_expression "piVar1 != piVar11 + 0x2c" identifier != (binary_expression "piVar11 + 0x2c" identifier + number_literal)) )) ;) (expression_statement "iVar4 = read_cpu_jiffy(fp,(jiffy_counts_t *)(piVar11 + 0x18));" (assignment_expression "iVar4 = read_cpu_jiffy(fp,(jiffy_counts_t *)(piVar11 + 0x18))" identifier = (call_expression "read_cpu_jiffy(fp,(jiffy_counts_t *)(piVar11 + 0x18))" identifier (argument_list "(fp,(jiffy_counts_t *)(piVar11 + 0x18))" ( identifier , (cast_expression "(jiffy_counts_t *)(piVar11 + 0x18)" ( (type_descriptor "jiffy_counts_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar11 + 0x18)" ( (binary_expression "piVar11 + 0x18" identifier + number_literal) ))) )))) ;) (if_statement "if (iVar4 < 4) {\n    (*(code *)PTR_bb_error_msg_and_die_001311f0)\n              (PTR_bdcommands_4__name_4__001311a4 + -0x1eb8,\n               PTR_bdcommands_4__name_4__001311a4 + -0x1ec4);\n  }" if (parenthesized_expression "(iVar4 < 4)" ( (binary_expression "iVar4 < 4" identifier < number_literal) )) (compound_statement "{\n    (*(code *)PTR_bb_error_msg_and_die_001311f0)\n              (PTR_bdcommands_4__name_4__001311a4 + -0x1eb8,\n               PTR_bdcommands_4__name_4__001311a4 + -0x1ec4);\n  }" { (expression_statement "(*(code *)PTR_bb_error_msg_and_die_001311f0)\n              (PTR_bdcommands_4__name_4__001311a4 + -0x1eb8,\n               PTR_bdcommands_4__name_4__001311a4 + -0x1ec4);" (call_expression "(*(code *)PTR_bb_error_msg_and_die_001311f0)\n              (PTR_bdcommands_4__name_4__001311a4 + -0x1eb8,\n               PTR_bdcommands_4__name_4__001311a4 + -0x1ec4)" (parenthesized_expression "(*(code *)PTR_bb_error_msg_and_die_001311f0)" ( (pointer_expression "*(code *)PTR_bb_error_msg_and_die_001311f0" * (cast_expression "(code *)PTR_bb_error_msg_and_die_001311f0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_bdcommands_4__name_4__001311a4 + -0x1eb8,\n               PTR_bdcommands_4__name_4__001311a4 + -0x1ec4)" ( (binary_expression "PTR_bdcommands_4__name_4__001311a4 + -0x1eb8" identifier + number_literal) , (binary_expression "PTR_bdcommands_4__name_4__001311a4 + -0x1ec4" identifier + number_literal) ))) ;) })) (expression_statement "(*(code *)PTR_fclose_00131d88)(fp);" (call_expression "(*(code *)PTR_fclose_00131d88)(fp)" (parenthesized_expression "(*(code *)PTR_fclose_00131d88)" ( (pointer_expression "*(code *)PTR_fclose_00131d88" * (cast_expression "(code *)PTR_fclose_00131d88" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(fp)" ( identifier ))) ;) (expression_statement "piVar11[0x40] = 0;" (assignment_expression "piVar11[0x40] = 0" (subscript_expression "piVar11[0x40]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_00131240)(piVar11[1] << 3);" (assignment_expression "puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_00131240)(piVar11[1] << 3)" identifier = (cast_expression "(undefined4 *)(*(code *)PTR_xmalloc_00131240)(piVar11[1] << 3)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_xmalloc_00131240)(piVar11[1] << 3)" (parenthesized_expression "(*(code *)PTR_xmalloc_00131240)" ( (pointer_expression "*(code *)PTR_xmalloc_00131240" * (cast_expression "(code *)PTR_xmalloc_00131240" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar11[1] << 3)" ( (binary_expression "piVar11[1] << 3" (subscript_expression "piVar11[1]" identifier [ number_literal ]) << number_literal) ))))) ;) (if_statement "if (0 < piVar11[1]) {\n    iVar6 = 0;\n    uVar5 = 0;\n    iVar4 = 0;\n    puVar3 = puVar2;\n    do {\n      iVar8 = *piVar11 + iVar6;\n      iVar10 = *(int *)(iVar8 + 0xc);\n      *puVar3 = *(undefined4 *)(iVar8 + 4);\n      puVar3[1] = iVar10;\n      *(undefined4 *)(iVar8 + 8) = 0;\n      uVar9 = piVar11[0x16];\n      if (uVar9 != 0) {\n        uVar12 = uVar5;\n        do {\n          piVar7 = (int *)(piVar11[0x15] + uVar12 * 8);\n          if (piVar7[1] == iVar10) {\n            iVar10 = *(int *)(iVar8 + 4) - *piVar7;\n            *(int *)(iVar8 + 8) = iVar10;\n            piVar11[0x40] = piVar11[0x40] + iVar10;\n            uVar5 = uVar12;\n            break;\n          }\n          if (uVar9 == 0) {\n            trap(7);\n          }\n          uVar12 = (uVar12 + 1) % uVar9;\n        } while (uVar12 != uVar5);\n      }\n      iVar4 = iVar4 + 1;\n      iVar6 = iVar6 + 0x2c;\n      puVar3 = puVar3 + 2;\n    } while (iVar4 < piVar11[1]);\n  }" if (parenthesized_expression "(0 < piVar11[1])" ( (binary_expression "0 < piVar11[1]" number_literal < (subscript_expression "piVar11[1]" identifier [ number_literal ])) )) (compound_statement "{\n    iVar6 = 0;\n    uVar5 = 0;\n    iVar4 = 0;\n    puVar3 = puVar2;\n    do {\n      iVar8 = *piVar11 + iVar6;\n      iVar10 = *(int *)(iVar8 + 0xc);\n      *puVar3 = *(undefined4 *)(iVar8 + 4);\n      puVar3[1] = iVar10;\n      *(undefined4 *)(iVar8 + 8) = 0;\n      uVar9 = piVar11[0x16];\n      if (uVar9 != 0) {\n        uVar12 = uVar5;\n        do {\n          piVar7 = (int *)(piVar11[0x15] + uVar12 * 8);\n          if (piVar7[1] == iVar10) {\n            iVar10 = *(int *)(iVar8 + 4) - *piVar7;\n            *(int *)(iVar8 + 8) = iVar10;\n            piVar11[0x40] = piVar11[0x40] + iVar10;\n            uVar5 = uVar12;\n            break;\n          }\n          if (uVar9 == 0) {\n            trap(7);\n          }\n          uVar12 = (uVar12 + 1) % uVar9;\n        } while (uVar12 != uVar5);\n      }\n      iVar4 = iVar4 + 1;\n      iVar6 = iVar6 + 0x2c;\n      puVar3 = puVar3 + 2;\n    } while (iVar4 < piVar11[1]);\n  }" { (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (expression_statement "puVar3 = puVar2;" (assignment_expression "puVar3 = puVar2" identifier = identifier) ;) (do_statement "do {\n      iVar8 = *piVar11 + iVar6;\n      iVar10 = *(int *)(iVar8 + 0xc);\n      *puVar3 = *(undefined4 *)(iVar8 + 4);\n      puVar3[1] = iVar10;\n      *(undefined4 *)(iVar8 + 8) = 0;\n      uVar9 = piVar11[0x16];\n      if (uVar9 != 0) {\n        uVar12 = uVar5;\n        do {\n          piVar7 = (int *)(piVar11[0x15] + uVar12 * 8);\n          if (piVar7[1] == iVar10) {\n            iVar10 = *(int *)(iVar8 + 4) - *piVar7;\n            *(int *)(iVar8 + 8) = iVar10;\n            piVar11[0x40] = piVar11[0x40] + iVar10;\n            uVar5 = uVar12;\n            break;\n          }\n          if (uVar9 == 0) {\n            trap(7);\n          }\n          uVar12 = (uVar12 + 1) % uVar9;\n        } while (uVar12 != uVar5);\n      }\n      iVar4 = iVar4 + 1;\n      iVar6 = iVar6 + 0x2c;\n      puVar3 = puVar3 + 2;\n    } while (iVar4 < piVar11[1]);" do (compound_statement "{\n      iVar8 = *piVar11 + iVar6;\n      iVar10 = *(int *)(iVar8 + 0xc);\n      *puVar3 = *(undefined4 *)(iVar8 + 4);\n      puVar3[1] = iVar10;\n      *(undefined4 *)(iVar8 + 8) = 0;\n      uVar9 = piVar11[0x16];\n      if (uVar9 != 0) {\n        uVar12 = uVar5;\n        do {\n          piVar7 = (int *)(piVar11[0x15] + uVar12 * 8);\n          if (piVar7[1] == iVar10) {\n            iVar10 = *(int *)(iVar8 + 4) - *piVar7;\n            *(int *)(iVar8 + 8) = iVar10;\n            piVar11[0x40] = piVar11[0x40] + iVar10;\n            uVar5 = uVar12;\n            break;\n          }\n          if (uVar9 == 0) {\n            trap(7);\n          }\n          uVar12 = (uVar12 + 1) % uVar9;\n        } while (uVar12 != uVar5);\n      }\n      iVar4 = iVar4 + 1;\n      iVar6 = iVar6 + 0x2c;\n      puVar3 = puVar3 + 2;\n    }" { (expression_statement "iVar8 = *piVar11 + iVar6;" (assignment_expression "iVar8 = *piVar11 + iVar6" identifier = (binary_expression "*piVar11 + iVar6" (pointer_expression "*piVar11" * identifier) + identifier)) ;) (expression_statement "iVar10 = *(int *)(iVar8 + 0xc);" (assignment_expression "iVar10 = *(int *)(iVar8 + 0xc)" identifier = (pointer_expression "*(int *)(iVar8 + 0xc)" * (cast_expression "(int *)(iVar8 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + 0xc)" ( (binary_expression "iVar8 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "*puVar3 = *(undefined4 *)(iVar8 + 4);" (assignment_expression "*puVar3 = *(undefined4 *)(iVar8 + 4)" (pointer_expression "*puVar3" * identifier) = (pointer_expression "*(undefined4 *)(iVar8 + 4)" * (cast_expression "(undefined4 *)(iVar8 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + 4)" ( (binary_expression "iVar8 + 4" identifier + number_literal) ))))) ;) (expression_statement "puVar3[1] = iVar10;" (assignment_expression "puVar3[1] = iVar10" (subscript_expression "puVar3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*(undefined4 *)(iVar8 + 8) = 0;" (assignment_expression "*(undefined4 *)(iVar8 + 8) = 0" (pointer_expression "*(undefined4 *)(iVar8 + 8)" * (cast_expression "(undefined4 *)(iVar8 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + 8)" ( (binary_expression "iVar8 + 8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "uVar9 = piVar11[0x16];" (assignment_expression "uVar9 = piVar11[0x16]" identifier = (subscript_expression "piVar11[0x16]" identifier [ number_literal ])) ;) (if_statement "if (uVar9 != 0) {\n        uVar12 = uVar5;\n        do {\n          piVar7 = (int *)(piVar11[0x15] + uVar12 * 8);\n          if (piVar7[1] == iVar10) {\n            iVar10 = *(int *)(iVar8 + 4) - *piVar7;\n            *(int *)(iVar8 + 8) = iVar10;\n            piVar11[0x40] = piVar11[0x40] + iVar10;\n            uVar5 = uVar12;\n            break;\n          }\n          if (uVar9 == 0) {\n            trap(7);\n          }\n          uVar12 = (uVar12 + 1) % uVar9;\n        } while (uVar12 != uVar5);\n      }" if (parenthesized_expression "(uVar9 != 0)" ( (binary_expression "uVar9 != 0" identifier != number_literal) )) (compound_statement "{\n        uVar12 = uVar5;\n        do {\n          piVar7 = (int *)(piVar11[0x15] + uVar12 * 8);\n          if (piVar7[1] == iVar10) {\n            iVar10 = *(int *)(iVar8 + 4) - *piVar7;\n            *(int *)(iVar8 + 8) = iVar10;\n            piVar11[0x40] = piVar11[0x40] + iVar10;\n            uVar5 = uVar12;\n            break;\n          }\n          if (uVar9 == 0) {\n            trap(7);\n          }\n          uVar12 = (uVar12 + 1) % uVar9;\n        } while (uVar12 != uVar5);\n      }" { (expression_statement "uVar12 = uVar5;" (assignment_expression "uVar12 = uVar5" identifier = identifier) ;) (do_statement "do {\n          piVar7 = (int *)(piVar11[0x15] + uVar12 * 8);\n          if (piVar7[1] == iVar10) {\n            iVar10 = *(int *)(iVar8 + 4) - *piVar7;\n            *(int *)(iVar8 + 8) = iVar10;\n            piVar11[0x40] = piVar11[0x40] + iVar10;\n            uVar5 = uVar12;\n            break;\n          }\n          if (uVar9 == 0) {\n            trap(7);\n          }\n          uVar12 = (uVar12 + 1) % uVar9;\n        } while (uVar12 != uVar5);" do (compound_statement "{\n          piVar7 = (int *)(piVar11[0x15] + uVar12 * 8);\n          if (piVar7[1] == iVar10) {\n            iVar10 = *(int *)(iVar8 + 4) - *piVar7;\n            *(int *)(iVar8 + 8) = iVar10;\n            piVar11[0x40] = piVar11[0x40] + iVar10;\n            uVar5 = uVar12;\n            break;\n          }\n          if (uVar9 == 0) {\n            trap(7);\n          }\n          uVar12 = (uVar12 + 1) % uVar9;\n        }" { (expression_statement "piVar7 = (int *)(piVar11[0x15] + uVar12 * 8);" (assignment_expression "piVar7 = (int *)(piVar11[0x15] + uVar12 * 8)" identifier = (cast_expression "(int *)(piVar11[0x15] + uVar12 * 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar11[0x15] + uVar12 * 8)" ( (binary_expression "piVar11[0x15] + uVar12 * 8" (subscript_expression "piVar11[0x15]" identifier [ number_literal ]) + (binary_expression "uVar12 * 8" identifier * number_literal)) )))) ;) (if_statement "if (piVar7[1] == iVar10) {\n            iVar10 = *(int *)(iVar8 + 4) - *piVar7;\n            *(int *)(iVar8 + 8) = iVar10;\n            piVar11[0x40] = piVar11[0x40] + iVar10;\n            uVar5 = uVar12;\n            break;\n          }" if (parenthesized_expression "(piVar7[1] == iVar10)" ( (binary_expression "piVar7[1] == iVar10" (subscript_expression "piVar7[1]" identifier [ number_literal ]) == identifier) )) (compound_statement "{\n            iVar10 = *(int *)(iVar8 + 4) - *piVar7;\n            *(int *)(iVar8 + 8) = iVar10;\n            piVar11[0x40] = piVar11[0x40] + iVar10;\n            uVar5 = uVar12;\n            break;\n          }" { (expression_statement "iVar10 = *(int *)(iVar8 + 4) - *piVar7;" (assignment_expression "iVar10 = *(int *)(iVar8 + 4) - *piVar7" identifier = (binary_expression "*(int *)(iVar8 + 4) - *piVar7" (pointer_expression "*(int *)(iVar8 + 4)" * (cast_expression "(int *)(iVar8 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + 4)" ( (binary_expression "iVar8 + 4" identifier + number_literal) )))) - (pointer_expression "*piVar7" * identifier))) ;) (expression_statement "*(int *)(iVar8 + 8) = iVar10;" (assignment_expression "*(int *)(iVar8 + 8) = iVar10" (pointer_expression "*(int *)(iVar8 + 8)" * (cast_expression "(int *)(iVar8 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + 8)" ( (binary_expression "iVar8 + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "piVar11[0x40] = piVar11[0x40] + iVar10;" (assignment_expression "piVar11[0x40] = piVar11[0x40] + iVar10" (subscript_expression "piVar11[0x40]" identifier [ number_literal ]) = (binary_expression "piVar11[0x40] + iVar10" (subscript_expression "piVar11[0x40]" identifier [ number_literal ]) + identifier)) ;) (expression_statement "uVar5 = uVar12;" (assignment_expression "uVar5 = uVar12" identifier = identifier) ;) (break_statement "break;" break ;) })) (if_statement "if (uVar9 == 0) {\n            trap(7);\n          }" if (parenthesized_expression "(uVar9 == 0)" ( (binary_expression "uVar9 == 0" identifier == number_literal) )) (compound_statement "{\n            trap(7);\n          }" { (expression_statement "trap(7);" (call_expression "trap(7)" identifier (argument_list "(7)" ( number_literal ))) ;) })) (expression_statement "uVar12 = (uVar12 + 1) % uVar9;" (assignment_expression "uVar12 = (uVar12 + 1) % uVar9" identifier = (binary_expression "(uVar12 + 1) % uVar9" (parenthesized_expression "(uVar12 + 1)" ( (binary_expression "uVar12 + 1" identifier + number_literal) )) % identifier)) ;) }) while (parenthesized_expression "(uVar12 != uVar5)" ( (binary_expression "uVar12 != uVar5" identifier != identifier) )) ;) })) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (expression_statement "iVar6 = iVar6 + 0x2c;" (assignment_expression "iVar6 = iVar6 + 0x2c" identifier = (binary_expression "iVar6 + 0x2c" identifier + number_literal)) ;) (expression_statement "puVar3 = puVar3 + 2;" (assignment_expression "puVar3 = puVar3 + 2" identifier = (binary_expression "puVar3 + 2" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar4 < piVar11[1])" ( (binary_expression "iVar4 < piVar11[1]" identifier < (subscript_expression "piVar11[1]" identifier [ number_literal ])) )) ;) })) (expression_statement "(*(code *)PTR_free_00132180)(piVar11[0x15]);" (call_expression "(*(code *)PTR_free_00132180)(piVar11[0x15])" (parenthesized_expression "(*(code *)PTR_free_00132180)" ( (pointer_expression "*(code *)PTR_free_00132180" * (cast_expression "(code *)PTR_free_00132180" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar11[0x15])" ( (subscript_expression "piVar11[0x15]" identifier [ number_literal ]) ))) ;) (expression_statement "piVar11[0x15] = (int)puVar2;" (assignment_expression "piVar11[0x15] = (int)puVar2" (subscript_expression "piVar11[0x15]" identifier [ number_literal ]) = (cast_expression "(int)puVar2" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "piVar11[0x16] = piVar11[1];" (assignment_expression "piVar11[0x16] = piVar11[1]" (subscript_expression "piVar11[0x16]" identifier [ number_literal ]) = (subscript_expression "piVar11[1]" identifier [ number_literal ])) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0006ddd8(void)\n\n{\n  undefined4 uVar1;\n  int *piVar2;\n  undefined4 *puVar3;\n  undefined4 *puVar4;\n  int iVar5;\n  uint uVar6;\n  int iVar7;\n  int *piVar8;\n  int iVar9;\n  uint uVar10;\n  int iVar11;\n  int *piVar12;\n  uint uVar13;\n  \n  uVar1 = (*(code *)PTR_FUN_001313c0)(PTR_FUN_001311a4 + -0x63c4);\n  piVar12 = *(int **)PTR_DAT_00131330;\n  piVar2 = piVar12 + 0x18;\n  piVar8 = piVar12 + 0x2c;\n  do {\n    iVar9 = piVar2[1];\n    iVar7 = piVar2[2];\n    iVar5 = piVar2[3];\n    *piVar8 = *piVar2;\n    piVar8[1] = iVar9;\n    piVar8[2] = iVar7;\n    piVar8[3] = iVar5;\n    piVar2 = piVar2 + 4;\n    piVar8 = piVar8 + 4;\n  } while (piVar2 != piVar12 + 0x2c);\n  iVar5 = FUN_0006dc14(uVar1,piVar12 + 0x18);\n  if (iVar5 < 4) {\n    (*(code *)PTR_FUN_001311f0)(PTR_FUN_001311a4 + -0x1eb8,PTR_FUN_001311a4 + -0x1ec4);\n  }\n  (*(code *)PTR_fclose_00131d88)(uVar1);\n  piVar12[0x40] = 0;\n  puVar3 = (undefined4 *)(*(code *)PTR_FUN_00131240)(piVar12[1] << 3);\n  if (0 < piVar12[1]) {\n    iVar7 = 0;\n    uVar6 = 0;\n    iVar5 = 0;\n    puVar4 = puVar3;\n    do {\n      iVar9 = *piVar12 + iVar7;\n      iVar11 = *(int *)(iVar9 + 0xc);\n      *puVar4 = *(undefined4 *)(iVar9 + 4);\n      puVar4[1] = iVar11;\n      *(undefined4 *)(iVar9 + 8) = 0;\n      uVar10 = piVar12[0x16];\n      if (uVar10 != 0) {\n        uVar13 = uVar6;\n        do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);\n      }\n      iVar5 = iVar5 + 1;\n      iVar7 = iVar7 + 0x2c;\n      puVar4 = puVar4 + 2;\n    } while (iVar5 < piVar12[1]);\n  }\n  (*(code *)PTR_free_00132180)(piVar12[0x15]);\n  piVar12[0x15] = (int)puVar3;\n  piVar12[0x16] = piVar12[1];\n  return;\n}\n\n" (function_definition "void FUN_0006ddd8(void)\n\n{\n  undefined4 uVar1;\n  int *piVar2;\n  undefined4 *puVar3;\n  undefined4 *puVar4;\n  int iVar5;\n  uint uVar6;\n  int iVar7;\n  int *piVar8;\n  int iVar9;\n  uint uVar10;\n  int iVar11;\n  int *piVar12;\n  uint uVar13;\n  \n  uVar1 = (*(code *)PTR_FUN_001313c0)(PTR_FUN_001311a4 + -0x63c4);\n  piVar12 = *(int **)PTR_DAT_00131330;\n  piVar2 = piVar12 + 0x18;\n  piVar8 = piVar12 + 0x2c;\n  do {\n    iVar9 = piVar2[1];\n    iVar7 = piVar2[2];\n    iVar5 = piVar2[3];\n    *piVar8 = *piVar2;\n    piVar8[1] = iVar9;\n    piVar8[2] = iVar7;\n    piVar8[3] = iVar5;\n    piVar2 = piVar2 + 4;\n    piVar8 = piVar8 + 4;\n  } while (piVar2 != piVar12 + 0x2c);\n  iVar5 = FUN_0006dc14(uVar1,piVar12 + 0x18);\n  if (iVar5 < 4) {\n    (*(code *)PTR_FUN_001311f0)(PTR_FUN_001311a4 + -0x1eb8,PTR_FUN_001311a4 + -0x1ec4);\n  }\n  (*(code *)PTR_fclose_00131d88)(uVar1);\n  piVar12[0x40] = 0;\n  puVar3 = (undefined4 *)(*(code *)PTR_FUN_00131240)(piVar12[1] << 3);\n  if (0 < piVar12[1]) {\n    iVar7 = 0;\n    uVar6 = 0;\n    iVar5 = 0;\n    puVar4 = puVar3;\n    do {\n      iVar9 = *piVar12 + iVar7;\n      iVar11 = *(int *)(iVar9 + 0xc);\n      *puVar4 = *(undefined4 *)(iVar9 + 4);\n      puVar4[1] = iVar11;\n      *(undefined4 *)(iVar9 + 8) = 0;\n      uVar10 = piVar12[0x16];\n      if (uVar10 != 0) {\n        uVar13 = uVar6;\n        do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);\n      }\n      iVar5 = iVar5 + 1;\n      iVar7 = iVar7 + 0x2c;\n      puVar4 = puVar4 + 2;\n    } while (iVar5 < piVar12[1]);\n  }\n  (*(code *)PTR_free_00132180)(piVar12[0x15]);\n  piVar12[0x15] = (int)puVar3;\n  piVar12[0x16] = piVar12[1];\n  return;\n}" primitive_type (function_declarator "FUN_0006ddd8(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  undefined4 uVar1;\n  int *piVar2;\n  undefined4 *puVar3;\n  undefined4 *puVar4;\n  int iVar5;\n  uint uVar6;\n  int iVar7;\n  int *piVar8;\n  int iVar9;\n  uint uVar10;\n  int iVar11;\n  int *piVar12;\n  uint uVar13;\n  \n  uVar1 = (*(code *)PTR_FUN_001313c0)(PTR_FUN_001311a4 + -0x63c4);\n  piVar12 = *(int **)PTR_DAT_00131330;\n  piVar2 = piVar12 + 0x18;\n  piVar8 = piVar12 + 0x2c;\n  do {\n    iVar9 = piVar2[1];\n    iVar7 = piVar2[2];\n    iVar5 = piVar2[3];\n    *piVar8 = *piVar2;\n    piVar8[1] = iVar9;\n    piVar8[2] = iVar7;\n    piVar8[3] = iVar5;\n    piVar2 = piVar2 + 4;\n    piVar8 = piVar8 + 4;\n  } while (piVar2 != piVar12 + 0x2c);\n  iVar5 = FUN_0006dc14(uVar1,piVar12 + 0x18);\n  if (iVar5 < 4) {\n    (*(code *)PTR_FUN_001311f0)(PTR_FUN_001311a4 + -0x1eb8,PTR_FUN_001311a4 + -0x1ec4);\n  }\n  (*(code *)PTR_fclose_00131d88)(uVar1);\n  piVar12[0x40] = 0;\n  puVar3 = (undefined4 *)(*(code *)PTR_FUN_00131240)(piVar12[1] << 3);\n  if (0 < piVar12[1]) {\n    iVar7 = 0;\n    uVar6 = 0;\n    iVar5 = 0;\n    puVar4 = puVar3;\n    do {\n      iVar9 = *piVar12 + iVar7;\n      iVar11 = *(int *)(iVar9 + 0xc);\n      *puVar4 = *(undefined4 *)(iVar9 + 4);\n      puVar4[1] = iVar11;\n      *(undefined4 *)(iVar9 + 8) = 0;\n      uVar10 = piVar12[0x16];\n      if (uVar10 != 0) {\n        uVar13 = uVar6;\n        do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);\n      }\n      iVar5 = iVar5 + 1;\n      iVar7 = iVar7 + 0x2c;\n      puVar4 = puVar4 + 2;\n    } while (iVar5 < piVar12[1]);\n  }\n  (*(code *)PTR_free_00132180)(piVar12[0x15]);\n  piVar12[0x15] = (int)puVar3;\n  piVar12[0x16] = piVar12[1];\n  return;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "int *piVar8;" primitive_type (pointer_declarator "*piVar8" * identifier) ;) (declaration "int iVar9;" primitive_type identifier ;) (declaration "uint uVar10;" type_identifier identifier ;) (declaration "int iVar11;" primitive_type identifier ;) (declaration "int *piVar12;" primitive_type (pointer_declarator "*piVar12" * identifier) ;) (declaration "uint uVar13;" type_identifier identifier ;) (expression_statement "uVar1 = (*(code *)PTR_FUN_001313c0)(PTR_FUN_001311a4 + -0x63c4);" (assignment_expression "uVar1 = (*(code *)PTR_FUN_001313c0)(PTR_FUN_001311a4 + -0x63c4)" identifier = (call_expression "(*(code *)PTR_FUN_001313c0)(PTR_FUN_001311a4 + -0x63c4)" (parenthesized_expression "(*(code *)PTR_FUN_001313c0)" ( (pointer_expression "*(code *)PTR_FUN_001313c0" * (cast_expression "(code *)PTR_FUN_001313c0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_FUN_001311a4 + -0x63c4)" ( (binary_expression "PTR_FUN_001311a4 + -0x63c4" identifier + number_literal) )))) ;) (expression_statement "piVar12 = *(int **)PTR_DAT_00131330;" (assignment_expression "piVar12 = *(int **)PTR_DAT_00131330" identifier = (pointer_expression "*(int **)PTR_DAT_00131330" * (cast_expression "(int **)PTR_DAT_00131330" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "piVar2 = piVar12 + 0x18;" (assignment_expression "piVar2 = piVar12 + 0x18" identifier = (binary_expression "piVar12 + 0x18" identifier + number_literal)) ;) (expression_statement "piVar8 = piVar12 + 0x2c;" (assignment_expression "piVar8 = piVar12 + 0x2c" identifier = (binary_expression "piVar12 + 0x2c" identifier + number_literal)) ;) (do_statement "do {\n    iVar9 = piVar2[1];\n    iVar7 = piVar2[2];\n    iVar5 = piVar2[3];\n    *piVar8 = *piVar2;\n    piVar8[1] = iVar9;\n    piVar8[2] = iVar7;\n    piVar8[3] = iVar5;\n    piVar2 = piVar2 + 4;\n    piVar8 = piVar8 + 4;\n  } while (piVar2 != piVar12 + 0x2c);" do (compound_statement "{\n    iVar9 = piVar2[1];\n    iVar7 = piVar2[2];\n    iVar5 = piVar2[3];\n    *piVar8 = *piVar2;\n    piVar8[1] = iVar9;\n    piVar8[2] = iVar7;\n    piVar8[3] = iVar5;\n    piVar2 = piVar2 + 4;\n    piVar8 = piVar8 + 4;\n  }" { (expression_statement "iVar9 = piVar2[1];" (assignment_expression "iVar9 = piVar2[1]" identifier = (subscript_expression "piVar2[1]" identifier [ number_literal ])) ;) (expression_statement "iVar7 = piVar2[2];" (assignment_expression "iVar7 = piVar2[2]" identifier = (subscript_expression "piVar2[2]" identifier [ number_literal ])) ;) (expression_statement "iVar5 = piVar2[3];" (assignment_expression "iVar5 = piVar2[3]" identifier = (subscript_expression "piVar2[3]" identifier [ number_literal ])) ;) (expression_statement "*piVar8 = *piVar2;" (assignment_expression "*piVar8 = *piVar2" (pointer_expression "*piVar8" * identifier) = (pointer_expression "*piVar2" * identifier)) ;) (expression_statement "piVar8[1] = iVar9;" (assignment_expression "piVar8[1] = iVar9" (subscript_expression "piVar8[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "piVar8[2] = iVar7;" (assignment_expression "piVar8[2] = iVar7" (subscript_expression "piVar8[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "piVar8[3] = iVar5;" (assignment_expression "piVar8[3] = iVar5" (subscript_expression "piVar8[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "piVar2 = piVar2 + 4;" (assignment_expression "piVar2 = piVar2 + 4" identifier = (binary_expression "piVar2 + 4" identifier + number_literal)) ;) (expression_statement "piVar8 = piVar8 + 4;" (assignment_expression "piVar8 = piVar8 + 4" identifier = (binary_expression "piVar8 + 4" identifier + number_literal)) ;) }) while (parenthesized_expression "(piVar2 != piVar12 + 0x2c)" ( (binary_expression "piVar2 != piVar12 + 0x2c" identifier != (binary_expression "piVar12 + 0x2c" identifier + number_literal)) )) ;) (expression_statement "iVar5 = FUN_0006dc14(uVar1,piVar12 + 0x18);" (assignment_expression "iVar5 = FUN_0006dc14(uVar1,piVar12 + 0x18)" identifier = (call_expression "FUN_0006dc14(uVar1,piVar12 + 0x18)" identifier (argument_list "(uVar1,piVar12 + 0x18)" ( identifier , (binary_expression "piVar12 + 0x18" identifier + number_literal) )))) ;) (if_statement "if (iVar5 < 4) {\n    (*(code *)PTR_FUN_001311f0)(PTR_FUN_001311a4 + -0x1eb8,PTR_FUN_001311a4 + -0x1ec4);\n  }" if (parenthesized_expression "(iVar5 < 4)" ( (binary_expression "iVar5 < 4" identifier < number_literal) )) (compound_statement "{\n    (*(code *)PTR_FUN_001311f0)(PTR_FUN_001311a4 + -0x1eb8,PTR_FUN_001311a4 + -0x1ec4);\n  }" { (expression_statement "(*(code *)PTR_FUN_001311f0)(PTR_FUN_001311a4 + -0x1eb8,PTR_FUN_001311a4 + -0x1ec4);" (call_expression "(*(code *)PTR_FUN_001311f0)(PTR_FUN_001311a4 + -0x1eb8,PTR_FUN_001311a4 + -0x1ec4)" (parenthesized_expression "(*(code *)PTR_FUN_001311f0)" ( (pointer_expression "*(code *)PTR_FUN_001311f0" * (cast_expression "(code *)PTR_FUN_001311f0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_FUN_001311a4 + -0x1eb8,PTR_FUN_001311a4 + -0x1ec4)" ( (binary_expression "PTR_FUN_001311a4 + -0x1eb8" identifier + number_literal) , (binary_expression "PTR_FUN_001311a4 + -0x1ec4" identifier + number_literal) ))) ;) })) (expression_statement "(*(code *)PTR_fclose_00131d88)(uVar1);" (call_expression "(*(code *)PTR_fclose_00131d88)(uVar1)" (parenthesized_expression "(*(code *)PTR_fclose_00131d88)" ( (pointer_expression "*(code *)PTR_fclose_00131d88" * (cast_expression "(code *)PTR_fclose_00131d88" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar1)" ( identifier ))) ;) (expression_statement "piVar12[0x40] = 0;" (assignment_expression "piVar12[0x40] = 0" (subscript_expression "piVar12[0x40]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3 = (undefined4 *)(*(code *)PTR_FUN_00131240)(piVar12[1] << 3);" (assignment_expression "puVar3 = (undefined4 *)(*(code *)PTR_FUN_00131240)(piVar12[1] << 3)" identifier = (cast_expression "(undefined4 *)(*(code *)PTR_FUN_00131240)(piVar12[1] << 3)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_FUN_00131240)(piVar12[1] << 3)" (parenthesized_expression "(*(code *)PTR_FUN_00131240)" ( (pointer_expression "*(code *)PTR_FUN_00131240" * (cast_expression "(code *)PTR_FUN_00131240" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar12[1] << 3)" ( (binary_expression "piVar12[1] << 3" (subscript_expression "piVar12[1]" identifier [ number_literal ]) << number_literal) ))))) ;) (if_statement "if (0 < piVar12[1]) {\n    iVar7 = 0;\n    uVar6 = 0;\n    iVar5 = 0;\n    puVar4 = puVar3;\n    do {\n      iVar9 = *piVar12 + iVar7;\n      iVar11 = *(int *)(iVar9 + 0xc);\n      *puVar4 = *(undefined4 *)(iVar9 + 4);\n      puVar4[1] = iVar11;\n      *(undefined4 *)(iVar9 + 8) = 0;\n      uVar10 = piVar12[0x16];\n      if (uVar10 != 0) {\n        uVar13 = uVar6;\n        do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);\n      }\n      iVar5 = iVar5 + 1;\n      iVar7 = iVar7 + 0x2c;\n      puVar4 = puVar4 + 2;\n    } while (iVar5 < piVar12[1]);\n  }" if (parenthesized_expression "(0 < piVar12[1])" ( (binary_expression "0 < piVar12[1]" number_literal < (subscript_expression "piVar12[1]" identifier [ number_literal ])) )) (compound_statement "{\n    iVar7 = 0;\n    uVar6 = 0;\n    iVar5 = 0;\n    puVar4 = puVar3;\n    do {\n      iVar9 = *piVar12 + iVar7;\n      iVar11 = *(int *)(iVar9 + 0xc);\n      *puVar4 = *(undefined4 *)(iVar9 + 4);\n      puVar4[1] = iVar11;\n      *(undefined4 *)(iVar9 + 8) = 0;\n      uVar10 = piVar12[0x16];\n      if (uVar10 != 0) {\n        uVar13 = uVar6;\n        do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);\n      }\n      iVar5 = iVar5 + 1;\n      iVar7 = iVar7 + 0x2c;\n      puVar4 = puVar4 + 2;\n    } while (iVar5 < piVar12[1]);\n  }" { (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" identifier = number_literal) ;) (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" identifier = number_literal) ;) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (expression_statement "puVar4 = puVar3;" (assignment_expression "puVar4 = puVar3" identifier = identifier) ;) (do_statement "do {\n      iVar9 = *piVar12 + iVar7;\n      iVar11 = *(int *)(iVar9 + 0xc);\n      *puVar4 = *(undefined4 *)(iVar9 + 4);\n      puVar4[1] = iVar11;\n      *(undefined4 *)(iVar9 + 8) = 0;\n      uVar10 = piVar12[0x16];\n      if (uVar10 != 0) {\n        uVar13 = uVar6;\n        do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);\n      }\n      iVar5 = iVar5 + 1;\n      iVar7 = iVar7 + 0x2c;\n      puVar4 = puVar4 + 2;\n    } while (iVar5 < piVar12[1]);" do (compound_statement "{\n      iVar9 = *piVar12 + iVar7;\n      iVar11 = *(int *)(iVar9 + 0xc);\n      *puVar4 = *(undefined4 *)(iVar9 + 4);\n      puVar4[1] = iVar11;\n      *(undefined4 *)(iVar9 + 8) = 0;\n      uVar10 = piVar12[0x16];\n      if (uVar10 != 0) {\n        uVar13 = uVar6;\n        do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);\n      }\n      iVar5 = iVar5 + 1;\n      iVar7 = iVar7 + 0x2c;\n      puVar4 = puVar4 + 2;\n    }" { (expression_statement "iVar9 = *piVar12 + iVar7;" (assignment_expression "iVar9 = *piVar12 + iVar7" identifier = (binary_expression "*piVar12 + iVar7" (pointer_expression "*piVar12" * identifier) + identifier)) ;) (expression_statement "iVar11 = *(int *)(iVar9 + 0xc);" (assignment_expression "iVar11 = *(int *)(iVar9 + 0xc)" identifier = (pointer_expression "*(int *)(iVar9 + 0xc)" * (cast_expression "(int *)(iVar9 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar9 + 0xc)" ( (binary_expression "iVar9 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "*puVar4 = *(undefined4 *)(iVar9 + 4);" (assignment_expression "*puVar4 = *(undefined4 *)(iVar9 + 4)" (pointer_expression "*puVar4" * identifier) = (pointer_expression "*(undefined4 *)(iVar9 + 4)" * (cast_expression "(undefined4 *)(iVar9 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar9 + 4)" ( (binary_expression "iVar9 + 4" identifier + number_literal) ))))) ;) (expression_statement "puVar4[1] = iVar11;" (assignment_expression "puVar4[1] = iVar11" (subscript_expression "puVar4[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*(undefined4 *)(iVar9 + 8) = 0;" (assignment_expression "*(undefined4 *)(iVar9 + 8) = 0" (pointer_expression "*(undefined4 *)(iVar9 + 8)" * (cast_expression "(undefined4 *)(iVar9 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar9 + 8)" ( (binary_expression "iVar9 + 8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "uVar10 = piVar12[0x16];" (assignment_expression "uVar10 = piVar12[0x16]" identifier = (subscript_expression "piVar12[0x16]" identifier [ number_literal ])) ;) (if_statement "if (uVar10 != 0) {\n        uVar13 = uVar6;\n        do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);\n      }" if (parenthesized_expression "(uVar10 != 0)" ( (binary_expression "uVar10 != 0" identifier != number_literal) )) (compound_statement "{\n        uVar13 = uVar6;\n        do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);\n      }" { (expression_statement "uVar13 = uVar6;" (assignment_expression "uVar13 = uVar6" identifier = identifier) ;) (do_statement "do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);" do (compound_statement "{\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        }" { (expression_statement "piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);" (assignment_expression "piVar8 = (int *)(piVar12[0x15] + uVar13 * 8)" identifier = (cast_expression "(int *)(piVar12[0x15] + uVar13 * 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar12[0x15] + uVar13 * 8)" ( (binary_expression "piVar12[0x15] + uVar13 * 8" (subscript_expression "piVar12[0x15]" identifier [ number_literal ]) + (binary_expression "uVar13 * 8" identifier * number_literal)) )))) ;) (if_statement "if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }" if (parenthesized_expression "(piVar8[1] == iVar11)" ( (binary_expression "piVar8[1] == iVar11" (subscript_expression "piVar8[1]" identifier [ number_literal ]) == identifier) )) (compound_statement "{\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }" { (expression_statement "iVar11 = *(int *)(iVar9 + 4) - *piVar8;" (assignment_expression "iVar11 = *(int *)(iVar9 + 4) - *piVar8" identifier = (binary_expression "*(int *)(iVar9 + 4) - *piVar8" (pointer_expression "*(int *)(iVar9 + 4)" * (cast_expression "(int *)(iVar9 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar9 + 4)" ( (binary_expression "iVar9 + 4" identifier + number_literal) )))) - (pointer_expression "*piVar8" * identifier))) ;) (expression_statement "*(int *)(iVar9 + 8) = iVar11;" (assignment_expression "*(int *)(iVar9 + 8) = iVar11" (pointer_expression "*(int *)(iVar9 + 8)" * (cast_expression "(int *)(iVar9 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar9 + 8)" ( (binary_expression "iVar9 + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "piVar12[0x40] = piVar12[0x40] + iVar11;" (assignment_expression "piVar12[0x40] = piVar12[0x40] + iVar11" (subscript_expression "piVar12[0x40]" identifier [ number_literal ]) = (binary_expression "piVar12[0x40] + iVar11" (subscript_expression "piVar12[0x40]" identifier [ number_literal ]) + identifier)) ;) (expression_statement "uVar6 = uVar13;" (assignment_expression "uVar6 = uVar13" identifier = identifier) ;) (break_statement "break;" break ;) })) (if_statement "if (uVar10 == 0) {\n            trap(7);\n          }" if (parenthesized_expression "(uVar10 == 0)" ( (binary_expression "uVar10 == 0" identifier == number_literal) )) (compound_statement "{\n            trap(7);\n          }" { (expression_statement "trap(7);" (call_expression "trap(7)" identifier (argument_list "(7)" ( number_literal ))) ;) })) (expression_statement "uVar13 = (uVar13 + 1) % uVar10;" (assignment_expression "uVar13 = (uVar13 + 1) % uVar10" identifier = (binary_expression "(uVar13 + 1) % uVar10" (parenthesized_expression "(uVar13 + 1)" ( (binary_expression "uVar13 + 1" identifier + number_literal) )) % identifier)) ;) }) while (parenthesized_expression "(uVar13 != uVar6)" ( (binary_expression "uVar13 != uVar6" identifier != identifier) )) ;) })) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "iVar7 = iVar7 + 0x2c;" (assignment_expression "iVar7 = iVar7 + 0x2c" identifier = (binary_expression "iVar7 + 0x2c" identifier + number_literal)) ;) (expression_statement "puVar4 = puVar4 + 2;" (assignment_expression "puVar4 = puVar4 + 2" identifier = (binary_expression "puVar4 + 2" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar5 < piVar12[1])" ( (binary_expression "iVar5 < piVar12[1]" identifier < (subscript_expression "piVar12[1]" identifier [ number_literal ])) )) ;) })) (expression_statement "(*(code *)PTR_free_00132180)(piVar12[0x15]);" (call_expression "(*(code *)PTR_free_00132180)(piVar12[0x15])" (parenthesized_expression "(*(code *)PTR_free_00132180)" ( (pointer_expression "*(code *)PTR_free_00132180" * (cast_expression "(code *)PTR_free_00132180" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar12[0x15])" ( (subscript_expression "piVar12[0x15]" identifier [ number_literal ]) ))) ;) (expression_statement "piVar12[0x15] = (int)puVar3;" (assignment_expression "piVar12[0x15] = (int)puVar3" (subscript_expression "piVar12[0x15]" identifier [ number_literal ]) = (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "piVar12[0x16] = piVar12[1];" (assignment_expression "piVar12[0x16] = piVar12[1]" (subscript_expression "piVar12[0x16]" identifier [ number_literal ]) = (subscript_expression "piVar12[1]" identifier [ number_literal ])) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (binary_expression IDENT + LIT)) )) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) , (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 (subscript_expression IDENT [ LIT ]) = LIT) ;) (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 ( (binary_expression (subscript_expression IDENT [ LIT ]) << LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (subscript_expression IDENT [ LIT ])) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_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 (pointer_expression * IDENT) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = 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 IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + (binary_expression IDENT * LIT)) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) - (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) + IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (break_statement break ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) % IDENT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != 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)) ;) }) while (parenthesized_expression ( (binary_expression IDENT < (subscript_expression IDENT [ LIT ])) )) ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (subscript_expression IDENT [ LIT ]) ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (subscript_expression IDENT [ LIT ])) ;) (return_statement return ;) })))
(function_definition "void FUN_0006ddd8(void)\n\n{\n  undefined4 uVar1;\n  int *piVar2;\n  undefined4 *puVar3;\n  undefined4 *puVar4;\n  int iVar5;\n  uint uVar6;\n  int iVar7;\n  int *piVar8;\n  int iVar9;\n  uint uVar10;\n  int iVar11;\n  int *piVar12;\n  uint uVar13;\n  \n  uVar1 = (*(code *)PTR_FUN_001313c0)(PTR_FUN_001311a4 + -0x63c4);\n  piVar12 = *(int **)PTR_DAT_00131330;\n  piVar2 = piVar12 + 0x18;\n  piVar8 = piVar12 + 0x2c;\n  do {\n    iVar9 = piVar2[1];\n    iVar7 = piVar2[2];\n    iVar5 = piVar2[3];\n    *piVar8 = *piVar2;\n    piVar8[1] = iVar9;\n    piVar8[2] = iVar7;\n    piVar8[3] = iVar5;\n    piVar2 = piVar2 + 4;\n    piVar8 = piVar8 + 4;\n  } while (piVar2 != piVar12 + 0x2c);\n  iVar5 = FUN_0006dc14(uVar1,piVar12 + 0x18);\n  if (iVar5 < 4) {\n    (*(code *)PTR_FUN_001311f0)(PTR_FUN_001311a4 + -0x1eb8,PTR_FUN_001311a4 + -0x1ec4);\n  }\n  (*(code *)PTR_fclose_00131d88)(uVar1);\n  piVar12[0x40] = 0;\n  puVar3 = (undefined4 *)(*(code *)PTR_FUN_00131240)(piVar12[1] << 3);\n  if (0 < piVar12[1]) {\n    iVar7 = 0;\n    uVar6 = 0;\n    iVar5 = 0;\n    puVar4 = puVar3;\n    do {\n      iVar9 = *piVar12 + iVar7;\n      iVar11 = *(int *)(iVar9 + 0xc);\n      *puVar4 = *(undefined4 *)(iVar9 + 4);\n      puVar4[1] = iVar11;\n      *(undefined4 *)(iVar9 + 8) = 0;\n      uVar10 = piVar12[0x16];\n      if (uVar10 != 0) {\n        uVar13 = uVar6;\n        do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);\n      }\n      iVar5 = iVar5 + 1;\n      iVar7 = iVar7 + 0x2c;\n      puVar4 = puVar4 + 2;\n    } while (iVar5 < piVar12[1]);\n  }\n  (*(code *)PTR_free_00132180)(piVar12[0x15]);\n  piVar12[0x15] = (int)puVar3;\n  piVar12[0x16] = piVar12[1];\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0006ddd8(void)" (identifier "FUN_0006ddd8") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  int *piVar2;\n  undefined4 *puVar3;\n  undefined4 *puVar4;\n  int iVar5;\n  uint uVar6;\n  int iVar7;\n  int *piVar8;\n  int iVar9;\n  uint uVar10;\n  int iVar11;\n  int *piVar12;\n  uint uVar13;\n  \n  uVar1 = (*(code *)PTR_FUN_001313c0)(PTR_FUN_001311a4 + -0x63c4);\n  piVar12 = *(int **)PTR_DAT_00131330;\n  piVar2 = piVar12 + 0x18;\n  piVar8 = piVar12 + 0x2c;\n  do {\n    iVar9 = piVar2[1];\n    iVar7 = piVar2[2];\n    iVar5 = piVar2[3];\n    *piVar8 = *piVar2;\n    piVar8[1] = iVar9;\n    piVar8[2] = iVar7;\n    piVar8[3] = iVar5;\n    piVar2 = piVar2 + 4;\n    piVar8 = piVar8 + 4;\n  } while (piVar2 != piVar12 + 0x2c);\n  iVar5 = FUN_0006dc14(uVar1,piVar12 + 0x18);\n  if (iVar5 < 4) {\n    (*(code *)PTR_FUN_001311f0)(PTR_FUN_001311a4 + -0x1eb8,PTR_FUN_001311a4 + -0x1ec4);\n  }\n  (*(code *)PTR_fclose_00131d88)(uVar1);\n  piVar12[0x40] = 0;\n  puVar3 = (undefined4 *)(*(code *)PTR_FUN_00131240)(piVar12[1] << 3);\n  if (0 < piVar12[1]) {\n    iVar7 = 0;\n    uVar6 = 0;\n    iVar5 = 0;\n    puVar4 = puVar3;\n    do {\n      iVar9 = *piVar12 + iVar7;\n      iVar11 = *(int *)(iVar9 + 0xc);\n      *puVar4 = *(undefined4 *)(iVar9 + 4);\n      puVar4[1] = iVar11;\n      *(undefined4 *)(iVar9 + 8) = 0;\n      uVar10 = piVar12[0x16];\n      if (uVar10 != 0) {\n        uVar13 = uVar6;\n        do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);\n      }\n      iVar5 = iVar5 + 1;\n      iVar7 = iVar7 + 0x2c;\n      puVar4 = puVar4 + 2;\n    } while (iVar5 < piVar12[1]);\n  }\n  (*(code *)PTR_free_00132180)(piVar12[0x15]);\n  piVar12[0x15] = (int)puVar3;\n  piVar12[0x16] = piVar12[1];\n  return;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "undefined4 *puVar3;" (type_identifier "undefined4") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "undefined4 *puVar4;" (type_identifier "undefined4") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "uint uVar6;" (type_identifier "uint") (identifier "uVar6") (; ";")) (declaration "int iVar7;" (primitive_type "int") (identifier "iVar7") (; ";")) (declaration "int *piVar8;" (primitive_type "int") (pointer_declarator "*piVar8" (* "*") (identifier "piVar8")) (; ";")) (declaration "int iVar9;" (primitive_type "int") (identifier "iVar9") (; ";")) (declaration "uint uVar10;" (type_identifier "uint") (identifier "uVar10") (; ";")) (declaration "int iVar11;" (primitive_type "int") (identifier "iVar11") (; ";")) (declaration "int *piVar12;" (primitive_type "int") (pointer_declarator "*piVar12" (* "*") (identifier "piVar12")) (; ";")) (declaration "uint uVar13;" (type_identifier "uint") (identifier "uVar13") (; ";")) (expression_statement "uVar1 = (*(code *)PTR_FUN_001313c0)(PTR_FUN_001311a4 + -0x63c4);" (assignment_expression "uVar1 = (*(code *)PTR_FUN_001313c0)(PTR_FUN_001311a4 + -0x63c4)" (identifier "uVar1") (= "=") (call_expression "(*(code *)PTR_FUN_001313c0)(PTR_FUN_001311a4 + -0x63c4)" (parenthesized_expression "(*(code *)PTR_FUN_001313c0)" (( "(") (pointer_expression "*(code *)PTR_FUN_001313c0" (* "*") (cast_expression "(code *)PTR_FUN_001313c0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_FUN_001313c0"))) () ")")) (argument_list "(PTR_FUN_001311a4 + -0x63c4)" (( "(") (binary_expression "PTR_FUN_001311a4 + -0x63c4" (identifier "PTR_FUN_001311a4") (+ "+") (number_literal "-0x63c4")) () ")")))) (; ";")) (expression_statement "piVar12 = *(int **)PTR_DAT_00131330;" (assignment_expression "piVar12 = *(int **)PTR_DAT_00131330" (identifier "piVar12") (= "=") (pointer_expression "*(int **)PTR_DAT_00131330" (* "*") (cast_expression "(int **)PTR_DAT_00131330" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "PTR_DAT_00131330")))) (; ";")) (expression_statement "piVar2 = piVar12 + 0x18;" (assignment_expression "piVar2 = piVar12 + 0x18" (identifier "piVar2") (= "=") (binary_expression "piVar12 + 0x18" (identifier "piVar12") (+ "+") (number_literal "0x18"))) (; ";")) (expression_statement "piVar8 = piVar12 + 0x2c;" (assignment_expression "piVar8 = piVar12 + 0x2c" (identifier "piVar8") (= "=") (binary_expression "piVar12 + 0x2c" (identifier "piVar12") (+ "+") (number_literal "0x2c"))) (; ";")) (do_statement "do {\n    iVar9 = piVar2[1];\n    iVar7 = piVar2[2];\n    iVar5 = piVar2[3];\n    *piVar8 = *piVar2;\n    piVar8[1] = iVar9;\n    piVar8[2] = iVar7;\n    piVar8[3] = iVar5;\n    piVar2 = piVar2 + 4;\n    piVar8 = piVar8 + 4;\n  } while (piVar2 != piVar12 + 0x2c);" (do "do") (compound_statement "{\n    iVar9 = piVar2[1];\n    iVar7 = piVar2[2];\n    iVar5 = piVar2[3];\n    *piVar8 = *piVar2;\n    piVar8[1] = iVar9;\n    piVar8[2] = iVar7;\n    piVar8[3] = iVar5;\n    piVar2 = piVar2 + 4;\n    piVar8 = piVar8 + 4;\n  }" ({ "{") (expression_statement "iVar9 = piVar2[1];" (assignment_expression "iVar9 = piVar2[1]" (identifier "iVar9") (= "=") (subscript_expression "piVar2[1]" (identifier "piVar2") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "iVar7 = piVar2[2];" (assignment_expression "iVar7 = piVar2[2]" (identifier "iVar7") (= "=") (subscript_expression "piVar2[2]" (identifier "piVar2") ([ "[") (number_literal "2") (] "]"))) (; ";")) (expression_statement "iVar5 = piVar2[3];" (assignment_expression "iVar5 = piVar2[3]" (identifier "iVar5") (= "=") (subscript_expression "piVar2[3]" (identifier "piVar2") ([ "[") (number_literal "3") (] "]"))) (; ";")) (expression_statement "*piVar8 = *piVar2;" (assignment_expression "*piVar8 = *piVar2" (pointer_expression "*piVar8" (* "*") (identifier "piVar8")) (= "=") (pointer_expression "*piVar2" (* "*") (identifier "piVar2"))) (; ";")) (expression_statement "piVar8[1] = iVar9;" (assignment_expression "piVar8[1] = iVar9" (subscript_expression "piVar8[1]" (identifier "piVar8") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "iVar9")) (; ";")) (expression_statement "piVar8[2] = iVar7;" (assignment_expression "piVar8[2] = iVar7" (subscript_expression "piVar8[2]" (identifier "piVar8") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "iVar7")) (; ";")) (expression_statement "piVar8[3] = iVar5;" (assignment_expression "piVar8[3] = iVar5" (subscript_expression "piVar8[3]" (identifier "piVar8") ([ "[") (number_literal "3") (] "]")) (= "=") (identifier "iVar5")) (; ";")) (expression_statement "piVar2 = piVar2 + 4;" (assignment_expression "piVar2 = piVar2 + 4" (identifier "piVar2") (= "=") (binary_expression "piVar2 + 4" (identifier "piVar2") (+ "+") (number_literal "4"))) (; ";")) (expression_statement "piVar8 = piVar8 + 4;" (assignment_expression "piVar8 = piVar8 + 4" (identifier "piVar8") (= "=") (binary_expression "piVar8 + 4" (identifier "piVar8") (+ "+") (number_literal "4"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(piVar2 != piVar12 + 0x2c)" (( "(") (binary_expression "piVar2 != piVar12 + 0x2c" (identifier "piVar2") (!= "!=") (binary_expression "piVar12 + 0x2c" (identifier "piVar12") (+ "+") (number_literal "0x2c"))) () ")")) (; ";")) (expression_statement "iVar5 = FUN_0006dc14(uVar1,piVar12 + 0x18);" (assignment_expression "iVar5 = FUN_0006dc14(uVar1,piVar12 + 0x18)" (identifier "iVar5") (= "=") (call_expression "FUN_0006dc14(uVar1,piVar12 + 0x18)" (identifier "FUN_0006dc14") (argument_list "(uVar1,piVar12 + 0x18)" (( "(") (identifier "uVar1") (, ",") (binary_expression "piVar12 + 0x18" (identifier "piVar12") (+ "+") (number_literal "0x18")) () ")")))) (; ";")) (if_statement "if (iVar5 < 4) {\n    (*(code *)PTR_FUN_001311f0)(PTR_FUN_001311a4 + -0x1eb8,PTR_FUN_001311a4 + -0x1ec4);\n  }" (if "if") (parenthesized_expression "(iVar5 < 4)" (( "(") (binary_expression "iVar5 < 4" (identifier "iVar5") (< "<") (number_literal "4")) () ")")) (compound_statement "{\n    (*(code *)PTR_FUN_001311f0)(PTR_FUN_001311a4 + -0x1eb8,PTR_FUN_001311a4 + -0x1ec4);\n  }" ({ "{") (expression_statement "(*(code *)PTR_FUN_001311f0)(PTR_FUN_001311a4 + -0x1eb8,PTR_FUN_001311a4 + -0x1ec4);" (call_expression "(*(code *)PTR_FUN_001311f0)(PTR_FUN_001311a4 + -0x1eb8,PTR_FUN_001311a4 + -0x1ec4)" (parenthesized_expression "(*(code *)PTR_FUN_001311f0)" (( "(") (pointer_expression "*(code *)PTR_FUN_001311f0" (* "*") (cast_expression "(code *)PTR_FUN_001311f0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_FUN_001311f0"))) () ")")) (argument_list "(PTR_FUN_001311a4 + -0x1eb8,PTR_FUN_001311a4 + -0x1ec4)" (( "(") (binary_expression "PTR_FUN_001311a4 + -0x1eb8" (identifier "PTR_FUN_001311a4") (+ "+") (number_literal "-0x1eb8")) (, ",") (binary_expression "PTR_FUN_001311a4 + -0x1ec4" (identifier "PTR_FUN_001311a4") (+ "+") (number_literal "-0x1ec4")) () ")"))) (; ";")) (} "}"))) (expression_statement "(*(code *)PTR_fclose_00131d88)(uVar1);" (call_expression "(*(code *)PTR_fclose_00131d88)(uVar1)" (parenthesized_expression "(*(code *)PTR_fclose_00131d88)" (( "(") (pointer_expression "*(code *)PTR_fclose_00131d88" (* "*") (cast_expression "(code *)PTR_fclose_00131d88" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_fclose_00131d88"))) () ")")) (argument_list "(uVar1)" (( "(") (identifier "uVar1") () ")"))) (; ";")) (expression_statement "piVar12[0x40] = 0;" (assignment_expression "piVar12[0x40] = 0" (subscript_expression "piVar12[0x40]" (identifier "piVar12") ([ "[") (number_literal "0x40") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar3 = (undefined4 *)(*(code *)PTR_FUN_00131240)(piVar12[1] << 3);" (assignment_expression "puVar3 = (undefined4 *)(*(code *)PTR_FUN_00131240)(piVar12[1] << 3)" (identifier "puVar3") (= "=") (cast_expression "(undefined4 *)(*(code *)PTR_FUN_00131240)(piVar12[1] << 3)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR_FUN_00131240)(piVar12[1] << 3)" (parenthesized_expression "(*(code *)PTR_FUN_00131240)" (( "(") (pointer_expression "*(code *)PTR_FUN_00131240" (* "*") (cast_expression "(code *)PTR_FUN_00131240" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_FUN_00131240"))) () ")")) (argument_list "(piVar12[1] << 3)" (( "(") (binary_expression "piVar12[1] << 3" (subscript_expression "piVar12[1]" (identifier "piVar12") ([ "[") (number_literal "1") (] "]")) (<< "<<") (number_literal "3")) () ")"))))) (; ";")) (if_statement "if (0 < piVar12[1]) {\n    iVar7 = 0;\n    uVar6 = 0;\n    iVar5 = 0;\n    puVar4 = puVar3;\n    do {\n      iVar9 = *piVar12 + iVar7;\n      iVar11 = *(int *)(iVar9 + 0xc);\n      *puVar4 = *(undefined4 *)(iVar9 + 4);\n      puVar4[1] = iVar11;\n      *(undefined4 *)(iVar9 + 8) = 0;\n      uVar10 = piVar12[0x16];\n      if (uVar10 != 0) {\n        uVar13 = uVar6;\n        do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);\n      }\n      iVar5 = iVar5 + 1;\n      iVar7 = iVar7 + 0x2c;\n      puVar4 = puVar4 + 2;\n    } while (iVar5 < piVar12[1]);\n  }" (if "if") (parenthesized_expression "(0 < piVar12[1])" (( "(") (binary_expression "0 < piVar12[1]" (number_literal "0") (< "<") (subscript_expression "piVar12[1]" (identifier "piVar12") ([ "[") (number_literal "1") (] "]"))) () ")")) (compound_statement "{\n    iVar7 = 0;\n    uVar6 = 0;\n    iVar5 = 0;\n    puVar4 = puVar3;\n    do {\n      iVar9 = *piVar12 + iVar7;\n      iVar11 = *(int *)(iVar9 + 0xc);\n      *puVar4 = *(undefined4 *)(iVar9 + 4);\n      puVar4[1] = iVar11;\n      *(undefined4 *)(iVar9 + 8) = 0;\n      uVar10 = piVar12[0x16];\n      if (uVar10 != 0) {\n        uVar13 = uVar6;\n        do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);\n      }\n      iVar5 = iVar5 + 1;\n      iVar7 = iVar7 + 0x2c;\n      puVar4 = puVar4 + 2;\n    } while (iVar5 < piVar12[1]);\n  }" ({ "{") (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" (identifier "iVar7") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" (identifier "uVar6") (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" (identifier "iVar5") (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar4 = puVar3;" (assignment_expression "puVar4 = puVar3" (identifier "puVar4") (= "=") (identifier "puVar3")) (; ";")) (do_statement "do {\n      iVar9 = *piVar12 + iVar7;\n      iVar11 = *(int *)(iVar9 + 0xc);\n      *puVar4 = *(undefined4 *)(iVar9 + 4);\n      puVar4[1] = iVar11;\n      *(undefined4 *)(iVar9 + 8) = 0;\n      uVar10 = piVar12[0x16];\n      if (uVar10 != 0) {\n        uVar13 = uVar6;\n        do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);\n      }\n      iVar5 = iVar5 + 1;\n      iVar7 = iVar7 + 0x2c;\n      puVar4 = puVar4 + 2;\n    } while (iVar5 < piVar12[1]);" (do "do") (compound_statement "{\n      iVar9 = *piVar12 + iVar7;\n      iVar11 = *(int *)(iVar9 + 0xc);\n      *puVar4 = *(undefined4 *)(iVar9 + 4);\n      puVar4[1] = iVar11;\n      *(undefined4 *)(iVar9 + 8) = 0;\n      uVar10 = piVar12[0x16];\n      if (uVar10 != 0) {\n        uVar13 = uVar6;\n        do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);\n      }\n      iVar5 = iVar5 + 1;\n      iVar7 = iVar7 + 0x2c;\n      puVar4 = puVar4 + 2;\n    }" ({ "{") (expression_statement "iVar9 = *piVar12 + iVar7;" (assignment_expression "iVar9 = *piVar12 + iVar7" (identifier "iVar9") (= "=") (binary_expression "*piVar12 + iVar7" (pointer_expression "*piVar12" (* "*") (identifier "piVar12")) (+ "+") (identifier "iVar7"))) (; ";")) (expression_statement "iVar11 = *(int *)(iVar9 + 0xc);" (assignment_expression "iVar11 = *(int *)(iVar9 + 0xc)" (identifier "iVar11") (= "=") (pointer_expression "*(int *)(iVar9 + 0xc)" (* "*") (cast_expression "(int *)(iVar9 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar9 + 0xc)" (( "(") (binary_expression "iVar9 + 0xc" (identifier "iVar9") (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (expression_statement "*puVar4 = *(undefined4 *)(iVar9 + 4);" (assignment_expression "*puVar4 = *(undefined4 *)(iVar9 + 4)" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (pointer_expression "*(undefined4 *)(iVar9 + 4)" (* "*") (cast_expression "(undefined4 *)(iVar9 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar9 + 4)" (( "(") (binary_expression "iVar9 + 4" (identifier "iVar9") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (expression_statement "puVar4[1] = iVar11;" (assignment_expression "puVar4[1] = iVar11" (subscript_expression "puVar4[1]" (identifier "puVar4") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "iVar11")) (; ";")) (expression_statement "*(undefined4 *)(iVar9 + 8) = 0;" (assignment_expression "*(undefined4 *)(iVar9 + 8) = 0" (pointer_expression "*(undefined4 *)(iVar9 + 8)" (* "*") (cast_expression "(undefined4 *)(iVar9 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar9 + 8)" (( "(") (binary_expression "iVar9 + 8" (identifier "iVar9") (+ "+") (number_literal "8")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar10 = piVar12[0x16];" (assignment_expression "uVar10 = piVar12[0x16]" (identifier "uVar10") (= "=") (subscript_expression "piVar12[0x16]" (identifier "piVar12") ([ "[") (number_literal "0x16") (] "]"))) (; ";")) (if_statement "if (uVar10 != 0) {\n        uVar13 = uVar6;\n        do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);\n      }" (if "if") (parenthesized_expression "(uVar10 != 0)" (( "(") (binary_expression "uVar10 != 0" (identifier "uVar10") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        uVar13 = uVar6;\n        do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);\n      }" ({ "{") (expression_statement "uVar13 = uVar6;" (assignment_expression "uVar13 = uVar6" (identifier "uVar13") (= "=") (identifier "uVar6")) (; ";")) (do_statement "do {\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        } while (uVar13 != uVar6);" (do "do") (compound_statement "{\n          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);\n          if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }\n          if (uVar10 == 0) {\n            trap(7);\n          }\n          uVar13 = (uVar13 + 1) % uVar10;\n        }" ({ "{") (expression_statement "piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);" (assignment_expression "piVar8 = (int *)(piVar12[0x15] + uVar13 * 8)" (identifier "piVar8") (= "=") (cast_expression "(int *)(piVar12[0x15] + uVar13 * 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(piVar12[0x15] + uVar13 * 8)" (( "(") (binary_expression "piVar12[0x15] + uVar13 * 8" (subscript_expression "piVar12[0x15]" (identifier "piVar12") ([ "[") (number_literal "0x15") (] "]")) (+ "+") (binary_expression "uVar13 * 8" (identifier "uVar13") (* "*") (number_literal "8"))) () ")")))) (; ";")) (if_statement "if (piVar8[1] == iVar11) {\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }" (if "if") (parenthesized_expression "(piVar8[1] == iVar11)" (( "(") (binary_expression "piVar8[1] == iVar11" (subscript_expression "piVar8[1]" (identifier "piVar8") ([ "[") (number_literal "1") (] "]")) (== "==") (identifier "iVar11")) () ")")) (compound_statement "{\n            iVar11 = *(int *)(iVar9 + 4) - *piVar8;\n            *(int *)(iVar9 + 8) = iVar11;\n            piVar12[0x40] = piVar12[0x40] + iVar11;\n            uVar6 = uVar13;\n            break;\n          }" ({ "{") (expression_statement "iVar11 = *(int *)(iVar9 + 4) - *piVar8;" (assignment_expression "iVar11 = *(int *)(iVar9 + 4) - *piVar8" (identifier "iVar11") (= "=") (binary_expression "*(int *)(iVar9 + 4) - *piVar8" (pointer_expression "*(int *)(iVar9 + 4)" (* "*") (cast_expression "(int *)(iVar9 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar9 + 4)" (( "(") (binary_expression "iVar9 + 4" (identifier "iVar9") (+ "+") (number_literal "4")) () ")")))) (- "-") (pointer_expression "*piVar8" (* "*") (identifier "piVar8")))) (; ";")) (expression_statement "*(int *)(iVar9 + 8) = iVar11;" (assignment_expression "*(int *)(iVar9 + 8) = iVar11" (pointer_expression "*(int *)(iVar9 + 8)" (* "*") (cast_expression "(int *)(iVar9 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar9 + 8)" (( "(") (binary_expression "iVar9 + 8" (identifier "iVar9") (+ "+") (number_literal "8")) () ")")))) (= "=") (identifier "iVar11")) (; ";")) (expression_statement "piVar12[0x40] = piVar12[0x40] + iVar11;" (assignment_expression "piVar12[0x40] = piVar12[0x40] + iVar11" (subscript_expression "piVar12[0x40]" (identifier "piVar12") ([ "[") (number_literal "0x40") (] "]")) (= "=") (binary_expression "piVar12[0x40] + iVar11" (subscript_expression "piVar12[0x40]" (identifier "piVar12") ([ "[") (number_literal "0x40") (] "]")) (+ "+") (identifier "iVar11"))) (; ";")) (expression_statement "uVar6 = uVar13;" (assignment_expression "uVar6 = uVar13" (identifier "uVar6") (= "=") (identifier "uVar13")) (; ";")) (break_statement "break;" (break "break") (; ";")) (} "}"))) (if_statement "if (uVar10 == 0) {\n            trap(7);\n          }" (if "if") (parenthesized_expression "(uVar10 == 0)" (( "(") (binary_expression "uVar10 == 0" (identifier "uVar10") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n            trap(7);\n          }" ({ "{") (expression_statement "trap(7);" (call_expression "trap(7)" (identifier "trap") (argument_list "(7)" (( "(") (number_literal "7") () ")"))) (; ";")) (} "}"))) (expression_statement "uVar13 = (uVar13 + 1) % uVar10;" (assignment_expression "uVar13 = (uVar13 + 1) % uVar10" (identifier "uVar13") (= "=") (binary_expression "(uVar13 + 1) % uVar10" (parenthesized_expression "(uVar13 + 1)" (( "(") (binary_expression "uVar13 + 1" (identifier "uVar13") (+ "+") (number_literal "1")) () ")")) (% "%") (identifier "uVar10"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar13 != uVar6)" (( "(") (binary_expression "uVar13 != uVar6" (identifier "uVar13") (!= "!=") (identifier "uVar6")) () ")")) (; ";")) (} "}"))) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" (identifier "iVar5") (= "=") (binary_expression "iVar5 + 1" (identifier "iVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "iVar7 = iVar7 + 0x2c;" (assignment_expression "iVar7 = iVar7 + 0x2c" (identifier "iVar7") (= "=") (binary_expression "iVar7 + 0x2c" (identifier "iVar7") (+ "+") (number_literal "0x2c"))) (; ";")) (expression_statement "puVar4 = puVar4 + 2;" (assignment_expression "puVar4 = puVar4 + 2" (identifier "puVar4") (= "=") (binary_expression "puVar4 + 2" (identifier "puVar4") (+ "+") (number_literal "2"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar5 < piVar12[1])" (( "(") (binary_expression "iVar5 < piVar12[1]" (identifier "iVar5") (< "<") (subscript_expression "piVar12[1]" (identifier "piVar12") ([ "[") (number_literal "1") (] "]"))) () ")")) (; ";")) (} "}"))) (expression_statement "(*(code *)PTR_free_00132180)(piVar12[0x15]);" (call_expression "(*(code *)PTR_free_00132180)(piVar12[0x15])" (parenthesized_expression "(*(code *)PTR_free_00132180)" (( "(") (pointer_expression "*(code *)PTR_free_00132180" (* "*") (cast_expression "(code *)PTR_free_00132180" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_free_00132180"))) () ")")) (argument_list "(piVar12[0x15])" (( "(") (subscript_expression "piVar12[0x15]" (identifier "piVar12") ([ "[") (number_literal "0x15") (] "]")) () ")"))) (; ";")) (expression_statement "piVar12[0x15] = (int)puVar3;" (assignment_expression "piVar12[0x15] = (int)puVar3" (subscript_expression "piVar12[0x15]" (identifier "piVar12") ([ "[") (number_literal "0x15") (] "]")) (= "=") (cast_expression "(int)puVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar3"))) (; ";")) (expression_statement "piVar12[0x16] = piVar12[1];" (assignment_expression "piVar12[0x16] = piVar12[1]" (subscript_expression "piVar12[0x16]" (identifier "piVar12") ([ "[") (number_literal "0x16") (] "]")) (= "=") (subscript_expression "piVar12[1]" (identifier "piVar12") ([ "[") (number_literal "1") (] "]"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Unknown calling convention -- yet parameter storage is locked */

void function_1(void)

{
  type_1 *fp;
  int *var_3;
  type_2 *puVar2;
  type_2 *var_14;
  int var_6;
  type_3 var_13;
  int var_7;
  int *var_4;
  int var_8;
  type_3 var_9;
  int var_11;
  int *var_2;
  type_3 var_10;
  
  fp = (type_1 *)(*(type_4 *)PTR_xfopen_for_read_001313c0)(var_1 + -0x63c4)
  ;
  var_2 = *(int **)PTR_ptr_to_globals_00131330;
  var_3 = var_2 + 0x18;
  var_4 = var_2 + 0x2c;
  do {
    var_8 = var_3[1];
    var_7 = var_3[2];
    var_6 = var_3[3];
    *var_4 = *var_3;
    var_4[1] = var_8;
    var_4[2] = var_7;
    var_4[3] = var_6;
    var_3 = var_3 + 4;
    var_4 = var_4 + 4;
  } while (var_3 != var_2 + 0x2c);
  var_6 = var_5(fp,(type_5 *)(var_2 + 0x18));
  if (var_6 < 4) {
    (*(type_4 *)PTR_bb_error_msg_and_die_001311f0)
              (var_1 + -0x1eb8,
               var_1 + -0x1ec4);
  }
  (*(type_4 *)PTR_fclose_00131d88)(fp);
  var_2[0x40] = 0;
  puVar2 = (type_2 *)(*(type_4 *)PTR_xmalloc_00131240)(var_2[1] << 3);
  if (0 < var_2[1]) {
    var_7 = 0;
    var_13 = 0;
    var_6 = 0;
    var_14 = puVar2;
    do {
      var_8 = *var_2 + var_7;
      var_11 = *(int *)(var_8 + 0xc);
      *var_14 = *(type_2 *)(var_8 + 4);
      var_14[1] = var_11;
      *(type_2 *)(var_8 + 8) = 0;
      var_9 = var_2[0x16];
      if (var_9 != 0) {
        var_10 = var_13;
        do {
          var_4 = (int *)(var_2[0x15] + var_10 * 8);
          if (var_4[1] == var_11) {
            var_11 = *(int *)(var_8 + 4) - *var_4;
            *(int *)(var_8 + 8) = var_11;
            var_2[0x40] = var_2[0x40] + var_11;
            var_13 = var_10;
            break;
          }
          if (var_9 == 0) {
            var_12(7);
          }
          var_10 = (var_10 + 1) % var_9;
        } while (var_10 != var_13);
      }
      var_6 = var_6 + 1;
      var_7 = var_7 + 0x2c;
      var_14 = var_14 + 2;
    } while (var_6 < var_2[1]);
  }
  (*(type_4 *)PTR_free_00132180)(var_2[0x15]);
  var_2[0x15] = (int)puVar2;
  var_2[0x16] = var_2[1];
  return;
}


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

void MASKED(void)

{
  undefined4 uVar1;
  int *piVar2;
  undefined4 *puVar3;
  undefined4 *puVar4;
  int iVar5;
  uint uVar6;
  int iVar7;
  int *piVar8;
  int iVar9;
  uint uVar10;
  int iVar11;
  int *piVar12;
  uint uVar13;
  
  uVar1 = (*(code *)PTR_FUN_001313c0)(PTR_FUN_001311a4 + -0x63c4);
  piVar12 = *(int **)PTR_DAT_00131330;
  piVar2 = piVar12 + 0x18;
  piVar8 = piVar12 + 0x2c;
  do {
    iVar9 = piVar2[1];
    iVar7 = piVar2[2];
    iVar5 = piVar2[3];
    *piVar8 = *piVar2;
    piVar8[1] = iVar9;
    piVar8[2] = iVar7;
    piVar8[3] = iVar5;
    piVar2 = piVar2 + 4;
    piVar8 = piVar8 + 4;
  } while (piVar2 != piVar12 + 0x2c);
  iVar5 = FUN_0006dc14(uVar1,piVar12 + 0x18);
  if (iVar5 < 4) {
    (*(code *)PTR_FUN_001311f0)(PTR_FUN_001311a4 + -0x1eb8,PTR_FUN_001311a4 + -0x1ec4);
  }
  (*(code *)PTR_fclose_00131d88)(uVar1);
  piVar12[0x40] = 0;
  puVar3 = (undefined4 *)(*(code *)PTR_FUN_00131240)(piVar12[1] << 3);
  if (0 < piVar12[1]) {
    iVar7 = 0;
    uVar6 = 0;
    iVar5 = 0;
    puVar4 = puVar3;
    do {
      iVar9 = *piVar12 + iVar7;
      iVar11 = *(int *)(iVar9 + 0xc);
      *puVar4 = *(undefined4 *)(iVar9 + 4);
      puVar4[1] = iVar11;
      *(undefined4 *)(iVar9 + 8) = 0;
      uVar10 = piVar12[0x16];
      if (uVar10 != 0) {
        uVar13 = uVar6;
        do {
          piVar8 = (int *)(piVar12[0x15] + uVar13 * 8);
          if (piVar8[1] == iVar11) {
            iVar11 = *(int *)(iVar9 + 4) - *piVar8;
            *(int *)(iVar9 + 8) = iVar11;
            piVar12[0x40] = piVar12[0x40] + iVar11;
            uVar6 = uVar13;
            break;
          }
          if (uVar10 == 0) {
            trap(7);
          }
          uVar13 = (uVar13 + 1) % uVar10;
        } while (uVar13 != uVar6);
      }
      iVar5 = iVar5 + 1;
      iVar7 = iVar7 + 0x2c;
      puVar4 = puVar4 + 2;
    } while (iVar5 < piVar12[1]);
  }
  (*(code *)PTR_free_00132180)(piVar12[0x15]);
  piVar12[0x15] = (int)puVar3;
  piVar12[0x16] = piVar12[1];
  return;
}

