
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */

void set_default_lang(void)

{
  char *pcVar1;
  size_t sVar2;
  char *pcVar3;
  
  pcVar1 = get_string_value("LC_ALL");
  set_locale_var("LC_ALL",pcVar1);
  pcVar1 = get_string_value("LANG");
  if (lang != (char *)0x0) {
    free(lang);
  }
  if (pcVar1 == (char *)0x0) {
    pcVar3 = (char *)xmalloc(1);
    pcVar1 = lc_all;
    lang = pcVar3;
    *pcVar3 = '\0';
    if (pcVar1 != (char *)0x0) goto LAB_000a6062;
  }
  else {
    sVar2 = strlen(pcVar1);
    pcVar3 = (char *)xmalloc(sVar2 + 1);
    pcVar3 = strcpy(pcVar3,pcVar1);
    pcVar1 = lc_all;
    lang = pcVar3;
    if (lc_all != (char *)0x0) {
LAB_000a6062:
      if (*pcVar1 != '\0') {
        return;
      }
    }
    if (*pcVar3 != '\0') goto LAB_000a6075;
  }
  maybe_make_export_env();
  pcVar3 = lang;
  if (lang == (char *)0x0) {
    pcVar3 = "";
  }
LAB_000a6075:
  pcVar1 = setlocale(6,pcVar3);
  if (pcVar1 == (char *)0x0) {
    return;
  }
  reset_locale_vars();
  return;
}



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

void set_default_lang(void)

{
  undefined4 uVar1;
  char *pcVar2;
  size_t sVar3;
  char *pcVar4;
  
  uVar1 = get_string_value("LC_ALL");
  set_locale_var("LC_ALL",uVar1);
  pcVar2 = (char *)get_string_value(&DAT_00112d22);
  if (DAT_00179608 != (char *)0x0) {
    free(DAT_00179608);
  }
  if (pcVar2 == (char *)0x0) {
    pcVar4 = (char *)xmalloc(1);
    pcVar2 = DAT_0017960c;
    DAT_00179608 = pcVar4;
    *pcVar4 = '\0';
    if (pcVar2 != (char *)0x0) goto LAB_000a6062;
  }
  else {
    sVar3 = strlen(pcVar2);
    pcVar4 = (char *)xmalloc(sVar3 + 1);
    pcVar4 = strcpy(pcVar4,pcVar2);
    pcVar2 = DAT_0017960c;
    DAT_00179608 = pcVar4;
    if (DAT_0017960c != (char *)0x0) {
LAB_000a6062:
      if (*pcVar2 != '\0') {
        return;
      }
    }
    if (*pcVar4 != '\0') goto LAB_000a6075;
  }
  maybe_make_export_env();
  pcVar4 = DAT_00179608;
  if (DAT_00179608 == (char *)0x0) {
    pcVar4 = "";
  }
LAB_000a6075:
  pcVar2 = setlocale(6,pcVar4);
  if (pcVar2 == (char *)0x0) {
    return;
  }
  FUN_000a5070();
  return;
}


PUSH ESI
PUSH EBX
CALL 0x000312b0
ADD EBX,0xcc019
SUB ESP,0x10
LEA ESI,[EBX + 0xfffa0d27]
PUSH ESI
CALL 0x000569d0
POP EDX
POP ECX
PUSH EAX
PUSH ESI
CALL 0x000a57d0
LEA EAX,[EBX + 0xfffa0d22]
MOV dword ptr [ESP],EAX
CALL 0x000569d0
ADD ESP,0x10
MOV ESI,EAX
MOV EAX,dword ptr [EBX + 0x7608]
TEST EAX,EAX
JZ 0x000a602e
SUB ESP,0xc
PUSH EAX
CALL 0x0002e200
ADD ESP,0x10
TEST ESI,ESI
JZ 0x000a6098
SUB ESP,0xc
PUSH ESI
CALL 0x0002e760
ADD EAX,0x1
MOV dword ptr [ESP],EAX
CALL 0x000ad700
POP EDX
POP ECX
PUSH ESI
PUSH EAX
CALL 0x0002e580
MOV EDX,dword ptr [EBX + 0x760c]
ADD ESP,0x10
MOV dword ptr [EBX + 0x7608],EAX
TEST EDX,EDX
JZ 0x000a6070
CMP byte ptr [EDX],0x0
JZ 0x000a6070
ADD ESP,0x4
POP EBX
POP ESI
RET
CMP byte ptr [EAX],0x0
JZ 0x000a60b8
SUB ESP,0x8
PUSH EAX
PUSH 0x6
CALL 0x0002eaa0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000a6067
ADD ESP,0x4
POP EBX
POP ESI
JMP 0x000a5070
SUB ESP,0xc
PUSH 0x1
CALL 0x000ad700
MOV EDX,dword ptr [EBX + 0x760c]
ADD ESP,0x10
MOV dword ptr [EBX + 0x7608],EAX
MOV byte ptr [EAX],0x0
TEST EDX,EDX
JNZ 0x000a6062
CALL 0x0005b2f0
MOV EAX,dword ptr [EBX + 0x7608]
LEA EDX,[EBX + 0xfffb77bd]
TEST EAX,EAX
CMOVZ EAX,EDX
JMP 0x000a6075
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid set_default_lang(void)\n\n{\n  undefined4 uVar1;\n  char *pcVar2;\n  size_t sVar3;\n  char *pcVar4;\n  \n  uVar1 = get_string_value("LC_ALL");\n  set_locale_var("LC_ALL",uVar1);\n  pcVar2 = (char *)get_string_value(&DAT_00112d22);\n  if (DAT_00179608 != (char *)0x0) {\n    free(DAT_00179608);\n  }\n  if (pcVar2 == (char *)0x0) {\n    pcVar4 = (char *)xmalloc(1);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    *pcVar4 = '\0';\n    if (pcVar2 != (char *)0x0) goto LAB_000a6062;\n  }\n  else {\n    sVar3 = strlen(pcVar2);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    pcVar4 = strcpy(pcVar4,pcVar2);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    if (DAT_0017960c != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar2 != '\0') {\n        return;\n      }\n    }\n    if (*pcVar4 != '\0') goto LAB_000a6075;\n  }\n  maybe_make_export_env();\n  pcVar4 = DAT_00179608;\n  if (DAT_00179608 == (char *)0x0) {\n    pcVar4 = "";\n  }\nLAB_000a6075:\n  pcVar2 = setlocale(6,pcVar4);\n  if (pcVar2 == (char *)0x0) {\n    return;\n  }\n  FUN_000a5070();\n  return;\n}\n\n" comment (function_definition "void set_default_lang(void)\n\n{\n  undefined4 uVar1;\n  char *pcVar2;\n  size_t sVar3;\n  char *pcVar4;\n  \n  uVar1 = get_string_value("LC_ALL");\n  set_locale_var("LC_ALL",uVar1);\n  pcVar2 = (char *)get_string_value(&DAT_00112d22);\n  if (DAT_00179608 != (char *)0x0) {\n    free(DAT_00179608);\n  }\n  if (pcVar2 == (char *)0x0) {\n    pcVar4 = (char *)xmalloc(1);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    *pcVar4 = '\0';\n    if (pcVar2 != (char *)0x0) goto LAB_000a6062;\n  }\n  else {\n    sVar3 = strlen(pcVar2);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    pcVar4 = strcpy(pcVar4,pcVar2);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    if (DAT_0017960c != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar2 != '\0') {\n        return;\n      }\n    }\n    if (*pcVar4 != '\0') goto LAB_000a6075;\n  }\n  maybe_make_export_env();\n  pcVar4 = DAT_00179608;\n  if (DAT_00179608 == (char *)0x0) {\n    pcVar4 = "";\n  }\nLAB_000a6075:\n  pcVar2 = setlocale(6,pcVar4);\n  if (pcVar2 == (char *)0x0) {\n    return;\n  }\n  FUN_000a5070();\n  return;\n}" primitive_type (function_declarator "set_default_lang(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  undefined4 uVar1;\n  char *pcVar2;\n  size_t sVar3;\n  char *pcVar4;\n  \n  uVar1 = get_string_value("LC_ALL");\n  set_locale_var("LC_ALL",uVar1);\n  pcVar2 = (char *)get_string_value(&DAT_00112d22);\n  if (DAT_00179608 != (char *)0x0) {\n    free(DAT_00179608);\n  }\n  if (pcVar2 == (char *)0x0) {\n    pcVar4 = (char *)xmalloc(1);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    *pcVar4 = '\0';\n    if (pcVar2 != (char *)0x0) goto LAB_000a6062;\n  }\n  else {\n    sVar3 = strlen(pcVar2);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    pcVar4 = strcpy(pcVar4,pcVar2);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    if (DAT_0017960c != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar2 != '\0') {\n        return;\n      }\n    }\n    if (*pcVar4 != '\0') goto LAB_000a6075;\n  }\n  maybe_make_export_env();\n  pcVar4 = DAT_00179608;\n  if (DAT_00179608 == (char *)0x0) {\n    pcVar4 = "";\n  }\nLAB_000a6075:\n  pcVar2 = setlocale(6,pcVar4);\n  if (pcVar2 == (char *)0x0) {\n    return;\n  }\n  FUN_000a5070();\n  return;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (expression_statement "uVar1 = get_string_value("LC_ALL");" (assignment_expression "uVar1 = get_string_value("LC_ALL")" identifier = (call_expression "get_string_value("LC_ALL")" identifier (argument_list "("LC_ALL")" ( (string_literal ""LC_ALL"" " string_content ") )))) ;) (expression_statement "set_locale_var("LC_ALL",uVar1);" (call_expression "set_locale_var("LC_ALL",uVar1)" identifier (argument_list "("LC_ALL",uVar1)" ( (string_literal ""LC_ALL"" " string_content ") , identifier ))) ;) (expression_statement "pcVar2 = (char *)get_string_value(&DAT_00112d22);" (assignment_expression "pcVar2 = (char *)get_string_value(&DAT_00112d22)" identifier = (cast_expression "(char *)get_string_value(&DAT_00112d22)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "get_string_value(&DAT_00112d22)" identifier (argument_list "(&DAT_00112d22)" ( (pointer_expression "&DAT_00112d22" & identifier) ))))) ;) (if_statement "if (DAT_00179608 != (char *)0x0) {\n    free(DAT_00179608);\n  }" if (parenthesized_expression "(DAT_00179608 != (char *)0x0)" ( (binary_expression "DAT_00179608 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    free(DAT_00179608);\n  }" { (expression_statement "free(DAT_00179608);" (call_expression "free(DAT_00179608)" identifier (argument_list "(DAT_00179608)" ( identifier ))) ;) })) (if_statement "if (pcVar2 == (char *)0x0) {\n    pcVar4 = (char *)xmalloc(1);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    *pcVar4 = '\0';\n    if (pcVar2 != (char *)0x0) goto LAB_000a6062;\n  }\n  else {\n    sVar3 = strlen(pcVar2);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    pcVar4 = strcpy(pcVar4,pcVar2);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    if (DAT_0017960c != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar2 != '\0') {\n        return;\n      }\n    }\n    if (*pcVar4 != '\0') goto LAB_000a6075;\n  }" if (parenthesized_expression "(pcVar2 == (char *)0x0)" ( (binary_expression "pcVar2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar4 = (char *)xmalloc(1);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    *pcVar4 = '\0';\n    if (pcVar2 != (char *)0x0) goto LAB_000a6062;\n  }" { (expression_statement "pcVar4 = (char *)xmalloc(1);" (assignment_expression "pcVar4 = (char *)xmalloc(1)" identifier = (cast_expression "(char *)xmalloc(1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(1)" identifier (argument_list "(1)" ( number_literal ))))) ;) (expression_statement "pcVar2 = DAT_0017960c;" (assignment_expression "pcVar2 = DAT_0017960c" identifier = identifier) ;) (expression_statement "DAT_00179608 = pcVar4;" (assignment_expression "DAT_00179608 = pcVar4" identifier = identifier) ;) (expression_statement "*pcVar4 = '\0';" (assignment_expression "*pcVar4 = '\0'" (pointer_expression "*pcVar4" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (if_statement "if (pcVar2 != (char *)0x0) goto LAB_000a6062;" if (parenthesized_expression "(pcVar2 != (char *)0x0)" ( (binary_expression "pcVar2 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_000a6062;" goto statement_identifier ;)) }) (else_clause "else {\n    sVar3 = strlen(pcVar2);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    pcVar4 = strcpy(pcVar4,pcVar2);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    if (DAT_0017960c != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar2 != '\0') {\n        return;\n      }\n    }\n    if (*pcVar4 != '\0') goto LAB_000a6075;\n  }" else (compound_statement "{\n    sVar3 = strlen(pcVar2);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    pcVar4 = strcpy(pcVar4,pcVar2);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    if (DAT_0017960c != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar2 != '\0') {\n        return;\n      }\n    }\n    if (*pcVar4 != '\0') goto LAB_000a6075;\n  }" { (expression_statement "sVar3 = strlen(pcVar2);" (assignment_expression "sVar3 = strlen(pcVar2)" identifier = (call_expression "strlen(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier )))) ;) (expression_statement "pcVar4 = (char *)xmalloc(sVar3 + 1);" (assignment_expression "pcVar4 = (char *)xmalloc(sVar3 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar3 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar3 + 1)" identifier (argument_list "(sVar3 + 1)" ( (binary_expression "sVar3 + 1" identifier + number_literal) ))))) ;) (expression_statement "pcVar4 = strcpy(pcVar4,pcVar2);" (assignment_expression "pcVar4 = strcpy(pcVar4,pcVar2)" identifier = (call_expression "strcpy(pcVar4,pcVar2)" identifier (argument_list "(pcVar4,pcVar2)" ( identifier , identifier )))) ;) (expression_statement "pcVar2 = DAT_0017960c;" (assignment_expression "pcVar2 = DAT_0017960c" identifier = identifier) ;) (expression_statement "DAT_00179608 = pcVar4;" (assignment_expression "DAT_00179608 = pcVar4" identifier = identifier) ;) (if_statement "if (DAT_0017960c != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar2 != '\0') {\n        return;\n      }\n    }" if (parenthesized_expression "(DAT_0017960c != (char *)0x0)" ( (binary_expression "DAT_0017960c != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_000a6062:\n      if (*pcVar2 != '\0') {\n        return;\n      }\n    }" { (labeled_statement "LAB_000a6062:\n      if (*pcVar2 != '\0') {\n        return;\n      }" statement_identifier : (if_statement "if (*pcVar2 != '\0') {\n        return;\n      }" if (parenthesized_expression "(*pcVar2 != '\0')" ( (binary_expression "*pcVar2 != '\0'" (pointer_expression "*pcVar2" * identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) }))) })) (if_statement "if (*pcVar4 != '\0') goto LAB_000a6075;" if (parenthesized_expression "(*pcVar4 != '\0')" ( (binary_expression "*pcVar4 != '\0'" (pointer_expression "*pcVar4" * identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_000a6075;" goto statement_identifier ;)) }))) (expression_statement "maybe_make_export_env();" (call_expression "maybe_make_export_env()" identifier (argument_list "()" ( ))) ;) (expression_statement "pcVar4 = DAT_00179608;" (assignment_expression "pcVar4 = DAT_00179608" identifier = identifier) ;) (if_statement "if (DAT_00179608 == (char *)0x0) {\n    pcVar4 = "";\n  }" if (parenthesized_expression "(DAT_00179608 == (char *)0x0)" ( (binary_expression "DAT_00179608 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar4 = "";\n  }" { (expression_statement "pcVar4 = "";" (assignment_expression "pcVar4 = """ identifier = (string_literal """" " ")) ;) })) (labeled_statement "LAB_000a6075:\n  pcVar2 = setlocale(6,pcVar4);" statement_identifier : (expression_statement "pcVar2 = setlocale(6,pcVar4);" (assignment_expression "pcVar2 = setlocale(6,pcVar4)" identifier = (call_expression "setlocale(6,pcVar4)" identifier (argument_list "(6,pcVar4)" ( number_literal , identifier )))) ;)) (if_statement "if (pcVar2 == (char *)0x0) {\n    return;\n  }" if (parenthesized_expression "(pcVar2 == (char *)0x0)" ( (binary_expression "pcVar2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_000a5070();" (call_expression "FUN_000a5070()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention -- yet parameter storage is locked */\n\nvoid set_default_lang(void)\n\n{\n  char *pcVar1;\n  size_t sVar2;\n  char *pcVar3;\n  \n  pcVar1 = get_string_value("LC_ALL");\n  set_locale_var("LC_ALL",pcVar1);\n  pcVar1 = get_string_value("LANG");\n  if (lang != (char *)0x0) {\n    free(lang);\n  }\n  if (pcVar1 == (char *)0x0) {\n    pcVar3 = (char *)xmalloc(1);\n    pcVar1 = lc_all;\n    lang = pcVar3;\n    *pcVar3 = '\0';\n    if (pcVar1 != (char *)0x0) goto LAB_000a6062;\n  }\n  else {\n    sVar2 = strlen(pcVar1);\n    pcVar3 = (char *)xmalloc(sVar2 + 1);\n    pcVar3 = strcpy(pcVar3,pcVar1);\n    pcVar1 = lc_all;\n    lang = pcVar3;\n    if (lc_all != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar1 != '\0') {\n        return;\n      }\n    }\n    if (*pcVar3 != '\0') goto LAB_000a6075;\n  }\n  maybe_make_export_env();\n  pcVar3 = lang;\n  if (lang == (char *)0x0) {\n    pcVar3 = "";\n  }\nLAB_000a6075:\n  pcVar1 = setlocale(6,pcVar3);\n  if (pcVar1 == (char *)0x0) {\n    return;\n  }\n  reset_locale_vars();\n  return;\n}\n\n" comment comment (function_definition "void set_default_lang(void)\n\n{\n  char *pcVar1;\n  size_t sVar2;\n  char *pcVar3;\n  \n  pcVar1 = get_string_value("LC_ALL");\n  set_locale_var("LC_ALL",pcVar1);\n  pcVar1 = get_string_value("LANG");\n  if (lang != (char *)0x0) {\n    free(lang);\n  }\n  if (pcVar1 == (char *)0x0) {\n    pcVar3 = (char *)xmalloc(1);\n    pcVar1 = lc_all;\n    lang = pcVar3;\n    *pcVar3 = '\0';\n    if (pcVar1 != (char *)0x0) goto LAB_000a6062;\n  }\n  else {\n    sVar2 = strlen(pcVar1);\n    pcVar3 = (char *)xmalloc(sVar2 + 1);\n    pcVar3 = strcpy(pcVar3,pcVar1);\n    pcVar1 = lc_all;\n    lang = pcVar3;\n    if (lc_all != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar1 != '\0') {\n        return;\n      }\n    }\n    if (*pcVar3 != '\0') goto LAB_000a6075;\n  }\n  maybe_make_export_env();\n  pcVar3 = lang;\n  if (lang == (char *)0x0) {\n    pcVar3 = "";\n  }\nLAB_000a6075:\n  pcVar1 = setlocale(6,pcVar3);\n  if (pcVar1 == (char *)0x0) {\n    return;\n  }\n  reset_locale_vars();\n  return;\n}" primitive_type (function_declarator "set_default_lang(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  char *pcVar1;\n  size_t sVar2;\n  char *pcVar3;\n  \n  pcVar1 = get_string_value("LC_ALL");\n  set_locale_var("LC_ALL",pcVar1);\n  pcVar1 = get_string_value("LANG");\n  if (lang != (char *)0x0) {\n    free(lang);\n  }\n  if (pcVar1 == (char *)0x0) {\n    pcVar3 = (char *)xmalloc(1);\n    pcVar1 = lc_all;\n    lang = pcVar3;\n    *pcVar3 = '\0';\n    if (pcVar1 != (char *)0x0) goto LAB_000a6062;\n  }\n  else {\n    sVar2 = strlen(pcVar1);\n    pcVar3 = (char *)xmalloc(sVar2 + 1);\n    pcVar3 = strcpy(pcVar3,pcVar1);\n    pcVar1 = lc_all;\n    lang = pcVar3;\n    if (lc_all != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar1 != '\0') {\n        return;\n      }\n    }\n    if (*pcVar3 != '\0') goto LAB_000a6075;\n  }\n  maybe_make_export_env();\n  pcVar3 = lang;\n  if (lang == (char *)0x0) {\n    pcVar3 = "";\n  }\nLAB_000a6075:\n  pcVar1 = setlocale(6,pcVar3);\n  if (pcVar1 == (char *)0x0) {\n    return;\n  }\n  reset_locale_vars();\n  return;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (expression_statement "pcVar1 = get_string_value("LC_ALL");" (assignment_expression "pcVar1 = get_string_value("LC_ALL")" identifier = (call_expression "get_string_value("LC_ALL")" identifier (argument_list "("LC_ALL")" ( (string_literal ""LC_ALL"" " string_content ") )))) ;) (expression_statement "set_locale_var("LC_ALL",pcVar1);" (call_expression "set_locale_var("LC_ALL",pcVar1)" identifier (argument_list "("LC_ALL",pcVar1)" ( (string_literal ""LC_ALL"" " string_content ") , identifier ))) ;) (expression_statement "pcVar1 = get_string_value("LANG");" (assignment_expression "pcVar1 = get_string_value("LANG")" identifier = (call_expression "get_string_value("LANG")" identifier (argument_list "("LANG")" ( (string_literal ""LANG"" " string_content ") )))) ;) (if_statement "if (lang != (char *)0x0) {\n    free(lang);\n  }" if (parenthesized_expression "(lang != (char *)0x0)" ( (binary_expression "lang != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    free(lang);\n  }" { (expression_statement "free(lang);" (call_expression "free(lang)" identifier (argument_list "(lang)" ( identifier ))) ;) })) (if_statement "if (pcVar1 == (char *)0x0) {\n    pcVar3 = (char *)xmalloc(1);\n    pcVar1 = lc_all;\n    lang = pcVar3;\n    *pcVar3 = '\0';\n    if (pcVar1 != (char *)0x0) goto LAB_000a6062;\n  }\n  else {\n    sVar2 = strlen(pcVar1);\n    pcVar3 = (char *)xmalloc(sVar2 + 1);\n    pcVar3 = strcpy(pcVar3,pcVar1);\n    pcVar1 = lc_all;\n    lang = pcVar3;\n    if (lc_all != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar1 != '\0') {\n        return;\n      }\n    }\n    if (*pcVar3 != '\0') goto LAB_000a6075;\n  }" if (parenthesized_expression "(pcVar1 == (char *)0x0)" ( (binary_expression "pcVar1 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar3 = (char *)xmalloc(1);\n    pcVar1 = lc_all;\n    lang = pcVar3;\n    *pcVar3 = '\0';\n    if (pcVar1 != (char *)0x0) goto LAB_000a6062;\n  }" { (expression_statement "pcVar3 = (char *)xmalloc(1);" (assignment_expression "pcVar3 = (char *)xmalloc(1)" identifier = (cast_expression "(char *)xmalloc(1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(1)" identifier (argument_list "(1)" ( number_literal ))))) ;) (expression_statement "pcVar1 = lc_all;" (assignment_expression "pcVar1 = lc_all" identifier = identifier) ;) (expression_statement "lang = pcVar3;" (assignment_expression "lang = pcVar3" identifier = identifier) ;) (expression_statement "*pcVar3 = '\0';" (assignment_expression "*pcVar3 = '\0'" (pointer_expression "*pcVar3" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (if_statement "if (pcVar1 != (char *)0x0) goto LAB_000a6062;" if (parenthesized_expression "(pcVar1 != (char *)0x0)" ( (binary_expression "pcVar1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_000a6062;" goto statement_identifier ;)) }) (else_clause "else {\n    sVar2 = strlen(pcVar1);\n    pcVar3 = (char *)xmalloc(sVar2 + 1);\n    pcVar3 = strcpy(pcVar3,pcVar1);\n    pcVar1 = lc_all;\n    lang = pcVar3;\n    if (lc_all != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar1 != '\0') {\n        return;\n      }\n    }\n    if (*pcVar3 != '\0') goto LAB_000a6075;\n  }" else (compound_statement "{\n    sVar2 = strlen(pcVar1);\n    pcVar3 = (char *)xmalloc(sVar2 + 1);\n    pcVar3 = strcpy(pcVar3,pcVar1);\n    pcVar1 = lc_all;\n    lang = pcVar3;\n    if (lc_all != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar1 != '\0') {\n        return;\n      }\n    }\n    if (*pcVar3 != '\0') goto LAB_000a6075;\n  }" { (expression_statement "sVar2 = strlen(pcVar1);" (assignment_expression "sVar2 = strlen(pcVar1)" identifier = (call_expression "strlen(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier )))) ;) (expression_statement "pcVar3 = (char *)xmalloc(sVar2 + 1);" (assignment_expression "pcVar3 = (char *)xmalloc(sVar2 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar2 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar2 + 1)" identifier (argument_list "(sVar2 + 1)" ( (binary_expression "sVar2 + 1" identifier + number_literal) ))))) ;) (expression_statement "pcVar3 = strcpy(pcVar3,pcVar1);" (assignment_expression "pcVar3 = strcpy(pcVar3,pcVar1)" identifier = (call_expression "strcpy(pcVar3,pcVar1)" identifier (argument_list "(pcVar3,pcVar1)" ( identifier , identifier )))) ;) (expression_statement "pcVar1 = lc_all;" (assignment_expression "pcVar1 = lc_all" identifier = identifier) ;) (expression_statement "lang = pcVar3;" (assignment_expression "lang = pcVar3" identifier = identifier) ;) (if_statement "if (lc_all != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar1 != '\0') {\n        return;\n      }\n    }" if (parenthesized_expression "(lc_all != (char *)0x0)" ( (binary_expression "lc_all != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_000a6062:\n      if (*pcVar1 != '\0') {\n        return;\n      }\n    }" { (labeled_statement "LAB_000a6062:\n      if (*pcVar1 != '\0') {\n        return;\n      }" statement_identifier : (if_statement "if (*pcVar1 != '\0') {\n        return;\n      }" if (parenthesized_expression "(*pcVar1 != '\0')" ( (binary_expression "*pcVar1 != '\0'" (pointer_expression "*pcVar1" * identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) }))) })) (if_statement "if (*pcVar3 != '\0') goto LAB_000a6075;" if (parenthesized_expression "(*pcVar3 != '\0')" ( (binary_expression "*pcVar3 != '\0'" (pointer_expression "*pcVar3" * identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_000a6075;" goto statement_identifier ;)) }))) (expression_statement "maybe_make_export_env();" (call_expression "maybe_make_export_env()" identifier (argument_list "()" ( ))) ;) (expression_statement "pcVar3 = lang;" (assignment_expression "pcVar3 = lang" identifier = identifier) ;) (if_statement "if (lang == (char *)0x0) {\n    pcVar3 = "";\n  }" if (parenthesized_expression "(lang == (char *)0x0)" ( (binary_expression "lang == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar3 = "";\n  }" { (expression_statement "pcVar3 = "";" (assignment_expression "pcVar3 = """ identifier = (string_literal """" " ")) ;) })) (labeled_statement "LAB_000a6075:\n  pcVar1 = setlocale(6,pcVar3);" statement_identifier : (expression_statement "pcVar1 = setlocale(6,pcVar3);" (assignment_expression "pcVar1 = setlocale(6,pcVar3)" identifier = (call_expression "setlocale(6,pcVar3)" identifier (argument_list "(6,pcVar3)" ( number_literal , identifier )))) ;)) (if_statement "if (pcVar1 == (char *)0x0) {\n    return;\n  }" if (parenthesized_expression "(pcVar1 == (char *)0x0)" ( (binary_expression "pcVar1 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "reset_locale_vars();" (call_expression "reset_locale_vars()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void set_default_lang(void)\n\n{\n  undefined4 uVar1;\n  char *pcVar2;\n  size_t sVar3;\n  char *pcVar4;\n  \n  uVar1 = get_string_value("LC_ALL");\n  set_locale_var("LC_ALL",uVar1);\n  pcVar2 = (char *)get_string_value(&DAT_00112d22);\n  if (DAT_00179608 != (char *)0x0) {\n    free(DAT_00179608);\n  }\n  if (pcVar2 == (char *)0x0) {\n    pcVar4 = (char *)xmalloc(1);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    *pcVar4 = '\0';\n    if (pcVar2 != (char *)0x0) goto LAB_000a6062;\n  }\n  else {\n    sVar3 = strlen(pcVar2);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    pcVar4 = strcpy(pcVar4,pcVar2);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    if (DAT_0017960c != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar2 != '\0') {\n        return;\n      }\n    }\n    if (*pcVar4 != '\0') goto LAB_000a6075;\n  }\n  maybe_make_export_env();\n  pcVar4 = DAT_00179608;\n  if (DAT_00179608 == (char *)0x0) {\n    pcVar4 = "";\n  }\nLAB_000a6075:\n  pcVar2 = setlocale(6,pcVar4);\n  if (pcVar2 == (char *)0x0) {\n    return;\n  }\n  FUN_000a5070();\n  return;\n}\n\n" (function_definition "void set_default_lang(void)\n\n{\n  undefined4 uVar1;\n  char *pcVar2;\n  size_t sVar3;\n  char *pcVar4;\n  \n  uVar1 = get_string_value("LC_ALL");\n  set_locale_var("LC_ALL",uVar1);\n  pcVar2 = (char *)get_string_value(&DAT_00112d22);\n  if (DAT_00179608 != (char *)0x0) {\n    free(DAT_00179608);\n  }\n  if (pcVar2 == (char *)0x0) {\n    pcVar4 = (char *)xmalloc(1);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    *pcVar4 = '\0';\n    if (pcVar2 != (char *)0x0) goto LAB_000a6062;\n  }\n  else {\n    sVar3 = strlen(pcVar2);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    pcVar4 = strcpy(pcVar4,pcVar2);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    if (DAT_0017960c != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar2 != '\0') {\n        return;\n      }\n    }\n    if (*pcVar4 != '\0') goto LAB_000a6075;\n  }\n  maybe_make_export_env();\n  pcVar4 = DAT_00179608;\n  if (DAT_00179608 == (char *)0x0) {\n    pcVar4 = "";\n  }\nLAB_000a6075:\n  pcVar2 = setlocale(6,pcVar4);\n  if (pcVar2 == (char *)0x0) {\n    return;\n  }\n  FUN_000a5070();\n  return;\n}" primitive_type (function_declarator "set_default_lang(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  undefined4 uVar1;\n  char *pcVar2;\n  size_t sVar3;\n  char *pcVar4;\n  \n  uVar1 = get_string_value("LC_ALL");\n  set_locale_var("LC_ALL",uVar1);\n  pcVar2 = (char *)get_string_value(&DAT_00112d22);\n  if (DAT_00179608 != (char *)0x0) {\n    free(DAT_00179608);\n  }\n  if (pcVar2 == (char *)0x0) {\n    pcVar4 = (char *)xmalloc(1);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    *pcVar4 = '\0';\n    if (pcVar2 != (char *)0x0) goto LAB_000a6062;\n  }\n  else {\n    sVar3 = strlen(pcVar2);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    pcVar4 = strcpy(pcVar4,pcVar2);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    if (DAT_0017960c != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar2 != '\0') {\n        return;\n      }\n    }\n    if (*pcVar4 != '\0') goto LAB_000a6075;\n  }\n  maybe_make_export_env();\n  pcVar4 = DAT_00179608;\n  if (DAT_00179608 == (char *)0x0) {\n    pcVar4 = "";\n  }\nLAB_000a6075:\n  pcVar2 = setlocale(6,pcVar4);\n  if (pcVar2 == (char *)0x0) {\n    return;\n  }\n  FUN_000a5070();\n  return;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (expression_statement "uVar1 = get_string_value("LC_ALL");" (assignment_expression "uVar1 = get_string_value("LC_ALL")" identifier = (call_expression "get_string_value("LC_ALL")" identifier (argument_list "("LC_ALL")" ( (string_literal ""LC_ALL"" " string_content ") )))) ;) (expression_statement "set_locale_var("LC_ALL",uVar1);" (call_expression "set_locale_var("LC_ALL",uVar1)" identifier (argument_list "("LC_ALL",uVar1)" ( (string_literal ""LC_ALL"" " string_content ") , identifier ))) ;) (expression_statement "pcVar2 = (char *)get_string_value(&DAT_00112d22);" (assignment_expression "pcVar2 = (char *)get_string_value(&DAT_00112d22)" identifier = (cast_expression "(char *)get_string_value(&DAT_00112d22)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "get_string_value(&DAT_00112d22)" identifier (argument_list "(&DAT_00112d22)" ( (pointer_expression "&DAT_00112d22" & identifier) ))))) ;) (if_statement "if (DAT_00179608 != (char *)0x0) {\n    free(DAT_00179608);\n  }" if (parenthesized_expression "(DAT_00179608 != (char *)0x0)" ( (binary_expression "DAT_00179608 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    free(DAT_00179608);\n  }" { (expression_statement "free(DAT_00179608);" (call_expression "free(DAT_00179608)" identifier (argument_list "(DAT_00179608)" ( identifier ))) ;) })) (if_statement "if (pcVar2 == (char *)0x0) {\n    pcVar4 = (char *)xmalloc(1);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    *pcVar4 = '\0';\n    if (pcVar2 != (char *)0x0) goto LAB_000a6062;\n  }\n  else {\n    sVar3 = strlen(pcVar2);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    pcVar4 = strcpy(pcVar4,pcVar2);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    if (DAT_0017960c != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar2 != '\0') {\n        return;\n      }\n    }\n    if (*pcVar4 != '\0') goto LAB_000a6075;\n  }" if (parenthesized_expression "(pcVar2 == (char *)0x0)" ( (binary_expression "pcVar2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar4 = (char *)xmalloc(1);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    *pcVar4 = '\0';\n    if (pcVar2 != (char *)0x0) goto LAB_000a6062;\n  }" { (expression_statement "pcVar4 = (char *)xmalloc(1);" (assignment_expression "pcVar4 = (char *)xmalloc(1)" identifier = (cast_expression "(char *)xmalloc(1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(1)" identifier (argument_list "(1)" ( number_literal ))))) ;) (expression_statement "pcVar2 = DAT_0017960c;" (assignment_expression "pcVar2 = DAT_0017960c" identifier = identifier) ;) (expression_statement "DAT_00179608 = pcVar4;" (assignment_expression "DAT_00179608 = pcVar4" identifier = identifier) ;) (expression_statement "*pcVar4 = '\0';" (assignment_expression "*pcVar4 = '\0'" (pointer_expression "*pcVar4" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (if_statement "if (pcVar2 != (char *)0x0) goto LAB_000a6062;" if (parenthesized_expression "(pcVar2 != (char *)0x0)" ( (binary_expression "pcVar2 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_000a6062;" goto statement_identifier ;)) }) (else_clause "else {\n    sVar3 = strlen(pcVar2);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    pcVar4 = strcpy(pcVar4,pcVar2);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    if (DAT_0017960c != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar2 != '\0') {\n        return;\n      }\n    }\n    if (*pcVar4 != '\0') goto LAB_000a6075;\n  }" else (compound_statement "{\n    sVar3 = strlen(pcVar2);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    pcVar4 = strcpy(pcVar4,pcVar2);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    if (DAT_0017960c != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar2 != '\0') {\n        return;\n      }\n    }\n    if (*pcVar4 != '\0') goto LAB_000a6075;\n  }" { (expression_statement "sVar3 = strlen(pcVar2);" (assignment_expression "sVar3 = strlen(pcVar2)" identifier = (call_expression "strlen(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier )))) ;) (expression_statement "pcVar4 = (char *)xmalloc(sVar3 + 1);" (assignment_expression "pcVar4 = (char *)xmalloc(sVar3 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar3 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar3 + 1)" identifier (argument_list "(sVar3 + 1)" ( (binary_expression "sVar3 + 1" identifier + number_literal) ))))) ;) (expression_statement "pcVar4 = strcpy(pcVar4,pcVar2);" (assignment_expression "pcVar4 = strcpy(pcVar4,pcVar2)" identifier = (call_expression "strcpy(pcVar4,pcVar2)" identifier (argument_list "(pcVar4,pcVar2)" ( identifier , identifier )))) ;) (expression_statement "pcVar2 = DAT_0017960c;" (assignment_expression "pcVar2 = DAT_0017960c" identifier = identifier) ;) (expression_statement "DAT_00179608 = pcVar4;" (assignment_expression "DAT_00179608 = pcVar4" identifier = identifier) ;) (if_statement "if (DAT_0017960c != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar2 != '\0') {\n        return;\n      }\n    }" if (parenthesized_expression "(DAT_0017960c != (char *)0x0)" ( (binary_expression "DAT_0017960c != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_000a6062:\n      if (*pcVar2 != '\0') {\n        return;\n      }\n    }" { (labeled_statement "LAB_000a6062:\n      if (*pcVar2 != '\0') {\n        return;\n      }" statement_identifier : (if_statement "if (*pcVar2 != '\0') {\n        return;\n      }" if (parenthesized_expression "(*pcVar2 != '\0')" ( (binary_expression "*pcVar2 != '\0'" (pointer_expression "*pcVar2" * identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) }))) })) (if_statement "if (*pcVar4 != '\0') goto LAB_000a6075;" if (parenthesized_expression "(*pcVar4 != '\0')" ( (binary_expression "*pcVar4 != '\0'" (pointer_expression "*pcVar4" * identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_000a6075;" goto statement_identifier ;)) }))) (expression_statement "maybe_make_export_env();" (call_expression "maybe_make_export_env()" identifier (argument_list "()" ( ))) ;) (expression_statement "pcVar4 = DAT_00179608;" (assignment_expression "pcVar4 = DAT_00179608" identifier = identifier) ;) (if_statement "if (DAT_00179608 == (char *)0x0) {\n    pcVar4 = "";\n  }" if (parenthesized_expression "(DAT_00179608 == (char *)0x0)" ( (binary_expression "DAT_00179608 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar4 = "";\n  }" { (expression_statement "pcVar4 = "";" (assignment_expression "pcVar4 = """ identifier = (string_literal """" " ")) ;) })) (labeled_statement "LAB_000a6075:\n  pcVar2 = setlocale(6,pcVar4);" statement_identifier : (expression_statement "pcVar2 = setlocale(6,pcVar4);" (assignment_expression "pcVar2 = setlocale(6,pcVar4)" identifier = (call_expression "setlocale(6,pcVar4)" identifier (argument_list "(6,pcVar4)" ( number_literal , identifier )))) ;)) (if_statement "if (pcVar2 == (char *)0x0) {\n    return;\n  }" if (parenthesized_expression "(pcVar2 == (char *)0x0)" ( (binary_expression "pcVar2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_000a5070();" (call_expression "FUN_000a5070()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") )))) ;) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (pointer_expression & IDENT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (char_literal ' escape_sequence ')) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (goto_statement goto statement_identifier ;)) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != (char_literal ' escape_sequence ')) )) (compound_statement { (return_statement return ;) }))) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != (char_literal ' escape_sequence ')) )) (goto_statement goto statement_identifier ;)) }))) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (string_literal " ")) ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , IDENT )))) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return ;) })))
(function_definition "void set_default_lang(void)\n\n{\n  undefined4 uVar1;\n  char *pcVar2;\n  size_t sVar3;\n  char *pcVar4;\n  \n  uVar1 = get_string_value("LC_ALL");\n  set_locale_var("LC_ALL",uVar1);\n  pcVar2 = (char *)get_string_value(&DAT_00112d22);\n  if (DAT_00179608 != (char *)0x0) {\n    free(DAT_00179608);\n  }\n  if (pcVar2 == (char *)0x0) {\n    pcVar4 = (char *)xmalloc(1);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    *pcVar4 = '\0';\n    if (pcVar2 != (char *)0x0) goto LAB_000a6062;\n  }\n  else {\n    sVar3 = strlen(pcVar2);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    pcVar4 = strcpy(pcVar4,pcVar2);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    if (DAT_0017960c != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar2 != '\0') {\n        return;\n      }\n    }\n    if (*pcVar4 != '\0') goto LAB_000a6075;\n  }\n  maybe_make_export_env();\n  pcVar4 = DAT_00179608;\n  if (DAT_00179608 == (char *)0x0) {\n    pcVar4 = "";\n  }\nLAB_000a6075:\n  pcVar2 = setlocale(6,pcVar4);\n  if (pcVar2 == (char *)0x0) {\n    return;\n  }\n  FUN_000a5070();\n  return;\n}" (primitive_type "void") (function_declarator "set_default_lang(void)" (identifier "set_default_lang") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  char *pcVar2;\n  size_t sVar3;\n  char *pcVar4;\n  \n  uVar1 = get_string_value("LC_ALL");\n  set_locale_var("LC_ALL",uVar1);\n  pcVar2 = (char *)get_string_value(&DAT_00112d22);\n  if (DAT_00179608 != (char *)0x0) {\n    free(DAT_00179608);\n  }\n  if (pcVar2 == (char *)0x0) {\n    pcVar4 = (char *)xmalloc(1);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    *pcVar4 = '\0';\n    if (pcVar2 != (char *)0x0) goto LAB_000a6062;\n  }\n  else {\n    sVar3 = strlen(pcVar2);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    pcVar4 = strcpy(pcVar4,pcVar2);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    if (DAT_0017960c != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar2 != '\0') {\n        return;\n      }\n    }\n    if (*pcVar4 != '\0') goto LAB_000a6075;\n  }\n  maybe_make_export_env();\n  pcVar4 = DAT_00179608;\n  if (DAT_00179608 == (char *)0x0) {\n    pcVar4 = "";\n  }\nLAB_000a6075:\n  pcVar2 = setlocale(6,pcVar4);\n  if (pcVar2 == (char *)0x0) {\n    return;\n  }\n  FUN_000a5070();\n  return;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "char *pcVar2;" (primitive_type "char") (pointer_declarator "*pcVar2" (* "*") (identifier "pcVar2")) (; ";")) (declaration "size_t sVar3;" (primitive_type "size_t") (identifier "sVar3") (; ";")) (declaration "char *pcVar4;" (primitive_type "char") (pointer_declarator "*pcVar4" (* "*") (identifier "pcVar4")) (; ";")) (expression_statement "uVar1 = get_string_value("LC_ALL");" (assignment_expression "uVar1 = get_string_value("LC_ALL")" (identifier "uVar1") (= "=") (call_expression "get_string_value("LC_ALL")" (identifier "get_string_value") (argument_list "("LC_ALL")" (( "(") (string_literal ""LC_ALL"" (" """) (string_content "LC_ALL") (" """)) () ")")))) (; ";")) (expression_statement "set_locale_var("LC_ALL",uVar1);" (call_expression "set_locale_var("LC_ALL",uVar1)" (identifier "set_locale_var") (argument_list "("LC_ALL",uVar1)" (( "(") (string_literal ""LC_ALL"" (" """) (string_content "LC_ALL") (" """)) (, ",") (identifier "uVar1") () ")"))) (; ";")) (expression_statement "pcVar2 = (char *)get_string_value(&DAT_00112d22);" (assignment_expression "pcVar2 = (char *)get_string_value(&DAT_00112d22)" (identifier "pcVar2") (= "=") (cast_expression "(char *)get_string_value(&DAT_00112d22)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "get_string_value(&DAT_00112d22)" (identifier "get_string_value") (argument_list "(&DAT_00112d22)" (( "(") (pointer_expression "&DAT_00112d22" (& "&") (identifier "DAT_00112d22")) () ")"))))) (; ";")) (if_statement "if (DAT_00179608 != (char *)0x0) {\n    free(DAT_00179608);\n  }" (if "if") (parenthesized_expression "(DAT_00179608 != (char *)0x0)" (( "(") (binary_expression "DAT_00179608 != (char *)0x0" (identifier "DAT_00179608") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    free(DAT_00179608);\n  }" ({ "{") (expression_statement "free(DAT_00179608);" (call_expression "free(DAT_00179608)" (identifier "free") (argument_list "(DAT_00179608)" (( "(") (identifier "DAT_00179608") () ")"))) (; ";")) (} "}"))) (if_statement "if (pcVar2 == (char *)0x0) {\n    pcVar4 = (char *)xmalloc(1);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    *pcVar4 = '\0';\n    if (pcVar2 != (char *)0x0) goto LAB_000a6062;\n  }\n  else {\n    sVar3 = strlen(pcVar2);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    pcVar4 = strcpy(pcVar4,pcVar2);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    if (DAT_0017960c != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar2 != '\0') {\n        return;\n      }\n    }\n    if (*pcVar4 != '\0') goto LAB_000a6075;\n  }" (if "if") (parenthesized_expression "(pcVar2 == (char *)0x0)" (( "(") (binary_expression "pcVar2 == (char *)0x0" (identifier "pcVar2") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    pcVar4 = (char *)xmalloc(1);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    *pcVar4 = '\0';\n    if (pcVar2 != (char *)0x0) goto LAB_000a6062;\n  }" ({ "{") (expression_statement "pcVar4 = (char *)xmalloc(1);" (assignment_expression "pcVar4 = (char *)xmalloc(1)" (identifier "pcVar4") (= "=") (cast_expression "(char *)xmalloc(1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(1)" (identifier "xmalloc") (argument_list "(1)" (( "(") (number_literal "1") () ")"))))) (; ";")) (expression_statement "pcVar2 = DAT_0017960c;" (assignment_expression "pcVar2 = DAT_0017960c" (identifier "pcVar2") (= "=") (identifier "DAT_0017960c")) (; ";")) (expression_statement "DAT_00179608 = pcVar4;" (assignment_expression "DAT_00179608 = pcVar4" (identifier "DAT_00179608") (= "=") (identifier "pcVar4")) (; ";")) (expression_statement "*pcVar4 = '\0';" (assignment_expression "*pcVar4 = '\0'" (pointer_expression "*pcVar4" (* "*") (identifier "pcVar4")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (if_statement "if (pcVar2 != (char *)0x0) goto LAB_000a6062;" (if "if") (parenthesized_expression "(pcVar2 != (char *)0x0)" (( "(") (binary_expression "pcVar2 != (char *)0x0" (identifier "pcVar2") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (goto_statement "goto LAB_000a6062;" (goto "goto") (statement_identifier "LAB_000a6062") (; ";"))) (} "}")) (else_clause "else {\n    sVar3 = strlen(pcVar2);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    pcVar4 = strcpy(pcVar4,pcVar2);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    if (DAT_0017960c != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar2 != '\0') {\n        return;\n      }\n    }\n    if (*pcVar4 != '\0') goto LAB_000a6075;\n  }" (else "else") (compound_statement "{\n    sVar3 = strlen(pcVar2);\n    pcVar4 = (char *)xmalloc(sVar3 + 1);\n    pcVar4 = strcpy(pcVar4,pcVar2);\n    pcVar2 = DAT_0017960c;\n    DAT_00179608 = pcVar4;\n    if (DAT_0017960c != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar2 != '\0') {\n        return;\n      }\n    }\n    if (*pcVar4 != '\0') goto LAB_000a6075;\n  }" ({ "{") (expression_statement "sVar3 = strlen(pcVar2);" (assignment_expression "sVar3 = strlen(pcVar2)" (identifier "sVar3") (= "=") (call_expression "strlen(pcVar2)" (identifier "strlen") (argument_list "(pcVar2)" (( "(") (identifier "pcVar2") () ")")))) (; ";")) (expression_statement "pcVar4 = (char *)xmalloc(sVar3 + 1);" (assignment_expression "pcVar4 = (char *)xmalloc(sVar3 + 1)" (identifier "pcVar4") (= "=") (cast_expression "(char *)xmalloc(sVar3 + 1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(sVar3 + 1)" (identifier "xmalloc") (argument_list "(sVar3 + 1)" (( "(") (binary_expression "sVar3 + 1" (identifier "sVar3") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (expression_statement "pcVar4 = strcpy(pcVar4,pcVar2);" (assignment_expression "pcVar4 = strcpy(pcVar4,pcVar2)" (identifier "pcVar4") (= "=") (call_expression "strcpy(pcVar4,pcVar2)" (identifier "strcpy") (argument_list "(pcVar4,pcVar2)" (( "(") (identifier "pcVar4") (, ",") (identifier "pcVar2") () ")")))) (; ";")) (expression_statement "pcVar2 = DAT_0017960c;" (assignment_expression "pcVar2 = DAT_0017960c" (identifier "pcVar2") (= "=") (identifier "DAT_0017960c")) (; ";")) (expression_statement "DAT_00179608 = pcVar4;" (assignment_expression "DAT_00179608 = pcVar4" (identifier "DAT_00179608") (= "=") (identifier "pcVar4")) (; ";")) (if_statement "if (DAT_0017960c != (char *)0x0) {\nLAB_000a6062:\n      if (*pcVar2 != '\0') {\n        return;\n      }\n    }" (if "if") (parenthesized_expression "(DAT_0017960c != (char *)0x0)" (( "(") (binary_expression "DAT_0017960c != (char *)0x0" (identifier "DAT_0017960c") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\nLAB_000a6062:\n      if (*pcVar2 != '\0') {\n        return;\n      }\n    }" ({ "{") (labeled_statement "LAB_000a6062:\n      if (*pcVar2 != '\0') {\n        return;\n      }" (statement_identifier "LAB_000a6062") (: ":") (if_statement "if (*pcVar2 != '\0') {\n        return;\n      }" (if "if") (parenthesized_expression "(*pcVar2 != '\0')" (( "(") (binary_expression "*pcVar2 != '\0'" (pointer_expression "*pcVar2" (* "*") (identifier "pcVar2")) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n        return;\n      }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}")))) (} "}"))) (if_statement "if (*pcVar4 != '\0') goto LAB_000a6075;" (if "if") (parenthesized_expression "(*pcVar4 != '\0')" (( "(") (binary_expression "*pcVar4 != '\0'" (pointer_expression "*pcVar4" (* "*") (identifier "pcVar4")) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (goto_statement "goto LAB_000a6075;" (goto "goto") (statement_identifier "LAB_000a6075") (; ";"))) (} "}")))) (expression_statement "maybe_make_export_env();" (call_expression "maybe_make_export_env()" (identifier "maybe_make_export_env") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "pcVar4 = DAT_00179608;" (assignment_expression "pcVar4 = DAT_00179608" (identifier "pcVar4") (= "=") (identifier "DAT_00179608")) (; ";")) (if_statement "if (DAT_00179608 == (char *)0x0) {\n    pcVar4 = "";\n  }" (if "if") (parenthesized_expression "(DAT_00179608 == (char *)0x0)" (( "(") (binary_expression "DAT_00179608 == (char *)0x0" (identifier "DAT_00179608") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    pcVar4 = "";\n  }" ({ "{") (expression_statement "pcVar4 = "";" (assignment_expression "pcVar4 = """ (identifier "pcVar4") (= "=") (string_literal """" (" """) (" """))) (; ";")) (} "}"))) (labeled_statement "LAB_000a6075:\n  pcVar2 = setlocale(6,pcVar4);" (statement_identifier "LAB_000a6075") (: ":") (expression_statement "pcVar2 = setlocale(6,pcVar4);" (assignment_expression "pcVar2 = setlocale(6,pcVar4)" (identifier "pcVar2") (= "=") (call_expression "setlocale(6,pcVar4)" (identifier "setlocale") (argument_list "(6,pcVar4)" (( "(") (number_literal "6") (, ",") (identifier "pcVar4") () ")")))) (; ";"))) (if_statement "if (pcVar2 == (char *)0x0) {\n    return;\n  }" (if "if") (parenthesized_expression "(pcVar2 == (char *)0x0)" (( "(") (binary_expression "pcVar2 == (char *)0x0" (identifier "pcVar2") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_000a5070();" (call_expression "FUN_000a5070()" (identifier "FUN_000a5070") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */

void function_1(void)

{
  char *var_5;
  size_t var_8;
  char *pcVar3;
  
  var_5 = var_1("LC_ALL");
  var_2("LC_ALL",var_5);
  var_5 = var_1("LANG");
  if (var_3 != (char *)0x0) {
    var_4(var_3);
  }
  if (var_5 == (char *)0x0) {
    pcVar3 = (char *)var_6(1);
    var_5 = var_10;
    var_3 = pcVar3;
    *pcVar3 = '\0';
    if (var_5 != (char *)0x0) goto LAB_000a6062;
  }
  else {
    var_8 = var_7(var_5);
    pcVar3 = (char *)var_6(var_8 + 1);
    pcVar3 = var_9(pcVar3,var_5);
    var_5 = var_10;
    var_3 = pcVar3;
    if (var_10 != (char *)0x0) {
LAB_000a6062:
      if (*var_5 != '\0') {
        return;
      }
    }
    if (*pcVar3 != '\0') goto LAB_000a6075;
  }
  var_11();
  pcVar3 = var_3;
  if (var_3 == (char *)0x0) {
    pcVar3 = "";
  }
LAB_000a6075:
  var_5 = var_12(6,pcVar3);
  if (var_5 == (char *)0x0) {
    return;
  }
  var_13();
  return;
}


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

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

void MASKED(void)

{
  undefined4 uVar1;
  char *pcVar2;
  size_t sVar3;
  char *pcVar4;
  
  uVar1 = get_string_value("LC_ALL");
  set_locale_var("LC_ALL",uVar1);
  pcVar2 = (char *)get_string_value(&DAT_00112d22);
  if (DAT_00179608 != (char *)0x0) {
    free(DAT_00179608);
  }
  if (pcVar2 == (char *)0x0) {
    pcVar4 = (char *)xmalloc(1);
    pcVar2 = DAT_0017960c;
    DAT_00179608 = pcVar4;
    *pcVar4 = '\0';
    if (pcVar2 != (char *)0x0) goto LAB_000a6062;
  }
  else {
    sVar3 = strlen(pcVar2);
    pcVar4 = (char *)xmalloc(sVar3 + 1);
    pcVar4 = strcpy(pcVar4,pcVar2);
    pcVar2 = DAT_0017960c;
    DAT_00179608 = pcVar4;
    if (DAT_0017960c != (char *)0x0) {
LAB_000a6062:
      if (*pcVar2 != '\0') {
        return;
      }
    }
    if (*pcVar4 != '\0') goto LAB_000a6075;
  }
  maybe_make_export_env();
  pcVar4 = DAT_00179608;
  if (DAT_00179608 == (char *)0x0) {
    pcVar4 = "";
  }
LAB_000a6075:
  pcVar2 = setlocale(6,pcVar4);
  if (pcVar2 == (char *)0x0) {
    return;
  }
  FUN_000a5070();
  return;
}

