
char * adjust_relative_path(char *file_name,char *name,ulong name_len)

{
  size_t __size;
  char *pcVar1;
  size_t __n;
  char *message;
  
  pcVar1 = (char *)lbasename();
  if ((*name == '/') || (file_name == pcVar1)) {
    if (name_len + 1 == 0) {
      return (char *)0x0;
    }
    pcVar1 = (char *)malloc(name_len + 1);
    if (pcVar1 != (char *)0x0) {
      memcpy(pcVar1,name,name_len);
      pcVar1[name_len] = '\0';
      return pcVar1;
    }
  }
  else {
    __n = (long)pcVar1 - (long)file_name;
    __size = __n + name_len + 1;
    if ((__size < __n) || (__size < name_len)) {
      pcVar1 = (char *)dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);
      error(pcVar1,name_len);
      return (char *)0x0;
    }
    pcVar1 = (char *)malloc(__size);
    if (pcVar1 != (char *)0x0) {
      memcpy(pcVar1,file_name,__n);
      memcpy(pcVar1 + __n,name,name_len);
      pcVar1[__n + name_len] = '\0';
      return pcVar1;
    }
  }
  message = (char *)dcgettext(0,"Out of memory\n",5);
  error(message);
  return pcVar1;
}



void * FUN_00137da0(void *param_1,char *param_2,size_t param_3)

{
  size_t __size;
  void *pvVar1;
  size_t __n;
  undefined8 uVar2;
  
  pvVar1 = (void *)lbasename();
  if ((*param_2 == '/') || (param_1 == pvVar1)) {
    if (param_3 + 1 == 0) {
      return (void *)0x0;
    }
    pvVar1 = malloc(param_3 + 1);
    if (pvVar1 != (void *)0x0) {
      memcpy(pvVar1,param_2,param_3);
      *(undefined1 *)((long)pvVar1 + param_3) = 0;
      return pvVar1;
    }
  }
  else {
    __n = (long)pvVar1 - (long)param_1;
    __size = __n + param_3 + 1;
    if ((__size < __n) || (__size < param_3)) {
      uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);
      error(uVar2,param_3);
      return (void *)0x0;
    }
    pvVar1 = malloc(__size);
    if (pvVar1 != (void *)0x0) {
      memcpy(pvVar1,param_1,__n);
      memcpy((void *)((long)pvVar1 + __n),param_2,param_3);
      *(undefined1 *)((long)pvVar1 + __n + param_3) = 0;
      return pvVar1;
    }
  }
  uVar2 = dcgettext(0,"Out of memory\n",5);
  error(uVar2);
  return pvVar1;
}


PUSH R15
MOV R15,RDI
PUSH R14
PUSH R13
MOV R13,RSI
PUSH R12
MOV R12,RDX
PUSH RBP
PUSH RBX
SUB RSP,0x8
CALL 0x00107420
CMP byte ptr [R13],0x2f
JZ 0x00137e30
CMP R15,RAX
JZ 0x00137e30
SUB RAX,R15
LEA R14,[RAX + R12*0x1]
MOV RBX,RAX
LEA RDI,[R14 + 0x1]
CMP RAX,RDI
JA 0x00137e60
CMP R12,RDI
JA 0x00137e60
CALL 0x00107550
MOV RBP,RAX
TEST RAX,RAX
JZ 0x00137e88
MOV RDX,RBX
MOV RSI,R15
MOV RDI,RAX
CALL 0x001074b0
LEA RDI,[RBP + RBX*0x1]
MOV RDX,R12
MOV RSI,R13
CALL 0x001074b0
MOV byte ptr [RBP + R14*0x1],0x0
ADD RSP,0x8
MOV RAX,RBP
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
MOV RDI,R12
XOR EBP,EBP
ADD RDI,0x1
JZ 0x00137e19
CALL 0x00107550
MOV RBP,RAX
TEST RAX,RAX
JZ 0x00137e88
MOV RDX,R12
MOV RSI,R13
MOV RDI,RAX
CALL 0x001074b0
MOV byte ptr [RBP + R12*0x1],0x0
JMP 0x00137e19
MOV EDX,0x5
LEA RSI,[0x147ee8]
XOR EDI,EDI
XOR EBP,EBP
CALL 0x00107230
MOV RSI,R12
MOV RDI,RAX
XOR EAX,EAX
CALL 0x00137490
JMP 0x00137e19
XOR EDI,EDI
MOV EDX,0x5
LEA RSI,[0x147b5c]
CALL 0x00107230
MOV RDI,RAX
XOR EAX,EAX
CALL 0x00137490
JMP 0x00137e19
(translation_unit "void * FUN_00137da0(void *param_1,char *param_2,size_t param_3)\n\n{\n  size_t __size;\n  void *pvVar1;\n  size_t __n;\n  undefined8 uVar2;\n  \n  pvVar1 = (void *)lbasename();\n  if ((*param_2 == '/') || (param_1 == pvVar1)) {\n    if (param_3 + 1 == 0) {\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(param_3 + 1);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + param_3) = 0;\n      return pvVar1;\n    }\n  }\n  else {\n    __n = (long)pvVar1 - (long)param_1;\n    __size = __n + param_3 + 1;\n    if ((__size < __n) || (__size < param_3)) {\n      uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(uVar2,param_3);\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_1,__n);\n      memcpy((void *)((long)pvVar1 + __n),param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + __n + param_3) = 0;\n      return pvVar1;\n    }\n  }\n  uVar2 = dcgettext(0,"Out of memory\n",5);\n  error(uVar2);\n  return pvVar1;\n}\n\n" (function_definition "void * FUN_00137da0(void *param_1,char *param_2,size_t param_3)\n\n{\n  size_t __size;\n  void *pvVar1;\n  size_t __n;\n  undefined8 uVar2;\n  \n  pvVar1 = (void *)lbasename();\n  if ((*param_2 == '/') || (param_1 == pvVar1)) {\n    if (param_3 + 1 == 0) {\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(param_3 + 1);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + param_3) = 0;\n      return pvVar1;\n    }\n  }\n  else {\n    __n = (long)pvVar1 - (long)param_1;\n    __size = __n + param_3 + 1;\n    if ((__size < __n) || (__size < param_3)) {\n      uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(uVar2,param_3);\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_1,__n);\n      memcpy((void *)((long)pvVar1 + __n),param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + __n + param_3) = 0;\n      return pvVar1;\n    }\n  }\n  uVar2 = dcgettext(0,"Out of memory\n",5);\n  error(uVar2);\n  return pvVar1;\n}" primitive_type (pointer_declarator "* FUN_00137da0(void *param_1,char *param_2,size_t param_3)" * (function_declarator "FUN_00137da0(void *param_1,char *param_2,size_t param_3)" identifier (parameter_list "(void *param_1,char *param_2,size_t param_3)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "size_t param_3" primitive_type identifier) )))) (compound_statement "{\n  size_t __size;\n  void *pvVar1;\n  size_t __n;\n  undefined8 uVar2;\n  \n  pvVar1 = (void *)lbasename();\n  if ((*param_2 == '/') || (param_1 == pvVar1)) {\n    if (param_3 + 1 == 0) {\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(param_3 + 1);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + param_3) = 0;\n      return pvVar1;\n    }\n  }\n  else {\n    __n = (long)pvVar1 - (long)param_1;\n    __size = __n + param_3 + 1;\n    if ((__size < __n) || (__size < param_3)) {\n      uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(uVar2,param_3);\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_1,__n);\n      memcpy((void *)((long)pvVar1 + __n),param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + __n + param_3) = 0;\n      return pvVar1;\n    }\n  }\n  uVar2 = dcgettext(0,"Out of memory\n",5);\n  error(uVar2);\n  return pvVar1;\n}" { (declaration "size_t __size;" primitive_type identifier ;) (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (expression_statement "pvVar1 = (void *)lbasename();" (assignment_expression "pvVar1 = (void *)lbasename()" identifier = (cast_expression "(void *)lbasename()" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "lbasename()" identifier (argument_list "()" ( ))))) ;) (if_statement "if ((*param_2 == '/') || (param_1 == pvVar1)) {\n    if (param_3 + 1 == 0) {\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(param_3 + 1);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + param_3) = 0;\n      return pvVar1;\n    }\n  }\n  else {\n    __n = (long)pvVar1 - (long)param_1;\n    __size = __n + param_3 + 1;\n    if ((__size < __n) || (__size < param_3)) {\n      uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(uVar2,param_3);\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_1,__n);\n      memcpy((void *)((long)pvVar1 + __n),param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + __n + param_3) = 0;\n      return pvVar1;\n    }\n  }" if (parenthesized_expression "((*param_2 == '/') || (param_1 == pvVar1))" ( (binary_expression "(*param_2 == '/') || (param_1 == pvVar1)" (parenthesized_expression "(*param_2 == '/')" ( (binary_expression "*param_2 == '/'" (pointer_expression "*param_2" * identifier) == (char_literal "'/'" ' character ')) )) || (parenthesized_expression "(param_1 == pvVar1)" ( (binary_expression "param_1 == pvVar1" identifier == identifier) ))) )) (compound_statement "{\n    if (param_3 + 1 == 0) {\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(param_3 + 1);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + param_3) = 0;\n      return pvVar1;\n    }\n  }" { (if_statement "if (param_3 + 1 == 0) {\n      return (void *)0x0;\n    }" if (parenthesized_expression "(param_3 + 1 == 0)" ( (binary_expression "param_3 + 1 == 0" (binary_expression "param_3 + 1" identifier + number_literal) == number_literal) )) (compound_statement "{\n      return (void *)0x0;\n    }" { (return_statement "return (void *)0x0;" return (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pvVar1 = malloc(param_3 + 1);" (assignment_expression "pvVar1 = malloc(param_3 + 1)" identifier = (call_expression "malloc(param_3 + 1)" identifier (argument_list "(param_3 + 1)" ( (binary_expression "param_3 + 1" identifier + number_literal) )))) ;) (if_statement "if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + param_3) = 0;\n      return pvVar1;\n    }" if (parenthesized_expression "(pvVar1 != (void *)0x0)" ( (binary_expression "pvVar1 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      memcpy(pvVar1,param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + param_3) = 0;\n      return pvVar1;\n    }" { (expression_statement "memcpy(pvVar1,param_2,param_3);" (call_expression "memcpy(pvVar1,param_2,param_3)" identifier (argument_list "(pvVar1,param_2,param_3)" ( identifier , identifier , identifier ))) ;) (expression_statement "*(undefined1 *)((long)pvVar1 + param_3) = 0;" (assignment_expression "*(undefined1 *)((long)pvVar1 + param_3) = 0" (pointer_expression "*(undefined1 *)((long)pvVar1 + param_3)" * (cast_expression "(undefined1 *)((long)pvVar1 + param_3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)pvVar1 + param_3)" ( (binary_expression "(long)pvVar1 + param_3" (cast_expression "(long)pvVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier) )))) = number_literal) ;) (return_statement "return pvVar1;" return identifier ;) })) }) (else_clause "else {\n    __n = (long)pvVar1 - (long)param_1;\n    __size = __n + param_3 + 1;\n    if ((__size < __n) || (__size < param_3)) {\n      uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(uVar2,param_3);\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_1,__n);\n      memcpy((void *)((long)pvVar1 + __n),param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + __n + param_3) = 0;\n      return pvVar1;\n    }\n  }" else (compound_statement "{\n    __n = (long)pvVar1 - (long)param_1;\n    __size = __n + param_3 + 1;\n    if ((__size < __n) || (__size < param_3)) {\n      uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(uVar2,param_3);\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_1,__n);\n      memcpy((void *)((long)pvVar1 + __n),param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + __n + param_3) = 0;\n      return pvVar1;\n    }\n  }" { (expression_statement "__n = (long)pvVar1 - (long)param_1;" (assignment_expression "__n = (long)pvVar1 - (long)param_1" identifier = (binary_expression "(long)pvVar1 - (long)param_1" (cast_expression "(long)pvVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) ;) (expression_statement "__size = __n + param_3 + 1;" (assignment_expression "__size = __n + param_3 + 1" identifier = (binary_expression "__n + param_3 + 1" (binary_expression "__n + param_3" identifier + identifier) + number_literal)) ;) (if_statement "if ((__size < __n) || (__size < param_3)) {\n      uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(uVar2,param_3);\n      return (void *)0x0;\n    }" if (parenthesized_expression "((__size < __n) || (__size < param_3))" ( (binary_expression "(__size < __n) || (__size < param_3)" (parenthesized_expression "(__size < __n)" ( (binary_expression "__size < __n" identifier < identifier) )) || (parenthesized_expression "(__size < param_3)" ( (binary_expression "__size < param_3" identifier < identifier) ))) )) (compound_statement "{\n      uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(uVar2,param_3);\n      return (void *)0x0;\n    }" { (expression_statement "uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);" (assignment_expression "uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5)" identifier = (call_expression "dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5)" identifier (argument_list "(0,"Abnormal length of thin archive member name: %lx\n",5)" ( number_literal , (string_literal ""Abnormal length of thin archive member name: %lx\n"" " string_content escape_sequence ") , number_literal )))) ;) (expression_statement "error(uVar2,param_3);" (call_expression "error(uVar2,param_3)" identifier (argument_list "(uVar2,param_3)" ( identifier , identifier ))) ;) (return_statement "return (void *)0x0;" return (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pvVar1 = malloc(__size);" (assignment_expression "pvVar1 = malloc(__size)" identifier = (call_expression "malloc(__size)" identifier (argument_list "(__size)" ( identifier )))) ;) (if_statement "if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_1,__n);\n      memcpy((void *)((long)pvVar1 + __n),param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + __n + param_3) = 0;\n      return pvVar1;\n    }" if (parenthesized_expression "(pvVar1 != (void *)0x0)" ( (binary_expression "pvVar1 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      memcpy(pvVar1,param_1,__n);\n      memcpy((void *)((long)pvVar1 + __n),param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + __n + param_3) = 0;\n      return pvVar1;\n    }" { (expression_statement "memcpy(pvVar1,param_1,__n);" (call_expression "memcpy(pvVar1,param_1,__n)" identifier (argument_list "(pvVar1,param_1,__n)" ( identifier , identifier , identifier ))) ;) (expression_statement "memcpy((void *)((long)pvVar1 + __n),param_2,param_3);" (call_expression "memcpy((void *)((long)pvVar1 + __n),param_2,param_3)" identifier (argument_list "((void *)((long)pvVar1 + __n),param_2,param_3)" ( (cast_expression "(void *)((long)pvVar1 + __n)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)pvVar1 + __n)" ( (binary_expression "(long)pvVar1 + __n" (cast_expression "(long)pvVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier) ))) , identifier , identifier ))) ;) (expression_statement "*(undefined1 *)((long)pvVar1 + __n + param_3) = 0;" (assignment_expression "*(undefined1 *)((long)pvVar1 + __n + param_3) = 0" (pointer_expression "*(undefined1 *)((long)pvVar1 + __n + param_3)" * (cast_expression "(undefined1 *)((long)pvVar1 + __n + param_3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)pvVar1 + __n + param_3)" ( (binary_expression "(long)pvVar1 + __n + param_3" (binary_expression "(long)pvVar1 + __n" (cast_expression "(long)pvVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier) + identifier) )))) = number_literal) ;) (return_statement "return pvVar1;" return identifier ;) })) }))) (expression_statement "uVar2 = dcgettext(0,"Out of memory\n",5);" (assignment_expression "uVar2 = dcgettext(0,"Out of memory\n",5)" identifier = (call_expression "dcgettext(0,"Out of memory\n",5)" identifier (argument_list "(0,"Out of memory\n",5)" ( number_literal , (string_literal ""Out of memory\n"" " string_content escape_sequence ") , number_literal )))) ;) (expression_statement "error(uVar2);" (call_expression "error(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (return_statement "return pvVar1;" return identifier ;) })))
(translation_unit "char * adjust_relative_path(char *file_name,char *name,ulong name_len)\n\n{\n  size_t __size;\n  char *pcVar1;\n  size_t __n;\n  char *message;\n  \n  pcVar1 = (char *)lbasename();\n  if ((*name == '/') || (file_name == pcVar1)) {\n    if (name_len + 1 == 0) {\n      return (char *)0x0;\n    }\n    pcVar1 = (char *)malloc(name_len + 1);\n    if (pcVar1 != (char *)0x0) {\n      memcpy(pcVar1,name,name_len);\n      pcVar1[name_len] = '\0';\n      return pcVar1;\n    }\n  }\n  else {\n    __n = (long)pcVar1 - (long)file_name;\n    __size = __n + name_len + 1;\n    if ((__size < __n) || (__size < name_len)) {\n      pcVar1 = (char *)dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(pcVar1,name_len);\n      return (char *)0x0;\n    }\n    pcVar1 = (char *)malloc(__size);\n    if (pcVar1 != (char *)0x0) {\n      memcpy(pcVar1,file_name,__n);\n      memcpy(pcVar1 + __n,name,name_len);\n      pcVar1[__n + name_len] = '\0';\n      return pcVar1;\n    }\n  }\n  message = (char *)dcgettext(0,"Out of memory\n",5);\n  error(message);\n  return pcVar1;\n}\n\n" (function_definition "char * adjust_relative_path(char *file_name,char *name,ulong name_len)\n\n{\n  size_t __size;\n  char *pcVar1;\n  size_t __n;\n  char *message;\n  \n  pcVar1 = (char *)lbasename();\n  if ((*name == '/') || (file_name == pcVar1)) {\n    if (name_len + 1 == 0) {\n      return (char *)0x0;\n    }\n    pcVar1 = (char *)malloc(name_len + 1);\n    if (pcVar1 != (char *)0x0) {\n      memcpy(pcVar1,name,name_len);\n      pcVar1[name_len] = '\0';\n      return pcVar1;\n    }\n  }\n  else {\n    __n = (long)pcVar1 - (long)file_name;\n    __size = __n + name_len + 1;\n    if ((__size < __n) || (__size < name_len)) {\n      pcVar1 = (char *)dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(pcVar1,name_len);\n      return (char *)0x0;\n    }\n    pcVar1 = (char *)malloc(__size);\n    if (pcVar1 != (char *)0x0) {\n      memcpy(pcVar1,file_name,__n);\n      memcpy(pcVar1 + __n,name,name_len);\n      pcVar1[__n + name_len] = '\0';\n      return pcVar1;\n    }\n  }\n  message = (char *)dcgettext(0,"Out of memory\n",5);\n  error(message);\n  return pcVar1;\n}" primitive_type (pointer_declarator "* adjust_relative_path(char *file_name,char *name,ulong name_len)" * (function_declarator "adjust_relative_path(char *file_name,char *name,ulong name_len)" identifier (parameter_list "(char *file_name,char *name,ulong name_len)" ( (parameter_declaration "char *file_name" primitive_type (pointer_declarator "*file_name" * identifier)) , (parameter_declaration "char *name" primitive_type (pointer_declarator "*name" * identifier)) , (parameter_declaration "ulong name_len" type_identifier identifier) )))) (compound_statement "{\n  size_t __size;\n  char *pcVar1;\n  size_t __n;\n  char *message;\n  \n  pcVar1 = (char *)lbasename();\n  if ((*name == '/') || (file_name == pcVar1)) {\n    if (name_len + 1 == 0) {\n      return (char *)0x0;\n    }\n    pcVar1 = (char *)malloc(name_len + 1);\n    if (pcVar1 != (char *)0x0) {\n      memcpy(pcVar1,name,name_len);\n      pcVar1[name_len] = '\0';\n      return pcVar1;\n    }\n  }\n  else {\n    __n = (long)pcVar1 - (long)file_name;\n    __size = __n + name_len + 1;\n    if ((__size < __n) || (__size < name_len)) {\n      pcVar1 = (char *)dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(pcVar1,name_len);\n      return (char *)0x0;\n    }\n    pcVar1 = (char *)malloc(__size);\n    if (pcVar1 != (char *)0x0) {\n      memcpy(pcVar1,file_name,__n);\n      memcpy(pcVar1 + __n,name,name_len);\n      pcVar1[__n + name_len] = '\0';\n      return pcVar1;\n    }\n  }\n  message = (char *)dcgettext(0,"Out of memory\n",5);\n  error(message);\n  return pcVar1;\n}" { (declaration "size_t __size;" primitive_type identifier ;) (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "char *message;" primitive_type (pointer_declarator "*message" * identifier) ;) (expression_statement "pcVar1 = (char *)lbasename();" (assignment_expression "pcVar1 = (char *)lbasename()" identifier = (cast_expression "(char *)lbasename()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "lbasename()" identifier (argument_list "()" ( ))))) ;) (if_statement "if ((*name == '/') || (file_name == pcVar1)) {\n    if (name_len + 1 == 0) {\n      return (char *)0x0;\n    }\n    pcVar1 = (char *)malloc(name_len + 1);\n    if (pcVar1 != (char *)0x0) {\n      memcpy(pcVar1,name,name_len);\n      pcVar1[name_len] = '\0';\n      return pcVar1;\n    }\n  }\n  else {\n    __n = (long)pcVar1 - (long)file_name;\n    __size = __n + name_len + 1;\n    if ((__size < __n) || (__size < name_len)) {\n      pcVar1 = (char *)dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(pcVar1,name_len);\n      return (char *)0x0;\n    }\n    pcVar1 = (char *)malloc(__size);\n    if (pcVar1 != (char *)0x0) {\n      memcpy(pcVar1,file_name,__n);\n      memcpy(pcVar1 + __n,name,name_len);\n      pcVar1[__n + name_len] = '\0';\n      return pcVar1;\n    }\n  }" if (parenthesized_expression "((*name == '/') || (file_name == pcVar1))" ( (binary_expression "(*name == '/') || (file_name == pcVar1)" (parenthesized_expression "(*name == '/')" ( (binary_expression "*name == '/'" (pointer_expression "*name" * identifier) == (char_literal "'/'" ' character ')) )) || (parenthesized_expression "(file_name == pcVar1)" ( (binary_expression "file_name == pcVar1" identifier == identifier) ))) )) (compound_statement "{\n    if (name_len + 1 == 0) {\n      return (char *)0x0;\n    }\n    pcVar1 = (char *)malloc(name_len + 1);\n    if (pcVar1 != (char *)0x0) {\n      memcpy(pcVar1,name,name_len);\n      pcVar1[name_len] = '\0';\n      return pcVar1;\n    }\n  }" { (if_statement "if (name_len + 1 == 0) {\n      return (char *)0x0;\n    }" if (parenthesized_expression "(name_len + 1 == 0)" ( (binary_expression "name_len + 1 == 0" (binary_expression "name_len + 1" identifier + number_literal) == number_literal) )) (compound_statement "{\n      return (char *)0x0;\n    }" { (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pcVar1 = (char *)malloc(name_len + 1);" (assignment_expression "pcVar1 = (char *)malloc(name_len + 1)" identifier = (cast_expression "(char *)malloc(name_len + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "malloc(name_len + 1)" identifier (argument_list "(name_len + 1)" ( (binary_expression "name_len + 1" identifier + number_literal) ))))) ;) (if_statement "if (pcVar1 != (char *)0x0) {\n      memcpy(pcVar1,name,name_len);\n      pcVar1[name_len] = '\0';\n      return pcVar1;\n    }" if (parenthesized_expression "(pcVar1 != (char *)0x0)" ( (binary_expression "pcVar1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      memcpy(pcVar1,name,name_len);\n      pcVar1[name_len] = '\0';\n      return pcVar1;\n    }" { (expression_statement "memcpy(pcVar1,name,name_len);" (call_expression "memcpy(pcVar1,name,name_len)" identifier (argument_list "(pcVar1,name,name_len)" ( identifier , identifier , identifier ))) ;) (expression_statement "pcVar1[name_len] = '\0';" (assignment_expression "pcVar1[name_len] = '\0'" (subscript_expression "pcVar1[name_len]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (return_statement "return pcVar1;" return identifier ;) })) }) (else_clause "else {\n    __n = (long)pcVar1 - (long)file_name;\n    __size = __n + name_len + 1;\n    if ((__size < __n) || (__size < name_len)) {\n      pcVar1 = (char *)dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(pcVar1,name_len);\n      return (char *)0x0;\n    }\n    pcVar1 = (char *)malloc(__size);\n    if (pcVar1 != (char *)0x0) {\n      memcpy(pcVar1,file_name,__n);\n      memcpy(pcVar1 + __n,name,name_len);\n      pcVar1[__n + name_len] = '\0';\n      return pcVar1;\n    }\n  }" else (compound_statement "{\n    __n = (long)pcVar1 - (long)file_name;\n    __size = __n + name_len + 1;\n    if ((__size < __n) || (__size < name_len)) {\n      pcVar1 = (char *)dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(pcVar1,name_len);\n      return (char *)0x0;\n    }\n    pcVar1 = (char *)malloc(__size);\n    if (pcVar1 != (char *)0x0) {\n      memcpy(pcVar1,file_name,__n);\n      memcpy(pcVar1 + __n,name,name_len);\n      pcVar1[__n + name_len] = '\0';\n      return pcVar1;\n    }\n  }" { (expression_statement "__n = (long)pcVar1 - (long)file_name;" (assignment_expression "__n = (long)pcVar1 - (long)file_name" identifier = (binary_expression "(long)pcVar1 - (long)file_name" (cast_expression "(long)pcVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (cast_expression "(long)file_name" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) ;) (expression_statement "__size = __n + name_len + 1;" (assignment_expression "__size = __n + name_len + 1" identifier = (binary_expression "__n + name_len + 1" (binary_expression "__n + name_len" identifier + identifier) + number_literal)) ;) (if_statement "if ((__size < __n) || (__size < name_len)) {\n      pcVar1 = (char *)dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(pcVar1,name_len);\n      return (char *)0x0;\n    }" if (parenthesized_expression "((__size < __n) || (__size < name_len))" ( (binary_expression "(__size < __n) || (__size < name_len)" (parenthesized_expression "(__size < __n)" ( (binary_expression "__size < __n" identifier < identifier) )) || (parenthesized_expression "(__size < name_len)" ( (binary_expression "__size < name_len" identifier < identifier) ))) )) (compound_statement "{\n      pcVar1 = (char *)dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(pcVar1,name_len);\n      return (char *)0x0;\n    }" { (expression_statement "pcVar1 = (char *)dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);" (assignment_expression "pcVar1 = (char *)dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5)" identifier = (cast_expression "(char *)dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5)" identifier (argument_list "(0,"Abnormal length of thin archive member name: %lx\n",5)" ( number_literal , (string_literal ""Abnormal length of thin archive member name: %lx\n"" " string_content escape_sequence ") , number_literal ))))) ;) (expression_statement "error(pcVar1,name_len);" (call_expression "error(pcVar1,name_len)" identifier (argument_list "(pcVar1,name_len)" ( identifier , identifier ))) ;) (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pcVar1 = (char *)malloc(__size);" (assignment_expression "pcVar1 = (char *)malloc(__size)" identifier = (cast_expression "(char *)malloc(__size)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "malloc(__size)" identifier (argument_list "(__size)" ( identifier ))))) ;) (if_statement "if (pcVar1 != (char *)0x0) {\n      memcpy(pcVar1,file_name,__n);\n      memcpy(pcVar1 + __n,name,name_len);\n      pcVar1[__n + name_len] = '\0';\n      return pcVar1;\n    }" if (parenthesized_expression "(pcVar1 != (char *)0x0)" ( (binary_expression "pcVar1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      memcpy(pcVar1,file_name,__n);\n      memcpy(pcVar1 + __n,name,name_len);\n      pcVar1[__n + name_len] = '\0';\n      return pcVar1;\n    }" { (expression_statement "memcpy(pcVar1,file_name,__n);" (call_expression "memcpy(pcVar1,file_name,__n)" identifier (argument_list "(pcVar1,file_name,__n)" ( identifier , identifier , identifier ))) ;) (expression_statement "memcpy(pcVar1 + __n,name,name_len);" (call_expression "memcpy(pcVar1 + __n,name,name_len)" identifier (argument_list "(pcVar1 + __n,name,name_len)" ( (binary_expression "pcVar1 + __n" identifier + identifier) , identifier , identifier ))) ;) (expression_statement "pcVar1[__n + name_len] = '\0';" (assignment_expression "pcVar1[__n + name_len] = '\0'" (subscript_expression "pcVar1[__n + name_len]" identifier [ (binary_expression "__n + name_len" identifier + identifier) ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (return_statement "return pcVar1;" return identifier ;) })) }))) (expression_statement "message = (char *)dcgettext(0,"Out of memory\n",5);" (assignment_expression "message = (char *)dcgettext(0,"Out of memory\n",5)" identifier = (cast_expression "(char *)dcgettext(0,"Out of memory\n",5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0,"Out of memory\n",5)" identifier (argument_list "(0,"Out of memory\n",5)" ( number_literal , (string_literal ""Out of memory\n"" " string_content escape_sequence ") , number_literal ))))) ;) (expression_statement "error(message);" (call_expression "error(message)" identifier (argument_list "(message)" ( identifier ))) ;) (return_statement "return pcVar1;" return identifier ;) })))
(translation_unit "void * FUN_00137da0(void *param_1,char *param_2,size_t param_3)\n\n{\n  size_t __size;\n  void *pvVar1;\n  size_t __n;\n  undefined8 uVar2;\n  \n  pvVar1 = (void *)lbasename();\n  if ((*param_2 == '/') || (param_1 == pvVar1)) {\n    if (param_3 + 1 == 0) {\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(param_3 + 1);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + param_3) = 0;\n      return pvVar1;\n    }\n  }\n  else {\n    __n = (long)pvVar1 - (long)param_1;\n    __size = __n + param_3 + 1;\n    if ((__size < __n) || (__size < param_3)) {\n      uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(uVar2,param_3);\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_1,__n);\n      memcpy((void *)((long)pvVar1 + __n),param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + __n + param_3) = 0;\n      return pvVar1;\n    }\n  }\n  uVar2 = dcgettext(0,"Out of memory\n",5);\n  error(uVar2);\n  return pvVar1;\n}\n\n" (function_definition "void * FUN_00137da0(void *param_1,char *param_2,size_t param_3)\n\n{\n  size_t __size;\n  void *pvVar1;\n  size_t __n;\n  undefined8 uVar2;\n  \n  pvVar1 = (void *)lbasename();\n  if ((*param_2 == '/') || (param_1 == pvVar1)) {\n    if (param_3 + 1 == 0) {\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(param_3 + 1);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + param_3) = 0;\n      return pvVar1;\n    }\n  }\n  else {\n    __n = (long)pvVar1 - (long)param_1;\n    __size = __n + param_3 + 1;\n    if ((__size < __n) || (__size < param_3)) {\n      uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(uVar2,param_3);\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_1,__n);\n      memcpy((void *)((long)pvVar1 + __n),param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + __n + param_3) = 0;\n      return pvVar1;\n    }\n  }\n  uVar2 = dcgettext(0,"Out of memory\n",5);\n  error(uVar2);\n  return pvVar1;\n}" primitive_type (pointer_declarator "* FUN_00137da0(void *param_1,char *param_2,size_t param_3)" * (function_declarator "FUN_00137da0(void *param_1,char *param_2,size_t param_3)" identifier (parameter_list "(void *param_1,char *param_2,size_t param_3)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "size_t param_3" primitive_type identifier) )))) (compound_statement "{\n  size_t __size;\n  void *pvVar1;\n  size_t __n;\n  undefined8 uVar2;\n  \n  pvVar1 = (void *)lbasename();\n  if ((*param_2 == '/') || (param_1 == pvVar1)) {\n    if (param_3 + 1 == 0) {\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(param_3 + 1);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + param_3) = 0;\n      return pvVar1;\n    }\n  }\n  else {\n    __n = (long)pvVar1 - (long)param_1;\n    __size = __n + param_3 + 1;\n    if ((__size < __n) || (__size < param_3)) {\n      uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(uVar2,param_3);\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_1,__n);\n      memcpy((void *)((long)pvVar1 + __n),param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + __n + param_3) = 0;\n      return pvVar1;\n    }\n  }\n  uVar2 = dcgettext(0,"Out of memory\n",5);\n  error(uVar2);\n  return pvVar1;\n}" { (declaration "size_t __size;" primitive_type identifier ;) (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (expression_statement "pvVar1 = (void *)lbasename();" (assignment_expression "pvVar1 = (void *)lbasename()" identifier = (cast_expression "(void *)lbasename()" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "lbasename()" identifier (argument_list "()" ( ))))) ;) (if_statement "if ((*param_2 == '/') || (param_1 == pvVar1)) {\n    if (param_3 + 1 == 0) {\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(param_3 + 1);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + param_3) = 0;\n      return pvVar1;\n    }\n  }\n  else {\n    __n = (long)pvVar1 - (long)param_1;\n    __size = __n + param_3 + 1;\n    if ((__size < __n) || (__size < param_3)) {\n      uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(uVar2,param_3);\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_1,__n);\n      memcpy((void *)((long)pvVar1 + __n),param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + __n + param_3) = 0;\n      return pvVar1;\n    }\n  }" if (parenthesized_expression "((*param_2 == '/') || (param_1 == pvVar1))" ( (binary_expression "(*param_2 == '/') || (param_1 == pvVar1)" (parenthesized_expression "(*param_2 == '/')" ( (binary_expression "*param_2 == '/'" (pointer_expression "*param_2" * identifier) == (char_literal "'/'" ' character ')) )) || (parenthesized_expression "(param_1 == pvVar1)" ( (binary_expression "param_1 == pvVar1" identifier == identifier) ))) )) (compound_statement "{\n    if (param_3 + 1 == 0) {\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(param_3 + 1);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + param_3) = 0;\n      return pvVar1;\n    }\n  }" { (if_statement "if (param_3 + 1 == 0) {\n      return (void *)0x0;\n    }" if (parenthesized_expression "(param_3 + 1 == 0)" ( (binary_expression "param_3 + 1 == 0" (binary_expression "param_3 + 1" identifier + number_literal) == number_literal) )) (compound_statement "{\n      return (void *)0x0;\n    }" { (return_statement "return (void *)0x0;" return (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pvVar1 = malloc(param_3 + 1);" (assignment_expression "pvVar1 = malloc(param_3 + 1)" identifier = (call_expression "malloc(param_3 + 1)" identifier (argument_list "(param_3 + 1)" ( (binary_expression "param_3 + 1" identifier + number_literal) )))) ;) (if_statement "if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + param_3) = 0;\n      return pvVar1;\n    }" if (parenthesized_expression "(pvVar1 != (void *)0x0)" ( (binary_expression "pvVar1 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      memcpy(pvVar1,param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + param_3) = 0;\n      return pvVar1;\n    }" { (expression_statement "memcpy(pvVar1,param_2,param_3);" (call_expression "memcpy(pvVar1,param_2,param_3)" identifier (argument_list "(pvVar1,param_2,param_3)" ( identifier , identifier , identifier ))) ;) (expression_statement "*(undefined1 *)((long)pvVar1 + param_3) = 0;" (assignment_expression "*(undefined1 *)((long)pvVar1 + param_3) = 0" (pointer_expression "*(undefined1 *)((long)pvVar1 + param_3)" * (cast_expression "(undefined1 *)((long)pvVar1 + param_3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)pvVar1 + param_3)" ( (binary_expression "(long)pvVar1 + param_3" (cast_expression "(long)pvVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier) )))) = number_literal) ;) (return_statement "return pvVar1;" return identifier ;) })) }) (else_clause "else {\n    __n = (long)pvVar1 - (long)param_1;\n    __size = __n + param_3 + 1;\n    if ((__size < __n) || (__size < param_3)) {\n      uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(uVar2,param_3);\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_1,__n);\n      memcpy((void *)((long)pvVar1 + __n),param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + __n + param_3) = 0;\n      return pvVar1;\n    }\n  }" else (compound_statement "{\n    __n = (long)pvVar1 - (long)param_1;\n    __size = __n + param_3 + 1;\n    if ((__size < __n) || (__size < param_3)) {\n      uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(uVar2,param_3);\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_1,__n);\n      memcpy((void *)((long)pvVar1 + __n),param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + __n + param_3) = 0;\n      return pvVar1;\n    }\n  }" { (expression_statement "__n = (long)pvVar1 - (long)param_1;" (assignment_expression "__n = (long)pvVar1 - (long)param_1" identifier = (binary_expression "(long)pvVar1 - (long)param_1" (cast_expression "(long)pvVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) ;) (expression_statement "__size = __n + param_3 + 1;" (assignment_expression "__size = __n + param_3 + 1" identifier = (binary_expression "__n + param_3 + 1" (binary_expression "__n + param_3" identifier + identifier) + number_literal)) ;) (if_statement "if ((__size < __n) || (__size < param_3)) {\n      uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(uVar2,param_3);\n      return (void *)0x0;\n    }" if (parenthesized_expression "((__size < __n) || (__size < param_3))" ( (binary_expression "(__size < __n) || (__size < param_3)" (parenthesized_expression "(__size < __n)" ( (binary_expression "__size < __n" identifier < identifier) )) || (parenthesized_expression "(__size < param_3)" ( (binary_expression "__size < param_3" identifier < identifier) ))) )) (compound_statement "{\n      uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(uVar2,param_3);\n      return (void *)0x0;\n    }" { (expression_statement "uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);" (assignment_expression "uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5)" identifier = (call_expression "dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5)" identifier (argument_list "(0,"Abnormal length of thin archive member name: %lx\n",5)" ( number_literal , (string_literal ""Abnormal length of thin archive member name: %lx\n"" " string_content escape_sequence ") , number_literal )))) ;) (expression_statement "error(uVar2,param_3);" (call_expression "error(uVar2,param_3)" identifier (argument_list "(uVar2,param_3)" ( identifier , identifier ))) ;) (return_statement "return (void *)0x0;" return (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pvVar1 = malloc(__size);" (assignment_expression "pvVar1 = malloc(__size)" identifier = (call_expression "malloc(__size)" identifier (argument_list "(__size)" ( identifier )))) ;) (if_statement "if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_1,__n);\n      memcpy((void *)((long)pvVar1 + __n),param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + __n + param_3) = 0;\n      return pvVar1;\n    }" if (parenthesized_expression "(pvVar1 != (void *)0x0)" ( (binary_expression "pvVar1 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      memcpy(pvVar1,param_1,__n);\n      memcpy((void *)((long)pvVar1 + __n),param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + __n + param_3) = 0;\n      return pvVar1;\n    }" { (expression_statement "memcpy(pvVar1,param_1,__n);" (call_expression "memcpy(pvVar1,param_1,__n)" identifier (argument_list "(pvVar1,param_1,__n)" ( identifier , identifier , identifier ))) ;) (expression_statement "memcpy((void *)((long)pvVar1 + __n),param_2,param_3);" (call_expression "memcpy((void *)((long)pvVar1 + __n),param_2,param_3)" identifier (argument_list "((void *)((long)pvVar1 + __n),param_2,param_3)" ( (cast_expression "(void *)((long)pvVar1 + __n)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)pvVar1 + __n)" ( (binary_expression "(long)pvVar1 + __n" (cast_expression "(long)pvVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier) ))) , identifier , identifier ))) ;) (expression_statement "*(undefined1 *)((long)pvVar1 + __n + param_3) = 0;" (assignment_expression "*(undefined1 *)((long)pvVar1 + __n + param_3) = 0" (pointer_expression "*(undefined1 *)((long)pvVar1 + __n + param_3)" * (cast_expression "(undefined1 *)((long)pvVar1 + __n + param_3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)pvVar1 + __n + param_3)" ( (binary_expression "(long)pvVar1 + __n + param_3" (binary_expression "(long)pvVar1 + __n" (cast_expression "(long)pvVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier) + identifier) )))) = number_literal) ;) (return_statement "return pvVar1;" return identifier ;) })) }))) (expression_statement "uVar2 = dcgettext(0,"Out of memory\n",5);" (assignment_expression "uVar2 = dcgettext(0,"Out of memory\n",5)" identifier = (call_expression "dcgettext(0,"Out of memory\n",5)" identifier (argument_list "(0,"Out of memory\n",5)" ( number_literal , (string_literal ""Out of memory\n"" " string_content escape_sequence ") , number_literal )))) ;) (expression_statement "error(uVar2);" (call_expression "error(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (return_statement "return pvVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' character ')) )) || (parenthesized_expression ( (binary_expression IDENT == IDENT) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) == LIT) )) (compound_statement { (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + IDENT) )))) = LIT) ;) (return_statement return IDENT ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) - (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + IDENT) + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < IDENT) )) || (parenthesized_expression ( (binary_expression IDENT < IDENT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , (string_literal " string_content escape_sequence ") , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })) (expression_statement (assignment_expression IDENT = (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 (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + IDENT) ))) , IDENT , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + IDENT) + IDENT) )))) = LIT) ;) (return_statement return IDENT ;) })) }))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , (string_literal " string_content escape_sequence ") , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return IDENT ;) })))
(function_definition "void * FUN_00137da0(void *param_1,char *param_2,size_t param_3)\n\n{\n  size_t __size;\n  void *pvVar1;\n  size_t __n;\n  undefined8 uVar2;\n  \n  pvVar1 = (void *)lbasename();\n  if ((*param_2 == '/') || (param_1 == pvVar1)) {\n    if (param_3 + 1 == 0) {\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(param_3 + 1);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + param_3) = 0;\n      return pvVar1;\n    }\n  }\n  else {\n    __n = (long)pvVar1 - (long)param_1;\n    __size = __n + param_3 + 1;\n    if ((__size < __n) || (__size < param_3)) {\n      uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(uVar2,param_3);\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_1,__n);\n      memcpy((void *)((long)pvVar1 + __n),param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + __n + param_3) = 0;\n      return pvVar1;\n    }\n  }\n  uVar2 = dcgettext(0,"Out of memory\n",5);\n  error(uVar2);\n  return pvVar1;\n}" (primitive_type "void") (pointer_declarator "* FUN_00137da0(void *param_1,char *param_2,size_t param_3)" (* "*") (function_declarator "FUN_00137da0(void *param_1,char *param_2,size_t param_3)" (identifier "FUN_00137da0") (parameter_list "(void *param_1,char *param_2,size_t param_3)" (( "(") (parameter_declaration "void *param_1" (primitive_type "void") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "size_t param_3" (primitive_type "size_t") (identifier "param_3")) () ")")))) (compound_statement "{\n  size_t __size;\n  void *pvVar1;\n  size_t __n;\n  undefined8 uVar2;\n  \n  pvVar1 = (void *)lbasename();\n  if ((*param_2 == '/') || (param_1 == pvVar1)) {\n    if (param_3 + 1 == 0) {\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(param_3 + 1);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + param_3) = 0;\n      return pvVar1;\n    }\n  }\n  else {\n    __n = (long)pvVar1 - (long)param_1;\n    __size = __n + param_3 + 1;\n    if ((__size < __n) || (__size < param_3)) {\n      uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(uVar2,param_3);\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_1,__n);\n      memcpy((void *)((long)pvVar1 + __n),param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + __n + param_3) = 0;\n      return pvVar1;\n    }\n  }\n  uVar2 = dcgettext(0,"Out of memory\n",5);\n  error(uVar2);\n  return pvVar1;\n}" ({ "{") (declaration "size_t __size;" (primitive_type "size_t") (identifier "__size") (; ";")) (declaration "void *pvVar1;" (primitive_type "void") (pointer_declarator "*pvVar1" (* "*") (identifier "pvVar1")) (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "undefined8 uVar2;" (type_identifier "undefined8") (identifier "uVar2") (; ";")) (expression_statement "pvVar1 = (void *)lbasename();" (assignment_expression "pvVar1 = (void *)lbasename()" (identifier "pvVar1") (= "=") (cast_expression "(void *)lbasename()" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "lbasename()" (identifier "lbasename") (argument_list "()" (( "(") () ")"))))) (; ";")) (if_statement "if ((*param_2 == '/') || (param_1 == pvVar1)) {\n    if (param_3 + 1 == 0) {\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(param_3 + 1);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + param_3) = 0;\n      return pvVar1;\n    }\n  }\n  else {\n    __n = (long)pvVar1 - (long)param_1;\n    __size = __n + param_3 + 1;\n    if ((__size < __n) || (__size < param_3)) {\n      uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(uVar2,param_3);\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_1,__n);\n      memcpy((void *)((long)pvVar1 + __n),param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + __n + param_3) = 0;\n      return pvVar1;\n    }\n  }" (if "if") (parenthesized_expression "((*param_2 == '/') || (param_1 == pvVar1))" (( "(") (binary_expression "(*param_2 == '/') || (param_1 == pvVar1)" (parenthesized_expression "(*param_2 == '/')" (( "(") (binary_expression "*param_2 == '/'" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (== "==") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")")) (|| "||") (parenthesized_expression "(param_1 == pvVar1)" (( "(") (binary_expression "param_1 == pvVar1" (identifier "param_1") (== "==") (identifier "pvVar1")) () ")"))) () ")")) (compound_statement "{\n    if (param_3 + 1 == 0) {\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(param_3 + 1);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + param_3) = 0;\n      return pvVar1;\n    }\n  }" ({ "{") (if_statement "if (param_3 + 1 == 0) {\n      return (void *)0x0;\n    }" (if "if") (parenthesized_expression "(param_3 + 1 == 0)" (( "(") (binary_expression "param_3 + 1 == 0" (binary_expression "param_3 + 1" (identifier "param_3") (+ "+") (number_literal "1")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      return (void *)0x0;\n    }" ({ "{") (return_statement "return (void *)0x0;" (return "return") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))) (expression_statement "pvVar1 = malloc(param_3 + 1);" (assignment_expression "pvVar1 = malloc(param_3 + 1)" (identifier "pvVar1") (= "=") (call_expression "malloc(param_3 + 1)" (identifier "malloc") (argument_list "(param_3 + 1)" (( "(") (binary_expression "param_3 + 1" (identifier "param_3") (+ "+") (number_literal "1")) () ")")))) (; ";")) (if_statement "if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + param_3) = 0;\n      return pvVar1;\n    }" (if "if") (parenthesized_expression "(pvVar1 != (void *)0x0)" (( "(") (binary_expression "pvVar1 != (void *)0x0" (identifier "pvVar1") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      memcpy(pvVar1,param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + param_3) = 0;\n      return pvVar1;\n    }" ({ "{") (expression_statement "memcpy(pvVar1,param_2,param_3);" (call_expression "memcpy(pvVar1,param_2,param_3)" (identifier "memcpy") (argument_list "(pvVar1,param_2,param_3)" (( "(") (identifier "pvVar1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")"))) (; ";")) (expression_statement "*(undefined1 *)((long)pvVar1 + param_3) = 0;" (assignment_expression "*(undefined1 *)((long)pvVar1 + param_3) = 0" (pointer_expression "*(undefined1 *)((long)pvVar1 + param_3)" (* "*") (cast_expression "(undefined1 *)((long)pvVar1 + param_3)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)pvVar1 + param_3)" (( "(") (binary_expression "(long)pvVar1 + param_3" (cast_expression "(long)pvVar1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "pvVar1")) (+ "+") (identifier "param_3")) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return pvVar1;" (return "return") (identifier "pvVar1") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    __n = (long)pvVar1 - (long)param_1;\n    __size = __n + param_3 + 1;\n    if ((__size < __n) || (__size < param_3)) {\n      uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(uVar2,param_3);\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_1,__n);\n      memcpy((void *)((long)pvVar1 + __n),param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + __n + param_3) = 0;\n      return pvVar1;\n    }\n  }" (else "else") (compound_statement "{\n    __n = (long)pvVar1 - (long)param_1;\n    __size = __n + param_3 + 1;\n    if ((__size < __n) || (__size < param_3)) {\n      uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(uVar2,param_3);\n      return (void *)0x0;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_1,__n);\n      memcpy((void *)((long)pvVar1 + __n),param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + __n + param_3) = 0;\n      return pvVar1;\n    }\n  }" ({ "{") (expression_statement "__n = (long)pvVar1 - (long)param_1;" (assignment_expression "__n = (long)pvVar1 - (long)param_1" (identifier "__n") (= "=") (binary_expression "(long)pvVar1 - (long)param_1" (cast_expression "(long)pvVar1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "pvVar1")) (- "-") (cast_expression "(long)param_1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_1")))) (; ";")) (expression_statement "__size = __n + param_3 + 1;" (assignment_expression "__size = __n + param_3 + 1" (identifier "__size") (= "=") (binary_expression "__n + param_3 + 1" (binary_expression "__n + param_3" (identifier "__n") (+ "+") (identifier "param_3")) (+ "+") (number_literal "1"))) (; ";")) (if_statement "if ((__size < __n) || (__size < param_3)) {\n      uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(uVar2,param_3);\n      return (void *)0x0;\n    }" (if "if") (parenthesized_expression "((__size < __n) || (__size < param_3))" (( "(") (binary_expression "(__size < __n) || (__size < param_3)" (parenthesized_expression "(__size < __n)" (( "(") (binary_expression "__size < __n" (identifier "__size") (< "<") (identifier "__n")) () ")")) (|| "||") (parenthesized_expression "(__size < param_3)" (( "(") (binary_expression "__size < param_3" (identifier "__size") (< "<") (identifier "param_3")) () ")"))) () ")")) (compound_statement "{\n      uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);\n      error(uVar2,param_3);\n      return (void *)0x0;\n    }" ({ "{") (expression_statement "uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);" (assignment_expression "uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5)" (identifier "uVar2") (= "=") (call_expression "dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5)" (identifier "dcgettext") (argument_list "(0,"Abnormal length of thin archive member name: %lx\n",5)" (( "(") (number_literal "0") (, ",") (string_literal ""Abnormal length of thin archive member name: %lx\n"" (" """) (string_content "Abnormal length of thin archive member name: %lx") (escape_sequence "\n") (" """)) (, ",") (number_literal "5") () ")")))) (; ";")) (expression_statement "error(uVar2,param_3);" (call_expression "error(uVar2,param_3)" (identifier "error") (argument_list "(uVar2,param_3)" (( "(") (identifier "uVar2") (, ",") (identifier "param_3") () ")"))) (; ";")) (return_statement "return (void *)0x0;" (return "return") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))) (expression_statement "pvVar1 = malloc(__size);" (assignment_expression "pvVar1 = malloc(__size)" (identifier "pvVar1") (= "=") (call_expression "malloc(__size)" (identifier "malloc") (argument_list "(__size)" (( "(") (identifier "__size") () ")")))) (; ";")) (if_statement "if (pvVar1 != (void *)0x0) {\n      memcpy(pvVar1,param_1,__n);\n      memcpy((void *)((long)pvVar1 + __n),param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + __n + param_3) = 0;\n      return pvVar1;\n    }" (if "if") (parenthesized_expression "(pvVar1 != (void *)0x0)" (( "(") (binary_expression "pvVar1 != (void *)0x0" (identifier "pvVar1") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      memcpy(pvVar1,param_1,__n);\n      memcpy((void *)((long)pvVar1 + __n),param_2,param_3);\n      *(undefined1 *)((long)pvVar1 + __n + param_3) = 0;\n      return pvVar1;\n    }" ({ "{") (expression_statement "memcpy(pvVar1,param_1,__n);" (call_expression "memcpy(pvVar1,param_1,__n)" (identifier "memcpy") (argument_list "(pvVar1,param_1,__n)" (( "(") (identifier "pvVar1") (, ",") (identifier "param_1") (, ",") (identifier "__n") () ")"))) (; ";")) (expression_statement "memcpy((void *)((long)pvVar1 + __n),param_2,param_3);" (call_expression "memcpy((void *)((long)pvVar1 + __n),param_2,param_3)" (identifier "memcpy") (argument_list "((void *)((long)pvVar1 + __n),param_2,param_3)" (( "(") (cast_expression "(void *)((long)pvVar1 + __n)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)pvVar1 + __n)" (( "(") (binary_expression "(long)pvVar1 + __n" (cast_expression "(long)pvVar1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "pvVar1")) (+ "+") (identifier "__n")) () ")"))) (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")"))) (; ";")) (expression_statement "*(undefined1 *)((long)pvVar1 + __n + param_3) = 0;" (assignment_expression "*(undefined1 *)((long)pvVar1 + __n + param_3) = 0" (pointer_expression "*(undefined1 *)((long)pvVar1 + __n + param_3)" (* "*") (cast_expression "(undefined1 *)((long)pvVar1 + __n + param_3)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)pvVar1 + __n + param_3)" (( "(") (binary_expression "(long)pvVar1 + __n + param_3" (binary_expression "(long)pvVar1 + __n" (cast_expression "(long)pvVar1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "pvVar1")) (+ "+") (identifier "__n")) (+ "+") (identifier "param_3")) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return pvVar1;" (return "return") (identifier "pvVar1") (; ";")) (} "}"))) (} "}")))) (expression_statement "uVar2 = dcgettext(0,"Out of memory\n",5);" (assignment_expression "uVar2 = dcgettext(0,"Out of memory\n",5)" (identifier "uVar2") (= "=") (call_expression "dcgettext(0,"Out of memory\n",5)" (identifier "dcgettext") (argument_list "(0,"Out of memory\n",5)" (( "(") (number_literal "0") (, ",") (string_literal ""Out of memory\n"" (" """) (string_content "Out of memory") (escape_sequence "\n") (" """)) (, ",") (number_literal "5") () ")")))) (; ";")) (expression_statement "error(uVar2);" (call_expression "error(uVar2)" (identifier "error") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (return_statement "return pvVar1;" (return "return") (identifier "pvVar1") (; ";")) (} "}")))

char * function_1(char *var_2,char *name,type_1 var_4)

{
  size_t var_8;
  char *var_3;
  size_t var_7;
  char *message;
  
  var_3 = (char *)var_1();
  if ((*name == '/') || (var_2 == var_3)) {
    if (var_4 + 1 == 0) {
      return (char *)0x0;
    }
    var_3 = (char *)var_5(var_4 + 1);
    if (var_3 != (char *)0x0) {
      var_6(var_3,name,var_4);
      var_3[var_4] = '\0';
      return var_3;
    }
  }
  else {
    var_7 = (long)var_3 - (long)var_2;
    var_8 = var_7 + var_4 + 1;
    if ((var_8 < var_7) || (var_8 < var_4)) {
      var_3 = (char *)var_9(0,"Abnormal length of thin archive member name: %lx\n",5);
      var_10(var_3,var_4);
      return (char *)0x0;
    }
    var_3 = (char *)var_5(var_8);
    if (var_3 != (char *)0x0) {
      var_6(var_3,var_2,var_7);
      var_6(var_3 + var_7,name,var_4);
      var_3[var_7 + var_4] = '\0';
      return var_3;
    }
  }
  message = (char *)var_9(0,"Out of memory\n",5);
  var_10(message);
  return var_3;
}


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

void * MASKED(void *param_1,char *param_2,size_t param_3)

{
  size_t __size;
  void *pvVar1;
  size_t __n;
  undefined8 uVar2;
  
  pvVar1 = (void *)lbasename();
  if ((*param_2 == '/') || (param_1 == pvVar1)) {
    if (param_3 + 1 == 0) {
      return (void *)0x0;
    }
    pvVar1 = malloc(param_3 + 1);
    if (pvVar1 != (void *)0x0) {
      memcpy(pvVar1,param_2,param_3);
      *(undefined1 *)((long)pvVar1 + param_3) = 0;
      return pvVar1;
    }
  }
  else {
    __n = (long)pvVar1 - (long)param_1;
    __size = __n + param_3 + 1;
    if ((__size < __n) || (__size < param_3)) {
      uVar2 = dcgettext(0,"Abnormal length of thin archive member name: %lx\n",5);
      error(uVar2,param_3);
      return (void *)0x0;
    }
    pvVar1 = malloc(__size);
    if (pvVar1 != (void *)0x0) {
      memcpy(pvVar1,param_1,__n);
      memcpy((void *)((long)pvVar1 + __n),param_2,param_3);
      *(undefined1 *)((long)pvVar1 + __n + param_3) = 0;
      return pvVar1;
    }
  }
  uVar2 = dcgettext(0,"Out of memory\n",5);
  error(uVar2);
  return pvVar1;
}

