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

int unixFullPathname(sqlite3_vfs *pVfs,char *zPath,int nOut,char *zOut)

{
  int iVar1;
  code *pcVar2;
  int iVar3;
  int iVar4;
  size_t sVar5;
  uint uVar6;
  char *pcVar7;
  int *piVar8;
  int in_GS_OFFSET;
  bool bVar9;
  char *local_a4;
  int local_9c;
  int local_98;
  stat buf;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  local_a4 = (char *)0x0;
  local_9c = 1;
LAB_00056320:
  do {
    iVar3 = (*aSyscall[0x1b].pCurrent)(zPath,&buf);
    if (iVar3 == 0) {
      iVar3 = 0;
      if ((buf.st_mode & 0xf000) != 0xa000) {
        iVar4 = iVar3;
        if (zPath != zOut) goto LAB_000564f3;
        goto LAB_0005647e;
      }
      if (local_a4 == (char *)0x0) {
        local_a4 = (char *)sqlite3_malloc(nOut);
        if (local_a4 == (char *)0x0) {
          iVar4 = 7;
          goto LAB_0005647e;
        }
      }
      else {
        local_9c = local_9c + 1;
        if ((100 < local_9c) && (iVar4 = sqlite3CantopenError(0x973d), iVar4 != 0))
        goto LAB_0005647e;
      }
      iVar4 = (*aSyscall[0x1a].pCurrent)(zPath,local_a4,nOut + -1);
      if (iVar4 < 0) {
        iVar3 = sqlite3CantopenError(0x9743);
        iVar3 = unixLogErrorAtLine(iVar3,"readlink",zPath,0x9743);
        bVar9 = iVar3 == 0;
      }
      else {
        bVar9 = true;
        local_98 = iVar4;
        if (*local_a4 != '/') {
          if (zPath == (char *)0x0) {
            uVar6 = 0;
          }
          else {
            sVar5 = strlen(zPath);
            for (uVar6 = sVar5 & 0x3fffffff; uVar6 != 0; uVar6 = uVar6 - 1) {
              if (zPath[uVar6 - 1] == '/') {
                local_98 = iVar4 + uVar6;
                break;
              }
            }
          }
          if (local_98 < nOut) {
            memmove(local_a4 + uVar6,local_a4,iVar4 + 1);
            memcpy(local_a4,zPath,uVar6);
            bVar9 = true;
          }
          else {
            iVar3 = sqlite3CantopenError(0x9749);
            bVar9 = iVar3 == 0;
            local_98 = iVar4;
          }
        }
        local_a4[local_98] = '\0';
      }
      if ((zOut != local_a4) && (bVar9)) {
        bVar9 = true;
        zPath = local_a4;
        goto LAB_000563d8;
      }
    }
    else {
      piVar8 = __errno_location();
      if (*piVar8 == 2) {
        bVar9 = true;
        iVar4 = 0;
      }
      else {
        iVar3 = sqlite3CantopenError(0x9732);
        iVar4 = unixLogErrorAtLine(iVar3,"lstat",zPath,0x9732);
        bVar9 = iVar4 == 0;
      }
      if ((zPath == zOut) || (!bVar9)) goto LAB_0005647e;
LAB_000564f3:
      if (zPath == (char *)0x0) {
                    /* WARNING: Does not return */
        pcVar2 = (code *)invalidInstructionException();
        (*pcVar2)();
      }
      bVar9 = false;
LAB_000563d8:
      sVar5 = strlen(zPath);
      uVar6 = sVar5 & 0x3fffffff;
      if (*zPath == '/') {
        iVar3 = 0;
        pcVar7 = zOut;
LAB_0005643d:
        if ((int)uVar6 < nOut) {
          sqlite3_snprintf(nOut - iVar3,pcVar7,"%s",zPath);
          zPath = zOut;
          if (!bVar9) {
            iVar4 = 0;
            goto LAB_0005647e;
          }
          goto LAB_00056320;
        }
        *pcVar7 = '\0';
        iVar3 = sqlite3CantopenError(0x9702);
      }
      else {
        iVar3 = (*aSyscall[3].pCurrent)(zOut,nOut + -2);
        if (iVar3 != 0) {
          if (zOut == (char *)0x0) {
            pcVar7 = (char *)0x0;
            iVar3 = 1;
          }
          else {
            sVar5 = strlen(zOut);
            iVar3 = (sVar5 & 0x3fffffff) + 1;
            pcVar7 = zOut + (sVar5 & 0x3fffffff);
          }
          *pcVar7 = '/';
          uVar6 = uVar6 + iVar3;
          pcVar7 = zOut + iVar3;
          goto LAB_0005643d;
        }
        iVar3 = sqlite3CantopenError(0x96f9);
        iVar3 = unixLogErrorAtLine(iVar3,"getcwd",zPath,0x96f9);
      }
      iVar4 = iVar3;
      if (!bVar9) goto LAB_0005647e;
    }
    iVar4 = iVar3;
    zPath = zOut;
    if (iVar3 != 0) {
LAB_0005647e:
      sqlite3_free(local_a4);
      if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
        return iVar4;
      }
                    /* WARNING: Subroutine does not return */
      __stack_chk_fail_local();
    }
  } while( true );
}



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

int FUN_000562c0(undefined4 param_1,char *param_2,int param_3,char *param_4)

{
  code *pcVar1;
  int iVar2;
  int iVar3;
  size_t sVar4;
  uint uVar5;
  char *pcVar6;
  int *piVar7;
  int in_GS_OFFSET;
  bool bVar8;
  char *local_a4;
  int local_9c;
  int local_98;
  undefined1 local_80 [16];
  uint local_70;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x562c9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  local_a4 = (char *)0x0;
  local_9c = 1;
LAB_00056320:
  do {
    iVar2 = (*(code *)PTR_FUN_0014c508)(param_2,local_80);
    if (iVar2 == 0) {
      iVar2 = 0;
      if ((local_70 & 0xf000) != 0xa000) {
        iVar3 = iVar2;
        if (param_2 != param_4) goto LAB_000564f3;
        goto LAB_0005647e;
      }
      if (local_a4 == (char *)0x0) {
        local_a4 = (char *)FUN_0003f8a0(param_3);
        if (local_a4 == (char *)0x0) {
          iVar3 = 7;
          goto LAB_0005647e;
        }
      }
      else {
        local_9c = local_9c + 1;
        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;
      }
      iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);
      if (iVar3 < 0) {
        FUN_00052b30();
        iVar2 = FUN_000556e0(0x9743);
        bVar8 = iVar2 == 0;
      }
      else {
        bVar8 = true;
        local_98 = iVar3;
        if (*local_a4 != '/') {
          if (param_2 == (char *)0x0) {
            uVar5 = 0;
          }
          else {
            sVar4 = strlen(param_2);
            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {
              if (param_2[uVar5 - 1] == '/') {
                local_98 = iVar3 + uVar5;
                break;
              }
            }
          }
          if (local_98 < param_3) {
            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);
            memcpy(local_a4,param_2,uVar5);
            bVar8 = true;
          }
          else {
            iVar2 = FUN_00052b30();
            bVar8 = iVar2 == 0;
            local_98 = iVar3;
          }
        }
        local_a4[local_98] = '\0';
      }
      if ((param_4 != local_a4) && (bVar8)) {
        bVar8 = true;
        param_2 = local_a4;
        goto LAB_000563d8;
      }
    }
    else {
      piVar7 = __errno_location();
      if (*piVar7 == 2) {
        bVar8 = true;
        iVar3 = 0;
      }
      else {
        FUN_00052b30();
        iVar3 = FUN_000556e0(0x9732);
        bVar8 = iVar3 == 0;
      }
      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;
LAB_000564f3:
      if (param_2 == (char *)0x0) {
                    /* WARNING: Does not return */
        pcVar1 = (code *)invalidInstructionException();
        (*pcVar1)();
      }
      bVar8 = false;
LAB_000563d8:
      sVar4 = strlen(param_2);
      uVar5 = sVar4 & 0x3fffffff;
      if (*param_2 == '/') {
        iVar2 = 0;
        pcVar6 = param_4;
LAB_0005643d:
        if ((int)uVar5 < param_3) {
          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);
          param_2 = param_4;
          if (!bVar8) {
            iVar3 = 0;
            goto LAB_0005647e;
          }
          goto LAB_00056320;
        }
        *pcVar6 = '\0';
        iVar2 = FUN_00052b30();
      }
      else {
        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);
        if (iVar2 != 0) {
          if (param_4 == (char *)0x0) {
            pcVar6 = (char *)0x0;
            iVar2 = 1;
          }
          else {
            sVar4 = strlen(param_4);
            iVar2 = (sVar4 & 0x3fffffff) + 1;
            pcVar6 = param_4 + (sVar4 & 0x3fffffff);
          }
          *pcVar6 = '/';
          uVar5 = uVar5 + iVar2;
          pcVar6 = param_4 + iVar2;
          goto LAB_0005643d;
        }
        FUN_00052b30();
        iVar2 = FUN_000556e0(0x96f9);
      }
      iVar3 = iVar2;
      if (!bVar8) goto LAB_0005647e;
    }
    iVar3 = iVar2;
    param_2 = param_4;
    if (iVar2 != 0) {
LAB_0005647e:
      FUN_000264d0(local_a4);
      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
        return iVar3;
      }
                    /* WARNING: Subroutine does not return */
      FUN_000f6410();
    }
  } while( true );
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00014d20
ADD EBX,0xf4c0b
SUB ESP,0x9c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x8c],EAX
XOR EAX,EAX
LEA EAX,[0x14ec]
MOV ESI,dword ptr [ESP + 0xb4]
MOV dword ptr [ESP + 0x8],0x0
MOV dword ptr [ESP + 0x4],EAX
LEA EAX,[ESP + 0x2c]
MOV EBP,dword ptr [ESP + 0xbc]
MOV dword ptr [ESP + 0xc],EAX
LEA EAX,[EBX + 0xfffade0f]
MOV dword ptr [ESP + 0x10],0x1
MOV dword ptr [ESP + 0x18],EAX
NOP
SUB ESP,0x8
PUSH dword ptr [ESP + 0x14]
PUSH ESI
MOV EAX,dword ptr [ESP + 0x14]
CALL dword ptr [EAX + EBX*0x1 + 0x148]
ADD ESP,0x10
MOV EDI,EAX
TEST EAX,EAX
JNZ 0x000564b8
MOV EAX,dword ptr [ESP + 0x3c]
AND EAX,0xf000
CMP EAX,0xa000
JNZ 0x00056478
MOV ECX,dword ptr [ESP + 0x8]
TEST ECX,ECX
JZ 0x00056580
ADD dword ptr [ESP + 0x10],0x1
MOV EAX,dword ptr [ESP + 0x10]
CMP EAX,0x64
JG 0x00056560
SUB ESP,0x4
MOV EAX,dword ptr [ESP + 0xbc]
SUB EAX,0x1
PUSH EAX
PUSH dword ptr [ESP + 0x10]
PUSH ESI
MOV EAX,dword ptr [ESP + 0x14]
CALL dword ptr [EAX + EBX*0x1 + 0x13c]
ADD ESP,0x10
MOV ECX,EAX
TEST EAX,EAX
JS 0x00056628
MOV EDX,dword ptr [ESP + 0x8]
MOV EAX,0x1
CMP byte ptr [EDX],0x2f
JNZ 0x000565b0
MOV EDX,dword ptr [ESP + 0x8]
MOV byte ptr [EDX + ECX*0x1],0x0
CMP EBP,dword ptr [ESP + 0x8]
JZ 0x0005652b
TEST AL,AL
JZ 0x0005652b
MOV dword ptr [ESP + 0x14],0x1
MOV ESI,dword ptr [ESP + 0x8]
LEA ESI,[ESI]
SUB ESP,0xc
PUSH ESI
CALL 0x00014230
ADD ESP,0x10
AND EAX,0x3fffffff
CMP byte ptr [ESI],0x2f
MOV EDI,EAX
JZ 0x00056550
SUB ESP,0x8
MOV EAX,dword ptr [ESP + 0xc0]
SUB EAX,0x2
PUSH EAX
PUSH EBP
MOV EAX,dword ptr [ESP + 0x14]
CALL dword ptr [EAX + EBX*0x1 + 0x28]
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000566d0
TEST EBP,EBP
JZ 0x00056660
SUB ESP,0xc
PUSH EBP
CALL 0x00014230
ADD ESP,0x10
AND EAX,0x3fffffff
LEA ECX,[EAX + 0x1]
ADD EAX,EBP
MOV EDX,ECX
MOV byte ptr [EAX],0x2f
ADD EDI,ECX
ADD EDX,EBP
CMP dword ptr [ESP + 0xb8],EDI
JLE 0x00056510
PUSH ESI
PUSH dword ptr [ESP + 0x1c]
PUSH EDX
MOV EAX,dword ptr [ESP + 0xc4]
SUB EAX,ECX
PUSH EAX
CALL 0x0004e1d0
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x14]
TEST EDX,EDX
JZ 0x000566c0
MOV ESI,EBP
JMP 0x00056320
CMP ESI,EBP
JNZ 0x000564f3
MOV EAX,EDI
MOV dword ptr [ESP + 0x4],EAX
SUB ESP,0xc
PUSH dword ptr [ESP + 0x14]
CALL 0x000264d0
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x4]
MOV ECX,dword ptr [ESP + 0x8c]
XOR ECX,dword ptr GS:[0x14]
JNZ 0x00056710
ADD ESP,0x9c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x000142b0
CMP dword ptr [EAX],0x2
JZ 0x00056540
MOV EAX,0x9732
CALL 0x00052b30
SUB ESP,0xc
MOV ECX,ESI
LEA EDX,[EBX + 0xfffadb4f]
PUSH 0x9732
CALL 0x000556e0
ADD ESP,0x10
TEST EAX,EAX
MOV EDI,EAX
SETZ AL
CMP ESI,EBP
JZ 0x0005647c
TEST AL,AL
JZ 0x0005647c
TEST ESI,ESI
JZ 0x0001442b
MOV dword ptr [ESP + 0x14],0x0
JMP 0x000563d8
MOV byte ptr [EDX],0x0
MOV EAX,0x9702
CALL 0x00052b30
MOV EDI,EAX
MOV EAX,dword ptr [ESP + 0x14]
TEST EAX,EAX
JZ 0x0005647c
TEST EDI,EDI
JNZ 0x0005647c
MOV ESI,EBP
JMP 0x00056320
MOV EAX,0x1
XOR EDI,EDI
JMP 0x000564eb
MOV EDX,EBP
XOR ECX,ECX
JMP 0x0005643d
MOV EAX,0x973d
CALL 0x00052b30
TEST EAX,EAX
JNZ 0x0005647e
JMP 0x00056372
SUB ESP,0xc
PUSH dword ptr [ESP + 0xc4]
CALL 0x0003f8a0
MOV dword ptr [ESP + 0x18],EAX
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00056372
MOV EAX,0x7
JMP 0x0005647e
MOV dword ptr [ESP + 0x14],ECX
TEST ESI,ESI
JZ 0x00056709
SUB ESP,0xc
PUSH ESI
CALL 0x00014230
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0x14]
AND EAX,0x3fffffff
MOV EDX,EAX
JNZ 0x000565e9
JMP 0x00056700
SUB EDX,0x1
JZ 0x00056700
CMP byte ptr [ESI + EDX*0x1 + -0x1],0x2f
JNZ 0x000565e0
LEA EAX,[ECX + EDX*0x1]
MOV dword ptr [ESP + 0x14],EAX
MOV EAX,dword ptr [ESP + 0x14]
CMP dword ptr [ESP + 0xb8],EAX
JG 0x00056678
MOV EAX,0x9749
MOV dword ptr [ESP + 0x14],ECX
CALL 0x00052b30
MOV ECX,dword ptr [ESP + 0x14]
TEST EAX,EAX
MOV EDI,EAX
SETZ AL
JMP 0x000563af
MOV EAX,0x9743
CALL 0x00052b30
SUB ESP,0xc
MOV ECX,ESI
LEA EDX,[EBX + 0xfffadb55]
PUSH 0x9743
CALL 0x000556e0
ADD ESP,0x10
TEST EAX,EAX
MOV EDI,EAX
SETZ AL
JMP 0x000563b7
XOR EAX,EAX
MOV EDX,0x1
MOV ECX,0x1
JMP 0x00056436
SUB ESP,0x4
ADD ECX,0x1
PUSH ECX
MOV EAX,dword ptr [ESP + 0x10]
PUSH EAX
MOV dword ptr [ESP + 0x14],EAX
ADD EAX,EDX
MOV dword ptr [ESP + 0x28],EDX
PUSH EAX
CALL 0x000140b0
ADD ESP,0xc
MOV EDX,dword ptr [ESP + 0x20]
PUSH EDX
PUSH ESI
PUSH dword ptr [ESP + 0x14]
CALL 0x000140d0
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0x14]
MOV EAX,0x1
JMP 0x000563af
XOR EDI,EDI
JMP 0x0005647c
MOV EAX,0x96f9
CALL 0x00052b30
SUB ESP,0xc
MOV ECX,ESI
LEA EDX,[EBX + 0xfffadb5e]
PUSH 0x96f9
CALL 0x000556e0
ADD ESP,0x10
MOV EDI,EAX
JMP 0x0005651f
MOV dword ptr [ESP + 0x14],ECX
JMP 0x000565f7
XOR EDX,EDX
JMP 0x000565f7
CALL 0x000f6410
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_000562c0(undefined4 param_1,char *param_2,int param_3,char *param_4)\n\n{\n  code *pcVar1;\n  int iVar2;\n  int iVar3;\n  size_t sVar4;\n  uint uVar5;\n  char *pcVar6;\n  int *piVar7;\n  int in_GS_OFFSET;\n  bool bVar8;\n  char *local_a4;\n  int local_9c;\n  int local_98;\n  undefined1 local_80 [16];\n  uint local_70;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x562c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_a4 = (char *)0x0;\n  local_9c = 1;\nLAB_00056320:\n  do {\n    iVar2 = (*(code *)PTR_FUN_0014c508)(param_2,local_80);\n    if (iVar2 == 0) {\n      iVar2 = 0;\n      if ((local_70 & 0xf000) != 0xa000) {\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }\n      iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);\n      if (iVar3 < 0) {\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }\n      else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((param_4 != local_a4) && (bVar8)) {\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar7 = __errno_location();\n      if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }\n      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;\nLAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    /* WARNING: Does not return */\n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }\n      bVar8 = false;\nLAB_000563d8:\n      sVar4 = strlen(param_2);\n      uVar5 = sVar4 & 0x3fffffff;\n      if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }\n      iVar3 = iVar2;\n      if (!bVar8) goto LAB_0005647e;\n    }\n    iVar3 = iVar2;\n    param_2 = param_4;\n    if (iVar2 != 0) {\nLAB_0005647e:\n      FUN_000264d0(local_a4);\n      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar3;\n      }\n                    /* WARNING: Subroutine does not return */\n      FUN_000f6410();\n    }\n  } while( true );\n}\n\n" comment (function_definition "int FUN_000562c0(undefined4 param_1,char *param_2,int param_3,char *param_4)\n\n{\n  code *pcVar1;\n  int iVar2;\n  int iVar3;\n  size_t sVar4;\n  uint uVar5;\n  char *pcVar6;\n  int *piVar7;\n  int in_GS_OFFSET;\n  bool bVar8;\n  char *local_a4;\n  int local_9c;\n  int local_98;\n  undefined1 local_80 [16];\n  uint local_70;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x562c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_a4 = (char *)0x0;\n  local_9c = 1;\nLAB_00056320:\n  do {\n    iVar2 = (*(code *)PTR_FUN_0014c508)(param_2,local_80);\n    if (iVar2 == 0) {\n      iVar2 = 0;\n      if ((local_70 & 0xf000) != 0xa000) {\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }\n      iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);\n      if (iVar3 < 0) {\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }\n      else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((param_4 != local_a4) && (bVar8)) {\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar7 = __errno_location();\n      if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }\n      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;\nLAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    /* WARNING: Does not return */\n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }\n      bVar8 = false;\nLAB_000563d8:\n      sVar4 = strlen(param_2);\n      uVar5 = sVar4 & 0x3fffffff;\n      if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }\n      iVar3 = iVar2;\n      if (!bVar8) goto LAB_0005647e;\n    }\n    iVar3 = iVar2;\n    param_2 = param_4;\n    if (iVar2 != 0) {\nLAB_0005647e:\n      FUN_000264d0(local_a4);\n      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar3;\n      }\n                    /* WARNING: Subroutine does not return */\n      FUN_000f6410();\n    }\n  } while( true );\n}" primitive_type (function_declarator "FUN_000562c0(undefined4 param_1,char *param_2,int param_3,char *param_4)" identifier (parameter_list "(undefined4 param_1,char *param_2,int param_3,char *param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "char *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  code *pcVar1;\n  int iVar2;\n  int iVar3;\n  size_t sVar4;\n  uint uVar5;\n  char *pcVar6;\n  int *piVar7;\n  int in_GS_OFFSET;\n  bool bVar8;\n  char *local_a4;\n  int local_9c;\n  int local_98;\n  undefined1 local_80 [16];\n  uint local_70;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x562c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_a4 = (char *)0x0;\n  local_9c = 1;\nLAB_00056320:\n  do {\n    iVar2 = (*(code *)PTR_FUN_0014c508)(param_2,local_80);\n    if (iVar2 == 0) {\n      iVar2 = 0;\n      if ((local_70 & 0xf000) != 0xa000) {\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }\n      iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);\n      if (iVar3 < 0) {\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }\n      else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((param_4 != local_a4) && (bVar8)) {\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar7 = __errno_location();\n      if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }\n      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;\nLAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    /* WARNING: Does not return */\n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }\n      bVar8 = false;\nLAB_000563d8:\n      sVar4 = strlen(param_2);\n      uVar5 = sVar4 & 0x3fffffff;\n      if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }\n      iVar3 = iVar2;\n      if (!bVar8) goto LAB_0005647e;\n    }\n    iVar3 = iVar2;\n    param_2 = param_4;\n    if (iVar2 != 0) {\nLAB_0005647e:\n      FUN_000264d0(local_a4);\n      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar3;\n      }\n                    /* WARNING: Subroutine does not return */\n      FUN_000f6410();\n    }\n  } while( true );\n}" { (declaration "code *pcVar1;" type_identifier (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "int *piVar7;" primitive_type (pointer_declarator "*piVar7" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "bool bVar8;" primitive_type identifier ;) (declaration "char *local_a4;" primitive_type (pointer_declarator "*local_a4" * identifier) ;) (declaration "int local_9c;" primitive_type identifier ;) (declaration "int local_98;" primitive_type identifier ;) (declaration "undefined1 local_80 [16];" type_identifier (array_declarator "local_80 [16]" identifier [ number_literal ]) ;) (declaration "uint local_70;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x562c9;" (assignment_expression "uStack_14 = 0x562c9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "local_a4 = (char *)0x0;" (assignment_expression "local_a4 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "local_9c = 1;" (assignment_expression "local_9c = 1" identifier = number_literal) ;) (labeled_statement "LAB_00056320:\n  do {\n    iVar2 = (*(code *)PTR_FUN_0014c508)(param_2,local_80);\n    if (iVar2 == 0) {\n      iVar2 = 0;\n      if ((local_70 & 0xf000) != 0xa000) {\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }\n      iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);\n      if (iVar3 < 0) {\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }\n      else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((param_4 != local_a4) && (bVar8)) {\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar7 = __errno_location();\n      if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }\n      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;\nLAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    /* WARNING: Does not return */\n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }\n      bVar8 = false;\nLAB_000563d8:\n      sVar4 = strlen(param_2);\n      uVar5 = sVar4 & 0x3fffffff;\n      if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }\n      iVar3 = iVar2;\n      if (!bVar8) goto LAB_0005647e;\n    }\n    iVar3 = iVar2;\n    param_2 = param_4;\n    if (iVar2 != 0) {\nLAB_0005647e:\n      FUN_000264d0(local_a4);\n      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar3;\n      }\n                    /* WARNING: Subroutine does not return */\n      FUN_000f6410();\n    }\n  } while( true );" statement_identifier : (do_statement "do {\n    iVar2 = (*(code *)PTR_FUN_0014c508)(param_2,local_80);\n    if (iVar2 == 0) {\n      iVar2 = 0;\n      if ((local_70 & 0xf000) != 0xa000) {\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }\n      iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);\n      if (iVar3 < 0) {\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }\n      else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((param_4 != local_a4) && (bVar8)) {\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar7 = __errno_location();\n      if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }\n      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;\nLAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    /* WARNING: Does not return */\n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }\n      bVar8 = false;\nLAB_000563d8:\n      sVar4 = strlen(param_2);\n      uVar5 = sVar4 & 0x3fffffff;\n      if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }\n      iVar3 = iVar2;\n      if (!bVar8) goto LAB_0005647e;\n    }\n    iVar3 = iVar2;\n    param_2 = param_4;\n    if (iVar2 != 0) {\nLAB_0005647e:\n      FUN_000264d0(local_a4);\n      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar3;\n      }\n                    /* WARNING: Subroutine does not return */\n      FUN_000f6410();\n    }\n  } while( true );" do (compound_statement "{\n    iVar2 = (*(code *)PTR_FUN_0014c508)(param_2,local_80);\n    if (iVar2 == 0) {\n      iVar2 = 0;\n      if ((local_70 & 0xf000) != 0xa000) {\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }\n      iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);\n      if (iVar3 < 0) {\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }\n      else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((param_4 != local_a4) && (bVar8)) {\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar7 = __errno_location();\n      if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }\n      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;\nLAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    /* WARNING: Does not return */\n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }\n      bVar8 = false;\nLAB_000563d8:\n      sVar4 = strlen(param_2);\n      uVar5 = sVar4 & 0x3fffffff;\n      if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }\n      iVar3 = iVar2;\n      if (!bVar8) goto LAB_0005647e;\n    }\n    iVar3 = iVar2;\n    param_2 = param_4;\n    if (iVar2 != 0) {\nLAB_0005647e:\n      FUN_000264d0(local_a4);\n      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar3;\n      }\n                    /* WARNING: Subroutine does not return */\n      FUN_000f6410();\n    }\n  }" { (expression_statement "iVar2 = (*(code *)PTR_FUN_0014c508)(param_2,local_80);" (assignment_expression "iVar2 = (*(code *)PTR_FUN_0014c508)(param_2,local_80)" identifier = (call_expression "(*(code *)PTR_FUN_0014c508)(param_2,local_80)" (parenthesized_expression "(*(code *)PTR_FUN_0014c508)" ( (pointer_expression "*(code *)PTR_FUN_0014c508" * (cast_expression "(code *)PTR_FUN_0014c508" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2,local_80)" ( identifier , identifier )))) ;) (if_statement "if (iVar2 == 0) {\n      iVar2 = 0;\n      if ((local_70 & 0xf000) != 0xa000) {\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }\n      iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);\n      if (iVar3 < 0) {\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }\n      else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((param_4 != local_a4) && (bVar8)) {\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar7 = __errno_location();\n      if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }\n      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;\nLAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    /* WARNING: Does not return */\n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }\n      bVar8 = false;\nLAB_000563d8:\n      sVar4 = strlen(param_2);\n      uVar5 = sVar4 & 0x3fffffff;\n      if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }\n      iVar3 = iVar2;\n      if (!bVar8) goto LAB_0005647e;\n    }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar2 = 0;\n      if ((local_70 & 0xf000) != 0xa000) {\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }\n      iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);\n      if (iVar3 < 0) {\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }\n      else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((param_4 != local_a4) && (bVar8)) {\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }\n    }" { (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (if_statement "if ((local_70 & 0xf000) != 0xa000) {\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }" if (parenthesized_expression "((local_70 & 0xf000) != 0xa000)" ( (binary_expression "(local_70 & 0xf000) != 0xa000" (parenthesized_expression "(local_70 & 0xf000)" ( (binary_expression "local_70 & 0xf000" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }" { (expression_statement "iVar3 = iVar2;" (assignment_expression "iVar3 = iVar2" identifier = identifier) ;) (if_statement "if (param_2 != param_4) goto LAB_000564f3;" if (parenthesized_expression "(param_2 != param_4)" ( (binary_expression "param_2 != param_4" identifier != identifier) )) (goto_statement "goto LAB_000564f3;" goto statement_identifier ;)) (goto_statement "goto LAB_0005647e;" goto statement_identifier ;) })) (if_statement "if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }" if (parenthesized_expression "(local_a4 == (char *)0x0)" ( (binary_expression "local_a4 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }" { (expression_statement "local_a4 = (char *)FUN_0003f8a0(param_3);" (assignment_expression "local_a4 = (char *)FUN_0003f8a0(param_3)" identifier = (cast_expression "(char *)FUN_0003f8a0(param_3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0003f8a0(param_3)" identifier (argument_list "(param_3)" ( identifier ))))) ;) (if_statement "if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }" if (parenthesized_expression "(local_a4 == (char *)0x0)" ( (binary_expression "local_a4 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }" { (expression_statement "iVar3 = 7;" (assignment_expression "iVar3 = 7" identifier = number_literal) ;) (goto_statement "goto LAB_0005647e;" goto statement_identifier ;) })) }) (else_clause "else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }" else (compound_statement "{\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }" { (expression_statement "local_9c = local_9c + 1;" (assignment_expression "local_9c = local_9c + 1" identifier = (binary_expression "local_9c + 1" identifier + number_literal)) ;) (if_statement "if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;" if (parenthesized_expression "((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0))" ( (binary_expression "(100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)" (parenthesized_expression "(100 < local_9c)" ( (binary_expression "100 < local_9c" number_literal < identifier) )) && (parenthesized_expression "(iVar3 = FUN_00052b30(), iVar3 != 0)" ( (comma_expression "iVar3 = FUN_00052b30(), iVar3 != 0" (assignment_expression "iVar3 = FUN_00052b30()" identifier = (call_expression "FUN_00052b30()" identifier (argument_list "()" ( )))) , (binary_expression "iVar3 != 0" identifier != number_literal)) ))) )) (goto_statement "goto LAB_0005647e;" goto statement_identifier ;)) }))) (expression_statement "iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);" (assignment_expression "iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1)" identifier = (call_expression "(*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1)" (parenthesized_expression "(*(code *)PTR_readlink_0014c4fc)" ( (pointer_expression "*(code *)PTR_readlink_0014c4fc" * (cast_expression "(code *)PTR_readlink_0014c4fc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2,local_a4,param_3 + -1)" ( identifier , identifier , (binary_expression "param_3 + -1" identifier + number_literal) )))) ;) (if_statement "if (iVar3 < 0) {\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }\n      else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }" if (parenthesized_expression "(iVar3 < 0)" ( (binary_expression "iVar3 < 0" identifier < number_literal) )) (compound_statement "{\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }" { (expression_statement "FUN_00052b30();" (call_expression "FUN_00052b30()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar2 = FUN_000556e0(0x9743);" (assignment_expression "iVar2 = FUN_000556e0(0x9743)" identifier = (call_expression "FUN_000556e0(0x9743)" identifier (argument_list "(0x9743)" ( number_literal )))) ;) (expression_statement "bVar8 = iVar2 == 0;" (assignment_expression "bVar8 = iVar2 == 0" identifier = (binary_expression "iVar2 == 0" identifier == number_literal)) ;) }) (else_clause "else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }" else (compound_statement "{\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }" { (expression_statement "bVar8 = true;" (assignment_expression "bVar8 = true" identifier = true) ;) (expression_statement "local_98 = iVar3;" (assignment_expression "local_98 = iVar3" identifier = identifier) ;) (if_statement "if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }" if (parenthesized_expression "(*local_a4 != '/')" ( (binary_expression "*local_a4 != '/'" (pointer_expression "*local_a4" * identifier) != (char_literal "'/'" ' character ')) )) (compound_statement "{\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }" { (if_statement "if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }" if (parenthesized_expression "(param_2 == (char *)0x0)" ( (binary_expression "param_2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            uVar5 = 0;\n          }" { (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) }) (else_clause "else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }" else (compound_statement "{\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }" { (expression_statement "sVar4 = strlen(param_2);" (assignment_expression "sVar4 = strlen(param_2)" identifier = (call_expression "strlen(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (for_statement "for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }" for ( (assignment_expression "uVar5 = sVar4 & 0x3fffffff" identifier = (binary_expression "sVar4 & 0x3fffffff" identifier & number_literal)) ; (binary_expression "uVar5 != 0" identifier != number_literal) ; (assignment_expression "uVar5 = uVar5 - 1" identifier = (binary_expression "uVar5 - 1" identifier - number_literal)) ) (compound_statement "{\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }" { (if_statement "if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }" if (parenthesized_expression "(param_2[uVar5 - 1] == '/')" ( (binary_expression "param_2[uVar5 - 1] == '/'" (subscript_expression "param_2[uVar5 - 1]" identifier [ (binary_expression "uVar5 - 1" identifier - number_literal) ]) == (char_literal "'/'" ' character ')) )) (compound_statement "{\n                local_98 = iVar3 + uVar5;\n                break;\n              }" { (expression_statement "local_98 = iVar3 + uVar5;" (assignment_expression "local_98 = iVar3 + uVar5" identifier = (binary_expression "iVar3 + uVar5" identifier + identifier)) ;) (break_statement "break;" break ;) })) })) }))) (if_statement "if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }" if (parenthesized_expression "(local_98 < param_3)" ( (binary_expression "local_98 < param_3" identifier < identifier) )) (compound_statement "{\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }" { (expression_statement "memmove(local_a4 + uVar5,local_a4,iVar3 + 1);" (call_expression "memmove(local_a4 + uVar5,local_a4,iVar3 + 1)" identifier (argument_list "(local_a4 + uVar5,local_a4,iVar3 + 1)" ( (binary_expression "local_a4 + uVar5" identifier + identifier) , identifier , (binary_expression "iVar3 + 1" identifier + number_literal) ))) ;) (expression_statement "memcpy(local_a4,param_2,uVar5);" (call_expression "memcpy(local_a4,param_2,uVar5)" identifier (argument_list "(local_a4,param_2,uVar5)" ( identifier , identifier , identifier ))) ;) (expression_statement "bVar8 = true;" (assignment_expression "bVar8 = true" identifier = true) ;) }) (else_clause "else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }" else (compound_statement "{\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }" { (expression_statement "iVar2 = FUN_00052b30();" (assignment_expression "iVar2 = FUN_00052b30()" identifier = (call_expression "FUN_00052b30()" identifier (argument_list "()" ( )))) ;) (expression_statement "bVar8 = iVar2 == 0;" (assignment_expression "bVar8 = iVar2 == 0" identifier = (binary_expression "iVar2 == 0" identifier == number_literal)) ;) (expression_statement "local_98 = iVar3;" (assignment_expression "local_98 = iVar3" identifier = identifier) ;) }))) })) (expression_statement "local_a4[local_98] = '\0';" (assignment_expression "local_a4[local_98] = '\0'" (subscript_expression "local_a4[local_98]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) }))) (if_statement "if ((param_4 != local_a4) && (bVar8)) {\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }" if (parenthesized_expression "((param_4 != local_a4) && (bVar8))" ( (binary_expression "(param_4 != local_a4) && (bVar8)" (parenthesized_expression "(param_4 != local_a4)" ( (binary_expression "param_4 != local_a4" identifier != identifier) )) && (parenthesized_expression "(bVar8)" ( identifier ))) )) (compound_statement "{\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }" { (expression_statement "bVar8 = true;" (assignment_expression "bVar8 = true" identifier = true) ;) (expression_statement "param_2 = local_a4;" (assignment_expression "param_2 = local_a4" identifier = identifier) ;) (goto_statement "goto LAB_000563d8;" goto statement_identifier ;) })) }) (else_clause "else {\n      piVar7 = __errno_location();\n      if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }\n      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;\nLAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    /* WARNING: Does not return */\n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }\n      bVar8 = false;\nLAB_000563d8:\n      sVar4 = strlen(param_2);\n      uVar5 = sVar4 & 0x3fffffff;\n      if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }\n      iVar3 = iVar2;\n      if (!bVar8) goto LAB_0005647e;\n    }" else (compound_statement "{\n      piVar7 = __errno_location();\n      if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }\n      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;\nLAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    /* WARNING: Does not return */\n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }\n      bVar8 = false;\nLAB_000563d8:\n      sVar4 = strlen(param_2);\n      uVar5 = sVar4 & 0x3fffffff;\n      if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }\n      iVar3 = iVar2;\n      if (!bVar8) goto LAB_0005647e;\n    }" { (expression_statement "piVar7 = __errno_location();" (assignment_expression "piVar7 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }" if (parenthesized_expression "(*piVar7 == 2)" ( (binary_expression "*piVar7 == 2" (pointer_expression "*piVar7" * identifier) == number_literal) )) (compound_statement "{\n        bVar8 = true;\n        iVar3 = 0;\n      }" { (expression_statement "bVar8 = true;" (assignment_expression "bVar8 = true" identifier = true) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) }) (else_clause "else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }" else (compound_statement "{\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }" { (expression_statement "FUN_00052b30();" (call_expression "FUN_00052b30()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar3 = FUN_000556e0(0x9732);" (assignment_expression "iVar3 = FUN_000556e0(0x9732)" identifier = (call_expression "FUN_000556e0(0x9732)" identifier (argument_list "(0x9732)" ( number_literal )))) ;) (expression_statement "bVar8 = iVar3 == 0;" (assignment_expression "bVar8 = iVar3 == 0" identifier = (binary_expression "iVar3 == 0" identifier == number_literal)) ;) }))) (if_statement "if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;" if (parenthesized_expression "((param_2 == param_4) || (!bVar8))" ( (binary_expression "(param_2 == param_4) || (!bVar8)" (parenthesized_expression "(param_2 == param_4)" ( (binary_expression "param_2 == param_4" identifier == identifier) )) || (parenthesized_expression "(!bVar8)" ( (unary_expression "!bVar8" ! identifier) ))) )) (goto_statement "goto LAB_0005647e;" goto statement_identifier ;)) (labeled_statement "LAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    /* WARNING: Does not return */\n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }" statement_identifier : (if_statement "if (param_2 == (char *)0x0) {\n                    /* WARNING: Does not return */\n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }" if (parenthesized_expression "(param_2 == (char *)0x0)" ( (binary_expression "param_2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Does not return */\n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }" { comment (expression_statement "pcVar1 = (code *)invalidInstructionException();" (assignment_expression "pcVar1 = (code *)invalidInstructionException()" identifier = (cast_expression "(code *)invalidInstructionException()" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "invalidInstructionException()" identifier (argument_list "()" ( ))))) ;) (expression_statement "(*pcVar1)();" (call_expression "(*pcVar1)()" (parenthesized_expression "(*pcVar1)" ( (pointer_expression "*pcVar1" * identifier) )) (argument_list "()" ( ))) ;) }))) (expression_statement "bVar8 = false;" (assignment_expression "bVar8 = false" identifier = false) ;) (labeled_statement "LAB_000563d8:\n      sVar4 = strlen(param_2);" statement_identifier : (expression_statement "sVar4 = strlen(param_2);" (assignment_expression "sVar4 = strlen(param_2)" identifier = (call_expression "strlen(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;)) (expression_statement "uVar5 = sVar4 & 0x3fffffff;" (assignment_expression "uVar5 = sVar4 & 0x3fffffff" identifier = (binary_expression "sVar4 & 0x3fffffff" identifier & number_literal)) ;) (if_statement "if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }" if (parenthesized_expression "(*param_2 == '/')" ( (binary_expression "*param_2 == '/'" (pointer_expression "*param_2" * identifier) == (char_literal "'/'" ' character ')) )) (compound_statement "{\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }" { (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (expression_statement "pcVar6 = param_4;" (assignment_expression "pcVar6 = param_4" identifier = identifier) ;) (labeled_statement "LAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }" statement_identifier : (if_statement "if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }" if (parenthesized_expression "((int)uVar5 < param_3)" ( (binary_expression "(int)uVar5 < param_3" (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) < identifier) )) (compound_statement "{\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }" { (expression_statement "FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);" (call_expression "FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2)" identifier (argument_list "(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2)" ( (binary_expression "param_3 - iVar2" identifier - identifier) , identifier , (pointer_expression "&DAT_000f8ce3" & identifier) , identifier ))) ;) (expression_statement "param_2 = param_4;" (assignment_expression "param_2 = param_4" identifier = identifier) ;) (if_statement "if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }" if (parenthesized_expression "(!bVar8)" ( (unary_expression "!bVar8" ! identifier) )) (compound_statement "{\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_0005647e;" goto statement_identifier ;) })) (goto_statement "goto LAB_00056320;" goto statement_identifier ;) }))) (expression_statement "*pcVar6 = '\0';" (assignment_expression "*pcVar6 = '\0'" (pointer_expression "*pcVar6" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "iVar2 = FUN_00052b30();" (assignment_expression "iVar2 = FUN_00052b30()" identifier = (call_expression "FUN_00052b30()" identifier (argument_list "()" ( )))) ;) }) (else_clause "else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }" else (compound_statement "{\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }" { (expression_statement "iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);" (assignment_expression "iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2)" identifier = (call_expression "(*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2)" (parenthesized_expression "(*(code *)PTR_getcwd_0014c3e8)" ( (pointer_expression "*(code *)PTR_getcwd_0014c3e8" * (cast_expression "(code *)PTR_getcwd_0014c3e8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_4,param_3 + -2)" ( identifier , (binary_expression "param_3 + -2" identifier + number_literal) )))) ;) (if_statement "if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }" { (if_statement "if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }" if (parenthesized_expression "(param_4 == (char *)0x0)" ( (binary_expression "param_4 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }" { (expression_statement "pcVar6 = (char *)0x0;" (assignment_expression "pcVar6 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) }) (else_clause "else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }" else (compound_statement "{\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }" { (expression_statement "sVar4 = strlen(param_4);" (assignment_expression "sVar4 = strlen(param_4)" identifier = (call_expression "strlen(param_4)" identifier (argument_list "(param_4)" ( identifier )))) ;) (expression_statement "iVar2 = (sVar4 & 0x3fffffff) + 1;" (assignment_expression "iVar2 = (sVar4 & 0x3fffffff) + 1" identifier = (binary_expression "(sVar4 & 0x3fffffff) + 1" (parenthesized_expression "(sVar4 & 0x3fffffff)" ( (binary_expression "sVar4 & 0x3fffffff" identifier & number_literal) )) + number_literal)) ;) (expression_statement "pcVar6 = param_4 + (sVar4 & 0x3fffffff);" (assignment_expression "pcVar6 = param_4 + (sVar4 & 0x3fffffff)" identifier = (binary_expression "param_4 + (sVar4 & 0x3fffffff)" identifier + (parenthesized_expression "(sVar4 & 0x3fffffff)" ( (binary_expression "sVar4 & 0x3fffffff" identifier & number_literal) )))) ;) }))) (expression_statement "*pcVar6 = '/';" (assignment_expression "*pcVar6 = '/'" (pointer_expression "*pcVar6" * identifier) = (char_literal "'/'" ' character ')) ;) (expression_statement "uVar5 = uVar5 + iVar2;" (assignment_expression "uVar5 = uVar5 + iVar2" identifier = (binary_expression "uVar5 + iVar2" identifier + identifier)) ;) (expression_statement "pcVar6 = param_4 + iVar2;" (assignment_expression "pcVar6 = param_4 + iVar2" identifier = (binary_expression "param_4 + iVar2" identifier + identifier)) ;) (goto_statement "goto LAB_0005643d;" goto statement_identifier ;) })) (expression_statement "FUN_00052b30();" (call_expression "FUN_00052b30()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar2 = FUN_000556e0(0x96f9);" (assignment_expression "iVar2 = FUN_000556e0(0x96f9)" identifier = (call_expression "FUN_000556e0(0x96f9)" identifier (argument_list "(0x96f9)" ( number_literal )))) ;) }))) (expression_statement "iVar3 = iVar2;" (assignment_expression "iVar3 = iVar2" identifier = identifier) ;) (if_statement "if (!bVar8) goto LAB_0005647e;" if (parenthesized_expression "(!bVar8)" ( (unary_expression "!bVar8" ! identifier) )) (goto_statement "goto LAB_0005647e;" goto statement_identifier ;)) }))) (expression_statement "iVar3 = iVar2;" (assignment_expression "iVar3 = iVar2" identifier = identifier) ;) (expression_statement "param_2 = param_4;" (assignment_expression "param_2 = param_4" identifier = identifier) ;) (if_statement "if (iVar2 != 0) {\nLAB_0005647e:\n      FUN_000264d0(local_a4);\n      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar3;\n      }\n                    /* WARNING: Subroutine does not return */\n      FUN_000f6410();\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_0005647e:\n      FUN_000264d0(local_a4);\n      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar3;\n      }\n                    /* WARNING: Subroutine does not return */\n      FUN_000f6410();\n    }" { (labeled_statement "LAB_0005647e:\n      FUN_000264d0(local_a4);" statement_identifier : (expression_statement "FUN_000264d0(local_a4);" (call_expression "FUN_000264d0(local_a4)" identifier (argument_list "(local_a4)" ( identifier ))) ;)) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar3;\n      }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n        return iVar3;\n      }" { (return_statement "return iVar3;" return identifier ;) })) comment (expression_statement "FUN_000f6410();" (call_expression "FUN_000f6410()" identifier (argument_list "()" ( ))) ;) })) }) while (parenthesized_expression "( true )" ( true )) ;)) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint unixFullPathname(sqlite3_vfs *pVfs,char *zPath,int nOut,char *zOut)\n\n{\n  int iVar1;\n  code *pcVar2;\n  int iVar3;\n  int iVar4;\n  size_t sVar5;\n  uint uVar6;\n  char *pcVar7;\n  int *piVar8;\n  int in_GS_OFFSET;\n  bool bVar9;\n  char *local_a4;\n  int local_9c;\n  int local_98;\n  stat buf;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  local_a4 = (char *)0x0;\n  local_9c = 1;\nLAB_00056320:\n  do {\n    iVar3 = (*aSyscall[0x1b].pCurrent)(zPath,&buf);\n    if (iVar3 == 0) {\n      iVar3 = 0;\n      if ((buf.st_mode & 0xf000) != 0xa000) {\n        iVar4 = iVar3;\n        if (zPath != zOut) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)sqlite3_malloc(nOut);\n        if (local_a4 == (char *)0x0) {\n          iVar4 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar4 = sqlite3CantopenError(0x973d), iVar4 != 0))\n        goto LAB_0005647e;\n      }\n      iVar4 = (*aSyscall[0x1a].pCurrent)(zPath,local_a4,nOut + -1);\n      if (iVar4 < 0) {\n        iVar3 = sqlite3CantopenError(0x9743);\n        iVar3 = unixLogErrorAtLine(iVar3,"readlink",zPath,0x9743);\n        bVar9 = iVar3 == 0;\n      }\n      else {\n        bVar9 = true;\n        local_98 = iVar4;\n        if (*local_a4 != '/') {\n          if (zPath == (char *)0x0) {\n            uVar6 = 0;\n          }\n          else {\n            sVar5 = strlen(zPath);\n            for (uVar6 = sVar5 & 0x3fffffff; uVar6 != 0; uVar6 = uVar6 - 1) {\n              if (zPath[uVar6 - 1] == '/') {\n                local_98 = iVar4 + uVar6;\n                break;\n              }\n            }\n          }\n          if (local_98 < nOut) {\n            memmove(local_a4 + uVar6,local_a4,iVar4 + 1);\n            memcpy(local_a4,zPath,uVar6);\n            bVar9 = true;\n          }\n          else {\n            iVar3 = sqlite3CantopenError(0x9749);\n            bVar9 = iVar3 == 0;\n            local_98 = iVar4;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((zOut != local_a4) && (bVar9)) {\n        bVar9 = true;\n        zPath = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar8 = __errno_location();\n      if (*piVar8 == 2) {\n        bVar9 = true;\n        iVar4 = 0;\n      }\n      else {\n        iVar3 = sqlite3CantopenError(0x9732);\n        iVar4 = unixLogErrorAtLine(iVar3,"lstat",zPath,0x9732);\n        bVar9 = iVar4 == 0;\n      }\n      if ((zPath == zOut) || (!bVar9)) goto LAB_0005647e;\nLAB_000564f3:\n      if (zPath == (char *)0x0) {\n                    /* WARNING: Does not return */\n        pcVar2 = (code *)invalidInstructionException();\n        (*pcVar2)();\n      }\n      bVar9 = false;\nLAB_000563d8:\n      sVar5 = strlen(zPath);\n      uVar6 = sVar5 & 0x3fffffff;\n      if (*zPath == '/') {\n        iVar3 = 0;\n        pcVar7 = zOut;\nLAB_0005643d:\n        if ((int)uVar6 < nOut) {\n          sqlite3_snprintf(nOut - iVar3,pcVar7,"%s",zPath);\n          zPath = zOut;\n          if (!bVar9) {\n            iVar4 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar7 = '\0';\n        iVar3 = sqlite3CantopenError(0x9702);\n      }\n      else {\n        iVar3 = (*aSyscall[3].pCurrent)(zOut,nOut + -2);\n        if (iVar3 != 0) {\n          if (zOut == (char *)0x0) {\n            pcVar7 = (char *)0x0;\n            iVar3 = 1;\n          }\n          else {\n            sVar5 = strlen(zOut);\n            iVar3 = (sVar5 & 0x3fffffff) + 1;\n            pcVar7 = zOut + (sVar5 & 0x3fffffff);\n          }\n          *pcVar7 = '/';\n          uVar6 = uVar6 + iVar3;\n          pcVar7 = zOut + iVar3;\n          goto LAB_0005643d;\n        }\n        iVar3 = sqlite3CantopenError(0x96f9);\n        iVar3 = unixLogErrorAtLine(iVar3,"getcwd",zPath,0x96f9);\n      }\n      iVar4 = iVar3;\n      if (!bVar9) goto LAB_0005647e;\n    }\n    iVar4 = iVar3;\n    zPath = zOut;\n    if (iVar3 != 0) {\nLAB_0005647e:\n      sqlite3_free(local_a4);\n      if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar4;\n      }\n                    /* WARNING: Subroutine does not return */\n      __stack_chk_fail_local();\n    }\n  } while( true );\n}\n\n" comment comment (function_definition "int unixFullPathname(sqlite3_vfs *pVfs,char *zPath,int nOut,char *zOut)\n\n{\n  int iVar1;\n  code *pcVar2;\n  int iVar3;\n  int iVar4;\n  size_t sVar5;\n  uint uVar6;\n  char *pcVar7;\n  int *piVar8;\n  int in_GS_OFFSET;\n  bool bVar9;\n  char *local_a4;\n  int local_9c;\n  int local_98;\n  stat buf;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  local_a4 = (char *)0x0;\n  local_9c = 1;\nLAB_00056320:\n  do {\n    iVar3 = (*aSyscall[0x1b].pCurrent)(zPath,&buf);\n    if (iVar3 == 0) {\n      iVar3 = 0;\n      if ((buf.st_mode & 0xf000) != 0xa000) {\n        iVar4 = iVar3;\n        if (zPath != zOut) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)sqlite3_malloc(nOut);\n        if (local_a4 == (char *)0x0) {\n          iVar4 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar4 = sqlite3CantopenError(0x973d), iVar4 != 0))\n        goto LAB_0005647e;\n      }\n      iVar4 = (*aSyscall[0x1a].pCurrent)(zPath,local_a4,nOut + -1);\n      if (iVar4 < 0) {\n        iVar3 = sqlite3CantopenError(0x9743);\n        iVar3 = unixLogErrorAtLine(iVar3,"readlink",zPath,0x9743);\n        bVar9 = iVar3 == 0;\n      }\n      else {\n        bVar9 = true;\n        local_98 = iVar4;\n        if (*local_a4 != '/') {\n          if (zPath == (char *)0x0) {\n            uVar6 = 0;\n          }\n          else {\n            sVar5 = strlen(zPath);\n            for (uVar6 = sVar5 & 0x3fffffff; uVar6 != 0; uVar6 = uVar6 - 1) {\n              if (zPath[uVar6 - 1] == '/') {\n                local_98 = iVar4 + uVar6;\n                break;\n              }\n            }\n          }\n          if (local_98 < nOut) {\n            memmove(local_a4 + uVar6,local_a4,iVar4 + 1);\n            memcpy(local_a4,zPath,uVar6);\n            bVar9 = true;\n          }\n          else {\n            iVar3 = sqlite3CantopenError(0x9749);\n            bVar9 = iVar3 == 0;\n            local_98 = iVar4;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((zOut != local_a4) && (bVar9)) {\n        bVar9 = true;\n        zPath = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar8 = __errno_location();\n      if (*piVar8 == 2) {\n        bVar9 = true;\n        iVar4 = 0;\n      }\n      else {\n        iVar3 = sqlite3CantopenError(0x9732);\n        iVar4 = unixLogErrorAtLine(iVar3,"lstat",zPath,0x9732);\n        bVar9 = iVar4 == 0;\n      }\n      if ((zPath == zOut) || (!bVar9)) goto LAB_0005647e;\nLAB_000564f3:\n      if (zPath == (char *)0x0) {\n                    /* WARNING: Does not return */\n        pcVar2 = (code *)invalidInstructionException();\n        (*pcVar2)();\n      }\n      bVar9 = false;\nLAB_000563d8:\n      sVar5 = strlen(zPath);\n      uVar6 = sVar5 & 0x3fffffff;\n      if (*zPath == '/') {\n        iVar3 = 0;\n        pcVar7 = zOut;\nLAB_0005643d:\n        if ((int)uVar6 < nOut) {\n          sqlite3_snprintf(nOut - iVar3,pcVar7,"%s",zPath);\n          zPath = zOut;\n          if (!bVar9) {\n            iVar4 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar7 = '\0';\n        iVar3 = sqlite3CantopenError(0x9702);\n      }\n      else {\n        iVar3 = (*aSyscall[3].pCurrent)(zOut,nOut + -2);\n        if (iVar3 != 0) {\n          if (zOut == (char *)0x0) {\n            pcVar7 = (char *)0x0;\n            iVar3 = 1;\n          }\n          else {\n            sVar5 = strlen(zOut);\n            iVar3 = (sVar5 & 0x3fffffff) + 1;\n            pcVar7 = zOut + (sVar5 & 0x3fffffff);\n          }\n          *pcVar7 = '/';\n          uVar6 = uVar6 + iVar3;\n          pcVar7 = zOut + iVar3;\n          goto LAB_0005643d;\n        }\n        iVar3 = sqlite3CantopenError(0x96f9);\n        iVar3 = unixLogErrorAtLine(iVar3,"getcwd",zPath,0x96f9);\n      }\n      iVar4 = iVar3;\n      if (!bVar9) goto LAB_0005647e;\n    }\n    iVar4 = iVar3;\n    zPath = zOut;\n    if (iVar3 != 0) {\nLAB_0005647e:\n      sqlite3_free(local_a4);\n      if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar4;\n      }\n                    /* WARNING: Subroutine does not return */\n      __stack_chk_fail_local();\n    }\n  } while( true );\n}" primitive_type (function_declarator "unixFullPathname(sqlite3_vfs *pVfs,char *zPath,int nOut,char *zOut)" identifier (parameter_list "(sqlite3_vfs *pVfs,char *zPath,int nOut,char *zOut)" ( (parameter_declaration "sqlite3_vfs *pVfs" type_identifier (pointer_declarator "*pVfs" * identifier)) , (parameter_declaration "char *zPath" primitive_type (pointer_declarator "*zPath" * identifier)) , (parameter_declaration "int nOut" primitive_type identifier) , (parameter_declaration "char *zOut" primitive_type (pointer_declarator "*zOut" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  code *pcVar2;\n  int iVar3;\n  int iVar4;\n  size_t sVar5;\n  uint uVar6;\n  char *pcVar7;\n  int *piVar8;\n  int in_GS_OFFSET;\n  bool bVar9;\n  char *local_a4;\n  int local_9c;\n  int local_98;\n  stat buf;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  local_a4 = (char *)0x0;\n  local_9c = 1;\nLAB_00056320:\n  do {\n    iVar3 = (*aSyscall[0x1b].pCurrent)(zPath,&buf);\n    if (iVar3 == 0) {\n      iVar3 = 0;\n      if ((buf.st_mode & 0xf000) != 0xa000) {\n        iVar4 = iVar3;\n        if (zPath != zOut) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)sqlite3_malloc(nOut);\n        if (local_a4 == (char *)0x0) {\n          iVar4 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar4 = sqlite3CantopenError(0x973d), iVar4 != 0))\n        goto LAB_0005647e;\n      }\n      iVar4 = (*aSyscall[0x1a].pCurrent)(zPath,local_a4,nOut + -1);\n      if (iVar4 < 0) {\n        iVar3 = sqlite3CantopenError(0x9743);\n        iVar3 = unixLogErrorAtLine(iVar3,"readlink",zPath,0x9743);\n        bVar9 = iVar3 == 0;\n      }\n      else {\n        bVar9 = true;\n        local_98 = iVar4;\n        if (*local_a4 != '/') {\n          if (zPath == (char *)0x0) {\n            uVar6 = 0;\n          }\n          else {\n            sVar5 = strlen(zPath);\n            for (uVar6 = sVar5 & 0x3fffffff; uVar6 != 0; uVar6 = uVar6 - 1) {\n              if (zPath[uVar6 - 1] == '/') {\n                local_98 = iVar4 + uVar6;\n                break;\n              }\n            }\n          }\n          if (local_98 < nOut) {\n            memmove(local_a4 + uVar6,local_a4,iVar4 + 1);\n            memcpy(local_a4,zPath,uVar6);\n            bVar9 = true;\n          }\n          else {\n            iVar3 = sqlite3CantopenError(0x9749);\n            bVar9 = iVar3 == 0;\n            local_98 = iVar4;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((zOut != local_a4) && (bVar9)) {\n        bVar9 = true;\n        zPath = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar8 = __errno_location();\n      if (*piVar8 == 2) {\n        bVar9 = true;\n        iVar4 = 0;\n      }\n      else {\n        iVar3 = sqlite3CantopenError(0x9732);\n        iVar4 = unixLogErrorAtLine(iVar3,"lstat",zPath,0x9732);\n        bVar9 = iVar4 == 0;\n      }\n      if ((zPath == zOut) || (!bVar9)) goto LAB_0005647e;\nLAB_000564f3:\n      if (zPath == (char *)0x0) {\n                    /* WARNING: Does not return */\n        pcVar2 = (code *)invalidInstructionException();\n        (*pcVar2)();\n      }\n      bVar9 = false;\nLAB_000563d8:\n      sVar5 = strlen(zPath);\n      uVar6 = sVar5 & 0x3fffffff;\n      if (*zPath == '/') {\n        iVar3 = 0;\n        pcVar7 = zOut;\nLAB_0005643d:\n        if ((int)uVar6 < nOut) {\n          sqlite3_snprintf(nOut - iVar3,pcVar7,"%s",zPath);\n          zPath = zOut;\n          if (!bVar9) {\n            iVar4 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar7 = '\0';\n        iVar3 = sqlite3CantopenError(0x9702);\n      }\n      else {\n        iVar3 = (*aSyscall[3].pCurrent)(zOut,nOut + -2);\n        if (iVar3 != 0) {\n          if (zOut == (char *)0x0) {\n            pcVar7 = (char *)0x0;\n            iVar3 = 1;\n          }\n          else {\n            sVar5 = strlen(zOut);\n            iVar3 = (sVar5 & 0x3fffffff) + 1;\n            pcVar7 = zOut + (sVar5 & 0x3fffffff);\n          }\n          *pcVar7 = '/';\n          uVar6 = uVar6 + iVar3;\n          pcVar7 = zOut + iVar3;\n          goto LAB_0005643d;\n        }\n        iVar3 = sqlite3CantopenError(0x96f9);\n        iVar3 = unixLogErrorAtLine(iVar3,"getcwd",zPath,0x96f9);\n      }\n      iVar4 = iVar3;\n      if (!bVar9) goto LAB_0005647e;\n    }\n    iVar4 = iVar3;\n    zPath = zOut;\n    if (iVar3 != 0) {\nLAB_0005647e:\n      sqlite3_free(local_a4);\n      if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar4;\n      }\n                    /* WARNING: Subroutine does not return */\n      __stack_chk_fail_local();\n    }\n  } while( true );\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "code *pcVar2;" type_identifier (pointer_declarator "*pcVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "size_t sVar5;" primitive_type identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "char *pcVar7;" primitive_type (pointer_declarator "*pcVar7" * identifier) ;) (declaration "int *piVar8;" primitive_type (pointer_declarator "*piVar8" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "bool bVar9;" primitive_type identifier ;) (declaration "char *local_a4;" primitive_type (pointer_declarator "*local_a4" * identifier) ;) (declaration "int local_9c;" primitive_type identifier ;) (declaration "int local_98;" primitive_type identifier ;) (declaration "stat buf;" type_identifier identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "local_a4 = (char *)0x0;" (assignment_expression "local_a4 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "local_9c = 1;" (assignment_expression "local_9c = 1" identifier = number_literal) ;) (labeled_statement "LAB_00056320:\n  do {\n    iVar3 = (*aSyscall[0x1b].pCurrent)(zPath,&buf);\n    if (iVar3 == 0) {\n      iVar3 = 0;\n      if ((buf.st_mode & 0xf000) != 0xa000) {\n        iVar4 = iVar3;\n        if (zPath != zOut) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)sqlite3_malloc(nOut);\n        if (local_a4 == (char *)0x0) {\n          iVar4 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar4 = sqlite3CantopenError(0x973d), iVar4 != 0))\n        goto LAB_0005647e;\n      }\n      iVar4 = (*aSyscall[0x1a].pCurrent)(zPath,local_a4,nOut + -1);\n      if (iVar4 < 0) {\n        iVar3 = sqlite3CantopenError(0x9743);\n        iVar3 = unixLogErrorAtLine(iVar3,"readlink",zPath,0x9743);\n        bVar9 = iVar3 == 0;\n      }\n      else {\n        bVar9 = true;\n        local_98 = iVar4;\n        if (*local_a4 != '/') {\n          if (zPath == (char *)0x0) {\n            uVar6 = 0;\n          }\n          else {\n            sVar5 = strlen(zPath);\n            for (uVar6 = sVar5 & 0x3fffffff; uVar6 != 0; uVar6 = uVar6 - 1) {\n              if (zPath[uVar6 - 1] == '/') {\n                local_98 = iVar4 + uVar6;\n                break;\n              }\n            }\n          }\n          if (local_98 < nOut) {\n            memmove(local_a4 + uVar6,local_a4,iVar4 + 1);\n            memcpy(local_a4,zPath,uVar6);\n            bVar9 = true;\n          }\n          else {\n            iVar3 = sqlite3CantopenError(0x9749);\n            bVar9 = iVar3 == 0;\n            local_98 = iVar4;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((zOut != local_a4) && (bVar9)) {\n        bVar9 = true;\n        zPath = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar8 = __errno_location();\n      if (*piVar8 == 2) {\n        bVar9 = true;\n        iVar4 = 0;\n      }\n      else {\n        iVar3 = sqlite3CantopenError(0x9732);\n        iVar4 = unixLogErrorAtLine(iVar3,"lstat",zPath,0x9732);\n        bVar9 = iVar4 == 0;\n      }\n      if ((zPath == zOut) || (!bVar9)) goto LAB_0005647e;\nLAB_000564f3:\n      if (zPath == (char *)0x0) {\n                    /* WARNING: Does not return */\n        pcVar2 = (code *)invalidInstructionException();\n        (*pcVar2)();\n      }\n      bVar9 = false;\nLAB_000563d8:\n      sVar5 = strlen(zPath);\n      uVar6 = sVar5 & 0x3fffffff;\n      if (*zPath == '/') {\n        iVar3 = 0;\n        pcVar7 = zOut;\nLAB_0005643d:\n        if ((int)uVar6 < nOut) {\n          sqlite3_snprintf(nOut - iVar3,pcVar7,"%s",zPath);\n          zPath = zOut;\n          if (!bVar9) {\n            iVar4 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar7 = '\0';\n        iVar3 = sqlite3CantopenError(0x9702);\n      }\n      else {\n        iVar3 = (*aSyscall[3].pCurrent)(zOut,nOut + -2);\n        if (iVar3 != 0) {\n          if (zOut == (char *)0x0) {\n            pcVar7 = (char *)0x0;\n            iVar3 = 1;\n          }\n          else {\n            sVar5 = strlen(zOut);\n            iVar3 = (sVar5 & 0x3fffffff) + 1;\n            pcVar7 = zOut + (sVar5 & 0x3fffffff);\n          }\n          *pcVar7 = '/';\n          uVar6 = uVar6 + iVar3;\n          pcVar7 = zOut + iVar3;\n          goto LAB_0005643d;\n        }\n        iVar3 = sqlite3CantopenError(0x96f9);\n        iVar3 = unixLogErrorAtLine(iVar3,"getcwd",zPath,0x96f9);\n      }\n      iVar4 = iVar3;\n      if (!bVar9) goto LAB_0005647e;\n    }\n    iVar4 = iVar3;\n    zPath = zOut;\n    if (iVar3 != 0) {\nLAB_0005647e:\n      sqlite3_free(local_a4);\n      if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar4;\n      }\n                    /* WARNING: Subroutine does not return */\n      __stack_chk_fail_local();\n    }\n  } while( true );" statement_identifier : (do_statement "do {\n    iVar3 = (*aSyscall[0x1b].pCurrent)(zPath,&buf);\n    if (iVar3 == 0) {\n      iVar3 = 0;\n      if ((buf.st_mode & 0xf000) != 0xa000) {\n        iVar4 = iVar3;\n        if (zPath != zOut) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)sqlite3_malloc(nOut);\n        if (local_a4 == (char *)0x0) {\n          iVar4 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar4 = sqlite3CantopenError(0x973d), iVar4 != 0))\n        goto LAB_0005647e;\n      }\n      iVar4 = (*aSyscall[0x1a].pCurrent)(zPath,local_a4,nOut + -1);\n      if (iVar4 < 0) {\n        iVar3 = sqlite3CantopenError(0x9743);\n        iVar3 = unixLogErrorAtLine(iVar3,"readlink",zPath,0x9743);\n        bVar9 = iVar3 == 0;\n      }\n      else {\n        bVar9 = true;\n        local_98 = iVar4;\n        if (*local_a4 != '/') {\n          if (zPath == (char *)0x0) {\n            uVar6 = 0;\n          }\n          else {\n            sVar5 = strlen(zPath);\n            for (uVar6 = sVar5 & 0x3fffffff; uVar6 != 0; uVar6 = uVar6 - 1) {\n              if (zPath[uVar6 - 1] == '/') {\n                local_98 = iVar4 + uVar6;\n                break;\n              }\n            }\n          }\n          if (local_98 < nOut) {\n            memmove(local_a4 + uVar6,local_a4,iVar4 + 1);\n            memcpy(local_a4,zPath,uVar6);\n            bVar9 = true;\n          }\n          else {\n            iVar3 = sqlite3CantopenError(0x9749);\n            bVar9 = iVar3 == 0;\n            local_98 = iVar4;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((zOut != local_a4) && (bVar9)) {\n        bVar9 = true;\n        zPath = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar8 = __errno_location();\n      if (*piVar8 == 2) {\n        bVar9 = true;\n        iVar4 = 0;\n      }\n      else {\n        iVar3 = sqlite3CantopenError(0x9732);\n        iVar4 = unixLogErrorAtLine(iVar3,"lstat",zPath,0x9732);\n        bVar9 = iVar4 == 0;\n      }\n      if ((zPath == zOut) || (!bVar9)) goto LAB_0005647e;\nLAB_000564f3:\n      if (zPath == (char *)0x0) {\n                    /* WARNING: Does not return */\n        pcVar2 = (code *)invalidInstructionException();\n        (*pcVar2)();\n      }\n      bVar9 = false;\nLAB_000563d8:\n      sVar5 = strlen(zPath);\n      uVar6 = sVar5 & 0x3fffffff;\n      if (*zPath == '/') {\n        iVar3 = 0;\n        pcVar7 = zOut;\nLAB_0005643d:\n        if ((int)uVar6 < nOut) {\n          sqlite3_snprintf(nOut - iVar3,pcVar7,"%s",zPath);\n          zPath = zOut;\n          if (!bVar9) {\n            iVar4 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar7 = '\0';\n        iVar3 = sqlite3CantopenError(0x9702);\n      }\n      else {\n        iVar3 = (*aSyscall[3].pCurrent)(zOut,nOut + -2);\n        if (iVar3 != 0) {\n          if (zOut == (char *)0x0) {\n            pcVar7 = (char *)0x0;\n            iVar3 = 1;\n          }\n          else {\n            sVar5 = strlen(zOut);\n            iVar3 = (sVar5 & 0x3fffffff) + 1;\n            pcVar7 = zOut + (sVar5 & 0x3fffffff);\n          }\n          *pcVar7 = '/';\n          uVar6 = uVar6 + iVar3;\n          pcVar7 = zOut + iVar3;\n          goto LAB_0005643d;\n        }\n        iVar3 = sqlite3CantopenError(0x96f9);\n        iVar3 = unixLogErrorAtLine(iVar3,"getcwd",zPath,0x96f9);\n      }\n      iVar4 = iVar3;\n      if (!bVar9) goto LAB_0005647e;\n    }\n    iVar4 = iVar3;\n    zPath = zOut;\n    if (iVar3 != 0) {\nLAB_0005647e:\n      sqlite3_free(local_a4);\n      if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar4;\n      }\n                    /* WARNING: Subroutine does not return */\n      __stack_chk_fail_local();\n    }\n  } while( true );" do (compound_statement "{\n    iVar3 = (*aSyscall[0x1b].pCurrent)(zPath,&buf);\n    if (iVar3 == 0) {\n      iVar3 = 0;\n      if ((buf.st_mode & 0xf000) != 0xa000) {\n        iVar4 = iVar3;\n        if (zPath != zOut) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)sqlite3_malloc(nOut);\n        if (local_a4 == (char *)0x0) {\n          iVar4 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar4 = sqlite3CantopenError(0x973d), iVar4 != 0))\n        goto LAB_0005647e;\n      }\n      iVar4 = (*aSyscall[0x1a].pCurrent)(zPath,local_a4,nOut + -1);\n      if (iVar4 < 0) {\n        iVar3 = sqlite3CantopenError(0x9743);\n        iVar3 = unixLogErrorAtLine(iVar3,"readlink",zPath,0x9743);\n        bVar9 = iVar3 == 0;\n      }\n      else {\n        bVar9 = true;\n        local_98 = iVar4;\n        if (*local_a4 != '/') {\n          if (zPath == (char *)0x0) {\n            uVar6 = 0;\n          }\n          else {\n            sVar5 = strlen(zPath);\n            for (uVar6 = sVar5 & 0x3fffffff; uVar6 != 0; uVar6 = uVar6 - 1) {\n              if (zPath[uVar6 - 1] == '/') {\n                local_98 = iVar4 + uVar6;\n                break;\n              }\n            }\n          }\n          if (local_98 < nOut) {\n            memmove(local_a4 + uVar6,local_a4,iVar4 + 1);\n            memcpy(local_a4,zPath,uVar6);\n            bVar9 = true;\n          }\n          else {\n            iVar3 = sqlite3CantopenError(0x9749);\n            bVar9 = iVar3 == 0;\n            local_98 = iVar4;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((zOut != local_a4) && (bVar9)) {\n        bVar9 = true;\n        zPath = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar8 = __errno_location();\n      if (*piVar8 == 2) {\n        bVar9 = true;\n        iVar4 = 0;\n      }\n      else {\n        iVar3 = sqlite3CantopenError(0x9732);\n        iVar4 = unixLogErrorAtLine(iVar3,"lstat",zPath,0x9732);\n        bVar9 = iVar4 == 0;\n      }\n      if ((zPath == zOut) || (!bVar9)) goto LAB_0005647e;\nLAB_000564f3:\n      if (zPath == (char *)0x0) {\n                    /* WARNING: Does not return */\n        pcVar2 = (code *)invalidInstructionException();\n        (*pcVar2)();\n      }\n      bVar9 = false;\nLAB_000563d8:\n      sVar5 = strlen(zPath);\n      uVar6 = sVar5 & 0x3fffffff;\n      if (*zPath == '/') {\n        iVar3 = 0;\n        pcVar7 = zOut;\nLAB_0005643d:\n        if ((int)uVar6 < nOut) {\n          sqlite3_snprintf(nOut - iVar3,pcVar7,"%s",zPath);\n          zPath = zOut;\n          if (!bVar9) {\n            iVar4 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar7 = '\0';\n        iVar3 = sqlite3CantopenError(0x9702);\n      }\n      else {\n        iVar3 = (*aSyscall[3].pCurrent)(zOut,nOut + -2);\n        if (iVar3 != 0) {\n          if (zOut == (char *)0x0) {\n            pcVar7 = (char *)0x0;\n            iVar3 = 1;\n          }\n          else {\n            sVar5 = strlen(zOut);\n            iVar3 = (sVar5 & 0x3fffffff) + 1;\n            pcVar7 = zOut + (sVar5 & 0x3fffffff);\n          }\n          *pcVar7 = '/';\n          uVar6 = uVar6 + iVar3;\n          pcVar7 = zOut + iVar3;\n          goto LAB_0005643d;\n        }\n        iVar3 = sqlite3CantopenError(0x96f9);\n        iVar3 = unixLogErrorAtLine(iVar3,"getcwd",zPath,0x96f9);\n      }\n      iVar4 = iVar3;\n      if (!bVar9) goto LAB_0005647e;\n    }\n    iVar4 = iVar3;\n    zPath = zOut;\n    if (iVar3 != 0) {\nLAB_0005647e:\n      sqlite3_free(local_a4);\n      if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar4;\n      }\n                    /* WARNING: Subroutine does not return */\n      __stack_chk_fail_local();\n    }\n  }" { (expression_statement "iVar3 = (*aSyscall[0x1b].pCurrent)(zPath,&buf);" (assignment_expression "iVar3 = (*aSyscall[0x1b].pCurrent)(zPath,&buf)" identifier = (call_expression "(*aSyscall[0x1b].pCurrent)(zPath,&buf)" (parenthesized_expression "(*aSyscall[0x1b].pCurrent)" ( (pointer_expression "*aSyscall[0x1b].pCurrent" * (field_expression "aSyscall[0x1b].pCurrent" (subscript_expression "aSyscall[0x1b]" identifier [ number_literal ]) . field_identifier)) )) (argument_list "(zPath,&buf)" ( identifier , (pointer_expression "&buf" & identifier) )))) ;) (if_statement "if (iVar3 == 0) {\n      iVar3 = 0;\n      if ((buf.st_mode & 0xf000) != 0xa000) {\n        iVar4 = iVar3;\n        if (zPath != zOut) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)sqlite3_malloc(nOut);\n        if (local_a4 == (char *)0x0) {\n          iVar4 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar4 = sqlite3CantopenError(0x973d), iVar4 != 0))\n        goto LAB_0005647e;\n      }\n      iVar4 = (*aSyscall[0x1a].pCurrent)(zPath,local_a4,nOut + -1);\n      if (iVar4 < 0) {\n        iVar3 = sqlite3CantopenError(0x9743);\n        iVar3 = unixLogErrorAtLine(iVar3,"readlink",zPath,0x9743);\n        bVar9 = iVar3 == 0;\n      }\n      else {\n        bVar9 = true;\n        local_98 = iVar4;\n        if (*local_a4 != '/') {\n          if (zPath == (char *)0x0) {\n            uVar6 = 0;\n          }\n          else {\n            sVar5 = strlen(zPath);\n            for (uVar6 = sVar5 & 0x3fffffff; uVar6 != 0; uVar6 = uVar6 - 1) {\n              if (zPath[uVar6 - 1] == '/') {\n                local_98 = iVar4 + uVar6;\n                break;\n              }\n            }\n          }\n          if (local_98 < nOut) {\n            memmove(local_a4 + uVar6,local_a4,iVar4 + 1);\n            memcpy(local_a4,zPath,uVar6);\n            bVar9 = true;\n          }\n          else {\n            iVar3 = sqlite3CantopenError(0x9749);\n            bVar9 = iVar3 == 0;\n            local_98 = iVar4;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((zOut != local_a4) && (bVar9)) {\n        bVar9 = true;\n        zPath = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar8 = __errno_location();\n      if (*piVar8 == 2) {\n        bVar9 = true;\n        iVar4 = 0;\n      }\n      else {\n        iVar3 = sqlite3CantopenError(0x9732);\n        iVar4 = unixLogErrorAtLine(iVar3,"lstat",zPath,0x9732);\n        bVar9 = iVar4 == 0;\n      }\n      if ((zPath == zOut) || (!bVar9)) goto LAB_0005647e;\nLAB_000564f3:\n      if (zPath == (char *)0x0) {\n                    /* WARNING: Does not return */\n        pcVar2 = (code *)invalidInstructionException();\n        (*pcVar2)();\n      }\n      bVar9 = false;\nLAB_000563d8:\n      sVar5 = strlen(zPath);\n      uVar6 = sVar5 & 0x3fffffff;\n      if (*zPath == '/') {\n        iVar3 = 0;\n        pcVar7 = zOut;\nLAB_0005643d:\n        if ((int)uVar6 < nOut) {\n          sqlite3_snprintf(nOut - iVar3,pcVar7,"%s",zPath);\n          zPath = zOut;\n          if (!bVar9) {\n            iVar4 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar7 = '\0';\n        iVar3 = sqlite3CantopenError(0x9702);\n      }\n      else {\n        iVar3 = (*aSyscall[3].pCurrent)(zOut,nOut + -2);\n        if (iVar3 != 0) {\n          if (zOut == (char *)0x0) {\n            pcVar7 = (char *)0x0;\n            iVar3 = 1;\n          }\n          else {\n            sVar5 = strlen(zOut);\n            iVar3 = (sVar5 & 0x3fffffff) + 1;\n            pcVar7 = zOut + (sVar5 & 0x3fffffff);\n          }\n          *pcVar7 = '/';\n          uVar6 = uVar6 + iVar3;\n          pcVar7 = zOut + iVar3;\n          goto LAB_0005643d;\n        }\n        iVar3 = sqlite3CantopenError(0x96f9);\n        iVar3 = unixLogErrorAtLine(iVar3,"getcwd",zPath,0x96f9);\n      }\n      iVar4 = iVar3;\n      if (!bVar9) goto LAB_0005647e;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar3 = 0;\n      if ((buf.st_mode & 0xf000) != 0xa000) {\n        iVar4 = iVar3;\n        if (zPath != zOut) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)sqlite3_malloc(nOut);\n        if (local_a4 == (char *)0x0) {\n          iVar4 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar4 = sqlite3CantopenError(0x973d), iVar4 != 0))\n        goto LAB_0005647e;\n      }\n      iVar4 = (*aSyscall[0x1a].pCurrent)(zPath,local_a4,nOut + -1);\n      if (iVar4 < 0) {\n        iVar3 = sqlite3CantopenError(0x9743);\n        iVar3 = unixLogErrorAtLine(iVar3,"readlink",zPath,0x9743);\n        bVar9 = iVar3 == 0;\n      }\n      else {\n        bVar9 = true;\n        local_98 = iVar4;\n        if (*local_a4 != '/') {\n          if (zPath == (char *)0x0) {\n            uVar6 = 0;\n          }\n          else {\n            sVar5 = strlen(zPath);\n            for (uVar6 = sVar5 & 0x3fffffff; uVar6 != 0; uVar6 = uVar6 - 1) {\n              if (zPath[uVar6 - 1] == '/') {\n                local_98 = iVar4 + uVar6;\n                break;\n              }\n            }\n          }\n          if (local_98 < nOut) {\n            memmove(local_a4 + uVar6,local_a4,iVar4 + 1);\n            memcpy(local_a4,zPath,uVar6);\n            bVar9 = true;\n          }\n          else {\n            iVar3 = sqlite3CantopenError(0x9749);\n            bVar9 = iVar3 == 0;\n            local_98 = iVar4;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((zOut != local_a4) && (bVar9)) {\n        bVar9 = true;\n        zPath = local_a4;\n        goto LAB_000563d8;\n      }\n    }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (if_statement "if ((buf.st_mode & 0xf000) != 0xa000) {\n        iVar4 = iVar3;\n        if (zPath != zOut) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }" if (parenthesized_expression "((buf.st_mode & 0xf000) != 0xa000)" ( (binary_expression "(buf.st_mode & 0xf000) != 0xa000" (parenthesized_expression "(buf.st_mode & 0xf000)" ( (binary_expression "buf.st_mode & 0xf000" (field_expression "buf.st_mode" identifier . field_identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n        iVar4 = iVar3;\n        if (zPath != zOut) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }" { (expression_statement "iVar4 = iVar3;" (assignment_expression "iVar4 = iVar3" identifier = identifier) ;) (if_statement "if (zPath != zOut) goto LAB_000564f3;" if (parenthesized_expression "(zPath != zOut)" ( (binary_expression "zPath != zOut" identifier != identifier) )) (goto_statement "goto LAB_000564f3;" goto statement_identifier ;)) (goto_statement "goto LAB_0005647e;" goto statement_identifier ;) })) (if_statement "if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)sqlite3_malloc(nOut);\n        if (local_a4 == (char *)0x0) {\n          iVar4 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar4 = sqlite3CantopenError(0x973d), iVar4 != 0))\n        goto LAB_0005647e;\n      }" if (parenthesized_expression "(local_a4 == (char *)0x0)" ( (binary_expression "local_a4 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        local_a4 = (char *)sqlite3_malloc(nOut);\n        if (local_a4 == (char *)0x0) {\n          iVar4 = 7;\n          goto LAB_0005647e;\n        }\n      }" { (expression_statement "local_a4 = (char *)sqlite3_malloc(nOut);" (assignment_expression "local_a4 = (char *)sqlite3_malloc(nOut)" identifier = (cast_expression "(char *)sqlite3_malloc(nOut)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3_malloc(nOut)" identifier (argument_list "(nOut)" ( identifier ))))) ;) (if_statement "if (local_a4 == (char *)0x0) {\n          iVar4 = 7;\n          goto LAB_0005647e;\n        }" if (parenthesized_expression "(local_a4 == (char *)0x0)" ( (binary_expression "local_a4 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          iVar4 = 7;\n          goto LAB_0005647e;\n        }" { (expression_statement "iVar4 = 7;" (assignment_expression "iVar4 = 7" identifier = number_literal) ;) (goto_statement "goto LAB_0005647e;" goto statement_identifier ;) })) }) (else_clause "else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar4 = sqlite3CantopenError(0x973d), iVar4 != 0))\n        goto LAB_0005647e;\n      }" else (compound_statement "{\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar4 = sqlite3CantopenError(0x973d), iVar4 != 0))\n        goto LAB_0005647e;\n      }" { (expression_statement "local_9c = local_9c + 1;" (assignment_expression "local_9c = local_9c + 1" identifier = (binary_expression "local_9c + 1" identifier + number_literal)) ;) (if_statement "if ((100 < local_9c) && (iVar4 = sqlite3CantopenError(0x973d), iVar4 != 0))\n        goto LAB_0005647e;" if (parenthesized_expression "((100 < local_9c) && (iVar4 = sqlite3CantopenError(0x973d), iVar4 != 0))" ( (binary_expression "(100 < local_9c) && (iVar4 = sqlite3CantopenError(0x973d), iVar4 != 0)" (parenthesized_expression "(100 < local_9c)" ( (binary_expression "100 < local_9c" number_literal < identifier) )) && (parenthesized_expression "(iVar4 = sqlite3CantopenError(0x973d), iVar4 != 0)" ( (comma_expression "iVar4 = sqlite3CantopenError(0x973d), iVar4 != 0" (assignment_expression "iVar4 = sqlite3CantopenError(0x973d)" identifier = (call_expression "sqlite3CantopenError(0x973d)" identifier (argument_list "(0x973d)" ( number_literal )))) , (binary_expression "iVar4 != 0" identifier != number_literal)) ))) )) (goto_statement "goto LAB_0005647e;" goto statement_identifier ;)) }))) (expression_statement "iVar4 = (*aSyscall[0x1a].pCurrent)(zPath,local_a4,nOut + -1);" (assignment_expression "iVar4 = (*aSyscall[0x1a].pCurrent)(zPath,local_a4,nOut + -1)" identifier = (call_expression "(*aSyscall[0x1a].pCurrent)(zPath,local_a4,nOut + -1)" (parenthesized_expression "(*aSyscall[0x1a].pCurrent)" ( (pointer_expression "*aSyscall[0x1a].pCurrent" * (field_expression "aSyscall[0x1a].pCurrent" (subscript_expression "aSyscall[0x1a]" identifier [ number_literal ]) . field_identifier)) )) (argument_list "(zPath,local_a4,nOut + -1)" ( identifier , identifier , (binary_expression "nOut + -1" identifier + number_literal) )))) ;) (if_statement "if (iVar4 < 0) {\n        iVar3 = sqlite3CantopenError(0x9743);\n        iVar3 = unixLogErrorAtLine(iVar3,"readlink",zPath,0x9743);\n        bVar9 = iVar3 == 0;\n      }\n      else {\n        bVar9 = true;\n        local_98 = iVar4;\n        if (*local_a4 != '/') {\n          if (zPath == (char *)0x0) {\n            uVar6 = 0;\n          }\n          else {\n            sVar5 = strlen(zPath);\n            for (uVar6 = sVar5 & 0x3fffffff; uVar6 != 0; uVar6 = uVar6 - 1) {\n              if (zPath[uVar6 - 1] == '/') {\n                local_98 = iVar4 + uVar6;\n                break;\n              }\n            }\n          }\n          if (local_98 < nOut) {\n            memmove(local_a4 + uVar6,local_a4,iVar4 + 1);\n            memcpy(local_a4,zPath,uVar6);\n            bVar9 = true;\n          }\n          else {\n            iVar3 = sqlite3CantopenError(0x9749);\n            bVar9 = iVar3 == 0;\n            local_98 = iVar4;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }" if (parenthesized_expression "(iVar4 < 0)" ( (binary_expression "iVar4 < 0" identifier < number_literal) )) (compound_statement "{\n        iVar3 = sqlite3CantopenError(0x9743);\n        iVar3 = unixLogErrorAtLine(iVar3,"readlink",zPath,0x9743);\n        bVar9 = iVar3 == 0;\n      }" { (expression_statement "iVar3 = sqlite3CantopenError(0x9743);" (assignment_expression "iVar3 = sqlite3CantopenError(0x9743)" identifier = (call_expression "sqlite3CantopenError(0x9743)" identifier (argument_list "(0x9743)" ( number_literal )))) ;) (expression_statement "iVar3 = unixLogErrorAtLine(iVar3,"readlink",zPath,0x9743);" (assignment_expression "iVar3 = unixLogErrorAtLine(iVar3,"readlink",zPath,0x9743)" identifier = (call_expression "unixLogErrorAtLine(iVar3,"readlink",zPath,0x9743)" identifier (argument_list "(iVar3,"readlink",zPath,0x9743)" ( identifier , (string_literal ""readlink"" " string_content ") , identifier , number_literal )))) ;) (expression_statement "bVar9 = iVar3 == 0;" (assignment_expression "bVar9 = iVar3 == 0" identifier = (binary_expression "iVar3 == 0" identifier == number_literal)) ;) }) (else_clause "else {\n        bVar9 = true;\n        local_98 = iVar4;\n        if (*local_a4 != '/') {\n          if (zPath == (char *)0x0) {\n            uVar6 = 0;\n          }\n          else {\n            sVar5 = strlen(zPath);\n            for (uVar6 = sVar5 & 0x3fffffff; uVar6 != 0; uVar6 = uVar6 - 1) {\n              if (zPath[uVar6 - 1] == '/') {\n                local_98 = iVar4 + uVar6;\n                break;\n              }\n            }\n          }\n          if (local_98 < nOut) {\n            memmove(local_a4 + uVar6,local_a4,iVar4 + 1);\n            memcpy(local_a4,zPath,uVar6);\n            bVar9 = true;\n          }\n          else {\n            iVar3 = sqlite3CantopenError(0x9749);\n            bVar9 = iVar3 == 0;\n            local_98 = iVar4;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }" else (compound_statement "{\n        bVar9 = true;\n        local_98 = iVar4;\n        if (*local_a4 != '/') {\n          if (zPath == (char *)0x0) {\n            uVar6 = 0;\n          }\n          else {\n            sVar5 = strlen(zPath);\n            for (uVar6 = sVar5 & 0x3fffffff; uVar6 != 0; uVar6 = uVar6 - 1) {\n              if (zPath[uVar6 - 1] == '/') {\n                local_98 = iVar4 + uVar6;\n                break;\n              }\n            }\n          }\n          if (local_98 < nOut) {\n            memmove(local_a4 + uVar6,local_a4,iVar4 + 1);\n            memcpy(local_a4,zPath,uVar6);\n            bVar9 = true;\n          }\n          else {\n            iVar3 = sqlite3CantopenError(0x9749);\n            bVar9 = iVar3 == 0;\n            local_98 = iVar4;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }" { (expression_statement "bVar9 = true;" (assignment_expression "bVar9 = true" identifier = true) ;) (expression_statement "local_98 = iVar4;" (assignment_expression "local_98 = iVar4" identifier = identifier) ;) (if_statement "if (*local_a4 != '/') {\n          if (zPath == (char *)0x0) {\n            uVar6 = 0;\n          }\n          else {\n            sVar5 = strlen(zPath);\n            for (uVar6 = sVar5 & 0x3fffffff; uVar6 != 0; uVar6 = uVar6 - 1) {\n              if (zPath[uVar6 - 1] == '/') {\n                local_98 = iVar4 + uVar6;\n                break;\n              }\n            }\n          }\n          if (local_98 < nOut) {\n            memmove(local_a4 + uVar6,local_a4,iVar4 + 1);\n            memcpy(local_a4,zPath,uVar6);\n            bVar9 = true;\n          }\n          else {\n            iVar3 = sqlite3CantopenError(0x9749);\n            bVar9 = iVar3 == 0;\n            local_98 = iVar4;\n          }\n        }" if (parenthesized_expression "(*local_a4 != '/')" ( (binary_expression "*local_a4 != '/'" (pointer_expression "*local_a4" * identifier) != (char_literal "'/'" ' character ')) )) (compound_statement "{\n          if (zPath == (char *)0x0) {\n            uVar6 = 0;\n          }\n          else {\n            sVar5 = strlen(zPath);\n            for (uVar6 = sVar5 & 0x3fffffff; uVar6 != 0; uVar6 = uVar6 - 1) {\n              if (zPath[uVar6 - 1] == '/') {\n                local_98 = iVar4 + uVar6;\n                break;\n              }\n            }\n          }\n          if (local_98 < nOut) {\n            memmove(local_a4 + uVar6,local_a4,iVar4 + 1);\n            memcpy(local_a4,zPath,uVar6);\n            bVar9 = true;\n          }\n          else {\n            iVar3 = sqlite3CantopenError(0x9749);\n            bVar9 = iVar3 == 0;\n            local_98 = iVar4;\n          }\n        }" { (if_statement "if (zPath == (char *)0x0) {\n            uVar6 = 0;\n          }\n          else {\n            sVar5 = strlen(zPath);\n            for (uVar6 = sVar5 & 0x3fffffff; uVar6 != 0; uVar6 = uVar6 - 1) {\n              if (zPath[uVar6 - 1] == '/') {\n                local_98 = iVar4 + uVar6;\n                break;\n              }\n            }\n          }" if (parenthesized_expression "(zPath == (char *)0x0)" ( (binary_expression "zPath == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            uVar6 = 0;\n          }" { (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" identifier = number_literal) ;) }) (else_clause "else {\n            sVar5 = strlen(zPath);\n            for (uVar6 = sVar5 & 0x3fffffff; uVar6 != 0; uVar6 = uVar6 - 1) {\n              if (zPath[uVar6 - 1] == '/') {\n                local_98 = iVar4 + uVar6;\n                break;\n              }\n            }\n          }" else (compound_statement "{\n            sVar5 = strlen(zPath);\n            for (uVar6 = sVar5 & 0x3fffffff; uVar6 != 0; uVar6 = uVar6 - 1) {\n              if (zPath[uVar6 - 1] == '/') {\n                local_98 = iVar4 + uVar6;\n                break;\n              }\n            }\n          }" { (expression_statement "sVar5 = strlen(zPath);" (assignment_expression "sVar5 = strlen(zPath)" identifier = (call_expression "strlen(zPath)" identifier (argument_list "(zPath)" ( identifier )))) ;) (for_statement "for (uVar6 = sVar5 & 0x3fffffff; uVar6 != 0; uVar6 = uVar6 - 1) {\n              if (zPath[uVar6 - 1] == '/') {\n                local_98 = iVar4 + uVar6;\n                break;\n              }\n            }" for ( (assignment_expression "uVar6 = sVar5 & 0x3fffffff" identifier = (binary_expression "sVar5 & 0x3fffffff" identifier & number_literal)) ; (binary_expression "uVar6 != 0" identifier != number_literal) ; (assignment_expression "uVar6 = uVar6 - 1" identifier = (binary_expression "uVar6 - 1" identifier - number_literal)) ) (compound_statement "{\n              if (zPath[uVar6 - 1] == '/') {\n                local_98 = iVar4 + uVar6;\n                break;\n              }\n            }" { (if_statement "if (zPath[uVar6 - 1] == '/') {\n                local_98 = iVar4 + uVar6;\n                break;\n              }" if (parenthesized_expression "(zPath[uVar6 - 1] == '/')" ( (binary_expression "zPath[uVar6 - 1] == '/'" (subscript_expression "zPath[uVar6 - 1]" identifier [ (binary_expression "uVar6 - 1" identifier - number_literal) ]) == (char_literal "'/'" ' character ')) )) (compound_statement "{\n                local_98 = iVar4 + uVar6;\n                break;\n              }" { (expression_statement "local_98 = iVar4 + uVar6;" (assignment_expression "local_98 = iVar4 + uVar6" identifier = (binary_expression "iVar4 + uVar6" identifier + identifier)) ;) (break_statement "break;" break ;) })) })) }))) (if_statement "if (local_98 < nOut) {\n            memmove(local_a4 + uVar6,local_a4,iVar4 + 1);\n            memcpy(local_a4,zPath,uVar6);\n            bVar9 = true;\n          }\n          else {\n            iVar3 = sqlite3CantopenError(0x9749);\n            bVar9 = iVar3 == 0;\n            local_98 = iVar4;\n          }" if (parenthesized_expression "(local_98 < nOut)" ( (binary_expression "local_98 < nOut" identifier < identifier) )) (compound_statement "{\n            memmove(local_a4 + uVar6,local_a4,iVar4 + 1);\n            memcpy(local_a4,zPath,uVar6);\n            bVar9 = true;\n          }" { (expression_statement "memmove(local_a4 + uVar6,local_a4,iVar4 + 1);" (call_expression "memmove(local_a4 + uVar6,local_a4,iVar4 + 1)" identifier (argument_list "(local_a4 + uVar6,local_a4,iVar4 + 1)" ( (binary_expression "local_a4 + uVar6" identifier + identifier) , identifier , (binary_expression "iVar4 + 1" identifier + number_literal) ))) ;) (expression_statement "memcpy(local_a4,zPath,uVar6);" (call_expression "memcpy(local_a4,zPath,uVar6)" identifier (argument_list "(local_a4,zPath,uVar6)" ( identifier , identifier , identifier ))) ;) (expression_statement "bVar9 = true;" (assignment_expression "bVar9 = true" identifier = true) ;) }) (else_clause "else {\n            iVar3 = sqlite3CantopenError(0x9749);\n            bVar9 = iVar3 == 0;\n            local_98 = iVar4;\n          }" else (compound_statement "{\n            iVar3 = sqlite3CantopenError(0x9749);\n            bVar9 = iVar3 == 0;\n            local_98 = iVar4;\n          }" { (expression_statement "iVar3 = sqlite3CantopenError(0x9749);" (assignment_expression "iVar3 = sqlite3CantopenError(0x9749)" identifier = (call_expression "sqlite3CantopenError(0x9749)" identifier (argument_list "(0x9749)" ( number_literal )))) ;) (expression_statement "bVar9 = iVar3 == 0;" (assignment_expression "bVar9 = iVar3 == 0" identifier = (binary_expression "iVar3 == 0" identifier == number_literal)) ;) (expression_statement "local_98 = iVar4;" (assignment_expression "local_98 = iVar4" identifier = identifier) ;) }))) })) (expression_statement "local_a4[local_98] = '\0';" (assignment_expression "local_a4[local_98] = '\0'" (subscript_expression "local_a4[local_98]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) }))) (if_statement "if ((zOut != local_a4) && (bVar9)) {\n        bVar9 = true;\n        zPath = local_a4;\n        goto LAB_000563d8;\n      }" if (parenthesized_expression "((zOut != local_a4) && (bVar9))" ( (binary_expression "(zOut != local_a4) && (bVar9)" (parenthesized_expression "(zOut != local_a4)" ( (binary_expression "zOut != local_a4" identifier != identifier) )) && (parenthesized_expression "(bVar9)" ( identifier ))) )) (compound_statement "{\n        bVar9 = true;\n        zPath = local_a4;\n        goto LAB_000563d8;\n      }" { (expression_statement "bVar9 = true;" (assignment_expression "bVar9 = true" identifier = true) ;) (expression_statement "zPath = local_a4;" (assignment_expression "zPath = local_a4" identifier = identifier) ;) (goto_statement "goto LAB_000563d8;" goto statement_identifier ;) })) }) (else_clause "else {\n      piVar8 = __errno_location();\n      if (*piVar8 == 2) {\n        bVar9 = true;\n        iVar4 = 0;\n      }\n      else {\n        iVar3 = sqlite3CantopenError(0x9732);\n        iVar4 = unixLogErrorAtLine(iVar3,"lstat",zPath,0x9732);\n        bVar9 = iVar4 == 0;\n      }\n      if ((zPath == zOut) || (!bVar9)) goto LAB_0005647e;\nLAB_000564f3:\n      if (zPath == (char *)0x0) {\n                    /* WARNING: Does not return */\n        pcVar2 = (code *)invalidInstructionException();\n        (*pcVar2)();\n      }\n      bVar9 = false;\nLAB_000563d8:\n      sVar5 = strlen(zPath);\n      uVar6 = sVar5 & 0x3fffffff;\n      if (*zPath == '/') {\n        iVar3 = 0;\n        pcVar7 = zOut;\nLAB_0005643d:\n        if ((int)uVar6 < nOut) {\n          sqlite3_snprintf(nOut - iVar3,pcVar7,"%s",zPath);\n          zPath = zOut;\n          if (!bVar9) {\n            iVar4 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar7 = '\0';\n        iVar3 = sqlite3CantopenError(0x9702);\n      }\n      else {\n        iVar3 = (*aSyscall[3].pCurrent)(zOut,nOut + -2);\n        if (iVar3 != 0) {\n          if (zOut == (char *)0x0) {\n            pcVar7 = (char *)0x0;\n            iVar3 = 1;\n          }\n          else {\n            sVar5 = strlen(zOut);\n            iVar3 = (sVar5 & 0x3fffffff) + 1;\n            pcVar7 = zOut + (sVar5 & 0x3fffffff);\n          }\n          *pcVar7 = '/';\n          uVar6 = uVar6 + iVar3;\n          pcVar7 = zOut + iVar3;\n          goto LAB_0005643d;\n        }\n        iVar3 = sqlite3CantopenError(0x96f9);\n        iVar3 = unixLogErrorAtLine(iVar3,"getcwd",zPath,0x96f9);\n      }\n      iVar4 = iVar3;\n      if (!bVar9) goto LAB_0005647e;\n    }" else (compound_statement "{\n      piVar8 = __errno_location();\n      if (*piVar8 == 2) {\n        bVar9 = true;\n        iVar4 = 0;\n      }\n      else {\n        iVar3 = sqlite3CantopenError(0x9732);\n        iVar4 = unixLogErrorAtLine(iVar3,"lstat",zPath,0x9732);\n        bVar9 = iVar4 == 0;\n      }\n      if ((zPath == zOut) || (!bVar9)) goto LAB_0005647e;\nLAB_000564f3:\n      if (zPath == (char *)0x0) {\n                    /* WARNING: Does not return */\n        pcVar2 = (code *)invalidInstructionException();\n        (*pcVar2)();\n      }\n      bVar9 = false;\nLAB_000563d8:\n      sVar5 = strlen(zPath);\n      uVar6 = sVar5 & 0x3fffffff;\n      if (*zPath == '/') {\n        iVar3 = 0;\n        pcVar7 = zOut;\nLAB_0005643d:\n        if ((int)uVar6 < nOut) {\n          sqlite3_snprintf(nOut - iVar3,pcVar7,"%s",zPath);\n          zPath = zOut;\n          if (!bVar9) {\n            iVar4 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar7 = '\0';\n        iVar3 = sqlite3CantopenError(0x9702);\n      }\n      else {\n        iVar3 = (*aSyscall[3].pCurrent)(zOut,nOut + -2);\n        if (iVar3 != 0) {\n          if (zOut == (char *)0x0) {\n            pcVar7 = (char *)0x0;\n            iVar3 = 1;\n          }\n          else {\n            sVar5 = strlen(zOut);\n            iVar3 = (sVar5 & 0x3fffffff) + 1;\n            pcVar7 = zOut + (sVar5 & 0x3fffffff);\n          }\n          *pcVar7 = '/';\n          uVar6 = uVar6 + iVar3;\n          pcVar7 = zOut + iVar3;\n          goto LAB_0005643d;\n        }\n        iVar3 = sqlite3CantopenError(0x96f9);\n        iVar3 = unixLogErrorAtLine(iVar3,"getcwd",zPath,0x96f9);\n      }\n      iVar4 = iVar3;\n      if (!bVar9) goto LAB_0005647e;\n    }" { (expression_statement "piVar8 = __errno_location();" (assignment_expression "piVar8 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*piVar8 == 2) {\n        bVar9 = true;\n        iVar4 = 0;\n      }\n      else {\n        iVar3 = sqlite3CantopenError(0x9732);\n        iVar4 = unixLogErrorAtLine(iVar3,"lstat",zPath,0x9732);\n        bVar9 = iVar4 == 0;\n      }" if (parenthesized_expression "(*piVar8 == 2)" ( (binary_expression "*piVar8 == 2" (pointer_expression "*piVar8" * identifier) == number_literal) )) (compound_statement "{\n        bVar9 = true;\n        iVar4 = 0;\n      }" { (expression_statement "bVar9 = true;" (assignment_expression "bVar9 = true" identifier = true) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n        iVar3 = sqlite3CantopenError(0x9732);\n        iVar4 = unixLogErrorAtLine(iVar3,"lstat",zPath,0x9732);\n        bVar9 = iVar4 == 0;\n      }" else (compound_statement "{\n        iVar3 = sqlite3CantopenError(0x9732);\n        iVar4 = unixLogErrorAtLine(iVar3,"lstat",zPath,0x9732);\n        bVar9 = iVar4 == 0;\n      }" { (expression_statement "iVar3 = sqlite3CantopenError(0x9732);" (assignment_expression "iVar3 = sqlite3CantopenError(0x9732)" identifier = (call_expression "sqlite3CantopenError(0x9732)" identifier (argument_list "(0x9732)" ( number_literal )))) ;) (expression_statement "iVar4 = unixLogErrorAtLine(iVar3,"lstat",zPath,0x9732);" (assignment_expression "iVar4 = unixLogErrorAtLine(iVar3,"lstat",zPath,0x9732)" identifier = (call_expression "unixLogErrorAtLine(iVar3,"lstat",zPath,0x9732)" identifier (argument_list "(iVar3,"lstat",zPath,0x9732)" ( identifier , (string_literal ""lstat"" " string_content ") , identifier , number_literal )))) ;) (expression_statement "bVar9 = iVar4 == 0;" (assignment_expression "bVar9 = iVar4 == 0" identifier = (binary_expression "iVar4 == 0" identifier == number_literal)) ;) }))) (if_statement "if ((zPath == zOut) || (!bVar9)) goto LAB_0005647e;" if (parenthesized_expression "((zPath == zOut) || (!bVar9))" ( (binary_expression "(zPath == zOut) || (!bVar9)" (parenthesized_expression "(zPath == zOut)" ( (binary_expression "zPath == zOut" identifier == identifier) )) || (parenthesized_expression "(!bVar9)" ( (unary_expression "!bVar9" ! identifier) ))) )) (goto_statement "goto LAB_0005647e;" goto statement_identifier ;)) (labeled_statement "LAB_000564f3:\n      if (zPath == (char *)0x0) {\n                    /* WARNING: Does not return */\n        pcVar2 = (code *)invalidInstructionException();\n        (*pcVar2)();\n      }" statement_identifier : (if_statement "if (zPath == (char *)0x0) {\n                    /* WARNING: Does not return */\n        pcVar2 = (code *)invalidInstructionException();\n        (*pcVar2)();\n      }" if (parenthesized_expression "(zPath == (char *)0x0)" ( (binary_expression "zPath == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Does not return */\n        pcVar2 = (code *)invalidInstructionException();\n        (*pcVar2)();\n      }" { comment (expression_statement "pcVar2 = (code *)invalidInstructionException();" (assignment_expression "pcVar2 = (code *)invalidInstructionException()" identifier = (cast_expression "(code *)invalidInstructionException()" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "invalidInstructionException()" identifier (argument_list "()" ( ))))) ;) (expression_statement "(*pcVar2)();" (call_expression "(*pcVar2)()" (parenthesized_expression "(*pcVar2)" ( (pointer_expression "*pcVar2" * identifier) )) (argument_list "()" ( ))) ;) }))) (expression_statement "bVar9 = false;" (assignment_expression "bVar9 = false" identifier = false) ;) (labeled_statement "LAB_000563d8:\n      sVar5 = strlen(zPath);" statement_identifier : (expression_statement "sVar5 = strlen(zPath);" (assignment_expression "sVar5 = strlen(zPath)" identifier = (call_expression "strlen(zPath)" identifier (argument_list "(zPath)" ( identifier )))) ;)) (expression_statement "uVar6 = sVar5 & 0x3fffffff;" (assignment_expression "uVar6 = sVar5 & 0x3fffffff" identifier = (binary_expression "sVar5 & 0x3fffffff" identifier & number_literal)) ;) (if_statement "if (*zPath == '/') {\n        iVar3 = 0;\n        pcVar7 = zOut;\nLAB_0005643d:\n        if ((int)uVar6 < nOut) {\n          sqlite3_snprintf(nOut - iVar3,pcVar7,"%s",zPath);\n          zPath = zOut;\n          if (!bVar9) {\n            iVar4 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar7 = '\0';\n        iVar3 = sqlite3CantopenError(0x9702);\n      }\n      else {\n        iVar3 = (*aSyscall[3].pCurrent)(zOut,nOut + -2);\n        if (iVar3 != 0) {\n          if (zOut == (char *)0x0) {\n            pcVar7 = (char *)0x0;\n            iVar3 = 1;\n          }\n          else {\n            sVar5 = strlen(zOut);\n            iVar3 = (sVar5 & 0x3fffffff) + 1;\n            pcVar7 = zOut + (sVar5 & 0x3fffffff);\n          }\n          *pcVar7 = '/';\n          uVar6 = uVar6 + iVar3;\n          pcVar7 = zOut + iVar3;\n          goto LAB_0005643d;\n        }\n        iVar3 = sqlite3CantopenError(0x96f9);\n        iVar3 = unixLogErrorAtLine(iVar3,"getcwd",zPath,0x96f9);\n      }" if (parenthesized_expression "(*zPath == '/')" ( (binary_expression "*zPath == '/'" (pointer_expression "*zPath" * identifier) == (char_literal "'/'" ' character ')) )) (compound_statement "{\n        iVar3 = 0;\n        pcVar7 = zOut;\nLAB_0005643d:\n        if ((int)uVar6 < nOut) {\n          sqlite3_snprintf(nOut - iVar3,pcVar7,"%s",zPath);\n          zPath = zOut;\n          if (!bVar9) {\n            iVar4 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar7 = '\0';\n        iVar3 = sqlite3CantopenError(0x9702);\n      }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "pcVar7 = zOut;" (assignment_expression "pcVar7 = zOut" identifier = identifier) ;) (labeled_statement "LAB_0005643d:\n        if ((int)uVar6 < nOut) {\n          sqlite3_snprintf(nOut - iVar3,pcVar7,"%s",zPath);\n          zPath = zOut;\n          if (!bVar9) {\n            iVar4 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }" statement_identifier : (if_statement "if ((int)uVar6 < nOut) {\n          sqlite3_snprintf(nOut - iVar3,pcVar7,"%s",zPath);\n          zPath = zOut;\n          if (!bVar9) {\n            iVar4 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }" if (parenthesized_expression "((int)uVar6 < nOut)" ( (binary_expression "(int)uVar6 < nOut" (cast_expression "(int)uVar6" ( (type_descriptor "int" primitive_type) ) identifier) < identifier) )) (compound_statement "{\n          sqlite3_snprintf(nOut - iVar3,pcVar7,"%s",zPath);\n          zPath = zOut;\n          if (!bVar9) {\n            iVar4 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }" { (expression_statement "sqlite3_snprintf(nOut - iVar3,pcVar7,"%s",zPath);" (call_expression "sqlite3_snprintf(nOut - iVar3,pcVar7,"%s",zPath)" identifier (argument_list "(nOut - iVar3,pcVar7,"%s",zPath)" ( (binary_expression "nOut - iVar3" identifier - identifier) , identifier , (string_literal ""%s"" " string_content ") , identifier ))) ;) (expression_statement "zPath = zOut;" (assignment_expression "zPath = zOut" identifier = identifier) ;) (if_statement "if (!bVar9) {\n            iVar4 = 0;\n            goto LAB_0005647e;\n          }" if (parenthesized_expression "(!bVar9)" ( (unary_expression "!bVar9" ! identifier) )) (compound_statement "{\n            iVar4 = 0;\n            goto LAB_0005647e;\n          }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_0005647e;" goto statement_identifier ;) })) (goto_statement "goto LAB_00056320;" goto statement_identifier ;) }))) (expression_statement "*pcVar7 = '\0';" (assignment_expression "*pcVar7 = '\0'" (pointer_expression "*pcVar7" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "iVar3 = sqlite3CantopenError(0x9702);" (assignment_expression "iVar3 = sqlite3CantopenError(0x9702)" identifier = (call_expression "sqlite3CantopenError(0x9702)" identifier (argument_list "(0x9702)" ( number_literal )))) ;) }) (else_clause "else {\n        iVar3 = (*aSyscall[3].pCurrent)(zOut,nOut + -2);\n        if (iVar3 != 0) {\n          if (zOut == (char *)0x0) {\n            pcVar7 = (char *)0x0;\n            iVar3 = 1;\n          }\n          else {\n            sVar5 = strlen(zOut);\n            iVar3 = (sVar5 & 0x3fffffff) + 1;\n            pcVar7 = zOut + (sVar5 & 0x3fffffff);\n          }\n          *pcVar7 = '/';\n          uVar6 = uVar6 + iVar3;\n          pcVar7 = zOut + iVar3;\n          goto LAB_0005643d;\n        }\n        iVar3 = sqlite3CantopenError(0x96f9);\n        iVar3 = unixLogErrorAtLine(iVar3,"getcwd",zPath,0x96f9);\n      }" else (compound_statement "{\n        iVar3 = (*aSyscall[3].pCurrent)(zOut,nOut + -2);\n        if (iVar3 != 0) {\n          if (zOut == (char *)0x0) {\n            pcVar7 = (char *)0x0;\n            iVar3 = 1;\n          }\n          else {\n            sVar5 = strlen(zOut);\n            iVar3 = (sVar5 & 0x3fffffff) + 1;\n            pcVar7 = zOut + (sVar5 & 0x3fffffff);\n          }\n          *pcVar7 = '/';\n          uVar6 = uVar6 + iVar3;\n          pcVar7 = zOut + iVar3;\n          goto LAB_0005643d;\n        }\n        iVar3 = sqlite3CantopenError(0x96f9);\n        iVar3 = unixLogErrorAtLine(iVar3,"getcwd",zPath,0x96f9);\n      }" { (expression_statement "iVar3 = (*aSyscall[3].pCurrent)(zOut,nOut + -2);" (assignment_expression "iVar3 = (*aSyscall[3].pCurrent)(zOut,nOut + -2)" identifier = (call_expression "(*aSyscall[3].pCurrent)(zOut,nOut + -2)" (parenthesized_expression "(*aSyscall[3].pCurrent)" ( (pointer_expression "*aSyscall[3].pCurrent" * (field_expression "aSyscall[3].pCurrent" (subscript_expression "aSyscall[3]" identifier [ number_literal ]) . field_identifier)) )) (argument_list "(zOut,nOut + -2)" ( identifier , (binary_expression "nOut + -2" identifier + number_literal) )))) ;) (if_statement "if (iVar3 != 0) {\n          if (zOut == (char *)0x0) {\n            pcVar7 = (char *)0x0;\n            iVar3 = 1;\n          }\n          else {\n            sVar5 = strlen(zOut);\n            iVar3 = (sVar5 & 0x3fffffff) + 1;\n            pcVar7 = zOut + (sVar5 & 0x3fffffff);\n          }\n          *pcVar7 = '/';\n          uVar6 = uVar6 + iVar3;\n          pcVar7 = zOut + iVar3;\n          goto LAB_0005643d;\n        }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n          if (zOut == (char *)0x0) {\n            pcVar7 = (char *)0x0;\n            iVar3 = 1;\n          }\n          else {\n            sVar5 = strlen(zOut);\n            iVar3 = (sVar5 & 0x3fffffff) + 1;\n            pcVar7 = zOut + (sVar5 & 0x3fffffff);\n          }\n          *pcVar7 = '/';\n          uVar6 = uVar6 + iVar3;\n          pcVar7 = zOut + iVar3;\n          goto LAB_0005643d;\n        }" { (if_statement "if (zOut == (char *)0x0) {\n            pcVar7 = (char *)0x0;\n            iVar3 = 1;\n          }\n          else {\n            sVar5 = strlen(zOut);\n            iVar3 = (sVar5 & 0x3fffffff) + 1;\n            pcVar7 = zOut + (sVar5 & 0x3fffffff);\n          }" if (parenthesized_expression "(zOut == (char *)0x0)" ( (binary_expression "zOut == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            pcVar7 = (char *)0x0;\n            iVar3 = 1;\n          }" { (expression_statement "pcVar7 = (char *)0x0;" (assignment_expression "pcVar7 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "iVar3 = 1;" (assignment_expression "iVar3 = 1" identifier = number_literal) ;) }) (else_clause "else {\n            sVar5 = strlen(zOut);\n            iVar3 = (sVar5 & 0x3fffffff) + 1;\n            pcVar7 = zOut + (sVar5 & 0x3fffffff);\n          }" else (compound_statement "{\n            sVar5 = strlen(zOut);\n            iVar3 = (sVar5 & 0x3fffffff) + 1;\n            pcVar7 = zOut + (sVar5 & 0x3fffffff);\n          }" { (expression_statement "sVar5 = strlen(zOut);" (assignment_expression "sVar5 = strlen(zOut)" identifier = (call_expression "strlen(zOut)" identifier (argument_list "(zOut)" ( identifier )))) ;) (expression_statement "iVar3 = (sVar5 & 0x3fffffff) + 1;" (assignment_expression "iVar3 = (sVar5 & 0x3fffffff) + 1" identifier = (binary_expression "(sVar5 & 0x3fffffff) + 1" (parenthesized_expression "(sVar5 & 0x3fffffff)" ( (binary_expression "sVar5 & 0x3fffffff" identifier & number_literal) )) + number_literal)) ;) (expression_statement "pcVar7 = zOut + (sVar5 & 0x3fffffff);" (assignment_expression "pcVar7 = zOut + (sVar5 & 0x3fffffff)" identifier = (binary_expression "zOut + (sVar5 & 0x3fffffff)" identifier + (parenthesized_expression "(sVar5 & 0x3fffffff)" ( (binary_expression "sVar5 & 0x3fffffff" identifier & number_literal) )))) ;) }))) (expression_statement "*pcVar7 = '/';" (assignment_expression "*pcVar7 = '/'" (pointer_expression "*pcVar7" * identifier) = (char_literal "'/'" ' character ')) ;) (expression_statement "uVar6 = uVar6 + iVar3;" (assignment_expression "uVar6 = uVar6 + iVar3" identifier = (binary_expression "uVar6 + iVar3" identifier + identifier)) ;) (expression_statement "pcVar7 = zOut + iVar3;" (assignment_expression "pcVar7 = zOut + iVar3" identifier = (binary_expression "zOut + iVar3" identifier + identifier)) ;) (goto_statement "goto LAB_0005643d;" goto statement_identifier ;) })) (expression_statement "iVar3 = sqlite3CantopenError(0x96f9);" (assignment_expression "iVar3 = sqlite3CantopenError(0x96f9)" identifier = (call_expression "sqlite3CantopenError(0x96f9)" identifier (argument_list "(0x96f9)" ( number_literal )))) ;) (expression_statement "iVar3 = unixLogErrorAtLine(iVar3,"getcwd",zPath,0x96f9);" (assignment_expression "iVar3 = unixLogErrorAtLine(iVar3,"getcwd",zPath,0x96f9)" identifier = (call_expression "unixLogErrorAtLine(iVar3,"getcwd",zPath,0x96f9)" identifier (argument_list "(iVar3,"getcwd",zPath,0x96f9)" ( identifier , (string_literal ""getcwd"" " string_content ") , identifier , number_literal )))) ;) }))) (expression_statement "iVar4 = iVar3;" (assignment_expression "iVar4 = iVar3" identifier = identifier) ;) (if_statement "if (!bVar9) goto LAB_0005647e;" if (parenthesized_expression "(!bVar9)" ( (unary_expression "!bVar9" ! identifier) )) (goto_statement "goto LAB_0005647e;" goto statement_identifier ;)) }))) (expression_statement "iVar4 = iVar3;" (assignment_expression "iVar4 = iVar3" identifier = identifier) ;) (expression_statement "zPath = zOut;" (assignment_expression "zPath = zOut" identifier = identifier) ;) (if_statement "if (iVar3 != 0) {\nLAB_0005647e:\n      sqlite3_free(local_a4);\n      if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar4;\n      }\n                    /* WARNING: Subroutine does not return */\n      __stack_chk_fail_local();\n    }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_0005647e:\n      sqlite3_free(local_a4);\n      if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar4;\n      }\n                    /* WARNING: Subroutine does not return */\n      __stack_chk_fail_local();\n    }" { (labeled_statement "LAB_0005647e:\n      sqlite3_free(local_a4);" statement_identifier : (expression_statement "sqlite3_free(local_a4);" (call_expression "sqlite3_free(local_a4)" identifier (argument_list "(local_a4)" ( identifier ))) ;)) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar4;\n      }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n        return iVar4;\n      }" { (return_statement "return iVar4;" return identifier ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })) }) while (parenthesized_expression "( true )" ( true )) ;)) })))
(translation_unit "int FUN_000562c0(undefined4 param_1,char *param_2,int param_3,char *param_4)\n\n{\n  code *pcVar1;\n  int iVar2;\n  int iVar3;\n  size_t sVar4;\n  uint uVar5;\n  char *pcVar6;\n  int *piVar7;\n  int in_GS_OFFSET;\n  bool bVar8;\n  char *local_a4;\n  int local_9c;\n  int local_98;\n  undefined1 local_80 [16];\n  uint local_70;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x562c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_a4 = (char *)0x0;\n  local_9c = 1;\nLAB_00056320:\n  do {\n    iVar2 = (*(code *)PTR_FUN_0014c508)(param_2,local_80);\n    if (iVar2 == 0) {\n      iVar2 = 0;\n      if ((local_70 & 0xf000) != 0xa000) {\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }\n      iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);\n      if (iVar3 < 0) {\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }\n      else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((param_4 != local_a4) && (bVar8)) {\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar7 = __errno_location();\n      if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }\n      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;\nLAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    \n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }\n      bVar8 = false;\nLAB_000563d8:\n      sVar4 = strlen(param_2);\n      uVar5 = sVar4 & 0x3fffffff;\n      if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }\n      iVar3 = iVar2;\n      if (!bVar8) goto LAB_0005647e;\n    }\n    iVar3 = iVar2;\n    param_2 = param_4;\n    if (iVar2 != 0) {\nLAB_0005647e:\n      FUN_000264d0(local_a4);\n      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar3;\n      }\n                    \n      FUN_000f6410();\n    }\n  } while( true );\n}\n\n" (function_definition "int FUN_000562c0(undefined4 param_1,char *param_2,int param_3,char *param_4)\n\n{\n  code *pcVar1;\n  int iVar2;\n  int iVar3;\n  size_t sVar4;\n  uint uVar5;\n  char *pcVar6;\n  int *piVar7;\n  int in_GS_OFFSET;\n  bool bVar8;\n  char *local_a4;\n  int local_9c;\n  int local_98;\n  undefined1 local_80 [16];\n  uint local_70;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x562c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_a4 = (char *)0x0;\n  local_9c = 1;\nLAB_00056320:\n  do {\n    iVar2 = (*(code *)PTR_FUN_0014c508)(param_2,local_80);\n    if (iVar2 == 0) {\n      iVar2 = 0;\n      if ((local_70 & 0xf000) != 0xa000) {\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }\n      iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);\n      if (iVar3 < 0) {\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }\n      else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((param_4 != local_a4) && (bVar8)) {\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar7 = __errno_location();\n      if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }\n      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;\nLAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    \n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }\n      bVar8 = false;\nLAB_000563d8:\n      sVar4 = strlen(param_2);\n      uVar5 = sVar4 & 0x3fffffff;\n      if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }\n      iVar3 = iVar2;\n      if (!bVar8) goto LAB_0005647e;\n    }\n    iVar3 = iVar2;\n    param_2 = param_4;\n    if (iVar2 != 0) {\nLAB_0005647e:\n      FUN_000264d0(local_a4);\n      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar3;\n      }\n                    \n      FUN_000f6410();\n    }\n  } while( true );\n}" primitive_type (function_declarator "FUN_000562c0(undefined4 param_1,char *param_2,int param_3,char *param_4)" identifier (parameter_list "(undefined4 param_1,char *param_2,int param_3,char *param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "char *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  code *pcVar1;\n  int iVar2;\n  int iVar3;\n  size_t sVar4;\n  uint uVar5;\n  char *pcVar6;\n  int *piVar7;\n  int in_GS_OFFSET;\n  bool bVar8;\n  char *local_a4;\n  int local_9c;\n  int local_98;\n  undefined1 local_80 [16];\n  uint local_70;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x562c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_a4 = (char *)0x0;\n  local_9c = 1;\nLAB_00056320:\n  do {\n    iVar2 = (*(code *)PTR_FUN_0014c508)(param_2,local_80);\n    if (iVar2 == 0) {\n      iVar2 = 0;\n      if ((local_70 & 0xf000) != 0xa000) {\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }\n      iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);\n      if (iVar3 < 0) {\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }\n      else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((param_4 != local_a4) && (bVar8)) {\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar7 = __errno_location();\n      if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }\n      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;\nLAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    \n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }\n      bVar8 = false;\nLAB_000563d8:\n      sVar4 = strlen(param_2);\n      uVar5 = sVar4 & 0x3fffffff;\n      if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }\n      iVar3 = iVar2;\n      if (!bVar8) goto LAB_0005647e;\n    }\n    iVar3 = iVar2;\n    param_2 = param_4;\n    if (iVar2 != 0) {\nLAB_0005647e:\n      FUN_000264d0(local_a4);\n      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar3;\n      }\n                    \n      FUN_000f6410();\n    }\n  } while( true );\n}" { (declaration "code *pcVar1;" type_identifier (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "int *piVar7;" primitive_type (pointer_declarator "*piVar7" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "bool bVar8;" primitive_type identifier ;) (declaration "char *local_a4;" primitive_type (pointer_declarator "*local_a4" * identifier) ;) (declaration "int local_9c;" primitive_type identifier ;) (declaration "int local_98;" primitive_type identifier ;) (declaration "undefined1 local_80 [16];" type_identifier (array_declarator "local_80 [16]" identifier [ number_literal ]) ;) (declaration "uint local_70;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x562c9;" (assignment_expression "uStack_14 = 0x562c9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "local_a4 = (char *)0x0;" (assignment_expression "local_a4 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "local_9c = 1;" (assignment_expression "local_9c = 1" identifier = number_literal) ;) (labeled_statement "LAB_00056320:\n  do {\n    iVar2 = (*(code *)PTR_FUN_0014c508)(param_2,local_80);\n    if (iVar2 == 0) {\n      iVar2 = 0;\n      if ((local_70 & 0xf000) != 0xa000) {\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }\n      iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);\n      if (iVar3 < 0) {\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }\n      else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((param_4 != local_a4) && (bVar8)) {\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar7 = __errno_location();\n      if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }\n      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;\nLAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    \n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }\n      bVar8 = false;\nLAB_000563d8:\n      sVar4 = strlen(param_2);\n      uVar5 = sVar4 & 0x3fffffff;\n      if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }\n      iVar3 = iVar2;\n      if (!bVar8) goto LAB_0005647e;\n    }\n    iVar3 = iVar2;\n    param_2 = param_4;\n    if (iVar2 != 0) {\nLAB_0005647e:\n      FUN_000264d0(local_a4);\n      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar3;\n      }\n                    \n      FUN_000f6410();\n    }\n  } while( true );" statement_identifier : (do_statement "do {\n    iVar2 = (*(code *)PTR_FUN_0014c508)(param_2,local_80);\n    if (iVar2 == 0) {\n      iVar2 = 0;\n      if ((local_70 & 0xf000) != 0xa000) {\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }\n      iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);\n      if (iVar3 < 0) {\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }\n      else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((param_4 != local_a4) && (bVar8)) {\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar7 = __errno_location();\n      if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }\n      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;\nLAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    \n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }\n      bVar8 = false;\nLAB_000563d8:\n      sVar4 = strlen(param_2);\n      uVar5 = sVar4 & 0x3fffffff;\n      if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }\n      iVar3 = iVar2;\n      if (!bVar8) goto LAB_0005647e;\n    }\n    iVar3 = iVar2;\n    param_2 = param_4;\n    if (iVar2 != 0) {\nLAB_0005647e:\n      FUN_000264d0(local_a4);\n      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar3;\n      }\n                    \n      FUN_000f6410();\n    }\n  } while( true );" do (compound_statement "{\n    iVar2 = (*(code *)PTR_FUN_0014c508)(param_2,local_80);\n    if (iVar2 == 0) {\n      iVar2 = 0;\n      if ((local_70 & 0xf000) != 0xa000) {\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }\n      iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);\n      if (iVar3 < 0) {\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }\n      else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((param_4 != local_a4) && (bVar8)) {\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar7 = __errno_location();\n      if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }\n      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;\nLAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    \n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }\n      bVar8 = false;\nLAB_000563d8:\n      sVar4 = strlen(param_2);\n      uVar5 = sVar4 & 0x3fffffff;\n      if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }\n      iVar3 = iVar2;\n      if (!bVar8) goto LAB_0005647e;\n    }\n    iVar3 = iVar2;\n    param_2 = param_4;\n    if (iVar2 != 0) {\nLAB_0005647e:\n      FUN_000264d0(local_a4);\n      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar3;\n      }\n                    \n      FUN_000f6410();\n    }\n  }" { (expression_statement "iVar2 = (*(code *)PTR_FUN_0014c508)(param_2,local_80);" (assignment_expression "iVar2 = (*(code *)PTR_FUN_0014c508)(param_2,local_80)" identifier = (call_expression "(*(code *)PTR_FUN_0014c508)(param_2,local_80)" (parenthesized_expression "(*(code *)PTR_FUN_0014c508)" ( (pointer_expression "*(code *)PTR_FUN_0014c508" * (cast_expression "(code *)PTR_FUN_0014c508" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2,local_80)" ( identifier , identifier )))) ;) (if_statement "if (iVar2 == 0) {\n      iVar2 = 0;\n      if ((local_70 & 0xf000) != 0xa000) {\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }\n      iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);\n      if (iVar3 < 0) {\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }\n      else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((param_4 != local_a4) && (bVar8)) {\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar7 = __errno_location();\n      if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }\n      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;\nLAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    \n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }\n      bVar8 = false;\nLAB_000563d8:\n      sVar4 = strlen(param_2);\n      uVar5 = sVar4 & 0x3fffffff;\n      if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }\n      iVar3 = iVar2;\n      if (!bVar8) goto LAB_0005647e;\n    }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar2 = 0;\n      if ((local_70 & 0xf000) != 0xa000) {\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }\n      iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);\n      if (iVar3 < 0) {\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }\n      else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((param_4 != local_a4) && (bVar8)) {\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }\n    }" { (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (if_statement "if ((local_70 & 0xf000) != 0xa000) {\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }" if (parenthesized_expression "((local_70 & 0xf000) != 0xa000)" ( (binary_expression "(local_70 & 0xf000) != 0xa000" (parenthesized_expression "(local_70 & 0xf000)" ( (binary_expression "local_70 & 0xf000" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }" { (expression_statement "iVar3 = iVar2;" (assignment_expression "iVar3 = iVar2" identifier = identifier) ;) (if_statement "if (param_2 != param_4) goto LAB_000564f3;" if (parenthesized_expression "(param_2 != param_4)" ( (binary_expression "param_2 != param_4" identifier != identifier) )) (goto_statement "goto LAB_000564f3;" goto statement_identifier ;)) (goto_statement "goto LAB_0005647e;" goto statement_identifier ;) })) (if_statement "if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }" if (parenthesized_expression "(local_a4 == (char *)0x0)" ( (binary_expression "local_a4 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }" { (expression_statement "local_a4 = (char *)FUN_0003f8a0(param_3);" (assignment_expression "local_a4 = (char *)FUN_0003f8a0(param_3)" identifier = (cast_expression "(char *)FUN_0003f8a0(param_3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0003f8a0(param_3)" identifier (argument_list "(param_3)" ( identifier ))))) ;) (if_statement "if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }" if (parenthesized_expression "(local_a4 == (char *)0x0)" ( (binary_expression "local_a4 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }" { (expression_statement "iVar3 = 7;" (assignment_expression "iVar3 = 7" identifier = number_literal) ;) (goto_statement "goto LAB_0005647e;" goto statement_identifier ;) })) }) (else_clause "else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }" else (compound_statement "{\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }" { (expression_statement "local_9c = local_9c + 1;" (assignment_expression "local_9c = local_9c + 1" identifier = (binary_expression "local_9c + 1" identifier + number_literal)) ;) (if_statement "if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;" if (parenthesized_expression "((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0))" ( (binary_expression "(100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)" (parenthesized_expression "(100 < local_9c)" ( (binary_expression "100 < local_9c" number_literal < identifier) )) && (parenthesized_expression "(iVar3 = FUN_00052b30(), iVar3 != 0)" ( (comma_expression "iVar3 = FUN_00052b30(), iVar3 != 0" (assignment_expression "iVar3 = FUN_00052b30()" identifier = (call_expression "FUN_00052b30()" identifier (argument_list "()" ( )))) , (binary_expression "iVar3 != 0" identifier != number_literal)) ))) )) (goto_statement "goto LAB_0005647e;" goto statement_identifier ;)) }))) (expression_statement "iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);" (assignment_expression "iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1)" identifier = (call_expression "(*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1)" (parenthesized_expression "(*(code *)PTR_readlink_0014c4fc)" ( (pointer_expression "*(code *)PTR_readlink_0014c4fc" * (cast_expression "(code *)PTR_readlink_0014c4fc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2,local_a4,param_3 + -1)" ( identifier , identifier , (binary_expression "param_3 + -1" identifier + number_literal) )))) ;) (if_statement "if (iVar3 < 0) {\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }\n      else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }" if (parenthesized_expression "(iVar3 < 0)" ( (binary_expression "iVar3 < 0" identifier < number_literal) )) (compound_statement "{\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }" { (expression_statement "FUN_00052b30();" (call_expression "FUN_00052b30()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar2 = FUN_000556e0(0x9743);" (assignment_expression "iVar2 = FUN_000556e0(0x9743)" identifier = (call_expression "FUN_000556e0(0x9743)" identifier (argument_list "(0x9743)" ( number_literal )))) ;) (expression_statement "bVar8 = iVar2 == 0;" (assignment_expression "bVar8 = iVar2 == 0" identifier = (binary_expression "iVar2 == 0" identifier == number_literal)) ;) }) (else_clause "else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }" else (compound_statement "{\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }" { (expression_statement "bVar8 = true;" (assignment_expression "bVar8 = true" identifier = true) ;) (expression_statement "local_98 = iVar3;" (assignment_expression "local_98 = iVar3" identifier = identifier) ;) (if_statement "if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }" if (parenthesized_expression "(*local_a4 != '/')" ( (binary_expression "*local_a4 != '/'" (pointer_expression "*local_a4" * identifier) != (char_literal "'/'" ' character ')) )) (compound_statement "{\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }" { (if_statement "if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }" if (parenthesized_expression "(param_2 == (char *)0x0)" ( (binary_expression "param_2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            uVar5 = 0;\n          }" { (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) }) (else_clause "else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }" else (compound_statement "{\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }" { (expression_statement "sVar4 = strlen(param_2);" (assignment_expression "sVar4 = strlen(param_2)" identifier = (call_expression "strlen(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (for_statement "for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }" for ( (assignment_expression "uVar5 = sVar4 & 0x3fffffff" identifier = (binary_expression "sVar4 & 0x3fffffff" identifier & number_literal)) ; (binary_expression "uVar5 != 0" identifier != number_literal) ; (assignment_expression "uVar5 = uVar5 - 1" identifier = (binary_expression "uVar5 - 1" identifier - number_literal)) ) (compound_statement "{\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }" { (if_statement "if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }" if (parenthesized_expression "(param_2[uVar5 - 1] == '/')" ( (binary_expression "param_2[uVar5 - 1] == '/'" (subscript_expression "param_2[uVar5 - 1]" identifier [ (binary_expression "uVar5 - 1" identifier - number_literal) ]) == (char_literal "'/'" ' character ')) )) (compound_statement "{\n                local_98 = iVar3 + uVar5;\n                break;\n              }" { (expression_statement "local_98 = iVar3 + uVar5;" (assignment_expression "local_98 = iVar3 + uVar5" identifier = (binary_expression "iVar3 + uVar5" identifier + identifier)) ;) (break_statement "break;" break ;) })) })) }))) (if_statement "if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }" if (parenthesized_expression "(local_98 < param_3)" ( (binary_expression "local_98 < param_3" identifier < identifier) )) (compound_statement "{\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }" { (expression_statement "memmove(local_a4 + uVar5,local_a4,iVar3 + 1);" (call_expression "memmove(local_a4 + uVar5,local_a4,iVar3 + 1)" identifier (argument_list "(local_a4 + uVar5,local_a4,iVar3 + 1)" ( (binary_expression "local_a4 + uVar5" identifier + identifier) , identifier , (binary_expression "iVar3 + 1" identifier + number_literal) ))) ;) (expression_statement "memcpy(local_a4,param_2,uVar5);" (call_expression "memcpy(local_a4,param_2,uVar5)" identifier (argument_list "(local_a4,param_2,uVar5)" ( identifier , identifier , identifier ))) ;) (expression_statement "bVar8 = true;" (assignment_expression "bVar8 = true" identifier = true) ;) }) (else_clause "else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }" else (compound_statement "{\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }" { (expression_statement "iVar2 = FUN_00052b30();" (assignment_expression "iVar2 = FUN_00052b30()" identifier = (call_expression "FUN_00052b30()" identifier (argument_list "()" ( )))) ;) (expression_statement "bVar8 = iVar2 == 0;" (assignment_expression "bVar8 = iVar2 == 0" identifier = (binary_expression "iVar2 == 0" identifier == number_literal)) ;) (expression_statement "local_98 = iVar3;" (assignment_expression "local_98 = iVar3" identifier = identifier) ;) }))) })) (expression_statement "local_a4[local_98] = '\0';" (assignment_expression "local_a4[local_98] = '\0'" (subscript_expression "local_a4[local_98]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) }))) (if_statement "if ((param_4 != local_a4) && (bVar8)) {\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }" if (parenthesized_expression "((param_4 != local_a4) && (bVar8))" ( (binary_expression "(param_4 != local_a4) && (bVar8)" (parenthesized_expression "(param_4 != local_a4)" ( (binary_expression "param_4 != local_a4" identifier != identifier) )) && (parenthesized_expression "(bVar8)" ( identifier ))) )) (compound_statement "{\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }" { (expression_statement "bVar8 = true;" (assignment_expression "bVar8 = true" identifier = true) ;) (expression_statement "param_2 = local_a4;" (assignment_expression "param_2 = local_a4" identifier = identifier) ;) (goto_statement "goto LAB_000563d8;" goto statement_identifier ;) })) }) (else_clause "else {\n      piVar7 = __errno_location();\n      if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }\n      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;\nLAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    \n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }\n      bVar8 = false;\nLAB_000563d8:\n      sVar4 = strlen(param_2);\n      uVar5 = sVar4 & 0x3fffffff;\n      if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }\n      iVar3 = iVar2;\n      if (!bVar8) goto LAB_0005647e;\n    }" else (compound_statement "{\n      piVar7 = __errno_location();\n      if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }\n      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;\nLAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    \n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }\n      bVar8 = false;\nLAB_000563d8:\n      sVar4 = strlen(param_2);\n      uVar5 = sVar4 & 0x3fffffff;\n      if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }\n      iVar3 = iVar2;\n      if (!bVar8) goto LAB_0005647e;\n    }" { (expression_statement "piVar7 = __errno_location();" (assignment_expression "piVar7 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }" if (parenthesized_expression "(*piVar7 == 2)" ( (binary_expression "*piVar7 == 2" (pointer_expression "*piVar7" * identifier) == number_literal) )) (compound_statement "{\n        bVar8 = true;\n        iVar3 = 0;\n      }" { (expression_statement "bVar8 = true;" (assignment_expression "bVar8 = true" identifier = true) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) }) (else_clause "else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }" else (compound_statement "{\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }" { (expression_statement "FUN_00052b30();" (call_expression "FUN_00052b30()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar3 = FUN_000556e0(0x9732);" (assignment_expression "iVar3 = FUN_000556e0(0x9732)" identifier = (call_expression "FUN_000556e0(0x9732)" identifier (argument_list "(0x9732)" ( number_literal )))) ;) (expression_statement "bVar8 = iVar3 == 0;" (assignment_expression "bVar8 = iVar3 == 0" identifier = (binary_expression "iVar3 == 0" identifier == number_literal)) ;) }))) (if_statement "if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;" if (parenthesized_expression "((param_2 == param_4) || (!bVar8))" ( (binary_expression "(param_2 == param_4) || (!bVar8)" (parenthesized_expression "(param_2 == param_4)" ( (binary_expression "param_2 == param_4" identifier == identifier) )) || (parenthesized_expression "(!bVar8)" ( (unary_expression "!bVar8" ! identifier) ))) )) (goto_statement "goto LAB_0005647e;" goto statement_identifier ;)) (labeled_statement "LAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    \n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }" statement_identifier : (if_statement "if (param_2 == (char *)0x0) {\n                    \n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }" if (parenthesized_expression "(param_2 == (char *)0x0)" ( (binary_expression "param_2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    \n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }" { (expression_statement "pcVar1 = (code *)invalidInstructionException();" (assignment_expression "pcVar1 = (code *)invalidInstructionException()" identifier = (cast_expression "(code *)invalidInstructionException()" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "invalidInstructionException()" identifier (argument_list "()" ( ))))) ;) (expression_statement "(*pcVar1)();" (call_expression "(*pcVar1)()" (parenthesized_expression "(*pcVar1)" ( (pointer_expression "*pcVar1" * identifier) )) (argument_list "()" ( ))) ;) }))) (expression_statement "bVar8 = false;" (assignment_expression "bVar8 = false" identifier = false) ;) (labeled_statement "LAB_000563d8:\n      sVar4 = strlen(param_2);" statement_identifier : (expression_statement "sVar4 = strlen(param_2);" (assignment_expression "sVar4 = strlen(param_2)" identifier = (call_expression "strlen(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;)) (expression_statement "uVar5 = sVar4 & 0x3fffffff;" (assignment_expression "uVar5 = sVar4 & 0x3fffffff" identifier = (binary_expression "sVar4 & 0x3fffffff" identifier & number_literal)) ;) (if_statement "if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }" if (parenthesized_expression "(*param_2 == '/')" ( (binary_expression "*param_2 == '/'" (pointer_expression "*param_2" * identifier) == (char_literal "'/'" ' character ')) )) (compound_statement "{\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }" { (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (expression_statement "pcVar6 = param_4;" (assignment_expression "pcVar6 = param_4" identifier = identifier) ;) (labeled_statement "LAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }" statement_identifier : (if_statement "if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }" if (parenthesized_expression "((int)uVar5 < param_3)" ( (binary_expression "(int)uVar5 < param_3" (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) < identifier) )) (compound_statement "{\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }" { (expression_statement "FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);" (call_expression "FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2)" identifier (argument_list "(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2)" ( (binary_expression "param_3 - iVar2" identifier - identifier) , identifier , (pointer_expression "&DAT_000f8ce3" & identifier) , identifier ))) ;) (expression_statement "param_2 = param_4;" (assignment_expression "param_2 = param_4" identifier = identifier) ;) (if_statement "if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }" if (parenthesized_expression "(!bVar8)" ( (unary_expression "!bVar8" ! identifier) )) (compound_statement "{\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_0005647e;" goto statement_identifier ;) })) (goto_statement "goto LAB_00056320;" goto statement_identifier ;) }))) (expression_statement "*pcVar6 = '\0';" (assignment_expression "*pcVar6 = '\0'" (pointer_expression "*pcVar6" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "iVar2 = FUN_00052b30();" (assignment_expression "iVar2 = FUN_00052b30()" identifier = (call_expression "FUN_00052b30()" identifier (argument_list "()" ( )))) ;) }) (else_clause "else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }" else (compound_statement "{\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }" { (expression_statement "iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);" (assignment_expression "iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2)" identifier = (call_expression "(*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2)" (parenthesized_expression "(*(code *)PTR_getcwd_0014c3e8)" ( (pointer_expression "*(code *)PTR_getcwd_0014c3e8" * (cast_expression "(code *)PTR_getcwd_0014c3e8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_4,param_3 + -2)" ( identifier , (binary_expression "param_3 + -2" identifier + number_literal) )))) ;) (if_statement "if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }" { (if_statement "if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }" if (parenthesized_expression "(param_4 == (char *)0x0)" ( (binary_expression "param_4 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }" { (expression_statement "pcVar6 = (char *)0x0;" (assignment_expression "pcVar6 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) }) (else_clause "else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }" else (compound_statement "{\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }" { (expression_statement "sVar4 = strlen(param_4);" (assignment_expression "sVar4 = strlen(param_4)" identifier = (call_expression "strlen(param_4)" identifier (argument_list "(param_4)" ( identifier )))) ;) (expression_statement "iVar2 = (sVar4 & 0x3fffffff) + 1;" (assignment_expression "iVar2 = (sVar4 & 0x3fffffff) + 1" identifier = (binary_expression "(sVar4 & 0x3fffffff) + 1" (parenthesized_expression "(sVar4 & 0x3fffffff)" ( (binary_expression "sVar4 & 0x3fffffff" identifier & number_literal) )) + number_literal)) ;) (expression_statement "pcVar6 = param_4 + (sVar4 & 0x3fffffff);" (assignment_expression "pcVar6 = param_4 + (sVar4 & 0x3fffffff)" identifier = (binary_expression "param_4 + (sVar4 & 0x3fffffff)" identifier + (parenthesized_expression "(sVar4 & 0x3fffffff)" ( (binary_expression "sVar4 & 0x3fffffff" identifier & number_literal) )))) ;) }))) (expression_statement "*pcVar6 = '/';" (assignment_expression "*pcVar6 = '/'" (pointer_expression "*pcVar6" * identifier) = (char_literal "'/'" ' character ')) ;) (expression_statement "uVar5 = uVar5 + iVar2;" (assignment_expression "uVar5 = uVar5 + iVar2" identifier = (binary_expression "uVar5 + iVar2" identifier + identifier)) ;) (expression_statement "pcVar6 = param_4 + iVar2;" (assignment_expression "pcVar6 = param_4 + iVar2" identifier = (binary_expression "param_4 + iVar2" identifier + identifier)) ;) (goto_statement "goto LAB_0005643d;" goto statement_identifier ;) })) (expression_statement "FUN_00052b30();" (call_expression "FUN_00052b30()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar2 = FUN_000556e0(0x96f9);" (assignment_expression "iVar2 = FUN_000556e0(0x96f9)" identifier = (call_expression "FUN_000556e0(0x96f9)" identifier (argument_list "(0x96f9)" ( number_literal )))) ;) }))) (expression_statement "iVar3 = iVar2;" (assignment_expression "iVar3 = iVar2" identifier = identifier) ;) (if_statement "if (!bVar8) goto LAB_0005647e;" if (parenthesized_expression "(!bVar8)" ( (unary_expression "!bVar8" ! identifier) )) (goto_statement "goto LAB_0005647e;" goto statement_identifier ;)) }))) (expression_statement "iVar3 = iVar2;" (assignment_expression "iVar3 = iVar2" identifier = identifier) ;) (expression_statement "param_2 = param_4;" (assignment_expression "param_2 = param_4" identifier = identifier) ;) (if_statement "if (iVar2 != 0) {\nLAB_0005647e:\n      FUN_000264d0(local_a4);\n      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar3;\n      }\n                    \n      FUN_000f6410();\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_0005647e:\n      FUN_000264d0(local_a4);\n      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar3;\n      }\n                    \n      FUN_000f6410();\n    }" { (labeled_statement "LAB_0005647e:\n      FUN_000264d0(local_a4);" statement_identifier : (expression_statement "FUN_000264d0(local_a4);" (call_expression "FUN_000264d0(local_a4)" identifier (argument_list "(local_a4)" ( identifier ))) ;)) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar3;\n      }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n        return iVar3;\n      }" { (return_statement "return iVar3;" return identifier ;) })) (expression_statement "FUN_000f6410();" (call_expression "FUN_000f6410()" identifier (argument_list "()" ( ))) ;) })) }) while (parenthesized_expression "( true )" ( true )) ;)) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (labeled_statement statement_identifier : (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (goto_statement goto statement_identifier ;)) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < IDENT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) , (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 , IDENT , (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT == LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = BOOL) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != (char_literal ' character ')) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (for_statement for ( (assignment_expression IDENT = (binary_expression IDENT & LIT)) ; (binary_expression IDENT != LIT) ; (assignment_expression IDENT = (binary_expression IDENT - LIT)) ) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ (binary_expression IDENT - LIT) ]) == (char_literal ' character ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (break_statement break ;) })) })) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + IDENT) , IDENT , (binary_expression IDENT + LIT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT == LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }))) })) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (char_literal ' escape_sequence ')) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != IDENT) )) && (parenthesized_expression ( IDENT ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = BOOL) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (goto_statement goto statement_identifier ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = BOOL) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT == LIT)) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == IDENT) )) || (parenthesized_expression ( (unary_expression ! IDENT) ))) )) (goto_statement goto statement_identifier ;)) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( ))) ;) }))) (expression_statement (assignment_expression IDENT = BOOL) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' character ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT - IDENT) , IDENT , (pointer_expression & IDENT) , IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (unary_expression ! IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) (goto_statement goto statement_identifier ;) }))) (expression_statement (assignment_expression (pointer_expression * IDENT) = (char_literal ' escape_sequence ')) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (parenthesized_expression ( (binary_expression IDENT & LIT) )))) ;) }))) (expression_statement (assignment_expression (pointer_expression * IDENT) = (char_literal ' character ')) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) }))) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (unary_expression ! IDENT) )) (goto_statement goto statement_identifier ;)) }))) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) }) while (parenthesized_expression ( BOOL )) ;)) })))
(function_definition "int FUN_000562c0(undefined4 param_1,char *param_2,int param_3,char *param_4)\n\n{\n  code *pcVar1;\n  int iVar2;\n  int iVar3;\n  size_t sVar4;\n  uint uVar5;\n  char *pcVar6;\n  int *piVar7;\n  int in_GS_OFFSET;\n  bool bVar8;\n  char *local_a4;\n  int local_9c;\n  int local_98;\n  undefined1 local_80 [16];\n  uint local_70;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x562c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_a4 = (char *)0x0;\n  local_9c = 1;\nLAB_00056320:\n  do {\n    iVar2 = (*(code *)PTR_FUN_0014c508)(param_2,local_80);\n    if (iVar2 == 0) {\n      iVar2 = 0;\n      if ((local_70 & 0xf000) != 0xa000) {\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }\n      iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);\n      if (iVar3 < 0) {\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }\n      else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((param_4 != local_a4) && (bVar8)) {\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar7 = __errno_location();\n      if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }\n      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;\nLAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    \n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }\n      bVar8 = false;\nLAB_000563d8:\n      sVar4 = strlen(param_2);\n      uVar5 = sVar4 & 0x3fffffff;\n      if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }\n      iVar3 = iVar2;\n      if (!bVar8) goto LAB_0005647e;\n    }\n    iVar3 = iVar2;\n    param_2 = param_4;\n    if (iVar2 != 0) {\nLAB_0005647e:\n      FUN_000264d0(local_a4);\n      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar3;\n      }\n                    \n      FUN_000f6410();\n    }\n  } while( true );\n}" (primitive_type "int") (function_declarator "FUN_000562c0(undefined4 param_1,char *param_2,int param_3,char *param_4)" (identifier "FUN_000562c0") (parameter_list "(undefined4 param_1,char *param_2,int param_3,char *param_4)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "char *param_4" (primitive_type "char") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) () ")"))) (compound_statement "{\n  code *pcVar1;\n  int iVar2;\n  int iVar3;\n  size_t sVar4;\n  uint uVar5;\n  char *pcVar6;\n  int *piVar7;\n  int in_GS_OFFSET;\n  bool bVar8;\n  char *local_a4;\n  int local_9c;\n  int local_98;\n  undefined1 local_80 [16];\n  uint local_70;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x562c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_a4 = (char *)0x0;\n  local_9c = 1;\nLAB_00056320:\n  do {\n    iVar2 = (*(code *)PTR_FUN_0014c508)(param_2,local_80);\n    if (iVar2 == 0) {\n      iVar2 = 0;\n      if ((local_70 & 0xf000) != 0xa000) {\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }\n      iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);\n      if (iVar3 < 0) {\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }\n      else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((param_4 != local_a4) && (bVar8)) {\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar7 = __errno_location();\n      if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }\n      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;\nLAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    \n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }\n      bVar8 = false;\nLAB_000563d8:\n      sVar4 = strlen(param_2);\n      uVar5 = sVar4 & 0x3fffffff;\n      if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }\n      iVar3 = iVar2;\n      if (!bVar8) goto LAB_0005647e;\n    }\n    iVar3 = iVar2;\n    param_2 = param_4;\n    if (iVar2 != 0) {\nLAB_0005647e:\n      FUN_000264d0(local_a4);\n      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar3;\n      }\n                    \n      FUN_000f6410();\n    }\n  } while( true );\n}" ({ "{") (declaration "code *pcVar1;" (type_identifier "code") (pointer_declarator "*pcVar1" (* "*") (identifier "pcVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "size_t sVar4;" (primitive_type "size_t") (identifier "sVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "char *pcVar6;" (primitive_type "char") (pointer_declarator "*pcVar6" (* "*") (identifier "pcVar6")) (; ";")) (declaration "int *piVar7;" (primitive_type "int") (pointer_declarator "*piVar7" (* "*") (identifier "piVar7")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "bool bVar8;" (primitive_type "bool") (identifier "bVar8") (; ";")) (declaration "char *local_a4;" (primitive_type "char") (pointer_declarator "*local_a4" (* "*") (identifier "local_a4")) (; ";")) (declaration "int local_9c;" (primitive_type "int") (identifier "local_9c") (; ";")) (declaration "int local_98;" (primitive_type "int") (identifier "local_98") (; ";")) (declaration "undefined1 local_80 [16];" (type_identifier "undefined1") (array_declarator "local_80 [16]" (identifier "local_80") ([ "[") (number_literal "16") (] "]")) (; ";")) (declaration "uint local_70;" (type_identifier "uint") (identifier "local_70") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x562c9;" (assignment_expression "uStack_14 = 0x562c9" (identifier "uStack_14") (= "=") (number_literal "0x562c9")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "local_a4 = (char *)0x0;" (assignment_expression "local_a4 = (char *)0x0" (identifier "local_a4") (= "=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "local_9c = 1;" (assignment_expression "local_9c = 1" (identifier "local_9c") (= "=") (number_literal "1")) (; ";")) (labeled_statement "LAB_00056320:\n  do {\n    iVar2 = (*(code *)PTR_FUN_0014c508)(param_2,local_80);\n    if (iVar2 == 0) {\n      iVar2 = 0;\n      if ((local_70 & 0xf000) != 0xa000) {\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }\n      iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);\n      if (iVar3 < 0) {\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }\n      else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((param_4 != local_a4) && (bVar8)) {\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar7 = __errno_location();\n      if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }\n      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;\nLAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    \n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }\n      bVar8 = false;\nLAB_000563d8:\n      sVar4 = strlen(param_2);\n      uVar5 = sVar4 & 0x3fffffff;\n      if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }\n      iVar3 = iVar2;\n      if (!bVar8) goto LAB_0005647e;\n    }\n    iVar3 = iVar2;\n    param_2 = param_4;\n    if (iVar2 != 0) {\nLAB_0005647e:\n      FUN_000264d0(local_a4);\n      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar3;\n      }\n                    \n      FUN_000f6410();\n    }\n  } while( true );" (statement_identifier "LAB_00056320") (: ":") (do_statement "do {\n    iVar2 = (*(code *)PTR_FUN_0014c508)(param_2,local_80);\n    if (iVar2 == 0) {\n      iVar2 = 0;\n      if ((local_70 & 0xf000) != 0xa000) {\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }\n      iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);\n      if (iVar3 < 0) {\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }\n      else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((param_4 != local_a4) && (bVar8)) {\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar7 = __errno_location();\n      if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }\n      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;\nLAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    \n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }\n      bVar8 = false;\nLAB_000563d8:\n      sVar4 = strlen(param_2);\n      uVar5 = sVar4 & 0x3fffffff;\n      if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }\n      iVar3 = iVar2;\n      if (!bVar8) goto LAB_0005647e;\n    }\n    iVar3 = iVar2;\n    param_2 = param_4;\n    if (iVar2 != 0) {\nLAB_0005647e:\n      FUN_000264d0(local_a4);\n      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar3;\n      }\n                    \n      FUN_000f6410();\n    }\n  } while( true );" (do "do") (compound_statement "{\n    iVar2 = (*(code *)PTR_FUN_0014c508)(param_2,local_80);\n    if (iVar2 == 0) {\n      iVar2 = 0;\n      if ((local_70 & 0xf000) != 0xa000) {\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }\n      iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);\n      if (iVar3 < 0) {\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }\n      else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((param_4 != local_a4) && (bVar8)) {\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar7 = __errno_location();\n      if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }\n      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;\nLAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    \n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }\n      bVar8 = false;\nLAB_000563d8:\n      sVar4 = strlen(param_2);\n      uVar5 = sVar4 & 0x3fffffff;\n      if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }\n      iVar3 = iVar2;\n      if (!bVar8) goto LAB_0005647e;\n    }\n    iVar3 = iVar2;\n    param_2 = param_4;\n    if (iVar2 != 0) {\nLAB_0005647e:\n      FUN_000264d0(local_a4);\n      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar3;\n      }\n                    \n      FUN_000f6410();\n    }\n  }" ({ "{") (expression_statement "iVar2 = (*(code *)PTR_FUN_0014c508)(param_2,local_80);" (assignment_expression "iVar2 = (*(code *)PTR_FUN_0014c508)(param_2,local_80)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_FUN_0014c508)(param_2,local_80)" (parenthesized_expression "(*(code *)PTR_FUN_0014c508)" (( "(") (pointer_expression "*(code *)PTR_FUN_0014c508" (* "*") (cast_expression "(code *)PTR_FUN_0014c508" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_FUN_0014c508"))) () ")")) (argument_list "(param_2,local_80)" (( "(") (identifier "param_2") (, ",") (identifier "local_80") () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n      iVar2 = 0;\n      if ((local_70 & 0xf000) != 0xa000) {\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }\n      iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);\n      if (iVar3 < 0) {\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }\n      else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((param_4 != local_a4) && (bVar8)) {\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }\n    }\n    else {\n      piVar7 = __errno_location();\n      if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }\n      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;\nLAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    \n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }\n      bVar8 = false;\nLAB_000563d8:\n      sVar4 = strlen(param_2);\n      uVar5 = sVar4 & 0x3fffffff;\n      if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }\n      iVar3 = iVar2;\n      if (!bVar8) goto LAB_0005647e;\n    }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar2 = 0;\n      if ((local_70 & 0xf000) != 0xa000) {\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }\n      if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }\n      iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);\n      if (iVar3 < 0) {\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }\n      else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }\n      if ((param_4 != local_a4) && (bVar8)) {\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }\n    }" ({ "{") (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" (identifier "iVar2") (= "=") (number_literal "0")) (; ";")) (if_statement "if ((local_70 & 0xf000) != 0xa000) {\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }" (if "if") (parenthesized_expression "((local_70 & 0xf000) != 0xa000)" (( "(") (binary_expression "(local_70 & 0xf000) != 0xa000" (parenthesized_expression "(local_70 & 0xf000)" (( "(") (binary_expression "local_70 & 0xf000" (identifier "local_70") (& "&") (number_literal "0xf000")) () ")")) (!= "!=") (number_literal "0xa000")) () ")")) (compound_statement "{\n        iVar3 = iVar2;\n        if (param_2 != param_4) goto LAB_000564f3;\n        goto LAB_0005647e;\n      }" ({ "{") (expression_statement "iVar3 = iVar2;" (assignment_expression "iVar3 = iVar2" (identifier "iVar3") (= "=") (identifier "iVar2")) (; ";")) (if_statement "if (param_2 != param_4) goto LAB_000564f3;" (if "if") (parenthesized_expression "(param_2 != param_4)" (( "(") (binary_expression "param_2 != param_4" (identifier "param_2") (!= "!=") (identifier "param_4")) () ")")) (goto_statement "goto LAB_000564f3;" (goto "goto") (statement_identifier "LAB_000564f3") (; ";"))) (goto_statement "goto LAB_0005647e;" (goto "goto") (statement_identifier "LAB_0005647e") (; ";")) (} "}"))) (if_statement "if (local_a4 == (char *)0x0) {\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }\n      else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }" (if "if") (parenthesized_expression "(local_a4 == (char *)0x0)" (( "(") (binary_expression "local_a4 == (char *)0x0" (identifier "local_a4") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        local_a4 = (char *)FUN_0003f8a0(param_3);\n        if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }\n      }" ({ "{") (expression_statement "local_a4 = (char *)FUN_0003f8a0(param_3);" (assignment_expression "local_a4 = (char *)FUN_0003f8a0(param_3)" (identifier "local_a4") (= "=") (cast_expression "(char *)FUN_0003f8a0(param_3)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0003f8a0(param_3)" (identifier "FUN_0003f8a0") (argument_list "(param_3)" (( "(") (identifier "param_3") () ")"))))) (; ";")) (if_statement "if (local_a4 == (char *)0x0) {\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }" (if "if") (parenthesized_expression "(local_a4 == (char *)0x0)" (( "(") (binary_expression "local_a4 == (char *)0x0" (identifier "local_a4") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n          iVar3 = 7;\n          goto LAB_0005647e;\n        }" ({ "{") (expression_statement "iVar3 = 7;" (assignment_expression "iVar3 = 7" (identifier "iVar3") (= "=") (number_literal "7")) (; ";")) (goto_statement "goto LAB_0005647e;" (goto "goto") (statement_identifier "LAB_0005647e") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }" (else "else") (compound_statement "{\n        local_9c = local_9c + 1;\n        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;\n      }" ({ "{") (expression_statement "local_9c = local_9c + 1;" (assignment_expression "local_9c = local_9c + 1" (identifier "local_9c") (= "=") (binary_expression "local_9c + 1" (identifier "local_9c") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;" (if "if") (parenthesized_expression "((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0))" (( "(") (binary_expression "(100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)" (parenthesized_expression "(100 < local_9c)" (( "(") (binary_expression "100 < local_9c" (number_literal "100") (< "<") (identifier "local_9c")) () ")")) (&& "&&") (parenthesized_expression "(iVar3 = FUN_00052b30(), iVar3 != 0)" (( "(") (comma_expression "iVar3 = FUN_00052b30(), iVar3 != 0" (assignment_expression "iVar3 = FUN_00052b30()" (identifier "iVar3") (= "=") (call_expression "FUN_00052b30()" (identifier "FUN_00052b30") (argument_list "()" (( "(") () ")")))) (, ",") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0"))) () ")"))) () ")")) (goto_statement "goto LAB_0005647e;" (goto "goto") (statement_identifier "LAB_0005647e") (; ";"))) (} "}")))) (expression_statement "iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);" (assignment_expression "iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1)" (identifier "iVar3") (= "=") (call_expression "(*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1)" (parenthesized_expression "(*(code *)PTR_readlink_0014c4fc)" (( "(") (pointer_expression "*(code *)PTR_readlink_0014c4fc" (* "*") (cast_expression "(code *)PTR_readlink_0014c4fc" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_readlink_0014c4fc"))) () ")")) (argument_list "(param_2,local_a4,param_3 + -1)" (( "(") (identifier "param_2") (, ",") (identifier "local_a4") (, ",") (binary_expression "param_3 + -1" (identifier "param_3") (+ "+") (number_literal "-1")) () ")")))) (; ";")) (if_statement "if (iVar3 < 0) {\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }\n      else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }" (if "if") (parenthesized_expression "(iVar3 < 0)" (( "(") (binary_expression "iVar3 < 0" (identifier "iVar3") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x9743);\n        bVar8 = iVar2 == 0;\n      }" ({ "{") (expression_statement "FUN_00052b30();" (call_expression "FUN_00052b30()" (identifier "FUN_00052b30") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "iVar2 = FUN_000556e0(0x9743);" (assignment_expression "iVar2 = FUN_000556e0(0x9743)" (identifier "iVar2") (= "=") (call_expression "FUN_000556e0(0x9743)" (identifier "FUN_000556e0") (argument_list "(0x9743)" (( "(") (number_literal "0x9743") () ")")))) (; ";")) (expression_statement "bVar8 = iVar2 == 0;" (assignment_expression "bVar8 = iVar2 == 0" (identifier "bVar8") (= "=") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0"))) (; ";")) (} "}")) (else_clause "else {\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }" (else "else") (compound_statement "{\n        bVar8 = true;\n        local_98 = iVar3;\n        if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }\n        local_a4[local_98] = '\0';\n      }" ({ "{") (expression_statement "bVar8 = true;" (assignment_expression "bVar8 = true" (identifier "bVar8") (= "=") (true "true")) (; ";")) (expression_statement "local_98 = iVar3;" (assignment_expression "local_98 = iVar3" (identifier "local_98") (= "=") (identifier "iVar3")) (; ";")) (if_statement "if (*local_a4 != '/') {\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }" (if "if") (parenthesized_expression "(*local_a4 != '/')" (( "(") (binary_expression "*local_a4 != '/'" (pointer_expression "*local_a4" (* "*") (identifier "local_a4")) (!= "!=") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")")) (compound_statement "{\n          if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }\n          if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }\n        }" ({ "{") (if_statement "if (param_2 == (char *)0x0) {\n            uVar5 = 0;\n          }\n          else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }" (if "if") (parenthesized_expression "(param_2 == (char *)0x0)" (( "(") (binary_expression "param_2 == (char *)0x0" (identifier "param_2") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n            uVar5 = 0;\n          }" ({ "{") (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" (identifier "uVar5") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }" (else "else") (compound_statement "{\n            sVar4 = strlen(param_2);\n            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }\n          }" ({ "{") (expression_statement "sVar4 = strlen(param_2);" (assignment_expression "sVar4 = strlen(param_2)" (identifier "sVar4") (= "=") (call_expression "strlen(param_2)" (identifier "strlen") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (for_statement "for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }" (for "for") (( "(") (assignment_expression "uVar5 = sVar4 & 0x3fffffff" (identifier "uVar5") (= "=") (binary_expression "sVar4 & 0x3fffffff" (identifier "sVar4") (& "&") (number_literal "0x3fffffff"))) (; ";") (binary_expression "uVar5 != 0" (identifier "uVar5") (!= "!=") (number_literal "0")) (; ";") (assignment_expression "uVar5 = uVar5 - 1" (identifier "uVar5") (= "=") (binary_expression "uVar5 - 1" (identifier "uVar5") (- "-") (number_literal "1"))) () ")") (compound_statement "{\n              if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }\n            }" ({ "{") (if_statement "if (param_2[uVar5 - 1] == '/') {\n                local_98 = iVar3 + uVar5;\n                break;\n              }" (if "if") (parenthesized_expression "(param_2[uVar5 - 1] == '/')" (( "(") (binary_expression "param_2[uVar5 - 1] == '/'" (subscript_expression "param_2[uVar5 - 1]" (identifier "param_2") ([ "[") (binary_expression "uVar5 - 1" (identifier "uVar5") (- "-") (number_literal "1")) (] "]")) (== "==") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")")) (compound_statement "{\n                local_98 = iVar3 + uVar5;\n                break;\n              }" ({ "{") (expression_statement "local_98 = iVar3 + uVar5;" (assignment_expression "local_98 = iVar3 + uVar5" (identifier "local_98") (= "=") (binary_expression "iVar3 + uVar5" (identifier "iVar3") (+ "+") (identifier "uVar5"))) (; ";")) (break_statement "break;" (break "break") (; ";")) (} "}"))) (} "}"))) (} "}")))) (if_statement "if (local_98 < param_3) {\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }\n          else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }" (if "if") (parenthesized_expression "(local_98 < param_3)" (( "(") (binary_expression "local_98 < param_3" (identifier "local_98") (< "<") (identifier "param_3")) () ")")) (compound_statement "{\n            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);\n            memcpy(local_a4,param_2,uVar5);\n            bVar8 = true;\n          }" ({ "{") (expression_statement "memmove(local_a4 + uVar5,local_a4,iVar3 + 1);" (call_expression "memmove(local_a4 + uVar5,local_a4,iVar3 + 1)" (identifier "memmove") (argument_list "(local_a4 + uVar5,local_a4,iVar3 + 1)" (( "(") (binary_expression "local_a4 + uVar5" (identifier "local_a4") (+ "+") (identifier "uVar5")) (, ",") (identifier "local_a4") (, ",") (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1")) () ")"))) (; ";")) (expression_statement "memcpy(local_a4,param_2,uVar5);" (call_expression "memcpy(local_a4,param_2,uVar5)" (identifier "memcpy") (argument_list "(local_a4,param_2,uVar5)" (( "(") (identifier "local_a4") (, ",") (identifier "param_2") (, ",") (identifier "uVar5") () ")"))) (; ";")) (expression_statement "bVar8 = true;" (assignment_expression "bVar8 = true" (identifier "bVar8") (= "=") (true "true")) (; ";")) (} "}")) (else_clause "else {\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }" (else "else") (compound_statement "{\n            iVar2 = FUN_00052b30();\n            bVar8 = iVar2 == 0;\n            local_98 = iVar3;\n          }" ({ "{") (expression_statement "iVar2 = FUN_00052b30();" (assignment_expression "iVar2 = FUN_00052b30()" (identifier "iVar2") (= "=") (call_expression "FUN_00052b30()" (identifier "FUN_00052b30") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "bVar8 = iVar2 == 0;" (assignment_expression "bVar8 = iVar2 == 0" (identifier "bVar8") (= "=") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0"))) (; ";")) (expression_statement "local_98 = iVar3;" (assignment_expression "local_98 = iVar3" (identifier "local_98") (= "=") (identifier "iVar3")) (; ";")) (} "}")))) (} "}"))) (expression_statement "local_a4[local_98] = '\0';" (assignment_expression "local_a4[local_98] = '\0'" (subscript_expression "local_a4[local_98]" (identifier "local_a4") ([ "[") (identifier "local_98") (] "]")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (} "}")))) (if_statement "if ((param_4 != local_a4) && (bVar8)) {\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }" (if "if") (parenthesized_expression "((param_4 != local_a4) && (bVar8))" (( "(") (binary_expression "(param_4 != local_a4) && (bVar8)" (parenthesized_expression "(param_4 != local_a4)" (( "(") (binary_expression "param_4 != local_a4" (identifier "param_4") (!= "!=") (identifier "local_a4")) () ")")) (&& "&&") (parenthesized_expression "(bVar8)" (( "(") (identifier "bVar8") () ")"))) () ")")) (compound_statement "{\n        bVar8 = true;\n        param_2 = local_a4;\n        goto LAB_000563d8;\n      }" ({ "{") (expression_statement "bVar8 = true;" (assignment_expression "bVar8 = true" (identifier "bVar8") (= "=") (true "true")) (; ";")) (expression_statement "param_2 = local_a4;" (assignment_expression "param_2 = local_a4" (identifier "param_2") (= "=") (identifier "local_a4")) (; ";")) (goto_statement "goto LAB_000563d8;" (goto "goto") (statement_identifier "LAB_000563d8") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n      piVar7 = __errno_location();\n      if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }\n      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;\nLAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    \n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }\n      bVar8 = false;\nLAB_000563d8:\n      sVar4 = strlen(param_2);\n      uVar5 = sVar4 & 0x3fffffff;\n      if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }\n      iVar3 = iVar2;\n      if (!bVar8) goto LAB_0005647e;\n    }" (else "else") (compound_statement "{\n      piVar7 = __errno_location();\n      if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }\n      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;\nLAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    \n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }\n      bVar8 = false;\nLAB_000563d8:\n      sVar4 = strlen(param_2);\n      uVar5 = sVar4 & 0x3fffffff;\n      if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }\n      iVar3 = iVar2;\n      if (!bVar8) goto LAB_0005647e;\n    }" ({ "{") (expression_statement "piVar7 = __errno_location();" (assignment_expression "piVar7 = __errno_location()" (identifier "piVar7") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (*piVar7 == 2) {\n        bVar8 = true;\n        iVar3 = 0;\n      }\n      else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }" (if "if") (parenthesized_expression "(*piVar7 == 2)" (( "(") (binary_expression "*piVar7 == 2" (pointer_expression "*piVar7" (* "*") (identifier "piVar7")) (== "==") (number_literal "2")) () ")")) (compound_statement "{\n        bVar8 = true;\n        iVar3 = 0;\n      }" ({ "{") (expression_statement "bVar8 = true;" (assignment_expression "bVar8 = true" (identifier "bVar8") (= "=") (true "true")) (; ";")) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }" (else "else") (compound_statement "{\n        FUN_00052b30();\n        iVar3 = FUN_000556e0(0x9732);\n        bVar8 = iVar3 == 0;\n      }" ({ "{") (expression_statement "FUN_00052b30();" (call_expression "FUN_00052b30()" (identifier "FUN_00052b30") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "iVar3 = FUN_000556e0(0x9732);" (assignment_expression "iVar3 = FUN_000556e0(0x9732)" (identifier "iVar3") (= "=") (call_expression "FUN_000556e0(0x9732)" (identifier "FUN_000556e0") (argument_list "(0x9732)" (( "(") (number_literal "0x9732") () ")")))) (; ";")) (expression_statement "bVar8 = iVar3 == 0;" (assignment_expression "bVar8 = iVar3 == 0" (identifier "bVar8") (= "=") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0"))) (; ";")) (} "}")))) (if_statement "if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;" (if "if") (parenthesized_expression "((param_2 == param_4) || (!bVar8))" (( "(") (binary_expression "(param_2 == param_4) || (!bVar8)" (parenthesized_expression "(param_2 == param_4)" (( "(") (binary_expression "param_2 == param_4" (identifier "param_2") (== "==") (identifier "param_4")) () ")")) (|| "||") (parenthesized_expression "(!bVar8)" (( "(") (unary_expression "!bVar8" (! "!") (identifier "bVar8")) () ")"))) () ")")) (goto_statement "goto LAB_0005647e;" (goto "goto") (statement_identifier "LAB_0005647e") (; ";"))) (labeled_statement "LAB_000564f3:\n      if (param_2 == (char *)0x0) {\n                    \n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }" (statement_identifier "LAB_000564f3") (: ":") (if_statement "if (param_2 == (char *)0x0) {\n                    \n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }" (if "if") (parenthesized_expression "(param_2 == (char *)0x0)" (( "(") (binary_expression "param_2 == (char *)0x0" (identifier "param_2") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n                    \n        pcVar1 = (code *)invalidInstructionException();\n        (*pcVar1)();\n      }" ({ "{") (expression_statement "pcVar1 = (code *)invalidInstructionException();" (assignment_expression "pcVar1 = (code *)invalidInstructionException()" (identifier "pcVar1") (= "=") (cast_expression "(code *)invalidInstructionException()" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "invalidInstructionException()" (identifier "invalidInstructionException") (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "(*pcVar1)();" (call_expression "(*pcVar1)()" (parenthesized_expression "(*pcVar1)" (( "(") (pointer_expression "*pcVar1" (* "*") (identifier "pcVar1")) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (expression_statement "bVar8 = false;" (assignment_expression "bVar8 = false" (identifier "bVar8") (= "=") (false "false")) (; ";")) (labeled_statement "LAB_000563d8:\n      sVar4 = strlen(param_2);" (statement_identifier "LAB_000563d8") (: ":") (expression_statement "sVar4 = strlen(param_2);" (assignment_expression "sVar4 = strlen(param_2)" (identifier "sVar4") (= "=") (call_expression "strlen(param_2)" (identifier "strlen") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";"))) (expression_statement "uVar5 = sVar4 & 0x3fffffff;" (assignment_expression "uVar5 = sVar4 & 0x3fffffff" (identifier "uVar5") (= "=") (binary_expression "sVar4 & 0x3fffffff" (identifier "sVar4") (& "&") (number_literal "0x3fffffff"))) (; ";")) (if_statement "if (*param_2 == '/') {\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }\n      else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }" (if "if") (parenthesized_expression "(*param_2 == '/')" (( "(") (binary_expression "*param_2 == '/'" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (== "==") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")")) (compound_statement "{\n        iVar2 = 0;\n        pcVar6 = param_4;\nLAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }\n        *pcVar6 = '\0';\n        iVar2 = FUN_00052b30();\n      }" ({ "{") (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" (identifier "iVar2") (= "=") (number_literal "0")) (; ";")) (expression_statement "pcVar6 = param_4;" (assignment_expression "pcVar6 = param_4" (identifier "pcVar6") (= "=") (identifier "param_4")) (; ";")) (labeled_statement "LAB_0005643d:\n        if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }" (statement_identifier "LAB_0005643d") (: ":") (if_statement "if ((int)uVar5 < param_3) {\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }" (if "if") (parenthesized_expression "((int)uVar5 < param_3)" (( "(") (binary_expression "(int)uVar5 < param_3" (cast_expression "(int)uVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar5")) (< "<") (identifier "param_3")) () ")")) (compound_statement "{\n          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);\n          param_2 = param_4;\n          if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }\n          goto LAB_00056320;\n        }" ({ "{") (expression_statement "FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);" (call_expression "FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2)" (identifier "FUN_0004e1d0") (argument_list "(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2)" (( "(") (binary_expression "param_3 - iVar2" (identifier "param_3") (- "-") (identifier "iVar2")) (, ",") (identifier "pcVar6") (, ",") (pointer_expression "&DAT_000f8ce3" (& "&") (identifier "DAT_000f8ce3")) (, ",") (identifier "param_2") () ")"))) (; ";")) (expression_statement "param_2 = param_4;" (assignment_expression "param_2 = param_4" (identifier "param_2") (= "=") (identifier "param_4")) (; ";")) (if_statement "if (!bVar8) {\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }" (if "if") (parenthesized_expression "(!bVar8)" (( "(") (unary_expression "!bVar8" (! "!") (identifier "bVar8")) () ")")) (compound_statement "{\n            iVar3 = 0;\n            goto LAB_0005647e;\n          }" ({ "{") (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (goto_statement "goto LAB_0005647e;" (goto "goto") (statement_identifier "LAB_0005647e") (; ";")) (} "}"))) (goto_statement "goto LAB_00056320;" (goto "goto") (statement_identifier "LAB_00056320") (; ";")) (} "}")))) (expression_statement "*pcVar6 = '\0';" (assignment_expression "*pcVar6 = '\0'" (pointer_expression "*pcVar6" (* "*") (identifier "pcVar6")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (expression_statement "iVar2 = FUN_00052b30();" (assignment_expression "iVar2 = FUN_00052b30()" (identifier "iVar2") (= "=") (call_expression "FUN_00052b30()" (identifier "FUN_00052b30") (argument_list "()" (( "(") () ")")))) (; ";")) (} "}")) (else_clause "else {\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }" (else "else") (compound_statement "{\n        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);\n        if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }\n        FUN_00052b30();\n        iVar2 = FUN_000556e0(0x96f9);\n      }" ({ "{") (expression_statement "iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);" (assignment_expression "iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2)" (parenthesized_expression "(*(code *)PTR_getcwd_0014c3e8)" (( "(") (pointer_expression "*(code *)PTR_getcwd_0014c3e8" (* "*") (cast_expression "(code *)PTR_getcwd_0014c3e8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_getcwd_0014c3e8"))) () ")")) (argument_list "(param_4,param_3 + -2)" (( "(") (identifier "param_4") (, ",") (binary_expression "param_3 + -2" (identifier "param_3") (+ "+") (number_literal "-2")) () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }\n          *pcVar6 = '/';\n          uVar5 = uVar5 + iVar2;\n          pcVar6 = param_4 + iVar2;\n          goto LAB_0005643d;\n        }" ({ "{") (if_statement "if (param_4 == (char *)0x0) {\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }\n          else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }" (if "if") (parenthesized_expression "(param_4 == (char *)0x0)" (( "(") (binary_expression "param_4 == (char *)0x0" (identifier "param_4") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n            pcVar6 = (char *)0x0;\n            iVar2 = 1;\n          }" ({ "{") (expression_statement "pcVar6 = (char *)0x0;" (assignment_expression "pcVar6 = (char *)0x0" (identifier "pcVar6") (= "=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" (identifier "iVar2") (= "=") (number_literal "1")) (; ";")) (} "}")) (else_clause "else {\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }" (else "else") (compound_statement "{\n            sVar4 = strlen(param_4);\n            iVar2 = (sVar4 & 0x3fffffff) + 1;\n            pcVar6 = param_4 + (sVar4 & 0x3fffffff);\n          }" ({ "{") (expression_statement "sVar4 = strlen(param_4);" (assignment_expression "sVar4 = strlen(param_4)" (identifier "sVar4") (= "=") (call_expression "strlen(param_4)" (identifier "strlen") (argument_list "(param_4)" (( "(") (identifier "param_4") () ")")))) (; ";")) (expression_statement "iVar2 = (sVar4 & 0x3fffffff) + 1;" (assignment_expression "iVar2 = (sVar4 & 0x3fffffff) + 1" (identifier "iVar2") (= "=") (binary_expression "(sVar4 & 0x3fffffff) + 1" (parenthesized_expression "(sVar4 & 0x3fffffff)" (( "(") (binary_expression "sVar4 & 0x3fffffff" (identifier "sVar4") (& "&") (number_literal "0x3fffffff")) () ")")) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pcVar6 = param_4 + (sVar4 & 0x3fffffff);" (assignment_expression "pcVar6 = param_4 + (sVar4 & 0x3fffffff)" (identifier "pcVar6") (= "=") (binary_expression "param_4 + (sVar4 & 0x3fffffff)" (identifier "param_4") (+ "+") (parenthesized_expression "(sVar4 & 0x3fffffff)" (( "(") (binary_expression "sVar4 & 0x3fffffff" (identifier "sVar4") (& "&") (number_literal "0x3fffffff")) () ")")))) (; ";")) (} "}")))) (expression_statement "*pcVar6 = '/';" (assignment_expression "*pcVar6 = '/'" (pointer_expression "*pcVar6" (* "*") (identifier "pcVar6")) (= "=") (char_literal "'/'" (' "'") (character "/") (' "'"))) (; ";")) (expression_statement "uVar5 = uVar5 + iVar2;" (assignment_expression "uVar5 = uVar5 + iVar2" (identifier "uVar5") (= "=") (binary_expression "uVar5 + iVar2" (identifier "uVar5") (+ "+") (identifier "iVar2"))) (; ";")) (expression_statement "pcVar6 = param_4 + iVar2;" (assignment_expression "pcVar6 = param_4 + iVar2" (identifier "pcVar6") (= "=") (binary_expression "param_4 + iVar2" (identifier "param_4") (+ "+") (identifier "iVar2"))) (; ";")) (goto_statement "goto LAB_0005643d;" (goto "goto") (statement_identifier "LAB_0005643d") (; ";")) (} "}"))) (expression_statement "FUN_00052b30();" (call_expression "FUN_00052b30()" (identifier "FUN_00052b30") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "iVar2 = FUN_000556e0(0x96f9);" (assignment_expression "iVar2 = FUN_000556e0(0x96f9)" (identifier "iVar2") (= "=") (call_expression "FUN_000556e0(0x96f9)" (identifier "FUN_000556e0") (argument_list "(0x96f9)" (( "(") (number_literal "0x96f9") () ")")))) (; ";")) (} "}")))) (expression_statement "iVar3 = iVar2;" (assignment_expression "iVar3 = iVar2" (identifier "iVar3") (= "=") (identifier "iVar2")) (; ";")) (if_statement "if (!bVar8) goto LAB_0005647e;" (if "if") (parenthesized_expression "(!bVar8)" (( "(") (unary_expression "!bVar8" (! "!") (identifier "bVar8")) () ")")) (goto_statement "goto LAB_0005647e;" (goto "goto") (statement_identifier "LAB_0005647e") (; ";"))) (} "}")))) (expression_statement "iVar3 = iVar2;" (assignment_expression "iVar3 = iVar2" (identifier "iVar3") (= "=") (identifier "iVar2")) (; ";")) (expression_statement "param_2 = param_4;" (assignment_expression "param_2 = param_4" (identifier "param_2") (= "=") (identifier "param_4")) (; ";")) (if_statement "if (iVar2 != 0) {\nLAB_0005647e:\n      FUN_000264d0(local_a4);\n      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar3;\n      }\n                    \n      FUN_000f6410();\n    }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\nLAB_0005647e:\n      FUN_000264d0(local_a4);\n      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar3;\n      }\n                    \n      FUN_000f6410();\n    }" ({ "{") (labeled_statement "LAB_0005647e:\n      FUN_000264d0(local_a4);" (statement_identifier "LAB_0005647e") (: ":") (expression_statement "FUN_000264d0(local_a4);" (call_expression "FUN_000264d0(local_a4)" (identifier "FUN_000264d0") (argument_list "(local_a4)" (( "(") (identifier "local_a4") () ")"))) (; ";"))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n        return iVar3;\n      }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n        return iVar3;\n      }" ({ "{") (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}"))) (expression_statement "FUN_000f6410();" (call_expression "FUN_000f6410()" (identifier "FUN_000f6410") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";"))) (} "}")))

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

int function_1(type_1 *pVfs,char *var_3,int var_10,char *var_4)

{
  int var_22;
  type_2 *pcVar2;
  int var_2;
  int var_9;
  size_t var_13;
  type_3 var_14;
  char *pcVar7;
  int *piVar8;
  int var_1;
  bool bVar9;
  char *var_5;
  int var_7;
  int var_15;
  type_4 buf;
  
  var_22 = *(int *)(var_1 + 0x14);
  var_5 = (char *)0x0;
  var_7 = 1;
LAB_00056320:
  do {
    var_2 = (*aSyscall[0x1b].pCurrent)(var_3,&buf);
    if (var_2 == 0) {
      var_2 = 0;
      if ((buf.st_mode & 0xf000) != 0xa000) {
        var_9 = var_2;
        if (var_3 != var_4) goto LAB_000564f3;
        goto LAB_0005647e;
      }
      if (var_5 == (char *)0x0) {
        var_5 = (char *)var_6(var_10);
        if (var_5 == (char *)0x0) {
          var_9 = 7;
          goto LAB_0005647e;
        }
      }
      else {
        var_7 = var_7 + 1;
        if ((100 < var_7) && (var_9 = var_8(0x973d), var_9 != 0))
        goto LAB_0005647e;
      }
      var_9 = (*aSyscall[0x1a].pCurrent)(var_3,var_5,var_10 + -1);
      if (var_9 < 0) {
        var_2 = var_8(0x9743);
        var_2 = var_11(var_2,"readlink",var_3,0x9743);
        bVar9 = var_2 == 0;
      }
      else {
        bVar9 = true;
        var_15 = var_9;
        if (*var_5 != '/') {
          if (var_3 == (char *)0x0) {
            var_14 = 0;
          }
          else {
            var_13 = var_12(var_3);
            for (var_14 = var_13 & 0x3fffffff; var_14 != 0; var_14 = var_14 - 1) {
              if (var_3[var_14 - 1] == '/') {
                var_15 = var_9 + var_14;
                break;
              }
            }
          }
          if (var_15 < var_10) {
            var_16(var_5 + var_14,var_5,var_9 + 1);
            var_17(var_5,var_3,var_14);
            bVar9 = true;
          }
          else {
            var_2 = var_8(0x9749);
            bVar9 = var_2 == 0;
            var_15 = var_9;
          }
        }
        var_5[var_15] = '\0';
      }
      if ((var_4 != var_5) && (bVar9)) {
        bVar9 = true;
        var_3 = var_5;
        goto LAB_000563d8;
      }
    }
    else {
      piVar8 = var_18();
      if (*piVar8 == 2) {
        bVar9 = true;
        var_9 = 0;
      }
      else {
        var_2 = var_8(0x9732);
        var_9 = var_11(var_2,"lstat",var_3,0x9732);
        bVar9 = var_9 == 0;
      }
      if ((var_3 == var_4) || (!bVar9)) goto LAB_0005647e;
LAB_000564f3:
      if (var_3 == (char *)0x0) {
                    /* WARNING: Does not return */
        pcVar2 = (type_2 *)var_19();
        (*pcVar2)();
      }
      bVar9 = false;
LAB_000563d8:
      var_13 = var_12(var_3);
      var_14 = var_13 & 0x3fffffff;
      if (*var_3 == '/') {
        var_2 = 0;
        pcVar7 = var_4;
LAB_0005643d:
        if ((int)var_14 < var_10) {
          var_20(var_10 - var_2,pcVar7,"%s",var_3);
          var_3 = var_4;
          if (!bVar9) {
            var_9 = 0;
            goto LAB_0005647e;
          }
          goto LAB_00056320;
        }
        *pcVar7 = '\0';
        var_2 = var_8(0x9702);
      }
      else {
        var_2 = (*aSyscall[3].pCurrent)(var_4,var_10 + -2);
        if (var_2 != 0) {
          if (var_4 == (char *)0x0) {
            pcVar7 = (char *)0x0;
            var_2 = 1;
          }
          else {
            var_13 = var_12(var_4);
            var_2 = (var_13 & 0x3fffffff) + 1;
            pcVar7 = var_4 + (var_13 & 0x3fffffff);
          }
          *pcVar7 = '/';
          var_14 = var_14 + var_2;
          pcVar7 = var_4 + var_2;
          goto LAB_0005643d;
        }
        var_2 = var_8(0x96f9);
        var_2 = var_11(var_2,"getcwd",var_3,0x96f9);
      }
      var_9 = var_2;
      if (!bVar9) goto LAB_0005647e;
    }
    var_9 = var_2;
    var_3 = var_4;
    if (var_2 != 0) {
LAB_0005647e:
      var_21(var_5);
      if (var_22 == *(int *)(var_1 + 0x14)) {
        return var_9;
      }
                    /* WARNING: Subroutine does not return */
      var_23();
    }
  } while( true );
}


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

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

int MASKED(undefined4 param_1,char *param_2,int param_3,char *param_4)

{
  code *pcVar1;
  int iVar2;
  int iVar3;
  size_t sVar4;
  uint uVar5;
  char *pcVar6;
  int *piVar7;
  int in_GS_OFFSET;
  bool bVar8;
  char *local_a4;
  int local_9c;
  int local_98;
  undefined1 local_80 [16];
  uint local_70;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x562c9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  local_a4 = (char *)0x0;
  local_9c = 1;
LAB_00056320:
  do {
    iVar2 = (*(code *)PTR_FUN_0014c508)(param_2,local_80);
    if (iVar2 == 0) {
      iVar2 = 0;
      if ((local_70 & 0xf000) != 0xa000) {
        iVar3 = iVar2;
        if (param_2 != param_4) goto LAB_000564f3;
        goto LAB_0005647e;
      }
      if (local_a4 == (char *)0x0) {
        local_a4 = (char *)FUN_0003f8a0(param_3);
        if (local_a4 == (char *)0x0) {
          iVar3 = 7;
          goto LAB_0005647e;
        }
      }
      else {
        local_9c = local_9c + 1;
        if ((100 < local_9c) && (iVar3 = FUN_00052b30(), iVar3 != 0)) goto LAB_0005647e;
      }
      iVar3 = (*(code *)PTR_readlink_0014c4fc)(param_2,local_a4,param_3 + -1);
      if (iVar3 < 0) {
        FUN_00052b30();
        iVar2 = FUN_000556e0(0x9743);
        bVar8 = iVar2 == 0;
      }
      else {
        bVar8 = true;
        local_98 = iVar3;
        if (*local_a4 != '/') {
          if (param_2 == (char *)0x0) {
            uVar5 = 0;
          }
          else {
            sVar4 = strlen(param_2);
            for (uVar5 = sVar4 & 0x3fffffff; uVar5 != 0; uVar5 = uVar5 - 1) {
              if (param_2[uVar5 - 1] == '/') {
                local_98 = iVar3 + uVar5;
                break;
              }
            }
          }
          if (local_98 < param_3) {
            memmove(local_a4 + uVar5,local_a4,iVar3 + 1);
            memcpy(local_a4,param_2,uVar5);
            bVar8 = true;
          }
          else {
            iVar2 = FUN_00052b30();
            bVar8 = iVar2 == 0;
            local_98 = iVar3;
          }
        }
        local_a4[local_98] = '\0';
      }
      if ((param_4 != local_a4) && (bVar8)) {
        bVar8 = true;
        param_2 = local_a4;
        goto LAB_000563d8;
      }
    }
    else {
      piVar7 = __errno_location();
      if (*piVar7 == 2) {
        bVar8 = true;
        iVar3 = 0;
      }
      else {
        FUN_00052b30();
        iVar3 = FUN_000556e0(0x9732);
        bVar8 = iVar3 == 0;
      }
      if ((param_2 == param_4) || (!bVar8)) goto LAB_0005647e;
LAB_000564f3:
      if (param_2 == (char *)0x0) {
                    /* WARNING: Does not return */
        pcVar1 = (code *)invalidInstructionException();
        (*pcVar1)();
      }
      bVar8 = false;
LAB_000563d8:
      sVar4 = strlen(param_2);
      uVar5 = sVar4 & 0x3fffffff;
      if (*param_2 == '/') {
        iVar2 = 0;
        pcVar6 = param_4;
LAB_0005643d:
        if ((int)uVar5 < param_3) {
          FUN_0004e1d0(param_3 - iVar2,pcVar6,&DAT_000f8ce3,param_2);
          param_2 = param_4;
          if (!bVar8) {
            iVar3 = 0;
            goto LAB_0005647e;
          }
          goto LAB_00056320;
        }
        *pcVar6 = '\0';
        iVar2 = FUN_00052b30();
      }
      else {
        iVar2 = (*(code *)PTR_getcwd_0014c3e8)(param_4,param_3 + -2);
        if (iVar2 != 0) {
          if (param_4 == (char *)0x0) {
            pcVar6 = (char *)0x0;
            iVar2 = 1;
          }
          else {
            sVar4 = strlen(param_4);
            iVar2 = (sVar4 & 0x3fffffff) + 1;
            pcVar6 = param_4 + (sVar4 & 0x3fffffff);
          }
          *pcVar6 = '/';
          uVar5 = uVar5 + iVar2;
          pcVar6 = param_4 + iVar2;
          goto LAB_0005643d;
        }
        FUN_00052b30();
        iVar2 = FUN_000556e0(0x96f9);
      }
      iVar3 = iVar2;
      if (!bVar8) goto LAB_0005647e;
    }
    iVar3 = iVar2;
    param_2 = param_4;
    if (iVar2 != 0) {
LAB_0005647e:
      FUN_000264d0(local_a4);
      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
        return iVar3;
      }
                    /* WARNING: Subroutine does not return */
      FUN_000f6410();
    }
  } while( true );
}

