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

int __regparm3 fts_safe_changedir(FTS *sp,FTSENT *p,int fd,char *dir)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int *piVar4;
  int iVar5;
  uint flags;
  uint uVar6;
  byte *pbVar7;
  byte *pbVar8;
  int in_GS_OFFSET;
  bool bVar9;
  bool bVar10;
  int local_a0;
  _Bool local_91;
  stat sb;
  
  uVar6 = sp->fts_options;
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  bVar9 = false;
  bVar10 = dir == (char *)0x0;
  iVar3 = fd;
  local_a0 = fd;
  if (bVar10) {
LAB_000180e0:
    if ((uVar6 & 4) != 0) {
LAB_00018190:
      if (((uVar6 & 0x200) == 0) || (fd < 0)) {
        iVar5 = 0;
      }
      else {
        iVar5 = 0;
        close(fd);
      }
      goto LAB_000181a6;
    }
    if (fd < 0) {
      local_91 = false;
LAB_00018287:
      flags = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;
      if ((uVar6 & 0x200) == 0) {
LAB_000181f0:
        iVar3 = open_safer(dir,flags);
      }
      else {
LAB_000180b7:
        iVar3 = openat_safer(sp->fts_cwd_fd,dir,flags);
      }
      local_a0 = fd;
      if (iVar3 < 0) {
        iVar5 = -1;
        goto LAB_000181a6;
      }
    }
    else {
      local_91 = false;
    }
  }
  else {
    iVar5 = 3;
    pbVar7 = (byte *)dir;
    pbVar8 = &DAT_0001fb1d;
    do {
      if (iVar5 == 0) break;
      iVar5 = iVar5 + -1;
      bVar9 = *pbVar7 < *pbVar8;
      bVar10 = *pbVar7 == *pbVar8;
      pbVar7 = pbVar7 + 1;
      pbVar8 = pbVar8 + 1;
    } while (bVar10);
    if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;
    if ((uVar6 & 4) != 0) goto LAB_00018190;
    if (fd < 0) {
      if ((uVar6 & 0x200) == 0) {
        local_91 = true;
        flags = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;
        goto LAB_000181f0;
      }
      local_91 = i_ring_empty(&sp->fts_fd_ring);
      if (!local_91) {
        local_a0 = i_ring_pop(&sp->fts_fd_ring);
        if (-1 < local_a0) {
          local_91 = true;
          iVar3 = local_a0;
          goto LAB_000180fd;
        }
        local_91 = true;
        uVar6 = sp->fts_options;
        goto LAB_00018287;
      }
      flags = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;
      goto LAB_000180b7;
    }
    local_91 = true;
  }
LAB_000180fd:
  iVar5 = __fxstat64(3,iVar3,(stat64 *)&sb);
  if (iVar5 == 0) {
    if ((*(int *)((int)&p->fts_statp[0].st_dev + 4) != sb.st_dev._4_4_ ||
         (int)p->fts_statp[0].st_dev != (int)sb.st_dev) ||
       (*(int *)((int)&p->fts_statp[0].st_ino + 4) != sb.st_ino._4_4_ ||
        (int)p->fts_statp[0].st_ino != (int)sb.st_ino)) {
      piVar4 = __errno_location();
      *piVar4 = 2;
      goto LAB_00018159;
    }
    if ((sp->fts_options & 0x200U) != 0) {
      iVar5 = sp->fts_cwd_fd;
      if ((iVar3 == iVar5) && (iVar5 != -100)) {
                    /* WARNING: Subroutine does not return */
        abort();
      }
      if (local_91 == false) {
        iVar5 = i_ring_push(&sp->fts_fd_ring,iVar5);
        if (-1 < iVar5) {
          close(iVar5);
        }
      }
      else if (((sp->fts_options & 4U) == 0) && (-1 < iVar5)) {
        close(iVar5);
      }
      sp->fts_cwd_fd = iVar3;
      iVar5 = 0;
      goto LAB_000181a6;
    }
    iVar5 = fchdir(iVar3);
  }
  else {
LAB_00018159:
    iVar5 = -1;
  }
  if (local_a0 < 0) {
    piVar4 = __errno_location();
    iVar2 = *piVar4;
    close(iVar3);
    *piVar4 = iVar2;
  }
LAB_000181a6:
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return iVar5;
}



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

int __regparm3 FUN_00017ff0(int param_1,int param_2,int param_3,byte *param_4)

{
  int iVar1;
  int iVar2;
  int *piVar3;
  int iVar4;
  uint uVar5;
  uint uVar6;
  byte *pbVar7;
  byte *pbVar8;
  int in_GS_OFFSET;
  bool bVar9;
  bool bVar10;
  int local_a0;
  char local_91;
  stat64 local_80;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x17ff9;
  uVar6 = *(uint *)(param_1 + 0x2c);
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  bVar9 = false;
  bVar10 = param_4 == (byte *)0x0;
  iVar2 = param_3;
  local_a0 = param_3;
  if (bVar10) {
LAB_000180e0:
    if ((uVar6 & 4) != 0) {
LAB_00018190:
      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {
        iVar4 = 0;
      }
      else {
        iVar4 = 0;
        close(param_3);
      }
      goto LAB_000181a6;
    }
    if (param_3 < 0) {
      local_91 = '\0';
LAB_00018287:
      uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;
      if ((uVar6 & 0x200) == 0) {
LAB_000181f0:
        iVar2 = FUN_0001b7a0(param_4,uVar5);
      }
      else {
LAB_000180b7:
        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);
      }
      local_a0 = param_3;
      if (iVar2 < 0) {
        iVar4 = -1;
        goto LAB_000181a6;
      }
    }
    else {
      local_91 = '\0';
    }
  }
  else {
    iVar4 = 3;
    pbVar7 = param_4;
    pbVar8 = &DAT_0001fb1d;
    do {
      if (iVar4 == 0) break;
      iVar4 = iVar4 + -1;
      bVar9 = *pbVar7 < *pbVar8;
      bVar10 = *pbVar7 == *pbVar8;
      pbVar7 = pbVar7 + 1;
      pbVar8 = pbVar8 + 1;
    } while (bVar10);
    if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;
    if ((uVar6 & 4) != 0) goto LAB_00018190;
    if (param_3 < 0) {
      if ((uVar6 & 0x200) == 0) {
        local_91 = '\x01';
        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;
        goto LAB_000181f0;
      }
      local_91 = FUN_0001cb50(param_1 + 0x38);
      if (local_91 == '\0') {
        local_a0 = FUN_0001cba0(param_1 + 0x38);
        if (-1 < local_a0) {
          local_91 = '\x01';
          iVar2 = local_a0;
          goto LAB_000180fd;
        }
        local_91 = '\x01';
        uVar6 = *(uint *)(param_1 + 0x2c);
        goto LAB_00018287;
      }
      uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;
      goto LAB_000180b7;
    }
    local_91 = '\x01';
  }
LAB_000180fd:
  iVar4 = __fxstat64(3,iVar2,&local_80);
  if (iVar4 == 0) {
    if ((*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||
         *(int *)(param_2 + 0x44) != (int)local_80.st_dev) ||
       (*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||
        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino)) {
      piVar3 = __errno_location();
      *piVar3 = 2;
      goto LAB_00018159;
    }
    if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {
      iVar4 = *(int *)(param_1 + 0x1c);
      if ((iVar2 == iVar4) && (iVar4 != -100)) {
                    /* WARNING: Subroutine does not return */
        abort();
      }
      if (local_91 == '\0') {
        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);
        if (-1 < iVar4) {
          close(iVar4);
        }
      }
      else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {
        close(iVar4);
      }
      *(int *)(param_1 + 0x1c) = iVar2;
      iVar4 = 0;
      goto LAB_000181a6;
    }
    iVar4 = fchdir(iVar2);
  }
  else {
LAB_00018159:
    iVar4 = -1;
  }
  if (local_a0 < 0) {
    piVar3 = __errno_location();
    iVar1 = *piVar3;
    close(iVar2);
    *piVar3 = iVar1;
  }
LAB_000181a6:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0001df30();
  }
  return iVar4;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00012b50
ADD EBX,0xe007
SUB ESP,0x9c
MOV EBP,dword ptr [EAX + 0x2c]
MOV dword ptr [ESP + 0x10],EAX
MOV dword ptr [ESP + 0x14],EDX
MOV EDX,dword ptr [ESP + 0xb0]
MOV EAX,EBP
MOV dword ptr [ESP + 0xc],ECX
AND EAX,0x4
MOV ESI,dword ptr GS:[0x14]
MOV dword ptr [ESP + 0x8c],ESI
XOR ESI,ESI
TEST EDX,EDX
JZ 0x000180e0
MOV ECX,0x3
LEA EDI,[EBX + 0xffff9b1d]
MOV ESI,EDX
CMPSB.REPE ES:EDI,ESI
SETA CL
SBB CL,0x0
TEST CL,CL
JNZ 0x000180e0
TEST EAX,EAX
JNZ 0x00018190
MOV ESI,dword ptr [ESP + 0xc]
TEST ESI,ESI
JNS 0x0001831b
TEST EBP,0x200
JZ 0x000181d0
MOV EAX,dword ptr [ESP + 0x10]
MOV dword ptr [ESP + 0x1c],EDX
SUB ESP,0xc
LEA ESI,[EAX + 0x38]
PUSH ESI
CALL 0x0001cb50
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x1c]
TEST AL,AL
MOV byte ptr [ESP + 0x1b],AL
JZ 0x00018250
MOV EAX,EBP
SHL EBP,0xd
SHL EAX,0x7
AND EBP,0x20000
AND EAX,0x40000
OR EBP,EAX
OR EBP,0x90900
SUB ESP,0x4
PUSH EBP
PUSH EDX
MOV EAX,dword ptr [ESP + 0x1c]
PUSH dword ptr [EAX + 0x1c]
CALL 0x0001ccc0
ADD ESP,0x10
MOV ESI,EAX
TEST ESI,ESI
JNS 0x000180fd
MOV EDI,0xffffffff
JMP 0x000181a6
TEST EAX,EAX
JNZ 0x00018190
MOV ECX,dword ptr [ESP + 0xc]
TEST ECX,ECX
JS 0x00018329
MOV byte ptr [ESP + 0x1b],0x0
MOV ESI,dword ptr [ESP + 0xc]
SUB ESP,0x4
LEA EAX,[ESP + 0x30]
PUSH EAX
PUSH ESI
PUSH 0x3
CALL 0x000121a0
ADD ESP,0x10
MOV EDI,EAX
TEST EAX,EAX
JNZ 0x00018159
MOV ECX,dword ptr [ESP + 0x14]
MOV EAX,dword ptr [ECX + 0x44]
MOV EDX,dword ptr [ECX + 0x48]
XOR EAX,dword ptr [ESP + 0x2c]
XOR EDX,dword ptr [ESP + 0x30]
OR EDX,EAX
JNZ 0x0001814e
MOV EAX,dword ptr [ECX + 0x9c]
MOV EDX,dword ptr [ECX + 0xa0]
XOR EAX,dword ptr [ESP + 0x84]
XOR EDX,dword ptr [ESP + 0x88]
OR EDX,EAX
JZ 0x00018208
CALL 0x00012310
MOV dword ptr [EAX],0x2
MOV EDI,0xffffffff
MOV EAX,dword ptr [ESP + 0xc]
TEST EAX,EAX
JNS 0x000181a6
CALL 0x00012310
SUB ESP,0xc
MOV EDX,dword ptr [EAX]
MOV EBP,EAX
MOV dword ptr [ESP + 0x18],EDX
PUSH ESI
CALL 0x00012480
MOV EDX,dword ptr [ESP + 0x1c]
ADD ESP,0x10
MOV dword ptr [EBP],EDX
JMP 0x000181a6
AND EBP,0x200
JZ 0x000181a4
MOV EDI,dword ptr [ESP + 0xc]
TEST EDI,EDI
JNS 0x00018230
XOR EDI,EDI
MOV ESI,dword ptr [ESP + 0x8c]
XOR ESI,dword ptr GS:[0x14]
MOV EAX,EDI
JNZ 0x00018316
ADD ESP,0x9c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,EBP
SHL EBP,0x7
MOV byte ptr [ESP + 0x1b],0x1
SHL EAX,0xd
AND EBP,0x40000
AND EAX,0x20000
OR EBP,EAX
OR EBP,0x90900
SUB ESP,0x8
PUSH EBP
PUSH EDX
CALL 0x0001b7a0
ADD ESP,0x10
MOV ESI,EAX
JMP 0x000180cd
MOV EAX,dword ptr [ESP + 0x10]
MOV EAX,dword ptr [EAX + 0x2c]
TEST AH,0x2
JNZ 0x000182b0
SUB ESP,0xc
PUSH ESI
CALL 0x000123c0
ADD ESP,0x10
MOV EDI,EAX
JMP 0x0001815e
SUB ESP,0xc
XOR EDI,EDI
PUSH dword ptr [ESP + 0x18]
CALL 0x00012480
ADD ESP,0x10
JMP 0x000181a6
SUB ESP,0xc
PUSH ESI
CALL 0x0001cba0
ADD ESP,0x10
MOV ESI,EAX
TEST EAX,EAX
JS 0x00018270
MOV dword ptr [ESP + 0xc],EAX
MOV byte ptr [ESP + 0x1b],0x1
JMP 0x000180fd
MOV EAX,dword ptr [ESP + 0x10]
MOV EDX,dword ptr [ESP + 0x1c]
MOV byte ptr [ESP + 0x1b],0x1
MOV EBP,dword ptr [EAX + 0x2c]
MOV EAX,EBP
AND EAX,0x200
MOV ECX,EBP
SHL EBP,0x7
SHL ECX,0xd
AND EBP,0x40000
AND ECX,0x20000
OR EBP,ECX
OR EBP,0x90900
TEST EAX,EAX
JNZ 0x000180b7
JMP 0x000181f0
MOV EDX,dword ptr [ESP + 0x10]
MOV EDX,dword ptr [EDX + 0x1c]
CMP ESI,EDX
JNZ 0x000182c0
CMP EDX,-0x64
JNZ 0x0001833a
CMP byte ptr [ESP + 0x1b],0x0
JZ 0x000182f0
TEST AL,0x4
JNZ 0x000182e0
TEST EDX,EDX
JS 0x000182e0
SUB ESP,0xc
PUSH EDX
CALL 0x00012480
ADD ESP,0x10
LEA ESI,[ESI]
NOP
MOV EAX,dword ptr [ESP + 0x10]
MOV dword ptr [EAX + 0x1c],ESI
JMP 0x000181a6
SUB ESP,0x8
PUSH EDX
MOV EAX,dword ptr [ESP + 0x1c]
ADD EAX,0x38
PUSH EAX
CALL 0x0001cb60
ADD ESP,0x10
TEST EAX,EAX
JS 0x000182e0
SUB ESP,0xc
PUSH EAX
CALL 0x00012480
ADD ESP,0x10
JMP 0x000182e0
CALL 0x0001df30
MOV ESI,dword ptr [ESP + 0xc]
MOV byte ptr [ESP + 0x1b],0x1
JMP 0x000180fd
MOV EAX,EBP
MOV byte ptr [ESP + 0x1b],0x0
AND EAX,0x200
JMP 0x00018287
CALL 0x00012440
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3 FUN_00017ff0(int param_1,int param_2,int param_3,byte *param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  int in_GS_OFFSET;\n  bool bVar9;\n  bool bVar10;\n  int local_a0;\n  char local_91;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x17ff9;\n  uVar6 = *(uint *)(param_1 + 0x2c);\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  bVar9 = false;\n  bVar10 = param_4 == (byte *)0x0;\n  iVar2 = param_3;\n  local_a0 = param_3;\n  if (bVar10) {\nLAB_000180e0:\n    if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }\n      goto LAB_000181a6;\n    }\n    if (param_3 < 0) {\n      local_91 = '\0';\nLAB_00018287:\n      uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);\n      }\n      else {\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }\n      local_a0 = param_3;\n      if (iVar2 < 0) {\n        iVar4 = -1;\n        goto LAB_000181a6;\n      }\n    }\n    else {\n      local_91 = '\0';\n    }\n  }\n  else {\n    iVar4 = 3;\n    pbVar7 = param_4;\n    pbVar8 = &DAT_0001fb1d;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;\n    if ((uVar6 & 4) != 0) goto LAB_00018190;\n    if (param_3 < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = FUN_0001cb50(param_1 + 0x38);\n      if (local_91 == '\0') {\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }\n      uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }\n    local_91 = '\x01';\n  }\nLAB_000180fd:\n  iVar4 = __fxstat64(3,iVar2,&local_80);\n  if (iVar4 == 0) {\n    if ((*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev) ||\n       (*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino)) {\n      piVar3 = __errno_location();\n      *piVar3 = 2;\n      goto LAB_00018159;\n    }\n    if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n      iVar4 = *(int *)(param_1 + 0x1c);\n      if ((iVar2 == iVar4) && (iVar4 != -100)) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      if (local_91 == '\0') {\n        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);\n        if (-1 < iVar4) {\n          close(iVar4);\n        }\n      }\n      else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }\n      *(int *)(param_1 + 0x1c) = iVar2;\n      iVar4 = 0;\n      goto LAB_000181a6;\n    }\n    iVar4 = fchdir(iVar2);\n  }\n  else {\nLAB_00018159:\n    iVar4 = -1;\n  }\n  if (local_a0 < 0) {\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    close(iVar2);\n    *piVar3 = iVar1;\n  }\nLAB_000181a6:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0001df30();\n  }\n  return iVar4;\n}\n\n" comment (function_definition "int __regparm3 FUN_00017ff0(int param_1,int param_2,int param_3,byte *param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  int in_GS_OFFSET;\n  bool bVar9;\n  bool bVar10;\n  int local_a0;\n  char local_91;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x17ff9;\n  uVar6 = *(uint *)(param_1 + 0x2c);\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  bVar9 = false;\n  bVar10 = param_4 == (byte *)0x0;\n  iVar2 = param_3;\n  local_a0 = param_3;\n  if (bVar10) {\nLAB_000180e0:\n    if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }\n      goto LAB_000181a6;\n    }\n    if (param_3 < 0) {\n      local_91 = '\0';\nLAB_00018287:\n      uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);\n      }\n      else {\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }\n      local_a0 = param_3;\n      if (iVar2 < 0) {\n        iVar4 = -1;\n        goto LAB_000181a6;\n      }\n    }\n    else {\n      local_91 = '\0';\n    }\n  }\n  else {\n    iVar4 = 3;\n    pbVar7 = param_4;\n    pbVar8 = &DAT_0001fb1d;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;\n    if ((uVar6 & 4) != 0) goto LAB_00018190;\n    if (param_3 < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = FUN_0001cb50(param_1 + 0x38);\n      if (local_91 == '\0') {\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }\n      uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }\n    local_91 = '\x01';\n  }\nLAB_000180fd:\n  iVar4 = __fxstat64(3,iVar2,&local_80);\n  if (iVar4 == 0) {\n    if ((*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev) ||\n       (*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino)) {\n      piVar3 = __errno_location();\n      *piVar3 = 2;\n      goto LAB_00018159;\n    }\n    if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n      iVar4 = *(int *)(param_1 + 0x1c);\n      if ((iVar2 == iVar4) && (iVar4 != -100)) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      if (local_91 == '\0') {\n        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);\n        if (-1 < iVar4) {\n          close(iVar4);\n        }\n      }\n      else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }\n      *(int *)(param_1 + 0x1c) = iVar2;\n      iVar4 = 0;\n      goto LAB_000181a6;\n    }\n    iVar4 = fchdir(iVar2);\n  }\n  else {\nLAB_00018159:\n    iVar4 = -1;\n  }\n  if (local_a0 < 0) {\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    close(iVar2);\n    *piVar3 = iVar1;\n  }\nLAB_000181a6:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0001df30();\n  }\n  return iVar4;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00017ff0(int param_1,int param_2,int param_3,byte *param_4)" identifier (parameter_list "(int param_1,int param_2,int param_3,byte *param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "byte *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  int in_GS_OFFSET;\n  bool bVar9;\n  bool bVar10;\n  int local_a0;\n  char local_91;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x17ff9;\n  uVar6 = *(uint *)(param_1 + 0x2c);\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  bVar9 = false;\n  bVar10 = param_4 == (byte *)0x0;\n  iVar2 = param_3;\n  local_a0 = param_3;\n  if (bVar10) {\nLAB_000180e0:\n    if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }\n      goto LAB_000181a6;\n    }\n    if (param_3 < 0) {\n      local_91 = '\0';\nLAB_00018287:\n      uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);\n      }\n      else {\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }\n      local_a0 = param_3;\n      if (iVar2 < 0) {\n        iVar4 = -1;\n        goto LAB_000181a6;\n      }\n    }\n    else {\n      local_91 = '\0';\n    }\n  }\n  else {\n    iVar4 = 3;\n    pbVar7 = param_4;\n    pbVar8 = &DAT_0001fb1d;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;\n    if ((uVar6 & 4) != 0) goto LAB_00018190;\n    if (param_3 < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = FUN_0001cb50(param_1 + 0x38);\n      if (local_91 == '\0') {\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }\n      uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }\n    local_91 = '\x01';\n  }\nLAB_000180fd:\n  iVar4 = __fxstat64(3,iVar2,&local_80);\n  if (iVar4 == 0) {\n    if ((*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev) ||\n       (*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino)) {\n      piVar3 = __errno_location();\n      *piVar3 = 2;\n      goto LAB_00018159;\n    }\n    if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n      iVar4 = *(int *)(param_1 + 0x1c);\n      if ((iVar2 == iVar4) && (iVar4 != -100)) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      if (local_91 == '\0') {\n        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);\n        if (-1 < iVar4) {\n          close(iVar4);\n        }\n      }\n      else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }\n      *(int *)(param_1 + 0x1c) = iVar2;\n      iVar4 = 0;\n      goto LAB_000181a6;\n    }\n    iVar4 = fchdir(iVar2);\n  }\n  else {\nLAB_00018159:\n    iVar4 = -1;\n  }\n  if (local_a0 < 0) {\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    close(iVar2);\n    *piVar3 = iVar1;\n  }\nLAB_000181a6:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0001df30();\n  }\n  return iVar4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "byte *pbVar7;" type_identifier (pointer_declarator "*pbVar7" * identifier) ;) (declaration "byte *pbVar8;" type_identifier (pointer_declarator "*pbVar8" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "bool bVar9;" primitive_type identifier ;) (declaration "bool bVar10;" primitive_type identifier ;) (declaration "int local_a0;" primitive_type identifier ;) (declaration "char local_91;" primitive_type identifier ;) (declaration "stat64 local_80;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x17ff9;" (assignment_expression "uStack_14 = 0x17ff9" identifier = number_literal) ;) (expression_statement "uVar6 = *(uint *)(param_1 + 0x2c);" (assignment_expression "uVar6 = *(uint *)(param_1 + 0x2c)" identifier = (pointer_expression "*(uint *)(param_1 + 0x2c)" * (cast_expression "(uint *)(param_1 + 0x2c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" 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 "bVar9 = false;" (assignment_expression "bVar9 = false" identifier = false) ;) (expression_statement "bVar10 = param_4 == (byte *)0x0;" (assignment_expression "bVar10 = param_4 == (byte *)0x0" identifier = (binary_expression "param_4 == (byte *)0x0" identifier == (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal))) ;) (expression_statement "iVar2 = param_3;" (assignment_expression "iVar2 = param_3" identifier = identifier) ;) (expression_statement "local_a0 = param_3;" (assignment_expression "local_a0 = param_3" identifier = identifier) ;) (if_statement "if (bVar10) {\nLAB_000180e0:\n    if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }\n      goto LAB_000181a6;\n    }\n    if (param_3 < 0) {\n      local_91 = '\0';\nLAB_00018287:\n      uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);\n      }\n      else {\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }\n      local_a0 = param_3;\n      if (iVar2 < 0) {\n        iVar4 = -1;\n        goto LAB_000181a6;\n      }\n    }\n    else {\n      local_91 = '\0';\n    }\n  }\n  else {\n    iVar4 = 3;\n    pbVar7 = param_4;\n    pbVar8 = &DAT_0001fb1d;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;\n    if ((uVar6 & 4) != 0) goto LAB_00018190;\n    if (param_3 < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = FUN_0001cb50(param_1 + 0x38);\n      if (local_91 == '\0') {\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }\n      uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }\n    local_91 = '\x01';\n  }" if (parenthesized_expression "(bVar10)" ( identifier )) (compound_statement "{\nLAB_000180e0:\n    if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }\n      goto LAB_000181a6;\n    }\n    if (param_3 < 0) {\n      local_91 = '\0';\nLAB_00018287:\n      uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);\n      }\n      else {\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }\n      local_a0 = param_3;\n      if (iVar2 < 0) {\n        iVar4 = -1;\n        goto LAB_000181a6;\n      }\n    }\n    else {\n      local_91 = '\0';\n    }\n  }" { (labeled_statement "LAB_000180e0:\n    if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }\n      goto LAB_000181a6;\n    }" statement_identifier : (if_statement "if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }\n      goto LAB_000181a6;\n    }" if (parenthesized_expression "((uVar6 & 4) != 0)" ( (binary_expression "(uVar6 & 4) != 0" (parenthesized_expression "(uVar6 & 4)" ( (binary_expression "uVar6 & 4" identifier & number_literal) )) != number_literal) )) (compound_statement "{\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }\n      goto LAB_000181a6;\n    }" { (labeled_statement "LAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }" statement_identifier : (if_statement "if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }" if (parenthesized_expression "(((uVar6 & 0x200) == 0) || (param_3 < 0))" ( (binary_expression "((uVar6 & 0x200) == 0) || (param_3 < 0)" (parenthesized_expression "((uVar6 & 0x200) == 0)" ( (binary_expression "(uVar6 & 0x200) == 0" (parenthesized_expression "(uVar6 & 0x200)" ( (binary_expression "uVar6 & 0x200" identifier & number_literal) )) == number_literal) )) || (parenthesized_expression "(param_3 < 0)" ( (binary_expression "param_3 < 0" identifier < number_literal) ))) )) (compound_statement "{\n        iVar4 = 0;\n      }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n        iVar4 = 0;\n        close(param_3);\n      }" else (compound_statement "{\n        iVar4 = 0;\n        close(param_3);\n      }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (expression_statement "close(param_3);" (call_expression "close(param_3)" identifier (argument_list "(param_3)" ( identifier ))) ;) })))) (goto_statement "goto LAB_000181a6;" goto statement_identifier ;) }))) (if_statement "if (param_3 < 0) {\n      local_91 = '\0';\nLAB_00018287:\n      uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);\n      }\n      else {\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }\n      local_a0 = param_3;\n      if (iVar2 < 0) {\n        iVar4 = -1;\n        goto LAB_000181a6;\n      }\n    }\n    else {\n      local_91 = '\0';\n    }" if (parenthesized_expression "(param_3 < 0)" ( (binary_expression "param_3 < 0" identifier < number_literal) )) (compound_statement "{\n      local_91 = '\0';\nLAB_00018287:\n      uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);\n      }\n      else {\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }\n      local_a0 = param_3;\n      if (iVar2 < 0) {\n        iVar4 = -1;\n        goto LAB_000181a6;\n      }\n    }" { (expression_statement "local_91 = '\0';" (assignment_expression "local_91 = '\0'" identifier = (char_literal "'\0'" ' escape_sequence ')) ;) (labeled_statement "LAB_00018287:\n      uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;" statement_identifier : (expression_statement "uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;" (assignment_expression "uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900" identifier = (binary_expression "(uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900" (binary_expression "(uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd" (binary_expression "(uVar6 & 0x800) << 7" (parenthesized_expression "(uVar6 & 0x800)" ( (binary_expression "uVar6 & 0x800" identifier & number_literal) )) << number_literal) | (binary_expression "(uVar6 & 0x10) << 0xd" (parenthesized_expression "(uVar6 & 0x10)" ( (binary_expression "uVar6 & 0x10" identifier & number_literal) )) << number_literal)) | number_literal)) ;)) (if_statement "if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);\n      }\n      else {\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }" if (parenthesized_expression "((uVar6 & 0x200) == 0)" ( (binary_expression "(uVar6 & 0x200) == 0" (parenthesized_expression "(uVar6 & 0x200)" ( (binary_expression "uVar6 & 0x200" identifier & number_literal) )) == number_literal) )) (compound_statement "{\nLAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);\n      }" { (labeled_statement "LAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);" statement_identifier : (expression_statement "iVar2 = FUN_0001b7a0(param_4,uVar5);" (assignment_expression "iVar2 = FUN_0001b7a0(param_4,uVar5)" identifier = (call_expression "FUN_0001b7a0(param_4,uVar5)" identifier (argument_list "(param_4,uVar5)" ( identifier , identifier )))) ;)) }) (else_clause "else {\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }" else (compound_statement "{\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }" { (labeled_statement "LAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);" statement_identifier : (expression_statement "iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);" (assignment_expression "iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5)" identifier = (call_expression "FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x1c)" * (cast_expression "(undefined4 *)(param_1 + 0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) )))) , identifier , identifier )))) ;)) }))) (expression_statement "local_a0 = param_3;" (assignment_expression "local_a0 = param_3" identifier = identifier) ;) (if_statement "if (iVar2 < 0) {\n        iVar4 = -1;\n        goto LAB_000181a6;\n      }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n        iVar4 = -1;\n        goto LAB_000181a6;\n      }" { (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" identifier = number_literal) ;) (goto_statement "goto LAB_000181a6;" goto statement_identifier ;) })) }) (else_clause "else {\n      local_91 = '\0';\n    }" else (compound_statement "{\n      local_91 = '\0';\n    }" { (expression_statement "local_91 = '\0';" (assignment_expression "local_91 = '\0'" identifier = (char_literal "'\0'" ' escape_sequence ')) ;) }))) }) (else_clause "else {\n    iVar4 = 3;\n    pbVar7 = param_4;\n    pbVar8 = &DAT_0001fb1d;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;\n    if ((uVar6 & 4) != 0) goto LAB_00018190;\n    if (param_3 < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = FUN_0001cb50(param_1 + 0x38);\n      if (local_91 == '\0') {\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }\n      uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }\n    local_91 = '\x01';\n  }" else (compound_statement "{\n    iVar4 = 3;\n    pbVar7 = param_4;\n    pbVar8 = &DAT_0001fb1d;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;\n    if ((uVar6 & 4) != 0) goto LAB_00018190;\n    if (param_3 < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = FUN_0001cb50(param_1 + 0x38);\n      if (local_91 == '\0') {\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }\n      uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }\n    local_91 = '\x01';\n  }" { (expression_statement "iVar4 = 3;" (assignment_expression "iVar4 = 3" identifier = number_literal) ;) (expression_statement "pbVar7 = param_4;" (assignment_expression "pbVar7 = param_4" identifier = identifier) ;) (expression_statement "pbVar8 = &DAT_0001fb1d;" (assignment_expression "pbVar8 = &DAT_0001fb1d" identifier = (pointer_expression "&DAT_0001fb1d" & identifier)) ;) (do_statement "do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);" do (compound_statement "{\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    }" { (if_statement "if (iVar4 == 0) break;" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) (expression_statement "bVar9 = *pbVar7 < *pbVar8;" (assignment_expression "bVar9 = *pbVar7 < *pbVar8" identifier = (binary_expression "*pbVar7 < *pbVar8" (pointer_expression "*pbVar7" * identifier) < (pointer_expression "*pbVar8" * identifier))) ;) (expression_statement "bVar10 = *pbVar7 == *pbVar8;" (assignment_expression "bVar10 = *pbVar7 == *pbVar8" identifier = (binary_expression "*pbVar7 == *pbVar8" (pointer_expression "*pbVar7" * identifier) == (pointer_expression "*pbVar8" * identifier))) ;) (expression_statement "pbVar7 = pbVar7 + 1;" (assignment_expression "pbVar7 = pbVar7 + 1" identifier = (binary_expression "pbVar7 + 1" identifier + number_literal)) ;) (expression_statement "pbVar8 = pbVar8 + 1;" (assignment_expression "pbVar8 = pbVar8 + 1" identifier = (binary_expression "pbVar8 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar10)" ( identifier )) ;) (if_statement "if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;" if (parenthesized_expression "((!bVar9 && !bVar10) != bVar9)" ( (binary_expression "(!bVar9 && !bVar10) != bVar9" (parenthesized_expression "(!bVar9 && !bVar10)" ( (binary_expression "!bVar9 && !bVar10" (unary_expression "!bVar9" ! identifier) && (unary_expression "!bVar10" ! identifier)) )) != identifier) )) (goto_statement "goto LAB_000180e0;" goto statement_identifier ;)) (if_statement "if ((uVar6 & 4) != 0) goto LAB_00018190;" if (parenthesized_expression "((uVar6 & 4) != 0)" ( (binary_expression "(uVar6 & 4) != 0" (parenthesized_expression "(uVar6 & 4)" ( (binary_expression "uVar6 & 4" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_00018190;" goto statement_identifier ;)) (if_statement "if (param_3 < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = FUN_0001cb50(param_1 + 0x38);\n      if (local_91 == '\0') {\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }\n      uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }" if (parenthesized_expression "(param_3 < 0)" ( (binary_expression "param_3 < 0" identifier < number_literal) )) (compound_statement "{\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = FUN_0001cb50(param_1 + 0x38);\n      if (local_91 == '\0') {\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }\n      uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }" { (if_statement "if ((uVar6 & 0x200) == 0) {\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }" if (parenthesized_expression "((uVar6 & 0x200) == 0)" ( (binary_expression "(uVar6 & 0x200) == 0" (parenthesized_expression "(uVar6 & 0x200)" ( (binary_expression "uVar6 & 0x200" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }" { (expression_statement "local_91 = '\x01';" (assignment_expression "local_91 = '\x01'" identifier = (char_literal "'\x01'" ' escape_sequence ')) ;) (expression_statement "uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;" (assignment_expression "uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900" identifier = (binary_expression "(uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900" (binary_expression "(uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd" (binary_expression "(uVar6 & 0x800) << 7" (parenthesized_expression "(uVar6 & 0x800)" ( (binary_expression "uVar6 & 0x800" identifier & number_literal) )) << number_literal) | (binary_expression "(uVar6 & 0x10) << 0xd" (parenthesized_expression "(uVar6 & 0x10)" ( (binary_expression "uVar6 & 0x10" identifier & number_literal) )) << number_literal)) | number_literal)) ;) (goto_statement "goto LAB_000181f0;" goto statement_identifier ;) })) (expression_statement "local_91 = FUN_0001cb50(param_1 + 0x38);" (assignment_expression "local_91 = FUN_0001cb50(param_1 + 0x38)" identifier = (call_expression "FUN_0001cb50(param_1 + 0x38)" identifier (argument_list "(param_1 + 0x38)" ( (binary_expression "param_1 + 0x38" identifier + number_literal) )))) ;) (if_statement "if (local_91 == '\0') {\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }" if (parenthesized_expression "(local_91 == '\0')" ( (binary_expression "local_91 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }" { (expression_statement "local_a0 = FUN_0001cba0(param_1 + 0x38);" (assignment_expression "local_a0 = FUN_0001cba0(param_1 + 0x38)" identifier = (call_expression "FUN_0001cba0(param_1 + 0x38)" identifier (argument_list "(param_1 + 0x38)" ( (binary_expression "param_1 + 0x38" identifier + number_literal) )))) ;) (if_statement "if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }" if (parenthesized_expression "(-1 < local_a0)" ( (binary_expression "-1 < local_a0" number_literal < identifier) )) (compound_statement "{\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }" { (expression_statement "local_91 = '\x01';" (assignment_expression "local_91 = '\x01'" identifier = (char_literal "'\x01'" ' escape_sequence ')) ;) (expression_statement "iVar2 = local_a0;" (assignment_expression "iVar2 = local_a0" identifier = identifier) ;) (goto_statement "goto LAB_000180fd;" goto statement_identifier ;) })) (expression_statement "local_91 = '\x01';" (assignment_expression "local_91 = '\x01'" identifier = (char_literal "'\x01'" ' escape_sequence ')) ;) (expression_statement "uVar6 = *(uint *)(param_1 + 0x2c);" (assignment_expression "uVar6 = *(uint *)(param_1 + 0x2c)" identifier = (pointer_expression "*(uint *)(param_1 + 0x2c)" * (cast_expression "(uint *)(param_1 + 0x2c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) ))))) ;) (goto_statement "goto LAB_00018287;" goto statement_identifier ;) })) (expression_statement "uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;" (assignment_expression "uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900" identifier = (binary_expression "(uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900" (binary_expression "(uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7" (binary_expression "(uVar6 & 0x10) << 0xd" (parenthesized_expression "(uVar6 & 0x10)" ( (binary_expression "uVar6 & 0x10" identifier & number_literal) )) << number_literal) | (binary_expression "(uVar6 & 0x800) << 7" (parenthesized_expression "(uVar6 & 0x800)" ( (binary_expression "uVar6 & 0x800" identifier & number_literal) )) << number_literal)) | number_literal)) ;) (goto_statement "goto LAB_000180b7;" goto statement_identifier ;) })) (expression_statement "local_91 = '\x01';" (assignment_expression "local_91 = '\x01'" identifier = (char_literal "'\x01'" ' escape_sequence ')) ;) }))) (labeled_statement "LAB_000180fd:\n  iVar4 = __fxstat64(3,iVar2,&local_80);" statement_identifier : (expression_statement "iVar4 = __fxstat64(3,iVar2,&local_80);" (assignment_expression "iVar4 = __fxstat64(3,iVar2,&local_80)" identifier = (call_expression "__fxstat64(3,iVar2,&local_80)" identifier (argument_list "(3,iVar2,&local_80)" ( number_literal , identifier , (pointer_expression "&local_80" & identifier) )))) ;)) (if_statement "if (iVar4 == 0) {\n    if ((*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev) ||\n       (*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino)) {\n      piVar3 = __errno_location();\n      *piVar3 = 2;\n      goto LAB_00018159;\n    }\n    if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n      iVar4 = *(int *)(param_1 + 0x1c);\n      if ((iVar2 == iVar4) && (iVar4 != -100)) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      if (local_91 == '\0') {\n        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);\n        if (-1 < iVar4) {\n          close(iVar4);\n        }\n      }\n      else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }\n      *(int *)(param_1 + 0x1c) = iVar2;\n      iVar4 = 0;\n      goto LAB_000181a6;\n    }\n    iVar4 = fchdir(iVar2);\n  }\n  else {\nLAB_00018159:\n    iVar4 = -1;\n  }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n    if ((*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev) ||\n       (*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino)) {\n      piVar3 = __errno_location();\n      *piVar3 = 2;\n      goto LAB_00018159;\n    }\n    if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n      iVar4 = *(int *)(param_1 + 0x1c);\n      if ((iVar2 == iVar4) && (iVar4 != -100)) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      if (local_91 == '\0') {\n        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);\n        if (-1 < iVar4) {\n          close(iVar4);\n        }\n      }\n      else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }\n      *(int *)(param_1 + 0x1c) = iVar2;\n      iVar4 = 0;\n      goto LAB_000181a6;\n    }\n    iVar4 = fchdir(iVar2);\n  }" { (if_statement "if ((*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev) ||\n       (*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino)) {\n      piVar3 = __errno_location();\n      *piVar3 = 2;\n      goto LAB_00018159;\n    }" if (parenthesized_expression "((*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev) ||\n       (*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino))" ( (binary_expression "(*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev) ||\n       (*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino)" (parenthesized_expression "(*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev)" ( (binary_expression "*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev" (binary_expression "*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_" (pointer_expression "*(int *)(param_2 + 0x48)" * (cast_expression "(int *)(param_2 + 0x48)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x48)" ( (binary_expression "param_2 + 0x48" identifier + number_literal) )))) != (field_expression "local_80.st_dev._4_4_" (field_expression "local_80.st_dev" identifier . field_identifier) . field_identifier)) || (binary_expression "*(int *)(param_2 + 0x44) != (int)local_80.st_dev" (pointer_expression "*(int *)(param_2 + 0x44)" * (cast_expression "(int *)(param_2 + 0x44)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x44)" ( (binary_expression "param_2 + 0x44" identifier + number_literal) )))) != (cast_expression "(int)local_80.st_dev" ( (type_descriptor "int" primitive_type) ) (field_expression "local_80.st_dev" identifier . field_identifier)))) )) || (parenthesized_expression "(*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino)" ( (binary_expression "*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino" (binary_expression "*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_" (pointer_expression "*(int *)(param_2 + 0xa0)" * (cast_expression "(int *)(param_2 + 0xa0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xa0)" ( (binary_expression "param_2 + 0xa0" identifier + number_literal) )))) != (field_expression "local_80.st_ino._4_4_" (field_expression "local_80.st_ino" identifier . field_identifier) . field_identifier)) || (binary_expression "*(int *)(param_2 + 0x9c) != (int)local_80.st_ino" (pointer_expression "*(int *)(param_2 + 0x9c)" * (cast_expression "(int *)(param_2 + 0x9c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x9c)" ( (binary_expression "param_2 + 0x9c" identifier + number_literal) )))) != (cast_expression "(int)local_80.st_ino" ( (type_descriptor "int" primitive_type) ) (field_expression "local_80.st_ino" identifier . field_identifier)))) ))) )) (compound_statement "{\n      piVar3 = __errno_location();\n      *piVar3 = 2;\n      goto LAB_00018159;\n    }" { (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar3 = 2;" (assignment_expression "*piVar3 = 2" (pointer_expression "*piVar3" * identifier) = number_literal) ;) (goto_statement "goto LAB_00018159;" goto statement_identifier ;) })) (if_statement "if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n      iVar4 = *(int *)(param_1 + 0x1c);\n      if ((iVar2 == iVar4) && (iVar4 != -100)) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      if (local_91 == '\0') {\n        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);\n        if (-1 < iVar4) {\n          close(iVar4);\n        }\n      }\n      else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }\n      *(int *)(param_1 + 0x1c) = iVar2;\n      iVar4 = 0;\n      goto LAB_000181a6;\n    }" if (parenthesized_expression "((*(uint *)(param_1 + 0x2c) & 0x200) != 0)" ( (binary_expression "(*(uint *)(param_1 + 0x2c) & 0x200) != 0" (parenthesized_expression "(*(uint *)(param_1 + 0x2c) & 0x200)" ( (binary_expression "*(uint *)(param_1 + 0x2c) & 0x200" (pointer_expression "*(uint *)(param_1 + 0x2c)" * (cast_expression "(uint *)(param_1 + 0x2c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n      iVar4 = *(int *)(param_1 + 0x1c);\n      if ((iVar2 == iVar4) && (iVar4 != -100)) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      if (local_91 == '\0') {\n        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);\n        if (-1 < iVar4) {\n          close(iVar4);\n        }\n      }\n      else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }\n      *(int *)(param_1 + 0x1c) = iVar2;\n      iVar4 = 0;\n      goto LAB_000181a6;\n    }" { (expression_statement "iVar4 = *(int *)(param_1 + 0x1c);" (assignment_expression "iVar4 = *(int *)(param_1 + 0x1c)" identifier = (pointer_expression "*(int *)(param_1 + 0x1c)" * (cast_expression "(int *)(param_1 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) ))))) ;) (if_statement "if ((iVar2 == iVar4) && (iVar4 != -100)) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }" if (parenthesized_expression "((iVar2 == iVar4) && (iVar4 != -100))" ( (binary_expression "(iVar2 == iVar4) && (iVar4 != -100)" (parenthesized_expression "(iVar2 == iVar4)" ( (binary_expression "iVar2 == iVar4" identifier == identifier) )) && (parenthesized_expression "(iVar4 != -100)" ( (binary_expression "iVar4 != -100" identifier != number_literal) ))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }" { comment (expression_statement "abort();" (call_expression "abort()" identifier (argument_list "()" ( ))) ;) })) (if_statement "if (local_91 == '\0') {\n        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);\n        if (-1 < iVar4) {\n          close(iVar4);\n        }\n      }\n      else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }" if (parenthesized_expression "(local_91 == '\0')" ( (binary_expression "local_91 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);\n        if (-1 < iVar4) {\n          close(iVar4);\n        }\n      }" { (expression_statement "iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);" (assignment_expression "iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4)" identifier = (call_expression "FUN_0001cb60(param_1 + 0x38,iVar4)" identifier (argument_list "(param_1 + 0x38,iVar4)" ( (binary_expression "param_1 + 0x38" identifier + number_literal) , identifier )))) ;) (if_statement "if (-1 < iVar4) {\n          close(iVar4);\n        }" if (parenthesized_expression "(-1 < iVar4)" ( (binary_expression "-1 < iVar4" number_literal < identifier) )) (compound_statement "{\n          close(iVar4);\n        }" { (expression_statement "close(iVar4);" (call_expression "close(iVar4)" identifier (argument_list "(iVar4)" ( identifier ))) ;) })) }) (else_clause "else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }" else (if_statement "if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }" if (parenthesized_expression "(((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4))" ( (binary_expression "((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)" (parenthesized_expression "((*(uint *)(param_1 + 0x2c) & 4) == 0)" ( (binary_expression "(*(uint *)(param_1 + 0x2c) & 4) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x2c) & 4)" ( (binary_expression "*(uint *)(param_1 + 0x2c) & 4" (pointer_expression "*(uint *)(param_1 + 0x2c)" * (cast_expression "(uint *)(param_1 + 0x2c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) )))) & number_literal) )) == number_literal) )) && (parenthesized_expression "(-1 < iVar4)" ( (binary_expression "-1 < iVar4" number_literal < identifier) ))) )) (compound_statement "{\n        close(iVar4);\n      }" { (expression_statement "close(iVar4);" (call_expression "close(iVar4)" identifier (argument_list "(iVar4)" ( identifier ))) ;) })))) (expression_statement "*(int *)(param_1 + 0x1c) = iVar2;" (assignment_expression "*(int *)(param_1 + 0x1c) = iVar2" (pointer_expression "*(int *)(param_1 + 0x1c)" * (cast_expression "(int *)(param_1 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) )))) = identifier) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_000181a6;" goto statement_identifier ;) })) (expression_statement "iVar4 = fchdir(iVar2);" (assignment_expression "iVar4 = fchdir(iVar2)" identifier = (call_expression "fchdir(iVar2)" identifier (argument_list "(iVar2)" ( identifier )))) ;) }) (else_clause "else {\nLAB_00018159:\n    iVar4 = -1;\n  }" else (compound_statement "{\nLAB_00018159:\n    iVar4 = -1;\n  }" { (labeled_statement "LAB_00018159:\n    iVar4 = -1;" statement_identifier : (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" identifier = number_literal) ;)) }))) (if_statement "if (local_a0 < 0) {\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    close(iVar2);\n    *piVar3 = iVar1;\n  }" if (parenthesized_expression "(local_a0 < 0)" ( (binary_expression "local_a0 < 0" identifier < number_literal) )) (compound_statement "{\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    close(iVar2);\n    *piVar3 = iVar1;\n  }" { (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar1 = *piVar3;" (assignment_expression "iVar1 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) (expression_statement "close(iVar2);" (call_expression "close(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (expression_statement "*piVar3 = iVar1;" (assignment_expression "*piVar3 = iVar1" (pointer_expression "*piVar3" * identifier) = identifier) ;) })) (labeled_statement "LAB_000181a6:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0001df30();\n  }" statement_identifier : (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0001df30();\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                    /* WARNING: Subroutine does not return */\n    FUN_0001df30();\n  }" { comment (expression_statement "FUN_0001df30();" (call_expression "FUN_0001df30()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3 fts_safe_changedir(FTS *sp,FTSENT *p,int fd,char *dir)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  int iVar5;\n  uint flags;\n  uint uVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  int in_GS_OFFSET;\n  bool bVar9;\n  bool bVar10;\n  int local_a0;\n  _Bool local_91;\n  stat sb;\n  \n  uVar6 = sp->fts_options;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  bVar9 = false;\n  bVar10 = dir == (char *)0x0;\n  iVar3 = fd;\n  local_a0 = fd;\n  if (bVar10) {\nLAB_000180e0:\n    if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (fd < 0)) {\n        iVar5 = 0;\n      }\n      else {\n        iVar5 = 0;\n        close(fd);\n      }\n      goto LAB_000181a6;\n    }\n    if (fd < 0) {\n      local_91 = false;\nLAB_00018287:\n      flags = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar3 = open_safer(dir,flags);\n      }\n      else {\nLAB_000180b7:\n        iVar3 = openat_safer(sp->fts_cwd_fd,dir,flags);\n      }\n      local_a0 = fd;\n      if (iVar3 < 0) {\n        iVar5 = -1;\n        goto LAB_000181a6;\n      }\n    }\n    else {\n      local_91 = false;\n    }\n  }\n  else {\n    iVar5 = 3;\n    pbVar7 = (byte *)dir;\n    pbVar8 = &DAT_0001fb1d;\n    do {\n      if (iVar5 == 0) break;\n      iVar5 = iVar5 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;\n    if ((uVar6 & 4) != 0) goto LAB_00018190;\n    if (fd < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = true;\n        flags = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = i_ring_empty(&sp->fts_fd_ring);\n      if (!local_91) {\n        local_a0 = i_ring_pop(&sp->fts_fd_ring);\n        if (-1 < local_a0) {\n          local_91 = true;\n          iVar3 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = true;\n        uVar6 = sp->fts_options;\n        goto LAB_00018287;\n      }\n      flags = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }\n    local_91 = true;\n  }\nLAB_000180fd:\n  iVar5 = __fxstat64(3,iVar3,(stat64 *)&sb);\n  if (iVar5 == 0) {\n    if ((*(int *)((int)&p->fts_statp[0].st_dev + 4) != sb.st_dev._4_4_ ||\n         (int)p->fts_statp[0].st_dev != (int)sb.st_dev) ||\n       (*(int *)((int)&p->fts_statp[0].st_ino + 4) != sb.st_ino._4_4_ ||\n        (int)p->fts_statp[0].st_ino != (int)sb.st_ino)) {\n      piVar4 = __errno_location();\n      *piVar4 = 2;\n      goto LAB_00018159;\n    }\n    if ((sp->fts_options & 0x200U) != 0) {\n      iVar5 = sp->fts_cwd_fd;\n      if ((iVar3 == iVar5) && (iVar5 != -100)) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      if (local_91 == false) {\n        iVar5 = i_ring_push(&sp->fts_fd_ring,iVar5);\n        if (-1 < iVar5) {\n          close(iVar5);\n        }\n      }\n      else if (((sp->fts_options & 4U) == 0) && (-1 < iVar5)) {\n        close(iVar5);\n      }\n      sp->fts_cwd_fd = iVar3;\n      iVar5 = 0;\n      goto LAB_000181a6;\n    }\n    iVar5 = fchdir(iVar3);\n  }\n  else {\nLAB_00018159:\n    iVar5 = -1;\n  }\n  if (local_a0 < 0) {\n    piVar4 = __errno_location();\n    iVar2 = *piVar4;\n    close(iVar3);\n    *piVar4 = iVar2;\n  }\nLAB_000181a6:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return iVar5;\n}\n\n" comment (function_definition "int __regparm3 fts_safe_changedir(FTS *sp,FTSENT *p,int fd,char *dir)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  int iVar5;\n  uint flags;\n  uint uVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  int in_GS_OFFSET;\n  bool bVar9;\n  bool bVar10;\n  int local_a0;\n  _Bool local_91;\n  stat sb;\n  \n  uVar6 = sp->fts_options;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  bVar9 = false;\n  bVar10 = dir == (char *)0x0;\n  iVar3 = fd;\n  local_a0 = fd;\n  if (bVar10) {\nLAB_000180e0:\n    if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (fd < 0)) {\n        iVar5 = 0;\n      }\n      else {\n        iVar5 = 0;\n        close(fd);\n      }\n      goto LAB_000181a6;\n    }\n    if (fd < 0) {\n      local_91 = false;\nLAB_00018287:\n      flags = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar3 = open_safer(dir,flags);\n      }\n      else {\nLAB_000180b7:\n        iVar3 = openat_safer(sp->fts_cwd_fd,dir,flags);\n      }\n      local_a0 = fd;\n      if (iVar3 < 0) {\n        iVar5 = -1;\n        goto LAB_000181a6;\n      }\n    }\n    else {\n      local_91 = false;\n    }\n  }\n  else {\n    iVar5 = 3;\n    pbVar7 = (byte *)dir;\n    pbVar8 = &DAT_0001fb1d;\n    do {\n      if (iVar5 == 0) break;\n      iVar5 = iVar5 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;\n    if ((uVar6 & 4) != 0) goto LAB_00018190;\n    if (fd < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = true;\n        flags = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = i_ring_empty(&sp->fts_fd_ring);\n      if (!local_91) {\n        local_a0 = i_ring_pop(&sp->fts_fd_ring);\n        if (-1 < local_a0) {\n          local_91 = true;\n          iVar3 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = true;\n        uVar6 = sp->fts_options;\n        goto LAB_00018287;\n      }\n      flags = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }\n    local_91 = true;\n  }\nLAB_000180fd:\n  iVar5 = __fxstat64(3,iVar3,(stat64 *)&sb);\n  if (iVar5 == 0) {\n    if ((*(int *)((int)&p->fts_statp[0].st_dev + 4) != sb.st_dev._4_4_ ||\n         (int)p->fts_statp[0].st_dev != (int)sb.st_dev) ||\n       (*(int *)((int)&p->fts_statp[0].st_ino + 4) != sb.st_ino._4_4_ ||\n        (int)p->fts_statp[0].st_ino != (int)sb.st_ino)) {\n      piVar4 = __errno_location();\n      *piVar4 = 2;\n      goto LAB_00018159;\n    }\n    if ((sp->fts_options & 0x200U) != 0) {\n      iVar5 = sp->fts_cwd_fd;\n      if ((iVar3 == iVar5) && (iVar5 != -100)) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      if (local_91 == false) {\n        iVar5 = i_ring_push(&sp->fts_fd_ring,iVar5);\n        if (-1 < iVar5) {\n          close(iVar5);\n        }\n      }\n      else if (((sp->fts_options & 4U) == 0) && (-1 < iVar5)) {\n        close(iVar5);\n      }\n      sp->fts_cwd_fd = iVar3;\n      iVar5 = 0;\n      goto LAB_000181a6;\n    }\n    iVar5 = fchdir(iVar3);\n  }\n  else {\nLAB_00018159:\n    iVar5 = -1;\n  }\n  if (local_a0 < 0) {\n    piVar4 = __errno_location();\n    iVar2 = *piVar4;\n    close(iVar3);\n    *piVar4 = iVar2;\n  }\nLAB_000181a6:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return iVar5;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "fts_safe_changedir(FTS *sp,FTSENT *p,int fd,char *dir)" identifier (parameter_list "(FTS *sp,FTSENT *p,int fd,char *dir)" ( (parameter_declaration "FTS *sp" type_identifier (pointer_declarator "*sp" * identifier)) , (parameter_declaration "FTSENT *p" type_identifier (pointer_declarator "*p" * identifier)) , (parameter_declaration "int fd" primitive_type identifier) , (parameter_declaration "char *dir" primitive_type (pointer_declarator "*dir" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  int iVar5;\n  uint flags;\n  uint uVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  int in_GS_OFFSET;\n  bool bVar9;\n  bool bVar10;\n  int local_a0;\n  _Bool local_91;\n  stat sb;\n  \n  uVar6 = sp->fts_options;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  bVar9 = false;\n  bVar10 = dir == (char *)0x0;\n  iVar3 = fd;\n  local_a0 = fd;\n  if (bVar10) {\nLAB_000180e0:\n    if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (fd < 0)) {\n        iVar5 = 0;\n      }\n      else {\n        iVar5 = 0;\n        close(fd);\n      }\n      goto LAB_000181a6;\n    }\n    if (fd < 0) {\n      local_91 = false;\nLAB_00018287:\n      flags = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar3 = open_safer(dir,flags);\n      }\n      else {\nLAB_000180b7:\n        iVar3 = openat_safer(sp->fts_cwd_fd,dir,flags);\n      }\n      local_a0 = fd;\n      if (iVar3 < 0) {\n        iVar5 = -1;\n        goto LAB_000181a6;\n      }\n    }\n    else {\n      local_91 = false;\n    }\n  }\n  else {\n    iVar5 = 3;\n    pbVar7 = (byte *)dir;\n    pbVar8 = &DAT_0001fb1d;\n    do {\n      if (iVar5 == 0) break;\n      iVar5 = iVar5 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;\n    if ((uVar6 & 4) != 0) goto LAB_00018190;\n    if (fd < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = true;\n        flags = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = i_ring_empty(&sp->fts_fd_ring);\n      if (!local_91) {\n        local_a0 = i_ring_pop(&sp->fts_fd_ring);\n        if (-1 < local_a0) {\n          local_91 = true;\n          iVar3 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = true;\n        uVar6 = sp->fts_options;\n        goto LAB_00018287;\n      }\n      flags = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }\n    local_91 = true;\n  }\nLAB_000180fd:\n  iVar5 = __fxstat64(3,iVar3,(stat64 *)&sb);\n  if (iVar5 == 0) {\n    if ((*(int *)((int)&p->fts_statp[0].st_dev + 4) != sb.st_dev._4_4_ ||\n         (int)p->fts_statp[0].st_dev != (int)sb.st_dev) ||\n       (*(int *)((int)&p->fts_statp[0].st_ino + 4) != sb.st_ino._4_4_ ||\n        (int)p->fts_statp[0].st_ino != (int)sb.st_ino)) {\n      piVar4 = __errno_location();\n      *piVar4 = 2;\n      goto LAB_00018159;\n    }\n    if ((sp->fts_options & 0x200U) != 0) {\n      iVar5 = sp->fts_cwd_fd;\n      if ((iVar3 == iVar5) && (iVar5 != -100)) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      if (local_91 == false) {\n        iVar5 = i_ring_push(&sp->fts_fd_ring,iVar5);\n        if (-1 < iVar5) {\n          close(iVar5);\n        }\n      }\n      else if (((sp->fts_options & 4U) == 0) && (-1 < iVar5)) {\n        close(iVar5);\n      }\n      sp->fts_cwd_fd = iVar3;\n      iVar5 = 0;\n      goto LAB_000181a6;\n    }\n    iVar5 = fchdir(iVar3);\n  }\n  else {\nLAB_00018159:\n    iVar5 = -1;\n  }\n  if (local_a0 < 0) {\n    piVar4 = __errno_location();\n    iVar2 = *piVar4;\n    close(iVar3);\n    *piVar4 = iVar2;\n  }\nLAB_000181a6:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return iVar5;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "uint flags;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "byte *pbVar7;" type_identifier (pointer_declarator "*pbVar7" * identifier) ;) (declaration "byte *pbVar8;" type_identifier (pointer_declarator "*pbVar8" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "bool bVar9;" primitive_type identifier ;) (declaration "bool bVar10;" primitive_type identifier ;) (declaration "int local_a0;" primitive_type identifier ;) (declaration "_Bool local_91;" type_identifier identifier ;) (declaration "stat sb;" type_identifier identifier ;) (expression_statement "uVar6 = sp->fts_options;" (assignment_expression "uVar6 = sp->fts_options" identifier = (field_expression "sp->fts_options" identifier -> field_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 "bVar9 = false;" (assignment_expression "bVar9 = false" identifier = false) ;) (expression_statement "bVar10 = dir == (char *)0x0;" (assignment_expression "bVar10 = dir == (char *)0x0" identifier = (binary_expression "dir == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ;) (expression_statement "iVar3 = fd;" (assignment_expression "iVar3 = fd" identifier = identifier) ;) (expression_statement "local_a0 = fd;" (assignment_expression "local_a0 = fd" identifier = identifier) ;) (if_statement "if (bVar10) {\nLAB_000180e0:\n    if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (fd < 0)) {\n        iVar5 = 0;\n      }\n      else {\n        iVar5 = 0;\n        close(fd);\n      }\n      goto LAB_000181a6;\n    }\n    if (fd < 0) {\n      local_91 = false;\nLAB_00018287:\n      flags = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar3 = open_safer(dir,flags);\n      }\n      else {\nLAB_000180b7:\n        iVar3 = openat_safer(sp->fts_cwd_fd,dir,flags);\n      }\n      local_a0 = fd;\n      if (iVar3 < 0) {\n        iVar5 = -1;\n        goto LAB_000181a6;\n      }\n    }\n    else {\n      local_91 = false;\n    }\n  }\n  else {\n    iVar5 = 3;\n    pbVar7 = (byte *)dir;\n    pbVar8 = &DAT_0001fb1d;\n    do {\n      if (iVar5 == 0) break;\n      iVar5 = iVar5 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;\n    if ((uVar6 & 4) != 0) goto LAB_00018190;\n    if (fd < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = true;\n        flags = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = i_ring_empty(&sp->fts_fd_ring);\n      if (!local_91) {\n        local_a0 = i_ring_pop(&sp->fts_fd_ring);\n        if (-1 < local_a0) {\n          local_91 = true;\n          iVar3 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = true;\n        uVar6 = sp->fts_options;\n        goto LAB_00018287;\n      }\n      flags = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }\n    local_91 = true;\n  }" if (parenthesized_expression "(bVar10)" ( identifier )) (compound_statement "{\nLAB_000180e0:\n    if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (fd < 0)) {\n        iVar5 = 0;\n      }\n      else {\n        iVar5 = 0;\n        close(fd);\n      }\n      goto LAB_000181a6;\n    }\n    if (fd < 0) {\n      local_91 = false;\nLAB_00018287:\n      flags = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar3 = open_safer(dir,flags);\n      }\n      else {\nLAB_000180b7:\n        iVar3 = openat_safer(sp->fts_cwd_fd,dir,flags);\n      }\n      local_a0 = fd;\n      if (iVar3 < 0) {\n        iVar5 = -1;\n        goto LAB_000181a6;\n      }\n    }\n    else {\n      local_91 = false;\n    }\n  }" { (labeled_statement "LAB_000180e0:\n    if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (fd < 0)) {\n        iVar5 = 0;\n      }\n      else {\n        iVar5 = 0;\n        close(fd);\n      }\n      goto LAB_000181a6;\n    }" statement_identifier : (if_statement "if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (fd < 0)) {\n        iVar5 = 0;\n      }\n      else {\n        iVar5 = 0;\n        close(fd);\n      }\n      goto LAB_000181a6;\n    }" if (parenthesized_expression "((uVar6 & 4) != 0)" ( (binary_expression "(uVar6 & 4) != 0" (parenthesized_expression "(uVar6 & 4)" ( (binary_expression "uVar6 & 4" identifier & number_literal) )) != number_literal) )) (compound_statement "{\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (fd < 0)) {\n        iVar5 = 0;\n      }\n      else {\n        iVar5 = 0;\n        close(fd);\n      }\n      goto LAB_000181a6;\n    }" { (labeled_statement "LAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (fd < 0)) {\n        iVar5 = 0;\n      }\n      else {\n        iVar5 = 0;\n        close(fd);\n      }" statement_identifier : (if_statement "if (((uVar6 & 0x200) == 0) || (fd < 0)) {\n        iVar5 = 0;\n      }\n      else {\n        iVar5 = 0;\n        close(fd);\n      }" if (parenthesized_expression "(((uVar6 & 0x200) == 0) || (fd < 0))" ( (binary_expression "((uVar6 & 0x200) == 0) || (fd < 0)" (parenthesized_expression "((uVar6 & 0x200) == 0)" ( (binary_expression "(uVar6 & 0x200) == 0" (parenthesized_expression "(uVar6 & 0x200)" ( (binary_expression "uVar6 & 0x200" identifier & number_literal) )) == number_literal) )) || (parenthesized_expression "(fd < 0)" ( (binary_expression "fd < 0" identifier < number_literal) ))) )) (compound_statement "{\n        iVar5 = 0;\n      }" { (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) }) (else_clause "else {\n        iVar5 = 0;\n        close(fd);\n      }" else (compound_statement "{\n        iVar5 = 0;\n        close(fd);\n      }" { (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (expression_statement "close(fd);" (call_expression "close(fd)" identifier (argument_list "(fd)" ( identifier ))) ;) })))) (goto_statement "goto LAB_000181a6;" goto statement_identifier ;) }))) (if_statement "if (fd < 0) {\n      local_91 = false;\nLAB_00018287:\n      flags = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar3 = open_safer(dir,flags);\n      }\n      else {\nLAB_000180b7:\n        iVar3 = openat_safer(sp->fts_cwd_fd,dir,flags);\n      }\n      local_a0 = fd;\n      if (iVar3 < 0) {\n        iVar5 = -1;\n        goto LAB_000181a6;\n      }\n    }\n    else {\n      local_91 = false;\n    }" if (parenthesized_expression "(fd < 0)" ( (binary_expression "fd < 0" identifier < number_literal) )) (compound_statement "{\n      local_91 = false;\nLAB_00018287:\n      flags = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar3 = open_safer(dir,flags);\n      }\n      else {\nLAB_000180b7:\n        iVar3 = openat_safer(sp->fts_cwd_fd,dir,flags);\n      }\n      local_a0 = fd;\n      if (iVar3 < 0) {\n        iVar5 = -1;\n        goto LAB_000181a6;\n      }\n    }" { (expression_statement "local_91 = false;" (assignment_expression "local_91 = false" identifier = false) ;) (labeled_statement "LAB_00018287:\n      flags = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;" statement_identifier : (expression_statement "flags = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;" (assignment_expression "flags = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900" identifier = (binary_expression "(uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900" (binary_expression "(uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd" (binary_expression "(uVar6 & 0x800) << 7" (parenthesized_expression "(uVar6 & 0x800)" ( (binary_expression "uVar6 & 0x800" identifier & number_literal) )) << number_literal) | (binary_expression "(uVar6 & 0x10) << 0xd" (parenthesized_expression "(uVar6 & 0x10)" ( (binary_expression "uVar6 & 0x10" identifier & number_literal) )) << number_literal)) | number_literal)) ;)) (if_statement "if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar3 = open_safer(dir,flags);\n      }\n      else {\nLAB_000180b7:\n        iVar3 = openat_safer(sp->fts_cwd_fd,dir,flags);\n      }" if (parenthesized_expression "((uVar6 & 0x200) == 0)" ( (binary_expression "(uVar6 & 0x200) == 0" (parenthesized_expression "(uVar6 & 0x200)" ( (binary_expression "uVar6 & 0x200" identifier & number_literal) )) == number_literal) )) (compound_statement "{\nLAB_000181f0:\n        iVar3 = open_safer(dir,flags);\n      }" { (labeled_statement "LAB_000181f0:\n        iVar3 = open_safer(dir,flags);" statement_identifier : (expression_statement "iVar3 = open_safer(dir,flags);" (assignment_expression "iVar3 = open_safer(dir,flags)" identifier = (call_expression "open_safer(dir,flags)" identifier (argument_list "(dir,flags)" ( identifier , identifier )))) ;)) }) (else_clause "else {\nLAB_000180b7:\n        iVar3 = openat_safer(sp->fts_cwd_fd,dir,flags);\n      }" else (compound_statement "{\nLAB_000180b7:\n        iVar3 = openat_safer(sp->fts_cwd_fd,dir,flags);\n      }" { (labeled_statement "LAB_000180b7:\n        iVar3 = openat_safer(sp->fts_cwd_fd,dir,flags);" statement_identifier : (expression_statement "iVar3 = openat_safer(sp->fts_cwd_fd,dir,flags);" (assignment_expression "iVar3 = openat_safer(sp->fts_cwd_fd,dir,flags)" identifier = (call_expression "openat_safer(sp->fts_cwd_fd,dir,flags)" identifier (argument_list "(sp->fts_cwd_fd,dir,flags)" ( (field_expression "sp->fts_cwd_fd" identifier -> field_identifier) , identifier , identifier )))) ;)) }))) (expression_statement "local_a0 = fd;" (assignment_expression "local_a0 = fd" identifier = identifier) ;) (if_statement "if (iVar3 < 0) {\n        iVar5 = -1;\n        goto LAB_000181a6;\n      }" if (parenthesized_expression "(iVar3 < 0)" ( (binary_expression "iVar3 < 0" identifier < number_literal) )) (compound_statement "{\n        iVar5 = -1;\n        goto LAB_000181a6;\n      }" { (expression_statement "iVar5 = -1;" (assignment_expression "iVar5 = -1" identifier = number_literal) ;) (goto_statement "goto LAB_000181a6;" goto statement_identifier ;) })) }) (else_clause "else {\n      local_91 = false;\n    }" else (compound_statement "{\n      local_91 = false;\n    }" { (expression_statement "local_91 = false;" (assignment_expression "local_91 = false" identifier = false) ;) }))) }) (else_clause "else {\n    iVar5 = 3;\n    pbVar7 = (byte *)dir;\n    pbVar8 = &DAT_0001fb1d;\n    do {\n      if (iVar5 == 0) break;\n      iVar5 = iVar5 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;\n    if ((uVar6 & 4) != 0) goto LAB_00018190;\n    if (fd < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = true;\n        flags = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = i_ring_empty(&sp->fts_fd_ring);\n      if (!local_91) {\n        local_a0 = i_ring_pop(&sp->fts_fd_ring);\n        if (-1 < local_a0) {\n          local_91 = true;\n          iVar3 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = true;\n        uVar6 = sp->fts_options;\n        goto LAB_00018287;\n      }\n      flags = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }\n    local_91 = true;\n  }" else (compound_statement "{\n    iVar5 = 3;\n    pbVar7 = (byte *)dir;\n    pbVar8 = &DAT_0001fb1d;\n    do {\n      if (iVar5 == 0) break;\n      iVar5 = iVar5 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;\n    if ((uVar6 & 4) != 0) goto LAB_00018190;\n    if (fd < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = true;\n        flags = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = i_ring_empty(&sp->fts_fd_ring);\n      if (!local_91) {\n        local_a0 = i_ring_pop(&sp->fts_fd_ring);\n        if (-1 < local_a0) {\n          local_91 = true;\n          iVar3 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = true;\n        uVar6 = sp->fts_options;\n        goto LAB_00018287;\n      }\n      flags = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }\n    local_91 = true;\n  }" { (expression_statement "iVar5 = 3;" (assignment_expression "iVar5 = 3" identifier = number_literal) ;) (expression_statement "pbVar7 = (byte *)dir;" (assignment_expression "pbVar7 = (byte *)dir" identifier = (cast_expression "(byte *)dir" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "pbVar8 = &DAT_0001fb1d;" (assignment_expression "pbVar8 = &DAT_0001fb1d" identifier = (pointer_expression "&DAT_0001fb1d" & identifier)) ;) (do_statement "do {\n      if (iVar5 == 0) break;\n      iVar5 = iVar5 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);" do (compound_statement "{\n      if (iVar5 == 0) break;\n      iVar5 = iVar5 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    }" { (if_statement "if (iVar5 == 0) break;" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar5 = iVar5 + -1;" (assignment_expression "iVar5 = iVar5 + -1" identifier = (binary_expression "iVar5 + -1" identifier + number_literal)) ;) (expression_statement "bVar9 = *pbVar7 < *pbVar8;" (assignment_expression "bVar9 = *pbVar7 < *pbVar8" identifier = (binary_expression "*pbVar7 < *pbVar8" (pointer_expression "*pbVar7" * identifier) < (pointer_expression "*pbVar8" * identifier))) ;) (expression_statement "bVar10 = *pbVar7 == *pbVar8;" (assignment_expression "bVar10 = *pbVar7 == *pbVar8" identifier = (binary_expression "*pbVar7 == *pbVar8" (pointer_expression "*pbVar7" * identifier) == (pointer_expression "*pbVar8" * identifier))) ;) (expression_statement "pbVar7 = pbVar7 + 1;" (assignment_expression "pbVar7 = pbVar7 + 1" identifier = (binary_expression "pbVar7 + 1" identifier + number_literal)) ;) (expression_statement "pbVar8 = pbVar8 + 1;" (assignment_expression "pbVar8 = pbVar8 + 1" identifier = (binary_expression "pbVar8 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar10)" ( identifier )) ;) (if_statement "if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;" if (parenthesized_expression "((!bVar9 && !bVar10) != bVar9)" ( (binary_expression "(!bVar9 && !bVar10) != bVar9" (parenthesized_expression "(!bVar9 && !bVar10)" ( (binary_expression "!bVar9 && !bVar10" (unary_expression "!bVar9" ! identifier) && (unary_expression "!bVar10" ! identifier)) )) != identifier) )) (goto_statement "goto LAB_000180e0;" goto statement_identifier ;)) (if_statement "if ((uVar6 & 4) != 0) goto LAB_00018190;" if (parenthesized_expression "((uVar6 & 4) != 0)" ( (binary_expression "(uVar6 & 4) != 0" (parenthesized_expression "(uVar6 & 4)" ( (binary_expression "uVar6 & 4" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_00018190;" goto statement_identifier ;)) (if_statement "if (fd < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = true;\n        flags = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = i_ring_empty(&sp->fts_fd_ring);\n      if (!local_91) {\n        local_a0 = i_ring_pop(&sp->fts_fd_ring);\n        if (-1 < local_a0) {\n          local_91 = true;\n          iVar3 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = true;\n        uVar6 = sp->fts_options;\n        goto LAB_00018287;\n      }\n      flags = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }" if (parenthesized_expression "(fd < 0)" ( (binary_expression "fd < 0" identifier < number_literal) )) (compound_statement "{\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = true;\n        flags = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = i_ring_empty(&sp->fts_fd_ring);\n      if (!local_91) {\n        local_a0 = i_ring_pop(&sp->fts_fd_ring);\n        if (-1 < local_a0) {\n          local_91 = true;\n          iVar3 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = true;\n        uVar6 = sp->fts_options;\n        goto LAB_00018287;\n      }\n      flags = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }" { (if_statement "if ((uVar6 & 0x200) == 0) {\n        local_91 = true;\n        flags = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }" if (parenthesized_expression "((uVar6 & 0x200) == 0)" ( (binary_expression "(uVar6 & 0x200) == 0" (parenthesized_expression "(uVar6 & 0x200)" ( (binary_expression "uVar6 & 0x200" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n        local_91 = true;\n        flags = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }" { (expression_statement "local_91 = true;" (assignment_expression "local_91 = true" identifier = true) ;) (expression_statement "flags = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;" (assignment_expression "flags = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900" identifier = (binary_expression "(uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900" (binary_expression "(uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd" (binary_expression "(uVar6 & 0x800) << 7" (parenthesized_expression "(uVar6 & 0x800)" ( (binary_expression "uVar6 & 0x800" identifier & number_literal) )) << number_literal) | (binary_expression "(uVar6 & 0x10) << 0xd" (parenthesized_expression "(uVar6 & 0x10)" ( (binary_expression "uVar6 & 0x10" identifier & number_literal) )) << number_literal)) | number_literal)) ;) (goto_statement "goto LAB_000181f0;" goto statement_identifier ;) })) (expression_statement "local_91 = i_ring_empty(&sp->fts_fd_ring);" (assignment_expression "local_91 = i_ring_empty(&sp->fts_fd_ring)" identifier = (call_expression "i_ring_empty(&sp->fts_fd_ring)" identifier (argument_list "(&sp->fts_fd_ring)" ( (pointer_expression "&sp->fts_fd_ring" & (field_expression "sp->fts_fd_ring" identifier -> field_identifier)) )))) ;) (if_statement "if (!local_91) {\n        local_a0 = i_ring_pop(&sp->fts_fd_ring);\n        if (-1 < local_a0) {\n          local_91 = true;\n          iVar3 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = true;\n        uVar6 = sp->fts_options;\n        goto LAB_00018287;\n      }" if (parenthesized_expression "(!local_91)" ( (unary_expression "!local_91" ! identifier) )) (compound_statement "{\n        local_a0 = i_ring_pop(&sp->fts_fd_ring);\n        if (-1 < local_a0) {\n          local_91 = true;\n          iVar3 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = true;\n        uVar6 = sp->fts_options;\n        goto LAB_00018287;\n      }" { (expression_statement "local_a0 = i_ring_pop(&sp->fts_fd_ring);" (assignment_expression "local_a0 = i_ring_pop(&sp->fts_fd_ring)" identifier = (call_expression "i_ring_pop(&sp->fts_fd_ring)" identifier (argument_list "(&sp->fts_fd_ring)" ( (pointer_expression "&sp->fts_fd_ring" & (field_expression "sp->fts_fd_ring" identifier -> field_identifier)) )))) ;) (if_statement "if (-1 < local_a0) {\n          local_91 = true;\n          iVar3 = local_a0;\n          goto LAB_000180fd;\n        }" if (parenthesized_expression "(-1 < local_a0)" ( (binary_expression "-1 < local_a0" number_literal < identifier) )) (compound_statement "{\n          local_91 = true;\n          iVar3 = local_a0;\n          goto LAB_000180fd;\n        }" { (expression_statement "local_91 = true;" (assignment_expression "local_91 = true" identifier = true) ;) (expression_statement "iVar3 = local_a0;" (assignment_expression "iVar3 = local_a0" identifier = identifier) ;) (goto_statement "goto LAB_000180fd;" goto statement_identifier ;) })) (expression_statement "local_91 = true;" (assignment_expression "local_91 = true" identifier = true) ;) (expression_statement "uVar6 = sp->fts_options;" (assignment_expression "uVar6 = sp->fts_options" identifier = (field_expression "sp->fts_options" identifier -> field_identifier)) ;) (goto_statement "goto LAB_00018287;" goto statement_identifier ;) })) (expression_statement "flags = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;" (assignment_expression "flags = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900" identifier = (binary_expression "(uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900" (binary_expression "(uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7" (binary_expression "(uVar6 & 0x10) << 0xd" (parenthesized_expression "(uVar6 & 0x10)" ( (binary_expression "uVar6 & 0x10" identifier & number_literal) )) << number_literal) | (binary_expression "(uVar6 & 0x800) << 7" (parenthesized_expression "(uVar6 & 0x800)" ( (binary_expression "uVar6 & 0x800" identifier & number_literal) )) << number_literal)) | number_literal)) ;) (goto_statement "goto LAB_000180b7;" goto statement_identifier ;) })) (expression_statement "local_91 = true;" (assignment_expression "local_91 = true" identifier = true) ;) }))) (labeled_statement "LAB_000180fd:\n  iVar5 = __fxstat64(3,iVar3,(stat64 *)&sb);" statement_identifier : (expression_statement "iVar5 = __fxstat64(3,iVar3,(stat64 *)&sb);" (assignment_expression "iVar5 = __fxstat64(3,iVar3,(stat64 *)&sb)" identifier = (call_expression "__fxstat64(3,iVar3,(stat64 *)&sb)" identifier (argument_list "(3,iVar3,(stat64 *)&sb)" ( number_literal , identifier , (cast_expression "(stat64 *)&sb" ( (type_descriptor "stat64 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&sb" & identifier)) )))) ;)) (if_statement "if (iVar5 == 0) {\n    if ((*(int *)((int)&p->fts_statp[0].st_dev + 4) != sb.st_dev._4_4_ ||\n         (int)p->fts_statp[0].st_dev != (int)sb.st_dev) ||\n       (*(int *)((int)&p->fts_statp[0].st_ino + 4) != sb.st_ino._4_4_ ||\n        (int)p->fts_statp[0].st_ino != (int)sb.st_ino)) {\n      piVar4 = __errno_location();\n      *piVar4 = 2;\n      goto LAB_00018159;\n    }\n    if ((sp->fts_options & 0x200U) != 0) {\n      iVar5 = sp->fts_cwd_fd;\n      if ((iVar3 == iVar5) && (iVar5 != -100)) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      if (local_91 == false) {\n        iVar5 = i_ring_push(&sp->fts_fd_ring,iVar5);\n        if (-1 < iVar5) {\n          close(iVar5);\n        }\n      }\n      else if (((sp->fts_options & 4U) == 0) && (-1 < iVar5)) {\n        close(iVar5);\n      }\n      sp->fts_cwd_fd = iVar3;\n      iVar5 = 0;\n      goto LAB_000181a6;\n    }\n    iVar5 = fchdir(iVar3);\n  }\n  else {\nLAB_00018159:\n    iVar5 = -1;\n  }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n    if ((*(int *)((int)&p->fts_statp[0].st_dev + 4) != sb.st_dev._4_4_ ||\n         (int)p->fts_statp[0].st_dev != (int)sb.st_dev) ||\n       (*(int *)((int)&p->fts_statp[0].st_ino + 4) != sb.st_ino._4_4_ ||\n        (int)p->fts_statp[0].st_ino != (int)sb.st_ino)) {\n      piVar4 = __errno_location();\n      *piVar4 = 2;\n      goto LAB_00018159;\n    }\n    if ((sp->fts_options & 0x200U) != 0) {\n      iVar5 = sp->fts_cwd_fd;\n      if ((iVar3 == iVar5) && (iVar5 != -100)) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      if (local_91 == false) {\n        iVar5 = i_ring_push(&sp->fts_fd_ring,iVar5);\n        if (-1 < iVar5) {\n          close(iVar5);\n        }\n      }\n      else if (((sp->fts_options & 4U) == 0) && (-1 < iVar5)) {\n        close(iVar5);\n      }\n      sp->fts_cwd_fd = iVar3;\n      iVar5 = 0;\n      goto LAB_000181a6;\n    }\n    iVar5 = fchdir(iVar3);\n  }" { (if_statement "if ((*(int *)((int)&p->fts_statp[0].st_dev + 4) != sb.st_dev._4_4_ ||\n         (int)p->fts_statp[0].st_dev != (int)sb.st_dev) ||\n       (*(int *)((int)&p->fts_statp[0].st_ino + 4) != sb.st_ino._4_4_ ||\n        (int)p->fts_statp[0].st_ino != (int)sb.st_ino)) {\n      piVar4 = __errno_location();\n      *piVar4 = 2;\n      goto LAB_00018159;\n    }" if (parenthesized_expression "((*(int *)((int)&p->fts_statp[0].st_dev + 4) != sb.st_dev._4_4_ ||\n         (int)p->fts_statp[0].st_dev != (int)sb.st_dev) ||\n       (*(int *)((int)&p->fts_statp[0].st_ino + 4) != sb.st_ino._4_4_ ||\n        (int)p->fts_statp[0].st_ino != (int)sb.st_ino))" ( (binary_expression "(*(int *)((int)&p->fts_statp[0].st_dev + 4) != sb.st_dev._4_4_ ||\n         (int)p->fts_statp[0].st_dev != (int)sb.st_dev) ||\n       (*(int *)((int)&p->fts_statp[0].st_ino + 4) != sb.st_ino._4_4_ ||\n        (int)p->fts_statp[0].st_ino != (int)sb.st_ino)" (parenthesized_expression "(*(int *)((int)&p->fts_statp[0].st_dev + 4) != sb.st_dev._4_4_ ||\n         (int)p->fts_statp[0].st_dev != (int)sb.st_dev)" ( (binary_expression "*(int *)((int)&p->fts_statp[0].st_dev + 4) != sb.st_dev._4_4_ ||\n         (int)p->fts_statp[0].st_dev != (int)sb.st_dev" (binary_expression "*(int *)((int)&p->fts_statp[0].st_dev + 4) != sb.st_dev._4_4_" (pointer_expression "*(int *)((int)&p->fts_statp[0].st_dev + 4)" * (cast_expression "(int *)((int)&p->fts_statp[0].st_dev + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&p->fts_statp[0].st_dev + 4)" ( (binary_expression "(int)&p->fts_statp[0].st_dev + 4" (cast_expression "(int)&p->fts_statp[0].st_dev" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&p->fts_statp[0].st_dev" & (field_expression "p->fts_statp[0].st_dev" (subscript_expression "p->fts_statp[0]" (field_expression "p->fts_statp" identifier -> field_identifier) [ number_literal ]) . field_identifier))) + number_literal) )))) != (field_expression "sb.st_dev._4_4_" (field_expression "sb.st_dev" identifier . field_identifier) . field_identifier)) || (binary_expression "(int)p->fts_statp[0].st_dev != (int)sb.st_dev" (cast_expression "(int)p->fts_statp[0].st_dev" ( (type_descriptor "int" primitive_type) ) (field_expression "p->fts_statp[0].st_dev" (subscript_expression "p->fts_statp[0]" (field_expression "p->fts_statp" identifier -> field_identifier) [ number_literal ]) . field_identifier)) != (cast_expression "(int)sb.st_dev" ( (type_descriptor "int" primitive_type) ) (field_expression "sb.st_dev" identifier . field_identifier)))) )) || (parenthesized_expression "(*(int *)((int)&p->fts_statp[0].st_ino + 4) != sb.st_ino._4_4_ ||\n        (int)p->fts_statp[0].st_ino != (int)sb.st_ino)" ( (binary_expression "*(int *)((int)&p->fts_statp[0].st_ino + 4) != sb.st_ino._4_4_ ||\n        (int)p->fts_statp[0].st_ino != (int)sb.st_ino" (binary_expression "*(int *)((int)&p->fts_statp[0].st_ino + 4) != sb.st_ino._4_4_" (pointer_expression "*(int *)((int)&p->fts_statp[0].st_ino + 4)" * (cast_expression "(int *)((int)&p->fts_statp[0].st_ino + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&p->fts_statp[0].st_ino + 4)" ( (binary_expression "(int)&p->fts_statp[0].st_ino + 4" (cast_expression "(int)&p->fts_statp[0].st_ino" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&p->fts_statp[0].st_ino" & (field_expression "p->fts_statp[0].st_ino" (subscript_expression "p->fts_statp[0]" (field_expression "p->fts_statp" identifier -> field_identifier) [ number_literal ]) . field_identifier))) + number_literal) )))) != (field_expression "sb.st_ino._4_4_" (field_expression "sb.st_ino" identifier . field_identifier) . field_identifier)) || (binary_expression "(int)p->fts_statp[0].st_ino != (int)sb.st_ino" (cast_expression "(int)p->fts_statp[0].st_ino" ( (type_descriptor "int" primitive_type) ) (field_expression "p->fts_statp[0].st_ino" (subscript_expression "p->fts_statp[0]" (field_expression "p->fts_statp" identifier -> field_identifier) [ number_literal ]) . field_identifier)) != (cast_expression "(int)sb.st_ino" ( (type_descriptor "int" primitive_type) ) (field_expression "sb.st_ino" identifier . field_identifier)))) ))) )) (compound_statement "{\n      piVar4 = __errno_location();\n      *piVar4 = 2;\n      goto LAB_00018159;\n    }" { (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar4 = 2;" (assignment_expression "*piVar4 = 2" (pointer_expression "*piVar4" * identifier) = number_literal) ;) (goto_statement "goto LAB_00018159;" goto statement_identifier ;) })) (if_statement "if ((sp->fts_options & 0x200U) != 0) {\n      iVar5 = sp->fts_cwd_fd;\n      if ((iVar3 == iVar5) && (iVar5 != -100)) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      if (local_91 == false) {\n        iVar5 = i_ring_push(&sp->fts_fd_ring,iVar5);\n        if (-1 < iVar5) {\n          close(iVar5);\n        }\n      }\n      else if (((sp->fts_options & 4U) == 0) && (-1 < iVar5)) {\n        close(iVar5);\n      }\n      sp->fts_cwd_fd = iVar3;\n      iVar5 = 0;\n      goto LAB_000181a6;\n    }" if (parenthesized_expression "((sp->fts_options & 0x200U) != 0)" ( (binary_expression "(sp->fts_options & 0x200U) != 0" (parenthesized_expression "(sp->fts_options & 0x200U)" ( (binary_expression "sp->fts_options & 0x200U" (field_expression "sp->fts_options" identifier -> field_identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n      iVar5 = sp->fts_cwd_fd;\n      if ((iVar3 == iVar5) && (iVar5 != -100)) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      if (local_91 == false) {\n        iVar5 = i_ring_push(&sp->fts_fd_ring,iVar5);\n        if (-1 < iVar5) {\n          close(iVar5);\n        }\n      }\n      else if (((sp->fts_options & 4U) == 0) && (-1 < iVar5)) {\n        close(iVar5);\n      }\n      sp->fts_cwd_fd = iVar3;\n      iVar5 = 0;\n      goto LAB_000181a6;\n    }" { (expression_statement "iVar5 = sp->fts_cwd_fd;" (assignment_expression "iVar5 = sp->fts_cwd_fd" identifier = (field_expression "sp->fts_cwd_fd" identifier -> field_identifier)) ;) (if_statement "if ((iVar3 == iVar5) && (iVar5 != -100)) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }" if (parenthesized_expression "((iVar3 == iVar5) && (iVar5 != -100))" ( (binary_expression "(iVar3 == iVar5) && (iVar5 != -100)" (parenthesized_expression "(iVar3 == iVar5)" ( (binary_expression "iVar3 == iVar5" identifier == identifier) )) && (parenthesized_expression "(iVar5 != -100)" ( (binary_expression "iVar5 != -100" identifier != number_literal) ))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }" { comment (expression_statement "abort();" (call_expression "abort()" identifier (argument_list "()" ( ))) ;) })) (if_statement "if (local_91 == false) {\n        iVar5 = i_ring_push(&sp->fts_fd_ring,iVar5);\n        if (-1 < iVar5) {\n          close(iVar5);\n        }\n      }\n      else if (((sp->fts_options & 4U) == 0) && (-1 < iVar5)) {\n        close(iVar5);\n      }" if (parenthesized_expression "(local_91 == false)" ( (binary_expression "local_91 == false" identifier == false) )) (compound_statement "{\n        iVar5 = i_ring_push(&sp->fts_fd_ring,iVar5);\n        if (-1 < iVar5) {\n          close(iVar5);\n        }\n      }" { (expression_statement "iVar5 = i_ring_push(&sp->fts_fd_ring,iVar5);" (assignment_expression "iVar5 = i_ring_push(&sp->fts_fd_ring,iVar5)" identifier = (call_expression "i_ring_push(&sp->fts_fd_ring,iVar5)" identifier (argument_list "(&sp->fts_fd_ring,iVar5)" ( (pointer_expression "&sp->fts_fd_ring" & (field_expression "sp->fts_fd_ring" identifier -> field_identifier)) , identifier )))) ;) (if_statement "if (-1 < iVar5) {\n          close(iVar5);\n        }" if (parenthesized_expression "(-1 < iVar5)" ( (binary_expression "-1 < iVar5" number_literal < identifier) )) (compound_statement "{\n          close(iVar5);\n        }" { (expression_statement "close(iVar5);" (call_expression "close(iVar5)" identifier (argument_list "(iVar5)" ( identifier ))) ;) })) }) (else_clause "else if (((sp->fts_options & 4U) == 0) && (-1 < iVar5)) {\n        close(iVar5);\n      }" else (if_statement "if (((sp->fts_options & 4U) == 0) && (-1 < iVar5)) {\n        close(iVar5);\n      }" if (parenthesized_expression "(((sp->fts_options & 4U) == 0) && (-1 < iVar5))" ( (binary_expression "((sp->fts_options & 4U) == 0) && (-1 < iVar5)" (parenthesized_expression "((sp->fts_options & 4U) == 0)" ( (binary_expression "(sp->fts_options & 4U) == 0" (parenthesized_expression "(sp->fts_options & 4U)" ( (binary_expression "sp->fts_options & 4U" (field_expression "sp->fts_options" identifier -> field_identifier) & number_literal) )) == number_literal) )) && (parenthesized_expression "(-1 < iVar5)" ( (binary_expression "-1 < iVar5" number_literal < identifier) ))) )) (compound_statement "{\n        close(iVar5);\n      }" { (expression_statement "close(iVar5);" (call_expression "close(iVar5)" identifier (argument_list "(iVar5)" ( identifier ))) ;) })))) (expression_statement "sp->fts_cwd_fd = iVar3;" (assignment_expression "sp->fts_cwd_fd = iVar3" (field_expression "sp->fts_cwd_fd" identifier -> field_identifier) = identifier) ;) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_000181a6;" goto statement_identifier ;) })) (expression_statement "iVar5 = fchdir(iVar3);" (assignment_expression "iVar5 = fchdir(iVar3)" identifier = (call_expression "fchdir(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) ;) }) (else_clause "else {\nLAB_00018159:\n    iVar5 = -1;\n  }" else (compound_statement "{\nLAB_00018159:\n    iVar5 = -1;\n  }" { (labeled_statement "LAB_00018159:\n    iVar5 = -1;" statement_identifier : (expression_statement "iVar5 = -1;" (assignment_expression "iVar5 = -1" identifier = number_literal) ;)) }))) (if_statement "if (local_a0 < 0) {\n    piVar4 = __errno_location();\n    iVar2 = *piVar4;\n    close(iVar3);\n    *piVar4 = iVar2;\n  }" if (parenthesized_expression "(local_a0 < 0)" ( (binary_expression "local_a0 < 0" identifier < number_literal) )) (compound_statement "{\n    piVar4 = __errno_location();\n    iVar2 = *piVar4;\n    close(iVar3);\n    *piVar4 = iVar2;\n  }" { (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar2 = *piVar4;" (assignment_expression "iVar2 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) (expression_statement "close(iVar3);" (call_expression "close(iVar3)" identifier (argument_list "(iVar3)" ( identifier ))) ;) (expression_statement "*piVar4 = iVar2;" (assignment_expression "*piVar4 = iVar2" (pointer_expression "*piVar4" * identifier) = identifier) ;) })) (labeled_statement "LAB_000181a6:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" statement_identifier : (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\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                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return iVar5;" return identifier ;) })))
(translation_unit "int __regparm3 FUN_00017ff0(int param_1,int param_2,int param_3,byte *param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  int in_GS_OFFSET;\n  bool bVar9;\n  bool bVar10;\n  int local_a0;\n  char local_91;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x17ff9;\n  uVar6 = *(uint *)(param_1 + 0x2c);\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  bVar9 = false;\n  bVar10 = param_4 == (byte *)0x0;\n  iVar2 = param_3;\n  local_a0 = param_3;\n  if (bVar10) {\nLAB_000180e0:\n    if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }\n      goto LAB_000181a6;\n    }\n    if (param_3 < 0) {\n      local_91 = '\0';\nLAB_00018287:\n      uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);\n      }\n      else {\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }\n      local_a0 = param_3;\n      if (iVar2 < 0) {\n        iVar4 = -1;\n        goto LAB_000181a6;\n      }\n    }\n    else {\n      local_91 = '\0';\n    }\n  }\n  else {\n    iVar4 = 3;\n    pbVar7 = param_4;\n    pbVar8 = &DAT_0001fb1d;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;\n    if ((uVar6 & 4) != 0) goto LAB_00018190;\n    if (param_3 < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = FUN_0001cb50(param_1 + 0x38);\n      if (local_91 == '\0') {\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }\n      uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }\n    local_91 = '\x01';\n  }\nLAB_000180fd:\n  iVar4 = __fxstat64(3,iVar2,&local_80);\n  if (iVar4 == 0) {\n    if ((*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev) ||\n       (*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino)) {\n      piVar3 = __errno_location();\n      *piVar3 = 2;\n      goto LAB_00018159;\n    }\n    if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n      iVar4 = *(int *)(param_1 + 0x1c);\n      if ((iVar2 == iVar4) && (iVar4 != -100)) {\n                    \n        abort();\n      }\n      if (local_91 == '\0') {\n        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);\n        if (-1 < iVar4) {\n          close(iVar4);\n        }\n      }\n      else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }\n      *(int *)(param_1 + 0x1c) = iVar2;\n      iVar4 = 0;\n      goto LAB_000181a6;\n    }\n    iVar4 = fchdir(iVar2);\n  }\n  else {\nLAB_00018159:\n    iVar4 = -1;\n  }\n  if (local_a0 < 0) {\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    close(iVar2);\n    *piVar3 = iVar1;\n  }\nLAB_000181a6:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0001df30();\n  }\n  return iVar4;\n}\n\n" (function_definition "int __regparm3 FUN_00017ff0(int param_1,int param_2,int param_3,byte *param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  int in_GS_OFFSET;\n  bool bVar9;\n  bool bVar10;\n  int local_a0;\n  char local_91;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x17ff9;\n  uVar6 = *(uint *)(param_1 + 0x2c);\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  bVar9 = false;\n  bVar10 = param_4 == (byte *)0x0;\n  iVar2 = param_3;\n  local_a0 = param_3;\n  if (bVar10) {\nLAB_000180e0:\n    if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }\n      goto LAB_000181a6;\n    }\n    if (param_3 < 0) {\n      local_91 = '\0';\nLAB_00018287:\n      uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);\n      }\n      else {\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }\n      local_a0 = param_3;\n      if (iVar2 < 0) {\n        iVar4 = -1;\n        goto LAB_000181a6;\n      }\n    }\n    else {\n      local_91 = '\0';\n    }\n  }\n  else {\n    iVar4 = 3;\n    pbVar7 = param_4;\n    pbVar8 = &DAT_0001fb1d;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;\n    if ((uVar6 & 4) != 0) goto LAB_00018190;\n    if (param_3 < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = FUN_0001cb50(param_1 + 0x38);\n      if (local_91 == '\0') {\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }\n      uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }\n    local_91 = '\x01';\n  }\nLAB_000180fd:\n  iVar4 = __fxstat64(3,iVar2,&local_80);\n  if (iVar4 == 0) {\n    if ((*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev) ||\n       (*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino)) {\n      piVar3 = __errno_location();\n      *piVar3 = 2;\n      goto LAB_00018159;\n    }\n    if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n      iVar4 = *(int *)(param_1 + 0x1c);\n      if ((iVar2 == iVar4) && (iVar4 != -100)) {\n                    \n        abort();\n      }\n      if (local_91 == '\0') {\n        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);\n        if (-1 < iVar4) {\n          close(iVar4);\n        }\n      }\n      else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }\n      *(int *)(param_1 + 0x1c) = iVar2;\n      iVar4 = 0;\n      goto LAB_000181a6;\n    }\n    iVar4 = fchdir(iVar2);\n  }\n  else {\nLAB_00018159:\n    iVar4 = -1;\n  }\n  if (local_a0 < 0) {\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    close(iVar2);\n    *piVar3 = iVar1;\n  }\nLAB_000181a6:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0001df30();\n  }\n  return iVar4;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00017ff0(int param_1,int param_2,int param_3,byte *param_4)" identifier (parameter_list "(int param_1,int param_2,int param_3,byte *param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "byte *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  int in_GS_OFFSET;\n  bool bVar9;\n  bool bVar10;\n  int local_a0;\n  char local_91;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x17ff9;\n  uVar6 = *(uint *)(param_1 + 0x2c);\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  bVar9 = false;\n  bVar10 = param_4 == (byte *)0x0;\n  iVar2 = param_3;\n  local_a0 = param_3;\n  if (bVar10) {\nLAB_000180e0:\n    if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }\n      goto LAB_000181a6;\n    }\n    if (param_3 < 0) {\n      local_91 = '\0';\nLAB_00018287:\n      uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);\n      }\n      else {\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }\n      local_a0 = param_3;\n      if (iVar2 < 0) {\n        iVar4 = -1;\n        goto LAB_000181a6;\n      }\n    }\n    else {\n      local_91 = '\0';\n    }\n  }\n  else {\n    iVar4 = 3;\n    pbVar7 = param_4;\n    pbVar8 = &DAT_0001fb1d;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;\n    if ((uVar6 & 4) != 0) goto LAB_00018190;\n    if (param_3 < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = FUN_0001cb50(param_1 + 0x38);\n      if (local_91 == '\0') {\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }\n      uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }\n    local_91 = '\x01';\n  }\nLAB_000180fd:\n  iVar4 = __fxstat64(3,iVar2,&local_80);\n  if (iVar4 == 0) {\n    if ((*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev) ||\n       (*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino)) {\n      piVar3 = __errno_location();\n      *piVar3 = 2;\n      goto LAB_00018159;\n    }\n    if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n      iVar4 = *(int *)(param_1 + 0x1c);\n      if ((iVar2 == iVar4) && (iVar4 != -100)) {\n                    \n        abort();\n      }\n      if (local_91 == '\0') {\n        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);\n        if (-1 < iVar4) {\n          close(iVar4);\n        }\n      }\n      else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }\n      *(int *)(param_1 + 0x1c) = iVar2;\n      iVar4 = 0;\n      goto LAB_000181a6;\n    }\n    iVar4 = fchdir(iVar2);\n  }\n  else {\nLAB_00018159:\n    iVar4 = -1;\n  }\n  if (local_a0 < 0) {\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    close(iVar2);\n    *piVar3 = iVar1;\n  }\nLAB_000181a6:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0001df30();\n  }\n  return iVar4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "byte *pbVar7;" type_identifier (pointer_declarator "*pbVar7" * identifier) ;) (declaration "byte *pbVar8;" type_identifier (pointer_declarator "*pbVar8" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "bool bVar9;" primitive_type identifier ;) (declaration "bool bVar10;" primitive_type identifier ;) (declaration "int local_a0;" primitive_type identifier ;) (declaration "char local_91;" primitive_type identifier ;) (declaration "stat64 local_80;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x17ff9;" (assignment_expression "uStack_14 = 0x17ff9" identifier = number_literal) ;) (expression_statement "uVar6 = *(uint *)(param_1 + 0x2c);" (assignment_expression "uVar6 = *(uint *)(param_1 + 0x2c)" identifier = (pointer_expression "*(uint *)(param_1 + 0x2c)" * (cast_expression "(uint *)(param_1 + 0x2c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" 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 "bVar9 = false;" (assignment_expression "bVar9 = false" identifier = false) ;) (expression_statement "bVar10 = param_4 == (byte *)0x0;" (assignment_expression "bVar10 = param_4 == (byte *)0x0" identifier = (binary_expression "param_4 == (byte *)0x0" identifier == (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal))) ;) (expression_statement "iVar2 = param_3;" (assignment_expression "iVar2 = param_3" identifier = identifier) ;) (expression_statement "local_a0 = param_3;" (assignment_expression "local_a0 = param_3" identifier = identifier) ;) (if_statement "if (bVar10) {\nLAB_000180e0:\n    if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }\n      goto LAB_000181a6;\n    }\n    if (param_3 < 0) {\n      local_91 = '\0';\nLAB_00018287:\n      uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);\n      }\n      else {\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }\n      local_a0 = param_3;\n      if (iVar2 < 0) {\n        iVar4 = -1;\n        goto LAB_000181a6;\n      }\n    }\n    else {\n      local_91 = '\0';\n    }\n  }\n  else {\n    iVar4 = 3;\n    pbVar7 = param_4;\n    pbVar8 = &DAT_0001fb1d;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;\n    if ((uVar6 & 4) != 0) goto LAB_00018190;\n    if (param_3 < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = FUN_0001cb50(param_1 + 0x38);\n      if (local_91 == '\0') {\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }\n      uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }\n    local_91 = '\x01';\n  }" if (parenthesized_expression "(bVar10)" ( identifier )) (compound_statement "{\nLAB_000180e0:\n    if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }\n      goto LAB_000181a6;\n    }\n    if (param_3 < 0) {\n      local_91 = '\0';\nLAB_00018287:\n      uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);\n      }\n      else {\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }\n      local_a0 = param_3;\n      if (iVar2 < 0) {\n        iVar4 = -1;\n        goto LAB_000181a6;\n      }\n    }\n    else {\n      local_91 = '\0';\n    }\n  }" { (labeled_statement "LAB_000180e0:\n    if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }\n      goto LAB_000181a6;\n    }" statement_identifier : (if_statement "if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }\n      goto LAB_000181a6;\n    }" if (parenthesized_expression "((uVar6 & 4) != 0)" ( (binary_expression "(uVar6 & 4) != 0" (parenthesized_expression "(uVar6 & 4)" ( (binary_expression "uVar6 & 4" identifier & number_literal) )) != number_literal) )) (compound_statement "{\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }\n      goto LAB_000181a6;\n    }" { (labeled_statement "LAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }" statement_identifier : (if_statement "if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }" if (parenthesized_expression "(((uVar6 & 0x200) == 0) || (param_3 < 0))" ( (binary_expression "((uVar6 & 0x200) == 0) || (param_3 < 0)" (parenthesized_expression "((uVar6 & 0x200) == 0)" ( (binary_expression "(uVar6 & 0x200) == 0" (parenthesized_expression "(uVar6 & 0x200)" ( (binary_expression "uVar6 & 0x200" identifier & number_literal) )) == number_literal) )) || (parenthesized_expression "(param_3 < 0)" ( (binary_expression "param_3 < 0" identifier < number_literal) ))) )) (compound_statement "{\n        iVar4 = 0;\n      }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n        iVar4 = 0;\n        close(param_3);\n      }" else (compound_statement "{\n        iVar4 = 0;\n        close(param_3);\n      }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (expression_statement "close(param_3);" (call_expression "close(param_3)" identifier (argument_list "(param_3)" ( identifier ))) ;) })))) (goto_statement "goto LAB_000181a6;" goto statement_identifier ;) }))) (if_statement "if (param_3 < 0) {\n      local_91 = '\0';\nLAB_00018287:\n      uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);\n      }\n      else {\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }\n      local_a0 = param_3;\n      if (iVar2 < 0) {\n        iVar4 = -1;\n        goto LAB_000181a6;\n      }\n    }\n    else {\n      local_91 = '\0';\n    }" if (parenthesized_expression "(param_3 < 0)" ( (binary_expression "param_3 < 0" identifier < number_literal) )) (compound_statement "{\n      local_91 = '\0';\nLAB_00018287:\n      uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);\n      }\n      else {\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }\n      local_a0 = param_3;\n      if (iVar2 < 0) {\n        iVar4 = -1;\n        goto LAB_000181a6;\n      }\n    }" { (expression_statement "local_91 = '\0';" (assignment_expression "local_91 = '\0'" identifier = (char_literal "'\0'" ' escape_sequence ')) ;) (labeled_statement "LAB_00018287:\n      uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;" statement_identifier : (expression_statement "uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;" (assignment_expression "uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900" identifier = (binary_expression "(uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900" (binary_expression "(uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd" (binary_expression "(uVar6 & 0x800) << 7" (parenthesized_expression "(uVar6 & 0x800)" ( (binary_expression "uVar6 & 0x800" identifier & number_literal) )) << number_literal) | (binary_expression "(uVar6 & 0x10) << 0xd" (parenthesized_expression "(uVar6 & 0x10)" ( (binary_expression "uVar6 & 0x10" identifier & number_literal) )) << number_literal)) | number_literal)) ;)) (if_statement "if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);\n      }\n      else {\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }" if (parenthesized_expression "((uVar6 & 0x200) == 0)" ( (binary_expression "(uVar6 & 0x200) == 0" (parenthesized_expression "(uVar6 & 0x200)" ( (binary_expression "uVar6 & 0x200" identifier & number_literal) )) == number_literal) )) (compound_statement "{\nLAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);\n      }" { (labeled_statement "LAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);" statement_identifier : (expression_statement "iVar2 = FUN_0001b7a0(param_4,uVar5);" (assignment_expression "iVar2 = FUN_0001b7a0(param_4,uVar5)" identifier = (call_expression "FUN_0001b7a0(param_4,uVar5)" identifier (argument_list "(param_4,uVar5)" ( identifier , identifier )))) ;)) }) (else_clause "else {\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }" else (compound_statement "{\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }" { (labeled_statement "LAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);" statement_identifier : (expression_statement "iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);" (assignment_expression "iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5)" identifier = (call_expression "FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x1c)" * (cast_expression "(undefined4 *)(param_1 + 0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) )))) , identifier , identifier )))) ;)) }))) (expression_statement "local_a0 = param_3;" (assignment_expression "local_a0 = param_3" identifier = identifier) ;) (if_statement "if (iVar2 < 0) {\n        iVar4 = -1;\n        goto LAB_000181a6;\n      }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n        iVar4 = -1;\n        goto LAB_000181a6;\n      }" { (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" identifier = number_literal) ;) (goto_statement "goto LAB_000181a6;" goto statement_identifier ;) })) }) (else_clause "else {\n      local_91 = '\0';\n    }" else (compound_statement "{\n      local_91 = '\0';\n    }" { (expression_statement "local_91 = '\0';" (assignment_expression "local_91 = '\0'" identifier = (char_literal "'\0'" ' escape_sequence ')) ;) }))) }) (else_clause "else {\n    iVar4 = 3;\n    pbVar7 = param_4;\n    pbVar8 = &DAT_0001fb1d;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;\n    if ((uVar6 & 4) != 0) goto LAB_00018190;\n    if (param_3 < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = FUN_0001cb50(param_1 + 0x38);\n      if (local_91 == '\0') {\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }\n      uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }\n    local_91 = '\x01';\n  }" else (compound_statement "{\n    iVar4 = 3;\n    pbVar7 = param_4;\n    pbVar8 = &DAT_0001fb1d;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;\n    if ((uVar6 & 4) != 0) goto LAB_00018190;\n    if (param_3 < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = FUN_0001cb50(param_1 + 0x38);\n      if (local_91 == '\0') {\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }\n      uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }\n    local_91 = '\x01';\n  }" { (expression_statement "iVar4 = 3;" (assignment_expression "iVar4 = 3" identifier = number_literal) ;) (expression_statement "pbVar7 = param_4;" (assignment_expression "pbVar7 = param_4" identifier = identifier) ;) (expression_statement "pbVar8 = &DAT_0001fb1d;" (assignment_expression "pbVar8 = &DAT_0001fb1d" identifier = (pointer_expression "&DAT_0001fb1d" & identifier)) ;) (do_statement "do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);" do (compound_statement "{\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    }" { (if_statement "if (iVar4 == 0) break;" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) (expression_statement "bVar9 = *pbVar7 < *pbVar8;" (assignment_expression "bVar9 = *pbVar7 < *pbVar8" identifier = (binary_expression "*pbVar7 < *pbVar8" (pointer_expression "*pbVar7" * identifier) < (pointer_expression "*pbVar8" * identifier))) ;) (expression_statement "bVar10 = *pbVar7 == *pbVar8;" (assignment_expression "bVar10 = *pbVar7 == *pbVar8" identifier = (binary_expression "*pbVar7 == *pbVar8" (pointer_expression "*pbVar7" * identifier) == (pointer_expression "*pbVar8" * identifier))) ;) (expression_statement "pbVar7 = pbVar7 + 1;" (assignment_expression "pbVar7 = pbVar7 + 1" identifier = (binary_expression "pbVar7 + 1" identifier + number_literal)) ;) (expression_statement "pbVar8 = pbVar8 + 1;" (assignment_expression "pbVar8 = pbVar8 + 1" identifier = (binary_expression "pbVar8 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar10)" ( identifier )) ;) (if_statement "if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;" if (parenthesized_expression "((!bVar9 && !bVar10) != bVar9)" ( (binary_expression "(!bVar9 && !bVar10) != bVar9" (parenthesized_expression "(!bVar9 && !bVar10)" ( (binary_expression "!bVar9 && !bVar10" (unary_expression "!bVar9" ! identifier) && (unary_expression "!bVar10" ! identifier)) )) != identifier) )) (goto_statement "goto LAB_000180e0;" goto statement_identifier ;)) (if_statement "if ((uVar6 & 4) != 0) goto LAB_00018190;" if (parenthesized_expression "((uVar6 & 4) != 0)" ( (binary_expression "(uVar6 & 4) != 0" (parenthesized_expression "(uVar6 & 4)" ( (binary_expression "uVar6 & 4" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_00018190;" goto statement_identifier ;)) (if_statement "if (param_3 < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = FUN_0001cb50(param_1 + 0x38);\n      if (local_91 == '\0') {\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }\n      uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }" if (parenthesized_expression "(param_3 < 0)" ( (binary_expression "param_3 < 0" identifier < number_literal) )) (compound_statement "{\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = FUN_0001cb50(param_1 + 0x38);\n      if (local_91 == '\0') {\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }\n      uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }" { (if_statement "if ((uVar6 & 0x200) == 0) {\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }" if (parenthesized_expression "((uVar6 & 0x200) == 0)" ( (binary_expression "(uVar6 & 0x200) == 0" (parenthesized_expression "(uVar6 & 0x200)" ( (binary_expression "uVar6 & 0x200" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }" { (expression_statement "local_91 = '\x01';" (assignment_expression "local_91 = '\x01'" identifier = (char_literal "'\x01'" ' escape_sequence ')) ;) (expression_statement "uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;" (assignment_expression "uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900" identifier = (binary_expression "(uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900" (binary_expression "(uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd" (binary_expression "(uVar6 & 0x800) << 7" (parenthesized_expression "(uVar6 & 0x800)" ( (binary_expression "uVar6 & 0x800" identifier & number_literal) )) << number_literal) | (binary_expression "(uVar6 & 0x10) << 0xd" (parenthesized_expression "(uVar6 & 0x10)" ( (binary_expression "uVar6 & 0x10" identifier & number_literal) )) << number_literal)) | number_literal)) ;) (goto_statement "goto LAB_000181f0;" goto statement_identifier ;) })) (expression_statement "local_91 = FUN_0001cb50(param_1 + 0x38);" (assignment_expression "local_91 = FUN_0001cb50(param_1 + 0x38)" identifier = (call_expression "FUN_0001cb50(param_1 + 0x38)" identifier (argument_list "(param_1 + 0x38)" ( (binary_expression "param_1 + 0x38" identifier + number_literal) )))) ;) (if_statement "if (local_91 == '\0') {\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }" if (parenthesized_expression "(local_91 == '\0')" ( (binary_expression "local_91 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }" { (expression_statement "local_a0 = FUN_0001cba0(param_1 + 0x38);" (assignment_expression "local_a0 = FUN_0001cba0(param_1 + 0x38)" identifier = (call_expression "FUN_0001cba0(param_1 + 0x38)" identifier (argument_list "(param_1 + 0x38)" ( (binary_expression "param_1 + 0x38" identifier + number_literal) )))) ;) (if_statement "if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }" if (parenthesized_expression "(-1 < local_a0)" ( (binary_expression "-1 < local_a0" number_literal < identifier) )) (compound_statement "{\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }" { (expression_statement "local_91 = '\x01';" (assignment_expression "local_91 = '\x01'" identifier = (char_literal "'\x01'" ' escape_sequence ')) ;) (expression_statement "iVar2 = local_a0;" (assignment_expression "iVar2 = local_a0" identifier = identifier) ;) (goto_statement "goto LAB_000180fd;" goto statement_identifier ;) })) (expression_statement "local_91 = '\x01';" (assignment_expression "local_91 = '\x01'" identifier = (char_literal "'\x01'" ' escape_sequence ')) ;) (expression_statement "uVar6 = *(uint *)(param_1 + 0x2c);" (assignment_expression "uVar6 = *(uint *)(param_1 + 0x2c)" identifier = (pointer_expression "*(uint *)(param_1 + 0x2c)" * (cast_expression "(uint *)(param_1 + 0x2c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) ))))) ;) (goto_statement "goto LAB_00018287;" goto statement_identifier ;) })) (expression_statement "uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;" (assignment_expression "uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900" identifier = (binary_expression "(uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900" (binary_expression "(uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7" (binary_expression "(uVar6 & 0x10) << 0xd" (parenthesized_expression "(uVar6 & 0x10)" ( (binary_expression "uVar6 & 0x10" identifier & number_literal) )) << number_literal) | (binary_expression "(uVar6 & 0x800) << 7" (parenthesized_expression "(uVar6 & 0x800)" ( (binary_expression "uVar6 & 0x800" identifier & number_literal) )) << number_literal)) | number_literal)) ;) (goto_statement "goto LAB_000180b7;" goto statement_identifier ;) })) (expression_statement "local_91 = '\x01';" (assignment_expression "local_91 = '\x01'" identifier = (char_literal "'\x01'" ' escape_sequence ')) ;) }))) (labeled_statement "LAB_000180fd:\n  iVar4 = __fxstat64(3,iVar2,&local_80);" statement_identifier : (expression_statement "iVar4 = __fxstat64(3,iVar2,&local_80);" (assignment_expression "iVar4 = __fxstat64(3,iVar2,&local_80)" identifier = (call_expression "__fxstat64(3,iVar2,&local_80)" identifier (argument_list "(3,iVar2,&local_80)" ( number_literal , identifier , (pointer_expression "&local_80" & identifier) )))) ;)) (if_statement "if (iVar4 == 0) {\n    if ((*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev) ||\n       (*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino)) {\n      piVar3 = __errno_location();\n      *piVar3 = 2;\n      goto LAB_00018159;\n    }\n    if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n      iVar4 = *(int *)(param_1 + 0x1c);\n      if ((iVar2 == iVar4) && (iVar4 != -100)) {\n                    \n        abort();\n      }\n      if (local_91 == '\0') {\n        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);\n        if (-1 < iVar4) {\n          close(iVar4);\n        }\n      }\n      else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }\n      *(int *)(param_1 + 0x1c) = iVar2;\n      iVar4 = 0;\n      goto LAB_000181a6;\n    }\n    iVar4 = fchdir(iVar2);\n  }\n  else {\nLAB_00018159:\n    iVar4 = -1;\n  }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n    if ((*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev) ||\n       (*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino)) {\n      piVar3 = __errno_location();\n      *piVar3 = 2;\n      goto LAB_00018159;\n    }\n    if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n      iVar4 = *(int *)(param_1 + 0x1c);\n      if ((iVar2 == iVar4) && (iVar4 != -100)) {\n                    \n        abort();\n      }\n      if (local_91 == '\0') {\n        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);\n        if (-1 < iVar4) {\n          close(iVar4);\n        }\n      }\n      else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }\n      *(int *)(param_1 + 0x1c) = iVar2;\n      iVar4 = 0;\n      goto LAB_000181a6;\n    }\n    iVar4 = fchdir(iVar2);\n  }" { (if_statement "if ((*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev) ||\n       (*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino)) {\n      piVar3 = __errno_location();\n      *piVar3 = 2;\n      goto LAB_00018159;\n    }" if (parenthesized_expression "((*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev) ||\n       (*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino))" ( (binary_expression "(*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev) ||\n       (*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino)" (parenthesized_expression "(*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev)" ( (binary_expression "*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev" (binary_expression "*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_" (pointer_expression "*(int *)(param_2 + 0x48)" * (cast_expression "(int *)(param_2 + 0x48)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x48)" ( (binary_expression "param_2 + 0x48" identifier + number_literal) )))) != (field_expression "local_80.st_dev._4_4_" (field_expression "local_80.st_dev" identifier . field_identifier) . field_identifier)) || (binary_expression "*(int *)(param_2 + 0x44) != (int)local_80.st_dev" (pointer_expression "*(int *)(param_2 + 0x44)" * (cast_expression "(int *)(param_2 + 0x44)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x44)" ( (binary_expression "param_2 + 0x44" identifier + number_literal) )))) != (cast_expression "(int)local_80.st_dev" ( (type_descriptor "int" primitive_type) ) (field_expression "local_80.st_dev" identifier . field_identifier)))) )) || (parenthesized_expression "(*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino)" ( (binary_expression "*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino" (binary_expression "*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_" (pointer_expression "*(int *)(param_2 + 0xa0)" * (cast_expression "(int *)(param_2 + 0xa0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xa0)" ( (binary_expression "param_2 + 0xa0" identifier + number_literal) )))) != (field_expression "local_80.st_ino._4_4_" (field_expression "local_80.st_ino" identifier . field_identifier) . field_identifier)) || (binary_expression "*(int *)(param_2 + 0x9c) != (int)local_80.st_ino" (pointer_expression "*(int *)(param_2 + 0x9c)" * (cast_expression "(int *)(param_2 + 0x9c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x9c)" ( (binary_expression "param_2 + 0x9c" identifier + number_literal) )))) != (cast_expression "(int)local_80.st_ino" ( (type_descriptor "int" primitive_type) ) (field_expression "local_80.st_ino" identifier . field_identifier)))) ))) )) (compound_statement "{\n      piVar3 = __errno_location();\n      *piVar3 = 2;\n      goto LAB_00018159;\n    }" { (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar3 = 2;" (assignment_expression "*piVar3 = 2" (pointer_expression "*piVar3" * identifier) = number_literal) ;) (goto_statement "goto LAB_00018159;" goto statement_identifier ;) })) (if_statement "if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n      iVar4 = *(int *)(param_1 + 0x1c);\n      if ((iVar2 == iVar4) && (iVar4 != -100)) {\n                    \n        abort();\n      }\n      if (local_91 == '\0') {\n        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);\n        if (-1 < iVar4) {\n          close(iVar4);\n        }\n      }\n      else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }\n      *(int *)(param_1 + 0x1c) = iVar2;\n      iVar4 = 0;\n      goto LAB_000181a6;\n    }" if (parenthesized_expression "((*(uint *)(param_1 + 0x2c) & 0x200) != 0)" ( (binary_expression "(*(uint *)(param_1 + 0x2c) & 0x200) != 0" (parenthesized_expression "(*(uint *)(param_1 + 0x2c) & 0x200)" ( (binary_expression "*(uint *)(param_1 + 0x2c) & 0x200" (pointer_expression "*(uint *)(param_1 + 0x2c)" * (cast_expression "(uint *)(param_1 + 0x2c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n      iVar4 = *(int *)(param_1 + 0x1c);\n      if ((iVar2 == iVar4) && (iVar4 != -100)) {\n                    \n        abort();\n      }\n      if (local_91 == '\0') {\n        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);\n        if (-1 < iVar4) {\n          close(iVar4);\n        }\n      }\n      else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }\n      *(int *)(param_1 + 0x1c) = iVar2;\n      iVar4 = 0;\n      goto LAB_000181a6;\n    }" { (expression_statement "iVar4 = *(int *)(param_1 + 0x1c);" (assignment_expression "iVar4 = *(int *)(param_1 + 0x1c)" identifier = (pointer_expression "*(int *)(param_1 + 0x1c)" * (cast_expression "(int *)(param_1 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) ))))) ;) (if_statement "if ((iVar2 == iVar4) && (iVar4 != -100)) {\n                    \n        abort();\n      }" if (parenthesized_expression "((iVar2 == iVar4) && (iVar4 != -100))" ( (binary_expression "(iVar2 == iVar4) && (iVar4 != -100)" (parenthesized_expression "(iVar2 == iVar4)" ( (binary_expression "iVar2 == iVar4" identifier == identifier) )) && (parenthesized_expression "(iVar4 != -100)" ( (binary_expression "iVar4 != -100" identifier != number_literal) ))) )) (compound_statement "{\n                    \n        abort();\n      }" { (expression_statement "abort();" (call_expression "abort()" identifier (argument_list "()" ( ))) ;) })) (if_statement "if (local_91 == '\0') {\n        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);\n        if (-1 < iVar4) {\n          close(iVar4);\n        }\n      }\n      else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }" if (parenthesized_expression "(local_91 == '\0')" ( (binary_expression "local_91 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);\n        if (-1 < iVar4) {\n          close(iVar4);\n        }\n      }" { (expression_statement "iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);" (assignment_expression "iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4)" identifier = (call_expression "FUN_0001cb60(param_1 + 0x38,iVar4)" identifier (argument_list "(param_1 + 0x38,iVar4)" ( (binary_expression "param_1 + 0x38" identifier + number_literal) , identifier )))) ;) (if_statement "if (-1 < iVar4) {\n          close(iVar4);\n        }" if (parenthesized_expression "(-1 < iVar4)" ( (binary_expression "-1 < iVar4" number_literal < identifier) )) (compound_statement "{\n          close(iVar4);\n        }" { (expression_statement "close(iVar4);" (call_expression "close(iVar4)" identifier (argument_list "(iVar4)" ( identifier ))) ;) })) }) (else_clause "else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }" else (if_statement "if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }" if (parenthesized_expression "(((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4))" ( (binary_expression "((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)" (parenthesized_expression "((*(uint *)(param_1 + 0x2c) & 4) == 0)" ( (binary_expression "(*(uint *)(param_1 + 0x2c) & 4) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x2c) & 4)" ( (binary_expression "*(uint *)(param_1 + 0x2c) & 4" (pointer_expression "*(uint *)(param_1 + 0x2c)" * (cast_expression "(uint *)(param_1 + 0x2c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) )))) & number_literal) )) == number_literal) )) && (parenthesized_expression "(-1 < iVar4)" ( (binary_expression "-1 < iVar4" number_literal < identifier) ))) )) (compound_statement "{\n        close(iVar4);\n      }" { (expression_statement "close(iVar4);" (call_expression "close(iVar4)" identifier (argument_list "(iVar4)" ( identifier ))) ;) })))) (expression_statement "*(int *)(param_1 + 0x1c) = iVar2;" (assignment_expression "*(int *)(param_1 + 0x1c) = iVar2" (pointer_expression "*(int *)(param_1 + 0x1c)" * (cast_expression "(int *)(param_1 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) )))) = identifier) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_000181a6;" goto statement_identifier ;) })) (expression_statement "iVar4 = fchdir(iVar2);" (assignment_expression "iVar4 = fchdir(iVar2)" identifier = (call_expression "fchdir(iVar2)" identifier (argument_list "(iVar2)" ( identifier )))) ;) }) (else_clause "else {\nLAB_00018159:\n    iVar4 = -1;\n  }" else (compound_statement "{\nLAB_00018159:\n    iVar4 = -1;\n  }" { (labeled_statement "LAB_00018159:\n    iVar4 = -1;" statement_identifier : (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" identifier = number_literal) ;)) }))) (if_statement "if (local_a0 < 0) {\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    close(iVar2);\n    *piVar3 = iVar1;\n  }" if (parenthesized_expression "(local_a0 < 0)" ( (binary_expression "local_a0 < 0" identifier < number_literal) )) (compound_statement "{\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    close(iVar2);\n    *piVar3 = iVar1;\n  }" { (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar1 = *piVar3;" (assignment_expression "iVar1 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) (expression_statement "close(iVar2);" (call_expression "close(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (expression_statement "*piVar3 = iVar1;" (assignment_expression "*piVar3 = iVar1" (pointer_expression "*piVar3" * identifier) = identifier) ;) })) (labeled_statement "LAB_000181a6:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0001df30();\n  }" statement_identifier : (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0001df30();\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                    \n    FUN_0001df30();\n  }" { (expression_statement "FUN_0001df30();" (call_expression "FUN_0001df30()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * 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 IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (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 = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) || (parenthesized_expression ( (binary_expression IDENT < LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })))) (goto_statement goto statement_identifier ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (char_literal ' escape_sequence ')) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT)) | LIT)) ;)) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;)) }) (else_clause else (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT , IDENT )))) ;)) }))) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (char_literal ' escape_sequence ')) ;) }))) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) < (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) == (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( IDENT )) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (unary_expression ! IDENT) && (unary_expression ! IDENT)) )) != IDENT) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (char_literal ' escape_sequence ')) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT)) | LIT)) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (char_literal ' escape_sequence ')) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (char_literal ' escape_sequence ')) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT)) | LIT)) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (char_literal ' escape_sequence ')) ;) }))) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , IDENT , (pointer_expression & IDENT) )))) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (field_expression (field_expression IDENT . field_identifier) . field_identifier)) || (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (cast_expression ( (type_descriptor TYPE) ) (field_expression IDENT . field_identifier)))) )) || (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (field_expression (field_expression IDENT . field_identifier) . field_identifier)) || (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (cast_expression ( (type_descriptor TYPE) ) (field_expression IDENT . field_identifier)))) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == IDENT) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) )) && (parenthesized_expression ( (binary_expression LIT < IDENT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })))) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) }) (else_clause else (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) })) (labeled_statement statement_identifier : (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 { (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (return_statement return IDENT ;) })))
(function_definition "int __regparm3 FUN_00017ff0(int param_1,int param_2,int param_3,byte *param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  int in_GS_OFFSET;\n  bool bVar9;\n  bool bVar10;\n  int local_a0;\n  char local_91;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x17ff9;\n  uVar6 = *(uint *)(param_1 + 0x2c);\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  bVar9 = false;\n  bVar10 = param_4 == (byte *)0x0;\n  iVar2 = param_3;\n  local_a0 = param_3;\n  if (bVar10) {\nLAB_000180e0:\n    if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }\n      goto LAB_000181a6;\n    }\n    if (param_3 < 0) {\n      local_91 = '\0';\nLAB_00018287:\n      uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);\n      }\n      else {\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }\n      local_a0 = param_3;\n      if (iVar2 < 0) {\n        iVar4 = -1;\n        goto LAB_000181a6;\n      }\n    }\n    else {\n      local_91 = '\0';\n    }\n  }\n  else {\n    iVar4 = 3;\n    pbVar7 = param_4;\n    pbVar8 = &DAT_0001fb1d;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;\n    if ((uVar6 & 4) != 0) goto LAB_00018190;\n    if (param_3 < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = FUN_0001cb50(param_1 + 0x38);\n      if (local_91 == '\0') {\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }\n      uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }\n    local_91 = '\x01';\n  }\nLAB_000180fd:\n  iVar4 = __fxstat64(3,iVar2,&local_80);\n  if (iVar4 == 0) {\n    if ((*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev) ||\n       (*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino)) {\n      piVar3 = __errno_location();\n      *piVar3 = 2;\n      goto LAB_00018159;\n    }\n    if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n      iVar4 = *(int *)(param_1 + 0x1c);\n      if ((iVar2 == iVar4) && (iVar4 != -100)) {\n                    \n        abort();\n      }\n      if (local_91 == '\0') {\n        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);\n        if (-1 < iVar4) {\n          close(iVar4);\n        }\n      }\n      else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }\n      *(int *)(param_1 + 0x1c) = iVar2;\n      iVar4 = 0;\n      goto LAB_000181a6;\n    }\n    iVar4 = fchdir(iVar2);\n  }\n  else {\nLAB_00018159:\n    iVar4 = -1;\n  }\n  if (local_a0 < 0) {\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    close(iVar2);\n    *piVar3 = iVar1;\n  }\nLAB_000181a6:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0001df30();\n  }\n  return iVar4;\n}" (primitive_type "int") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00017ff0(int param_1,int param_2,int param_3,byte *param_4)" (identifier "FUN_00017ff0") (parameter_list "(int param_1,int param_2,int param_3,byte *param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "byte *param_4" (type_identifier "byte") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  int in_GS_OFFSET;\n  bool bVar9;\n  bool bVar10;\n  int local_a0;\n  char local_91;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x17ff9;\n  uVar6 = *(uint *)(param_1 + 0x2c);\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  bVar9 = false;\n  bVar10 = param_4 == (byte *)0x0;\n  iVar2 = param_3;\n  local_a0 = param_3;\n  if (bVar10) {\nLAB_000180e0:\n    if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }\n      goto LAB_000181a6;\n    }\n    if (param_3 < 0) {\n      local_91 = '\0';\nLAB_00018287:\n      uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);\n      }\n      else {\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }\n      local_a0 = param_3;\n      if (iVar2 < 0) {\n        iVar4 = -1;\n        goto LAB_000181a6;\n      }\n    }\n    else {\n      local_91 = '\0';\n    }\n  }\n  else {\n    iVar4 = 3;\n    pbVar7 = param_4;\n    pbVar8 = &DAT_0001fb1d;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;\n    if ((uVar6 & 4) != 0) goto LAB_00018190;\n    if (param_3 < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = FUN_0001cb50(param_1 + 0x38);\n      if (local_91 == '\0') {\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }\n      uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }\n    local_91 = '\x01';\n  }\nLAB_000180fd:\n  iVar4 = __fxstat64(3,iVar2,&local_80);\n  if (iVar4 == 0) {\n    if ((*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev) ||\n       (*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino)) {\n      piVar3 = __errno_location();\n      *piVar3 = 2;\n      goto LAB_00018159;\n    }\n    if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n      iVar4 = *(int *)(param_1 + 0x1c);\n      if ((iVar2 == iVar4) && (iVar4 != -100)) {\n                    \n        abort();\n      }\n      if (local_91 == '\0') {\n        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);\n        if (-1 < iVar4) {\n          close(iVar4);\n        }\n      }\n      else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }\n      *(int *)(param_1 + 0x1c) = iVar2;\n      iVar4 = 0;\n      goto LAB_000181a6;\n    }\n    iVar4 = fchdir(iVar2);\n  }\n  else {\nLAB_00018159:\n    iVar4 = -1;\n  }\n  if (local_a0 < 0) {\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    close(iVar2);\n    *piVar3 = iVar1;\n  }\nLAB_000181a6:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0001df30();\n  }\n  return iVar4;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "uint uVar6;" (type_identifier "uint") (identifier "uVar6") (; ";")) (declaration "byte *pbVar7;" (type_identifier "byte") (pointer_declarator "*pbVar7" (* "*") (identifier "pbVar7")) (; ";")) (declaration "byte *pbVar8;" (type_identifier "byte") (pointer_declarator "*pbVar8" (* "*") (identifier "pbVar8")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "bool bVar9;" (primitive_type "bool") (identifier "bVar9") (; ";")) (declaration "bool bVar10;" (primitive_type "bool") (identifier "bVar10") (; ";")) (declaration "int local_a0;" (primitive_type "int") (identifier "local_a0") (; ";")) (declaration "char local_91;" (primitive_type "char") (identifier "local_91") (; ";")) (declaration "stat64 local_80;" (type_identifier "stat64") (identifier "local_80") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x17ff9;" (assignment_expression "uStack_14 = 0x17ff9" (identifier "uStack_14") (= "=") (number_literal "0x17ff9")) (; ";")) (expression_statement "uVar6 = *(uint *)(param_1 + 0x2c);" (assignment_expression "uVar6 = *(uint *)(param_1 + 0x2c)" (identifier "uVar6") (= "=") (pointer_expression "*(uint *)(param_1 + 0x2c)" (* "*") (cast_expression "(uint *)(param_1 + 0x2c)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2c)" (( "(") (binary_expression "param_1 + 0x2c" (identifier "param_1") (+ "+") (number_literal "0x2c")) () ")"))))) (; ";")) (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 "bVar9 = false;" (assignment_expression "bVar9 = false" (identifier "bVar9") (= "=") (false "false")) (; ";")) (expression_statement "bVar10 = param_4 == (byte *)0x0;" (assignment_expression "bVar10 = param_4 == (byte *)0x0" (identifier "bVar10") (= "=") (binary_expression "param_4 == (byte *)0x0" (identifier "param_4") (== "==") (cast_expression "(byte *)0x0" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")))) (; ";")) (expression_statement "iVar2 = param_3;" (assignment_expression "iVar2 = param_3" (identifier "iVar2") (= "=") (identifier "param_3")) (; ";")) (expression_statement "local_a0 = param_3;" (assignment_expression "local_a0 = param_3" (identifier "local_a0") (= "=") (identifier "param_3")) (; ";")) (if_statement "if (bVar10) {\nLAB_000180e0:\n    if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }\n      goto LAB_000181a6;\n    }\n    if (param_3 < 0) {\n      local_91 = '\0';\nLAB_00018287:\n      uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);\n      }\n      else {\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }\n      local_a0 = param_3;\n      if (iVar2 < 0) {\n        iVar4 = -1;\n        goto LAB_000181a6;\n      }\n    }\n    else {\n      local_91 = '\0';\n    }\n  }\n  else {\n    iVar4 = 3;\n    pbVar7 = param_4;\n    pbVar8 = &DAT_0001fb1d;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;\n    if ((uVar6 & 4) != 0) goto LAB_00018190;\n    if (param_3 < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = FUN_0001cb50(param_1 + 0x38);\n      if (local_91 == '\0') {\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }\n      uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }\n    local_91 = '\x01';\n  }" (if "if") (parenthesized_expression "(bVar10)" (( "(") (identifier "bVar10") () ")")) (compound_statement "{\nLAB_000180e0:\n    if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }\n      goto LAB_000181a6;\n    }\n    if (param_3 < 0) {\n      local_91 = '\0';\nLAB_00018287:\n      uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);\n      }\n      else {\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }\n      local_a0 = param_3;\n      if (iVar2 < 0) {\n        iVar4 = -1;\n        goto LAB_000181a6;\n      }\n    }\n    else {\n      local_91 = '\0';\n    }\n  }" ({ "{") (labeled_statement "LAB_000180e0:\n    if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }\n      goto LAB_000181a6;\n    }" (statement_identifier "LAB_000180e0") (: ":") (if_statement "if ((uVar6 & 4) != 0) {\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }\n      goto LAB_000181a6;\n    }" (if "if") (parenthesized_expression "((uVar6 & 4) != 0)" (( "(") (binary_expression "(uVar6 & 4) != 0" (parenthesized_expression "(uVar6 & 4)" (( "(") (binary_expression "uVar6 & 4" (identifier "uVar6") (& "&") (number_literal "4")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\nLAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }\n      goto LAB_000181a6;\n    }" ({ "{") (labeled_statement "LAB_00018190:\n      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }" (statement_identifier "LAB_00018190") (: ":") (if_statement "if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {\n        iVar4 = 0;\n      }\n      else {\n        iVar4 = 0;\n        close(param_3);\n      }" (if "if") (parenthesized_expression "(((uVar6 & 0x200) == 0) || (param_3 < 0))" (( "(") (binary_expression "((uVar6 & 0x200) == 0) || (param_3 < 0)" (parenthesized_expression "((uVar6 & 0x200) == 0)" (( "(") (binary_expression "(uVar6 & 0x200) == 0" (parenthesized_expression "(uVar6 & 0x200)" (( "(") (binary_expression "uVar6 & 0x200" (identifier "uVar6") (& "&") (number_literal "0x200")) () ")")) (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(param_3 < 0)" (( "(") (binary_expression "param_3 < 0" (identifier "param_3") (< "<") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n        iVar4 = 0;\n      }" ({ "{") (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n        iVar4 = 0;\n        close(param_3);\n      }" (else "else") (compound_statement "{\n        iVar4 = 0;\n        close(param_3);\n      }" ({ "{") (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (expression_statement "close(param_3);" (call_expression "close(param_3)" (identifier "close") (argument_list "(param_3)" (( "(") (identifier "param_3") () ")"))) (; ";")) (} "}"))))) (goto_statement "goto LAB_000181a6;" (goto "goto") (statement_identifier "LAB_000181a6") (; ";")) (} "}")))) (if_statement "if (param_3 < 0) {\n      local_91 = '\0';\nLAB_00018287:\n      uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);\n      }\n      else {\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }\n      local_a0 = param_3;\n      if (iVar2 < 0) {\n        iVar4 = -1;\n        goto LAB_000181a6;\n      }\n    }\n    else {\n      local_91 = '\0';\n    }" (if "if") (parenthesized_expression "(param_3 < 0)" (( "(") (binary_expression "param_3 < 0" (identifier "param_3") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      local_91 = '\0';\nLAB_00018287:\n      uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n      if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);\n      }\n      else {\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }\n      local_a0 = param_3;\n      if (iVar2 < 0) {\n        iVar4 = -1;\n        goto LAB_000181a6;\n      }\n    }" ({ "{") (expression_statement "local_91 = '\0';" (assignment_expression "local_91 = '\0'" (identifier "local_91") (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (labeled_statement "LAB_00018287:\n      uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;" (statement_identifier "LAB_00018287") (: ":") (expression_statement "uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;" (assignment_expression "uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900" (identifier "uVar5") (= "=") (binary_expression "(uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900" (binary_expression "(uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd" (binary_expression "(uVar6 & 0x800) << 7" (parenthesized_expression "(uVar6 & 0x800)" (( "(") (binary_expression "uVar6 & 0x800" (identifier "uVar6") (& "&") (number_literal "0x800")) () ")")) (<< "<<") (number_literal "7")) (| "|") (binary_expression "(uVar6 & 0x10) << 0xd" (parenthesized_expression "(uVar6 & 0x10)" (( "(") (binary_expression "uVar6 & 0x10" (identifier "uVar6") (& "&") (number_literal "0x10")) () ")")) (<< "<<") (number_literal "0xd"))) (| "|") (number_literal "0x90900"))) (; ";"))) (if_statement "if ((uVar6 & 0x200) == 0) {\nLAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);\n      }\n      else {\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }" (if "if") (parenthesized_expression "((uVar6 & 0x200) == 0)" (( "(") (binary_expression "(uVar6 & 0x200) == 0" (parenthesized_expression "(uVar6 & 0x200)" (( "(") (binary_expression "uVar6 & 0x200" (identifier "uVar6") (& "&") (number_literal "0x200")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\nLAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);\n      }" ({ "{") (labeled_statement "LAB_000181f0:\n        iVar2 = FUN_0001b7a0(param_4,uVar5);" (statement_identifier "LAB_000181f0") (: ":") (expression_statement "iVar2 = FUN_0001b7a0(param_4,uVar5);" (assignment_expression "iVar2 = FUN_0001b7a0(param_4,uVar5)" (identifier "iVar2") (= "=") (call_expression "FUN_0001b7a0(param_4,uVar5)" (identifier "FUN_0001b7a0") (argument_list "(param_4,uVar5)" (( "(") (identifier "param_4") (, ",") (identifier "uVar5") () ")")))) (; ";"))) (} "}")) (else_clause "else {\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }" (else "else") (compound_statement "{\nLAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);\n      }" ({ "{") (labeled_statement "LAB_000180b7:\n        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);" (statement_identifier "LAB_000180b7") (: ":") (expression_statement "iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);" (assignment_expression "iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5)" (identifier "iVar2") (= "=") (call_expression "FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5)" (identifier "FUN_0001ccc0") (argument_list "(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0x1c)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x1c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1c)" (( "(") (binary_expression "param_1 + 0x1c" (identifier "param_1") (+ "+") (number_literal "0x1c")) () ")")))) (, ",") (identifier "param_4") (, ",") (identifier "uVar5") () ")")))) (; ";"))) (} "}")))) (expression_statement "local_a0 = param_3;" (assignment_expression "local_a0 = param_3" (identifier "local_a0") (= "=") (identifier "param_3")) (; ";")) (if_statement "if (iVar2 < 0) {\n        iVar4 = -1;\n        goto LAB_000181a6;\n      }" (if "if") (parenthesized_expression "(iVar2 < 0)" (( "(") (binary_expression "iVar2 < 0" (identifier "iVar2") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n        iVar4 = -1;\n        goto LAB_000181a6;\n      }" ({ "{") (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" (identifier "iVar4") (= "=") (number_literal "-1")) (; ";")) (goto_statement "goto LAB_000181a6;" (goto "goto") (statement_identifier "LAB_000181a6") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n      local_91 = '\0';\n    }" (else "else") (compound_statement "{\n      local_91 = '\0';\n    }" ({ "{") (expression_statement "local_91 = '\0';" (assignment_expression "local_91 = '\0'" (identifier "local_91") (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (} "}")))) (} "}")) (else_clause "else {\n    iVar4 = 3;\n    pbVar7 = param_4;\n    pbVar8 = &DAT_0001fb1d;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;\n    if ((uVar6 & 4) != 0) goto LAB_00018190;\n    if (param_3 < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = FUN_0001cb50(param_1 + 0x38);\n      if (local_91 == '\0') {\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }\n      uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }\n    local_91 = '\x01';\n  }" (else "else") (compound_statement "{\n    iVar4 = 3;\n    pbVar7 = param_4;\n    pbVar8 = &DAT_0001fb1d;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;\n    if ((uVar6 & 4) != 0) goto LAB_00018190;\n    if (param_3 < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = FUN_0001cb50(param_1 + 0x38);\n      if (local_91 == '\0') {\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }\n      uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }\n    local_91 = '\x01';\n  }" ({ "{") (expression_statement "iVar4 = 3;" (assignment_expression "iVar4 = 3" (identifier "iVar4") (= "=") (number_literal "3")) (; ";")) (expression_statement "pbVar7 = param_4;" (assignment_expression "pbVar7 = param_4" (identifier "pbVar7") (= "=") (identifier "param_4")) (; ";")) (expression_statement "pbVar8 = &DAT_0001fb1d;" (assignment_expression "pbVar8 = &DAT_0001fb1d" (identifier "pbVar8") (= "=") (pointer_expression "&DAT_0001fb1d" (& "&") (identifier "DAT_0001fb1d"))) (; ";")) (do_statement "do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);" (do "do") (compound_statement "{\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    }" ({ "{") (if_statement "if (iVar4 == 0) break;" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + -1" (identifier "iVar4") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "bVar9 = *pbVar7 < *pbVar8;" (assignment_expression "bVar9 = *pbVar7 < *pbVar8" (identifier "bVar9") (= "=") (binary_expression "*pbVar7 < *pbVar8" (pointer_expression "*pbVar7" (* "*") (identifier "pbVar7")) (< "<") (pointer_expression "*pbVar8" (* "*") (identifier "pbVar8")))) (; ";")) (expression_statement "bVar10 = *pbVar7 == *pbVar8;" (assignment_expression "bVar10 = *pbVar7 == *pbVar8" (identifier "bVar10") (= "=") (binary_expression "*pbVar7 == *pbVar8" (pointer_expression "*pbVar7" (* "*") (identifier "pbVar7")) (== "==") (pointer_expression "*pbVar8" (* "*") (identifier "pbVar8")))) (; ";")) (expression_statement "pbVar7 = pbVar7 + 1;" (assignment_expression "pbVar7 = pbVar7 + 1" (identifier "pbVar7") (= "=") (binary_expression "pbVar7 + 1" (identifier "pbVar7") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pbVar8 = pbVar8 + 1;" (assignment_expression "pbVar8 = pbVar8 + 1" (identifier "pbVar8") (= "=") (binary_expression "pbVar8 + 1" (identifier "pbVar8") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(bVar10)" (( "(") (identifier "bVar10") () ")")) (; ";")) (if_statement "if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;" (if "if") (parenthesized_expression "((!bVar9 && !bVar10) != bVar9)" (( "(") (binary_expression "(!bVar9 && !bVar10) != bVar9" (parenthesized_expression "(!bVar9 && !bVar10)" (( "(") (binary_expression "!bVar9 && !bVar10" (unary_expression "!bVar9" (! "!") (identifier "bVar9")) (&& "&&") (unary_expression "!bVar10" (! "!") (identifier "bVar10"))) () ")")) (!= "!=") (identifier "bVar9")) () ")")) (goto_statement "goto LAB_000180e0;" (goto "goto") (statement_identifier "LAB_000180e0") (; ";"))) (if_statement "if ((uVar6 & 4) != 0) goto LAB_00018190;" (if "if") (parenthesized_expression "((uVar6 & 4) != 0)" (( "(") (binary_expression "(uVar6 & 4) != 0" (parenthesized_expression "(uVar6 & 4)" (( "(") (binary_expression "uVar6 & 4" (identifier "uVar6") (& "&") (number_literal "4")) () ")")) (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_00018190;" (goto "goto") (statement_identifier "LAB_00018190") (; ";"))) (if_statement "if (param_3 < 0) {\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = FUN_0001cb50(param_1 + 0x38);\n      if (local_91 == '\0') {\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }\n      uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }" (if "if") (parenthesized_expression "(param_3 < 0)" (( "(") (binary_expression "param_3 < 0" (identifier "param_3") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      if ((uVar6 & 0x200) == 0) {\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }\n      local_91 = FUN_0001cb50(param_1 + 0x38);\n      if (local_91 == '\0') {\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }\n      uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;\n      goto LAB_000180b7;\n    }" ({ "{") (if_statement "if ((uVar6 & 0x200) == 0) {\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }" (if "if") (parenthesized_expression "((uVar6 & 0x200) == 0)" (( "(") (binary_expression "(uVar6 & 0x200) == 0" (parenthesized_expression "(uVar6 & 0x200)" (( "(") (binary_expression "uVar6 & 0x200" (identifier "uVar6") (& "&") (number_literal "0x200")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        local_91 = '\x01';\n        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;\n        goto LAB_000181f0;\n      }" ({ "{") (expression_statement "local_91 = '\x01';" (assignment_expression "local_91 = '\x01'" (identifier "local_91") (= "=") (char_literal "'\x01'" (' "'") (escape_sequence "\x01") (' "'"))) (; ";")) (expression_statement "uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;" (assignment_expression "uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900" (identifier "uVar5") (= "=") (binary_expression "(uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900" (binary_expression "(uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd" (binary_expression "(uVar6 & 0x800) << 7" (parenthesized_expression "(uVar6 & 0x800)" (( "(") (binary_expression "uVar6 & 0x800" (identifier "uVar6") (& "&") (number_literal "0x800")) () ")")) (<< "<<") (number_literal "7")) (| "|") (binary_expression "(uVar6 & 0x10) << 0xd" (parenthesized_expression "(uVar6 & 0x10)" (( "(") (binary_expression "uVar6 & 0x10" (identifier "uVar6") (& "&") (number_literal "0x10")) () ")")) (<< "<<") (number_literal "0xd"))) (| "|") (number_literal "0x90900"))) (; ";")) (goto_statement "goto LAB_000181f0;" (goto "goto") (statement_identifier "LAB_000181f0") (; ";")) (} "}"))) (expression_statement "local_91 = FUN_0001cb50(param_1 + 0x38);" (assignment_expression "local_91 = FUN_0001cb50(param_1 + 0x38)" (identifier "local_91") (= "=") (call_expression "FUN_0001cb50(param_1 + 0x38)" (identifier "FUN_0001cb50") (argument_list "(param_1 + 0x38)" (( "(") (binary_expression "param_1 + 0x38" (identifier "param_1") (+ "+") (number_literal "0x38")) () ")")))) (; ";")) (if_statement "if (local_91 == '\0') {\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }" (if "if") (parenthesized_expression "(local_91 == '\0')" (( "(") (binary_expression "local_91 == '\0'" (identifier "local_91") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n        local_a0 = FUN_0001cba0(param_1 + 0x38);\n        if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }\n        local_91 = '\x01';\n        uVar6 = *(uint *)(param_1 + 0x2c);\n        goto LAB_00018287;\n      }" ({ "{") (expression_statement "local_a0 = FUN_0001cba0(param_1 + 0x38);" (assignment_expression "local_a0 = FUN_0001cba0(param_1 + 0x38)" (identifier "local_a0") (= "=") (call_expression "FUN_0001cba0(param_1 + 0x38)" (identifier "FUN_0001cba0") (argument_list "(param_1 + 0x38)" (( "(") (binary_expression "param_1 + 0x38" (identifier "param_1") (+ "+") (number_literal "0x38")) () ")")))) (; ";")) (if_statement "if (-1 < local_a0) {\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }" (if "if") (parenthesized_expression "(-1 < local_a0)" (( "(") (binary_expression "-1 < local_a0" (number_literal "-1") (< "<") (identifier "local_a0")) () ")")) (compound_statement "{\n          local_91 = '\x01';\n          iVar2 = local_a0;\n          goto LAB_000180fd;\n        }" ({ "{") (expression_statement "local_91 = '\x01';" (assignment_expression "local_91 = '\x01'" (identifier "local_91") (= "=") (char_literal "'\x01'" (' "'") (escape_sequence "\x01") (' "'"))) (; ";")) (expression_statement "iVar2 = local_a0;" (assignment_expression "iVar2 = local_a0" (identifier "iVar2") (= "=") (identifier "local_a0")) (; ";")) (goto_statement "goto LAB_000180fd;" (goto "goto") (statement_identifier "LAB_000180fd") (; ";")) (} "}"))) (expression_statement "local_91 = '\x01';" (assignment_expression "local_91 = '\x01'" (identifier "local_91") (= "=") (char_literal "'\x01'" (' "'") (escape_sequence "\x01") (' "'"))) (; ";")) (expression_statement "uVar6 = *(uint *)(param_1 + 0x2c);" (assignment_expression "uVar6 = *(uint *)(param_1 + 0x2c)" (identifier "uVar6") (= "=") (pointer_expression "*(uint *)(param_1 + 0x2c)" (* "*") (cast_expression "(uint *)(param_1 + 0x2c)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2c)" (( "(") (binary_expression "param_1 + 0x2c" (identifier "param_1") (+ "+") (number_literal "0x2c")) () ")"))))) (; ";")) (goto_statement "goto LAB_00018287;" (goto "goto") (statement_identifier "LAB_00018287") (; ";")) (} "}"))) (expression_statement "uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;" (assignment_expression "uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900" (identifier "uVar5") (= "=") (binary_expression "(uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900" (binary_expression "(uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7" (binary_expression "(uVar6 & 0x10) << 0xd" (parenthesized_expression "(uVar6 & 0x10)" (( "(") (binary_expression "uVar6 & 0x10" (identifier "uVar6") (& "&") (number_literal "0x10")) () ")")) (<< "<<") (number_literal "0xd")) (| "|") (binary_expression "(uVar6 & 0x800) << 7" (parenthesized_expression "(uVar6 & 0x800)" (( "(") (binary_expression "uVar6 & 0x800" (identifier "uVar6") (& "&") (number_literal "0x800")) () ")")) (<< "<<") (number_literal "7"))) (| "|") (number_literal "0x90900"))) (; ";")) (goto_statement "goto LAB_000180b7;" (goto "goto") (statement_identifier "LAB_000180b7") (; ";")) (} "}"))) (expression_statement "local_91 = '\x01';" (assignment_expression "local_91 = '\x01'" (identifier "local_91") (= "=") (char_literal "'\x01'" (' "'") (escape_sequence "\x01") (' "'"))) (; ";")) (} "}")))) (labeled_statement "LAB_000180fd:\n  iVar4 = __fxstat64(3,iVar2,&local_80);" (statement_identifier "LAB_000180fd") (: ":") (expression_statement "iVar4 = __fxstat64(3,iVar2,&local_80);" (assignment_expression "iVar4 = __fxstat64(3,iVar2,&local_80)" (identifier "iVar4") (= "=") (call_expression "__fxstat64(3,iVar2,&local_80)" (identifier "__fxstat64") (argument_list "(3,iVar2,&local_80)" (( "(") (number_literal "3") (, ",") (identifier "iVar2") (, ",") (pointer_expression "&local_80" (& "&") (identifier "local_80")) () ")")))) (; ";"))) (if_statement "if (iVar4 == 0) {\n    if ((*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev) ||\n       (*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino)) {\n      piVar3 = __errno_location();\n      *piVar3 = 2;\n      goto LAB_00018159;\n    }\n    if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n      iVar4 = *(int *)(param_1 + 0x1c);\n      if ((iVar2 == iVar4) && (iVar4 != -100)) {\n                    \n        abort();\n      }\n      if (local_91 == '\0') {\n        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);\n        if (-1 < iVar4) {\n          close(iVar4);\n        }\n      }\n      else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }\n      *(int *)(param_1 + 0x1c) = iVar2;\n      iVar4 = 0;\n      goto LAB_000181a6;\n    }\n    iVar4 = fchdir(iVar2);\n  }\n  else {\nLAB_00018159:\n    iVar4 = -1;\n  }" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if ((*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev) ||\n       (*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino)) {\n      piVar3 = __errno_location();\n      *piVar3 = 2;\n      goto LAB_00018159;\n    }\n    if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n      iVar4 = *(int *)(param_1 + 0x1c);\n      if ((iVar2 == iVar4) && (iVar4 != -100)) {\n                    \n        abort();\n      }\n      if (local_91 == '\0') {\n        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);\n        if (-1 < iVar4) {\n          close(iVar4);\n        }\n      }\n      else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }\n      *(int *)(param_1 + 0x1c) = iVar2;\n      iVar4 = 0;\n      goto LAB_000181a6;\n    }\n    iVar4 = fchdir(iVar2);\n  }" ({ "{") (if_statement "if ((*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev) ||\n       (*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino)) {\n      piVar3 = __errno_location();\n      *piVar3 = 2;\n      goto LAB_00018159;\n    }" (if "if") (parenthesized_expression "((*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev) ||\n       (*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino))" (( "(") (binary_expression "(*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev) ||\n       (*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino)" (parenthesized_expression "(*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev)" (( "(") (binary_expression "*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||\n         *(int *)(param_2 + 0x44) != (int)local_80.st_dev" (binary_expression "*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_" (pointer_expression "*(int *)(param_2 + 0x48)" (* "*") (cast_expression "(int *)(param_2 + 0x48)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x48)" (( "(") (binary_expression "param_2 + 0x48" (identifier "param_2") (+ "+") (number_literal "0x48")) () ")")))) (!= "!=") (field_expression "local_80.st_dev._4_4_" (field_expression "local_80.st_dev" (identifier "local_80") (. ".") (field_identifier "st_dev")) (. ".") (field_identifier "_4_4_"))) (|| "||") (binary_expression "*(int *)(param_2 + 0x44) != (int)local_80.st_dev" (pointer_expression "*(int *)(param_2 + 0x44)" (* "*") (cast_expression "(int *)(param_2 + 0x44)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x44)" (( "(") (binary_expression "param_2 + 0x44" (identifier "param_2") (+ "+") (number_literal "0x44")) () ")")))) (!= "!=") (cast_expression "(int)local_80.st_dev" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (field_expression "local_80.st_dev" (identifier "local_80") (. ".") (field_identifier "st_dev"))))) () ")")) (|| "||") (parenthesized_expression "(*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino)" (( "(") (binary_expression "*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||\n        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino" (binary_expression "*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_" (pointer_expression "*(int *)(param_2 + 0xa0)" (* "*") (cast_expression "(int *)(param_2 + 0xa0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0xa0)" (( "(") (binary_expression "param_2 + 0xa0" (identifier "param_2") (+ "+") (number_literal "0xa0")) () ")")))) (!= "!=") (field_expression "local_80.st_ino._4_4_" (field_expression "local_80.st_ino" (identifier "local_80") (. ".") (field_identifier "st_ino")) (. ".") (field_identifier "_4_4_"))) (|| "||") (binary_expression "*(int *)(param_2 + 0x9c) != (int)local_80.st_ino" (pointer_expression "*(int *)(param_2 + 0x9c)" (* "*") (cast_expression "(int *)(param_2 + 0x9c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x9c)" (( "(") (binary_expression "param_2 + 0x9c" (identifier "param_2") (+ "+") (number_literal "0x9c")) () ")")))) (!= "!=") (cast_expression "(int)local_80.st_ino" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (field_expression "local_80.st_ino" (identifier "local_80") (. ".") (field_identifier "st_ino"))))) () ")"))) () ")")) (compound_statement "{\n      piVar3 = __errno_location();\n      *piVar3 = 2;\n      goto LAB_00018159;\n    }" ({ "{") (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" (identifier "piVar3") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "*piVar3 = 2;" (assignment_expression "*piVar3 = 2" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (= "=") (number_literal "2")) (; ";")) (goto_statement "goto LAB_00018159;" (goto "goto") (statement_identifier "LAB_00018159") (; ";")) (} "}"))) (if_statement "if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n      iVar4 = *(int *)(param_1 + 0x1c);\n      if ((iVar2 == iVar4) && (iVar4 != -100)) {\n                    \n        abort();\n      }\n      if (local_91 == '\0') {\n        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);\n        if (-1 < iVar4) {\n          close(iVar4);\n        }\n      }\n      else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }\n      *(int *)(param_1 + 0x1c) = iVar2;\n      iVar4 = 0;\n      goto LAB_000181a6;\n    }" (if "if") (parenthesized_expression "((*(uint *)(param_1 + 0x2c) & 0x200) != 0)" (( "(") (binary_expression "(*(uint *)(param_1 + 0x2c) & 0x200) != 0" (parenthesized_expression "(*(uint *)(param_1 + 0x2c) & 0x200)" (( "(") (binary_expression "*(uint *)(param_1 + 0x2c) & 0x200" (pointer_expression "*(uint *)(param_1 + 0x2c)" (* "*") (cast_expression "(uint *)(param_1 + 0x2c)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2c)" (( "(") (binary_expression "param_1 + 0x2c" (identifier "param_1") (+ "+") (number_literal "0x2c")) () ")")))) (& "&") (number_literal "0x200")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      iVar4 = *(int *)(param_1 + 0x1c);\n      if ((iVar2 == iVar4) && (iVar4 != -100)) {\n                    \n        abort();\n      }\n      if (local_91 == '\0') {\n        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);\n        if (-1 < iVar4) {\n          close(iVar4);\n        }\n      }\n      else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }\n      *(int *)(param_1 + 0x1c) = iVar2;\n      iVar4 = 0;\n      goto LAB_000181a6;\n    }" ({ "{") (expression_statement "iVar4 = *(int *)(param_1 + 0x1c);" (assignment_expression "iVar4 = *(int *)(param_1 + 0x1c)" (identifier "iVar4") (= "=") (pointer_expression "*(int *)(param_1 + 0x1c)" (* "*") (cast_expression "(int *)(param_1 + 0x1c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1c)" (( "(") (binary_expression "param_1 + 0x1c" (identifier "param_1") (+ "+") (number_literal "0x1c")) () ")"))))) (; ";")) (if_statement "if ((iVar2 == iVar4) && (iVar4 != -100)) {\n                    \n        abort();\n      }" (if "if") (parenthesized_expression "((iVar2 == iVar4) && (iVar4 != -100))" (( "(") (binary_expression "(iVar2 == iVar4) && (iVar4 != -100)" (parenthesized_expression "(iVar2 == iVar4)" (( "(") (binary_expression "iVar2 == iVar4" (identifier "iVar2") (== "==") (identifier "iVar4")) () ")")) (&& "&&") (parenthesized_expression "(iVar4 != -100)" (( "(") (binary_expression "iVar4 != -100" (identifier "iVar4") (!= "!=") (number_literal "-100")) () ")"))) () ")")) (compound_statement "{\n                    \n        abort();\n      }" ({ "{") (expression_statement "abort();" (call_expression "abort()" (identifier "abort") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (if_statement "if (local_91 == '\0') {\n        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);\n        if (-1 < iVar4) {\n          close(iVar4);\n        }\n      }\n      else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }" (if "if") (parenthesized_expression "(local_91 == '\0')" (( "(") (binary_expression "local_91 == '\0'" (identifier "local_91") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);\n        if (-1 < iVar4) {\n          close(iVar4);\n        }\n      }" ({ "{") (expression_statement "iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);" (assignment_expression "iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4)" (identifier "iVar4") (= "=") (call_expression "FUN_0001cb60(param_1 + 0x38,iVar4)" (identifier "FUN_0001cb60") (argument_list "(param_1 + 0x38,iVar4)" (( "(") (binary_expression "param_1 + 0x38" (identifier "param_1") (+ "+") (number_literal "0x38")) (, ",") (identifier "iVar4") () ")")))) (; ";")) (if_statement "if (-1 < iVar4) {\n          close(iVar4);\n        }" (if "if") (parenthesized_expression "(-1 < iVar4)" (( "(") (binary_expression "-1 < iVar4" (number_literal "-1") (< "<") (identifier "iVar4")) () ")")) (compound_statement "{\n          close(iVar4);\n        }" ({ "{") (expression_statement "close(iVar4);" (call_expression "close(iVar4)" (identifier "close") (argument_list "(iVar4)" (( "(") (identifier "iVar4") () ")"))) (; ";")) (} "}"))) (} "}")) (else_clause "else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }" (else "else") (if_statement "if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {\n        close(iVar4);\n      }" (if "if") (parenthesized_expression "(((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4))" (( "(") (binary_expression "((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)" (parenthesized_expression "((*(uint *)(param_1 + 0x2c) & 4) == 0)" (( "(") (binary_expression "(*(uint *)(param_1 + 0x2c) & 4) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x2c) & 4)" (( "(") (binary_expression "*(uint *)(param_1 + 0x2c) & 4" (pointer_expression "*(uint *)(param_1 + 0x2c)" (* "*") (cast_expression "(uint *)(param_1 + 0x2c)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2c)" (( "(") (binary_expression "param_1 + 0x2c" (identifier "param_1") (+ "+") (number_literal "0x2c")) () ")")))) (& "&") (number_literal "4")) () ")")) (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(-1 < iVar4)" (( "(") (binary_expression "-1 < iVar4" (number_literal "-1") (< "<") (identifier "iVar4")) () ")"))) () ")")) (compound_statement "{\n        close(iVar4);\n      }" ({ "{") (expression_statement "close(iVar4);" (call_expression "close(iVar4)" (identifier "close") (argument_list "(iVar4)" (( "(") (identifier "iVar4") () ")"))) (; ";")) (} "}"))))) (expression_statement "*(int *)(param_1 + 0x1c) = iVar2;" (assignment_expression "*(int *)(param_1 + 0x1c) = iVar2" (pointer_expression "*(int *)(param_1 + 0x1c)" (* "*") (cast_expression "(int *)(param_1 + 0x1c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1c)" (( "(") (binary_expression "param_1 + 0x1c" (identifier "param_1") (+ "+") (number_literal "0x1c")) () ")")))) (= "=") (identifier "iVar2")) (; ";")) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (goto_statement "goto LAB_000181a6;" (goto "goto") (statement_identifier "LAB_000181a6") (; ";")) (} "}"))) (expression_statement "iVar4 = fchdir(iVar2);" (assignment_expression "iVar4 = fchdir(iVar2)" (identifier "iVar4") (= "=") (call_expression "fchdir(iVar2)" (identifier "fchdir") (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")")))) (; ";")) (} "}")) (else_clause "else {\nLAB_00018159:\n    iVar4 = -1;\n  }" (else "else") (compound_statement "{\nLAB_00018159:\n    iVar4 = -1;\n  }" ({ "{") (labeled_statement "LAB_00018159:\n    iVar4 = -1;" (statement_identifier "LAB_00018159") (: ":") (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" (identifier "iVar4") (= "=") (number_literal "-1")) (; ";"))) (} "}")))) (if_statement "if (local_a0 < 0) {\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    close(iVar2);\n    *piVar3 = iVar1;\n  }" (if "if") (parenthesized_expression "(local_a0 < 0)" (( "(") (binary_expression "local_a0 < 0" (identifier "local_a0") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    close(iVar2);\n    *piVar3 = iVar1;\n  }" ({ "{") (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" (identifier "piVar3") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar1 = *piVar3;" (assignment_expression "iVar1 = *piVar3" (identifier "iVar1") (= "=") (pointer_expression "*piVar3" (* "*") (identifier "piVar3"))) (; ";")) (expression_statement "close(iVar2);" (call_expression "close(iVar2)" (identifier "close") (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")"))) (; ";")) (expression_statement "*piVar3 = iVar1;" (assignment_expression "*piVar3 = iVar1" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (= "=") (identifier "iVar1")) (; ";")) (} "}"))) (labeled_statement "LAB_000181a6:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0001df30();\n  }" (statement_identifier "LAB_000181a6") (: ":") (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0001df30();\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                    \n    FUN_0001df30();\n  }" ({ "{") (expression_statement "FUN_0001df30();" (call_expression "FUN_0001df30()" (identifier "FUN_0001df30") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}")))

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

int __regparm3 function_1(type_1 *sp,type_2 *p,int var_4,char *var_2)

{
  int var_22;
  int iVar2;
  int var_8;
  int *piVar4;
  int var_9;
  type_3 flags;
  type_3 var_3;
  type_4 *var_10;
  type_4 *var_11;
  int var_1;
  bool var_12;
  bool bVar10;
  int var_15;
  type_5 var_19;
  type_6 sb;
  
  var_3 = sp->fts_options;
  var_22 = *(int *)(var_1 + 0x14);
  var_12 = false;
  bVar10 = var_2 == (char *)0x0;
  var_8 = var_4;
  var_15 = var_4;
  if (bVar10) {
LAB_000180e0:
    if ((var_3 & 4) != 0) {
LAB_00018190:
      if (((var_3 & 0x200) == 0) || (var_4 < 0)) {
        var_9 = 0;
      }
      else {
        var_9 = 0;
        var_5(var_4);
      }
      goto LAB_000181a6;
    }
    if (var_4 < 0) {
      var_19 = false;
LAB_00018287:
      flags = (var_3 & 0x800) << 7 | (var_3 & 0x10) << 0xd | 0x90900;
      if ((var_3 & 0x200) == 0) {
LAB_000181f0:
        var_8 = var_6(var_2,flags);
      }
      else {
LAB_000180b7:
        var_8 = var_7(sp->fts_cwd_fd,var_2,flags);
      }
      var_15 = var_4;
      if (var_8 < 0) {
        var_9 = -1;
        goto LAB_000181a6;
      }
    }
    else {
      var_19 = false;
    }
  }
  else {
    var_9 = 3;
    var_10 = (type_4 *)var_2;
    var_11 = &DAT_0001fb1d;
    do {
      if (var_9 == 0) break;
      var_9 = var_9 + -1;
      var_12 = *var_10 < *var_11;
      bVar10 = *var_10 == *var_11;
      var_10 = var_10 + 1;
      var_11 = var_11 + 1;
    } while (bVar10);
    if ((!var_12 && !bVar10) != var_12) goto LAB_000180e0;
    if ((var_3 & 4) != 0) goto LAB_00018190;
    if (var_4 < 0) {
      if ((var_3 & 0x200) == 0) {
        var_19 = true;
        flags = (var_3 & 0x800) << 7 | (var_3 & 0x10) << 0xd | 0x90900;
        goto LAB_000181f0;
      }
      var_19 = var_13(&sp->fts_fd_ring);
      if (!var_19) {
        var_15 = var_14(&sp->fts_fd_ring);
        if (-1 < var_15) {
          var_19 = true;
          var_8 = var_15;
          goto LAB_000180fd;
        }
        var_19 = true;
        var_3 = sp->fts_options;
        goto LAB_00018287;
      }
      flags = (var_3 & 0x10) << 0xd | (var_3 & 0x800) << 7 | 0x90900;
      goto LAB_000180b7;
    }
    var_19 = true;
  }
LAB_000180fd:
  var_9 = var_16(3,var_8,(type_7 *)&sb);
  if (var_9 == 0) {
    if ((*(int *)((int)&p->fts_statp[0].st_dev + 4) != sb.st_dev._4_4_ ||
         (int)p->fts_statp[0].st_dev != (int)sb.st_dev) ||
       (*(int *)((int)&p->fts_statp[0].st_ino + 4) != sb.st_ino._4_4_ ||
        (int)p->fts_statp[0].st_ino != (int)sb.st_ino)) {
      piVar4 = var_17();
      *piVar4 = 2;
      goto LAB_00018159;
    }
    if ((sp->fts_options & 0x200U) != 0) {
      var_9 = sp->fts_cwd_fd;
      if ((var_8 == var_9) && (var_9 != -100)) {
                    /* WARNING: Subroutine does not return */
        var_18();
      }
      if (var_19 == false) {
        var_9 = var_20(&sp->fts_fd_ring,var_9);
        if (-1 < var_9) {
          var_5(var_9);
        }
      }
      else if (((sp->fts_options & 4U) == 0) && (-1 < var_9)) {
        var_5(var_9);
      }
      sp->fts_cwd_fd = var_8;
      var_9 = 0;
      goto LAB_000181a6;
    }
    var_9 = var_21(var_8);
  }
  else {
LAB_00018159:
    var_9 = -1;
  }
  if (var_15 < 0) {
    piVar4 = var_17();
    iVar2 = *piVar4;
    var_5(var_8);
    *piVar4 = iVar2;
  }
LAB_000181a6:
  if (var_22 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_23();
  }
  return var_9;
}


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

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

int __regparm3 MASKED(int param_1,int param_2,int param_3,byte *param_4)

{
  int iVar1;
  int iVar2;
  int *piVar3;
  int iVar4;
  uint uVar5;
  uint uVar6;
  byte *pbVar7;
  byte *pbVar8;
  int in_GS_OFFSET;
  bool bVar9;
  bool bVar10;
  int local_a0;
  char local_91;
  stat64 local_80;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x17ff9;
  uVar6 = *(uint *)(param_1 + 0x2c);
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  bVar9 = false;
  bVar10 = param_4 == (byte *)0x0;
  iVar2 = param_3;
  local_a0 = param_3;
  if (bVar10) {
LAB_000180e0:
    if ((uVar6 & 4) != 0) {
LAB_00018190:
      if (((uVar6 & 0x200) == 0) || (param_3 < 0)) {
        iVar4 = 0;
      }
      else {
        iVar4 = 0;
        close(param_3);
      }
      goto LAB_000181a6;
    }
    if (param_3 < 0) {
      local_91 = '\0';
LAB_00018287:
      uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;
      if ((uVar6 & 0x200) == 0) {
LAB_000181f0:
        iVar2 = FUN_0001b7a0(param_4,uVar5);
      }
      else {
LAB_000180b7:
        iVar2 = FUN_0001ccc0(*(undefined4 *)(param_1 + 0x1c),param_4,uVar5);
      }
      local_a0 = param_3;
      if (iVar2 < 0) {
        iVar4 = -1;
        goto LAB_000181a6;
      }
    }
    else {
      local_91 = '\0';
    }
  }
  else {
    iVar4 = 3;
    pbVar7 = param_4;
    pbVar8 = &DAT_0001fb1d;
    do {
      if (iVar4 == 0) break;
      iVar4 = iVar4 + -1;
      bVar9 = *pbVar7 < *pbVar8;
      bVar10 = *pbVar7 == *pbVar8;
      pbVar7 = pbVar7 + 1;
      pbVar8 = pbVar8 + 1;
    } while (bVar10);
    if ((!bVar9 && !bVar10) != bVar9) goto LAB_000180e0;
    if ((uVar6 & 4) != 0) goto LAB_00018190;
    if (param_3 < 0) {
      if ((uVar6 & 0x200) == 0) {
        local_91 = '\x01';
        uVar5 = (uVar6 & 0x800) << 7 | (uVar6 & 0x10) << 0xd | 0x90900;
        goto LAB_000181f0;
      }
      local_91 = FUN_0001cb50(param_1 + 0x38);
      if (local_91 == '\0') {
        local_a0 = FUN_0001cba0(param_1 + 0x38);
        if (-1 < local_a0) {
          local_91 = '\x01';
          iVar2 = local_a0;
          goto LAB_000180fd;
        }
        local_91 = '\x01';
        uVar6 = *(uint *)(param_1 + 0x2c);
        goto LAB_00018287;
      }
      uVar5 = (uVar6 & 0x10) << 0xd | (uVar6 & 0x800) << 7 | 0x90900;
      goto LAB_000180b7;
    }
    local_91 = '\x01';
  }
LAB_000180fd:
  iVar4 = __fxstat64(3,iVar2,&local_80);
  if (iVar4 == 0) {
    if ((*(int *)(param_2 + 0x48) != local_80.st_dev._4_4_ ||
         *(int *)(param_2 + 0x44) != (int)local_80.st_dev) ||
       (*(int *)(param_2 + 0xa0) != local_80.st_ino._4_4_ ||
        *(int *)(param_2 + 0x9c) != (int)local_80.st_ino)) {
      piVar3 = __errno_location();
      *piVar3 = 2;
      goto LAB_00018159;
    }
    if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {
      iVar4 = *(int *)(param_1 + 0x1c);
      if ((iVar2 == iVar4) && (iVar4 != -100)) {
                    /* WARNING: Subroutine does not return */
        abort();
      }
      if (local_91 == '\0') {
        iVar4 = FUN_0001cb60(param_1 + 0x38,iVar4);
        if (-1 < iVar4) {
          close(iVar4);
        }
      }
      else if (((*(uint *)(param_1 + 0x2c) & 4) == 0) && (-1 < iVar4)) {
        close(iVar4);
      }
      *(int *)(param_1 + 0x1c) = iVar2;
      iVar4 = 0;
      goto LAB_000181a6;
    }
    iVar4 = fchdir(iVar2);
  }
  else {
LAB_00018159:
    iVar4 = -1;
  }
  if (local_a0 < 0) {
    piVar3 = __errno_location();
    iVar1 = *piVar3;
    close(iVar2);
    *piVar3 = iVar1;
  }
LAB_000181a6:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0001df30();
  }
  return iVar4;
}

