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

char * sh_makepath(char *path,char *dir,int flags)

{
  size_t sVar1;
  size_t sVar2;
  char *pcVar3;
  char *pcVar4;
  char cVar5;
  char *pcVar6;
  char *pcVar7;
  int iVar9;
  char *local_24;
  bool local_1d;
  char *pcVar8;
  
  if ((path != (char *)0x0) && (cVar5 = *path, cVar5 != '\0')) {
    if (((flags & 8U) == 0) || (cVar5 != '.')) {
      local_1d = (bool)(cVar5 == '~' & (byte)flags);
      if (local_1d != false) {
        pcVar4 = bash_tilde_expand(path,0);
        local_1d = path != pcVar4 && pcVar4 != "";
        path = pcVar4;
      }
    }
    else {
      local_1d = false;
      if ((path[1] == '\0') || ((path[1] == '/' && (path[2] == '\0')))) {
        local_24 = "";
        sVar1 = 0;
        goto LAB_000d6baa;
      }
    }
    sVar1 = strlen(path);
    local_24 = path;
    goto LAB_000d6baa;
  }
  if ((flags & 2U) == 0) {
LAB_000d6b70:
    sVar1 = 1;
    local_24 = (char *)xmalloc(2);
    local_24[0] = '.';
    local_24[1] = '\0';
    local_1d = local_24 != "" && path != local_24;
  }
  else {
    local_24 = get_working_directory("sh_makepath");
    if (local_24 == (char *)0x0) {
      pcVar4 = get_string_value("PWD");
      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;
      sVar1 = strlen(pcVar4);
      pcVar7 = (char *)xmalloc(sVar1 + 1);
      local_24 = strcpy(pcVar7,pcVar4);
    }
    sVar1 = strlen(local_24);
    local_1d = local_24 != "" && path != local_24;
  }
LAB_000d6baa:
  sVar2 = strlen(dir);
  if ((((flags & 4U) == 0) || (*dir != '.')) || (dir[1] != '/')) {
    sVar2 = sVar2 + 2;
  }
  else {
    dir = dir + 2;
  }
  pcVar3 = (char *)xmalloc(sVar2 + sVar1);
  cVar5 = *local_24;
  pcVar4 = pcVar3;
  pcVar7 = local_24;
  if (cVar5 != '\0') {
    do {
      pcVar8 = pcVar7;
      pcVar6 = pcVar4;
      pcVar7 = pcVar8 + 1;
      pcVar4 = pcVar6 + 1;
      *pcVar6 = cVar5;
      cVar5 = *pcVar7;
    } while (cVar5 != '\0');
    if ((local_24 < pcVar7) && (*pcVar8 != '/')) {
      *pcVar4 = '/';
      pcVar4 = pcVar6 + 2;
    }
  }
  iVar9 = 0;
  do {
    cVar5 = dir[iVar9];
    pcVar4[iVar9] = cVar5;
    iVar9 = iVar9 + 1;
  } while (cVar5 != '\0');
  if (local_1d != false) {
    free(local_24);
  }
  return pcVar3;
}



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

char * sh_makepath(char *param_1,char *param_2,byte param_3)

{
  size_t sVar1;
  size_t sVar2;
  char *pcVar3;
  char *pcVar4;
  char cVar5;
  char *pcVar6;
  char *pcVar7;
  int iVar9;
  char *local_24;
  bool local_1d;
  char *pcVar8;
  
  if ((param_1 != (char *)0x0) && (cVar5 = *param_1, cVar5 != '\0')) {
    if (((param_3 & 8) == 0) || (cVar5 != '.')) {
      local_1d = (bool)(cVar5 == '~' & param_3);
      if (local_1d != false) {
        pcVar4 = (char *)bash_tilde_expand(param_1,0);
        local_1d = param_1 != pcVar4 && pcVar4 != "";
        param_1 = pcVar4;
      }
    }
    else {
      local_1d = false;
      if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {
        local_24 = "";
        sVar1 = 0;
        goto LAB_000d6baa;
      }
    }
    sVar1 = strlen(param_1);
    local_24 = param_1;
    goto LAB_000d6baa;
  }
  if ((param_3 & 2) == 0) {
LAB_000d6b70:
    sVar1 = 1;
    local_24 = (char *)xmalloc(2);
    local_24[0] = '.';
    local_24[1] = '\0';
    local_1d = local_24 != "" && param_1 != local_24;
  }
  else {
    local_24 = (char *)get_working_directory("sh_makepath");
    if (local_24 == (char *)0x0) {
      pcVar4 = (char *)get_string_value(&DAT_0011214a);
      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;
      sVar1 = strlen(pcVar4);
      pcVar7 = (char *)xmalloc(sVar1 + 1);
      local_24 = strcpy(pcVar7,pcVar4);
    }
    sVar1 = strlen(local_24);
    local_1d = local_24 != "" && param_1 != local_24;
  }
LAB_000d6baa:
  sVar2 = strlen(param_2);
  if ((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')) {
    sVar2 = sVar2 + 2;
  }
  else {
    param_2 = param_2 + 2;
  }
  pcVar3 = (char *)xmalloc(sVar2 + sVar1);
  cVar5 = *local_24;
  pcVar4 = pcVar3;
  pcVar7 = local_24;
  if (cVar5 != '\0') {
    do {
      pcVar8 = pcVar7;
      pcVar6 = pcVar4;
      pcVar7 = pcVar8 + 1;
      pcVar4 = pcVar6 + 1;
      *pcVar6 = cVar5;
      cVar5 = *pcVar7;
    } while (cVar5 != '\0');
    if ((local_24 < pcVar7) && (*pcVar8 != '/')) {
      *pcVar4 = '/';
      pcVar4 = pcVar6 + 2;
    }
  }
  iVar9 = 0;
  do {
    cVar5 = param_2[iVar9];
    pcVar4[iVar9] = cVar5;
    iVar9 = iVar9 + 1;
  } while (cVar5 != '\0');
  if (local_1d != false) {
    free(local_24);
  }
  return pcVar3;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000312b0
ADD EBX,0x9b507
SUB ESP,0x1c
MOV ESI,dword ptr [ESP + 0x30]
MOV EDX,dword ptr [ESP + 0x34]
MOV EDI,dword ptr [ESP + 0x38]
TEST ESI,ESI
JZ 0x000d6b60
MOVZX EAX,byte ptr [ESI]
TEST AL,AL
JZ 0x000d6b60
TEST EDI,0x8
JZ 0x000d6b29
CMP AL,0x2e
JZ 0x000d6cba
CMP AL,0x7e
MOV ECX,EDI
SETZ AL
AND AL,CL
MOV byte ptr [ESP + 0xf],AL
JNZ 0x000d6d53
MOV dword ptr [ESP + 0x34],EDX
SUB ESP,0xc
PUSH ESI
CALL 0x0002e760
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x34]
MOV EBP,EAX
MOV dword ptr [ESP + 0x8],ESI
JMP 0x000d6baa
MOV dword ptr [ESP + 0x34],EDX
TEST EDI,0x2
JNZ 0x000d6c60
SUB ESP,0xc
MOV EBP,0x1
PUSH 0x2
CALL 0x000ad700
MOV EDX,EAX
MOV dword ptr [ESP + 0x18],EAX
MOV EAX,0x2e
ADD ESP,0x10
MOV word ptr [EDX],AX
LEA EAX,[EBX + 0xfffb77bd]
CMP EDX,EAX
SETNZ CL
CMP ESI,EDX
MOV EDX,dword ptr [ESP + 0x34]
SETNZ AL
AND ECX,EAX
MOV byte ptr [ESP + 0xf],CL
SUB ESP,0xc
PUSH EDX
MOV dword ptr [ESP + 0x44],EDX
CALL 0x0002e760
ADD ESP,0x10
AND EDI,0x4
MOV EDX,dword ptr [ESP + 0x34]
JZ 0x000d6bcc
CMP byte ptr [EDX],0x2e
JZ 0x000d6cf0
ADD EAX,0x2
MOV dword ptr [ESP + 0x34],EDX
ADD EAX,EBP
SUB ESP,0xc
PUSH EAX
CALL 0x000ad700
MOV ESI,dword ptr [ESP + 0x18]
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x34]
MOV EDI,EAX
MOVZX ECX,byte ptr [ESI]
TEST CL,CL
JZ 0x000d6c24
MOV EBP,EAX
JMP 0x000d6c02
MOV EBP,EAX
ADD ESI,0x1
LEA EAX,[EBP + 0x1]
MOV byte ptr [EAX + -0x1],CL
MOVZX ECX,byte ptr [ESI]
TEST CL,CL
JNZ 0x000d6c00
CMP dword ptr [ESP + 0x8],ESI
JNC 0x000d6c24
CMP byte ptr [ESI + -0x1],0x2f
JZ 0x000d6c24
MOV byte ptr [EAX],0x2f
LEA EAX,[EBP + 0x2]
XOR ESI,ESI
LEA ESI,[ESI]
LEA ESI,[ESI]
MOVZX ECX,byte ptr [EDX + ESI*0x1]
MOV byte ptr [EAX + ESI*0x1],CL
ADD ESI,0x1
TEST CL,CL
JNZ 0x000d6c30
CMP byte ptr [ESP + 0xf],0x0
JZ 0x000d6c54
SUB ESP,0xc
PUSH dword ptr [ESP + 0x14]
CALL 0x0002e200
ADD ESP,0x10
ADD ESP,0x1c
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
LEA EAX,[EBX + 0xfffb5ddc]
PUSH EAX
CALL 0x000b0730
MOV dword ptr [ESP + 0x18],EAX
ADD ESP,0x10
TEST EAX,EAX
MOV EDX,dword ptr [ESP + 0x34]
JZ 0x000d6d02
MOV dword ptr [ESP + 0x34],EDX
SUB ESP,0xc
PUSH dword ptr [ESP + 0x14]
CALL 0x0002e760
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x8]
MOV EBP,EAX
LEA EAX,[EBX + 0xfffb77bd]
CMP EDX,EAX
SETNZ AL
CMP ESI,EDX
MOV EDX,dword ptr [ESP + 0x34]
SETNZ CL
AND EAX,ECX
MOV byte ptr [ESP + 0xf],AL
JMP 0x000d6baa
MOVZX EAX,byte ptr [ESI + 0x1]
MOV byte ptr [ESP + 0xf],0x0
TEST AL,AL
JZ 0x000d6cd9
CMP AL,0x2f
JNZ 0x000d6b3c
CMP byte ptr [ESI + 0x2],0x0
JNZ 0x000d6b3c
LEA EAX,[EBX + 0xfffb77bd]
XOR EBP,EBP
MOV dword ptr [ESP + 0x8],EAX
JMP 0x000d6baa
CMP byte ptr [EDX + 0x1],0x2f
JNZ 0x000d6bcc
ADD EDX,0x2
JMP 0x000d6bcf
SUB ESP,0xc
LEA EAX,[EBX + 0xfffa014a]
PUSH EAX
CALL 0x000569d0
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x34]
TEST EAX,EAX
MOV EBP,EAX
JZ 0x000d6b70
MOV dword ptr [ESP + 0x34],EDX
SUB ESP,0xc
PUSH EAX
CALL 0x0002e760
ADD EAX,0x1
MOV dword ptr [ESP],EAX
CALL 0x000ad700
POP EDX
POP ECX
PUSH EBP
PUSH EAX
CALL 0x0002e580
MOV dword ptr [ESP + 0x18],EAX
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x34]
JMP 0x000d6c82
MOV dword ptr [ESP + 0x34],EDX
SUB ESP,0x8
PUSH 0x0
PUSH ESI
CALL 0x00042df0
ADD ESP,0x10
LEA ECX,[EBX + 0xfffb77bd]
CMP ESI,EAX
MOV ESI,EAX
SETNZ DL
CMP EAX,ECX
SETNZ CL
AND EDX,ECX
MOV byte ptr [ESP + 0xf],DL
MOV EDX,dword ptr [ESP + 0x34]
JMP 0x000d6b3c
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nchar * sh_makepath(char *param_1,char *param_2,byte param_3)\n\n{\n  size_t sVar1;\n  size_t sVar2;\n  char *pcVar3;\n  char *pcVar4;\n  char cVar5;\n  char *pcVar6;\n  char *pcVar7;\n  int iVar9;\n  char *local_24;\n  bool local_1d;\n  char *pcVar8;\n  \n  if ((param_1 != (char *)0x0) && (cVar5 = *param_1, cVar5 != '\0')) {\n    if (((param_3 & 8) == 0) || (cVar5 != '.')) {\n      local_1d = (bool)(cVar5 == '~' & param_3);\n      if (local_1d != false) {\n        pcVar4 = (char *)bash_tilde_expand(param_1,0);\n        local_1d = param_1 != pcVar4 && pcVar4 != "";\n        param_1 = pcVar4;\n      }\n    }\n    else {\n      local_1d = false;\n      if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }\n    sVar1 = strlen(param_1);\n    local_24 = param_1;\n    goto LAB_000d6baa;\n  }\n  if ((param_3 & 2) == 0) {\nLAB_000d6b70:\n    sVar1 = 1;\n    local_24 = (char *)xmalloc(2);\n    local_24[0] = '.';\n    local_24[1] = '\0';\n    local_1d = local_24 != "" && param_1 != local_24;\n  }\n  else {\n    local_24 = (char *)get_working_directory("sh_makepath");\n    if (local_24 == (char *)0x0) {\n      pcVar4 = (char *)get_string_value(&DAT_0011214a);\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }\n    sVar1 = strlen(local_24);\n    local_1d = local_24 != "" && param_1 != local_24;\n  }\nLAB_000d6baa:\n  sVar2 = strlen(param_2);\n  if ((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')) {\n    sVar2 = sVar2 + 2;\n  }\n  else {\n    param_2 = param_2 + 2;\n  }\n  pcVar3 = (char *)xmalloc(sVar2 + sVar1);\n  cVar5 = *local_24;\n  pcVar4 = pcVar3;\n  pcVar7 = local_24;\n  if (cVar5 != '\0') {\n    do {\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    } while (cVar5 != '\0');\n    if ((local_24 < pcVar7) && (*pcVar8 != '/')) {\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }\n  }\n  iVar9 = 0;\n  do {\n    cVar5 = param_2[iVar9];\n    pcVar4[iVar9] = cVar5;\n    iVar9 = iVar9 + 1;\n  } while (cVar5 != '\0');\n  if (local_1d != false) {\n    free(local_24);\n  }\n  return pcVar3;\n}\n\n" comment (function_definition "char * sh_makepath(char *param_1,char *param_2,byte param_3)\n\n{\n  size_t sVar1;\n  size_t sVar2;\n  char *pcVar3;\n  char *pcVar4;\n  char cVar5;\n  char *pcVar6;\n  char *pcVar7;\n  int iVar9;\n  char *local_24;\n  bool local_1d;\n  char *pcVar8;\n  \n  if ((param_1 != (char *)0x0) && (cVar5 = *param_1, cVar5 != '\0')) {\n    if (((param_3 & 8) == 0) || (cVar5 != '.')) {\n      local_1d = (bool)(cVar5 == '~' & param_3);\n      if (local_1d != false) {\n        pcVar4 = (char *)bash_tilde_expand(param_1,0);\n        local_1d = param_1 != pcVar4 && pcVar4 != "";\n        param_1 = pcVar4;\n      }\n    }\n    else {\n      local_1d = false;\n      if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }\n    sVar1 = strlen(param_1);\n    local_24 = param_1;\n    goto LAB_000d6baa;\n  }\n  if ((param_3 & 2) == 0) {\nLAB_000d6b70:\n    sVar1 = 1;\n    local_24 = (char *)xmalloc(2);\n    local_24[0] = '.';\n    local_24[1] = '\0';\n    local_1d = local_24 != "" && param_1 != local_24;\n  }\n  else {\n    local_24 = (char *)get_working_directory("sh_makepath");\n    if (local_24 == (char *)0x0) {\n      pcVar4 = (char *)get_string_value(&DAT_0011214a);\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }\n    sVar1 = strlen(local_24);\n    local_1d = local_24 != "" && param_1 != local_24;\n  }\nLAB_000d6baa:\n  sVar2 = strlen(param_2);\n  if ((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')) {\n    sVar2 = sVar2 + 2;\n  }\n  else {\n    param_2 = param_2 + 2;\n  }\n  pcVar3 = (char *)xmalloc(sVar2 + sVar1);\n  cVar5 = *local_24;\n  pcVar4 = pcVar3;\n  pcVar7 = local_24;\n  if (cVar5 != '\0') {\n    do {\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    } while (cVar5 != '\0');\n    if ((local_24 < pcVar7) && (*pcVar8 != '/')) {\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }\n  }\n  iVar9 = 0;\n  do {\n    cVar5 = param_2[iVar9];\n    pcVar4[iVar9] = cVar5;\n    iVar9 = iVar9 + 1;\n  } while (cVar5 != '\0');\n  if (local_1d != false) {\n    free(local_24);\n  }\n  return pcVar3;\n}" primitive_type (pointer_declarator "* sh_makepath(char *param_1,char *param_2,byte param_3)" * (function_declarator "sh_makepath(char *param_1,char *param_2,byte param_3)" identifier (parameter_list "(char *param_1,char *param_2,byte param_3)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "byte param_3" type_identifier identifier) )))) (compound_statement "{\n  size_t sVar1;\n  size_t sVar2;\n  char *pcVar3;\n  char *pcVar4;\n  char cVar5;\n  char *pcVar6;\n  char *pcVar7;\n  int iVar9;\n  char *local_24;\n  bool local_1d;\n  char *pcVar8;\n  \n  if ((param_1 != (char *)0x0) && (cVar5 = *param_1, cVar5 != '\0')) {\n    if (((param_3 & 8) == 0) || (cVar5 != '.')) {\n      local_1d = (bool)(cVar5 == '~' & param_3);\n      if (local_1d != false) {\n        pcVar4 = (char *)bash_tilde_expand(param_1,0);\n        local_1d = param_1 != pcVar4 && pcVar4 != "";\n        param_1 = pcVar4;\n      }\n    }\n    else {\n      local_1d = false;\n      if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }\n    sVar1 = strlen(param_1);\n    local_24 = param_1;\n    goto LAB_000d6baa;\n  }\n  if ((param_3 & 2) == 0) {\nLAB_000d6b70:\n    sVar1 = 1;\n    local_24 = (char *)xmalloc(2);\n    local_24[0] = '.';\n    local_24[1] = '\0';\n    local_1d = local_24 != "" && param_1 != local_24;\n  }\n  else {\n    local_24 = (char *)get_working_directory("sh_makepath");\n    if (local_24 == (char *)0x0) {\n      pcVar4 = (char *)get_string_value(&DAT_0011214a);\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }\n    sVar1 = strlen(local_24);\n    local_1d = local_24 != "" && param_1 != local_24;\n  }\nLAB_000d6baa:\n  sVar2 = strlen(param_2);\n  if ((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')) {\n    sVar2 = sVar2 + 2;\n  }\n  else {\n    param_2 = param_2 + 2;\n  }\n  pcVar3 = (char *)xmalloc(sVar2 + sVar1);\n  cVar5 = *local_24;\n  pcVar4 = pcVar3;\n  pcVar7 = local_24;\n  if (cVar5 != '\0') {\n    do {\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    } while (cVar5 != '\0');\n    if ((local_24 < pcVar7) && (*pcVar8 != '/')) {\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }\n  }\n  iVar9 = 0;\n  do {\n    cVar5 = param_2[iVar9];\n    pcVar4[iVar9] = cVar5;\n    iVar9 = iVar9 + 1;\n  } while (cVar5 != '\0');\n  if (local_1d != false) {\n    free(local_24);\n  }\n  return pcVar3;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "char cVar5;" primitive_type identifier ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "char *pcVar7;" primitive_type (pointer_declarator "*pcVar7" * identifier) ;) (declaration "int iVar9;" primitive_type identifier ;) (declaration "char *local_24;" primitive_type (pointer_declarator "*local_24" * identifier) ;) (declaration "bool local_1d;" primitive_type identifier ;) (declaration "char *pcVar8;" primitive_type (pointer_declarator "*pcVar8" * identifier) ;) (if_statement "if ((param_1 != (char *)0x0) && (cVar5 = *param_1, cVar5 != '\0')) {\n    if (((param_3 & 8) == 0) || (cVar5 != '.')) {\n      local_1d = (bool)(cVar5 == '~' & param_3);\n      if (local_1d != false) {\n        pcVar4 = (char *)bash_tilde_expand(param_1,0);\n        local_1d = param_1 != pcVar4 && pcVar4 != "";\n        param_1 = pcVar4;\n      }\n    }\n    else {\n      local_1d = false;\n      if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }\n    sVar1 = strlen(param_1);\n    local_24 = param_1;\n    goto LAB_000d6baa;\n  }" if (parenthesized_expression "((param_1 != (char *)0x0) && (cVar5 = *param_1, cVar5 != '\0'))" ( (binary_expression "(param_1 != (char *)0x0) && (cVar5 = *param_1, cVar5 != '\0')" (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)) )) && (parenthesized_expression "(cVar5 = *param_1, cVar5 != '\0')" ( (comma_expression "cVar5 = *param_1, cVar5 != '\0'" (assignment_expression "cVar5 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) , (binary_expression "cVar5 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence '))) ))) )) (compound_statement "{\n    if (((param_3 & 8) == 0) || (cVar5 != '.')) {\n      local_1d = (bool)(cVar5 == '~' & param_3);\n      if (local_1d != false) {\n        pcVar4 = (char *)bash_tilde_expand(param_1,0);\n        local_1d = param_1 != pcVar4 && pcVar4 != "";\n        param_1 = pcVar4;\n      }\n    }\n    else {\n      local_1d = false;\n      if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }\n    sVar1 = strlen(param_1);\n    local_24 = param_1;\n    goto LAB_000d6baa;\n  }" { (if_statement "if (((param_3 & 8) == 0) || (cVar5 != '.')) {\n      local_1d = (bool)(cVar5 == '~' & param_3);\n      if (local_1d != false) {\n        pcVar4 = (char *)bash_tilde_expand(param_1,0);\n        local_1d = param_1 != pcVar4 && pcVar4 != "";\n        param_1 = pcVar4;\n      }\n    }\n    else {\n      local_1d = false;\n      if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }" if (parenthesized_expression "(((param_3 & 8) == 0) || (cVar5 != '.'))" ( (binary_expression "((param_3 & 8) == 0) || (cVar5 != '.')" (parenthesized_expression "((param_3 & 8) == 0)" ( (binary_expression "(param_3 & 8) == 0" (parenthesized_expression "(param_3 & 8)" ( (binary_expression "param_3 & 8" identifier & number_literal) )) == number_literal) )) || (parenthesized_expression "(cVar5 != '.')" ( (binary_expression "cVar5 != '.'" identifier != (char_literal "'.'" ' character ')) ))) )) (compound_statement "{\n      local_1d = (bool)(cVar5 == '~' & param_3);\n      if (local_1d != false) {\n        pcVar4 = (char *)bash_tilde_expand(param_1,0);\n        local_1d = param_1 != pcVar4 && pcVar4 != "";\n        param_1 = pcVar4;\n      }\n    }" { (expression_statement "local_1d = (bool)(cVar5 == '~' & param_3);" (assignment_expression "local_1d = (bool)(cVar5 == '~' & param_3)" identifier = (cast_expression "(bool)(cVar5 == '~' & param_3)" ( (type_descriptor "bool" primitive_type) ) (parenthesized_expression "(cVar5 == '~' & param_3)" ( (binary_expression "cVar5 == '~' & param_3" (binary_expression "cVar5 == '~'" identifier == (char_literal "'~'" ' character ')) & identifier) )))) ;) (if_statement "if (local_1d != false) {\n        pcVar4 = (char *)bash_tilde_expand(param_1,0);\n        local_1d = param_1 != pcVar4 && pcVar4 != "";\n        param_1 = pcVar4;\n      }" if (parenthesized_expression "(local_1d != false)" ( (binary_expression "local_1d != false" identifier != false) )) (compound_statement "{\n        pcVar4 = (char *)bash_tilde_expand(param_1,0);\n        local_1d = param_1 != pcVar4 && pcVar4 != "";\n        param_1 = pcVar4;\n      }" { (expression_statement "pcVar4 = (char *)bash_tilde_expand(param_1,0);" (assignment_expression "pcVar4 = (char *)bash_tilde_expand(param_1,0)" identifier = (cast_expression "(char *)bash_tilde_expand(param_1,0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "bash_tilde_expand(param_1,0)" identifier (argument_list "(param_1,0)" ( identifier , number_literal ))))) ;) (expression_statement "local_1d = param_1 != pcVar4 && pcVar4 != "";" (assignment_expression "local_1d = param_1 != pcVar4 && pcVar4 != """ identifier = (binary_expression "param_1 != pcVar4 && pcVar4 != """ (binary_expression "param_1 != pcVar4" identifier != identifier) && (binary_expression "pcVar4 != """ identifier != (string_literal """" " ")))) ;) (expression_statement "param_1 = pcVar4;" (assignment_expression "param_1 = pcVar4" identifier = identifier) ;) })) }) (else_clause "else {\n      local_1d = false;\n      if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }" else (compound_statement "{\n      local_1d = false;\n      if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }" { (expression_statement "local_1d = false;" (assignment_expression "local_1d = false" identifier = false) ;) (if_statement "if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }" if (parenthesized_expression "((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0'))))" ( (binary_expression "(param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))" (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] == '/' && (param_1[2] == '\0')))" ( (parenthesized_expression "(param_1[1] == '/' && (param_1[2] == '\0'))" ( (binary_expression "param_1[1] == '/' && (param_1[2] == '\0')" (binary_expression "param_1[1] == '/'" (subscript_expression "param_1[1]" identifier [ number_literal ]) == (char_literal "'/'" ' character ')) && (parenthesized_expression "(param_1[2] == '\0')" ( (binary_expression "param_1[2] == '\0'" (subscript_expression "param_1[2]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) ))) )) ))) )) (compound_statement "{\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }" { (expression_statement "local_24 = "";" (assignment_expression "local_24 = """ identifier = (string_literal """" " ")) ;) (expression_statement "sVar1 = 0;" (assignment_expression "sVar1 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_000d6baa;" 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 "local_24 = param_1;" (assignment_expression "local_24 = param_1" identifier = identifier) ;) (goto_statement "goto LAB_000d6baa;" goto statement_identifier ;) })) (if_statement "if ((param_3 & 2) == 0) {\nLAB_000d6b70:\n    sVar1 = 1;\n    local_24 = (char *)xmalloc(2);\n    local_24[0] = '.';\n    local_24[1] = '\0';\n    local_1d = local_24 != "" && param_1 != local_24;\n  }\n  else {\n    local_24 = (char *)get_working_directory("sh_makepath");\n    if (local_24 == (char *)0x0) {\n      pcVar4 = (char *)get_string_value(&DAT_0011214a);\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }\n    sVar1 = strlen(local_24);\n    local_1d = local_24 != "" && param_1 != local_24;\n  }" if (parenthesized_expression "((param_3 & 2) == 0)" ( (binary_expression "(param_3 & 2) == 0" (parenthesized_expression "(param_3 & 2)" ( (binary_expression "param_3 & 2" identifier & number_literal) )) == number_literal) )) (compound_statement "{\nLAB_000d6b70:\n    sVar1 = 1;\n    local_24 = (char *)xmalloc(2);\n    local_24[0] = '.';\n    local_24[1] = '\0';\n    local_1d = local_24 != "" && param_1 != local_24;\n  }" { (labeled_statement "LAB_000d6b70:\n    sVar1 = 1;" statement_identifier : (expression_statement "sVar1 = 1;" (assignment_expression "sVar1 = 1" identifier = number_literal) ;)) (expression_statement "local_24 = (char *)xmalloc(2);" (assignment_expression "local_24 = (char *)xmalloc(2)" identifier = (cast_expression "(char *)xmalloc(2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(2)" identifier (argument_list "(2)" ( number_literal ))))) ;) (expression_statement "local_24[0] = '.';" (assignment_expression "local_24[0] = '.'" (subscript_expression "local_24[0]" identifier [ number_literal ]) = (char_literal "'.'" ' character ')) ;) (expression_statement "local_24[1] = '\0';" (assignment_expression "local_24[1] = '\0'" (subscript_expression "local_24[1]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "local_1d = local_24 != "" && param_1 != local_24;" (assignment_expression "local_1d = local_24 != "" && param_1 != local_24" identifier = (binary_expression "local_24 != "" && param_1 != local_24" (binary_expression "local_24 != """ identifier != (string_literal """" " ")) && (binary_expression "param_1 != local_24" identifier != identifier))) ;) }) (else_clause "else {\n    local_24 = (char *)get_working_directory("sh_makepath");\n    if (local_24 == (char *)0x0) {\n      pcVar4 = (char *)get_string_value(&DAT_0011214a);\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }\n    sVar1 = strlen(local_24);\n    local_1d = local_24 != "" && param_1 != local_24;\n  }" else (compound_statement "{\n    local_24 = (char *)get_working_directory("sh_makepath");\n    if (local_24 == (char *)0x0) {\n      pcVar4 = (char *)get_string_value(&DAT_0011214a);\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }\n    sVar1 = strlen(local_24);\n    local_1d = local_24 != "" && param_1 != local_24;\n  }" { (expression_statement "local_24 = (char *)get_working_directory("sh_makepath");" (assignment_expression "local_24 = (char *)get_working_directory("sh_makepath")" identifier = (cast_expression "(char *)get_working_directory("sh_makepath")" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "get_working_directory("sh_makepath")" identifier (argument_list "("sh_makepath")" ( (string_literal ""sh_makepath"" " string_content ") ))))) ;) (if_statement "if (local_24 == (char *)0x0) {\n      pcVar4 = (char *)get_string_value(&DAT_0011214a);\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }" if (parenthesized_expression "(local_24 == (char *)0x0)" ( (binary_expression "local_24 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pcVar4 = (char *)get_string_value(&DAT_0011214a);\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }" { (expression_statement "pcVar4 = (char *)get_string_value(&DAT_0011214a);" (assignment_expression "pcVar4 = (char *)get_string_value(&DAT_0011214a)" identifier = (cast_expression "(char *)get_string_value(&DAT_0011214a)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "get_string_value(&DAT_0011214a)" identifier (argument_list "(&DAT_0011214a)" ( (pointer_expression "&DAT_0011214a" & identifier) ))))) ;) (if_statement "if (pcVar4 == (char *)0x0) goto LAB_000d6b70;" if (parenthesized_expression "(pcVar4 == (char *)0x0)" ( (binary_expression "pcVar4 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_000d6b70;" goto statement_identifier ;)) (expression_statement "sVar1 = strlen(pcVar4);" (assignment_expression "sVar1 = strlen(pcVar4)" identifier = (call_expression "strlen(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier )))) ;) (expression_statement "pcVar7 = (char *)xmalloc(sVar1 + 1);" (assignment_expression "pcVar7 = (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 "local_24 = strcpy(pcVar7,pcVar4);" (assignment_expression "local_24 = strcpy(pcVar7,pcVar4)" identifier = (call_expression "strcpy(pcVar7,pcVar4)" identifier (argument_list "(pcVar7,pcVar4)" ( identifier , identifier )))) ;) })) (expression_statement "sVar1 = strlen(local_24);" (assignment_expression "sVar1 = strlen(local_24)" identifier = (call_expression "strlen(local_24)" identifier (argument_list "(local_24)" ( identifier )))) ;) (expression_statement "local_1d = local_24 != "" && param_1 != local_24;" (assignment_expression "local_1d = local_24 != "" && param_1 != local_24" identifier = (binary_expression "local_24 != "" && param_1 != local_24" (binary_expression "local_24 != """ identifier != (string_literal """" " ")) && (binary_expression "param_1 != local_24" identifier != identifier))) ;) }))) (labeled_statement "LAB_000d6baa:\n  sVar2 = strlen(param_2);" statement_identifier : (expression_statement "sVar2 = strlen(param_2);" (assignment_expression "sVar2 = strlen(param_2)" identifier = (call_expression "strlen(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;)) (if_statement "if ((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')) {\n    sVar2 = sVar2 + 2;\n  }\n  else {\n    param_2 = param_2 + 2;\n  }" if (parenthesized_expression "((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/'))" ( (binary_expression "(((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')" (parenthesized_expression "(((param_3 & 4) == 0) || (*param_2 != '.'))" ( (binary_expression "((param_3 & 4) == 0) || (*param_2 != '.')" (parenthesized_expression "((param_3 & 4) == 0)" ( (binary_expression "(param_3 & 4) == 0" (parenthesized_expression "(param_3 & 4)" ( (binary_expression "param_3 & 4" identifier & number_literal) )) == number_literal) )) || (parenthesized_expression "(*param_2 != '.')" ( (binary_expression "*param_2 != '.'" (pointer_expression "*param_2" * identifier) != (char_literal "'.'" ' character ')) ))) )) || (parenthesized_expression "(param_2[1] != '/')" ( (binary_expression "param_2[1] != '/'" (subscript_expression "param_2[1]" identifier [ number_literal ]) != (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n    sVar2 = sVar2 + 2;\n  }" { (expression_statement "sVar2 = sVar2 + 2;" (assignment_expression "sVar2 = sVar2 + 2" identifier = (binary_expression "sVar2 + 2" identifier + number_literal)) ;) }) (else_clause "else {\n    param_2 = param_2 + 2;\n  }" else (compound_statement "{\n    param_2 = param_2 + 2;\n  }" { (expression_statement "param_2 = param_2 + 2;" (assignment_expression "param_2 = param_2 + 2" identifier = (binary_expression "param_2 + 2" identifier + number_literal)) ;) }))) (expression_statement "pcVar3 = (char *)xmalloc(sVar2 + sVar1);" (assignment_expression "pcVar3 = (char *)xmalloc(sVar2 + sVar1)" identifier = (cast_expression "(char *)xmalloc(sVar2 + sVar1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar2 + sVar1)" identifier (argument_list "(sVar2 + sVar1)" ( (binary_expression "sVar2 + sVar1" identifier + identifier) ))))) ;) (expression_statement "cVar5 = *local_24;" (assignment_expression "cVar5 = *local_24" identifier = (pointer_expression "*local_24" * identifier)) ;) (expression_statement "pcVar4 = pcVar3;" (assignment_expression "pcVar4 = pcVar3" identifier = identifier) ;) (expression_statement "pcVar7 = local_24;" (assignment_expression "pcVar7 = local_24" identifier = identifier) ;) (if_statement "if (cVar5 != '\0') {\n    do {\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    } while (cVar5 != '\0');\n    if ((local_24 < pcVar7) && (*pcVar8 != '/')) {\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }\n  }" if (parenthesized_expression "(cVar5 != '\0')" ( (binary_expression "cVar5 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    do {\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    } while (cVar5 != '\0');\n    if ((local_24 < pcVar7) && (*pcVar8 != '/')) {\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }\n  }" { (do_statement "do {\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    } while (cVar5 != '\0');" do (compound_statement "{\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    }" { (expression_statement "pcVar8 = pcVar7;" (assignment_expression "pcVar8 = pcVar7" identifier = identifier) ;) (expression_statement "pcVar6 = pcVar4;" (assignment_expression "pcVar6 = pcVar4" identifier = identifier) ;) (expression_statement "pcVar7 = pcVar8 + 1;" (assignment_expression "pcVar7 = pcVar8 + 1" identifier = (binary_expression "pcVar8 + 1" identifier + number_literal)) ;) (expression_statement "pcVar4 = pcVar6 + 1;" (assignment_expression "pcVar4 = pcVar6 + 1" identifier = (binary_expression "pcVar6 + 1" identifier + number_literal)) ;) (expression_statement "*pcVar6 = cVar5;" (assignment_expression "*pcVar6 = cVar5" (pointer_expression "*pcVar6" * identifier) = identifier) ;) (expression_statement "cVar5 = *pcVar7;" (assignment_expression "cVar5 = *pcVar7" identifier = (pointer_expression "*pcVar7" * identifier)) ;) }) while (parenthesized_expression "(cVar5 != '\0')" ( (binary_expression "cVar5 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) ;) (if_statement "if ((local_24 < pcVar7) && (*pcVar8 != '/')) {\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }" if (parenthesized_expression "((local_24 < pcVar7) && (*pcVar8 != '/'))" ( (binary_expression "(local_24 < pcVar7) && (*pcVar8 != '/')" (parenthesized_expression "(local_24 < pcVar7)" ( (binary_expression "local_24 < pcVar7" identifier < identifier) )) && (parenthesized_expression "(*pcVar8 != '/')" ( (binary_expression "*pcVar8 != '/'" (pointer_expression "*pcVar8" * identifier) != (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }" { (expression_statement "*pcVar4 = '/';" (assignment_expression "*pcVar4 = '/'" (pointer_expression "*pcVar4" * identifier) = (char_literal "'/'" ' character ')) ;) (expression_statement "pcVar4 = pcVar6 + 2;" (assignment_expression "pcVar4 = pcVar6 + 2" identifier = (binary_expression "pcVar6 + 2" identifier + number_literal)) ;) })) })) (expression_statement "iVar9 = 0;" (assignment_expression "iVar9 = 0" identifier = number_literal) ;) (do_statement "do {\n    cVar5 = param_2[iVar9];\n    pcVar4[iVar9] = cVar5;\n    iVar9 = iVar9 + 1;\n  } while (cVar5 != '\0');" do (compound_statement "{\n    cVar5 = param_2[iVar9];\n    pcVar4[iVar9] = cVar5;\n    iVar9 = iVar9 + 1;\n  }" { (expression_statement "cVar5 = param_2[iVar9];" (assignment_expression "cVar5 = param_2[iVar9]" identifier = (subscript_expression "param_2[iVar9]" identifier [ identifier ])) ;) (expression_statement "pcVar4[iVar9] = cVar5;" (assignment_expression "pcVar4[iVar9] = cVar5" (subscript_expression "pcVar4[iVar9]" identifier [ identifier ]) = identifier) ;) (expression_statement "iVar9 = iVar9 + 1;" (assignment_expression "iVar9 = iVar9 + 1" identifier = (binary_expression "iVar9 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(cVar5 != '\0')" ( (binary_expression "cVar5 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) ;) (if_statement "if (local_1d != false) {\n    free(local_24);\n  }" if (parenthesized_expression "(local_1d != false)" ( (binary_expression "local_1d != false" identifier != false) )) (compound_statement "{\n    free(local_24);\n  }" { (expression_statement "free(local_24);" (call_expression "free(local_24)" identifier (argument_list "(local_24)" ( identifier ))) ;) })) (return_statement "return pcVar3;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nchar * sh_makepath(char *path,char *dir,int flags)\n\n{\n  size_t sVar1;\n  size_t sVar2;\n  char *pcVar3;\n  char *pcVar4;\n  char cVar5;\n  char *pcVar6;\n  char *pcVar7;\n  int iVar9;\n  char *local_24;\n  bool local_1d;\n  char *pcVar8;\n  \n  if ((path != (char *)0x0) && (cVar5 = *path, cVar5 != '\0')) {\n    if (((flags & 8U) == 0) || (cVar5 != '.')) {\n      local_1d = (bool)(cVar5 == '~' & (byte)flags);\n      if (local_1d != false) {\n        pcVar4 = bash_tilde_expand(path,0);\n        local_1d = path != pcVar4 && pcVar4 != "";\n        path = pcVar4;\n      }\n    }\n    else {\n      local_1d = false;\n      if ((path[1] == '\0') || ((path[1] == '/' && (path[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }\n    sVar1 = strlen(path);\n    local_24 = path;\n    goto LAB_000d6baa;\n  }\n  if ((flags & 2U) == 0) {\nLAB_000d6b70:\n    sVar1 = 1;\n    local_24 = (char *)xmalloc(2);\n    local_24[0] = '.';\n    local_24[1] = '\0';\n    local_1d = local_24 != "" && path != local_24;\n  }\n  else {\n    local_24 = get_working_directory("sh_makepath");\n    if (local_24 == (char *)0x0) {\n      pcVar4 = get_string_value("PWD");\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }\n    sVar1 = strlen(local_24);\n    local_1d = local_24 != "" && path != local_24;\n  }\nLAB_000d6baa:\n  sVar2 = strlen(dir);\n  if ((((flags & 4U) == 0) || (*dir != '.')) || (dir[1] != '/')) {\n    sVar2 = sVar2 + 2;\n  }\n  else {\n    dir = dir + 2;\n  }\n  pcVar3 = (char *)xmalloc(sVar2 + sVar1);\n  cVar5 = *local_24;\n  pcVar4 = pcVar3;\n  pcVar7 = local_24;\n  if (cVar5 != '\0') {\n    do {\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    } while (cVar5 != '\0');\n    if ((local_24 < pcVar7) && (*pcVar8 != '/')) {\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }\n  }\n  iVar9 = 0;\n  do {\n    cVar5 = dir[iVar9];\n    pcVar4[iVar9] = cVar5;\n    iVar9 = iVar9 + 1;\n  } while (cVar5 != '\0');\n  if (local_1d != false) {\n    free(local_24);\n  }\n  return pcVar3;\n}\n\n" comment (function_definition "char * sh_makepath(char *path,char *dir,int flags)\n\n{\n  size_t sVar1;\n  size_t sVar2;\n  char *pcVar3;\n  char *pcVar4;\n  char cVar5;\n  char *pcVar6;\n  char *pcVar7;\n  int iVar9;\n  char *local_24;\n  bool local_1d;\n  char *pcVar8;\n  \n  if ((path != (char *)0x0) && (cVar5 = *path, cVar5 != '\0')) {\n    if (((flags & 8U) == 0) || (cVar5 != '.')) {\n      local_1d = (bool)(cVar5 == '~' & (byte)flags);\n      if (local_1d != false) {\n        pcVar4 = bash_tilde_expand(path,0);\n        local_1d = path != pcVar4 && pcVar4 != "";\n        path = pcVar4;\n      }\n    }\n    else {\n      local_1d = false;\n      if ((path[1] == '\0') || ((path[1] == '/' && (path[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }\n    sVar1 = strlen(path);\n    local_24 = path;\n    goto LAB_000d6baa;\n  }\n  if ((flags & 2U) == 0) {\nLAB_000d6b70:\n    sVar1 = 1;\n    local_24 = (char *)xmalloc(2);\n    local_24[0] = '.';\n    local_24[1] = '\0';\n    local_1d = local_24 != "" && path != local_24;\n  }\n  else {\n    local_24 = get_working_directory("sh_makepath");\n    if (local_24 == (char *)0x0) {\n      pcVar4 = get_string_value("PWD");\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }\n    sVar1 = strlen(local_24);\n    local_1d = local_24 != "" && path != local_24;\n  }\nLAB_000d6baa:\n  sVar2 = strlen(dir);\n  if ((((flags & 4U) == 0) || (*dir != '.')) || (dir[1] != '/')) {\n    sVar2 = sVar2 + 2;\n  }\n  else {\n    dir = dir + 2;\n  }\n  pcVar3 = (char *)xmalloc(sVar2 + sVar1);\n  cVar5 = *local_24;\n  pcVar4 = pcVar3;\n  pcVar7 = local_24;\n  if (cVar5 != '\0') {\n    do {\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    } while (cVar5 != '\0');\n    if ((local_24 < pcVar7) && (*pcVar8 != '/')) {\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }\n  }\n  iVar9 = 0;\n  do {\n    cVar5 = dir[iVar9];\n    pcVar4[iVar9] = cVar5;\n    iVar9 = iVar9 + 1;\n  } while (cVar5 != '\0');\n  if (local_1d != false) {\n    free(local_24);\n  }\n  return pcVar3;\n}" primitive_type (pointer_declarator "* sh_makepath(char *path,char *dir,int flags)" * (function_declarator "sh_makepath(char *path,char *dir,int flags)" identifier (parameter_list "(char *path,char *dir,int flags)" ( (parameter_declaration "char *path" primitive_type (pointer_declarator "*path" * identifier)) , (parameter_declaration "char *dir" primitive_type (pointer_declarator "*dir" * identifier)) , (parameter_declaration "int flags" primitive_type identifier) )))) (compound_statement "{\n  size_t sVar1;\n  size_t sVar2;\n  char *pcVar3;\n  char *pcVar4;\n  char cVar5;\n  char *pcVar6;\n  char *pcVar7;\n  int iVar9;\n  char *local_24;\n  bool local_1d;\n  char *pcVar8;\n  \n  if ((path != (char *)0x0) && (cVar5 = *path, cVar5 != '\0')) {\n    if (((flags & 8U) == 0) || (cVar5 != '.')) {\n      local_1d = (bool)(cVar5 == '~' & (byte)flags);\n      if (local_1d != false) {\n        pcVar4 = bash_tilde_expand(path,0);\n        local_1d = path != pcVar4 && pcVar4 != "";\n        path = pcVar4;\n      }\n    }\n    else {\n      local_1d = false;\n      if ((path[1] == '\0') || ((path[1] == '/' && (path[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }\n    sVar1 = strlen(path);\n    local_24 = path;\n    goto LAB_000d6baa;\n  }\n  if ((flags & 2U) == 0) {\nLAB_000d6b70:\n    sVar1 = 1;\n    local_24 = (char *)xmalloc(2);\n    local_24[0] = '.';\n    local_24[1] = '\0';\n    local_1d = local_24 != "" && path != local_24;\n  }\n  else {\n    local_24 = get_working_directory("sh_makepath");\n    if (local_24 == (char *)0x0) {\n      pcVar4 = get_string_value("PWD");\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }\n    sVar1 = strlen(local_24);\n    local_1d = local_24 != "" && path != local_24;\n  }\nLAB_000d6baa:\n  sVar2 = strlen(dir);\n  if ((((flags & 4U) == 0) || (*dir != '.')) || (dir[1] != '/')) {\n    sVar2 = sVar2 + 2;\n  }\n  else {\n    dir = dir + 2;\n  }\n  pcVar3 = (char *)xmalloc(sVar2 + sVar1);\n  cVar5 = *local_24;\n  pcVar4 = pcVar3;\n  pcVar7 = local_24;\n  if (cVar5 != '\0') {\n    do {\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    } while (cVar5 != '\0');\n    if ((local_24 < pcVar7) && (*pcVar8 != '/')) {\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }\n  }\n  iVar9 = 0;\n  do {\n    cVar5 = dir[iVar9];\n    pcVar4[iVar9] = cVar5;\n    iVar9 = iVar9 + 1;\n  } while (cVar5 != '\0');\n  if (local_1d != false) {\n    free(local_24);\n  }\n  return pcVar3;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "char cVar5;" primitive_type identifier ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "char *pcVar7;" primitive_type (pointer_declarator "*pcVar7" * identifier) ;) (declaration "int iVar9;" primitive_type identifier ;) (declaration "char *local_24;" primitive_type (pointer_declarator "*local_24" * identifier) ;) (declaration "bool local_1d;" primitive_type identifier ;) (declaration "char *pcVar8;" primitive_type (pointer_declarator "*pcVar8" * identifier) ;) (if_statement "if ((path != (char *)0x0) && (cVar5 = *path, cVar5 != '\0')) {\n    if (((flags & 8U) == 0) || (cVar5 != '.')) {\n      local_1d = (bool)(cVar5 == '~' & (byte)flags);\n      if (local_1d != false) {\n        pcVar4 = bash_tilde_expand(path,0);\n        local_1d = path != pcVar4 && pcVar4 != "";\n        path = pcVar4;\n      }\n    }\n    else {\n      local_1d = false;\n      if ((path[1] == '\0') || ((path[1] == '/' && (path[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }\n    sVar1 = strlen(path);\n    local_24 = path;\n    goto LAB_000d6baa;\n  }" if (parenthesized_expression "((path != (char *)0x0) && (cVar5 = *path, cVar5 != '\0'))" ( (binary_expression "(path != (char *)0x0) && (cVar5 = *path, cVar5 != '\0')" (parenthesized_expression "(path != (char *)0x0)" ( (binary_expression "path != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(cVar5 = *path, cVar5 != '\0')" ( (comma_expression "cVar5 = *path, cVar5 != '\0'" (assignment_expression "cVar5 = *path" identifier = (pointer_expression "*path" * identifier)) , (binary_expression "cVar5 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence '))) ))) )) (compound_statement "{\n    if (((flags & 8U) == 0) || (cVar5 != '.')) {\n      local_1d = (bool)(cVar5 == '~' & (byte)flags);\n      if (local_1d != false) {\n        pcVar4 = bash_tilde_expand(path,0);\n        local_1d = path != pcVar4 && pcVar4 != "";\n        path = pcVar4;\n      }\n    }\n    else {\n      local_1d = false;\n      if ((path[1] == '\0') || ((path[1] == '/' && (path[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }\n    sVar1 = strlen(path);\n    local_24 = path;\n    goto LAB_000d6baa;\n  }" { (if_statement "if (((flags & 8U) == 0) || (cVar5 != '.')) {\n      local_1d = (bool)(cVar5 == '~' & (byte)flags);\n      if (local_1d != false) {\n        pcVar4 = bash_tilde_expand(path,0);\n        local_1d = path != pcVar4 && pcVar4 != "";\n        path = pcVar4;\n      }\n    }\n    else {\n      local_1d = false;\n      if ((path[1] == '\0') || ((path[1] == '/' && (path[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }" if (parenthesized_expression "(((flags & 8U) == 0) || (cVar5 != '.'))" ( (binary_expression "((flags & 8U) == 0) || (cVar5 != '.')" (parenthesized_expression "((flags & 8U) == 0)" ( (binary_expression "(flags & 8U) == 0" (parenthesized_expression "(flags & 8U)" ( (binary_expression "flags & 8U" identifier & number_literal) )) == number_literal) )) || (parenthesized_expression "(cVar5 != '.')" ( (binary_expression "cVar5 != '.'" identifier != (char_literal "'.'" ' character ')) ))) )) (compound_statement "{\n      local_1d = (bool)(cVar5 == '~' & (byte)flags);\n      if (local_1d != false) {\n        pcVar4 = bash_tilde_expand(path,0);\n        local_1d = path != pcVar4 && pcVar4 != "";\n        path = pcVar4;\n      }\n    }" { (expression_statement "local_1d = (bool)(cVar5 == '~' & (byte)flags);" (assignment_expression "local_1d = (bool)(cVar5 == '~' & (byte)flags)" identifier = (cast_expression "(bool)(cVar5 == '~' & (byte)flags)" ( (type_descriptor "bool" primitive_type) ) (parenthesized_expression "(cVar5 == '~' & (byte)flags)" ( (binary_expression "cVar5 == '~' & (byte)flags" (binary_expression "cVar5 == '~'" identifier == (char_literal "'~'" ' character ')) & (cast_expression "(byte)flags" ( (type_descriptor "byte" type_identifier) ) identifier)) )))) ;) (if_statement "if (local_1d != false) {\n        pcVar4 = bash_tilde_expand(path,0);\n        local_1d = path != pcVar4 && pcVar4 != "";\n        path = pcVar4;\n      }" if (parenthesized_expression "(local_1d != false)" ( (binary_expression "local_1d != false" identifier != false) )) (compound_statement "{\n        pcVar4 = bash_tilde_expand(path,0);\n        local_1d = path != pcVar4 && pcVar4 != "";\n        path = pcVar4;\n      }" { (expression_statement "pcVar4 = bash_tilde_expand(path,0);" (assignment_expression "pcVar4 = bash_tilde_expand(path,0)" identifier = (call_expression "bash_tilde_expand(path,0)" identifier (argument_list "(path,0)" ( identifier , number_literal )))) ;) (expression_statement "local_1d = path != pcVar4 && pcVar4 != "";" (assignment_expression "local_1d = path != pcVar4 && pcVar4 != """ identifier = (binary_expression "path != pcVar4 && pcVar4 != """ (binary_expression "path != pcVar4" identifier != identifier) && (binary_expression "pcVar4 != """ identifier != (string_literal """" " ")))) ;) (expression_statement "path = pcVar4;" (assignment_expression "path = pcVar4" identifier = identifier) ;) })) }) (else_clause "else {\n      local_1d = false;\n      if ((path[1] == '\0') || ((path[1] == '/' && (path[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }" else (compound_statement "{\n      local_1d = false;\n      if ((path[1] == '\0') || ((path[1] == '/' && (path[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }" { (expression_statement "local_1d = false;" (assignment_expression "local_1d = false" identifier = false) ;) (if_statement "if ((path[1] == '\0') || ((path[1] == '/' && (path[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }" if (parenthesized_expression "((path[1] == '\0') || ((path[1] == '/' && (path[2] == '\0'))))" ( (binary_expression "(path[1] == '\0') || ((path[1] == '/' && (path[2] == '\0')))" (parenthesized_expression "(path[1] == '\0')" ( (binary_expression "path[1] == '\0'" (subscript_expression "path[1]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) || (parenthesized_expression "((path[1] == '/' && (path[2] == '\0')))" ( (parenthesized_expression "(path[1] == '/' && (path[2] == '\0'))" ( (binary_expression "path[1] == '/' && (path[2] == '\0')" (binary_expression "path[1] == '/'" (subscript_expression "path[1]" identifier [ number_literal ]) == (char_literal "'/'" ' character ')) && (parenthesized_expression "(path[2] == '\0')" ( (binary_expression "path[2] == '\0'" (subscript_expression "path[2]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) ))) )) ))) )) (compound_statement "{\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }" { (expression_statement "local_24 = "";" (assignment_expression "local_24 = """ identifier = (string_literal """" " ")) ;) (expression_statement "sVar1 = 0;" (assignment_expression "sVar1 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_000d6baa;" goto statement_identifier ;) })) }))) (expression_statement "sVar1 = strlen(path);" (assignment_expression "sVar1 = strlen(path)" identifier = (call_expression "strlen(path)" identifier (argument_list "(path)" ( identifier )))) ;) (expression_statement "local_24 = path;" (assignment_expression "local_24 = path" identifier = identifier) ;) (goto_statement "goto LAB_000d6baa;" goto statement_identifier ;) })) (if_statement "if ((flags & 2U) == 0) {\nLAB_000d6b70:\n    sVar1 = 1;\n    local_24 = (char *)xmalloc(2);\n    local_24[0] = '.';\n    local_24[1] = '\0';\n    local_1d = local_24 != "" && path != local_24;\n  }\n  else {\n    local_24 = get_working_directory("sh_makepath");\n    if (local_24 == (char *)0x0) {\n      pcVar4 = get_string_value("PWD");\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }\n    sVar1 = strlen(local_24);\n    local_1d = local_24 != "" && path != local_24;\n  }" if (parenthesized_expression "((flags & 2U) == 0)" ( (binary_expression "(flags & 2U) == 0" (parenthesized_expression "(flags & 2U)" ( (binary_expression "flags & 2U" identifier & number_literal) )) == number_literal) )) (compound_statement "{\nLAB_000d6b70:\n    sVar1 = 1;\n    local_24 = (char *)xmalloc(2);\n    local_24[0] = '.';\n    local_24[1] = '\0';\n    local_1d = local_24 != "" && path != local_24;\n  }" { (labeled_statement "LAB_000d6b70:\n    sVar1 = 1;" statement_identifier : (expression_statement "sVar1 = 1;" (assignment_expression "sVar1 = 1" identifier = number_literal) ;)) (expression_statement "local_24 = (char *)xmalloc(2);" (assignment_expression "local_24 = (char *)xmalloc(2)" identifier = (cast_expression "(char *)xmalloc(2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(2)" identifier (argument_list "(2)" ( number_literal ))))) ;) (expression_statement "local_24[0] = '.';" (assignment_expression "local_24[0] = '.'" (subscript_expression "local_24[0]" identifier [ number_literal ]) = (char_literal "'.'" ' character ')) ;) (expression_statement "local_24[1] = '\0';" (assignment_expression "local_24[1] = '\0'" (subscript_expression "local_24[1]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "local_1d = local_24 != "" && path != local_24;" (assignment_expression "local_1d = local_24 != "" && path != local_24" identifier = (binary_expression "local_24 != "" && path != local_24" (binary_expression "local_24 != """ identifier != (string_literal """" " ")) && (binary_expression "path != local_24" identifier != identifier))) ;) }) (else_clause "else {\n    local_24 = get_working_directory("sh_makepath");\n    if (local_24 == (char *)0x0) {\n      pcVar4 = get_string_value("PWD");\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }\n    sVar1 = strlen(local_24);\n    local_1d = local_24 != "" && path != local_24;\n  }" else (compound_statement "{\n    local_24 = get_working_directory("sh_makepath");\n    if (local_24 == (char *)0x0) {\n      pcVar4 = get_string_value("PWD");\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }\n    sVar1 = strlen(local_24);\n    local_1d = local_24 != "" && path != local_24;\n  }" { (expression_statement "local_24 = get_working_directory("sh_makepath");" (assignment_expression "local_24 = get_working_directory("sh_makepath")" identifier = (call_expression "get_working_directory("sh_makepath")" identifier (argument_list "("sh_makepath")" ( (string_literal ""sh_makepath"" " string_content ") )))) ;) (if_statement "if (local_24 == (char *)0x0) {\n      pcVar4 = get_string_value("PWD");\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }" if (parenthesized_expression "(local_24 == (char *)0x0)" ( (binary_expression "local_24 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pcVar4 = get_string_value("PWD");\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }" { (expression_statement "pcVar4 = get_string_value("PWD");" (assignment_expression "pcVar4 = get_string_value("PWD")" identifier = (call_expression "get_string_value("PWD")" identifier (argument_list "("PWD")" ( (string_literal ""PWD"" " string_content ") )))) ;) (if_statement "if (pcVar4 == (char *)0x0) goto LAB_000d6b70;" if (parenthesized_expression "(pcVar4 == (char *)0x0)" ( (binary_expression "pcVar4 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_000d6b70;" goto statement_identifier ;)) (expression_statement "sVar1 = strlen(pcVar4);" (assignment_expression "sVar1 = strlen(pcVar4)" identifier = (call_expression "strlen(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier )))) ;) (expression_statement "pcVar7 = (char *)xmalloc(sVar1 + 1);" (assignment_expression "pcVar7 = (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 "local_24 = strcpy(pcVar7,pcVar4);" (assignment_expression "local_24 = strcpy(pcVar7,pcVar4)" identifier = (call_expression "strcpy(pcVar7,pcVar4)" identifier (argument_list "(pcVar7,pcVar4)" ( identifier , identifier )))) ;) })) (expression_statement "sVar1 = strlen(local_24);" (assignment_expression "sVar1 = strlen(local_24)" identifier = (call_expression "strlen(local_24)" identifier (argument_list "(local_24)" ( identifier )))) ;) (expression_statement "local_1d = local_24 != "" && path != local_24;" (assignment_expression "local_1d = local_24 != "" && path != local_24" identifier = (binary_expression "local_24 != "" && path != local_24" (binary_expression "local_24 != """ identifier != (string_literal """" " ")) && (binary_expression "path != local_24" identifier != identifier))) ;) }))) (labeled_statement "LAB_000d6baa:\n  sVar2 = strlen(dir);" statement_identifier : (expression_statement "sVar2 = strlen(dir);" (assignment_expression "sVar2 = strlen(dir)" identifier = (call_expression "strlen(dir)" identifier (argument_list "(dir)" ( identifier )))) ;)) (if_statement "if ((((flags & 4U) == 0) || (*dir != '.')) || (dir[1] != '/')) {\n    sVar2 = sVar2 + 2;\n  }\n  else {\n    dir = dir + 2;\n  }" if (parenthesized_expression "((((flags & 4U) == 0) || (*dir != '.')) || (dir[1] != '/'))" ( (binary_expression "(((flags & 4U) == 0) || (*dir != '.')) || (dir[1] != '/')" (parenthesized_expression "(((flags & 4U) == 0) || (*dir != '.'))" ( (binary_expression "((flags & 4U) == 0) || (*dir != '.')" (parenthesized_expression "((flags & 4U) == 0)" ( (binary_expression "(flags & 4U) == 0" (parenthesized_expression "(flags & 4U)" ( (binary_expression "flags & 4U" identifier & number_literal) )) == number_literal) )) || (parenthesized_expression "(*dir != '.')" ( (binary_expression "*dir != '.'" (pointer_expression "*dir" * identifier) != (char_literal "'.'" ' character ')) ))) )) || (parenthesized_expression "(dir[1] != '/')" ( (binary_expression "dir[1] != '/'" (subscript_expression "dir[1]" identifier [ number_literal ]) != (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n    sVar2 = sVar2 + 2;\n  }" { (expression_statement "sVar2 = sVar2 + 2;" (assignment_expression "sVar2 = sVar2 + 2" identifier = (binary_expression "sVar2 + 2" identifier + number_literal)) ;) }) (else_clause "else {\n    dir = dir + 2;\n  }" else (compound_statement "{\n    dir = dir + 2;\n  }" { (expression_statement "dir = dir + 2;" (assignment_expression "dir = dir + 2" identifier = (binary_expression "dir + 2" identifier + number_literal)) ;) }))) (expression_statement "pcVar3 = (char *)xmalloc(sVar2 + sVar1);" (assignment_expression "pcVar3 = (char *)xmalloc(sVar2 + sVar1)" identifier = (cast_expression "(char *)xmalloc(sVar2 + sVar1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar2 + sVar1)" identifier (argument_list "(sVar2 + sVar1)" ( (binary_expression "sVar2 + sVar1" identifier + identifier) ))))) ;) (expression_statement "cVar5 = *local_24;" (assignment_expression "cVar5 = *local_24" identifier = (pointer_expression "*local_24" * identifier)) ;) (expression_statement "pcVar4 = pcVar3;" (assignment_expression "pcVar4 = pcVar3" identifier = identifier) ;) (expression_statement "pcVar7 = local_24;" (assignment_expression "pcVar7 = local_24" identifier = identifier) ;) (if_statement "if (cVar5 != '\0') {\n    do {\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    } while (cVar5 != '\0');\n    if ((local_24 < pcVar7) && (*pcVar8 != '/')) {\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }\n  }" if (parenthesized_expression "(cVar5 != '\0')" ( (binary_expression "cVar5 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    do {\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    } while (cVar5 != '\0');\n    if ((local_24 < pcVar7) && (*pcVar8 != '/')) {\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }\n  }" { (do_statement "do {\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    } while (cVar5 != '\0');" do (compound_statement "{\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    }" { (expression_statement "pcVar8 = pcVar7;" (assignment_expression "pcVar8 = pcVar7" identifier = identifier) ;) (expression_statement "pcVar6 = pcVar4;" (assignment_expression "pcVar6 = pcVar4" identifier = identifier) ;) (expression_statement "pcVar7 = pcVar8 + 1;" (assignment_expression "pcVar7 = pcVar8 + 1" identifier = (binary_expression "pcVar8 + 1" identifier + number_literal)) ;) (expression_statement "pcVar4 = pcVar6 + 1;" (assignment_expression "pcVar4 = pcVar6 + 1" identifier = (binary_expression "pcVar6 + 1" identifier + number_literal)) ;) (expression_statement "*pcVar6 = cVar5;" (assignment_expression "*pcVar6 = cVar5" (pointer_expression "*pcVar6" * identifier) = identifier) ;) (expression_statement "cVar5 = *pcVar7;" (assignment_expression "cVar5 = *pcVar7" identifier = (pointer_expression "*pcVar7" * identifier)) ;) }) while (parenthesized_expression "(cVar5 != '\0')" ( (binary_expression "cVar5 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) ;) (if_statement "if ((local_24 < pcVar7) && (*pcVar8 != '/')) {\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }" if (parenthesized_expression "((local_24 < pcVar7) && (*pcVar8 != '/'))" ( (binary_expression "(local_24 < pcVar7) && (*pcVar8 != '/')" (parenthesized_expression "(local_24 < pcVar7)" ( (binary_expression "local_24 < pcVar7" identifier < identifier) )) && (parenthesized_expression "(*pcVar8 != '/')" ( (binary_expression "*pcVar8 != '/'" (pointer_expression "*pcVar8" * identifier) != (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }" { (expression_statement "*pcVar4 = '/';" (assignment_expression "*pcVar4 = '/'" (pointer_expression "*pcVar4" * identifier) = (char_literal "'/'" ' character ')) ;) (expression_statement "pcVar4 = pcVar6 + 2;" (assignment_expression "pcVar4 = pcVar6 + 2" identifier = (binary_expression "pcVar6 + 2" identifier + number_literal)) ;) })) })) (expression_statement "iVar9 = 0;" (assignment_expression "iVar9 = 0" identifier = number_literal) ;) (do_statement "do {\n    cVar5 = dir[iVar9];\n    pcVar4[iVar9] = cVar5;\n    iVar9 = iVar9 + 1;\n  } while (cVar5 != '\0');" do (compound_statement "{\n    cVar5 = dir[iVar9];\n    pcVar4[iVar9] = cVar5;\n    iVar9 = iVar9 + 1;\n  }" { (expression_statement "cVar5 = dir[iVar9];" (assignment_expression "cVar5 = dir[iVar9]" identifier = (subscript_expression "dir[iVar9]" identifier [ identifier ])) ;) (expression_statement "pcVar4[iVar9] = cVar5;" (assignment_expression "pcVar4[iVar9] = cVar5" (subscript_expression "pcVar4[iVar9]" identifier [ identifier ]) = identifier) ;) (expression_statement "iVar9 = iVar9 + 1;" (assignment_expression "iVar9 = iVar9 + 1" identifier = (binary_expression "iVar9 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(cVar5 != '\0')" ( (binary_expression "cVar5 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) ;) (if_statement "if (local_1d != false) {\n    free(local_24);\n  }" if (parenthesized_expression "(local_1d != false)" ( (binary_expression "local_1d != false" identifier != false) )) (compound_statement "{\n    free(local_24);\n  }" { (expression_statement "free(local_24);" (call_expression "free(local_24)" identifier (argument_list "(local_24)" ( identifier ))) ;) })) (return_statement "return pcVar3;" return identifier ;) })))
(translation_unit "char * sh_makepath(char *param_1,char *param_2,byte param_3)\n\n{\n  size_t sVar1;\n  size_t sVar2;\n  char *pcVar3;\n  char *pcVar4;\n  char cVar5;\n  char *pcVar6;\n  char *pcVar7;\n  int iVar9;\n  char *local_24;\n  bool local_1d;\n  char *pcVar8;\n  \n  if ((param_1 != (char *)0x0) && (cVar5 = *param_1, cVar5 != '\0')) {\n    if (((param_3 & 8) == 0) || (cVar5 != '.')) {\n      local_1d = (bool)(cVar5 == '~' & param_3);\n      if (local_1d != false) {\n        pcVar4 = (char *)bash_tilde_expand(param_1,0);\n        local_1d = param_1 != pcVar4 && pcVar4 != "";\n        param_1 = pcVar4;\n      }\n    }\n    else {\n      local_1d = false;\n      if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }\n    sVar1 = strlen(param_1);\n    local_24 = param_1;\n    goto LAB_000d6baa;\n  }\n  if ((param_3 & 2) == 0) {\nLAB_000d6b70:\n    sVar1 = 1;\n    local_24 = (char *)xmalloc(2);\n    local_24[0] = '.';\n    local_24[1] = '\0';\n    local_1d = local_24 != "" && param_1 != local_24;\n  }\n  else {\n    local_24 = (char *)get_working_directory("sh_makepath");\n    if (local_24 == (char *)0x0) {\n      pcVar4 = (char *)get_string_value(&DAT_0011214a);\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }\n    sVar1 = strlen(local_24);\n    local_1d = local_24 != "" && param_1 != local_24;\n  }\nLAB_000d6baa:\n  sVar2 = strlen(param_2);\n  if ((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')) {\n    sVar2 = sVar2 + 2;\n  }\n  else {\n    param_2 = param_2 + 2;\n  }\n  pcVar3 = (char *)xmalloc(sVar2 + sVar1);\n  cVar5 = *local_24;\n  pcVar4 = pcVar3;\n  pcVar7 = local_24;\n  if (cVar5 != '\0') {\n    do {\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    } while (cVar5 != '\0');\n    if ((local_24 < pcVar7) && (*pcVar8 != '/')) {\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }\n  }\n  iVar9 = 0;\n  do {\n    cVar5 = param_2[iVar9];\n    pcVar4[iVar9] = cVar5;\n    iVar9 = iVar9 + 1;\n  } while (cVar5 != '\0');\n  if (local_1d != false) {\n    free(local_24);\n  }\n  return pcVar3;\n}\n\n" (function_definition "char * sh_makepath(char *param_1,char *param_2,byte param_3)\n\n{\n  size_t sVar1;\n  size_t sVar2;\n  char *pcVar3;\n  char *pcVar4;\n  char cVar5;\n  char *pcVar6;\n  char *pcVar7;\n  int iVar9;\n  char *local_24;\n  bool local_1d;\n  char *pcVar8;\n  \n  if ((param_1 != (char *)0x0) && (cVar5 = *param_1, cVar5 != '\0')) {\n    if (((param_3 & 8) == 0) || (cVar5 != '.')) {\n      local_1d = (bool)(cVar5 == '~' & param_3);\n      if (local_1d != false) {\n        pcVar4 = (char *)bash_tilde_expand(param_1,0);\n        local_1d = param_1 != pcVar4 && pcVar4 != "";\n        param_1 = pcVar4;\n      }\n    }\n    else {\n      local_1d = false;\n      if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }\n    sVar1 = strlen(param_1);\n    local_24 = param_1;\n    goto LAB_000d6baa;\n  }\n  if ((param_3 & 2) == 0) {\nLAB_000d6b70:\n    sVar1 = 1;\n    local_24 = (char *)xmalloc(2);\n    local_24[0] = '.';\n    local_24[1] = '\0';\n    local_1d = local_24 != "" && param_1 != local_24;\n  }\n  else {\n    local_24 = (char *)get_working_directory("sh_makepath");\n    if (local_24 == (char *)0x0) {\n      pcVar4 = (char *)get_string_value(&DAT_0011214a);\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }\n    sVar1 = strlen(local_24);\n    local_1d = local_24 != "" && param_1 != local_24;\n  }\nLAB_000d6baa:\n  sVar2 = strlen(param_2);\n  if ((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')) {\n    sVar2 = sVar2 + 2;\n  }\n  else {\n    param_2 = param_2 + 2;\n  }\n  pcVar3 = (char *)xmalloc(sVar2 + sVar1);\n  cVar5 = *local_24;\n  pcVar4 = pcVar3;\n  pcVar7 = local_24;\n  if (cVar5 != '\0') {\n    do {\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    } while (cVar5 != '\0');\n    if ((local_24 < pcVar7) && (*pcVar8 != '/')) {\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }\n  }\n  iVar9 = 0;\n  do {\n    cVar5 = param_2[iVar9];\n    pcVar4[iVar9] = cVar5;\n    iVar9 = iVar9 + 1;\n  } while (cVar5 != '\0');\n  if (local_1d != false) {\n    free(local_24);\n  }\n  return pcVar3;\n}" primitive_type (pointer_declarator "* sh_makepath(char *param_1,char *param_2,byte param_3)" * (function_declarator "sh_makepath(char *param_1,char *param_2,byte param_3)" identifier (parameter_list "(char *param_1,char *param_2,byte param_3)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "byte param_3" type_identifier identifier) )))) (compound_statement "{\n  size_t sVar1;\n  size_t sVar2;\n  char *pcVar3;\n  char *pcVar4;\n  char cVar5;\n  char *pcVar6;\n  char *pcVar7;\n  int iVar9;\n  char *local_24;\n  bool local_1d;\n  char *pcVar8;\n  \n  if ((param_1 != (char *)0x0) && (cVar5 = *param_1, cVar5 != '\0')) {\n    if (((param_3 & 8) == 0) || (cVar5 != '.')) {\n      local_1d = (bool)(cVar5 == '~' & param_3);\n      if (local_1d != false) {\n        pcVar4 = (char *)bash_tilde_expand(param_1,0);\n        local_1d = param_1 != pcVar4 && pcVar4 != "";\n        param_1 = pcVar4;\n      }\n    }\n    else {\n      local_1d = false;\n      if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }\n    sVar1 = strlen(param_1);\n    local_24 = param_1;\n    goto LAB_000d6baa;\n  }\n  if ((param_3 & 2) == 0) {\nLAB_000d6b70:\n    sVar1 = 1;\n    local_24 = (char *)xmalloc(2);\n    local_24[0] = '.';\n    local_24[1] = '\0';\n    local_1d = local_24 != "" && param_1 != local_24;\n  }\n  else {\n    local_24 = (char *)get_working_directory("sh_makepath");\n    if (local_24 == (char *)0x0) {\n      pcVar4 = (char *)get_string_value(&DAT_0011214a);\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }\n    sVar1 = strlen(local_24);\n    local_1d = local_24 != "" && param_1 != local_24;\n  }\nLAB_000d6baa:\n  sVar2 = strlen(param_2);\n  if ((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')) {\n    sVar2 = sVar2 + 2;\n  }\n  else {\n    param_2 = param_2 + 2;\n  }\n  pcVar3 = (char *)xmalloc(sVar2 + sVar1);\n  cVar5 = *local_24;\n  pcVar4 = pcVar3;\n  pcVar7 = local_24;\n  if (cVar5 != '\0') {\n    do {\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    } while (cVar5 != '\0');\n    if ((local_24 < pcVar7) && (*pcVar8 != '/')) {\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }\n  }\n  iVar9 = 0;\n  do {\n    cVar5 = param_2[iVar9];\n    pcVar4[iVar9] = cVar5;\n    iVar9 = iVar9 + 1;\n  } while (cVar5 != '\0');\n  if (local_1d != false) {\n    free(local_24);\n  }\n  return pcVar3;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "char cVar5;" primitive_type identifier ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "char *pcVar7;" primitive_type (pointer_declarator "*pcVar7" * identifier) ;) (declaration "int iVar9;" primitive_type identifier ;) (declaration "char *local_24;" primitive_type (pointer_declarator "*local_24" * identifier) ;) (declaration "bool local_1d;" primitive_type identifier ;) (declaration "char *pcVar8;" primitive_type (pointer_declarator "*pcVar8" * identifier) ;) (if_statement "if ((param_1 != (char *)0x0) && (cVar5 = *param_1, cVar5 != '\0')) {\n    if (((param_3 & 8) == 0) || (cVar5 != '.')) {\n      local_1d = (bool)(cVar5 == '~' & param_3);\n      if (local_1d != false) {\n        pcVar4 = (char *)bash_tilde_expand(param_1,0);\n        local_1d = param_1 != pcVar4 && pcVar4 != "";\n        param_1 = pcVar4;\n      }\n    }\n    else {\n      local_1d = false;\n      if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }\n    sVar1 = strlen(param_1);\n    local_24 = param_1;\n    goto LAB_000d6baa;\n  }" if (parenthesized_expression "((param_1 != (char *)0x0) && (cVar5 = *param_1, cVar5 != '\0'))" ( (binary_expression "(param_1 != (char *)0x0) && (cVar5 = *param_1, cVar5 != '\0')" (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)) )) && (parenthesized_expression "(cVar5 = *param_1, cVar5 != '\0')" ( (comma_expression "cVar5 = *param_1, cVar5 != '\0'" (assignment_expression "cVar5 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) , (binary_expression "cVar5 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence '))) ))) )) (compound_statement "{\n    if (((param_3 & 8) == 0) || (cVar5 != '.')) {\n      local_1d = (bool)(cVar5 == '~' & param_3);\n      if (local_1d != false) {\n        pcVar4 = (char *)bash_tilde_expand(param_1,0);\n        local_1d = param_1 != pcVar4 && pcVar4 != "";\n        param_1 = pcVar4;\n      }\n    }\n    else {\n      local_1d = false;\n      if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }\n    sVar1 = strlen(param_1);\n    local_24 = param_1;\n    goto LAB_000d6baa;\n  }" { (if_statement "if (((param_3 & 8) == 0) || (cVar5 != '.')) {\n      local_1d = (bool)(cVar5 == '~' & param_3);\n      if (local_1d != false) {\n        pcVar4 = (char *)bash_tilde_expand(param_1,0);\n        local_1d = param_1 != pcVar4 && pcVar4 != "";\n        param_1 = pcVar4;\n      }\n    }\n    else {\n      local_1d = false;\n      if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }" if (parenthesized_expression "(((param_3 & 8) == 0) || (cVar5 != '.'))" ( (binary_expression "((param_3 & 8) == 0) || (cVar5 != '.')" (parenthesized_expression "((param_3 & 8) == 0)" ( (binary_expression "(param_3 & 8) == 0" (parenthesized_expression "(param_3 & 8)" ( (binary_expression "param_3 & 8" identifier & number_literal) )) == number_literal) )) || (parenthesized_expression "(cVar5 != '.')" ( (binary_expression "cVar5 != '.'" identifier != (char_literal "'.'" ' character ')) ))) )) (compound_statement "{\n      local_1d = (bool)(cVar5 == '~' & param_3);\n      if (local_1d != false) {\n        pcVar4 = (char *)bash_tilde_expand(param_1,0);\n        local_1d = param_1 != pcVar4 && pcVar4 != "";\n        param_1 = pcVar4;\n      }\n    }" { (expression_statement "local_1d = (bool)(cVar5 == '~' & param_3);" (assignment_expression "local_1d = (bool)(cVar5 == '~' & param_3)" identifier = (cast_expression "(bool)(cVar5 == '~' & param_3)" ( (type_descriptor "bool" primitive_type) ) (parenthesized_expression "(cVar5 == '~' & param_3)" ( (binary_expression "cVar5 == '~' & param_3" (binary_expression "cVar5 == '~'" identifier == (char_literal "'~'" ' character ')) & identifier) )))) ;) (if_statement "if (local_1d != false) {\n        pcVar4 = (char *)bash_tilde_expand(param_1,0);\n        local_1d = param_1 != pcVar4 && pcVar4 != "";\n        param_1 = pcVar4;\n      }" if (parenthesized_expression "(local_1d != false)" ( (binary_expression "local_1d != false" identifier != false) )) (compound_statement "{\n        pcVar4 = (char *)bash_tilde_expand(param_1,0);\n        local_1d = param_1 != pcVar4 && pcVar4 != "";\n        param_1 = pcVar4;\n      }" { (expression_statement "pcVar4 = (char *)bash_tilde_expand(param_1,0);" (assignment_expression "pcVar4 = (char *)bash_tilde_expand(param_1,0)" identifier = (cast_expression "(char *)bash_tilde_expand(param_1,0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "bash_tilde_expand(param_1,0)" identifier (argument_list "(param_1,0)" ( identifier , number_literal ))))) ;) (expression_statement "local_1d = param_1 != pcVar4 && pcVar4 != "";" (assignment_expression "local_1d = param_1 != pcVar4 && pcVar4 != """ identifier = (binary_expression "param_1 != pcVar4 && pcVar4 != """ (binary_expression "param_1 != pcVar4" identifier != identifier) && (binary_expression "pcVar4 != """ identifier != (string_literal """" " ")))) ;) (expression_statement "param_1 = pcVar4;" (assignment_expression "param_1 = pcVar4" identifier = identifier) ;) })) }) (else_clause "else {\n      local_1d = false;\n      if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }" else (compound_statement "{\n      local_1d = false;\n      if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }" { (expression_statement "local_1d = false;" (assignment_expression "local_1d = false" identifier = false) ;) (if_statement "if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }" if (parenthesized_expression "((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0'))))" ( (binary_expression "(param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))" (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] == '/' && (param_1[2] == '\0')))" ( (parenthesized_expression "(param_1[1] == '/' && (param_1[2] == '\0'))" ( (binary_expression "param_1[1] == '/' && (param_1[2] == '\0')" (binary_expression "param_1[1] == '/'" (subscript_expression "param_1[1]" identifier [ number_literal ]) == (char_literal "'/'" ' character ')) && (parenthesized_expression "(param_1[2] == '\0')" ( (binary_expression "param_1[2] == '\0'" (subscript_expression "param_1[2]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) ))) )) ))) )) (compound_statement "{\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }" { (expression_statement "local_24 = "";" (assignment_expression "local_24 = """ identifier = (string_literal """" " ")) ;) (expression_statement "sVar1 = 0;" (assignment_expression "sVar1 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_000d6baa;" 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 "local_24 = param_1;" (assignment_expression "local_24 = param_1" identifier = identifier) ;) (goto_statement "goto LAB_000d6baa;" goto statement_identifier ;) })) (if_statement "if ((param_3 & 2) == 0) {\nLAB_000d6b70:\n    sVar1 = 1;\n    local_24 = (char *)xmalloc(2);\n    local_24[0] = '.';\n    local_24[1] = '\0';\n    local_1d = local_24 != "" && param_1 != local_24;\n  }\n  else {\n    local_24 = (char *)get_working_directory("sh_makepath");\n    if (local_24 == (char *)0x0) {\n      pcVar4 = (char *)get_string_value(&DAT_0011214a);\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }\n    sVar1 = strlen(local_24);\n    local_1d = local_24 != "" && param_1 != local_24;\n  }" if (parenthesized_expression "((param_3 & 2) == 0)" ( (binary_expression "(param_3 & 2) == 0" (parenthesized_expression "(param_3 & 2)" ( (binary_expression "param_3 & 2" identifier & number_literal) )) == number_literal) )) (compound_statement "{\nLAB_000d6b70:\n    sVar1 = 1;\n    local_24 = (char *)xmalloc(2);\n    local_24[0] = '.';\n    local_24[1] = '\0';\n    local_1d = local_24 != "" && param_1 != local_24;\n  }" { (labeled_statement "LAB_000d6b70:\n    sVar1 = 1;" statement_identifier : (expression_statement "sVar1 = 1;" (assignment_expression "sVar1 = 1" identifier = number_literal) ;)) (expression_statement "local_24 = (char *)xmalloc(2);" (assignment_expression "local_24 = (char *)xmalloc(2)" identifier = (cast_expression "(char *)xmalloc(2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(2)" identifier (argument_list "(2)" ( number_literal ))))) ;) (expression_statement "local_24[0] = '.';" (assignment_expression "local_24[0] = '.'" (subscript_expression "local_24[0]" identifier [ number_literal ]) = (char_literal "'.'" ' character ')) ;) (expression_statement "local_24[1] = '\0';" (assignment_expression "local_24[1] = '\0'" (subscript_expression "local_24[1]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "local_1d = local_24 != "" && param_1 != local_24;" (assignment_expression "local_1d = local_24 != "" && param_1 != local_24" identifier = (binary_expression "local_24 != "" && param_1 != local_24" (binary_expression "local_24 != """ identifier != (string_literal """" " ")) && (binary_expression "param_1 != local_24" identifier != identifier))) ;) }) (else_clause "else {\n    local_24 = (char *)get_working_directory("sh_makepath");\n    if (local_24 == (char *)0x0) {\n      pcVar4 = (char *)get_string_value(&DAT_0011214a);\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }\n    sVar1 = strlen(local_24);\n    local_1d = local_24 != "" && param_1 != local_24;\n  }" else (compound_statement "{\n    local_24 = (char *)get_working_directory("sh_makepath");\n    if (local_24 == (char *)0x0) {\n      pcVar4 = (char *)get_string_value(&DAT_0011214a);\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }\n    sVar1 = strlen(local_24);\n    local_1d = local_24 != "" && param_1 != local_24;\n  }" { (expression_statement "local_24 = (char *)get_working_directory("sh_makepath");" (assignment_expression "local_24 = (char *)get_working_directory("sh_makepath")" identifier = (cast_expression "(char *)get_working_directory("sh_makepath")" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "get_working_directory("sh_makepath")" identifier (argument_list "("sh_makepath")" ( (string_literal ""sh_makepath"" " string_content ") ))))) ;) (if_statement "if (local_24 == (char *)0x0) {\n      pcVar4 = (char *)get_string_value(&DAT_0011214a);\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }" if (parenthesized_expression "(local_24 == (char *)0x0)" ( (binary_expression "local_24 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pcVar4 = (char *)get_string_value(&DAT_0011214a);\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }" { (expression_statement "pcVar4 = (char *)get_string_value(&DAT_0011214a);" (assignment_expression "pcVar4 = (char *)get_string_value(&DAT_0011214a)" identifier = (cast_expression "(char *)get_string_value(&DAT_0011214a)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "get_string_value(&DAT_0011214a)" identifier (argument_list "(&DAT_0011214a)" ( (pointer_expression "&DAT_0011214a" & identifier) ))))) ;) (if_statement "if (pcVar4 == (char *)0x0) goto LAB_000d6b70;" if (parenthesized_expression "(pcVar4 == (char *)0x0)" ( (binary_expression "pcVar4 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_000d6b70;" goto statement_identifier ;)) (expression_statement "sVar1 = strlen(pcVar4);" (assignment_expression "sVar1 = strlen(pcVar4)" identifier = (call_expression "strlen(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier )))) ;) (expression_statement "pcVar7 = (char *)xmalloc(sVar1 + 1);" (assignment_expression "pcVar7 = (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 "local_24 = strcpy(pcVar7,pcVar4);" (assignment_expression "local_24 = strcpy(pcVar7,pcVar4)" identifier = (call_expression "strcpy(pcVar7,pcVar4)" identifier (argument_list "(pcVar7,pcVar4)" ( identifier , identifier )))) ;) })) (expression_statement "sVar1 = strlen(local_24);" (assignment_expression "sVar1 = strlen(local_24)" identifier = (call_expression "strlen(local_24)" identifier (argument_list "(local_24)" ( identifier )))) ;) (expression_statement "local_1d = local_24 != "" && param_1 != local_24;" (assignment_expression "local_1d = local_24 != "" && param_1 != local_24" identifier = (binary_expression "local_24 != "" && param_1 != local_24" (binary_expression "local_24 != """ identifier != (string_literal """" " ")) && (binary_expression "param_1 != local_24" identifier != identifier))) ;) }))) (labeled_statement "LAB_000d6baa:\n  sVar2 = strlen(param_2);" statement_identifier : (expression_statement "sVar2 = strlen(param_2);" (assignment_expression "sVar2 = strlen(param_2)" identifier = (call_expression "strlen(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;)) (if_statement "if ((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')) {\n    sVar2 = sVar2 + 2;\n  }\n  else {\n    param_2 = param_2 + 2;\n  }" if (parenthesized_expression "((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/'))" ( (binary_expression "(((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')" (parenthesized_expression "(((param_3 & 4) == 0) || (*param_2 != '.'))" ( (binary_expression "((param_3 & 4) == 0) || (*param_2 != '.')" (parenthesized_expression "((param_3 & 4) == 0)" ( (binary_expression "(param_3 & 4) == 0" (parenthesized_expression "(param_3 & 4)" ( (binary_expression "param_3 & 4" identifier & number_literal) )) == number_literal) )) || (parenthesized_expression "(*param_2 != '.')" ( (binary_expression "*param_2 != '.'" (pointer_expression "*param_2" * identifier) != (char_literal "'.'" ' character ')) ))) )) || (parenthesized_expression "(param_2[1] != '/')" ( (binary_expression "param_2[1] != '/'" (subscript_expression "param_2[1]" identifier [ number_literal ]) != (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n    sVar2 = sVar2 + 2;\n  }" { (expression_statement "sVar2 = sVar2 + 2;" (assignment_expression "sVar2 = sVar2 + 2" identifier = (binary_expression "sVar2 + 2" identifier + number_literal)) ;) }) (else_clause "else {\n    param_2 = param_2 + 2;\n  }" else (compound_statement "{\n    param_2 = param_2 + 2;\n  }" { (expression_statement "param_2 = param_2 + 2;" (assignment_expression "param_2 = param_2 + 2" identifier = (binary_expression "param_2 + 2" identifier + number_literal)) ;) }))) (expression_statement "pcVar3 = (char *)xmalloc(sVar2 + sVar1);" (assignment_expression "pcVar3 = (char *)xmalloc(sVar2 + sVar1)" identifier = (cast_expression "(char *)xmalloc(sVar2 + sVar1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar2 + sVar1)" identifier (argument_list "(sVar2 + sVar1)" ( (binary_expression "sVar2 + sVar1" identifier + identifier) ))))) ;) (expression_statement "cVar5 = *local_24;" (assignment_expression "cVar5 = *local_24" identifier = (pointer_expression "*local_24" * identifier)) ;) (expression_statement "pcVar4 = pcVar3;" (assignment_expression "pcVar4 = pcVar3" identifier = identifier) ;) (expression_statement "pcVar7 = local_24;" (assignment_expression "pcVar7 = local_24" identifier = identifier) ;) (if_statement "if (cVar5 != '\0') {\n    do {\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    } while (cVar5 != '\0');\n    if ((local_24 < pcVar7) && (*pcVar8 != '/')) {\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }\n  }" if (parenthesized_expression "(cVar5 != '\0')" ( (binary_expression "cVar5 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    do {\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    } while (cVar5 != '\0');\n    if ((local_24 < pcVar7) && (*pcVar8 != '/')) {\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }\n  }" { (do_statement "do {\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    } while (cVar5 != '\0');" do (compound_statement "{\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    }" { (expression_statement "pcVar8 = pcVar7;" (assignment_expression "pcVar8 = pcVar7" identifier = identifier) ;) (expression_statement "pcVar6 = pcVar4;" (assignment_expression "pcVar6 = pcVar4" identifier = identifier) ;) (expression_statement "pcVar7 = pcVar8 + 1;" (assignment_expression "pcVar7 = pcVar8 + 1" identifier = (binary_expression "pcVar8 + 1" identifier + number_literal)) ;) (expression_statement "pcVar4 = pcVar6 + 1;" (assignment_expression "pcVar4 = pcVar6 + 1" identifier = (binary_expression "pcVar6 + 1" identifier + number_literal)) ;) (expression_statement "*pcVar6 = cVar5;" (assignment_expression "*pcVar6 = cVar5" (pointer_expression "*pcVar6" * identifier) = identifier) ;) (expression_statement "cVar5 = *pcVar7;" (assignment_expression "cVar5 = *pcVar7" identifier = (pointer_expression "*pcVar7" * identifier)) ;) }) while (parenthesized_expression "(cVar5 != '\0')" ( (binary_expression "cVar5 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) ;) (if_statement "if ((local_24 < pcVar7) && (*pcVar8 != '/')) {\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }" if (parenthesized_expression "((local_24 < pcVar7) && (*pcVar8 != '/'))" ( (binary_expression "(local_24 < pcVar7) && (*pcVar8 != '/')" (parenthesized_expression "(local_24 < pcVar7)" ( (binary_expression "local_24 < pcVar7" identifier < identifier) )) && (parenthesized_expression "(*pcVar8 != '/')" ( (binary_expression "*pcVar8 != '/'" (pointer_expression "*pcVar8" * identifier) != (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }" { (expression_statement "*pcVar4 = '/';" (assignment_expression "*pcVar4 = '/'" (pointer_expression "*pcVar4" * identifier) = (char_literal "'/'" ' character ')) ;) (expression_statement "pcVar4 = pcVar6 + 2;" (assignment_expression "pcVar4 = pcVar6 + 2" identifier = (binary_expression "pcVar6 + 2" identifier + number_literal)) ;) })) })) (expression_statement "iVar9 = 0;" (assignment_expression "iVar9 = 0" identifier = number_literal) ;) (do_statement "do {\n    cVar5 = param_2[iVar9];\n    pcVar4[iVar9] = cVar5;\n    iVar9 = iVar9 + 1;\n  } while (cVar5 != '\0');" do (compound_statement "{\n    cVar5 = param_2[iVar9];\n    pcVar4[iVar9] = cVar5;\n    iVar9 = iVar9 + 1;\n  }" { (expression_statement "cVar5 = param_2[iVar9];" (assignment_expression "cVar5 = param_2[iVar9]" identifier = (subscript_expression "param_2[iVar9]" identifier [ identifier ])) ;) (expression_statement "pcVar4[iVar9] = cVar5;" (assignment_expression "pcVar4[iVar9] = cVar5" (subscript_expression "pcVar4[iVar9]" identifier [ identifier ]) = identifier) ;) (expression_statement "iVar9 = iVar9 + 1;" (assignment_expression "iVar9 = iVar9 + 1" identifier = (binary_expression "iVar9 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(cVar5 != '\0')" ( (binary_expression "cVar5 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) ;) (if_statement "if (local_1d != false) {\n    free(local_24);\n  }" if (parenthesized_expression "(local_1d != false)" ( (binary_expression "local_1d != false" identifier != false) )) (compound_statement "{\n    free(local_24);\n  }" { (expression_statement "free(local_24);" (call_expression "free(local_24)" identifier (argument_list "(local_24)" ( identifier ))) ;) })) (return_statement "return pcVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (pointer_expression * IDENT)) , (binary_expression IDENT != (char_literal ' escape_sequence '))) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) || (parenthesized_expression ( (binary_expression IDENT != (char_literal ' character ')) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT == (char_literal ' character ')) & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != BOOL) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , LIT ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT != IDENT) && (binary_expression IDENT != (string_literal " ")))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = BOOL) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == (char_literal ' escape_sequence ')) )) || (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression (subscript_expression IDENT [ LIT ]) == (char_literal ' character ')) && (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == (char_literal ' escape_sequence ')) ))) )) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (string_literal " ")) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) }))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (char_literal ' character ')) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (char_literal ' escape_sequence ')) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT != (string_literal " ")) && (binary_expression 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 ( (string_literal " string_content ") ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (pointer_expression & 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 )))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT != (string_literal " ")) && (binary_expression IDENT != IDENT))) ;) }))) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;)) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) || (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != (char_literal ' character ')) ))) )) || (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != (char_literal ' character ')) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }))) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + IDENT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) )) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < IDENT) )) && (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != (char_literal ' character ')) ))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (char_literal ' character ')) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) })) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ IDENT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) )) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != BOOL) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (return_statement return IDENT ;) })))
(function_definition "char * sh_makepath(char *param_1,char *param_2,byte param_3)\n\n{\n  size_t sVar1;\n  size_t sVar2;\n  char *pcVar3;\n  char *pcVar4;\n  char cVar5;\n  char *pcVar6;\n  char *pcVar7;\n  int iVar9;\n  char *local_24;\n  bool local_1d;\n  char *pcVar8;\n  \n  if ((param_1 != (char *)0x0) && (cVar5 = *param_1, cVar5 != '\0')) {\n    if (((param_3 & 8) == 0) || (cVar5 != '.')) {\n      local_1d = (bool)(cVar5 == '~' & param_3);\n      if (local_1d != false) {\n        pcVar4 = (char *)bash_tilde_expand(param_1,0);\n        local_1d = param_1 != pcVar4 && pcVar4 != "";\n        param_1 = pcVar4;\n      }\n    }\n    else {\n      local_1d = false;\n      if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }\n    sVar1 = strlen(param_1);\n    local_24 = param_1;\n    goto LAB_000d6baa;\n  }\n  if ((param_3 & 2) == 0) {\nLAB_000d6b70:\n    sVar1 = 1;\n    local_24 = (char *)xmalloc(2);\n    local_24[0] = '.';\n    local_24[1] = '\0';\n    local_1d = local_24 != "" && param_1 != local_24;\n  }\n  else {\n    local_24 = (char *)get_working_directory("sh_makepath");\n    if (local_24 == (char *)0x0) {\n      pcVar4 = (char *)get_string_value(&DAT_0011214a);\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }\n    sVar1 = strlen(local_24);\n    local_1d = local_24 != "" && param_1 != local_24;\n  }\nLAB_000d6baa:\n  sVar2 = strlen(param_2);\n  if ((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')) {\n    sVar2 = sVar2 + 2;\n  }\n  else {\n    param_2 = param_2 + 2;\n  }\n  pcVar3 = (char *)xmalloc(sVar2 + sVar1);\n  cVar5 = *local_24;\n  pcVar4 = pcVar3;\n  pcVar7 = local_24;\n  if (cVar5 != '\0') {\n    do {\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    } while (cVar5 != '\0');\n    if ((local_24 < pcVar7) && (*pcVar8 != '/')) {\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }\n  }\n  iVar9 = 0;\n  do {\n    cVar5 = param_2[iVar9];\n    pcVar4[iVar9] = cVar5;\n    iVar9 = iVar9 + 1;\n  } while (cVar5 != '\0');\n  if (local_1d != false) {\n    free(local_24);\n  }\n  return pcVar3;\n}" (primitive_type "char") (pointer_declarator "* sh_makepath(char *param_1,char *param_2,byte param_3)" (* "*") (function_declarator "sh_makepath(char *param_1,char *param_2,byte param_3)" (identifier "sh_makepath") (parameter_list "(char *param_1,char *param_2,byte param_3)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "byte param_3" (type_identifier "byte") (identifier "param_3")) () ")")))) (compound_statement "{\n  size_t sVar1;\n  size_t sVar2;\n  char *pcVar3;\n  char *pcVar4;\n  char cVar5;\n  char *pcVar6;\n  char *pcVar7;\n  int iVar9;\n  char *local_24;\n  bool local_1d;\n  char *pcVar8;\n  \n  if ((param_1 != (char *)0x0) && (cVar5 = *param_1, cVar5 != '\0')) {\n    if (((param_3 & 8) == 0) || (cVar5 != '.')) {\n      local_1d = (bool)(cVar5 == '~' & param_3);\n      if (local_1d != false) {\n        pcVar4 = (char *)bash_tilde_expand(param_1,0);\n        local_1d = param_1 != pcVar4 && pcVar4 != "";\n        param_1 = pcVar4;\n      }\n    }\n    else {\n      local_1d = false;\n      if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }\n    sVar1 = strlen(param_1);\n    local_24 = param_1;\n    goto LAB_000d6baa;\n  }\n  if ((param_3 & 2) == 0) {\nLAB_000d6b70:\n    sVar1 = 1;\n    local_24 = (char *)xmalloc(2);\n    local_24[0] = '.';\n    local_24[1] = '\0';\n    local_1d = local_24 != "" && param_1 != local_24;\n  }\n  else {\n    local_24 = (char *)get_working_directory("sh_makepath");\n    if (local_24 == (char *)0x0) {\n      pcVar4 = (char *)get_string_value(&DAT_0011214a);\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }\n    sVar1 = strlen(local_24);\n    local_1d = local_24 != "" && param_1 != local_24;\n  }\nLAB_000d6baa:\n  sVar2 = strlen(param_2);\n  if ((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')) {\n    sVar2 = sVar2 + 2;\n  }\n  else {\n    param_2 = param_2 + 2;\n  }\n  pcVar3 = (char *)xmalloc(sVar2 + sVar1);\n  cVar5 = *local_24;\n  pcVar4 = pcVar3;\n  pcVar7 = local_24;\n  if (cVar5 != '\0') {\n    do {\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    } while (cVar5 != '\0');\n    if ((local_24 < pcVar7) && (*pcVar8 != '/')) {\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }\n  }\n  iVar9 = 0;\n  do {\n    cVar5 = param_2[iVar9];\n    pcVar4[iVar9] = cVar5;\n    iVar9 = iVar9 + 1;\n  } while (cVar5 != '\0');\n  if (local_1d != false) {\n    free(local_24);\n  }\n  return pcVar3;\n}" ({ "{") (declaration "size_t sVar1;" (primitive_type "size_t") (identifier "sVar1") (; ";")) (declaration "size_t sVar2;" (primitive_type "size_t") (identifier "sVar2") (; ";")) (declaration "char *pcVar3;" (primitive_type "char") (pointer_declarator "*pcVar3" (* "*") (identifier "pcVar3")) (; ";")) (declaration "char *pcVar4;" (primitive_type "char") (pointer_declarator "*pcVar4" (* "*") (identifier "pcVar4")) (; ";")) (declaration "char cVar5;" (primitive_type "char") (identifier "cVar5") (; ";")) (declaration "char *pcVar6;" (primitive_type "char") (pointer_declarator "*pcVar6" (* "*") (identifier "pcVar6")) (; ";")) (declaration "char *pcVar7;" (primitive_type "char") (pointer_declarator "*pcVar7" (* "*") (identifier "pcVar7")) (; ";")) (declaration "int iVar9;" (primitive_type "int") (identifier "iVar9") (; ";")) (declaration "char *local_24;" (primitive_type "char") (pointer_declarator "*local_24" (* "*") (identifier "local_24")) (; ";")) (declaration "bool local_1d;" (primitive_type "bool") (identifier "local_1d") (; ";")) (declaration "char *pcVar8;" (primitive_type "char") (pointer_declarator "*pcVar8" (* "*") (identifier "pcVar8")) (; ";")) (if_statement "if ((param_1 != (char *)0x0) && (cVar5 = *param_1, cVar5 != '\0')) {\n    if (((param_3 & 8) == 0) || (cVar5 != '.')) {\n      local_1d = (bool)(cVar5 == '~' & param_3);\n      if (local_1d != false) {\n        pcVar4 = (char *)bash_tilde_expand(param_1,0);\n        local_1d = param_1 != pcVar4 && pcVar4 != "";\n        param_1 = pcVar4;\n      }\n    }\n    else {\n      local_1d = false;\n      if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }\n    sVar1 = strlen(param_1);\n    local_24 = param_1;\n    goto LAB_000d6baa;\n  }" (if "if") (parenthesized_expression "((param_1 != (char *)0x0) && (cVar5 = *param_1, cVar5 != '\0'))" (( "(") (binary_expression "(param_1 != (char *)0x0) && (cVar5 = *param_1, cVar5 != '\0')" (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"))) () ")")) (&& "&&") (parenthesized_expression "(cVar5 = *param_1, cVar5 != '\0')" (( "(") (comma_expression "cVar5 = *param_1, cVar5 != '\0'" (assignment_expression "cVar5 = *param_1" (identifier "cVar5") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (, ",") (binary_expression "cVar5 != '\0'" (identifier "cVar5") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'")))) () ")"))) () ")")) (compound_statement "{\n    if (((param_3 & 8) == 0) || (cVar5 != '.')) {\n      local_1d = (bool)(cVar5 == '~' & param_3);\n      if (local_1d != false) {\n        pcVar4 = (char *)bash_tilde_expand(param_1,0);\n        local_1d = param_1 != pcVar4 && pcVar4 != "";\n        param_1 = pcVar4;\n      }\n    }\n    else {\n      local_1d = false;\n      if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }\n    sVar1 = strlen(param_1);\n    local_24 = param_1;\n    goto LAB_000d6baa;\n  }" ({ "{") (if_statement "if (((param_3 & 8) == 0) || (cVar5 != '.')) {\n      local_1d = (bool)(cVar5 == '~' & param_3);\n      if (local_1d != false) {\n        pcVar4 = (char *)bash_tilde_expand(param_1,0);\n        local_1d = param_1 != pcVar4 && pcVar4 != "";\n        param_1 = pcVar4;\n      }\n    }\n    else {\n      local_1d = false;\n      if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }" (if "if") (parenthesized_expression "(((param_3 & 8) == 0) || (cVar5 != '.'))" (( "(") (binary_expression "((param_3 & 8) == 0) || (cVar5 != '.')" (parenthesized_expression "((param_3 & 8) == 0)" (( "(") (binary_expression "(param_3 & 8) == 0" (parenthesized_expression "(param_3 & 8)" (( "(") (binary_expression "param_3 & 8" (identifier "param_3") (& "&") (number_literal "8")) () ")")) (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(cVar5 != '.')" (( "(") (binary_expression "cVar5 != '.'" (identifier "cVar5") (!= "!=") (char_literal "'.'" (' "'") (character ".") (' "'"))) () ")"))) () ")")) (compound_statement "{\n      local_1d = (bool)(cVar5 == '~' & param_3);\n      if (local_1d != false) {\n        pcVar4 = (char *)bash_tilde_expand(param_1,0);\n        local_1d = param_1 != pcVar4 && pcVar4 != "";\n        param_1 = pcVar4;\n      }\n    }" ({ "{") (expression_statement "local_1d = (bool)(cVar5 == '~' & param_3);" (assignment_expression "local_1d = (bool)(cVar5 == '~' & param_3)" (identifier "local_1d") (= "=") (cast_expression "(bool)(cVar5 == '~' & param_3)" (( "(") (type_descriptor "bool" (primitive_type "bool")) () ")") (parenthesized_expression "(cVar5 == '~' & param_3)" (( "(") (binary_expression "cVar5 == '~' & param_3" (binary_expression "cVar5 == '~'" (identifier "cVar5") (== "==") (char_literal "'~'" (' "'") (character "~") (' "'"))) (& "&") (identifier "param_3")) () ")")))) (; ";")) (if_statement "if (local_1d != false) {\n        pcVar4 = (char *)bash_tilde_expand(param_1,0);\n        local_1d = param_1 != pcVar4 && pcVar4 != "";\n        param_1 = pcVar4;\n      }" (if "if") (parenthesized_expression "(local_1d != false)" (( "(") (binary_expression "local_1d != false" (identifier "local_1d") (!= "!=") (false "false")) () ")")) (compound_statement "{\n        pcVar4 = (char *)bash_tilde_expand(param_1,0);\n        local_1d = param_1 != pcVar4 && pcVar4 != "";\n        param_1 = pcVar4;\n      }" ({ "{") (expression_statement "pcVar4 = (char *)bash_tilde_expand(param_1,0);" (assignment_expression "pcVar4 = (char *)bash_tilde_expand(param_1,0)" (identifier "pcVar4") (= "=") (cast_expression "(char *)bash_tilde_expand(param_1,0)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "bash_tilde_expand(param_1,0)" (identifier "bash_tilde_expand") (argument_list "(param_1,0)" (( "(") (identifier "param_1") (, ",") (number_literal "0") () ")"))))) (; ";")) (expression_statement "local_1d = param_1 != pcVar4 && pcVar4 != "";" (assignment_expression "local_1d = param_1 != pcVar4 && pcVar4 != """ (identifier "local_1d") (= "=") (binary_expression "param_1 != pcVar4 && pcVar4 != """ (binary_expression "param_1 != pcVar4" (identifier "param_1") (!= "!=") (identifier "pcVar4")) (&& "&&") (binary_expression "pcVar4 != """ (identifier "pcVar4") (!= "!=") (string_literal """" (" """) (" """))))) (; ";")) (expression_statement "param_1 = pcVar4;" (assignment_expression "param_1 = pcVar4" (identifier "param_1") (= "=") (identifier "pcVar4")) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n      local_1d = false;\n      if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }" (else "else") (compound_statement "{\n      local_1d = false;\n      if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }\n    }" ({ "{") (expression_statement "local_1d = false;" (assignment_expression "local_1d = false" (identifier "local_1d") (= "=") (false "false")) (; ";")) (if_statement "if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }" (if "if") (parenthesized_expression "((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0'))))" (( "(") (binary_expression "(param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))" (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] == '/' && (param_1[2] == '\0')))" (( "(") (parenthesized_expression "(param_1[1] == '/' && (param_1[2] == '\0'))" (( "(") (binary_expression "param_1[1] == '/' && (param_1[2] == '\0')" (binary_expression "param_1[1] == '/'" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (== "==") (char_literal "'/'" (' "'") (character "/") (' "'"))) (&& "&&") (parenthesized_expression "(param_1[2] == '\0')" (( "(") (binary_expression "param_1[2] == '\0'" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")"))) () ")")) () ")"))) () ")")) (compound_statement "{\n        local_24 = "";\n        sVar1 = 0;\n        goto LAB_000d6baa;\n      }" ({ "{") (expression_statement "local_24 = "";" (assignment_expression "local_24 = """ (identifier "local_24") (= "=") (string_literal """" (" """) (" """))) (; ";")) (expression_statement "sVar1 = 0;" (assignment_expression "sVar1 = 0" (identifier "sVar1") (= "=") (number_literal "0")) (; ";")) (goto_statement "goto LAB_000d6baa;" (goto "goto") (statement_identifier "LAB_000d6baa") (; ";")) (} "}"))) (} "}")))) (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 "local_24 = param_1;" (assignment_expression "local_24 = param_1" (identifier "local_24") (= "=") (identifier "param_1")) (; ";")) (goto_statement "goto LAB_000d6baa;" (goto "goto") (statement_identifier "LAB_000d6baa") (; ";")) (} "}"))) (if_statement "if ((param_3 & 2) == 0) {\nLAB_000d6b70:\n    sVar1 = 1;\n    local_24 = (char *)xmalloc(2);\n    local_24[0] = '.';\n    local_24[1] = '\0';\n    local_1d = local_24 != "" && param_1 != local_24;\n  }\n  else {\n    local_24 = (char *)get_working_directory("sh_makepath");\n    if (local_24 == (char *)0x0) {\n      pcVar4 = (char *)get_string_value(&DAT_0011214a);\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }\n    sVar1 = strlen(local_24);\n    local_1d = local_24 != "" && param_1 != local_24;\n  }" (if "if") (parenthesized_expression "((param_3 & 2) == 0)" (( "(") (binary_expression "(param_3 & 2) == 0" (parenthesized_expression "(param_3 & 2)" (( "(") (binary_expression "param_3 & 2" (identifier "param_3") (& "&") (number_literal "2")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\nLAB_000d6b70:\n    sVar1 = 1;\n    local_24 = (char *)xmalloc(2);\n    local_24[0] = '.';\n    local_24[1] = '\0';\n    local_1d = local_24 != "" && param_1 != local_24;\n  }" ({ "{") (labeled_statement "LAB_000d6b70:\n    sVar1 = 1;" (statement_identifier "LAB_000d6b70") (: ":") (expression_statement "sVar1 = 1;" (assignment_expression "sVar1 = 1" (identifier "sVar1") (= "=") (number_literal "1")) (; ";"))) (expression_statement "local_24 = (char *)xmalloc(2);" (assignment_expression "local_24 = (char *)xmalloc(2)" (identifier "local_24") (= "=") (cast_expression "(char *)xmalloc(2)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(2)" (identifier "xmalloc") (argument_list "(2)" (( "(") (number_literal "2") () ")"))))) (; ";")) (expression_statement "local_24[0] = '.';" (assignment_expression "local_24[0] = '.'" (subscript_expression "local_24[0]" (identifier "local_24") ([ "[") (number_literal "0") (] "]")) (= "=") (char_literal "'.'" (' "'") (character ".") (' "'"))) (; ";")) (expression_statement "local_24[1] = '\0';" (assignment_expression "local_24[1] = '\0'" (subscript_expression "local_24[1]" (identifier "local_24") ([ "[") (number_literal "1") (] "]")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (expression_statement "local_1d = local_24 != "" && param_1 != local_24;" (assignment_expression "local_1d = local_24 != "" && param_1 != local_24" (identifier "local_1d") (= "=") (binary_expression "local_24 != "" && param_1 != local_24" (binary_expression "local_24 != """ (identifier "local_24") (!= "!=") (string_literal """" (" """) (" """))) (&& "&&") (binary_expression "param_1 != local_24" (identifier "param_1") (!= "!=") (identifier "local_24")))) (; ";")) (} "}")) (else_clause "else {\n    local_24 = (char *)get_working_directory("sh_makepath");\n    if (local_24 == (char *)0x0) {\n      pcVar4 = (char *)get_string_value(&DAT_0011214a);\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }\n    sVar1 = strlen(local_24);\n    local_1d = local_24 != "" && param_1 != local_24;\n  }" (else "else") (compound_statement "{\n    local_24 = (char *)get_working_directory("sh_makepath");\n    if (local_24 == (char *)0x0) {\n      pcVar4 = (char *)get_string_value(&DAT_0011214a);\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }\n    sVar1 = strlen(local_24);\n    local_1d = local_24 != "" && param_1 != local_24;\n  }" ({ "{") (expression_statement "local_24 = (char *)get_working_directory("sh_makepath");" (assignment_expression "local_24 = (char *)get_working_directory("sh_makepath")" (identifier "local_24") (= "=") (cast_expression "(char *)get_working_directory("sh_makepath")" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "get_working_directory("sh_makepath")" (identifier "get_working_directory") (argument_list "("sh_makepath")" (( "(") (string_literal ""sh_makepath"" (" """) (string_content "sh_makepath") (" """)) () ")"))))) (; ";")) (if_statement "if (local_24 == (char *)0x0) {\n      pcVar4 = (char *)get_string_value(&DAT_0011214a);\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }" (if "if") (parenthesized_expression "(local_24 == (char *)0x0)" (( "(") (binary_expression "local_24 == (char *)0x0" (identifier "local_24") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      pcVar4 = (char *)get_string_value(&DAT_0011214a);\n      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;\n      sVar1 = strlen(pcVar4);\n      pcVar7 = (char *)xmalloc(sVar1 + 1);\n      local_24 = strcpy(pcVar7,pcVar4);\n    }" ({ "{") (expression_statement "pcVar4 = (char *)get_string_value(&DAT_0011214a);" (assignment_expression "pcVar4 = (char *)get_string_value(&DAT_0011214a)" (identifier "pcVar4") (= "=") (cast_expression "(char *)get_string_value(&DAT_0011214a)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "get_string_value(&DAT_0011214a)" (identifier "get_string_value") (argument_list "(&DAT_0011214a)" (( "(") (pointer_expression "&DAT_0011214a" (& "&") (identifier "DAT_0011214a")) () ")"))))) (; ";")) (if_statement "if (pcVar4 == (char *)0x0) goto LAB_000d6b70;" (if "if") (parenthesized_expression "(pcVar4 == (char *)0x0)" (( "(") (binary_expression "pcVar4 == (char *)0x0" (identifier "pcVar4") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (goto_statement "goto LAB_000d6b70;" (goto "goto") (statement_identifier "LAB_000d6b70") (; ";"))) (expression_statement "sVar1 = strlen(pcVar4);" (assignment_expression "sVar1 = strlen(pcVar4)" (identifier "sVar1") (= "=") (call_expression "strlen(pcVar4)" (identifier "strlen") (argument_list "(pcVar4)" (( "(") (identifier "pcVar4") () ")")))) (; ";")) (expression_statement "pcVar7 = (char *)xmalloc(sVar1 + 1);" (assignment_expression "pcVar7 = (char *)xmalloc(sVar1 + 1)" (identifier "pcVar7") (= "=") (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 "local_24 = strcpy(pcVar7,pcVar4);" (assignment_expression "local_24 = strcpy(pcVar7,pcVar4)" (identifier "local_24") (= "=") (call_expression "strcpy(pcVar7,pcVar4)" (identifier "strcpy") (argument_list "(pcVar7,pcVar4)" (( "(") (identifier "pcVar7") (, ",") (identifier "pcVar4") () ")")))) (; ";")) (} "}"))) (expression_statement "sVar1 = strlen(local_24);" (assignment_expression "sVar1 = strlen(local_24)" (identifier "sVar1") (= "=") (call_expression "strlen(local_24)" (identifier "strlen") (argument_list "(local_24)" (( "(") (identifier "local_24") () ")")))) (; ";")) (expression_statement "local_1d = local_24 != "" && param_1 != local_24;" (assignment_expression "local_1d = local_24 != "" && param_1 != local_24" (identifier "local_1d") (= "=") (binary_expression "local_24 != "" && param_1 != local_24" (binary_expression "local_24 != """ (identifier "local_24") (!= "!=") (string_literal """" (" """) (" """))) (&& "&&") (binary_expression "param_1 != local_24" (identifier "param_1") (!= "!=") (identifier "local_24")))) (; ";")) (} "}")))) (labeled_statement "LAB_000d6baa:\n  sVar2 = strlen(param_2);" (statement_identifier "LAB_000d6baa") (: ":") (expression_statement "sVar2 = strlen(param_2);" (assignment_expression "sVar2 = strlen(param_2)" (identifier "sVar2") (= "=") (call_expression "strlen(param_2)" (identifier "strlen") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";"))) (if_statement "if ((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')) {\n    sVar2 = sVar2 + 2;\n  }\n  else {\n    param_2 = param_2 + 2;\n  }" (if "if") (parenthesized_expression "((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/'))" (( "(") (binary_expression "(((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')" (parenthesized_expression "(((param_3 & 4) == 0) || (*param_2 != '.'))" (( "(") (binary_expression "((param_3 & 4) == 0) || (*param_2 != '.')" (parenthesized_expression "((param_3 & 4) == 0)" (( "(") (binary_expression "(param_3 & 4) == 0" (parenthesized_expression "(param_3 & 4)" (( "(") (binary_expression "param_3 & 4" (identifier "param_3") (& "&") (number_literal "4")) () ")")) (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(*param_2 != '.')" (( "(") (binary_expression "*param_2 != '.'" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (!= "!=") (char_literal "'.'" (' "'") (character ".") (' "'"))) () ")"))) () ")")) (|| "||") (parenthesized_expression "(param_2[1] != '/')" (( "(") (binary_expression "param_2[1] != '/'" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (!= "!=") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")"))) () ")")) (compound_statement "{\n    sVar2 = sVar2 + 2;\n  }" ({ "{") (expression_statement "sVar2 = sVar2 + 2;" (assignment_expression "sVar2 = sVar2 + 2" (identifier "sVar2") (= "=") (binary_expression "sVar2 + 2" (identifier "sVar2") (+ "+") (number_literal "2"))) (; ";")) (} "}")) (else_clause "else {\n    param_2 = param_2 + 2;\n  }" (else "else") (compound_statement "{\n    param_2 = param_2 + 2;\n  }" ({ "{") (expression_statement "param_2 = param_2 + 2;" (assignment_expression "param_2 = param_2 + 2" (identifier "param_2") (= "=") (binary_expression "param_2 + 2" (identifier "param_2") (+ "+") (number_literal "2"))) (; ";")) (} "}")))) (expression_statement "pcVar3 = (char *)xmalloc(sVar2 + sVar1);" (assignment_expression "pcVar3 = (char *)xmalloc(sVar2 + sVar1)" (identifier "pcVar3") (= "=") (cast_expression "(char *)xmalloc(sVar2 + sVar1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(sVar2 + sVar1)" (identifier "xmalloc") (argument_list "(sVar2 + sVar1)" (( "(") (binary_expression "sVar2 + sVar1" (identifier "sVar2") (+ "+") (identifier "sVar1")) () ")"))))) (; ";")) (expression_statement "cVar5 = *local_24;" (assignment_expression "cVar5 = *local_24" (identifier "cVar5") (= "=") (pointer_expression "*local_24" (* "*") (identifier "local_24"))) (; ";")) (expression_statement "pcVar4 = pcVar3;" (assignment_expression "pcVar4 = pcVar3" (identifier "pcVar4") (= "=") (identifier "pcVar3")) (; ";")) (expression_statement "pcVar7 = local_24;" (assignment_expression "pcVar7 = local_24" (identifier "pcVar7") (= "=") (identifier "local_24")) (; ";")) (if_statement "if (cVar5 != '\0') {\n    do {\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    } while (cVar5 != '\0');\n    if ((local_24 < pcVar7) && (*pcVar8 != '/')) {\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }\n  }" (if "if") (parenthesized_expression "(cVar5 != '\0')" (( "(") (binary_expression "cVar5 != '\0'" (identifier "cVar5") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    do {\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    } while (cVar5 != '\0');\n    if ((local_24 < pcVar7) && (*pcVar8 != '/')) {\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }\n  }" ({ "{") (do_statement "do {\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    } while (cVar5 != '\0');" (do "do") (compound_statement "{\n      pcVar8 = pcVar7;\n      pcVar6 = pcVar4;\n      pcVar7 = pcVar8 + 1;\n      pcVar4 = pcVar6 + 1;\n      *pcVar6 = cVar5;\n      cVar5 = *pcVar7;\n    }" ({ "{") (expression_statement "pcVar8 = pcVar7;" (assignment_expression "pcVar8 = pcVar7" (identifier "pcVar8") (= "=") (identifier "pcVar7")) (; ";")) (expression_statement "pcVar6 = pcVar4;" (assignment_expression "pcVar6 = pcVar4" (identifier "pcVar6") (= "=") (identifier "pcVar4")) (; ";")) (expression_statement "pcVar7 = pcVar8 + 1;" (assignment_expression "pcVar7 = pcVar8 + 1" (identifier "pcVar7") (= "=") (binary_expression "pcVar8 + 1" (identifier "pcVar8") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pcVar4 = pcVar6 + 1;" (assignment_expression "pcVar4 = pcVar6 + 1" (identifier "pcVar4") (= "=") (binary_expression "pcVar6 + 1" (identifier "pcVar6") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*pcVar6 = cVar5;" (assignment_expression "*pcVar6 = cVar5" (pointer_expression "*pcVar6" (* "*") (identifier "pcVar6")) (= "=") (identifier "cVar5")) (; ";")) (expression_statement "cVar5 = *pcVar7;" (assignment_expression "cVar5 = *pcVar7" (identifier "cVar5") (= "=") (pointer_expression "*pcVar7" (* "*") (identifier "pcVar7"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(cVar5 != '\0')" (( "(") (binary_expression "cVar5 != '\0'" (identifier "cVar5") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (; ";")) (if_statement "if ((local_24 < pcVar7) && (*pcVar8 != '/')) {\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }" (if "if") (parenthesized_expression "((local_24 < pcVar7) && (*pcVar8 != '/'))" (( "(") (binary_expression "(local_24 < pcVar7) && (*pcVar8 != '/')" (parenthesized_expression "(local_24 < pcVar7)" (( "(") (binary_expression "local_24 < pcVar7" (identifier "local_24") (< "<") (identifier "pcVar7")) () ")")) (&& "&&") (parenthesized_expression "(*pcVar8 != '/')" (( "(") (binary_expression "*pcVar8 != '/'" (pointer_expression "*pcVar8" (* "*") (identifier "pcVar8")) (!= "!=") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")"))) () ")")) (compound_statement "{\n      *pcVar4 = '/';\n      pcVar4 = pcVar6 + 2;\n    }" ({ "{") (expression_statement "*pcVar4 = '/';" (assignment_expression "*pcVar4 = '/'" (pointer_expression "*pcVar4" (* "*") (identifier "pcVar4")) (= "=") (char_literal "'/'" (' "'") (character "/") (' "'"))) (; ";")) (expression_statement "pcVar4 = pcVar6 + 2;" (assignment_expression "pcVar4 = pcVar6 + 2" (identifier "pcVar4") (= "=") (binary_expression "pcVar6 + 2" (identifier "pcVar6") (+ "+") (number_literal "2"))) (; ";")) (} "}"))) (} "}"))) (expression_statement "iVar9 = 0;" (assignment_expression "iVar9 = 0" (identifier "iVar9") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n    cVar5 = param_2[iVar9];\n    pcVar4[iVar9] = cVar5;\n    iVar9 = iVar9 + 1;\n  } while (cVar5 != '\0');" (do "do") (compound_statement "{\n    cVar5 = param_2[iVar9];\n    pcVar4[iVar9] = cVar5;\n    iVar9 = iVar9 + 1;\n  }" ({ "{") (expression_statement "cVar5 = param_2[iVar9];" (assignment_expression "cVar5 = param_2[iVar9]" (identifier "cVar5") (= "=") (subscript_expression "param_2[iVar9]" (identifier "param_2") ([ "[") (identifier "iVar9") (] "]"))) (; ";")) (expression_statement "pcVar4[iVar9] = cVar5;" (assignment_expression "pcVar4[iVar9] = cVar5" (subscript_expression "pcVar4[iVar9]" (identifier "pcVar4") ([ "[") (identifier "iVar9") (] "]")) (= "=") (identifier "cVar5")) (; ";")) (expression_statement "iVar9 = iVar9 + 1;" (assignment_expression "iVar9 = iVar9 + 1" (identifier "iVar9") (= "=") (binary_expression "iVar9 + 1" (identifier "iVar9") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(cVar5 != '\0')" (( "(") (binary_expression "cVar5 != '\0'" (identifier "cVar5") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (; ";")) (if_statement "if (local_1d != false) {\n    free(local_24);\n  }" (if "if") (parenthesized_expression "(local_1d != false)" (( "(") (binary_expression "local_1d != false" (identifier "local_1d") (!= "!=") (false "false")) () ")")) (compound_statement "{\n    free(local_24);\n  }" ({ "{") (expression_statement "free(local_24);" (call_expression "free(local_24)" (identifier "free") (argument_list "(local_24)" (( "(") (identifier "local_24") () ")"))) (; ";")) (} "}"))) (return_statement "return pcVar3;" (return "return") (identifier "pcVar3") (; ";")) (} "}")))

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

char * function_1(char *var_1,char *var_15,int var_3)

{
  size_t var_12;
  size_t var_14;
  char *pcVar3;
  char *var_6;
  char var_2;
  char *var_17;
  char *var_18;
  int var_19;
  char *var_9;
  bool var_4;
  char *var_16;
  
  if ((var_1 != (char *)0x0) && (var_2 = *var_1, var_2 != '\0')) {
    if (((var_3 & 8U) == 0) || (var_2 != '.')) {
      var_4 = (bool)(var_2 == '~' & (type_1)var_3);
      if (var_4 != false) {
        var_6 = var_5(var_1,0);
        var_4 = var_1 != var_6 && var_6 != "";
        var_1 = var_6;
      }
    }
    else {
      var_4 = false;
      if ((var_1[1] == '\0') || ((var_1[1] == '/' && (var_1[2] == '\0')))) {
        var_9 = "";
        var_12 = 0;
        goto LAB_000d6baa;
      }
    }
    var_12 = var_7(var_1);
    var_9 = var_1;
    goto LAB_000d6baa;
  }
  if ((var_3 & 2U) == 0) {
LAB_000d6b70:
    var_12 = 1;
    var_9 = (char *)var_8(2);
    var_9[0] = '.';
    var_9[1] = '\0';
    var_4 = var_9 != "" && var_1 != var_9;
  }
  else {
    var_9 = var_10("sh_makepath");
    if (var_9 == (char *)0x0) {
      var_6 = var_11("PWD");
      if (var_6 == (char *)0x0) goto LAB_000d6b70;
      var_12 = var_7(var_6);
      var_18 = (char *)var_8(var_12 + 1);
      var_9 = var_13(var_18,var_6);
    }
    var_12 = var_7(var_9);
    var_4 = var_9 != "" && var_1 != var_9;
  }
LAB_000d6baa:
  var_14 = var_7(var_15);
  if ((((var_3 & 4U) == 0) || (*var_15 != '.')) || (var_15[1] != '/')) {
    var_14 = var_14 + 2;
  }
  else {
    var_15 = var_15 + 2;
  }
  pcVar3 = (char *)var_8(var_14 + var_12);
  var_2 = *var_9;
  var_6 = pcVar3;
  var_18 = var_9;
  if (var_2 != '\0') {
    do {
      var_16 = var_18;
      var_17 = var_6;
      var_18 = var_16 + 1;
      var_6 = var_17 + 1;
      *var_17 = var_2;
      var_2 = *var_18;
    } while (var_2 != '\0');
    if ((var_9 < var_18) && (*var_16 != '/')) {
      *var_6 = '/';
      var_6 = var_17 + 2;
    }
  }
  var_19 = 0;
  do {
    var_2 = var_15[var_19];
    var_6[var_19] = var_2;
    var_19 = var_19 + 1;
  } while (var_2 != '\0');
  if (var_4 != false) {
    var_20(var_9);
  }
  return pcVar3;
}


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

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

char * MASKED(char *param_1,char *param_2,byte param_3)

{
  size_t sVar1;
  size_t sVar2;
  char *pcVar3;
  char *pcVar4;
  char cVar5;
  char *pcVar6;
  char *pcVar7;
  int iVar9;
  char *local_24;
  bool local_1d;
  char *pcVar8;
  
  if ((param_1 != (char *)0x0) && (cVar5 = *param_1, cVar5 != '\0')) {
    if (((param_3 & 8) == 0) || (cVar5 != '.')) {
      local_1d = (bool)(cVar5 == '~' & param_3);
      if (local_1d != false) {
        pcVar4 = (char *)bash_tilde_expand(param_1,0);
        local_1d = param_1 != pcVar4 && pcVar4 != "";
        param_1 = pcVar4;
      }
    }
    else {
      local_1d = false;
      if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {
        local_24 = "";
        sVar1 = 0;
        goto LAB_000d6baa;
      }
    }
    sVar1 = strlen(param_1);
    local_24 = param_1;
    goto LAB_000d6baa;
  }
  if ((param_3 & 2) == 0) {
LAB_000d6b70:
    sVar1 = 1;
    local_24 = (char *)xmalloc(2);
    local_24[0] = '.';
    local_24[1] = '\0';
    local_1d = local_24 != "" && param_1 != local_24;
  }
  else {
    local_24 = (char *)get_working_directory("MASKED");
    if (local_24 == (char *)0x0) {
      pcVar4 = (char *)get_string_value(&DAT_0011214a);
      if (pcVar4 == (char *)0x0) goto LAB_000d6b70;
      sVar1 = strlen(pcVar4);
      pcVar7 = (char *)xmalloc(sVar1 + 1);
      local_24 = strcpy(pcVar7,pcVar4);
    }
    sVar1 = strlen(local_24);
    local_1d = local_24 != "" && param_1 != local_24;
  }
LAB_000d6baa:
  sVar2 = strlen(param_2);
  if ((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')) {
    sVar2 = sVar2 + 2;
  }
  else {
    param_2 = param_2 + 2;
  }
  pcVar3 = (char *)xmalloc(sVar2 + sVar1);
  cVar5 = *local_24;
  pcVar4 = pcVar3;
  pcVar7 = local_24;
  if (cVar5 != '\0') {
    do {
      pcVar8 = pcVar7;
      pcVar6 = pcVar4;
      pcVar7 = pcVar8 + 1;
      pcVar4 = pcVar6 + 1;
      *pcVar6 = cVar5;
      cVar5 = *pcVar7;
    } while (cVar5 != '\0');
    if ((local_24 < pcVar7) && (*pcVar8 != '/')) {
      *pcVar4 = '/';
      pcVar4 = pcVar6 + 2;
    }
  }
  iVar9 = 0;
  do {
    cVar5 = param_2[iVar9];
    pcVar4[iVar9] = cVar5;
    iVar9 = iVar9 + 1;
  } while (cVar5 != '\0');
  if (local_1d != false) {
    free(local_24);
  }
  return pcVar3;
}

