
/* DWARF original prototype: bool open(Mapfile * this, char * map_filename) */

int __thiscall gold::Mapfile::open(Mapfile *this,char *__file,int __oflag,...)

{
  int iVar1;
  FILE *pFVar2;
  int *piVar3;
  char *pcVar4;
  char *format;
  long lVar5;
  byte *pbVar6;
  byte *pbVar7;
  bool bVar8;
  bool bVar9;
  
  lVar5 = 2;
  bVar8 = &stack0xfffffffffffffff0 < &DAT_00000008;
  bVar9 = &stack0x00000000 == (undefined1 *)0x18;
  pbVar6 = (byte *)__file;
  pbVar7 = &DAT_00390adc;
  do {
    if (lVar5 == 0) break;
    lVar5 = lVar5 + -1;
    bVar8 = *pbVar6 < *pbVar7;
    bVar9 = *pbVar6 == *pbVar7;
    pbVar6 = pbVar6 + 1;
    pbVar7 = pbVar7 + 1;
  } while (bVar9);
  if ((!bVar8 && !bVar9) == bVar8) {
    this->map_file_ = stdout;
    iVar1 = 1;
  }
  else {
    pFVar2 = fopen64(__file,"w");
    this->map_file_ = (FILE *)pFVar2;
    iVar1 = 1;
    if (pFVar2 == (FILE *)0x0) {
      piVar3 = __errno_location();
      pcVar4 = strerror(*piVar3);
      format = (char *)gettext("cannot open map file %s: %s");
      gold_error(format,__file,pcVar4);
      iVar1 = 0;
    }
  }
  return iVar1;
}



undefined8 FUN_001ce210(undefined8 *param_1,byte *param_2)

{
  undefined8 uVar1;
  FILE *pFVar2;
  int *piVar3;
  char *pcVar4;
  long lVar5;
  byte *pbVar6;
  byte *pbVar7;
  bool bVar8;
  bool bVar9;
  
  lVar5 = 2;
  bVar8 = &stack0xfffffffffffffff0 < &DAT_00000008;
  bVar9 = &stack0x00000000 == (undefined1 *)0x18;
  pbVar6 = param_2;
  pbVar7 = &DAT_00390adc;
  do {
    if (lVar5 == 0) break;
    lVar5 = lVar5 + -1;
    bVar8 = *pbVar6 < *pbVar7;
    bVar9 = *pbVar6 == *pbVar7;
    pbVar6 = pbVar6 + 1;
    pbVar7 = pbVar7 + 1;
  } while (bVar9);
  if ((!bVar8 && !bVar9) == bVar8) {
    *param_1 = stdout;
    uVar1 = 1;
  }
  else {
    pFVar2 = fopen64((char *)param_2,"w");
    *param_1 = pFVar2;
    uVar1 = 1;
    if (pFVar2 == (FILE *)0x0) {
      piVar3 = __errno_location();
      pcVar4 = strerror(*piVar3);
      uVar1 = gettext("cannot open map file %s: %s");
      FUN_00185680(uVar1,param_2,pcVar4);
      uVar1 = 0;
    }
  }
  return uVar1;
}


PUSH RBP
MOV ECX,0x2
MOV RBP,RSI
PUSH RBX
MOV RBX,RDI
LEA RDI,[0x390adc]
SUB RSP,0x8
CMPSB.REPE RDI,RSI
SETA AL
SBB AL,0x0
TEST AL,AL
JNZ 0x001ce250
MOV RAX,qword ptr [0x00458868]
MOV qword ptr [RBX],RAX
MOV EAX,0x1
ADD RSP,0x8
POP RBX
POP RBP
RET
LEA RSI,[0x39d689]
MOV RDI,RBP
CALL 0x00149970
MOV RDX,RAX
MOV qword ptr [RBX],RAX
MOV EAX,0x1
TEST RDX,RDX
JNZ 0x001ce242
CALL 0x00149760
MOV EDI,dword ptr [RAX]
CALL 0x00149610
LEA RDI,[0x38ebce]
MOV RBX,RAX
CALL 0x00149320
MOV RDX,RBX
MOV RSI,RBP
MOV RDI,RAX
XOR EAX,EAX
CALL 0x00185680
XOR EAX,EAX
JMP 0x001ce242
(translation_unit "undefined8 FUN_001ce210(undefined8 *param_1,byte *param_2)\n\n{\n  undefined8 uVar1;\n  FILE *pFVar2;\n  int *piVar3;\n  char *pcVar4;\n  long lVar5;\n  byte *pbVar6;\n  byte *pbVar7;\n  bool bVar8;\n  bool bVar9;\n  \n  lVar5 = 2;\n  bVar8 = &stack0xfffffffffffffff0 < &DAT_00000008;\n  bVar9 = &stack0x00000000 == (undefined1 *)0x18;\n  pbVar6 = param_2;\n  pbVar7 = &DAT_00390adc;\n  do {\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    bVar8 = *pbVar6 < *pbVar7;\n    bVar9 = *pbVar6 == *pbVar7;\n    pbVar6 = pbVar6 + 1;\n    pbVar7 = pbVar7 + 1;\n  } while (bVar9);\n  if ((!bVar8 && !bVar9) == bVar8) {\n    *param_1 = stdout;\n    uVar1 = 1;\n  }\n  else {\n    pFVar2 = fopen64((char *)param_2,"w");\n    *param_1 = pFVar2;\n    uVar1 = 1;\n    if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      uVar1 = gettext("cannot open map file %s: %s");\n      FUN_00185680(uVar1,param_2,pcVar4);\n      uVar1 = 0;\n    }\n  }\n  return uVar1;\n}\n\n" (function_definition "undefined8 FUN_001ce210(undefined8 *param_1,byte *param_2)\n\n{\n  undefined8 uVar1;\n  FILE *pFVar2;\n  int *piVar3;\n  char *pcVar4;\n  long lVar5;\n  byte *pbVar6;\n  byte *pbVar7;\n  bool bVar8;\n  bool bVar9;\n  \n  lVar5 = 2;\n  bVar8 = &stack0xfffffffffffffff0 < &DAT_00000008;\n  bVar9 = &stack0x00000000 == (undefined1 *)0x18;\n  pbVar6 = param_2;\n  pbVar7 = &DAT_00390adc;\n  do {\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    bVar8 = *pbVar6 < *pbVar7;\n    bVar9 = *pbVar6 == *pbVar7;\n    pbVar6 = pbVar6 + 1;\n    pbVar7 = pbVar7 + 1;\n  } while (bVar9);\n  if ((!bVar8 && !bVar9) == bVar8) {\n    *param_1 = stdout;\n    uVar1 = 1;\n  }\n  else {\n    pFVar2 = fopen64((char *)param_2,"w");\n    *param_1 = pFVar2;\n    uVar1 = 1;\n    if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      uVar1 = gettext("cannot open map file %s: %s");\n      FUN_00185680(uVar1,param_2,pcVar4);\n      uVar1 = 0;\n    }\n  }\n  return uVar1;\n}" type_identifier (function_declarator "FUN_001ce210(undefined8 *param_1,byte *param_2)" identifier (parameter_list "(undefined8 *param_1,byte *param_2)" ( (parameter_declaration "undefined8 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "byte *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  undefined8 uVar1;\n  FILE *pFVar2;\n  int *piVar3;\n  char *pcVar4;\n  long lVar5;\n  byte *pbVar6;\n  byte *pbVar7;\n  bool bVar8;\n  bool bVar9;\n  \n  lVar5 = 2;\n  bVar8 = &stack0xfffffffffffffff0 < &DAT_00000008;\n  bVar9 = &stack0x00000000 == (undefined1 *)0x18;\n  pbVar6 = param_2;\n  pbVar7 = &DAT_00390adc;\n  do {\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    bVar8 = *pbVar6 < *pbVar7;\n    bVar9 = *pbVar6 == *pbVar7;\n    pbVar6 = pbVar6 + 1;\n    pbVar7 = pbVar7 + 1;\n  } while (bVar9);\n  if ((!bVar8 && !bVar9) == bVar8) {\n    *param_1 = stdout;\n    uVar1 = 1;\n  }\n  else {\n    pFVar2 = fopen64((char *)param_2,"w");\n    *param_1 = pFVar2;\n    uVar1 = 1;\n    if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      uVar1 = gettext("cannot open map file %s: %s");\n      FUN_00185680(uVar1,param_2,pcVar4);\n      uVar1 = 0;\n    }\n  }\n  return uVar1;\n}" { (declaration "undefined8 uVar1;" type_identifier identifier ;) (declaration "FILE *pFVar2;" type_identifier (pointer_declarator "*pFVar2" * identifier) ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "byte *pbVar7;" type_identifier (pointer_declarator "*pbVar7" * identifier) ;) (declaration "bool bVar8;" primitive_type identifier ;) (declaration "bool bVar9;" primitive_type identifier ;) (expression_statement "lVar5 = 2;" (assignment_expression "lVar5 = 2" identifier = number_literal) ;) (expression_statement "bVar8 = &stack0xfffffffffffffff0 < &DAT_00000008;" (assignment_expression "bVar8 = &stack0xfffffffffffffff0 < &DAT_00000008" identifier = (binary_expression "&stack0xfffffffffffffff0 < &DAT_00000008" (pointer_expression "&stack0xfffffffffffffff0" & identifier) < (pointer_expression "&DAT_00000008" & identifier))) ;) (expression_statement "bVar9 = &stack0x00000000 == (undefined1 *)0x18;" (assignment_expression "bVar9 = &stack0x00000000 == (undefined1 *)0x18" identifier = (binary_expression "&stack0x00000000 == (undefined1 *)0x18" (pointer_expression "&stack0x00000000" & identifier) == (cast_expression "(undefined1 *)0x18" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal))) ;) (expression_statement "pbVar6 = param_2;" (assignment_expression "pbVar6 = param_2" identifier = identifier) ;) (expression_statement "pbVar7 = &DAT_00390adc;" (assignment_expression "pbVar7 = &DAT_00390adc" identifier = (pointer_expression "&DAT_00390adc" & identifier)) ;) (do_statement "do {\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    bVar8 = *pbVar6 < *pbVar7;\n    bVar9 = *pbVar6 == *pbVar7;\n    pbVar6 = pbVar6 + 1;\n    pbVar7 = pbVar7 + 1;\n  } while (bVar9);" do (compound_statement "{\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    bVar8 = *pbVar6 < *pbVar7;\n    bVar9 = *pbVar6 == *pbVar7;\n    pbVar6 = pbVar6 + 1;\n    pbVar7 = pbVar7 + 1;\n  }" { (if_statement "if (lVar5 == 0) break;" if (parenthesized_expression "(lVar5 == 0)" ( (binary_expression "lVar5 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar5 = lVar5 + -1;" (assignment_expression "lVar5 = lVar5 + -1" identifier = (binary_expression "lVar5 + -1" identifier + number_literal)) ;) (expression_statement "bVar8 = *pbVar6 < *pbVar7;" (assignment_expression "bVar8 = *pbVar6 < *pbVar7" identifier = (binary_expression "*pbVar6 < *pbVar7" (pointer_expression "*pbVar6" * identifier) < (pointer_expression "*pbVar7" * identifier))) ;) (expression_statement "bVar9 = *pbVar6 == *pbVar7;" (assignment_expression "bVar9 = *pbVar6 == *pbVar7" identifier = (binary_expression "*pbVar6 == *pbVar7" (pointer_expression "*pbVar6" * identifier) == (pointer_expression "*pbVar7" * identifier))) ;) (expression_statement "pbVar6 = pbVar6 + 1;" (assignment_expression "pbVar6 = pbVar6 + 1" identifier = (binary_expression "pbVar6 + 1" identifier + number_literal)) ;) (expression_statement "pbVar7 = pbVar7 + 1;" (assignment_expression "pbVar7 = pbVar7 + 1" identifier = (binary_expression "pbVar7 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar9)" ( identifier )) ;) (if_statement "if ((!bVar8 && !bVar9) == bVar8) {\n    *param_1 = stdout;\n    uVar1 = 1;\n  }\n  else {\n    pFVar2 = fopen64((char *)param_2,"w");\n    *param_1 = pFVar2;\n    uVar1 = 1;\n    if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      uVar1 = gettext("cannot open map file %s: %s");\n      FUN_00185680(uVar1,param_2,pcVar4);\n      uVar1 = 0;\n    }\n  }" if (parenthesized_expression "((!bVar8 && !bVar9) == bVar8)" ( (binary_expression "(!bVar8 && !bVar9) == bVar8" (parenthesized_expression "(!bVar8 && !bVar9)" ( (binary_expression "!bVar8 && !bVar9" (unary_expression "!bVar8" ! identifier) && (unary_expression "!bVar9" ! identifier)) )) == identifier) )) (compound_statement "{\n    *param_1 = stdout;\n    uVar1 = 1;\n  }" { (expression_statement "*param_1 = stdout;" (assignment_expression "*param_1 = stdout" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "uVar1 = 1;" (assignment_expression "uVar1 = 1" identifier = number_literal) ;) }) (else_clause "else {\n    pFVar2 = fopen64((char *)param_2,"w");\n    *param_1 = pFVar2;\n    uVar1 = 1;\n    if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      uVar1 = gettext("cannot open map file %s: %s");\n      FUN_00185680(uVar1,param_2,pcVar4);\n      uVar1 = 0;\n    }\n  }" else (compound_statement "{\n    pFVar2 = fopen64((char *)param_2,"w");\n    *param_1 = pFVar2;\n    uVar1 = 1;\n    if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      uVar1 = gettext("cannot open map file %s: %s");\n      FUN_00185680(uVar1,param_2,pcVar4);\n      uVar1 = 0;\n    }\n  }" { (expression_statement "pFVar2 = fopen64((char *)param_2,"w");" (assignment_expression "pFVar2 = fopen64((char *)param_2,"w")" identifier = (call_expression "fopen64((char *)param_2,"w")" identifier (argument_list "((char *)param_2,"w")" ( (cast_expression "(char *)param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , (string_literal ""w"" " string_content ") )))) ;) (expression_statement "*param_1 = pFVar2;" (assignment_expression "*param_1 = pFVar2" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "uVar1 = 1;" (assignment_expression "uVar1 = 1" identifier = number_literal) ;) (if_statement "if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      uVar1 = gettext("cannot open map file %s: %s");\n      FUN_00185680(uVar1,param_2,pcVar4);\n      uVar1 = 0;\n    }" if (parenthesized_expression "(pFVar2 == (FILE *)0x0)" ( (binary_expression "pFVar2 == (FILE *)0x0" identifier == (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      uVar1 = gettext("cannot open map file %s: %s");\n      FUN_00185680(uVar1,param_2,pcVar4);\n      uVar1 = 0;\n    }" { (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar4 = strerror(*piVar3);" (assignment_expression "pcVar4 = strerror(*piVar3)" identifier = (call_expression "strerror(*piVar3)" identifier (argument_list "(*piVar3)" ( (pointer_expression "*piVar3" * identifier) )))) ;) (expression_statement "uVar1 = gettext("cannot open map file %s: %s");" (assignment_expression "uVar1 = gettext("cannot open map file %s: %s")" identifier = (call_expression "gettext("cannot open map file %s: %s")" identifier (argument_list "("cannot open map file %s: %s")" ( (string_literal ""cannot open map file %s: %s"" " string_content ") )))) ;) (expression_statement "FUN_00185680(uVar1,param_2,pcVar4);" (call_expression "FUN_00185680(uVar1,param_2,pcVar4)" identifier (argument_list "(uVar1,param_2,pcVar4)" ( identifier , identifier , identifier ))) ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) })) }))) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "/* DWARF original prototype: bool open(Mapfile * this, char * map_filename) */\n\nint __thiscall gold::Mapfile::open(Mapfile *this,char *__file,int __oflag,...)\n\n{\n  int iVar1;\n  FILE *pFVar2;\n  int *piVar3;\n  char *pcVar4;\n  char *format;\n  long lVar5;\n  byte *pbVar6;\n  byte *pbVar7;\n  bool bVar8;\n  bool bVar9;\n  \n  lVar5 = 2;\n  bVar8 = &stack0xfffffffffffffff0 < &DAT_00000008;\n  bVar9 = &stack0x00000000 == (undefined1 *)0x18;\n  pbVar6 = (byte *)__file;\n  pbVar7 = &DAT_00390adc;\n  do {\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    bVar8 = *pbVar6 < *pbVar7;\n    bVar9 = *pbVar6 == *pbVar7;\n    pbVar6 = pbVar6 + 1;\n    pbVar7 = pbVar7 + 1;\n  } while (bVar9);\n  if ((!bVar8 && !bVar9) == bVar8) {\n    this->map_file_ = stdout;\n    iVar1 = 1;\n  }\n  else {\n    pFVar2 = fopen64(__file,"w");\n    this->map_file_ = (FILE *)pFVar2;\n    iVar1 = 1;\n    if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      format = (char *)gettext("cannot open map file %s: %s");\n      gold_error(format,__file,pcVar4);\n      iVar1 = 0;\n    }\n  }\n  return iVar1;\n}\n\n" comment (function_definition "int __thiscall gold::Mapfile::open(Mapfile *this,char *__file,int __oflag,...)\n\n{\n  int iVar1;\n  FILE *pFVar2;\n  int *piVar3;\n  char *pcVar4;\n  char *format;\n  long lVar5;\n  byte *pbVar6;\n  byte *pbVar7;\n  bool bVar8;\n  bool bVar9;\n  \n  lVar5 = 2;\n  bVar8 = &stack0xfffffffffffffff0 < &DAT_00000008;\n  bVar9 = &stack0x00000000 == (undefined1 *)0x18;\n  pbVar6 = (byte *)__file;\n  pbVar7 = &DAT_00390adc;\n  do {\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    bVar8 = *pbVar6 < *pbVar7;\n    bVar9 = *pbVar6 == *pbVar7;\n    pbVar6 = pbVar6 + 1;\n    pbVar7 = pbVar7 + 1;\n  } while (bVar9);\n  if ((!bVar8 && !bVar9) == bVar8) {\n    this->map_file_ = stdout;\n    iVar1 = 1;\n  }\n  else {\n    pFVar2 = fopen64(__file,"w");\n    this->map_file_ = (FILE *)pFVar2;\n    iVar1 = 1;\n    if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      format = (char *)gettext("cannot open map file %s: %s");\n      gold_error(format,__file,pcVar4);\n      iVar1 = 0;\n    }\n  }\n  return iVar1;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "gold::Mapfile::" identifier : : identifier : :) (function_declarator "open(Mapfile *this,char *__file,int __oflag,...)" identifier (parameter_list "(Mapfile *this,char *__file,int __oflag,...)" ( (parameter_declaration "Mapfile *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "char *__file" primitive_type (pointer_declarator "*__file" * identifier)) , (parameter_declaration "int __oflag" primitive_type identifier) , (variadic_parameter "..." ...) ))) (compound_statement "{\n  int iVar1;\n  FILE *pFVar2;\n  int *piVar3;\n  char *pcVar4;\n  char *format;\n  long lVar5;\n  byte *pbVar6;\n  byte *pbVar7;\n  bool bVar8;\n  bool bVar9;\n  \n  lVar5 = 2;\n  bVar8 = &stack0xfffffffffffffff0 < &DAT_00000008;\n  bVar9 = &stack0x00000000 == (undefined1 *)0x18;\n  pbVar6 = (byte *)__file;\n  pbVar7 = &DAT_00390adc;\n  do {\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    bVar8 = *pbVar6 < *pbVar7;\n    bVar9 = *pbVar6 == *pbVar7;\n    pbVar6 = pbVar6 + 1;\n    pbVar7 = pbVar7 + 1;\n  } while (bVar9);\n  if ((!bVar8 && !bVar9) == bVar8) {\n    this->map_file_ = stdout;\n    iVar1 = 1;\n  }\n  else {\n    pFVar2 = fopen64(__file,"w");\n    this->map_file_ = (FILE *)pFVar2;\n    iVar1 = 1;\n    if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      format = (char *)gettext("cannot open map file %s: %s");\n      gold_error(format,__file,pcVar4);\n      iVar1 = 0;\n    }\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "FILE *pFVar2;" type_identifier (pointer_declarator "*pFVar2" * identifier) ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "char *format;" primitive_type (pointer_declarator "*format" * identifier) ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "byte *pbVar7;" type_identifier (pointer_declarator "*pbVar7" * identifier) ;) (declaration "bool bVar8;" primitive_type identifier ;) (declaration "bool bVar9;" primitive_type identifier ;) (expression_statement "lVar5 = 2;" (assignment_expression "lVar5 = 2" identifier = number_literal) ;) (expression_statement "bVar8 = &stack0xfffffffffffffff0 < &DAT_00000008;" (assignment_expression "bVar8 = &stack0xfffffffffffffff0 < &DAT_00000008" identifier = (binary_expression "&stack0xfffffffffffffff0 < &DAT_00000008" (pointer_expression "&stack0xfffffffffffffff0" & identifier) < (pointer_expression "&DAT_00000008" & identifier))) ;) (expression_statement "bVar9 = &stack0x00000000 == (undefined1 *)0x18;" (assignment_expression "bVar9 = &stack0x00000000 == (undefined1 *)0x18" identifier = (binary_expression "&stack0x00000000 == (undefined1 *)0x18" (pointer_expression "&stack0x00000000" & identifier) == (cast_expression "(undefined1 *)0x18" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal))) ;) (expression_statement "pbVar6 = (byte *)__file;" (assignment_expression "pbVar6 = (byte *)__file" identifier = (cast_expression "(byte *)__file" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "pbVar7 = &DAT_00390adc;" (assignment_expression "pbVar7 = &DAT_00390adc" identifier = (pointer_expression "&DAT_00390adc" & identifier)) ;) (do_statement "do {\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    bVar8 = *pbVar6 < *pbVar7;\n    bVar9 = *pbVar6 == *pbVar7;\n    pbVar6 = pbVar6 + 1;\n    pbVar7 = pbVar7 + 1;\n  } while (bVar9);" do (compound_statement "{\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    bVar8 = *pbVar6 < *pbVar7;\n    bVar9 = *pbVar6 == *pbVar7;\n    pbVar6 = pbVar6 + 1;\n    pbVar7 = pbVar7 + 1;\n  }" { (if_statement "if (lVar5 == 0) break;" if (parenthesized_expression "(lVar5 == 0)" ( (binary_expression "lVar5 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar5 = lVar5 + -1;" (assignment_expression "lVar5 = lVar5 + -1" identifier = (binary_expression "lVar5 + -1" identifier + number_literal)) ;) (expression_statement "bVar8 = *pbVar6 < *pbVar7;" (assignment_expression "bVar8 = *pbVar6 < *pbVar7" identifier = (binary_expression "*pbVar6 < *pbVar7" (pointer_expression "*pbVar6" * identifier) < (pointer_expression "*pbVar7" * identifier))) ;) (expression_statement "bVar9 = *pbVar6 == *pbVar7;" (assignment_expression "bVar9 = *pbVar6 == *pbVar7" identifier = (binary_expression "*pbVar6 == *pbVar7" (pointer_expression "*pbVar6" * identifier) == (pointer_expression "*pbVar7" * identifier))) ;) (expression_statement "pbVar6 = pbVar6 + 1;" (assignment_expression "pbVar6 = pbVar6 + 1" identifier = (binary_expression "pbVar6 + 1" identifier + number_literal)) ;) (expression_statement "pbVar7 = pbVar7 + 1;" (assignment_expression "pbVar7 = pbVar7 + 1" identifier = (binary_expression "pbVar7 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar9)" ( identifier )) ;) (if_statement "if ((!bVar8 && !bVar9) == bVar8) {\n    this->map_file_ = stdout;\n    iVar1 = 1;\n  }\n  else {\n    pFVar2 = fopen64(__file,"w");\n    this->map_file_ = (FILE *)pFVar2;\n    iVar1 = 1;\n    if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      format = (char *)gettext("cannot open map file %s: %s");\n      gold_error(format,__file,pcVar4);\n      iVar1 = 0;\n    }\n  }" if (parenthesized_expression "((!bVar8 && !bVar9) == bVar8)" ( (binary_expression "(!bVar8 && !bVar9) == bVar8" (parenthesized_expression "(!bVar8 && !bVar9)" ( (binary_expression "!bVar8 && !bVar9" (unary_expression "!bVar8" ! identifier) && (unary_expression "!bVar9" ! identifier)) )) == identifier) )) (compound_statement "{\n    this->map_file_ = stdout;\n    iVar1 = 1;\n  }" { (expression_statement "this->map_file_ = stdout;" (assignment_expression "this->map_file_ = stdout" (field_expression "this->map_file_" identifier -> field_identifier) = identifier) ;) (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) }) (else_clause "else {\n    pFVar2 = fopen64(__file,"w");\n    this->map_file_ = (FILE *)pFVar2;\n    iVar1 = 1;\n    if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      format = (char *)gettext("cannot open map file %s: %s");\n      gold_error(format,__file,pcVar4);\n      iVar1 = 0;\n    }\n  }" else (compound_statement "{\n    pFVar2 = fopen64(__file,"w");\n    this->map_file_ = (FILE *)pFVar2;\n    iVar1 = 1;\n    if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      format = (char *)gettext("cannot open map file %s: %s");\n      gold_error(format,__file,pcVar4);\n      iVar1 = 0;\n    }\n  }" { (expression_statement "pFVar2 = fopen64(__file,"w");" (assignment_expression "pFVar2 = fopen64(__file,"w")" identifier = (call_expression "fopen64(__file,"w")" identifier (argument_list "(__file,"w")" ( identifier , (string_literal ""w"" " string_content ") )))) ;) (expression_statement "this->map_file_ = (FILE *)pFVar2;" (assignment_expression "this->map_file_ = (FILE *)pFVar2" (field_expression "this->map_file_" identifier -> field_identifier) = (cast_expression "(FILE *)pFVar2" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) (if_statement "if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      format = (char *)gettext("cannot open map file %s: %s");\n      gold_error(format,__file,pcVar4);\n      iVar1 = 0;\n    }" if (parenthesized_expression "(pFVar2 == (FILE *)0x0)" ( (binary_expression "pFVar2 == (FILE *)0x0" identifier == (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      format = (char *)gettext("cannot open map file %s: %s");\n      gold_error(format,__file,pcVar4);\n      iVar1 = 0;\n    }" { (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar4 = strerror(*piVar3);" (assignment_expression "pcVar4 = strerror(*piVar3)" identifier = (call_expression "strerror(*piVar3)" identifier (argument_list "(*piVar3)" ( (pointer_expression "*piVar3" * identifier) )))) ;) (expression_statement "format = (char *)gettext("cannot open map file %s: %s");" (assignment_expression "format = (char *)gettext("cannot open map file %s: %s")" identifier = (cast_expression "(char *)gettext("cannot open map file %s: %s")" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "gettext("cannot open map file %s: %s")" identifier (argument_list "("cannot open map file %s: %s")" ( (string_literal ""cannot open map file %s: %s"" " string_content ") ))))) ;) (expression_statement "gold_error(format,__file,pcVar4);" (call_expression "gold_error(format,__file,pcVar4)" identifier (argument_list "(format,__file,pcVar4)" ( identifier , identifier , identifier ))) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) })) }))) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "undefined8 FUN_001ce210(undefined8 *param_1,byte *param_2)\n\n{\n  undefined8 uVar1;\n  FILE *pFVar2;\n  int *piVar3;\n  char *pcVar4;\n  long lVar5;\n  byte *pbVar6;\n  byte *pbVar7;\n  bool bVar8;\n  bool bVar9;\n  \n  lVar5 = 2;\n  bVar8 = &stack0xfffffffffffffff0 < &DAT_00000008;\n  bVar9 = &stack0x00000000 == (undefined1 *)0x18;\n  pbVar6 = param_2;\n  pbVar7 = &DAT_00390adc;\n  do {\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    bVar8 = *pbVar6 < *pbVar7;\n    bVar9 = *pbVar6 == *pbVar7;\n    pbVar6 = pbVar6 + 1;\n    pbVar7 = pbVar7 + 1;\n  } while (bVar9);\n  if ((!bVar8 && !bVar9) == bVar8) {\n    *param_1 = stdout;\n    uVar1 = 1;\n  }\n  else {\n    pFVar2 = fopen64((char *)param_2,"w");\n    *param_1 = pFVar2;\n    uVar1 = 1;\n    if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      uVar1 = gettext("cannot open map file %s: %s");\n      FUN_00185680(uVar1,param_2,pcVar4);\n      uVar1 = 0;\n    }\n  }\n  return uVar1;\n}\n\n" (function_definition "undefined8 FUN_001ce210(undefined8 *param_1,byte *param_2)\n\n{\n  undefined8 uVar1;\n  FILE *pFVar2;\n  int *piVar3;\n  char *pcVar4;\n  long lVar5;\n  byte *pbVar6;\n  byte *pbVar7;\n  bool bVar8;\n  bool bVar9;\n  \n  lVar5 = 2;\n  bVar8 = &stack0xfffffffffffffff0 < &DAT_00000008;\n  bVar9 = &stack0x00000000 == (undefined1 *)0x18;\n  pbVar6 = param_2;\n  pbVar7 = &DAT_00390adc;\n  do {\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    bVar8 = *pbVar6 < *pbVar7;\n    bVar9 = *pbVar6 == *pbVar7;\n    pbVar6 = pbVar6 + 1;\n    pbVar7 = pbVar7 + 1;\n  } while (bVar9);\n  if ((!bVar8 && !bVar9) == bVar8) {\n    *param_1 = stdout;\n    uVar1 = 1;\n  }\n  else {\n    pFVar2 = fopen64((char *)param_2,"w");\n    *param_1 = pFVar2;\n    uVar1 = 1;\n    if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      uVar1 = gettext("cannot open map file %s: %s");\n      FUN_00185680(uVar1,param_2,pcVar4);\n      uVar1 = 0;\n    }\n  }\n  return uVar1;\n}" type_identifier (function_declarator "FUN_001ce210(undefined8 *param_1,byte *param_2)" identifier (parameter_list "(undefined8 *param_1,byte *param_2)" ( (parameter_declaration "undefined8 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "byte *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  undefined8 uVar1;\n  FILE *pFVar2;\n  int *piVar3;\n  char *pcVar4;\n  long lVar5;\n  byte *pbVar6;\n  byte *pbVar7;\n  bool bVar8;\n  bool bVar9;\n  \n  lVar5 = 2;\n  bVar8 = &stack0xfffffffffffffff0 < &DAT_00000008;\n  bVar9 = &stack0x00000000 == (undefined1 *)0x18;\n  pbVar6 = param_2;\n  pbVar7 = &DAT_00390adc;\n  do {\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    bVar8 = *pbVar6 < *pbVar7;\n    bVar9 = *pbVar6 == *pbVar7;\n    pbVar6 = pbVar6 + 1;\n    pbVar7 = pbVar7 + 1;\n  } while (bVar9);\n  if ((!bVar8 && !bVar9) == bVar8) {\n    *param_1 = stdout;\n    uVar1 = 1;\n  }\n  else {\n    pFVar2 = fopen64((char *)param_2,"w");\n    *param_1 = pFVar2;\n    uVar1 = 1;\n    if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      uVar1 = gettext("cannot open map file %s: %s");\n      FUN_00185680(uVar1,param_2,pcVar4);\n      uVar1 = 0;\n    }\n  }\n  return uVar1;\n}" { (declaration "undefined8 uVar1;" type_identifier identifier ;) (declaration "FILE *pFVar2;" type_identifier (pointer_declarator "*pFVar2" * identifier) ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "byte *pbVar7;" type_identifier (pointer_declarator "*pbVar7" * identifier) ;) (declaration "bool bVar8;" primitive_type identifier ;) (declaration "bool bVar9;" primitive_type identifier ;) (expression_statement "lVar5 = 2;" (assignment_expression "lVar5 = 2" identifier = number_literal) ;) (expression_statement "bVar8 = &stack0xfffffffffffffff0 < &DAT_00000008;" (assignment_expression "bVar8 = &stack0xfffffffffffffff0 < &DAT_00000008" identifier = (binary_expression "&stack0xfffffffffffffff0 < &DAT_00000008" (pointer_expression "&stack0xfffffffffffffff0" & identifier) < (pointer_expression "&DAT_00000008" & identifier))) ;) (expression_statement "bVar9 = &stack0x00000000 == (undefined1 *)0x18;" (assignment_expression "bVar9 = &stack0x00000000 == (undefined1 *)0x18" identifier = (binary_expression "&stack0x00000000 == (undefined1 *)0x18" (pointer_expression "&stack0x00000000" & identifier) == (cast_expression "(undefined1 *)0x18" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal))) ;) (expression_statement "pbVar6 = param_2;" (assignment_expression "pbVar6 = param_2" identifier = identifier) ;) (expression_statement "pbVar7 = &DAT_00390adc;" (assignment_expression "pbVar7 = &DAT_00390adc" identifier = (pointer_expression "&DAT_00390adc" & identifier)) ;) (do_statement "do {\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    bVar8 = *pbVar6 < *pbVar7;\n    bVar9 = *pbVar6 == *pbVar7;\n    pbVar6 = pbVar6 + 1;\n    pbVar7 = pbVar7 + 1;\n  } while (bVar9);" do (compound_statement "{\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    bVar8 = *pbVar6 < *pbVar7;\n    bVar9 = *pbVar6 == *pbVar7;\n    pbVar6 = pbVar6 + 1;\n    pbVar7 = pbVar7 + 1;\n  }" { (if_statement "if (lVar5 == 0) break;" if (parenthesized_expression "(lVar5 == 0)" ( (binary_expression "lVar5 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar5 = lVar5 + -1;" (assignment_expression "lVar5 = lVar5 + -1" identifier = (binary_expression "lVar5 + -1" identifier + number_literal)) ;) (expression_statement "bVar8 = *pbVar6 < *pbVar7;" (assignment_expression "bVar8 = *pbVar6 < *pbVar7" identifier = (binary_expression "*pbVar6 < *pbVar7" (pointer_expression "*pbVar6" * identifier) < (pointer_expression "*pbVar7" * identifier))) ;) (expression_statement "bVar9 = *pbVar6 == *pbVar7;" (assignment_expression "bVar9 = *pbVar6 == *pbVar7" identifier = (binary_expression "*pbVar6 == *pbVar7" (pointer_expression "*pbVar6" * identifier) == (pointer_expression "*pbVar7" * identifier))) ;) (expression_statement "pbVar6 = pbVar6 + 1;" (assignment_expression "pbVar6 = pbVar6 + 1" identifier = (binary_expression "pbVar6 + 1" identifier + number_literal)) ;) (expression_statement "pbVar7 = pbVar7 + 1;" (assignment_expression "pbVar7 = pbVar7 + 1" identifier = (binary_expression "pbVar7 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar9)" ( identifier )) ;) (if_statement "if ((!bVar8 && !bVar9) == bVar8) {\n    *param_1 = stdout;\n    uVar1 = 1;\n  }\n  else {\n    pFVar2 = fopen64((char *)param_2,"w");\n    *param_1 = pFVar2;\n    uVar1 = 1;\n    if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      uVar1 = gettext("cannot open map file %s: %s");\n      FUN_00185680(uVar1,param_2,pcVar4);\n      uVar1 = 0;\n    }\n  }" if (parenthesized_expression "((!bVar8 && !bVar9) == bVar8)" ( (binary_expression "(!bVar8 && !bVar9) == bVar8" (parenthesized_expression "(!bVar8 && !bVar9)" ( (binary_expression "!bVar8 && !bVar9" (unary_expression "!bVar8" ! identifier) && (unary_expression "!bVar9" ! identifier)) )) == identifier) )) (compound_statement "{\n    *param_1 = stdout;\n    uVar1 = 1;\n  }" { (expression_statement "*param_1 = stdout;" (assignment_expression "*param_1 = stdout" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "uVar1 = 1;" (assignment_expression "uVar1 = 1" identifier = number_literal) ;) }) (else_clause "else {\n    pFVar2 = fopen64((char *)param_2,"w");\n    *param_1 = pFVar2;\n    uVar1 = 1;\n    if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      uVar1 = gettext("cannot open map file %s: %s");\n      FUN_00185680(uVar1,param_2,pcVar4);\n      uVar1 = 0;\n    }\n  }" else (compound_statement "{\n    pFVar2 = fopen64((char *)param_2,"w");\n    *param_1 = pFVar2;\n    uVar1 = 1;\n    if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      uVar1 = gettext("cannot open map file %s: %s");\n      FUN_00185680(uVar1,param_2,pcVar4);\n      uVar1 = 0;\n    }\n  }" { (expression_statement "pFVar2 = fopen64((char *)param_2,"w");" (assignment_expression "pFVar2 = fopen64((char *)param_2,"w")" identifier = (call_expression "fopen64((char *)param_2,"w")" identifier (argument_list "((char *)param_2,"w")" ( (cast_expression "(char *)param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , (string_literal ""w"" " string_content ") )))) ;) (expression_statement "*param_1 = pFVar2;" (assignment_expression "*param_1 = pFVar2" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "uVar1 = 1;" (assignment_expression "uVar1 = 1" identifier = number_literal) ;) (if_statement "if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      uVar1 = gettext("cannot open map file %s: %s");\n      FUN_00185680(uVar1,param_2,pcVar4);\n      uVar1 = 0;\n    }" if (parenthesized_expression "(pFVar2 == (FILE *)0x0)" ( (binary_expression "pFVar2 == (FILE *)0x0" identifier == (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      uVar1 = gettext("cannot open map file %s: %s");\n      FUN_00185680(uVar1,param_2,pcVar4);\n      uVar1 = 0;\n    }" { (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar4 = strerror(*piVar3);" (assignment_expression "pcVar4 = strerror(*piVar3)" identifier = (call_expression "strerror(*piVar3)" identifier (argument_list "(*piVar3)" ( (pointer_expression "*piVar3" * identifier) )))) ;) (expression_statement "uVar1 = gettext("cannot open map file %s: %s");" (assignment_expression "uVar1 = gettext("cannot open map file %s: %s")" identifier = (call_expression "gettext("cannot open map file %s: %s")" identifier (argument_list "("cannot open map file %s: %s")" ( (string_literal ""cannot open map file %s: %s"" " string_content ") )))) ;) (expression_statement "FUN_00185680(uVar1,param_2,pcVar4);" (call_expression "FUN_00185680(uVar1,param_2,pcVar4)" identifier (argument_list "(uVar1,param_2,pcVar4)" ( identifier , identifier , identifier ))) ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) })) }))) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression & IDENT) < (pointer_expression & IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression & IDENT) == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) < (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) == (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( IDENT )) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (unary_expression ! IDENT) && (unary_expression ! IDENT)) )) == IDENT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) , (string_literal " string_content ") )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) })) }))) (return_statement return IDENT ;) })))
(function_definition "undefined8 FUN_001ce210(undefined8 *param_1,byte *param_2)\n\n{\n  undefined8 uVar1;\n  FILE *pFVar2;\n  int *piVar3;\n  char *pcVar4;\n  long lVar5;\n  byte *pbVar6;\n  byte *pbVar7;\n  bool bVar8;\n  bool bVar9;\n  \n  lVar5 = 2;\n  bVar8 = &stack0xfffffffffffffff0 < &DAT_00000008;\n  bVar9 = &stack0x00000000 == (undefined1 *)0x18;\n  pbVar6 = param_2;\n  pbVar7 = &DAT_00390adc;\n  do {\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    bVar8 = *pbVar6 < *pbVar7;\n    bVar9 = *pbVar6 == *pbVar7;\n    pbVar6 = pbVar6 + 1;\n    pbVar7 = pbVar7 + 1;\n  } while (bVar9);\n  if ((!bVar8 && !bVar9) == bVar8) {\n    *param_1 = stdout;\n    uVar1 = 1;\n  }\n  else {\n    pFVar2 = fopen64((char *)param_2,"w");\n    *param_1 = pFVar2;\n    uVar1 = 1;\n    if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      uVar1 = gettext("cannot open map file %s: %s");\n      FUN_00185680(uVar1,param_2,pcVar4);\n      uVar1 = 0;\n    }\n  }\n  return uVar1;\n}" (type_identifier "undefined8") (function_declarator "FUN_001ce210(undefined8 *param_1,byte *param_2)" (identifier "FUN_001ce210") (parameter_list "(undefined8 *param_1,byte *param_2)" (( "(") (parameter_declaration "undefined8 *param_1" (type_identifier "undefined8") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "byte *param_2" (type_identifier "byte") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  undefined8 uVar1;\n  FILE *pFVar2;\n  int *piVar3;\n  char *pcVar4;\n  long lVar5;\n  byte *pbVar6;\n  byte *pbVar7;\n  bool bVar8;\n  bool bVar9;\n  \n  lVar5 = 2;\n  bVar8 = &stack0xfffffffffffffff0 < &DAT_00000008;\n  bVar9 = &stack0x00000000 == (undefined1 *)0x18;\n  pbVar6 = param_2;\n  pbVar7 = &DAT_00390adc;\n  do {\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    bVar8 = *pbVar6 < *pbVar7;\n    bVar9 = *pbVar6 == *pbVar7;\n    pbVar6 = pbVar6 + 1;\n    pbVar7 = pbVar7 + 1;\n  } while (bVar9);\n  if ((!bVar8 && !bVar9) == bVar8) {\n    *param_1 = stdout;\n    uVar1 = 1;\n  }\n  else {\n    pFVar2 = fopen64((char *)param_2,"w");\n    *param_1 = pFVar2;\n    uVar1 = 1;\n    if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      uVar1 = gettext("cannot open map file %s: %s");\n      FUN_00185680(uVar1,param_2,pcVar4);\n      uVar1 = 0;\n    }\n  }\n  return uVar1;\n}" ({ "{") (declaration "undefined8 uVar1;" (type_identifier "undefined8") (identifier "uVar1") (; ";")) (declaration "FILE *pFVar2;" (type_identifier "FILE") (pointer_declarator "*pFVar2" (* "*") (identifier "pFVar2")) (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "char *pcVar4;" (primitive_type "char") (pointer_declarator "*pcVar4" (* "*") (identifier "pcVar4")) (; ";")) (declaration "long lVar5;" (sized_type_specifier "long" (long "long")) (identifier "lVar5") (; ";")) (declaration "byte *pbVar6;" (type_identifier "byte") (pointer_declarator "*pbVar6" (* "*") (identifier "pbVar6")) (; ";")) (declaration "byte *pbVar7;" (type_identifier "byte") (pointer_declarator "*pbVar7" (* "*") (identifier "pbVar7")) (; ";")) (declaration "bool bVar8;" (primitive_type "bool") (identifier "bVar8") (; ";")) (declaration "bool bVar9;" (primitive_type "bool") (identifier "bVar9") (; ";")) (expression_statement "lVar5 = 2;" (assignment_expression "lVar5 = 2" (identifier "lVar5") (= "=") (number_literal "2")) (; ";")) (expression_statement "bVar8 = &stack0xfffffffffffffff0 < &DAT_00000008;" (assignment_expression "bVar8 = &stack0xfffffffffffffff0 < &DAT_00000008" (identifier "bVar8") (= "=") (binary_expression "&stack0xfffffffffffffff0 < &DAT_00000008" (pointer_expression "&stack0xfffffffffffffff0" (& "&") (identifier "stack0xfffffffffffffff0")) (< "<") (pointer_expression "&DAT_00000008" (& "&") (identifier "DAT_00000008")))) (; ";")) (expression_statement "bVar9 = &stack0x00000000 == (undefined1 *)0x18;" (assignment_expression "bVar9 = &stack0x00000000 == (undefined1 *)0x18" (identifier "bVar9") (= "=") (binary_expression "&stack0x00000000 == (undefined1 *)0x18" (pointer_expression "&stack0x00000000" (& "&") (identifier "stack0x00000000")) (== "==") (cast_expression "(undefined1 *)0x18" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x18")))) (; ";")) (expression_statement "pbVar6 = param_2;" (assignment_expression "pbVar6 = param_2" (identifier "pbVar6") (= "=") (identifier "param_2")) (; ";")) (expression_statement "pbVar7 = &DAT_00390adc;" (assignment_expression "pbVar7 = &DAT_00390adc" (identifier "pbVar7") (= "=") (pointer_expression "&DAT_00390adc" (& "&") (identifier "DAT_00390adc"))) (; ";")) (do_statement "do {\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    bVar8 = *pbVar6 < *pbVar7;\n    bVar9 = *pbVar6 == *pbVar7;\n    pbVar6 = pbVar6 + 1;\n    pbVar7 = pbVar7 + 1;\n  } while (bVar9);" (do "do") (compound_statement "{\n    if (lVar5 == 0) break;\n    lVar5 = lVar5 + -1;\n    bVar8 = *pbVar6 < *pbVar7;\n    bVar9 = *pbVar6 == *pbVar7;\n    pbVar6 = pbVar6 + 1;\n    pbVar7 = pbVar7 + 1;\n  }" ({ "{") (if_statement "if (lVar5 == 0) break;" (if "if") (parenthesized_expression "(lVar5 == 0)" (( "(") (binary_expression "lVar5 == 0" (identifier "lVar5") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "lVar5 = lVar5 + -1;" (assignment_expression "lVar5 = lVar5 + -1" (identifier "lVar5") (= "=") (binary_expression "lVar5 + -1" (identifier "lVar5") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "bVar8 = *pbVar6 < *pbVar7;" (assignment_expression "bVar8 = *pbVar6 < *pbVar7" (identifier "bVar8") (= "=") (binary_expression "*pbVar6 < *pbVar7" (pointer_expression "*pbVar6" (* "*") (identifier "pbVar6")) (< "<") (pointer_expression "*pbVar7" (* "*") (identifier "pbVar7")))) (; ";")) (expression_statement "bVar9 = *pbVar6 == *pbVar7;" (assignment_expression "bVar9 = *pbVar6 == *pbVar7" (identifier "bVar9") (= "=") (binary_expression "*pbVar6 == *pbVar7" (pointer_expression "*pbVar6" (* "*") (identifier "pbVar6")) (== "==") (pointer_expression "*pbVar7" (* "*") (identifier "pbVar7")))) (; ";")) (expression_statement "pbVar6 = pbVar6 + 1;" (assignment_expression "pbVar6 = pbVar6 + 1" (identifier "pbVar6") (= "=") (binary_expression "pbVar6 + 1" (identifier "pbVar6") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pbVar7 = pbVar7 + 1;" (assignment_expression "pbVar7 = pbVar7 + 1" (identifier "pbVar7") (= "=") (binary_expression "pbVar7 + 1" (identifier "pbVar7") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(bVar9)" (( "(") (identifier "bVar9") () ")")) (; ";")) (if_statement "if ((!bVar8 && !bVar9) == bVar8) {\n    *param_1 = stdout;\n    uVar1 = 1;\n  }\n  else {\n    pFVar2 = fopen64((char *)param_2,"w");\n    *param_1 = pFVar2;\n    uVar1 = 1;\n    if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      uVar1 = gettext("cannot open map file %s: %s");\n      FUN_00185680(uVar1,param_2,pcVar4);\n      uVar1 = 0;\n    }\n  }" (if "if") (parenthesized_expression "((!bVar8 && !bVar9) == bVar8)" (( "(") (binary_expression "(!bVar8 && !bVar9) == bVar8" (parenthesized_expression "(!bVar8 && !bVar9)" (( "(") (binary_expression "!bVar8 && !bVar9" (unary_expression "!bVar8" (! "!") (identifier "bVar8")) (&& "&&") (unary_expression "!bVar9" (! "!") (identifier "bVar9"))) () ")")) (== "==") (identifier "bVar8")) () ")")) (compound_statement "{\n    *param_1 = stdout;\n    uVar1 = 1;\n  }" ({ "{") (expression_statement "*param_1 = stdout;" (assignment_expression "*param_1 = stdout" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "stdout")) (; ";")) (expression_statement "uVar1 = 1;" (assignment_expression "uVar1 = 1" (identifier "uVar1") (= "=") (number_literal "1")) (; ";")) (} "}")) (else_clause "else {\n    pFVar2 = fopen64((char *)param_2,"w");\n    *param_1 = pFVar2;\n    uVar1 = 1;\n    if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      uVar1 = gettext("cannot open map file %s: %s");\n      FUN_00185680(uVar1,param_2,pcVar4);\n      uVar1 = 0;\n    }\n  }" (else "else") (compound_statement "{\n    pFVar2 = fopen64((char *)param_2,"w");\n    *param_1 = pFVar2;\n    uVar1 = 1;\n    if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      uVar1 = gettext("cannot open map file %s: %s");\n      FUN_00185680(uVar1,param_2,pcVar4);\n      uVar1 = 0;\n    }\n  }" ({ "{") (expression_statement "pFVar2 = fopen64((char *)param_2,"w");" (assignment_expression "pFVar2 = fopen64((char *)param_2,"w")" (identifier "pFVar2") (= "=") (call_expression "fopen64((char *)param_2,"w")" (identifier "fopen64") (argument_list "((char *)param_2,"w")" (( "(") (cast_expression "(char *)param_2" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_2")) (, ",") (string_literal ""w"" (" """) (string_content "w") (" """)) () ")")))) (; ";")) (expression_statement "*param_1 = pFVar2;" (assignment_expression "*param_1 = pFVar2" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "pFVar2")) (; ";")) (expression_statement "uVar1 = 1;" (assignment_expression "uVar1 = 1" (identifier "uVar1") (= "=") (number_literal "1")) (; ";")) (if_statement "if (pFVar2 == (FILE *)0x0) {\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      uVar1 = gettext("cannot open map file %s: %s");\n      FUN_00185680(uVar1,param_2,pcVar4);\n      uVar1 = 0;\n    }" (if "if") (parenthesized_expression "(pFVar2 == (FILE *)0x0)" (( "(") (binary_expression "pFVar2 == (FILE *)0x0" (identifier "pFVar2") (== "==") (cast_expression "(FILE *)0x0" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      piVar3 = __errno_location();\n      pcVar4 = strerror(*piVar3);\n      uVar1 = gettext("cannot open map file %s: %s");\n      FUN_00185680(uVar1,param_2,pcVar4);\n      uVar1 = 0;\n    }" ({ "{") (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" (identifier "piVar3") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "pcVar4 = strerror(*piVar3);" (assignment_expression "pcVar4 = strerror(*piVar3)" (identifier "pcVar4") (= "=") (call_expression "strerror(*piVar3)" (identifier "strerror") (argument_list "(*piVar3)" (( "(") (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) () ")")))) (; ";")) (expression_statement "uVar1 = gettext("cannot open map file %s: %s");" (assignment_expression "uVar1 = gettext("cannot open map file %s: %s")" (identifier "uVar1") (= "=") (call_expression "gettext("cannot open map file %s: %s")" (identifier "gettext") (argument_list "("cannot open map file %s: %s")" (( "(") (string_literal ""cannot open map file %s: %s"" (" """) (string_content "cannot open map file %s: %s") (" """)) () ")")))) (; ";")) (expression_statement "FUN_00185680(uVar1,param_2,pcVar4);" (call_expression "FUN_00185680(uVar1,param_2,pcVar4)" (identifier "FUN_00185680") (argument_list "(uVar1,param_2,pcVar4)" (( "(") (identifier "uVar1") (, ",") (identifier "param_2") (, ",") (identifier "pcVar4") () ")"))) (; ";")) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" (identifier "uVar1") (= "=") (number_literal "0")) (; ";")) (} "}"))) (} "}")))) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}")))

/* DWARF original prototype: bool open(Mapfile * this, char * map_filename) */

int __thiscall gold::type_1::function_1(type_1 *this,char *__file,int __oflag,...)

{
  int iVar1;
  type_2 *var_6;
  int *piVar3;
  char *pcVar4;
  char *format;
  long var_1;
  type_3 *var_2;
  type_3 *var_3;
  bool var_4;
  bool bVar9;
  
  var_1 = 2;
  var_4 = &stack0xfffffffffffffff0 < &DAT_00000008;
  bVar9 = &stack0x00000000 == (type_4 *)0x18;
  var_2 = (type_3 *)__file;
  var_3 = &DAT_00390adc;
  do {
    if (var_1 == 0) break;
    var_1 = var_1 + -1;
    var_4 = *var_2 < *var_3;
    bVar9 = *var_2 == *var_3;
    var_2 = var_2 + 1;
    var_3 = var_3 + 1;
  } while (bVar9);
  if ((!var_4 && !bVar9) == var_4) {
    this->map_file_ = stdout;
    iVar1 = 1;
  }
  else {
    var_6 = var_5(__file,"w");
    this->map_file_ = (type_2 *)var_6;
    iVar1 = 1;
    if (var_6 == (type_2 *)0x0) {
      piVar3 = var_7();
      pcVar4 = var_8(*piVar3);
      format = (char *)var_9("cannot open map file %s: %s");
      var_10(format,__file,pcVar4);
      iVar1 = 0;
    }
  }
  return iVar1;
}


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

undefined8 MASKED(undefined8 *param_1,byte *param_2)

{
  undefined8 uVar1;
  FILE *pFVar2;
  int *piVar3;
  char *pcVar4;
  long lVar5;
  byte *pbVar6;
  byte *pbVar7;
  bool bVar8;
  bool bVar9;
  
  lVar5 = 2;
  bVar8 = &stack0xfffffffffffffff0 < &DAT_00000008;
  bVar9 = &stack0x00000000 == (undefined1 *)0x18;
  pbVar6 = param_2;
  pbVar7 = &DAT_00390adc;
  do {
    if (lVar5 == 0) break;
    lVar5 = lVar5 + -1;
    bVar8 = *pbVar6 < *pbVar7;
    bVar9 = *pbVar6 == *pbVar7;
    pbVar6 = pbVar6 + 1;
    pbVar7 = pbVar7 + 1;
  } while (bVar9);
  if ((!bVar8 && !bVar9) == bVar8) {
    *param_1 = stdout;
    uVar1 = 1;
  }
  else {
    pFVar2 = fopen64((char *)param_2,"w");
    *param_1 = pFVar2;
    uVar1 = 1;
    if (pFVar2 == (FILE *)0x0) {
      piVar3 = __errno_location();
      pcVar4 = strerror(*piVar3);
      uVar1 = gettext("cannot open map file %s: %s");
      FUN_00185680(uVar1,param_2,pcVar4);
      uVar1 = 0;
    }
  }
  return uVar1;
}

