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

char * tilde_expand_word(char *filename)

{
  size_t sVar1;
  char *pcVar2;
  int iVar3;
  char *pcVar4;
  passwd *ppVar5;
  char *pcVar6;
  char cVar7;
  int suffind;
  
  if (filename == (char *)0x0) {
    pcVar2 = (char *)0x0;
  }
  else {
    if (*filename == '~') {
      if ((filename[1] == '\0') || (filename[1] == '/')) {
        pcVar2 = sh_get_env_value("HOME");
        if (pcVar2 == (char *)0x0) {
          pcVar2 = sh_get_home_dir();
        }
        pcVar2 = glue_prefix_and_suffix(pcVar2,filename,1);
        return pcVar2;
      }
      sVar1 = strlen(filename);
      pcVar2 = (char *)xmalloc(sVar1);
      cVar7 = filename[1];
      if ((cVar7 == '\0') || (cVar7 == '/')) {
        suffind = 1;
        pcVar4 = pcVar2;
      }
      else {
        suffind = 1;
        do {
          iVar3 = suffind;
          pcVar2[iVar3 + -1] = cVar7;
          cVar7 = filename[iVar3 + 1];
          suffind = iVar3 + 1;
          if (cVar7 == '\0') break;
        } while (cVar7 != '/');
        pcVar4 = pcVar2 + iVar3;
      }
      *pcVar4 = '\0';
      if ((tilde_expansion_preexpansion_hook != (tilde_hook_func_t *)0x0) &&
         (pcVar4 = (*tilde_expansion_preexpansion_hook)(pcVar2), pcVar4 != (char *)0x0)) {
        pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind);
        xfree(pcVar2);
        xfree(pcVar4);
        return pcVar6;
      }
      ppVar5 = getpwnam(pcVar2);
      if (ppVar5 == (passwd *)0x0) {
        if ((tilde_expansion_failure_hook != (tilde_hook_func_t *)0x0) &&
           (pcVar4 = (*tilde_expansion_failure_hook)(pcVar2), pcVar4 != (char *)0x0)) {
          pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind);
          xfree(pcVar4);
          if (pcVar6 != (char *)0x0) goto LAB_000eae57;
        }
        sVar1 = strlen(filename);
        pcVar4 = (char *)xmalloc(sVar1 + 1);
        pcVar6 = strcpy(pcVar4,filename);
      }
      else {
        pcVar6 = glue_prefix_and_suffix(ppVar5->pw_dir,filename,suffind);
      }
LAB_000eae57:
      xfree(pcVar2);
      endpwent();
      return pcVar6;
    }
    sVar1 = strlen(filename);
    pcVar2 = (char *)xmalloc(sVar1 + 1);
    pcVar2 = strcpy(pcVar2,filename);
  }
  return pcVar2;
}



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

char * tilde_expand_word(char *param_1)

{
  size_t sVar1;
  char *__name;
  int iVar2;
  int iVar3;
  passwd *ppVar4;
  char *pcVar5;
  char cVar6;
  
  if (param_1 == (char *)0x0) {
    pcVar5 = (char *)0x0;
  }
  else {
    if (*param_1 == '~') {
      if ((param_1[1] == '\0') || (param_1[1] == '/')) {
        iVar3 = sh_get_env_value(&DAT_000ed68b);
        if (iVar3 == 0) {
          sh_get_home_dir();
        }
        pcVar5 = (char *)FUN_000eacf0();
        return pcVar5;
      }
      sVar1 = strlen(param_1);
      __name = (char *)xmalloc(sVar1);
      cVar6 = param_1[1];
      pcVar5 = __name;
      if ((cVar6 != '\0') && (cVar6 != '/')) {
        iVar3 = 1;
        do {
          iVar2 = iVar3;
          __name[iVar2 + -1] = cVar6;
          cVar6 = param_1[iVar2 + 1];
          if (cVar6 == '\0') break;
          iVar3 = iVar2 + 1;
        } while (cVar6 != '/');
        pcVar5 = __name + iVar2;
      }
      *pcVar5 = '\0';
      if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&
         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {
        pcVar5 = (char *)FUN_000eacf0();
        xfree(__name);
        xfree(iVar3);
        return pcVar5;
      }
      ppVar4 = getpwnam(__name);
      if (ppVar4 == (passwd *)0x0) {
        if ((tilde_expansion_failure_hook != (code *)0x0) &&
           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {
          pcVar5 = (char *)FUN_000eacf0();
          xfree(iVar3);
          if (pcVar5 != (char *)0x0) goto LAB_000eae57;
        }
        sVar1 = strlen(param_1);
        pcVar5 = (char *)xmalloc(sVar1 + 1);
        pcVar5 = strcpy(pcVar5,param_1);
      }
      else {
        pcVar5 = (char *)FUN_000eacf0();
      }
LAB_000eae57:
      xfree(__name);
      endpwent();
      return pcVar5;
    }
    sVar1 = strlen(param_1);
    pcVar5 = (char *)xmalloc(sVar1 + 1);
    pcVar5 = strcpy(pcVar5,param_1);
  }
  return pcVar5;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00031ed0
ADD EBX,0x5f267
SUB ESP,0x1c
MOV ESI,dword ptr [ESP + 0x30]
TEST ESI,ESI
JZ 0x000eaf80
CMP byte ptr [ESI],0x7e
JNZ 0x000eaeb0
MOVZX EAX,byte ptr [ESI + 0x1]
TEST AL,AL
JZ 0x000eae80
CMP AL,0x2f
JZ 0x000eae80
SUB ESP,0xc
PUSH ESI
CALL 0x0002f760
MOV dword ptr [ESP],EAX
CALL 0x00099200
MOVZX EDX,byte ptr [ESI + 0x1]
ADD ESP,0x10
MOV EDI,EAX
TEST DL,DL
JZ 0x000eafa0
CMP DL,0x2f
JZ 0x000eafa0
MOV EAX,0x1
JMP 0x000eae02
MOV EAX,EBP
MOV byte ptr [EDI + EAX*0x1 + -0x1],DL
MOVZX EDX,byte ptr [ESI + EAX*0x1 + 0x1]
LEA EBP,[EAX + 0x1]
TEST DL,DL
JZ 0x000eae17
CMP DL,0x2f
JNZ 0x000eae00
ADD EAX,EDI
MOV byte ptr [EAX],0x0
MOV EAX,dword ptr [EBX + 0x8b38]
TEST EAX,EAX
JZ 0x000eae37
SUB ESP,0xc
PUSH EDI
CALL EAX
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x000eaf48
SUB ESP,0xc
PUSH EDI
CALL 0x0002f060
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000eaee0
MOV EAX,dword ptr [EAX + 0x14]
MOV ECX,EBP
MOV EDX,ESI
CALL 0x000eacf0
MOV dword ptr [ESP + 0xc],EAX
SUB ESP,0xc
PUSH EDI
CALL 0x000992e0
CALL 0x0002fad0
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0xc]
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
LEA EAX,[EBX + 0xfffa368b]
PUSH EAX
CALL 0x00052ef0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000eaf90
ADD ESP,0x1c
MOV EDX,ESI
MOV ECX,0x1
POP EBX
POP ESI
POP EDI
POP EBP
JMP 0x000eacf0
SUB ESP,0xc
PUSH ESI
CALL 0x0002f760
ADD EAX,0x1
MOV dword ptr [ESP],EAX
CALL 0x00099200
POP EDI
POP EBP
PUSH ESI
PUSH EAX
CALL 0x0002f580
ADD ESP,0x10
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [EBX + 0x8b34]
TEST EAX,EAX
JZ 0x000eaf20
SUB ESP,0xc
PUSH EDI
CALL EAX
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000eaf20
MOV ECX,EBP
MOV EDX,ESI
MOV EBP,EAX
CALL 0x000eacf0
SUB ESP,0xc
MOV dword ptr [ESP + 0x18],EAX
PUSH EBP
CALL 0x000992e0
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0xc]
TEST EAX,EAX
JNZ 0x000eae57
NOP
SUB ESP,0xc
PUSH ESI
CALL 0x0002f760
ADD EAX,0x1
MOV dword ptr [ESP],EAX
CALL 0x00099200
POP EDX
POP ECX
PUSH ESI
PUSH EAX
CALL 0x0002f580
ADD ESP,0x10
JMP 0x000eae57
MOV ECX,EBP
MOV EDX,ESI
MOV ESI,EAX
CALL 0x000eacf0
SUB ESP,0xc
MOV dword ptr [ESP + 0x18],EAX
PUSH EDI
CALL 0x000992e0
MOV dword ptr [ESP],ESI
CALL 0x000992e0
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0xc]
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
XOR EAX,EAX
JMP 0x000eaed0
CALL 0x00051740
JMP 0x000eae9a
MOV EAX,EDI
MOV EBP,0x1
JMP 0x000eae19
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nchar * tilde_expand_word(char *param_1)\n\n{\n  size_t sVar1;\n  char *__name;\n  int iVar2;\n  int iVar3;\n  passwd *ppVar4;\n  char *pcVar5;\n  char cVar6;\n  \n  if (param_1 == (char *)0x0) {\n    pcVar5 = (char *)0x0;\n  }\n  else {\n    if (*param_1 == '~') {\n      if ((param_1[1] == '\0') || (param_1[1] == '/')) {\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }\n      sVar1 = strlen(param_1);\n      __name = (char *)xmalloc(sVar1);\n      cVar6 = param_1[1];\n      pcVar5 = __name;\n      if ((cVar6 != '\0') && (cVar6 != '/')) {\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }\n      *pcVar5 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }\n      ppVar4 = getpwnam(__name);\n      if (ppVar4 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }\n      else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }\nLAB_000eae57:\n      xfree(__name);\n      endpwent();\n      return pcVar5;\n    }\n    sVar1 = strlen(param_1);\n    pcVar5 = (char *)xmalloc(sVar1 + 1);\n    pcVar5 = strcpy(pcVar5,param_1);\n  }\n  return pcVar5;\n}\n\n" comment (function_definition "char * tilde_expand_word(char *param_1)\n\n{\n  size_t sVar1;\n  char *__name;\n  int iVar2;\n  int iVar3;\n  passwd *ppVar4;\n  char *pcVar5;\n  char cVar6;\n  \n  if (param_1 == (char *)0x0) {\n    pcVar5 = (char *)0x0;\n  }\n  else {\n    if (*param_1 == '~') {\n      if ((param_1[1] == '\0') || (param_1[1] == '/')) {\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }\n      sVar1 = strlen(param_1);\n      __name = (char *)xmalloc(sVar1);\n      cVar6 = param_1[1];\n      pcVar5 = __name;\n      if ((cVar6 != '\0') && (cVar6 != '/')) {\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }\n      *pcVar5 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }\n      ppVar4 = getpwnam(__name);\n      if (ppVar4 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }\n      else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }\nLAB_000eae57:\n      xfree(__name);\n      endpwent();\n      return pcVar5;\n    }\n    sVar1 = strlen(param_1);\n    pcVar5 = (char *)xmalloc(sVar1 + 1);\n    pcVar5 = strcpy(pcVar5,param_1);\n  }\n  return pcVar5;\n}" primitive_type (pointer_declarator "* tilde_expand_word(char *param_1)" * (function_declarator "tilde_expand_word(char *param_1)" identifier (parameter_list "(char *param_1)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) )))) (compound_statement "{\n  size_t sVar1;\n  char *__name;\n  int iVar2;\n  int iVar3;\n  passwd *ppVar4;\n  char *pcVar5;\n  char cVar6;\n  \n  if (param_1 == (char *)0x0) {\n    pcVar5 = (char *)0x0;\n  }\n  else {\n    if (*param_1 == '~') {\n      if ((param_1[1] == '\0') || (param_1[1] == '/')) {\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }\n      sVar1 = strlen(param_1);\n      __name = (char *)xmalloc(sVar1);\n      cVar6 = param_1[1];\n      pcVar5 = __name;\n      if ((cVar6 != '\0') && (cVar6 != '/')) {\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }\n      *pcVar5 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }\n      ppVar4 = getpwnam(__name);\n      if (ppVar4 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }\n      else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }\nLAB_000eae57:\n      xfree(__name);\n      endpwent();\n      return pcVar5;\n    }\n    sVar1 = strlen(param_1);\n    pcVar5 = (char *)xmalloc(sVar1 + 1);\n    pcVar5 = strcpy(pcVar5,param_1);\n  }\n  return pcVar5;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "char *__name;" primitive_type (pointer_declarator "*__name" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "passwd *ppVar4;" type_identifier (pointer_declarator "*ppVar4" * identifier) ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "char cVar6;" primitive_type identifier ;) (if_statement "if (param_1 == (char *)0x0) {\n    pcVar5 = (char *)0x0;\n  }\n  else {\n    if (*param_1 == '~') {\n      if ((param_1[1] == '\0') || (param_1[1] == '/')) {\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }\n      sVar1 = strlen(param_1);\n      __name = (char *)xmalloc(sVar1);\n      cVar6 = param_1[1];\n      pcVar5 = __name;\n      if ((cVar6 != '\0') && (cVar6 != '/')) {\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }\n      *pcVar5 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }\n      ppVar4 = getpwnam(__name);\n      if (ppVar4 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }\n      else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }\nLAB_000eae57:\n      xfree(__name);\n      endpwent();\n      return pcVar5;\n    }\n    sVar1 = strlen(param_1);\n    pcVar5 = (char *)xmalloc(sVar1 + 1);\n    pcVar5 = strcpy(pcVar5,param_1);\n  }" if (parenthesized_expression "(param_1 == (char *)0x0)" ( (binary_expression "param_1 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar5 = (char *)0x0;\n  }" { (expression_statement "pcVar5 = (char *)0x0;" (assignment_expression "pcVar5 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    if (*param_1 == '~') {\n      if ((param_1[1] == '\0') || (param_1[1] == '/')) {\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }\n      sVar1 = strlen(param_1);\n      __name = (char *)xmalloc(sVar1);\n      cVar6 = param_1[1];\n      pcVar5 = __name;\n      if ((cVar6 != '\0') && (cVar6 != '/')) {\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }\n      *pcVar5 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }\n      ppVar4 = getpwnam(__name);\n      if (ppVar4 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }\n      else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }\nLAB_000eae57:\n      xfree(__name);\n      endpwent();\n      return pcVar5;\n    }\n    sVar1 = strlen(param_1);\n    pcVar5 = (char *)xmalloc(sVar1 + 1);\n    pcVar5 = strcpy(pcVar5,param_1);\n  }" else (compound_statement "{\n    if (*param_1 == '~') {\n      if ((param_1[1] == '\0') || (param_1[1] == '/')) {\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }\n      sVar1 = strlen(param_1);\n      __name = (char *)xmalloc(sVar1);\n      cVar6 = param_1[1];\n      pcVar5 = __name;\n      if ((cVar6 != '\0') && (cVar6 != '/')) {\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }\n      *pcVar5 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }\n      ppVar4 = getpwnam(__name);\n      if (ppVar4 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }\n      else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }\nLAB_000eae57:\n      xfree(__name);\n      endpwent();\n      return pcVar5;\n    }\n    sVar1 = strlen(param_1);\n    pcVar5 = (char *)xmalloc(sVar1 + 1);\n    pcVar5 = strcpy(pcVar5,param_1);\n  }" { (if_statement "if (*param_1 == '~') {\n      if ((param_1[1] == '\0') || (param_1[1] == '/')) {\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }\n      sVar1 = strlen(param_1);\n      __name = (char *)xmalloc(sVar1);\n      cVar6 = param_1[1];\n      pcVar5 = __name;\n      if ((cVar6 != '\0') && (cVar6 != '/')) {\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }\n      *pcVar5 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }\n      ppVar4 = getpwnam(__name);\n      if (ppVar4 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }\n      else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }\nLAB_000eae57:\n      xfree(__name);\n      endpwent();\n      return pcVar5;\n    }" if (parenthesized_expression "(*param_1 == '~')" ( (binary_expression "*param_1 == '~'" (pointer_expression "*param_1" * identifier) == (char_literal "'~'" ' character ')) )) (compound_statement "{\n      if ((param_1[1] == '\0') || (param_1[1] == '/')) {\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }\n      sVar1 = strlen(param_1);\n      __name = (char *)xmalloc(sVar1);\n      cVar6 = param_1[1];\n      pcVar5 = __name;\n      if ((cVar6 != '\0') && (cVar6 != '/')) {\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }\n      *pcVar5 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }\n      ppVar4 = getpwnam(__name);\n      if (ppVar4 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }\n      else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }\nLAB_000eae57:\n      xfree(__name);\n      endpwent();\n      return pcVar5;\n    }" { (if_statement "if ((param_1[1] == '\0') || (param_1[1] == '/')) {\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }" if (parenthesized_expression "((param_1[1] == '\0') || (param_1[1] == '/'))" ( (binary_expression "(param_1[1] == '\0') || (param_1[1] == '/')" (parenthesized_expression "(param_1[1] == '\0')" ( (binary_expression "param_1[1] == '\0'" (subscript_expression "param_1[1]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) || (parenthesized_expression "(param_1[1] == '/')" ( (binary_expression "param_1[1] == '/'" (subscript_expression "param_1[1]" identifier [ number_literal ]) == (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }" { (expression_statement "iVar3 = sh_get_env_value(&DAT_000ed68b);" (assignment_expression "iVar3 = sh_get_env_value(&DAT_000ed68b)" identifier = (call_expression "sh_get_env_value(&DAT_000ed68b)" identifier (argument_list "(&DAT_000ed68b)" ( (pointer_expression "&DAT_000ed68b" & identifier) )))) ;) (if_statement "if (iVar3 == 0) {\n          sh_get_home_dir();\n        }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n          sh_get_home_dir();\n        }" { (expression_statement "sh_get_home_dir();" (call_expression "sh_get_home_dir()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "pcVar5 = (char *)FUN_000eacf0();" (assignment_expression "pcVar5 = (char *)FUN_000eacf0()" identifier = (cast_expression "(char *)FUN_000eacf0()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_000eacf0()" identifier (argument_list "()" ( ))))) ;) (return_statement "return pcVar5;" return identifier ;) })) (expression_statement "sVar1 = strlen(param_1);" (assignment_expression "sVar1 = strlen(param_1)" identifier = (call_expression "strlen(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "__name = (char *)xmalloc(sVar1);" (assignment_expression "__name = (char *)xmalloc(sVar1)" identifier = (cast_expression "(char *)xmalloc(sVar1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar1)" identifier (argument_list "(sVar1)" ( identifier ))))) ;) (expression_statement "cVar6 = param_1[1];" (assignment_expression "cVar6 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "pcVar5 = __name;" (assignment_expression "pcVar5 = __name" identifier = identifier) ;) (if_statement "if ((cVar6 != '\0') && (cVar6 != '/')) {\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }" if (parenthesized_expression "((cVar6 != '\0') && (cVar6 != '/'))" ( (binary_expression "(cVar6 != '\0') && (cVar6 != '/')" (parenthesized_expression "(cVar6 != '\0')" ( (binary_expression "cVar6 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(cVar6 != '/')" ( (binary_expression "cVar6 != '/'" identifier != (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }" { (expression_statement "iVar3 = 1;" (assignment_expression "iVar3 = 1" identifier = number_literal) ;) (do_statement "do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');" do (compound_statement "{\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        }" { (expression_statement "iVar2 = iVar3;" (assignment_expression "iVar2 = iVar3" identifier = identifier) ;) (expression_statement "__name[iVar2 + -1] = cVar6;" (assignment_expression "__name[iVar2 + -1] = cVar6" (subscript_expression "__name[iVar2 + -1]" identifier [ (binary_expression "iVar2 + -1" identifier + number_literal) ]) = identifier) ;) (expression_statement "cVar6 = param_1[iVar2 + 1];" (assignment_expression "cVar6 = param_1[iVar2 + 1]" identifier = (subscript_expression "param_1[iVar2 + 1]" identifier [ (binary_expression "iVar2 + 1" identifier + number_literal) ])) ;) (if_statement "if (cVar6 == '\0') break;" if (parenthesized_expression "(cVar6 == '\0')" ( (binary_expression "cVar6 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (break_statement "break;" break ;)) (expression_statement "iVar3 = iVar2 + 1;" (assignment_expression "iVar3 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(cVar6 != '/')" ( (binary_expression "cVar6 != '/'" identifier != (char_literal "'/'" ' character ')) )) ;) (expression_statement "pcVar5 = __name + iVar2;" (assignment_expression "pcVar5 = __name + iVar2" identifier = (binary_expression "__name + iVar2" identifier + identifier)) ;) })) (expression_statement "*pcVar5 = '\0';" (assignment_expression "*pcVar5 = '\0'" (pointer_expression "*pcVar5" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (if_statement "if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }" if (parenthesized_expression "((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0))" ( (binary_expression "(tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)" (parenthesized_expression "(tilde_expansion_preexpansion_hook != (code *)0x0)" ( (binary_expression "tilde_expansion_preexpansion_hook != (code *)0x0" identifier != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)" ( (comma_expression "iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0" (assignment_expression "iVar3 = (*tilde_expansion_preexpansion_hook)(__name)" identifier = (call_expression "(*tilde_expansion_preexpansion_hook)(__name)" (parenthesized_expression "(*tilde_expansion_preexpansion_hook)" ( (pointer_expression "*tilde_expansion_preexpansion_hook" * identifier) )) (argument_list "(__name)" ( identifier )))) , (binary_expression "iVar3 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }" { (expression_statement "pcVar5 = (char *)FUN_000eacf0();" (assignment_expression "pcVar5 = (char *)FUN_000eacf0()" identifier = (cast_expression "(char *)FUN_000eacf0()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_000eacf0()" identifier (argument_list "()" ( ))))) ;) (expression_statement "xfree(__name);" (call_expression "xfree(__name)" identifier (argument_list "(__name)" ( identifier ))) ;) (expression_statement "xfree(iVar3);" (call_expression "xfree(iVar3)" identifier (argument_list "(iVar3)" ( identifier ))) ;) (return_statement "return pcVar5;" return identifier ;) })) (expression_statement "ppVar4 = getpwnam(__name);" (assignment_expression "ppVar4 = getpwnam(__name)" identifier = (call_expression "getpwnam(__name)" identifier (argument_list "(__name)" ( identifier )))) ;) (if_statement "if (ppVar4 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }\n      else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }" if (parenthesized_expression "(ppVar4 == (passwd *)0x0)" ( (binary_expression "ppVar4 == (passwd *)0x0" identifier == (cast_expression "(passwd *)0x0" ( (type_descriptor "passwd *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }" { (if_statement "if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }" if (parenthesized_expression "((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0))" ( (binary_expression "(tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)" (parenthesized_expression "(tilde_expansion_failure_hook != (code *)0x0)" ( (binary_expression "tilde_expansion_failure_hook != (code *)0x0" identifier != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)" ( (comma_expression "iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0" (assignment_expression "iVar3 = (*tilde_expansion_failure_hook)(__name)" identifier = (call_expression "(*tilde_expansion_failure_hook)(__name)" (parenthesized_expression "(*tilde_expansion_failure_hook)" ( (pointer_expression "*tilde_expansion_failure_hook" * identifier) )) (argument_list "(__name)" ( identifier )))) , (binary_expression "iVar3 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }" { (expression_statement "pcVar5 = (char *)FUN_000eacf0();" (assignment_expression "pcVar5 = (char *)FUN_000eacf0()" identifier = (cast_expression "(char *)FUN_000eacf0()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_000eacf0()" identifier (argument_list "()" ( ))))) ;) (expression_statement "xfree(iVar3);" (call_expression "xfree(iVar3)" identifier (argument_list "(iVar3)" ( identifier ))) ;) (if_statement "if (pcVar5 != (char *)0x0) goto LAB_000eae57;" if (parenthesized_expression "(pcVar5 != (char *)0x0)" ( (binary_expression "pcVar5 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_000eae57;" goto statement_identifier ;)) })) (expression_statement "sVar1 = strlen(param_1);" (assignment_expression "sVar1 = strlen(param_1)" identifier = (call_expression "strlen(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "pcVar5 = (char *)xmalloc(sVar1 + 1);" (assignment_expression "pcVar5 = (char *)xmalloc(sVar1 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar1 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar1 + 1)" identifier (argument_list "(sVar1 + 1)" ( (binary_expression "sVar1 + 1" identifier + number_literal) ))))) ;) (expression_statement "pcVar5 = strcpy(pcVar5,param_1);" (assignment_expression "pcVar5 = strcpy(pcVar5,param_1)" identifier = (call_expression "strcpy(pcVar5,param_1)" identifier (argument_list "(pcVar5,param_1)" ( identifier , identifier )))) ;) }) (else_clause "else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }" else (compound_statement "{\n        pcVar5 = (char *)FUN_000eacf0();\n      }" { (expression_statement "pcVar5 = (char *)FUN_000eacf0();" (assignment_expression "pcVar5 = (char *)FUN_000eacf0()" identifier = (cast_expression "(char *)FUN_000eacf0()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_000eacf0()" identifier (argument_list "()" ( ))))) ;) }))) (labeled_statement "LAB_000eae57:\n      xfree(__name);" statement_identifier : (expression_statement "xfree(__name);" (call_expression "xfree(__name)" identifier (argument_list "(__name)" ( identifier ))) ;)) (expression_statement "endpwent();" (call_expression "endpwent()" identifier (argument_list "()" ( ))) ;) (return_statement "return pcVar5;" return identifier ;) })) (expression_statement "sVar1 = strlen(param_1);" (assignment_expression "sVar1 = strlen(param_1)" identifier = (call_expression "strlen(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "pcVar5 = (char *)xmalloc(sVar1 + 1);" (assignment_expression "pcVar5 = (char *)xmalloc(sVar1 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar1 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar1 + 1)" identifier (argument_list "(sVar1 + 1)" ( (binary_expression "sVar1 + 1" identifier + number_literal) ))))) ;) (expression_statement "pcVar5 = strcpy(pcVar5,param_1);" (assignment_expression "pcVar5 = strcpy(pcVar5,param_1)" identifier = (call_expression "strcpy(pcVar5,param_1)" identifier (argument_list "(pcVar5,param_1)" ( identifier , identifier )))) ;) }))) (return_statement "return pcVar5;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nchar * tilde_expand_word(char *filename)\n\n{\n  size_t sVar1;\n  char *pcVar2;\n  int iVar3;\n  char *pcVar4;\n  passwd *ppVar5;\n  char *pcVar6;\n  char cVar7;\n  int suffind;\n  \n  if (filename == (char *)0x0) {\n    pcVar2 = (char *)0x0;\n  }\n  else {\n    if (*filename == '~') {\n      if ((filename[1] == '\0') || (filename[1] == '/')) {\n        pcVar2 = sh_get_env_value("HOME");\n        if (pcVar2 == (char *)0x0) {\n          pcVar2 = sh_get_home_dir();\n        }\n        pcVar2 = glue_prefix_and_suffix(pcVar2,filename,1);\n        return pcVar2;\n      }\n      sVar1 = strlen(filename);\n      pcVar2 = (char *)xmalloc(sVar1);\n      cVar7 = filename[1];\n      if ((cVar7 == '\0') || (cVar7 == '/')) {\n        suffind = 1;\n        pcVar4 = pcVar2;\n      }\n      else {\n        suffind = 1;\n        do {\n          iVar3 = suffind;\n          pcVar2[iVar3 + -1] = cVar7;\n          cVar7 = filename[iVar3 + 1];\n          suffind = iVar3 + 1;\n          if (cVar7 == '\0') break;\n        } while (cVar7 != '/');\n        pcVar4 = pcVar2 + iVar3;\n      }\n      *pcVar4 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (tilde_hook_func_t *)0x0) &&\n         (pcVar4 = (*tilde_expansion_preexpansion_hook)(pcVar2), pcVar4 != (char *)0x0)) {\n        pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind);\n        xfree(pcVar2);\n        xfree(pcVar4);\n        return pcVar6;\n      }\n      ppVar5 = getpwnam(pcVar2);\n      if (ppVar5 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (tilde_hook_func_t *)0x0) &&\n           (pcVar4 = (*tilde_expansion_failure_hook)(pcVar2), pcVar4 != (char *)0x0)) {\n          pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind);\n          xfree(pcVar4);\n          if (pcVar6 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(filename);\n        pcVar4 = (char *)xmalloc(sVar1 + 1);\n        pcVar6 = strcpy(pcVar4,filename);\n      }\n      else {\n        pcVar6 = glue_prefix_and_suffix(ppVar5->pw_dir,filename,suffind);\n      }\nLAB_000eae57:\n      xfree(pcVar2);\n      endpwent();\n      return pcVar6;\n    }\n    sVar1 = strlen(filename);\n    pcVar2 = (char *)xmalloc(sVar1 + 1);\n    pcVar2 = strcpy(pcVar2,filename);\n  }\n  return pcVar2;\n}\n\n" comment comment (function_definition "char * tilde_expand_word(char *filename)\n\n{\n  size_t sVar1;\n  char *pcVar2;\n  int iVar3;\n  char *pcVar4;\n  passwd *ppVar5;\n  char *pcVar6;\n  char cVar7;\n  int suffind;\n  \n  if (filename == (char *)0x0) {\n    pcVar2 = (char *)0x0;\n  }\n  else {\n    if (*filename == '~') {\n      if ((filename[1] == '\0') || (filename[1] == '/')) {\n        pcVar2 = sh_get_env_value("HOME");\n        if (pcVar2 == (char *)0x0) {\n          pcVar2 = sh_get_home_dir();\n        }\n        pcVar2 = glue_prefix_and_suffix(pcVar2,filename,1);\n        return pcVar2;\n      }\n      sVar1 = strlen(filename);\n      pcVar2 = (char *)xmalloc(sVar1);\n      cVar7 = filename[1];\n      if ((cVar7 == '\0') || (cVar7 == '/')) {\n        suffind = 1;\n        pcVar4 = pcVar2;\n      }\n      else {\n        suffind = 1;\n        do {\n          iVar3 = suffind;\n          pcVar2[iVar3 + -1] = cVar7;\n          cVar7 = filename[iVar3 + 1];\n          suffind = iVar3 + 1;\n          if (cVar7 == '\0') break;\n        } while (cVar7 != '/');\n        pcVar4 = pcVar2 + iVar3;\n      }\n      *pcVar4 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (tilde_hook_func_t *)0x0) &&\n         (pcVar4 = (*tilde_expansion_preexpansion_hook)(pcVar2), pcVar4 != (char *)0x0)) {\n        pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind);\n        xfree(pcVar2);\n        xfree(pcVar4);\n        return pcVar6;\n      }\n      ppVar5 = getpwnam(pcVar2);\n      if (ppVar5 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (tilde_hook_func_t *)0x0) &&\n           (pcVar4 = (*tilde_expansion_failure_hook)(pcVar2), pcVar4 != (char *)0x0)) {\n          pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind);\n          xfree(pcVar4);\n          if (pcVar6 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(filename);\n        pcVar4 = (char *)xmalloc(sVar1 + 1);\n        pcVar6 = strcpy(pcVar4,filename);\n      }\n      else {\n        pcVar6 = glue_prefix_and_suffix(ppVar5->pw_dir,filename,suffind);\n      }\nLAB_000eae57:\n      xfree(pcVar2);\n      endpwent();\n      return pcVar6;\n    }\n    sVar1 = strlen(filename);\n    pcVar2 = (char *)xmalloc(sVar1 + 1);\n    pcVar2 = strcpy(pcVar2,filename);\n  }\n  return pcVar2;\n}" primitive_type (pointer_declarator "* tilde_expand_word(char *filename)" * (function_declarator "tilde_expand_word(char *filename)" identifier (parameter_list "(char *filename)" ( (parameter_declaration "char *filename" primitive_type (pointer_declarator "*filename" * identifier)) )))) (compound_statement "{\n  size_t sVar1;\n  char *pcVar2;\n  int iVar3;\n  char *pcVar4;\n  passwd *ppVar5;\n  char *pcVar6;\n  char cVar7;\n  int suffind;\n  \n  if (filename == (char *)0x0) {\n    pcVar2 = (char *)0x0;\n  }\n  else {\n    if (*filename == '~') {\n      if ((filename[1] == '\0') || (filename[1] == '/')) {\n        pcVar2 = sh_get_env_value("HOME");\n        if (pcVar2 == (char *)0x0) {\n          pcVar2 = sh_get_home_dir();\n        }\n        pcVar2 = glue_prefix_and_suffix(pcVar2,filename,1);\n        return pcVar2;\n      }\n      sVar1 = strlen(filename);\n      pcVar2 = (char *)xmalloc(sVar1);\n      cVar7 = filename[1];\n      if ((cVar7 == '\0') || (cVar7 == '/')) {\n        suffind = 1;\n        pcVar4 = pcVar2;\n      }\n      else {\n        suffind = 1;\n        do {\n          iVar3 = suffind;\n          pcVar2[iVar3 + -1] = cVar7;\n          cVar7 = filename[iVar3 + 1];\n          suffind = iVar3 + 1;\n          if (cVar7 == '\0') break;\n        } while (cVar7 != '/');\n        pcVar4 = pcVar2 + iVar3;\n      }\n      *pcVar4 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (tilde_hook_func_t *)0x0) &&\n         (pcVar4 = (*tilde_expansion_preexpansion_hook)(pcVar2), pcVar4 != (char *)0x0)) {\n        pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind);\n        xfree(pcVar2);\n        xfree(pcVar4);\n        return pcVar6;\n      }\n      ppVar5 = getpwnam(pcVar2);\n      if (ppVar5 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (tilde_hook_func_t *)0x0) &&\n           (pcVar4 = (*tilde_expansion_failure_hook)(pcVar2), pcVar4 != (char *)0x0)) {\n          pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind);\n          xfree(pcVar4);\n          if (pcVar6 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(filename);\n        pcVar4 = (char *)xmalloc(sVar1 + 1);\n        pcVar6 = strcpy(pcVar4,filename);\n      }\n      else {\n        pcVar6 = glue_prefix_and_suffix(ppVar5->pw_dir,filename,suffind);\n      }\nLAB_000eae57:\n      xfree(pcVar2);\n      endpwent();\n      return pcVar6;\n    }\n    sVar1 = strlen(filename);\n    pcVar2 = (char *)xmalloc(sVar1 + 1);\n    pcVar2 = strcpy(pcVar2,filename);\n  }\n  return pcVar2;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "passwd *ppVar5;" type_identifier (pointer_declarator "*ppVar5" * identifier) ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "char cVar7;" primitive_type identifier ;) (declaration "int suffind;" primitive_type identifier ;) (if_statement "if (filename == (char *)0x0) {\n    pcVar2 = (char *)0x0;\n  }\n  else {\n    if (*filename == '~') {\n      if ((filename[1] == '\0') || (filename[1] == '/')) {\n        pcVar2 = sh_get_env_value("HOME");\n        if (pcVar2 == (char *)0x0) {\n          pcVar2 = sh_get_home_dir();\n        }\n        pcVar2 = glue_prefix_and_suffix(pcVar2,filename,1);\n        return pcVar2;\n      }\n      sVar1 = strlen(filename);\n      pcVar2 = (char *)xmalloc(sVar1);\n      cVar7 = filename[1];\n      if ((cVar7 == '\0') || (cVar7 == '/')) {\n        suffind = 1;\n        pcVar4 = pcVar2;\n      }\n      else {\n        suffind = 1;\n        do {\n          iVar3 = suffind;\n          pcVar2[iVar3 + -1] = cVar7;\n          cVar7 = filename[iVar3 + 1];\n          suffind = iVar3 + 1;\n          if (cVar7 == '\0') break;\n        } while (cVar7 != '/');\n        pcVar4 = pcVar2 + iVar3;\n      }\n      *pcVar4 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (tilde_hook_func_t *)0x0) &&\n         (pcVar4 = (*tilde_expansion_preexpansion_hook)(pcVar2), pcVar4 != (char *)0x0)) {\n        pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind);\n        xfree(pcVar2);\n        xfree(pcVar4);\n        return pcVar6;\n      }\n      ppVar5 = getpwnam(pcVar2);\n      if (ppVar5 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (tilde_hook_func_t *)0x0) &&\n           (pcVar4 = (*tilde_expansion_failure_hook)(pcVar2), pcVar4 != (char *)0x0)) {\n          pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind);\n          xfree(pcVar4);\n          if (pcVar6 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(filename);\n        pcVar4 = (char *)xmalloc(sVar1 + 1);\n        pcVar6 = strcpy(pcVar4,filename);\n      }\n      else {\n        pcVar6 = glue_prefix_and_suffix(ppVar5->pw_dir,filename,suffind);\n      }\nLAB_000eae57:\n      xfree(pcVar2);\n      endpwent();\n      return pcVar6;\n    }\n    sVar1 = strlen(filename);\n    pcVar2 = (char *)xmalloc(sVar1 + 1);\n    pcVar2 = strcpy(pcVar2,filename);\n  }" if (parenthesized_expression "(filename == (char *)0x0)" ( (binary_expression "filename == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar2 = (char *)0x0;\n  }" { (expression_statement "pcVar2 = (char *)0x0;" (assignment_expression "pcVar2 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    if (*filename == '~') {\n      if ((filename[1] == '\0') || (filename[1] == '/')) {\n        pcVar2 = sh_get_env_value("HOME");\n        if (pcVar2 == (char *)0x0) {\n          pcVar2 = sh_get_home_dir();\n        }\n        pcVar2 = glue_prefix_and_suffix(pcVar2,filename,1);\n        return pcVar2;\n      }\n      sVar1 = strlen(filename);\n      pcVar2 = (char *)xmalloc(sVar1);\n      cVar7 = filename[1];\n      if ((cVar7 == '\0') || (cVar7 == '/')) {\n        suffind = 1;\n        pcVar4 = pcVar2;\n      }\n      else {\n        suffind = 1;\n        do {\n          iVar3 = suffind;\n          pcVar2[iVar3 + -1] = cVar7;\n          cVar7 = filename[iVar3 + 1];\n          suffind = iVar3 + 1;\n          if (cVar7 == '\0') break;\n        } while (cVar7 != '/');\n        pcVar4 = pcVar2 + iVar3;\n      }\n      *pcVar4 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (tilde_hook_func_t *)0x0) &&\n         (pcVar4 = (*tilde_expansion_preexpansion_hook)(pcVar2), pcVar4 != (char *)0x0)) {\n        pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind);\n        xfree(pcVar2);\n        xfree(pcVar4);\n        return pcVar6;\n      }\n      ppVar5 = getpwnam(pcVar2);\n      if (ppVar5 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (tilde_hook_func_t *)0x0) &&\n           (pcVar4 = (*tilde_expansion_failure_hook)(pcVar2), pcVar4 != (char *)0x0)) {\n          pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind);\n          xfree(pcVar4);\n          if (pcVar6 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(filename);\n        pcVar4 = (char *)xmalloc(sVar1 + 1);\n        pcVar6 = strcpy(pcVar4,filename);\n      }\n      else {\n        pcVar6 = glue_prefix_and_suffix(ppVar5->pw_dir,filename,suffind);\n      }\nLAB_000eae57:\n      xfree(pcVar2);\n      endpwent();\n      return pcVar6;\n    }\n    sVar1 = strlen(filename);\n    pcVar2 = (char *)xmalloc(sVar1 + 1);\n    pcVar2 = strcpy(pcVar2,filename);\n  }" else (compound_statement "{\n    if (*filename == '~') {\n      if ((filename[1] == '\0') || (filename[1] == '/')) {\n        pcVar2 = sh_get_env_value("HOME");\n        if (pcVar2 == (char *)0x0) {\n          pcVar2 = sh_get_home_dir();\n        }\n        pcVar2 = glue_prefix_and_suffix(pcVar2,filename,1);\n        return pcVar2;\n      }\n      sVar1 = strlen(filename);\n      pcVar2 = (char *)xmalloc(sVar1);\n      cVar7 = filename[1];\n      if ((cVar7 == '\0') || (cVar7 == '/')) {\n        suffind = 1;\n        pcVar4 = pcVar2;\n      }\n      else {\n        suffind = 1;\n        do {\n          iVar3 = suffind;\n          pcVar2[iVar3 + -1] = cVar7;\n          cVar7 = filename[iVar3 + 1];\n          suffind = iVar3 + 1;\n          if (cVar7 == '\0') break;\n        } while (cVar7 != '/');\n        pcVar4 = pcVar2 + iVar3;\n      }\n      *pcVar4 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (tilde_hook_func_t *)0x0) &&\n         (pcVar4 = (*tilde_expansion_preexpansion_hook)(pcVar2), pcVar4 != (char *)0x0)) {\n        pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind);\n        xfree(pcVar2);\n        xfree(pcVar4);\n        return pcVar6;\n      }\n      ppVar5 = getpwnam(pcVar2);\n      if (ppVar5 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (tilde_hook_func_t *)0x0) &&\n           (pcVar4 = (*tilde_expansion_failure_hook)(pcVar2), pcVar4 != (char *)0x0)) {\n          pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind);\n          xfree(pcVar4);\n          if (pcVar6 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(filename);\n        pcVar4 = (char *)xmalloc(sVar1 + 1);\n        pcVar6 = strcpy(pcVar4,filename);\n      }\n      else {\n        pcVar6 = glue_prefix_and_suffix(ppVar5->pw_dir,filename,suffind);\n      }\nLAB_000eae57:\n      xfree(pcVar2);\n      endpwent();\n      return pcVar6;\n    }\n    sVar1 = strlen(filename);\n    pcVar2 = (char *)xmalloc(sVar1 + 1);\n    pcVar2 = strcpy(pcVar2,filename);\n  }" { (if_statement "if (*filename == '~') {\n      if ((filename[1] == '\0') || (filename[1] == '/')) {\n        pcVar2 = sh_get_env_value("HOME");\n        if (pcVar2 == (char *)0x0) {\n          pcVar2 = sh_get_home_dir();\n        }\n        pcVar2 = glue_prefix_and_suffix(pcVar2,filename,1);\n        return pcVar2;\n      }\n      sVar1 = strlen(filename);\n      pcVar2 = (char *)xmalloc(sVar1);\n      cVar7 = filename[1];\n      if ((cVar7 == '\0') || (cVar7 == '/')) {\n        suffind = 1;\n        pcVar4 = pcVar2;\n      }\n      else {\n        suffind = 1;\n        do {\n          iVar3 = suffind;\n          pcVar2[iVar3 + -1] = cVar7;\n          cVar7 = filename[iVar3 + 1];\n          suffind = iVar3 + 1;\n          if (cVar7 == '\0') break;\n        } while (cVar7 != '/');\n        pcVar4 = pcVar2 + iVar3;\n      }\n      *pcVar4 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (tilde_hook_func_t *)0x0) &&\n         (pcVar4 = (*tilde_expansion_preexpansion_hook)(pcVar2), pcVar4 != (char *)0x0)) {\n        pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind);\n        xfree(pcVar2);\n        xfree(pcVar4);\n        return pcVar6;\n      }\n      ppVar5 = getpwnam(pcVar2);\n      if (ppVar5 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (tilde_hook_func_t *)0x0) &&\n           (pcVar4 = (*tilde_expansion_failure_hook)(pcVar2), pcVar4 != (char *)0x0)) {\n          pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind);\n          xfree(pcVar4);\n          if (pcVar6 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(filename);\n        pcVar4 = (char *)xmalloc(sVar1 + 1);\n        pcVar6 = strcpy(pcVar4,filename);\n      }\n      else {\n        pcVar6 = glue_prefix_and_suffix(ppVar5->pw_dir,filename,suffind);\n      }\nLAB_000eae57:\n      xfree(pcVar2);\n      endpwent();\n      return pcVar6;\n    }" if (parenthesized_expression "(*filename == '~')" ( (binary_expression "*filename == '~'" (pointer_expression "*filename" * identifier) == (char_literal "'~'" ' character ')) )) (compound_statement "{\n      if ((filename[1] == '\0') || (filename[1] == '/')) {\n        pcVar2 = sh_get_env_value("HOME");\n        if (pcVar2 == (char *)0x0) {\n          pcVar2 = sh_get_home_dir();\n        }\n        pcVar2 = glue_prefix_and_suffix(pcVar2,filename,1);\n        return pcVar2;\n      }\n      sVar1 = strlen(filename);\n      pcVar2 = (char *)xmalloc(sVar1);\n      cVar7 = filename[1];\n      if ((cVar7 == '\0') || (cVar7 == '/')) {\n        suffind = 1;\n        pcVar4 = pcVar2;\n      }\n      else {\n        suffind = 1;\n        do {\n          iVar3 = suffind;\n          pcVar2[iVar3 + -1] = cVar7;\n          cVar7 = filename[iVar3 + 1];\n          suffind = iVar3 + 1;\n          if (cVar7 == '\0') break;\n        } while (cVar7 != '/');\n        pcVar4 = pcVar2 + iVar3;\n      }\n      *pcVar4 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (tilde_hook_func_t *)0x0) &&\n         (pcVar4 = (*tilde_expansion_preexpansion_hook)(pcVar2), pcVar4 != (char *)0x0)) {\n        pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind);\n        xfree(pcVar2);\n        xfree(pcVar4);\n        return pcVar6;\n      }\n      ppVar5 = getpwnam(pcVar2);\n      if (ppVar5 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (tilde_hook_func_t *)0x0) &&\n           (pcVar4 = (*tilde_expansion_failure_hook)(pcVar2), pcVar4 != (char *)0x0)) {\n          pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind);\n          xfree(pcVar4);\n          if (pcVar6 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(filename);\n        pcVar4 = (char *)xmalloc(sVar1 + 1);\n        pcVar6 = strcpy(pcVar4,filename);\n      }\n      else {\n        pcVar6 = glue_prefix_and_suffix(ppVar5->pw_dir,filename,suffind);\n      }\nLAB_000eae57:\n      xfree(pcVar2);\n      endpwent();\n      return pcVar6;\n    }" { (if_statement "if ((filename[1] == '\0') || (filename[1] == '/')) {\n        pcVar2 = sh_get_env_value("HOME");\n        if (pcVar2 == (char *)0x0) {\n          pcVar2 = sh_get_home_dir();\n        }\n        pcVar2 = glue_prefix_and_suffix(pcVar2,filename,1);\n        return pcVar2;\n      }" if (parenthesized_expression "((filename[1] == '\0') || (filename[1] == '/'))" ( (binary_expression "(filename[1] == '\0') || (filename[1] == '/')" (parenthesized_expression "(filename[1] == '\0')" ( (binary_expression "filename[1] == '\0'" (subscript_expression "filename[1]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) || (parenthesized_expression "(filename[1] == '/')" ( (binary_expression "filename[1] == '/'" (subscript_expression "filename[1]" identifier [ number_literal ]) == (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n        pcVar2 = sh_get_env_value("HOME");\n        if (pcVar2 == (char *)0x0) {\n          pcVar2 = sh_get_home_dir();\n        }\n        pcVar2 = glue_prefix_and_suffix(pcVar2,filename,1);\n        return pcVar2;\n      }" { (expression_statement "pcVar2 = sh_get_env_value("HOME");" (assignment_expression "pcVar2 = sh_get_env_value("HOME")" identifier = (call_expression "sh_get_env_value("HOME")" identifier (argument_list "("HOME")" ( (string_literal ""HOME"" " string_content ") )))) ;) (if_statement "if (pcVar2 == (char *)0x0) {\n          pcVar2 = sh_get_home_dir();\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          pcVar2 = sh_get_home_dir();\n        }" { (expression_statement "pcVar2 = sh_get_home_dir();" (assignment_expression "pcVar2 = sh_get_home_dir()" identifier = (call_expression "sh_get_home_dir()" identifier (argument_list "()" ( )))) ;) })) (expression_statement "pcVar2 = glue_prefix_and_suffix(pcVar2,filename,1);" (assignment_expression "pcVar2 = glue_prefix_and_suffix(pcVar2,filename,1)" identifier = (call_expression "glue_prefix_and_suffix(pcVar2,filename,1)" identifier (argument_list "(pcVar2,filename,1)" ( identifier , identifier , number_literal )))) ;) (return_statement "return pcVar2;" return identifier ;) })) (expression_statement "sVar1 = strlen(filename);" (assignment_expression "sVar1 = strlen(filename)" identifier = (call_expression "strlen(filename)" identifier (argument_list "(filename)" ( identifier )))) ;) (expression_statement "pcVar2 = (char *)xmalloc(sVar1);" (assignment_expression "pcVar2 = (char *)xmalloc(sVar1)" identifier = (cast_expression "(char *)xmalloc(sVar1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar1)" identifier (argument_list "(sVar1)" ( identifier ))))) ;) (expression_statement "cVar7 = filename[1];" (assignment_expression "cVar7 = filename[1]" identifier = (subscript_expression "filename[1]" identifier [ number_literal ])) ;) (if_statement "if ((cVar7 == '\0') || (cVar7 == '/')) {\n        suffind = 1;\n        pcVar4 = pcVar2;\n      }\n      else {\n        suffind = 1;\n        do {\n          iVar3 = suffind;\n          pcVar2[iVar3 + -1] = cVar7;\n          cVar7 = filename[iVar3 + 1];\n          suffind = iVar3 + 1;\n          if (cVar7 == '\0') break;\n        } while (cVar7 != '/');\n        pcVar4 = pcVar2 + iVar3;\n      }" if (parenthesized_expression "((cVar7 == '\0') || (cVar7 == '/'))" ( (binary_expression "(cVar7 == '\0') || (cVar7 == '/')" (parenthesized_expression "(cVar7 == '\0')" ( (binary_expression "cVar7 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) || (parenthesized_expression "(cVar7 == '/')" ( (binary_expression "cVar7 == '/'" identifier == (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n        suffind = 1;\n        pcVar4 = pcVar2;\n      }" { (expression_statement "suffind = 1;" (assignment_expression "suffind = 1" identifier = number_literal) ;) (expression_statement "pcVar4 = pcVar2;" (assignment_expression "pcVar4 = pcVar2" identifier = identifier) ;) }) (else_clause "else {\n        suffind = 1;\n        do {\n          iVar3 = suffind;\n          pcVar2[iVar3 + -1] = cVar7;\n          cVar7 = filename[iVar3 + 1];\n          suffind = iVar3 + 1;\n          if (cVar7 == '\0') break;\n        } while (cVar7 != '/');\n        pcVar4 = pcVar2 + iVar3;\n      }" else (compound_statement "{\n        suffind = 1;\n        do {\n          iVar3 = suffind;\n          pcVar2[iVar3 + -1] = cVar7;\n          cVar7 = filename[iVar3 + 1];\n          suffind = iVar3 + 1;\n          if (cVar7 == '\0') break;\n        } while (cVar7 != '/');\n        pcVar4 = pcVar2 + iVar3;\n      }" { (expression_statement "suffind = 1;" (assignment_expression "suffind = 1" identifier = number_literal) ;) (do_statement "do {\n          iVar3 = suffind;\n          pcVar2[iVar3 + -1] = cVar7;\n          cVar7 = filename[iVar3 + 1];\n          suffind = iVar3 + 1;\n          if (cVar7 == '\0') break;\n        } while (cVar7 != '/');" do (compound_statement "{\n          iVar3 = suffind;\n          pcVar2[iVar3 + -1] = cVar7;\n          cVar7 = filename[iVar3 + 1];\n          suffind = iVar3 + 1;\n          if (cVar7 == '\0') break;\n        }" { (expression_statement "iVar3 = suffind;" (assignment_expression "iVar3 = suffind" identifier = identifier) ;) (expression_statement "pcVar2[iVar3 + -1] = cVar7;" (assignment_expression "pcVar2[iVar3 + -1] = cVar7" (subscript_expression "pcVar2[iVar3 + -1]" identifier [ (binary_expression "iVar3 + -1" identifier + number_literal) ]) = identifier) ;) (expression_statement "cVar7 = filename[iVar3 + 1];" (assignment_expression "cVar7 = filename[iVar3 + 1]" identifier = (subscript_expression "filename[iVar3 + 1]" identifier [ (binary_expression "iVar3 + 1" identifier + number_literal) ])) ;) (expression_statement "suffind = iVar3 + 1;" (assignment_expression "suffind = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (if_statement "if (cVar7 == '\0') break;" if (parenthesized_expression "(cVar7 == '\0')" ( (binary_expression "cVar7 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "(cVar7 != '/')" ( (binary_expression "cVar7 != '/'" identifier != (char_literal "'/'" ' character ')) )) ;) (expression_statement "pcVar4 = pcVar2 + iVar3;" (assignment_expression "pcVar4 = pcVar2 + iVar3" identifier = (binary_expression "pcVar2 + iVar3" identifier + identifier)) ;) }))) (expression_statement "*pcVar4 = '\0';" (assignment_expression "*pcVar4 = '\0'" (pointer_expression "*pcVar4" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (if_statement "if ((tilde_expansion_preexpansion_hook != (tilde_hook_func_t *)0x0) &&\n         (pcVar4 = (*tilde_expansion_preexpansion_hook)(pcVar2), pcVar4 != (char *)0x0)) {\n        pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind);\n        xfree(pcVar2);\n        xfree(pcVar4);\n        return pcVar6;\n      }" if (parenthesized_expression "((tilde_expansion_preexpansion_hook != (tilde_hook_func_t *)0x0) &&\n         (pcVar4 = (*tilde_expansion_preexpansion_hook)(pcVar2), pcVar4 != (char *)0x0))" ( (binary_expression "(tilde_expansion_preexpansion_hook != (tilde_hook_func_t *)0x0) &&\n         (pcVar4 = (*tilde_expansion_preexpansion_hook)(pcVar2), pcVar4 != (char *)0x0)" (parenthesized_expression "(tilde_expansion_preexpansion_hook != (tilde_hook_func_t *)0x0)" ( (binary_expression "tilde_expansion_preexpansion_hook != (tilde_hook_func_t *)0x0" identifier != (cast_expression "(tilde_hook_func_t *)0x0" ( (type_descriptor "tilde_hook_func_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(pcVar4 = (*tilde_expansion_preexpansion_hook)(pcVar2), pcVar4 != (char *)0x0)" ( (comma_expression "pcVar4 = (*tilde_expansion_preexpansion_hook)(pcVar2), pcVar4 != (char *)0x0" (assignment_expression "pcVar4 = (*tilde_expansion_preexpansion_hook)(pcVar2)" identifier = (call_expression "(*tilde_expansion_preexpansion_hook)(pcVar2)" (parenthesized_expression "(*tilde_expansion_preexpansion_hook)" ( (pointer_expression "*tilde_expansion_preexpansion_hook" * identifier) )) (argument_list "(pcVar2)" ( identifier )))) , (binary_expression "pcVar4 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ))) )) (compound_statement "{\n        pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind);\n        xfree(pcVar2);\n        xfree(pcVar4);\n        return pcVar6;\n      }" { (expression_statement "pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind);" (assignment_expression "pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind)" identifier = (call_expression "glue_prefix_and_suffix(pcVar4,filename,suffind)" identifier (argument_list "(pcVar4,filename,suffind)" ( identifier , identifier , identifier )))) ;) (expression_statement "xfree(pcVar2);" (call_expression "xfree(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier ))) ;) (expression_statement "xfree(pcVar4);" (call_expression "xfree(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier ))) ;) (return_statement "return pcVar6;" return identifier ;) })) (expression_statement "ppVar5 = getpwnam(pcVar2);" (assignment_expression "ppVar5 = getpwnam(pcVar2)" identifier = (call_expression "getpwnam(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier )))) ;) (if_statement "if (ppVar5 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (tilde_hook_func_t *)0x0) &&\n           (pcVar4 = (*tilde_expansion_failure_hook)(pcVar2), pcVar4 != (char *)0x0)) {\n          pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind);\n          xfree(pcVar4);\n          if (pcVar6 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(filename);\n        pcVar4 = (char *)xmalloc(sVar1 + 1);\n        pcVar6 = strcpy(pcVar4,filename);\n      }\n      else {\n        pcVar6 = glue_prefix_and_suffix(ppVar5->pw_dir,filename,suffind);\n      }" if (parenthesized_expression "(ppVar5 == (passwd *)0x0)" ( (binary_expression "ppVar5 == (passwd *)0x0" identifier == (cast_expression "(passwd *)0x0" ( (type_descriptor "passwd *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        if ((tilde_expansion_failure_hook != (tilde_hook_func_t *)0x0) &&\n           (pcVar4 = (*tilde_expansion_failure_hook)(pcVar2), pcVar4 != (char *)0x0)) {\n          pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind);\n          xfree(pcVar4);\n          if (pcVar6 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(filename);\n        pcVar4 = (char *)xmalloc(sVar1 + 1);\n        pcVar6 = strcpy(pcVar4,filename);\n      }" { (if_statement "if ((tilde_expansion_failure_hook != (tilde_hook_func_t *)0x0) &&\n           (pcVar4 = (*tilde_expansion_failure_hook)(pcVar2), pcVar4 != (char *)0x0)) {\n          pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind);\n          xfree(pcVar4);\n          if (pcVar6 != (char *)0x0) goto LAB_000eae57;\n        }" if (parenthesized_expression "((tilde_expansion_failure_hook != (tilde_hook_func_t *)0x0) &&\n           (pcVar4 = (*tilde_expansion_failure_hook)(pcVar2), pcVar4 != (char *)0x0))" ( (binary_expression "(tilde_expansion_failure_hook != (tilde_hook_func_t *)0x0) &&\n           (pcVar4 = (*tilde_expansion_failure_hook)(pcVar2), pcVar4 != (char *)0x0)" (parenthesized_expression "(tilde_expansion_failure_hook != (tilde_hook_func_t *)0x0)" ( (binary_expression "tilde_expansion_failure_hook != (tilde_hook_func_t *)0x0" identifier != (cast_expression "(tilde_hook_func_t *)0x0" ( (type_descriptor "tilde_hook_func_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(pcVar4 = (*tilde_expansion_failure_hook)(pcVar2), pcVar4 != (char *)0x0)" ( (comma_expression "pcVar4 = (*tilde_expansion_failure_hook)(pcVar2), pcVar4 != (char *)0x0" (assignment_expression "pcVar4 = (*tilde_expansion_failure_hook)(pcVar2)" identifier = (call_expression "(*tilde_expansion_failure_hook)(pcVar2)" (parenthesized_expression "(*tilde_expansion_failure_hook)" ( (pointer_expression "*tilde_expansion_failure_hook" * identifier) )) (argument_list "(pcVar2)" ( identifier )))) , (binary_expression "pcVar4 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ))) )) (compound_statement "{\n          pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind);\n          xfree(pcVar4);\n          if (pcVar6 != (char *)0x0) goto LAB_000eae57;\n        }" { (expression_statement "pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind);" (assignment_expression "pcVar6 = glue_prefix_and_suffix(pcVar4,filename,suffind)" identifier = (call_expression "glue_prefix_and_suffix(pcVar4,filename,suffind)" identifier (argument_list "(pcVar4,filename,suffind)" ( identifier , identifier , identifier )))) ;) (expression_statement "xfree(pcVar4);" (call_expression "xfree(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier ))) ;) (if_statement "if (pcVar6 != (char *)0x0) goto LAB_000eae57;" if (parenthesized_expression "(pcVar6 != (char *)0x0)" ( (binary_expression "pcVar6 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_000eae57;" goto statement_identifier ;)) })) (expression_statement "sVar1 = strlen(filename);" (assignment_expression "sVar1 = strlen(filename)" identifier = (call_expression "strlen(filename)" identifier (argument_list "(filename)" ( identifier )))) ;) (expression_statement "pcVar4 = (char *)xmalloc(sVar1 + 1);" (assignment_expression "pcVar4 = (char *)xmalloc(sVar1 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar1 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar1 + 1)" identifier (argument_list "(sVar1 + 1)" ( (binary_expression "sVar1 + 1" identifier + number_literal) ))))) ;) (expression_statement "pcVar6 = strcpy(pcVar4,filename);" (assignment_expression "pcVar6 = strcpy(pcVar4,filename)" identifier = (call_expression "strcpy(pcVar4,filename)" identifier (argument_list "(pcVar4,filename)" ( identifier , identifier )))) ;) }) (else_clause "else {\n        pcVar6 = glue_prefix_and_suffix(ppVar5->pw_dir,filename,suffind);\n      }" else (compound_statement "{\n        pcVar6 = glue_prefix_and_suffix(ppVar5->pw_dir,filename,suffind);\n      }" { (expression_statement "pcVar6 = glue_prefix_and_suffix(ppVar5->pw_dir,filename,suffind);" (assignment_expression "pcVar6 = glue_prefix_and_suffix(ppVar5->pw_dir,filename,suffind)" identifier = (call_expression "glue_prefix_and_suffix(ppVar5->pw_dir,filename,suffind)" identifier (argument_list "(ppVar5->pw_dir,filename,suffind)" ( (field_expression "ppVar5->pw_dir" identifier -> field_identifier) , identifier , identifier )))) ;) }))) (labeled_statement "LAB_000eae57:\n      xfree(pcVar2);" statement_identifier : (expression_statement "xfree(pcVar2);" (call_expression "xfree(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier ))) ;)) (expression_statement "endpwent();" (call_expression "endpwent()" identifier (argument_list "()" ( ))) ;) (return_statement "return pcVar6;" return identifier ;) })) (expression_statement "sVar1 = strlen(filename);" (assignment_expression "sVar1 = strlen(filename)" identifier = (call_expression "strlen(filename)" identifier (argument_list "(filename)" ( identifier )))) ;) (expression_statement "pcVar2 = (char *)xmalloc(sVar1 + 1);" (assignment_expression "pcVar2 = (char *)xmalloc(sVar1 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar1 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar1 + 1)" identifier (argument_list "(sVar1 + 1)" ( (binary_expression "sVar1 + 1" identifier + number_literal) ))))) ;) (expression_statement "pcVar2 = strcpy(pcVar2,filename);" (assignment_expression "pcVar2 = strcpy(pcVar2,filename)" identifier = (call_expression "strcpy(pcVar2,filename)" identifier (argument_list "(pcVar2,filename)" ( identifier , identifier )))) ;) }))) (return_statement "return pcVar2;" return identifier ;) })))
(translation_unit "char * tilde_expand_word(char *param_1)\n\n{\n  size_t sVar1;\n  char *__name;\n  int iVar2;\n  int iVar3;\n  passwd *ppVar4;\n  char *pcVar5;\n  char cVar6;\n  \n  if (param_1 == (char *)0x0) {\n    pcVar5 = (char *)0x0;\n  }\n  else {\n    if (*param_1 == '~') {\n      if ((param_1[1] == '\0') || (param_1[1] == '/')) {\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }\n      sVar1 = strlen(param_1);\n      __name = (char *)xmalloc(sVar1);\n      cVar6 = param_1[1];\n      pcVar5 = __name;\n      if ((cVar6 != '\0') && (cVar6 != '/')) {\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }\n      *pcVar5 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }\n      ppVar4 = getpwnam(__name);\n      if (ppVar4 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }\n      else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }\nLAB_000eae57:\n      xfree(__name);\n      endpwent();\n      return pcVar5;\n    }\n    sVar1 = strlen(param_1);\n    pcVar5 = (char *)xmalloc(sVar1 + 1);\n    pcVar5 = strcpy(pcVar5,param_1);\n  }\n  return pcVar5;\n}\n\n" (function_definition "char * tilde_expand_word(char *param_1)\n\n{\n  size_t sVar1;\n  char *__name;\n  int iVar2;\n  int iVar3;\n  passwd *ppVar4;\n  char *pcVar5;\n  char cVar6;\n  \n  if (param_1 == (char *)0x0) {\n    pcVar5 = (char *)0x0;\n  }\n  else {\n    if (*param_1 == '~') {\n      if ((param_1[1] == '\0') || (param_1[1] == '/')) {\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }\n      sVar1 = strlen(param_1);\n      __name = (char *)xmalloc(sVar1);\n      cVar6 = param_1[1];\n      pcVar5 = __name;\n      if ((cVar6 != '\0') && (cVar6 != '/')) {\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }\n      *pcVar5 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }\n      ppVar4 = getpwnam(__name);\n      if (ppVar4 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }\n      else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }\nLAB_000eae57:\n      xfree(__name);\n      endpwent();\n      return pcVar5;\n    }\n    sVar1 = strlen(param_1);\n    pcVar5 = (char *)xmalloc(sVar1 + 1);\n    pcVar5 = strcpy(pcVar5,param_1);\n  }\n  return pcVar5;\n}" primitive_type (pointer_declarator "* tilde_expand_word(char *param_1)" * (function_declarator "tilde_expand_word(char *param_1)" identifier (parameter_list "(char *param_1)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) )))) (compound_statement "{\n  size_t sVar1;\n  char *__name;\n  int iVar2;\n  int iVar3;\n  passwd *ppVar4;\n  char *pcVar5;\n  char cVar6;\n  \n  if (param_1 == (char *)0x0) {\n    pcVar5 = (char *)0x0;\n  }\n  else {\n    if (*param_1 == '~') {\n      if ((param_1[1] == '\0') || (param_1[1] == '/')) {\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }\n      sVar1 = strlen(param_1);\n      __name = (char *)xmalloc(sVar1);\n      cVar6 = param_1[1];\n      pcVar5 = __name;\n      if ((cVar6 != '\0') && (cVar6 != '/')) {\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }\n      *pcVar5 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }\n      ppVar4 = getpwnam(__name);\n      if (ppVar4 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }\n      else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }\nLAB_000eae57:\n      xfree(__name);\n      endpwent();\n      return pcVar5;\n    }\n    sVar1 = strlen(param_1);\n    pcVar5 = (char *)xmalloc(sVar1 + 1);\n    pcVar5 = strcpy(pcVar5,param_1);\n  }\n  return pcVar5;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "char *__name;" primitive_type (pointer_declarator "*__name" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "passwd *ppVar4;" type_identifier (pointer_declarator "*ppVar4" * identifier) ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "char cVar6;" primitive_type identifier ;) (if_statement "if (param_1 == (char *)0x0) {\n    pcVar5 = (char *)0x0;\n  }\n  else {\n    if (*param_1 == '~') {\n      if ((param_1[1] == '\0') || (param_1[1] == '/')) {\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }\n      sVar1 = strlen(param_1);\n      __name = (char *)xmalloc(sVar1);\n      cVar6 = param_1[1];\n      pcVar5 = __name;\n      if ((cVar6 != '\0') && (cVar6 != '/')) {\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }\n      *pcVar5 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }\n      ppVar4 = getpwnam(__name);\n      if (ppVar4 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }\n      else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }\nLAB_000eae57:\n      xfree(__name);\n      endpwent();\n      return pcVar5;\n    }\n    sVar1 = strlen(param_1);\n    pcVar5 = (char *)xmalloc(sVar1 + 1);\n    pcVar5 = strcpy(pcVar5,param_1);\n  }" if (parenthesized_expression "(param_1 == (char *)0x0)" ( (binary_expression "param_1 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar5 = (char *)0x0;\n  }" { (expression_statement "pcVar5 = (char *)0x0;" (assignment_expression "pcVar5 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    if (*param_1 == '~') {\n      if ((param_1[1] == '\0') || (param_1[1] == '/')) {\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }\n      sVar1 = strlen(param_1);\n      __name = (char *)xmalloc(sVar1);\n      cVar6 = param_1[1];\n      pcVar5 = __name;\n      if ((cVar6 != '\0') && (cVar6 != '/')) {\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }\n      *pcVar5 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }\n      ppVar4 = getpwnam(__name);\n      if (ppVar4 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }\n      else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }\nLAB_000eae57:\n      xfree(__name);\n      endpwent();\n      return pcVar5;\n    }\n    sVar1 = strlen(param_1);\n    pcVar5 = (char *)xmalloc(sVar1 + 1);\n    pcVar5 = strcpy(pcVar5,param_1);\n  }" else (compound_statement "{\n    if (*param_1 == '~') {\n      if ((param_1[1] == '\0') || (param_1[1] == '/')) {\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }\n      sVar1 = strlen(param_1);\n      __name = (char *)xmalloc(sVar1);\n      cVar6 = param_1[1];\n      pcVar5 = __name;\n      if ((cVar6 != '\0') && (cVar6 != '/')) {\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }\n      *pcVar5 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }\n      ppVar4 = getpwnam(__name);\n      if (ppVar4 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }\n      else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }\nLAB_000eae57:\n      xfree(__name);\n      endpwent();\n      return pcVar5;\n    }\n    sVar1 = strlen(param_1);\n    pcVar5 = (char *)xmalloc(sVar1 + 1);\n    pcVar5 = strcpy(pcVar5,param_1);\n  }" { (if_statement "if (*param_1 == '~') {\n      if ((param_1[1] == '\0') || (param_1[1] == '/')) {\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }\n      sVar1 = strlen(param_1);\n      __name = (char *)xmalloc(sVar1);\n      cVar6 = param_1[1];\n      pcVar5 = __name;\n      if ((cVar6 != '\0') && (cVar6 != '/')) {\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }\n      *pcVar5 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }\n      ppVar4 = getpwnam(__name);\n      if (ppVar4 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }\n      else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }\nLAB_000eae57:\n      xfree(__name);\n      endpwent();\n      return pcVar5;\n    }" if (parenthesized_expression "(*param_1 == '~')" ( (binary_expression "*param_1 == '~'" (pointer_expression "*param_1" * identifier) == (char_literal "'~'" ' character ')) )) (compound_statement "{\n      if ((param_1[1] == '\0') || (param_1[1] == '/')) {\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }\n      sVar1 = strlen(param_1);\n      __name = (char *)xmalloc(sVar1);\n      cVar6 = param_1[1];\n      pcVar5 = __name;\n      if ((cVar6 != '\0') && (cVar6 != '/')) {\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }\n      *pcVar5 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }\n      ppVar4 = getpwnam(__name);\n      if (ppVar4 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }\n      else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }\nLAB_000eae57:\n      xfree(__name);\n      endpwent();\n      return pcVar5;\n    }" { (if_statement "if ((param_1[1] == '\0') || (param_1[1] == '/')) {\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }" if (parenthesized_expression "((param_1[1] == '\0') || (param_1[1] == '/'))" ( (binary_expression "(param_1[1] == '\0') || (param_1[1] == '/')" (parenthesized_expression "(param_1[1] == '\0')" ( (binary_expression "param_1[1] == '\0'" (subscript_expression "param_1[1]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) || (parenthesized_expression "(param_1[1] == '/')" ( (binary_expression "param_1[1] == '/'" (subscript_expression "param_1[1]" identifier [ number_literal ]) == (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }" { (expression_statement "iVar3 = sh_get_env_value(&DAT_000ed68b);" (assignment_expression "iVar3 = sh_get_env_value(&DAT_000ed68b)" identifier = (call_expression "sh_get_env_value(&DAT_000ed68b)" identifier (argument_list "(&DAT_000ed68b)" ( (pointer_expression "&DAT_000ed68b" & identifier) )))) ;) (if_statement "if (iVar3 == 0) {\n          sh_get_home_dir();\n        }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n          sh_get_home_dir();\n        }" { (expression_statement "sh_get_home_dir();" (call_expression "sh_get_home_dir()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "pcVar5 = (char *)FUN_000eacf0();" (assignment_expression "pcVar5 = (char *)FUN_000eacf0()" identifier = (cast_expression "(char *)FUN_000eacf0()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_000eacf0()" identifier (argument_list "()" ( ))))) ;) (return_statement "return pcVar5;" return identifier ;) })) (expression_statement "sVar1 = strlen(param_1);" (assignment_expression "sVar1 = strlen(param_1)" identifier = (call_expression "strlen(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "__name = (char *)xmalloc(sVar1);" (assignment_expression "__name = (char *)xmalloc(sVar1)" identifier = (cast_expression "(char *)xmalloc(sVar1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar1)" identifier (argument_list "(sVar1)" ( identifier ))))) ;) (expression_statement "cVar6 = param_1[1];" (assignment_expression "cVar6 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "pcVar5 = __name;" (assignment_expression "pcVar5 = __name" identifier = identifier) ;) (if_statement "if ((cVar6 != '\0') && (cVar6 != '/')) {\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }" if (parenthesized_expression "((cVar6 != '\0') && (cVar6 != '/'))" ( (binary_expression "(cVar6 != '\0') && (cVar6 != '/')" (parenthesized_expression "(cVar6 != '\0')" ( (binary_expression "cVar6 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(cVar6 != '/')" ( (binary_expression "cVar6 != '/'" identifier != (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }" { (expression_statement "iVar3 = 1;" (assignment_expression "iVar3 = 1" identifier = number_literal) ;) (do_statement "do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');" do (compound_statement "{\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        }" { (expression_statement "iVar2 = iVar3;" (assignment_expression "iVar2 = iVar3" identifier = identifier) ;) (expression_statement "__name[iVar2 + -1] = cVar6;" (assignment_expression "__name[iVar2 + -1] = cVar6" (subscript_expression "__name[iVar2 + -1]" identifier [ (binary_expression "iVar2 + -1" identifier + number_literal) ]) = identifier) ;) (expression_statement "cVar6 = param_1[iVar2 + 1];" (assignment_expression "cVar6 = param_1[iVar2 + 1]" identifier = (subscript_expression "param_1[iVar2 + 1]" identifier [ (binary_expression "iVar2 + 1" identifier + number_literal) ])) ;) (if_statement "if (cVar6 == '\0') break;" if (parenthesized_expression "(cVar6 == '\0')" ( (binary_expression "cVar6 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (break_statement "break;" break ;)) (expression_statement "iVar3 = iVar2 + 1;" (assignment_expression "iVar3 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(cVar6 != '/')" ( (binary_expression "cVar6 != '/'" identifier != (char_literal "'/'" ' character ')) )) ;) (expression_statement "pcVar5 = __name + iVar2;" (assignment_expression "pcVar5 = __name + iVar2" identifier = (binary_expression "__name + iVar2" identifier + identifier)) ;) })) (expression_statement "*pcVar5 = '\0';" (assignment_expression "*pcVar5 = '\0'" (pointer_expression "*pcVar5" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (if_statement "if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }" if (parenthesized_expression "((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0))" ( (binary_expression "(tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)" (parenthesized_expression "(tilde_expansion_preexpansion_hook != (code *)0x0)" ( (binary_expression "tilde_expansion_preexpansion_hook != (code *)0x0" identifier != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)" ( (comma_expression "iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0" (assignment_expression "iVar3 = (*tilde_expansion_preexpansion_hook)(__name)" identifier = (call_expression "(*tilde_expansion_preexpansion_hook)(__name)" (parenthesized_expression "(*tilde_expansion_preexpansion_hook)" ( (pointer_expression "*tilde_expansion_preexpansion_hook" * identifier) )) (argument_list "(__name)" ( identifier )))) , (binary_expression "iVar3 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }" { (expression_statement "pcVar5 = (char *)FUN_000eacf0();" (assignment_expression "pcVar5 = (char *)FUN_000eacf0()" identifier = (cast_expression "(char *)FUN_000eacf0()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_000eacf0()" identifier (argument_list "()" ( ))))) ;) (expression_statement "xfree(__name);" (call_expression "xfree(__name)" identifier (argument_list "(__name)" ( identifier ))) ;) (expression_statement "xfree(iVar3);" (call_expression "xfree(iVar3)" identifier (argument_list "(iVar3)" ( identifier ))) ;) (return_statement "return pcVar5;" return identifier ;) })) (expression_statement "ppVar4 = getpwnam(__name);" (assignment_expression "ppVar4 = getpwnam(__name)" identifier = (call_expression "getpwnam(__name)" identifier (argument_list "(__name)" ( identifier )))) ;) (if_statement "if (ppVar4 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }\n      else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }" if (parenthesized_expression "(ppVar4 == (passwd *)0x0)" ( (binary_expression "ppVar4 == (passwd *)0x0" identifier == (cast_expression "(passwd *)0x0" ( (type_descriptor "passwd *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }" { (if_statement "if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }" if (parenthesized_expression "((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0))" ( (binary_expression "(tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)" (parenthesized_expression "(tilde_expansion_failure_hook != (code *)0x0)" ( (binary_expression "tilde_expansion_failure_hook != (code *)0x0" identifier != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)" ( (comma_expression "iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0" (assignment_expression "iVar3 = (*tilde_expansion_failure_hook)(__name)" identifier = (call_expression "(*tilde_expansion_failure_hook)(__name)" (parenthesized_expression "(*tilde_expansion_failure_hook)" ( (pointer_expression "*tilde_expansion_failure_hook" * identifier) )) (argument_list "(__name)" ( identifier )))) , (binary_expression "iVar3 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }" { (expression_statement "pcVar5 = (char *)FUN_000eacf0();" (assignment_expression "pcVar5 = (char *)FUN_000eacf0()" identifier = (cast_expression "(char *)FUN_000eacf0()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_000eacf0()" identifier (argument_list "()" ( ))))) ;) (expression_statement "xfree(iVar3);" (call_expression "xfree(iVar3)" identifier (argument_list "(iVar3)" ( identifier ))) ;) (if_statement "if (pcVar5 != (char *)0x0) goto LAB_000eae57;" if (parenthesized_expression "(pcVar5 != (char *)0x0)" ( (binary_expression "pcVar5 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_000eae57;" goto statement_identifier ;)) })) (expression_statement "sVar1 = strlen(param_1);" (assignment_expression "sVar1 = strlen(param_1)" identifier = (call_expression "strlen(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "pcVar5 = (char *)xmalloc(sVar1 + 1);" (assignment_expression "pcVar5 = (char *)xmalloc(sVar1 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar1 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar1 + 1)" identifier (argument_list "(sVar1 + 1)" ( (binary_expression "sVar1 + 1" identifier + number_literal) ))))) ;) (expression_statement "pcVar5 = strcpy(pcVar5,param_1);" (assignment_expression "pcVar5 = strcpy(pcVar5,param_1)" identifier = (call_expression "strcpy(pcVar5,param_1)" identifier (argument_list "(pcVar5,param_1)" ( identifier , identifier )))) ;) }) (else_clause "else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }" else (compound_statement "{\n        pcVar5 = (char *)FUN_000eacf0();\n      }" { (expression_statement "pcVar5 = (char *)FUN_000eacf0();" (assignment_expression "pcVar5 = (char *)FUN_000eacf0()" identifier = (cast_expression "(char *)FUN_000eacf0()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_000eacf0()" identifier (argument_list "()" ( ))))) ;) }))) (labeled_statement "LAB_000eae57:\n      xfree(__name);" statement_identifier : (expression_statement "xfree(__name);" (call_expression "xfree(__name)" identifier (argument_list "(__name)" ( identifier ))) ;)) (expression_statement "endpwent();" (call_expression "endpwent()" identifier (argument_list "()" ( ))) ;) (return_statement "return pcVar5;" return identifier ;) })) (expression_statement "sVar1 = strlen(param_1);" (assignment_expression "sVar1 = strlen(param_1)" identifier = (call_expression "strlen(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "pcVar5 = (char *)xmalloc(sVar1 + 1);" (assignment_expression "pcVar5 = (char *)xmalloc(sVar1 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar1 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar1 + 1)" identifier (argument_list "(sVar1 + 1)" ( (binary_expression "sVar1 + 1" identifier + number_literal) ))))) ;) (expression_statement "pcVar5 = strcpy(pcVar5,param_1);" (assignment_expression "pcVar5 = strcpy(pcVar5,param_1)" identifier = (call_expression "strcpy(pcVar5,param_1)" identifier (argument_list "(pcVar5,param_1)" ( identifier , identifier )))) ;) }))) (return_statement "return pcVar5;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * 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 == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' character ')) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == (char_literal ' escape_sequence ')) )) || (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == (char_literal ' character ')) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (return_statement return IDENT ;) })) (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 ( IDENT ))))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) )) && (parenthesized_expression ( (binary_expression IDENT != (char_literal ' character ')) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ (binary_expression IDENT + LIT) ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ (binary_expression IDENT + LIT) ])) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (char_literal ' character ')) )) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = (char_literal ' escape_sequence ')) ;) (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 (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT )))) , (binary_expression IDENT != LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (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 { (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 (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT )))) , (binary_expression IDENT != LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (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)) )) (goto_statement goto statement_identifier ;)) })) (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 )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) }))) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;)) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return IDENT ;) })) (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 )))) ;) }))) (return_statement return IDENT ;) })))
(function_definition "char * tilde_expand_word(char *param_1)\n\n{\n  size_t sVar1;\n  char *__name;\n  int iVar2;\n  int iVar3;\n  passwd *ppVar4;\n  char *pcVar5;\n  char cVar6;\n  \n  if (param_1 == (char *)0x0) {\n    pcVar5 = (char *)0x0;\n  }\n  else {\n    if (*param_1 == '~') {\n      if ((param_1[1] == '\0') || (param_1[1] == '/')) {\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }\n      sVar1 = strlen(param_1);\n      __name = (char *)xmalloc(sVar1);\n      cVar6 = param_1[1];\n      pcVar5 = __name;\n      if ((cVar6 != '\0') && (cVar6 != '/')) {\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }\n      *pcVar5 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }\n      ppVar4 = getpwnam(__name);\n      if (ppVar4 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }\n      else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }\nLAB_000eae57:\n      xfree(__name);\n      endpwent();\n      return pcVar5;\n    }\n    sVar1 = strlen(param_1);\n    pcVar5 = (char *)xmalloc(sVar1 + 1);\n    pcVar5 = strcpy(pcVar5,param_1);\n  }\n  return pcVar5;\n}" (primitive_type "char") (pointer_declarator "* tilde_expand_word(char *param_1)" (* "*") (function_declarator "tilde_expand_word(char *param_1)" (identifier "tilde_expand_word") (parameter_list "(char *param_1)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")")))) (compound_statement "{\n  size_t sVar1;\n  char *__name;\n  int iVar2;\n  int iVar3;\n  passwd *ppVar4;\n  char *pcVar5;\n  char cVar6;\n  \n  if (param_1 == (char *)0x0) {\n    pcVar5 = (char *)0x0;\n  }\n  else {\n    if (*param_1 == '~') {\n      if ((param_1[1] == '\0') || (param_1[1] == '/')) {\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }\n      sVar1 = strlen(param_1);\n      __name = (char *)xmalloc(sVar1);\n      cVar6 = param_1[1];\n      pcVar5 = __name;\n      if ((cVar6 != '\0') && (cVar6 != '/')) {\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }\n      *pcVar5 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }\n      ppVar4 = getpwnam(__name);\n      if (ppVar4 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }\n      else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }\nLAB_000eae57:\n      xfree(__name);\n      endpwent();\n      return pcVar5;\n    }\n    sVar1 = strlen(param_1);\n    pcVar5 = (char *)xmalloc(sVar1 + 1);\n    pcVar5 = strcpy(pcVar5,param_1);\n  }\n  return pcVar5;\n}" ({ "{") (declaration "size_t sVar1;" (primitive_type "size_t") (identifier "sVar1") (; ";")) (declaration "char *__name;" (primitive_type "char") (pointer_declarator "*__name" (* "*") (identifier "__name")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "passwd *ppVar4;" (type_identifier "passwd") (pointer_declarator "*ppVar4" (* "*") (identifier "ppVar4")) (; ";")) (declaration "char *pcVar5;" (primitive_type "char") (pointer_declarator "*pcVar5" (* "*") (identifier "pcVar5")) (; ";")) (declaration "char cVar6;" (primitive_type "char") (identifier "cVar6") (; ";")) (if_statement "if (param_1 == (char *)0x0) {\n    pcVar5 = (char *)0x0;\n  }\n  else {\n    if (*param_1 == '~') {\n      if ((param_1[1] == '\0') || (param_1[1] == '/')) {\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }\n      sVar1 = strlen(param_1);\n      __name = (char *)xmalloc(sVar1);\n      cVar6 = param_1[1];\n      pcVar5 = __name;\n      if ((cVar6 != '\0') && (cVar6 != '/')) {\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }\n      *pcVar5 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }\n      ppVar4 = getpwnam(__name);\n      if (ppVar4 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }\n      else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }\nLAB_000eae57:\n      xfree(__name);\n      endpwent();\n      return pcVar5;\n    }\n    sVar1 = strlen(param_1);\n    pcVar5 = (char *)xmalloc(sVar1 + 1);\n    pcVar5 = strcpy(pcVar5,param_1);\n  }" (if "if") (parenthesized_expression "(param_1 == (char *)0x0)" (( "(") (binary_expression "param_1 == (char *)0x0" (identifier "param_1") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    pcVar5 = (char *)0x0;\n  }" ({ "{") (expression_statement "pcVar5 = (char *)0x0;" (assignment_expression "pcVar5 = (char *)0x0" (identifier "pcVar5") (= "=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (} "}")) (else_clause "else {\n    if (*param_1 == '~') {\n      if ((param_1[1] == '\0') || (param_1[1] == '/')) {\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }\n      sVar1 = strlen(param_1);\n      __name = (char *)xmalloc(sVar1);\n      cVar6 = param_1[1];\n      pcVar5 = __name;\n      if ((cVar6 != '\0') && (cVar6 != '/')) {\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }\n      *pcVar5 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }\n      ppVar4 = getpwnam(__name);\n      if (ppVar4 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }\n      else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }\nLAB_000eae57:\n      xfree(__name);\n      endpwent();\n      return pcVar5;\n    }\n    sVar1 = strlen(param_1);\n    pcVar5 = (char *)xmalloc(sVar1 + 1);\n    pcVar5 = strcpy(pcVar5,param_1);\n  }" (else "else") (compound_statement "{\n    if (*param_1 == '~') {\n      if ((param_1[1] == '\0') || (param_1[1] == '/')) {\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }\n      sVar1 = strlen(param_1);\n      __name = (char *)xmalloc(sVar1);\n      cVar6 = param_1[1];\n      pcVar5 = __name;\n      if ((cVar6 != '\0') && (cVar6 != '/')) {\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }\n      *pcVar5 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }\n      ppVar4 = getpwnam(__name);\n      if (ppVar4 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }\n      else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }\nLAB_000eae57:\n      xfree(__name);\n      endpwent();\n      return pcVar5;\n    }\n    sVar1 = strlen(param_1);\n    pcVar5 = (char *)xmalloc(sVar1 + 1);\n    pcVar5 = strcpy(pcVar5,param_1);\n  }" ({ "{") (if_statement "if (*param_1 == '~') {\n      if ((param_1[1] == '\0') || (param_1[1] == '/')) {\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }\n      sVar1 = strlen(param_1);\n      __name = (char *)xmalloc(sVar1);\n      cVar6 = param_1[1];\n      pcVar5 = __name;\n      if ((cVar6 != '\0') && (cVar6 != '/')) {\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }\n      *pcVar5 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }\n      ppVar4 = getpwnam(__name);\n      if (ppVar4 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }\n      else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }\nLAB_000eae57:\n      xfree(__name);\n      endpwent();\n      return pcVar5;\n    }" (if "if") (parenthesized_expression "(*param_1 == '~')" (( "(") (binary_expression "*param_1 == '~'" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (== "==") (char_literal "'~'" (' "'") (character "~") (' "'"))) () ")")) (compound_statement "{\n      if ((param_1[1] == '\0') || (param_1[1] == '/')) {\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }\n      sVar1 = strlen(param_1);\n      __name = (char *)xmalloc(sVar1);\n      cVar6 = param_1[1];\n      pcVar5 = __name;\n      if ((cVar6 != '\0') && (cVar6 != '/')) {\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }\n      *pcVar5 = '\0';\n      if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }\n      ppVar4 = getpwnam(__name);\n      if (ppVar4 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }\n      else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }\nLAB_000eae57:\n      xfree(__name);\n      endpwent();\n      return pcVar5;\n    }" ({ "{") (if_statement "if ((param_1[1] == '\0') || (param_1[1] == '/')) {\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }" (if "if") (parenthesized_expression "((param_1[1] == '\0') || (param_1[1] == '/'))" (( "(") (binary_expression "(param_1[1] == '\0') || (param_1[1] == '/')" (parenthesized_expression "(param_1[1] == '\0')" (( "(") (binary_expression "param_1[1] == '\0'" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (|| "||") (parenthesized_expression "(param_1[1] == '/')" (( "(") (binary_expression "param_1[1] == '/'" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (== "==") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")"))) () ")")) (compound_statement "{\n        iVar3 = sh_get_env_value(&DAT_000ed68b);\n        if (iVar3 == 0) {\n          sh_get_home_dir();\n        }\n        pcVar5 = (char *)FUN_000eacf0();\n        return pcVar5;\n      }" ({ "{") (expression_statement "iVar3 = sh_get_env_value(&DAT_000ed68b);" (assignment_expression "iVar3 = sh_get_env_value(&DAT_000ed68b)" (identifier "iVar3") (= "=") (call_expression "sh_get_env_value(&DAT_000ed68b)" (identifier "sh_get_env_value") (argument_list "(&DAT_000ed68b)" (( "(") (pointer_expression "&DAT_000ed68b" (& "&") (identifier "DAT_000ed68b")) () ")")))) (; ";")) (if_statement "if (iVar3 == 0) {\n          sh_get_home_dir();\n        }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          sh_get_home_dir();\n        }" ({ "{") (expression_statement "sh_get_home_dir();" (call_expression "sh_get_home_dir()" (identifier "sh_get_home_dir") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "pcVar5 = (char *)FUN_000eacf0();" (assignment_expression "pcVar5 = (char *)FUN_000eacf0()" (identifier "pcVar5") (= "=") (cast_expression "(char *)FUN_000eacf0()" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_000eacf0()" (identifier "FUN_000eacf0") (argument_list "()" (( "(") () ")"))))) (; ";")) (return_statement "return pcVar5;" (return "return") (identifier "pcVar5") (; ";")) (} "}"))) (expression_statement "sVar1 = strlen(param_1);" (assignment_expression "sVar1 = strlen(param_1)" (identifier "sVar1") (= "=") (call_expression "strlen(param_1)" (identifier "strlen") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "__name = (char *)xmalloc(sVar1);" (assignment_expression "__name = (char *)xmalloc(sVar1)" (identifier "__name") (= "=") (cast_expression "(char *)xmalloc(sVar1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(sVar1)" (identifier "xmalloc") (argument_list "(sVar1)" (( "(") (identifier "sVar1") () ")"))))) (; ";")) (expression_statement "cVar6 = param_1[1];" (assignment_expression "cVar6 = param_1[1]" (identifier "cVar6") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "pcVar5 = __name;" (assignment_expression "pcVar5 = __name" (identifier "pcVar5") (= "=") (identifier "__name")) (; ";")) (if_statement "if ((cVar6 != '\0') && (cVar6 != '/')) {\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }" (if "if") (parenthesized_expression "((cVar6 != '\0') && (cVar6 != '/'))" (( "(") (binary_expression "(cVar6 != '\0') && (cVar6 != '/')" (parenthesized_expression "(cVar6 != '\0')" (( "(") (binary_expression "cVar6 != '\0'" (identifier "cVar6") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (&& "&&") (parenthesized_expression "(cVar6 != '/')" (( "(") (binary_expression "cVar6 != '/'" (identifier "cVar6") (!= "!=") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")"))) () ")")) (compound_statement "{\n        iVar3 = 1;\n        do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');\n        pcVar5 = __name + iVar2;\n      }" ({ "{") (expression_statement "iVar3 = 1;" (assignment_expression "iVar3 = 1" (identifier "iVar3") (= "=") (number_literal "1")) (; ";")) (do_statement "do {\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        } while (cVar6 != '/');" (do "do") (compound_statement "{\n          iVar2 = iVar3;\n          __name[iVar2 + -1] = cVar6;\n          cVar6 = param_1[iVar2 + 1];\n          if (cVar6 == '\0') break;\n          iVar3 = iVar2 + 1;\n        }" ({ "{") (expression_statement "iVar2 = iVar3;" (assignment_expression "iVar2 = iVar3" (identifier "iVar2") (= "=") (identifier "iVar3")) (; ";")) (expression_statement "__name[iVar2 + -1] = cVar6;" (assignment_expression "__name[iVar2 + -1] = cVar6" (subscript_expression "__name[iVar2 + -1]" (identifier "__name") ([ "[") (binary_expression "iVar2 + -1" (identifier "iVar2") (+ "+") (number_literal "-1")) (] "]")) (= "=") (identifier "cVar6")) (; ";")) (expression_statement "cVar6 = param_1[iVar2 + 1];" (assignment_expression "cVar6 = param_1[iVar2 + 1]" (identifier "cVar6") (= "=") (subscript_expression "param_1[iVar2 + 1]" (identifier "param_1") ([ "[") (binary_expression "iVar2 + 1" (identifier "iVar2") (+ "+") (number_literal "1")) (] "]"))) (; ";")) (if_statement "if (cVar6 == '\0') break;" (if "if") (parenthesized_expression "(cVar6 == '\0')" (( "(") (binary_expression "cVar6 == '\0'" (identifier "cVar6") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar3 = iVar2 + 1;" (assignment_expression "iVar3 = iVar2 + 1" (identifier "iVar3") (= "=") (binary_expression "iVar2 + 1" (identifier "iVar2") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(cVar6 != '/')" (( "(") (binary_expression "cVar6 != '/'" (identifier "cVar6") (!= "!=") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")")) (; ";")) (expression_statement "pcVar5 = __name + iVar2;" (assignment_expression "pcVar5 = __name + iVar2" (identifier "pcVar5") (= "=") (binary_expression "__name + iVar2" (identifier "__name") (+ "+") (identifier "iVar2"))) (; ";")) (} "}"))) (expression_statement "*pcVar5 = '\0';" (assignment_expression "*pcVar5 = '\0'" (pointer_expression "*pcVar5" (* "*") (identifier "pcVar5")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (if_statement "if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }" (if "if") (parenthesized_expression "((tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0))" (( "(") (binary_expression "(tilde_expansion_preexpansion_hook != (code *)0x0) &&\n         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)" (parenthesized_expression "(tilde_expansion_preexpansion_hook != (code *)0x0)" (( "(") (binary_expression "tilde_expansion_preexpansion_hook != (code *)0x0" (identifier "tilde_expansion_preexpansion_hook") (!= "!=") (cast_expression "(code *)0x0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)" (( "(") (comma_expression "iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0" (assignment_expression "iVar3 = (*tilde_expansion_preexpansion_hook)(__name)" (identifier "iVar3") (= "=") (call_expression "(*tilde_expansion_preexpansion_hook)(__name)" (parenthesized_expression "(*tilde_expansion_preexpansion_hook)" (( "(") (pointer_expression "*tilde_expansion_preexpansion_hook" (* "*") (identifier "tilde_expansion_preexpansion_hook")) () ")")) (argument_list "(__name)" (( "(") (identifier "__name") () ")")))) (, ",") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n        pcVar5 = (char *)FUN_000eacf0();\n        xfree(__name);\n        xfree(iVar3);\n        return pcVar5;\n      }" ({ "{") (expression_statement "pcVar5 = (char *)FUN_000eacf0();" (assignment_expression "pcVar5 = (char *)FUN_000eacf0()" (identifier "pcVar5") (= "=") (cast_expression "(char *)FUN_000eacf0()" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_000eacf0()" (identifier "FUN_000eacf0") (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "xfree(__name);" (call_expression "xfree(__name)" (identifier "xfree") (argument_list "(__name)" (( "(") (identifier "__name") () ")"))) (; ";")) (expression_statement "xfree(iVar3);" (call_expression "xfree(iVar3)" (identifier "xfree") (argument_list "(iVar3)" (( "(") (identifier "iVar3") () ")"))) (; ";")) (return_statement "return pcVar5;" (return "return") (identifier "pcVar5") (; ";")) (} "}"))) (expression_statement "ppVar4 = getpwnam(__name);" (assignment_expression "ppVar4 = getpwnam(__name)" (identifier "ppVar4") (= "=") (call_expression "getpwnam(__name)" (identifier "getpwnam") (argument_list "(__name)" (( "(") (identifier "__name") () ")")))) (; ";")) (if_statement "if (ppVar4 == (passwd *)0x0) {\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }\n      else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }" (if "if") (parenthesized_expression "(ppVar4 == (passwd *)0x0)" (( "(") (binary_expression "ppVar4 == (passwd *)0x0" (identifier "ppVar4") (== "==") (cast_expression "(passwd *)0x0" (( "(") (type_descriptor "passwd *" (type_identifier "passwd") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }\n        sVar1 = strlen(param_1);\n        pcVar5 = (char *)xmalloc(sVar1 + 1);\n        pcVar5 = strcpy(pcVar5,param_1);\n      }" ({ "{") (if_statement "if ((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }" (if "if") (parenthesized_expression "((tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0))" (( "(") (binary_expression "(tilde_expansion_failure_hook != (code *)0x0) &&\n           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)" (parenthesized_expression "(tilde_expansion_failure_hook != (code *)0x0)" (( "(") (binary_expression "tilde_expansion_failure_hook != (code *)0x0" (identifier "tilde_expansion_failure_hook") (!= "!=") (cast_expression "(code *)0x0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)" (( "(") (comma_expression "iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0" (assignment_expression "iVar3 = (*tilde_expansion_failure_hook)(__name)" (identifier "iVar3") (= "=") (call_expression "(*tilde_expansion_failure_hook)(__name)" (parenthesized_expression "(*tilde_expansion_failure_hook)" (( "(") (pointer_expression "*tilde_expansion_failure_hook" (* "*") (identifier "tilde_expansion_failure_hook")) () ")")) (argument_list "(__name)" (( "(") (identifier "__name") () ")")))) (, ",") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n          pcVar5 = (char *)FUN_000eacf0();\n          xfree(iVar3);\n          if (pcVar5 != (char *)0x0) goto LAB_000eae57;\n        }" ({ "{") (expression_statement "pcVar5 = (char *)FUN_000eacf0();" (assignment_expression "pcVar5 = (char *)FUN_000eacf0()" (identifier "pcVar5") (= "=") (cast_expression "(char *)FUN_000eacf0()" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_000eacf0()" (identifier "FUN_000eacf0") (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "xfree(iVar3);" (call_expression "xfree(iVar3)" (identifier "xfree") (argument_list "(iVar3)" (( "(") (identifier "iVar3") () ")"))) (; ";")) (if_statement "if (pcVar5 != (char *)0x0) goto LAB_000eae57;" (if "if") (parenthesized_expression "(pcVar5 != (char *)0x0)" (( "(") (binary_expression "pcVar5 != (char *)0x0" (identifier "pcVar5") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (goto_statement "goto LAB_000eae57;" (goto "goto") (statement_identifier "LAB_000eae57") (; ";"))) (} "}"))) (expression_statement "sVar1 = strlen(param_1);" (assignment_expression "sVar1 = strlen(param_1)" (identifier "sVar1") (= "=") (call_expression "strlen(param_1)" (identifier "strlen") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "pcVar5 = (char *)xmalloc(sVar1 + 1);" (assignment_expression "pcVar5 = (char *)xmalloc(sVar1 + 1)" (identifier "pcVar5") (= "=") (cast_expression "(char *)xmalloc(sVar1 + 1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(sVar1 + 1)" (identifier "xmalloc") (argument_list "(sVar1 + 1)" (( "(") (binary_expression "sVar1 + 1" (identifier "sVar1") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (expression_statement "pcVar5 = strcpy(pcVar5,param_1);" (assignment_expression "pcVar5 = strcpy(pcVar5,param_1)" (identifier "pcVar5") (= "=") (call_expression "strcpy(pcVar5,param_1)" (identifier "strcpy") (argument_list "(pcVar5,param_1)" (( "(") (identifier "pcVar5") (, ",") (identifier "param_1") () ")")))) (; ";")) (} "}")) (else_clause "else {\n        pcVar5 = (char *)FUN_000eacf0();\n      }" (else "else") (compound_statement "{\n        pcVar5 = (char *)FUN_000eacf0();\n      }" ({ "{") (expression_statement "pcVar5 = (char *)FUN_000eacf0();" (assignment_expression "pcVar5 = (char *)FUN_000eacf0()" (identifier "pcVar5") (= "=") (cast_expression "(char *)FUN_000eacf0()" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_000eacf0()" (identifier "FUN_000eacf0") (argument_list "()" (( "(") () ")"))))) (; ";")) (} "}")))) (labeled_statement "LAB_000eae57:\n      xfree(__name);" (statement_identifier "LAB_000eae57") (: ":") (expression_statement "xfree(__name);" (call_expression "xfree(__name)" (identifier "xfree") (argument_list "(__name)" (( "(") (identifier "__name") () ")"))) (; ";"))) (expression_statement "endpwent();" (call_expression "endpwent()" (identifier "endpwent") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return pcVar5;" (return "return") (identifier "pcVar5") (; ";")) (} "}"))) (expression_statement "sVar1 = strlen(param_1);" (assignment_expression "sVar1 = strlen(param_1)" (identifier "sVar1") (= "=") (call_expression "strlen(param_1)" (identifier "strlen") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "pcVar5 = (char *)xmalloc(sVar1 + 1);" (assignment_expression "pcVar5 = (char *)xmalloc(sVar1 + 1)" (identifier "pcVar5") (= "=") (cast_expression "(char *)xmalloc(sVar1 + 1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(sVar1 + 1)" (identifier "xmalloc") (argument_list "(sVar1 + 1)" (( "(") (binary_expression "sVar1 + 1" (identifier "sVar1") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (expression_statement "pcVar5 = strcpy(pcVar5,param_1);" (assignment_expression "pcVar5 = strcpy(pcVar5,param_1)" (identifier "pcVar5") (= "=") (call_expression "strcpy(pcVar5,param_1)" (identifier "strcpy") (argument_list "(pcVar5,param_1)" (( "(") (identifier "pcVar5") (, ",") (identifier "param_1") () ")")))) (; ";")) (} "}")))) (return_statement "return pcVar5;" (return "return") (identifier "pcVar5") (; ";")) (} "}")))

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

char * function_1(char *var_1)

{
  size_t var_17;
  char *var_3;
  int var_9;
  char *var_11;
  type_1 *var_14;
  char *var_16;
  char var_8;
  int suffind;
  
  if (var_1 == (char *)0x0) {
    var_3 = (char *)0x0;
  }
  else {
    if (*var_1 == '~') {
      if ((var_1[1] == '\0') || (var_1[1] == '/')) {
        var_3 = var_2("HOME");
        if (var_3 == (char *)0x0) {
          var_3 = var_4();
        }
        var_3 = var_5(var_3,var_1,1);
        return var_3;
      }
      var_17 = var_6(var_1);
      var_3 = (char *)var_7(var_17);
      var_8 = var_1[1];
      if ((var_8 == '\0') || (var_8 == '/')) {
        suffind = 1;
        var_11 = var_3;
      }
      else {
        suffind = 1;
        do {
          var_9 = suffind;
          var_3[var_9 + -1] = var_8;
          var_8 = var_1[var_9 + 1];
          suffind = var_9 + 1;
          if (var_8 == '\0') break;
        } while (var_8 != '/');
        var_11 = var_3 + var_9;
      }
      *var_11 = '\0';
      if ((var_10 != (type_2 *)0x0) &&
         (var_11 = (*var_10)(var_3), var_11 != (char *)0x0)) {
        var_16 = var_5(var_11,var_1,suffind);
        var_12(var_3);
        var_12(var_11);
        return var_16;
      }
      var_14 = var_13(var_3);
      if (var_14 == (type_1 *)0x0) {
        if ((var_15 != (type_2 *)0x0) &&
           (var_11 = (*var_15)(var_3), var_11 != (char *)0x0)) {
          var_16 = var_5(var_11,var_1,suffind);
          var_12(var_11);
          if (var_16 != (char *)0x0) goto LAB_000eae57;
        }
        var_17 = var_6(var_1);
        var_11 = (char *)var_7(var_17 + 1);
        var_16 = var_18(var_11,var_1);
      }
      else {
        var_16 = var_5(var_14->pw_dir,var_1,suffind);
      }
LAB_000eae57:
      var_12(var_3);
      var_19();
      return var_16;
    }
    var_17 = var_6(var_1);
    var_3 = (char *)var_7(var_17 + 1);
    var_3 = var_18(var_3,var_1);
  }
  return var_3;
}


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

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

char * MASKED(char *param_1)

{
  size_t sVar1;
  char *__name;
  int iVar2;
  int iVar3;
  passwd *ppVar4;
  char *pcVar5;
  char cVar6;
  
  if (param_1 == (char *)0x0) {
    pcVar5 = (char *)0x0;
  }
  else {
    if (*param_1 == '~') {
      if ((param_1[1] == '\0') || (param_1[1] == '/')) {
        iVar3 = sh_get_env_value(&DAT_000ed68b);
        if (iVar3 == 0) {
          sh_get_home_dir();
        }
        pcVar5 = (char *)FUN_000eacf0();
        return pcVar5;
      }
      sVar1 = strlen(param_1);
      __name = (char *)xmalloc(sVar1);
      cVar6 = param_1[1];
      pcVar5 = __name;
      if ((cVar6 != '\0') && (cVar6 != '/')) {
        iVar3 = 1;
        do {
          iVar2 = iVar3;
          __name[iVar2 + -1] = cVar6;
          cVar6 = param_1[iVar2 + 1];
          if (cVar6 == '\0') break;
          iVar3 = iVar2 + 1;
        } while (cVar6 != '/');
        pcVar5 = __name + iVar2;
      }
      *pcVar5 = '\0';
      if ((tilde_expansion_preexpansion_hook != (code *)0x0) &&
         (iVar3 = (*tilde_expansion_preexpansion_hook)(__name), iVar3 != 0)) {
        pcVar5 = (char *)FUN_000eacf0();
        xfree(__name);
        xfree(iVar3);
        return pcVar5;
      }
      ppVar4 = getpwnam(__name);
      if (ppVar4 == (passwd *)0x0) {
        if ((tilde_expansion_failure_hook != (code *)0x0) &&
           (iVar3 = (*tilde_expansion_failure_hook)(__name), iVar3 != 0)) {
          pcVar5 = (char *)FUN_000eacf0();
          xfree(iVar3);
          if (pcVar5 != (char *)0x0) goto LAB_000eae57;
        }
        sVar1 = strlen(param_1);
        pcVar5 = (char *)xmalloc(sVar1 + 1);
        pcVar5 = strcpy(pcVar5,param_1);
      }
      else {
        pcVar5 = (char *)FUN_000eacf0();
      }
LAB_000eae57:
      xfree(__name);
      endpwent();
      return pcVar5;
    }
    sVar1 = strlen(param_1);
    pcVar5 = (char *)xmalloc(sVar1 + 1);
    pcVar5 = strcpy(pcVar5,param_1);
  }
  return pcVar5;
}

