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

int __regparm3
set_owner(cp_options *x,char *dst_name,int dest_desc,stat *src_sb,_Bool new_dst,stat *dst_sb)

{
  __gid_t __group;
  __uid_t __owner;
  _Bool _Var1;
  uint uVar2;
  int iVar3;
  int *piVar4;
  char *pcVar5;
  undefined4 uVar6;
  uint uVar7;
  
  __group = src_sb->st_gid;
  __owner = src_sb->st_uid;
  if (!new_dst) {
    if ((x->preserve_mode == false) && (x->move_mode == false)) {
      if (x->set_mode == false) goto LAB_00015b93;
      uVar7 = dst_sb->st_mode;
      uVar2 = x->mode;
    }
    else {
      uVar2 = src_sb->st_mode;
      uVar7 = dst_sb->st_mode;
    }
    iVar3 = qset_acl(dst_name,dest_desc,uVar2 & uVar7 & 0x1c0);
    if (iVar3 != 0) {
      piVar4 = __errno_location();
      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (x->owner_privileges == false)) {
        return -(uint)x->require_preserve;
      }
      pcVar5 = quotearg_style(shell_escape_always_quoting_style,dst_name);
      uVar6 = dcgettext(0,"clearing permissions for %s",5);
                    /* WARNING: Subroutine does not return */
      error(0,*piVar4,uVar6,pcVar5);
    }
  }
LAB_00015b93:
  if (dest_desc == -1) {
    iVar3 = lchown(dst_name,__owner,__group);
    if (iVar3 == 0) {
      return 1;
    }
    piVar4 = __errno_location();
    iVar3 = *piVar4;
    if ((iVar3 == 1) || (iVar3 == 0x16)) {
      lchown(dst_name,0xffffffff,__group);
      *piVar4 = iVar3;
    }
  }
  else {
    iVar3 = fchown(dest_desc,__owner,__group);
    if (iVar3 == 0) {
      return 1;
    }
    piVar4 = __errno_location();
    iVar3 = *piVar4;
    if ((iVar3 == 1) || (iVar3 == 0x16)) {
      fchown(dest_desc,0xffffffff,__group);
      *piVar4 = iVar3;
    }
  }
  _Var1 = chown_failure_ok(x);
  if (!_Var1) {
    pcVar5 = quotearg_style(shell_escape_always_quoting_style,dst_name);
    uVar6 = dcgettext(0,"failed to preserve ownership for %s",5);
                    /* WARNING: Subroutine does not return */
    error(0,*piVar4,uVar6,pcVar5);
  }
  return 0;
}



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

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

{
  __gid_t __group;
  __uid_t __owner;
  char cVar1;
  uint uVar2;
  int iVar3;
  int *piVar4;
  undefined4 uVar5;
  undefined4 uVar6;
  uint uVar7;
  
  __group = *(__gid_t *)(param_4 + 0x1c);
  __owner = *(__uid_t *)(param_4 + 0x18);
  if (param_5 == '\0') {
    if ((*(char *)(param_1 + 0x1e) == '\0') && (*(char *)(param_1 + 0x18) == '\0')) {
      if (*(char *)(param_1 + 0x2b) == '\0') goto LAB_00015b93;
      uVar7 = *(uint *)(param_6 + 0x10);
      uVar2 = *(uint *)(param_1 + 0x10);
    }
    else {
      uVar2 = *(uint *)(param_4 + 0x10);
      uVar7 = *(uint *)(param_6 + 0x10);
    }
    iVar3 = FUN_0001ed30(param_2,param_3,uVar2 & uVar7 & 0x1c0);
    if (iVar3 != 0) {
      piVar4 = __errno_location();
      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')) {
        return -(uint)*(byte *)(param_1 + 0x24);
      }
      uVar5 = FUN_00020b50(4,param_2);
      uVar6 = dcgettext(0,"clearing permissions for %s",5);
                    /* WARNING: Subroutine does not return */
      error(0,*piVar4,uVar6,uVar5);
    }
  }
LAB_00015b93:
  if (param_3 == -1) {
    iVar3 = lchown(param_2,__owner,__group);
    if (iVar3 == 0) {
      return 1;
    }
    piVar4 = __errno_location();
    iVar3 = *piVar4;
    if ((iVar3 == 1) || (iVar3 == 0x16)) {
      lchown(param_2,0xffffffff,__group);
      *piVar4 = iVar3;
    }
  }
  else {
    iVar3 = fchown(param_3,__owner,__group);
    if (iVar3 == 0) {
      return 1;
    }
    piVar4 = __errno_location();
    iVar3 = *piVar4;
    if ((iVar3 == 1) || (iVar3 == 0x16)) {
      fchown(param_3,0xffffffff,__group);
      *piVar4 = iVar3;
    }
  }
  cVar1 = FUN_00015af0(param_1);
  if (cVar1 == '\0') {
    uVar5 = FUN_00020b50(4,param_2);
    uVar6 = dcgettext(0,"failed to preserve ownership for %s",5);
                    /* WARNING: Subroutine does not return */
    error(0,*piVar4,uVar6,uVar5);
  }
  return 0;
}


PUSH EBP
PUSH EDI
MOV EDI,ECX
PUSH ESI
MOV ESI,EAX
PUSH EBX
CALL 0x000132e0
ADD EBX,0x244c3
SUB ESP,0x1c
MOV EAX,dword ptr [ESP + 0x30]
CMP byte ptr [ESP + 0x34],0x0
MOV dword ptr [ESP + 0x8],EDX
MOV ECX,dword ptr [EAX + 0x1c]
MOV EBP,dword ptr [EAX + 0x18]
MOV dword ptr [ESP + 0x4],ECX
JNZ 0x00015b93
CMP byte ptr [ESI + 0x1e],0x0
JZ 0x00015bf0
MOV ECX,dword ptr [ESP + 0x38]
MOV EAX,dword ptr [EAX + 0x10]
MOV EDX,dword ptr [ECX + 0x10]
AND EAX,EDX
SUB ESP,0x4
AND EAX,0x1c0
PUSH EAX
PUSH EDI
PUSH dword ptr [ESP + 0x14]
CALL 0x0001ed30
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00015c70
CMP EDI,-0x1
JZ 0x00015c10
SUB ESP,0x4
PUSH dword ptr [ESP + 0x8]
PUSH EBP
PUSH EDI
CALL 0x000124f0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00015c28
CALL 0x000125a0
MOV EDX,dword ptr [EAX]
MOV EBP,EAX
CMP EDX,0x1
JZ 0x00015d10
CMP EDX,0x16
JZ 0x00015d10
SUB ESP,0xc
PUSH ESI
CALL 0x00015af0
ADD ESP,0x10
MOV EDX,EAX
XOR EAX,EAX
TEST DL,DL
JZ 0x00015cd0
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CMP byte ptr [ESI + 0x18],0x0
JNZ 0x00015b69
CMP byte ptr [ESI + 0x2b],0x0
JZ 0x00015b93
MOV EAX,dword ptr [ESP + 0x38]
MOV EDX,dword ptr [EAX + 0x10]
MOV EAX,dword ptr [ESI + 0x10]
JMP 0x00015b73
SUB ESP,0x4
PUSH dword ptr [ESP + 0x8]
PUSH EBP
PUSH dword ptr [ESP + 0x14]
CALL 0x000126f0
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00015c38
ADD ESP,0x1c
MOV EAX,0x1
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x000125a0
MOV EDI,dword ptr [EAX]
MOV EBP,EAX
CMP EDI,0x1
JZ 0x00015c4f
CMP EDI,0x16
JNZ 0x00015bc8
SUB ESP,0x4
PUSH dword ptr [ESP + 0x8]
PUSH -0x1
PUSH dword ptr [ESP + 0x14]
CALL 0x000126f0
MOV dword ptr [EBP],EDI
ADD ESP,0x10
JMP 0x00015bc8
CALL 0x000125a0
MOV EDI,EAX
MOV EAX,dword ptr [EAX]
CMP EAX,0x1
JZ 0x00015d38
CMP EAX,0x16
JZ 0x00015d38
SUB ESP,0x8
PUSH dword ptr [ESP + 0x10]
PUSH 0x4
CALL 0x00020b50
ADD ESP,0xc
MOV EBP,EAX
LEA EAX,[EBX + 0xffff4fa6]
PUSH 0x5
PUSH EAX
PUSH 0x0
CALL 0x000121f0
PUSH EBP
PUSH EAX
PUSH dword ptr [EDI]
PUSH 0x0
CALL 0x000123a0
MOVZX EAX,byte ptr [ESI + 0x24]
ADD ESP,0x1c
POP EBX
POP ESI
NEG EAX
POP EDI
POP EBP
RET
SUB ESP,0x8
PUSH dword ptr [ESP + 0x10]
PUSH 0x4
CALL 0x00020b50
ADD ESP,0xc
MOV EDI,EAX
LEA EAX,[EBX + 0xffff5358]
PUSH 0x5
PUSH EAX
PUSH 0x0
CALL 0x000121f0
PUSH EDI
PUSH EAX
PUSH dword ptr [EBP]
PUSH 0x0
CALL 0x000123a0
MOV dword ptr [ESP + 0xc],EDX
SUB ESP,0x4
PUSH dword ptr [ESP + 0x8]
PUSH -0x1
PUSH EDI
CALL 0x000124f0
MOV EDX,dword ptr [ESP + 0x1c]
ADD ESP,0x10
MOV dword ptr [EBP],EDX
JMP 0x00015bc8
CMP byte ptr [ESI + 0x1b],0x0
JNZ 0x00015c8b
JMP 0x00015cbc
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3\nFUN_00015b30(int param_1,char *param_2,int param_3,int param_4,char param_5,int param_6)\n\n{\n  __gid_t __group;\n  __uid_t __owner;\n  char cVar1;\n  uint uVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  uint uVar7;\n  \n  __group = *(__gid_t *)(param_4 + 0x1c);\n  __owner = *(__uid_t *)(param_4 + 0x18);\n  if (param_5 == '\0') {\n    if ((*(char *)(param_1 + 0x1e) == '\0') && (*(char *)(param_1 + 0x18) == '\0')) {\n      if (*(char *)(param_1 + 0x2b) == '\0') goto LAB_00015b93;\n      uVar7 = *(uint *)(param_6 + 0x10);\n      uVar2 = *(uint *)(param_1 + 0x10);\n    }\n    else {\n      uVar2 = *(uint *)(param_4 + 0x10);\n      uVar7 = *(uint *)(param_6 + 0x10);\n    }\n    iVar3 = FUN_0001ed30(param_2,param_3,uVar2 & uVar7 & 0x1c0);\n    if (iVar3 != 0) {\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')) {\n        return -(uint)*(byte *)(param_1 + 0x24);\n      }\n      uVar5 = FUN_00020b50(4,param_2);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    /* WARNING: Subroutine does not return */\n      error(0,*piVar4,uVar6,uVar5);\n    }\n  }\nLAB_00015b93:\n  if (param_3 == -1) {\n    iVar3 = lchown(param_2,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(param_2,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  else {\n    iVar3 = fchown(param_3,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(param_3,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  cVar1 = FUN_00015af0(param_1);\n  if (cVar1 == '\0') {\n    uVar5 = FUN_00020b50(4,param_2);\n    uVar6 = dcgettext(0,"failed to preserve ownership for %s",5);\n                    /* WARNING: Subroutine does not return */\n    error(0,*piVar4,uVar6,uVar5);\n  }\n  return 0;\n}\n\n" comment (function_definition "int __regparm3\nFUN_00015b30(int param_1,char *param_2,int param_3,int param_4,char param_5,int param_6)\n\n{\n  __gid_t __group;\n  __uid_t __owner;\n  char cVar1;\n  uint uVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  uint uVar7;\n  \n  __group = *(__gid_t *)(param_4 + 0x1c);\n  __owner = *(__uid_t *)(param_4 + 0x18);\n  if (param_5 == '\0') {\n    if ((*(char *)(param_1 + 0x1e) == '\0') && (*(char *)(param_1 + 0x18) == '\0')) {\n      if (*(char *)(param_1 + 0x2b) == '\0') goto LAB_00015b93;\n      uVar7 = *(uint *)(param_6 + 0x10);\n      uVar2 = *(uint *)(param_1 + 0x10);\n    }\n    else {\n      uVar2 = *(uint *)(param_4 + 0x10);\n      uVar7 = *(uint *)(param_6 + 0x10);\n    }\n    iVar3 = FUN_0001ed30(param_2,param_3,uVar2 & uVar7 & 0x1c0);\n    if (iVar3 != 0) {\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')) {\n        return -(uint)*(byte *)(param_1 + 0x24);\n      }\n      uVar5 = FUN_00020b50(4,param_2);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    /* WARNING: Subroutine does not return */\n      error(0,*piVar4,uVar6,uVar5);\n    }\n  }\nLAB_00015b93:\n  if (param_3 == -1) {\n    iVar3 = lchown(param_2,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(param_2,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  else {\n    iVar3 = fchown(param_3,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(param_3,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  cVar1 = FUN_00015af0(param_1);\n  if (cVar1 == '\0') {\n    uVar5 = FUN_00020b50(4,param_2);\n    uVar6 = dcgettext(0,"failed to preserve ownership for %s",5);\n                    /* WARNING: Subroutine does not return */\n    error(0,*piVar4,uVar6,uVar5);\n  }\n  return 0;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00015b30(int param_1,char *param_2,int param_3,int param_4,char param_5,int param_6)" identifier (parameter_list "(int param_1,char *param_2,int param_3,int param_4,char param_5,int 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 "int param_4" primitive_type identifier) , (parameter_declaration "char param_5" primitive_type identifier) , (parameter_declaration "int param_6" primitive_type identifier) ))) (compound_statement "{\n  __gid_t __group;\n  __uid_t __owner;\n  char cVar1;\n  uint uVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  uint uVar7;\n  \n  __group = *(__gid_t *)(param_4 + 0x1c);\n  __owner = *(__uid_t *)(param_4 + 0x18);\n  if (param_5 == '\0') {\n    if ((*(char *)(param_1 + 0x1e) == '\0') && (*(char *)(param_1 + 0x18) == '\0')) {\n      if (*(char *)(param_1 + 0x2b) == '\0') goto LAB_00015b93;\n      uVar7 = *(uint *)(param_6 + 0x10);\n      uVar2 = *(uint *)(param_1 + 0x10);\n    }\n    else {\n      uVar2 = *(uint *)(param_4 + 0x10);\n      uVar7 = *(uint *)(param_6 + 0x10);\n    }\n    iVar3 = FUN_0001ed30(param_2,param_3,uVar2 & uVar7 & 0x1c0);\n    if (iVar3 != 0) {\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')) {\n        return -(uint)*(byte *)(param_1 + 0x24);\n      }\n      uVar5 = FUN_00020b50(4,param_2);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    /* WARNING: Subroutine does not return */\n      error(0,*piVar4,uVar6,uVar5);\n    }\n  }\nLAB_00015b93:\n  if (param_3 == -1) {\n    iVar3 = lchown(param_2,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(param_2,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  else {\n    iVar3 = fchown(param_3,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(param_3,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  cVar1 = FUN_00015af0(param_1);\n  if (cVar1 == '\0') {\n    uVar5 = FUN_00020b50(4,param_2);\n    uVar6 = dcgettext(0,"failed to preserve ownership for %s",5);\n                    /* WARNING: Subroutine does not return */\n    error(0,*piVar4,uVar6,uVar5);\n  }\n  return 0;\n}" { (declaration "__gid_t __group;" type_identifier identifier ;) (declaration "__uid_t __owner;" type_identifier identifier ;) (declaration "char cVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "undefined4 uVar6;" type_identifier identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (expression_statement "__group = *(__gid_t *)(param_4 + 0x1c);" (assignment_expression "__group = *(__gid_t *)(param_4 + 0x1c)" identifier = (pointer_expression "*(__gid_t *)(param_4 + 0x1c)" * (cast_expression "(__gid_t *)(param_4 + 0x1c)" ( (type_descriptor "__gid_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0x1c)" ( (binary_expression "param_4 + 0x1c" identifier + number_literal) ))))) ;) (expression_statement "__owner = *(__uid_t *)(param_4 + 0x18);" (assignment_expression "__owner = *(__uid_t *)(param_4 + 0x18)" identifier = (pointer_expression "*(__uid_t *)(param_4 + 0x18)" * (cast_expression "(__uid_t *)(param_4 + 0x18)" ( (type_descriptor "__uid_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0x18)" ( (binary_expression "param_4 + 0x18" identifier + number_literal) ))))) ;) (if_statement "if (param_5 == '\0') {\n    if ((*(char *)(param_1 + 0x1e) == '\0') && (*(char *)(param_1 + 0x18) == '\0')) {\n      if (*(char *)(param_1 + 0x2b) == '\0') goto LAB_00015b93;\n      uVar7 = *(uint *)(param_6 + 0x10);\n      uVar2 = *(uint *)(param_1 + 0x10);\n    }\n    else {\n      uVar2 = *(uint *)(param_4 + 0x10);\n      uVar7 = *(uint *)(param_6 + 0x10);\n    }\n    iVar3 = FUN_0001ed30(param_2,param_3,uVar2 & uVar7 & 0x1c0);\n    if (iVar3 != 0) {\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')) {\n        return -(uint)*(byte *)(param_1 + 0x24);\n      }\n      uVar5 = FUN_00020b50(4,param_2);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    /* WARNING: Subroutine does not return */\n      error(0,*piVar4,uVar6,uVar5);\n    }\n  }" if (parenthesized_expression "(param_5 == '\0')" ( (binary_expression "param_5 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    if ((*(char *)(param_1 + 0x1e) == '\0') && (*(char *)(param_1 + 0x18) == '\0')) {\n      if (*(char *)(param_1 + 0x2b) == '\0') goto LAB_00015b93;\n      uVar7 = *(uint *)(param_6 + 0x10);\n      uVar2 = *(uint *)(param_1 + 0x10);\n    }\n    else {\n      uVar2 = *(uint *)(param_4 + 0x10);\n      uVar7 = *(uint *)(param_6 + 0x10);\n    }\n    iVar3 = FUN_0001ed30(param_2,param_3,uVar2 & uVar7 & 0x1c0);\n    if (iVar3 != 0) {\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')) {\n        return -(uint)*(byte *)(param_1 + 0x24);\n      }\n      uVar5 = FUN_00020b50(4,param_2);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    /* WARNING: Subroutine does not return */\n      error(0,*piVar4,uVar6,uVar5);\n    }\n  }" { (if_statement "if ((*(char *)(param_1 + 0x1e) == '\0') && (*(char *)(param_1 + 0x18) == '\0')) {\n      if (*(char *)(param_1 + 0x2b) == '\0') goto LAB_00015b93;\n      uVar7 = *(uint *)(param_6 + 0x10);\n      uVar2 = *(uint *)(param_1 + 0x10);\n    }\n    else {\n      uVar2 = *(uint *)(param_4 + 0x10);\n      uVar7 = *(uint *)(param_6 + 0x10);\n    }" if (parenthesized_expression "((*(char *)(param_1 + 0x1e) == '\0') && (*(char *)(param_1 + 0x18) == '\0'))" ( (binary_expression "(*(char *)(param_1 + 0x1e) == '\0') && (*(char *)(param_1 + 0x18) == '\0')" (parenthesized_expression "(*(char *)(param_1 + 0x1e) == '\0')" ( (binary_expression "*(char *)(param_1 + 0x1e) == '\0'" (pointer_expression "*(char *)(param_1 + 0x1e)" * (cast_expression "(char *)(param_1 + 0x1e)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1e)" ( (binary_expression "param_1 + 0x1e" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(*(char *)(param_1 + 0x18) == '\0')" ( (binary_expression "*(char *)(param_1 + 0x18) == '\0'" (pointer_expression "*(char *)(param_1 + 0x18)" * (cast_expression "(char *)(param_1 + 0x18)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n      if (*(char *)(param_1 + 0x2b) == '\0') goto LAB_00015b93;\n      uVar7 = *(uint *)(param_6 + 0x10);\n      uVar2 = *(uint *)(param_1 + 0x10);\n    }" { (if_statement "if (*(char *)(param_1 + 0x2b) == '\0') goto LAB_00015b93;" if (parenthesized_expression "(*(char *)(param_1 + 0x2b) == '\0')" ( (binary_expression "*(char *)(param_1 + 0x2b) == '\0'" (pointer_expression "*(char *)(param_1 + 0x2b)" * (cast_expression "(char *)(param_1 + 0x2b)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2b)" ( (binary_expression "param_1 + 0x2b" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_00015b93;" goto statement_identifier ;)) (expression_statement "uVar7 = *(uint *)(param_6 + 0x10);" (assignment_expression "uVar7 = *(uint *)(param_6 + 0x10)" identifier = (pointer_expression "*(uint *)(param_6 + 0x10)" * (cast_expression "(uint *)(param_6 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_6 + 0x10)" ( (binary_expression "param_6 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = *(uint *)(param_1 + 0x10);" (assignment_expression "uVar2 = *(uint *)(param_1 + 0x10)" identifier = (pointer_expression "*(uint *)(param_1 + 0x10)" * (cast_expression "(uint *)(param_1 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) }) (else_clause "else {\n      uVar2 = *(uint *)(param_4 + 0x10);\n      uVar7 = *(uint *)(param_6 + 0x10);\n    }" else (compound_statement "{\n      uVar2 = *(uint *)(param_4 + 0x10);\n      uVar7 = *(uint *)(param_6 + 0x10);\n    }" { (expression_statement "uVar2 = *(uint *)(param_4 + 0x10);" (assignment_expression "uVar2 = *(uint *)(param_4 + 0x10)" identifier = (pointer_expression "*(uint *)(param_4 + 0x10)" * (cast_expression "(uint *)(param_4 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0x10)" ( (binary_expression "param_4 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "uVar7 = *(uint *)(param_6 + 0x10);" (assignment_expression "uVar7 = *(uint *)(param_6 + 0x10)" identifier = (pointer_expression "*(uint *)(param_6 + 0x10)" * (cast_expression "(uint *)(param_6 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_6 + 0x10)" ( (binary_expression "param_6 + 0x10" identifier + number_literal) ))))) ;) }))) (expression_statement "iVar3 = FUN_0001ed30(param_2,param_3,uVar2 & uVar7 & 0x1c0);" (assignment_expression "iVar3 = FUN_0001ed30(param_2,param_3,uVar2 & uVar7 & 0x1c0)" identifier = (call_expression "FUN_0001ed30(param_2,param_3,uVar2 & uVar7 & 0x1c0)" identifier (argument_list "(param_2,param_3,uVar2 & uVar7 & 0x1c0)" ( identifier , identifier , (binary_expression "uVar2 & uVar7 & 0x1c0" (binary_expression "uVar2 & uVar7" identifier & identifier) & number_literal) )))) ;) (if_statement "if (iVar3 != 0) {\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')) {\n        return -(uint)*(byte *)(param_1 + 0x24);\n      }\n      uVar5 = FUN_00020b50(4,param_2);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    /* WARNING: Subroutine does not return */\n      error(0,*piVar4,uVar6,uVar5);\n    }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')) {\n        return -(uint)*(byte *)(param_1 + 0x24);\n      }\n      uVar5 = FUN_00020b50(4,param_2);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    /* WARNING: Subroutine does not return */\n      error(0,*piVar4,uVar6,uVar5);\n    }" { (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')) {\n        return -(uint)*(byte *)(param_1 + 0x24);\n      }" if (parenthesized_expression "(((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0'))" ( (binary_expression "((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')" (parenthesized_expression "((*piVar4 == 1) || (*piVar4 == 0x16))" ( (binary_expression "(*piVar4 == 1) || (*piVar4 == 0x16)" (parenthesized_expression "(*piVar4 == 1)" ( (binary_expression "*piVar4 == 1" (pointer_expression "*piVar4" * identifier) == number_literal) )) || (parenthesized_expression "(*piVar4 == 0x16)" ( (binary_expression "*piVar4 == 0x16" (pointer_expression "*piVar4" * identifier) == number_literal) ))) )) && (parenthesized_expression "(*(char *)(param_1 + 0x1b) == '\0')" ( (binary_expression "*(char *)(param_1 + 0x1b) == '\0'" (pointer_expression "*(char *)(param_1 + 0x1b)" * (cast_expression "(char *)(param_1 + 0x1b)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1b)" ( (binary_expression "param_1 + 0x1b" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n        return -(uint)*(byte *)(param_1 + 0x24);\n      }" { (return_statement "return -(uint)*(byte *)(param_1 + 0x24);" return (binary_expression "-(uint)*(byte *)(param_1 + 0x24)" (unary_expression "-(uint)" - (parenthesized_expression "(uint)" ( identifier ))) * (cast_expression "(byte *)(param_1 + 0x24)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) ;) })) (expression_statement "uVar5 = FUN_00020b50(4,param_2);" (assignment_expression "uVar5 = FUN_00020b50(4,param_2)" identifier = (call_expression "FUN_00020b50(4,param_2)" identifier (argument_list "(4,param_2)" ( number_literal , identifier )))) ;) (expression_statement "uVar6 = dcgettext(0,"clearing permissions for %s",5);" (assignment_expression "uVar6 = dcgettext(0,"clearing permissions for %s",5)" identifier = (call_expression "dcgettext(0,"clearing permissions for %s",5)" identifier (argument_list "(0,"clearing permissions for %s",5)" ( number_literal , (string_literal ""clearing permissions for %s"" " string_content ") , number_literal )))) ;) comment (expression_statement "error(0,*piVar4,uVar6,uVar5);" (call_expression "error(0,*piVar4,uVar6,uVar5)" identifier (argument_list "(0,*piVar4,uVar6,uVar5)" ( number_literal , (pointer_expression "*piVar4" * identifier) , identifier , identifier ))) ;) })) })) (labeled_statement "LAB_00015b93:\n  if (param_3 == -1) {\n    iVar3 = lchown(param_2,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(param_2,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  else {\n    iVar3 = fchown(param_3,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(param_3,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }" statement_identifier : (if_statement "if (param_3 == -1) {\n    iVar3 = lchown(param_2,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(param_2,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  else {\n    iVar3 = fchown(param_3,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(param_3,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }" if (parenthesized_expression "(param_3 == -1)" ( (binary_expression "param_3 == -1" identifier == number_literal) )) (compound_statement "{\n    iVar3 = lchown(param_2,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(param_2,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }" { (expression_statement "iVar3 = lchown(param_2,__owner,__group);" (assignment_expression "iVar3 = lchown(param_2,__owner,__group)" identifier = (call_expression "lchown(param_2,__owner,__group)" identifier (argument_list "(param_2,__owner,__group)" ( identifier , identifier , identifier )))) ;) (if_statement "if (iVar3 == 0) {\n      return 1;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      return 1;\n    }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar3 = *piVar4;" (assignment_expression "iVar3 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) (if_statement "if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(param_2,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }" if (parenthesized_expression "((iVar3 == 1) || (iVar3 == 0x16))" ( (binary_expression "(iVar3 == 1) || (iVar3 == 0x16)" (parenthesized_expression "(iVar3 == 1)" ( (binary_expression "iVar3 == 1" identifier == number_literal) )) || (parenthesized_expression "(iVar3 == 0x16)" ( (binary_expression "iVar3 == 0x16" identifier == number_literal) ))) )) (compound_statement "{\n      lchown(param_2,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }" { (expression_statement "lchown(param_2,0xffffffff,__group);" (call_expression "lchown(param_2,0xffffffff,__group)" identifier (argument_list "(param_2,0xffffffff,__group)" ( identifier , number_literal , identifier ))) ;) (expression_statement "*piVar4 = iVar3;" (assignment_expression "*piVar4 = iVar3" (pointer_expression "*piVar4" * identifier) = identifier) ;) })) }) (else_clause "else {\n    iVar3 = fchown(param_3,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(param_3,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }" else (compound_statement "{\n    iVar3 = fchown(param_3,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(param_3,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }" { (expression_statement "iVar3 = fchown(param_3,__owner,__group);" (assignment_expression "iVar3 = fchown(param_3,__owner,__group)" identifier = (call_expression "fchown(param_3,__owner,__group)" identifier (argument_list "(param_3,__owner,__group)" ( identifier , identifier , identifier )))) ;) (if_statement "if (iVar3 == 0) {\n      return 1;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      return 1;\n    }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar3 = *piVar4;" (assignment_expression "iVar3 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) (if_statement "if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(param_3,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }" if (parenthesized_expression "((iVar3 == 1) || (iVar3 == 0x16))" ( (binary_expression "(iVar3 == 1) || (iVar3 == 0x16)" (parenthesized_expression "(iVar3 == 1)" ( (binary_expression "iVar3 == 1" identifier == number_literal) )) || (parenthesized_expression "(iVar3 == 0x16)" ( (binary_expression "iVar3 == 0x16" identifier == number_literal) ))) )) (compound_statement "{\n      fchown(param_3,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }" { (expression_statement "fchown(param_3,0xffffffff,__group);" (call_expression "fchown(param_3,0xffffffff,__group)" identifier (argument_list "(param_3,0xffffffff,__group)" ( identifier , number_literal , identifier ))) ;) (expression_statement "*piVar4 = iVar3;" (assignment_expression "*piVar4 = iVar3" (pointer_expression "*piVar4" * identifier) = identifier) ;) })) })))) (expression_statement "cVar1 = FUN_00015af0(param_1);" (assignment_expression "cVar1 = FUN_00015af0(param_1)" identifier = (call_expression "FUN_00015af0(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (cVar1 == '\0') {\n    uVar5 = FUN_00020b50(4,param_2);\n    uVar6 = dcgettext(0,"failed to preserve ownership for %s",5);\n                    /* WARNING: Subroutine does not return */\n    error(0,*piVar4,uVar6,uVar5);\n  }" if (parenthesized_expression "(cVar1 == '\0')" ( (binary_expression "cVar1 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    uVar5 = FUN_00020b50(4,param_2);\n    uVar6 = dcgettext(0,"failed to preserve ownership for %s",5);\n                    /* WARNING: Subroutine does not return */\n    error(0,*piVar4,uVar6,uVar5);\n  }" { (expression_statement "uVar5 = FUN_00020b50(4,param_2);" (assignment_expression "uVar5 = FUN_00020b50(4,param_2)" identifier = (call_expression "FUN_00020b50(4,param_2)" identifier (argument_list "(4,param_2)" ( number_literal , identifier )))) ;) (expression_statement "uVar6 = dcgettext(0,"failed to preserve ownership for %s",5);" (assignment_expression "uVar6 = dcgettext(0,"failed to preserve ownership for %s",5)" identifier = (call_expression "dcgettext(0,"failed to preserve ownership for %s",5)" identifier (argument_list "(0,"failed to preserve ownership for %s",5)" ( number_literal , (string_literal ""failed to preserve ownership for %s"" " string_content ") , number_literal )))) ;) comment (expression_statement "error(0,*piVar4,uVar6,uVar5);" (call_expression "error(0,*piVar4,uVar6,uVar5)" identifier (argument_list "(0,*piVar4,uVar6,uVar5)" ( number_literal , (pointer_expression "*piVar4" * identifier) , identifier , identifier ))) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3\nset_owner(cp_options *x,char *dst_name,int dest_desc,stat *src_sb,_Bool new_dst,stat *dst_sb)\n\n{\n  __gid_t __group;\n  __uid_t __owner;\n  _Bool _Var1;\n  uint uVar2;\n  int iVar3;\n  int *piVar4;\n  char *pcVar5;\n  undefined4 uVar6;\n  uint uVar7;\n  \n  __group = src_sb->st_gid;\n  __owner = src_sb->st_uid;\n  if (!new_dst) {\n    if ((x->preserve_mode == false) && (x->move_mode == false)) {\n      if (x->set_mode == false) goto LAB_00015b93;\n      uVar7 = dst_sb->st_mode;\n      uVar2 = x->mode;\n    }\n    else {\n      uVar2 = src_sb->st_mode;\n      uVar7 = dst_sb->st_mode;\n    }\n    iVar3 = qset_acl(dst_name,dest_desc,uVar2 & uVar7 & 0x1c0);\n    if (iVar3 != 0) {\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (x->owner_privileges == false)) {\n        return -(uint)x->require_preserve;\n      }\n      pcVar5 = quotearg_style(shell_escape_always_quoting_style,dst_name);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    /* WARNING: Subroutine does not return */\n      error(0,*piVar4,uVar6,pcVar5);\n    }\n  }\nLAB_00015b93:\n  if (dest_desc == -1) {\n    iVar3 = lchown(dst_name,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(dst_name,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  else {\n    iVar3 = fchown(dest_desc,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(dest_desc,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  _Var1 = chown_failure_ok(x);\n  if (!_Var1) {\n    pcVar5 = quotearg_style(shell_escape_always_quoting_style,dst_name);\n    uVar6 = dcgettext(0,"failed to preserve ownership for %s",5);\n                    /* WARNING: Subroutine does not return */\n    error(0,*piVar4,uVar6,pcVar5);\n  }\n  return 0;\n}\n\n" comment (function_definition "int __regparm3\nset_owner(cp_options *x,char *dst_name,int dest_desc,stat *src_sb,_Bool new_dst,stat *dst_sb)\n\n{\n  __gid_t __group;\n  __uid_t __owner;\n  _Bool _Var1;\n  uint uVar2;\n  int iVar3;\n  int *piVar4;\n  char *pcVar5;\n  undefined4 uVar6;\n  uint uVar7;\n  \n  __group = src_sb->st_gid;\n  __owner = src_sb->st_uid;\n  if (!new_dst) {\n    if ((x->preserve_mode == false) && (x->move_mode == false)) {\n      if (x->set_mode == false) goto LAB_00015b93;\n      uVar7 = dst_sb->st_mode;\n      uVar2 = x->mode;\n    }\n    else {\n      uVar2 = src_sb->st_mode;\n      uVar7 = dst_sb->st_mode;\n    }\n    iVar3 = qset_acl(dst_name,dest_desc,uVar2 & uVar7 & 0x1c0);\n    if (iVar3 != 0) {\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (x->owner_privileges == false)) {\n        return -(uint)x->require_preserve;\n      }\n      pcVar5 = quotearg_style(shell_escape_always_quoting_style,dst_name);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    /* WARNING: Subroutine does not return */\n      error(0,*piVar4,uVar6,pcVar5);\n    }\n  }\nLAB_00015b93:\n  if (dest_desc == -1) {\n    iVar3 = lchown(dst_name,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(dst_name,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  else {\n    iVar3 = fchown(dest_desc,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(dest_desc,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  _Var1 = chown_failure_ok(x);\n  if (!_Var1) {\n    pcVar5 = quotearg_style(shell_escape_always_quoting_style,dst_name);\n    uVar6 = dcgettext(0,"failed to preserve ownership for %s",5);\n                    /* WARNING: Subroutine does not return */\n    error(0,*piVar4,uVar6,pcVar5);\n  }\n  return 0;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "set_owner(cp_options *x,char *dst_name,int dest_desc,stat *src_sb,_Bool new_dst,stat *dst_sb)" identifier (parameter_list "(cp_options *x,char *dst_name,int dest_desc,stat *src_sb,_Bool new_dst,stat *dst_sb)" ( (parameter_declaration "cp_options *x" type_identifier (pointer_declarator "*x" * identifier)) , (parameter_declaration "char *dst_name" primitive_type (pointer_declarator "*dst_name" * identifier)) , (parameter_declaration "int dest_desc" primitive_type identifier) , (parameter_declaration "stat *src_sb" type_identifier (pointer_declarator "*src_sb" * identifier)) , (parameter_declaration "_Bool new_dst" type_identifier identifier) , (parameter_declaration "stat *dst_sb" type_identifier (pointer_declarator "*dst_sb" * identifier)) ))) (compound_statement "{\n  __gid_t __group;\n  __uid_t __owner;\n  _Bool _Var1;\n  uint uVar2;\n  int iVar3;\n  int *piVar4;\n  char *pcVar5;\n  undefined4 uVar6;\n  uint uVar7;\n  \n  __group = src_sb->st_gid;\n  __owner = src_sb->st_uid;\n  if (!new_dst) {\n    if ((x->preserve_mode == false) && (x->move_mode == false)) {\n      if (x->set_mode == false) goto LAB_00015b93;\n      uVar7 = dst_sb->st_mode;\n      uVar2 = x->mode;\n    }\n    else {\n      uVar2 = src_sb->st_mode;\n      uVar7 = dst_sb->st_mode;\n    }\n    iVar3 = qset_acl(dst_name,dest_desc,uVar2 & uVar7 & 0x1c0);\n    if (iVar3 != 0) {\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (x->owner_privileges == false)) {\n        return -(uint)x->require_preserve;\n      }\n      pcVar5 = quotearg_style(shell_escape_always_quoting_style,dst_name);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    /* WARNING: Subroutine does not return */\n      error(0,*piVar4,uVar6,pcVar5);\n    }\n  }\nLAB_00015b93:\n  if (dest_desc == -1) {\n    iVar3 = lchown(dst_name,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(dst_name,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  else {\n    iVar3 = fchown(dest_desc,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(dest_desc,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  _Var1 = chown_failure_ok(x);\n  if (!_Var1) {\n    pcVar5 = quotearg_style(shell_escape_always_quoting_style,dst_name);\n    uVar6 = dcgettext(0,"failed to preserve ownership for %s",5);\n                    /* WARNING: Subroutine does not return */\n    error(0,*piVar4,uVar6,pcVar5);\n  }\n  return 0;\n}" { (declaration "__gid_t __group;" type_identifier identifier ;) (declaration "__uid_t __owner;" type_identifier identifier ;) (declaration "_Bool _Var1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "undefined4 uVar6;" type_identifier identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (expression_statement "__group = src_sb->st_gid;" (assignment_expression "__group = src_sb->st_gid" identifier = (field_expression "src_sb->st_gid" identifier -> field_identifier)) ;) (expression_statement "__owner = src_sb->st_uid;" (assignment_expression "__owner = src_sb->st_uid" identifier = (field_expression "src_sb->st_uid" identifier -> field_identifier)) ;) (if_statement "if (!new_dst) {\n    if ((x->preserve_mode == false) && (x->move_mode == false)) {\n      if (x->set_mode == false) goto LAB_00015b93;\n      uVar7 = dst_sb->st_mode;\n      uVar2 = x->mode;\n    }\n    else {\n      uVar2 = src_sb->st_mode;\n      uVar7 = dst_sb->st_mode;\n    }\n    iVar3 = qset_acl(dst_name,dest_desc,uVar2 & uVar7 & 0x1c0);\n    if (iVar3 != 0) {\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (x->owner_privileges == false)) {\n        return -(uint)x->require_preserve;\n      }\n      pcVar5 = quotearg_style(shell_escape_always_quoting_style,dst_name);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    /* WARNING: Subroutine does not return */\n      error(0,*piVar4,uVar6,pcVar5);\n    }\n  }" if (parenthesized_expression "(!new_dst)" ( (unary_expression "!new_dst" ! identifier) )) (compound_statement "{\n    if ((x->preserve_mode == false) && (x->move_mode == false)) {\n      if (x->set_mode == false) goto LAB_00015b93;\n      uVar7 = dst_sb->st_mode;\n      uVar2 = x->mode;\n    }\n    else {\n      uVar2 = src_sb->st_mode;\n      uVar7 = dst_sb->st_mode;\n    }\n    iVar3 = qset_acl(dst_name,dest_desc,uVar2 & uVar7 & 0x1c0);\n    if (iVar3 != 0) {\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (x->owner_privileges == false)) {\n        return -(uint)x->require_preserve;\n      }\n      pcVar5 = quotearg_style(shell_escape_always_quoting_style,dst_name);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    /* WARNING: Subroutine does not return */\n      error(0,*piVar4,uVar6,pcVar5);\n    }\n  }" { (if_statement "if ((x->preserve_mode == false) && (x->move_mode == false)) {\n      if (x->set_mode == false) goto LAB_00015b93;\n      uVar7 = dst_sb->st_mode;\n      uVar2 = x->mode;\n    }\n    else {\n      uVar2 = src_sb->st_mode;\n      uVar7 = dst_sb->st_mode;\n    }" if (parenthesized_expression "((x->preserve_mode == false) && (x->move_mode == false))" ( (binary_expression "(x->preserve_mode == false) && (x->move_mode == false)" (parenthesized_expression "(x->preserve_mode == false)" ( (binary_expression "x->preserve_mode == false" (field_expression "x->preserve_mode" identifier -> field_identifier) == false) )) && (parenthesized_expression "(x->move_mode == false)" ( (binary_expression "x->move_mode == false" (field_expression "x->move_mode" identifier -> field_identifier) == false) ))) )) (compound_statement "{\n      if (x->set_mode == false) goto LAB_00015b93;\n      uVar7 = dst_sb->st_mode;\n      uVar2 = x->mode;\n    }" { (if_statement "if (x->set_mode == false) goto LAB_00015b93;" if (parenthesized_expression "(x->set_mode == false)" ( (binary_expression "x->set_mode == false" (field_expression "x->set_mode" identifier -> field_identifier) == false) )) (goto_statement "goto LAB_00015b93;" goto statement_identifier ;)) (expression_statement "uVar7 = dst_sb->st_mode;" (assignment_expression "uVar7 = dst_sb->st_mode" identifier = (field_expression "dst_sb->st_mode" identifier -> field_identifier)) ;) (expression_statement "uVar2 = x->mode;" (assignment_expression "uVar2 = x->mode" identifier = (field_expression "x->mode" identifier -> field_identifier)) ;) }) (else_clause "else {\n      uVar2 = src_sb->st_mode;\n      uVar7 = dst_sb->st_mode;\n    }" else (compound_statement "{\n      uVar2 = src_sb->st_mode;\n      uVar7 = dst_sb->st_mode;\n    }" { (expression_statement "uVar2 = src_sb->st_mode;" (assignment_expression "uVar2 = src_sb->st_mode" identifier = (field_expression "src_sb->st_mode" identifier -> field_identifier)) ;) (expression_statement "uVar7 = dst_sb->st_mode;" (assignment_expression "uVar7 = dst_sb->st_mode" identifier = (field_expression "dst_sb->st_mode" identifier -> field_identifier)) ;) }))) (expression_statement "iVar3 = qset_acl(dst_name,dest_desc,uVar2 & uVar7 & 0x1c0);" (assignment_expression "iVar3 = qset_acl(dst_name,dest_desc,uVar2 & uVar7 & 0x1c0)" identifier = (call_expression "qset_acl(dst_name,dest_desc,uVar2 & uVar7 & 0x1c0)" identifier (argument_list "(dst_name,dest_desc,uVar2 & uVar7 & 0x1c0)" ( identifier , identifier , (binary_expression "uVar2 & uVar7 & 0x1c0" (binary_expression "uVar2 & uVar7" identifier & identifier) & number_literal) )))) ;) (if_statement "if (iVar3 != 0) {\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (x->owner_privileges == false)) {\n        return -(uint)x->require_preserve;\n      }\n      pcVar5 = quotearg_style(shell_escape_always_quoting_style,dst_name);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    /* WARNING: Subroutine does not return */\n      error(0,*piVar4,uVar6,pcVar5);\n    }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (x->owner_privileges == false)) {\n        return -(uint)x->require_preserve;\n      }\n      pcVar5 = quotearg_style(shell_escape_always_quoting_style,dst_name);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    /* WARNING: Subroutine does not return */\n      error(0,*piVar4,uVar6,pcVar5);\n    }" { (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (x->owner_privileges == false)) {\n        return -(uint)x->require_preserve;\n      }" if (parenthesized_expression "(((*piVar4 == 1) || (*piVar4 == 0x16)) && (x->owner_privileges == false))" ( (binary_expression "((*piVar4 == 1) || (*piVar4 == 0x16)) && (x->owner_privileges == false)" (parenthesized_expression "((*piVar4 == 1) || (*piVar4 == 0x16))" ( (binary_expression "(*piVar4 == 1) || (*piVar4 == 0x16)" (parenthesized_expression "(*piVar4 == 1)" ( (binary_expression "*piVar4 == 1" (pointer_expression "*piVar4" * identifier) == number_literal) )) || (parenthesized_expression "(*piVar4 == 0x16)" ( (binary_expression "*piVar4 == 0x16" (pointer_expression "*piVar4" * identifier) == number_literal) ))) )) && (parenthesized_expression "(x->owner_privileges == false)" ( (binary_expression "x->owner_privileges == false" (field_expression "x->owner_privileges" identifier -> field_identifier) == false) ))) )) (compound_statement "{\n        return -(uint)x->require_preserve;\n      }" { (return_statement "return -(uint)x->require_preserve;" return (unary_expression "-(uint)x->require_preserve" - (cast_expression "(uint)x->require_preserve" ( (type_descriptor "uint" type_identifier) ) (field_expression "x->require_preserve" identifier -> field_identifier))) ;) })) (expression_statement "pcVar5 = quotearg_style(shell_escape_always_quoting_style,dst_name);" (assignment_expression "pcVar5 = quotearg_style(shell_escape_always_quoting_style,dst_name)" identifier = (call_expression "quotearg_style(shell_escape_always_quoting_style,dst_name)" identifier (argument_list "(shell_escape_always_quoting_style,dst_name)" ( identifier , identifier )))) ;) (expression_statement "uVar6 = dcgettext(0,"clearing permissions for %s",5);" (assignment_expression "uVar6 = dcgettext(0,"clearing permissions for %s",5)" identifier = (call_expression "dcgettext(0,"clearing permissions for %s",5)" identifier (argument_list "(0,"clearing permissions for %s",5)" ( number_literal , (string_literal ""clearing permissions for %s"" " string_content ") , number_literal )))) ;) comment (expression_statement "error(0,*piVar4,uVar6,pcVar5);" (call_expression "error(0,*piVar4,uVar6,pcVar5)" identifier (argument_list "(0,*piVar4,uVar6,pcVar5)" ( number_literal , (pointer_expression "*piVar4" * identifier) , identifier , identifier ))) ;) })) })) (labeled_statement "LAB_00015b93:\n  if (dest_desc == -1) {\n    iVar3 = lchown(dst_name,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(dst_name,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  else {\n    iVar3 = fchown(dest_desc,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(dest_desc,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }" statement_identifier : (if_statement "if (dest_desc == -1) {\n    iVar3 = lchown(dst_name,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(dst_name,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  else {\n    iVar3 = fchown(dest_desc,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(dest_desc,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }" if (parenthesized_expression "(dest_desc == -1)" ( (binary_expression "dest_desc == -1" identifier == number_literal) )) (compound_statement "{\n    iVar3 = lchown(dst_name,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(dst_name,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }" { (expression_statement "iVar3 = lchown(dst_name,__owner,__group);" (assignment_expression "iVar3 = lchown(dst_name,__owner,__group)" identifier = (call_expression "lchown(dst_name,__owner,__group)" identifier (argument_list "(dst_name,__owner,__group)" ( identifier , identifier , identifier )))) ;) (if_statement "if (iVar3 == 0) {\n      return 1;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      return 1;\n    }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar3 = *piVar4;" (assignment_expression "iVar3 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) (if_statement "if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(dst_name,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }" if (parenthesized_expression "((iVar3 == 1) || (iVar3 == 0x16))" ( (binary_expression "(iVar3 == 1) || (iVar3 == 0x16)" (parenthesized_expression "(iVar3 == 1)" ( (binary_expression "iVar3 == 1" identifier == number_literal) )) || (parenthesized_expression "(iVar3 == 0x16)" ( (binary_expression "iVar3 == 0x16" identifier == number_literal) ))) )) (compound_statement "{\n      lchown(dst_name,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }" { (expression_statement "lchown(dst_name,0xffffffff,__group);" (call_expression "lchown(dst_name,0xffffffff,__group)" identifier (argument_list "(dst_name,0xffffffff,__group)" ( identifier , number_literal , identifier ))) ;) (expression_statement "*piVar4 = iVar3;" (assignment_expression "*piVar4 = iVar3" (pointer_expression "*piVar4" * identifier) = identifier) ;) })) }) (else_clause "else {\n    iVar3 = fchown(dest_desc,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(dest_desc,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }" else (compound_statement "{\n    iVar3 = fchown(dest_desc,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(dest_desc,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }" { (expression_statement "iVar3 = fchown(dest_desc,__owner,__group);" (assignment_expression "iVar3 = fchown(dest_desc,__owner,__group)" identifier = (call_expression "fchown(dest_desc,__owner,__group)" identifier (argument_list "(dest_desc,__owner,__group)" ( identifier , identifier , identifier )))) ;) (if_statement "if (iVar3 == 0) {\n      return 1;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      return 1;\n    }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar3 = *piVar4;" (assignment_expression "iVar3 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) (if_statement "if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(dest_desc,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }" if (parenthesized_expression "((iVar3 == 1) || (iVar3 == 0x16))" ( (binary_expression "(iVar3 == 1) || (iVar3 == 0x16)" (parenthesized_expression "(iVar3 == 1)" ( (binary_expression "iVar3 == 1" identifier == number_literal) )) || (parenthesized_expression "(iVar3 == 0x16)" ( (binary_expression "iVar3 == 0x16" identifier == number_literal) ))) )) (compound_statement "{\n      fchown(dest_desc,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }" { (expression_statement "fchown(dest_desc,0xffffffff,__group);" (call_expression "fchown(dest_desc,0xffffffff,__group)" identifier (argument_list "(dest_desc,0xffffffff,__group)" ( identifier , number_literal , identifier ))) ;) (expression_statement "*piVar4 = iVar3;" (assignment_expression "*piVar4 = iVar3" (pointer_expression "*piVar4" * identifier) = identifier) ;) })) })))) (expression_statement "_Var1 = chown_failure_ok(x);" (assignment_expression "_Var1 = chown_failure_ok(x)" identifier = (call_expression "chown_failure_ok(x)" identifier (argument_list "(x)" ( identifier )))) ;) (if_statement "if (!_Var1) {\n    pcVar5 = quotearg_style(shell_escape_always_quoting_style,dst_name);\n    uVar6 = dcgettext(0,"failed to preserve ownership for %s",5);\n                    /* WARNING: Subroutine does not return */\n    error(0,*piVar4,uVar6,pcVar5);\n  }" if (parenthesized_expression "(!_Var1)" ( (unary_expression "!_Var1" ! identifier) )) (compound_statement "{\n    pcVar5 = quotearg_style(shell_escape_always_quoting_style,dst_name);\n    uVar6 = dcgettext(0,"failed to preserve ownership for %s",5);\n                    /* WARNING: Subroutine does not return */\n    error(0,*piVar4,uVar6,pcVar5);\n  }" { (expression_statement "pcVar5 = quotearg_style(shell_escape_always_quoting_style,dst_name);" (assignment_expression "pcVar5 = quotearg_style(shell_escape_always_quoting_style,dst_name)" identifier = (call_expression "quotearg_style(shell_escape_always_quoting_style,dst_name)" identifier (argument_list "(shell_escape_always_quoting_style,dst_name)" ( identifier , identifier )))) ;) (expression_statement "uVar6 = dcgettext(0,"failed to preserve ownership for %s",5);" (assignment_expression "uVar6 = dcgettext(0,"failed to preserve ownership for %s",5)" identifier = (call_expression "dcgettext(0,"failed to preserve ownership for %s",5)" identifier (argument_list "(0,"failed to preserve ownership for %s",5)" ( number_literal , (string_literal ""failed to preserve ownership for %s"" " string_content ") , number_literal )))) ;) comment (expression_statement "error(0,*piVar4,uVar6,pcVar5);" (call_expression "error(0,*piVar4,uVar6,pcVar5)" identifier (argument_list "(0,*piVar4,uVar6,pcVar5)" ( number_literal , (pointer_expression "*piVar4" * identifier) , identifier , identifier ))) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "int __regparm3\nFUN_00015b30(int param_1,char *param_2,int param_3,int param_4,char param_5,int param_6)\n\n{\n  __gid_t __group;\n  __uid_t __owner;\n  char cVar1;\n  uint uVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  uint uVar7;\n  \n  __group = *(__gid_t *)(param_4 + 0x1c);\n  __owner = *(__uid_t *)(param_4 + 0x18);\n  if (param_5 == '\0') {\n    if ((*(char *)(param_1 + 0x1e) == '\0') && (*(char *)(param_1 + 0x18) == '\0')) {\n      if (*(char *)(param_1 + 0x2b) == '\0') goto LAB_00015b93;\n      uVar7 = *(uint *)(param_6 + 0x10);\n      uVar2 = *(uint *)(param_1 + 0x10);\n    }\n    else {\n      uVar2 = *(uint *)(param_4 + 0x10);\n      uVar7 = *(uint *)(param_6 + 0x10);\n    }\n    iVar3 = FUN_0001ed30(param_2,param_3,uVar2 & uVar7 & 0x1c0);\n    if (iVar3 != 0) {\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')) {\n        return -(uint)*(byte *)(param_1 + 0x24);\n      }\n      uVar5 = FUN_00020b50(4,param_2);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    \n      error(0,*piVar4,uVar6,uVar5);\n    }\n  }\nLAB_00015b93:\n  if (param_3 == -1) {\n    iVar3 = lchown(param_2,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(param_2,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  else {\n    iVar3 = fchown(param_3,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(param_3,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  cVar1 = FUN_00015af0(param_1);\n  if (cVar1 == '\0') {\n    uVar5 = FUN_00020b50(4,param_2);\n    uVar6 = dcgettext(0,"failed to preserve ownership for %s",5);\n                    \n    error(0,*piVar4,uVar6,uVar5);\n  }\n  return 0;\n}\n\n" (function_definition "int __regparm3\nFUN_00015b30(int param_1,char *param_2,int param_3,int param_4,char param_5,int param_6)\n\n{\n  __gid_t __group;\n  __uid_t __owner;\n  char cVar1;\n  uint uVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  uint uVar7;\n  \n  __group = *(__gid_t *)(param_4 + 0x1c);\n  __owner = *(__uid_t *)(param_4 + 0x18);\n  if (param_5 == '\0') {\n    if ((*(char *)(param_1 + 0x1e) == '\0') && (*(char *)(param_1 + 0x18) == '\0')) {\n      if (*(char *)(param_1 + 0x2b) == '\0') goto LAB_00015b93;\n      uVar7 = *(uint *)(param_6 + 0x10);\n      uVar2 = *(uint *)(param_1 + 0x10);\n    }\n    else {\n      uVar2 = *(uint *)(param_4 + 0x10);\n      uVar7 = *(uint *)(param_6 + 0x10);\n    }\n    iVar3 = FUN_0001ed30(param_2,param_3,uVar2 & uVar7 & 0x1c0);\n    if (iVar3 != 0) {\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')) {\n        return -(uint)*(byte *)(param_1 + 0x24);\n      }\n      uVar5 = FUN_00020b50(4,param_2);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    \n      error(0,*piVar4,uVar6,uVar5);\n    }\n  }\nLAB_00015b93:\n  if (param_3 == -1) {\n    iVar3 = lchown(param_2,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(param_2,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  else {\n    iVar3 = fchown(param_3,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(param_3,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  cVar1 = FUN_00015af0(param_1);\n  if (cVar1 == '\0') {\n    uVar5 = FUN_00020b50(4,param_2);\n    uVar6 = dcgettext(0,"failed to preserve ownership for %s",5);\n                    \n    error(0,*piVar4,uVar6,uVar5);\n  }\n  return 0;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00015b30(int param_1,char *param_2,int param_3,int param_4,char param_5,int param_6)" identifier (parameter_list "(int param_1,char *param_2,int param_3,int param_4,char param_5,int 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 "int param_4" primitive_type identifier) , (parameter_declaration "char param_5" primitive_type identifier) , (parameter_declaration "int param_6" primitive_type identifier) ))) (compound_statement "{\n  __gid_t __group;\n  __uid_t __owner;\n  char cVar1;\n  uint uVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  uint uVar7;\n  \n  __group = *(__gid_t *)(param_4 + 0x1c);\n  __owner = *(__uid_t *)(param_4 + 0x18);\n  if (param_5 == '\0') {\n    if ((*(char *)(param_1 + 0x1e) == '\0') && (*(char *)(param_1 + 0x18) == '\0')) {\n      if (*(char *)(param_1 + 0x2b) == '\0') goto LAB_00015b93;\n      uVar7 = *(uint *)(param_6 + 0x10);\n      uVar2 = *(uint *)(param_1 + 0x10);\n    }\n    else {\n      uVar2 = *(uint *)(param_4 + 0x10);\n      uVar7 = *(uint *)(param_6 + 0x10);\n    }\n    iVar3 = FUN_0001ed30(param_2,param_3,uVar2 & uVar7 & 0x1c0);\n    if (iVar3 != 0) {\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')) {\n        return -(uint)*(byte *)(param_1 + 0x24);\n      }\n      uVar5 = FUN_00020b50(4,param_2);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    \n      error(0,*piVar4,uVar6,uVar5);\n    }\n  }\nLAB_00015b93:\n  if (param_3 == -1) {\n    iVar3 = lchown(param_2,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(param_2,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  else {\n    iVar3 = fchown(param_3,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(param_3,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  cVar1 = FUN_00015af0(param_1);\n  if (cVar1 == '\0') {\n    uVar5 = FUN_00020b50(4,param_2);\n    uVar6 = dcgettext(0,"failed to preserve ownership for %s",5);\n                    \n    error(0,*piVar4,uVar6,uVar5);\n  }\n  return 0;\n}" { (declaration "__gid_t __group;" type_identifier identifier ;) (declaration "__uid_t __owner;" type_identifier identifier ;) (declaration "char cVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "undefined4 uVar6;" type_identifier identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (expression_statement "__group = *(__gid_t *)(param_4 + 0x1c);" (assignment_expression "__group = *(__gid_t *)(param_4 + 0x1c)" identifier = (pointer_expression "*(__gid_t *)(param_4 + 0x1c)" * (cast_expression "(__gid_t *)(param_4 + 0x1c)" ( (type_descriptor "__gid_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0x1c)" ( (binary_expression "param_4 + 0x1c" identifier + number_literal) ))))) ;) (expression_statement "__owner = *(__uid_t *)(param_4 + 0x18);" (assignment_expression "__owner = *(__uid_t *)(param_4 + 0x18)" identifier = (pointer_expression "*(__uid_t *)(param_4 + 0x18)" * (cast_expression "(__uid_t *)(param_4 + 0x18)" ( (type_descriptor "__uid_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0x18)" ( (binary_expression "param_4 + 0x18" identifier + number_literal) ))))) ;) (if_statement "if (param_5 == '\0') {\n    if ((*(char *)(param_1 + 0x1e) == '\0') && (*(char *)(param_1 + 0x18) == '\0')) {\n      if (*(char *)(param_1 + 0x2b) == '\0') goto LAB_00015b93;\n      uVar7 = *(uint *)(param_6 + 0x10);\n      uVar2 = *(uint *)(param_1 + 0x10);\n    }\n    else {\n      uVar2 = *(uint *)(param_4 + 0x10);\n      uVar7 = *(uint *)(param_6 + 0x10);\n    }\n    iVar3 = FUN_0001ed30(param_2,param_3,uVar2 & uVar7 & 0x1c0);\n    if (iVar3 != 0) {\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')) {\n        return -(uint)*(byte *)(param_1 + 0x24);\n      }\n      uVar5 = FUN_00020b50(4,param_2);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    \n      error(0,*piVar4,uVar6,uVar5);\n    }\n  }" if (parenthesized_expression "(param_5 == '\0')" ( (binary_expression "param_5 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    if ((*(char *)(param_1 + 0x1e) == '\0') && (*(char *)(param_1 + 0x18) == '\0')) {\n      if (*(char *)(param_1 + 0x2b) == '\0') goto LAB_00015b93;\n      uVar7 = *(uint *)(param_6 + 0x10);\n      uVar2 = *(uint *)(param_1 + 0x10);\n    }\n    else {\n      uVar2 = *(uint *)(param_4 + 0x10);\n      uVar7 = *(uint *)(param_6 + 0x10);\n    }\n    iVar3 = FUN_0001ed30(param_2,param_3,uVar2 & uVar7 & 0x1c0);\n    if (iVar3 != 0) {\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')) {\n        return -(uint)*(byte *)(param_1 + 0x24);\n      }\n      uVar5 = FUN_00020b50(4,param_2);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    \n      error(0,*piVar4,uVar6,uVar5);\n    }\n  }" { (if_statement "if ((*(char *)(param_1 + 0x1e) == '\0') && (*(char *)(param_1 + 0x18) == '\0')) {\n      if (*(char *)(param_1 + 0x2b) == '\0') goto LAB_00015b93;\n      uVar7 = *(uint *)(param_6 + 0x10);\n      uVar2 = *(uint *)(param_1 + 0x10);\n    }\n    else {\n      uVar2 = *(uint *)(param_4 + 0x10);\n      uVar7 = *(uint *)(param_6 + 0x10);\n    }" if (parenthesized_expression "((*(char *)(param_1 + 0x1e) == '\0') && (*(char *)(param_1 + 0x18) == '\0'))" ( (binary_expression "(*(char *)(param_1 + 0x1e) == '\0') && (*(char *)(param_1 + 0x18) == '\0')" (parenthesized_expression "(*(char *)(param_1 + 0x1e) == '\0')" ( (binary_expression "*(char *)(param_1 + 0x1e) == '\0'" (pointer_expression "*(char *)(param_1 + 0x1e)" * (cast_expression "(char *)(param_1 + 0x1e)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1e)" ( (binary_expression "param_1 + 0x1e" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(*(char *)(param_1 + 0x18) == '\0')" ( (binary_expression "*(char *)(param_1 + 0x18) == '\0'" (pointer_expression "*(char *)(param_1 + 0x18)" * (cast_expression "(char *)(param_1 + 0x18)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n      if (*(char *)(param_1 + 0x2b) == '\0') goto LAB_00015b93;\n      uVar7 = *(uint *)(param_6 + 0x10);\n      uVar2 = *(uint *)(param_1 + 0x10);\n    }" { (if_statement "if (*(char *)(param_1 + 0x2b) == '\0') goto LAB_00015b93;" if (parenthesized_expression "(*(char *)(param_1 + 0x2b) == '\0')" ( (binary_expression "*(char *)(param_1 + 0x2b) == '\0'" (pointer_expression "*(char *)(param_1 + 0x2b)" * (cast_expression "(char *)(param_1 + 0x2b)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2b)" ( (binary_expression "param_1 + 0x2b" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_00015b93;" goto statement_identifier ;)) (expression_statement "uVar7 = *(uint *)(param_6 + 0x10);" (assignment_expression "uVar7 = *(uint *)(param_6 + 0x10)" identifier = (pointer_expression "*(uint *)(param_6 + 0x10)" * (cast_expression "(uint *)(param_6 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_6 + 0x10)" ( (binary_expression "param_6 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = *(uint *)(param_1 + 0x10);" (assignment_expression "uVar2 = *(uint *)(param_1 + 0x10)" identifier = (pointer_expression "*(uint *)(param_1 + 0x10)" * (cast_expression "(uint *)(param_1 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) }) (else_clause "else {\n      uVar2 = *(uint *)(param_4 + 0x10);\n      uVar7 = *(uint *)(param_6 + 0x10);\n    }" else (compound_statement "{\n      uVar2 = *(uint *)(param_4 + 0x10);\n      uVar7 = *(uint *)(param_6 + 0x10);\n    }" { (expression_statement "uVar2 = *(uint *)(param_4 + 0x10);" (assignment_expression "uVar2 = *(uint *)(param_4 + 0x10)" identifier = (pointer_expression "*(uint *)(param_4 + 0x10)" * (cast_expression "(uint *)(param_4 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0x10)" ( (binary_expression "param_4 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "uVar7 = *(uint *)(param_6 + 0x10);" (assignment_expression "uVar7 = *(uint *)(param_6 + 0x10)" identifier = (pointer_expression "*(uint *)(param_6 + 0x10)" * (cast_expression "(uint *)(param_6 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_6 + 0x10)" ( (binary_expression "param_6 + 0x10" identifier + number_literal) ))))) ;) }))) (expression_statement "iVar3 = FUN_0001ed30(param_2,param_3,uVar2 & uVar7 & 0x1c0);" (assignment_expression "iVar3 = FUN_0001ed30(param_2,param_3,uVar2 & uVar7 & 0x1c0)" identifier = (call_expression "FUN_0001ed30(param_2,param_3,uVar2 & uVar7 & 0x1c0)" identifier (argument_list "(param_2,param_3,uVar2 & uVar7 & 0x1c0)" ( identifier , identifier , (binary_expression "uVar2 & uVar7 & 0x1c0" (binary_expression "uVar2 & uVar7" identifier & identifier) & number_literal) )))) ;) (if_statement "if (iVar3 != 0) {\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')) {\n        return -(uint)*(byte *)(param_1 + 0x24);\n      }\n      uVar5 = FUN_00020b50(4,param_2);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    \n      error(0,*piVar4,uVar6,uVar5);\n    }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')) {\n        return -(uint)*(byte *)(param_1 + 0x24);\n      }\n      uVar5 = FUN_00020b50(4,param_2);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    \n      error(0,*piVar4,uVar6,uVar5);\n    }" { (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')) {\n        return -(uint)*(byte *)(param_1 + 0x24);\n      }" if (parenthesized_expression "(((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0'))" ( (binary_expression "((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')" (parenthesized_expression "((*piVar4 == 1) || (*piVar4 == 0x16))" ( (binary_expression "(*piVar4 == 1) || (*piVar4 == 0x16)" (parenthesized_expression "(*piVar4 == 1)" ( (binary_expression "*piVar4 == 1" (pointer_expression "*piVar4" * identifier) == number_literal) )) || (parenthesized_expression "(*piVar4 == 0x16)" ( (binary_expression "*piVar4 == 0x16" (pointer_expression "*piVar4" * identifier) == number_literal) ))) )) && (parenthesized_expression "(*(char *)(param_1 + 0x1b) == '\0')" ( (binary_expression "*(char *)(param_1 + 0x1b) == '\0'" (pointer_expression "*(char *)(param_1 + 0x1b)" * (cast_expression "(char *)(param_1 + 0x1b)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1b)" ( (binary_expression "param_1 + 0x1b" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n        return -(uint)*(byte *)(param_1 + 0x24);\n      }" { (return_statement "return -(uint)*(byte *)(param_1 + 0x24);" return (binary_expression "-(uint)*(byte *)(param_1 + 0x24)" (unary_expression "-(uint)" - (parenthesized_expression "(uint)" ( identifier ))) * (cast_expression "(byte *)(param_1 + 0x24)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) ;) })) (expression_statement "uVar5 = FUN_00020b50(4,param_2);" (assignment_expression "uVar5 = FUN_00020b50(4,param_2)" identifier = (call_expression "FUN_00020b50(4,param_2)" identifier (argument_list "(4,param_2)" ( number_literal , identifier )))) ;) (expression_statement "uVar6 = dcgettext(0,"clearing permissions for %s",5);" (assignment_expression "uVar6 = dcgettext(0,"clearing permissions for %s",5)" identifier = (call_expression "dcgettext(0,"clearing permissions for %s",5)" identifier (argument_list "(0,"clearing permissions for %s",5)" ( number_literal , (string_literal ""clearing permissions for %s"" " string_content ") , number_literal )))) ;) (expression_statement "error(0,*piVar4,uVar6,uVar5);" (call_expression "error(0,*piVar4,uVar6,uVar5)" identifier (argument_list "(0,*piVar4,uVar6,uVar5)" ( number_literal , (pointer_expression "*piVar4" * identifier) , identifier , identifier ))) ;) })) })) (labeled_statement "LAB_00015b93:\n  if (param_3 == -1) {\n    iVar3 = lchown(param_2,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(param_2,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  else {\n    iVar3 = fchown(param_3,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(param_3,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }" statement_identifier : (if_statement "if (param_3 == -1) {\n    iVar3 = lchown(param_2,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(param_2,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  else {\n    iVar3 = fchown(param_3,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(param_3,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }" if (parenthesized_expression "(param_3 == -1)" ( (binary_expression "param_3 == -1" identifier == number_literal) )) (compound_statement "{\n    iVar3 = lchown(param_2,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(param_2,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }" { (expression_statement "iVar3 = lchown(param_2,__owner,__group);" (assignment_expression "iVar3 = lchown(param_2,__owner,__group)" identifier = (call_expression "lchown(param_2,__owner,__group)" identifier (argument_list "(param_2,__owner,__group)" ( identifier , identifier , identifier )))) ;) (if_statement "if (iVar3 == 0) {\n      return 1;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      return 1;\n    }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar3 = *piVar4;" (assignment_expression "iVar3 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) (if_statement "if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(param_2,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }" if (parenthesized_expression "((iVar3 == 1) || (iVar3 == 0x16))" ( (binary_expression "(iVar3 == 1) || (iVar3 == 0x16)" (parenthesized_expression "(iVar3 == 1)" ( (binary_expression "iVar3 == 1" identifier == number_literal) )) || (parenthesized_expression "(iVar3 == 0x16)" ( (binary_expression "iVar3 == 0x16" identifier == number_literal) ))) )) (compound_statement "{\n      lchown(param_2,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }" { (expression_statement "lchown(param_2,0xffffffff,__group);" (call_expression "lchown(param_2,0xffffffff,__group)" identifier (argument_list "(param_2,0xffffffff,__group)" ( identifier , number_literal , identifier ))) ;) (expression_statement "*piVar4 = iVar3;" (assignment_expression "*piVar4 = iVar3" (pointer_expression "*piVar4" * identifier) = identifier) ;) })) }) (else_clause "else {\n    iVar3 = fchown(param_3,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(param_3,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }" else (compound_statement "{\n    iVar3 = fchown(param_3,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(param_3,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }" { (expression_statement "iVar3 = fchown(param_3,__owner,__group);" (assignment_expression "iVar3 = fchown(param_3,__owner,__group)" identifier = (call_expression "fchown(param_3,__owner,__group)" identifier (argument_list "(param_3,__owner,__group)" ( identifier , identifier , identifier )))) ;) (if_statement "if (iVar3 == 0) {\n      return 1;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      return 1;\n    }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar3 = *piVar4;" (assignment_expression "iVar3 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) (if_statement "if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(param_3,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }" if (parenthesized_expression "((iVar3 == 1) || (iVar3 == 0x16))" ( (binary_expression "(iVar3 == 1) || (iVar3 == 0x16)" (parenthesized_expression "(iVar3 == 1)" ( (binary_expression "iVar3 == 1" identifier == number_literal) )) || (parenthesized_expression "(iVar3 == 0x16)" ( (binary_expression "iVar3 == 0x16" identifier == number_literal) ))) )) (compound_statement "{\n      fchown(param_3,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }" { (expression_statement "fchown(param_3,0xffffffff,__group);" (call_expression "fchown(param_3,0xffffffff,__group)" identifier (argument_list "(param_3,0xffffffff,__group)" ( identifier , number_literal , identifier ))) ;) (expression_statement "*piVar4 = iVar3;" (assignment_expression "*piVar4 = iVar3" (pointer_expression "*piVar4" * identifier) = identifier) ;) })) })))) (expression_statement "cVar1 = FUN_00015af0(param_1);" (assignment_expression "cVar1 = FUN_00015af0(param_1)" identifier = (call_expression "FUN_00015af0(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (cVar1 == '\0') {\n    uVar5 = FUN_00020b50(4,param_2);\n    uVar6 = dcgettext(0,"failed to preserve ownership for %s",5);\n                    \n    error(0,*piVar4,uVar6,uVar5);\n  }" if (parenthesized_expression "(cVar1 == '\0')" ( (binary_expression "cVar1 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    uVar5 = FUN_00020b50(4,param_2);\n    uVar6 = dcgettext(0,"failed to preserve ownership for %s",5);\n                    \n    error(0,*piVar4,uVar6,uVar5);\n  }" { (expression_statement "uVar5 = FUN_00020b50(4,param_2);" (assignment_expression "uVar5 = FUN_00020b50(4,param_2)" identifier = (call_expression "FUN_00020b50(4,param_2)" identifier (argument_list "(4,param_2)" ( number_literal , identifier )))) ;) (expression_statement "uVar6 = dcgettext(0,"failed to preserve ownership for %s",5);" (assignment_expression "uVar6 = dcgettext(0,"failed to preserve ownership for %s",5)" identifier = (call_expression "dcgettext(0,"failed to preserve ownership for %s",5)" identifier (argument_list "(0,"failed to preserve ownership for %s",5)" ( number_literal , (string_literal ""failed to preserve ownership for %s"" " string_content ") , number_literal )))) ;) (expression_statement "error(0,*piVar4,uVar6,uVar5);" (call_expression "error(0,*piVar4,uVar6,uVar5)" identifier (argument_list "(0,*piVar4,uVar6,uVar5)" ( number_literal , (pointer_expression "*piVar4" * identifier) , identifier , identifier ))) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (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) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (compound_statement { (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) )))) == (char_literal ' escape_sequence ')) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (char_literal ' escape_sequence ')) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (char_literal ' escape_sequence ')) )) (goto_statement goto statement_identifier ;)) (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) ))))) ;) }) (else_clause else (compound_statement { (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 = (call_expression IDENT (argument_list ( IDENT , IDENT , (binary_expression (binary_expression IDENT & IDENT) & LIT) )))) ;) (if_statement if (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 (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) || (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) ))) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (char_literal ' escape_sequence ')) ))) )) (compound_statement { (return_statement return (binary_expression (unary_expression - (parenthesized_expression ( IDENT ))) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , (string_literal " string_content ") , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT , (pointer_expression * IDENT) , IDENT , IDENT ))) ;) })) })) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (binary_expression IDENT == LIT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (binary_expression IDENT == LIT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) })) })))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , (string_literal " string_content ") , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT , (pointer_expression * IDENT) , IDENT , IDENT ))) ;) })) (return_statement return LIT ;) })))
(function_definition "int __regparm3\nFUN_00015b30(int param_1,char *param_2,int param_3,int param_4,char param_5,int param_6)\n\n{\n  __gid_t __group;\n  __uid_t __owner;\n  char cVar1;\n  uint uVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  uint uVar7;\n  \n  __group = *(__gid_t *)(param_4 + 0x1c);\n  __owner = *(__uid_t *)(param_4 + 0x18);\n  if (param_5 == '\0') {\n    if ((*(char *)(param_1 + 0x1e) == '\0') && (*(char *)(param_1 + 0x18) == '\0')) {\n      if (*(char *)(param_1 + 0x2b) == '\0') goto LAB_00015b93;\n      uVar7 = *(uint *)(param_6 + 0x10);\n      uVar2 = *(uint *)(param_1 + 0x10);\n    }\n    else {\n      uVar2 = *(uint *)(param_4 + 0x10);\n      uVar7 = *(uint *)(param_6 + 0x10);\n    }\n    iVar3 = FUN_0001ed30(param_2,param_3,uVar2 & uVar7 & 0x1c0);\n    if (iVar3 != 0) {\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')) {\n        return -(uint)*(byte *)(param_1 + 0x24);\n      }\n      uVar5 = FUN_00020b50(4,param_2);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    \n      error(0,*piVar4,uVar6,uVar5);\n    }\n  }\nLAB_00015b93:\n  if (param_3 == -1) {\n    iVar3 = lchown(param_2,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(param_2,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  else {\n    iVar3 = fchown(param_3,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(param_3,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  cVar1 = FUN_00015af0(param_1);\n  if (cVar1 == '\0') {\n    uVar5 = FUN_00020b50(4,param_2);\n    uVar6 = dcgettext(0,"failed to preserve ownership for %s",5);\n                    \n    error(0,*piVar4,uVar6,uVar5);\n  }\n  return 0;\n}" (primitive_type "int") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00015b30(int param_1,char *param_2,int param_3,int param_4,char param_5,int param_6)" (identifier "FUN_00015b30") (parameter_list "(int param_1,char *param_2,int param_3,int param_4,char param_5,int 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 "int param_4" (primitive_type "int") (identifier "param_4")) (, ",") (parameter_declaration "char param_5" (primitive_type "char") (identifier "param_5")) (, ",") (parameter_declaration "int param_6" (primitive_type "int") (identifier "param_6")) () ")"))) (compound_statement "{\n  __gid_t __group;\n  __uid_t __owner;\n  char cVar1;\n  uint uVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  uint uVar7;\n  \n  __group = *(__gid_t *)(param_4 + 0x1c);\n  __owner = *(__uid_t *)(param_4 + 0x18);\n  if (param_5 == '\0') {\n    if ((*(char *)(param_1 + 0x1e) == '\0') && (*(char *)(param_1 + 0x18) == '\0')) {\n      if (*(char *)(param_1 + 0x2b) == '\0') goto LAB_00015b93;\n      uVar7 = *(uint *)(param_6 + 0x10);\n      uVar2 = *(uint *)(param_1 + 0x10);\n    }\n    else {\n      uVar2 = *(uint *)(param_4 + 0x10);\n      uVar7 = *(uint *)(param_6 + 0x10);\n    }\n    iVar3 = FUN_0001ed30(param_2,param_3,uVar2 & uVar7 & 0x1c0);\n    if (iVar3 != 0) {\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')) {\n        return -(uint)*(byte *)(param_1 + 0x24);\n      }\n      uVar5 = FUN_00020b50(4,param_2);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    \n      error(0,*piVar4,uVar6,uVar5);\n    }\n  }\nLAB_00015b93:\n  if (param_3 == -1) {\n    iVar3 = lchown(param_2,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(param_2,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  else {\n    iVar3 = fchown(param_3,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(param_3,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  cVar1 = FUN_00015af0(param_1);\n  if (cVar1 == '\0') {\n    uVar5 = FUN_00020b50(4,param_2);\n    uVar6 = dcgettext(0,"failed to preserve ownership for %s",5);\n                    \n    error(0,*piVar4,uVar6,uVar5);\n  }\n  return 0;\n}" ({ "{") (declaration "__gid_t __group;" (type_identifier "__gid_t") (identifier "__group") (; ";")) (declaration "__uid_t __owner;" (type_identifier "__uid_t") (identifier "__owner") (; ";")) (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "undefined4 uVar5;" (type_identifier "undefined4") (identifier "uVar5") (; ";")) (declaration "undefined4 uVar6;" (type_identifier "undefined4") (identifier "uVar6") (; ";")) (declaration "uint uVar7;" (type_identifier "uint") (identifier "uVar7") (; ";")) (expression_statement "__group = *(__gid_t *)(param_4 + 0x1c);" (assignment_expression "__group = *(__gid_t *)(param_4 + 0x1c)" (identifier "__group") (= "=") (pointer_expression "*(__gid_t *)(param_4 + 0x1c)" (* "*") (cast_expression "(__gid_t *)(param_4 + 0x1c)" (( "(") (type_descriptor "__gid_t *" (type_identifier "__gid_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 0x1c)" (( "(") (binary_expression "param_4 + 0x1c" (identifier "param_4") (+ "+") (number_literal "0x1c")) () ")"))))) (; ";")) (expression_statement "__owner = *(__uid_t *)(param_4 + 0x18);" (assignment_expression "__owner = *(__uid_t *)(param_4 + 0x18)" (identifier "__owner") (= "=") (pointer_expression "*(__uid_t *)(param_4 + 0x18)" (* "*") (cast_expression "(__uid_t *)(param_4 + 0x18)" (( "(") (type_descriptor "__uid_t *" (type_identifier "__uid_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 0x18)" (( "(") (binary_expression "param_4 + 0x18" (identifier "param_4") (+ "+") (number_literal "0x18")) () ")"))))) (; ";")) (if_statement "if (param_5 == '\0') {\n    if ((*(char *)(param_1 + 0x1e) == '\0') && (*(char *)(param_1 + 0x18) == '\0')) {\n      if (*(char *)(param_1 + 0x2b) == '\0') goto LAB_00015b93;\n      uVar7 = *(uint *)(param_6 + 0x10);\n      uVar2 = *(uint *)(param_1 + 0x10);\n    }\n    else {\n      uVar2 = *(uint *)(param_4 + 0x10);\n      uVar7 = *(uint *)(param_6 + 0x10);\n    }\n    iVar3 = FUN_0001ed30(param_2,param_3,uVar2 & uVar7 & 0x1c0);\n    if (iVar3 != 0) {\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')) {\n        return -(uint)*(byte *)(param_1 + 0x24);\n      }\n      uVar5 = FUN_00020b50(4,param_2);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    \n      error(0,*piVar4,uVar6,uVar5);\n    }\n  }" (if "if") (parenthesized_expression "(param_5 == '\0')" (( "(") (binary_expression "param_5 == '\0'" (identifier "param_5") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    if ((*(char *)(param_1 + 0x1e) == '\0') && (*(char *)(param_1 + 0x18) == '\0')) {\n      if (*(char *)(param_1 + 0x2b) == '\0') goto LAB_00015b93;\n      uVar7 = *(uint *)(param_6 + 0x10);\n      uVar2 = *(uint *)(param_1 + 0x10);\n    }\n    else {\n      uVar2 = *(uint *)(param_4 + 0x10);\n      uVar7 = *(uint *)(param_6 + 0x10);\n    }\n    iVar3 = FUN_0001ed30(param_2,param_3,uVar2 & uVar7 & 0x1c0);\n    if (iVar3 != 0) {\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')) {\n        return -(uint)*(byte *)(param_1 + 0x24);\n      }\n      uVar5 = FUN_00020b50(4,param_2);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    \n      error(0,*piVar4,uVar6,uVar5);\n    }\n  }" ({ "{") (if_statement "if ((*(char *)(param_1 + 0x1e) == '\0') && (*(char *)(param_1 + 0x18) == '\0')) {\n      if (*(char *)(param_1 + 0x2b) == '\0') goto LAB_00015b93;\n      uVar7 = *(uint *)(param_6 + 0x10);\n      uVar2 = *(uint *)(param_1 + 0x10);\n    }\n    else {\n      uVar2 = *(uint *)(param_4 + 0x10);\n      uVar7 = *(uint *)(param_6 + 0x10);\n    }" (if "if") (parenthesized_expression "((*(char *)(param_1 + 0x1e) == '\0') && (*(char *)(param_1 + 0x18) == '\0'))" (( "(") (binary_expression "(*(char *)(param_1 + 0x1e) == '\0') && (*(char *)(param_1 + 0x18) == '\0')" (parenthesized_expression "(*(char *)(param_1 + 0x1e) == '\0')" (( "(") (binary_expression "*(char *)(param_1 + 0x1e) == '\0'" (pointer_expression "*(char *)(param_1 + 0x1e)" (* "*") (cast_expression "(char *)(param_1 + 0x1e)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1e)" (( "(") (binary_expression "param_1 + 0x1e" (identifier "param_1") (+ "+") (number_literal "0x1e")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (&& "&&") (parenthesized_expression "(*(char *)(param_1 + 0x18) == '\0')" (( "(") (binary_expression "*(char *)(param_1 + 0x18) == '\0'" (pointer_expression "*(char *)(param_1 + 0x18)" (* "*") (cast_expression "(char *)(param_1 + 0x18)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")"))) () ")")) (compound_statement "{\n      if (*(char *)(param_1 + 0x2b) == '\0') goto LAB_00015b93;\n      uVar7 = *(uint *)(param_6 + 0x10);\n      uVar2 = *(uint *)(param_1 + 0x10);\n    }" ({ "{") (if_statement "if (*(char *)(param_1 + 0x2b) == '\0') goto LAB_00015b93;" (if "if") (parenthesized_expression "(*(char *)(param_1 + 0x2b) == '\0')" (( "(") (binary_expression "*(char *)(param_1 + 0x2b) == '\0'" (pointer_expression "*(char *)(param_1 + 0x2b)" (* "*") (cast_expression "(char *)(param_1 + 0x2b)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2b)" (( "(") (binary_expression "param_1 + 0x2b" (identifier "param_1") (+ "+") (number_literal "0x2b")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (goto_statement "goto LAB_00015b93;" (goto "goto") (statement_identifier "LAB_00015b93") (; ";"))) (expression_statement "uVar7 = *(uint *)(param_6 + 0x10);" (assignment_expression "uVar7 = *(uint *)(param_6 + 0x10)" (identifier "uVar7") (= "=") (pointer_expression "*(uint *)(param_6 + 0x10)" (* "*") (cast_expression "(uint *)(param_6 + 0x10)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_6 + 0x10)" (( "(") (binary_expression "param_6 + 0x10" (identifier "param_6") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (expression_statement "uVar2 = *(uint *)(param_1 + 0x10);" (assignment_expression "uVar2 = *(uint *)(param_1 + 0x10)" (identifier "uVar2") (= "=") (pointer_expression "*(uint *)(param_1 + 0x10)" (* "*") (cast_expression "(uint *)(param_1 + 0x10)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (} "}")) (else_clause "else {\n      uVar2 = *(uint *)(param_4 + 0x10);\n      uVar7 = *(uint *)(param_6 + 0x10);\n    }" (else "else") (compound_statement "{\n      uVar2 = *(uint *)(param_4 + 0x10);\n      uVar7 = *(uint *)(param_6 + 0x10);\n    }" ({ "{") (expression_statement "uVar2 = *(uint *)(param_4 + 0x10);" (assignment_expression "uVar2 = *(uint *)(param_4 + 0x10)" (identifier "uVar2") (= "=") (pointer_expression "*(uint *)(param_4 + 0x10)" (* "*") (cast_expression "(uint *)(param_4 + 0x10)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 0x10)" (( "(") (binary_expression "param_4 + 0x10" (identifier "param_4") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (expression_statement "uVar7 = *(uint *)(param_6 + 0x10);" (assignment_expression "uVar7 = *(uint *)(param_6 + 0x10)" (identifier "uVar7") (= "=") (pointer_expression "*(uint *)(param_6 + 0x10)" (* "*") (cast_expression "(uint *)(param_6 + 0x10)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_6 + 0x10)" (( "(") (binary_expression "param_6 + 0x10" (identifier "param_6") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (} "}")))) (expression_statement "iVar3 = FUN_0001ed30(param_2,param_3,uVar2 & uVar7 & 0x1c0);" (assignment_expression "iVar3 = FUN_0001ed30(param_2,param_3,uVar2 & uVar7 & 0x1c0)" (identifier "iVar3") (= "=") (call_expression "FUN_0001ed30(param_2,param_3,uVar2 & uVar7 & 0x1c0)" (identifier "FUN_0001ed30") (argument_list "(param_2,param_3,uVar2 & uVar7 & 0x1c0)" (( "(") (identifier "param_2") (, ",") (identifier "param_3") (, ",") (binary_expression "uVar2 & uVar7 & 0x1c0" (binary_expression "uVar2 & uVar7" (identifier "uVar2") (& "&") (identifier "uVar7")) (& "&") (number_literal "0x1c0")) () ")")))) (; ";")) (if_statement "if (iVar3 != 0) {\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')) {\n        return -(uint)*(byte *)(param_1 + 0x24);\n      }\n      uVar5 = FUN_00020b50(4,param_2);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    \n      error(0,*piVar4,uVar6,uVar5);\n    }" (if "if") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      piVar4 = __errno_location();\n      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')) {\n        return -(uint)*(byte *)(param_1 + 0x24);\n      }\n      uVar5 = FUN_00020b50(4,param_2);\n      uVar6 = dcgettext(0,"clearing permissions for %s",5);\n                    \n      error(0,*piVar4,uVar6,uVar5);\n    }" ({ "{") (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" (identifier "piVar4") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')) {\n        return -(uint)*(byte *)(param_1 + 0x24);\n      }" (if "if") (parenthesized_expression "(((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0'))" (( "(") (binary_expression "((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')" (parenthesized_expression "((*piVar4 == 1) || (*piVar4 == 0x16))" (( "(") (binary_expression "(*piVar4 == 1) || (*piVar4 == 0x16)" (parenthesized_expression "(*piVar4 == 1)" (( "(") (binary_expression "*piVar4 == 1" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (== "==") (number_literal "1")) () ")")) (|| "||") (parenthesized_expression "(*piVar4 == 0x16)" (( "(") (binary_expression "*piVar4 == 0x16" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (== "==") (number_literal "0x16")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(*(char *)(param_1 + 0x1b) == '\0')" (( "(") (binary_expression "*(char *)(param_1 + 0x1b) == '\0'" (pointer_expression "*(char *)(param_1 + 0x1b)" (* "*") (cast_expression "(char *)(param_1 + 0x1b)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1b)" (( "(") (binary_expression "param_1 + 0x1b" (identifier "param_1") (+ "+") (number_literal "0x1b")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")"))) () ")")) (compound_statement "{\n        return -(uint)*(byte *)(param_1 + 0x24);\n      }" ({ "{") (return_statement "return -(uint)*(byte *)(param_1 + 0x24);" (return "return") (binary_expression "-(uint)*(byte *)(param_1 + 0x24)" (unary_expression "-(uint)" (- "-") (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")"))) (* "*") (cast_expression "(byte *)(param_1 + 0x24)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x24)" (( "(") (binary_expression "param_1 + 0x24" (identifier "param_1") (+ "+") (number_literal "0x24")) () ")")))) (; ";")) (} "}"))) (expression_statement "uVar5 = FUN_00020b50(4,param_2);" (assignment_expression "uVar5 = FUN_00020b50(4,param_2)" (identifier "uVar5") (= "=") (call_expression "FUN_00020b50(4,param_2)" (identifier "FUN_00020b50") (argument_list "(4,param_2)" (( "(") (number_literal "4") (, ",") (identifier "param_2") () ")")))) (; ";")) (expression_statement "uVar6 = dcgettext(0,"clearing permissions for %s",5);" (assignment_expression "uVar6 = dcgettext(0,"clearing permissions for %s",5)" (identifier "uVar6") (= "=") (call_expression "dcgettext(0,"clearing permissions for %s",5)" (identifier "dcgettext") (argument_list "(0,"clearing permissions for %s",5)" (( "(") (number_literal "0") (, ",") (string_literal ""clearing permissions for %s"" (" """) (string_content "clearing permissions for %s") (" """)) (, ",") (number_literal "5") () ")")))) (; ";")) (expression_statement "error(0,*piVar4,uVar6,uVar5);" (call_expression "error(0,*piVar4,uVar6,uVar5)" (identifier "error") (argument_list "(0,*piVar4,uVar6,uVar5)" (( "(") (number_literal "0") (, ",") (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (, ",") (identifier "uVar6") (, ",") (identifier "uVar5") () ")"))) (; ";")) (} "}"))) (} "}"))) (labeled_statement "LAB_00015b93:\n  if (param_3 == -1) {\n    iVar3 = lchown(param_2,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(param_2,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  else {\n    iVar3 = fchown(param_3,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(param_3,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }" (statement_identifier "LAB_00015b93") (: ":") (if_statement "if (param_3 == -1) {\n    iVar3 = lchown(param_2,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(param_2,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }\n  else {\n    iVar3 = fchown(param_3,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(param_3,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }" (if "if") (parenthesized_expression "(param_3 == -1)" (( "(") (binary_expression "param_3 == -1" (identifier "param_3") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n    iVar3 = lchown(param_2,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(param_2,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }" ({ "{") (expression_statement "iVar3 = lchown(param_2,__owner,__group);" (assignment_expression "iVar3 = lchown(param_2,__owner,__group)" (identifier "iVar3") (= "=") (call_expression "lchown(param_2,__owner,__group)" (identifier "lchown") (argument_list "(param_2,__owner,__group)" (( "(") (identifier "param_2") (, ",") (identifier "__owner") (, ",") (identifier "__group") () ")")))) (; ";")) (if_statement "if (iVar3 == 0) {\n      return 1;\n    }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      return 1;\n    }" ({ "{") (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" (identifier "piVar4") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar3 = *piVar4;" (assignment_expression "iVar3 = *piVar4" (identifier "iVar3") (= "=") (pointer_expression "*piVar4" (* "*") (identifier "piVar4"))) (; ";")) (if_statement "if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      lchown(param_2,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }" (if "if") (parenthesized_expression "((iVar3 == 1) || (iVar3 == 0x16))" (( "(") (binary_expression "(iVar3 == 1) || (iVar3 == 0x16)" (parenthesized_expression "(iVar3 == 1)" (( "(") (binary_expression "iVar3 == 1" (identifier "iVar3") (== "==") (number_literal "1")) () ")")) (|| "||") (parenthesized_expression "(iVar3 == 0x16)" (( "(") (binary_expression "iVar3 == 0x16" (identifier "iVar3") (== "==") (number_literal "0x16")) () ")"))) () ")")) (compound_statement "{\n      lchown(param_2,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }" ({ "{") (expression_statement "lchown(param_2,0xffffffff,__group);" (call_expression "lchown(param_2,0xffffffff,__group)" (identifier "lchown") (argument_list "(param_2,0xffffffff,__group)" (( "(") (identifier "param_2") (, ",") (number_literal "0xffffffff") (, ",") (identifier "__group") () ")"))) (; ";")) (expression_statement "*piVar4 = iVar3;" (assignment_expression "*piVar4 = iVar3" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (= "=") (identifier "iVar3")) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    iVar3 = fchown(param_3,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(param_3,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }" (else "else") (compound_statement "{\n    iVar3 = fchown(param_3,__owner,__group);\n    if (iVar3 == 0) {\n      return 1;\n    }\n    piVar4 = __errno_location();\n    iVar3 = *piVar4;\n    if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(param_3,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }\n  }" ({ "{") (expression_statement "iVar3 = fchown(param_3,__owner,__group);" (assignment_expression "iVar3 = fchown(param_3,__owner,__group)" (identifier "iVar3") (= "=") (call_expression "fchown(param_3,__owner,__group)" (identifier "fchown") (argument_list "(param_3,__owner,__group)" (( "(") (identifier "param_3") (, ",") (identifier "__owner") (, ",") (identifier "__group") () ")")))) (; ";")) (if_statement "if (iVar3 == 0) {\n      return 1;\n    }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      return 1;\n    }" ({ "{") (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" (identifier "piVar4") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar3 = *piVar4;" (assignment_expression "iVar3 = *piVar4" (identifier "iVar3") (= "=") (pointer_expression "*piVar4" (* "*") (identifier "piVar4"))) (; ";")) (if_statement "if ((iVar3 == 1) || (iVar3 == 0x16)) {\n      fchown(param_3,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }" (if "if") (parenthesized_expression "((iVar3 == 1) || (iVar3 == 0x16))" (( "(") (binary_expression "(iVar3 == 1) || (iVar3 == 0x16)" (parenthesized_expression "(iVar3 == 1)" (( "(") (binary_expression "iVar3 == 1" (identifier "iVar3") (== "==") (number_literal "1")) () ")")) (|| "||") (parenthesized_expression "(iVar3 == 0x16)" (( "(") (binary_expression "iVar3 == 0x16" (identifier "iVar3") (== "==") (number_literal "0x16")) () ")"))) () ")")) (compound_statement "{\n      fchown(param_3,0xffffffff,__group);\n      *piVar4 = iVar3;\n    }" ({ "{") (expression_statement "fchown(param_3,0xffffffff,__group);" (call_expression "fchown(param_3,0xffffffff,__group)" (identifier "fchown") (argument_list "(param_3,0xffffffff,__group)" (( "(") (identifier "param_3") (, ",") (number_literal "0xffffffff") (, ",") (identifier "__group") () ")"))) (; ";")) (expression_statement "*piVar4 = iVar3;" (assignment_expression "*piVar4 = iVar3" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (= "=") (identifier "iVar3")) (; ";")) (} "}"))) (} "}"))))) (expression_statement "cVar1 = FUN_00015af0(param_1);" (assignment_expression "cVar1 = FUN_00015af0(param_1)" (identifier "cVar1") (= "=") (call_expression "FUN_00015af0(param_1)" (identifier "FUN_00015af0") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (cVar1 == '\0') {\n    uVar5 = FUN_00020b50(4,param_2);\n    uVar6 = dcgettext(0,"failed to preserve ownership for %s",5);\n                    \n    error(0,*piVar4,uVar6,uVar5);\n  }" (if "if") (parenthesized_expression "(cVar1 == '\0')" (( "(") (binary_expression "cVar1 == '\0'" (identifier "cVar1") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    uVar5 = FUN_00020b50(4,param_2);\n    uVar6 = dcgettext(0,"failed to preserve ownership for %s",5);\n                    \n    error(0,*piVar4,uVar6,uVar5);\n  }" ({ "{") (expression_statement "uVar5 = FUN_00020b50(4,param_2);" (assignment_expression "uVar5 = FUN_00020b50(4,param_2)" (identifier "uVar5") (= "=") (call_expression "FUN_00020b50(4,param_2)" (identifier "FUN_00020b50") (argument_list "(4,param_2)" (( "(") (number_literal "4") (, ",") (identifier "param_2") () ")")))) (; ";")) (expression_statement "uVar6 = dcgettext(0,"failed to preserve ownership for %s",5);" (assignment_expression "uVar6 = dcgettext(0,"failed to preserve ownership for %s",5)" (identifier "uVar6") (= "=") (call_expression "dcgettext(0,"failed to preserve ownership for %s",5)" (identifier "dcgettext") (argument_list "(0,"failed to preserve ownership for %s",5)" (( "(") (number_literal "0") (, ",") (string_literal ""failed to preserve ownership for %s"" (" """) (string_content "failed to preserve ownership for %s") (" """)) (, ",") (number_literal "5") () ")")))) (; ";")) (expression_statement "error(0,*piVar4,uVar6,uVar5);" (call_expression "error(0,*piVar4,uVar6,uVar5)" (identifier "error") (argument_list "(0,*piVar4,uVar6,uVar5)" (( "(") (number_literal "0") (, ",") (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (, ",") (identifier "uVar6") (, ",") (identifier "uVar5") () ")"))) (; ";")) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

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

int __regparm3
function_1(type_1 *x,char *dst_name,int var_9,type_2 *src_sb,type_3 new_dst,type_2 *dst_sb)

{
  type_4 __group;
  type_5 __owner;
  type_3 _Var1;
  type_6 var_2;
  int var_4;
  int *piVar4;
  char *pcVar5;
  type_7 uVar6;
  type_6 var_3;
  
  __group = src_sb->st_gid;
  __owner = src_sb->st_uid;
  if (!new_dst) {
    if ((x->preserve_mode == false) && (x->move_mode == false)) {
      if (x->set_mode == false) goto LAB_00015b93;
      var_3 = dst_sb->st_mode;
      var_2 = x->mode;
    }
    else {
      var_2 = src_sb->st_mode;
      var_3 = dst_sb->st_mode;
    }
    var_4 = var_1(dst_name,var_9,var_2 & var_3 & 0x1c0);
    if (var_4 != 0) {
      piVar4 = var_5();
      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (x->owner_privileges == false)) {
        return -(type_6)x->require_preserve;
      }
      pcVar5 = var_6(shell_escape_always_quoting_style,dst_name);
      uVar6 = var_7(0,"clearing permissions for %s",5);
                    /* WARNING: Subroutine does not return */
      var_8(0,*piVar4,uVar6,pcVar5);
    }
  }
LAB_00015b93:
  if (var_9 == -1) {
    var_4 = var_10(dst_name,__owner,__group);
    if (var_4 == 0) {
      return 1;
    }
    piVar4 = var_5();
    var_4 = *piVar4;
    if ((var_4 == 1) || (var_4 == 0x16)) {
      var_10(dst_name,0xffffffff,__group);
      *piVar4 = var_4;
    }
  }
  else {
    var_4 = var_11(var_9,__owner,__group);
    if (var_4 == 0) {
      return 1;
    }
    piVar4 = var_5();
    var_4 = *piVar4;
    if ((var_4 == 1) || (var_4 == 0x16)) {
      var_11(var_9,0xffffffff,__group);
      *piVar4 = var_4;
    }
  }
  _Var1 = var_12(x);
  if (!_Var1) {
    pcVar5 = var_6(shell_escape_always_quoting_style,dst_name);
    uVar6 = var_7(0,"failed to preserve ownership for %s",5);
                    /* WARNING: Subroutine does not return */
    var_8(0,*piVar4,uVar6,pcVar5);
  }
  return 0;
}


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

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

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

{
  __gid_t __group;
  __uid_t __owner;
  char cVar1;
  uint uVar2;
  int iVar3;
  int *piVar4;
  undefined4 uVar5;
  undefined4 uVar6;
  uint uVar7;
  
  __group = *(__gid_t *)(param_4 + 0x1c);
  __owner = *(__uid_t *)(param_4 + 0x18);
  if (param_5 == '\0') {
    if ((*(char *)(param_1 + 0x1e) == '\0') && (*(char *)(param_1 + 0x18) == '\0')) {
      if (*(char *)(param_1 + 0x2b) == '\0') goto LAB_00015b93;
      uVar7 = *(uint *)(param_6 + 0x10);
      uVar2 = *(uint *)(param_1 + 0x10);
    }
    else {
      uVar2 = *(uint *)(param_4 + 0x10);
      uVar7 = *(uint *)(param_6 + 0x10);
    }
    iVar3 = FUN_0001ed30(param_2,param_3,uVar2 & uVar7 & 0x1c0);
    if (iVar3 != 0) {
      piVar4 = __errno_location();
      if (((*piVar4 == 1) || (*piVar4 == 0x16)) && (*(char *)(param_1 + 0x1b) == '\0')) {
        return -(uint)*(byte *)(param_1 + 0x24);
      }
      uVar5 = FUN_00020b50(4,param_2);
      uVar6 = dcgettext(0,"clearing permissions for %s",5);
                    /* WARNING: Subroutine does not return */
      error(0,*piVar4,uVar6,uVar5);
    }
  }
LAB_00015b93:
  if (param_3 == -1) {
    iVar3 = lchown(param_2,__owner,__group);
    if (iVar3 == 0) {
      return 1;
    }
    piVar4 = __errno_location();
    iVar3 = *piVar4;
    if ((iVar3 == 1) || (iVar3 == 0x16)) {
      lchown(param_2,0xffffffff,__group);
      *piVar4 = iVar3;
    }
  }
  else {
    iVar3 = fchown(param_3,__owner,__group);
    if (iVar3 == 0) {
      return 1;
    }
    piVar4 = __errno_location();
    iVar3 = *piVar4;
    if ((iVar3 == 1) || (iVar3 == 0x16)) {
      fchown(param_3,0xffffffff,__group);
      *piVar4 = iVar3;
    }
  }
  cVar1 = FUN_00015af0(param_1);
  if (cVar1 == '\0') {
    uVar5 = FUN_00020b50(4,param_2);
    uVar6 = dcgettext(0,"failed to preserve ownership for %s",5);
                    /* WARNING: Subroutine does not return */
    error(0,*piVar4,uVar6,uVar5);
  }
  return 0;
}

