
int elf_type(char *type)

{
  int iVar1;
  int iVar2;
  char *message;
  
  iVar1 = strcasecmp(type,"rel");
  iVar2 = 1;
  if (iVar1 != 0) {
    iVar1 = strcasecmp(type,"exec");
    iVar2 = 2;
    if (iVar1 != 0) {
      iVar1 = strcasecmp(type,"dyn");
      iVar2 = 3;
      if (iVar1 != 0) {
        iVar2 = strcasecmp(type,"none");
        if (iVar2 != 0) {
          message = (char *)dcgettext(0,"Unknown type: %s\n",5);
          error(message,type);
          iVar2 = -1;
        }
      }
    }
  }
  return iVar2;
}



int FUN_001029a0(char *param_1)

{
  int iVar1;
  int iVar2;
  undefined8 uVar3;
  
  iVar1 = strcasecmp(param_1,"rel");
  iVar2 = 1;
  if (iVar1 != 0) {
    iVar1 = strcasecmp(param_1,"exec");
    iVar2 = 2;
    if (iVar1 != 0) {
      iVar1 = strcasecmp(param_1,"dyn");
      iVar2 = 3;
      if (iVar1 != 0) {
        iVar2 = strcasecmp(param_1,"none");
        if (iVar2 != 0) {
          uVar3 = dcgettext(0,"Unknown type: %s\n",5);
          error(uVar3,param_1);
          iVar2 = -1;
        }
      }
    }
  }
  return iVar2;
}


PUSH RBX
LEA RSI,[0x1065b8]
MOV RBX,RDI
CALL 0x00102040
MOV EDX,0x1
TEST EAX,EAX
JZ 0x001029fe
LEA RSI,[0x1065bc]
MOV RDI,RBX
CALL 0x00102040
MOV EDX,0x2
TEST EAX,EAX
JZ 0x001029fe
LEA RSI,[0x1065c1]
MOV RDI,RBX
CALL 0x00102040
MOV EDX,0x3
TEST EAX,EAX
JZ 0x001029fe
LEA RSI,[0x106599]
MOV RDI,RBX
CALL 0x00102040
MOV EDX,EAX
TEST EAX,EAX
JNZ 0x00102a02
MOV EAX,EDX
POP RBX
RET
MOV EDX,0x5
LEA RSI,[0x1065c5]
XOR EDI,EDI
CALL 0x001020c0
MOV RSI,RBX
MOV RDI,RAX
XOR EAX,EAX
CALL 0x00103650
MOV EDX,0xffffffff
JMP 0x001029fe
(translation_unit "int FUN_001029a0(char *param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined8 uVar3;\n  \n  iVar1 = strcasecmp(param_1,"rel");\n  iVar2 = 1;\n  if (iVar1 != 0) {\n    iVar1 = strcasecmp(param_1,"exec");\n    iVar2 = 2;\n    if (iVar1 != 0) {\n      iVar1 = strcasecmp(param_1,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(param_1,"none");\n        if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }\n      }\n    }\n  }\n  return iVar2;\n}\n\n" (function_definition "int FUN_001029a0(char *param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined8 uVar3;\n  \n  iVar1 = strcasecmp(param_1,"rel");\n  iVar2 = 1;\n  if (iVar1 != 0) {\n    iVar1 = strcasecmp(param_1,"exec");\n    iVar2 = 2;\n    if (iVar1 != 0) {\n      iVar1 = strcasecmp(param_1,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(param_1,"none");\n        if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }\n      }\n    }\n  }\n  return iVar2;\n}" primitive_type (function_declarator "FUN_001029a0(char *param_1)" identifier (parameter_list "(char *param_1)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined8 uVar3;\n  \n  iVar1 = strcasecmp(param_1,"rel");\n  iVar2 = 1;\n  if (iVar1 != 0) {\n    iVar1 = strcasecmp(param_1,"exec");\n    iVar2 = 2;\n    if (iVar1 != 0) {\n      iVar1 = strcasecmp(param_1,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(param_1,"none");\n        if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }\n      }\n    }\n  }\n  return iVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined8 uVar3;" type_identifier identifier ;) (expression_statement "iVar1 = strcasecmp(param_1,"rel");" (assignment_expression "iVar1 = strcasecmp(param_1,"rel")" identifier = (call_expression "strcasecmp(param_1,"rel")" identifier (argument_list "(param_1,"rel")" ( identifier , (string_literal ""rel"" " string_content ") )))) ;) (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) (if_statement "if (iVar1 != 0) {\n    iVar1 = strcasecmp(param_1,"exec");\n    iVar2 = 2;\n    if (iVar1 != 0) {\n      iVar1 = strcasecmp(param_1,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(param_1,"none");\n        if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }\n      }\n    }\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar1 = strcasecmp(param_1,"exec");\n    iVar2 = 2;\n    if (iVar1 != 0) {\n      iVar1 = strcasecmp(param_1,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(param_1,"none");\n        if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }\n      }\n    }\n  }" { (expression_statement "iVar1 = strcasecmp(param_1,"exec");" (assignment_expression "iVar1 = strcasecmp(param_1,"exec")" identifier = (call_expression "strcasecmp(param_1,"exec")" identifier (argument_list "(param_1,"exec")" ( identifier , (string_literal ""exec"" " string_content ") )))) ;) (expression_statement "iVar2 = 2;" (assignment_expression "iVar2 = 2" identifier = number_literal) ;) (if_statement "if (iVar1 != 0) {\n      iVar1 = strcasecmp(param_1,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(param_1,"none");\n        if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }\n      }\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar1 = strcasecmp(param_1,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(param_1,"none");\n        if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }\n      }\n    }" { (expression_statement "iVar1 = strcasecmp(param_1,"dyn");" (assignment_expression "iVar1 = strcasecmp(param_1,"dyn")" identifier = (call_expression "strcasecmp(param_1,"dyn")" identifier (argument_list "(param_1,"dyn")" ( identifier , (string_literal ""dyn"" " string_content ") )))) ;) (expression_statement "iVar2 = 3;" (assignment_expression "iVar2 = 3" identifier = number_literal) ;) (if_statement "if (iVar1 != 0) {\n        iVar2 = strcasecmp(param_1,"none");\n        if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }\n      }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        iVar2 = strcasecmp(param_1,"none");\n        if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }\n      }" { (expression_statement "iVar2 = strcasecmp(param_1,"none");" (assignment_expression "iVar2 = strcasecmp(param_1,"none")" identifier = (call_expression "strcasecmp(param_1,"none")" identifier (argument_list "(param_1,"none")" ( identifier , (string_literal ""none"" " string_content ") )))) ;) (if_statement "if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }" { (expression_statement "uVar3 = dcgettext(0,"Unknown type: %s\n",5);" (assignment_expression "uVar3 = dcgettext(0,"Unknown type: %s\n",5)" identifier = (call_expression "dcgettext(0,"Unknown type: %s\n",5)" identifier (argument_list "(0,"Unknown type: %s\n",5)" ( number_literal , (string_literal ""Unknown type: %s\n"" " string_content escape_sequence ") , number_literal )))) ;) (expression_statement "error(uVar3,param_1);" (call_expression "error(uVar3,param_1)" identifier (argument_list "(uVar3,param_1)" ( identifier , identifier ))) ;) (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;) })) })) })) })) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "int elf_type(char *type)\n\n{\n  int iVar1;\n  int iVar2;\n  char *message;\n  \n  iVar1 = strcasecmp(type,"rel");\n  iVar2 = 1;\n  if (iVar1 != 0) {\n    iVar1 = strcasecmp(type,"exec");\n    iVar2 = 2;\n    if (iVar1 != 0) {\n      iVar1 = strcasecmp(type,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(type,"none");\n        if (iVar2 != 0) {\n          message = (char *)dcgettext(0,"Unknown type: %s\n",5);\n          error(message,type);\n          iVar2 = -1;\n        }\n      }\n    }\n  }\n  return iVar2;\n}\n\n" (function_definition "int elf_type(char *type)\n\n{\n  int iVar1;\n  int iVar2;\n  char *message;\n  \n  iVar1 = strcasecmp(type,"rel");\n  iVar2 = 1;\n  if (iVar1 != 0) {\n    iVar1 = strcasecmp(type,"exec");\n    iVar2 = 2;\n    if (iVar1 != 0) {\n      iVar1 = strcasecmp(type,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(type,"none");\n        if (iVar2 != 0) {\n          message = (char *)dcgettext(0,"Unknown type: %s\n",5);\n          error(message,type);\n          iVar2 = -1;\n        }\n      }\n    }\n  }\n  return iVar2;\n}" primitive_type (function_declarator "elf_type(char *type)" identifier (parameter_list "(char *type)" ( (parameter_declaration "char *type" primitive_type (pointer_declarator "*type" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  char *message;\n  \n  iVar1 = strcasecmp(type,"rel");\n  iVar2 = 1;\n  if (iVar1 != 0) {\n    iVar1 = strcasecmp(type,"exec");\n    iVar2 = 2;\n    if (iVar1 != 0) {\n      iVar1 = strcasecmp(type,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(type,"none");\n        if (iVar2 != 0) {\n          message = (char *)dcgettext(0,"Unknown type: %s\n",5);\n          error(message,type);\n          iVar2 = -1;\n        }\n      }\n    }\n  }\n  return iVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char *message;" primitive_type (pointer_declarator "*message" * identifier) ;) (expression_statement "iVar1 = strcasecmp(type,"rel");" (assignment_expression "iVar1 = strcasecmp(type,"rel")" identifier = (call_expression "strcasecmp(type,"rel")" identifier (argument_list "(type,"rel")" ( identifier , (string_literal ""rel"" " string_content ") )))) ;) (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) (if_statement "if (iVar1 != 0) {\n    iVar1 = strcasecmp(type,"exec");\n    iVar2 = 2;\n    if (iVar1 != 0) {\n      iVar1 = strcasecmp(type,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(type,"none");\n        if (iVar2 != 0) {\n          message = (char *)dcgettext(0,"Unknown type: %s\n",5);\n          error(message,type);\n          iVar2 = -1;\n        }\n      }\n    }\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar1 = strcasecmp(type,"exec");\n    iVar2 = 2;\n    if (iVar1 != 0) {\n      iVar1 = strcasecmp(type,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(type,"none");\n        if (iVar2 != 0) {\n          message = (char *)dcgettext(0,"Unknown type: %s\n",5);\n          error(message,type);\n          iVar2 = -1;\n        }\n      }\n    }\n  }" { (expression_statement "iVar1 = strcasecmp(type,"exec");" (assignment_expression "iVar1 = strcasecmp(type,"exec")" identifier = (call_expression "strcasecmp(type,"exec")" identifier (argument_list "(type,"exec")" ( identifier , (string_literal ""exec"" " string_content ") )))) ;) (expression_statement "iVar2 = 2;" (assignment_expression "iVar2 = 2" identifier = number_literal) ;) (if_statement "if (iVar1 != 0) {\n      iVar1 = strcasecmp(type,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(type,"none");\n        if (iVar2 != 0) {\n          message = (char *)dcgettext(0,"Unknown type: %s\n",5);\n          error(message,type);\n          iVar2 = -1;\n        }\n      }\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar1 = strcasecmp(type,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(type,"none");\n        if (iVar2 != 0) {\n          message = (char *)dcgettext(0,"Unknown type: %s\n",5);\n          error(message,type);\n          iVar2 = -1;\n        }\n      }\n    }" { (expression_statement "iVar1 = strcasecmp(type,"dyn");" (assignment_expression "iVar1 = strcasecmp(type,"dyn")" identifier = (call_expression "strcasecmp(type,"dyn")" identifier (argument_list "(type,"dyn")" ( identifier , (string_literal ""dyn"" " string_content ") )))) ;) (expression_statement "iVar2 = 3;" (assignment_expression "iVar2 = 3" identifier = number_literal) ;) (if_statement "if (iVar1 != 0) {\n        iVar2 = strcasecmp(type,"none");\n        if (iVar2 != 0) {\n          message = (char *)dcgettext(0,"Unknown type: %s\n",5);\n          error(message,type);\n          iVar2 = -1;\n        }\n      }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        iVar2 = strcasecmp(type,"none");\n        if (iVar2 != 0) {\n          message = (char *)dcgettext(0,"Unknown type: %s\n",5);\n          error(message,type);\n          iVar2 = -1;\n        }\n      }" { (expression_statement "iVar2 = strcasecmp(type,"none");" (assignment_expression "iVar2 = strcasecmp(type,"none")" identifier = (call_expression "strcasecmp(type,"none")" identifier (argument_list "(type,"none")" ( identifier , (string_literal ""none"" " string_content ") )))) ;) (if_statement "if (iVar2 != 0) {\n          message = (char *)dcgettext(0,"Unknown type: %s\n",5);\n          error(message,type);\n          iVar2 = -1;\n        }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n          message = (char *)dcgettext(0,"Unknown type: %s\n",5);\n          error(message,type);\n          iVar2 = -1;\n        }" { (expression_statement "message = (char *)dcgettext(0,"Unknown type: %s\n",5);" (assignment_expression "message = (char *)dcgettext(0,"Unknown type: %s\n",5)" identifier = (cast_expression "(char *)dcgettext(0,"Unknown type: %s\n",5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0,"Unknown type: %s\n",5)" identifier (argument_list "(0,"Unknown type: %s\n",5)" ( number_literal , (string_literal ""Unknown type: %s\n"" " string_content escape_sequence ") , number_literal ))))) ;) (expression_statement "error(message,type);" (call_expression "error(message,type)" identifier (argument_list "(message,type)" ( identifier , identifier ))) ;) (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;) })) })) })) })) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "int FUN_001029a0(char *param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined8 uVar3;\n  \n  iVar1 = strcasecmp(param_1,"rel");\n  iVar2 = 1;\n  if (iVar1 != 0) {\n    iVar1 = strcasecmp(param_1,"exec");\n    iVar2 = 2;\n    if (iVar1 != 0) {\n      iVar1 = strcasecmp(param_1,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(param_1,"none");\n        if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }\n      }\n    }\n  }\n  return iVar2;\n}\n\n" (function_definition "int FUN_001029a0(char *param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined8 uVar3;\n  \n  iVar1 = strcasecmp(param_1,"rel");\n  iVar2 = 1;\n  if (iVar1 != 0) {\n    iVar1 = strcasecmp(param_1,"exec");\n    iVar2 = 2;\n    if (iVar1 != 0) {\n      iVar1 = strcasecmp(param_1,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(param_1,"none");\n        if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }\n      }\n    }\n  }\n  return iVar2;\n}" primitive_type (function_declarator "FUN_001029a0(char *param_1)" identifier (parameter_list "(char *param_1)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined8 uVar3;\n  \n  iVar1 = strcasecmp(param_1,"rel");\n  iVar2 = 1;\n  if (iVar1 != 0) {\n    iVar1 = strcasecmp(param_1,"exec");\n    iVar2 = 2;\n    if (iVar1 != 0) {\n      iVar1 = strcasecmp(param_1,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(param_1,"none");\n        if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }\n      }\n    }\n  }\n  return iVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined8 uVar3;" type_identifier identifier ;) (expression_statement "iVar1 = strcasecmp(param_1,"rel");" (assignment_expression "iVar1 = strcasecmp(param_1,"rel")" identifier = (call_expression "strcasecmp(param_1,"rel")" identifier (argument_list "(param_1,"rel")" ( identifier , (string_literal ""rel"" " string_content ") )))) ;) (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) (if_statement "if (iVar1 != 0) {\n    iVar1 = strcasecmp(param_1,"exec");\n    iVar2 = 2;\n    if (iVar1 != 0) {\n      iVar1 = strcasecmp(param_1,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(param_1,"none");\n        if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }\n      }\n    }\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar1 = strcasecmp(param_1,"exec");\n    iVar2 = 2;\n    if (iVar1 != 0) {\n      iVar1 = strcasecmp(param_1,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(param_1,"none");\n        if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }\n      }\n    }\n  }" { (expression_statement "iVar1 = strcasecmp(param_1,"exec");" (assignment_expression "iVar1 = strcasecmp(param_1,"exec")" identifier = (call_expression "strcasecmp(param_1,"exec")" identifier (argument_list "(param_1,"exec")" ( identifier , (string_literal ""exec"" " string_content ") )))) ;) (expression_statement "iVar2 = 2;" (assignment_expression "iVar2 = 2" identifier = number_literal) ;) (if_statement "if (iVar1 != 0) {\n      iVar1 = strcasecmp(param_1,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(param_1,"none");\n        if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }\n      }\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar1 = strcasecmp(param_1,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(param_1,"none");\n        if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }\n      }\n    }" { (expression_statement "iVar1 = strcasecmp(param_1,"dyn");" (assignment_expression "iVar1 = strcasecmp(param_1,"dyn")" identifier = (call_expression "strcasecmp(param_1,"dyn")" identifier (argument_list "(param_1,"dyn")" ( identifier , (string_literal ""dyn"" " string_content ") )))) ;) (expression_statement "iVar2 = 3;" (assignment_expression "iVar2 = 3" identifier = number_literal) ;) (if_statement "if (iVar1 != 0) {\n        iVar2 = strcasecmp(param_1,"none");\n        if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }\n      }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        iVar2 = strcasecmp(param_1,"none");\n        if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }\n      }" { (expression_statement "iVar2 = strcasecmp(param_1,"none");" (assignment_expression "iVar2 = strcasecmp(param_1,"none")" identifier = (call_expression "strcasecmp(param_1,"none")" identifier (argument_list "(param_1,"none")" ( identifier , (string_literal ""none"" " string_content ") )))) ;) (if_statement "if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }" { (expression_statement "uVar3 = dcgettext(0,"Unknown type: %s\n",5);" (assignment_expression "uVar3 = dcgettext(0,"Unknown type: %s\n",5)" identifier = (call_expression "dcgettext(0,"Unknown type: %s\n",5)" identifier (argument_list "(0,"Unknown type: %s\n",5)" ( number_literal , (string_literal ""Unknown type: %s\n"" " string_content escape_sequence ") , number_literal )))) ;) (expression_statement "error(uVar3,param_1);" (call_expression "error(uVar3,param_1)" identifier (argument_list "(uVar3,param_1)" ( identifier , identifier ))) ;) (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;) })) })) })) })) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (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 ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) })) })) })) })) (return_statement return IDENT ;) })))
(function_definition "int FUN_001029a0(char *param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined8 uVar3;\n  \n  iVar1 = strcasecmp(param_1,"rel");\n  iVar2 = 1;\n  if (iVar1 != 0) {\n    iVar1 = strcasecmp(param_1,"exec");\n    iVar2 = 2;\n    if (iVar1 != 0) {\n      iVar1 = strcasecmp(param_1,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(param_1,"none");\n        if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }\n      }\n    }\n  }\n  return iVar2;\n}" (primitive_type "int") (function_declarator "FUN_001029a0(char *param_1)" (identifier "FUN_001029a0") (parameter_list "(char *param_1)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined8 uVar3;\n  \n  iVar1 = strcasecmp(param_1,"rel");\n  iVar2 = 1;\n  if (iVar1 != 0) {\n    iVar1 = strcasecmp(param_1,"exec");\n    iVar2 = 2;\n    if (iVar1 != 0) {\n      iVar1 = strcasecmp(param_1,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(param_1,"none");\n        if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }\n      }\n    }\n  }\n  return iVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined8 uVar3;" (type_identifier "undefined8") (identifier "uVar3") (; ";")) (expression_statement "iVar1 = strcasecmp(param_1,"rel");" (assignment_expression "iVar1 = strcasecmp(param_1,"rel")" (identifier "iVar1") (= "=") (call_expression "strcasecmp(param_1,"rel")" (identifier "strcasecmp") (argument_list "(param_1,"rel")" (( "(") (identifier "param_1") (, ",") (string_literal ""rel"" (" """) (string_content "rel") (" """)) () ")")))) (; ";")) (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" (identifier "iVar2") (= "=") (number_literal "1")) (; ";")) (if_statement "if (iVar1 != 0) {\n    iVar1 = strcasecmp(param_1,"exec");\n    iVar2 = 2;\n    if (iVar1 != 0) {\n      iVar1 = strcasecmp(param_1,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(param_1,"none");\n        if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }\n      }\n    }\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = strcasecmp(param_1,"exec");\n    iVar2 = 2;\n    if (iVar1 != 0) {\n      iVar1 = strcasecmp(param_1,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(param_1,"none");\n        if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }\n      }\n    }\n  }" ({ "{") (expression_statement "iVar1 = strcasecmp(param_1,"exec");" (assignment_expression "iVar1 = strcasecmp(param_1,"exec")" (identifier "iVar1") (= "=") (call_expression "strcasecmp(param_1,"exec")" (identifier "strcasecmp") (argument_list "(param_1,"exec")" (( "(") (identifier "param_1") (, ",") (string_literal ""exec"" (" """) (string_content "exec") (" """)) () ")")))) (; ";")) (expression_statement "iVar2 = 2;" (assignment_expression "iVar2 = 2" (identifier "iVar2") (= "=") (number_literal "2")) (; ";")) (if_statement "if (iVar1 != 0) {\n      iVar1 = strcasecmp(param_1,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(param_1,"none");\n        if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }\n      }\n    }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      iVar1 = strcasecmp(param_1,"dyn");\n      iVar2 = 3;\n      if (iVar1 != 0) {\n        iVar2 = strcasecmp(param_1,"none");\n        if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }\n      }\n    }" ({ "{") (expression_statement "iVar1 = strcasecmp(param_1,"dyn");" (assignment_expression "iVar1 = strcasecmp(param_1,"dyn")" (identifier "iVar1") (= "=") (call_expression "strcasecmp(param_1,"dyn")" (identifier "strcasecmp") (argument_list "(param_1,"dyn")" (( "(") (identifier "param_1") (, ",") (string_literal ""dyn"" (" """) (string_content "dyn") (" """)) () ")")))) (; ";")) (expression_statement "iVar2 = 3;" (assignment_expression "iVar2 = 3" (identifier "iVar2") (= "=") (number_literal "3")) (; ";")) (if_statement "if (iVar1 != 0) {\n        iVar2 = strcasecmp(param_1,"none");\n        if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }\n      }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        iVar2 = strcasecmp(param_1,"none");\n        if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }\n      }" ({ "{") (expression_statement "iVar2 = strcasecmp(param_1,"none");" (assignment_expression "iVar2 = strcasecmp(param_1,"none")" (identifier "iVar2") (= "=") (call_expression "strcasecmp(param_1,"none")" (identifier "strcasecmp") (argument_list "(param_1,"none")" (( "(") (identifier "param_1") (, ",") (string_literal ""none"" (" """) (string_content "none") (" """)) () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          uVar3 = dcgettext(0,"Unknown type: %s\n",5);\n          error(uVar3,param_1);\n          iVar2 = -1;\n        }" ({ "{") (expression_statement "uVar3 = dcgettext(0,"Unknown type: %s\n",5);" (assignment_expression "uVar3 = dcgettext(0,"Unknown type: %s\n",5)" (identifier "uVar3") (= "=") (call_expression "dcgettext(0,"Unknown type: %s\n",5)" (identifier "dcgettext") (argument_list "(0,"Unknown type: %s\n",5)" (( "(") (number_literal "0") (, ",") (string_literal ""Unknown type: %s\n"" (" """) (string_content "Unknown type: %s") (escape_sequence "\n") (" """)) (, ",") (number_literal "5") () ")")))) (; ";")) (expression_statement "error(uVar3,param_1);" (call_expression "error(uVar3,param_1)" (identifier "error") (argument_list "(uVar3,param_1)" (( "(") (identifier "uVar3") (, ",") (identifier "param_1") () ")"))) (; ";")) (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" (identifier "iVar2") (= "=") (number_literal "-1")) (; ";")) (} "}"))) (} "}"))) (} "}"))) (} "}"))) (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}")))

int function_1(char *type)

{
  int var_2;
  int var_3;
  char *message;
  
  var_2 = var_1(type,"rel");
  var_3 = 1;
  if (var_2 != 0) {
    var_2 = var_1(type,"exec");
    var_3 = 2;
    if (var_2 != 0) {
      var_2 = var_1(type,"dyn");
      var_3 = 3;
      if (var_2 != 0) {
        var_3 = var_1(type,"none");
        if (var_3 != 0) {
          message = (char *)var_4(0,"Unknown type: %s\n",5);
          var_5(message,type);
          var_3 = -1;
        }
      }
    }
  }
  return var_3;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal) (string_literal (string_content) (escape_sequence)) (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))))))))))) (return_statement (identifier)))))

int MASKED(char *param_1)

{
  int iVar1;
  int iVar2;
  undefined8 uVar3;
  
  iVar1 = strcasecmp(param_1,"rel");
  iVar2 = 1;
  if (iVar1 != 0) {
    iVar1 = strcasecmp(param_1,"exec");
    iVar2 = 2;
    if (iVar1 != 0) {
      iVar1 = strcasecmp(param_1,"dyn");
      iVar2 = 3;
      if (iVar1 != 0) {
        iVar2 = strcasecmp(param_1,"none");
        if (iVar2 != 0) {
          uVar3 = dcgettext(0,"Unknown type: %s\n",5);
          error(uVar3,param_1);
          iVar2 = -1;
        }
      }
    }
  }
  return iVar2;
}

