
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

u32 zipfileGetTime(sqlite3_value *pVal)

{
  int iVar1;
  u32 uVar2;
  sqlite3_vfs *psVar3;
  long in_FS_OFFSET;
  double dVar4;
  i64 ms;
  long local_10;
  
  local_10 = *(long *)(in_FS_OFFSET + 0x28);
  if (pVal != (sqlite3_value *)0x0) {
    iVar1 = sqlite3_value_type(pVal);
    if (iVar1 != 5) {
      uVar2 = sqlite3_value_int64(pVal);
      goto LAB_00112de4;
    }
  }
  psVar3 = sqlite3_vfs_find((char *)0x0);
  if ((psVar3->iVersion < 2) ||
     (psVar3->xCurrentTimeInt64 == (_func_int_sqlite3_vfs_ptr_sqlite3_int64_ptr *)0x0)) {
    (*psVar3->xCurrentTime)(psVar3,(double *)&ms);
    dVar4 = ((double)ms - _DAT_001f39c8) * _DAT_001f39d0;
    if (DAT_001f39d8 <= dVar4) {
      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;
    }
    else {
      uVar2 = (u32)dVar4;
    }
  }
  else {
    (*psVar3->xCurrentTimeInt64)(psVar3,&ms);
    uVar2 = ms / 1000 - 0x3118a36940;
  }
LAB_00112de4:
  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {
    return uVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}



/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

ulong FUN_00112db5(long param_1)

{
  int iVar1;
  ulong uVar2;
  int *piVar3;
  long in_FS_OFFSET;
  double dVar4;
  double local_18;
  long local_10;
  
  local_10 = *(long *)(in_FS_OFFSET + 0x28);
  if (param_1 != 0) {
    iVar1 = FUN_0012d66b();
    if (iVar1 != 5) {
      uVar2 = FUN_0012d64a(param_1);
      goto LAB_00112de4;
    }
  }
  piVar3 = (int *)FUN_0014ac79(0);
  if ((*piVar3 < 2) || (*(code **)(piVar3 + 0x22) == (code *)0x0)) {
    (**(code **)(piVar3 + 0x1e))(piVar3,&local_18);
    dVar4 = (local_18 - _DAT_001f39c8) * _DAT_001f39d0;
    if (DAT_001f39d8 <= dVar4) {
      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;
    }
    else {
      uVar2 = (ulong)dVar4;
    }
  }
  else {
    (**(code **)(piVar3 + 0x22))(piVar3,&local_18);
    uVar2 = (long)local_18 / 1000 - 0x3118a36940;
  }
LAB_00112de4:
  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {
    return uVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}


PUSH RBX
SUB RSP,0x10
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
TEST RDI,RDI
JZ 0x00112dfe
MOV RBX,RDI
CALL 0x0012d66b
CMP EAX,0x5
JZ 0x00112dfe
MOV RDI,RBX
CALL 0x0012d64a
MOV RCX,qword ptr [RSP + 0x8]
XOR RCX,qword ptr FS:[0x28]
JNZ 0x00112e98
ADD RSP,0x10
POP RBX
RET
MOV EDI,0x0
CALL 0x0014ac79
CMP dword ptr [RAX],0x1
JLE 0x00112e4f
MOV RDX,qword ptr [RAX + 0x88]
TEST RDX,RDX
JZ 0x00112e4f
MOV RSI,RSP
MOV RDI,RAX
CALL RDX
MOV RCX,qword ptr [RSP]
MOV RDX,0x20c49ba5e353f7cf
MOV RAX,RCX
IMUL RDX
SAR RDX,0x7
SAR RCX,0x3f
SUB RDX,RCX
MOV RAX,-0x3118a36940
ADD RAX,RDX
JMP 0x00112de4
MOV RSI,RSP
MOV RDI,RAX
CALL qword ptr [RAX + 0x78]
MOVSD XMM0,qword ptr [RSP]
SUBSD XMM0,qword ptr [0x001f39c8]
MULSD XMM0,qword ptr [0x001f39d0]
COMISD XMM0,qword ptr [0x001f39d8]
JNC 0x00112e81
CVTTSD2SI RAX,XMM0
JMP 0x00112de4
SUBSD XMM0,qword ptr [0x001f39d8]
CVTTSD2SI RAX,XMM0
BTC RAX,0x3f
JMP 0x00112de4
CALL 0x0010e4d0
(translation_unit "/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */\n\nulong FUN_00112db5(long param_1)\n\n{\n  int iVar1;\n  ulong uVar2;\n  int *piVar3;\n  long in_FS_OFFSET;\n  double dVar4;\n  double local_18;\n  long local_10;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_1 != 0) {\n    iVar1 = FUN_0012d66b();\n    if (iVar1 != 5) {\n      uVar2 = FUN_0012d64a(param_1);\n      goto LAB_00112de4;\n    }\n  }\n  piVar3 = (int *)FUN_0014ac79(0);\n  if ((*piVar3 < 2) || (*(code **)(piVar3 + 0x22) == (code *)0x0)) {\n    (**(code **)(piVar3 + 0x1e))(piVar3,&local_18);\n    dVar4 = (local_18 - _DAT_001f39c8) * _DAT_001f39d0;\n    if (DAT_001f39d8 <= dVar4) {\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }\n    else {\n      uVar2 = (ulong)dVar4;\n    }\n  }\n  else {\n    (**(code **)(piVar3 + 0x22))(piVar3,&local_18);\n    uVar2 = (long)local_18 / 1000 - 0x3118a36940;\n  }\nLAB_00112de4:\n  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" comment (function_definition "ulong FUN_00112db5(long param_1)\n\n{\n  int iVar1;\n  ulong uVar2;\n  int *piVar3;\n  long in_FS_OFFSET;\n  double dVar4;\n  double local_18;\n  long local_10;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_1 != 0) {\n    iVar1 = FUN_0012d66b();\n    if (iVar1 != 5) {\n      uVar2 = FUN_0012d64a(param_1);\n      goto LAB_00112de4;\n    }\n  }\n  piVar3 = (int *)FUN_0014ac79(0);\n  if ((*piVar3 < 2) || (*(code **)(piVar3 + 0x22) == (code *)0x0)) {\n    (**(code **)(piVar3 + 0x1e))(piVar3,&local_18);\n    dVar4 = (local_18 - _DAT_001f39c8) * _DAT_001f39d0;\n    if (DAT_001f39d8 <= dVar4) {\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }\n    else {\n      uVar2 = (ulong)dVar4;\n    }\n  }\n  else {\n    (**(code **)(piVar3 + 0x22))(piVar3,&local_18);\n    uVar2 = (long)local_18 / 1000 - 0x3118a36940;\n  }\nLAB_00112de4:\n  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" type_identifier (function_declarator "FUN_00112db5(long param_1)" identifier (parameter_list "(long param_1)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  int iVar1;\n  ulong uVar2;\n  int *piVar3;\n  long in_FS_OFFSET;\n  double dVar4;\n  double local_18;\n  long local_10;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_1 != 0) {\n    iVar1 = FUN_0012d66b();\n    if (iVar1 != 5) {\n      uVar2 = FUN_0012d64a(param_1);\n      goto LAB_00112de4;\n    }\n  }\n  piVar3 = (int *)FUN_0014ac79(0);\n  if ((*piVar3 < 2) || (*(code **)(piVar3 + 0x22) == (code *)0x0)) {\n    (**(code **)(piVar3 + 0x1e))(piVar3,&local_18);\n    dVar4 = (local_18 - _DAT_001f39c8) * _DAT_001f39d0;\n    if (DAT_001f39d8 <= dVar4) {\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }\n    else {\n      uVar2 = (ulong)dVar4;\n    }\n  }\n  else {\n    (**(code **)(piVar3 + 0x22))(piVar3,&local_18);\n    uVar2 = (long)local_18 / 1000 - 0x3118a36940;\n  }\nLAB_00112de4:\n  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "double dVar4;" primitive_type identifier ;) (declaration "double local_18;" primitive_type identifier ;) (declaration "long local_10;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_10 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_10 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (if_statement "if (param_1 != 0) {\n    iVar1 = FUN_0012d66b();\n    if (iVar1 != 5) {\n      uVar2 = FUN_0012d64a(param_1);\n      goto LAB_00112de4;\n    }\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar1 = FUN_0012d66b();\n    if (iVar1 != 5) {\n      uVar2 = FUN_0012d64a(param_1);\n      goto LAB_00112de4;\n    }\n  }" { (expression_statement "iVar1 = FUN_0012d66b();" (assignment_expression "iVar1 = FUN_0012d66b()" identifier = (call_expression "FUN_0012d66b()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 != 5) {\n      uVar2 = FUN_0012d64a(param_1);\n      goto LAB_00112de4;\n    }" if (parenthesized_expression "(iVar1 != 5)" ( (binary_expression "iVar1 != 5" identifier != number_literal) )) (compound_statement "{\n      uVar2 = FUN_0012d64a(param_1);\n      goto LAB_00112de4;\n    }" { (expression_statement "uVar2 = FUN_0012d64a(param_1);" (assignment_expression "uVar2 = FUN_0012d64a(param_1)" identifier = (call_expression "FUN_0012d64a(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (goto_statement "goto LAB_00112de4;" goto statement_identifier ;) })) })) (expression_statement "piVar3 = (int *)FUN_0014ac79(0);" (assignment_expression "piVar3 = (int *)FUN_0014ac79(0)" identifier = (cast_expression "(int *)FUN_0014ac79(0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0014ac79(0)" identifier (argument_list "(0)" ( number_literal ))))) ;) (if_statement "if ((*piVar3 < 2) || (*(code **)(piVar3 + 0x22) == (code *)0x0)) {\n    (**(code **)(piVar3 + 0x1e))(piVar3,&local_18);\n    dVar4 = (local_18 - _DAT_001f39c8) * _DAT_001f39d0;\n    if (DAT_001f39d8 <= dVar4) {\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }\n    else {\n      uVar2 = (ulong)dVar4;\n    }\n  }\n  else {\n    (**(code **)(piVar3 + 0x22))(piVar3,&local_18);\n    uVar2 = (long)local_18 / 1000 - 0x3118a36940;\n  }" if (parenthesized_expression "((*piVar3 < 2) || (*(code **)(piVar3 + 0x22) == (code *)0x0))" ( (binary_expression "(*piVar3 < 2) || (*(code **)(piVar3 + 0x22) == (code *)0x0)" (parenthesized_expression "(*piVar3 < 2)" ( (binary_expression "*piVar3 < 2" (pointer_expression "*piVar3" * identifier) < number_literal) )) || (parenthesized_expression "(*(code **)(piVar3 + 0x22) == (code *)0x0)" ( (binary_expression "*(code **)(piVar3 + 0x22) == (code *)0x0" (pointer_expression "*(code **)(piVar3 + 0x22)" * (cast_expression "(code **)(piVar3 + 0x22)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(piVar3 + 0x22)" ( (binary_expression "piVar3 + 0x22" identifier + number_literal) )))) == (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n    (**(code **)(piVar3 + 0x1e))(piVar3,&local_18);\n    dVar4 = (local_18 - _DAT_001f39c8) * _DAT_001f39d0;\n    if (DAT_001f39d8 <= dVar4) {\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }\n    else {\n      uVar2 = (ulong)dVar4;\n    }\n  }" { (expression_statement "(**(code **)(piVar3 + 0x1e))(piVar3,&local_18);" (call_expression "(**(code **)(piVar3 + 0x1e))(piVar3,&local_18)" (parenthesized_expression "(**(code **)(piVar3 + 0x1e))" ( (pointer_expression "**(code **)(piVar3 + 0x1e)" * (pointer_expression "*(code **)(piVar3 + 0x1e)" * (cast_expression "(code **)(piVar3 + 0x1e)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(piVar3 + 0x1e)" ( (binary_expression "piVar3 + 0x1e" identifier + number_literal) ))))) )) (argument_list "(piVar3,&local_18)" ( identifier , (pointer_expression "&local_18" & identifier) ))) ;) (expression_statement "dVar4 = (local_18 - _DAT_001f39c8) * _DAT_001f39d0;" (assignment_expression "dVar4 = (local_18 - _DAT_001f39c8) * _DAT_001f39d0" identifier = (binary_expression "(local_18 - _DAT_001f39c8) * _DAT_001f39d0" (parenthesized_expression "(local_18 - _DAT_001f39c8)" ( (binary_expression "local_18 - _DAT_001f39c8" identifier - identifier) )) * identifier)) ;) (if_statement "if (DAT_001f39d8 <= dVar4) {\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }\n    else {\n      uVar2 = (ulong)dVar4;\n    }" if (parenthesized_expression "(DAT_001f39d8 <= dVar4)" ( (binary_expression "DAT_001f39d8 <= dVar4" identifier <= identifier) )) (compound_statement "{\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }" { (expression_statement "uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;" (assignment_expression "uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000" identifier = (binary_expression "(long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000" (cast_expression "(long)(dVar4 - DAT_001f39d8)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(dVar4 - DAT_001f39d8)" ( (binary_expression "dVar4 - DAT_001f39d8" identifier - identifier) ))) ^ number_literal)) ;) }) (else_clause "else {\n      uVar2 = (ulong)dVar4;\n    }" else (compound_statement "{\n      uVar2 = (ulong)dVar4;\n    }" { (expression_statement "uVar2 = (ulong)dVar4;" (assignment_expression "uVar2 = (ulong)dVar4" identifier = (cast_expression "(ulong)dVar4" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) }))) }) (else_clause "else {\n    (**(code **)(piVar3 + 0x22))(piVar3,&local_18);\n    uVar2 = (long)local_18 / 1000 - 0x3118a36940;\n  }" else (compound_statement "{\n    (**(code **)(piVar3 + 0x22))(piVar3,&local_18);\n    uVar2 = (long)local_18 / 1000 - 0x3118a36940;\n  }" { (expression_statement "(**(code **)(piVar3 + 0x22))(piVar3,&local_18);" (call_expression "(**(code **)(piVar3 + 0x22))(piVar3,&local_18)" (parenthesized_expression "(**(code **)(piVar3 + 0x22))" ( (pointer_expression "**(code **)(piVar3 + 0x22)" * (pointer_expression "*(code **)(piVar3 + 0x22)" * (cast_expression "(code **)(piVar3 + 0x22)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(piVar3 + 0x22)" ( (binary_expression "piVar3 + 0x22" identifier + number_literal) ))))) )) (argument_list "(piVar3,&local_18)" ( identifier , (pointer_expression "&local_18" & identifier) ))) ;) (expression_statement "uVar2 = (long)local_18 / 1000 - 0x3118a36940;" (assignment_expression "uVar2 = (long)local_18 / 1000 - 0x3118a36940" identifier = (binary_expression "(long)local_18 / 1000 - 0x3118a36940" (binary_expression "(long)local_18 / 1000" (cast_expression "(long)local_18" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) / number_literal) - number_literal)) ;) }))) (labeled_statement "LAB_00112de4:\n  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }" statement_identifier : (if_statement "if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }" if (parenthesized_expression "(local_10 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_10 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) }))) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */\n\nu32 zipfileGetTime(sqlite3_value *pVal)\n\n{\n  int iVar1;\n  u32 uVar2;\n  sqlite3_vfs *psVar3;\n  long in_FS_OFFSET;\n  double dVar4;\n  i64 ms;\n  long local_10;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  if (pVal != (sqlite3_value *)0x0) {\n    iVar1 = sqlite3_value_type(pVal);\n    if (iVar1 != 5) {\n      uVar2 = sqlite3_value_int64(pVal);\n      goto LAB_00112de4;\n    }\n  }\n  psVar3 = sqlite3_vfs_find((char *)0x0);\n  if ((psVar3->iVersion < 2) ||\n     (psVar3->xCurrentTimeInt64 == (_func_int_sqlite3_vfs_ptr_sqlite3_int64_ptr *)0x0)) {\n    (*psVar3->xCurrentTime)(psVar3,(double *)&ms);\n    dVar4 = ((double)ms - _DAT_001f39c8) * _DAT_001f39d0;\n    if (DAT_001f39d8 <= dVar4) {\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }\n    else {\n      uVar2 = (u32)dVar4;\n    }\n  }\n  else {\n    (*psVar3->xCurrentTimeInt64)(psVar3,&ms);\n    uVar2 = ms / 1000 - 0x3118a36940;\n  }\nLAB_00112de4:\n  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" comment (function_definition "u32 zipfileGetTime(sqlite3_value *pVal)\n\n{\n  int iVar1;\n  u32 uVar2;\n  sqlite3_vfs *psVar3;\n  long in_FS_OFFSET;\n  double dVar4;\n  i64 ms;\n  long local_10;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  if (pVal != (sqlite3_value *)0x0) {\n    iVar1 = sqlite3_value_type(pVal);\n    if (iVar1 != 5) {\n      uVar2 = sqlite3_value_int64(pVal);\n      goto LAB_00112de4;\n    }\n  }\n  psVar3 = sqlite3_vfs_find((char *)0x0);\n  if ((psVar3->iVersion < 2) ||\n     (psVar3->xCurrentTimeInt64 == (_func_int_sqlite3_vfs_ptr_sqlite3_int64_ptr *)0x0)) {\n    (*psVar3->xCurrentTime)(psVar3,(double *)&ms);\n    dVar4 = ((double)ms - _DAT_001f39c8) * _DAT_001f39d0;\n    if (DAT_001f39d8 <= dVar4) {\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }\n    else {\n      uVar2 = (u32)dVar4;\n    }\n  }\n  else {\n    (*psVar3->xCurrentTimeInt64)(psVar3,&ms);\n    uVar2 = ms / 1000 - 0x3118a36940;\n  }\nLAB_00112de4:\n  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" type_identifier (function_declarator "zipfileGetTime(sqlite3_value *pVal)" identifier (parameter_list "(sqlite3_value *pVal)" ( (parameter_declaration "sqlite3_value *pVal" type_identifier (pointer_declarator "*pVal" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  u32 uVar2;\n  sqlite3_vfs *psVar3;\n  long in_FS_OFFSET;\n  double dVar4;\n  i64 ms;\n  long local_10;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  if (pVal != (sqlite3_value *)0x0) {\n    iVar1 = sqlite3_value_type(pVal);\n    if (iVar1 != 5) {\n      uVar2 = sqlite3_value_int64(pVal);\n      goto LAB_00112de4;\n    }\n  }\n  psVar3 = sqlite3_vfs_find((char *)0x0);\n  if ((psVar3->iVersion < 2) ||\n     (psVar3->xCurrentTimeInt64 == (_func_int_sqlite3_vfs_ptr_sqlite3_int64_ptr *)0x0)) {\n    (*psVar3->xCurrentTime)(psVar3,(double *)&ms);\n    dVar4 = ((double)ms - _DAT_001f39c8) * _DAT_001f39d0;\n    if (DAT_001f39d8 <= dVar4) {\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }\n    else {\n      uVar2 = (u32)dVar4;\n    }\n  }\n  else {\n    (*psVar3->xCurrentTimeInt64)(psVar3,&ms);\n    uVar2 = ms / 1000 - 0x3118a36940;\n  }\nLAB_00112de4:\n  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "u32 uVar2;" type_identifier identifier ;) (declaration "sqlite3_vfs *psVar3;" type_identifier (pointer_declarator "*psVar3" * identifier) ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "double dVar4;" primitive_type identifier ;) (declaration "i64 ms;" type_identifier identifier ;) (declaration "long local_10;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_10 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_10 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (if_statement "if (pVal != (sqlite3_value *)0x0) {\n    iVar1 = sqlite3_value_type(pVal);\n    if (iVar1 != 5) {\n      uVar2 = sqlite3_value_int64(pVal);\n      goto LAB_00112de4;\n    }\n  }" if (parenthesized_expression "(pVal != (sqlite3_value *)0x0)" ( (binary_expression "pVal != (sqlite3_value *)0x0" identifier != (cast_expression "(sqlite3_value *)0x0" ( (type_descriptor "sqlite3_value *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar1 = sqlite3_value_type(pVal);\n    if (iVar1 != 5) {\n      uVar2 = sqlite3_value_int64(pVal);\n      goto LAB_00112de4;\n    }\n  }" { (expression_statement "iVar1 = sqlite3_value_type(pVal);" (assignment_expression "iVar1 = sqlite3_value_type(pVal)" identifier = (call_expression "sqlite3_value_type(pVal)" identifier (argument_list "(pVal)" ( identifier )))) ;) (if_statement "if (iVar1 != 5) {\n      uVar2 = sqlite3_value_int64(pVal);\n      goto LAB_00112de4;\n    }" if (parenthesized_expression "(iVar1 != 5)" ( (binary_expression "iVar1 != 5" identifier != number_literal) )) (compound_statement "{\n      uVar2 = sqlite3_value_int64(pVal);\n      goto LAB_00112de4;\n    }" { (expression_statement "uVar2 = sqlite3_value_int64(pVal);" (assignment_expression "uVar2 = sqlite3_value_int64(pVal)" identifier = (call_expression "sqlite3_value_int64(pVal)" identifier (argument_list "(pVal)" ( identifier )))) ;) (goto_statement "goto LAB_00112de4;" goto statement_identifier ;) })) })) (expression_statement "psVar3 = sqlite3_vfs_find((char *)0x0);" (assignment_expression "psVar3 = sqlite3_vfs_find((char *)0x0)" identifier = (call_expression "sqlite3_vfs_find((char *)0x0)" identifier (argument_list "((char *)0x0)" ( (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (if_statement "if ((psVar3->iVersion < 2) ||\n     (psVar3->xCurrentTimeInt64 == (_func_int_sqlite3_vfs_ptr_sqlite3_int64_ptr *)0x0)) {\n    (*psVar3->xCurrentTime)(psVar3,(double *)&ms);\n    dVar4 = ((double)ms - _DAT_001f39c8) * _DAT_001f39d0;\n    if (DAT_001f39d8 <= dVar4) {\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }\n    else {\n      uVar2 = (u32)dVar4;\n    }\n  }\n  else {\n    (*psVar3->xCurrentTimeInt64)(psVar3,&ms);\n    uVar2 = ms / 1000 - 0x3118a36940;\n  }" if (parenthesized_expression "((psVar3->iVersion < 2) ||\n     (psVar3->xCurrentTimeInt64 == (_func_int_sqlite3_vfs_ptr_sqlite3_int64_ptr *)0x0))" ( (binary_expression "(psVar3->iVersion < 2) ||\n     (psVar3->xCurrentTimeInt64 == (_func_int_sqlite3_vfs_ptr_sqlite3_int64_ptr *)0x0)" (parenthesized_expression "(psVar3->iVersion < 2)" ( (binary_expression "psVar3->iVersion < 2" (field_expression "psVar3->iVersion" identifier -> field_identifier) < number_literal) )) || (parenthesized_expression "(psVar3->xCurrentTimeInt64 == (_func_int_sqlite3_vfs_ptr_sqlite3_int64_ptr *)0x0)" ( (binary_expression "psVar3->xCurrentTimeInt64 == (_func_int_sqlite3_vfs_ptr_sqlite3_int64_ptr *)0x0" (field_expression "psVar3->xCurrentTimeInt64" identifier -> field_identifier) == (cast_expression "(_func_int_sqlite3_vfs_ptr_sqlite3_int64_ptr *)0x0" ( (type_descriptor "_func_int_sqlite3_vfs_ptr_sqlite3_int64_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n    (*psVar3->xCurrentTime)(psVar3,(double *)&ms);\n    dVar4 = ((double)ms - _DAT_001f39c8) * _DAT_001f39d0;\n    if (DAT_001f39d8 <= dVar4) {\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }\n    else {\n      uVar2 = (u32)dVar4;\n    }\n  }" { (expression_statement "(*psVar3->xCurrentTime)(psVar3,(double *)&ms);" (call_expression "(*psVar3->xCurrentTime)(psVar3,(double *)&ms)" (parenthesized_expression "(*psVar3->xCurrentTime)" ( (pointer_expression "*psVar3->xCurrentTime" * (field_expression "psVar3->xCurrentTime" identifier -> field_identifier)) )) (argument_list "(psVar3,(double *)&ms)" ( identifier , (cast_expression "(double *)&ms" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&ms" & identifier)) ))) ;) (expression_statement "dVar4 = ((double)ms - _DAT_001f39c8) * _DAT_001f39d0;" (assignment_expression "dVar4 = ((double)ms - _DAT_001f39c8) * _DAT_001f39d0" identifier = (binary_expression "((double)ms - _DAT_001f39c8) * _DAT_001f39d0" (parenthesized_expression "((double)ms - _DAT_001f39c8)" ( (binary_expression "(double)ms - _DAT_001f39c8" (cast_expression "(double)ms" ( (type_descriptor "double" primitive_type) ) identifier) - identifier) )) * identifier)) ;) (if_statement "if (DAT_001f39d8 <= dVar4) {\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }\n    else {\n      uVar2 = (u32)dVar4;\n    }" if (parenthesized_expression "(DAT_001f39d8 <= dVar4)" ( (binary_expression "DAT_001f39d8 <= dVar4" identifier <= identifier) )) (compound_statement "{\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }" { (expression_statement "uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;" (assignment_expression "uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000" identifier = (binary_expression "(long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000" (cast_expression "(long)(dVar4 - DAT_001f39d8)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(dVar4 - DAT_001f39d8)" ( (binary_expression "dVar4 - DAT_001f39d8" identifier - identifier) ))) ^ number_literal)) ;) }) (else_clause "else {\n      uVar2 = (u32)dVar4;\n    }" else (compound_statement "{\n      uVar2 = (u32)dVar4;\n    }" { (expression_statement "uVar2 = (u32)dVar4;" (assignment_expression "uVar2 = (u32)dVar4" identifier = (cast_expression "(u32)dVar4" ( (type_descriptor "u32" type_identifier) ) identifier)) ;) }))) }) (else_clause "else {\n    (*psVar3->xCurrentTimeInt64)(psVar3,&ms);\n    uVar2 = ms / 1000 - 0x3118a36940;\n  }" else (compound_statement "{\n    (*psVar3->xCurrentTimeInt64)(psVar3,&ms);\n    uVar2 = ms / 1000 - 0x3118a36940;\n  }" { (expression_statement "(*psVar3->xCurrentTimeInt64)(psVar3,&ms);" (call_expression "(*psVar3->xCurrentTimeInt64)(psVar3,&ms)" (parenthesized_expression "(*psVar3->xCurrentTimeInt64)" ( (pointer_expression "*psVar3->xCurrentTimeInt64" * (field_expression "psVar3->xCurrentTimeInt64" identifier -> field_identifier)) )) (argument_list "(psVar3,&ms)" ( identifier , (pointer_expression "&ms" & identifier) ))) ;) (expression_statement "uVar2 = ms / 1000 - 0x3118a36940;" (assignment_expression "uVar2 = ms / 1000 - 0x3118a36940" identifier = (binary_expression "ms / 1000 - 0x3118a36940" (binary_expression "ms / 1000" identifier / number_literal) - number_literal)) ;) }))) (labeled_statement "LAB_00112de4:\n  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }" statement_identifier : (if_statement "if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }" if (parenthesized_expression "(local_10 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_10 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) }))) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "ulong FUN_00112db5(long param_1)\n\n{\n  int iVar1;\n  ulong uVar2;\n  int *piVar3;\n  long in_FS_OFFSET;\n  double dVar4;\n  double local_18;\n  long local_10;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_1 != 0) {\n    iVar1 = FUN_0012d66b();\n    if (iVar1 != 5) {\n      uVar2 = FUN_0012d64a(param_1);\n      goto LAB_00112de4;\n    }\n  }\n  piVar3 = (int *)FUN_0014ac79(0);\n  if ((*piVar3 < 2) || (*(code **)(piVar3 + 0x22) == (code *)0x0)) {\n    (**(code **)(piVar3 + 0x1e))(piVar3,&local_18);\n    dVar4 = (local_18 - _DAT_001f39c8) * _DAT_001f39d0;\n    if (DAT_001f39d8 <= dVar4) {\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }\n    else {\n      uVar2 = (ulong)dVar4;\n    }\n  }\n  else {\n    (**(code **)(piVar3 + 0x22))(piVar3,&local_18);\n    uVar2 = (long)local_18 / 1000 - 0x3118a36940;\n  }\nLAB_00112de4:\n  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    \n  __stack_chk_fail();\n}\n\n" (function_definition "ulong FUN_00112db5(long param_1)\n\n{\n  int iVar1;\n  ulong uVar2;\n  int *piVar3;\n  long in_FS_OFFSET;\n  double dVar4;\n  double local_18;\n  long local_10;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_1 != 0) {\n    iVar1 = FUN_0012d66b();\n    if (iVar1 != 5) {\n      uVar2 = FUN_0012d64a(param_1);\n      goto LAB_00112de4;\n    }\n  }\n  piVar3 = (int *)FUN_0014ac79(0);\n  if ((*piVar3 < 2) || (*(code **)(piVar3 + 0x22) == (code *)0x0)) {\n    (**(code **)(piVar3 + 0x1e))(piVar3,&local_18);\n    dVar4 = (local_18 - _DAT_001f39c8) * _DAT_001f39d0;\n    if (DAT_001f39d8 <= dVar4) {\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }\n    else {\n      uVar2 = (ulong)dVar4;\n    }\n  }\n  else {\n    (**(code **)(piVar3 + 0x22))(piVar3,&local_18);\n    uVar2 = (long)local_18 / 1000 - 0x3118a36940;\n  }\nLAB_00112de4:\n  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    \n  __stack_chk_fail();\n}" type_identifier (function_declarator "FUN_00112db5(long param_1)" identifier (parameter_list "(long param_1)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  int iVar1;\n  ulong uVar2;\n  int *piVar3;\n  long in_FS_OFFSET;\n  double dVar4;\n  double local_18;\n  long local_10;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_1 != 0) {\n    iVar1 = FUN_0012d66b();\n    if (iVar1 != 5) {\n      uVar2 = FUN_0012d64a(param_1);\n      goto LAB_00112de4;\n    }\n  }\n  piVar3 = (int *)FUN_0014ac79(0);\n  if ((*piVar3 < 2) || (*(code **)(piVar3 + 0x22) == (code *)0x0)) {\n    (**(code **)(piVar3 + 0x1e))(piVar3,&local_18);\n    dVar4 = (local_18 - _DAT_001f39c8) * _DAT_001f39d0;\n    if (DAT_001f39d8 <= dVar4) {\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }\n    else {\n      uVar2 = (ulong)dVar4;\n    }\n  }\n  else {\n    (**(code **)(piVar3 + 0x22))(piVar3,&local_18);\n    uVar2 = (long)local_18 / 1000 - 0x3118a36940;\n  }\nLAB_00112de4:\n  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    \n  __stack_chk_fail();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "double dVar4;" primitive_type identifier ;) (declaration "double local_18;" primitive_type identifier ;) (declaration "long local_10;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_10 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_10 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (if_statement "if (param_1 != 0) {\n    iVar1 = FUN_0012d66b();\n    if (iVar1 != 5) {\n      uVar2 = FUN_0012d64a(param_1);\n      goto LAB_00112de4;\n    }\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar1 = FUN_0012d66b();\n    if (iVar1 != 5) {\n      uVar2 = FUN_0012d64a(param_1);\n      goto LAB_00112de4;\n    }\n  }" { (expression_statement "iVar1 = FUN_0012d66b();" (assignment_expression "iVar1 = FUN_0012d66b()" identifier = (call_expression "FUN_0012d66b()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 != 5) {\n      uVar2 = FUN_0012d64a(param_1);\n      goto LAB_00112de4;\n    }" if (parenthesized_expression "(iVar1 != 5)" ( (binary_expression "iVar1 != 5" identifier != number_literal) )) (compound_statement "{\n      uVar2 = FUN_0012d64a(param_1);\n      goto LAB_00112de4;\n    }" { (expression_statement "uVar2 = FUN_0012d64a(param_1);" (assignment_expression "uVar2 = FUN_0012d64a(param_1)" identifier = (call_expression "FUN_0012d64a(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (goto_statement "goto LAB_00112de4;" goto statement_identifier ;) })) })) (expression_statement "piVar3 = (int *)FUN_0014ac79(0);" (assignment_expression "piVar3 = (int *)FUN_0014ac79(0)" identifier = (cast_expression "(int *)FUN_0014ac79(0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0014ac79(0)" identifier (argument_list "(0)" ( number_literal ))))) ;) (if_statement "if ((*piVar3 < 2) || (*(code **)(piVar3 + 0x22) == (code *)0x0)) {\n    (**(code **)(piVar3 + 0x1e))(piVar3,&local_18);\n    dVar4 = (local_18 - _DAT_001f39c8) * _DAT_001f39d0;\n    if (DAT_001f39d8 <= dVar4) {\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }\n    else {\n      uVar2 = (ulong)dVar4;\n    }\n  }\n  else {\n    (**(code **)(piVar3 + 0x22))(piVar3,&local_18);\n    uVar2 = (long)local_18 / 1000 - 0x3118a36940;\n  }" if (parenthesized_expression "((*piVar3 < 2) || (*(code **)(piVar3 + 0x22) == (code *)0x0))" ( (binary_expression "(*piVar3 < 2) || (*(code **)(piVar3 + 0x22) == (code *)0x0)" (parenthesized_expression "(*piVar3 < 2)" ( (binary_expression "*piVar3 < 2" (pointer_expression "*piVar3" * identifier) < number_literal) )) || (parenthesized_expression "(*(code **)(piVar3 + 0x22) == (code *)0x0)" ( (binary_expression "*(code **)(piVar3 + 0x22) == (code *)0x0" (pointer_expression "*(code **)(piVar3 + 0x22)" * (cast_expression "(code **)(piVar3 + 0x22)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(piVar3 + 0x22)" ( (binary_expression "piVar3 + 0x22" identifier + number_literal) )))) == (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n    (**(code **)(piVar3 + 0x1e))(piVar3,&local_18);\n    dVar4 = (local_18 - _DAT_001f39c8) * _DAT_001f39d0;\n    if (DAT_001f39d8 <= dVar4) {\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }\n    else {\n      uVar2 = (ulong)dVar4;\n    }\n  }" { (expression_statement "(**(code **)(piVar3 + 0x1e))(piVar3,&local_18);" (call_expression "(**(code **)(piVar3 + 0x1e))(piVar3,&local_18)" (parenthesized_expression "(**(code **)(piVar3 + 0x1e))" ( (pointer_expression "**(code **)(piVar3 + 0x1e)" * (pointer_expression "*(code **)(piVar3 + 0x1e)" * (cast_expression "(code **)(piVar3 + 0x1e)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(piVar3 + 0x1e)" ( (binary_expression "piVar3 + 0x1e" identifier + number_literal) ))))) )) (argument_list "(piVar3,&local_18)" ( identifier , (pointer_expression "&local_18" & identifier) ))) ;) (expression_statement "dVar4 = (local_18 - _DAT_001f39c8) * _DAT_001f39d0;" (assignment_expression "dVar4 = (local_18 - _DAT_001f39c8) * _DAT_001f39d0" identifier = (binary_expression "(local_18 - _DAT_001f39c8) * _DAT_001f39d0" (parenthesized_expression "(local_18 - _DAT_001f39c8)" ( (binary_expression "local_18 - _DAT_001f39c8" identifier - identifier) )) * identifier)) ;) (if_statement "if (DAT_001f39d8 <= dVar4) {\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }\n    else {\n      uVar2 = (ulong)dVar4;\n    }" if (parenthesized_expression "(DAT_001f39d8 <= dVar4)" ( (binary_expression "DAT_001f39d8 <= dVar4" identifier <= identifier) )) (compound_statement "{\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }" { (expression_statement "uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;" (assignment_expression "uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000" identifier = (binary_expression "(long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000" (cast_expression "(long)(dVar4 - DAT_001f39d8)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(dVar4 - DAT_001f39d8)" ( (binary_expression "dVar4 - DAT_001f39d8" identifier - identifier) ))) ^ number_literal)) ;) }) (else_clause "else {\n      uVar2 = (ulong)dVar4;\n    }" else (compound_statement "{\n      uVar2 = (ulong)dVar4;\n    }" { (expression_statement "uVar2 = (ulong)dVar4;" (assignment_expression "uVar2 = (ulong)dVar4" identifier = (cast_expression "(ulong)dVar4" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) }))) }) (else_clause "else {\n    (**(code **)(piVar3 + 0x22))(piVar3,&local_18);\n    uVar2 = (long)local_18 / 1000 - 0x3118a36940;\n  }" else (compound_statement "{\n    (**(code **)(piVar3 + 0x22))(piVar3,&local_18);\n    uVar2 = (long)local_18 / 1000 - 0x3118a36940;\n  }" { (expression_statement "(**(code **)(piVar3 + 0x22))(piVar3,&local_18);" (call_expression "(**(code **)(piVar3 + 0x22))(piVar3,&local_18)" (parenthesized_expression "(**(code **)(piVar3 + 0x22))" ( (pointer_expression "**(code **)(piVar3 + 0x22)" * (pointer_expression "*(code **)(piVar3 + 0x22)" * (cast_expression "(code **)(piVar3 + 0x22)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(piVar3 + 0x22)" ( (binary_expression "piVar3 + 0x22" identifier + number_literal) ))))) )) (argument_list "(piVar3,&local_18)" ( identifier , (pointer_expression "&local_18" & identifier) ))) ;) (expression_statement "uVar2 = (long)local_18 / 1000 - 0x3118a36940;" (assignment_expression "uVar2 = (long)local_18 / 1000 - 0x3118a36940" identifier = (binary_expression "(long)local_18 / 1000 - 0x3118a36940" (binary_expression "(long)local_18 / 1000" (cast_expression "(long)local_18" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) / number_literal) - number_literal)) ;) }))) (labeled_statement "LAB_00112de4:\n  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }" statement_identifier : (if_statement "if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }" if (parenthesized_expression "(local_10 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_10 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) }))) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (goto_statement goto statement_identifier ;) })) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) < LIT) )) || (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ))) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( IDENT , (pointer_expression & IDENT) ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT - IDENT) )) * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (parenthesized_expression ( (binary_expression IDENT - IDENT) ))) ^ LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) }))) }) (else_clause else (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( IDENT , (pointer_expression & IDENT) ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) / LIT) - LIT)) ;) }))) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) }))) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "ulong FUN_00112db5(long param_1)\n\n{\n  int iVar1;\n  ulong uVar2;\n  int *piVar3;\n  long in_FS_OFFSET;\n  double dVar4;\n  double local_18;\n  long local_10;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_1 != 0) {\n    iVar1 = FUN_0012d66b();\n    if (iVar1 != 5) {\n      uVar2 = FUN_0012d64a(param_1);\n      goto LAB_00112de4;\n    }\n  }\n  piVar3 = (int *)FUN_0014ac79(0);\n  if ((*piVar3 < 2) || (*(code **)(piVar3 + 0x22) == (code *)0x0)) {\n    (**(code **)(piVar3 + 0x1e))(piVar3,&local_18);\n    dVar4 = (local_18 - _DAT_001f39c8) * _DAT_001f39d0;\n    if (DAT_001f39d8 <= dVar4) {\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }\n    else {\n      uVar2 = (ulong)dVar4;\n    }\n  }\n  else {\n    (**(code **)(piVar3 + 0x22))(piVar3,&local_18);\n    uVar2 = (long)local_18 / 1000 - 0x3118a36940;\n  }\nLAB_00112de4:\n  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    \n  __stack_chk_fail();\n}" (type_identifier "ulong") (function_declarator "FUN_00112db5(long param_1)" (identifier "FUN_00112db5") (parameter_list "(long param_1)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  ulong uVar2;\n  int *piVar3;\n  long in_FS_OFFSET;\n  double dVar4;\n  double local_18;\n  long local_10;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_1 != 0) {\n    iVar1 = FUN_0012d66b();\n    if (iVar1 != 5) {\n      uVar2 = FUN_0012d64a(param_1);\n      goto LAB_00112de4;\n    }\n  }\n  piVar3 = (int *)FUN_0014ac79(0);\n  if ((*piVar3 < 2) || (*(code **)(piVar3 + 0x22) == (code *)0x0)) {\n    (**(code **)(piVar3 + 0x1e))(piVar3,&local_18);\n    dVar4 = (local_18 - _DAT_001f39c8) * _DAT_001f39d0;\n    if (DAT_001f39d8 <= dVar4) {\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }\n    else {\n      uVar2 = (ulong)dVar4;\n    }\n  }\n  else {\n    (**(code **)(piVar3 + 0x22))(piVar3,&local_18);\n    uVar2 = (long)local_18 / 1000 - 0x3118a36940;\n  }\nLAB_00112de4:\n  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    \n  __stack_chk_fail();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "ulong uVar2;" (type_identifier "ulong") (identifier "uVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" (long "long")) (identifier "in_FS_OFFSET") (; ";")) (declaration "double dVar4;" (primitive_type "double") (identifier "dVar4") (; ";")) (declaration "double local_18;" (primitive_type "double") (identifier "local_18") (; ";")) (declaration "long local_10;" (sized_type_specifier "long" (long "long")) (identifier "local_10") (; ";")) (expression_statement "local_10 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_10 = *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_10") (= "=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (if_statement "if (param_1 != 0) {\n    iVar1 = FUN_0012d66b();\n    if (iVar1 != 5) {\n      uVar2 = FUN_0012d64a(param_1);\n      goto LAB_00112de4;\n    }\n  }" (if "if") (parenthesized_expression "(param_1 != 0)" (( "(") (binary_expression "param_1 != 0" (identifier "param_1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = FUN_0012d66b();\n    if (iVar1 != 5) {\n      uVar2 = FUN_0012d64a(param_1);\n      goto LAB_00112de4;\n    }\n  }" ({ "{") (expression_statement "iVar1 = FUN_0012d66b();" (assignment_expression "iVar1 = FUN_0012d66b()" (identifier "iVar1") (= "=") (call_expression "FUN_0012d66b()" (identifier "FUN_0012d66b") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar1 != 5) {\n      uVar2 = FUN_0012d64a(param_1);\n      goto LAB_00112de4;\n    }" (if "if") (parenthesized_expression "(iVar1 != 5)" (( "(") (binary_expression "iVar1 != 5" (identifier "iVar1") (!= "!=") (number_literal "5")) () ")")) (compound_statement "{\n      uVar2 = FUN_0012d64a(param_1);\n      goto LAB_00112de4;\n    }" ({ "{") (expression_statement "uVar2 = FUN_0012d64a(param_1);" (assignment_expression "uVar2 = FUN_0012d64a(param_1)" (identifier "uVar2") (= "=") (call_expression "FUN_0012d64a(param_1)" (identifier "FUN_0012d64a") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (goto_statement "goto LAB_00112de4;" (goto "goto") (statement_identifier "LAB_00112de4") (; ";")) (} "}"))) (} "}"))) (expression_statement "piVar3 = (int *)FUN_0014ac79(0);" (assignment_expression "piVar3 = (int *)FUN_0014ac79(0)" (identifier "piVar3") (= "=") (cast_expression "(int *)FUN_0014ac79(0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0014ac79(0)" (identifier "FUN_0014ac79") (argument_list "(0)" (( "(") (number_literal "0") () ")"))))) (; ";")) (if_statement "if ((*piVar3 < 2) || (*(code **)(piVar3 + 0x22) == (code *)0x0)) {\n    (**(code **)(piVar3 + 0x1e))(piVar3,&local_18);\n    dVar4 = (local_18 - _DAT_001f39c8) * _DAT_001f39d0;\n    if (DAT_001f39d8 <= dVar4) {\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }\n    else {\n      uVar2 = (ulong)dVar4;\n    }\n  }\n  else {\n    (**(code **)(piVar3 + 0x22))(piVar3,&local_18);\n    uVar2 = (long)local_18 / 1000 - 0x3118a36940;\n  }" (if "if") (parenthesized_expression "((*piVar3 < 2) || (*(code **)(piVar3 + 0x22) == (code *)0x0))" (( "(") (binary_expression "(*piVar3 < 2) || (*(code **)(piVar3 + 0x22) == (code *)0x0)" (parenthesized_expression "(*piVar3 < 2)" (( "(") (binary_expression "*piVar3 < 2" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (< "<") (number_literal "2")) () ")")) (|| "||") (parenthesized_expression "(*(code **)(piVar3 + 0x22) == (code *)0x0)" (( "(") (binary_expression "*(code **)(piVar3 + 0x22) == (code *)0x0" (pointer_expression "*(code **)(piVar3 + 0x22)" (* "*") (cast_expression "(code **)(piVar3 + 0x22)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(piVar3 + 0x22)" (( "(") (binary_expression "piVar3 + 0x22" (identifier "piVar3") (+ "+") (number_literal "0x22")) () ")")))) (== "==") (cast_expression "(code *)0x0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")"))) () ")")) (compound_statement "{\n    (**(code **)(piVar3 + 0x1e))(piVar3,&local_18);\n    dVar4 = (local_18 - _DAT_001f39c8) * _DAT_001f39d0;\n    if (DAT_001f39d8 <= dVar4) {\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }\n    else {\n      uVar2 = (ulong)dVar4;\n    }\n  }" ({ "{") (expression_statement "(**(code **)(piVar3 + 0x1e))(piVar3,&local_18);" (call_expression "(**(code **)(piVar3 + 0x1e))(piVar3,&local_18)" (parenthesized_expression "(**(code **)(piVar3 + 0x1e))" (( "(") (pointer_expression "**(code **)(piVar3 + 0x1e)" (* "*") (pointer_expression "*(code **)(piVar3 + 0x1e)" (* "*") (cast_expression "(code **)(piVar3 + 0x1e)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(piVar3 + 0x1e)" (( "(") (binary_expression "piVar3 + 0x1e" (identifier "piVar3") (+ "+") (number_literal "0x1e")) () ")"))))) () ")")) (argument_list "(piVar3,&local_18)" (( "(") (identifier "piVar3") (, ",") (pointer_expression "&local_18" (& "&") (identifier "local_18")) () ")"))) (; ";")) (expression_statement "dVar4 = (local_18 - _DAT_001f39c8) * _DAT_001f39d0;" (assignment_expression "dVar4 = (local_18 - _DAT_001f39c8) * _DAT_001f39d0" (identifier "dVar4") (= "=") (binary_expression "(local_18 - _DAT_001f39c8) * _DAT_001f39d0" (parenthesized_expression "(local_18 - _DAT_001f39c8)" (( "(") (binary_expression "local_18 - _DAT_001f39c8" (identifier "local_18") (- "-") (identifier "_DAT_001f39c8")) () ")")) (* "*") (identifier "_DAT_001f39d0"))) (; ";")) (if_statement "if (DAT_001f39d8 <= dVar4) {\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }\n    else {\n      uVar2 = (ulong)dVar4;\n    }" (if "if") (parenthesized_expression "(DAT_001f39d8 <= dVar4)" (( "(") (binary_expression "DAT_001f39d8 <= dVar4" (identifier "DAT_001f39d8") (<= "<=") (identifier "dVar4")) () ")")) (compound_statement "{\n      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;\n    }" ({ "{") (expression_statement "uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;" (assignment_expression "uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000" (identifier "uVar2") (= "=") (binary_expression "(long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000" (cast_expression "(long)(dVar4 - DAT_001f39d8)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (parenthesized_expression "(dVar4 - DAT_001f39d8)" (( "(") (binary_expression "dVar4 - DAT_001f39d8" (identifier "dVar4") (- "-") (identifier "DAT_001f39d8")) () ")"))) (^ "^") (number_literal "0x8000000000000000"))) (; ";")) (} "}")) (else_clause "else {\n      uVar2 = (ulong)dVar4;\n    }" (else "else") (compound_statement "{\n      uVar2 = (ulong)dVar4;\n    }" ({ "{") (expression_statement "uVar2 = (ulong)dVar4;" (assignment_expression "uVar2 = (ulong)dVar4" (identifier "uVar2") (= "=") (cast_expression "(ulong)dVar4" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "dVar4"))) (; ";")) (} "}")))) (} "}")) (else_clause "else {\n    (**(code **)(piVar3 + 0x22))(piVar3,&local_18);\n    uVar2 = (long)local_18 / 1000 - 0x3118a36940;\n  }" (else "else") (compound_statement "{\n    (**(code **)(piVar3 + 0x22))(piVar3,&local_18);\n    uVar2 = (long)local_18 / 1000 - 0x3118a36940;\n  }" ({ "{") (expression_statement "(**(code **)(piVar3 + 0x22))(piVar3,&local_18);" (call_expression "(**(code **)(piVar3 + 0x22))(piVar3,&local_18)" (parenthesized_expression "(**(code **)(piVar3 + 0x22))" (( "(") (pointer_expression "**(code **)(piVar3 + 0x22)" (* "*") (pointer_expression "*(code **)(piVar3 + 0x22)" (* "*") (cast_expression "(code **)(piVar3 + 0x22)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(piVar3 + 0x22)" (( "(") (binary_expression "piVar3 + 0x22" (identifier "piVar3") (+ "+") (number_literal "0x22")) () ")"))))) () ")")) (argument_list "(piVar3,&local_18)" (( "(") (identifier "piVar3") (, ",") (pointer_expression "&local_18" (& "&") (identifier "local_18")) () ")"))) (; ";")) (expression_statement "uVar2 = (long)local_18 / 1000 - 0x3118a36940;" (assignment_expression "uVar2 = (long)local_18 / 1000 - 0x3118a36940" (identifier "uVar2") (= "=") (binary_expression "(long)local_18 / 1000 - 0x3118a36940" (binary_expression "(long)local_18 / 1000" (cast_expression "(long)local_18" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "local_18")) (/ "/") (number_literal "1000")) (- "-") (number_literal "0x3118a36940"))) (; ";")) (} "}")))) (labeled_statement "LAB_00112de4:\n  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }" (statement_identifier "LAB_00112de4") (: ":") (if_statement "if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }" (if "if") (parenthesized_expression "(local_10 == *(long *)(in_FS_OFFSET + 0x28))" (( "(") (binary_expression "local_10 == *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_10") (== "==") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) () ")")) (compound_statement "{\n    return uVar2;\n  }" ({ "{") (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" (identifier "__stack_chk_fail") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

type_1 function_1(type_2 *var_2)

{
  int var_4;
  type_1 uVar2;
  type_3 *psVar3;
  long var_1;
  double var_10;
  type_4 var_11;
  long var_12;
  
  var_12 = *(long *)(var_1 + 0x28);
  if (var_2 != (type_2 *)0x0) {
    var_4 = var_3(var_2);
    if (var_4 != 5) {
      uVar2 = var_5(var_2);
      goto LAB_00112de4;
    }
  }
  psVar3 = var_6((char *)0x0);
  if ((psVar3->iVersion < 2) ||
     (psVar3->xCurrentTimeInt64 == (type_5 *)0x0)) {
    (*psVar3->xCurrentTime)(psVar3,(double *)&var_11);
    var_10 = ((double)var_11 - var_7) * var_8;
    if (var_9 <= var_10) {
      uVar2 = (long)(var_10 - var_9) ^ 0x8000000000000000;
    }
    else {
      uVar2 = (type_1)var_10;
    }
  }
  else {
    (*psVar3->xCurrentTimeInt64)(psVar3,&var_11);
    uVar2 = var_11 / 1000 - 0x3118a36940;
  }
LAB_00112de4:
  if (var_12 == *(long *)(var_1 + 0x28)) {
    return uVar2;
  }
                    /* WARNING: Subroutine does not return */
  var_13();
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (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)))) (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))))) (goto_statement label: (statement_identifier)))))) (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)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))))) consequence: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) arguments: (argument_list (identifier) (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) right: (number_literal))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)))))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) arguments: (argument_list (identifier) (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)) right: (number_literal)) right: (number_literal))))))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) 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: Globals starting with '_' overlap smaller symbols at the same address */

ulong MASKED(long param_1)

{
  int iVar1;
  ulong uVar2;
  int *piVar3;
  long in_FS_OFFSET;
  double dVar4;
  double local_18;
  long local_10;
  
  local_10 = *(long *)(in_FS_OFFSET + 0x28);
  if (param_1 != 0) {
    iVar1 = FUN_0012d66b();
    if (iVar1 != 5) {
      uVar2 = FUN_0012d64a(param_1);
      goto LAB_00112de4;
    }
  }
  piVar3 = (int *)FUN_0014ac79(0);
  if ((*piVar3 < 2) || (*(code **)(piVar3 + 0x22) == (code *)0x0)) {
    (**(code **)(piVar3 + 0x1e))(piVar3,&local_18);
    dVar4 = (local_18 - _DAT_001f39c8) * _DAT_001f39d0;
    if (DAT_001f39d8 <= dVar4) {
      uVar2 = (long)(dVar4 - DAT_001f39d8) ^ 0x8000000000000000;
    }
    else {
      uVar2 = (ulong)dVar4;
    }
  }
  else {
    (**(code **)(piVar3 + 0x22))(piVar3,&local_18);
    uVar2 = (long)local_18 / 1000 - 0x3118a36940;
  }
LAB_00112de4:
  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {
    return uVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

