
int force_linkat(int srcdir,char *srcname,int dstdir,char *dstname,int flags,_Bool force)

{
  long lVar1;
  int iVar2;
  int iVar3;
  int *piVar4;
  char *tmpl;
  long in_FS_OFFSET;
  link_arg arg;
  char buf [256];
  
  lVar1 = *(long *)(in_FS_OFFSET + 0x28);
  iVar2 = linkat(srcdir,srcname,dstdir,dstname,flags);
  if ((force) && (iVar2 != 0)) {
    piVar4 = __errno_location();
    if (*piVar4 == 0x11) {
      tmpl = samedir_template(dstname,buf);
      if (tmpl == (char *)0x0) {
        iVar2 = -1;
      }
      else {
        arg.srcdir = srcdir;
        arg.srcname = srcname;
        arg.dstdir = dstdir;
        arg.flags = flags;
        iVar2 = try_tempname_len(tmpl,0,&arg,try_link,6);
        if (iVar2 == 0) {
          iVar3 = renameat(dstdir,tmpl,dstdir,dstname);
          if (iVar3 != 0) {
            iVar3 = *piVar4;
          }
          unlinkat(dstdir,tmpl,0);
        }
        else {
          iVar3 = *piVar4;
        }
        if (tmpl != buf) {
          free(tmpl);
        }
        iVar2 = 1;
        if (iVar3 != 0) {
          *piVar4 = iVar3;
          iVar2 = -1;
        }
      }
    }
  }
  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {
    return iVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}



int FUN_00103cfa(int param_1,char *param_2,int param_3,char *param_4,int param_5,char param_6)

{
  int iVar1;
  int iVar2;
  int *piVar3;
  char *__old;
  long in_FS_OFFSET;
  int local_168 [2];
  char *local_160;
  int local_158;
  int local_154;
  char local_148 [264];
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  iVar1 = linkat(param_1,param_2,param_3,param_4,param_5);
  if ((param_6 == '\x01') && (iVar1 != 0)) {
    piVar3 = __errno_location();
    if (*piVar3 == 0x11) {
      __old = (char *)FUN_00103c87(param_4,local_148);
      if (__old == (char *)0x0) {
        iVar1 = -1;
      }
      else {
        local_168[0] = param_1;
        local_160 = param_2;
        local_158 = param_3;
        local_154 = param_5;
        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);
        if (iVar1 == 0) {
          iVar2 = renameat(param_3,__old,param_3,param_4);
          if (iVar2 != 0) {
            iVar2 = *piVar3;
          }
          unlinkat(param_3,__old,0);
        }
        else {
          iVar2 = *piVar3;
        }
        if (__old != local_148) {
          free(__old);
        }
        iVar1 = 1;
        if (iVar2 != 0) {
          *piVar3 = iVar2;
          iVar1 = -1;
        }
      }
    }
  }
  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
    return iVar1;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}


PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x148
MOV R15D,EDI
MOV R14,RSI
MOV EBP,EDX
MOV R12,RCX
MOV R13D,R8D
MOV dword ptr [RSP + 0x8],R9D
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x138],RAX
XOR EAX,EAX
CALL 0x001023c0
MOV EBX,EAX
CMP byte ptr [RSP + 0x8],0x1
JNZ 0x00103d52
TEST EAX,EAX
JZ 0x00103d52
CALL 0x00102060
MOV qword ptr [RSP + 0x8],RAX
CMP dword ptr [RAX],0x11
JZ 0x00103d7d
MOV EAX,EBX
MOV RCX,qword ptr [RSP + 0x138]
XOR RCX,qword ptr FS:[0x28]
JNZ 0x00103e3f
ADD RSP,0x148
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
LEA RSI,[RSP + 0x30]
MOV RDI,R12
CALL 0x00103c87
MOV RBX,RAX
TEST RAX,RAX
JZ 0x00103e35
MOV dword ptr [RSP + 0x10],R15D
MOV qword ptr [RSP + 0x18],R14
MOV dword ptr [RSP + 0x20],EBP
MOV dword ptr [RSP + 0x24],R13D
LEA RDX,[RSP + 0x10]
MOV R8D,0x6
LEA RCX,[0x103c66]
MOV ESI,0x0
MOV RDI,RAX
CALL 0x00108507
TEST EAX,EAX
JZ 0x00103e06
MOV RAX,qword ptr [RSP + 0x8]
MOV R12D,dword ptr [RAX]
LEA RAX,[RSP + 0x30]
CMP RBX,RAX
JZ 0x00103de6
MOV RDI,RBX
CALL 0x00102040
MOV EBX,0x1
TEST R12D,R12D
JZ 0x00103d52
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RAX],R12D
MOV EBX,0xffffffff
JMP 0x00103d52
MOV RCX,R12
MOV EDX,EBP
MOV RSI,RBX
MOV EDI,EBP
CALL 0x001024a0
MOV R12D,EAX
TEST EAX,EAX
JZ 0x00103e24
MOV RAX,qword ptr [RSP + 0x8]
MOV R12D,dword ptr [RAX]
MOV EDX,0x0
MOV RSI,RBX
MOV EDI,EBP
CALL 0x001020c0
JMP 0x00103dd4
MOV EBX,0xffffffff
JMP 0x00103d52
CALL 0x00102190
(translation_unit "int FUN_00103cfa(int param_1,char *param_2,int param_3,char *param_4,int param_5,char param_6)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  char *__old;\n  long in_FS_OFFSET;\n  int local_168 [2];\n  char *local_160;\n  int local_158;\n  int local_154;\n  char local_148 [264];\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar1 = linkat(param_1,param_2,param_3,param_4,param_5);\n  if ((param_6 == '\x01') && (iVar1 != 0)) {\n    piVar3 = __errno_location();\n    if (*piVar3 == 0x11) {\n      __old = (char *)FUN_00103c87(param_4,local_148);\n      if (__old == (char *)0x0) {\n        iVar1 = -1;\n      }\n      else {\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }\n    }\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "int FUN_00103cfa(int param_1,char *param_2,int param_3,char *param_4,int param_5,char param_6)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  char *__old;\n  long in_FS_OFFSET;\n  int local_168 [2];\n  char *local_160;\n  int local_158;\n  int local_154;\n  char local_148 [264];\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar1 = linkat(param_1,param_2,param_3,param_4,param_5);\n  if ((param_6 == '\x01') && (iVar1 != 0)) {\n    piVar3 = __errno_location();\n    if (*piVar3 == 0x11) {\n      __old = (char *)FUN_00103c87(param_4,local_148);\n      if (__old == (char *)0x0) {\n        iVar1 = -1;\n      }\n      else {\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }\n    }\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" primitive_type (function_declarator "FUN_00103cfa(int param_1,char *param_2,int param_3,char *param_4,int param_5,char param_6)" identifier (parameter_list "(int param_1,char *param_2,int param_3,char *param_4,int param_5,char param_6)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "char *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "int param_5" primitive_type identifier) , (parameter_declaration "char param_6" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  char *__old;\n  long in_FS_OFFSET;\n  int local_168 [2];\n  char *local_160;\n  int local_158;\n  int local_154;\n  char local_148 [264];\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar1 = linkat(param_1,param_2,param_3,param_4,param_5);\n  if ((param_6 == '\x01') && (iVar1 != 0)) {\n    piVar3 = __errno_location();\n    if (*piVar3 == 0x11) {\n      __old = (char *)FUN_00103c87(param_4,local_148);\n      if (__old == (char *)0x0) {\n        iVar1 = -1;\n      }\n      else {\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }\n    }\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "char *__old;" primitive_type (pointer_declarator "*__old" * identifier) ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "int local_168 [2];" primitive_type (array_declarator "local_168 [2]" identifier [ number_literal ]) ;) (declaration "char *local_160;" primitive_type (pointer_declarator "*local_160" * identifier) ;) (declaration "int local_158;" primitive_type identifier ;) (declaration "int local_154;" primitive_type identifier ;) (declaration "char local_148 [264];" primitive_type (array_declarator "local_148 [264]" identifier [ number_literal ]) ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = linkat(param_1,param_2,param_3,param_4,param_5);" (assignment_expression "iVar1 = linkat(param_1,param_2,param_3,param_4,param_5)" identifier = (call_expression "linkat(param_1,param_2,param_3,param_4,param_5)" identifier (argument_list "(param_1,param_2,param_3,param_4,param_5)" ( identifier , identifier , identifier , identifier , identifier )))) ;) (if_statement "if ((param_6 == '\x01') && (iVar1 != 0)) {\n    piVar3 = __errno_location();\n    if (*piVar3 == 0x11) {\n      __old = (char *)FUN_00103c87(param_4,local_148);\n      if (__old == (char *)0x0) {\n        iVar1 = -1;\n      }\n      else {\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }\n    }\n  }" if (parenthesized_expression "((param_6 == '\x01') && (iVar1 != 0))" ( (binary_expression "(param_6 == '\x01') && (iVar1 != 0)" (parenthesized_expression "(param_6 == '\x01')" ( (binary_expression "param_6 == '\x01'" identifier == (char_literal "'\x01'" ' escape_sequence ')) )) && (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) ))) )) (compound_statement "{\n    piVar3 = __errno_location();\n    if (*piVar3 == 0x11) {\n      __old = (char *)FUN_00103c87(param_4,local_148);\n      if (__old == (char *)0x0) {\n        iVar1 = -1;\n      }\n      else {\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }\n    }\n  }" { (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*piVar3 == 0x11) {\n      __old = (char *)FUN_00103c87(param_4,local_148);\n      if (__old == (char *)0x0) {\n        iVar1 = -1;\n      }\n      else {\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }\n    }" if (parenthesized_expression "(*piVar3 == 0x11)" ( (binary_expression "*piVar3 == 0x11" (pointer_expression "*piVar3" * identifier) == number_literal) )) (compound_statement "{\n      __old = (char *)FUN_00103c87(param_4,local_148);\n      if (__old == (char *)0x0) {\n        iVar1 = -1;\n      }\n      else {\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }\n    }" { (expression_statement "__old = (char *)FUN_00103c87(param_4,local_148);" (assignment_expression "__old = (char *)FUN_00103c87(param_4,local_148)" identifier = (cast_expression "(char *)FUN_00103c87(param_4,local_148)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00103c87(param_4,local_148)" identifier (argument_list "(param_4,local_148)" ( identifier , identifier ))))) ;) (if_statement "if (__old == (char *)0x0) {\n        iVar1 = -1;\n      }\n      else {\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }" if (parenthesized_expression "(__old == (char *)0x0)" ( (binary_expression "__old == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        iVar1 = -1;\n      }" { (expression_statement "iVar1 = -1;" (assignment_expression "iVar1 = -1" identifier = number_literal) ;) }) (else_clause "else {\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }" else (compound_statement "{\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }" { (expression_statement "local_168[0] = param_1;" (assignment_expression "local_168[0] = param_1" (subscript_expression "local_168[0]" identifier [ number_literal ]) = identifier) ;) (expression_statement "local_160 = param_2;" (assignment_expression "local_160 = param_2" identifier = identifier) ;) (expression_statement "local_158 = param_3;" (assignment_expression "local_158 = param_3" identifier = identifier) ;) (expression_statement "local_154 = param_5;" (assignment_expression "local_154 = param_5" identifier = identifier) ;) (expression_statement "iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);" (assignment_expression "iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6)" identifier = (call_expression "FUN_00108507(__old,0,local_168,FUN_00103c66,6)" identifier (argument_list "(__old,0,local_168,FUN_00103c66,6)" ( identifier , number_literal , identifier , identifier , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }" { (expression_statement "iVar2 = renameat(param_3,__old,param_3,param_4);" (assignment_expression "iVar2 = renameat(param_3,__old,param_3,param_4)" identifier = (call_expression "renameat(param_3,__old,param_3,param_4)" identifier (argument_list "(param_3,__old,param_3,param_4)" ( identifier , identifier , identifier , identifier )))) ;) (if_statement "if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n            iVar2 = *piVar3;\n          }" { (expression_statement "iVar2 = *piVar3;" (assignment_expression "iVar2 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) })) (expression_statement "unlinkat(param_3,__old,0);" (call_expression "unlinkat(param_3,__old,0)" identifier (argument_list "(param_3,__old,0)" ( identifier , identifier , number_literal ))) ;) }) (else_clause "else {\n          iVar2 = *piVar3;\n        }" else (compound_statement "{\n          iVar2 = *piVar3;\n        }" { (expression_statement "iVar2 = *piVar3;" (assignment_expression "iVar2 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) }))) (if_statement "if (__old != local_148) {\n          free(__old);\n        }" if (parenthesized_expression "(__old != local_148)" ( (binary_expression "__old != local_148" identifier != identifier) )) (compound_statement "{\n          free(__old);\n        }" { (expression_statement "free(__old);" (call_expression "free(__old)" identifier (argument_list "(__old)" ( identifier ))) ;) })) (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) (if_statement "if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }" { (expression_statement "*piVar3 = iVar2;" (assignment_expression "*piVar3 = iVar2" (pointer_expression "*piVar3" * identifier) = identifier) ;) (expression_statement "iVar1 = -1;" (assignment_expression "iVar1 = -1" identifier = number_literal) ;) })) }))) })) })) (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }" if (parenthesized_expression "(local_40 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar1;\n  }" { (return_statement "return iVar1;" return identifier ;) })) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int force_linkat(int srcdir,char *srcname,int dstdir,char *dstname,int flags,_Bool force)\n\n{\n  long lVar1;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  char *tmpl;\n  long in_FS_OFFSET;\n  link_arg arg;\n  char buf [256];\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar2 = linkat(srcdir,srcname,dstdir,dstname,flags);\n  if ((force) && (iVar2 != 0)) {\n    piVar4 = __errno_location();\n    if (*piVar4 == 0x11) {\n      tmpl = samedir_template(dstname,buf);\n      if (tmpl == (char *)0x0) {\n        iVar2 = -1;\n      }\n      else {\n        arg.srcdir = srcdir;\n        arg.srcname = srcname;\n        arg.dstdir = dstdir;\n        arg.flags = flags;\n        iVar2 = try_tempname_len(tmpl,0,&arg,try_link,6);\n        if (iVar2 == 0) {\n          iVar3 = renameat(dstdir,tmpl,dstdir,dstname);\n          if (iVar3 != 0) {\n            iVar3 = *piVar4;\n          }\n          unlinkat(dstdir,tmpl,0);\n        }\n        else {\n          iVar3 = *piVar4;\n        }\n        if (tmpl != buf) {\n          free(tmpl);\n        }\n        iVar2 = 1;\n        if (iVar3 != 0) {\n          *piVar4 = iVar3;\n          iVar2 = -1;\n        }\n      }\n    }\n  }\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "int force_linkat(int srcdir,char *srcname,int dstdir,char *dstname,int flags,_Bool force)\n\n{\n  long lVar1;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  char *tmpl;\n  long in_FS_OFFSET;\n  link_arg arg;\n  char buf [256];\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar2 = linkat(srcdir,srcname,dstdir,dstname,flags);\n  if ((force) && (iVar2 != 0)) {\n    piVar4 = __errno_location();\n    if (*piVar4 == 0x11) {\n      tmpl = samedir_template(dstname,buf);\n      if (tmpl == (char *)0x0) {\n        iVar2 = -1;\n      }\n      else {\n        arg.srcdir = srcdir;\n        arg.srcname = srcname;\n        arg.dstdir = dstdir;\n        arg.flags = flags;\n        iVar2 = try_tempname_len(tmpl,0,&arg,try_link,6);\n        if (iVar2 == 0) {\n          iVar3 = renameat(dstdir,tmpl,dstdir,dstname);\n          if (iVar3 != 0) {\n            iVar3 = *piVar4;\n          }\n          unlinkat(dstdir,tmpl,0);\n        }\n        else {\n          iVar3 = *piVar4;\n        }\n        if (tmpl != buf) {\n          free(tmpl);\n        }\n        iVar2 = 1;\n        if (iVar3 != 0) {\n          *piVar4 = iVar3;\n          iVar2 = -1;\n        }\n      }\n    }\n  }\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" primitive_type (function_declarator "force_linkat(int srcdir,char *srcname,int dstdir,char *dstname,int flags,_Bool force)" identifier (parameter_list "(int srcdir,char *srcname,int dstdir,char *dstname,int flags,_Bool force)" ( (parameter_declaration "int srcdir" primitive_type identifier) , (parameter_declaration "char *srcname" primitive_type (pointer_declarator "*srcname" * identifier)) , (parameter_declaration "int dstdir" primitive_type identifier) , (parameter_declaration "char *dstname" primitive_type (pointer_declarator "*dstname" * identifier)) , (parameter_declaration "int flags" primitive_type identifier) , (parameter_declaration "_Bool force" type_identifier identifier) ))) (compound_statement "{\n  long lVar1;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  char *tmpl;\n  long in_FS_OFFSET;\n  link_arg arg;\n  char buf [256];\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar2 = linkat(srcdir,srcname,dstdir,dstname,flags);\n  if ((force) && (iVar2 != 0)) {\n    piVar4 = __errno_location();\n    if (*piVar4 == 0x11) {\n      tmpl = samedir_template(dstname,buf);\n      if (tmpl == (char *)0x0) {\n        iVar2 = -1;\n      }\n      else {\n        arg.srcdir = srcdir;\n        arg.srcname = srcname;\n        arg.dstdir = dstdir;\n        arg.flags = flags;\n        iVar2 = try_tempname_len(tmpl,0,&arg,try_link,6);\n        if (iVar2 == 0) {\n          iVar3 = renameat(dstdir,tmpl,dstdir,dstname);\n          if (iVar3 != 0) {\n            iVar3 = *piVar4;\n          }\n          unlinkat(dstdir,tmpl,0);\n        }\n        else {\n          iVar3 = *piVar4;\n        }\n        if (tmpl != buf) {\n          free(tmpl);\n        }\n        iVar2 = 1;\n        if (iVar3 != 0) {\n          *piVar4 = iVar3;\n          iVar2 = -1;\n        }\n      }\n    }\n  }\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "char *tmpl;" primitive_type (pointer_declarator "*tmpl" * identifier) ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "link_arg arg;" type_identifier identifier ;) (declaration "char buf [256];" primitive_type (array_declarator "buf [256]" identifier [ number_literal ]) ;) (expression_statement "lVar1 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "lVar1 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = linkat(srcdir,srcname,dstdir,dstname,flags);" (assignment_expression "iVar2 = linkat(srcdir,srcname,dstdir,dstname,flags)" identifier = (call_expression "linkat(srcdir,srcname,dstdir,dstname,flags)" identifier (argument_list "(srcdir,srcname,dstdir,dstname,flags)" ( identifier , identifier , identifier , identifier , identifier )))) ;) (if_statement "if ((force) && (iVar2 != 0)) {\n    piVar4 = __errno_location();\n    if (*piVar4 == 0x11) {\n      tmpl = samedir_template(dstname,buf);\n      if (tmpl == (char *)0x0) {\n        iVar2 = -1;\n      }\n      else {\n        arg.srcdir = srcdir;\n        arg.srcname = srcname;\n        arg.dstdir = dstdir;\n        arg.flags = flags;\n        iVar2 = try_tempname_len(tmpl,0,&arg,try_link,6);\n        if (iVar2 == 0) {\n          iVar3 = renameat(dstdir,tmpl,dstdir,dstname);\n          if (iVar3 != 0) {\n            iVar3 = *piVar4;\n          }\n          unlinkat(dstdir,tmpl,0);\n        }\n        else {\n          iVar3 = *piVar4;\n        }\n        if (tmpl != buf) {\n          free(tmpl);\n        }\n        iVar2 = 1;\n        if (iVar3 != 0) {\n          *piVar4 = iVar3;\n          iVar2 = -1;\n        }\n      }\n    }\n  }" if (parenthesized_expression "((force) && (iVar2 != 0))" ( (binary_expression "(force) && (iVar2 != 0)" (parenthesized_expression "(force)" ( identifier )) && (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) ))) )) (compound_statement "{\n    piVar4 = __errno_location();\n    if (*piVar4 == 0x11) {\n      tmpl = samedir_template(dstname,buf);\n      if (tmpl == (char *)0x0) {\n        iVar2 = -1;\n      }\n      else {\n        arg.srcdir = srcdir;\n        arg.srcname = srcname;\n        arg.dstdir = dstdir;\n        arg.flags = flags;\n        iVar2 = try_tempname_len(tmpl,0,&arg,try_link,6);\n        if (iVar2 == 0) {\n          iVar3 = renameat(dstdir,tmpl,dstdir,dstname);\n          if (iVar3 != 0) {\n            iVar3 = *piVar4;\n          }\n          unlinkat(dstdir,tmpl,0);\n        }\n        else {\n          iVar3 = *piVar4;\n        }\n        if (tmpl != buf) {\n          free(tmpl);\n        }\n        iVar2 = 1;\n        if (iVar3 != 0) {\n          *piVar4 = iVar3;\n          iVar2 = -1;\n        }\n      }\n    }\n  }" { (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*piVar4 == 0x11) {\n      tmpl = samedir_template(dstname,buf);\n      if (tmpl == (char *)0x0) {\n        iVar2 = -1;\n      }\n      else {\n        arg.srcdir = srcdir;\n        arg.srcname = srcname;\n        arg.dstdir = dstdir;\n        arg.flags = flags;\n        iVar2 = try_tempname_len(tmpl,0,&arg,try_link,6);\n        if (iVar2 == 0) {\n          iVar3 = renameat(dstdir,tmpl,dstdir,dstname);\n          if (iVar3 != 0) {\n            iVar3 = *piVar4;\n          }\n          unlinkat(dstdir,tmpl,0);\n        }\n        else {\n          iVar3 = *piVar4;\n        }\n        if (tmpl != buf) {\n          free(tmpl);\n        }\n        iVar2 = 1;\n        if (iVar3 != 0) {\n          *piVar4 = iVar3;\n          iVar2 = -1;\n        }\n      }\n    }" if (parenthesized_expression "(*piVar4 == 0x11)" ( (binary_expression "*piVar4 == 0x11" (pointer_expression "*piVar4" * identifier) == number_literal) )) (compound_statement "{\n      tmpl = samedir_template(dstname,buf);\n      if (tmpl == (char *)0x0) {\n        iVar2 = -1;\n      }\n      else {\n        arg.srcdir = srcdir;\n        arg.srcname = srcname;\n        arg.dstdir = dstdir;\n        arg.flags = flags;\n        iVar2 = try_tempname_len(tmpl,0,&arg,try_link,6);\n        if (iVar2 == 0) {\n          iVar3 = renameat(dstdir,tmpl,dstdir,dstname);\n          if (iVar3 != 0) {\n            iVar3 = *piVar4;\n          }\n          unlinkat(dstdir,tmpl,0);\n        }\n        else {\n          iVar3 = *piVar4;\n        }\n        if (tmpl != buf) {\n          free(tmpl);\n        }\n        iVar2 = 1;\n        if (iVar3 != 0) {\n          *piVar4 = iVar3;\n          iVar2 = -1;\n        }\n      }\n    }" { (expression_statement "tmpl = samedir_template(dstname,buf);" (assignment_expression "tmpl = samedir_template(dstname,buf)" identifier = (call_expression "samedir_template(dstname,buf)" identifier (argument_list "(dstname,buf)" ( identifier , identifier )))) ;) (if_statement "if (tmpl == (char *)0x0) {\n        iVar2 = -1;\n      }\n      else {\n        arg.srcdir = srcdir;\n        arg.srcname = srcname;\n        arg.dstdir = dstdir;\n        arg.flags = flags;\n        iVar2 = try_tempname_len(tmpl,0,&arg,try_link,6);\n        if (iVar2 == 0) {\n          iVar3 = renameat(dstdir,tmpl,dstdir,dstname);\n          if (iVar3 != 0) {\n            iVar3 = *piVar4;\n          }\n          unlinkat(dstdir,tmpl,0);\n        }\n        else {\n          iVar3 = *piVar4;\n        }\n        if (tmpl != buf) {\n          free(tmpl);\n        }\n        iVar2 = 1;\n        if (iVar3 != 0) {\n          *piVar4 = iVar3;\n          iVar2 = -1;\n        }\n      }" if (parenthesized_expression "(tmpl == (char *)0x0)" ( (binary_expression "tmpl == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        iVar2 = -1;\n      }" { (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;) }) (else_clause "else {\n        arg.srcdir = srcdir;\n        arg.srcname = srcname;\n        arg.dstdir = dstdir;\n        arg.flags = flags;\n        iVar2 = try_tempname_len(tmpl,0,&arg,try_link,6);\n        if (iVar2 == 0) {\n          iVar3 = renameat(dstdir,tmpl,dstdir,dstname);\n          if (iVar3 != 0) {\n            iVar3 = *piVar4;\n          }\n          unlinkat(dstdir,tmpl,0);\n        }\n        else {\n          iVar3 = *piVar4;\n        }\n        if (tmpl != buf) {\n          free(tmpl);\n        }\n        iVar2 = 1;\n        if (iVar3 != 0) {\n          *piVar4 = iVar3;\n          iVar2 = -1;\n        }\n      }" else (compound_statement "{\n        arg.srcdir = srcdir;\n        arg.srcname = srcname;\n        arg.dstdir = dstdir;\n        arg.flags = flags;\n        iVar2 = try_tempname_len(tmpl,0,&arg,try_link,6);\n        if (iVar2 == 0) {\n          iVar3 = renameat(dstdir,tmpl,dstdir,dstname);\n          if (iVar3 != 0) {\n            iVar3 = *piVar4;\n          }\n          unlinkat(dstdir,tmpl,0);\n        }\n        else {\n          iVar3 = *piVar4;\n        }\n        if (tmpl != buf) {\n          free(tmpl);\n        }\n        iVar2 = 1;\n        if (iVar3 != 0) {\n          *piVar4 = iVar3;\n          iVar2 = -1;\n        }\n      }" { (expression_statement "arg.srcdir = srcdir;" (assignment_expression "arg.srcdir = srcdir" (field_expression "arg.srcdir" identifier . field_identifier) = identifier) ;) (expression_statement "arg.srcname = srcname;" (assignment_expression "arg.srcname = srcname" (field_expression "arg.srcname" identifier . field_identifier) = identifier) ;) (expression_statement "arg.dstdir = dstdir;" (assignment_expression "arg.dstdir = dstdir" (field_expression "arg.dstdir" identifier . field_identifier) = identifier) ;) (expression_statement "arg.flags = flags;" (assignment_expression "arg.flags = flags" (field_expression "arg.flags" identifier . field_identifier) = identifier) ;) (expression_statement "iVar2 = try_tempname_len(tmpl,0,&arg,try_link,6);" (assignment_expression "iVar2 = try_tempname_len(tmpl,0,&arg,try_link,6)" identifier = (call_expression "try_tempname_len(tmpl,0,&arg,try_link,6)" identifier (argument_list "(tmpl,0,&arg,try_link,6)" ( identifier , number_literal , (pointer_expression "&arg" & identifier) , identifier , number_literal )))) ;) (if_statement "if (iVar2 == 0) {\n          iVar3 = renameat(dstdir,tmpl,dstdir,dstname);\n          if (iVar3 != 0) {\n            iVar3 = *piVar4;\n          }\n          unlinkat(dstdir,tmpl,0);\n        }\n        else {\n          iVar3 = *piVar4;\n        }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n          iVar3 = renameat(dstdir,tmpl,dstdir,dstname);\n          if (iVar3 != 0) {\n            iVar3 = *piVar4;\n          }\n          unlinkat(dstdir,tmpl,0);\n        }" { (expression_statement "iVar3 = renameat(dstdir,tmpl,dstdir,dstname);" (assignment_expression "iVar3 = renameat(dstdir,tmpl,dstdir,dstname)" identifier = (call_expression "renameat(dstdir,tmpl,dstdir,dstname)" identifier (argument_list "(dstdir,tmpl,dstdir,dstname)" ( identifier , identifier , identifier , identifier )))) ;) (if_statement "if (iVar3 != 0) {\n            iVar3 = *piVar4;\n          }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n            iVar3 = *piVar4;\n          }" { (expression_statement "iVar3 = *piVar4;" (assignment_expression "iVar3 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) })) (expression_statement "unlinkat(dstdir,tmpl,0);" (call_expression "unlinkat(dstdir,tmpl,0)" identifier (argument_list "(dstdir,tmpl,0)" ( identifier , identifier , number_literal ))) ;) }) (else_clause "else {\n          iVar3 = *piVar4;\n        }" else (compound_statement "{\n          iVar3 = *piVar4;\n        }" { (expression_statement "iVar3 = *piVar4;" (assignment_expression "iVar3 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) }))) (if_statement "if (tmpl != buf) {\n          free(tmpl);\n        }" if (parenthesized_expression "(tmpl != buf)" ( (binary_expression "tmpl != buf" identifier != identifier) )) (compound_statement "{\n          free(tmpl);\n        }" { (expression_statement "free(tmpl);" (call_expression "free(tmpl)" identifier (argument_list "(tmpl)" ( identifier ))) ;) })) (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) (if_statement "if (iVar3 != 0) {\n          *piVar4 = iVar3;\n          iVar2 = -1;\n        }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n          *piVar4 = iVar3;\n          iVar2 = -1;\n        }" { (expression_statement "*piVar4 = iVar3;" (assignment_expression "*piVar4 = iVar3" (pointer_expression "*piVar4" * identifier) = identifier) ;) (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;) })) }))) })) })) (if_statement "if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar2;\n  }" if (parenthesized_expression "(lVar1 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "lVar1 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar2;\n  }" { (return_statement "return iVar2;" return identifier ;) })) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int FUN_00103cfa(int param_1,char *param_2,int param_3,char *param_4,int param_5,char param_6)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  char *__old;\n  long in_FS_OFFSET;\n  int local_168 [2];\n  char *local_160;\n  int local_158;\n  int local_154;\n  char local_148 [264];\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar1 = linkat(param_1,param_2,param_3,param_4,param_5);\n  if ((param_6 == '\x01') && (iVar1 != 0)) {\n    piVar3 = __errno_location();\n    if (*piVar3 == 0x11) {\n      __old = (char *)FUN_00103c87(param_4,local_148);\n      if (__old == (char *)0x0) {\n        iVar1 = -1;\n      }\n      else {\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }\n    }\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    \n  __stack_chk_fail();\n}\n\n" (function_definition "int FUN_00103cfa(int param_1,char *param_2,int param_3,char *param_4,int param_5,char param_6)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  char *__old;\n  long in_FS_OFFSET;\n  int local_168 [2];\n  char *local_160;\n  int local_158;\n  int local_154;\n  char local_148 [264];\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar1 = linkat(param_1,param_2,param_3,param_4,param_5);\n  if ((param_6 == '\x01') && (iVar1 != 0)) {\n    piVar3 = __errno_location();\n    if (*piVar3 == 0x11) {\n      __old = (char *)FUN_00103c87(param_4,local_148);\n      if (__old == (char *)0x0) {\n        iVar1 = -1;\n      }\n      else {\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }\n    }\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    \n  __stack_chk_fail();\n}" primitive_type (function_declarator "FUN_00103cfa(int param_1,char *param_2,int param_3,char *param_4,int param_5,char param_6)" identifier (parameter_list "(int param_1,char *param_2,int param_3,char *param_4,int param_5,char param_6)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "char *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "int param_5" primitive_type identifier) , (parameter_declaration "char param_6" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  char *__old;\n  long in_FS_OFFSET;\n  int local_168 [2];\n  char *local_160;\n  int local_158;\n  int local_154;\n  char local_148 [264];\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar1 = linkat(param_1,param_2,param_3,param_4,param_5);\n  if ((param_6 == '\x01') && (iVar1 != 0)) {\n    piVar3 = __errno_location();\n    if (*piVar3 == 0x11) {\n      __old = (char *)FUN_00103c87(param_4,local_148);\n      if (__old == (char *)0x0) {\n        iVar1 = -1;\n      }\n      else {\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }\n    }\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    \n  __stack_chk_fail();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "char *__old;" primitive_type (pointer_declarator "*__old" * identifier) ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "int local_168 [2];" primitive_type (array_declarator "local_168 [2]" identifier [ number_literal ]) ;) (declaration "char *local_160;" primitive_type (pointer_declarator "*local_160" * identifier) ;) (declaration "int local_158;" primitive_type identifier ;) (declaration "int local_154;" primitive_type identifier ;) (declaration "char local_148 [264];" primitive_type (array_declarator "local_148 [264]" identifier [ number_literal ]) ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = linkat(param_1,param_2,param_3,param_4,param_5);" (assignment_expression "iVar1 = linkat(param_1,param_2,param_3,param_4,param_5)" identifier = (call_expression "linkat(param_1,param_2,param_3,param_4,param_5)" identifier (argument_list "(param_1,param_2,param_3,param_4,param_5)" ( identifier , identifier , identifier , identifier , identifier )))) ;) (if_statement "if ((param_6 == '\x01') && (iVar1 != 0)) {\n    piVar3 = __errno_location();\n    if (*piVar3 == 0x11) {\n      __old = (char *)FUN_00103c87(param_4,local_148);\n      if (__old == (char *)0x0) {\n        iVar1 = -1;\n      }\n      else {\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }\n    }\n  }" if (parenthesized_expression "((param_6 == '\x01') && (iVar1 != 0))" ( (binary_expression "(param_6 == '\x01') && (iVar1 != 0)" (parenthesized_expression "(param_6 == '\x01')" ( (binary_expression "param_6 == '\x01'" identifier == (char_literal "'\x01'" ' escape_sequence ')) )) && (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) ))) )) (compound_statement "{\n    piVar3 = __errno_location();\n    if (*piVar3 == 0x11) {\n      __old = (char *)FUN_00103c87(param_4,local_148);\n      if (__old == (char *)0x0) {\n        iVar1 = -1;\n      }\n      else {\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }\n    }\n  }" { (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*piVar3 == 0x11) {\n      __old = (char *)FUN_00103c87(param_4,local_148);\n      if (__old == (char *)0x0) {\n        iVar1 = -1;\n      }\n      else {\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }\n    }" if (parenthesized_expression "(*piVar3 == 0x11)" ( (binary_expression "*piVar3 == 0x11" (pointer_expression "*piVar3" * identifier) == number_literal) )) (compound_statement "{\n      __old = (char *)FUN_00103c87(param_4,local_148);\n      if (__old == (char *)0x0) {\n        iVar1 = -1;\n      }\n      else {\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }\n    }" { (expression_statement "__old = (char *)FUN_00103c87(param_4,local_148);" (assignment_expression "__old = (char *)FUN_00103c87(param_4,local_148)" identifier = (cast_expression "(char *)FUN_00103c87(param_4,local_148)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00103c87(param_4,local_148)" identifier (argument_list "(param_4,local_148)" ( identifier , identifier ))))) ;) (if_statement "if (__old == (char *)0x0) {\n        iVar1 = -1;\n      }\n      else {\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }" if (parenthesized_expression "(__old == (char *)0x0)" ( (binary_expression "__old == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        iVar1 = -1;\n      }" { (expression_statement "iVar1 = -1;" (assignment_expression "iVar1 = -1" identifier = number_literal) ;) }) (else_clause "else {\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }" else (compound_statement "{\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }" { (expression_statement "local_168[0] = param_1;" (assignment_expression "local_168[0] = param_1" (subscript_expression "local_168[0]" identifier [ number_literal ]) = identifier) ;) (expression_statement "local_160 = param_2;" (assignment_expression "local_160 = param_2" identifier = identifier) ;) (expression_statement "local_158 = param_3;" (assignment_expression "local_158 = param_3" identifier = identifier) ;) (expression_statement "local_154 = param_5;" (assignment_expression "local_154 = param_5" identifier = identifier) ;) (expression_statement "iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);" (assignment_expression "iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6)" identifier = (call_expression "FUN_00108507(__old,0,local_168,FUN_00103c66,6)" identifier (argument_list "(__old,0,local_168,FUN_00103c66,6)" ( identifier , number_literal , identifier , identifier , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }" { (expression_statement "iVar2 = renameat(param_3,__old,param_3,param_4);" (assignment_expression "iVar2 = renameat(param_3,__old,param_3,param_4)" identifier = (call_expression "renameat(param_3,__old,param_3,param_4)" identifier (argument_list "(param_3,__old,param_3,param_4)" ( identifier , identifier , identifier , identifier )))) ;) (if_statement "if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n            iVar2 = *piVar3;\n          }" { (expression_statement "iVar2 = *piVar3;" (assignment_expression "iVar2 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) })) (expression_statement "unlinkat(param_3,__old,0);" (call_expression "unlinkat(param_3,__old,0)" identifier (argument_list "(param_3,__old,0)" ( identifier , identifier , number_literal ))) ;) }) (else_clause "else {\n          iVar2 = *piVar3;\n        }" else (compound_statement "{\n          iVar2 = *piVar3;\n        }" { (expression_statement "iVar2 = *piVar3;" (assignment_expression "iVar2 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) }))) (if_statement "if (__old != local_148) {\n          free(__old);\n        }" if (parenthesized_expression "(__old != local_148)" ( (binary_expression "__old != local_148" identifier != identifier) )) (compound_statement "{\n          free(__old);\n        }" { (expression_statement "free(__old);" (call_expression "free(__old)" identifier (argument_list "(__old)" ( identifier ))) ;) })) (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) (if_statement "if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }" { (expression_statement "*piVar3 = iVar2;" (assignment_expression "*piVar3 = iVar2" (pointer_expression "*piVar3" * identifier) = identifier) ;) (expression_statement "iVar1 = -1;" (assignment_expression "iVar1 = -1" identifier = number_literal) ;) })) }))) })) })) (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }" if (parenthesized_expression "(local_40 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar1;\n  }" { (return_statement "return iVar1;" return identifier ;) })) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , IDENT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , IDENT , IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT ))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) })) }))) })) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "int FUN_00103cfa(int param_1,char *param_2,int param_3,char *param_4,int param_5,char param_6)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  char *__old;\n  long in_FS_OFFSET;\n  int local_168 [2];\n  char *local_160;\n  int local_158;\n  int local_154;\n  char local_148 [264];\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar1 = linkat(param_1,param_2,param_3,param_4,param_5);\n  if ((param_6 == '\x01') && (iVar1 != 0)) {\n    piVar3 = __errno_location();\n    if (*piVar3 == 0x11) {\n      __old = (char *)FUN_00103c87(param_4,local_148);\n      if (__old == (char *)0x0) {\n        iVar1 = -1;\n      }\n      else {\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }\n    }\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    \n  __stack_chk_fail();\n}" (primitive_type "int") (function_declarator "FUN_00103cfa(int param_1,char *param_2,int param_3,char *param_4,int param_5,char param_6)" (identifier "FUN_00103cfa") (parameter_list "(int param_1,char *param_2,int param_3,char *param_4,int param_5,char param_6)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "char *param_4" (primitive_type "char") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "int param_5" (primitive_type "int") (identifier "param_5")) (, ",") (parameter_declaration "char param_6" (primitive_type "char") (identifier "param_6")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  char *__old;\n  long in_FS_OFFSET;\n  int local_168 [2];\n  char *local_160;\n  int local_158;\n  int local_154;\n  char local_148 [264];\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar1 = linkat(param_1,param_2,param_3,param_4,param_5);\n  if ((param_6 == '\x01') && (iVar1 != 0)) {\n    piVar3 = __errno_location();\n    if (*piVar3 == 0x11) {\n      __old = (char *)FUN_00103c87(param_4,local_148);\n      if (__old == (char *)0x0) {\n        iVar1 = -1;\n      }\n      else {\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }\n    }\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    \n  __stack_chk_fail();\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 "char *__old;" (primitive_type "char") (pointer_declarator "*__old" (* "*") (identifier "__old")) (; ";")) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" (long "long")) (identifier "in_FS_OFFSET") (; ";")) (declaration "int local_168 [2];" (primitive_type "int") (array_declarator "local_168 [2]" (identifier "local_168") ([ "[") (number_literal "2") (] "]")) (; ";")) (declaration "char *local_160;" (primitive_type "char") (pointer_declarator "*local_160" (* "*") (identifier "local_160")) (; ";")) (declaration "int local_158;" (primitive_type "int") (identifier "local_158") (; ";")) (declaration "int local_154;" (primitive_type "int") (identifier "local_154") (; ";")) (declaration "char local_148 [264];" (primitive_type "char") (array_declarator "local_148 [264]" (identifier "local_148") ([ "[") (number_literal "264") (] "]")) (; ";")) (declaration "long local_40;" (sized_type_specifier "long" (long "long")) (identifier "local_40") (; ";")) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_40") (= "=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (expression_statement "iVar1 = linkat(param_1,param_2,param_3,param_4,param_5);" (assignment_expression "iVar1 = linkat(param_1,param_2,param_3,param_4,param_5)" (identifier "iVar1") (= "=") (call_expression "linkat(param_1,param_2,param_3,param_4,param_5)" (identifier "linkat") (argument_list "(param_1,param_2,param_3,param_4,param_5)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") (, ",") (identifier "param_4") (, ",") (identifier "param_5") () ")")))) (; ";")) (if_statement "if ((param_6 == '\x01') && (iVar1 != 0)) {\n    piVar3 = __errno_location();\n    if (*piVar3 == 0x11) {\n      __old = (char *)FUN_00103c87(param_4,local_148);\n      if (__old == (char *)0x0) {\n        iVar1 = -1;\n      }\n      else {\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }\n    }\n  }" (if "if") (parenthesized_expression "((param_6 == '\x01') && (iVar1 != 0))" (( "(") (binary_expression "(param_6 == '\x01') && (iVar1 != 0)" (parenthesized_expression "(param_6 == '\x01')" (( "(") (binary_expression "param_6 == '\x01'" (identifier "param_6") (== "==") (char_literal "'\x01'" (' "'") (escape_sequence "\x01") (' "'"))) () ")")) (&& "&&") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    piVar3 = __errno_location();\n    if (*piVar3 == 0x11) {\n      __old = (char *)FUN_00103c87(param_4,local_148);\n      if (__old == (char *)0x0) {\n        iVar1 = -1;\n      }\n      else {\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }\n    }\n  }" ({ "{") (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" (identifier "piVar3") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (*piVar3 == 0x11) {\n      __old = (char *)FUN_00103c87(param_4,local_148);\n      if (__old == (char *)0x0) {\n        iVar1 = -1;\n      }\n      else {\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }\n    }" (if "if") (parenthesized_expression "(*piVar3 == 0x11)" (( "(") (binary_expression "*piVar3 == 0x11" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (== "==") (number_literal "0x11")) () ")")) (compound_statement "{\n      __old = (char *)FUN_00103c87(param_4,local_148);\n      if (__old == (char *)0x0) {\n        iVar1 = -1;\n      }\n      else {\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }\n    }" ({ "{") (expression_statement "__old = (char *)FUN_00103c87(param_4,local_148);" (assignment_expression "__old = (char *)FUN_00103c87(param_4,local_148)" (identifier "__old") (= "=") (cast_expression "(char *)FUN_00103c87(param_4,local_148)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00103c87(param_4,local_148)" (identifier "FUN_00103c87") (argument_list "(param_4,local_148)" (( "(") (identifier "param_4") (, ",") (identifier "local_148") () ")"))))) (; ";")) (if_statement "if (__old == (char *)0x0) {\n        iVar1 = -1;\n      }\n      else {\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }" (if "if") (parenthesized_expression "(__old == (char *)0x0)" (( "(") (binary_expression "__old == (char *)0x0" (identifier "__old") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        iVar1 = -1;\n      }" ({ "{") (expression_statement "iVar1 = -1;" (assignment_expression "iVar1 = -1" (identifier "iVar1") (= "=") (number_literal "-1")) (; ";")) (} "}")) (else_clause "else {\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }" (else "else") (compound_statement "{\n        local_168[0] = param_1;\n        local_160 = param_2;\n        local_158 = param_3;\n        local_154 = param_5;\n        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);\n        if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }\n        if (__old != local_148) {\n          free(__old);\n        }\n        iVar1 = 1;\n        if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }\n      }" ({ "{") (expression_statement "local_168[0] = param_1;" (assignment_expression "local_168[0] = param_1" (subscript_expression "local_168[0]" (identifier "local_168") ([ "[") (number_literal "0") (] "]")) (= "=") (identifier "param_1")) (; ";")) (expression_statement "local_160 = param_2;" (assignment_expression "local_160 = param_2" (identifier "local_160") (= "=") (identifier "param_2")) (; ";")) (expression_statement "local_158 = param_3;" (assignment_expression "local_158 = param_3" (identifier "local_158") (= "=") (identifier "param_3")) (; ";")) (expression_statement "local_154 = param_5;" (assignment_expression "local_154 = param_5" (identifier "local_154") (= "=") (identifier "param_5")) (; ";")) (expression_statement "iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);" (assignment_expression "iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6)" (identifier "iVar1") (= "=") (call_expression "FUN_00108507(__old,0,local_168,FUN_00103c66,6)" (identifier "FUN_00108507") (argument_list "(__old,0,local_168,FUN_00103c66,6)" (( "(") (identifier "__old") (, ",") (number_literal "0") (, ",") (identifier "local_168") (, ",") (identifier "FUN_00103c66") (, ",") (number_literal "6") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }\n        else {\n          iVar2 = *piVar3;\n        }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          iVar2 = renameat(param_3,__old,param_3,param_4);\n          if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }\n          unlinkat(param_3,__old,0);\n        }" ({ "{") (expression_statement "iVar2 = renameat(param_3,__old,param_3,param_4);" (assignment_expression "iVar2 = renameat(param_3,__old,param_3,param_4)" (identifier "iVar2") (= "=") (call_expression "renameat(param_3,__old,param_3,param_4)" (identifier "renameat") (argument_list "(param_3,__old,param_3,param_4)" (( "(") (identifier "param_3") (, ",") (identifier "__old") (, ",") (identifier "param_3") (, ",") (identifier "param_4") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n            iVar2 = *piVar3;\n          }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n            iVar2 = *piVar3;\n          }" ({ "{") (expression_statement "iVar2 = *piVar3;" (assignment_expression "iVar2 = *piVar3" (identifier "iVar2") (= "=") (pointer_expression "*piVar3" (* "*") (identifier "piVar3"))) (; ";")) (} "}"))) (expression_statement "unlinkat(param_3,__old,0);" (call_expression "unlinkat(param_3,__old,0)" (identifier "unlinkat") (argument_list "(param_3,__old,0)" (( "(") (identifier "param_3") (, ",") (identifier "__old") (, ",") (number_literal "0") () ")"))) (; ";")) (} "}")) (else_clause "else {\n          iVar2 = *piVar3;\n        }" (else "else") (compound_statement "{\n          iVar2 = *piVar3;\n        }" ({ "{") (expression_statement "iVar2 = *piVar3;" (assignment_expression "iVar2 = *piVar3" (identifier "iVar2") (= "=") (pointer_expression "*piVar3" (* "*") (identifier "piVar3"))) (; ";")) (} "}")))) (if_statement "if (__old != local_148) {\n          free(__old);\n        }" (if "if") (parenthesized_expression "(__old != local_148)" (( "(") (binary_expression "__old != local_148" (identifier "__old") (!= "!=") (identifier "local_148")) () ")")) (compound_statement "{\n          free(__old);\n        }" ({ "{") (expression_statement "free(__old);" (call_expression "free(__old)" (identifier "free") (argument_list "(__old)" (( "(") (identifier "__old") () ")"))) (; ";")) (} "}"))) (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" (identifier "iVar1") (= "=") (number_literal "1")) (; ";")) (if_statement "if (iVar2 != 0) {\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          *piVar3 = iVar2;\n          iVar1 = -1;\n        }" ({ "{") (expression_statement "*piVar3 = iVar2;" (assignment_expression "*piVar3 = iVar2" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (= "=") (identifier "iVar2")) (; ";")) (expression_statement "iVar1 = -1;" (assignment_expression "iVar1 = -1" (identifier "iVar1") (= "=") (number_literal "-1")) (; ";")) (} "}"))) (} "}")))) (} "}"))) (} "}"))) (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }" (if "if") (parenthesized_expression "(local_40 == *(long *)(in_FS_OFFSET + 0x28))" (( "(") (binary_expression "local_40 == *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_40") (== "==") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) () ")")) (compound_statement "{\n    return iVar1;\n  }" ({ "{") (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}"))) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" (identifier "__stack_chk_fail") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

int function_1(int srcdir,char *srcname,int dstdir,char *dstname,int flags,type_1 force)

{
  long var_13;
  int var_3;
  int var_9;
  int *piVar4;
  char *var_6;
  long var_1;
  type_2 arg;
  char var_11 [256];
  
  var_13 = *(long *)(var_1 + 0x28);
  var_3 = var_2(srcdir,srcname,dstdir,dstname,flags);
  if ((force) && (var_3 != 0)) {
    piVar4 = var_4();
    if (*piVar4 == 0x11) {
      var_6 = var_5(dstname,var_11);
      if (var_6 == (char *)0x0) {
        var_3 = -1;
      }
      else {
        arg.srcdir = srcdir;
        arg.srcname = srcname;
        arg.dstdir = dstdir;
        arg.flags = flags;
        var_3 = var_7(var_6,0,&arg,try_link,6);
        if (var_3 == 0) {
          var_9 = var_8(dstdir,var_6,dstdir,dstname);
          if (var_9 != 0) {
            var_9 = *piVar4;
          }
          var_10(dstdir,var_6,0);
        }
        else {
          var_9 = *piVar4;
        }
        if (var_6 != var_11) {
          var_12(var_6);
        }
        var_3 = 1;
        if (var_9 != 0) {
          *piVar4 = var_9;
          var_3 = -1;
        }
      }
    }
  }
  if (var_13 == *(long *)(var_1 + 0x28)) {
    return var_3;
  }
                    /* WARNING: Subroutine does not return */
  var_14();
}


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

int MASKED(int param_1,char *param_2,int param_3,char *param_4,int param_5,char param_6)

{
  int iVar1;
  int iVar2;
  int *piVar3;
  char *__old;
  long in_FS_OFFSET;
  int local_168 [2];
  char *local_160;
  int local_158;
  int local_154;
  char local_148 [264];
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  iVar1 = linkat(param_1,param_2,param_3,param_4,param_5);
  if ((param_6 == '\x01') && (iVar1 != 0)) {
    piVar3 = __errno_location();
    if (*piVar3 == 0x11) {
      __old = (char *)FUN_00103c87(param_4,local_148);
      if (__old == (char *)0x0) {
        iVar1 = -1;
      }
      else {
        local_168[0] = param_1;
        local_160 = param_2;
        local_158 = param_3;
        local_154 = param_5;
        iVar1 = FUN_00108507(__old,0,local_168,FUN_00103c66,6);
        if (iVar1 == 0) {
          iVar2 = renameat(param_3,__old,param_3,param_4);
          if (iVar2 != 0) {
            iVar2 = *piVar3;
          }
          unlinkat(param_3,__old,0);
        }
        else {
          iVar2 = *piVar3;
        }
        if (__old != local_148) {
          free(__old);
        }
        iVar1 = 1;
        if (iVar2 != 0) {
          *piVar3 = iVar2;
          iVar1 = -1;
        }
      }
    }
  }
  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
    return iVar1;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

