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

{
  char *pcVar1;
  int iVar2;
  char *pcVar3;
  undefined4 uVar4;
  char *pcVar5;
  char *pcVar6;
  char *pcVar7;
  char cVar8;
  char *pcVar9;
  int iVar10;
  
  if (path == (char *)0x0) {
LAB_000d8208:
    if ((flags & 2U) == 0) {
LAB_000d8214:
      iVar10 = 1;
      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);
      pcVar1[1] = '\0';
      *pcVar1 = '.';
      goto LAB_000d8238;
    }
    pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c);
    if (pcVar1 == (char *)0x0) {
      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);
      if (iVar10 == 0) goto LAB_000d8214;
      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);
      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);
      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);
    }
  }
  else {
    cVar8 = *path;
    if (cVar8 == '\0') goto LAB_000d8208;
    pcVar1 = path;
    if (((flags & 8U) == 0) || (cVar8 != '.')) {
      if (((flags & 1U) != 0) && (cVar8 == '~')) {
        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(path,0);
      }
    }
    else if ((path[1] == '\0') || ((path[1] == '/' && (path[2] == '\0')))) {
      iVar10 = 0;
      pcVar1 = PTR_DAT_001445ac + -0x6800;
      goto LAB_000d8238;
    }
  }
  iVar10 = (*(code *)PTR_strlen_00146390)(pcVar1);
LAB_000d8238:
  iVar2 = (*(code *)PTR_strlen_00146390)(dir);
  if ((((flags & 4U) == 0) || (*dir != '.')) || (dir[1] != '/')) {
    iVar2 = iVar2 + 2;
  }
  else {
    dir = dir + 2;
  }
  pcVar3 = (char *)(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2);
  cVar8 = *pcVar1;
  pcVar5 = pcVar3;
  pcVar7 = pcVar1;
  if (cVar8 != '\0') {
    do {
      pcVar9 = pcVar5;
      pcVar6 = pcVar7;
      pcVar5 = pcVar9 + 1;
      *pcVar9 = cVar8;
      pcVar7 = pcVar6 + 1;
      cVar8 = *pcVar7;
    } while (cVar8 != '\0');
    if ((pcVar1 < pcVar7) && (*pcVar6 != '/')) {
      *pcVar5 = '/';
      pcVar5 = pcVar9 + 2;
    }
  }
  do {
    cVar8 = *dir;
    *pcVar5 = cVar8;
    pcVar5 = pcVar5 + 1;
    dir = dir + 1;
  } while (cVar8 != '\0');
  if ((pcVar1 != path) && (pcVar1 != PTR_DAT_001445ac + -0x6800)) {
    (*(code *)PTR_free_001464fc)(pcVar1);
  }
  return pcVar3;
}



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

{
  char *pcVar1;
  int iVar2;
  char *pcVar3;
  undefined4 uVar4;
  char *pcVar5;
  char *pcVar6;
  char *pcVar7;
  char cVar8;
  char *pcVar9;
  int iVar10;
  
  if (param_1 == (char *)0x0) {
LAB_000d8208:
    if ((param_3 & 2) == 0) {
LAB_000d8214:
      iVar10 = 1;
      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);
      pcVar1[1] = '\0';
      *pcVar1 = '.';
      goto LAB_000d8238;
    }
    pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c);
    if (pcVar1 == (char *)0x0) {
      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);
      if (iVar10 == 0) goto LAB_000d8214;
      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);
      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);
      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);
    }
  }
  else {
    cVar8 = *param_1;
    if (cVar8 == '\0') goto LAB_000d8208;
    pcVar1 = param_1;
    if (((param_3 & 8) == 0) || (cVar8 != '.')) {
      if (((param_3 & 1) != 0) && (cVar8 == '~')) {
        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);
      }
    }
    else if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {
      iVar10 = 0;
      pcVar1 = PTR_DAT_001445ac + -0x6800;
      goto LAB_000d8238;
    }
  }
  iVar10 = (*(code *)PTR_strlen_00146390)(pcVar1);
LAB_000d8238:
  iVar2 = (*(code *)PTR_strlen_00146390)(param_2);
  if ((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')) {
    iVar2 = iVar2 + 2;
  }
  else {
    param_2 = param_2 + 2;
  }
  pcVar3 = (char *)(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2);
  cVar8 = *pcVar1;
  pcVar5 = pcVar3;
  pcVar7 = pcVar1;
  if (cVar8 != '\0') {
    do {
      pcVar9 = pcVar5;
      pcVar6 = pcVar7;
      pcVar5 = pcVar9 + 1;
      *pcVar9 = cVar8;
      pcVar7 = pcVar6 + 1;
      cVar8 = *pcVar7;
    } while (cVar8 != '\0');
    if ((pcVar1 < pcVar7) && (*pcVar6 != '/')) {
      *pcVar5 = '/';
      pcVar5 = pcVar9 + 2;
    }
  }
  do {
    cVar8 = *param_2;
    *pcVar5 = cVar8;
    pcVar5 = pcVar5 + 1;
    param_2 = param_2 + 1;
  } while (cVar8 != '\0');
  if ((pcVar1 != param_1) && (pcVar1 != PTR_DAT_001445ac + -0x6800)) {
    (*(code *)PTR_free_001464fc)(pcVar1);
  }
  return pcVar3;
}


lui gp,0x7
addiu gp,gp,0x4380
addu gp,gp,t9
addiu sp,sp,-0x38
sw gp,0x10(sp)
sw s3,0x2c(sp)
or s3,a0,zero
sw s2,0x28(sp)
or s2,a2,zero
sw s0,0x20(sp)
or s0,a1,zero
sw ra,0x34(sp)
sw s4,0x30(sp)
beq a0,zero,0x000d8208
_sw s1,0x24(sp)
lb v0,0x0(a0)
bne v0,zero,0x000d8320
_andi v1,a2,0x8
andi v0,s2,0x2
bne v0,zero,0x000d8368
_lw a0,-0x7f94(gp)
lw t9,-0x7f90(gp)
li a0,0x2
jalr t9
_li s4,0x1
or s1,v0,zero
lw gp,0x10(sp)
li v0,0x2e
sb zero,0x1(s1)
sb v0,0x0(s1)
lw t9,-0x61b0(gp)
or a0,s0,zero
jalr t9
_andi s2,s2,0x4
beq s2,zero,0x000d8260
_lw gp,0x10(sp)
lb a0,0x0(s0)
li v1,0x2e
beq a0,v1,0x000d83b4
_li v1,0x2f
addiu v0,v0,0x2
lw t9,-0x7f90(gp)
jalr t9
_addu a0,s4,v0
lb a1,0x0(s1)
beq a1,zero,0x000d83c8
_lw gp,0x10(sp)
or a0,s1,zero
b 0x000d828c
_or a2,v0,zero
or a2,v1,zero
addiu v1,a2,0x1
sb a1,-0x1(v1)
addiu a0,a0,0x1
lb a1,0x0(a0)
bne a1,zero,0x000d8288
_nop
sltu a1,s1,a0
beq a1,zero,0x000d82c8
_nop
lb a1,-0x1(a0)
li a0,0x2f
beq a1,a0,0x000d82c8
_nop
sb a0,0x0(v1)
addiu v1,a2,0x2
addiu s0,s0,0x1
lb a0,-0x1(s0)
addiu v1,v1,0x1
bne a0,zero,0x000d82c8
_sb a0,-0x1(v1)
beq s1,s3,0x000d8300
_lw v1,-0x7f94(gp)
addiu v1,v1,-0x6800
beq s1,v1,0x000d8300
_lw t9,-0x6044(gp)
or a0,s1,zero
jalr t9
_sw v0,0x1c(sp)
lw v0,0x1c(sp)
lw ra,0x34(sp)
lw s4,0x30(sp)
lw s3,0x2c(sp)
lw s2,0x28(sp)
lw s1,0x24(sp)
lw s0,0x20(sp)
jr ra
_addiu sp,sp,0x38
beq v1,zero,0x000d8398
_andi v1,s2,0x1
li v1,0x2e
bne v0,v1,0x000d8398
_andi v1,s2,0x1
lb v0,0x1(a0)
beq v0,zero,0x000d835c
_lw s1,-0x7f94(gp)
li v1,0x2f
bne v0,v1,0x000d8380
_or s1,s3,zero
lb v0,0x2(a0)
bne v0,zero,0x000d8384
_lw t9,-0x61b0(gp)
lw s1,-0x7f94(gp)
or s4,zero,zero
b 0x000d8238
_addiu s1,s1,-0x6800
lw t9,-0x7d18(gp)
jalr t9
_addiu a0,a0,-0x3b9c
lw gp,0x10(sp)
beq v0,zero,0x000d83d0
_or s1,v0,zero
lw t9,-0x61b0(gp)
jalr t9
_or a0,s1,zero
lw gp,0x10(sp)
b 0x000d8238
_or s4,v0,zero
beq v1,zero,0x000d8380
_or s1,s3,zero
li v1,0x7e
beq v0,v1,0x000d8428
_lw t9,-0x7a54(gp)
b 0x000d8384
_lw t9,-0x61b0(gp)
lb a0,0x1(s0)
bne a0,v1,0x000d8260
_nop
b 0x000d8264
_addiu s0,s0,0x2
b 0x000d82c8
_or v1,v0,zero
lw a0,-0x7fc8(gp)
lw t9,-0x7db0(gp)
jalr t9
_addiu a0,a0,0x46fc
lw gp,0x10(sp)
beq v0,zero,0x000d8214
_or s1,v0,zero
lw t9,-0x61b0(gp)
jalr t9
_or a0,v0,zero
lw gp,0x10(sp)
lw t9,-0x7f90(gp)
jalr t9
_addiu a0,v0,0x1
or a1,s1,zero
lw gp,0x10(sp)
lw t9,-0x6128(gp)
jalr t9
_or a0,v0,zero
lw gp,0x10(sp)
b 0x000d8380
_or s1,v0,zero
or a1,zero,zero
jalr t9
_or a0,s3,zero
lw gp,0x10(sp)
b 0x000d8380
_or s1,v0,zero
(translation_unit "char * sh_makepath(char *param_1,char *param_2,uint param_3)\n\n{\n  char *pcVar1;\n  int iVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  char *pcVar5;\n  char *pcVar6;\n  char *pcVar7;\n  char cVar8;\n  char *pcVar9;\n  int iVar10;\n  \n  if (param_1 == (char *)0x0) {\nLAB_000d8208:\n    if ((param_3 & 2) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }\n    pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c);\n    if (pcVar1 == (char *)0x0) {\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }\n  }\n  else {\n    cVar8 = *param_1;\n    if (cVar8 == '\0') goto LAB_000d8208;\n    pcVar1 = param_1;\n    if (((param_3 & 8) == 0) || (cVar8 != '.')) {\n      if (((param_3 & 1) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }\n    }\n    else if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }\n  }\n  iVar10 = (*(code *)PTR_strlen_00146390)(pcVar1);\nLAB_000d8238:\n  iVar2 = (*(code *)PTR_strlen_00146390)(param_2);\n  if ((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')) {\n    iVar2 = iVar2 + 2;\n  }\n  else {\n    param_2 = param_2 + 2;\n  }\n  pcVar3 = (char *)(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2);\n  cVar8 = *pcVar1;\n  pcVar5 = pcVar3;\n  pcVar7 = pcVar1;\n  if (cVar8 != '\0') {\n    do {\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    } while (cVar8 != '\0');\n    if ((pcVar1 < pcVar7) && (*pcVar6 != '/')) {\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }\n  }\n  do {\n    cVar8 = *param_2;\n    *pcVar5 = cVar8;\n    pcVar5 = pcVar5 + 1;\n    param_2 = param_2 + 1;\n  } while (cVar8 != '\0');\n  if ((pcVar1 != param_1) && (pcVar1 != PTR_DAT_001445ac + -0x6800)) {\n    (*(code *)PTR_free_001464fc)(pcVar1);\n  }\n  return pcVar3;\n}\n\n" (function_definition "char * sh_makepath(char *param_1,char *param_2,uint param_3)\n\n{\n  char *pcVar1;\n  int iVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  char *pcVar5;\n  char *pcVar6;\n  char *pcVar7;\n  char cVar8;\n  char *pcVar9;\n  int iVar10;\n  \n  if (param_1 == (char *)0x0) {\nLAB_000d8208:\n    if ((param_3 & 2) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }\n    pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c);\n    if (pcVar1 == (char *)0x0) {\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }\n  }\n  else {\n    cVar8 = *param_1;\n    if (cVar8 == '\0') goto LAB_000d8208;\n    pcVar1 = param_1;\n    if (((param_3 & 8) == 0) || (cVar8 != '.')) {\n      if (((param_3 & 1) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }\n    }\n    else if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }\n  }\n  iVar10 = (*(code *)PTR_strlen_00146390)(pcVar1);\nLAB_000d8238:\n  iVar2 = (*(code *)PTR_strlen_00146390)(param_2);\n  if ((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')) {\n    iVar2 = iVar2 + 2;\n  }\n  else {\n    param_2 = param_2 + 2;\n  }\n  pcVar3 = (char *)(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2);\n  cVar8 = *pcVar1;\n  pcVar5 = pcVar3;\n  pcVar7 = pcVar1;\n  if (cVar8 != '\0') {\n    do {\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    } while (cVar8 != '\0');\n    if ((pcVar1 < pcVar7) && (*pcVar6 != '/')) {\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }\n  }\n  do {\n    cVar8 = *param_2;\n    *pcVar5 = cVar8;\n    pcVar5 = pcVar5 + 1;\n    param_2 = param_2 + 1;\n  } while (cVar8 != '\0');\n  if ((pcVar1 != param_1) && (pcVar1 != PTR_DAT_001445ac + -0x6800)) {\n    (*(code *)PTR_free_001464fc)(pcVar1);\n  }\n  return pcVar3;\n}" primitive_type (pointer_declarator "* sh_makepath(char *param_1,char *param_2,uint param_3)" * (function_declarator "sh_makepath(char *param_1,char *param_2,uint param_3)" identifier (parameter_list "(char *param_1,char *param_2,uint 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 "uint param_3" type_identifier identifier) )))) (compound_statement "{\n  char *pcVar1;\n  int iVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  char *pcVar5;\n  char *pcVar6;\n  char *pcVar7;\n  char cVar8;\n  char *pcVar9;\n  int iVar10;\n  \n  if (param_1 == (char *)0x0) {\nLAB_000d8208:\n    if ((param_3 & 2) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }\n    pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c);\n    if (pcVar1 == (char *)0x0) {\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }\n  }\n  else {\n    cVar8 = *param_1;\n    if (cVar8 == '\0') goto LAB_000d8208;\n    pcVar1 = param_1;\n    if (((param_3 & 8) == 0) || (cVar8 != '.')) {\n      if (((param_3 & 1) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }\n    }\n    else if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }\n  }\n  iVar10 = (*(code *)PTR_strlen_00146390)(pcVar1);\nLAB_000d8238:\n  iVar2 = (*(code *)PTR_strlen_00146390)(param_2);\n  if ((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')) {\n    iVar2 = iVar2 + 2;\n  }\n  else {\n    param_2 = param_2 + 2;\n  }\n  pcVar3 = (char *)(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2);\n  cVar8 = *pcVar1;\n  pcVar5 = pcVar3;\n  pcVar7 = pcVar1;\n  if (cVar8 != '\0') {\n    do {\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    } while (cVar8 != '\0');\n    if ((pcVar1 < pcVar7) && (*pcVar6 != '/')) {\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }\n  }\n  do {\n    cVar8 = *param_2;\n    *pcVar5 = cVar8;\n    pcVar5 = pcVar5 + 1;\n    param_2 = param_2 + 1;\n  } while (cVar8 != '\0');\n  if ((pcVar1 != param_1) && (pcVar1 != PTR_DAT_001445ac + -0x6800)) {\n    (*(code *)PTR_free_001464fc)(pcVar1);\n  }\n  return pcVar3;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "char *pcVar7;" primitive_type (pointer_declarator "*pcVar7" * identifier) ;) (declaration "char cVar8;" primitive_type identifier ;) (declaration "char *pcVar9;" primitive_type (pointer_declarator "*pcVar9" * identifier) ;) (declaration "int iVar10;" primitive_type identifier ;) (if_statement "if (param_1 == (char *)0x0) {\nLAB_000d8208:\n    if ((param_3 & 2) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }\n    pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c);\n    if (pcVar1 == (char *)0x0) {\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }\n  }\n  else {\n    cVar8 = *param_1;\n    if (cVar8 == '\0') goto LAB_000d8208;\n    pcVar1 = param_1;\n    if (((param_3 & 8) == 0) || (cVar8 != '.')) {\n      if (((param_3 & 1) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }\n    }\n    else if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }\n  }" if (parenthesized_expression "(param_1 == (char *)0x0)" ( (binary_expression "param_1 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_000d8208:\n    if ((param_3 & 2) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }\n    pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c);\n    if (pcVar1 == (char *)0x0) {\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }\n  }" { (labeled_statement "LAB_000d8208:\n    if ((param_3 & 2) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }" statement_identifier : (if_statement "if ((param_3 & 2) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\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_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }" { (labeled_statement "LAB_000d8214:\n      iVar10 = 1;" statement_identifier : (expression_statement "iVar10 = 1;" (assignment_expression "iVar10 = 1" identifier = number_literal) ;)) (expression_statement "pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);" (assignment_expression "pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2)" identifier = (cast_expression "(char *)(*(code *)PTR_xmalloc_001445b0)(2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_xmalloc_001445b0)(2)" (parenthesized_expression "(*(code *)PTR_xmalloc_001445b0)" ( (pointer_expression "*(code *)PTR_xmalloc_001445b0" * (cast_expression "(code *)PTR_xmalloc_001445b0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(2)" ( number_literal ))))) ;) (expression_statement "pcVar1[1] = '\0';" (assignment_expression "pcVar1[1] = '\0'" (subscript_expression "pcVar1[1]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "*pcVar1 = '.';" (assignment_expression "*pcVar1 = '.'" (pointer_expression "*pcVar1" * identifier) = (char_literal "'.'" ' character ')) ;) (goto_statement "goto LAB_000d8238;" goto statement_identifier ;) }))) (expression_statement "pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c);" (assignment_expression "pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c)" identifier = (cast_expression "(char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c)" (parenthesized_expression "(*(code *)PTR_get_working_directory_00144828)" ( (pointer_expression "*(code *)PTR_get_working_directory_00144828" * (cast_expression "(code *)PTR_get_working_directory_00144828" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_DAT_001445ac + -0x3b9c)" ( (binary_expression "PTR_DAT_001445ac + -0x3b9c" identifier + number_literal) ))))) ;) (if_statement "if (pcVar1 == (char *)0x0) {\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }" if (parenthesized_expression "(pcVar1 == (char *)0x0)" ( (binary_expression "pcVar1 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }" { (expression_statement "iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);" (assignment_expression "iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc)" identifier = (call_expression "(*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc)" (parenthesized_expression "(*(code *)PTR_get_string_value_00144790)" ( (pointer_expression "*(code *)PTR_get_string_value_00144790" * (cast_expression "(code *)PTR_get_string_value_00144790" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_LAB_00144578 + 0x46fc)" ( (binary_expression "PTR_LAB_00144578 + 0x46fc" identifier + number_literal) )))) ;) (if_statement "if (iVar10 == 0) goto LAB_000d8214;" if (parenthesized_expression "(iVar10 == 0)" ( (binary_expression "iVar10 == 0" identifier == number_literal) )) (goto_statement "goto LAB_000d8214;" goto statement_identifier ;)) (expression_statement "iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);" (assignment_expression "iVar2 = (*(code *)PTR_strlen_00146390)(iVar10)" identifier = (call_expression "(*(code *)PTR_strlen_00146390)(iVar10)" (parenthesized_expression "(*(code *)PTR_strlen_00146390)" ( (pointer_expression "*(code *)PTR_strlen_00146390" * (cast_expression "(code *)PTR_strlen_00146390" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar10)" ( identifier )))) ;) (expression_statement "uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);" (assignment_expression "uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1)" identifier = (call_expression "(*(code *)PTR_xmalloc_001445b0)(iVar2 + 1)" (parenthesized_expression "(*(code *)PTR_xmalloc_001445b0)" ( (pointer_expression "*(code *)PTR_xmalloc_001445b0" * (cast_expression "(code *)PTR_xmalloc_001445b0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2 + 1)" ( (binary_expression "iVar2 + 1" identifier + number_literal) )))) ;) (expression_statement "pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);" (assignment_expression "pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10)" identifier = (cast_expression "(char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_strcpy_00146418)(uVar4,iVar10)" (parenthesized_expression "(*(code *)PTR_strcpy_00146418)" ( (pointer_expression "*(code *)PTR_strcpy_00146418" * (cast_expression "(code *)PTR_strcpy_00146418" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar4,iVar10)" ( identifier , identifier ))))) ;) })) }) (else_clause "else {\n    cVar8 = *param_1;\n    if (cVar8 == '\0') goto LAB_000d8208;\n    pcVar1 = param_1;\n    if (((param_3 & 8) == 0) || (cVar8 != '.')) {\n      if (((param_3 & 1) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }\n    }\n    else if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }\n  }" else (compound_statement "{\n    cVar8 = *param_1;\n    if (cVar8 == '\0') goto LAB_000d8208;\n    pcVar1 = param_1;\n    if (((param_3 & 8) == 0) || (cVar8 != '.')) {\n      if (((param_3 & 1) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }\n    }\n    else if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }\n  }" { (expression_statement "cVar8 = *param_1;" (assignment_expression "cVar8 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (cVar8 == '\0') goto LAB_000d8208;" if (parenthesized_expression "(cVar8 == '\0')" ( (binary_expression "cVar8 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_000d8208;" goto statement_identifier ;)) (expression_statement "pcVar1 = param_1;" (assignment_expression "pcVar1 = param_1" identifier = identifier) ;) (if_statement "if (((param_3 & 8) == 0) || (cVar8 != '.')) {\n      if (((param_3 & 1) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }\n    }\n    else if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }" if (parenthesized_expression "(((param_3 & 8) == 0) || (cVar8 != '.'))" ( (binary_expression "((param_3 & 8) == 0) || (cVar8 != '.')" (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 "(cVar8 != '.')" ( (binary_expression "cVar8 != '.'" identifier != (char_literal "'.'" ' character ')) ))) )) (compound_statement "{\n      if (((param_3 & 1) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }\n    }" { (if_statement "if (((param_3 & 1) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }" if (parenthesized_expression "(((param_3 & 1) != 0) && (cVar8 == '~'))" ( (binary_expression "((param_3 & 1) != 0) && (cVar8 == '~')" (parenthesized_expression "((param_3 & 1) != 0)" ( (binary_expression "(param_3 & 1) != 0" (parenthesized_expression "(param_3 & 1)" ( (binary_expression "param_3 & 1" identifier & number_literal) )) != number_literal) )) && (parenthesized_expression "(cVar8 == '~')" ( (binary_expression "cVar8 == '~'" identifier == (char_literal "'~'" ' character ')) ))) )) (compound_statement "{\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }" { (expression_statement "pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);" (assignment_expression "pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0)" identifier = (cast_expression "(char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0)" (parenthesized_expression "(*(code *)PTR_bash_tilde_expand_00144aec)" ( (pointer_expression "*(code *)PTR_bash_tilde_expand_00144aec" * (cast_expression "(code *)PTR_bash_tilde_expand_00144aec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,0)" ( identifier , number_literal ))))) ;) })) }) (else_clause "else if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }" else (if_statement "if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\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      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }" { (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) (expression_statement "pcVar1 = PTR_DAT_001445ac + -0x6800;" (assignment_expression "pcVar1 = PTR_DAT_001445ac + -0x6800" identifier = (binary_expression "PTR_DAT_001445ac + -0x6800" identifier + number_literal)) ;) (goto_statement "goto LAB_000d8238;" goto statement_identifier ;) })))) }))) (expression_statement "iVar10 = (*(code *)PTR_strlen_00146390)(pcVar1);" (assignment_expression "iVar10 = (*(code *)PTR_strlen_00146390)(pcVar1)" identifier = (call_expression "(*(code *)PTR_strlen_00146390)(pcVar1)" (parenthesized_expression "(*(code *)PTR_strlen_00146390)" ( (pointer_expression "*(code *)PTR_strlen_00146390" * (cast_expression "(code *)PTR_strlen_00146390" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar1)" ( identifier )))) ;) (labeled_statement "LAB_000d8238:\n  iVar2 = (*(code *)PTR_strlen_00146390)(param_2);" statement_identifier : (expression_statement "iVar2 = (*(code *)PTR_strlen_00146390)(param_2);" (assignment_expression "iVar2 = (*(code *)PTR_strlen_00146390)(param_2)" identifier = (call_expression "(*(code *)PTR_strlen_00146390)(param_2)" (parenthesized_expression "(*(code *)PTR_strlen_00146390)" ( (pointer_expression "*(code *)PTR_strlen_00146390" * (cast_expression "(code *)PTR_strlen_00146390" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2)" ( identifier )))) ;)) (if_statement "if ((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')) {\n    iVar2 = iVar2 + 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    iVar2 = iVar2 + 2;\n  }" { (expression_statement "iVar2 = iVar2 + 2;" (assignment_expression "iVar2 = iVar2 + 2" identifier = (binary_expression "iVar2 + 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 *)(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2);" (assignment_expression "pcVar3 = (char *)(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2)" identifier = (cast_expression "(char *)(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2)" (parenthesized_expression "(*(code *)PTR_xmalloc_001445b0)" ( (pointer_expression "*(code *)PTR_xmalloc_001445b0" * (cast_expression "(code *)PTR_xmalloc_001445b0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar10 + iVar2)" ( (binary_expression "iVar10 + iVar2" identifier + identifier) ))))) ;) (expression_statement "cVar8 = *pcVar1;" (assignment_expression "cVar8 = *pcVar1" identifier = (pointer_expression "*pcVar1" * identifier)) ;) (expression_statement "pcVar5 = pcVar3;" (assignment_expression "pcVar5 = pcVar3" identifier = identifier) ;) (expression_statement "pcVar7 = pcVar1;" (assignment_expression "pcVar7 = pcVar1" identifier = identifier) ;) (if_statement "if (cVar8 != '\0') {\n    do {\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    } while (cVar8 != '\0');\n    if ((pcVar1 < pcVar7) && (*pcVar6 != '/')) {\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }\n  }" if (parenthesized_expression "(cVar8 != '\0')" ( (binary_expression "cVar8 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    do {\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    } while (cVar8 != '\0');\n    if ((pcVar1 < pcVar7) && (*pcVar6 != '/')) {\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }\n  }" { (do_statement "do {\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    } while (cVar8 != '\0');" do (compound_statement "{\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    }" { (expression_statement "pcVar9 = pcVar5;" (assignment_expression "pcVar9 = pcVar5" identifier = identifier) ;) (expression_statement "pcVar6 = pcVar7;" (assignment_expression "pcVar6 = pcVar7" identifier = identifier) ;) (expression_statement "pcVar5 = pcVar9 + 1;" (assignment_expression "pcVar5 = pcVar9 + 1" identifier = (binary_expression "pcVar9 + 1" identifier + number_literal)) ;) (expression_statement "*pcVar9 = cVar8;" (assignment_expression "*pcVar9 = cVar8" (pointer_expression "*pcVar9" * identifier) = identifier) ;) (expression_statement "pcVar7 = pcVar6 + 1;" (assignment_expression "pcVar7 = pcVar6 + 1" identifier = (binary_expression "pcVar6 + 1" identifier + number_literal)) ;) (expression_statement "cVar8 = *pcVar7;" (assignment_expression "cVar8 = *pcVar7" identifier = (pointer_expression "*pcVar7" * identifier)) ;) }) while (parenthesized_expression "(cVar8 != '\0')" ( (binary_expression "cVar8 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) ;) (if_statement "if ((pcVar1 < pcVar7) && (*pcVar6 != '/')) {\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }" if (parenthesized_expression "((pcVar1 < pcVar7) && (*pcVar6 != '/'))" ( (binary_expression "(pcVar1 < pcVar7) && (*pcVar6 != '/')" (parenthesized_expression "(pcVar1 < pcVar7)" ( (binary_expression "pcVar1 < pcVar7" identifier < identifier) )) && (parenthesized_expression "(*pcVar6 != '/')" ( (binary_expression "*pcVar6 != '/'" (pointer_expression "*pcVar6" * identifier) != (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }" { (expression_statement "*pcVar5 = '/';" (assignment_expression "*pcVar5 = '/'" (pointer_expression "*pcVar5" * identifier) = (char_literal "'/'" ' character ')) ;) (expression_statement "pcVar5 = pcVar9 + 2;" (assignment_expression "pcVar5 = pcVar9 + 2" identifier = (binary_expression "pcVar9 + 2" identifier + number_literal)) ;) })) })) (do_statement "do {\n    cVar8 = *param_2;\n    *pcVar5 = cVar8;\n    pcVar5 = pcVar5 + 1;\n    param_2 = param_2 + 1;\n  } while (cVar8 != '\0');" do (compound_statement "{\n    cVar8 = *param_2;\n    *pcVar5 = cVar8;\n    pcVar5 = pcVar5 + 1;\n    param_2 = param_2 + 1;\n  }" { (expression_statement "cVar8 = *param_2;" (assignment_expression "cVar8 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "*pcVar5 = cVar8;" (assignment_expression "*pcVar5 = cVar8" (pointer_expression "*pcVar5" * identifier) = identifier) ;) (expression_statement "pcVar5 = pcVar5 + 1;" (assignment_expression "pcVar5 = pcVar5 + 1" identifier = (binary_expression "pcVar5 + 1" identifier + number_literal)) ;) (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" identifier = (binary_expression "param_2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(cVar8 != '\0')" ( (binary_expression "cVar8 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) ;) (if_statement "if ((pcVar1 != param_1) && (pcVar1 != PTR_DAT_001445ac + -0x6800)) {\n    (*(code *)PTR_free_001464fc)(pcVar1);\n  }" if (parenthesized_expression "((pcVar1 != param_1) && (pcVar1 != PTR_DAT_001445ac + -0x6800))" ( (binary_expression "(pcVar1 != param_1) && (pcVar1 != PTR_DAT_001445ac + -0x6800)" (parenthesized_expression "(pcVar1 != param_1)" ( (binary_expression "pcVar1 != param_1" identifier != identifier) )) && (parenthesized_expression "(pcVar1 != PTR_DAT_001445ac + -0x6800)" ( (binary_expression "pcVar1 != PTR_DAT_001445ac + -0x6800" identifier != (binary_expression "PTR_DAT_001445ac + -0x6800" identifier + number_literal)) ))) )) (compound_statement "{\n    (*(code *)PTR_free_001464fc)(pcVar1);\n  }" { (expression_statement "(*(code *)PTR_free_001464fc)(pcVar1);" (call_expression "(*(code *)PTR_free_001464fc)(pcVar1)" (parenthesized_expression "(*(code *)PTR_free_001464fc)" ( (pointer_expression "*(code *)PTR_free_001464fc" * (cast_expression "(code *)PTR_free_001464fc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar1)" ( identifier ))) ;) })) (return_statement "return pcVar3;" return identifier ;) })))
(translation_unit "char * sh_makepath(char *path,char *dir,int flags)\n\n{\n  char *pcVar1;\n  int iVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  char *pcVar5;\n  char *pcVar6;\n  char *pcVar7;\n  char cVar8;\n  char *pcVar9;\n  int iVar10;\n  \n  if (path == (char *)0x0) {\nLAB_000d8208:\n    if ((flags & 2U) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }\n    pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c);\n    if (pcVar1 == (char *)0x0) {\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }\n  }\n  else {\n    cVar8 = *path;\n    if (cVar8 == '\0') goto LAB_000d8208;\n    pcVar1 = path;\n    if (((flags & 8U) == 0) || (cVar8 != '.')) {\n      if (((flags & 1U) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(path,0);\n      }\n    }\n    else if ((path[1] == '\0') || ((path[1] == '/' && (path[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }\n  }\n  iVar10 = (*(code *)PTR_strlen_00146390)(pcVar1);\nLAB_000d8238:\n  iVar2 = (*(code *)PTR_strlen_00146390)(dir);\n  if ((((flags & 4U) == 0) || (*dir != '.')) || (dir[1] != '/')) {\n    iVar2 = iVar2 + 2;\n  }\n  else {\n    dir = dir + 2;\n  }\n  pcVar3 = (char *)(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2);\n  cVar8 = *pcVar1;\n  pcVar5 = pcVar3;\n  pcVar7 = pcVar1;\n  if (cVar8 != '\0') {\n    do {\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    } while (cVar8 != '\0');\n    if ((pcVar1 < pcVar7) && (*pcVar6 != '/')) {\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }\n  }\n  do {\n    cVar8 = *dir;\n    *pcVar5 = cVar8;\n    pcVar5 = pcVar5 + 1;\n    dir = dir + 1;\n  } while (cVar8 != '\0');\n  if ((pcVar1 != path) && (pcVar1 != PTR_DAT_001445ac + -0x6800)) {\n    (*(code *)PTR_free_001464fc)(pcVar1);\n  }\n  return pcVar3;\n}\n\n" (function_definition "char * sh_makepath(char *path,char *dir,int flags)\n\n{\n  char *pcVar1;\n  int iVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  char *pcVar5;\n  char *pcVar6;\n  char *pcVar7;\n  char cVar8;\n  char *pcVar9;\n  int iVar10;\n  \n  if (path == (char *)0x0) {\nLAB_000d8208:\n    if ((flags & 2U) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }\n    pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c);\n    if (pcVar1 == (char *)0x0) {\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }\n  }\n  else {\n    cVar8 = *path;\n    if (cVar8 == '\0') goto LAB_000d8208;\n    pcVar1 = path;\n    if (((flags & 8U) == 0) || (cVar8 != '.')) {\n      if (((flags & 1U) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(path,0);\n      }\n    }\n    else if ((path[1] == '\0') || ((path[1] == '/' && (path[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }\n  }\n  iVar10 = (*(code *)PTR_strlen_00146390)(pcVar1);\nLAB_000d8238:\n  iVar2 = (*(code *)PTR_strlen_00146390)(dir);\n  if ((((flags & 4U) == 0) || (*dir != '.')) || (dir[1] != '/')) {\n    iVar2 = iVar2 + 2;\n  }\n  else {\n    dir = dir + 2;\n  }\n  pcVar3 = (char *)(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2);\n  cVar8 = *pcVar1;\n  pcVar5 = pcVar3;\n  pcVar7 = pcVar1;\n  if (cVar8 != '\0') {\n    do {\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    } while (cVar8 != '\0');\n    if ((pcVar1 < pcVar7) && (*pcVar6 != '/')) {\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }\n  }\n  do {\n    cVar8 = *dir;\n    *pcVar5 = cVar8;\n    pcVar5 = pcVar5 + 1;\n    dir = dir + 1;\n  } while (cVar8 != '\0');\n  if ((pcVar1 != path) && (pcVar1 != PTR_DAT_001445ac + -0x6800)) {\n    (*(code *)PTR_free_001464fc)(pcVar1);\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  char *pcVar1;\n  int iVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  char *pcVar5;\n  char *pcVar6;\n  char *pcVar7;\n  char cVar8;\n  char *pcVar9;\n  int iVar10;\n  \n  if (path == (char *)0x0) {\nLAB_000d8208:\n    if ((flags & 2U) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }\n    pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c);\n    if (pcVar1 == (char *)0x0) {\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }\n  }\n  else {\n    cVar8 = *path;\n    if (cVar8 == '\0') goto LAB_000d8208;\n    pcVar1 = path;\n    if (((flags & 8U) == 0) || (cVar8 != '.')) {\n      if (((flags & 1U) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(path,0);\n      }\n    }\n    else if ((path[1] == '\0') || ((path[1] == '/' && (path[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }\n  }\n  iVar10 = (*(code *)PTR_strlen_00146390)(pcVar1);\nLAB_000d8238:\n  iVar2 = (*(code *)PTR_strlen_00146390)(dir);\n  if ((((flags & 4U) == 0) || (*dir != '.')) || (dir[1] != '/')) {\n    iVar2 = iVar2 + 2;\n  }\n  else {\n    dir = dir + 2;\n  }\n  pcVar3 = (char *)(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2);\n  cVar8 = *pcVar1;\n  pcVar5 = pcVar3;\n  pcVar7 = pcVar1;\n  if (cVar8 != '\0') {\n    do {\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    } while (cVar8 != '\0');\n    if ((pcVar1 < pcVar7) && (*pcVar6 != '/')) {\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }\n  }\n  do {\n    cVar8 = *dir;\n    *pcVar5 = cVar8;\n    pcVar5 = pcVar5 + 1;\n    dir = dir + 1;\n  } while (cVar8 != '\0');\n  if ((pcVar1 != path) && (pcVar1 != PTR_DAT_001445ac + -0x6800)) {\n    (*(code *)PTR_free_001464fc)(pcVar1);\n  }\n  return pcVar3;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "char *pcVar7;" primitive_type (pointer_declarator "*pcVar7" * identifier) ;) (declaration "char cVar8;" primitive_type identifier ;) (declaration "char *pcVar9;" primitive_type (pointer_declarator "*pcVar9" * identifier) ;) (declaration "int iVar10;" primitive_type identifier ;) (if_statement "if (path == (char *)0x0) {\nLAB_000d8208:\n    if ((flags & 2U) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }\n    pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c);\n    if (pcVar1 == (char *)0x0) {\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }\n  }\n  else {\n    cVar8 = *path;\n    if (cVar8 == '\0') goto LAB_000d8208;\n    pcVar1 = path;\n    if (((flags & 8U) == 0) || (cVar8 != '.')) {\n      if (((flags & 1U) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(path,0);\n      }\n    }\n    else if ((path[1] == '\0') || ((path[1] == '/' && (path[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }\n  }" if (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)) )) (compound_statement "{\nLAB_000d8208:\n    if ((flags & 2U) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }\n    pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c);\n    if (pcVar1 == (char *)0x0) {\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }\n  }" { (labeled_statement "LAB_000d8208:\n    if ((flags & 2U) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }" statement_identifier : (if_statement "if ((flags & 2U) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\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_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }" { (labeled_statement "LAB_000d8214:\n      iVar10 = 1;" statement_identifier : (expression_statement "iVar10 = 1;" (assignment_expression "iVar10 = 1" identifier = number_literal) ;)) (expression_statement "pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);" (assignment_expression "pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2)" identifier = (cast_expression "(char *)(*(code *)PTR_xmalloc_001445b0)(2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_xmalloc_001445b0)(2)" (parenthesized_expression "(*(code *)PTR_xmalloc_001445b0)" ( (pointer_expression "*(code *)PTR_xmalloc_001445b0" * (cast_expression "(code *)PTR_xmalloc_001445b0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(2)" ( number_literal ))))) ;) (expression_statement "pcVar1[1] = '\0';" (assignment_expression "pcVar1[1] = '\0'" (subscript_expression "pcVar1[1]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "*pcVar1 = '.';" (assignment_expression "*pcVar1 = '.'" (pointer_expression "*pcVar1" * identifier) = (char_literal "'.'" ' character ')) ;) (goto_statement "goto LAB_000d8238;" goto statement_identifier ;) }))) (expression_statement "pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c);" (assignment_expression "pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c)" identifier = (cast_expression "(char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c)" (parenthesized_expression "(*(code *)PTR_get_working_directory_00144828)" ( (pointer_expression "*(code *)PTR_get_working_directory_00144828" * (cast_expression "(code *)PTR_get_working_directory_00144828" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_DAT_001445ac + -0x3b9c)" ( (binary_expression "PTR_DAT_001445ac + -0x3b9c" identifier + number_literal) ))))) ;) (if_statement "if (pcVar1 == (char *)0x0) {\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }" if (parenthesized_expression "(pcVar1 == (char *)0x0)" ( (binary_expression "pcVar1 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }" { (expression_statement "iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);" (assignment_expression "iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc)" identifier = (call_expression "(*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc)" (parenthesized_expression "(*(code *)PTR_get_string_value_00144790)" ( (pointer_expression "*(code *)PTR_get_string_value_00144790" * (cast_expression "(code *)PTR_get_string_value_00144790" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_LAB_00144578 + 0x46fc)" ( (binary_expression "PTR_LAB_00144578 + 0x46fc" identifier + number_literal) )))) ;) (if_statement "if (iVar10 == 0) goto LAB_000d8214;" if (parenthesized_expression "(iVar10 == 0)" ( (binary_expression "iVar10 == 0" identifier == number_literal) )) (goto_statement "goto LAB_000d8214;" goto statement_identifier ;)) (expression_statement "iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);" (assignment_expression "iVar2 = (*(code *)PTR_strlen_00146390)(iVar10)" identifier = (call_expression "(*(code *)PTR_strlen_00146390)(iVar10)" (parenthesized_expression "(*(code *)PTR_strlen_00146390)" ( (pointer_expression "*(code *)PTR_strlen_00146390" * (cast_expression "(code *)PTR_strlen_00146390" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar10)" ( identifier )))) ;) (expression_statement "uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);" (assignment_expression "uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1)" identifier = (call_expression "(*(code *)PTR_xmalloc_001445b0)(iVar2 + 1)" (parenthesized_expression "(*(code *)PTR_xmalloc_001445b0)" ( (pointer_expression "*(code *)PTR_xmalloc_001445b0" * (cast_expression "(code *)PTR_xmalloc_001445b0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2 + 1)" ( (binary_expression "iVar2 + 1" identifier + number_literal) )))) ;) (expression_statement "pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);" (assignment_expression "pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10)" identifier = (cast_expression "(char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_strcpy_00146418)(uVar4,iVar10)" (parenthesized_expression "(*(code *)PTR_strcpy_00146418)" ( (pointer_expression "*(code *)PTR_strcpy_00146418" * (cast_expression "(code *)PTR_strcpy_00146418" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar4,iVar10)" ( identifier , identifier ))))) ;) })) }) (else_clause "else {\n    cVar8 = *path;\n    if (cVar8 == '\0') goto LAB_000d8208;\n    pcVar1 = path;\n    if (((flags & 8U) == 0) || (cVar8 != '.')) {\n      if (((flags & 1U) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(path,0);\n      }\n    }\n    else if ((path[1] == '\0') || ((path[1] == '/' && (path[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }\n  }" else (compound_statement "{\n    cVar8 = *path;\n    if (cVar8 == '\0') goto LAB_000d8208;\n    pcVar1 = path;\n    if (((flags & 8U) == 0) || (cVar8 != '.')) {\n      if (((flags & 1U) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(path,0);\n      }\n    }\n    else if ((path[1] == '\0') || ((path[1] == '/' && (path[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }\n  }" { (expression_statement "cVar8 = *path;" (assignment_expression "cVar8 = *path" identifier = (pointer_expression "*path" * identifier)) ;) (if_statement "if (cVar8 == '\0') goto LAB_000d8208;" if (parenthesized_expression "(cVar8 == '\0')" ( (binary_expression "cVar8 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_000d8208;" goto statement_identifier ;)) (expression_statement "pcVar1 = path;" (assignment_expression "pcVar1 = path" identifier = identifier) ;) (if_statement "if (((flags & 8U) == 0) || (cVar8 != '.')) {\n      if (((flags & 1U) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(path,0);\n      }\n    }\n    else if ((path[1] == '\0') || ((path[1] == '/' && (path[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }" if (parenthesized_expression "(((flags & 8U) == 0) || (cVar8 != '.'))" ( (binary_expression "((flags & 8U) == 0) || (cVar8 != '.')" (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 "(cVar8 != '.')" ( (binary_expression "cVar8 != '.'" identifier != (char_literal "'.'" ' character ')) ))) )) (compound_statement "{\n      if (((flags & 1U) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(path,0);\n      }\n    }" { (if_statement "if (((flags & 1U) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(path,0);\n      }" if (parenthesized_expression "(((flags & 1U) != 0) && (cVar8 == '~'))" ( (binary_expression "((flags & 1U) != 0) && (cVar8 == '~')" (parenthesized_expression "((flags & 1U) != 0)" ( (binary_expression "(flags & 1U) != 0" (parenthesized_expression "(flags & 1U)" ( (binary_expression "flags & 1U" identifier & number_literal) )) != number_literal) )) && (parenthesized_expression "(cVar8 == '~')" ( (binary_expression "cVar8 == '~'" identifier == (char_literal "'~'" ' character ')) ))) )) (compound_statement "{\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(path,0);\n      }" { (expression_statement "pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(path,0);" (assignment_expression "pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(path,0)" identifier = (cast_expression "(char *)(*(code *)PTR_bash_tilde_expand_00144aec)(path,0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_bash_tilde_expand_00144aec)(path,0)" (parenthesized_expression "(*(code *)PTR_bash_tilde_expand_00144aec)" ( (pointer_expression "*(code *)PTR_bash_tilde_expand_00144aec" * (cast_expression "(code *)PTR_bash_tilde_expand_00144aec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(path,0)" ( identifier , number_literal ))))) ;) })) }) (else_clause "else if ((path[1] == '\0') || ((path[1] == '/' && (path[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }" else (if_statement "if ((path[1] == '\0') || ((path[1] == '/' && (path[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\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      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }" { (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) (expression_statement "pcVar1 = PTR_DAT_001445ac + -0x6800;" (assignment_expression "pcVar1 = PTR_DAT_001445ac + -0x6800" identifier = (binary_expression "PTR_DAT_001445ac + -0x6800" identifier + number_literal)) ;) (goto_statement "goto LAB_000d8238;" goto statement_identifier ;) })))) }))) (expression_statement "iVar10 = (*(code *)PTR_strlen_00146390)(pcVar1);" (assignment_expression "iVar10 = (*(code *)PTR_strlen_00146390)(pcVar1)" identifier = (call_expression "(*(code *)PTR_strlen_00146390)(pcVar1)" (parenthesized_expression "(*(code *)PTR_strlen_00146390)" ( (pointer_expression "*(code *)PTR_strlen_00146390" * (cast_expression "(code *)PTR_strlen_00146390" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar1)" ( identifier )))) ;) (labeled_statement "LAB_000d8238:\n  iVar2 = (*(code *)PTR_strlen_00146390)(dir);" statement_identifier : (expression_statement "iVar2 = (*(code *)PTR_strlen_00146390)(dir);" (assignment_expression "iVar2 = (*(code *)PTR_strlen_00146390)(dir)" identifier = (call_expression "(*(code *)PTR_strlen_00146390)(dir)" (parenthesized_expression "(*(code *)PTR_strlen_00146390)" ( (pointer_expression "*(code *)PTR_strlen_00146390" * (cast_expression "(code *)PTR_strlen_00146390" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(dir)" ( identifier )))) ;)) (if_statement "if ((((flags & 4U) == 0) || (*dir != '.')) || (dir[1] != '/')) {\n    iVar2 = iVar2 + 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    iVar2 = iVar2 + 2;\n  }" { (expression_statement "iVar2 = iVar2 + 2;" (assignment_expression "iVar2 = iVar2 + 2" identifier = (binary_expression "iVar2 + 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 *)(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2);" (assignment_expression "pcVar3 = (char *)(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2)" identifier = (cast_expression "(char *)(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2)" (parenthesized_expression "(*(code *)PTR_xmalloc_001445b0)" ( (pointer_expression "*(code *)PTR_xmalloc_001445b0" * (cast_expression "(code *)PTR_xmalloc_001445b0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar10 + iVar2)" ( (binary_expression "iVar10 + iVar2" identifier + identifier) ))))) ;) (expression_statement "cVar8 = *pcVar1;" (assignment_expression "cVar8 = *pcVar1" identifier = (pointer_expression "*pcVar1" * identifier)) ;) (expression_statement "pcVar5 = pcVar3;" (assignment_expression "pcVar5 = pcVar3" identifier = identifier) ;) (expression_statement "pcVar7 = pcVar1;" (assignment_expression "pcVar7 = pcVar1" identifier = identifier) ;) (if_statement "if (cVar8 != '\0') {\n    do {\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    } while (cVar8 != '\0');\n    if ((pcVar1 < pcVar7) && (*pcVar6 != '/')) {\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }\n  }" if (parenthesized_expression "(cVar8 != '\0')" ( (binary_expression "cVar8 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    do {\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    } while (cVar8 != '\0');\n    if ((pcVar1 < pcVar7) && (*pcVar6 != '/')) {\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }\n  }" { (do_statement "do {\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    } while (cVar8 != '\0');" do (compound_statement "{\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    }" { (expression_statement "pcVar9 = pcVar5;" (assignment_expression "pcVar9 = pcVar5" identifier = identifier) ;) (expression_statement "pcVar6 = pcVar7;" (assignment_expression "pcVar6 = pcVar7" identifier = identifier) ;) (expression_statement "pcVar5 = pcVar9 + 1;" (assignment_expression "pcVar5 = pcVar9 + 1" identifier = (binary_expression "pcVar9 + 1" identifier + number_literal)) ;) (expression_statement "*pcVar9 = cVar8;" (assignment_expression "*pcVar9 = cVar8" (pointer_expression "*pcVar9" * identifier) = identifier) ;) (expression_statement "pcVar7 = pcVar6 + 1;" (assignment_expression "pcVar7 = pcVar6 + 1" identifier = (binary_expression "pcVar6 + 1" identifier + number_literal)) ;) (expression_statement "cVar8 = *pcVar7;" (assignment_expression "cVar8 = *pcVar7" identifier = (pointer_expression "*pcVar7" * identifier)) ;) }) while (parenthesized_expression "(cVar8 != '\0')" ( (binary_expression "cVar8 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) ;) (if_statement "if ((pcVar1 < pcVar7) && (*pcVar6 != '/')) {\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }" if (parenthesized_expression "((pcVar1 < pcVar7) && (*pcVar6 != '/'))" ( (binary_expression "(pcVar1 < pcVar7) && (*pcVar6 != '/')" (parenthesized_expression "(pcVar1 < pcVar7)" ( (binary_expression "pcVar1 < pcVar7" identifier < identifier) )) && (parenthesized_expression "(*pcVar6 != '/')" ( (binary_expression "*pcVar6 != '/'" (pointer_expression "*pcVar6" * identifier) != (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }" { (expression_statement "*pcVar5 = '/';" (assignment_expression "*pcVar5 = '/'" (pointer_expression "*pcVar5" * identifier) = (char_literal "'/'" ' character ')) ;) (expression_statement "pcVar5 = pcVar9 + 2;" (assignment_expression "pcVar5 = pcVar9 + 2" identifier = (binary_expression "pcVar9 + 2" identifier + number_literal)) ;) })) })) (do_statement "do {\n    cVar8 = *dir;\n    *pcVar5 = cVar8;\n    pcVar5 = pcVar5 + 1;\n    dir = dir + 1;\n  } while (cVar8 != '\0');" do (compound_statement "{\n    cVar8 = *dir;\n    *pcVar5 = cVar8;\n    pcVar5 = pcVar5 + 1;\n    dir = dir + 1;\n  }" { (expression_statement "cVar8 = *dir;" (assignment_expression "cVar8 = *dir" identifier = (pointer_expression "*dir" * identifier)) ;) (expression_statement "*pcVar5 = cVar8;" (assignment_expression "*pcVar5 = cVar8" (pointer_expression "*pcVar5" * identifier) = identifier) ;) (expression_statement "pcVar5 = pcVar5 + 1;" (assignment_expression "pcVar5 = pcVar5 + 1" identifier = (binary_expression "pcVar5 + 1" identifier + number_literal)) ;) (expression_statement "dir = dir + 1;" (assignment_expression "dir = dir + 1" identifier = (binary_expression "dir + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(cVar8 != '\0')" ( (binary_expression "cVar8 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) ;) (if_statement "if ((pcVar1 != path) && (pcVar1 != PTR_DAT_001445ac + -0x6800)) {\n    (*(code *)PTR_free_001464fc)(pcVar1);\n  }" if (parenthesized_expression "((pcVar1 != path) && (pcVar1 != PTR_DAT_001445ac + -0x6800))" ( (binary_expression "(pcVar1 != path) && (pcVar1 != PTR_DAT_001445ac + -0x6800)" (parenthesized_expression "(pcVar1 != path)" ( (binary_expression "pcVar1 != path" identifier != identifier) )) && (parenthesized_expression "(pcVar1 != PTR_DAT_001445ac + -0x6800)" ( (binary_expression "pcVar1 != PTR_DAT_001445ac + -0x6800" identifier != (binary_expression "PTR_DAT_001445ac + -0x6800" identifier + number_literal)) ))) )) (compound_statement "{\n    (*(code *)PTR_free_001464fc)(pcVar1);\n  }" { (expression_statement "(*(code *)PTR_free_001464fc)(pcVar1);" (call_expression "(*(code *)PTR_free_001464fc)(pcVar1)" (parenthesized_expression "(*(code *)PTR_free_001464fc)" ( (pointer_expression "*(code *)PTR_free_001464fc" * (cast_expression "(code *)PTR_free_001464fc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar1)" ( identifier ))) ;) })) (return_statement "return pcVar3;" return identifier ;) })))
(translation_unit "char * sh_makepath(char *param_1,char *param_2,uint param_3)\n\n{\n  char *pcVar1;\n  int iVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  char *pcVar5;\n  char *pcVar6;\n  char *pcVar7;\n  char cVar8;\n  char *pcVar9;\n  int iVar10;\n  \n  if (param_1 == (char *)0x0) {\nLAB_000d8208:\n    if ((param_3 & 2) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }\n    pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c);\n    if (pcVar1 == (char *)0x0) {\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }\n  }\n  else {\n    cVar8 = *param_1;\n    if (cVar8 == '\0') goto LAB_000d8208;\n    pcVar1 = param_1;\n    if (((param_3 & 8) == 0) || (cVar8 != '.')) {\n      if (((param_3 & 1) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }\n    }\n    else if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }\n  }\n  iVar10 = (*(code *)PTR_strlen_00146390)(pcVar1);\nLAB_000d8238:\n  iVar2 = (*(code *)PTR_strlen_00146390)(param_2);\n  if ((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')) {\n    iVar2 = iVar2 + 2;\n  }\n  else {\n    param_2 = param_2 + 2;\n  }\n  pcVar3 = (char *)(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2);\n  cVar8 = *pcVar1;\n  pcVar5 = pcVar3;\n  pcVar7 = pcVar1;\n  if (cVar8 != '\0') {\n    do {\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    } while (cVar8 != '\0');\n    if ((pcVar1 < pcVar7) && (*pcVar6 != '/')) {\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }\n  }\n  do {\n    cVar8 = *param_2;\n    *pcVar5 = cVar8;\n    pcVar5 = pcVar5 + 1;\n    param_2 = param_2 + 1;\n  } while (cVar8 != '\0');\n  if ((pcVar1 != param_1) && (pcVar1 != PTR_DAT_001445ac + -0x6800)) {\n    (*(code *)PTR_free_001464fc)(pcVar1);\n  }\n  return pcVar3;\n}\n\n" (function_definition "char * sh_makepath(char *param_1,char *param_2,uint param_3)\n\n{\n  char *pcVar1;\n  int iVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  char *pcVar5;\n  char *pcVar6;\n  char *pcVar7;\n  char cVar8;\n  char *pcVar9;\n  int iVar10;\n  \n  if (param_1 == (char *)0x0) {\nLAB_000d8208:\n    if ((param_3 & 2) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }\n    pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c);\n    if (pcVar1 == (char *)0x0) {\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }\n  }\n  else {\n    cVar8 = *param_1;\n    if (cVar8 == '\0') goto LAB_000d8208;\n    pcVar1 = param_1;\n    if (((param_3 & 8) == 0) || (cVar8 != '.')) {\n      if (((param_3 & 1) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }\n    }\n    else if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }\n  }\n  iVar10 = (*(code *)PTR_strlen_00146390)(pcVar1);\nLAB_000d8238:\n  iVar2 = (*(code *)PTR_strlen_00146390)(param_2);\n  if ((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')) {\n    iVar2 = iVar2 + 2;\n  }\n  else {\n    param_2 = param_2 + 2;\n  }\n  pcVar3 = (char *)(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2);\n  cVar8 = *pcVar1;\n  pcVar5 = pcVar3;\n  pcVar7 = pcVar1;\n  if (cVar8 != '\0') {\n    do {\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    } while (cVar8 != '\0');\n    if ((pcVar1 < pcVar7) && (*pcVar6 != '/')) {\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }\n  }\n  do {\n    cVar8 = *param_2;\n    *pcVar5 = cVar8;\n    pcVar5 = pcVar5 + 1;\n    param_2 = param_2 + 1;\n  } while (cVar8 != '\0');\n  if ((pcVar1 != param_1) && (pcVar1 != PTR_DAT_001445ac + -0x6800)) {\n    (*(code *)PTR_free_001464fc)(pcVar1);\n  }\n  return pcVar3;\n}" primitive_type (pointer_declarator "* sh_makepath(char *param_1,char *param_2,uint param_3)" * (function_declarator "sh_makepath(char *param_1,char *param_2,uint param_3)" identifier (parameter_list "(char *param_1,char *param_2,uint 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 "uint param_3" type_identifier identifier) )))) (compound_statement "{\n  char *pcVar1;\n  int iVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  char *pcVar5;\n  char *pcVar6;\n  char *pcVar7;\n  char cVar8;\n  char *pcVar9;\n  int iVar10;\n  \n  if (param_1 == (char *)0x0) {\nLAB_000d8208:\n    if ((param_3 & 2) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }\n    pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c);\n    if (pcVar1 == (char *)0x0) {\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }\n  }\n  else {\n    cVar8 = *param_1;\n    if (cVar8 == '\0') goto LAB_000d8208;\n    pcVar1 = param_1;\n    if (((param_3 & 8) == 0) || (cVar8 != '.')) {\n      if (((param_3 & 1) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }\n    }\n    else if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }\n  }\n  iVar10 = (*(code *)PTR_strlen_00146390)(pcVar1);\nLAB_000d8238:\n  iVar2 = (*(code *)PTR_strlen_00146390)(param_2);\n  if ((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')) {\n    iVar2 = iVar2 + 2;\n  }\n  else {\n    param_2 = param_2 + 2;\n  }\n  pcVar3 = (char *)(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2);\n  cVar8 = *pcVar1;\n  pcVar5 = pcVar3;\n  pcVar7 = pcVar1;\n  if (cVar8 != '\0') {\n    do {\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    } while (cVar8 != '\0');\n    if ((pcVar1 < pcVar7) && (*pcVar6 != '/')) {\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }\n  }\n  do {\n    cVar8 = *param_2;\n    *pcVar5 = cVar8;\n    pcVar5 = pcVar5 + 1;\n    param_2 = param_2 + 1;\n  } while (cVar8 != '\0');\n  if ((pcVar1 != param_1) && (pcVar1 != PTR_DAT_001445ac + -0x6800)) {\n    (*(code *)PTR_free_001464fc)(pcVar1);\n  }\n  return pcVar3;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "char *pcVar7;" primitive_type (pointer_declarator "*pcVar7" * identifier) ;) (declaration "char cVar8;" primitive_type identifier ;) (declaration "char *pcVar9;" primitive_type (pointer_declarator "*pcVar9" * identifier) ;) (declaration "int iVar10;" primitive_type identifier ;) (if_statement "if (param_1 == (char *)0x0) {\nLAB_000d8208:\n    if ((param_3 & 2) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }\n    pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c);\n    if (pcVar1 == (char *)0x0) {\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }\n  }\n  else {\n    cVar8 = *param_1;\n    if (cVar8 == '\0') goto LAB_000d8208;\n    pcVar1 = param_1;\n    if (((param_3 & 8) == 0) || (cVar8 != '.')) {\n      if (((param_3 & 1) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }\n    }\n    else if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }\n  }" if (parenthesized_expression "(param_1 == (char *)0x0)" ( (binary_expression "param_1 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_000d8208:\n    if ((param_3 & 2) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }\n    pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c);\n    if (pcVar1 == (char *)0x0) {\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }\n  }" { (labeled_statement "LAB_000d8208:\n    if ((param_3 & 2) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }" statement_identifier : (if_statement "if ((param_3 & 2) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\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_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }" { (labeled_statement "LAB_000d8214:\n      iVar10 = 1;" statement_identifier : (expression_statement "iVar10 = 1;" (assignment_expression "iVar10 = 1" identifier = number_literal) ;)) (expression_statement "pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);" (assignment_expression "pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2)" identifier = (cast_expression "(char *)(*(code *)PTR_xmalloc_001445b0)(2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_xmalloc_001445b0)(2)" (parenthesized_expression "(*(code *)PTR_xmalloc_001445b0)" ( (pointer_expression "*(code *)PTR_xmalloc_001445b0" * (cast_expression "(code *)PTR_xmalloc_001445b0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(2)" ( number_literal ))))) ;) (expression_statement "pcVar1[1] = '\0';" (assignment_expression "pcVar1[1] = '\0'" (subscript_expression "pcVar1[1]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "*pcVar1 = '.';" (assignment_expression "*pcVar1 = '.'" (pointer_expression "*pcVar1" * identifier) = (char_literal "'.'" ' character ')) ;) (goto_statement "goto LAB_000d8238;" goto statement_identifier ;) }))) (expression_statement "pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c);" (assignment_expression "pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c)" identifier = (cast_expression "(char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c)" (parenthesized_expression "(*(code *)PTR_get_working_directory_00144828)" ( (pointer_expression "*(code *)PTR_get_working_directory_00144828" * (cast_expression "(code *)PTR_get_working_directory_00144828" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_DAT_001445ac + -0x3b9c)" ( (binary_expression "PTR_DAT_001445ac + -0x3b9c" identifier + number_literal) ))))) ;) (if_statement "if (pcVar1 == (char *)0x0) {\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }" if (parenthesized_expression "(pcVar1 == (char *)0x0)" ( (binary_expression "pcVar1 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }" { (expression_statement "iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);" (assignment_expression "iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc)" identifier = (call_expression "(*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc)" (parenthesized_expression "(*(code *)PTR_get_string_value_00144790)" ( (pointer_expression "*(code *)PTR_get_string_value_00144790" * (cast_expression "(code *)PTR_get_string_value_00144790" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_LAB_00144578 + 0x46fc)" ( (binary_expression "PTR_LAB_00144578 + 0x46fc" identifier + number_literal) )))) ;) (if_statement "if (iVar10 == 0) goto LAB_000d8214;" if (parenthesized_expression "(iVar10 == 0)" ( (binary_expression "iVar10 == 0" identifier == number_literal) )) (goto_statement "goto LAB_000d8214;" goto statement_identifier ;)) (expression_statement "iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);" (assignment_expression "iVar2 = (*(code *)PTR_strlen_00146390)(iVar10)" identifier = (call_expression "(*(code *)PTR_strlen_00146390)(iVar10)" (parenthesized_expression "(*(code *)PTR_strlen_00146390)" ( (pointer_expression "*(code *)PTR_strlen_00146390" * (cast_expression "(code *)PTR_strlen_00146390" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar10)" ( identifier )))) ;) (expression_statement "uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);" (assignment_expression "uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1)" identifier = (call_expression "(*(code *)PTR_xmalloc_001445b0)(iVar2 + 1)" (parenthesized_expression "(*(code *)PTR_xmalloc_001445b0)" ( (pointer_expression "*(code *)PTR_xmalloc_001445b0" * (cast_expression "(code *)PTR_xmalloc_001445b0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2 + 1)" ( (binary_expression "iVar2 + 1" identifier + number_literal) )))) ;) (expression_statement "pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);" (assignment_expression "pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10)" identifier = (cast_expression "(char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_strcpy_00146418)(uVar4,iVar10)" (parenthesized_expression "(*(code *)PTR_strcpy_00146418)" ( (pointer_expression "*(code *)PTR_strcpy_00146418" * (cast_expression "(code *)PTR_strcpy_00146418" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar4,iVar10)" ( identifier , identifier ))))) ;) })) }) (else_clause "else {\n    cVar8 = *param_1;\n    if (cVar8 == '\0') goto LAB_000d8208;\n    pcVar1 = param_1;\n    if (((param_3 & 8) == 0) || (cVar8 != '.')) {\n      if (((param_3 & 1) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }\n    }\n    else if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }\n  }" else (compound_statement "{\n    cVar8 = *param_1;\n    if (cVar8 == '\0') goto LAB_000d8208;\n    pcVar1 = param_1;\n    if (((param_3 & 8) == 0) || (cVar8 != '.')) {\n      if (((param_3 & 1) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }\n    }\n    else if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }\n  }" { (expression_statement "cVar8 = *param_1;" (assignment_expression "cVar8 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (cVar8 == '\0') goto LAB_000d8208;" if (parenthesized_expression "(cVar8 == '\0')" ( (binary_expression "cVar8 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_000d8208;" goto statement_identifier ;)) (expression_statement "pcVar1 = param_1;" (assignment_expression "pcVar1 = param_1" identifier = identifier) ;) (if_statement "if (((param_3 & 8) == 0) || (cVar8 != '.')) {\n      if (((param_3 & 1) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }\n    }\n    else if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }" if (parenthesized_expression "(((param_3 & 8) == 0) || (cVar8 != '.'))" ( (binary_expression "((param_3 & 8) == 0) || (cVar8 != '.')" (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 "(cVar8 != '.')" ( (binary_expression "cVar8 != '.'" identifier != (char_literal "'.'" ' character ')) ))) )) (compound_statement "{\n      if (((param_3 & 1) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }\n    }" { (if_statement "if (((param_3 & 1) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }" if (parenthesized_expression "(((param_3 & 1) != 0) && (cVar8 == '~'))" ( (binary_expression "((param_3 & 1) != 0) && (cVar8 == '~')" (parenthesized_expression "((param_3 & 1) != 0)" ( (binary_expression "(param_3 & 1) != 0" (parenthesized_expression "(param_3 & 1)" ( (binary_expression "param_3 & 1" identifier & number_literal) )) != number_literal) )) && (parenthesized_expression "(cVar8 == '~')" ( (binary_expression "cVar8 == '~'" identifier == (char_literal "'~'" ' character ')) ))) )) (compound_statement "{\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }" { (expression_statement "pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);" (assignment_expression "pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0)" identifier = (cast_expression "(char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0)" (parenthesized_expression "(*(code *)PTR_bash_tilde_expand_00144aec)" ( (pointer_expression "*(code *)PTR_bash_tilde_expand_00144aec" * (cast_expression "(code *)PTR_bash_tilde_expand_00144aec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,0)" ( identifier , number_literal ))))) ;) })) }) (else_clause "else if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }" else (if_statement "if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\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      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }" { (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) (expression_statement "pcVar1 = PTR_DAT_001445ac + -0x6800;" (assignment_expression "pcVar1 = PTR_DAT_001445ac + -0x6800" identifier = (binary_expression "PTR_DAT_001445ac + -0x6800" identifier + number_literal)) ;) (goto_statement "goto LAB_000d8238;" goto statement_identifier ;) })))) }))) (expression_statement "iVar10 = (*(code *)PTR_strlen_00146390)(pcVar1);" (assignment_expression "iVar10 = (*(code *)PTR_strlen_00146390)(pcVar1)" identifier = (call_expression "(*(code *)PTR_strlen_00146390)(pcVar1)" (parenthesized_expression "(*(code *)PTR_strlen_00146390)" ( (pointer_expression "*(code *)PTR_strlen_00146390" * (cast_expression "(code *)PTR_strlen_00146390" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar1)" ( identifier )))) ;) (labeled_statement "LAB_000d8238:\n  iVar2 = (*(code *)PTR_strlen_00146390)(param_2);" statement_identifier : (expression_statement "iVar2 = (*(code *)PTR_strlen_00146390)(param_2);" (assignment_expression "iVar2 = (*(code *)PTR_strlen_00146390)(param_2)" identifier = (call_expression "(*(code *)PTR_strlen_00146390)(param_2)" (parenthesized_expression "(*(code *)PTR_strlen_00146390)" ( (pointer_expression "*(code *)PTR_strlen_00146390" * (cast_expression "(code *)PTR_strlen_00146390" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2)" ( identifier )))) ;)) (if_statement "if ((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')) {\n    iVar2 = iVar2 + 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    iVar2 = iVar2 + 2;\n  }" { (expression_statement "iVar2 = iVar2 + 2;" (assignment_expression "iVar2 = iVar2 + 2" identifier = (binary_expression "iVar2 + 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 *)(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2);" (assignment_expression "pcVar3 = (char *)(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2)" identifier = (cast_expression "(char *)(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2)" (parenthesized_expression "(*(code *)PTR_xmalloc_001445b0)" ( (pointer_expression "*(code *)PTR_xmalloc_001445b0" * (cast_expression "(code *)PTR_xmalloc_001445b0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar10 + iVar2)" ( (binary_expression "iVar10 + iVar2" identifier + identifier) ))))) ;) (expression_statement "cVar8 = *pcVar1;" (assignment_expression "cVar8 = *pcVar1" identifier = (pointer_expression "*pcVar1" * identifier)) ;) (expression_statement "pcVar5 = pcVar3;" (assignment_expression "pcVar5 = pcVar3" identifier = identifier) ;) (expression_statement "pcVar7 = pcVar1;" (assignment_expression "pcVar7 = pcVar1" identifier = identifier) ;) (if_statement "if (cVar8 != '\0') {\n    do {\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    } while (cVar8 != '\0');\n    if ((pcVar1 < pcVar7) && (*pcVar6 != '/')) {\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }\n  }" if (parenthesized_expression "(cVar8 != '\0')" ( (binary_expression "cVar8 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    do {\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    } while (cVar8 != '\0');\n    if ((pcVar1 < pcVar7) && (*pcVar6 != '/')) {\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }\n  }" { (do_statement "do {\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    } while (cVar8 != '\0');" do (compound_statement "{\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    }" { (expression_statement "pcVar9 = pcVar5;" (assignment_expression "pcVar9 = pcVar5" identifier = identifier) ;) (expression_statement "pcVar6 = pcVar7;" (assignment_expression "pcVar6 = pcVar7" identifier = identifier) ;) (expression_statement "pcVar5 = pcVar9 + 1;" (assignment_expression "pcVar5 = pcVar9 + 1" identifier = (binary_expression "pcVar9 + 1" identifier + number_literal)) ;) (expression_statement "*pcVar9 = cVar8;" (assignment_expression "*pcVar9 = cVar8" (pointer_expression "*pcVar9" * identifier) = identifier) ;) (expression_statement "pcVar7 = pcVar6 + 1;" (assignment_expression "pcVar7 = pcVar6 + 1" identifier = (binary_expression "pcVar6 + 1" identifier + number_literal)) ;) (expression_statement "cVar8 = *pcVar7;" (assignment_expression "cVar8 = *pcVar7" identifier = (pointer_expression "*pcVar7" * identifier)) ;) }) while (parenthesized_expression "(cVar8 != '\0')" ( (binary_expression "cVar8 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) ;) (if_statement "if ((pcVar1 < pcVar7) && (*pcVar6 != '/')) {\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }" if (parenthesized_expression "((pcVar1 < pcVar7) && (*pcVar6 != '/'))" ( (binary_expression "(pcVar1 < pcVar7) && (*pcVar6 != '/')" (parenthesized_expression "(pcVar1 < pcVar7)" ( (binary_expression "pcVar1 < pcVar7" identifier < identifier) )) && (parenthesized_expression "(*pcVar6 != '/')" ( (binary_expression "*pcVar6 != '/'" (pointer_expression "*pcVar6" * identifier) != (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }" { (expression_statement "*pcVar5 = '/';" (assignment_expression "*pcVar5 = '/'" (pointer_expression "*pcVar5" * identifier) = (char_literal "'/'" ' character ')) ;) (expression_statement "pcVar5 = pcVar9 + 2;" (assignment_expression "pcVar5 = pcVar9 + 2" identifier = (binary_expression "pcVar9 + 2" identifier + number_literal)) ;) })) })) (do_statement "do {\n    cVar8 = *param_2;\n    *pcVar5 = cVar8;\n    pcVar5 = pcVar5 + 1;\n    param_2 = param_2 + 1;\n  } while (cVar8 != '\0');" do (compound_statement "{\n    cVar8 = *param_2;\n    *pcVar5 = cVar8;\n    pcVar5 = pcVar5 + 1;\n    param_2 = param_2 + 1;\n  }" { (expression_statement "cVar8 = *param_2;" (assignment_expression "cVar8 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "*pcVar5 = cVar8;" (assignment_expression "*pcVar5 = cVar8" (pointer_expression "*pcVar5" * identifier) = identifier) ;) (expression_statement "pcVar5 = pcVar5 + 1;" (assignment_expression "pcVar5 = pcVar5 + 1" identifier = (binary_expression "pcVar5 + 1" identifier + number_literal)) ;) (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" identifier = (binary_expression "param_2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(cVar8 != '\0')" ( (binary_expression "cVar8 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) ;) (if_statement "if ((pcVar1 != param_1) && (pcVar1 != PTR_DAT_001445ac + -0x6800)) {\n    (*(code *)PTR_free_001464fc)(pcVar1);\n  }" if (parenthesized_expression "((pcVar1 != param_1) && (pcVar1 != PTR_DAT_001445ac + -0x6800))" ( (binary_expression "(pcVar1 != param_1) && (pcVar1 != PTR_DAT_001445ac + -0x6800)" (parenthesized_expression "(pcVar1 != param_1)" ( (binary_expression "pcVar1 != param_1" identifier != identifier) )) && (parenthesized_expression "(pcVar1 != PTR_DAT_001445ac + -0x6800)" ( (binary_expression "pcVar1 != PTR_DAT_001445ac + -0x6800" identifier != (binary_expression "PTR_DAT_001445ac + -0x6800" identifier + number_literal)) ))) )) (compound_statement "{\n    (*(code *)PTR_free_001464fc)(pcVar1);\n  }" { (expression_statement "(*(code *)PTR_free_001464fc)(pcVar1);" (call_expression "(*(code *)PTR_free_001464fc)(pcVar1)" (parenthesized_expression "(*(code *)PTR_free_001464fc)" ( (pointer_expression "*(code *)PTR_free_001464fc" * (cast_expression "(code *)PTR_free_001464fc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar1)" ( 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 (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (labeled_statement 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 (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (char_literal ' escape_sequence ')) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (char_literal ' character ')) ;) (goto_statement goto statement_identifier ;) }))) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT ))))) ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = IDENT) ;) (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 { (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 (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , LIT ))))) ;) })) }) (else_clause else (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 = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (goto_statement goto statement_identifier ;) })))) }))) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) 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 (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) 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 (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (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)) ;) })) })) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (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 (parenthesized_expression ( (binary_expression IDENT != IDENT) )) && (parenthesized_expression ( (binary_expression IDENT != (binary_expression IDENT + LIT)) ))) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) })) (return_statement return IDENT ;) })))
(function_definition "char * sh_makepath(char *param_1,char *param_2,uint param_3)\n\n{\n  char *pcVar1;\n  int iVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  char *pcVar5;\n  char *pcVar6;\n  char *pcVar7;\n  char cVar8;\n  char *pcVar9;\n  int iVar10;\n  \n  if (param_1 == (char *)0x0) {\nLAB_000d8208:\n    if ((param_3 & 2) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }\n    pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c);\n    if (pcVar1 == (char *)0x0) {\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }\n  }\n  else {\n    cVar8 = *param_1;\n    if (cVar8 == '\0') goto LAB_000d8208;\n    pcVar1 = param_1;\n    if (((param_3 & 8) == 0) || (cVar8 != '.')) {\n      if (((param_3 & 1) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }\n    }\n    else if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }\n  }\n  iVar10 = (*(code *)PTR_strlen_00146390)(pcVar1);\nLAB_000d8238:\n  iVar2 = (*(code *)PTR_strlen_00146390)(param_2);\n  if ((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')) {\n    iVar2 = iVar2 + 2;\n  }\n  else {\n    param_2 = param_2 + 2;\n  }\n  pcVar3 = (char *)(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2);\n  cVar8 = *pcVar1;\n  pcVar5 = pcVar3;\n  pcVar7 = pcVar1;\n  if (cVar8 != '\0') {\n    do {\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    } while (cVar8 != '\0');\n    if ((pcVar1 < pcVar7) && (*pcVar6 != '/')) {\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }\n  }\n  do {\n    cVar8 = *param_2;\n    *pcVar5 = cVar8;\n    pcVar5 = pcVar5 + 1;\n    param_2 = param_2 + 1;\n  } while (cVar8 != '\0');\n  if ((pcVar1 != param_1) && (pcVar1 != PTR_DAT_001445ac + -0x6800)) {\n    (*(code *)PTR_free_001464fc)(pcVar1);\n  }\n  return pcVar3;\n}" (primitive_type "char") (pointer_declarator "* sh_makepath(char *param_1,char *param_2,uint param_3)" (* "*") (function_declarator "sh_makepath(char *param_1,char *param_2,uint param_3)" (identifier "sh_makepath") (parameter_list "(char *param_1,char *param_2,uint 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 "uint param_3" (type_identifier "uint") (identifier "param_3")) () ")")))) (compound_statement "{\n  char *pcVar1;\n  int iVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  char *pcVar5;\n  char *pcVar6;\n  char *pcVar7;\n  char cVar8;\n  char *pcVar9;\n  int iVar10;\n  \n  if (param_1 == (char *)0x0) {\nLAB_000d8208:\n    if ((param_3 & 2) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }\n    pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c);\n    if (pcVar1 == (char *)0x0) {\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }\n  }\n  else {\n    cVar8 = *param_1;\n    if (cVar8 == '\0') goto LAB_000d8208;\n    pcVar1 = param_1;\n    if (((param_3 & 8) == 0) || (cVar8 != '.')) {\n      if (((param_3 & 1) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }\n    }\n    else if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }\n  }\n  iVar10 = (*(code *)PTR_strlen_00146390)(pcVar1);\nLAB_000d8238:\n  iVar2 = (*(code *)PTR_strlen_00146390)(param_2);\n  if ((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')) {\n    iVar2 = iVar2 + 2;\n  }\n  else {\n    param_2 = param_2 + 2;\n  }\n  pcVar3 = (char *)(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2);\n  cVar8 = *pcVar1;\n  pcVar5 = pcVar3;\n  pcVar7 = pcVar1;\n  if (cVar8 != '\0') {\n    do {\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    } while (cVar8 != '\0');\n    if ((pcVar1 < pcVar7) && (*pcVar6 != '/')) {\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }\n  }\n  do {\n    cVar8 = *param_2;\n    *pcVar5 = cVar8;\n    pcVar5 = pcVar5 + 1;\n    param_2 = param_2 + 1;\n  } while (cVar8 != '\0');\n  if ((pcVar1 != param_1) && (pcVar1 != PTR_DAT_001445ac + -0x6800)) {\n    (*(code *)PTR_free_001464fc)(pcVar1);\n  }\n  return pcVar3;\n}" ({ "{") (declaration "char *pcVar1;" (primitive_type "char") (pointer_declarator "*pcVar1" (* "*") (identifier "pcVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "char *pcVar3;" (primitive_type "char") (pointer_declarator "*pcVar3" (* "*") (identifier "pcVar3")) (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (declaration "char *pcVar5;" (primitive_type "char") (pointer_declarator "*pcVar5" (* "*") (identifier "pcVar5")) (; ";")) (declaration "char *pcVar6;" (primitive_type "char") (pointer_declarator "*pcVar6" (* "*") (identifier "pcVar6")) (; ";")) (declaration "char *pcVar7;" (primitive_type "char") (pointer_declarator "*pcVar7" (* "*") (identifier "pcVar7")) (; ";")) (declaration "char cVar8;" (primitive_type "char") (identifier "cVar8") (; ";")) (declaration "char *pcVar9;" (primitive_type "char") (pointer_declarator "*pcVar9" (* "*") (identifier "pcVar9")) (; ";")) (declaration "int iVar10;" (primitive_type "int") (identifier "iVar10") (; ";")) (if_statement "if (param_1 == (char *)0x0) {\nLAB_000d8208:\n    if ((param_3 & 2) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }\n    pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c);\n    if (pcVar1 == (char *)0x0) {\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }\n  }\n  else {\n    cVar8 = *param_1;\n    if (cVar8 == '\0') goto LAB_000d8208;\n    pcVar1 = param_1;\n    if (((param_3 & 8) == 0) || (cVar8 != '.')) {\n      if (((param_3 & 1) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }\n    }\n    else if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }\n  }" (if "if") (parenthesized_expression "(param_1 == (char *)0x0)" (( "(") (binary_expression "param_1 == (char *)0x0" (identifier "param_1") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\nLAB_000d8208:\n    if ((param_3 & 2) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }\n    pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c);\n    if (pcVar1 == (char *)0x0) {\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }\n  }" ({ "{") (labeled_statement "LAB_000d8208:\n    if ((param_3 & 2) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }" (statement_identifier "LAB_000d8208") (: ":") (if_statement "if ((param_3 & 2) == 0) {\nLAB_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\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_000d8214:\n      iVar10 = 1;\n      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);\n      pcVar1[1] = '\0';\n      *pcVar1 = '.';\n      goto LAB_000d8238;\n    }" ({ "{") (labeled_statement "LAB_000d8214:\n      iVar10 = 1;" (statement_identifier "LAB_000d8214") (: ":") (expression_statement "iVar10 = 1;" (assignment_expression "iVar10 = 1" (identifier "iVar10") (= "=") (number_literal "1")) (; ";"))) (expression_statement "pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);" (assignment_expression "pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2)" (identifier "pcVar1") (= "=") (cast_expression "(char *)(*(code *)PTR_xmalloc_001445b0)(2)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR_xmalloc_001445b0)(2)" (parenthesized_expression "(*(code *)PTR_xmalloc_001445b0)" (( "(") (pointer_expression "*(code *)PTR_xmalloc_001445b0" (* "*") (cast_expression "(code *)PTR_xmalloc_001445b0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_xmalloc_001445b0"))) () ")")) (argument_list "(2)" (( "(") (number_literal "2") () ")"))))) (; ";")) (expression_statement "pcVar1[1] = '\0';" (assignment_expression "pcVar1[1] = '\0'" (subscript_expression "pcVar1[1]" (identifier "pcVar1") ([ "[") (number_literal "1") (] "]")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (expression_statement "*pcVar1 = '.';" (assignment_expression "*pcVar1 = '.'" (pointer_expression "*pcVar1" (* "*") (identifier "pcVar1")) (= "=") (char_literal "'.'" (' "'") (character ".") (' "'"))) (; ";")) (goto_statement "goto LAB_000d8238;" (goto "goto") (statement_identifier "LAB_000d8238") (; ";")) (} "}")))) (expression_statement "pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c);" (assignment_expression "pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c)" (identifier "pcVar1") (= "=") (cast_expression "(char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c)" (parenthesized_expression "(*(code *)PTR_get_working_directory_00144828)" (( "(") (pointer_expression "*(code *)PTR_get_working_directory_00144828" (* "*") (cast_expression "(code *)PTR_get_working_directory_00144828" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_get_working_directory_00144828"))) () ")")) (argument_list "(PTR_DAT_001445ac + -0x3b9c)" (( "(") (binary_expression "PTR_DAT_001445ac + -0x3b9c" (identifier "PTR_DAT_001445ac") (+ "+") (number_literal "-0x3b9c")) () ")"))))) (; ";")) (if_statement "if (pcVar1 == (char *)0x0) {\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }" (if "if") (parenthesized_expression "(pcVar1 == (char *)0x0)" (( "(") (binary_expression "pcVar1 == (char *)0x0" (identifier "pcVar1") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);\n      if (iVar10 == 0) goto LAB_000d8214;\n      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);\n      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);\n      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);\n    }" ({ "{") (expression_statement "iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);" (assignment_expression "iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc)" (identifier "iVar10") (= "=") (call_expression "(*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc)" (parenthesized_expression "(*(code *)PTR_get_string_value_00144790)" (( "(") (pointer_expression "*(code *)PTR_get_string_value_00144790" (* "*") (cast_expression "(code *)PTR_get_string_value_00144790" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_get_string_value_00144790"))) () ")")) (argument_list "(PTR_LAB_00144578 + 0x46fc)" (( "(") (binary_expression "PTR_LAB_00144578 + 0x46fc" (identifier "PTR_LAB_00144578") (+ "+") (number_literal "0x46fc")) () ")")))) (; ";")) (if_statement "if (iVar10 == 0) goto LAB_000d8214;" (if "if") (parenthesized_expression "(iVar10 == 0)" (( "(") (binary_expression "iVar10 == 0" (identifier "iVar10") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_000d8214;" (goto "goto") (statement_identifier "LAB_000d8214") (; ";"))) (expression_statement "iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);" (assignment_expression "iVar2 = (*(code *)PTR_strlen_00146390)(iVar10)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_strlen_00146390)(iVar10)" (parenthesized_expression "(*(code *)PTR_strlen_00146390)" (( "(") (pointer_expression "*(code *)PTR_strlen_00146390" (* "*") (cast_expression "(code *)PTR_strlen_00146390" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strlen_00146390"))) () ")")) (argument_list "(iVar10)" (( "(") (identifier "iVar10") () ")")))) (; ";")) (expression_statement "uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);" (assignment_expression "uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1)" (identifier "uVar4") (= "=") (call_expression "(*(code *)PTR_xmalloc_001445b0)(iVar2 + 1)" (parenthesized_expression "(*(code *)PTR_xmalloc_001445b0)" (( "(") (pointer_expression "*(code *)PTR_xmalloc_001445b0" (* "*") (cast_expression "(code *)PTR_xmalloc_001445b0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_xmalloc_001445b0"))) () ")")) (argument_list "(iVar2 + 1)" (( "(") (binary_expression "iVar2 + 1" (identifier "iVar2") (+ "+") (number_literal "1")) () ")")))) (; ";")) (expression_statement "pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);" (assignment_expression "pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10)" (identifier "pcVar1") (= "=") (cast_expression "(char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR_strcpy_00146418)(uVar4,iVar10)" (parenthesized_expression "(*(code *)PTR_strcpy_00146418)" (( "(") (pointer_expression "*(code *)PTR_strcpy_00146418" (* "*") (cast_expression "(code *)PTR_strcpy_00146418" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strcpy_00146418"))) () ")")) (argument_list "(uVar4,iVar10)" (( "(") (identifier "uVar4") (, ",") (identifier "iVar10") () ")"))))) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    cVar8 = *param_1;\n    if (cVar8 == '\0') goto LAB_000d8208;\n    pcVar1 = param_1;\n    if (((param_3 & 8) == 0) || (cVar8 != '.')) {\n      if (((param_3 & 1) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }\n    }\n    else if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }\n  }" (else "else") (compound_statement "{\n    cVar8 = *param_1;\n    if (cVar8 == '\0') goto LAB_000d8208;\n    pcVar1 = param_1;\n    if (((param_3 & 8) == 0) || (cVar8 != '.')) {\n      if (((param_3 & 1) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }\n    }\n    else if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }\n  }" ({ "{") (expression_statement "cVar8 = *param_1;" (assignment_expression "cVar8 = *param_1" (identifier "cVar8") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (if_statement "if (cVar8 == '\0') goto LAB_000d8208;" (if "if") (parenthesized_expression "(cVar8 == '\0')" (( "(") (binary_expression "cVar8 == '\0'" (identifier "cVar8") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (goto_statement "goto LAB_000d8208;" (goto "goto") (statement_identifier "LAB_000d8208") (; ";"))) (expression_statement "pcVar1 = param_1;" (assignment_expression "pcVar1 = param_1" (identifier "pcVar1") (= "=") (identifier "param_1")) (; ";")) (if_statement "if (((param_3 & 8) == 0) || (cVar8 != '.')) {\n      if (((param_3 & 1) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }\n    }\n    else if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }" (if "if") (parenthesized_expression "(((param_3 & 8) == 0) || (cVar8 != '.'))" (( "(") (binary_expression "((param_3 & 8) == 0) || (cVar8 != '.')" (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 "(cVar8 != '.')" (( "(") (binary_expression "cVar8 != '.'" (identifier "cVar8") (!= "!=") (char_literal "'.'" (' "'") (character ".") (' "'"))) () ")"))) () ")")) (compound_statement "{\n      if (((param_3 & 1) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }\n    }" ({ "{") (if_statement "if (((param_3 & 1) != 0) && (cVar8 == '~')) {\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }" (if "if") (parenthesized_expression "(((param_3 & 1) != 0) && (cVar8 == '~'))" (( "(") (binary_expression "((param_3 & 1) != 0) && (cVar8 == '~')" (parenthesized_expression "((param_3 & 1) != 0)" (( "(") (binary_expression "(param_3 & 1) != 0" (parenthesized_expression "(param_3 & 1)" (( "(") (binary_expression "param_3 & 1" (identifier "param_3") (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(cVar8 == '~')" (( "(") (binary_expression "cVar8 == '~'" (identifier "cVar8") (== "==") (char_literal "'~'" (' "'") (character "~") (' "'"))) () ")"))) () ")")) (compound_statement "{\n        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);\n      }" ({ "{") (expression_statement "pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);" (assignment_expression "pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0)" (identifier "pcVar1") (= "=") (cast_expression "(char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0)" (parenthesized_expression "(*(code *)PTR_bash_tilde_expand_00144aec)" (( "(") (pointer_expression "*(code *)PTR_bash_tilde_expand_00144aec" (* "*") (cast_expression "(code *)PTR_bash_tilde_expand_00144aec" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_bash_tilde_expand_00144aec"))) () ")")) (argument_list "(param_1,0)" (( "(") (identifier "param_1") (, ",") (number_literal "0") () ")"))))) (; ";")) (} "}"))) (} "}")) (else_clause "else if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }" (else "else") (if_statement "if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {\n      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\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      iVar10 = 0;\n      pcVar1 = PTR_DAT_001445ac + -0x6800;\n      goto LAB_000d8238;\n    }" ({ "{") (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" (identifier "iVar10") (= "=") (number_literal "0")) (; ";")) (expression_statement "pcVar1 = PTR_DAT_001445ac + -0x6800;" (assignment_expression "pcVar1 = PTR_DAT_001445ac + -0x6800" (identifier "pcVar1") (= "=") (binary_expression "PTR_DAT_001445ac + -0x6800" (identifier "PTR_DAT_001445ac") (+ "+") (number_literal "-0x6800"))) (; ";")) (goto_statement "goto LAB_000d8238;" (goto "goto") (statement_identifier "LAB_000d8238") (; ";")) (} "}"))))) (} "}")))) (expression_statement "iVar10 = (*(code *)PTR_strlen_00146390)(pcVar1);" (assignment_expression "iVar10 = (*(code *)PTR_strlen_00146390)(pcVar1)" (identifier "iVar10") (= "=") (call_expression "(*(code *)PTR_strlen_00146390)(pcVar1)" (parenthesized_expression "(*(code *)PTR_strlen_00146390)" (( "(") (pointer_expression "*(code *)PTR_strlen_00146390" (* "*") (cast_expression "(code *)PTR_strlen_00146390" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strlen_00146390"))) () ")")) (argument_list "(pcVar1)" (( "(") (identifier "pcVar1") () ")")))) (; ";")) (labeled_statement "LAB_000d8238:\n  iVar2 = (*(code *)PTR_strlen_00146390)(param_2);" (statement_identifier "LAB_000d8238") (: ":") (expression_statement "iVar2 = (*(code *)PTR_strlen_00146390)(param_2);" (assignment_expression "iVar2 = (*(code *)PTR_strlen_00146390)(param_2)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_strlen_00146390)(param_2)" (parenthesized_expression "(*(code *)PTR_strlen_00146390)" (( "(") (pointer_expression "*(code *)PTR_strlen_00146390" (* "*") (cast_expression "(code *)PTR_strlen_00146390" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strlen_00146390"))) () ")")) (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";"))) (if_statement "if ((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')) {\n    iVar2 = iVar2 + 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    iVar2 = iVar2 + 2;\n  }" ({ "{") (expression_statement "iVar2 = iVar2 + 2;" (assignment_expression "iVar2 = iVar2 + 2" (identifier "iVar2") (= "=") (binary_expression "iVar2 + 2" (identifier "iVar2") (+ "+") (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 *)(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2);" (assignment_expression "pcVar3 = (char *)(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2)" (identifier "pcVar3") (= "=") (cast_expression "(char *)(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2)" (parenthesized_expression "(*(code *)PTR_xmalloc_001445b0)" (( "(") (pointer_expression "*(code *)PTR_xmalloc_001445b0" (* "*") (cast_expression "(code *)PTR_xmalloc_001445b0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_xmalloc_001445b0"))) () ")")) (argument_list "(iVar10 + iVar2)" (( "(") (binary_expression "iVar10 + iVar2" (identifier "iVar10") (+ "+") (identifier "iVar2")) () ")"))))) (; ";")) (expression_statement "cVar8 = *pcVar1;" (assignment_expression "cVar8 = *pcVar1" (identifier "cVar8") (= "=") (pointer_expression "*pcVar1" (* "*") (identifier "pcVar1"))) (; ";")) (expression_statement "pcVar5 = pcVar3;" (assignment_expression "pcVar5 = pcVar3" (identifier "pcVar5") (= "=") (identifier "pcVar3")) (; ";")) (expression_statement "pcVar7 = pcVar1;" (assignment_expression "pcVar7 = pcVar1" (identifier "pcVar7") (= "=") (identifier "pcVar1")) (; ";")) (if_statement "if (cVar8 != '\0') {\n    do {\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    } while (cVar8 != '\0');\n    if ((pcVar1 < pcVar7) && (*pcVar6 != '/')) {\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }\n  }" (if "if") (parenthesized_expression "(cVar8 != '\0')" (( "(") (binary_expression "cVar8 != '\0'" (identifier "cVar8") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    do {\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    } while (cVar8 != '\0');\n    if ((pcVar1 < pcVar7) && (*pcVar6 != '/')) {\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }\n  }" ({ "{") (do_statement "do {\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    } while (cVar8 != '\0');" (do "do") (compound_statement "{\n      pcVar9 = pcVar5;\n      pcVar6 = pcVar7;\n      pcVar5 = pcVar9 + 1;\n      *pcVar9 = cVar8;\n      pcVar7 = pcVar6 + 1;\n      cVar8 = *pcVar7;\n    }" ({ "{") (expression_statement "pcVar9 = pcVar5;" (assignment_expression "pcVar9 = pcVar5" (identifier "pcVar9") (= "=") (identifier "pcVar5")) (; ";")) (expression_statement "pcVar6 = pcVar7;" (assignment_expression "pcVar6 = pcVar7" (identifier "pcVar6") (= "=") (identifier "pcVar7")) (; ";")) (expression_statement "pcVar5 = pcVar9 + 1;" (assignment_expression "pcVar5 = pcVar9 + 1" (identifier "pcVar5") (= "=") (binary_expression "pcVar9 + 1" (identifier "pcVar9") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*pcVar9 = cVar8;" (assignment_expression "*pcVar9 = cVar8" (pointer_expression "*pcVar9" (* "*") (identifier "pcVar9")) (= "=") (identifier "cVar8")) (; ";")) (expression_statement "pcVar7 = pcVar6 + 1;" (assignment_expression "pcVar7 = pcVar6 + 1" (identifier "pcVar7") (= "=") (binary_expression "pcVar6 + 1" (identifier "pcVar6") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "cVar8 = *pcVar7;" (assignment_expression "cVar8 = *pcVar7" (identifier "cVar8") (= "=") (pointer_expression "*pcVar7" (* "*") (identifier "pcVar7"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(cVar8 != '\0')" (( "(") (binary_expression "cVar8 != '\0'" (identifier "cVar8") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (; ";")) (if_statement "if ((pcVar1 < pcVar7) && (*pcVar6 != '/')) {\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }" (if "if") (parenthesized_expression "((pcVar1 < pcVar7) && (*pcVar6 != '/'))" (( "(") (binary_expression "(pcVar1 < pcVar7) && (*pcVar6 != '/')" (parenthesized_expression "(pcVar1 < pcVar7)" (( "(") (binary_expression "pcVar1 < pcVar7" (identifier "pcVar1") (< "<") (identifier "pcVar7")) () ")")) (&& "&&") (parenthesized_expression "(*pcVar6 != '/')" (( "(") (binary_expression "*pcVar6 != '/'" (pointer_expression "*pcVar6" (* "*") (identifier "pcVar6")) (!= "!=") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")"))) () ")")) (compound_statement "{\n      *pcVar5 = '/';\n      pcVar5 = pcVar9 + 2;\n    }" ({ "{") (expression_statement "*pcVar5 = '/';" (assignment_expression "*pcVar5 = '/'" (pointer_expression "*pcVar5" (* "*") (identifier "pcVar5")) (= "=") (char_literal "'/'" (' "'") (character "/") (' "'"))) (; ";")) (expression_statement "pcVar5 = pcVar9 + 2;" (assignment_expression "pcVar5 = pcVar9 + 2" (identifier "pcVar5") (= "=") (binary_expression "pcVar9 + 2" (identifier "pcVar9") (+ "+") (number_literal "2"))) (; ";")) (} "}"))) (} "}"))) (do_statement "do {\n    cVar8 = *param_2;\n    *pcVar5 = cVar8;\n    pcVar5 = pcVar5 + 1;\n    param_2 = param_2 + 1;\n  } while (cVar8 != '\0');" (do "do") (compound_statement "{\n    cVar8 = *param_2;\n    *pcVar5 = cVar8;\n    pcVar5 = pcVar5 + 1;\n    param_2 = param_2 + 1;\n  }" ({ "{") (expression_statement "cVar8 = *param_2;" (assignment_expression "cVar8 = *param_2" (identifier "cVar8") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (expression_statement "*pcVar5 = cVar8;" (assignment_expression "*pcVar5 = cVar8" (pointer_expression "*pcVar5" (* "*") (identifier "pcVar5")) (= "=") (identifier "cVar8")) (; ";")) (expression_statement "pcVar5 = pcVar5 + 1;" (assignment_expression "pcVar5 = pcVar5 + 1" (identifier "pcVar5") (= "=") (binary_expression "pcVar5 + 1" (identifier "pcVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" (identifier "param_2") (= "=") (binary_expression "param_2 + 1" (identifier "param_2") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(cVar8 != '\0')" (( "(") (binary_expression "cVar8 != '\0'" (identifier "cVar8") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (; ";")) (if_statement "if ((pcVar1 != param_1) && (pcVar1 != PTR_DAT_001445ac + -0x6800)) {\n    (*(code *)PTR_free_001464fc)(pcVar1);\n  }" (if "if") (parenthesized_expression "((pcVar1 != param_1) && (pcVar1 != PTR_DAT_001445ac + -0x6800))" (( "(") (binary_expression "(pcVar1 != param_1) && (pcVar1 != PTR_DAT_001445ac + -0x6800)" (parenthesized_expression "(pcVar1 != param_1)" (( "(") (binary_expression "pcVar1 != param_1" (identifier "pcVar1") (!= "!=") (identifier "param_1")) () ")")) (&& "&&") (parenthesized_expression "(pcVar1 != PTR_DAT_001445ac + -0x6800)" (( "(") (binary_expression "pcVar1 != PTR_DAT_001445ac + -0x6800" (identifier "pcVar1") (!= "!=") (binary_expression "PTR_DAT_001445ac + -0x6800" (identifier "PTR_DAT_001445ac") (+ "+") (number_literal "-0x6800"))) () ")"))) () ")")) (compound_statement "{\n    (*(code *)PTR_free_001464fc)(pcVar1);\n  }" ({ "{") (expression_statement "(*(code *)PTR_free_001464fc)(pcVar1);" (call_expression "(*(code *)PTR_free_001464fc)(pcVar1)" (parenthesized_expression "(*(code *)PTR_free_001464fc)" (( "(") (pointer_expression "*(code *)PTR_free_001464fc" (* "*") (cast_expression "(code *)PTR_free_001464fc" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_free_001464fc"))) () ")")) (argument_list "(pcVar1)" (( "(") (identifier "pcVar1") () ")"))) (; ";")) (} "}"))) (return_statement "return pcVar3;" (return "return") (identifier "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: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) 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: (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)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (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: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (number_literal)))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (char_literal (escape_sequence)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (char_literal (character)))) (goto_statement label: (statement_identifier))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))))) (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: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (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: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (identifier))))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (goto_statement label: (statement_identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (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 (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) declarator: (abstract_pointer_declarator)) value: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (number_literal))))))))) alternative: (else_clause (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: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (goto_statement label: (statement_identifier))))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier))))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (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: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (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: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (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)))))))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (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))))) 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: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier)))))) (return_statement (identifier)))))

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

{
  char *pcVar1;
  int iVar2;
  char *pcVar3;
  undefined4 uVar4;
  char *pcVar5;
  char *pcVar6;
  char *pcVar7;
  char cVar8;
  char *pcVar9;
  int iVar10;
  
  if (param_1 == (char *)0x0) {
LAB_000d8208:
    if ((param_3 & 2) == 0) {
LAB_000d8214:
      iVar10 = 1;
      pcVar1 = (char *)(*(code *)PTR_xmalloc_001445b0)(2);
      pcVar1[1] = '\0';
      *pcVar1 = '.';
      goto LAB_000d8238;
    }
    pcVar1 = (char *)(*(code *)PTR_get_working_directory_00144828)(PTR_DAT_001445ac + -0x3b9c);
    if (pcVar1 == (char *)0x0) {
      iVar10 = (*(code *)PTR_get_string_value_00144790)(PTR_LAB_00144578 + 0x46fc);
      if (iVar10 == 0) goto LAB_000d8214;
      iVar2 = (*(code *)PTR_strlen_00146390)(iVar10);
      uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar2 + 1);
      pcVar1 = (char *)(*(code *)PTR_strcpy_00146418)(uVar4,iVar10);
    }
  }
  else {
    cVar8 = *param_1;
    if (cVar8 == '\0') goto LAB_000d8208;
    pcVar1 = param_1;
    if (((param_3 & 8) == 0) || (cVar8 != '.')) {
      if (((param_3 & 1) != 0) && (cVar8 == '~')) {
        pcVar1 = (char *)(*(code *)PTR_bash_tilde_expand_00144aec)(param_1,0);
      }
    }
    else if ((param_1[1] == '\0') || ((param_1[1] == '/' && (param_1[2] == '\0')))) {
      iVar10 = 0;
      pcVar1 = PTR_DAT_001445ac + -0x6800;
      goto LAB_000d8238;
    }
  }
  iVar10 = (*(code *)PTR_strlen_00146390)(pcVar1);
LAB_000d8238:
  iVar2 = (*(code *)PTR_strlen_00146390)(param_2);
  if ((((param_3 & 4) == 0) || (*param_2 != '.')) || (param_2[1] != '/')) {
    iVar2 = iVar2 + 2;
  }
  else {
    param_2 = param_2 + 2;
  }
  pcVar3 = (char *)(*(code *)PTR_xmalloc_001445b0)(iVar10 + iVar2);
  cVar8 = *pcVar1;
  pcVar5 = pcVar3;
  pcVar7 = pcVar1;
  if (cVar8 != '\0') {
    do {
      pcVar9 = pcVar5;
      pcVar6 = pcVar7;
      pcVar5 = pcVar9 + 1;
      *pcVar9 = cVar8;
      pcVar7 = pcVar6 + 1;
      cVar8 = *pcVar7;
    } while (cVar8 != '\0');
    if ((pcVar1 < pcVar7) && (*pcVar6 != '/')) {
      *pcVar5 = '/';
      pcVar5 = pcVar9 + 2;
    }
  }
  do {
    cVar8 = *param_2;
    *pcVar5 = cVar8;
    pcVar5 = pcVar5 + 1;
    param_2 = param_2 + 1;
  } while (cVar8 != '\0');
  if ((pcVar1 != param_1) && (pcVar1 != PTR_DAT_001445ac + -0x6800)) {
    (*(code *)PTR_free_001464fc)(pcVar1);
  }
  return pcVar3;
}

