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

tm_conflict * localtime_rz(timezone_t tz,time_t *t,tm_conflict *tm)

{
  int iVar1;
  bool bVar2;
  _Bool _Var3;
  timezone_t tz_00;
  tm *ptVar4;
  int *piVar5;
  int iVar6;
  
  if (tz == (timezone_t)0x0) {
    ptVar4 = gmtime_r(t,(tm *)tm);
    return (tm_conflict *)ptVar4;
  }
  tz_00 = set_tz(tz);
  if (tz_00 == (timezone_t)0x0) {
    return (tm_conflict *)0x0;
  }
  ptVar4 = localtime_r(t,(tm *)tm);
  if ((ptVar4 == (tm *)0x0) || (_Var3 = save_abbr(tz,tm), !_Var3)) {
    if (tz_00 == (timezone_t)0x1) {
      return (tm_conflict *)0x0;
    }
    bVar2 = false;
  }
  else {
    if (tz_00 == (timezone_t)0x1) {
      return tm;
    }
    bVar2 = true;
  }
  piVar5 = __errno_location();
  iVar1 = *piVar5;
  if (tz_00->tz_is_set == '\0') {
    iVar6 = unsetenv("TZ");
  }
  else {
    iVar6 = setenv("TZ",&tz_00->field_0x5,1);
  }
  if (iVar6 == 0) {
    tzset();
    tzfree(tz_00);
    *piVar5 = iVar1;
    if (!bVar2) {
      return (tm_conflict *)0x0;
    }
    return tm;
  }
  iVar1 = *piVar5;
  tzfree(tz_00);
  *piVar5 = iVar1;
  return (tm_conflict *)0x0;
}



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

tm * FUN_0002c0b0(int param_1,time_t *param_2,tm *param_3)

{
  int iVar1;
  bool bVar2;
  char cVar3;
  int iVar4;
  tm *ptVar5;
  int *piVar6;
  int iVar7;
  
  if (param_1 == 0) {
    ptVar5 = gmtime_r(param_2,param_3);
    return ptVar5;
  }
  iVar4 = FUN_0002bfc0();
  if (iVar4 == 0) {
    return (tm *)0x0;
  }
  ptVar5 = localtime_r(param_2,param_3);
  if ((ptVar5 == (tm *)0x0) || (cVar3 = FUN_0002be20(), cVar3 == '\0')) {
    if (iVar4 == 1) {
      return (tm *)0x0;
    }
    bVar2 = false;
  }
  else {
    if (iVar4 == 1) {
      return param_3;
    }
    bVar2 = true;
  }
  piVar6 = __errno_location();
  iVar1 = *piVar6;
  if (*(char *)(iVar4 + 4) == '\0') {
    iVar7 = unsetenv("TZ");
  }
  else {
    iVar7 = setenv("TZ",(char *)(iVar4 + 5),1);
  }
  if (iVar7 == 0) {
    tzset();
    FUN_0002bf80(iVar4);
    *piVar6 = iVar1;
    if (!bVar2) {
      return (tm *)0x0;
    }
    return param_3;
  }
  iVar1 = *piVar6;
  FUN_0002bf80(iVar4);
  *piVar6 = iVar1;
  return (tm *)0x0;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000142a0
ADD EBX,0x10f47
SUB ESP,0x1c
MOV EDI,dword ptr [ESP + 0x30]
TEST EDI,EDI
JZ 0x0002c1c8
MOV EAX,EDI
CALL 0x0002bfc0
MOV ESI,EAX
TEST EAX,EAX
JZ 0x0002c178
SUB ESP,0x8
PUSH dword ptr [ESP + 0x40]
PUSH dword ptr [ESP + 0x40]
CALL 0x00012798
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0002c120
MOV EDX,dword ptr [ESP + 0x38]
MOV EAX,EDI
CALL 0x0002be20
TEST AL,AL
JZ 0x0002c120
CMP ESI,0x1
JZ 0x0002c1a3
MOV dword ptr [ESP + 0xc],0x1
JMP 0x0002c12d
CMP ESI,0x1
JZ 0x0002c178
MOV dword ptr [ESP + 0xc],0x0
CALL 0x000124a0
CMP byte ptr [ESI + 0x4],0x0
MOV EDI,EAX
MOV EBP,dword ptr [EAX]
JZ 0x0002c1b0
SUB ESP,0x4
LEA EAX,[ESI + 0x5]
PUSH 0x1
PUSH EAX
LEA EAX,[EBX + 0xffff2c93]
PUSH EAX
CALL 0x00012430
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0002c188
SUB ESP,0xc
MOV EBP,dword ptr [EDI]
PUSH ESI
CALL 0x0002bf80
ADD ESP,0x10
MOV dword ptr [EDI],EBP
XOR EAX,EAX
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
ADD ESP,0x1c
XOR EAX,EAX
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x000122b0
SUB ESP,0xc
PUSH ESI
CALL 0x0002bf80
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0xc]
MOV dword ptr [EDI],EBP
TEST EAX,EAX
JZ 0x0002c178
MOV EAX,dword ptr [ESP + 0x38]
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
LEA EAX,[EBX + 0xffff2c93]
PUSH EAX
CALL 0x00012050
ADD ESP,0x10
JMP 0x0002c154
SUB ESP,0x8
PUSH dword ptr [ESP + 0x40]
PUSH dword ptr [ESP + 0x40]
CALL 0x000127b0
ADD ESP,0x10
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\ntm * FUN_0002c0b0(int param_1,time_t *param_2,tm *param_3)\n\n{\n  int iVar1;\n  bool bVar2;\n  char cVar3;\n  int iVar4;\n  tm *ptVar5;\n  int *piVar6;\n  int iVar7;\n  \n  if (param_1 == 0) {\n    ptVar5 = gmtime_r(param_2,param_3);\n    return ptVar5;\n  }\n  iVar4 = FUN_0002bfc0();\n  if (iVar4 == 0) {\n    return (tm *)0x0;\n  }\n  ptVar5 = localtime_r(param_2,param_3);\n  if ((ptVar5 == (tm *)0x0) || (cVar3 = FUN_0002be20(), cVar3 == '\0')) {\n    if (iVar4 == 1) {\n      return (tm *)0x0;\n    }\n    bVar2 = false;\n  }\n  else {\n    if (iVar4 == 1) {\n      return param_3;\n    }\n    bVar2 = true;\n  }\n  piVar6 = __errno_location();\n  iVar1 = *piVar6;\n  if (*(char *)(iVar4 + 4) == '\0') {\n    iVar7 = unsetenv("TZ");\n  }\n  else {\n    iVar7 = setenv("TZ",(char *)(iVar4 + 5),1);\n  }\n  if (iVar7 == 0) {\n    tzset();\n    FUN_0002bf80(iVar4);\n    *piVar6 = iVar1;\n    if (!bVar2) {\n      return (tm *)0x0;\n    }\n    return param_3;\n  }\n  iVar1 = *piVar6;\n  FUN_0002bf80(iVar4);\n  *piVar6 = iVar1;\n  return (tm *)0x0;\n}\n\n" comment (function_definition "tm * FUN_0002c0b0(int param_1,time_t *param_2,tm *param_3)\n\n{\n  int iVar1;\n  bool bVar2;\n  char cVar3;\n  int iVar4;\n  tm *ptVar5;\n  int *piVar6;\n  int iVar7;\n  \n  if (param_1 == 0) {\n    ptVar5 = gmtime_r(param_2,param_3);\n    return ptVar5;\n  }\n  iVar4 = FUN_0002bfc0();\n  if (iVar4 == 0) {\n    return (tm *)0x0;\n  }\n  ptVar5 = localtime_r(param_2,param_3);\n  if ((ptVar5 == (tm *)0x0) || (cVar3 = FUN_0002be20(), cVar3 == '\0')) {\n    if (iVar4 == 1) {\n      return (tm *)0x0;\n    }\n    bVar2 = false;\n  }\n  else {\n    if (iVar4 == 1) {\n      return param_3;\n    }\n    bVar2 = true;\n  }\n  piVar6 = __errno_location();\n  iVar1 = *piVar6;\n  if (*(char *)(iVar4 + 4) == '\0') {\n    iVar7 = unsetenv("TZ");\n  }\n  else {\n    iVar7 = setenv("TZ",(char *)(iVar4 + 5),1);\n  }\n  if (iVar7 == 0) {\n    tzset();\n    FUN_0002bf80(iVar4);\n    *piVar6 = iVar1;\n    if (!bVar2) {\n      return (tm *)0x0;\n    }\n    return param_3;\n  }\n  iVar1 = *piVar6;\n  FUN_0002bf80(iVar4);\n  *piVar6 = iVar1;\n  return (tm *)0x0;\n}" type_identifier (pointer_declarator "* FUN_0002c0b0(int param_1,time_t *param_2,tm *param_3)" * (function_declarator "FUN_0002c0b0(int param_1,time_t *param_2,tm *param_3)" identifier (parameter_list "(int param_1,time_t *param_2,tm *param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "time_t *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "tm *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  bool bVar2;\n  char cVar3;\n  int iVar4;\n  tm *ptVar5;\n  int *piVar6;\n  int iVar7;\n  \n  if (param_1 == 0) {\n    ptVar5 = gmtime_r(param_2,param_3);\n    return ptVar5;\n  }\n  iVar4 = FUN_0002bfc0();\n  if (iVar4 == 0) {\n    return (tm *)0x0;\n  }\n  ptVar5 = localtime_r(param_2,param_3);\n  if ((ptVar5 == (tm *)0x0) || (cVar3 = FUN_0002be20(), cVar3 == '\0')) {\n    if (iVar4 == 1) {\n      return (tm *)0x0;\n    }\n    bVar2 = false;\n  }\n  else {\n    if (iVar4 == 1) {\n      return param_3;\n    }\n    bVar2 = true;\n  }\n  piVar6 = __errno_location();\n  iVar1 = *piVar6;\n  if (*(char *)(iVar4 + 4) == '\0') {\n    iVar7 = unsetenv("TZ");\n  }\n  else {\n    iVar7 = setenv("TZ",(char *)(iVar4 + 5),1);\n  }\n  if (iVar7 == 0) {\n    tzset();\n    FUN_0002bf80(iVar4);\n    *piVar6 = iVar1;\n    if (!bVar2) {\n      return (tm *)0x0;\n    }\n    return param_3;\n  }\n  iVar1 = *piVar6;\n  FUN_0002bf80(iVar4);\n  *piVar6 = iVar1;\n  return (tm *)0x0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "bool bVar2;" primitive_type identifier ;) (declaration "char cVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "tm *ptVar5;" type_identifier (pointer_declarator "*ptVar5" * identifier) ;) (declaration "int *piVar6;" primitive_type (pointer_declarator "*piVar6" * identifier) ;) (declaration "int iVar7;" primitive_type identifier ;) (if_statement "if (param_1 == 0) {\n    ptVar5 = gmtime_r(param_2,param_3);\n    return ptVar5;\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    ptVar5 = gmtime_r(param_2,param_3);\n    return ptVar5;\n  }" { (expression_statement "ptVar5 = gmtime_r(param_2,param_3);" (assignment_expression "ptVar5 = gmtime_r(param_2,param_3)" identifier = (call_expression "gmtime_r(param_2,param_3)" identifier (argument_list "(param_2,param_3)" ( identifier , identifier )))) ;) (return_statement "return ptVar5;" return identifier ;) })) (expression_statement "iVar4 = FUN_0002bfc0();" (assignment_expression "iVar4 = FUN_0002bfc0()" identifier = (call_expression "FUN_0002bfc0()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar4 == 0) {\n    return (tm *)0x0;\n  }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n    return (tm *)0x0;\n  }" { (return_statement "return (tm *)0x0;" return (cast_expression "(tm *)0x0" ( (type_descriptor "tm *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "ptVar5 = localtime_r(param_2,param_3);" (assignment_expression "ptVar5 = localtime_r(param_2,param_3)" identifier = (call_expression "localtime_r(param_2,param_3)" identifier (argument_list "(param_2,param_3)" ( identifier , identifier )))) ;) (if_statement "if ((ptVar5 == (tm *)0x0) || (cVar3 = FUN_0002be20(), cVar3 == '\0')) {\n    if (iVar4 == 1) {\n      return (tm *)0x0;\n    }\n    bVar2 = false;\n  }\n  else {\n    if (iVar4 == 1) {\n      return param_3;\n    }\n    bVar2 = true;\n  }" if (parenthesized_expression "((ptVar5 == (tm *)0x0) || (cVar3 = FUN_0002be20(), cVar3 == '\0'))" ( (binary_expression "(ptVar5 == (tm *)0x0) || (cVar3 = FUN_0002be20(), cVar3 == '\0')" (parenthesized_expression "(ptVar5 == (tm *)0x0)" ( (binary_expression "ptVar5 == (tm *)0x0" identifier == (cast_expression "(tm *)0x0" ( (type_descriptor "tm *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(cVar3 = FUN_0002be20(), cVar3 == '\0')" ( (comma_expression "cVar3 = FUN_0002be20(), cVar3 == '\0'" (assignment_expression "cVar3 = FUN_0002be20()" identifier = (call_expression "FUN_0002be20()" identifier (argument_list "()" ( )))) , (binary_expression "cVar3 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence '))) ))) )) (compound_statement "{\n    if (iVar4 == 1) {\n      return (tm *)0x0;\n    }\n    bVar2 = false;\n  }" { (if_statement "if (iVar4 == 1) {\n      return (tm *)0x0;\n    }" if (parenthesized_expression "(iVar4 == 1)" ( (binary_expression "iVar4 == 1" identifier == number_literal) )) (compound_statement "{\n      return (tm *)0x0;\n    }" { (return_statement "return (tm *)0x0;" return (cast_expression "(tm *)0x0" ( (type_descriptor "tm *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) }) (else_clause "else {\n    if (iVar4 == 1) {\n      return param_3;\n    }\n    bVar2 = true;\n  }" else (compound_statement "{\n    if (iVar4 == 1) {\n      return param_3;\n    }\n    bVar2 = true;\n  }" { (if_statement "if (iVar4 == 1) {\n      return param_3;\n    }" if (parenthesized_expression "(iVar4 == 1)" ( (binary_expression "iVar4 == 1" identifier == number_literal) )) (compound_statement "{\n      return param_3;\n    }" { (return_statement "return param_3;" return identifier ;) })) (expression_statement "bVar2 = true;" (assignment_expression "bVar2 = true" identifier = true) ;) }))) (expression_statement "piVar6 = __errno_location();" (assignment_expression "piVar6 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar1 = *piVar6;" (assignment_expression "iVar1 = *piVar6" identifier = (pointer_expression "*piVar6" * identifier)) ;) (if_statement "if (*(char *)(iVar4 + 4) == '\0') {\n    iVar7 = unsetenv("TZ");\n  }\n  else {\n    iVar7 = setenv("TZ",(char *)(iVar4 + 5),1);\n  }" if (parenthesized_expression "(*(char *)(iVar4 + 4) == '\0')" ( (binary_expression "*(char *)(iVar4 + 4) == '\0'" (pointer_expression "*(char *)(iVar4 + 4)" * (cast_expression "(char *)(iVar4 + 4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 4)" ( (binary_expression "iVar4 + 4" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    iVar7 = unsetenv("TZ");\n  }" { (expression_statement "iVar7 = unsetenv("TZ");" (assignment_expression "iVar7 = unsetenv("TZ")" identifier = (call_expression "unsetenv("TZ")" identifier (argument_list "("TZ")" ( (string_literal ""TZ"" " string_content ") )))) ;) }) (else_clause "else {\n    iVar7 = setenv("TZ",(char *)(iVar4 + 5),1);\n  }" else (compound_statement "{\n    iVar7 = setenv("TZ",(char *)(iVar4 + 5),1);\n  }" { (expression_statement "iVar7 = setenv("TZ",(char *)(iVar4 + 5),1);" (assignment_expression "iVar7 = setenv("TZ",(char *)(iVar4 + 5),1)" identifier = (call_expression "setenv("TZ",(char *)(iVar4 + 5),1)" identifier (argument_list "("TZ",(char *)(iVar4 + 5),1)" ( (string_literal ""TZ"" " string_content ") , (cast_expression "(char *)(iVar4 + 5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 5)" ( (binary_expression "iVar4 + 5" identifier + number_literal) ))) , number_literal )))) ;) }))) (if_statement "if (iVar7 == 0) {\n    tzset();\n    FUN_0002bf80(iVar4);\n    *piVar6 = iVar1;\n    if (!bVar2) {\n      return (tm *)0x0;\n    }\n    return param_3;\n  }" if (parenthesized_expression "(iVar7 == 0)" ( (binary_expression "iVar7 == 0" identifier == number_literal) )) (compound_statement "{\n    tzset();\n    FUN_0002bf80(iVar4);\n    *piVar6 = iVar1;\n    if (!bVar2) {\n      return (tm *)0x0;\n    }\n    return param_3;\n  }" { (expression_statement "tzset();" (call_expression "tzset()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0002bf80(iVar4);" (call_expression "FUN_0002bf80(iVar4)" identifier (argument_list "(iVar4)" ( identifier ))) ;) (expression_statement "*piVar6 = iVar1;" (assignment_expression "*piVar6 = iVar1" (pointer_expression "*piVar6" * identifier) = identifier) ;) (if_statement "if (!bVar2) {\n      return (tm *)0x0;\n    }" if (parenthesized_expression "(!bVar2)" ( (unary_expression "!bVar2" ! identifier) )) (compound_statement "{\n      return (tm *)0x0;\n    }" { (return_statement "return (tm *)0x0;" return (cast_expression "(tm *)0x0" ( (type_descriptor "tm *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (return_statement "return param_3;" return identifier ;) })) (expression_statement "iVar1 = *piVar6;" (assignment_expression "iVar1 = *piVar6" identifier = (pointer_expression "*piVar6" * identifier)) ;) (expression_statement "FUN_0002bf80(iVar4);" (call_expression "FUN_0002bf80(iVar4)" identifier (argument_list "(iVar4)" ( identifier ))) ;) (expression_statement "*piVar6 = iVar1;" (assignment_expression "*piVar6 = iVar1" (pointer_expression "*piVar6" * identifier) = identifier) ;) (return_statement "return (tm *)0x0;" return (cast_expression "(tm *)0x0" ( (type_descriptor "tm *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\ntm_conflict * localtime_rz(timezone_t tz,time_t *t,tm_conflict *tm)\n\n{\n  int iVar1;\n  bool bVar2;\n  _Bool _Var3;\n  timezone_t tz_00;\n  tm *ptVar4;\n  int *piVar5;\n  int iVar6;\n  \n  if (tz == (timezone_t)0x0) {\n    ptVar4 = gmtime_r(t,(tm *)tm);\n    return (tm_conflict *)ptVar4;\n  }\n  tz_00 = set_tz(tz);\n  if (tz_00 == (timezone_t)0x0) {\n    return (tm_conflict *)0x0;\n  }\n  ptVar4 = localtime_r(t,(tm *)tm);\n  if ((ptVar4 == (tm *)0x0) || (_Var3 = save_abbr(tz,tm), !_Var3)) {\n    if (tz_00 == (timezone_t)0x1) {\n      return (tm_conflict *)0x0;\n    }\n    bVar2 = false;\n  }\n  else {\n    if (tz_00 == (timezone_t)0x1) {\n      return tm;\n    }\n    bVar2 = true;\n  }\n  piVar5 = __errno_location();\n  iVar1 = *piVar5;\n  if (tz_00->tz_is_set == '\0') {\n    iVar6 = unsetenv("TZ");\n  }\n  else {\n    iVar6 = setenv("TZ",&tz_00->field_0x5,1);\n  }\n  if (iVar6 == 0) {\n    tzset();\n    tzfree(tz_00);\n    *piVar5 = iVar1;\n    if (!bVar2) {\n      return (tm_conflict *)0x0;\n    }\n    return tm;\n  }\n  iVar1 = *piVar5;\n  tzfree(tz_00);\n  *piVar5 = iVar1;\n  return (tm_conflict *)0x0;\n}\n\n" comment comment (function_definition "tm_conflict * localtime_rz(timezone_t tz,time_t *t,tm_conflict *tm)\n\n{\n  int iVar1;\n  bool bVar2;\n  _Bool _Var3;\n  timezone_t tz_00;\n  tm *ptVar4;\n  int *piVar5;\n  int iVar6;\n  \n  if (tz == (timezone_t)0x0) {\n    ptVar4 = gmtime_r(t,(tm *)tm);\n    return (tm_conflict *)ptVar4;\n  }\n  tz_00 = set_tz(tz);\n  if (tz_00 == (timezone_t)0x0) {\n    return (tm_conflict *)0x0;\n  }\n  ptVar4 = localtime_r(t,(tm *)tm);\n  if ((ptVar4 == (tm *)0x0) || (_Var3 = save_abbr(tz,tm), !_Var3)) {\n    if (tz_00 == (timezone_t)0x1) {\n      return (tm_conflict *)0x0;\n    }\n    bVar2 = false;\n  }\n  else {\n    if (tz_00 == (timezone_t)0x1) {\n      return tm;\n    }\n    bVar2 = true;\n  }\n  piVar5 = __errno_location();\n  iVar1 = *piVar5;\n  if (tz_00->tz_is_set == '\0') {\n    iVar6 = unsetenv("TZ");\n  }\n  else {\n    iVar6 = setenv("TZ",&tz_00->field_0x5,1);\n  }\n  if (iVar6 == 0) {\n    tzset();\n    tzfree(tz_00);\n    *piVar5 = iVar1;\n    if (!bVar2) {\n      return (tm_conflict *)0x0;\n    }\n    return tm;\n  }\n  iVar1 = *piVar5;\n  tzfree(tz_00);\n  *piVar5 = iVar1;\n  return (tm_conflict *)0x0;\n}" type_identifier (pointer_declarator "* localtime_rz(timezone_t tz,time_t *t,tm_conflict *tm)" * (function_declarator "localtime_rz(timezone_t tz,time_t *t,tm_conflict *tm)" identifier (parameter_list "(timezone_t tz,time_t *t,tm_conflict *tm)" ( (parameter_declaration "timezone_t tz" type_identifier identifier) , (parameter_declaration "time_t *t" type_identifier (pointer_declarator "*t" * identifier)) , (parameter_declaration "tm_conflict *tm" type_identifier (pointer_declarator "*tm" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  bool bVar2;\n  _Bool _Var3;\n  timezone_t tz_00;\n  tm *ptVar4;\n  int *piVar5;\n  int iVar6;\n  \n  if (tz == (timezone_t)0x0) {\n    ptVar4 = gmtime_r(t,(tm *)tm);\n    return (tm_conflict *)ptVar4;\n  }\n  tz_00 = set_tz(tz);\n  if (tz_00 == (timezone_t)0x0) {\n    return (tm_conflict *)0x0;\n  }\n  ptVar4 = localtime_r(t,(tm *)tm);\n  if ((ptVar4 == (tm *)0x0) || (_Var3 = save_abbr(tz,tm), !_Var3)) {\n    if (tz_00 == (timezone_t)0x1) {\n      return (tm_conflict *)0x0;\n    }\n    bVar2 = false;\n  }\n  else {\n    if (tz_00 == (timezone_t)0x1) {\n      return tm;\n    }\n    bVar2 = true;\n  }\n  piVar5 = __errno_location();\n  iVar1 = *piVar5;\n  if (tz_00->tz_is_set == '\0') {\n    iVar6 = unsetenv("TZ");\n  }\n  else {\n    iVar6 = setenv("TZ",&tz_00->field_0x5,1);\n  }\n  if (iVar6 == 0) {\n    tzset();\n    tzfree(tz_00);\n    *piVar5 = iVar1;\n    if (!bVar2) {\n      return (tm_conflict *)0x0;\n    }\n    return tm;\n  }\n  iVar1 = *piVar5;\n  tzfree(tz_00);\n  *piVar5 = iVar1;\n  return (tm_conflict *)0x0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "bool bVar2;" primitive_type identifier ;) (declaration "_Bool _Var3;" type_identifier identifier ;) (declaration "timezone_t tz_00;" type_identifier identifier ;) (declaration "tm *ptVar4;" type_identifier (pointer_declarator "*ptVar4" * identifier) ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (if_statement "if (tz == (timezone_t)0x0) {\n    ptVar4 = gmtime_r(t,(tm *)tm);\n    return (tm_conflict *)ptVar4;\n  }" if (parenthesized_expression "(tz == (timezone_t)0x0)" ( (binary_expression "tz == (timezone_t)0x0" identifier == (cast_expression "(timezone_t)0x0" ( (type_descriptor "timezone_t" type_identifier) ) number_literal)) )) (compound_statement "{\n    ptVar4 = gmtime_r(t,(tm *)tm);\n    return (tm_conflict *)ptVar4;\n  }" { (expression_statement "ptVar4 = gmtime_r(t,(tm *)tm);" (assignment_expression "ptVar4 = gmtime_r(t,(tm *)tm)" identifier = (call_expression "gmtime_r(t,(tm *)tm)" identifier (argument_list "(t,(tm *)tm)" ( identifier , (cast_expression "(tm *)tm" ( (type_descriptor "tm *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (return_statement "return (tm_conflict *)ptVar4;" return (cast_expression "(tm_conflict *)ptVar4" ( (type_descriptor "tm_conflict *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ;) })) (expression_statement "tz_00 = set_tz(tz);" (assignment_expression "tz_00 = set_tz(tz)" identifier = (call_expression "set_tz(tz)" identifier (argument_list "(tz)" ( identifier )))) ;) (if_statement "if (tz_00 == (timezone_t)0x0) {\n    return (tm_conflict *)0x0;\n  }" if (parenthesized_expression "(tz_00 == (timezone_t)0x0)" ( (binary_expression "tz_00 == (timezone_t)0x0" identifier == (cast_expression "(timezone_t)0x0" ( (type_descriptor "timezone_t" type_identifier) ) number_literal)) )) (compound_statement "{\n    return (tm_conflict *)0x0;\n  }" { (return_statement "return (tm_conflict *)0x0;" return (cast_expression "(tm_conflict *)0x0" ( (type_descriptor "tm_conflict *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "ptVar4 = localtime_r(t,(tm *)tm);" (assignment_expression "ptVar4 = localtime_r(t,(tm *)tm)" identifier = (call_expression "localtime_r(t,(tm *)tm)" identifier (argument_list "(t,(tm *)tm)" ( identifier , (cast_expression "(tm *)tm" ( (type_descriptor "tm *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (if_statement "if ((ptVar4 == (tm *)0x0) || (_Var3 = save_abbr(tz,tm), !_Var3)) {\n    if (tz_00 == (timezone_t)0x1) {\n      return (tm_conflict *)0x0;\n    }\n    bVar2 = false;\n  }\n  else {\n    if (tz_00 == (timezone_t)0x1) {\n      return tm;\n    }\n    bVar2 = true;\n  }" if (parenthesized_expression "((ptVar4 == (tm *)0x0) || (_Var3 = save_abbr(tz,tm), !_Var3))" ( (binary_expression "(ptVar4 == (tm *)0x0) || (_Var3 = save_abbr(tz,tm), !_Var3)" (parenthesized_expression "(ptVar4 == (tm *)0x0)" ( (binary_expression "ptVar4 == (tm *)0x0" identifier == (cast_expression "(tm *)0x0" ( (type_descriptor "tm *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(_Var3 = save_abbr(tz,tm), !_Var3)" ( (comma_expression "_Var3 = save_abbr(tz,tm), !_Var3" (assignment_expression "_Var3 = save_abbr(tz,tm)" identifier = (call_expression "save_abbr(tz,tm)" identifier (argument_list "(tz,tm)" ( identifier , identifier )))) , (unary_expression "!_Var3" ! identifier)) ))) )) (compound_statement "{\n    if (tz_00 == (timezone_t)0x1) {\n      return (tm_conflict *)0x0;\n    }\n    bVar2 = false;\n  }" { (if_statement "if (tz_00 == (timezone_t)0x1) {\n      return (tm_conflict *)0x0;\n    }" if (parenthesized_expression "(tz_00 == (timezone_t)0x1)" ( (binary_expression "tz_00 == (timezone_t)0x1" identifier == (cast_expression "(timezone_t)0x1" ( (type_descriptor "timezone_t" type_identifier) ) number_literal)) )) (compound_statement "{\n      return (tm_conflict *)0x0;\n    }" { (return_statement "return (tm_conflict *)0x0;" return (cast_expression "(tm_conflict *)0x0" ( (type_descriptor "tm_conflict *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) }) (else_clause "else {\n    if (tz_00 == (timezone_t)0x1) {\n      return tm;\n    }\n    bVar2 = true;\n  }" else (compound_statement "{\n    if (tz_00 == (timezone_t)0x1) {\n      return tm;\n    }\n    bVar2 = true;\n  }" { (if_statement "if (tz_00 == (timezone_t)0x1) {\n      return tm;\n    }" if (parenthesized_expression "(tz_00 == (timezone_t)0x1)" ( (binary_expression "tz_00 == (timezone_t)0x1" identifier == (cast_expression "(timezone_t)0x1" ( (type_descriptor "timezone_t" type_identifier) ) number_literal)) )) (compound_statement "{\n      return tm;\n    }" { (return_statement "return tm;" return identifier ;) })) (expression_statement "bVar2 = true;" (assignment_expression "bVar2 = true" identifier = true) ;) }))) (expression_statement "piVar5 = __errno_location();" (assignment_expression "piVar5 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar1 = *piVar5;" (assignment_expression "iVar1 = *piVar5" identifier = (pointer_expression "*piVar5" * identifier)) ;) (if_statement "if (tz_00->tz_is_set == '\0') {\n    iVar6 = unsetenv("TZ");\n  }\n  else {\n    iVar6 = setenv("TZ",&tz_00->field_0x5,1);\n  }" if (parenthesized_expression "(tz_00->tz_is_set == '\0')" ( (binary_expression "tz_00->tz_is_set == '\0'" (field_expression "tz_00->tz_is_set" identifier -> field_identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    iVar6 = unsetenv("TZ");\n  }" { (expression_statement "iVar6 = unsetenv("TZ");" (assignment_expression "iVar6 = unsetenv("TZ")" identifier = (call_expression "unsetenv("TZ")" identifier (argument_list "("TZ")" ( (string_literal ""TZ"" " string_content ") )))) ;) }) (else_clause "else {\n    iVar6 = setenv("TZ",&tz_00->field_0x5,1);\n  }" else (compound_statement "{\n    iVar6 = setenv("TZ",&tz_00->field_0x5,1);\n  }" { (expression_statement "iVar6 = setenv("TZ",&tz_00->field_0x5,1);" (assignment_expression "iVar6 = setenv("TZ",&tz_00->field_0x5,1)" identifier = (call_expression "setenv("TZ",&tz_00->field_0x5,1)" identifier (argument_list "("TZ",&tz_00->field_0x5,1)" ( (string_literal ""TZ"" " string_content ") , (pointer_expression "&tz_00->field_0x5" & (field_expression "tz_00->field_0x5" identifier -> field_identifier)) , number_literal )))) ;) }))) (if_statement "if (iVar6 == 0) {\n    tzset();\n    tzfree(tz_00);\n    *piVar5 = iVar1;\n    if (!bVar2) {\n      return (tm_conflict *)0x0;\n    }\n    return tm;\n  }" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (compound_statement "{\n    tzset();\n    tzfree(tz_00);\n    *piVar5 = iVar1;\n    if (!bVar2) {\n      return (tm_conflict *)0x0;\n    }\n    return tm;\n  }" { (expression_statement "tzset();" (call_expression "tzset()" identifier (argument_list "()" ( ))) ;) (expression_statement "tzfree(tz_00);" (call_expression "tzfree(tz_00)" identifier (argument_list "(tz_00)" ( identifier ))) ;) (expression_statement "*piVar5 = iVar1;" (assignment_expression "*piVar5 = iVar1" (pointer_expression "*piVar5" * identifier) = identifier) ;) (if_statement "if (!bVar2) {\n      return (tm_conflict *)0x0;\n    }" if (parenthesized_expression "(!bVar2)" ( (unary_expression "!bVar2" ! identifier) )) (compound_statement "{\n      return (tm_conflict *)0x0;\n    }" { (return_statement "return (tm_conflict *)0x0;" return (cast_expression "(tm_conflict *)0x0" ( (type_descriptor "tm_conflict *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (return_statement "return tm;" return identifier ;) })) (expression_statement "iVar1 = *piVar5;" (assignment_expression "iVar1 = *piVar5" identifier = (pointer_expression "*piVar5" * identifier)) ;) (expression_statement "tzfree(tz_00);" (call_expression "tzfree(tz_00)" identifier (argument_list "(tz_00)" ( identifier ))) ;) (expression_statement "*piVar5 = iVar1;" (assignment_expression "*piVar5 = iVar1" (pointer_expression "*piVar5" * identifier) = identifier) ;) (return_statement "return (tm_conflict *)0x0;" return (cast_expression "(tm_conflict *)0x0" ( (type_descriptor "tm_conflict *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "tm * FUN_0002c0b0(int param_1,time_t *param_2,tm *param_3)\n\n{\n  int iVar1;\n  bool bVar2;\n  char cVar3;\n  int iVar4;\n  tm *ptVar5;\n  int *piVar6;\n  int iVar7;\n  \n  if (param_1 == 0) {\n    ptVar5 = gmtime_r(param_2,param_3);\n    return ptVar5;\n  }\n  iVar4 = FUN_0002bfc0();\n  if (iVar4 == 0) {\n    return (tm *)0x0;\n  }\n  ptVar5 = localtime_r(param_2,param_3);\n  if ((ptVar5 == (tm *)0x0) || (cVar3 = FUN_0002be20(), cVar3 == '\0')) {\n    if (iVar4 == 1) {\n      return (tm *)0x0;\n    }\n    bVar2 = false;\n  }\n  else {\n    if (iVar4 == 1) {\n      return param_3;\n    }\n    bVar2 = true;\n  }\n  piVar6 = __errno_location();\n  iVar1 = *piVar6;\n  if (*(char *)(iVar4 + 4) == '\0') {\n    iVar7 = unsetenv("TZ");\n  }\n  else {\n    iVar7 = setenv("TZ",(char *)(iVar4 + 5),1);\n  }\n  if (iVar7 == 0) {\n    tzset();\n    FUN_0002bf80(iVar4);\n    *piVar6 = iVar1;\n    if (!bVar2) {\n      return (tm *)0x0;\n    }\n    return param_3;\n  }\n  iVar1 = *piVar6;\n  FUN_0002bf80(iVar4);\n  *piVar6 = iVar1;\n  return (tm *)0x0;\n}\n\n" (function_definition "tm * FUN_0002c0b0(int param_1,time_t *param_2,tm *param_3)\n\n{\n  int iVar1;\n  bool bVar2;\n  char cVar3;\n  int iVar4;\n  tm *ptVar5;\n  int *piVar6;\n  int iVar7;\n  \n  if (param_1 == 0) {\n    ptVar5 = gmtime_r(param_2,param_3);\n    return ptVar5;\n  }\n  iVar4 = FUN_0002bfc0();\n  if (iVar4 == 0) {\n    return (tm *)0x0;\n  }\n  ptVar5 = localtime_r(param_2,param_3);\n  if ((ptVar5 == (tm *)0x0) || (cVar3 = FUN_0002be20(), cVar3 == '\0')) {\n    if (iVar4 == 1) {\n      return (tm *)0x0;\n    }\n    bVar2 = false;\n  }\n  else {\n    if (iVar4 == 1) {\n      return param_3;\n    }\n    bVar2 = true;\n  }\n  piVar6 = __errno_location();\n  iVar1 = *piVar6;\n  if (*(char *)(iVar4 + 4) == '\0') {\n    iVar7 = unsetenv("TZ");\n  }\n  else {\n    iVar7 = setenv("TZ",(char *)(iVar4 + 5),1);\n  }\n  if (iVar7 == 0) {\n    tzset();\n    FUN_0002bf80(iVar4);\n    *piVar6 = iVar1;\n    if (!bVar2) {\n      return (tm *)0x0;\n    }\n    return param_3;\n  }\n  iVar1 = *piVar6;\n  FUN_0002bf80(iVar4);\n  *piVar6 = iVar1;\n  return (tm *)0x0;\n}" type_identifier (pointer_declarator "* FUN_0002c0b0(int param_1,time_t *param_2,tm *param_3)" * (function_declarator "FUN_0002c0b0(int param_1,time_t *param_2,tm *param_3)" identifier (parameter_list "(int param_1,time_t *param_2,tm *param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "time_t *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "tm *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  bool bVar2;\n  char cVar3;\n  int iVar4;\n  tm *ptVar5;\n  int *piVar6;\n  int iVar7;\n  \n  if (param_1 == 0) {\n    ptVar5 = gmtime_r(param_2,param_3);\n    return ptVar5;\n  }\n  iVar4 = FUN_0002bfc0();\n  if (iVar4 == 0) {\n    return (tm *)0x0;\n  }\n  ptVar5 = localtime_r(param_2,param_3);\n  if ((ptVar5 == (tm *)0x0) || (cVar3 = FUN_0002be20(), cVar3 == '\0')) {\n    if (iVar4 == 1) {\n      return (tm *)0x0;\n    }\n    bVar2 = false;\n  }\n  else {\n    if (iVar4 == 1) {\n      return param_3;\n    }\n    bVar2 = true;\n  }\n  piVar6 = __errno_location();\n  iVar1 = *piVar6;\n  if (*(char *)(iVar4 + 4) == '\0') {\n    iVar7 = unsetenv("TZ");\n  }\n  else {\n    iVar7 = setenv("TZ",(char *)(iVar4 + 5),1);\n  }\n  if (iVar7 == 0) {\n    tzset();\n    FUN_0002bf80(iVar4);\n    *piVar6 = iVar1;\n    if (!bVar2) {\n      return (tm *)0x0;\n    }\n    return param_3;\n  }\n  iVar1 = *piVar6;\n  FUN_0002bf80(iVar4);\n  *piVar6 = iVar1;\n  return (tm *)0x0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "bool bVar2;" primitive_type identifier ;) (declaration "char cVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "tm *ptVar5;" type_identifier (pointer_declarator "*ptVar5" * identifier) ;) (declaration "int *piVar6;" primitive_type (pointer_declarator "*piVar6" * identifier) ;) (declaration "int iVar7;" primitive_type identifier ;) (if_statement "if (param_1 == 0) {\n    ptVar5 = gmtime_r(param_2,param_3);\n    return ptVar5;\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    ptVar5 = gmtime_r(param_2,param_3);\n    return ptVar5;\n  }" { (expression_statement "ptVar5 = gmtime_r(param_2,param_3);" (assignment_expression "ptVar5 = gmtime_r(param_2,param_3)" identifier = (call_expression "gmtime_r(param_2,param_3)" identifier (argument_list "(param_2,param_3)" ( identifier , identifier )))) ;) (return_statement "return ptVar5;" return identifier ;) })) (expression_statement "iVar4 = FUN_0002bfc0();" (assignment_expression "iVar4 = FUN_0002bfc0()" identifier = (call_expression "FUN_0002bfc0()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar4 == 0) {\n    return (tm *)0x0;\n  }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n    return (tm *)0x0;\n  }" { (return_statement "return (tm *)0x0;" return (cast_expression "(tm *)0x0" ( (type_descriptor "tm *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "ptVar5 = localtime_r(param_2,param_3);" (assignment_expression "ptVar5 = localtime_r(param_2,param_3)" identifier = (call_expression "localtime_r(param_2,param_3)" identifier (argument_list "(param_2,param_3)" ( identifier , identifier )))) ;) (if_statement "if ((ptVar5 == (tm *)0x0) || (cVar3 = FUN_0002be20(), cVar3 == '\0')) {\n    if (iVar4 == 1) {\n      return (tm *)0x0;\n    }\n    bVar2 = false;\n  }\n  else {\n    if (iVar4 == 1) {\n      return param_3;\n    }\n    bVar2 = true;\n  }" if (parenthesized_expression "((ptVar5 == (tm *)0x0) || (cVar3 = FUN_0002be20(), cVar3 == '\0'))" ( (binary_expression "(ptVar5 == (tm *)0x0) || (cVar3 = FUN_0002be20(), cVar3 == '\0')" (parenthesized_expression "(ptVar5 == (tm *)0x0)" ( (binary_expression "ptVar5 == (tm *)0x0" identifier == (cast_expression "(tm *)0x0" ( (type_descriptor "tm *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(cVar3 = FUN_0002be20(), cVar3 == '\0')" ( (comma_expression "cVar3 = FUN_0002be20(), cVar3 == '\0'" (assignment_expression "cVar3 = FUN_0002be20()" identifier = (call_expression "FUN_0002be20()" identifier (argument_list "()" ( )))) , (binary_expression "cVar3 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence '))) ))) )) (compound_statement "{\n    if (iVar4 == 1) {\n      return (tm *)0x0;\n    }\n    bVar2 = false;\n  }" { (if_statement "if (iVar4 == 1) {\n      return (tm *)0x0;\n    }" if (parenthesized_expression "(iVar4 == 1)" ( (binary_expression "iVar4 == 1" identifier == number_literal) )) (compound_statement "{\n      return (tm *)0x0;\n    }" { (return_statement "return (tm *)0x0;" return (cast_expression "(tm *)0x0" ( (type_descriptor "tm *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) }) (else_clause "else {\n    if (iVar4 == 1) {\n      return param_3;\n    }\n    bVar2 = true;\n  }" else (compound_statement "{\n    if (iVar4 == 1) {\n      return param_3;\n    }\n    bVar2 = true;\n  }" { (if_statement "if (iVar4 == 1) {\n      return param_3;\n    }" if (parenthesized_expression "(iVar4 == 1)" ( (binary_expression "iVar4 == 1" identifier == number_literal) )) (compound_statement "{\n      return param_3;\n    }" { (return_statement "return param_3;" return identifier ;) })) (expression_statement "bVar2 = true;" (assignment_expression "bVar2 = true" identifier = true) ;) }))) (expression_statement "piVar6 = __errno_location();" (assignment_expression "piVar6 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar1 = *piVar6;" (assignment_expression "iVar1 = *piVar6" identifier = (pointer_expression "*piVar6" * identifier)) ;) (if_statement "if (*(char *)(iVar4 + 4) == '\0') {\n    iVar7 = unsetenv("TZ");\n  }\n  else {\n    iVar7 = setenv("TZ",(char *)(iVar4 + 5),1);\n  }" if (parenthesized_expression "(*(char *)(iVar4 + 4) == '\0')" ( (binary_expression "*(char *)(iVar4 + 4) == '\0'" (pointer_expression "*(char *)(iVar4 + 4)" * (cast_expression "(char *)(iVar4 + 4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 4)" ( (binary_expression "iVar4 + 4" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    iVar7 = unsetenv("TZ");\n  }" { (expression_statement "iVar7 = unsetenv("TZ");" (assignment_expression "iVar7 = unsetenv("TZ")" identifier = (call_expression "unsetenv("TZ")" identifier (argument_list "("TZ")" ( (string_literal ""TZ"" " string_content ") )))) ;) }) (else_clause "else {\n    iVar7 = setenv("TZ",(char *)(iVar4 + 5),1);\n  }" else (compound_statement "{\n    iVar7 = setenv("TZ",(char *)(iVar4 + 5),1);\n  }" { (expression_statement "iVar7 = setenv("TZ",(char *)(iVar4 + 5),1);" (assignment_expression "iVar7 = setenv("TZ",(char *)(iVar4 + 5),1)" identifier = (call_expression "setenv("TZ",(char *)(iVar4 + 5),1)" identifier (argument_list "("TZ",(char *)(iVar4 + 5),1)" ( (string_literal ""TZ"" " string_content ") , (cast_expression "(char *)(iVar4 + 5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 5)" ( (binary_expression "iVar4 + 5" identifier + number_literal) ))) , number_literal )))) ;) }))) (if_statement "if (iVar7 == 0) {\n    tzset();\n    FUN_0002bf80(iVar4);\n    *piVar6 = iVar1;\n    if (!bVar2) {\n      return (tm *)0x0;\n    }\n    return param_3;\n  }" if (parenthesized_expression "(iVar7 == 0)" ( (binary_expression "iVar7 == 0" identifier == number_literal) )) (compound_statement "{\n    tzset();\n    FUN_0002bf80(iVar4);\n    *piVar6 = iVar1;\n    if (!bVar2) {\n      return (tm *)0x0;\n    }\n    return param_3;\n  }" { (expression_statement "tzset();" (call_expression "tzset()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0002bf80(iVar4);" (call_expression "FUN_0002bf80(iVar4)" identifier (argument_list "(iVar4)" ( identifier ))) ;) (expression_statement "*piVar6 = iVar1;" (assignment_expression "*piVar6 = iVar1" (pointer_expression "*piVar6" * identifier) = identifier) ;) (if_statement "if (!bVar2) {\n      return (tm *)0x0;\n    }" if (parenthesized_expression "(!bVar2)" ( (unary_expression "!bVar2" ! identifier) )) (compound_statement "{\n      return (tm *)0x0;\n    }" { (return_statement "return (tm *)0x0;" return (cast_expression "(tm *)0x0" ( (type_descriptor "tm *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (return_statement "return param_3;" return identifier ;) })) (expression_statement "iVar1 = *piVar6;" (assignment_expression "iVar1 = *piVar6" identifier = (pointer_expression "*piVar6" * identifier)) ;) (expression_statement "FUN_0002bf80(iVar4);" (call_expression "FUN_0002bf80(iVar4)" identifier (argument_list "(iVar4)" ( identifier ))) ;) (expression_statement "*piVar6 = iVar1;" (assignment_expression "*piVar6 = iVar1" (pointer_expression "*piVar6" * identifier) = identifier) ;) (return_statement "return (tm *)0x0;" return (cast_expression "(tm *)0x0" ( (type_descriptor "tm *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) , (binary_expression IDENT == (char_literal ' escape_sequence '))) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })) (expression_statement (assignment_expression IDENT = BOOL) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = BOOL) ;) }))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) , LIT )))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (unary_expression ! IDENT) )) (compound_statement { (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })))
(function_definition "tm * FUN_0002c0b0(int param_1,time_t *param_2,tm *param_3)\n\n{\n  int iVar1;\n  bool bVar2;\n  char cVar3;\n  int iVar4;\n  tm *ptVar5;\n  int *piVar6;\n  int iVar7;\n  \n  if (param_1 == 0) {\n    ptVar5 = gmtime_r(param_2,param_3);\n    return ptVar5;\n  }\n  iVar4 = FUN_0002bfc0();\n  if (iVar4 == 0) {\n    return (tm *)0x0;\n  }\n  ptVar5 = localtime_r(param_2,param_3);\n  if ((ptVar5 == (tm *)0x0) || (cVar3 = FUN_0002be20(), cVar3 == '\0')) {\n    if (iVar4 == 1) {\n      return (tm *)0x0;\n    }\n    bVar2 = false;\n  }\n  else {\n    if (iVar4 == 1) {\n      return param_3;\n    }\n    bVar2 = true;\n  }\n  piVar6 = __errno_location();\n  iVar1 = *piVar6;\n  if (*(char *)(iVar4 + 4) == '\0') {\n    iVar7 = unsetenv("TZ");\n  }\n  else {\n    iVar7 = setenv("TZ",(char *)(iVar4 + 5),1);\n  }\n  if (iVar7 == 0) {\n    tzset();\n    FUN_0002bf80(iVar4);\n    *piVar6 = iVar1;\n    if (!bVar2) {\n      return (tm *)0x0;\n    }\n    return param_3;\n  }\n  iVar1 = *piVar6;\n  FUN_0002bf80(iVar4);\n  *piVar6 = iVar1;\n  return (tm *)0x0;\n}" (type_identifier "tm") (pointer_declarator "* FUN_0002c0b0(int param_1,time_t *param_2,tm *param_3)" (* "*") (function_declarator "FUN_0002c0b0(int param_1,time_t *param_2,tm *param_3)" (identifier "FUN_0002c0b0") (parameter_list "(int param_1,time_t *param_2,tm *param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "time_t *param_2" (type_identifier "time_t") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "tm *param_3" (type_identifier "tm") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")")))) (compound_statement "{\n  int iVar1;\n  bool bVar2;\n  char cVar3;\n  int iVar4;\n  tm *ptVar5;\n  int *piVar6;\n  int iVar7;\n  \n  if (param_1 == 0) {\n    ptVar5 = gmtime_r(param_2,param_3);\n    return ptVar5;\n  }\n  iVar4 = FUN_0002bfc0();\n  if (iVar4 == 0) {\n    return (tm *)0x0;\n  }\n  ptVar5 = localtime_r(param_2,param_3);\n  if ((ptVar5 == (tm *)0x0) || (cVar3 = FUN_0002be20(), cVar3 == '\0')) {\n    if (iVar4 == 1) {\n      return (tm *)0x0;\n    }\n    bVar2 = false;\n  }\n  else {\n    if (iVar4 == 1) {\n      return param_3;\n    }\n    bVar2 = true;\n  }\n  piVar6 = __errno_location();\n  iVar1 = *piVar6;\n  if (*(char *)(iVar4 + 4) == '\0') {\n    iVar7 = unsetenv("TZ");\n  }\n  else {\n    iVar7 = setenv("TZ",(char *)(iVar4 + 5),1);\n  }\n  if (iVar7 == 0) {\n    tzset();\n    FUN_0002bf80(iVar4);\n    *piVar6 = iVar1;\n    if (!bVar2) {\n      return (tm *)0x0;\n    }\n    return param_3;\n  }\n  iVar1 = *piVar6;\n  FUN_0002bf80(iVar4);\n  *piVar6 = iVar1;\n  return (tm *)0x0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "bool bVar2;" (primitive_type "bool") (identifier "bVar2") (; ";")) (declaration "char cVar3;" (primitive_type "char") (identifier "cVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "tm *ptVar5;" (type_identifier "tm") (pointer_declarator "*ptVar5" (* "*") (identifier "ptVar5")) (; ";")) (declaration "int *piVar6;" (primitive_type "int") (pointer_declarator "*piVar6" (* "*") (identifier "piVar6")) (; ";")) (declaration "int iVar7;" (primitive_type "int") (identifier "iVar7") (; ";")) (if_statement "if (param_1 == 0) {\n    ptVar5 = gmtime_r(param_2,param_3);\n    return ptVar5;\n  }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    ptVar5 = gmtime_r(param_2,param_3);\n    return ptVar5;\n  }" ({ "{") (expression_statement "ptVar5 = gmtime_r(param_2,param_3);" (assignment_expression "ptVar5 = gmtime_r(param_2,param_3)" (identifier "ptVar5") (= "=") (call_expression "gmtime_r(param_2,param_3)" (identifier "gmtime_r") (argument_list "(param_2,param_3)" (( "(") (identifier "param_2") (, ",") (identifier "param_3") () ")")))) (; ";")) (return_statement "return ptVar5;" (return "return") (identifier "ptVar5") (; ";")) (} "}"))) (expression_statement "iVar4 = FUN_0002bfc0();" (assignment_expression "iVar4 = FUN_0002bfc0()" (identifier "iVar4") (= "=") (call_expression "FUN_0002bfc0()" (identifier "FUN_0002bfc0") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar4 == 0) {\n    return (tm *)0x0;\n  }" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return (tm *)0x0;\n  }" ({ "{") (return_statement "return (tm *)0x0;" (return "return") (cast_expression "(tm *)0x0" (( "(") (type_descriptor "tm *" (type_identifier "tm") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))) (expression_statement "ptVar5 = localtime_r(param_2,param_3);" (assignment_expression "ptVar5 = localtime_r(param_2,param_3)" (identifier "ptVar5") (= "=") (call_expression "localtime_r(param_2,param_3)" (identifier "localtime_r") (argument_list "(param_2,param_3)" (( "(") (identifier "param_2") (, ",") (identifier "param_3") () ")")))) (; ";")) (if_statement "if ((ptVar5 == (tm *)0x0) || (cVar3 = FUN_0002be20(), cVar3 == '\0')) {\n    if (iVar4 == 1) {\n      return (tm *)0x0;\n    }\n    bVar2 = false;\n  }\n  else {\n    if (iVar4 == 1) {\n      return param_3;\n    }\n    bVar2 = true;\n  }" (if "if") (parenthesized_expression "((ptVar5 == (tm *)0x0) || (cVar3 = FUN_0002be20(), cVar3 == '\0'))" (( "(") (binary_expression "(ptVar5 == (tm *)0x0) || (cVar3 = FUN_0002be20(), cVar3 == '\0')" (parenthesized_expression "(ptVar5 == (tm *)0x0)" (( "(") (binary_expression "ptVar5 == (tm *)0x0" (identifier "ptVar5") (== "==") (cast_expression "(tm *)0x0" (( "(") (type_descriptor "tm *" (type_identifier "tm") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (|| "||") (parenthesized_expression "(cVar3 = FUN_0002be20(), cVar3 == '\0')" (( "(") (comma_expression "cVar3 = FUN_0002be20(), cVar3 == '\0'" (assignment_expression "cVar3 = FUN_0002be20()" (identifier "cVar3") (= "=") (call_expression "FUN_0002be20()" (identifier "FUN_0002be20") (argument_list "()" (( "(") () ")")))) (, ",") (binary_expression "cVar3 == '\0'" (identifier "cVar3") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'")))) () ")"))) () ")")) (compound_statement "{\n    if (iVar4 == 1) {\n      return (tm *)0x0;\n    }\n    bVar2 = false;\n  }" ({ "{") (if_statement "if (iVar4 == 1) {\n      return (tm *)0x0;\n    }" (if "if") (parenthesized_expression "(iVar4 == 1)" (( "(") (binary_expression "iVar4 == 1" (identifier "iVar4") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      return (tm *)0x0;\n    }" ({ "{") (return_statement "return (tm *)0x0;" (return "return") (cast_expression "(tm *)0x0" (( "(") (type_descriptor "tm *" (type_identifier "tm") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" (identifier "bVar2") (= "=") (false "false")) (; ";")) (} "}")) (else_clause "else {\n    if (iVar4 == 1) {\n      return param_3;\n    }\n    bVar2 = true;\n  }" (else "else") (compound_statement "{\n    if (iVar4 == 1) {\n      return param_3;\n    }\n    bVar2 = true;\n  }" ({ "{") (if_statement "if (iVar4 == 1) {\n      return param_3;\n    }" (if "if") (parenthesized_expression "(iVar4 == 1)" (( "(") (binary_expression "iVar4 == 1" (identifier "iVar4") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      return param_3;\n    }" ({ "{") (return_statement "return param_3;" (return "return") (identifier "param_3") (; ";")) (} "}"))) (expression_statement "bVar2 = true;" (assignment_expression "bVar2 = true" (identifier "bVar2") (= "=") (true "true")) (; ";")) (} "}")))) (expression_statement "piVar6 = __errno_location();" (assignment_expression "piVar6 = __errno_location()" (identifier "piVar6") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar1 = *piVar6;" (assignment_expression "iVar1 = *piVar6" (identifier "iVar1") (= "=") (pointer_expression "*piVar6" (* "*") (identifier "piVar6"))) (; ";")) (if_statement "if (*(char *)(iVar4 + 4) == '\0') {\n    iVar7 = unsetenv("TZ");\n  }\n  else {\n    iVar7 = setenv("TZ",(char *)(iVar4 + 5),1);\n  }" (if "if") (parenthesized_expression "(*(char *)(iVar4 + 4) == '\0')" (( "(") (binary_expression "*(char *)(iVar4 + 4) == '\0'" (pointer_expression "*(char *)(iVar4 + 4)" (* "*") (cast_expression "(char *)(iVar4 + 4)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 4)" (( "(") (binary_expression "iVar4 + 4" (identifier "iVar4") (+ "+") (number_literal "4")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    iVar7 = unsetenv("TZ");\n  }" ({ "{") (expression_statement "iVar7 = unsetenv("TZ");" (assignment_expression "iVar7 = unsetenv("TZ")" (identifier "iVar7") (= "=") (call_expression "unsetenv("TZ")" (identifier "unsetenv") (argument_list "("TZ")" (( "(") (string_literal ""TZ"" (" """) (string_content "TZ") (" """)) () ")")))) (; ";")) (} "}")) (else_clause "else {\n    iVar7 = setenv("TZ",(char *)(iVar4 + 5),1);\n  }" (else "else") (compound_statement "{\n    iVar7 = setenv("TZ",(char *)(iVar4 + 5),1);\n  }" ({ "{") (expression_statement "iVar7 = setenv("TZ",(char *)(iVar4 + 5),1);" (assignment_expression "iVar7 = setenv("TZ",(char *)(iVar4 + 5),1)" (identifier "iVar7") (= "=") (call_expression "setenv("TZ",(char *)(iVar4 + 5),1)" (identifier "setenv") (argument_list "("TZ",(char *)(iVar4 + 5),1)" (( "(") (string_literal ""TZ"" (" """) (string_content "TZ") (" """)) (, ",") (cast_expression "(char *)(iVar4 + 5)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 5)" (( "(") (binary_expression "iVar4 + 5" (identifier "iVar4") (+ "+") (number_literal "5")) () ")"))) (, ",") (number_literal "1") () ")")))) (; ";")) (} "}")))) (if_statement "if (iVar7 == 0) {\n    tzset();\n    FUN_0002bf80(iVar4);\n    *piVar6 = iVar1;\n    if (!bVar2) {\n      return (tm *)0x0;\n    }\n    return param_3;\n  }" (if "if") (parenthesized_expression "(iVar7 == 0)" (( "(") (binary_expression "iVar7 == 0" (identifier "iVar7") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    tzset();\n    FUN_0002bf80(iVar4);\n    *piVar6 = iVar1;\n    if (!bVar2) {\n      return (tm *)0x0;\n    }\n    return param_3;\n  }" ({ "{") (expression_statement "tzset();" (call_expression "tzset()" (identifier "tzset") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_0002bf80(iVar4);" (call_expression "FUN_0002bf80(iVar4)" (identifier "FUN_0002bf80") (argument_list "(iVar4)" (( "(") (identifier "iVar4") () ")"))) (; ";")) (expression_statement "*piVar6 = iVar1;" (assignment_expression "*piVar6 = iVar1" (pointer_expression "*piVar6" (* "*") (identifier "piVar6")) (= "=") (identifier "iVar1")) (; ";")) (if_statement "if (!bVar2) {\n      return (tm *)0x0;\n    }" (if "if") (parenthesized_expression "(!bVar2)" (( "(") (unary_expression "!bVar2" (! "!") (identifier "bVar2")) () ")")) (compound_statement "{\n      return (tm *)0x0;\n    }" ({ "{") (return_statement "return (tm *)0x0;" (return "return") (cast_expression "(tm *)0x0" (( "(") (type_descriptor "tm *" (type_identifier "tm") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))) (return_statement "return param_3;" (return "return") (identifier "param_3") (; ";")) (} "}"))) (expression_statement "iVar1 = *piVar6;" (assignment_expression "iVar1 = *piVar6" (identifier "iVar1") (= "=") (pointer_expression "*piVar6" (* "*") (identifier "piVar6"))) (; ";")) (expression_statement "FUN_0002bf80(iVar4);" (call_expression "FUN_0002bf80(iVar4)" (identifier "FUN_0002bf80") (argument_list "(iVar4)" (( "(") (identifier "iVar4") () ")"))) (; ";")) (expression_statement "*piVar6 = iVar1;" (assignment_expression "*piVar6 = iVar1" (pointer_expression "*piVar6" (* "*") (identifier "piVar6")) (= "=") (identifier "iVar1")) (; ";")) (return_statement "return (tm *)0x0;" (return "return") (cast_expression "(tm *)0x0" (( "(") (type_descriptor "tm *" (type_identifier "tm") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}")))

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

type_1 * function_1(type_2 var_1,type_3 *t,type_1 *type_5)

{
  int iVar1;
  bool bVar2;
  type_4 _Var3;
  type_2 var_4;
  type_5 *var_6;
  int *piVar5;
  int var_11;
  
  if (var_1 == (type_2)0x0) {
    var_6 = var_2(t,(type_5 *)type_5);
    return (type_1 *)var_6;
  }
  var_4 = var_3(var_1);
  if (var_4 == (type_2)0x0) {
    return (type_1 *)0x0;
  }
  var_6 = var_5(t,(type_5 *)type_5);
  if ((var_6 == (type_5 *)0x0) || (_Var3 = var_7(var_1,type_5), !_Var3)) {
    if (var_4 == (type_2)0x1) {
      return (type_1 *)0x0;
    }
    bVar2 = false;
  }
  else {
    if (var_4 == (type_2)0x1) {
      return type_5;
    }
    bVar2 = true;
  }
  piVar5 = var_8();
  iVar1 = *piVar5;
  if (var_4->tz_is_set == '\0') {
    var_11 = var_9("TZ");
  }
  else {
    var_11 = var_10("TZ",&var_4->field_0x5,1);
  }
  if (var_11 == 0) {
    var_12();
    var_13(var_4);
    *piVar5 = iVar1;
    if (!bVar2) {
      return (type_1 *)0x0;
    }
    return type_5;
  }
  iVar1 = *piVar5;
  var_13(var_4);
  *piVar5 = iVar1;
  return (type_1 *)0x0;
}


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

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

tm * MASKED(int param_1,time_t *param_2,tm *param_3)

{
  int iVar1;
  bool bVar2;
  char cVar3;
  int iVar4;
  tm *ptVar5;
  int *piVar6;
  int iVar7;
  
  if (param_1 == 0) {
    ptVar5 = gmtime_r(param_2,param_3);
    return ptVar5;
  }
  iVar4 = FUN_0002bfc0();
  if (iVar4 == 0) {
    return (tm *)0x0;
  }
  ptVar5 = localtime_r(param_2,param_3);
  if ((ptVar5 == (tm *)0x0) || (cVar3 = FUN_0002be20(), cVar3 == '\0')) {
    if (iVar4 == 1) {
      return (tm *)0x0;
    }
    bVar2 = false;
  }
  else {
    if (iVar4 == 1) {
      return param_3;
    }
    bVar2 = true;
  }
  piVar6 = __errno_location();
  iVar1 = *piVar6;
  if (*(char *)(iVar4 + 4) == '\0') {
    iVar7 = unsetenv("TZ");
  }
  else {
    iVar7 = setenv("TZ",(char *)(iVar4 + 5),1);
  }
  if (iVar7 == 0) {
    tzset();
    FUN_0002bf80(iVar4);
    *piVar6 = iVar1;
    if (!bVar2) {
      return (tm *)0x0;
    }
    return param_3;
  }
  iVar1 = *piVar6;
  FUN_0002bf80(iVar4);
  *piVar6 = iVar1;
  return (tm *)0x0;
}

