
void write_archive(bfd *iarch)

{
  bfd *pbVar1;
  int iVar2;
  size_t sVar3;
  char *pcVar4;
  char *from;
  bfd *pbVar5;
  
  pbVar1 = iarch->archive_next;
  sVar3 = strlen(iarch->filename);
  pcVar4 = (char *)xmalloc(sVar3 + 1);
  strcpy(pcVar4,iarch->filename);
  from = make_tempname(pcVar4);
  if (from == (char *)0x0) {
    pcVar4 = (char *)dcgettext(0,"could not create temporary file whilst writing archive",5);
                    /* WARNING: Subroutine does not return */
    bfd_fatal(pcVar4);
  }
  output_filename = from;
  pbVar5 = (bfd *)bfd_openw(from,iarch->xvec->name);
  if (pbVar5 != (bfd *)0x0) {
    output_bfd = pbVar5;
    bfd_set_format(pbVar5,2);
    pbVar5->field_0x47 = (byte)(((uint)~write_armap >> 0x1f) << 7) | pbVar5->field_0x47 & 0x7f;
    if (ar_truncate != 0) {
      *(uint *)&pbVar5->field_0x44 = *(uint *)&pbVar5->field_0x44 | 0x8000;
    }
    if (deterministic != 0) {
      *(uint *)&pbVar5->field_0x44 = *(uint *)&pbVar5->field_0x44 | 0x40000;
    }
    if ((make_thin_archive != 0) || ((iarch->field_0x48 & 1) != 0)) {
      pbVar5->field_0x48 = pbVar5->field_0x48 | 1;
    }
    iVar2 = bfd_set_archive_head(pbVar5,pbVar1);
    if ((iVar2 != 0) && (iVar2 = bfd_close(pbVar5), iVar2 != 0)) {
      output_bfd = (bfd *)0x0;
      output_filename = (char *)0x0;
      bfd_close(iarch);
      iVar2 = smart_rename(from,pcVar4,0);
      if (iVar2 != 0) {
                    /* WARNING: Subroutine does not return */
        xexit(1);
      }
      free(pcVar4);
      free(from);
      return;
    }
  }
                    /* WARNING: Subroutine does not return */
  bfd_fatal(pcVar4);
}



void FUN_00105280(undefined8 *param_1)

{
  int iVar1;
  size_t sVar2;
  char *__dest;
  void *__ptr;
  long lVar3;
  undefined8 uVar4;
  
  uVar4 = param_1[0x1b];
  sVar2 = strlen((char *)*param_1);
  __dest = (char *)xmalloc(sVar2 + 1);
  strcpy(__dest,(char *)*param_1);
  __ptr = (void *)FUN_001080c0(__dest);
  if (__ptr != (void *)0x0) {
    DAT_001104e8 = __ptr;
    lVar3 = bfd_openw(__ptr,*(undefined8 *)param_1[1]);
    if (lVar3 != 0) {
      DAT_001104d8 = lVar3;
      bfd_set_format(lVar3,2);
      *(byte *)(lVar3 + 0x47) =
           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f;
      if (DAT_00110508 != 0) {
        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;
      }
      if (DAT_00110314 != 0) {
        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;
      }
      if ((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)) {
        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;
      }
      iVar1 = bfd_set_archive_head(lVar3,uVar4);
      if ((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)) {
        DAT_001104d8 = 0;
        DAT_001104e8 = (void *)0x0;
        bfd_close(param_1);
        iVar1 = FUN_001070c0(__ptr,__dest,0);
        if (iVar1 == 0) {
          free(__dest);
          free(__ptr);
          return;
        }
        goto LAB_001053db;
      }
    }
    FUN_001077e0(__dest);
  }
  uVar4 = dcgettext(0,"could not create temporary file whilst writing archive",5);
  FUN_001077e0(uVar4);
LAB_001053db:
                    /* WARNING: Subroutine does not return */
  xexit(1);
}


PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
MOV R14,qword ptr [RDI + 0xd8]
MOV RDI,qword ptr [RDI]
CALL 0x001021c0
LEA RDI,[RAX + 0x1]
CALL 0x00102270
MOV RSI,qword ptr [RBP]
MOV R13,RAX
MOV RDI,RAX
CALL 0x001020c0
MOV RDI,R13
CALL 0x001080c0
TEST RAX,RAX
JZ 0x001053c0
MOV R12,RAX
MOV qword ptr [0x001104e8],RAX
MOV RAX,qword ptr [RBP + 0x8]
MOV RDI,R12
MOV RSI,qword ptr [RAX]
CALL 0x00102490
MOV RBX,RAX
TEST RAX,RAX
JZ 0x001053b8
MOV ESI,0x2
MOV RDI,RAX
MOV qword ptr [0x001104d8],RAX
CALL 0x00102360
MOV EAX,dword ptr [0x001104c0]
MOVZX EDX,byte ptr [RBX + 0x47]
NOT EAX
AND EDX,0x7f
SHR EAX,0x1f
SHL EAX,0x7
OR EAX,EDX
MOV byte ptr [RBX + 0x47],AL
MOV ECX,dword ptr [0x00110508]
TEST ECX,ECX
JZ 0x00105327
OR dword ptr [RBX + 0x44],0x8000
MOV EDX,dword ptr [0x00110314]
TEST EDX,EDX
JZ 0x00105338
OR dword ptr [RBX + 0x44],0x40000
MOV EAX,dword ptr [0x00110500]
TEST EAX,EAX
JZ 0x001053b0
OR byte ptr [RBX + 0x48],0x1
MOV RSI,R14
MOV RDI,RBX
CALL 0x00102130
TEST EAX,EAX
JZ 0x001053b8
MOV RDI,RBX
CALL 0x00102510
TEST EAX,EAX
JZ 0x001053b8
MOV qword ptr [0x001104d8],0x0
MOV RDI,RBP
MOV qword ptr [0x001104e8],0x0
CALL 0x00102510
XOR EDX,EDX
MOV RSI,R13
MOV RDI,R12
CALL 0x001070c0
TEST EAX,EAX
JNZ 0x001053db
MOV RDI,R13
CALL 0x00102060
POP RBX
MOV RDI,R12
POP RBP
POP R12
POP R13
POP R14
JMP 0x00102060
TEST byte ptr [RBP + 0x48],0x1
JZ 0x00105346
JMP 0x00105342
MOV RDI,R13
CALL 0x001077e0
XOR EDI,EDI
MOV EDX,0x5
LEA RSI,[0x10b4a0]
CALL 0x001021b0
MOV RDI,RAX
CALL 0x001077e0
MOV EDI,0x1
CALL 0x00102500
(translation_unit "void FUN_00105280(undefined8 *param_1)\n\n{\n  int iVar1;\n  size_t sVar2;\n  char *__dest;\n  void *__ptr;\n  long lVar3;\n  undefined8 uVar4;\n  \n  uVar4 = param_1[0x1b];\n  sVar2 = strlen((char *)*param_1);\n  __dest = (char *)xmalloc(sVar2 + 1);\n  strcpy(__dest,(char *)*param_1);\n  __ptr = (void *)FUN_001080c0(__dest);\n  if (__ptr != (void *)0x0) {\n    DAT_001104e8 = __ptr;\n    lVar3 = bfd_openw(__ptr,*(undefined8 *)param_1[1]);\n    if (lVar3 != 0) {\n      DAT_001104d8 = lVar3;\n      bfd_set_format(lVar3,2);\n      *(byte *)(lVar3 + 0x47) =\n           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f;\n      if (DAT_00110508 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;\n      }\n      if (DAT_00110314 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;\n      }\n      if ((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)) {\n        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;\n      }\n      iVar1 = bfd_set_archive_head(lVar3,uVar4);\n      if ((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)) {\n        DAT_001104d8 = 0;\n        DAT_001104e8 = (void *)0x0;\n        bfd_close(param_1);\n        iVar1 = FUN_001070c0(__ptr,__dest,0);\n        if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }\n        goto LAB_001053db;\n      }\n    }\n    FUN_001077e0(__dest);\n  }\n  uVar4 = dcgettext(0,"could not create temporary file whilst writing archive",5);\n  FUN_001077e0(uVar4);\nLAB_001053db:\n                    /* WARNING: Subroutine does not return */\n  xexit(1);\n}\n\n" (function_definition "void FUN_00105280(undefined8 *param_1)\n\n{\n  int iVar1;\n  size_t sVar2;\n  char *__dest;\n  void *__ptr;\n  long lVar3;\n  undefined8 uVar4;\n  \n  uVar4 = param_1[0x1b];\n  sVar2 = strlen((char *)*param_1);\n  __dest = (char *)xmalloc(sVar2 + 1);\n  strcpy(__dest,(char *)*param_1);\n  __ptr = (void *)FUN_001080c0(__dest);\n  if (__ptr != (void *)0x0) {\n    DAT_001104e8 = __ptr;\n    lVar3 = bfd_openw(__ptr,*(undefined8 *)param_1[1]);\n    if (lVar3 != 0) {\n      DAT_001104d8 = lVar3;\n      bfd_set_format(lVar3,2);\n      *(byte *)(lVar3 + 0x47) =\n           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f;\n      if (DAT_00110508 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;\n      }\n      if (DAT_00110314 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;\n      }\n      if ((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)) {\n        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;\n      }\n      iVar1 = bfd_set_archive_head(lVar3,uVar4);\n      if ((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)) {\n        DAT_001104d8 = 0;\n        DAT_001104e8 = (void *)0x0;\n        bfd_close(param_1);\n        iVar1 = FUN_001070c0(__ptr,__dest,0);\n        if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }\n        goto LAB_001053db;\n      }\n    }\n    FUN_001077e0(__dest);\n  }\n  uVar4 = dcgettext(0,"could not create temporary file whilst writing archive",5);\n  FUN_001077e0(uVar4);\nLAB_001053db:\n                    /* WARNING: Subroutine does not return */\n  xexit(1);\n}" primitive_type (function_declarator "FUN_00105280(undefined8 *param_1)" identifier (parameter_list "(undefined8 *param_1)" ( (parameter_declaration "undefined8 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  char *__dest;\n  void *__ptr;\n  long lVar3;\n  undefined8 uVar4;\n  \n  uVar4 = param_1[0x1b];\n  sVar2 = strlen((char *)*param_1);\n  __dest = (char *)xmalloc(sVar2 + 1);\n  strcpy(__dest,(char *)*param_1);\n  __ptr = (void *)FUN_001080c0(__dest);\n  if (__ptr != (void *)0x0) {\n    DAT_001104e8 = __ptr;\n    lVar3 = bfd_openw(__ptr,*(undefined8 *)param_1[1]);\n    if (lVar3 != 0) {\n      DAT_001104d8 = lVar3;\n      bfd_set_format(lVar3,2);\n      *(byte *)(lVar3 + 0x47) =\n           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f;\n      if (DAT_00110508 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;\n      }\n      if (DAT_00110314 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;\n      }\n      if ((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)) {\n        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;\n      }\n      iVar1 = bfd_set_archive_head(lVar3,uVar4);\n      if ((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)) {\n        DAT_001104d8 = 0;\n        DAT_001104e8 = (void *)0x0;\n        bfd_close(param_1);\n        iVar1 = FUN_001070c0(__ptr,__dest,0);\n        if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }\n        goto LAB_001053db;\n      }\n    }\n    FUN_001077e0(__dest);\n  }\n  uVar4 = dcgettext(0,"could not create temporary file whilst writing archive",5);\n  FUN_001077e0(uVar4);\nLAB_001053db:\n                    /* WARNING: Subroutine does not return */\n  xexit(1);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "void *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 uVar4;" type_identifier identifier ;) (expression_statement "uVar4 = param_1[0x1b];" (assignment_expression "uVar4 = param_1[0x1b]" identifier = (subscript_expression "param_1[0x1b]" identifier [ number_literal ])) ;) (expression_statement "sVar2 = strlen((char *)*param_1);" (assignment_expression "sVar2 = strlen((char *)*param_1)" identifier = (call_expression "strlen((char *)*param_1)" identifier (argument_list "((char *)*param_1)" ( (cast_expression "(char *)*param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier)) )))) ;) (expression_statement "__dest = (char *)xmalloc(sVar2 + 1);" (assignment_expression "__dest = (char *)xmalloc(sVar2 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar2 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar2 + 1)" identifier (argument_list "(sVar2 + 1)" ( (binary_expression "sVar2 + 1" identifier + number_literal) ))))) ;) (expression_statement "strcpy(__dest,(char *)*param_1);" (call_expression "strcpy(__dest,(char *)*param_1)" identifier (argument_list "(__dest,(char *)*param_1)" ( identifier , (cast_expression "(char *)*param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier)) ))) ;) (expression_statement "__ptr = (void *)FUN_001080c0(__dest);" (assignment_expression "__ptr = (void *)FUN_001080c0(__dest)" identifier = (cast_expression "(void *)FUN_001080c0(__dest)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_001080c0(__dest)" identifier (argument_list "(__dest)" ( identifier ))))) ;) (if_statement "if (__ptr != (void *)0x0) {\n    DAT_001104e8 = __ptr;\n    lVar3 = bfd_openw(__ptr,*(undefined8 *)param_1[1]);\n    if (lVar3 != 0) {\n      DAT_001104d8 = lVar3;\n      bfd_set_format(lVar3,2);\n      *(byte *)(lVar3 + 0x47) =\n           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f;\n      if (DAT_00110508 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;\n      }\n      if (DAT_00110314 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;\n      }\n      if ((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)) {\n        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;\n      }\n      iVar1 = bfd_set_archive_head(lVar3,uVar4);\n      if ((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)) {\n        DAT_001104d8 = 0;\n        DAT_001104e8 = (void *)0x0;\n        bfd_close(param_1);\n        iVar1 = FUN_001070c0(__ptr,__dest,0);\n        if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }\n        goto LAB_001053db;\n      }\n    }\n    FUN_001077e0(__dest);\n  }" if (parenthesized_expression "(__ptr != (void *)0x0)" ( (binary_expression "__ptr != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    DAT_001104e8 = __ptr;\n    lVar3 = bfd_openw(__ptr,*(undefined8 *)param_1[1]);\n    if (lVar3 != 0) {\n      DAT_001104d8 = lVar3;\n      bfd_set_format(lVar3,2);\n      *(byte *)(lVar3 + 0x47) =\n           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f;\n      if (DAT_00110508 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;\n      }\n      if (DAT_00110314 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;\n      }\n      if ((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)) {\n        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;\n      }\n      iVar1 = bfd_set_archive_head(lVar3,uVar4);\n      if ((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)) {\n        DAT_001104d8 = 0;\n        DAT_001104e8 = (void *)0x0;\n        bfd_close(param_1);\n        iVar1 = FUN_001070c0(__ptr,__dest,0);\n        if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }\n        goto LAB_001053db;\n      }\n    }\n    FUN_001077e0(__dest);\n  }" { (expression_statement "DAT_001104e8 = __ptr;" (assignment_expression "DAT_001104e8 = __ptr" identifier = identifier) ;) (expression_statement "lVar3 = bfd_openw(__ptr,*(undefined8 *)param_1[1]);" (assignment_expression "lVar3 = bfd_openw(__ptr,*(undefined8 *)param_1[1])" identifier = (call_expression "bfd_openw(__ptr,*(undefined8 *)param_1[1])" identifier (argument_list "(__ptr,*(undefined8 *)param_1[1])" ( identifier , (pointer_expression "*(undefined8 *)param_1[1]" * (cast_expression "(undefined8 *)param_1[1]" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) )))) ;) (if_statement "if (lVar3 != 0) {\n      DAT_001104d8 = lVar3;\n      bfd_set_format(lVar3,2);\n      *(byte *)(lVar3 + 0x47) =\n           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f;\n      if (DAT_00110508 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;\n      }\n      if (DAT_00110314 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;\n      }\n      if ((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)) {\n        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;\n      }\n      iVar1 = bfd_set_archive_head(lVar3,uVar4);\n      if ((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)) {\n        DAT_001104d8 = 0;\n        DAT_001104e8 = (void *)0x0;\n        bfd_close(param_1);\n        iVar1 = FUN_001070c0(__ptr,__dest,0);\n        if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }\n        goto LAB_001053db;\n      }\n    }" if (parenthesized_expression "(lVar3 != 0)" ( (binary_expression "lVar3 != 0" identifier != number_literal) )) (compound_statement "{\n      DAT_001104d8 = lVar3;\n      bfd_set_format(lVar3,2);\n      *(byte *)(lVar3 + 0x47) =\n           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f;\n      if (DAT_00110508 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;\n      }\n      if (DAT_00110314 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;\n      }\n      if ((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)) {\n        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;\n      }\n      iVar1 = bfd_set_archive_head(lVar3,uVar4);\n      if ((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)) {\n        DAT_001104d8 = 0;\n        DAT_001104e8 = (void *)0x0;\n        bfd_close(param_1);\n        iVar1 = FUN_001070c0(__ptr,__dest,0);\n        if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }\n        goto LAB_001053db;\n      }\n    }" { (expression_statement "DAT_001104d8 = lVar3;" (assignment_expression "DAT_001104d8 = lVar3" identifier = identifier) ;) (expression_statement "bfd_set_format(lVar3,2);" (call_expression "bfd_set_format(lVar3,2)" identifier (argument_list "(lVar3,2)" ( identifier , number_literal ))) ;) (expression_statement "*(byte *)(lVar3 + 0x47) =\n           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f;" (assignment_expression "*(byte *)(lVar3 + 0x47) =\n           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f" (pointer_expression "*(byte *)(lVar3 + 0x47)" * (cast_expression "(byte *)(lVar3 + 0x47)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x47)" ( (binary_expression "lVar3 + 0x47" identifier + number_literal) )))) = (binary_expression "(byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f" (call_expression "(byte)((~DAT_001104c0 >> 0x1f) << 7)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "((~DAT_001104c0 >> 0x1f) << 7)" ( (binary_expression "(~DAT_001104c0 >> 0x1f) << 7" (parenthesized_expression "(~DAT_001104c0 >> 0x1f)" ( (binary_expression "~DAT_001104c0 >> 0x1f" (unary_expression "~DAT_001104c0" ~ identifier) >> number_literal) )) << number_literal) ))) | (binary_expression "*(byte *)(lVar3 + 0x47) & 0x7f" (pointer_expression "*(byte *)(lVar3 + 0x47)" * (cast_expression "(byte *)(lVar3 + 0x47)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x47)" ( (binary_expression "lVar3 + 0x47" identifier + number_literal) )))) & number_literal))) ;) (if_statement "if (DAT_00110508 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;\n      }" if (parenthesized_expression "(DAT_00110508 != 0)" ( (binary_expression "DAT_00110508 != 0" identifier != number_literal) )) (compound_statement "{\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;\n      }" { (expression_statement "*(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;" (assignment_expression "*(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000" (pointer_expression "*(uint *)(lVar3 + 0x44)" * (cast_expression "(uint *)(lVar3 + 0x44)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x44)" ( (binary_expression "lVar3 + 0x44" identifier + number_literal) )))) = (binary_expression "*(uint *)(lVar3 + 0x44) | 0x8000" (pointer_expression "*(uint *)(lVar3 + 0x44)" * (cast_expression "(uint *)(lVar3 + 0x44)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x44)" ( (binary_expression "lVar3 + 0x44" identifier + number_literal) )))) | number_literal)) ;) })) (if_statement "if (DAT_00110314 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;\n      }" if (parenthesized_expression "(DAT_00110314 != 0)" ( (binary_expression "DAT_00110314 != 0" identifier != number_literal) )) (compound_statement "{\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;\n      }" { (expression_statement "*(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;" (assignment_expression "*(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000" (pointer_expression "*(uint *)(lVar3 + 0x44)" * (cast_expression "(uint *)(lVar3 + 0x44)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x44)" ( (binary_expression "lVar3 + 0x44" identifier + number_literal) )))) = (binary_expression "*(uint *)(lVar3 + 0x44) | 0x40000" (pointer_expression "*(uint *)(lVar3 + 0x44)" * (cast_expression "(uint *)(lVar3 + 0x44)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x44)" ( (binary_expression "lVar3 + 0x44" identifier + number_literal) )))) | number_literal)) ;) })) (if_statement "if ((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)) {\n        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;\n      }" if (parenthesized_expression "((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0))" ( (binary_expression "(DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)" (parenthesized_expression "(DAT_00110500 != 0)" ( (binary_expression "DAT_00110500 != 0" identifier != number_literal) )) || (parenthesized_expression "((*(byte *)(param_1 + 9) & 1) != 0)" ( (binary_expression "(*(byte *)(param_1 + 9) & 1) != 0" (parenthesized_expression "(*(byte *)(param_1 + 9) & 1)" ( (binary_expression "*(byte *)(param_1 + 9) & 1" (pointer_expression "*(byte *)(param_1 + 9)" * (cast_expression "(byte *)(param_1 + 9)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 9)" ( (binary_expression "param_1 + 9" identifier + number_literal) )))) & number_literal) )) != number_literal) ))) )) (compound_statement "{\n        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;\n      }" { (expression_statement "*(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;" (assignment_expression "*(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1" (pointer_expression "*(byte *)(lVar3 + 0x48)" * (cast_expression "(byte *)(lVar3 + 0x48)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x48)" ( (binary_expression "lVar3 + 0x48" identifier + number_literal) )))) = (binary_expression "*(byte *)(lVar3 + 0x48) | 1" (pointer_expression "*(byte *)(lVar3 + 0x48)" * (cast_expression "(byte *)(lVar3 + 0x48)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x48)" ( (binary_expression "lVar3 + 0x48" identifier + number_literal) )))) | number_literal)) ;) })) (expression_statement "iVar1 = bfd_set_archive_head(lVar3,uVar4);" (assignment_expression "iVar1 = bfd_set_archive_head(lVar3,uVar4)" identifier = (call_expression "bfd_set_archive_head(lVar3,uVar4)" identifier (argument_list "(lVar3,uVar4)" ( identifier , identifier )))) ;) (if_statement "if ((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)) {\n        DAT_001104d8 = 0;\n        DAT_001104e8 = (void *)0x0;\n        bfd_close(param_1);\n        iVar1 = FUN_001070c0(__ptr,__dest,0);\n        if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }\n        goto LAB_001053db;\n      }" if (parenthesized_expression "((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0))" ( (binary_expression "(iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)" (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) && (parenthesized_expression "(iVar1 = bfd_close(lVar3), iVar1 != 0)" ( (comma_expression "iVar1 = bfd_close(lVar3), iVar1 != 0" (assignment_expression "iVar1 = bfd_close(lVar3)" identifier = (call_expression "bfd_close(lVar3)" identifier (argument_list "(lVar3)" ( identifier )))) , (binary_expression "iVar1 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n        DAT_001104d8 = 0;\n        DAT_001104e8 = (void *)0x0;\n        bfd_close(param_1);\n        iVar1 = FUN_001070c0(__ptr,__dest,0);\n        if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }\n        goto LAB_001053db;\n      }" { (expression_statement "DAT_001104d8 = 0;" (assignment_expression "DAT_001104d8 = 0" identifier = number_literal) ;) (expression_statement "DAT_001104e8 = (void *)0x0;" (assignment_expression "DAT_001104e8 = (void *)0x0" identifier = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "bfd_close(param_1);" (call_expression "bfd_close(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "iVar1 = FUN_001070c0(__ptr,__dest,0);" (assignment_expression "iVar1 = FUN_001070c0(__ptr,__dest,0)" identifier = (call_expression "FUN_001070c0(__ptr,__dest,0)" identifier (argument_list "(__ptr,__dest,0)" ( identifier , identifier , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          free(__dest);\n          free(__ptr);\n          return;\n        }" { (expression_statement "free(__dest);" (call_expression "free(__dest)" identifier (argument_list "(__dest)" ( identifier ))) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (return_statement "return;" return ;) })) (goto_statement "goto LAB_001053db;" goto statement_identifier ;) })) })) (expression_statement "FUN_001077e0(__dest);" (call_expression "FUN_001077e0(__dest)" identifier (argument_list "(__dest)" ( identifier ))) ;) })) (expression_statement "uVar4 = dcgettext(0,"could not create temporary file whilst writing archive",5);" (assignment_expression "uVar4 = dcgettext(0,"could not create temporary file whilst writing archive",5)" identifier = (call_expression "dcgettext(0,"could not create temporary file whilst writing archive",5)" identifier (argument_list "(0,"could not create temporary file whilst writing archive",5)" ( number_literal , (string_literal ""could not create temporary file whilst writing archive"" " string_content ") , number_literal )))) ;) (expression_statement "FUN_001077e0(uVar4);" (call_expression "FUN_001077e0(uVar4)" identifier (argument_list "(uVar4)" ( identifier ))) ;) (labeled_statement "LAB_001053db:\n                    /* WARNING: Subroutine does not return */\n  xexit(1);" statement_identifier : comment (expression_statement "xexit(1);" (call_expression "xexit(1)" identifier (argument_list "(1)" ( number_literal ))) ;)) })))
(translation_unit "void write_archive(bfd *iarch)\n\n{\n  bfd *pbVar1;\n  int iVar2;\n  size_t sVar3;\n  char *pcVar4;\n  char *from;\n  bfd *pbVar5;\n  \n  pbVar1 = iarch->archive_next;\n  sVar3 = strlen(iarch->filename);\n  pcVar4 = (char *)xmalloc(sVar3 + 1);\n  strcpy(pcVar4,iarch->filename);\n  from = make_tempname(pcVar4);\n  if (from == (char *)0x0) {\n    pcVar4 = (char *)dcgettext(0,"could not create temporary file whilst writing archive",5);\n                    /* WARNING: Subroutine does not return */\n    bfd_fatal(pcVar4);\n  }\n  output_filename = from;\n  pbVar5 = (bfd *)bfd_openw(from,iarch->xvec->name);\n  if (pbVar5 != (bfd *)0x0) {\n    output_bfd = pbVar5;\n    bfd_set_format(pbVar5,2);\n    pbVar5->field_0x47 = (byte)(((uint)~write_armap >> 0x1f) << 7) | pbVar5->field_0x47 & 0x7f;\n    if (ar_truncate != 0) {\n      *(uint *)&pbVar5->field_0x44 = *(uint *)&pbVar5->field_0x44 | 0x8000;\n    }\n    if (deterministic != 0) {\n      *(uint *)&pbVar5->field_0x44 = *(uint *)&pbVar5->field_0x44 | 0x40000;\n    }\n    if ((make_thin_archive != 0) || ((iarch->field_0x48 & 1) != 0)) {\n      pbVar5->field_0x48 = pbVar5->field_0x48 | 1;\n    }\n    iVar2 = bfd_set_archive_head(pbVar5,pbVar1);\n    if ((iVar2 != 0) && (iVar2 = bfd_close(pbVar5), iVar2 != 0)) {\n      output_bfd = (bfd *)0x0;\n      output_filename = (char *)0x0;\n      bfd_close(iarch);\n      iVar2 = smart_rename(from,pcVar4,0);\n      if (iVar2 != 0) {\n                    /* WARNING: Subroutine does not return */\n        xexit(1);\n      }\n      free(pcVar4);\n      free(from);\n      return;\n    }\n  }\n                    /* WARNING: Subroutine does not return */\n  bfd_fatal(pcVar4);\n}\n\n" (function_definition "void write_archive(bfd *iarch)\n\n{\n  bfd *pbVar1;\n  int iVar2;\n  size_t sVar3;\n  char *pcVar4;\n  char *from;\n  bfd *pbVar5;\n  \n  pbVar1 = iarch->archive_next;\n  sVar3 = strlen(iarch->filename);\n  pcVar4 = (char *)xmalloc(sVar3 + 1);\n  strcpy(pcVar4,iarch->filename);\n  from = make_tempname(pcVar4);\n  if (from == (char *)0x0) {\n    pcVar4 = (char *)dcgettext(0,"could not create temporary file whilst writing archive",5);\n                    /* WARNING: Subroutine does not return */\n    bfd_fatal(pcVar4);\n  }\n  output_filename = from;\n  pbVar5 = (bfd *)bfd_openw(from,iarch->xvec->name);\n  if (pbVar5 != (bfd *)0x0) {\n    output_bfd = pbVar5;\n    bfd_set_format(pbVar5,2);\n    pbVar5->field_0x47 = (byte)(((uint)~write_armap >> 0x1f) << 7) | pbVar5->field_0x47 & 0x7f;\n    if (ar_truncate != 0) {\n      *(uint *)&pbVar5->field_0x44 = *(uint *)&pbVar5->field_0x44 | 0x8000;\n    }\n    if (deterministic != 0) {\n      *(uint *)&pbVar5->field_0x44 = *(uint *)&pbVar5->field_0x44 | 0x40000;\n    }\n    if ((make_thin_archive != 0) || ((iarch->field_0x48 & 1) != 0)) {\n      pbVar5->field_0x48 = pbVar5->field_0x48 | 1;\n    }\n    iVar2 = bfd_set_archive_head(pbVar5,pbVar1);\n    if ((iVar2 != 0) && (iVar2 = bfd_close(pbVar5), iVar2 != 0)) {\n      output_bfd = (bfd *)0x0;\n      output_filename = (char *)0x0;\n      bfd_close(iarch);\n      iVar2 = smart_rename(from,pcVar4,0);\n      if (iVar2 != 0) {\n                    /* WARNING: Subroutine does not return */\n        xexit(1);\n      }\n      free(pcVar4);\n      free(from);\n      return;\n    }\n  }\n                    /* WARNING: Subroutine does not return */\n  bfd_fatal(pcVar4);\n}" primitive_type (function_declarator "write_archive(bfd *iarch)" identifier (parameter_list "(bfd *iarch)" ( (parameter_declaration "bfd *iarch" type_identifier (pointer_declarator "*iarch" * identifier)) ))) (compound_statement "{\n  bfd *pbVar1;\n  int iVar2;\n  size_t sVar3;\n  char *pcVar4;\n  char *from;\n  bfd *pbVar5;\n  \n  pbVar1 = iarch->archive_next;\n  sVar3 = strlen(iarch->filename);\n  pcVar4 = (char *)xmalloc(sVar3 + 1);\n  strcpy(pcVar4,iarch->filename);\n  from = make_tempname(pcVar4);\n  if (from == (char *)0x0) {\n    pcVar4 = (char *)dcgettext(0,"could not create temporary file whilst writing archive",5);\n                    /* WARNING: Subroutine does not return */\n    bfd_fatal(pcVar4);\n  }\n  output_filename = from;\n  pbVar5 = (bfd *)bfd_openw(from,iarch->xvec->name);\n  if (pbVar5 != (bfd *)0x0) {\n    output_bfd = pbVar5;\n    bfd_set_format(pbVar5,2);\n    pbVar5->field_0x47 = (byte)(((uint)~write_armap >> 0x1f) << 7) | pbVar5->field_0x47 & 0x7f;\n    if (ar_truncate != 0) {\n      *(uint *)&pbVar5->field_0x44 = *(uint *)&pbVar5->field_0x44 | 0x8000;\n    }\n    if (deterministic != 0) {\n      *(uint *)&pbVar5->field_0x44 = *(uint *)&pbVar5->field_0x44 | 0x40000;\n    }\n    if ((make_thin_archive != 0) || ((iarch->field_0x48 & 1) != 0)) {\n      pbVar5->field_0x48 = pbVar5->field_0x48 | 1;\n    }\n    iVar2 = bfd_set_archive_head(pbVar5,pbVar1);\n    if ((iVar2 != 0) && (iVar2 = bfd_close(pbVar5), iVar2 != 0)) {\n      output_bfd = (bfd *)0x0;\n      output_filename = (char *)0x0;\n      bfd_close(iarch);\n      iVar2 = smart_rename(from,pcVar4,0);\n      if (iVar2 != 0) {\n                    /* WARNING: Subroutine does not return */\n        xexit(1);\n      }\n      free(pcVar4);\n      free(from);\n      return;\n    }\n  }\n                    /* WARNING: Subroutine does not return */\n  bfd_fatal(pcVar4);\n}" { (declaration "bfd *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "char *from;" primitive_type (pointer_declarator "*from" * identifier) ;) (declaration "bfd *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (expression_statement "pbVar1 = iarch->archive_next;" (assignment_expression "pbVar1 = iarch->archive_next" identifier = (field_expression "iarch->archive_next" identifier -> field_identifier)) ;) (expression_statement "sVar3 = strlen(iarch->filename);" (assignment_expression "sVar3 = strlen(iarch->filename)" identifier = (call_expression "strlen(iarch->filename)" identifier (argument_list "(iarch->filename)" ( (field_expression "iarch->filename" identifier -> field_identifier) )))) ;) (expression_statement "pcVar4 = (char *)xmalloc(sVar3 + 1);" (assignment_expression "pcVar4 = (char *)xmalloc(sVar3 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar3 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar3 + 1)" identifier (argument_list "(sVar3 + 1)" ( (binary_expression "sVar3 + 1" identifier + number_literal) ))))) ;) (expression_statement "strcpy(pcVar4,iarch->filename);" (call_expression "strcpy(pcVar4,iarch->filename)" identifier (argument_list "(pcVar4,iarch->filename)" ( identifier , (field_expression "iarch->filename" identifier -> field_identifier) ))) ;) (expression_statement "from = make_tempname(pcVar4);" (assignment_expression "from = make_tempname(pcVar4)" identifier = (call_expression "make_tempname(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier )))) ;) (if_statement "if (from == (char *)0x0) {\n    pcVar4 = (char *)dcgettext(0,"could not create temporary file whilst writing archive",5);\n                    /* WARNING: Subroutine does not return */\n    bfd_fatal(pcVar4);\n  }" if (parenthesized_expression "(from == (char *)0x0)" ( (binary_expression "from == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar4 = (char *)dcgettext(0,"could not create temporary file whilst writing archive",5);\n                    /* WARNING: Subroutine does not return */\n    bfd_fatal(pcVar4);\n  }" { (expression_statement "pcVar4 = (char *)dcgettext(0,"could not create temporary file whilst writing archive",5);" (assignment_expression "pcVar4 = (char *)dcgettext(0,"could not create temporary file whilst writing archive",5)" identifier = (cast_expression "(char *)dcgettext(0,"could not create temporary file whilst writing archive",5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0,"could not create temporary file whilst writing archive",5)" identifier (argument_list "(0,"could not create temporary file whilst writing archive",5)" ( number_literal , (string_literal ""could not create temporary file whilst writing archive"" " string_content ") , number_literal ))))) ;) comment (expression_statement "bfd_fatal(pcVar4);" (call_expression "bfd_fatal(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier ))) ;) })) (expression_statement "output_filename = from;" (assignment_expression "output_filename = from" identifier = identifier) ;) (expression_statement "pbVar5 = (bfd *)bfd_openw(from,iarch->xvec->name);" (assignment_expression "pbVar5 = (bfd *)bfd_openw(from,iarch->xvec->name)" identifier = (cast_expression "(bfd *)bfd_openw(from,iarch->xvec->name)" ( (type_descriptor "bfd *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "bfd_openw(from,iarch->xvec->name)" identifier (argument_list "(from,iarch->xvec->name)" ( identifier , (field_expression "iarch->xvec->name" (field_expression "iarch->xvec" identifier -> field_identifier) -> field_identifier) ))))) ;) (if_statement "if (pbVar5 != (bfd *)0x0) {\n    output_bfd = pbVar5;\n    bfd_set_format(pbVar5,2);\n    pbVar5->field_0x47 = (byte)(((uint)~write_armap >> 0x1f) << 7) | pbVar5->field_0x47 & 0x7f;\n    if (ar_truncate != 0) {\n      *(uint *)&pbVar5->field_0x44 = *(uint *)&pbVar5->field_0x44 | 0x8000;\n    }\n    if (deterministic != 0) {\n      *(uint *)&pbVar5->field_0x44 = *(uint *)&pbVar5->field_0x44 | 0x40000;\n    }\n    if ((make_thin_archive != 0) || ((iarch->field_0x48 & 1) != 0)) {\n      pbVar5->field_0x48 = pbVar5->field_0x48 | 1;\n    }\n    iVar2 = bfd_set_archive_head(pbVar5,pbVar1);\n    if ((iVar2 != 0) && (iVar2 = bfd_close(pbVar5), iVar2 != 0)) {\n      output_bfd = (bfd *)0x0;\n      output_filename = (char *)0x0;\n      bfd_close(iarch);\n      iVar2 = smart_rename(from,pcVar4,0);\n      if (iVar2 != 0) {\n                    /* WARNING: Subroutine does not return */\n        xexit(1);\n      }\n      free(pcVar4);\n      free(from);\n      return;\n    }\n  }" if (parenthesized_expression "(pbVar5 != (bfd *)0x0)" ( (binary_expression "pbVar5 != (bfd *)0x0" identifier != (cast_expression "(bfd *)0x0" ( (type_descriptor "bfd *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    output_bfd = pbVar5;\n    bfd_set_format(pbVar5,2);\n    pbVar5->field_0x47 = (byte)(((uint)~write_armap >> 0x1f) << 7) | pbVar5->field_0x47 & 0x7f;\n    if (ar_truncate != 0) {\n      *(uint *)&pbVar5->field_0x44 = *(uint *)&pbVar5->field_0x44 | 0x8000;\n    }\n    if (deterministic != 0) {\n      *(uint *)&pbVar5->field_0x44 = *(uint *)&pbVar5->field_0x44 | 0x40000;\n    }\n    if ((make_thin_archive != 0) || ((iarch->field_0x48 & 1) != 0)) {\n      pbVar5->field_0x48 = pbVar5->field_0x48 | 1;\n    }\n    iVar2 = bfd_set_archive_head(pbVar5,pbVar1);\n    if ((iVar2 != 0) && (iVar2 = bfd_close(pbVar5), iVar2 != 0)) {\n      output_bfd = (bfd *)0x0;\n      output_filename = (char *)0x0;\n      bfd_close(iarch);\n      iVar2 = smart_rename(from,pcVar4,0);\n      if (iVar2 != 0) {\n                    /* WARNING: Subroutine does not return */\n        xexit(1);\n      }\n      free(pcVar4);\n      free(from);\n      return;\n    }\n  }" { (expression_statement "output_bfd = pbVar5;" (assignment_expression "output_bfd = pbVar5" identifier = identifier) ;) (expression_statement "bfd_set_format(pbVar5,2);" (call_expression "bfd_set_format(pbVar5,2)" identifier (argument_list "(pbVar5,2)" ( identifier , number_literal ))) ;) (expression_statement "pbVar5->field_0x47 = (byte)(((uint)~write_armap >> 0x1f) << 7) | pbVar5->field_0x47 & 0x7f;" (assignment_expression "pbVar5->field_0x47 = (byte)(((uint)~write_armap >> 0x1f) << 7) | pbVar5->field_0x47 & 0x7f" (field_expression "pbVar5->field_0x47" identifier -> field_identifier) = (binary_expression "(byte)(((uint)~write_armap >> 0x1f) << 7) | pbVar5->field_0x47 & 0x7f" (call_expression "(byte)(((uint)~write_armap >> 0x1f) << 7)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(((uint)~write_armap >> 0x1f) << 7)" ( (binary_expression "((uint)~write_armap >> 0x1f) << 7" (parenthesized_expression "((uint)~write_armap >> 0x1f)" ( (binary_expression "(uint)~write_armap >> 0x1f" (cast_expression "(uint)~write_armap" ( (type_descriptor "uint" type_identifier) ) (unary_expression "~write_armap" ~ identifier)) >> number_literal) )) << number_literal) ))) | (binary_expression "pbVar5->field_0x47 & 0x7f" (field_expression "pbVar5->field_0x47" identifier -> field_identifier) & number_literal))) ;) (if_statement "if (ar_truncate != 0) {\n      *(uint *)&pbVar5->field_0x44 = *(uint *)&pbVar5->field_0x44 | 0x8000;\n    }" if (parenthesized_expression "(ar_truncate != 0)" ( (binary_expression "ar_truncate != 0" identifier != number_literal) )) (compound_statement "{\n      *(uint *)&pbVar5->field_0x44 = *(uint *)&pbVar5->field_0x44 | 0x8000;\n    }" { (expression_statement "*(uint *)&pbVar5->field_0x44 = *(uint *)&pbVar5->field_0x44 | 0x8000;" (assignment_expression "*(uint *)&pbVar5->field_0x44 = *(uint *)&pbVar5->field_0x44 | 0x8000" (pointer_expression "*(uint *)&pbVar5->field_0x44" * (cast_expression "(uint *)&pbVar5->field_0x44" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pbVar5->field_0x44" & (field_expression "pbVar5->field_0x44" identifier -> field_identifier)))) = (binary_expression "*(uint *)&pbVar5->field_0x44 | 0x8000" (pointer_expression "*(uint *)&pbVar5->field_0x44" * (cast_expression "(uint *)&pbVar5->field_0x44" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pbVar5->field_0x44" & (field_expression "pbVar5->field_0x44" identifier -> field_identifier)))) | number_literal)) ;) })) (if_statement "if (deterministic != 0) {\n      *(uint *)&pbVar5->field_0x44 = *(uint *)&pbVar5->field_0x44 | 0x40000;\n    }" if (parenthesized_expression "(deterministic != 0)" ( (binary_expression "deterministic != 0" identifier != number_literal) )) (compound_statement "{\n      *(uint *)&pbVar5->field_0x44 = *(uint *)&pbVar5->field_0x44 | 0x40000;\n    }" { (expression_statement "*(uint *)&pbVar5->field_0x44 = *(uint *)&pbVar5->field_0x44 | 0x40000;" (assignment_expression "*(uint *)&pbVar5->field_0x44 = *(uint *)&pbVar5->field_0x44 | 0x40000" (pointer_expression "*(uint *)&pbVar5->field_0x44" * (cast_expression "(uint *)&pbVar5->field_0x44" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pbVar5->field_0x44" & (field_expression "pbVar5->field_0x44" identifier -> field_identifier)))) = (binary_expression "*(uint *)&pbVar5->field_0x44 | 0x40000" (pointer_expression "*(uint *)&pbVar5->field_0x44" * (cast_expression "(uint *)&pbVar5->field_0x44" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pbVar5->field_0x44" & (field_expression "pbVar5->field_0x44" identifier -> field_identifier)))) | number_literal)) ;) })) (if_statement "if ((make_thin_archive != 0) || ((iarch->field_0x48 & 1) != 0)) {\n      pbVar5->field_0x48 = pbVar5->field_0x48 | 1;\n    }" if (parenthesized_expression "((make_thin_archive != 0) || ((iarch->field_0x48 & 1) != 0))" ( (binary_expression "(make_thin_archive != 0) || ((iarch->field_0x48 & 1) != 0)" (parenthesized_expression "(make_thin_archive != 0)" ( (binary_expression "make_thin_archive != 0" identifier != number_literal) )) || (parenthesized_expression "((iarch->field_0x48 & 1) != 0)" ( (binary_expression "(iarch->field_0x48 & 1) != 0" (parenthesized_expression "(iarch->field_0x48 & 1)" ( (binary_expression "iarch->field_0x48 & 1" (field_expression "iarch->field_0x48" identifier -> field_identifier) & number_literal) )) != number_literal) ))) )) (compound_statement "{\n      pbVar5->field_0x48 = pbVar5->field_0x48 | 1;\n    }" { (expression_statement "pbVar5->field_0x48 = pbVar5->field_0x48 | 1;" (assignment_expression "pbVar5->field_0x48 = pbVar5->field_0x48 | 1" (field_expression "pbVar5->field_0x48" identifier -> field_identifier) = (binary_expression "pbVar5->field_0x48 | 1" (field_expression "pbVar5->field_0x48" identifier -> field_identifier) | number_literal)) ;) })) (expression_statement "iVar2 = bfd_set_archive_head(pbVar5,pbVar1);" (assignment_expression "iVar2 = bfd_set_archive_head(pbVar5,pbVar1)" identifier = (call_expression "bfd_set_archive_head(pbVar5,pbVar1)" identifier (argument_list "(pbVar5,pbVar1)" ( identifier , identifier )))) ;) (if_statement "if ((iVar2 != 0) && (iVar2 = bfd_close(pbVar5), iVar2 != 0)) {\n      output_bfd = (bfd *)0x0;\n      output_filename = (char *)0x0;\n      bfd_close(iarch);\n      iVar2 = smart_rename(from,pcVar4,0);\n      if (iVar2 != 0) {\n                    /* WARNING: Subroutine does not return */\n        xexit(1);\n      }\n      free(pcVar4);\n      free(from);\n      return;\n    }" if (parenthesized_expression "((iVar2 != 0) && (iVar2 = bfd_close(pbVar5), iVar2 != 0))" ( (binary_expression "(iVar2 != 0) && (iVar2 = bfd_close(pbVar5), iVar2 != 0)" (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) && (parenthesized_expression "(iVar2 = bfd_close(pbVar5), iVar2 != 0)" ( (comma_expression "iVar2 = bfd_close(pbVar5), iVar2 != 0" (assignment_expression "iVar2 = bfd_close(pbVar5)" identifier = (call_expression "bfd_close(pbVar5)" identifier (argument_list "(pbVar5)" ( identifier )))) , (binary_expression "iVar2 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n      output_bfd = (bfd *)0x0;\n      output_filename = (char *)0x0;\n      bfd_close(iarch);\n      iVar2 = smart_rename(from,pcVar4,0);\n      if (iVar2 != 0) {\n                    /* WARNING: Subroutine does not return */\n        xexit(1);\n      }\n      free(pcVar4);\n      free(from);\n      return;\n    }" { (expression_statement "output_bfd = (bfd *)0x0;" (assignment_expression "output_bfd = (bfd *)0x0" identifier = (cast_expression "(bfd *)0x0" ( (type_descriptor "bfd *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "output_filename = (char *)0x0;" (assignment_expression "output_filename = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "bfd_close(iarch);" (call_expression "bfd_close(iarch)" identifier (argument_list "(iarch)" ( identifier ))) ;) (expression_statement "iVar2 = smart_rename(from,pcVar4,0);" (assignment_expression "iVar2 = smart_rename(from,pcVar4,0)" identifier = (call_expression "smart_rename(from,pcVar4,0)" identifier (argument_list "(from,pcVar4,0)" ( identifier , identifier , number_literal )))) ;) (if_statement "if (iVar2 != 0) {\n                    /* WARNING: Subroutine does not return */\n        xexit(1);\n      }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n        xexit(1);\n      }" { comment (expression_statement "xexit(1);" (call_expression "xexit(1)" identifier (argument_list "(1)" ( number_literal ))) ;) })) (expression_statement "free(pcVar4);" (call_expression "free(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier ))) ;) (expression_statement "free(from);" (call_expression "free(from)" identifier (argument_list "(from)" ( identifier ))) ;) (return_statement "return;" return ;) })) })) comment (expression_statement "bfd_fatal(pcVar4);" (call_expression "bfd_fatal(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier ))) ;) })))
(translation_unit "void FUN_00105280(undefined8 *param_1)\n\n{\n  int iVar1;\n  size_t sVar2;\n  char *__dest;\n  void *__ptr;\n  long lVar3;\n  undefined8 uVar4;\n  \n  uVar4 = param_1[0x1b];\n  sVar2 = strlen((char *)*param_1);\n  __dest = (char *)xmalloc(sVar2 + 1);\n  strcpy(__dest,(char *)*param_1);\n  __ptr = (void *)FUN_001080c0(__dest);\n  if (__ptr != (void *)0x0) {\n    DAT_001104e8 = __ptr;\n    lVar3 = bfd_openw(__ptr,*(undefined8 *)param_1[1]);\n    if (lVar3 != 0) {\n      DAT_001104d8 = lVar3;\n      bfd_set_format(lVar3,2);\n      *(byte *)(lVar3 + 0x47) =\n           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f;\n      if (DAT_00110508 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;\n      }\n      if (DAT_00110314 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;\n      }\n      if ((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)) {\n        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;\n      }\n      iVar1 = bfd_set_archive_head(lVar3,uVar4);\n      if ((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)) {\n        DAT_001104d8 = 0;\n        DAT_001104e8 = (void *)0x0;\n        bfd_close(param_1);\n        iVar1 = FUN_001070c0(__ptr,__dest,0);\n        if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }\n        goto LAB_001053db;\n      }\n    }\n    FUN_001077e0(__dest);\n  }\n  uVar4 = dcgettext(0,"could not create temporary file whilst writing archive",5);\n  FUN_001077e0(uVar4);\nLAB_001053db:\n                    \n  xexit(1);\n}\n\n" (function_definition "void FUN_00105280(undefined8 *param_1)\n\n{\n  int iVar1;\n  size_t sVar2;\n  char *__dest;\n  void *__ptr;\n  long lVar3;\n  undefined8 uVar4;\n  \n  uVar4 = param_1[0x1b];\n  sVar2 = strlen((char *)*param_1);\n  __dest = (char *)xmalloc(sVar2 + 1);\n  strcpy(__dest,(char *)*param_1);\n  __ptr = (void *)FUN_001080c0(__dest);\n  if (__ptr != (void *)0x0) {\n    DAT_001104e8 = __ptr;\n    lVar3 = bfd_openw(__ptr,*(undefined8 *)param_1[1]);\n    if (lVar3 != 0) {\n      DAT_001104d8 = lVar3;\n      bfd_set_format(lVar3,2);\n      *(byte *)(lVar3 + 0x47) =\n           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f;\n      if (DAT_00110508 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;\n      }\n      if (DAT_00110314 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;\n      }\n      if ((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)) {\n        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;\n      }\n      iVar1 = bfd_set_archive_head(lVar3,uVar4);\n      if ((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)) {\n        DAT_001104d8 = 0;\n        DAT_001104e8 = (void *)0x0;\n        bfd_close(param_1);\n        iVar1 = FUN_001070c0(__ptr,__dest,0);\n        if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }\n        goto LAB_001053db;\n      }\n    }\n    FUN_001077e0(__dest);\n  }\n  uVar4 = dcgettext(0,"could not create temporary file whilst writing archive",5);\n  FUN_001077e0(uVar4);\nLAB_001053db:\n                    \n  xexit(1);\n}" primitive_type (function_declarator "FUN_00105280(undefined8 *param_1)" identifier (parameter_list "(undefined8 *param_1)" ( (parameter_declaration "undefined8 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  char *__dest;\n  void *__ptr;\n  long lVar3;\n  undefined8 uVar4;\n  \n  uVar4 = param_1[0x1b];\n  sVar2 = strlen((char *)*param_1);\n  __dest = (char *)xmalloc(sVar2 + 1);\n  strcpy(__dest,(char *)*param_1);\n  __ptr = (void *)FUN_001080c0(__dest);\n  if (__ptr != (void *)0x0) {\n    DAT_001104e8 = __ptr;\n    lVar3 = bfd_openw(__ptr,*(undefined8 *)param_1[1]);\n    if (lVar3 != 0) {\n      DAT_001104d8 = lVar3;\n      bfd_set_format(lVar3,2);\n      *(byte *)(lVar3 + 0x47) =\n           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f;\n      if (DAT_00110508 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;\n      }\n      if (DAT_00110314 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;\n      }\n      if ((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)) {\n        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;\n      }\n      iVar1 = bfd_set_archive_head(lVar3,uVar4);\n      if ((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)) {\n        DAT_001104d8 = 0;\n        DAT_001104e8 = (void *)0x0;\n        bfd_close(param_1);\n        iVar1 = FUN_001070c0(__ptr,__dest,0);\n        if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }\n        goto LAB_001053db;\n      }\n    }\n    FUN_001077e0(__dest);\n  }\n  uVar4 = dcgettext(0,"could not create temporary file whilst writing archive",5);\n  FUN_001077e0(uVar4);\nLAB_001053db:\n                    \n  xexit(1);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "void *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 uVar4;" type_identifier identifier ;) (expression_statement "uVar4 = param_1[0x1b];" (assignment_expression "uVar4 = param_1[0x1b]" identifier = (subscript_expression "param_1[0x1b]" identifier [ number_literal ])) ;) (expression_statement "sVar2 = strlen((char *)*param_1);" (assignment_expression "sVar2 = strlen((char *)*param_1)" identifier = (call_expression "strlen((char *)*param_1)" identifier (argument_list "((char *)*param_1)" ( (cast_expression "(char *)*param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier)) )))) ;) (expression_statement "__dest = (char *)xmalloc(sVar2 + 1);" (assignment_expression "__dest = (char *)xmalloc(sVar2 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar2 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar2 + 1)" identifier (argument_list "(sVar2 + 1)" ( (binary_expression "sVar2 + 1" identifier + number_literal) ))))) ;) (expression_statement "strcpy(__dest,(char *)*param_1);" (call_expression "strcpy(__dest,(char *)*param_1)" identifier (argument_list "(__dest,(char *)*param_1)" ( identifier , (cast_expression "(char *)*param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier)) ))) ;) (expression_statement "__ptr = (void *)FUN_001080c0(__dest);" (assignment_expression "__ptr = (void *)FUN_001080c0(__dest)" identifier = (cast_expression "(void *)FUN_001080c0(__dest)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_001080c0(__dest)" identifier (argument_list "(__dest)" ( identifier ))))) ;) (if_statement "if (__ptr != (void *)0x0) {\n    DAT_001104e8 = __ptr;\n    lVar3 = bfd_openw(__ptr,*(undefined8 *)param_1[1]);\n    if (lVar3 != 0) {\n      DAT_001104d8 = lVar3;\n      bfd_set_format(lVar3,2);\n      *(byte *)(lVar3 + 0x47) =\n           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f;\n      if (DAT_00110508 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;\n      }\n      if (DAT_00110314 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;\n      }\n      if ((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)) {\n        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;\n      }\n      iVar1 = bfd_set_archive_head(lVar3,uVar4);\n      if ((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)) {\n        DAT_001104d8 = 0;\n        DAT_001104e8 = (void *)0x0;\n        bfd_close(param_1);\n        iVar1 = FUN_001070c0(__ptr,__dest,0);\n        if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }\n        goto LAB_001053db;\n      }\n    }\n    FUN_001077e0(__dest);\n  }" if (parenthesized_expression "(__ptr != (void *)0x0)" ( (binary_expression "__ptr != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    DAT_001104e8 = __ptr;\n    lVar3 = bfd_openw(__ptr,*(undefined8 *)param_1[1]);\n    if (lVar3 != 0) {\n      DAT_001104d8 = lVar3;\n      bfd_set_format(lVar3,2);\n      *(byte *)(lVar3 + 0x47) =\n           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f;\n      if (DAT_00110508 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;\n      }\n      if (DAT_00110314 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;\n      }\n      if ((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)) {\n        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;\n      }\n      iVar1 = bfd_set_archive_head(lVar3,uVar4);\n      if ((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)) {\n        DAT_001104d8 = 0;\n        DAT_001104e8 = (void *)0x0;\n        bfd_close(param_1);\n        iVar1 = FUN_001070c0(__ptr,__dest,0);\n        if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }\n        goto LAB_001053db;\n      }\n    }\n    FUN_001077e0(__dest);\n  }" { (expression_statement "DAT_001104e8 = __ptr;" (assignment_expression "DAT_001104e8 = __ptr" identifier = identifier) ;) (expression_statement "lVar3 = bfd_openw(__ptr,*(undefined8 *)param_1[1]);" (assignment_expression "lVar3 = bfd_openw(__ptr,*(undefined8 *)param_1[1])" identifier = (call_expression "bfd_openw(__ptr,*(undefined8 *)param_1[1])" identifier (argument_list "(__ptr,*(undefined8 *)param_1[1])" ( identifier , (pointer_expression "*(undefined8 *)param_1[1]" * (cast_expression "(undefined8 *)param_1[1]" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) )))) ;) (if_statement "if (lVar3 != 0) {\n      DAT_001104d8 = lVar3;\n      bfd_set_format(lVar3,2);\n      *(byte *)(lVar3 + 0x47) =\n           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f;\n      if (DAT_00110508 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;\n      }\n      if (DAT_00110314 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;\n      }\n      if ((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)) {\n        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;\n      }\n      iVar1 = bfd_set_archive_head(lVar3,uVar4);\n      if ((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)) {\n        DAT_001104d8 = 0;\n        DAT_001104e8 = (void *)0x0;\n        bfd_close(param_1);\n        iVar1 = FUN_001070c0(__ptr,__dest,0);\n        if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }\n        goto LAB_001053db;\n      }\n    }" if (parenthesized_expression "(lVar3 != 0)" ( (binary_expression "lVar3 != 0" identifier != number_literal) )) (compound_statement "{\n      DAT_001104d8 = lVar3;\n      bfd_set_format(lVar3,2);\n      *(byte *)(lVar3 + 0x47) =\n           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f;\n      if (DAT_00110508 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;\n      }\n      if (DAT_00110314 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;\n      }\n      if ((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)) {\n        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;\n      }\n      iVar1 = bfd_set_archive_head(lVar3,uVar4);\n      if ((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)) {\n        DAT_001104d8 = 0;\n        DAT_001104e8 = (void *)0x0;\n        bfd_close(param_1);\n        iVar1 = FUN_001070c0(__ptr,__dest,0);\n        if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }\n        goto LAB_001053db;\n      }\n    }" { (expression_statement "DAT_001104d8 = lVar3;" (assignment_expression "DAT_001104d8 = lVar3" identifier = identifier) ;) (expression_statement "bfd_set_format(lVar3,2);" (call_expression "bfd_set_format(lVar3,2)" identifier (argument_list "(lVar3,2)" ( identifier , number_literal ))) ;) (expression_statement "*(byte *)(lVar3 + 0x47) =\n           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f;" (assignment_expression "*(byte *)(lVar3 + 0x47) =\n           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f" (pointer_expression "*(byte *)(lVar3 + 0x47)" * (cast_expression "(byte *)(lVar3 + 0x47)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x47)" ( (binary_expression "lVar3 + 0x47" identifier + number_literal) )))) = (binary_expression "(byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f" (call_expression "(byte)((~DAT_001104c0 >> 0x1f) << 7)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "((~DAT_001104c0 >> 0x1f) << 7)" ( (binary_expression "(~DAT_001104c0 >> 0x1f) << 7" (parenthesized_expression "(~DAT_001104c0 >> 0x1f)" ( (binary_expression "~DAT_001104c0 >> 0x1f" (unary_expression "~DAT_001104c0" ~ identifier) >> number_literal) )) << number_literal) ))) | (binary_expression "*(byte *)(lVar3 + 0x47) & 0x7f" (pointer_expression "*(byte *)(lVar3 + 0x47)" * (cast_expression "(byte *)(lVar3 + 0x47)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x47)" ( (binary_expression "lVar3 + 0x47" identifier + number_literal) )))) & number_literal))) ;) (if_statement "if (DAT_00110508 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;\n      }" if (parenthesized_expression "(DAT_00110508 != 0)" ( (binary_expression "DAT_00110508 != 0" identifier != number_literal) )) (compound_statement "{\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;\n      }" { (expression_statement "*(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;" (assignment_expression "*(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000" (pointer_expression "*(uint *)(lVar3 + 0x44)" * (cast_expression "(uint *)(lVar3 + 0x44)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x44)" ( (binary_expression "lVar3 + 0x44" identifier + number_literal) )))) = (binary_expression "*(uint *)(lVar3 + 0x44) | 0x8000" (pointer_expression "*(uint *)(lVar3 + 0x44)" * (cast_expression "(uint *)(lVar3 + 0x44)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x44)" ( (binary_expression "lVar3 + 0x44" identifier + number_literal) )))) | number_literal)) ;) })) (if_statement "if (DAT_00110314 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;\n      }" if (parenthesized_expression "(DAT_00110314 != 0)" ( (binary_expression "DAT_00110314 != 0" identifier != number_literal) )) (compound_statement "{\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;\n      }" { (expression_statement "*(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;" (assignment_expression "*(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000" (pointer_expression "*(uint *)(lVar3 + 0x44)" * (cast_expression "(uint *)(lVar3 + 0x44)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x44)" ( (binary_expression "lVar3 + 0x44" identifier + number_literal) )))) = (binary_expression "*(uint *)(lVar3 + 0x44) | 0x40000" (pointer_expression "*(uint *)(lVar3 + 0x44)" * (cast_expression "(uint *)(lVar3 + 0x44)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x44)" ( (binary_expression "lVar3 + 0x44" identifier + number_literal) )))) | number_literal)) ;) })) (if_statement "if ((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)) {\n        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;\n      }" if (parenthesized_expression "((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0))" ( (binary_expression "(DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)" (parenthesized_expression "(DAT_00110500 != 0)" ( (binary_expression "DAT_00110500 != 0" identifier != number_literal) )) || (parenthesized_expression "((*(byte *)(param_1 + 9) & 1) != 0)" ( (binary_expression "(*(byte *)(param_1 + 9) & 1) != 0" (parenthesized_expression "(*(byte *)(param_1 + 9) & 1)" ( (binary_expression "*(byte *)(param_1 + 9) & 1" (pointer_expression "*(byte *)(param_1 + 9)" * (cast_expression "(byte *)(param_1 + 9)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 9)" ( (binary_expression "param_1 + 9" identifier + number_literal) )))) & number_literal) )) != number_literal) ))) )) (compound_statement "{\n        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;\n      }" { (expression_statement "*(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;" (assignment_expression "*(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1" (pointer_expression "*(byte *)(lVar3 + 0x48)" * (cast_expression "(byte *)(lVar3 + 0x48)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x48)" ( (binary_expression "lVar3 + 0x48" identifier + number_literal) )))) = (binary_expression "*(byte *)(lVar3 + 0x48) | 1" (pointer_expression "*(byte *)(lVar3 + 0x48)" * (cast_expression "(byte *)(lVar3 + 0x48)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x48)" ( (binary_expression "lVar3 + 0x48" identifier + number_literal) )))) | number_literal)) ;) })) (expression_statement "iVar1 = bfd_set_archive_head(lVar3,uVar4);" (assignment_expression "iVar1 = bfd_set_archive_head(lVar3,uVar4)" identifier = (call_expression "bfd_set_archive_head(lVar3,uVar4)" identifier (argument_list "(lVar3,uVar4)" ( identifier , identifier )))) ;) (if_statement "if ((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)) {\n        DAT_001104d8 = 0;\n        DAT_001104e8 = (void *)0x0;\n        bfd_close(param_1);\n        iVar1 = FUN_001070c0(__ptr,__dest,0);\n        if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }\n        goto LAB_001053db;\n      }" if (parenthesized_expression "((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0))" ( (binary_expression "(iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)" (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) && (parenthesized_expression "(iVar1 = bfd_close(lVar3), iVar1 != 0)" ( (comma_expression "iVar1 = bfd_close(lVar3), iVar1 != 0" (assignment_expression "iVar1 = bfd_close(lVar3)" identifier = (call_expression "bfd_close(lVar3)" identifier (argument_list "(lVar3)" ( identifier )))) , (binary_expression "iVar1 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n        DAT_001104d8 = 0;\n        DAT_001104e8 = (void *)0x0;\n        bfd_close(param_1);\n        iVar1 = FUN_001070c0(__ptr,__dest,0);\n        if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }\n        goto LAB_001053db;\n      }" { (expression_statement "DAT_001104d8 = 0;" (assignment_expression "DAT_001104d8 = 0" identifier = number_literal) ;) (expression_statement "DAT_001104e8 = (void *)0x0;" (assignment_expression "DAT_001104e8 = (void *)0x0" identifier = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "bfd_close(param_1);" (call_expression "bfd_close(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "iVar1 = FUN_001070c0(__ptr,__dest,0);" (assignment_expression "iVar1 = FUN_001070c0(__ptr,__dest,0)" identifier = (call_expression "FUN_001070c0(__ptr,__dest,0)" identifier (argument_list "(__ptr,__dest,0)" ( identifier , identifier , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          free(__dest);\n          free(__ptr);\n          return;\n        }" { (expression_statement "free(__dest);" (call_expression "free(__dest)" identifier (argument_list "(__dest)" ( identifier ))) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (return_statement "return;" return ;) })) (goto_statement "goto LAB_001053db;" goto statement_identifier ;) })) })) (expression_statement "FUN_001077e0(__dest);" (call_expression "FUN_001077e0(__dest)" identifier (argument_list "(__dest)" ( identifier ))) ;) })) (expression_statement "uVar4 = dcgettext(0,"could not create temporary file whilst writing archive",5);" (assignment_expression "uVar4 = dcgettext(0,"could not create temporary file whilst writing archive",5)" identifier = (call_expression "dcgettext(0,"could not create temporary file whilst writing archive",5)" identifier (argument_list "(0,"could not create temporary file whilst writing archive",5)" ( number_literal , (string_literal ""could not create temporary file whilst writing archive"" " string_content ") , number_literal )))) ;) (expression_statement "FUN_001077e0(uVar4);" (call_expression "FUN_001077e0(uVar4)" identifier (argument_list "(uVar4)" ( identifier ))) ;) (labeled_statement "LAB_001053db:\n                    \n  xexit(1);" statement_identifier : (expression_statement "xexit(1);" (call_expression "xexit(1)" identifier (argument_list "(1)" ( number_literal ))) ;)) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT)) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT)) ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (parenthesized_expression ( (binary_expression (unary_expression ~ IDENT) >> LIT) )) << LIT) ))) | (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) | LIT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) | LIT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) || (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) | LIT)) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) , (binary_expression IDENT != LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })) (goto_statement goto statement_identifier ;) })) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , (string_literal " string_content ") , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;)) })))
(function_definition "void FUN_00105280(undefined8 *param_1)\n\n{\n  int iVar1;\n  size_t sVar2;\n  char *__dest;\n  void *__ptr;\n  long lVar3;\n  undefined8 uVar4;\n  \n  uVar4 = param_1[0x1b];\n  sVar2 = strlen((char *)*param_1);\n  __dest = (char *)xmalloc(sVar2 + 1);\n  strcpy(__dest,(char *)*param_1);\n  __ptr = (void *)FUN_001080c0(__dest);\n  if (__ptr != (void *)0x0) {\n    DAT_001104e8 = __ptr;\n    lVar3 = bfd_openw(__ptr,*(undefined8 *)param_1[1]);\n    if (lVar3 != 0) {\n      DAT_001104d8 = lVar3;\n      bfd_set_format(lVar3,2);\n      *(byte *)(lVar3 + 0x47) =\n           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f;\n      if (DAT_00110508 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;\n      }\n      if (DAT_00110314 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;\n      }\n      if ((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)) {\n        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;\n      }\n      iVar1 = bfd_set_archive_head(lVar3,uVar4);\n      if ((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)) {\n        DAT_001104d8 = 0;\n        DAT_001104e8 = (void *)0x0;\n        bfd_close(param_1);\n        iVar1 = FUN_001070c0(__ptr,__dest,0);\n        if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }\n        goto LAB_001053db;\n      }\n    }\n    FUN_001077e0(__dest);\n  }\n  uVar4 = dcgettext(0,"could not create temporary file whilst writing archive",5);\n  FUN_001077e0(uVar4);\nLAB_001053db:\n                    \n  xexit(1);\n}" (primitive_type "void") (function_declarator "FUN_00105280(undefined8 *param_1)" (identifier "FUN_00105280") (parameter_list "(undefined8 *param_1)" (( "(") (parameter_declaration "undefined8 *param_1" (type_identifier "undefined8") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  char *__dest;\n  void *__ptr;\n  long lVar3;\n  undefined8 uVar4;\n  \n  uVar4 = param_1[0x1b];\n  sVar2 = strlen((char *)*param_1);\n  __dest = (char *)xmalloc(sVar2 + 1);\n  strcpy(__dest,(char *)*param_1);\n  __ptr = (void *)FUN_001080c0(__dest);\n  if (__ptr != (void *)0x0) {\n    DAT_001104e8 = __ptr;\n    lVar3 = bfd_openw(__ptr,*(undefined8 *)param_1[1]);\n    if (lVar3 != 0) {\n      DAT_001104d8 = lVar3;\n      bfd_set_format(lVar3,2);\n      *(byte *)(lVar3 + 0x47) =\n           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f;\n      if (DAT_00110508 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;\n      }\n      if (DAT_00110314 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;\n      }\n      if ((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)) {\n        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;\n      }\n      iVar1 = bfd_set_archive_head(lVar3,uVar4);\n      if ((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)) {\n        DAT_001104d8 = 0;\n        DAT_001104e8 = (void *)0x0;\n        bfd_close(param_1);\n        iVar1 = FUN_001070c0(__ptr,__dest,0);\n        if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }\n        goto LAB_001053db;\n      }\n    }\n    FUN_001077e0(__dest);\n  }\n  uVar4 = dcgettext(0,"could not create temporary file whilst writing archive",5);\n  FUN_001077e0(uVar4);\nLAB_001053db:\n                    \n  xexit(1);\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "size_t sVar2;" (primitive_type "size_t") (identifier "sVar2") (; ";")) (declaration "char *__dest;" (primitive_type "char") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (declaration "void *__ptr;" (primitive_type "void") (pointer_declarator "*__ptr" (* "*") (identifier "__ptr")) (; ";")) (declaration "long lVar3;" (sized_type_specifier "long" (long "long")) (identifier "lVar3") (; ";")) (declaration "undefined8 uVar4;" (type_identifier "undefined8") (identifier "uVar4") (; ";")) (expression_statement "uVar4 = param_1[0x1b];" (assignment_expression "uVar4 = param_1[0x1b]" (identifier "uVar4") (= "=") (subscript_expression "param_1[0x1b]" (identifier "param_1") ([ "[") (number_literal "0x1b") (] "]"))) (; ";")) (expression_statement "sVar2 = strlen((char *)*param_1);" (assignment_expression "sVar2 = strlen((char *)*param_1)" (identifier "sVar2") (= "=") (call_expression "strlen((char *)*param_1)" (identifier "strlen") (argument_list "((char *)*param_1)" (( "(") (cast_expression "(char *)*param_1" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) () ")")))) (; ";")) (expression_statement "__dest = (char *)xmalloc(sVar2 + 1);" (assignment_expression "__dest = (char *)xmalloc(sVar2 + 1)" (identifier "__dest") (= "=") (cast_expression "(char *)xmalloc(sVar2 + 1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(sVar2 + 1)" (identifier "xmalloc") (argument_list "(sVar2 + 1)" (( "(") (binary_expression "sVar2 + 1" (identifier "sVar2") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (expression_statement "strcpy(__dest,(char *)*param_1);" (call_expression "strcpy(__dest,(char *)*param_1)" (identifier "strcpy") (argument_list "(__dest,(char *)*param_1)" (( "(") (identifier "__dest") (, ",") (cast_expression "(char *)*param_1" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) () ")"))) (; ";")) (expression_statement "__ptr = (void *)FUN_001080c0(__dest);" (assignment_expression "__ptr = (void *)FUN_001080c0(__dest)" (identifier "__ptr") (= "=") (cast_expression "(void *)FUN_001080c0(__dest)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_001080c0(__dest)" (identifier "FUN_001080c0") (argument_list "(__dest)" (( "(") (identifier "__dest") () ")"))))) (; ";")) (if_statement "if (__ptr != (void *)0x0) {\n    DAT_001104e8 = __ptr;\n    lVar3 = bfd_openw(__ptr,*(undefined8 *)param_1[1]);\n    if (lVar3 != 0) {\n      DAT_001104d8 = lVar3;\n      bfd_set_format(lVar3,2);\n      *(byte *)(lVar3 + 0x47) =\n           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f;\n      if (DAT_00110508 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;\n      }\n      if (DAT_00110314 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;\n      }\n      if ((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)) {\n        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;\n      }\n      iVar1 = bfd_set_archive_head(lVar3,uVar4);\n      if ((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)) {\n        DAT_001104d8 = 0;\n        DAT_001104e8 = (void *)0x0;\n        bfd_close(param_1);\n        iVar1 = FUN_001070c0(__ptr,__dest,0);\n        if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }\n        goto LAB_001053db;\n      }\n    }\n    FUN_001077e0(__dest);\n  }" (if "if") (parenthesized_expression "(__ptr != (void *)0x0)" (( "(") (binary_expression "__ptr != (void *)0x0" (identifier "__ptr") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    DAT_001104e8 = __ptr;\n    lVar3 = bfd_openw(__ptr,*(undefined8 *)param_1[1]);\n    if (lVar3 != 0) {\n      DAT_001104d8 = lVar3;\n      bfd_set_format(lVar3,2);\n      *(byte *)(lVar3 + 0x47) =\n           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f;\n      if (DAT_00110508 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;\n      }\n      if (DAT_00110314 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;\n      }\n      if ((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)) {\n        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;\n      }\n      iVar1 = bfd_set_archive_head(lVar3,uVar4);\n      if ((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)) {\n        DAT_001104d8 = 0;\n        DAT_001104e8 = (void *)0x0;\n        bfd_close(param_1);\n        iVar1 = FUN_001070c0(__ptr,__dest,0);\n        if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }\n        goto LAB_001053db;\n      }\n    }\n    FUN_001077e0(__dest);\n  }" ({ "{") (expression_statement "DAT_001104e8 = __ptr;" (assignment_expression "DAT_001104e8 = __ptr" (identifier "DAT_001104e8") (= "=") (identifier "__ptr")) (; ";")) (expression_statement "lVar3 = bfd_openw(__ptr,*(undefined8 *)param_1[1]);" (assignment_expression "lVar3 = bfd_openw(__ptr,*(undefined8 *)param_1[1])" (identifier "lVar3") (= "=") (call_expression "bfd_openw(__ptr,*(undefined8 *)param_1[1])" (identifier "bfd_openw") (argument_list "(__ptr,*(undefined8 *)param_1[1])" (( "(") (identifier "__ptr") (, ",") (pointer_expression "*(undefined8 *)param_1[1]" (* "*") (cast_expression "(undefined8 *)param_1[1]" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")))) () ")")))) (; ";")) (if_statement "if (lVar3 != 0) {\n      DAT_001104d8 = lVar3;\n      bfd_set_format(lVar3,2);\n      *(byte *)(lVar3 + 0x47) =\n           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f;\n      if (DAT_00110508 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;\n      }\n      if (DAT_00110314 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;\n      }\n      if ((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)) {\n        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;\n      }\n      iVar1 = bfd_set_archive_head(lVar3,uVar4);\n      if ((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)) {\n        DAT_001104d8 = 0;\n        DAT_001104e8 = (void *)0x0;\n        bfd_close(param_1);\n        iVar1 = FUN_001070c0(__ptr,__dest,0);\n        if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }\n        goto LAB_001053db;\n      }\n    }" (if "if") (parenthesized_expression "(lVar3 != 0)" (( "(") (binary_expression "lVar3 != 0" (identifier "lVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      DAT_001104d8 = lVar3;\n      bfd_set_format(lVar3,2);\n      *(byte *)(lVar3 + 0x47) =\n           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f;\n      if (DAT_00110508 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;\n      }\n      if (DAT_00110314 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;\n      }\n      if ((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)) {\n        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;\n      }\n      iVar1 = bfd_set_archive_head(lVar3,uVar4);\n      if ((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)) {\n        DAT_001104d8 = 0;\n        DAT_001104e8 = (void *)0x0;\n        bfd_close(param_1);\n        iVar1 = FUN_001070c0(__ptr,__dest,0);\n        if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }\n        goto LAB_001053db;\n      }\n    }" ({ "{") (expression_statement "DAT_001104d8 = lVar3;" (assignment_expression "DAT_001104d8 = lVar3" (identifier "DAT_001104d8") (= "=") (identifier "lVar3")) (; ";")) (expression_statement "bfd_set_format(lVar3,2);" (call_expression "bfd_set_format(lVar3,2)" (identifier "bfd_set_format") (argument_list "(lVar3,2)" (( "(") (identifier "lVar3") (, ",") (number_literal "2") () ")"))) (; ";")) (expression_statement "*(byte *)(lVar3 + 0x47) =\n           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f;" (assignment_expression "*(byte *)(lVar3 + 0x47) =\n           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f" (pointer_expression "*(byte *)(lVar3 + 0x47)" (* "*") (cast_expression "(byte *)(lVar3 + 0x47)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x47)" (( "(") (binary_expression "lVar3 + 0x47" (identifier "lVar3") (+ "+") (number_literal "0x47")) () ")")))) (= "=") (binary_expression "(byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f" (call_expression "(byte)((~DAT_001104c0 >> 0x1f) << 7)" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "((~DAT_001104c0 >> 0x1f) << 7)" (( "(") (binary_expression "(~DAT_001104c0 >> 0x1f) << 7" (parenthesized_expression "(~DAT_001104c0 >> 0x1f)" (( "(") (binary_expression "~DAT_001104c0 >> 0x1f" (unary_expression "~DAT_001104c0" (~ "~") (identifier "DAT_001104c0")) (>> ">>") (number_literal "0x1f")) () ")")) (<< "<<") (number_literal "7")) () ")"))) (| "|") (binary_expression "*(byte *)(lVar3 + 0x47) & 0x7f" (pointer_expression "*(byte *)(lVar3 + 0x47)" (* "*") (cast_expression "(byte *)(lVar3 + 0x47)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x47)" (( "(") (binary_expression "lVar3 + 0x47" (identifier "lVar3") (+ "+") (number_literal "0x47")) () ")")))) (& "&") (number_literal "0x7f")))) (; ";")) (if_statement "if (DAT_00110508 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;\n      }" (if "if") (parenthesized_expression "(DAT_00110508 != 0)" (( "(") (binary_expression "DAT_00110508 != 0" (identifier "DAT_00110508") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;\n      }" ({ "{") (expression_statement "*(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;" (assignment_expression "*(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000" (pointer_expression "*(uint *)(lVar3 + 0x44)" (* "*") (cast_expression "(uint *)(lVar3 + 0x44)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x44)" (( "(") (binary_expression "lVar3 + 0x44" (identifier "lVar3") (+ "+") (number_literal "0x44")) () ")")))) (= "=") (binary_expression "*(uint *)(lVar3 + 0x44) | 0x8000" (pointer_expression "*(uint *)(lVar3 + 0x44)" (* "*") (cast_expression "(uint *)(lVar3 + 0x44)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x44)" (( "(") (binary_expression "lVar3 + 0x44" (identifier "lVar3") (+ "+") (number_literal "0x44")) () ")")))) (| "|") (number_literal "0x8000"))) (; ";")) (} "}"))) (if_statement "if (DAT_00110314 != 0) {\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;\n      }" (if "if") (parenthesized_expression "(DAT_00110314 != 0)" (( "(") (binary_expression "DAT_00110314 != 0" (identifier "DAT_00110314") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;\n      }" ({ "{") (expression_statement "*(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;" (assignment_expression "*(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000" (pointer_expression "*(uint *)(lVar3 + 0x44)" (* "*") (cast_expression "(uint *)(lVar3 + 0x44)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x44)" (( "(") (binary_expression "lVar3 + 0x44" (identifier "lVar3") (+ "+") (number_literal "0x44")) () ")")))) (= "=") (binary_expression "*(uint *)(lVar3 + 0x44) | 0x40000" (pointer_expression "*(uint *)(lVar3 + 0x44)" (* "*") (cast_expression "(uint *)(lVar3 + 0x44)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x44)" (( "(") (binary_expression "lVar3 + 0x44" (identifier "lVar3") (+ "+") (number_literal "0x44")) () ")")))) (| "|") (number_literal "0x40000"))) (; ";")) (} "}"))) (if_statement "if ((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)) {\n        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;\n      }" (if "if") (parenthesized_expression "((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0))" (( "(") (binary_expression "(DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)" (parenthesized_expression "(DAT_00110500 != 0)" (( "(") (binary_expression "DAT_00110500 != 0" (identifier "DAT_00110500") (!= "!=") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "((*(byte *)(param_1 + 9) & 1) != 0)" (( "(") (binary_expression "(*(byte *)(param_1 + 9) & 1) != 0" (parenthesized_expression "(*(byte *)(param_1 + 9) & 1)" (( "(") (binary_expression "*(byte *)(param_1 + 9) & 1" (pointer_expression "*(byte *)(param_1 + 9)" (* "*") (cast_expression "(byte *)(param_1 + 9)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 9)" (( "(") (binary_expression "param_1 + 9" (identifier "param_1") (+ "+") (number_literal "9")) () ")")))) (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;\n      }" ({ "{") (expression_statement "*(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;" (assignment_expression "*(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1" (pointer_expression "*(byte *)(lVar3 + 0x48)" (* "*") (cast_expression "(byte *)(lVar3 + 0x48)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x48)" (( "(") (binary_expression "lVar3 + 0x48" (identifier "lVar3") (+ "+") (number_literal "0x48")) () ")")))) (= "=") (binary_expression "*(byte *)(lVar3 + 0x48) | 1" (pointer_expression "*(byte *)(lVar3 + 0x48)" (* "*") (cast_expression "(byte *)(lVar3 + 0x48)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x48)" (( "(") (binary_expression "lVar3 + 0x48" (identifier "lVar3") (+ "+") (number_literal "0x48")) () ")")))) (| "|") (number_literal "1"))) (; ";")) (} "}"))) (expression_statement "iVar1 = bfd_set_archive_head(lVar3,uVar4);" (assignment_expression "iVar1 = bfd_set_archive_head(lVar3,uVar4)" (identifier "iVar1") (= "=") (call_expression "bfd_set_archive_head(lVar3,uVar4)" (identifier "bfd_set_archive_head") (argument_list "(lVar3,uVar4)" (( "(") (identifier "lVar3") (, ",") (identifier "uVar4") () ")")))) (; ";")) (if_statement "if ((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)) {\n        DAT_001104d8 = 0;\n        DAT_001104e8 = (void *)0x0;\n        bfd_close(param_1);\n        iVar1 = FUN_001070c0(__ptr,__dest,0);\n        if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }\n        goto LAB_001053db;\n      }" (if "if") (parenthesized_expression "((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0))" (( "(") (binary_expression "(iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)" (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(iVar1 = bfd_close(lVar3), iVar1 != 0)" (( "(") (comma_expression "iVar1 = bfd_close(lVar3), iVar1 != 0" (assignment_expression "iVar1 = bfd_close(lVar3)" (identifier "iVar1") (= "=") (call_expression "bfd_close(lVar3)" (identifier "bfd_close") (argument_list "(lVar3)" (( "(") (identifier "lVar3") () ")")))) (, ",") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n        DAT_001104d8 = 0;\n        DAT_001104e8 = (void *)0x0;\n        bfd_close(param_1);\n        iVar1 = FUN_001070c0(__ptr,__dest,0);\n        if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }\n        goto LAB_001053db;\n      }" ({ "{") (expression_statement "DAT_001104d8 = 0;" (assignment_expression "DAT_001104d8 = 0" (identifier "DAT_001104d8") (= "=") (number_literal "0")) (; ";")) (expression_statement "DAT_001104e8 = (void *)0x0;" (assignment_expression "DAT_001104e8 = (void *)0x0" (identifier "DAT_001104e8") (= "=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "bfd_close(param_1);" (call_expression "bfd_close(param_1)" (identifier "bfd_close") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (expression_statement "iVar1 = FUN_001070c0(__ptr,__dest,0);" (assignment_expression "iVar1 = FUN_001070c0(__ptr,__dest,0)" (identifier "iVar1") (= "=") (call_expression "FUN_001070c0(__ptr,__dest,0)" (identifier "FUN_001070c0") (argument_list "(__ptr,__dest,0)" (( "(") (identifier "__ptr") (, ",") (identifier "__dest") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n          free(__dest);\n          free(__ptr);\n          return;\n        }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          free(__dest);\n          free(__ptr);\n          return;\n        }" ({ "{") (expression_statement "free(__dest);" (call_expression "free(__dest)" (identifier "free") (argument_list "(__dest)" (( "(") (identifier "__dest") () ")"))) (; ";")) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" (identifier "free") (argument_list "(__ptr)" (( "(") (identifier "__ptr") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (goto_statement "goto LAB_001053db;" (goto "goto") (statement_identifier "LAB_001053db") (; ";")) (} "}"))) (} "}"))) (expression_statement "FUN_001077e0(__dest);" (call_expression "FUN_001077e0(__dest)" (identifier "FUN_001077e0") (argument_list "(__dest)" (( "(") (identifier "__dest") () ")"))) (; ";")) (} "}"))) (expression_statement "uVar4 = dcgettext(0,"could not create temporary file whilst writing archive",5);" (assignment_expression "uVar4 = dcgettext(0,"could not create temporary file whilst writing archive",5)" (identifier "uVar4") (= "=") (call_expression "dcgettext(0,"could not create temporary file whilst writing archive",5)" (identifier "dcgettext") (argument_list "(0,"could not create temporary file whilst writing archive",5)" (( "(") (number_literal "0") (, ",") (string_literal ""could not create temporary file whilst writing archive"" (" """) (string_content "could not create temporary file whilst writing archive") (" """)) (, ",") (number_literal "5") () ")")))) (; ";")) (expression_statement "FUN_001077e0(uVar4);" (call_expression "FUN_001077e0(uVar4)" (identifier "FUN_001077e0") (argument_list "(uVar4)" (( "(") (identifier "uVar4") () ")"))) (; ";")) (labeled_statement "LAB_001053db:\n                    \n  xexit(1);" (statement_identifier "LAB_001053db") (: ":") (expression_statement "xexit(1);" (call_expression "xexit(1)" (identifier "xexit") (argument_list "(1)" (( "(") (number_literal "1") () ")"))) (; ";"))) (} "}")))

void function_1(type_1 *iarch)

{
  type_1 *pbVar1;
  int var_16;
  size_t var_3;
  char *pcVar4;
  char *var_6;
  type_1 *var_10;
  
  pbVar1 = iarch->archive_next;
  var_3 = var_1(iarch->filename);
  pcVar4 = (char *)var_2(var_3 + 1);
  var_4(pcVar4,iarch->filename);
  var_6 = var_5(pcVar4);
  if (var_6 == (char *)0x0) {
    pcVar4 = (char *)var_7(0,"could not create temporary file whilst writing archive",5);
                    /* WARNING: Subroutine does not return */
    var_8(pcVar4);
  }
  output_filename = var_6;
  var_10 = (type_1 *)var_9(var_6,iarch->xvec->name);
  if (var_10 != (type_1 *)0x0) {
    output_bfd = var_10;
    var_11(var_10,2);
    var_10->field_0x47 = (byte)(((type_2)~write_armap >> 0x1f) << 7) | var_10->field_0x47 & 0x7f;
    if (var_12 != 0) {
      *(type_2 *)&var_10->field_0x44 = *(type_2 *)&var_10->field_0x44 | 0x8000;
    }
    if (var_13 != 0) {
      *(type_2 *)&var_10->field_0x44 = *(type_2 *)&var_10->field_0x44 | 0x40000;
    }
    if ((var_14 != 0) || ((iarch->field_0x48 & 1) != 0)) {
      var_10->field_0x48 = var_10->field_0x48 | 1;
    }
    var_16 = var_15(var_10,pbVar1);
    if ((var_16 != 0) && (var_16 = var_17(var_10), var_16 != 0)) {
      output_bfd = (type_1 *)0x0;
      output_filename = (char *)0x0;
      var_17(iarch);
      var_16 = var_18(var_6,pcVar4,0);
      if (var_16 != 0) {
                    /* WARNING: Subroutine does not return */
        var_19(1);
      }
      var_20(pcVar4);
      var_20(var_6);
      return;
    }
  }
                    /* WARNING: Subroutine does not return */
  var_8(pcVar4);
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal)))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (parenthesized_expression (binary_expression left: (unary_expression argument: (identifier)) right: (number_literal))) right: (number_literal)))) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) right: (number_literal))))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier)))) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement))) (goto_statement label: (statement_identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (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 (identifier)))) (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal))))))))

void MASKED(undefined8 *param_1)

{
  int iVar1;
  size_t sVar2;
  char *__dest;
  void *__ptr;
  long lVar3;
  undefined8 uVar4;
  
  uVar4 = param_1[0x1b];
  sVar2 = strlen((char *)*param_1);
  __dest = (char *)xmalloc(sVar2 + 1);
  strcpy(__dest,(char *)*param_1);
  __ptr = (void *)FUN_001080c0(__dest);
  if (__ptr != (void *)0x0) {
    DAT_001104e8 = __ptr;
    lVar3 = bfd_openw(__ptr,*(undefined8 *)param_1[1]);
    if (lVar3 != 0) {
      DAT_001104d8 = lVar3;
      bfd_set_format(lVar3,2);
      *(byte *)(lVar3 + 0x47) =
           (byte)((~DAT_001104c0 >> 0x1f) << 7) | *(byte *)(lVar3 + 0x47) & 0x7f;
      if (DAT_00110508 != 0) {
        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x8000;
      }
      if (DAT_00110314 != 0) {
        *(uint *)(lVar3 + 0x44) = *(uint *)(lVar3 + 0x44) | 0x40000;
      }
      if ((DAT_00110500 != 0) || ((*(byte *)(param_1 + 9) & 1) != 0)) {
        *(byte *)(lVar3 + 0x48) = *(byte *)(lVar3 + 0x48) | 1;
      }
      iVar1 = bfd_set_archive_head(lVar3,uVar4);
      if ((iVar1 != 0) && (iVar1 = bfd_close(lVar3), iVar1 != 0)) {
        DAT_001104d8 = 0;
        DAT_001104e8 = (void *)0x0;
        bfd_close(param_1);
        iVar1 = FUN_001070c0(__ptr,__dest,0);
        if (iVar1 == 0) {
          free(__dest);
          free(__ptr);
          return;
        }
        goto LAB_001053db;
      }
    }
    FUN_001077e0(__dest);
  }
  uVar4 = dcgettext(0,"could not create temporary file whilst writing archive",5);
  FUN_001077e0(uVar4);
LAB_001053db:
                    /* WARNING: Subroutine does not return */
  xexit(1);
}

