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

xtime_t gethrxtime(void)

{
  int iVar1;
  longlong lVar2;
  int iVar3;
  int in_GS_OFFSET;
  timespec ts;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  iVar3 = clock_gettime(1,(timespec *)&ts);
  if (iVar3 == 0) {
    lVar2 = (longlong)ts.tv_sec * 1000000000 + (longlong)ts.tv_nsec;
  }
  else {
    gettime(&ts);
    lVar2 = (longlong)ts.tv_sec * 1000000000 + (longlong)ts.tv_nsec;
  }
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return lVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

longlong FUN_000173b0(void)

{
  longlong lVar1;
  int iVar2;
  int in_GS_OFFSET;
  timespec local_18;
  int local_10;
  undefined4 uStack_c;
  
  uStack_c = 0x173b7;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  iVar2 = clock_gettime(1,&local_18);
  if (iVar2 == 0) {
    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;
  }
  else {
    FUN_00017440(&local_18);
    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return lVar1;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000214c0();
}


PUSH ESI
PUSH EBX
CALL 0x00014850
ADD EBX,0x12c49
SUB ESP,0x1c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x14],EAX
XOR EAX,EAX
LEA ESI,[ESP + 0xc]
PUSH ESI
PUSH 0x1
CALL 0x00012110
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00017410
MOV ECX,dword ptr [ESP + 0x8]
MOV EAX,0x3b9aca00
IMUL dword ptr [ESP + 0x4]
MOV EBX,ECX
SAR EBX,0x1f
ADD EAX,ECX
ADC EDX,EBX
MOV ESI,dword ptr [ESP + 0xc]
XOR ESI,dword ptr GS:[0x14]
JNZ 0x00017434
ADD ESP,0x14
POP EBX
POP ESI
RET
SUB ESP,0xc
PUSH ESI
CALL 0x00017440
MOV ECX,dword ptr [ESP + 0x18]
MOV EAX,0x3b9aca00
IMUL dword ptr [ESP + 0x14]
MOV EBX,ECX
SAR EBX,0x1f
ADD EAX,ECX
ADC EDX,EBX
ADD ESP,0x10
JMP 0x000173f5
CALL 0x000214c0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nlonglong FUN_000173b0(void)\n\n{\n  longlong lVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  timespec local_18;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x173b7;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = clock_gettime(1,&local_18);\n  if (iVar2 == 0) {\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }\n  else {\n    FUN_00017440(&local_18);\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return lVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000214c0();\n}\n\n" comment (function_definition "longlong FUN_000173b0(void)\n\n{\n  longlong lVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  timespec local_18;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x173b7;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = clock_gettime(1,&local_18);\n  if (iVar2 == 0) {\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }\n  else {\n    FUN_00017440(&local_18);\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return lVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000214c0();\n}" type_identifier (function_declarator "FUN_000173b0(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  longlong lVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  timespec local_18;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x173b7;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = clock_gettime(1,&local_18);\n  if (iVar2 == 0) {\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }\n  else {\n    FUN_00017440(&local_18);\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return lVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000214c0();\n}" { (declaration "longlong lVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "timespec local_18;" type_identifier identifier ;) (declaration "int local_10;" primitive_type identifier ;) (declaration "undefined4 uStack_c;" type_identifier identifier ;) (expression_statement "uStack_c = 0x173b7;" (assignment_expression "uStack_c = 0x173b7" identifier = number_literal) ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = clock_gettime(1,&local_18);" (assignment_expression "iVar2 = clock_gettime(1,&local_18)" identifier = (call_expression "clock_gettime(1,&local_18)" identifier (argument_list "(1,&local_18)" ( number_literal , (pointer_expression "&local_18" & identifier) )))) ;) (if_statement "if (iVar2 == 0) {\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }\n  else {\n    FUN_00017440(&local_18);\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }" { (expression_statement "lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;" (assignment_expression "lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec" identifier = (binary_expression "(longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec" (binary_expression "(longlong)local_18.tv_sec * 1000000000" (cast_expression "(longlong)local_18.tv_sec" ( (type_descriptor "longlong" type_identifier) ) (field_expression "local_18.tv_sec" identifier . field_identifier)) * number_literal) + (cast_expression "(longlong)local_18.tv_nsec" ( (type_descriptor "longlong" type_identifier) ) (field_expression "local_18.tv_nsec" identifier . field_identifier)))) ;) }) (else_clause "else {\n    FUN_00017440(&local_18);\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }" else (compound_statement "{\n    FUN_00017440(&local_18);\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }" { (expression_statement "FUN_00017440(&local_18);" (call_expression "FUN_00017440(&local_18)" identifier (argument_list "(&local_18)" ( (pointer_expression "&local_18" & identifier) ))) ;) (expression_statement "lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;" (assignment_expression "lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec" identifier = (binary_expression "(longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec" (binary_expression "(longlong)local_18.tv_sec * 1000000000" (cast_expression "(longlong)local_18.tv_sec" ( (type_descriptor "longlong" type_identifier) ) (field_expression "local_18.tv_sec" identifier . field_identifier)) * number_literal) + (cast_expression "(longlong)local_18.tv_nsec" ( (type_descriptor "longlong" type_identifier) ) (field_expression "local_18.tv_nsec" identifier . field_identifier)))) ;) }))) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return lVar1;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return lVar1;\n  }" { (return_statement "return lVar1;" return identifier ;) })) comment (expression_statement "FUN_000214c0();" (call_expression "FUN_000214c0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nxtime_t gethrxtime(void)\n\n{\n  int iVar1;\n  longlong lVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  timespec ts;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = clock_gettime(1,(timespec *)&ts);\n  if (iVar3 == 0) {\n    lVar2 = (longlong)ts.tv_sec * 1000000000 + (longlong)ts.tv_nsec;\n  }\n  else {\n    gettime(&ts);\n    lVar2 = (longlong)ts.tv_sec * 1000000000 + (longlong)ts.tv_nsec;\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return lVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "xtime_t gethrxtime(void)\n\n{\n  int iVar1;\n  longlong lVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  timespec ts;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = clock_gettime(1,(timespec *)&ts);\n  if (iVar3 == 0) {\n    lVar2 = (longlong)ts.tv_sec * 1000000000 + (longlong)ts.tv_nsec;\n  }\n  else {\n    gettime(&ts);\n    lVar2 = (longlong)ts.tv_sec * 1000000000 + (longlong)ts.tv_nsec;\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return lVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" type_identifier (function_declarator "gethrxtime(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  longlong lVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  timespec ts;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = clock_gettime(1,(timespec *)&ts);\n  if (iVar3 == 0) {\n    lVar2 = (longlong)ts.tv_sec * 1000000000 + (longlong)ts.tv_nsec;\n  }\n  else {\n    gettime(&ts);\n    lVar2 = (longlong)ts.tv_sec * 1000000000 + (longlong)ts.tv_nsec;\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return lVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "longlong lVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "timespec ts;" type_identifier identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar3 = clock_gettime(1,(timespec *)&ts);" (assignment_expression "iVar3 = clock_gettime(1,(timespec *)&ts)" identifier = (call_expression "clock_gettime(1,(timespec *)&ts)" identifier (argument_list "(1,(timespec *)&ts)" ( number_literal , (cast_expression "(timespec *)&ts" ( (type_descriptor "timespec *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&ts" & identifier)) )))) ;) (if_statement "if (iVar3 == 0) {\n    lVar2 = (longlong)ts.tv_sec * 1000000000 + (longlong)ts.tv_nsec;\n  }\n  else {\n    gettime(&ts);\n    lVar2 = (longlong)ts.tv_sec * 1000000000 + (longlong)ts.tv_nsec;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    lVar2 = (longlong)ts.tv_sec * 1000000000 + (longlong)ts.tv_nsec;\n  }" { (expression_statement "lVar2 = (longlong)ts.tv_sec * 1000000000 + (longlong)ts.tv_nsec;" (assignment_expression "lVar2 = (longlong)ts.tv_sec * 1000000000 + (longlong)ts.tv_nsec" identifier = (binary_expression "(longlong)ts.tv_sec * 1000000000 + (longlong)ts.tv_nsec" (binary_expression "(longlong)ts.tv_sec * 1000000000" (cast_expression "(longlong)ts.tv_sec" ( (type_descriptor "longlong" type_identifier) ) (field_expression "ts.tv_sec" identifier . field_identifier)) * number_literal) + (cast_expression "(longlong)ts.tv_nsec" ( (type_descriptor "longlong" type_identifier) ) (field_expression "ts.tv_nsec" identifier . field_identifier)))) ;) }) (else_clause "else {\n    gettime(&ts);\n    lVar2 = (longlong)ts.tv_sec * 1000000000 + (longlong)ts.tv_nsec;\n  }" else (compound_statement "{\n    gettime(&ts);\n    lVar2 = (longlong)ts.tv_sec * 1000000000 + (longlong)ts.tv_nsec;\n  }" { (expression_statement "gettime(&ts);" (call_expression "gettime(&ts)" identifier (argument_list "(&ts)" ( (pointer_expression "&ts" & identifier) ))) ;) (expression_statement "lVar2 = (longlong)ts.tv_sec * 1000000000 + (longlong)ts.tv_nsec;" (assignment_expression "lVar2 = (longlong)ts.tv_sec * 1000000000 + (longlong)ts.tv_nsec" identifier = (binary_expression "(longlong)ts.tv_sec * 1000000000 + (longlong)ts.tv_nsec" (binary_expression "(longlong)ts.tv_sec * 1000000000" (cast_expression "(longlong)ts.tv_sec" ( (type_descriptor "longlong" type_identifier) ) (field_expression "ts.tv_sec" identifier . field_identifier)) * number_literal) + (cast_expression "(longlong)ts.tv_nsec" ( (type_descriptor "longlong" type_identifier) ) (field_expression "ts.tv_nsec" identifier . field_identifier)))) ;) }))) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return lVar2;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return lVar2;\n  }" { (return_statement "return lVar2;" return identifier ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "longlong FUN_000173b0(void)\n\n{\n  longlong lVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  timespec local_18;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x173b7;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = clock_gettime(1,&local_18);\n  if (iVar2 == 0) {\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }\n  else {\n    FUN_00017440(&local_18);\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return lVar1;\n  }\n                    \n  FUN_000214c0();\n}\n\n" (function_definition "longlong FUN_000173b0(void)\n\n{\n  longlong lVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  timespec local_18;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x173b7;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = clock_gettime(1,&local_18);\n  if (iVar2 == 0) {\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }\n  else {\n    FUN_00017440(&local_18);\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return lVar1;\n  }\n                    \n  FUN_000214c0();\n}" type_identifier (function_declarator "FUN_000173b0(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  longlong lVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  timespec local_18;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x173b7;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = clock_gettime(1,&local_18);\n  if (iVar2 == 0) {\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }\n  else {\n    FUN_00017440(&local_18);\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return lVar1;\n  }\n                    \n  FUN_000214c0();\n}" { (declaration "longlong lVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "timespec local_18;" type_identifier identifier ;) (declaration "int local_10;" primitive_type identifier ;) (declaration "undefined4 uStack_c;" type_identifier identifier ;) (expression_statement "uStack_c = 0x173b7;" (assignment_expression "uStack_c = 0x173b7" identifier = number_literal) ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = clock_gettime(1,&local_18);" (assignment_expression "iVar2 = clock_gettime(1,&local_18)" identifier = (call_expression "clock_gettime(1,&local_18)" identifier (argument_list "(1,&local_18)" ( number_literal , (pointer_expression "&local_18" & identifier) )))) ;) (if_statement "if (iVar2 == 0) {\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }\n  else {\n    FUN_00017440(&local_18);\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }" { (expression_statement "lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;" (assignment_expression "lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec" identifier = (binary_expression "(longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec" (binary_expression "(longlong)local_18.tv_sec * 1000000000" (cast_expression "(longlong)local_18.tv_sec" ( (type_descriptor "longlong" type_identifier) ) (field_expression "local_18.tv_sec" identifier . field_identifier)) * number_literal) + (cast_expression "(longlong)local_18.tv_nsec" ( (type_descriptor "longlong" type_identifier) ) (field_expression "local_18.tv_nsec" identifier . field_identifier)))) ;) }) (else_clause "else {\n    FUN_00017440(&local_18);\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }" else (compound_statement "{\n    FUN_00017440(&local_18);\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }" { (expression_statement "FUN_00017440(&local_18);" (call_expression "FUN_00017440(&local_18)" identifier (argument_list "(&local_18)" ( (pointer_expression "&local_18" & identifier) ))) ;) (expression_statement "lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;" (assignment_expression "lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec" identifier = (binary_expression "(longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec" (binary_expression "(longlong)local_18.tv_sec * 1000000000" (cast_expression "(longlong)local_18.tv_sec" ( (type_descriptor "longlong" type_identifier) ) (field_expression "local_18.tv_sec" identifier . field_identifier)) * number_literal) + (cast_expression "(longlong)local_18.tv_nsec" ( (type_descriptor "longlong" type_identifier) ) (field_expression "local_18.tv_nsec" identifier . field_identifier)))) ;) }))) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return lVar1;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return lVar1;\n  }" { (return_statement "return lVar1;" return identifier ;) })) (expression_statement "FUN_000214c0();" (call_expression "FUN_000214c0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) (field_expression IDENT . field_identifier)) * LIT) + (cast_expression ( (type_descriptor TYPE) ) (field_expression IDENT . field_identifier)))) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) (field_expression IDENT . field_identifier)) * LIT) + (cast_expression ( (type_descriptor TYPE) ) (field_expression IDENT . field_identifier)))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "longlong FUN_000173b0(void)\n\n{\n  longlong lVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  timespec local_18;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x173b7;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = clock_gettime(1,&local_18);\n  if (iVar2 == 0) {\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }\n  else {\n    FUN_00017440(&local_18);\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return lVar1;\n  }\n                    \n  FUN_000214c0();\n}" (type_identifier "longlong") (function_declarator "FUN_000173b0(void)" (identifier "FUN_000173b0") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  longlong lVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  timespec local_18;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x173b7;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = clock_gettime(1,&local_18);\n  if (iVar2 == 0) {\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }\n  else {\n    FUN_00017440(&local_18);\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return lVar1;\n  }\n                    \n  FUN_000214c0();\n}" ({ "{") (declaration "longlong lVar1;" (type_identifier "longlong") (identifier "lVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "timespec local_18;" (type_identifier "timespec") (identifier "local_18") (; ";")) (declaration "int local_10;" (primitive_type "int") (identifier "local_10") (; ";")) (declaration "undefined4 uStack_c;" (type_identifier "undefined4") (identifier "uStack_c") (; ";")) (expression_statement "uStack_c = 0x173b7;" (assignment_expression "uStack_c = 0x173b7" (identifier "uStack_c") (= "=") (number_literal "0x173b7")) (; ";")) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "iVar2 = clock_gettime(1,&local_18);" (assignment_expression "iVar2 = clock_gettime(1,&local_18)" (identifier "iVar2") (= "=") (call_expression "clock_gettime(1,&local_18)" (identifier "clock_gettime") (argument_list "(1,&local_18)" (( "(") (number_literal "1") (, ",") (pointer_expression "&local_18" (& "&") (identifier "local_18")) () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }\n  else {\n    FUN_00017440(&local_18);\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }" ({ "{") (expression_statement "lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;" (assignment_expression "lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec" (identifier "lVar1") (= "=") (binary_expression "(longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec" (binary_expression "(longlong)local_18.tv_sec * 1000000000" (cast_expression "(longlong)local_18.tv_sec" (( "(") (type_descriptor "longlong" (type_identifier "longlong")) () ")") (field_expression "local_18.tv_sec" (identifier "local_18") (. ".") (field_identifier "tv_sec"))) (* "*") (number_literal "1000000000")) (+ "+") (cast_expression "(longlong)local_18.tv_nsec" (( "(") (type_descriptor "longlong" (type_identifier "longlong")) () ")") (field_expression "local_18.tv_nsec" (identifier "local_18") (. ".") (field_identifier "tv_nsec"))))) (; ";")) (} "}")) (else_clause "else {\n    FUN_00017440(&local_18);\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }" (else "else") (compound_statement "{\n    FUN_00017440(&local_18);\n    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;\n  }" ({ "{") (expression_statement "FUN_00017440(&local_18);" (call_expression "FUN_00017440(&local_18)" (identifier "FUN_00017440") (argument_list "(&local_18)" (( "(") (pointer_expression "&local_18" (& "&") (identifier "local_18")) () ")"))) (; ";")) (expression_statement "lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;" (assignment_expression "lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec" (identifier "lVar1") (= "=") (binary_expression "(longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec" (binary_expression "(longlong)local_18.tv_sec * 1000000000" (cast_expression "(longlong)local_18.tv_sec" (( "(") (type_descriptor "longlong" (type_identifier "longlong")) () ")") (field_expression "local_18.tv_sec" (identifier "local_18") (. ".") (field_identifier "tv_sec"))) (* "*") (number_literal "1000000000")) (+ "+") (cast_expression "(longlong)local_18.tv_nsec" (( "(") (type_descriptor "longlong" (type_identifier "longlong")) () ")") (field_expression "local_18.tv_nsec" (identifier "local_18") (. ".") (field_identifier "tv_nsec"))))) (; ";")) (} "}")))) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return lVar1;\n  }" (if "if") (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return lVar1;\n  }" ({ "{") (return_statement "return lVar1;" (return "return") (identifier "lVar1") (; ";")) (} "}"))) (expression_statement "FUN_000214c0();" (call_expression "FUN_000214c0()" (identifier "FUN_000214c0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

type_1 function_1(void)

{
  int var_5;
  type_2 lVar2;
  int var_3;
  int var_1;
  type_3 ts;
  
  var_5 = *(int *)(var_1 + 0x14);
  var_3 = var_2(1,(type_3 *)&ts);
  if (var_3 == 0) {
    lVar2 = (type_2)ts.tv_sec * 1000000000 + (type_2)ts.tv_nsec;
  }
  else {
    var_4(&ts);
    lVar2 = (type_2)ts.tv_sec * 1000000000 + (type_2)ts.tv_nsec;
  }
  if (var_5 == *(int *)(var_1 + 0x14)) {
    return lVar2;
  }
                    /* WARNING: Subroutine does not return */
  var_6();
}


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

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

longlong MASKED(void)

{
  longlong lVar1;
  int iVar2;
  int in_GS_OFFSET;
  timespec local_18;
  int local_10;
  undefined4 uStack_c;
  
  uStack_c = 0x173b7;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  iVar2 = clock_gettime(1,&local_18);
  if (iVar2 == 0) {
    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;
  }
  else {
    FUN_00017440(&local_18);
    lVar1 = (longlong)local_18.tv_sec * 1000000000 + (longlong)local_18.tv_nsec;
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return lVar1;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000214c0();
}

