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

int run_timers(ulong anow,ulong *next)

{
  undefined4 *ptr;
  void *pvVar1;
  
  if (timers == (tree234 *)0x0) {
    timers = newtree234(compare_timers);
    timer_contexts = newtree234(compare_timer_contexts);
    now = getticks();
  }
  now = getticks();
  while( true ) {
    while( true ) {
      ptr = (undefined4 *)index234(timers,0);
      if (ptr == (undefined4 *)0x0) {
        return 0;
      }
      pvVar1 = find234(timer_contexts,(void *)ptr[1],(cmpfn234)0x0);
      if (pvVar1 != (void *)0x0) break;
      delpos234(timers,0);
      safefree(ptr);
    }
    if ((now + 10) - ptr[3] <= (ptr[2] + 10) - ptr[3]) break;
    delpos234(timers,0);
    (*(code *)*ptr)(ptr[1],ptr[2]);
    safefree(ptr);
  }
  *next = ptr[2];
  return 1;
}



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

undefined4 FUN_0007d170(undefined4 param_1,int *param_2)

{
  undefined4 *puVar1;
  int iVar2;
  
  if (DAT_000d0a98 == 0) {
    DAT_000d0a98 = FUN_0007e350(FUN_0007cfd0);
    DAT_000d0a94 = FUN_0007e350(FUN_0007cfb0);
    DAT_000d0a90 = FUN_00083c60();
  }
  DAT_000d0a90 = FUN_00083c60();
  while( true ) {
    while( true ) {
      puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0);
      if (puVar1 == (undefined4 *)0x0) {
        return 0;
      }
      iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0);
      if (iVar2 != 0) break;
      FUN_00082070(DAT_000d0a98,0);
      FUN_0001dd30(puVar1);
    }
    if ((uint)((DAT_000d0a90 + 10) - puVar1[3]) <= (uint)((puVar1[2] + 10) - puVar1[3])) break;
    FUN_00082070(DAT_000d0a98,0);
    (*(code *)*puVar1)(puVar1[1],puVar1[2]);
    FUN_0001dd30(puVar1);
  }
  *param_2 = puVar1[2];
  return 1;
}


PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000149a0
ADD EBX,0x52c18
MOV ECX,dword ptr [EBX + 0xd08]
TEST ECX,ECX
JZ 0x0007d260
CALL 0x00083c60
MOV dword ptr [EBX + 0xd00],EAX
LEA ESI,[ESI]
NOP
SUB ESP,0x8
PUSH 0x0
PUSH dword ptr [EBX + 0xd08]
CALL 0x00081c90
ADD ESP,0x10
MOV ESI,EAX
TEST EAX,EAX
JZ 0x0007d240
SUB ESP,0x4
PUSH 0x0
PUSH dword ptr [EAX + 0x4]
PUSH dword ptr [EBX + 0xd04]
CALL 0x00082010
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0007d220
MOV ECX,dword ptr [ESI + 0x8]
MOV EAX,dword ptr [EBX + 0xd00]
MOV EDI,dword ptr [ESI + 0xc]
ADD EAX,0xa
LEA EDX,[ECX + 0xa]
SUB EAX,EDI
SUB EDX,EDI
CMP EAX,EDX
JBE 0x0007d250
SUB ESP,0x8
PUSH 0x0
PUSH dword ptr [EBX + 0xd08]
CALL 0x00082070
POP EAX
POP EDX
PUSH dword ptr [ESI + 0x8]
PUSH dword ptr [ESI + 0x4]
CALL dword ptr [ESI]
MOV dword ptr [ESP],ESI
CALL 0x0001dd30
ADD ESP,0x10
JMP 0x0007d1a0
SUB ESP,0x8
PUSH 0x0
PUSH dword ptr [EBX + 0xd08]
CALL 0x00082070
MOV dword ptr [ESP],ESI
CALL 0x0001dd30
ADD ESP,0x10
JMP 0x0007d1a0
POP EBX
XOR EAX,EAX
POP ESI
POP EDI
RET
MOV EAX,dword ptr [ESP + 0x14]
MOV dword ptr [EAX],ECX
MOV EAX,0x1
POP EBX
POP ESI
POP EDI
RET
SUB ESP,0xc
LEA EAX,[EBX + 0xfffad240]
PUSH EAX
CALL 0x0007e350
MOV dword ptr [EBX + 0xd08],EAX
LEA EAX,[EBX + 0xfffad220]
MOV dword ptr [ESP],EAX
CALL 0x0007e350
MOV dword ptr [EBX + 0xd04],EAX
CALL 0x00083c60
ADD ESP,0x10
MOV dword ptr [EBX + 0xd00],EAX
JMP 0x0007d18c
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_0007d170(undefined4 param_1,int *param_2)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  \n  if (DAT_000d0a98 == 0) {\n    DAT_000d0a98 = FUN_0007e350(FUN_0007cfd0);\n    DAT_000d0a94 = FUN_0007e350(FUN_0007cfb0);\n    DAT_000d0a90 = FUN_00083c60();\n  }\n  DAT_000d0a90 = FUN_00083c60();\n  while( true ) {\n    while( true ) {\n      puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0);\n      if (puVar1 == (undefined4 *)0x0) {\n        return 0;\n      }\n      iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0);\n      if (iVar2 != 0) break;\n      FUN_00082070(DAT_000d0a98,0);\n      FUN_0001dd30(puVar1);\n    }\n    if ((uint)((DAT_000d0a90 + 10) - puVar1[3]) <= (uint)((puVar1[2] + 10) - puVar1[3])) break;\n    FUN_00082070(DAT_000d0a98,0);\n    (*(code *)*puVar1)(puVar1[1],puVar1[2]);\n    FUN_0001dd30(puVar1);\n  }\n  *param_2 = puVar1[2];\n  return 1;\n}\n\n" comment (function_definition "undefined4 FUN_0007d170(undefined4 param_1,int *param_2)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  \n  if (DAT_000d0a98 == 0) {\n    DAT_000d0a98 = FUN_0007e350(FUN_0007cfd0);\n    DAT_000d0a94 = FUN_0007e350(FUN_0007cfb0);\n    DAT_000d0a90 = FUN_00083c60();\n  }\n  DAT_000d0a90 = FUN_00083c60();\n  while( true ) {\n    while( true ) {\n      puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0);\n      if (puVar1 == (undefined4 *)0x0) {\n        return 0;\n      }\n      iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0);\n      if (iVar2 != 0) break;\n      FUN_00082070(DAT_000d0a98,0);\n      FUN_0001dd30(puVar1);\n    }\n    if ((uint)((DAT_000d0a90 + 10) - puVar1[3]) <= (uint)((puVar1[2] + 10) - puVar1[3])) break;\n    FUN_00082070(DAT_000d0a98,0);\n    (*(code *)*puVar1)(puVar1[1],puVar1[2]);\n    FUN_0001dd30(puVar1);\n  }\n  *param_2 = puVar1[2];\n  return 1;\n}" type_identifier (function_declarator "FUN_0007d170(undefined4 param_1,int *param_2)" identifier (parameter_list "(undefined4 param_1,int *param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  undefined4 *puVar1;\n  int iVar2;\n  \n  if (DAT_000d0a98 == 0) {\n    DAT_000d0a98 = FUN_0007e350(FUN_0007cfd0);\n    DAT_000d0a94 = FUN_0007e350(FUN_0007cfb0);\n    DAT_000d0a90 = FUN_00083c60();\n  }\n  DAT_000d0a90 = FUN_00083c60();\n  while( true ) {\n    while( true ) {\n      puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0);\n      if (puVar1 == (undefined4 *)0x0) {\n        return 0;\n      }\n      iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0);\n      if (iVar2 != 0) break;\n      FUN_00082070(DAT_000d0a98,0);\n      FUN_0001dd30(puVar1);\n    }\n    if ((uint)((DAT_000d0a90 + 10) - puVar1[3]) <= (uint)((puVar1[2] + 10) - puVar1[3])) break;\n    FUN_00082070(DAT_000d0a98,0);\n    (*(code *)*puVar1)(puVar1[1],puVar1[2]);\n    FUN_0001dd30(puVar1);\n  }\n  *param_2 = puVar1[2];\n  return 1;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (DAT_000d0a98 == 0) {\n    DAT_000d0a98 = FUN_0007e350(FUN_0007cfd0);\n    DAT_000d0a94 = FUN_0007e350(FUN_0007cfb0);\n    DAT_000d0a90 = FUN_00083c60();\n  }" if (parenthesized_expression "(DAT_000d0a98 == 0)" ( (binary_expression "DAT_000d0a98 == 0" identifier == number_literal) )) (compound_statement "{\n    DAT_000d0a98 = FUN_0007e350(FUN_0007cfd0);\n    DAT_000d0a94 = FUN_0007e350(FUN_0007cfb0);\n    DAT_000d0a90 = FUN_00083c60();\n  }" { (expression_statement "DAT_000d0a98 = FUN_0007e350(FUN_0007cfd0);" (assignment_expression "DAT_000d0a98 = FUN_0007e350(FUN_0007cfd0)" identifier = (call_expression "FUN_0007e350(FUN_0007cfd0)" identifier (argument_list "(FUN_0007cfd0)" ( identifier )))) ;) (expression_statement "DAT_000d0a94 = FUN_0007e350(FUN_0007cfb0);" (assignment_expression "DAT_000d0a94 = FUN_0007e350(FUN_0007cfb0)" identifier = (call_expression "FUN_0007e350(FUN_0007cfb0)" identifier (argument_list "(FUN_0007cfb0)" ( identifier )))) ;) (expression_statement "DAT_000d0a90 = FUN_00083c60();" (assignment_expression "DAT_000d0a90 = FUN_00083c60()" identifier = (call_expression "FUN_00083c60()" identifier (argument_list "()" ( )))) ;) })) (expression_statement "DAT_000d0a90 = FUN_00083c60();" (assignment_expression "DAT_000d0a90 = FUN_00083c60()" identifier = (call_expression "FUN_00083c60()" identifier (argument_list "()" ( )))) ;) (while_statement "while( true ) {\n    while( true ) {\n      puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0);\n      if (puVar1 == (undefined4 *)0x0) {\n        return 0;\n      }\n      iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0);\n      if (iVar2 != 0) break;\n      FUN_00082070(DAT_000d0a98,0);\n      FUN_0001dd30(puVar1);\n    }\n    if ((uint)((DAT_000d0a90 + 10) - puVar1[3]) <= (uint)((puVar1[2] + 10) - puVar1[3])) break;\n    FUN_00082070(DAT_000d0a98,0);\n    (*(code *)*puVar1)(puVar1[1],puVar1[2]);\n    FUN_0001dd30(puVar1);\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    while( true ) {\n      puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0);\n      if (puVar1 == (undefined4 *)0x0) {\n        return 0;\n      }\n      iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0);\n      if (iVar2 != 0) break;\n      FUN_00082070(DAT_000d0a98,0);\n      FUN_0001dd30(puVar1);\n    }\n    if ((uint)((DAT_000d0a90 + 10) - puVar1[3]) <= (uint)((puVar1[2] + 10) - puVar1[3])) break;\n    FUN_00082070(DAT_000d0a98,0);\n    (*(code *)*puVar1)(puVar1[1],puVar1[2]);\n    FUN_0001dd30(puVar1);\n  }" { (while_statement "while( true ) {\n      puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0);\n      if (puVar1 == (undefined4 *)0x0) {\n        return 0;\n      }\n      iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0);\n      if (iVar2 != 0) break;\n      FUN_00082070(DAT_000d0a98,0);\n      FUN_0001dd30(puVar1);\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0);\n      if (puVar1 == (undefined4 *)0x0) {\n        return 0;\n      }\n      iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0);\n      if (iVar2 != 0) break;\n      FUN_00082070(DAT_000d0a98,0);\n      FUN_0001dd30(puVar1);\n    }" { (expression_statement "puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0);" (assignment_expression "puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0)" identifier = (cast_expression "(undefined4 *)FUN_00081c90(DAT_000d0a98,0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00081c90(DAT_000d0a98,0)" identifier (argument_list "(DAT_000d0a98,0)" ( identifier , number_literal ))))) ;) (if_statement "if (puVar1 == (undefined4 *)0x0) {\n        return 0;\n      }" if (parenthesized_expression "(puVar1 == (undefined4 *)0x0)" ( (binary_expression "puVar1 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0);" (assignment_expression "iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0)" identifier = (call_expression "FUN_00082010(DAT_000d0a94,puVar1[1],0)" identifier (argument_list "(DAT_000d0a94,puVar1[1],0)" ( identifier , (subscript_expression "puVar1[1]" identifier [ number_literal ]) , number_literal )))) ;) (if_statement "if (iVar2 != 0) break;" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (break_statement "break;" break ;)) (expression_statement "FUN_00082070(DAT_000d0a98,0);" (call_expression "FUN_00082070(DAT_000d0a98,0)" identifier (argument_list "(DAT_000d0a98,0)" ( identifier , number_literal ))) ;) (expression_statement "FUN_0001dd30(puVar1);" (call_expression "FUN_0001dd30(puVar1)" identifier (argument_list "(puVar1)" ( identifier ))) ;) })) (if_statement "if ((uint)((DAT_000d0a90 + 10) - puVar1[3]) <= (uint)((puVar1[2] + 10) - puVar1[3])) break;" if (parenthesized_expression "((uint)((DAT_000d0a90 + 10) - puVar1[3]) <= (uint)((puVar1[2] + 10) - puVar1[3]))" ( (binary_expression "(uint)((DAT_000d0a90 + 10) - puVar1[3]) <= (uint)((puVar1[2] + 10) - puVar1[3])" (call_expression "(uint)((DAT_000d0a90 + 10) - puVar1[3])" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((DAT_000d0a90 + 10) - puVar1[3])" ( (binary_expression "(DAT_000d0a90 + 10) - puVar1[3]" (parenthesized_expression "(DAT_000d0a90 + 10)" ( (binary_expression "DAT_000d0a90 + 10" identifier + number_literal) )) - (subscript_expression "puVar1[3]" identifier [ number_literal ])) ))) <= (call_expression "(uint)((puVar1[2] + 10) - puVar1[3])" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((puVar1[2] + 10) - puVar1[3])" ( (binary_expression "(puVar1[2] + 10) - puVar1[3]" (parenthesized_expression "(puVar1[2] + 10)" ( (binary_expression "puVar1[2] + 10" (subscript_expression "puVar1[2]" identifier [ number_literal ]) + number_literal) )) - (subscript_expression "puVar1[3]" identifier [ number_literal ])) )))) )) (break_statement "break;" break ;)) (expression_statement "FUN_00082070(DAT_000d0a98,0);" (call_expression "FUN_00082070(DAT_000d0a98,0)" identifier (argument_list "(DAT_000d0a98,0)" ( identifier , number_literal ))) ;) (expression_statement "(*(code *)*puVar1)(puVar1[1],puVar1[2]);" (call_expression "(*(code *)*puVar1)(puVar1[1],puVar1[2])" (parenthesized_expression "(*(code *)*puVar1)" ( (pointer_expression "*(code *)*puVar1" * (cast_expression "(code *)*puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar1" * identifier))) )) (argument_list "(puVar1[1],puVar1[2])" ( (subscript_expression "puVar1[1]" identifier [ number_literal ]) , (subscript_expression "puVar1[2]" identifier [ number_literal ]) ))) ;) (expression_statement "FUN_0001dd30(puVar1);" (call_expression "FUN_0001dd30(puVar1)" identifier (argument_list "(puVar1)" ( identifier ))) ;) })) (expression_statement "*param_2 = puVar1[2];" (assignment_expression "*param_2 = puVar1[2]" (pointer_expression "*param_2" * identifier) = (subscript_expression "puVar1[2]" identifier [ number_literal ])) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint run_timers(ulong anow,ulong *next)\n\n{\n  undefined4 *ptr;\n  void *pvVar1;\n  \n  if (timers == (tree234 *)0x0) {\n    timers = newtree234(compare_timers);\n    timer_contexts = newtree234(compare_timer_contexts);\n    now = getticks();\n  }\n  now = getticks();\n  while( true ) {\n    while( true ) {\n      ptr = (undefined4 *)index234(timers,0);\n      if (ptr == (undefined4 *)0x0) {\n        return 0;\n      }\n      pvVar1 = find234(timer_contexts,(void *)ptr[1],(cmpfn234)0x0);\n      if (pvVar1 != (void *)0x0) break;\n      delpos234(timers,0);\n      safefree(ptr);\n    }\n    if ((now + 10) - ptr[3] <= (ptr[2] + 10) - ptr[3]) break;\n    delpos234(timers,0);\n    (*(code *)*ptr)(ptr[1],ptr[2]);\n    safefree(ptr);\n  }\n  *next = ptr[2];\n  return 1;\n}\n\n" comment comment (function_definition "int run_timers(ulong anow,ulong *next)\n\n{\n  undefined4 *ptr;\n  void *pvVar1;\n  \n  if (timers == (tree234 *)0x0) {\n    timers = newtree234(compare_timers);\n    timer_contexts = newtree234(compare_timer_contexts);\n    now = getticks();\n  }\n  now = getticks();\n  while( true ) {\n    while( true ) {\n      ptr = (undefined4 *)index234(timers,0);\n      if (ptr == (undefined4 *)0x0) {\n        return 0;\n      }\n      pvVar1 = find234(timer_contexts,(void *)ptr[1],(cmpfn234)0x0);\n      if (pvVar1 != (void *)0x0) break;\n      delpos234(timers,0);\n      safefree(ptr);\n    }\n    if ((now + 10) - ptr[3] <= (ptr[2] + 10) - ptr[3]) break;\n    delpos234(timers,0);\n    (*(code *)*ptr)(ptr[1],ptr[2]);\n    safefree(ptr);\n  }\n  *next = ptr[2];\n  return 1;\n}" primitive_type (function_declarator "run_timers(ulong anow,ulong *next)" identifier (parameter_list "(ulong anow,ulong *next)" ( (parameter_declaration "ulong anow" type_identifier identifier) , (parameter_declaration "ulong *next" type_identifier (pointer_declarator "*next" * identifier)) ))) (compound_statement "{\n  undefined4 *ptr;\n  void *pvVar1;\n  \n  if (timers == (tree234 *)0x0) {\n    timers = newtree234(compare_timers);\n    timer_contexts = newtree234(compare_timer_contexts);\n    now = getticks();\n  }\n  now = getticks();\n  while( true ) {\n    while( true ) {\n      ptr = (undefined4 *)index234(timers,0);\n      if (ptr == (undefined4 *)0x0) {\n        return 0;\n      }\n      pvVar1 = find234(timer_contexts,(void *)ptr[1],(cmpfn234)0x0);\n      if (pvVar1 != (void *)0x0) break;\n      delpos234(timers,0);\n      safefree(ptr);\n    }\n    if ((now + 10) - ptr[3] <= (ptr[2] + 10) - ptr[3]) break;\n    delpos234(timers,0);\n    (*(code *)*ptr)(ptr[1],ptr[2]);\n    safefree(ptr);\n  }\n  *next = ptr[2];\n  return 1;\n}" { (declaration "undefined4 *ptr;" type_identifier (pointer_declarator "*ptr" * identifier) ;) (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (if_statement "if (timers == (tree234 *)0x0) {\n    timers = newtree234(compare_timers);\n    timer_contexts = newtree234(compare_timer_contexts);\n    now = getticks();\n  }" if (parenthesized_expression "(timers == (tree234 *)0x0)" ( (binary_expression "timers == (tree234 *)0x0" identifier == (cast_expression "(tree234 *)0x0" ( (type_descriptor "tree234 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    timers = newtree234(compare_timers);\n    timer_contexts = newtree234(compare_timer_contexts);\n    now = getticks();\n  }" { (expression_statement "timers = newtree234(compare_timers);" (assignment_expression "timers = newtree234(compare_timers)" identifier = (call_expression "newtree234(compare_timers)" identifier (argument_list "(compare_timers)" ( identifier )))) ;) (expression_statement "timer_contexts = newtree234(compare_timer_contexts);" (assignment_expression "timer_contexts = newtree234(compare_timer_contexts)" identifier = (call_expression "newtree234(compare_timer_contexts)" identifier (argument_list "(compare_timer_contexts)" ( identifier )))) ;) (expression_statement "now = getticks();" (assignment_expression "now = getticks()" identifier = (call_expression "getticks()" identifier (argument_list "()" ( )))) ;) })) (expression_statement "now = getticks();" (assignment_expression "now = getticks()" identifier = (call_expression "getticks()" identifier (argument_list "()" ( )))) ;) (while_statement "while( true ) {\n    while( true ) {\n      ptr = (undefined4 *)index234(timers,0);\n      if (ptr == (undefined4 *)0x0) {\n        return 0;\n      }\n      pvVar1 = find234(timer_contexts,(void *)ptr[1],(cmpfn234)0x0);\n      if (pvVar1 != (void *)0x0) break;\n      delpos234(timers,0);\n      safefree(ptr);\n    }\n    if ((now + 10) - ptr[3] <= (ptr[2] + 10) - ptr[3]) break;\n    delpos234(timers,0);\n    (*(code *)*ptr)(ptr[1],ptr[2]);\n    safefree(ptr);\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    while( true ) {\n      ptr = (undefined4 *)index234(timers,0);\n      if (ptr == (undefined4 *)0x0) {\n        return 0;\n      }\n      pvVar1 = find234(timer_contexts,(void *)ptr[1],(cmpfn234)0x0);\n      if (pvVar1 != (void *)0x0) break;\n      delpos234(timers,0);\n      safefree(ptr);\n    }\n    if ((now + 10) - ptr[3] <= (ptr[2] + 10) - ptr[3]) break;\n    delpos234(timers,0);\n    (*(code *)*ptr)(ptr[1],ptr[2]);\n    safefree(ptr);\n  }" { (while_statement "while( true ) {\n      ptr = (undefined4 *)index234(timers,0);\n      if (ptr == (undefined4 *)0x0) {\n        return 0;\n      }\n      pvVar1 = find234(timer_contexts,(void *)ptr[1],(cmpfn234)0x0);\n      if (pvVar1 != (void *)0x0) break;\n      delpos234(timers,0);\n      safefree(ptr);\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      ptr = (undefined4 *)index234(timers,0);\n      if (ptr == (undefined4 *)0x0) {\n        return 0;\n      }\n      pvVar1 = find234(timer_contexts,(void *)ptr[1],(cmpfn234)0x0);\n      if (pvVar1 != (void *)0x0) break;\n      delpos234(timers,0);\n      safefree(ptr);\n    }" { (expression_statement "ptr = (undefined4 *)index234(timers,0);" (assignment_expression "ptr = (undefined4 *)index234(timers,0)" identifier = (cast_expression "(undefined4 *)index234(timers,0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "index234(timers,0)" identifier (argument_list "(timers,0)" ( identifier , number_literal ))))) ;) (if_statement "if (ptr == (undefined4 *)0x0) {\n        return 0;\n      }" if (parenthesized_expression "(ptr == (undefined4 *)0x0)" ( (binary_expression "ptr == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "pvVar1 = find234(timer_contexts,(void *)ptr[1],(cmpfn234)0x0);" (assignment_expression "pvVar1 = find234(timer_contexts,(void *)ptr[1],(cmpfn234)0x0)" identifier = (call_expression "find234(timer_contexts,(void *)ptr[1],(cmpfn234)0x0)" identifier (argument_list "(timer_contexts,(void *)ptr[1],(cmpfn234)0x0)" ( identifier , (cast_expression "(void *)ptr[1]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "ptr[1]" identifier [ number_literal ])) , (cast_expression "(cmpfn234)0x0" ( (type_descriptor "cmpfn234" type_identifier) ) number_literal) )))) ;) (if_statement "if (pvVar1 != (void *)0x0) break;" if (parenthesized_expression "(pvVar1 != (void *)0x0)" ( (binary_expression "pvVar1 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (break_statement "break;" break ;)) (expression_statement "delpos234(timers,0);" (call_expression "delpos234(timers,0)" identifier (argument_list "(timers,0)" ( identifier , number_literal ))) ;) (expression_statement "safefree(ptr);" (call_expression "safefree(ptr)" identifier (argument_list "(ptr)" ( identifier ))) ;) })) (if_statement "if ((now + 10) - ptr[3] <= (ptr[2] + 10) - ptr[3]) break;" if (parenthesized_expression "((now + 10) - ptr[3] <= (ptr[2] + 10) - ptr[3])" ( (binary_expression "(now + 10) - ptr[3] <= (ptr[2] + 10) - ptr[3]" (binary_expression "(now + 10) - ptr[3]" (parenthesized_expression "(now + 10)" ( (binary_expression "now + 10" identifier + number_literal) )) - (subscript_expression "ptr[3]" identifier [ number_literal ])) <= (binary_expression "(ptr[2] + 10) - ptr[3]" (parenthesized_expression "(ptr[2] + 10)" ( (binary_expression "ptr[2] + 10" (subscript_expression "ptr[2]" identifier [ number_literal ]) + number_literal) )) - (subscript_expression "ptr[3]" identifier [ number_literal ]))) )) (break_statement "break;" break ;)) (expression_statement "delpos234(timers,0);" (call_expression "delpos234(timers,0)" identifier (argument_list "(timers,0)" ( identifier , number_literal ))) ;) (expression_statement "(*(code *)*ptr)(ptr[1],ptr[2]);" (call_expression "(*(code *)*ptr)(ptr[1],ptr[2])" (parenthesized_expression "(*(code *)*ptr)" ( (pointer_expression "*(code *)*ptr" * (cast_expression "(code *)*ptr" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*ptr" * identifier))) )) (argument_list "(ptr[1],ptr[2])" ( (subscript_expression "ptr[1]" identifier [ number_literal ]) , (subscript_expression "ptr[2]" identifier [ number_literal ]) ))) ;) (expression_statement "safefree(ptr);" (call_expression "safefree(ptr)" identifier (argument_list "(ptr)" ( identifier ))) ;) })) (expression_statement "*next = ptr[2];" (assignment_expression "*next = ptr[2]" (pointer_expression "*next" * identifier) = (subscript_expression "ptr[2]" identifier [ number_literal ])) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit "undefined4 FUN_0007d170(undefined4 param_1,int *param_2)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  \n  if (DAT_000d0a98 == 0) {\n    DAT_000d0a98 = FUN_0007e350(FUN_0007cfd0);\n    DAT_000d0a94 = FUN_0007e350(FUN_0007cfb0);\n    DAT_000d0a90 = FUN_00083c60();\n  }\n  DAT_000d0a90 = FUN_00083c60();\n  while( true ) {\n    while( true ) {\n      puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0);\n      if (puVar1 == (undefined4 *)0x0) {\n        return 0;\n      }\n      iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0);\n      if (iVar2 != 0) break;\n      FUN_00082070(DAT_000d0a98,0);\n      FUN_0001dd30(puVar1);\n    }\n    if ((uint)((DAT_000d0a90 + 10) - puVar1[3]) <= (uint)((puVar1[2] + 10) - puVar1[3])) break;\n    FUN_00082070(DAT_000d0a98,0);\n    (*(code *)*puVar1)(puVar1[1],puVar1[2]);\n    FUN_0001dd30(puVar1);\n  }\n  *param_2 = puVar1[2];\n  return 1;\n}\n\n" (function_definition "undefined4 FUN_0007d170(undefined4 param_1,int *param_2)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  \n  if (DAT_000d0a98 == 0) {\n    DAT_000d0a98 = FUN_0007e350(FUN_0007cfd0);\n    DAT_000d0a94 = FUN_0007e350(FUN_0007cfb0);\n    DAT_000d0a90 = FUN_00083c60();\n  }\n  DAT_000d0a90 = FUN_00083c60();\n  while( true ) {\n    while( true ) {\n      puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0);\n      if (puVar1 == (undefined4 *)0x0) {\n        return 0;\n      }\n      iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0);\n      if (iVar2 != 0) break;\n      FUN_00082070(DAT_000d0a98,0);\n      FUN_0001dd30(puVar1);\n    }\n    if ((uint)((DAT_000d0a90 + 10) - puVar1[3]) <= (uint)((puVar1[2] + 10) - puVar1[3])) break;\n    FUN_00082070(DAT_000d0a98,0);\n    (*(code *)*puVar1)(puVar1[1],puVar1[2]);\n    FUN_0001dd30(puVar1);\n  }\n  *param_2 = puVar1[2];\n  return 1;\n}" type_identifier (function_declarator "FUN_0007d170(undefined4 param_1,int *param_2)" identifier (parameter_list "(undefined4 param_1,int *param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  undefined4 *puVar1;\n  int iVar2;\n  \n  if (DAT_000d0a98 == 0) {\n    DAT_000d0a98 = FUN_0007e350(FUN_0007cfd0);\n    DAT_000d0a94 = FUN_0007e350(FUN_0007cfb0);\n    DAT_000d0a90 = FUN_00083c60();\n  }\n  DAT_000d0a90 = FUN_00083c60();\n  while( true ) {\n    while( true ) {\n      puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0);\n      if (puVar1 == (undefined4 *)0x0) {\n        return 0;\n      }\n      iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0);\n      if (iVar2 != 0) break;\n      FUN_00082070(DAT_000d0a98,0);\n      FUN_0001dd30(puVar1);\n    }\n    if ((uint)((DAT_000d0a90 + 10) - puVar1[3]) <= (uint)((puVar1[2] + 10) - puVar1[3])) break;\n    FUN_00082070(DAT_000d0a98,0);\n    (*(code *)*puVar1)(puVar1[1],puVar1[2]);\n    FUN_0001dd30(puVar1);\n  }\n  *param_2 = puVar1[2];\n  return 1;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (DAT_000d0a98 == 0) {\n    DAT_000d0a98 = FUN_0007e350(FUN_0007cfd0);\n    DAT_000d0a94 = FUN_0007e350(FUN_0007cfb0);\n    DAT_000d0a90 = FUN_00083c60();\n  }" if (parenthesized_expression "(DAT_000d0a98 == 0)" ( (binary_expression "DAT_000d0a98 == 0" identifier == number_literal) )) (compound_statement "{\n    DAT_000d0a98 = FUN_0007e350(FUN_0007cfd0);\n    DAT_000d0a94 = FUN_0007e350(FUN_0007cfb0);\n    DAT_000d0a90 = FUN_00083c60();\n  }" { (expression_statement "DAT_000d0a98 = FUN_0007e350(FUN_0007cfd0);" (assignment_expression "DAT_000d0a98 = FUN_0007e350(FUN_0007cfd0)" identifier = (call_expression "FUN_0007e350(FUN_0007cfd0)" identifier (argument_list "(FUN_0007cfd0)" ( identifier )))) ;) (expression_statement "DAT_000d0a94 = FUN_0007e350(FUN_0007cfb0);" (assignment_expression "DAT_000d0a94 = FUN_0007e350(FUN_0007cfb0)" identifier = (call_expression "FUN_0007e350(FUN_0007cfb0)" identifier (argument_list "(FUN_0007cfb0)" ( identifier )))) ;) (expression_statement "DAT_000d0a90 = FUN_00083c60();" (assignment_expression "DAT_000d0a90 = FUN_00083c60()" identifier = (call_expression "FUN_00083c60()" identifier (argument_list "()" ( )))) ;) })) (expression_statement "DAT_000d0a90 = FUN_00083c60();" (assignment_expression "DAT_000d0a90 = FUN_00083c60()" identifier = (call_expression "FUN_00083c60()" identifier (argument_list "()" ( )))) ;) (while_statement "while( true ) {\n    while( true ) {\n      puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0);\n      if (puVar1 == (undefined4 *)0x0) {\n        return 0;\n      }\n      iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0);\n      if (iVar2 != 0) break;\n      FUN_00082070(DAT_000d0a98,0);\n      FUN_0001dd30(puVar1);\n    }\n    if ((uint)((DAT_000d0a90 + 10) - puVar1[3]) <= (uint)((puVar1[2] + 10) - puVar1[3])) break;\n    FUN_00082070(DAT_000d0a98,0);\n    (*(code *)*puVar1)(puVar1[1],puVar1[2]);\n    FUN_0001dd30(puVar1);\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    while( true ) {\n      puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0);\n      if (puVar1 == (undefined4 *)0x0) {\n        return 0;\n      }\n      iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0);\n      if (iVar2 != 0) break;\n      FUN_00082070(DAT_000d0a98,0);\n      FUN_0001dd30(puVar1);\n    }\n    if ((uint)((DAT_000d0a90 + 10) - puVar1[3]) <= (uint)((puVar1[2] + 10) - puVar1[3])) break;\n    FUN_00082070(DAT_000d0a98,0);\n    (*(code *)*puVar1)(puVar1[1],puVar1[2]);\n    FUN_0001dd30(puVar1);\n  }" { (while_statement "while( true ) {\n      puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0);\n      if (puVar1 == (undefined4 *)0x0) {\n        return 0;\n      }\n      iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0);\n      if (iVar2 != 0) break;\n      FUN_00082070(DAT_000d0a98,0);\n      FUN_0001dd30(puVar1);\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0);\n      if (puVar1 == (undefined4 *)0x0) {\n        return 0;\n      }\n      iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0);\n      if (iVar2 != 0) break;\n      FUN_00082070(DAT_000d0a98,0);\n      FUN_0001dd30(puVar1);\n    }" { (expression_statement "puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0);" (assignment_expression "puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0)" identifier = (cast_expression "(undefined4 *)FUN_00081c90(DAT_000d0a98,0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00081c90(DAT_000d0a98,0)" identifier (argument_list "(DAT_000d0a98,0)" ( identifier , number_literal ))))) ;) (if_statement "if (puVar1 == (undefined4 *)0x0) {\n        return 0;\n      }" if (parenthesized_expression "(puVar1 == (undefined4 *)0x0)" ( (binary_expression "puVar1 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0);" (assignment_expression "iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0)" identifier = (call_expression "FUN_00082010(DAT_000d0a94,puVar1[1],0)" identifier (argument_list "(DAT_000d0a94,puVar1[1],0)" ( identifier , (subscript_expression "puVar1[1]" identifier [ number_literal ]) , number_literal )))) ;) (if_statement "if (iVar2 != 0) break;" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (break_statement "break;" break ;)) (expression_statement "FUN_00082070(DAT_000d0a98,0);" (call_expression "FUN_00082070(DAT_000d0a98,0)" identifier (argument_list "(DAT_000d0a98,0)" ( identifier , number_literal ))) ;) (expression_statement "FUN_0001dd30(puVar1);" (call_expression "FUN_0001dd30(puVar1)" identifier (argument_list "(puVar1)" ( identifier ))) ;) })) (if_statement "if ((uint)((DAT_000d0a90 + 10) - puVar1[3]) <= (uint)((puVar1[2] + 10) - puVar1[3])) break;" if (parenthesized_expression "((uint)((DAT_000d0a90 + 10) - puVar1[3]) <= (uint)((puVar1[2] + 10) - puVar1[3]))" ( (binary_expression "(uint)((DAT_000d0a90 + 10) - puVar1[3]) <= (uint)((puVar1[2] + 10) - puVar1[3])" (call_expression "(uint)((DAT_000d0a90 + 10) - puVar1[3])" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((DAT_000d0a90 + 10) - puVar1[3])" ( (binary_expression "(DAT_000d0a90 + 10) - puVar1[3]" (parenthesized_expression "(DAT_000d0a90 + 10)" ( (binary_expression "DAT_000d0a90 + 10" identifier + number_literal) )) - (subscript_expression "puVar1[3]" identifier [ number_literal ])) ))) <= (call_expression "(uint)((puVar1[2] + 10) - puVar1[3])" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((puVar1[2] + 10) - puVar1[3])" ( (binary_expression "(puVar1[2] + 10) - puVar1[3]" (parenthesized_expression "(puVar1[2] + 10)" ( (binary_expression "puVar1[2] + 10" (subscript_expression "puVar1[2]" identifier [ number_literal ]) + number_literal) )) - (subscript_expression "puVar1[3]" identifier [ number_literal ])) )))) )) (break_statement "break;" break ;)) (expression_statement "FUN_00082070(DAT_000d0a98,0);" (call_expression "FUN_00082070(DAT_000d0a98,0)" identifier (argument_list "(DAT_000d0a98,0)" ( identifier , number_literal ))) ;) (expression_statement "(*(code *)*puVar1)(puVar1[1],puVar1[2]);" (call_expression "(*(code *)*puVar1)(puVar1[1],puVar1[2])" (parenthesized_expression "(*(code *)*puVar1)" ( (pointer_expression "*(code *)*puVar1" * (cast_expression "(code *)*puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar1" * identifier))) )) (argument_list "(puVar1[1],puVar1[2])" ( (subscript_expression "puVar1[1]" identifier [ number_literal ]) , (subscript_expression "puVar1[2]" identifier [ number_literal ]) ))) ;) (expression_statement "FUN_0001dd30(puVar1);" (call_expression "FUN_0001dd30(puVar1)" identifier (argument_list "(puVar1)" ( identifier ))) ;) })) (expression_statement "*param_2 = puVar1[2];" (assignment_expression "*param_2 = puVar1[2]" (pointer_expression "*param_2" * identifier) = (subscript_expression "puVar1[2]" identifier [ number_literal ])) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , LIT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (subscript_expression IDENT [ LIT ]) , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (break_statement break ;)) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) - (subscript_expression IDENT [ LIT ])) ))) <= (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )) - (subscript_expression IDENT [ LIT ])) )))) )) (break_statement break ;)) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) )) (argument_list ( (subscript_expression IDENT [ LIT ]) , (subscript_expression IDENT [ LIT ]) ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = (subscript_expression IDENT [ LIT ])) ;) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_0007d170(undefined4 param_1,int *param_2)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  \n  if (DAT_000d0a98 == 0) {\n    DAT_000d0a98 = FUN_0007e350(FUN_0007cfd0);\n    DAT_000d0a94 = FUN_0007e350(FUN_0007cfb0);\n    DAT_000d0a90 = FUN_00083c60();\n  }\n  DAT_000d0a90 = FUN_00083c60();\n  while( true ) {\n    while( true ) {\n      puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0);\n      if (puVar1 == (undefined4 *)0x0) {\n        return 0;\n      }\n      iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0);\n      if (iVar2 != 0) break;\n      FUN_00082070(DAT_000d0a98,0);\n      FUN_0001dd30(puVar1);\n    }\n    if ((uint)((DAT_000d0a90 + 10) - puVar1[3]) <= (uint)((puVar1[2] + 10) - puVar1[3])) break;\n    FUN_00082070(DAT_000d0a98,0);\n    (*(code *)*puVar1)(puVar1[1],puVar1[2]);\n    FUN_0001dd30(puVar1);\n  }\n  *param_2 = puVar1[2];\n  return 1;\n}" (type_identifier "undefined4") (function_declarator "FUN_0007d170(undefined4 param_1,int *param_2)" (identifier "FUN_0007d170") (parameter_list "(undefined4 param_1,int *param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "int *param_2" (primitive_type "int") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  undefined4 *puVar1;\n  int iVar2;\n  \n  if (DAT_000d0a98 == 0) {\n    DAT_000d0a98 = FUN_0007e350(FUN_0007cfd0);\n    DAT_000d0a94 = FUN_0007e350(FUN_0007cfb0);\n    DAT_000d0a90 = FUN_00083c60();\n  }\n  DAT_000d0a90 = FUN_00083c60();\n  while( true ) {\n    while( true ) {\n      puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0);\n      if (puVar1 == (undefined4 *)0x0) {\n        return 0;\n      }\n      iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0);\n      if (iVar2 != 0) break;\n      FUN_00082070(DAT_000d0a98,0);\n      FUN_0001dd30(puVar1);\n    }\n    if ((uint)((DAT_000d0a90 + 10) - puVar1[3]) <= (uint)((puVar1[2] + 10) - puVar1[3])) break;\n    FUN_00082070(DAT_000d0a98,0);\n    (*(code *)*puVar1)(puVar1[1],puVar1[2]);\n    FUN_0001dd30(puVar1);\n  }\n  *param_2 = puVar1[2];\n  return 1;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (if_statement "if (DAT_000d0a98 == 0) {\n    DAT_000d0a98 = FUN_0007e350(FUN_0007cfd0);\n    DAT_000d0a94 = FUN_0007e350(FUN_0007cfb0);\n    DAT_000d0a90 = FUN_00083c60();\n  }" (if "if") (parenthesized_expression "(DAT_000d0a98 == 0)" (( "(") (binary_expression "DAT_000d0a98 == 0" (identifier "DAT_000d0a98") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    DAT_000d0a98 = FUN_0007e350(FUN_0007cfd0);\n    DAT_000d0a94 = FUN_0007e350(FUN_0007cfb0);\n    DAT_000d0a90 = FUN_00083c60();\n  }" ({ "{") (expression_statement "DAT_000d0a98 = FUN_0007e350(FUN_0007cfd0);" (assignment_expression "DAT_000d0a98 = FUN_0007e350(FUN_0007cfd0)" (identifier "DAT_000d0a98") (= "=") (call_expression "FUN_0007e350(FUN_0007cfd0)" (identifier "FUN_0007e350") (argument_list "(FUN_0007cfd0)" (( "(") (identifier "FUN_0007cfd0") () ")")))) (; ";")) (expression_statement "DAT_000d0a94 = FUN_0007e350(FUN_0007cfb0);" (assignment_expression "DAT_000d0a94 = FUN_0007e350(FUN_0007cfb0)" (identifier "DAT_000d0a94") (= "=") (call_expression "FUN_0007e350(FUN_0007cfb0)" (identifier "FUN_0007e350") (argument_list "(FUN_0007cfb0)" (( "(") (identifier "FUN_0007cfb0") () ")")))) (; ";")) (expression_statement "DAT_000d0a90 = FUN_00083c60();" (assignment_expression "DAT_000d0a90 = FUN_00083c60()" (identifier "DAT_000d0a90") (= "=") (call_expression "FUN_00083c60()" (identifier "FUN_00083c60") (argument_list "()" (( "(") () ")")))) (; ";")) (} "}"))) (expression_statement "DAT_000d0a90 = FUN_00083c60();" (assignment_expression "DAT_000d0a90 = FUN_00083c60()" (identifier "DAT_000d0a90") (= "=") (call_expression "FUN_00083c60()" (identifier "FUN_00083c60") (argument_list "()" (( "(") () ")")))) (; ";")) (while_statement "while( true ) {\n    while( true ) {\n      puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0);\n      if (puVar1 == (undefined4 *)0x0) {\n        return 0;\n      }\n      iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0);\n      if (iVar2 != 0) break;\n      FUN_00082070(DAT_000d0a98,0);\n      FUN_0001dd30(puVar1);\n    }\n    if ((uint)((DAT_000d0a90 + 10) - puVar1[3]) <= (uint)((puVar1[2] + 10) - puVar1[3])) break;\n    FUN_00082070(DAT_000d0a98,0);\n    (*(code *)*puVar1)(puVar1[1],puVar1[2]);\n    FUN_0001dd30(puVar1);\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    while( true ) {\n      puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0);\n      if (puVar1 == (undefined4 *)0x0) {\n        return 0;\n      }\n      iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0);\n      if (iVar2 != 0) break;\n      FUN_00082070(DAT_000d0a98,0);\n      FUN_0001dd30(puVar1);\n    }\n    if ((uint)((DAT_000d0a90 + 10) - puVar1[3]) <= (uint)((puVar1[2] + 10) - puVar1[3])) break;\n    FUN_00082070(DAT_000d0a98,0);\n    (*(code *)*puVar1)(puVar1[1],puVar1[2]);\n    FUN_0001dd30(puVar1);\n  }" ({ "{") (while_statement "while( true ) {\n      puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0);\n      if (puVar1 == (undefined4 *)0x0) {\n        return 0;\n      }\n      iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0);\n      if (iVar2 != 0) break;\n      FUN_00082070(DAT_000d0a98,0);\n      FUN_0001dd30(puVar1);\n    }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n      puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0);\n      if (puVar1 == (undefined4 *)0x0) {\n        return 0;\n      }\n      iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0);\n      if (iVar2 != 0) break;\n      FUN_00082070(DAT_000d0a98,0);\n      FUN_0001dd30(puVar1);\n    }" ({ "{") (expression_statement "puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0);" (assignment_expression "puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0)" (identifier "puVar1") (= "=") (cast_expression "(undefined4 *)FUN_00081c90(DAT_000d0a98,0)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00081c90(DAT_000d0a98,0)" (identifier "FUN_00081c90") (argument_list "(DAT_000d0a98,0)" (( "(") (identifier "DAT_000d0a98") (, ",") (number_literal "0") () ")"))))) (; ";")) (if_statement "if (puVar1 == (undefined4 *)0x0) {\n        return 0;\n      }" (if "if") (parenthesized_expression "(puVar1 == (undefined4 *)0x0)" (( "(") (binary_expression "puVar1 == (undefined4 *)0x0" (identifier "puVar1") (== "==") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        return 0;\n      }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0);" (assignment_expression "iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0)" (identifier "iVar2") (= "=") (call_expression "FUN_00082010(DAT_000d0a94,puVar1[1],0)" (identifier "FUN_00082010") (argument_list "(DAT_000d0a94,puVar1[1],0)" (( "(") (identifier "DAT_000d0a94") (, ",") (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]")) (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) break;" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "FUN_00082070(DAT_000d0a98,0);" (call_expression "FUN_00082070(DAT_000d0a98,0)" (identifier "FUN_00082070") (argument_list "(DAT_000d0a98,0)" (( "(") (identifier "DAT_000d0a98") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "FUN_0001dd30(puVar1);" (call_expression "FUN_0001dd30(puVar1)" (identifier "FUN_0001dd30") (argument_list "(puVar1)" (( "(") (identifier "puVar1") () ")"))) (; ";")) (} "}"))) (if_statement "if ((uint)((DAT_000d0a90 + 10) - puVar1[3]) <= (uint)((puVar1[2] + 10) - puVar1[3])) break;" (if "if") (parenthesized_expression "((uint)((DAT_000d0a90 + 10) - puVar1[3]) <= (uint)((puVar1[2] + 10) - puVar1[3]))" (( "(") (binary_expression "(uint)((DAT_000d0a90 + 10) - puVar1[3]) <= (uint)((puVar1[2] + 10) - puVar1[3])" (call_expression "(uint)((DAT_000d0a90 + 10) - puVar1[3])" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "((DAT_000d0a90 + 10) - puVar1[3])" (( "(") (binary_expression "(DAT_000d0a90 + 10) - puVar1[3]" (parenthesized_expression "(DAT_000d0a90 + 10)" (( "(") (binary_expression "DAT_000d0a90 + 10" (identifier "DAT_000d0a90") (+ "+") (number_literal "10")) () ")")) (- "-") (subscript_expression "puVar1[3]" (identifier "puVar1") ([ "[") (number_literal "3") (] "]"))) () ")"))) (<= "<=") (call_expression "(uint)((puVar1[2] + 10) - puVar1[3])" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "((puVar1[2] + 10) - puVar1[3])" (( "(") (binary_expression "(puVar1[2] + 10) - puVar1[3]" (parenthesized_expression "(puVar1[2] + 10)" (( "(") (binary_expression "puVar1[2] + 10" (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")) (+ "+") (number_literal "10")) () ")")) (- "-") (subscript_expression "puVar1[3]" (identifier "puVar1") ([ "[") (number_literal "3") (] "]"))) () ")")))) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "FUN_00082070(DAT_000d0a98,0);" (call_expression "FUN_00082070(DAT_000d0a98,0)" (identifier "FUN_00082070") (argument_list "(DAT_000d0a98,0)" (( "(") (identifier "DAT_000d0a98") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "(*(code *)*puVar1)(puVar1[1],puVar1[2]);" (call_expression "(*(code *)*puVar1)(puVar1[1],puVar1[2])" (parenthesized_expression "(*(code *)*puVar1)" (( "(") (pointer_expression "*(code *)*puVar1" (* "*") (cast_expression "(code *)*puVar1" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*puVar1" (* "*") (identifier "puVar1")))) () ")")) (argument_list "(puVar1[1],puVar1[2])" (( "(") (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]")) (, ",") (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")) () ")"))) (; ";")) (expression_statement "FUN_0001dd30(puVar1);" (call_expression "FUN_0001dd30(puVar1)" (identifier "FUN_0001dd30") (argument_list "(puVar1)" (( "(") (identifier "puVar1") () ")"))) (; ";")) (} "}"))) (expression_statement "*param_2 = puVar1[2];" (assignment_expression "*param_2 = puVar1[2]" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]"))) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}")))

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

int function_1(type_1 anow,type_1 *next)

{
  type_2 *var_5;
  void *var_7;
  
  if (var_1 == (type_3 *)0x0) {
    var_1 = var_2(compare_timers);
    timer_contexts = var_2(compare_timer_contexts);
    var_10 = var_3();
  }
  var_10 = var_3();
  while( true ) {
    while( true ) {
      var_5 = (type_2 *)var_4(var_1,0);
      if (var_5 == (type_2 *)0x0) {
        return 0;
      }
      var_7 = var_6(timer_contexts,(void *)var_5[1],(type_4)0x0);
      if (var_7 != (void *)0x0) break;
      var_8(var_1,0);
      var_9(var_5);
    }
    if ((var_10 + 10) - var_5[3] <= (var_5[2] + 10) - var_5[3]) break;
    var_8(var_1,0);
    (*(type_5 *)*var_5)(var_5[1],var_5[2]);
    var_9(var_5);
  }
  *next = var_5[2];
  return 1;
}


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

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

undefined4 MASKED(undefined4 param_1,int *param_2)

{
  undefined4 *puVar1;
  int iVar2;
  
  if (DAT_000d0a98 == 0) {
    DAT_000d0a98 = FUN_0007e350(FUN_0007cfd0);
    DAT_000d0a94 = FUN_0007e350(FUN_0007cfb0);
    DAT_000d0a90 = FUN_00083c60();
  }
  DAT_000d0a90 = FUN_00083c60();
  while( true ) {
    while( true ) {
      puVar1 = (undefined4 *)FUN_00081c90(DAT_000d0a98,0);
      if (puVar1 == (undefined4 *)0x0) {
        return 0;
      }
      iVar2 = FUN_00082010(DAT_000d0a94,puVar1[1],0);
      if (iVar2 != 0) break;
      FUN_00082070(DAT_000d0a98,0);
      FUN_0001dd30(puVar1);
    }
    if ((uint)((DAT_000d0a90 + 10) - puVar1[3]) <= (uint)((puVar1[2] + 10) - puVar1[3])) break;
    FUN_00082070(DAT_000d0a98,0);
    (*(code *)*puVar1)(puVar1[1],puVar1[2]);
    FUN_0001dd30(puVar1);
  }
  *param_2 = puVar1[2];
  return 1;
}

