
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void arc_add(Sym *parent,Sym *child,ulong count)

{
  Arc **ppAVar1;
  arc *paVar2;
  Arc *pAVar3;
  ulong uVar4;
  uint uVar5;
  int iVar6;
  Arc **__dest;
  uint uVar7;
  
  if (((byte)debug_level & 0x10) != 0) {
    printf("[arc_add] %lu arcs from %s to %s\n",count,parent->name,child->name);
  }
  pAVar3 = arc_lookup(parent,child);
  if (pAVar3 == (Arc *)0x0) {
    pAVar3 = (Arc *)xmalloc(0x28);
    *(undefined4 *)&pAVar3->time = 0;
    uVar7 = (uint)((int)&pAVar3->time + 4U) & 0xfffffffc;
    pAVar3->has_been_placed = 0;
    uVar5 = 0;
    do {
      *(undefined4 *)(uVar7 + uVar5) = 0;
      uVar5 = uVar5 + 4;
    } while (uVar5 < ((int)pAVar3 + (0x28 - uVar7) & 0xfffffffc));
    pAVar3->parent = parent;
    pAVar3->child = child;
    pAVar3->count = count;
    if (child != parent) {
      if (numarcs == arc_add::maxarcs) {
        if (numarcs == 0) {
          iVar6 = 8;
          arc_add::maxarcs = 2;
        }
        else {
          arc_add::maxarcs = numarcs * 2;
          iVar6 = numarcs << 3;
        }
        __dest = (Arc **)xmalloc(iVar6);
        ppAVar1 = arcs;
        memcpy(__dest,arcs,numarcs << 2);
        free(ppAVar1);
        arcs = __dest;
      }
      ppAVar1 = arcs + numarcs;
      numarcs = numarcs + 1;
      *ppAVar1 = pAVar3;
    }
    paVar2 = (parent->cg).children;
    (parent->cg).children = pAVar3;
    pAVar3->next_child = paVar2;
    pAVar3->next_parent = (child->cg).parents;
    (child->cg).parents = pAVar3;
    return;
  }
  uVar4 = pAVar3->count;
  if (((byte)debug_level & 0x10) != 0) {
    printf("[tally] hit %lu += %lu\n",uVar4,count);
    uVar4 = pAVar3->count;
  }
  pAVar3->count = uVar4 + count;
  return;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void FUN_00014870(int param_1,int param_2,int param_3)

{
  void *__ptr;
  int iVar1;
  int iVar2;
  int *piVar3;
  uint uVar4;
  void *__dest;
  
  if (((byte)DAT_0002e158 & 0x10) != 0) {
    printf("[arc_add] %lu arcs from %s to %s\n",param_3,*(undefined4 *)(param_1 + 0x10),
           *(undefined4 *)(param_2 + 0x10));
  }
  iVar1 = FUN_00014780(param_1,param_2);
  if (iVar1 == 0) {
    piVar3 = (int *)xmalloc(0x28);
    piVar3[3] = 0;
    piVar3[9] = 0;
    uVar4 = 0;
    do {
      *(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0;
      uVar4 = uVar4 + 4;
    } while (uVar4 < ((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc));
    *piVar3 = param_1;
    piVar3[1] = param_2;
    piVar3[2] = param_3;
    if (param_2 != param_1) {
      if (DAT_0002e4dc == DAT_0002d4fc) {
        if (DAT_0002e4dc == 0) {
          iVar1 = 8;
          DAT_0002d4fc = 2;
        }
        else {
          DAT_0002d4fc = DAT_0002e4dc * 2;
          iVar1 = DAT_0002e4dc << 3;
        }
        __dest = (void *)xmalloc(iVar1);
        __ptr = DAT_0002e4e4;
        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);
        free(__ptr);
        DAT_0002e4e4 = __dest;
      }
      iVar1 = DAT_0002e4dc * 4;
      DAT_0002e4dc = DAT_0002e4dc + 1;
      *(int **)((int)DAT_0002e4e4 + iVar1) = piVar3;
    }
    iVar1 = *(int *)(param_1 + 0xf8);
    *(int **)(param_1 + 0xf8) = piVar3;
    piVar3[8] = iVar1;
    piVar3[7] = *(int *)(param_2 + 0xf4);
    *(int **)(param_2 + 0xf4) = piVar3;
    return;
  }
  iVar2 = *(int *)(iVar1 + 8);
  if (((byte)DAT_0002e158 & 0x10) != 0) {
    printf("[tally] hit %lu += %lu\n",iVar2,param_3);
    iVar2 = *(int *)(iVar1 + 8);
  }
  *(int *)(iVar1 + 8) = iVar2 + param_3;
  return;
}


PUSH EBP
MOV EBP,ESP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00013030
ADD EBX,0x18785
SUB ESP,0x1c
MOV ESI,dword ptr [EBP + 0x8]
LEA EAX,[EBX + 0x1158]
MOV dword ptr [EBP + -0x1c],EAX
TEST byte ptr [EAX],0x10
JNZ 0x000148e8
SUB ESP,0x8
PUSH dword ptr [EBP + 0xc]
PUSH ESI
CALL 0x00014780
ADD ESP,0x10
MOV EDI,EAX
TEST EAX,EAX
JZ 0x00014908
MOV ECX,dword ptr [EBP + -0x1c]
MOV EAX,dword ptr [EAX + 0x8]
TEST byte ptr [ECX],0x10
JNZ 0x000148c8
ADD EAX,dword ptr [EBP + 0x10]
MOV dword ptr [EDI + 0x8],EAX
LEA ESP,[EBP + -0xc]
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
PUSH dword ptr [EBP + 0x10]
PUSH EAX
LEA EAX,[EBX + 0xffff53c4]
PUSH EAX
CALL 0x00012070
MOV EAX,dword ptr [EDI + 0x8]
ADD ESP,0x10
JMP 0x000148b5
MOV EAX,dword ptr [EBP + 0xc]
PUSH dword ptr [EAX + 0x10]
LEA EAX,[EBX + 0xffff52ec]
PUSH dword ptr [ESI + 0x10]
PUSH dword ptr [EBP + 0x10]
PUSH EAX
CALL 0x00012070
ADD ESP,0x10
JMP 0x00014895
SUB ESP,0xc
PUSH 0x28
CALL 0x000121d0
LEA ECX,[EAX + 0x10]
LEA EDX,[EAX + 0xc]
MOV EDI,EAX
MOV dword ptr [EAX + 0xc],0x0
AND ECX,0xfffffffc
MOV dword ptr [EAX + 0x24],0x0
XOR EAX,EAX
SUB EDX,ECX
ADD EDX,0x1c
AND EDX,0xfffffffc
MOV dword ptr [ECX + EAX*0x1],0x0
ADD EAX,0x4
CMP EAX,EDX
JC 0x00014935
MOV EAX,dword ptr [EBP + 0xc]
MOV dword ptr [EDI],ESI
ADD ESP,0x10
MOV dword ptr [EDI + 0x4],EAX
MOV EAX,dword ptr [EBP + 0x10]
MOV dword ptr [EDI + 0x8],EAX
CMP dword ptr [EBP + 0xc],ESI
JZ 0x0001497f
LEA EAX,[EBX + 0x14dc]
MOV dword ptr [EBP + -0x1c],EAX
MOV EAX,dword ptr [EAX]
CMP EAX,dword ptr [EBX + 0x4fc]
JZ 0x000149b0
LEA EDX,[EBX + 0x14e4]
MOV EDX,dword ptr [EDX]
MOV EBX,dword ptr [EBP + -0x1c]
LEA ECX,[EAX + 0x1]
MOV dword ptr [EBX],ECX
MOV dword ptr [EDX + EAX*0x4],EDI
MOV EAX,dword ptr [ESI + 0xf8]
MOV dword ptr [ESI + 0xf8],EDI
MOV dword ptr [EDI + 0x20],EAX
MOV EAX,dword ptr [EBP + 0xc]
MOV EAX,dword ptr [EAX + 0xf4]
MOV dword ptr [EDI + 0x1c],EAX
MOV EAX,dword ptr [EBP + 0xc]
MOV dword ptr [EAX + 0xf4],EDI
LEA ESP,[EBP + -0xc]
POP EBX
POP ESI
POP EDI
POP EBP
RET
TEST EAX,EAX
JZ 0x00014a10
LEA EDX,[EAX + EAX*0x1]
SHL EAX,0x3
SUB ESP,0xc
MOV dword ptr [EBX + 0x4fc],EDX
PUSH EAX
CALL 0x000121d0
ADD ESP,0xc
MOV EDX,EAX
LEA EAX,[EBX + 0x14e4]
MOV dword ptr [EBP + -0x24],EDX
MOV ECX,dword ptr [EAX]
MOV dword ptr [EBP + -0x20],EAX
MOV EAX,dword ptr [EBP + -0x1c]
MOV dword ptr [EBP + -0x28],ECX
MOV EAX,dword ptr [EAX]
SHL EAX,0x2
PUSH EAX
PUSH ECX
PUSH EDX
CALL 0x000120a0
MOV ECX,dword ptr [EBP + -0x28]
MOV dword ptr [ESP],ECX
CALL 0x00012090
MOV EAX,dword ptr [EBP + -0x20]
MOV EDX,dword ptr [EBP + -0x24]
ADD ESP,0x10
MOV dword ptr [EAX],EDX
MOV EAX,dword ptr [EBP + -0x1c]
MOV EAX,dword ptr [EAX]
JMP 0x00014974
MOV EAX,0x8
MOV EDX,0x2
JMP 0x000149ba
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00014870(int param_1,int param_2,int param_3)\n\n{\n  void *__ptr;\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  uint uVar4;\n  void *__dest;\n  \n  if (((byte)DAT_0002e158 & 0x10) != 0) {\n    printf("[arc_add] %lu arcs from %s to %s\n",param_3,*(undefined4 *)(param_1 + 0x10),\n           *(undefined4 *)(param_2 + 0x10));\n  }\n  iVar1 = FUN_00014780(param_1,param_2);\n  if (iVar1 == 0) {\n    piVar3 = (int *)xmalloc(0x28);\n    piVar3[3] = 0;\n    piVar3[9] = 0;\n    uVar4 = 0;\n    do {\n      *(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0;\n      uVar4 = uVar4 + 4;\n    } while (uVar4 < ((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc));\n    *piVar3 = param_1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_3;\n    if (param_2 != param_1) {\n      if (DAT_0002e4dc == DAT_0002d4fc) {\n        if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }\n        __dest = (void *)xmalloc(iVar1);\n        __ptr = DAT_0002e4e4;\n        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);\n        free(__ptr);\n        DAT_0002e4e4 = __dest;\n      }\n      iVar1 = DAT_0002e4dc * 4;\n      DAT_0002e4dc = DAT_0002e4dc + 1;\n      *(int **)((int)DAT_0002e4e4 + iVar1) = piVar3;\n    }\n    iVar1 = *(int *)(param_1 + 0xf8);\n    *(int **)(param_1 + 0xf8) = piVar3;\n    piVar3[8] = iVar1;\n    piVar3[7] = *(int *)(param_2 + 0xf4);\n    *(int **)(param_2 + 0xf4) = piVar3;\n    return;\n  }\n  iVar2 = *(int *)(iVar1 + 8);\n  if (((byte)DAT_0002e158 & 0x10) != 0) {\n    printf("[tally] hit %lu += %lu\n",iVar2,param_3);\n    iVar2 = *(int *)(iVar1 + 8);\n  }\n  *(int *)(iVar1 + 8) = iVar2 + param_3;\n  return;\n}\n\n" comment (function_definition "void FUN_00014870(int param_1,int param_2,int param_3)\n\n{\n  void *__ptr;\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  uint uVar4;\n  void *__dest;\n  \n  if (((byte)DAT_0002e158 & 0x10) != 0) {\n    printf("[arc_add] %lu arcs from %s to %s\n",param_3,*(undefined4 *)(param_1 + 0x10),\n           *(undefined4 *)(param_2 + 0x10));\n  }\n  iVar1 = FUN_00014780(param_1,param_2);\n  if (iVar1 == 0) {\n    piVar3 = (int *)xmalloc(0x28);\n    piVar3[3] = 0;\n    piVar3[9] = 0;\n    uVar4 = 0;\n    do {\n      *(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0;\n      uVar4 = uVar4 + 4;\n    } while (uVar4 < ((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc));\n    *piVar3 = param_1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_3;\n    if (param_2 != param_1) {\n      if (DAT_0002e4dc == DAT_0002d4fc) {\n        if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }\n        __dest = (void *)xmalloc(iVar1);\n        __ptr = DAT_0002e4e4;\n        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);\n        free(__ptr);\n        DAT_0002e4e4 = __dest;\n      }\n      iVar1 = DAT_0002e4dc * 4;\n      DAT_0002e4dc = DAT_0002e4dc + 1;\n      *(int **)((int)DAT_0002e4e4 + iVar1) = piVar3;\n    }\n    iVar1 = *(int *)(param_1 + 0xf8);\n    *(int **)(param_1 + 0xf8) = piVar3;\n    piVar3[8] = iVar1;\n    piVar3[7] = *(int *)(param_2 + 0xf4);\n    *(int **)(param_2 + 0xf4) = piVar3;\n    return;\n  }\n  iVar2 = *(int *)(iVar1 + 8);\n  if (((byte)DAT_0002e158 & 0x10) != 0) {\n    printf("[tally] hit %lu += %lu\n",iVar2,param_3);\n    iVar2 = *(int *)(iVar1 + 8);\n  }\n  *(int *)(iVar1 + 8) = iVar2 + param_3;\n  return;\n}" primitive_type (function_declarator "FUN_00014870(int param_1,int param_2,int param_3)" identifier (parameter_list "(int param_1,int param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  void *__ptr;\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  uint uVar4;\n  void *__dest;\n  \n  if (((byte)DAT_0002e158 & 0x10) != 0) {\n    printf("[arc_add] %lu arcs from %s to %s\n",param_3,*(undefined4 *)(param_1 + 0x10),\n           *(undefined4 *)(param_2 + 0x10));\n  }\n  iVar1 = FUN_00014780(param_1,param_2);\n  if (iVar1 == 0) {\n    piVar3 = (int *)xmalloc(0x28);\n    piVar3[3] = 0;\n    piVar3[9] = 0;\n    uVar4 = 0;\n    do {\n      *(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0;\n      uVar4 = uVar4 + 4;\n    } while (uVar4 < ((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc));\n    *piVar3 = param_1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_3;\n    if (param_2 != param_1) {\n      if (DAT_0002e4dc == DAT_0002d4fc) {\n        if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }\n        __dest = (void *)xmalloc(iVar1);\n        __ptr = DAT_0002e4e4;\n        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);\n        free(__ptr);\n        DAT_0002e4e4 = __dest;\n      }\n      iVar1 = DAT_0002e4dc * 4;\n      DAT_0002e4dc = DAT_0002e4dc + 1;\n      *(int **)((int)DAT_0002e4e4 + iVar1) = piVar3;\n    }\n    iVar1 = *(int *)(param_1 + 0xf8);\n    *(int **)(param_1 + 0xf8) = piVar3;\n    piVar3[8] = iVar1;\n    piVar3[7] = *(int *)(param_2 + 0xf4);\n    *(int **)(param_2 + 0xf4) = piVar3;\n    return;\n  }\n  iVar2 = *(int *)(iVar1 + 8);\n  if (((byte)DAT_0002e158 & 0x10) != 0) {\n    printf("[tally] hit %lu += %lu\n",iVar2,param_3);\n    iVar2 = *(int *)(iVar1 + 8);\n  }\n  *(int *)(iVar1 + 8) = iVar2 + param_3;\n  return;\n}" { (declaration "void *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (if_statement "if (((byte)DAT_0002e158 & 0x10) != 0) {\n    printf("[arc_add] %lu arcs from %s to %s\n",param_3,*(undefined4 *)(param_1 + 0x10),\n           *(undefined4 *)(param_2 + 0x10));\n  }" if (parenthesized_expression "(((byte)DAT_0002e158 & 0x10) != 0)" ( (binary_expression "((byte)DAT_0002e158 & 0x10) != 0" (parenthesized_expression "((byte)DAT_0002e158 & 0x10)" ( (binary_expression "(byte)DAT_0002e158 & 0x10" (cast_expression "(byte)DAT_0002e158" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n    printf("[arc_add] %lu arcs from %s to %s\n",param_3,*(undefined4 *)(param_1 + 0x10),\n           *(undefined4 *)(param_2 + 0x10));\n  }" { (expression_statement "printf("[arc_add] %lu arcs from %s to %s\n",param_3,*(undefined4 *)(param_1 + 0x10),\n           *(undefined4 *)(param_2 + 0x10));" (call_expression "printf("[arc_add] %lu arcs from %s to %s\n",param_3,*(undefined4 *)(param_1 + 0x10),\n           *(undefined4 *)(param_2 + 0x10))" identifier (argument_list "("[arc_add] %lu arcs from %s to %s\n",param_3,*(undefined4 *)(param_1 + 0x10),\n           *(undefined4 *)(param_2 + 0x10))" ( (string_literal ""[arc_add] %lu arcs from %s to %s\n"" " string_content escape_sequence ") , identifier , (pointer_expression "*(undefined4 *)(param_1 + 0x10)" * (cast_expression "(undefined4 *)(param_1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(param_2 + 0x10)" * (cast_expression "(undefined4 *)(param_2 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) ))) ;) })) (expression_statement "iVar1 = FUN_00014780(param_1,param_2);" (assignment_expression "iVar1 = FUN_00014780(param_1,param_2)" identifier = (call_expression "FUN_00014780(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    piVar3 = (int *)xmalloc(0x28);\n    piVar3[3] = 0;\n    piVar3[9] = 0;\n    uVar4 = 0;\n    do {\n      *(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0;\n      uVar4 = uVar4 + 4;\n    } while (uVar4 < ((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc));\n    *piVar3 = param_1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_3;\n    if (param_2 != param_1) {\n      if (DAT_0002e4dc == DAT_0002d4fc) {\n        if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }\n        __dest = (void *)xmalloc(iVar1);\n        __ptr = DAT_0002e4e4;\n        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);\n        free(__ptr);\n        DAT_0002e4e4 = __dest;\n      }\n      iVar1 = DAT_0002e4dc * 4;\n      DAT_0002e4dc = DAT_0002e4dc + 1;\n      *(int **)((int)DAT_0002e4e4 + iVar1) = piVar3;\n    }\n    iVar1 = *(int *)(param_1 + 0xf8);\n    *(int **)(param_1 + 0xf8) = piVar3;\n    piVar3[8] = iVar1;\n    piVar3[7] = *(int *)(param_2 + 0xf4);\n    *(int **)(param_2 + 0xf4) = piVar3;\n    return;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    piVar3 = (int *)xmalloc(0x28);\n    piVar3[3] = 0;\n    piVar3[9] = 0;\n    uVar4 = 0;\n    do {\n      *(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0;\n      uVar4 = uVar4 + 4;\n    } while (uVar4 < ((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc));\n    *piVar3 = param_1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_3;\n    if (param_2 != param_1) {\n      if (DAT_0002e4dc == DAT_0002d4fc) {\n        if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }\n        __dest = (void *)xmalloc(iVar1);\n        __ptr = DAT_0002e4e4;\n        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);\n        free(__ptr);\n        DAT_0002e4e4 = __dest;\n      }\n      iVar1 = DAT_0002e4dc * 4;\n      DAT_0002e4dc = DAT_0002e4dc + 1;\n      *(int **)((int)DAT_0002e4e4 + iVar1) = piVar3;\n    }\n    iVar1 = *(int *)(param_1 + 0xf8);\n    *(int **)(param_1 + 0xf8) = piVar3;\n    piVar3[8] = iVar1;\n    piVar3[7] = *(int *)(param_2 + 0xf4);\n    *(int **)(param_2 + 0xf4) = piVar3;\n    return;\n  }" { (expression_statement "piVar3 = (int *)xmalloc(0x28);" (assignment_expression "piVar3 = (int *)xmalloc(0x28)" identifier = (cast_expression "(int *)xmalloc(0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x28)" identifier (argument_list "(0x28)" ( number_literal ))))) ;) (expression_statement "piVar3[3] = 0;" (assignment_expression "piVar3[3] = 0" (subscript_expression "piVar3[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar3[9] = 0;" (assignment_expression "piVar3[9] = 0" (subscript_expression "piVar3[9]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n      *(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0;\n      uVar4 = uVar4 + 4;\n    } while (uVar4 < ((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc));" do (compound_statement "{\n      *(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0;\n      uVar4 = uVar4 + 4;\n    }" { (expression_statement "*(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0;" (assignment_expression "*(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0" (pointer_expression "*(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4)" * (cast_expression "(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4)" ( (binary_expression "((uint)(piVar3 + 4) & 0xfffffffc) + uVar4" (parenthesized_expression "((uint)(piVar3 + 4) & 0xfffffffc)" ( (binary_expression "(uint)(piVar3 + 4) & 0xfffffffc" (call_expression "(uint)(piVar3 + 4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(piVar3 + 4)" ( (binary_expression "piVar3 + 4" identifier + number_literal) ))) & number_literal) )) + identifier) )))) = number_literal) ;) (expression_statement "uVar4 = uVar4 + 4;" (assignment_expression "uVar4 = uVar4 + 4" identifier = (binary_expression "uVar4 + 4" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar4 < ((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc))" ( (binary_expression "uVar4 < ((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc)" identifier < (parenthesized_expression "((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc)" ( (binary_expression "(int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc" (binary_expression "(int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc))" (cast_expression "(int)piVar3" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(0x28 - ((uint)(piVar3 + 4) & 0xfffffffc))" ( (binary_expression "0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)" number_literal - (parenthesized_expression "((uint)(piVar3 + 4) & 0xfffffffc)" ( (binary_expression "(uint)(piVar3 + 4) & 0xfffffffc" (call_expression "(uint)(piVar3 + 4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(piVar3 + 4)" ( (binary_expression "piVar3 + 4" identifier + number_literal) ))) & number_literal) ))) ))) & number_literal) ))) )) ;) (expression_statement "*piVar3 = param_1;" (assignment_expression "*piVar3 = param_1" (pointer_expression "*piVar3" * identifier) = identifier) ;) (expression_statement "piVar3[1] = param_2;" (assignment_expression "piVar3[1] = param_2" (subscript_expression "piVar3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "piVar3[2] = param_3;" (assignment_expression "piVar3[2] = param_3" (subscript_expression "piVar3[2]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (param_2 != param_1) {\n      if (DAT_0002e4dc == DAT_0002d4fc) {\n        if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }\n        __dest = (void *)xmalloc(iVar1);\n        __ptr = DAT_0002e4e4;\n        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);\n        free(__ptr);\n        DAT_0002e4e4 = __dest;\n      }\n      iVar1 = DAT_0002e4dc * 4;\n      DAT_0002e4dc = DAT_0002e4dc + 1;\n      *(int **)((int)DAT_0002e4e4 + iVar1) = piVar3;\n    }" if (parenthesized_expression "(param_2 != param_1)" ( (binary_expression "param_2 != param_1" identifier != identifier) )) (compound_statement "{\n      if (DAT_0002e4dc == DAT_0002d4fc) {\n        if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }\n        __dest = (void *)xmalloc(iVar1);\n        __ptr = DAT_0002e4e4;\n        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);\n        free(__ptr);\n        DAT_0002e4e4 = __dest;\n      }\n      iVar1 = DAT_0002e4dc * 4;\n      DAT_0002e4dc = DAT_0002e4dc + 1;\n      *(int **)((int)DAT_0002e4e4 + iVar1) = piVar3;\n    }" { (if_statement "if (DAT_0002e4dc == DAT_0002d4fc) {\n        if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }\n        __dest = (void *)xmalloc(iVar1);\n        __ptr = DAT_0002e4e4;\n        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);\n        free(__ptr);\n        DAT_0002e4e4 = __dest;\n      }" if (parenthesized_expression "(DAT_0002e4dc == DAT_0002d4fc)" ( (binary_expression "DAT_0002e4dc == DAT_0002d4fc" identifier == identifier) )) (compound_statement "{\n        if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }\n        __dest = (void *)xmalloc(iVar1);\n        __ptr = DAT_0002e4e4;\n        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);\n        free(__ptr);\n        DAT_0002e4e4 = __dest;\n      }" { (if_statement "if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }" if (parenthesized_expression "(DAT_0002e4dc == 0)" ( (binary_expression "DAT_0002e4dc == 0" identifier == number_literal) )) (compound_statement "{\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }" { (expression_statement "iVar1 = 8;" (assignment_expression "iVar1 = 8" identifier = number_literal) ;) (expression_statement "DAT_0002d4fc = 2;" (assignment_expression "DAT_0002d4fc = 2" identifier = number_literal) ;) }) (else_clause "else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }" else (compound_statement "{\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }" { (expression_statement "DAT_0002d4fc = DAT_0002e4dc * 2;" (assignment_expression "DAT_0002d4fc = DAT_0002e4dc * 2" identifier = (binary_expression "DAT_0002e4dc * 2" identifier * number_literal)) ;) (expression_statement "iVar1 = DAT_0002e4dc << 3;" (assignment_expression "iVar1 = DAT_0002e4dc << 3" identifier = (binary_expression "DAT_0002e4dc << 3" identifier << number_literal)) ;) }))) (expression_statement "__dest = (void *)xmalloc(iVar1);" (assignment_expression "__dest = (void *)xmalloc(iVar1)" identifier = (cast_expression "(void *)xmalloc(iVar1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))))) ;) (expression_statement "__ptr = DAT_0002e4e4;" (assignment_expression "__ptr = DAT_0002e4e4" identifier = identifier) ;) (expression_statement "memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);" (call_expression "memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2)" identifier (argument_list "(__dest,DAT_0002e4e4,DAT_0002e4dc << 2)" ( identifier , identifier , (binary_expression "DAT_0002e4dc << 2" identifier << number_literal) ))) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (expression_statement "DAT_0002e4e4 = __dest;" (assignment_expression "DAT_0002e4e4 = __dest" identifier = identifier) ;) })) (expression_statement "iVar1 = DAT_0002e4dc * 4;" (assignment_expression "iVar1 = DAT_0002e4dc * 4" identifier = (binary_expression "DAT_0002e4dc * 4" identifier * number_literal)) ;) (expression_statement "DAT_0002e4dc = DAT_0002e4dc + 1;" (assignment_expression "DAT_0002e4dc = DAT_0002e4dc + 1" identifier = (binary_expression "DAT_0002e4dc + 1" identifier + number_literal)) ;) (expression_statement "*(int **)((int)DAT_0002e4e4 + iVar1) = piVar3;" (assignment_expression "*(int **)((int)DAT_0002e4e4 + iVar1) = piVar3" (pointer_expression "*(int **)((int)DAT_0002e4e4 + iVar1)" * (cast_expression "(int **)((int)DAT_0002e4e4 + iVar1)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)DAT_0002e4e4 + iVar1)" ( (binary_expression "(int)DAT_0002e4e4 + iVar1" (cast_expression "(int)DAT_0002e4e4" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) = identifier) ;) })) (expression_statement "iVar1 = *(int *)(param_1 + 0xf8);" (assignment_expression "iVar1 = *(int *)(param_1 + 0xf8)" identifier = (pointer_expression "*(int *)(param_1 + 0xf8)" * (cast_expression "(int *)(param_1 + 0xf8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xf8)" ( (binary_expression "param_1 + 0xf8" identifier + number_literal) ))))) ;) (expression_statement "*(int **)(param_1 + 0xf8) = piVar3;" (assignment_expression "*(int **)(param_1 + 0xf8) = piVar3" (pointer_expression "*(int **)(param_1 + 0xf8)" * (cast_expression "(int **)(param_1 + 0xf8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xf8)" ( (binary_expression "param_1 + 0xf8" identifier + number_literal) )))) = identifier) ;) (expression_statement "piVar3[8] = iVar1;" (assignment_expression "piVar3[8] = iVar1" (subscript_expression "piVar3[8]" identifier [ number_literal ]) = identifier) ;) (expression_statement "piVar3[7] = *(int *)(param_2 + 0xf4);" (assignment_expression "piVar3[7] = *(int *)(param_2 + 0xf4)" (subscript_expression "piVar3[7]" identifier [ number_literal ]) = (pointer_expression "*(int *)(param_2 + 0xf4)" * (cast_expression "(int *)(param_2 + 0xf4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xf4)" ( (binary_expression "param_2 + 0xf4" identifier + number_literal) ))))) ;) (expression_statement "*(int **)(param_2 + 0xf4) = piVar3;" (assignment_expression "*(int **)(param_2 + 0xf4) = piVar3" (pointer_expression "*(int **)(param_2 + 0xf4)" * (cast_expression "(int **)(param_2 + 0xf4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 0xf4)" ( (binary_expression "param_2 + 0xf4" identifier + number_literal) )))) = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "iVar2 = *(int *)(iVar1 + 8);" (assignment_expression "iVar2 = *(int *)(iVar1 + 8)" identifier = (pointer_expression "*(int *)(iVar1 + 8)" * (cast_expression "(int *)(iVar1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 8)" ( (binary_expression "iVar1 + 8" identifier + number_literal) ))))) ;) (if_statement "if (((byte)DAT_0002e158 & 0x10) != 0) {\n    printf("[tally] hit %lu += %lu\n",iVar2,param_3);\n    iVar2 = *(int *)(iVar1 + 8);\n  }" if (parenthesized_expression "(((byte)DAT_0002e158 & 0x10) != 0)" ( (binary_expression "((byte)DAT_0002e158 & 0x10) != 0" (parenthesized_expression "((byte)DAT_0002e158 & 0x10)" ( (binary_expression "(byte)DAT_0002e158 & 0x10" (cast_expression "(byte)DAT_0002e158" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n    printf("[tally] hit %lu += %lu\n",iVar2,param_3);\n    iVar2 = *(int *)(iVar1 + 8);\n  }" { (expression_statement "printf("[tally] hit %lu += %lu\n",iVar2,param_3);" (call_expression "printf("[tally] hit %lu += %lu\n",iVar2,param_3)" identifier (argument_list "("[tally] hit %lu += %lu\n",iVar2,param_3)" ( (string_literal ""[tally] hit %lu += %lu\n"" " string_content escape_sequence ") , identifier , identifier ))) ;) (expression_statement "iVar2 = *(int *)(iVar1 + 8);" (assignment_expression "iVar2 = *(int *)(iVar1 + 8)" identifier = (pointer_expression "*(int *)(iVar1 + 8)" * (cast_expression "(int *)(iVar1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 8)" ( (binary_expression "iVar1 + 8" identifier + number_literal) ))))) ;) })) (expression_statement "*(int *)(iVar1 + 8) = iVar2 + param_3;" (assignment_expression "*(int *)(iVar1 + 8) = iVar2 + param_3" (pointer_expression "*(int *)(iVar1 + 8)" * (cast_expression "(int *)(iVar1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 8)" ( (binary_expression "iVar1 + 8" identifier + number_literal) )))) = (binary_expression "iVar2 + param_3" identifier + identifier)) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid arc_add(Sym *parent,Sym *child,ulong count)\n\n{\n  Arc **ppAVar1;\n  arc *paVar2;\n  Arc *pAVar3;\n  ulong uVar4;\n  uint uVar5;\n  int iVar6;\n  Arc **__dest;\n  uint uVar7;\n  \n  if (((byte)debug_level & 0x10) != 0) {\n    printf("[arc_add] %lu arcs from %s to %s\n",count,parent->name,child->name);\n  }\n  pAVar3 = arc_lookup(parent,child);\n  if (pAVar3 == (Arc *)0x0) {\n    pAVar3 = (Arc *)xmalloc(0x28);\n    *(undefined4 *)&pAVar3->time = 0;\n    uVar7 = (uint)((int)&pAVar3->time + 4U) & 0xfffffffc;\n    pAVar3->has_been_placed = 0;\n    uVar5 = 0;\n    do {\n      *(undefined4 *)(uVar7 + uVar5) = 0;\n      uVar5 = uVar5 + 4;\n    } while (uVar5 < ((int)pAVar3 + (0x28 - uVar7) & 0xfffffffc));\n    pAVar3->parent = parent;\n    pAVar3->child = child;\n    pAVar3->count = count;\n    if (child != parent) {\n      if (numarcs == arc_add::maxarcs) {\n        if (numarcs == 0) {\n          iVar6 = 8;\n          arc_add::maxarcs = 2;\n        }\n        else {\n          arc_add::maxarcs = numarcs * 2;\n          iVar6 = numarcs << 3;\n        }\n        __dest = (Arc **)xmalloc(iVar6);\n        ppAVar1 = arcs;\n        memcpy(__dest,arcs,numarcs << 2);\n        free(ppAVar1);\n        arcs = __dest;\n      }\n      ppAVar1 = arcs + numarcs;\n      numarcs = numarcs + 1;\n      *ppAVar1 = pAVar3;\n    }\n    paVar2 = (parent->cg).children;\n    (parent->cg).children = pAVar3;\n    pAVar3->next_child = paVar2;\n    pAVar3->next_parent = (child->cg).parents;\n    (child->cg).parents = pAVar3;\n    return;\n  }\n  uVar4 = pAVar3->count;\n  if (((byte)debug_level & 0x10) != 0) {\n    printf("[tally] hit %lu += %lu\n",uVar4,count);\n    uVar4 = pAVar3->count;\n  }\n  pAVar3->count = uVar4 + count;\n  return;\n}\n\n" comment (function_definition "void arc_add(Sym *parent,Sym *child,ulong count)\n\n{\n  Arc **ppAVar1;\n  arc *paVar2;\n  Arc *pAVar3;\n  ulong uVar4;\n  uint uVar5;\n  int iVar6;\n  Arc **__dest;\n  uint uVar7;\n  \n  if (((byte)debug_level & 0x10) != 0) {\n    printf("[arc_add] %lu arcs from %s to %s\n",count,parent->name,child->name);\n  }\n  pAVar3 = arc_lookup(parent,child);\n  if (pAVar3 == (Arc *)0x0) {\n    pAVar3 = (Arc *)xmalloc(0x28);\n    *(undefined4 *)&pAVar3->time = 0;\n    uVar7 = (uint)((int)&pAVar3->time + 4U) & 0xfffffffc;\n    pAVar3->has_been_placed = 0;\n    uVar5 = 0;\n    do {\n      *(undefined4 *)(uVar7 + uVar5) = 0;\n      uVar5 = uVar5 + 4;\n    } while (uVar5 < ((int)pAVar3 + (0x28 - uVar7) & 0xfffffffc));\n    pAVar3->parent = parent;\n    pAVar3->child = child;\n    pAVar3->count = count;\n    if (child != parent) {\n      if (numarcs == arc_add::maxarcs) {\n        if (numarcs == 0) {\n          iVar6 = 8;\n          arc_add::maxarcs = 2;\n        }\n        else {\n          arc_add::maxarcs = numarcs * 2;\n          iVar6 = numarcs << 3;\n        }\n        __dest = (Arc **)xmalloc(iVar6);\n        ppAVar1 = arcs;\n        memcpy(__dest,arcs,numarcs << 2);\n        free(ppAVar1);\n        arcs = __dest;\n      }\n      ppAVar1 = arcs + numarcs;\n      numarcs = numarcs + 1;\n      *ppAVar1 = pAVar3;\n    }\n    paVar2 = (parent->cg).children;\n    (parent->cg).children = pAVar3;\n    pAVar3->next_child = paVar2;\n    pAVar3->next_parent = (child->cg).parents;\n    (child->cg).parents = pAVar3;\n    return;\n  }\n  uVar4 = pAVar3->count;\n  if (((byte)debug_level & 0x10) != 0) {\n    printf("[tally] hit %lu += %lu\n",uVar4,count);\n    uVar4 = pAVar3->count;\n  }\n  pAVar3->count = uVar4 + count;\n  return;\n}" primitive_type (function_declarator "arc_add(Sym *parent,Sym *child,ulong count)" identifier (parameter_list "(Sym *parent,Sym *child,ulong count)" ( (parameter_declaration "Sym *parent" type_identifier (pointer_declarator "*parent" * identifier)) , (parameter_declaration "Sym *child" type_identifier (pointer_declarator "*child" * identifier)) , (parameter_declaration "ulong count" type_identifier identifier) ))) (compound_statement "{\n  Arc **ppAVar1;\n  arc *paVar2;\n  Arc *pAVar3;\n  ulong uVar4;\n  uint uVar5;\n  int iVar6;\n  Arc **__dest;\n  uint uVar7;\n  \n  if (((byte)debug_level & 0x10) != 0) {\n    printf("[arc_add] %lu arcs from %s to %s\n",count,parent->name,child->name);\n  }\n  pAVar3 = arc_lookup(parent,child);\n  if (pAVar3 == (Arc *)0x0) {\n    pAVar3 = (Arc *)xmalloc(0x28);\n    *(undefined4 *)&pAVar3->time = 0;\n    uVar7 = (uint)((int)&pAVar3->time + 4U) & 0xfffffffc;\n    pAVar3->has_been_placed = 0;\n    uVar5 = 0;\n    do {\n      *(undefined4 *)(uVar7 + uVar5) = 0;\n      uVar5 = uVar5 + 4;\n    } while (uVar5 < ((int)pAVar3 + (0x28 - uVar7) & 0xfffffffc));\n    pAVar3->parent = parent;\n    pAVar3->child = child;\n    pAVar3->count = count;\n    if (child != parent) {\n      if (numarcs == arc_add::maxarcs) {\n        if (numarcs == 0) {\n          iVar6 = 8;\n          arc_add::maxarcs = 2;\n        }\n        else {\n          arc_add::maxarcs = numarcs * 2;\n          iVar6 = numarcs << 3;\n        }\n        __dest = (Arc **)xmalloc(iVar6);\n        ppAVar1 = arcs;\n        memcpy(__dest,arcs,numarcs << 2);\n        free(ppAVar1);\n        arcs = __dest;\n      }\n      ppAVar1 = arcs + numarcs;\n      numarcs = numarcs + 1;\n      *ppAVar1 = pAVar3;\n    }\n    paVar2 = (parent->cg).children;\n    (parent->cg).children = pAVar3;\n    pAVar3->next_child = paVar2;\n    pAVar3->next_parent = (child->cg).parents;\n    (child->cg).parents = pAVar3;\n    return;\n  }\n  uVar4 = pAVar3->count;\n  if (((byte)debug_level & 0x10) != 0) {\n    printf("[tally] hit %lu += %lu\n",uVar4,count);\n    uVar4 = pAVar3->count;\n  }\n  pAVar3->count = uVar4 + count;\n  return;\n}" { (declaration "Arc **ppAVar1;" type_identifier (pointer_declarator "**ppAVar1" * (pointer_declarator "*ppAVar1" * identifier)) ;) (declaration "arc *paVar2;" type_identifier (pointer_declarator "*paVar2" * identifier) ;) (declaration "Arc *pAVar3;" type_identifier (pointer_declarator "*pAVar3" * identifier) ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "Arc **__dest;" type_identifier (pointer_declarator "**__dest" * (pointer_declarator "*__dest" * identifier)) ;) (declaration "uint uVar7;" type_identifier identifier ;) (if_statement "if (((byte)debug_level & 0x10) != 0) {\n    printf("[arc_add] %lu arcs from %s to %s\n",count,parent->name,child->name);\n  }" if (parenthesized_expression "(((byte)debug_level & 0x10) != 0)" ( (binary_expression "((byte)debug_level & 0x10) != 0" (parenthesized_expression "((byte)debug_level & 0x10)" ( (binary_expression "(byte)debug_level & 0x10" (cast_expression "(byte)debug_level" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n    printf("[arc_add] %lu arcs from %s to %s\n",count,parent->name,child->name);\n  }" { (expression_statement "printf("[arc_add] %lu arcs from %s to %s\n",count,parent->name,child->name);" (call_expression "printf("[arc_add] %lu arcs from %s to %s\n",count,parent->name,child->name)" identifier (argument_list "("[arc_add] %lu arcs from %s to %s\n",count,parent->name,child->name)" ( (string_literal ""[arc_add] %lu arcs from %s to %s\n"" " string_content escape_sequence ") , identifier , (field_expression "parent->name" identifier -> field_identifier) , (field_expression "child->name" identifier -> field_identifier) ))) ;) })) (expression_statement "pAVar3 = arc_lookup(parent,child);" (assignment_expression "pAVar3 = arc_lookup(parent,child)" identifier = (call_expression "arc_lookup(parent,child)" identifier (argument_list "(parent,child)" ( identifier , identifier )))) ;) (if_statement "if (pAVar3 == (Arc *)0x0) {\n    pAVar3 = (Arc *)xmalloc(0x28);\n    *(undefined4 *)&pAVar3->time = 0;\n    uVar7 = (uint)((int)&pAVar3->time + 4U) & 0xfffffffc;\n    pAVar3->has_been_placed = 0;\n    uVar5 = 0;\n    do {\n      *(undefined4 *)(uVar7 + uVar5) = 0;\n      uVar5 = uVar5 + 4;\n    } while (uVar5 < ((int)pAVar3 + (0x28 - uVar7) & 0xfffffffc));\n    pAVar3->parent = parent;\n    pAVar3->child = child;\n    pAVar3->count = count;\n    if (child != parent) {\n      if (numarcs == arc_add::maxarcs) {\n        if (numarcs == 0) {\n          iVar6 = 8;\n          arc_add::maxarcs = 2;\n        }\n        else {\n          arc_add::maxarcs = numarcs * 2;\n          iVar6 = numarcs << 3;\n        }\n        __dest = (Arc **)xmalloc(iVar6);\n        ppAVar1 = arcs;\n        memcpy(__dest,arcs,numarcs << 2);\n        free(ppAVar1);\n        arcs = __dest;\n      }\n      ppAVar1 = arcs + numarcs;\n      numarcs = numarcs + 1;\n      *ppAVar1 = pAVar3;\n    }\n    paVar2 = (parent->cg).children;\n    (parent->cg).children = pAVar3;\n    pAVar3->next_child = paVar2;\n    pAVar3->next_parent = (child->cg).parents;\n    (child->cg).parents = pAVar3;\n    return;\n  }" if (parenthesized_expression "(pAVar3 == (Arc *)0x0)" ( (binary_expression "pAVar3 == (Arc *)0x0" identifier == (cast_expression "(Arc *)0x0" ( (type_descriptor "Arc *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pAVar3 = (Arc *)xmalloc(0x28);\n    *(undefined4 *)&pAVar3->time = 0;\n    uVar7 = (uint)((int)&pAVar3->time + 4U) & 0xfffffffc;\n    pAVar3->has_been_placed = 0;\n    uVar5 = 0;\n    do {\n      *(undefined4 *)(uVar7 + uVar5) = 0;\n      uVar5 = uVar5 + 4;\n    } while (uVar5 < ((int)pAVar3 + (0x28 - uVar7) & 0xfffffffc));\n    pAVar3->parent = parent;\n    pAVar3->child = child;\n    pAVar3->count = count;\n    if (child != parent) {\n      if (numarcs == arc_add::maxarcs) {\n        if (numarcs == 0) {\n          iVar6 = 8;\n          arc_add::maxarcs = 2;\n        }\n        else {\n          arc_add::maxarcs = numarcs * 2;\n          iVar6 = numarcs << 3;\n        }\n        __dest = (Arc **)xmalloc(iVar6);\n        ppAVar1 = arcs;\n        memcpy(__dest,arcs,numarcs << 2);\n        free(ppAVar1);\n        arcs = __dest;\n      }\n      ppAVar1 = arcs + numarcs;\n      numarcs = numarcs + 1;\n      *ppAVar1 = pAVar3;\n    }\n    paVar2 = (parent->cg).children;\n    (parent->cg).children = pAVar3;\n    pAVar3->next_child = paVar2;\n    pAVar3->next_parent = (child->cg).parents;\n    (child->cg).parents = pAVar3;\n    return;\n  }" { (expression_statement "pAVar3 = (Arc *)xmalloc(0x28);" (assignment_expression "pAVar3 = (Arc *)xmalloc(0x28)" identifier = (cast_expression "(Arc *)xmalloc(0x28)" ( (type_descriptor "Arc *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x28)" identifier (argument_list "(0x28)" ( number_literal ))))) ;) (expression_statement "*(undefined4 *)&pAVar3->time = 0;" (assignment_expression "*(undefined4 *)&pAVar3->time = 0" (pointer_expression "*(undefined4 *)&pAVar3->time" * (cast_expression "(undefined4 *)&pAVar3->time" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pAVar3->time" & (field_expression "pAVar3->time" identifier -> field_identifier)))) = number_literal) ;) (expression_statement "uVar7 = (uint)((int)&pAVar3->time + 4U) & 0xfffffffc;" (assignment_expression "uVar7 = (uint)((int)&pAVar3->time + 4U) & 0xfffffffc" identifier = (binary_expression "(uint)((int)&pAVar3->time + 4U) & 0xfffffffc" (call_expression "(uint)((int)&pAVar3->time + 4U)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)&pAVar3->time + 4U)" ( (binary_expression "(int)&pAVar3->time + 4U" (cast_expression "(int)&pAVar3->time" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&pAVar3->time" & (field_expression "pAVar3->time" identifier -> field_identifier))) + number_literal) ))) & number_literal)) ;) (expression_statement "pAVar3->has_been_placed = 0;" (assignment_expression "pAVar3->has_been_placed = 0" (field_expression "pAVar3->has_been_placed" identifier -> field_identifier) = number_literal) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n      *(undefined4 *)(uVar7 + uVar5) = 0;\n      uVar5 = uVar5 + 4;\n    } while (uVar5 < ((int)pAVar3 + (0x28 - uVar7) & 0xfffffffc));" do (compound_statement "{\n      *(undefined4 *)(uVar7 + uVar5) = 0;\n      uVar5 = uVar5 + 4;\n    }" { (expression_statement "*(undefined4 *)(uVar7 + uVar5) = 0;" (assignment_expression "*(undefined4 *)(uVar7 + uVar5) = 0" (pointer_expression "*(undefined4 *)(uVar7 + uVar5)" * (cast_expression "(undefined4 *)(uVar7 + uVar5)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar7 + uVar5)" ( (binary_expression "uVar7 + uVar5" identifier + identifier) )))) = number_literal) ;) (expression_statement "uVar5 = uVar5 + 4;" (assignment_expression "uVar5 = uVar5 + 4" identifier = (binary_expression "uVar5 + 4" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar5 < ((int)pAVar3 + (0x28 - uVar7) & 0xfffffffc))" ( (binary_expression "uVar5 < ((int)pAVar3 + (0x28 - uVar7) & 0xfffffffc)" identifier < (parenthesized_expression "((int)pAVar3 + (0x28 - uVar7) & 0xfffffffc)" ( (binary_expression "(int)pAVar3 + (0x28 - uVar7) & 0xfffffffc" (binary_expression "(int)pAVar3 + (0x28 - uVar7)" (cast_expression "(int)pAVar3" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(0x28 - uVar7)" ( (binary_expression "0x28 - uVar7" number_literal - identifier) ))) & number_literal) ))) )) ;) (expression_statement "pAVar3->parent = parent;" (assignment_expression "pAVar3->parent = parent" (field_expression "pAVar3->parent" identifier -> field_identifier) = identifier) ;) (expression_statement "pAVar3->child = child;" (assignment_expression "pAVar3->child = child" (field_expression "pAVar3->child" identifier -> field_identifier) = identifier) ;) (expression_statement "pAVar3->count = count;" (assignment_expression "pAVar3->count = count" (field_expression "pAVar3->count" identifier -> field_identifier) = identifier) ;) (if_statement "if (child != parent) {\n      if (numarcs == arc_add::maxarcs) {\n        if (numarcs == 0) {\n          iVar6 = 8;\n          arc_add::maxarcs = 2;\n        }\n        else {\n          arc_add::maxarcs = numarcs * 2;\n          iVar6 = numarcs << 3;\n        }\n        __dest = (Arc **)xmalloc(iVar6);\n        ppAVar1 = arcs;\n        memcpy(__dest,arcs,numarcs << 2);\n        free(ppAVar1);\n        arcs = __dest;\n      }\n      ppAVar1 = arcs + numarcs;\n      numarcs = numarcs + 1;\n      *ppAVar1 = pAVar3;\n    }" if (parenthesized_expression "(child != parent)" ( (binary_expression "child != parent" identifier != identifier) )) (compound_statement "{\n      if (numarcs == arc_add::maxarcs) {\n        if (numarcs == 0) {\n          iVar6 = 8;\n          arc_add::maxarcs = 2;\n        }\n        else {\n          arc_add::maxarcs = numarcs * 2;\n          iVar6 = numarcs << 3;\n        }\n        __dest = (Arc **)xmalloc(iVar6);\n        ppAVar1 = arcs;\n        memcpy(__dest,arcs,numarcs << 2);\n        free(ppAVar1);\n        arcs = __dest;\n      }\n      ppAVar1 = arcs + numarcs;\n      numarcs = numarcs + 1;\n      *ppAVar1 = pAVar3;\n    }" { (if_statement "if (numarcs == arc_add::maxarcs) {\n        if (numarcs == 0) {\n          iVar6 = 8;\n          arc_add::maxarcs = 2;\n        }\n        else {\n          arc_add::maxarcs = numarcs * 2;\n          iVar6 = numarcs << 3;\n        }\n        __dest = (Arc **)xmalloc(iVar6);\n        ppAVar1 = arcs;\n        memcpy(__dest,arcs,numarcs << 2);\n        free(ppAVar1);\n        arcs = __dest;\n      }" if (parenthesized_expression "(numarcs == arc_add::maxarcs)" ( (binary_expression "numarcs == arc_add" identifier == identifier) (ERROR "::maxarcs" : : identifier) )) (compound_statement "{\n        if (numarcs == 0) {\n          iVar6 = 8;\n          arc_add::maxarcs = 2;\n        }\n        else {\n          arc_add::maxarcs = numarcs * 2;\n          iVar6 = numarcs << 3;\n        }\n        __dest = (Arc **)xmalloc(iVar6);\n        ppAVar1 = arcs;\n        memcpy(__dest,arcs,numarcs << 2);\n        free(ppAVar1);\n        arcs = __dest;\n      }" { (if_statement "if (numarcs == 0) {\n          iVar6 = 8;\n          arc_add::maxarcs = 2;\n        }\n        else {\n          arc_add::maxarcs = numarcs * 2;\n          iVar6 = numarcs << 3;\n        }" if (parenthesized_expression "(numarcs == 0)" ( (binary_expression "numarcs == 0" identifier == number_literal) )) (compound_statement "{\n          iVar6 = 8;\n          arc_add::maxarcs = 2;\n        }" { (expression_statement "iVar6 = 8;" (assignment_expression "iVar6 = 8" identifier = number_literal) ;) (labeled_statement "arc_add::maxarcs = 2;" statement_identifier : (ERROR ":" :) (expression_statement "maxarcs = 2;" (assignment_expression "maxarcs = 2" identifier = number_literal) ;)) }) (else_clause "else {\n          arc_add::maxarcs = numarcs * 2;\n          iVar6 = numarcs << 3;\n        }" else (compound_statement "{\n          arc_add::maxarcs = numarcs * 2;\n          iVar6 = numarcs << 3;\n        }" { (labeled_statement "arc_add::maxarcs = numarcs * 2;" statement_identifier : (ERROR ":" :) (expression_statement "maxarcs = numarcs * 2;" (assignment_expression "maxarcs = numarcs * 2" identifier = (binary_expression "numarcs * 2" identifier * number_literal)) ;)) (expression_statement "iVar6 = numarcs << 3;" (assignment_expression "iVar6 = numarcs << 3" identifier = (binary_expression "numarcs << 3" identifier << number_literal)) ;) }))) (expression_statement "__dest = (Arc **)xmalloc(iVar6);" (assignment_expression "__dest = (Arc **)xmalloc(iVar6)" identifier = (cast_expression "(Arc **)xmalloc(iVar6)" ( (type_descriptor "Arc **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (call_expression "xmalloc(iVar6)" identifier (argument_list "(iVar6)" ( identifier ))))) ;) (expression_statement "ppAVar1 = arcs;" (assignment_expression "ppAVar1 = arcs" identifier = identifier) ;) (expression_statement "memcpy(__dest,arcs,numarcs << 2);" (call_expression "memcpy(__dest,arcs,numarcs << 2)" identifier (argument_list "(__dest,arcs,numarcs << 2)" ( identifier , identifier , (binary_expression "numarcs << 2" identifier << number_literal) ))) ;) (expression_statement "free(ppAVar1);" (call_expression "free(ppAVar1)" identifier (argument_list "(ppAVar1)" ( identifier ))) ;) (expression_statement "arcs = __dest;" (assignment_expression "arcs = __dest" identifier = identifier) ;) })) (expression_statement "ppAVar1 = arcs + numarcs;" (assignment_expression "ppAVar1 = arcs + numarcs" identifier = (binary_expression "arcs + numarcs" identifier + identifier)) ;) (expression_statement "numarcs = numarcs + 1;" (assignment_expression "numarcs = numarcs + 1" identifier = (binary_expression "numarcs + 1" identifier + number_literal)) ;) (expression_statement "*ppAVar1 = pAVar3;" (assignment_expression "*ppAVar1 = pAVar3" (pointer_expression "*ppAVar1" * identifier) = identifier) ;) })) (expression_statement "paVar2 = (parent->cg).children;" (assignment_expression "paVar2 = (parent->cg).children" identifier = (field_expression "(parent->cg).children" (parenthesized_expression "(parent->cg)" ( (field_expression "parent->cg" identifier -> field_identifier) )) . field_identifier)) ;) (expression_statement "(parent->cg).children = pAVar3;" (assignment_expression "(parent->cg).children = pAVar3" (field_expression "(parent->cg).children" (parenthesized_expression "(parent->cg)" ( (field_expression "parent->cg" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "pAVar3->next_child = paVar2;" (assignment_expression "pAVar3->next_child = paVar2" (field_expression "pAVar3->next_child" identifier -> field_identifier) = identifier) ;) (expression_statement "pAVar3->next_parent = (child->cg).parents;" (assignment_expression "pAVar3->next_parent = (child->cg).parents" (field_expression "pAVar3->next_parent" identifier -> field_identifier) = (field_expression "(child->cg).parents" (parenthesized_expression "(child->cg)" ( (field_expression "child->cg" identifier -> field_identifier) )) . field_identifier)) ;) (expression_statement "(child->cg).parents = pAVar3;" (assignment_expression "(child->cg).parents = pAVar3" (field_expression "(child->cg).parents" (parenthesized_expression "(child->cg)" ( (field_expression "child->cg" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "uVar4 = pAVar3->count;" (assignment_expression "uVar4 = pAVar3->count" identifier = (field_expression "pAVar3->count" identifier -> field_identifier)) ;) (if_statement "if (((byte)debug_level & 0x10) != 0) {\n    printf("[tally] hit %lu += %lu\n",uVar4,count);\n    uVar4 = pAVar3->count;\n  }" if (parenthesized_expression "(((byte)debug_level & 0x10) != 0)" ( (binary_expression "((byte)debug_level & 0x10) != 0" (parenthesized_expression "((byte)debug_level & 0x10)" ( (binary_expression "(byte)debug_level & 0x10" (cast_expression "(byte)debug_level" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n    printf("[tally] hit %lu += %lu\n",uVar4,count);\n    uVar4 = pAVar3->count;\n  }" { (expression_statement "printf("[tally] hit %lu += %lu\n",uVar4,count);" (call_expression "printf("[tally] hit %lu += %lu\n",uVar4,count)" identifier (argument_list "("[tally] hit %lu += %lu\n",uVar4,count)" ( (string_literal ""[tally] hit %lu += %lu\n"" " string_content escape_sequence ") , identifier , identifier ))) ;) (expression_statement "uVar4 = pAVar3->count;" (assignment_expression "uVar4 = pAVar3->count" identifier = (field_expression "pAVar3->count" identifier -> field_identifier)) ;) })) (expression_statement "pAVar3->count = uVar4 + count;" (assignment_expression "pAVar3->count = uVar4 + count" (field_expression "pAVar3->count" identifier -> field_identifier) = (binary_expression "uVar4 + count" identifier + identifier)) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00014870(int param_1,int param_2,int param_3)\n\n{\n  void *__ptr;\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  uint uVar4;\n  void *__dest;\n  \n  if (((byte)DAT_0002e158 & 0x10) != 0) {\n    printf("[arc_add] %lu arcs from %s to %s\n",param_3,*(undefined4 *)(param_1 + 0x10),\n           *(undefined4 *)(param_2 + 0x10));\n  }\n  iVar1 = FUN_00014780(param_1,param_2);\n  if (iVar1 == 0) {\n    piVar3 = (int *)xmalloc(0x28);\n    piVar3[3] = 0;\n    piVar3[9] = 0;\n    uVar4 = 0;\n    do {\n      *(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0;\n      uVar4 = uVar4 + 4;\n    } while (uVar4 < ((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc));\n    *piVar3 = param_1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_3;\n    if (param_2 != param_1) {\n      if (DAT_0002e4dc == DAT_0002d4fc) {\n        if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }\n        __dest = (void *)xmalloc(iVar1);\n        __ptr = DAT_0002e4e4;\n        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);\n        free(__ptr);\n        DAT_0002e4e4 = __dest;\n      }\n      iVar1 = DAT_0002e4dc * 4;\n      DAT_0002e4dc = DAT_0002e4dc + 1;\n      *(int **)((int)DAT_0002e4e4 + iVar1) = piVar3;\n    }\n    iVar1 = *(int *)(param_1 + 0xf8);\n    *(int **)(param_1 + 0xf8) = piVar3;\n    piVar3[8] = iVar1;\n    piVar3[7] = *(int *)(param_2 + 0xf4);\n    *(int **)(param_2 + 0xf4) = piVar3;\n    return;\n  }\n  iVar2 = *(int *)(iVar1 + 8);\n  if (((byte)DAT_0002e158 & 0x10) != 0) {\n    printf("[tally] hit %lu += %lu\n",iVar2,param_3);\n    iVar2 = *(int *)(iVar1 + 8);\n  }\n  *(int *)(iVar1 + 8) = iVar2 + param_3;\n  return;\n}\n\n" (function_definition "void FUN_00014870(int param_1,int param_2,int param_3)\n\n{\n  void *__ptr;\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  uint uVar4;\n  void *__dest;\n  \n  if (((byte)DAT_0002e158 & 0x10) != 0) {\n    printf("[arc_add] %lu arcs from %s to %s\n",param_3,*(undefined4 *)(param_1 + 0x10),\n           *(undefined4 *)(param_2 + 0x10));\n  }\n  iVar1 = FUN_00014780(param_1,param_2);\n  if (iVar1 == 0) {\n    piVar3 = (int *)xmalloc(0x28);\n    piVar3[3] = 0;\n    piVar3[9] = 0;\n    uVar4 = 0;\n    do {\n      *(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0;\n      uVar4 = uVar4 + 4;\n    } while (uVar4 < ((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc));\n    *piVar3 = param_1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_3;\n    if (param_2 != param_1) {\n      if (DAT_0002e4dc == DAT_0002d4fc) {\n        if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }\n        __dest = (void *)xmalloc(iVar1);\n        __ptr = DAT_0002e4e4;\n        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);\n        free(__ptr);\n        DAT_0002e4e4 = __dest;\n      }\n      iVar1 = DAT_0002e4dc * 4;\n      DAT_0002e4dc = DAT_0002e4dc + 1;\n      *(int **)((int)DAT_0002e4e4 + iVar1) = piVar3;\n    }\n    iVar1 = *(int *)(param_1 + 0xf8);\n    *(int **)(param_1 + 0xf8) = piVar3;\n    piVar3[8] = iVar1;\n    piVar3[7] = *(int *)(param_2 + 0xf4);\n    *(int **)(param_2 + 0xf4) = piVar3;\n    return;\n  }\n  iVar2 = *(int *)(iVar1 + 8);\n  if (((byte)DAT_0002e158 & 0x10) != 0) {\n    printf("[tally] hit %lu += %lu\n",iVar2,param_3);\n    iVar2 = *(int *)(iVar1 + 8);\n  }\n  *(int *)(iVar1 + 8) = iVar2 + param_3;\n  return;\n}" primitive_type (function_declarator "FUN_00014870(int param_1,int param_2,int param_3)" identifier (parameter_list "(int param_1,int param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  void *__ptr;\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  uint uVar4;\n  void *__dest;\n  \n  if (((byte)DAT_0002e158 & 0x10) != 0) {\n    printf("[arc_add] %lu arcs from %s to %s\n",param_3,*(undefined4 *)(param_1 + 0x10),\n           *(undefined4 *)(param_2 + 0x10));\n  }\n  iVar1 = FUN_00014780(param_1,param_2);\n  if (iVar1 == 0) {\n    piVar3 = (int *)xmalloc(0x28);\n    piVar3[3] = 0;\n    piVar3[9] = 0;\n    uVar4 = 0;\n    do {\n      *(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0;\n      uVar4 = uVar4 + 4;\n    } while (uVar4 < ((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc));\n    *piVar3 = param_1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_3;\n    if (param_2 != param_1) {\n      if (DAT_0002e4dc == DAT_0002d4fc) {\n        if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }\n        __dest = (void *)xmalloc(iVar1);\n        __ptr = DAT_0002e4e4;\n        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);\n        free(__ptr);\n        DAT_0002e4e4 = __dest;\n      }\n      iVar1 = DAT_0002e4dc * 4;\n      DAT_0002e4dc = DAT_0002e4dc + 1;\n      *(int **)((int)DAT_0002e4e4 + iVar1) = piVar3;\n    }\n    iVar1 = *(int *)(param_1 + 0xf8);\n    *(int **)(param_1 + 0xf8) = piVar3;\n    piVar3[8] = iVar1;\n    piVar3[7] = *(int *)(param_2 + 0xf4);\n    *(int **)(param_2 + 0xf4) = piVar3;\n    return;\n  }\n  iVar2 = *(int *)(iVar1 + 8);\n  if (((byte)DAT_0002e158 & 0x10) != 0) {\n    printf("[tally] hit %lu += %lu\n",iVar2,param_3);\n    iVar2 = *(int *)(iVar1 + 8);\n  }\n  *(int *)(iVar1 + 8) = iVar2 + param_3;\n  return;\n}" { (declaration "void *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (if_statement "if (((byte)DAT_0002e158 & 0x10) != 0) {\n    printf("[arc_add] %lu arcs from %s to %s\n",param_3,*(undefined4 *)(param_1 + 0x10),\n           *(undefined4 *)(param_2 + 0x10));\n  }" if (parenthesized_expression "(((byte)DAT_0002e158 & 0x10) != 0)" ( (binary_expression "((byte)DAT_0002e158 & 0x10) != 0" (parenthesized_expression "((byte)DAT_0002e158 & 0x10)" ( (binary_expression "(byte)DAT_0002e158 & 0x10" (cast_expression "(byte)DAT_0002e158" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n    printf("[arc_add] %lu arcs from %s to %s\n",param_3,*(undefined4 *)(param_1 + 0x10),\n           *(undefined4 *)(param_2 + 0x10));\n  }" { (expression_statement "printf("[arc_add] %lu arcs from %s to %s\n",param_3,*(undefined4 *)(param_1 + 0x10),\n           *(undefined4 *)(param_2 + 0x10));" (call_expression "printf("[arc_add] %lu arcs from %s to %s\n",param_3,*(undefined4 *)(param_1 + 0x10),\n           *(undefined4 *)(param_2 + 0x10))" identifier (argument_list "("[arc_add] %lu arcs from %s to %s\n",param_3,*(undefined4 *)(param_1 + 0x10),\n           *(undefined4 *)(param_2 + 0x10))" ( (string_literal ""[arc_add] %lu arcs from %s to %s\n"" " string_content escape_sequence ") , identifier , (pointer_expression "*(undefined4 *)(param_1 + 0x10)" * (cast_expression "(undefined4 *)(param_1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(param_2 + 0x10)" * (cast_expression "(undefined4 *)(param_2 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) ))) ;) })) (expression_statement "iVar1 = FUN_00014780(param_1,param_2);" (assignment_expression "iVar1 = FUN_00014780(param_1,param_2)" identifier = (call_expression "FUN_00014780(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    piVar3 = (int *)xmalloc(0x28);\n    piVar3[3] = 0;\n    piVar3[9] = 0;\n    uVar4 = 0;\n    do {\n      *(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0;\n      uVar4 = uVar4 + 4;\n    } while (uVar4 < ((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc));\n    *piVar3 = param_1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_3;\n    if (param_2 != param_1) {\n      if (DAT_0002e4dc == DAT_0002d4fc) {\n        if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }\n        __dest = (void *)xmalloc(iVar1);\n        __ptr = DAT_0002e4e4;\n        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);\n        free(__ptr);\n        DAT_0002e4e4 = __dest;\n      }\n      iVar1 = DAT_0002e4dc * 4;\n      DAT_0002e4dc = DAT_0002e4dc + 1;\n      *(int **)((int)DAT_0002e4e4 + iVar1) = piVar3;\n    }\n    iVar1 = *(int *)(param_1 + 0xf8);\n    *(int **)(param_1 + 0xf8) = piVar3;\n    piVar3[8] = iVar1;\n    piVar3[7] = *(int *)(param_2 + 0xf4);\n    *(int **)(param_2 + 0xf4) = piVar3;\n    return;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    piVar3 = (int *)xmalloc(0x28);\n    piVar3[3] = 0;\n    piVar3[9] = 0;\n    uVar4 = 0;\n    do {\n      *(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0;\n      uVar4 = uVar4 + 4;\n    } while (uVar4 < ((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc));\n    *piVar3 = param_1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_3;\n    if (param_2 != param_1) {\n      if (DAT_0002e4dc == DAT_0002d4fc) {\n        if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }\n        __dest = (void *)xmalloc(iVar1);\n        __ptr = DAT_0002e4e4;\n        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);\n        free(__ptr);\n        DAT_0002e4e4 = __dest;\n      }\n      iVar1 = DAT_0002e4dc * 4;\n      DAT_0002e4dc = DAT_0002e4dc + 1;\n      *(int **)((int)DAT_0002e4e4 + iVar1) = piVar3;\n    }\n    iVar1 = *(int *)(param_1 + 0xf8);\n    *(int **)(param_1 + 0xf8) = piVar3;\n    piVar3[8] = iVar1;\n    piVar3[7] = *(int *)(param_2 + 0xf4);\n    *(int **)(param_2 + 0xf4) = piVar3;\n    return;\n  }" { (expression_statement "piVar3 = (int *)xmalloc(0x28);" (assignment_expression "piVar3 = (int *)xmalloc(0x28)" identifier = (cast_expression "(int *)xmalloc(0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x28)" identifier (argument_list "(0x28)" ( number_literal ))))) ;) (expression_statement "piVar3[3] = 0;" (assignment_expression "piVar3[3] = 0" (subscript_expression "piVar3[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar3[9] = 0;" (assignment_expression "piVar3[9] = 0" (subscript_expression "piVar3[9]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n      *(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0;\n      uVar4 = uVar4 + 4;\n    } while (uVar4 < ((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc));" do (compound_statement "{\n      *(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0;\n      uVar4 = uVar4 + 4;\n    }" { (expression_statement "*(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0;" (assignment_expression "*(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0" (pointer_expression "*(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4)" * (cast_expression "(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4)" ( (binary_expression "((uint)(piVar3 + 4) & 0xfffffffc) + uVar4" (parenthesized_expression "((uint)(piVar3 + 4) & 0xfffffffc)" ( (binary_expression "(uint)(piVar3 + 4) & 0xfffffffc" (call_expression "(uint)(piVar3 + 4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(piVar3 + 4)" ( (binary_expression "piVar3 + 4" identifier + number_literal) ))) & number_literal) )) + identifier) )))) = number_literal) ;) (expression_statement "uVar4 = uVar4 + 4;" (assignment_expression "uVar4 = uVar4 + 4" identifier = (binary_expression "uVar4 + 4" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar4 < ((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc))" ( (binary_expression "uVar4 < ((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc)" identifier < (parenthesized_expression "((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc)" ( (binary_expression "(int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc" (binary_expression "(int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc))" (cast_expression "(int)piVar3" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(0x28 - ((uint)(piVar3 + 4) & 0xfffffffc))" ( (binary_expression "0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)" number_literal - (parenthesized_expression "((uint)(piVar3 + 4) & 0xfffffffc)" ( (binary_expression "(uint)(piVar3 + 4) & 0xfffffffc" (call_expression "(uint)(piVar3 + 4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(piVar3 + 4)" ( (binary_expression "piVar3 + 4" identifier + number_literal) ))) & number_literal) ))) ))) & number_literal) ))) )) ;) (expression_statement "*piVar3 = param_1;" (assignment_expression "*piVar3 = param_1" (pointer_expression "*piVar3" * identifier) = identifier) ;) (expression_statement "piVar3[1] = param_2;" (assignment_expression "piVar3[1] = param_2" (subscript_expression "piVar3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "piVar3[2] = param_3;" (assignment_expression "piVar3[2] = param_3" (subscript_expression "piVar3[2]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (param_2 != param_1) {\n      if (DAT_0002e4dc == DAT_0002d4fc) {\n        if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }\n        __dest = (void *)xmalloc(iVar1);\n        __ptr = DAT_0002e4e4;\n        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);\n        free(__ptr);\n        DAT_0002e4e4 = __dest;\n      }\n      iVar1 = DAT_0002e4dc * 4;\n      DAT_0002e4dc = DAT_0002e4dc + 1;\n      *(int **)((int)DAT_0002e4e4 + iVar1) = piVar3;\n    }" if (parenthesized_expression "(param_2 != param_1)" ( (binary_expression "param_2 != param_1" identifier != identifier) )) (compound_statement "{\n      if (DAT_0002e4dc == DAT_0002d4fc) {\n        if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }\n        __dest = (void *)xmalloc(iVar1);\n        __ptr = DAT_0002e4e4;\n        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);\n        free(__ptr);\n        DAT_0002e4e4 = __dest;\n      }\n      iVar1 = DAT_0002e4dc * 4;\n      DAT_0002e4dc = DAT_0002e4dc + 1;\n      *(int **)((int)DAT_0002e4e4 + iVar1) = piVar3;\n    }" { (if_statement "if (DAT_0002e4dc == DAT_0002d4fc) {\n        if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }\n        __dest = (void *)xmalloc(iVar1);\n        __ptr = DAT_0002e4e4;\n        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);\n        free(__ptr);\n        DAT_0002e4e4 = __dest;\n      }" if (parenthesized_expression "(DAT_0002e4dc == DAT_0002d4fc)" ( (binary_expression "DAT_0002e4dc == DAT_0002d4fc" identifier == identifier) )) (compound_statement "{\n        if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }\n        __dest = (void *)xmalloc(iVar1);\n        __ptr = DAT_0002e4e4;\n        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);\n        free(__ptr);\n        DAT_0002e4e4 = __dest;\n      }" { (if_statement "if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }" if (parenthesized_expression "(DAT_0002e4dc == 0)" ( (binary_expression "DAT_0002e4dc == 0" identifier == number_literal) )) (compound_statement "{\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }" { (expression_statement "iVar1 = 8;" (assignment_expression "iVar1 = 8" identifier = number_literal) ;) (expression_statement "DAT_0002d4fc = 2;" (assignment_expression "DAT_0002d4fc = 2" identifier = number_literal) ;) }) (else_clause "else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }" else (compound_statement "{\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }" { (expression_statement "DAT_0002d4fc = DAT_0002e4dc * 2;" (assignment_expression "DAT_0002d4fc = DAT_0002e4dc * 2" identifier = (binary_expression "DAT_0002e4dc * 2" identifier * number_literal)) ;) (expression_statement "iVar1 = DAT_0002e4dc << 3;" (assignment_expression "iVar1 = DAT_0002e4dc << 3" identifier = (binary_expression "DAT_0002e4dc << 3" identifier << number_literal)) ;) }))) (expression_statement "__dest = (void *)xmalloc(iVar1);" (assignment_expression "__dest = (void *)xmalloc(iVar1)" identifier = (cast_expression "(void *)xmalloc(iVar1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))))) ;) (expression_statement "__ptr = DAT_0002e4e4;" (assignment_expression "__ptr = DAT_0002e4e4" identifier = identifier) ;) (expression_statement "memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);" (call_expression "memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2)" identifier (argument_list "(__dest,DAT_0002e4e4,DAT_0002e4dc << 2)" ( identifier , identifier , (binary_expression "DAT_0002e4dc << 2" identifier << number_literal) ))) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (expression_statement "DAT_0002e4e4 = __dest;" (assignment_expression "DAT_0002e4e4 = __dest" identifier = identifier) ;) })) (expression_statement "iVar1 = DAT_0002e4dc * 4;" (assignment_expression "iVar1 = DAT_0002e4dc * 4" identifier = (binary_expression "DAT_0002e4dc * 4" identifier * number_literal)) ;) (expression_statement "DAT_0002e4dc = DAT_0002e4dc + 1;" (assignment_expression "DAT_0002e4dc = DAT_0002e4dc + 1" identifier = (binary_expression "DAT_0002e4dc + 1" identifier + number_literal)) ;) (expression_statement "*(int **)((int)DAT_0002e4e4 + iVar1) = piVar3;" (assignment_expression "*(int **)((int)DAT_0002e4e4 + iVar1) = piVar3" (pointer_expression "*(int **)((int)DAT_0002e4e4 + iVar1)" * (cast_expression "(int **)((int)DAT_0002e4e4 + iVar1)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)DAT_0002e4e4 + iVar1)" ( (binary_expression "(int)DAT_0002e4e4 + iVar1" (cast_expression "(int)DAT_0002e4e4" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) = identifier) ;) })) (expression_statement "iVar1 = *(int *)(param_1 + 0xf8);" (assignment_expression "iVar1 = *(int *)(param_1 + 0xf8)" identifier = (pointer_expression "*(int *)(param_1 + 0xf8)" * (cast_expression "(int *)(param_1 + 0xf8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xf8)" ( (binary_expression "param_1 + 0xf8" identifier + number_literal) ))))) ;) (expression_statement "*(int **)(param_1 + 0xf8) = piVar3;" (assignment_expression "*(int **)(param_1 + 0xf8) = piVar3" (pointer_expression "*(int **)(param_1 + 0xf8)" * (cast_expression "(int **)(param_1 + 0xf8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xf8)" ( (binary_expression "param_1 + 0xf8" identifier + number_literal) )))) = identifier) ;) (expression_statement "piVar3[8] = iVar1;" (assignment_expression "piVar3[8] = iVar1" (subscript_expression "piVar3[8]" identifier [ number_literal ]) = identifier) ;) (expression_statement "piVar3[7] = *(int *)(param_2 + 0xf4);" (assignment_expression "piVar3[7] = *(int *)(param_2 + 0xf4)" (subscript_expression "piVar3[7]" identifier [ number_literal ]) = (pointer_expression "*(int *)(param_2 + 0xf4)" * (cast_expression "(int *)(param_2 + 0xf4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xf4)" ( (binary_expression "param_2 + 0xf4" identifier + number_literal) ))))) ;) (expression_statement "*(int **)(param_2 + 0xf4) = piVar3;" (assignment_expression "*(int **)(param_2 + 0xf4) = piVar3" (pointer_expression "*(int **)(param_2 + 0xf4)" * (cast_expression "(int **)(param_2 + 0xf4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 0xf4)" ( (binary_expression "param_2 + 0xf4" identifier + number_literal) )))) = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "iVar2 = *(int *)(iVar1 + 8);" (assignment_expression "iVar2 = *(int *)(iVar1 + 8)" identifier = (pointer_expression "*(int *)(iVar1 + 8)" * (cast_expression "(int *)(iVar1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 8)" ( (binary_expression "iVar1 + 8" identifier + number_literal) ))))) ;) (if_statement "if (((byte)DAT_0002e158 & 0x10) != 0) {\n    printf("[tally] hit %lu += %lu\n",iVar2,param_3);\n    iVar2 = *(int *)(iVar1 + 8);\n  }" if (parenthesized_expression "(((byte)DAT_0002e158 & 0x10) != 0)" ( (binary_expression "((byte)DAT_0002e158 & 0x10) != 0" (parenthesized_expression "((byte)DAT_0002e158 & 0x10)" ( (binary_expression "(byte)DAT_0002e158 & 0x10" (cast_expression "(byte)DAT_0002e158" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n    printf("[tally] hit %lu += %lu\n",iVar2,param_3);\n    iVar2 = *(int *)(iVar1 + 8);\n  }" { (expression_statement "printf("[tally] hit %lu += %lu\n",iVar2,param_3);" (call_expression "printf("[tally] hit %lu += %lu\n",iVar2,param_3)" identifier (argument_list "("[tally] hit %lu += %lu\n",iVar2,param_3)" ( (string_literal ""[tally] hit %lu += %lu\n"" " string_content escape_sequence ") , identifier , identifier ))) ;) (expression_statement "iVar2 = *(int *)(iVar1 + 8);" (assignment_expression "iVar2 = *(int *)(iVar1 + 8)" identifier = (pointer_expression "*(int *)(iVar1 + 8)" * (cast_expression "(int *)(iVar1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 8)" ( (binary_expression "iVar1 + 8" identifier + number_literal) ))))) ;) })) (expression_statement "*(int *)(iVar1 + 8) = iVar2 + param_3;" (assignment_expression "*(int *)(iVar1 + 8) = iVar2 + param_3" (pointer_expression "*(int *)(iVar1 + 8)" * (cast_expression "(int *)(iVar1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 8)" ( (binary_expression "iVar1 + 8" identifier + number_literal) )))) = (binary_expression "iVar2 + param_3" identifier + identifier)) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) & LIT) )) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") , IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) ))) & LIT) )) + IDENT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT < (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (parenthesized_expression ( (binary_expression LIT - (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) ))) & LIT) ))) ))) & LIT) ))) )) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT * LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT << LIT)) ;) }))) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (binary_expression IDENT << LIT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_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 (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + 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 * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) & LIT) )) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") , 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 * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + IDENT)) ;) (return_statement return ;) })))
(function_definition "void FUN_00014870(int param_1,int param_2,int param_3)\n\n{\n  void *__ptr;\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  uint uVar4;\n  void *__dest;\n  \n  if (((byte)DAT_0002e158 & 0x10) != 0) {\n    printf("[arc_add] %lu arcs from %s to %s\n",param_3,*(undefined4 *)(param_1 + 0x10),\n           *(undefined4 *)(param_2 + 0x10));\n  }\n  iVar1 = FUN_00014780(param_1,param_2);\n  if (iVar1 == 0) {\n    piVar3 = (int *)xmalloc(0x28);\n    piVar3[3] = 0;\n    piVar3[9] = 0;\n    uVar4 = 0;\n    do {\n      *(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0;\n      uVar4 = uVar4 + 4;\n    } while (uVar4 < ((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc));\n    *piVar3 = param_1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_3;\n    if (param_2 != param_1) {\n      if (DAT_0002e4dc == DAT_0002d4fc) {\n        if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }\n        __dest = (void *)xmalloc(iVar1);\n        __ptr = DAT_0002e4e4;\n        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);\n        free(__ptr);\n        DAT_0002e4e4 = __dest;\n      }\n      iVar1 = DAT_0002e4dc * 4;\n      DAT_0002e4dc = DAT_0002e4dc + 1;\n      *(int **)((int)DAT_0002e4e4 + iVar1) = piVar3;\n    }\n    iVar1 = *(int *)(param_1 + 0xf8);\n    *(int **)(param_1 + 0xf8) = piVar3;\n    piVar3[8] = iVar1;\n    piVar3[7] = *(int *)(param_2 + 0xf4);\n    *(int **)(param_2 + 0xf4) = piVar3;\n    return;\n  }\n  iVar2 = *(int *)(iVar1 + 8);\n  if (((byte)DAT_0002e158 & 0x10) != 0) {\n    printf("[tally] hit %lu += %lu\n",iVar2,param_3);\n    iVar2 = *(int *)(iVar1 + 8);\n  }\n  *(int *)(iVar1 + 8) = iVar2 + param_3;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00014870(int param_1,int param_2,int param_3)" (identifier "FUN_00014870") (parameter_list "(int param_1,int param_2,int param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  void *__ptr;\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  uint uVar4;\n  void *__dest;\n  \n  if (((byte)DAT_0002e158 & 0x10) != 0) {\n    printf("[arc_add] %lu arcs from %s to %s\n",param_3,*(undefined4 *)(param_1 + 0x10),\n           *(undefined4 *)(param_2 + 0x10));\n  }\n  iVar1 = FUN_00014780(param_1,param_2);\n  if (iVar1 == 0) {\n    piVar3 = (int *)xmalloc(0x28);\n    piVar3[3] = 0;\n    piVar3[9] = 0;\n    uVar4 = 0;\n    do {\n      *(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0;\n      uVar4 = uVar4 + 4;\n    } while (uVar4 < ((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc));\n    *piVar3 = param_1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_3;\n    if (param_2 != param_1) {\n      if (DAT_0002e4dc == DAT_0002d4fc) {\n        if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }\n        __dest = (void *)xmalloc(iVar1);\n        __ptr = DAT_0002e4e4;\n        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);\n        free(__ptr);\n        DAT_0002e4e4 = __dest;\n      }\n      iVar1 = DAT_0002e4dc * 4;\n      DAT_0002e4dc = DAT_0002e4dc + 1;\n      *(int **)((int)DAT_0002e4e4 + iVar1) = piVar3;\n    }\n    iVar1 = *(int *)(param_1 + 0xf8);\n    *(int **)(param_1 + 0xf8) = piVar3;\n    piVar3[8] = iVar1;\n    piVar3[7] = *(int *)(param_2 + 0xf4);\n    *(int **)(param_2 + 0xf4) = piVar3;\n    return;\n  }\n  iVar2 = *(int *)(iVar1 + 8);\n  if (((byte)DAT_0002e158 & 0x10) != 0) {\n    printf("[tally] hit %lu += %lu\n",iVar2,param_3);\n    iVar2 = *(int *)(iVar1 + 8);\n  }\n  *(int *)(iVar1 + 8) = iVar2 + param_3;\n  return;\n}" ({ "{") (declaration "void *__ptr;" (primitive_type "void") (pointer_declarator "*__ptr" (* "*") (identifier "__ptr")) (; ";")) (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "void *__dest;" (primitive_type "void") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (if_statement "if (((byte)DAT_0002e158 & 0x10) != 0) {\n    printf("[arc_add] %lu arcs from %s to %s\n",param_3,*(undefined4 *)(param_1 + 0x10),\n           *(undefined4 *)(param_2 + 0x10));\n  }" (if "if") (parenthesized_expression "(((byte)DAT_0002e158 & 0x10) != 0)" (( "(") (binary_expression "((byte)DAT_0002e158 & 0x10) != 0" (parenthesized_expression "((byte)DAT_0002e158 & 0x10)" (( "(") (binary_expression "(byte)DAT_0002e158 & 0x10" (cast_expression "(byte)DAT_0002e158" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "DAT_0002e158")) (& "&") (number_literal "0x10")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    printf("[arc_add] %lu arcs from %s to %s\n",param_3,*(undefined4 *)(param_1 + 0x10),\n           *(undefined4 *)(param_2 + 0x10));\n  }" ({ "{") (expression_statement "printf("[arc_add] %lu arcs from %s to %s\n",param_3,*(undefined4 *)(param_1 + 0x10),\n           *(undefined4 *)(param_2 + 0x10));" (call_expression "printf("[arc_add] %lu arcs from %s to %s\n",param_3,*(undefined4 *)(param_1 + 0x10),\n           *(undefined4 *)(param_2 + 0x10))" (identifier "printf") (argument_list "("[arc_add] %lu arcs from %s to %s\n",param_3,*(undefined4 *)(param_1 + 0x10),\n           *(undefined4 *)(param_2 + 0x10))" (( "(") (string_literal ""[arc_add] %lu arcs from %s to %s\n"" (" """) (string_content "[arc_add] %lu arcs from %s to %s") (escape_sequence "\n") (" """)) (, ",") (identifier "param_3") (, ",") (pointer_expression "*(undefined4 *)(param_1 + 0x10)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (, ",") (pointer_expression "*(undefined4 *)(param_2 + 0x10)" (* "*") (cast_expression "(undefined4 *)(param_2 + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x10)" (( "(") (binary_expression "param_2 + 0x10" (identifier "param_2") (+ "+") (number_literal "0x10")) () ")")))) () ")"))) (; ";")) (} "}"))) (expression_statement "iVar1 = FUN_00014780(param_1,param_2);" (assignment_expression "iVar1 = FUN_00014780(param_1,param_2)" (identifier "iVar1") (= "=") (call_expression "FUN_00014780(param_1,param_2)" (identifier "FUN_00014780") (argument_list "(param_1,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n    piVar3 = (int *)xmalloc(0x28);\n    piVar3[3] = 0;\n    piVar3[9] = 0;\n    uVar4 = 0;\n    do {\n      *(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0;\n      uVar4 = uVar4 + 4;\n    } while (uVar4 < ((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc));\n    *piVar3 = param_1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_3;\n    if (param_2 != param_1) {\n      if (DAT_0002e4dc == DAT_0002d4fc) {\n        if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }\n        __dest = (void *)xmalloc(iVar1);\n        __ptr = DAT_0002e4e4;\n        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);\n        free(__ptr);\n        DAT_0002e4e4 = __dest;\n      }\n      iVar1 = DAT_0002e4dc * 4;\n      DAT_0002e4dc = DAT_0002e4dc + 1;\n      *(int **)((int)DAT_0002e4e4 + iVar1) = piVar3;\n    }\n    iVar1 = *(int *)(param_1 + 0xf8);\n    *(int **)(param_1 + 0xf8) = piVar3;\n    piVar3[8] = iVar1;\n    piVar3[7] = *(int *)(param_2 + 0xf4);\n    *(int **)(param_2 + 0xf4) = piVar3;\n    return;\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    piVar3 = (int *)xmalloc(0x28);\n    piVar3[3] = 0;\n    piVar3[9] = 0;\n    uVar4 = 0;\n    do {\n      *(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0;\n      uVar4 = uVar4 + 4;\n    } while (uVar4 < ((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc));\n    *piVar3 = param_1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_3;\n    if (param_2 != param_1) {\n      if (DAT_0002e4dc == DAT_0002d4fc) {\n        if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }\n        __dest = (void *)xmalloc(iVar1);\n        __ptr = DAT_0002e4e4;\n        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);\n        free(__ptr);\n        DAT_0002e4e4 = __dest;\n      }\n      iVar1 = DAT_0002e4dc * 4;\n      DAT_0002e4dc = DAT_0002e4dc + 1;\n      *(int **)((int)DAT_0002e4e4 + iVar1) = piVar3;\n    }\n    iVar1 = *(int *)(param_1 + 0xf8);\n    *(int **)(param_1 + 0xf8) = piVar3;\n    piVar3[8] = iVar1;\n    piVar3[7] = *(int *)(param_2 + 0xf4);\n    *(int **)(param_2 + 0xf4) = piVar3;\n    return;\n  }" ({ "{") (expression_statement "piVar3 = (int *)xmalloc(0x28);" (assignment_expression "piVar3 = (int *)xmalloc(0x28)" (identifier "piVar3") (= "=") (cast_expression "(int *)xmalloc(0x28)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(0x28)" (identifier "xmalloc") (argument_list "(0x28)" (( "(") (number_literal "0x28") () ")"))))) (; ";")) (expression_statement "piVar3[3] = 0;" (assignment_expression "piVar3[3] = 0" (subscript_expression "piVar3[3]" (identifier "piVar3") ([ "[") (number_literal "3") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar3[9] = 0;" (assignment_expression "piVar3[9] = 0" (subscript_expression "piVar3[9]" (identifier "piVar3") ([ "[") (number_literal "9") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n      *(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0;\n      uVar4 = uVar4 + 4;\n    } while (uVar4 < ((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc));" (do "do") (compound_statement "{\n      *(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0;\n      uVar4 = uVar4 + 4;\n    }" ({ "{") (expression_statement "*(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0;" (assignment_expression "*(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0" (pointer_expression "*(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4)" (* "*") (cast_expression "(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4)" (( "(") (binary_expression "((uint)(piVar3 + 4) & 0xfffffffc) + uVar4" (parenthesized_expression "((uint)(piVar3 + 4) & 0xfffffffc)" (( "(") (binary_expression "(uint)(piVar3 + 4) & 0xfffffffc" (call_expression "(uint)(piVar3 + 4)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(piVar3 + 4)" (( "(") (binary_expression "piVar3 + 4" (identifier "piVar3") (+ "+") (number_literal "4")) () ")"))) (& "&") (number_literal "0xfffffffc")) () ")")) (+ "+") (identifier "uVar4")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar4 = uVar4 + 4;" (assignment_expression "uVar4 = uVar4 + 4" (identifier "uVar4") (= "=") (binary_expression "uVar4 + 4" (identifier "uVar4") (+ "+") (number_literal "4"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar4 < ((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc))" (( "(") (binary_expression "uVar4 < ((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc)" (identifier "uVar4") (< "<") (parenthesized_expression "((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc)" (( "(") (binary_expression "(int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc" (binary_expression "(int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc))" (cast_expression "(int)piVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "piVar3")) (+ "+") (parenthesized_expression "(0x28 - ((uint)(piVar3 + 4) & 0xfffffffc))" (( "(") (binary_expression "0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)" (number_literal "0x28") (- "-") (parenthesized_expression "((uint)(piVar3 + 4) & 0xfffffffc)" (( "(") (binary_expression "(uint)(piVar3 + 4) & 0xfffffffc" (call_expression "(uint)(piVar3 + 4)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(piVar3 + 4)" (( "(") (binary_expression "piVar3 + 4" (identifier "piVar3") (+ "+") (number_literal "4")) () ")"))) (& "&") (number_literal "0xfffffffc")) () ")"))) () ")"))) (& "&") (number_literal "0xfffffffc")) () ")"))) () ")")) (; ";")) (expression_statement "*piVar3 = param_1;" (assignment_expression "*piVar3 = param_1" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (= "=") (identifier "param_1")) (; ";")) (expression_statement "piVar3[1] = param_2;" (assignment_expression "piVar3[1] = param_2" (subscript_expression "piVar3[1]" (identifier "piVar3") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "piVar3[2] = param_3;" (assignment_expression "piVar3[2] = param_3" (subscript_expression "piVar3[2]" (identifier "piVar3") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "param_3")) (; ";")) (if_statement "if (param_2 != param_1) {\n      if (DAT_0002e4dc == DAT_0002d4fc) {\n        if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }\n        __dest = (void *)xmalloc(iVar1);\n        __ptr = DAT_0002e4e4;\n        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);\n        free(__ptr);\n        DAT_0002e4e4 = __dest;\n      }\n      iVar1 = DAT_0002e4dc * 4;\n      DAT_0002e4dc = DAT_0002e4dc + 1;\n      *(int **)((int)DAT_0002e4e4 + iVar1) = piVar3;\n    }" (if "if") (parenthesized_expression "(param_2 != param_1)" (( "(") (binary_expression "param_2 != param_1" (identifier "param_2") (!= "!=") (identifier "param_1")) () ")")) (compound_statement "{\n      if (DAT_0002e4dc == DAT_0002d4fc) {\n        if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }\n        __dest = (void *)xmalloc(iVar1);\n        __ptr = DAT_0002e4e4;\n        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);\n        free(__ptr);\n        DAT_0002e4e4 = __dest;\n      }\n      iVar1 = DAT_0002e4dc * 4;\n      DAT_0002e4dc = DAT_0002e4dc + 1;\n      *(int **)((int)DAT_0002e4e4 + iVar1) = piVar3;\n    }" ({ "{") (if_statement "if (DAT_0002e4dc == DAT_0002d4fc) {\n        if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }\n        __dest = (void *)xmalloc(iVar1);\n        __ptr = DAT_0002e4e4;\n        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);\n        free(__ptr);\n        DAT_0002e4e4 = __dest;\n      }" (if "if") (parenthesized_expression "(DAT_0002e4dc == DAT_0002d4fc)" (( "(") (binary_expression "DAT_0002e4dc == DAT_0002d4fc" (identifier "DAT_0002e4dc") (== "==") (identifier "DAT_0002d4fc")) () ")")) (compound_statement "{\n        if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }\n        __dest = (void *)xmalloc(iVar1);\n        __ptr = DAT_0002e4e4;\n        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);\n        free(__ptr);\n        DAT_0002e4e4 = __dest;\n      }" ({ "{") (if_statement "if (DAT_0002e4dc == 0) {\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }\n        else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }" (if "if") (parenthesized_expression "(DAT_0002e4dc == 0)" (( "(") (binary_expression "DAT_0002e4dc == 0" (identifier "DAT_0002e4dc") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          iVar1 = 8;\n          DAT_0002d4fc = 2;\n        }" ({ "{") (expression_statement "iVar1 = 8;" (assignment_expression "iVar1 = 8" (identifier "iVar1") (= "=") (number_literal "8")) (; ";")) (expression_statement "DAT_0002d4fc = 2;" (assignment_expression "DAT_0002d4fc = 2" (identifier "DAT_0002d4fc") (= "=") (number_literal "2")) (; ";")) (} "}")) (else_clause "else {\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }" (else "else") (compound_statement "{\n          DAT_0002d4fc = DAT_0002e4dc * 2;\n          iVar1 = DAT_0002e4dc << 3;\n        }" ({ "{") (expression_statement "DAT_0002d4fc = DAT_0002e4dc * 2;" (assignment_expression "DAT_0002d4fc = DAT_0002e4dc * 2" (identifier "DAT_0002d4fc") (= "=") (binary_expression "DAT_0002e4dc * 2" (identifier "DAT_0002e4dc") (* "*") (number_literal "2"))) (; ";")) (expression_statement "iVar1 = DAT_0002e4dc << 3;" (assignment_expression "iVar1 = DAT_0002e4dc << 3" (identifier "iVar1") (= "=") (binary_expression "DAT_0002e4dc << 3" (identifier "DAT_0002e4dc") (<< "<<") (number_literal "3"))) (; ";")) (} "}")))) (expression_statement "__dest = (void *)xmalloc(iVar1);" (assignment_expression "__dest = (void *)xmalloc(iVar1)" (identifier "__dest") (= "=") (cast_expression "(void *)xmalloc(iVar1)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(iVar1)" (identifier "xmalloc") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))))) (; ";")) (expression_statement "__ptr = DAT_0002e4e4;" (assignment_expression "__ptr = DAT_0002e4e4" (identifier "__ptr") (= "=") (identifier "DAT_0002e4e4")) (; ";")) (expression_statement "memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);" (call_expression "memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2)" (identifier "memcpy") (argument_list "(__dest,DAT_0002e4e4,DAT_0002e4dc << 2)" (( "(") (identifier "__dest") (, ",") (identifier "DAT_0002e4e4") (, ",") (binary_expression "DAT_0002e4dc << 2" (identifier "DAT_0002e4dc") (<< "<<") (number_literal "2")) () ")"))) (; ";")) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" (identifier "free") (argument_list "(__ptr)" (( "(") (identifier "__ptr") () ")"))) (; ";")) (expression_statement "DAT_0002e4e4 = __dest;" (assignment_expression "DAT_0002e4e4 = __dest" (identifier "DAT_0002e4e4") (= "=") (identifier "__dest")) (; ";")) (} "}"))) (expression_statement "iVar1 = DAT_0002e4dc * 4;" (assignment_expression "iVar1 = DAT_0002e4dc * 4" (identifier "iVar1") (= "=") (binary_expression "DAT_0002e4dc * 4" (identifier "DAT_0002e4dc") (* "*") (number_literal "4"))) (; ";")) (expression_statement "DAT_0002e4dc = DAT_0002e4dc + 1;" (assignment_expression "DAT_0002e4dc = DAT_0002e4dc + 1" (identifier "DAT_0002e4dc") (= "=") (binary_expression "DAT_0002e4dc + 1" (identifier "DAT_0002e4dc") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*(int **)((int)DAT_0002e4e4 + iVar1) = piVar3;" (assignment_expression "*(int **)((int)DAT_0002e4e4 + iVar1) = piVar3" (pointer_expression "*(int **)((int)DAT_0002e4e4 + iVar1)" (* "*") (cast_expression "(int **)((int)DAT_0002e4e4 + iVar1)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "((int)DAT_0002e4e4 + iVar1)" (( "(") (binary_expression "(int)DAT_0002e4e4 + iVar1" (cast_expression "(int)DAT_0002e4e4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "DAT_0002e4e4")) (+ "+") (identifier "iVar1")) () ")")))) (= "=") (identifier "piVar3")) (; ";")) (} "}"))) (expression_statement "iVar1 = *(int *)(param_1 + 0xf8);" (assignment_expression "iVar1 = *(int *)(param_1 + 0xf8)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(param_1 + 0xf8)" (* "*") (cast_expression "(int *)(param_1 + 0xf8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xf8)" (( "(") (binary_expression "param_1 + 0xf8" (identifier "param_1") (+ "+") (number_literal "0xf8")) () ")"))))) (; ";")) (expression_statement "*(int **)(param_1 + 0xf8) = piVar3;" (assignment_expression "*(int **)(param_1 + 0xf8) = piVar3" (pointer_expression "*(int **)(param_1 + 0xf8)" (* "*") (cast_expression "(int **)(param_1 + 0xf8)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0xf8)" (( "(") (binary_expression "param_1 + 0xf8" (identifier "param_1") (+ "+") (number_literal "0xf8")) () ")")))) (= "=") (identifier "piVar3")) (; ";")) (expression_statement "piVar3[8] = iVar1;" (assignment_expression "piVar3[8] = iVar1" (subscript_expression "piVar3[8]" (identifier "piVar3") ([ "[") (number_literal "8") (] "]")) (= "=") (identifier "iVar1")) (; ";")) (expression_statement "piVar3[7] = *(int *)(param_2 + 0xf4);" (assignment_expression "piVar3[7] = *(int *)(param_2 + 0xf4)" (subscript_expression "piVar3[7]" (identifier "piVar3") ([ "[") (number_literal "7") (] "]")) (= "=") (pointer_expression "*(int *)(param_2 + 0xf4)" (* "*") (cast_expression "(int *)(param_2 + 0xf4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0xf4)" (( "(") (binary_expression "param_2 + 0xf4" (identifier "param_2") (+ "+") (number_literal "0xf4")) () ")"))))) (; ";")) (expression_statement "*(int **)(param_2 + 0xf4) = piVar3;" (assignment_expression "*(int **)(param_2 + 0xf4) = piVar3" (pointer_expression "*(int **)(param_2 + 0xf4)" (* "*") (cast_expression "(int **)(param_2 + 0xf4)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_2 + 0xf4)" (( "(") (binary_expression "param_2 + 0xf4" (identifier "param_2") (+ "+") (number_literal "0xf4")) () ")")))) (= "=") (identifier "piVar3")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "iVar2 = *(int *)(iVar1 + 8);" (assignment_expression "iVar2 = *(int *)(iVar1 + 8)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(iVar1 + 8)" (* "*") (cast_expression "(int *)(iVar1 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 8)" (( "(") (binary_expression "iVar1 + 8" (identifier "iVar1") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (if_statement "if (((byte)DAT_0002e158 & 0x10) != 0) {\n    printf("[tally] hit %lu += %lu\n",iVar2,param_3);\n    iVar2 = *(int *)(iVar1 + 8);\n  }" (if "if") (parenthesized_expression "(((byte)DAT_0002e158 & 0x10) != 0)" (( "(") (binary_expression "((byte)DAT_0002e158 & 0x10) != 0" (parenthesized_expression "((byte)DAT_0002e158 & 0x10)" (( "(") (binary_expression "(byte)DAT_0002e158 & 0x10" (cast_expression "(byte)DAT_0002e158" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "DAT_0002e158")) (& "&") (number_literal "0x10")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    printf("[tally] hit %lu += %lu\n",iVar2,param_3);\n    iVar2 = *(int *)(iVar1 + 8);\n  }" ({ "{") (expression_statement "printf("[tally] hit %lu += %lu\n",iVar2,param_3);" (call_expression "printf("[tally] hit %lu += %lu\n",iVar2,param_3)" (identifier "printf") (argument_list "("[tally] hit %lu += %lu\n",iVar2,param_3)" (( "(") (string_literal ""[tally] hit %lu += %lu\n"" (" """) (string_content "[tally] hit %lu += %lu") (escape_sequence "\n") (" """)) (, ",") (identifier "iVar2") (, ",") (identifier "param_3") () ")"))) (; ";")) (expression_statement "iVar2 = *(int *)(iVar1 + 8);" (assignment_expression "iVar2 = *(int *)(iVar1 + 8)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(iVar1 + 8)" (* "*") (cast_expression "(int *)(iVar1 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 8)" (( "(") (binary_expression "iVar1 + 8" (identifier "iVar1") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (} "}"))) (expression_statement "*(int *)(iVar1 + 8) = iVar2 + param_3;" (assignment_expression "*(int *)(iVar1 + 8) = iVar2 + param_3" (pointer_expression "*(int *)(iVar1 + 8)" (* "*") (cast_expression "(int *)(iVar1 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 8)" (( "(") (binary_expression "iVar1 + 8" (identifier "iVar1") (+ "+") (number_literal "8")) () ")")))) (= "=") (binary_expression "iVar2 + param_3" (identifier "iVar2") (+ "+") (identifier "param_3"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void function_1(type_1 *var_8,type_1 *var_7,type_2 var_14)

{
  type_3 **ppAVar1;
  type_4 *paVar2;
  type_3 *var_3;
  type_2 var_13;
  type_5 var_6;
  int iVar6;
  type_3 **__dest;
  type_5 var_5;
  
  if (((type_6)debug_level & 0x10) != 0) {
    var_1("[arc_add] %lu arcs from %s to %s\n",var_14,var_8->name,var_7->name);
  }
  var_3 = var_2(var_8,var_7);
  if (var_3 == (type_3 *)0x0) {
    var_3 = (type_3 *)var_4(0x28);
    *(type_7 *)&var_3->time = 0;
    var_5 = (type_5)((int)&var_3->time + 4U) & 0xfffffffc;
    var_3->has_been_placed = 0;
    var_6 = 0;
    do {
      *(type_7 *)(var_5 + var_6) = 0;
      var_6 = var_6 + 4;
    } while (var_6 < ((int)var_3 + (0x28 - var_5) & 0xfffffffc));
    var_3->var_8 = var_8;
    var_3->var_7 = var_7;
    var_3->var_14 = var_14;
    if (var_7 != var_8) {
      if (var_9 == function_1::maxarcs) {
        if (var_9 == 0) {
          iVar6 = 8;
          arc_add::maxarcs = 2;
        }
        else {
          arc_add::maxarcs = var_9 * 2;
          iVar6 = var_9 << 3;
        }
        __dest = (type_3 **)var_4(iVar6);
        ppAVar1 = var_12;
        var_10(__dest,var_12,var_9 << 2);
        var_11(ppAVar1);
        var_12 = __dest;
      }
      ppAVar1 = var_12 + var_9;
      var_9 = var_9 + 1;
      *ppAVar1 = var_3;
    }
    paVar2 = (var_8->cg).children;
    (var_8->cg).children = var_3;
    var_3->next_child = paVar2;
    var_3->next_parent = (var_7->cg).parents;
    (var_7->cg).parents = var_3;
    return;
  }
  var_13 = var_3->var_14;
  if (((type_6)debug_level & 0x10) != 0) {
    var_1("[tally] hit %lu += %lu\n",var_13,var_14);
    var_13 = var_3->var_14;
  }
  var_3->var_14 = var_13 + var_14;
  return;
}


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

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

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

{
  void *__ptr;
  int iVar1;
  int iVar2;
  int *piVar3;
  uint uVar4;
  void *__dest;
  
  if (((byte)DAT_0002e158 & 0x10) != 0) {
    printf("[arc_add] %lu arcs from %s to %s\n",param_3,*(undefined4 *)(param_1 + 0x10),
           *(undefined4 *)(param_2 + 0x10));
  }
  iVar1 = FUN_00014780(param_1,param_2);
  if (iVar1 == 0) {
    piVar3 = (int *)xmalloc(0x28);
    piVar3[3] = 0;
    piVar3[9] = 0;
    uVar4 = 0;
    do {
      *(undefined4 *)(((uint)(piVar3 + 4) & 0xfffffffc) + uVar4) = 0;
      uVar4 = uVar4 + 4;
    } while (uVar4 < ((int)piVar3 + (0x28 - ((uint)(piVar3 + 4) & 0xfffffffc)) & 0xfffffffc));
    *piVar3 = param_1;
    piVar3[1] = param_2;
    piVar3[2] = param_3;
    if (param_2 != param_1) {
      if (DAT_0002e4dc == DAT_0002d4fc) {
        if (DAT_0002e4dc == 0) {
          iVar1 = 8;
          DAT_0002d4fc = 2;
        }
        else {
          DAT_0002d4fc = DAT_0002e4dc * 2;
          iVar1 = DAT_0002e4dc << 3;
        }
        __dest = (void *)xmalloc(iVar1);
        __ptr = DAT_0002e4e4;
        memcpy(__dest,DAT_0002e4e4,DAT_0002e4dc << 2);
        free(__ptr);
        DAT_0002e4e4 = __dest;
      }
      iVar1 = DAT_0002e4dc * 4;
      DAT_0002e4dc = DAT_0002e4dc + 1;
      *(int **)((int)DAT_0002e4e4 + iVar1) = piVar3;
    }
    iVar1 = *(int *)(param_1 + 0xf8);
    *(int **)(param_1 + 0xf8) = piVar3;
    piVar3[8] = iVar1;
    piVar3[7] = *(int *)(param_2 + 0xf4);
    *(int **)(param_2 + 0xf4) = piVar3;
    return;
  }
  iVar2 = *(int *)(iVar1 + 8);
  if (((byte)DAT_0002e158 & 0x10) != 0) {
    printf("[tally] hit %lu += %lu\n",iVar2,param_3);
    iVar2 = *(int *)(iVar1 + 8);
  }
  *(int *)(iVar1 + 8) = iVar2 + param_3;
  return;
}

