
/* WARNING: Unknown calling convention */

int sockaddr_is_loopback(sockaddr *sa)

{
  sa_family_t sVar1;
  int iVar2;
  uint uVar3;
  sockaddr_union *u;
  
  sVar1 = sa->sa_family;
  if (sVar1 == 2) {
    return (int)(sa->sa_data[2] == '\x7f');
  }
  if (sVar1 != 10) {
    return (int)(sVar1 == 1);
  }
  uVar3 = 0;
  if (((*(int *)(sa->sa_data + 6) == 0) && (*(int *)(sa->sa_data + 10) == 0)) &&
     (iVar2._0_2_ = sa[1].sa_family, iVar2._2_1_ = sa[1].sa_data[0], iVar2._3_1_ = sa[1].sa_data[1],
     iVar2 == 0)) {
    uVar3 = (uint)(*(int *)(sa[1].sa_data + 2) == 0x1000000);
  }
  return uVar3;
}



bool FUN_00151af5(short *param_1)

{
  short sVar1;
  bool bVar2;
  
  sVar1 = *param_1;
  if (sVar1 == 2) {
    return (char)param_1[2] == '\x7f';
  }
  if (sVar1 != 10) {
    return sVar1 == 1;
  }
  bVar2 = false;
  if (((*(int *)(param_1 + 4) == 0) && (*(int *)(param_1 + 6) == 0)) && (*(int *)(param_1 + 8) == 0)
     ) {
    bVar2 = *(int *)(param_1 + 10) == 0x1000000;
  }
  return bVar2;
}


MOVZX EAX,word ptr [RDI]
CMP AX,0x2
JZ 0x00151b0f
CMP AX,0xa
JZ 0x00151b1a
CMP AX,0x1
SETZ AL
MOVZX EAX,AL
RET
CMP byte ptr [RDI + 0x4],0x7f
SETZ AL
MOVZX EAX,AL
RET
MOV EAX,0x0
CMP dword ptr [RDI + 0x8],0x0
JNZ 0x00151b3e
CMP dword ptr [RDI + 0xc],0x0
JNZ 0x00151b3e
CMP dword ptr [RDI + 0x10],0x0
JNZ 0x00151b3e
CMP dword ptr [RDI + 0x14],0x1000000
SETZ AL
MOVZX EAX,AL
RET
(translation_unit "bool FUN_00151af5(short *param_1)\n\n{\n  short sVar1;\n  bool bVar2;\n  \n  sVar1 = *param_1;\n  if (sVar1 == 2) {\n    return (char)param_1[2] == '\x7f';\n  }\n  if (sVar1 != 10) {\n    return sVar1 == 1;\n  }\n  bVar2 = false;\n  if (((*(int *)(param_1 + 4) == 0) && (*(int *)(param_1 + 6) == 0)) && (*(int *)(param_1 + 8) == 0)\n     ) {\n    bVar2 = *(int *)(param_1 + 10) == 0x1000000;\n  }\n  return bVar2;\n}\n\n" (function_definition "bool FUN_00151af5(short *param_1)\n\n{\n  short sVar1;\n  bool bVar2;\n  \n  sVar1 = *param_1;\n  if (sVar1 == 2) {\n    return (char)param_1[2] == '\x7f';\n  }\n  if (sVar1 != 10) {\n    return sVar1 == 1;\n  }\n  bVar2 = false;\n  if (((*(int *)(param_1 + 4) == 0) && (*(int *)(param_1 + 6) == 0)) && (*(int *)(param_1 + 8) == 0)\n     ) {\n    bVar2 = *(int *)(param_1 + 10) == 0x1000000;\n  }\n  return bVar2;\n}" primitive_type (function_declarator "FUN_00151af5(short *param_1)" identifier (parameter_list "(short *param_1)" ( (parameter_declaration "short *param_1" (sized_type_specifier "short" short) (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  short sVar1;\n  bool bVar2;\n  \n  sVar1 = *param_1;\n  if (sVar1 == 2) {\n    return (char)param_1[2] == '\x7f';\n  }\n  if (sVar1 != 10) {\n    return sVar1 == 1;\n  }\n  bVar2 = false;\n  if (((*(int *)(param_1 + 4) == 0) && (*(int *)(param_1 + 6) == 0)) && (*(int *)(param_1 + 8) == 0)\n     ) {\n    bVar2 = *(int *)(param_1 + 10) == 0x1000000;\n  }\n  return bVar2;\n}" { (declaration "short sVar1;" (sized_type_specifier "short" short) identifier ;) (declaration "bool bVar2;" primitive_type identifier ;) (expression_statement "sVar1 = *param_1;" (assignment_expression "sVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (sVar1 == 2) {\n    return (char)param_1[2] == '\x7f';\n  }" if (parenthesized_expression "(sVar1 == 2)" ( (binary_expression "sVar1 == 2" identifier == number_literal) )) (compound_statement "{\n    return (char)param_1[2] == '\x7f';\n  }" { (return_statement "return (char)param_1[2] == '\x7f';" return (binary_expression "(char)param_1[2] == '\x7f'" (cast_expression "(char)param_1[2]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "param_1[2]" identifier [ number_literal ])) == (char_literal "'\x7f'" ' escape_sequence ')) ;) })) (if_statement "if (sVar1 != 10) {\n    return sVar1 == 1;\n  }" if (parenthesized_expression "(sVar1 != 10)" ( (binary_expression "sVar1 != 10" identifier != number_literal) )) (compound_statement "{\n    return sVar1 == 1;\n  }" { (return_statement "return sVar1 == 1;" return (binary_expression "sVar1 == 1" identifier == number_literal) ;) })) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) (if_statement "if (((*(int *)(param_1 + 4) == 0) && (*(int *)(param_1 + 6) == 0)) && (*(int *)(param_1 + 8) == 0)\n     ) {\n    bVar2 = *(int *)(param_1 + 10) == 0x1000000;\n  }" if (parenthesized_expression "(((*(int *)(param_1 + 4) == 0) && (*(int *)(param_1 + 6) == 0)) && (*(int *)(param_1 + 8) == 0)\n     )" ( (binary_expression "((*(int *)(param_1 + 4) == 0) && (*(int *)(param_1 + 6) == 0)) && (*(int *)(param_1 + 8) == 0)" (parenthesized_expression "((*(int *)(param_1 + 4) == 0) && (*(int *)(param_1 + 6) == 0))" ( (binary_expression "(*(int *)(param_1 + 4) == 0) && (*(int *)(param_1 + 6) == 0)" (parenthesized_expression "(*(int *)(param_1 + 4) == 0)" ( (binary_expression "*(int *)(param_1 + 4) == 0" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) == number_literal) )) && (parenthesized_expression "(*(int *)(param_1 + 6) == 0)" ( (binary_expression "*(int *)(param_1 + 6) == 0" (pointer_expression "*(int *)(param_1 + 6)" * (cast_expression "(int *)(param_1 + 6)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 6)" ( (binary_expression "param_1 + 6" identifier + number_literal) )))) == number_literal) ))) )) && (parenthesized_expression "(*(int *)(param_1 + 8) == 0)" ( (binary_expression "*(int *)(param_1 + 8) == 0" (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) == number_literal) ))) )) (compound_statement "{\n    bVar2 = *(int *)(param_1 + 10) == 0x1000000;\n  }" { (expression_statement "bVar2 = *(int *)(param_1 + 10) == 0x1000000;" (assignment_expression "bVar2 = *(int *)(param_1 + 10) == 0x1000000" identifier = (binary_expression "*(int *)(param_1 + 10) == 0x1000000" (pointer_expression "*(int *)(param_1 + 10)" * (cast_expression "(int *)(param_1 + 10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 10)" ( (binary_expression "param_1 + 10" identifier + number_literal) )))) == number_literal)) ;) })) (return_statement "return bVar2;" return identifier ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nint sockaddr_is_loopback(sockaddr *sa)\n\n{\n  sa_family_t sVar1;\n  int iVar2;\n  uint uVar3;\n  sockaddr_union *u;\n  \n  sVar1 = sa->sa_family;\n  if (sVar1 == 2) {\n    return (int)(sa->sa_data[2] == '\x7f');\n  }\n  if (sVar1 != 10) {\n    return (int)(sVar1 == 1);\n  }\n  uVar3 = 0;\n  if (((*(int *)(sa->sa_data + 6) == 0) && (*(int *)(sa->sa_data + 10) == 0)) &&\n     (iVar2._0_2_ = sa[1].sa_family, iVar2._2_1_ = sa[1].sa_data[0], iVar2._3_1_ = sa[1].sa_data[1],\n     iVar2 == 0)) {\n    uVar3 = (uint)(*(int *)(sa[1].sa_data + 2) == 0x1000000);\n  }\n  return uVar3;\n}\n\n" comment (function_definition "int sockaddr_is_loopback(sockaddr *sa)\n\n{\n  sa_family_t sVar1;\n  int iVar2;\n  uint uVar3;\n  sockaddr_union *u;\n  \n  sVar1 = sa->sa_family;\n  if (sVar1 == 2) {\n    return (int)(sa->sa_data[2] == '\x7f');\n  }\n  if (sVar1 != 10) {\n    return (int)(sVar1 == 1);\n  }\n  uVar3 = 0;\n  if (((*(int *)(sa->sa_data + 6) == 0) && (*(int *)(sa->sa_data + 10) == 0)) &&\n     (iVar2._0_2_ = sa[1].sa_family, iVar2._2_1_ = sa[1].sa_data[0], iVar2._3_1_ = sa[1].sa_data[1],\n     iVar2 == 0)) {\n    uVar3 = (uint)(*(int *)(sa[1].sa_data + 2) == 0x1000000);\n  }\n  return uVar3;\n}" primitive_type (function_declarator "sockaddr_is_loopback(sockaddr *sa)" identifier (parameter_list "(sockaddr *sa)" ( (parameter_declaration "sockaddr *sa" type_identifier (pointer_declarator "*sa" * identifier)) ))) (compound_statement "{\n  sa_family_t sVar1;\n  int iVar2;\n  uint uVar3;\n  sockaddr_union *u;\n  \n  sVar1 = sa->sa_family;\n  if (sVar1 == 2) {\n    return (int)(sa->sa_data[2] == '\x7f');\n  }\n  if (sVar1 != 10) {\n    return (int)(sVar1 == 1);\n  }\n  uVar3 = 0;\n  if (((*(int *)(sa->sa_data + 6) == 0) && (*(int *)(sa->sa_data + 10) == 0)) &&\n     (iVar2._0_2_ = sa[1].sa_family, iVar2._2_1_ = sa[1].sa_data[0], iVar2._3_1_ = sa[1].sa_data[1],\n     iVar2 == 0)) {\n    uVar3 = (uint)(*(int *)(sa[1].sa_data + 2) == 0x1000000);\n  }\n  return uVar3;\n}" { (declaration "sa_family_t sVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "sockaddr_union *u;" type_identifier (pointer_declarator "*u" * identifier) ;) (expression_statement "sVar1 = sa->sa_family;" (assignment_expression "sVar1 = sa->sa_family" identifier = (field_expression "sa->sa_family" identifier -> field_identifier)) ;) (if_statement "if (sVar1 == 2) {\n    return (int)(sa->sa_data[2] == '\x7f');\n  }" if (parenthesized_expression "(sVar1 == 2)" ( (binary_expression "sVar1 == 2" identifier == number_literal) )) (compound_statement "{\n    return (int)(sa->sa_data[2] == '\x7f');\n  }" { (return_statement "return (int)(sa->sa_data[2] == '\x7f');" return (cast_expression "(int)(sa->sa_data[2] == '\x7f')" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(sa->sa_data[2] == '\x7f')" ( (binary_expression "sa->sa_data[2] == '\x7f'" (subscript_expression "sa->sa_data[2]" (field_expression "sa->sa_data" identifier -> field_identifier) [ number_literal ]) == (char_literal "'\x7f'" ' escape_sequence ')) ))) ;) })) (if_statement "if (sVar1 != 10) {\n    return (int)(sVar1 == 1);\n  }" if (parenthesized_expression "(sVar1 != 10)" ( (binary_expression "sVar1 != 10" identifier != number_literal) )) (compound_statement "{\n    return (int)(sVar1 == 1);\n  }" { (return_statement "return (int)(sVar1 == 1);" return (cast_expression "(int)(sVar1 == 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(sVar1 == 1)" ( (binary_expression "sVar1 == 1" identifier == number_literal) ))) ;) })) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (if_statement "if (((*(int *)(sa->sa_data + 6) == 0) && (*(int *)(sa->sa_data + 10) == 0)) &&\n     (iVar2._0_2_ = sa[1].sa_family, iVar2._2_1_ = sa[1].sa_data[0], iVar2._3_1_ = sa[1].sa_data[1],\n     iVar2 == 0)) {\n    uVar3 = (uint)(*(int *)(sa[1].sa_data + 2) == 0x1000000);\n  }" if (parenthesized_expression "(((*(int *)(sa->sa_data + 6) == 0) && (*(int *)(sa->sa_data + 10) == 0)) &&\n     (iVar2._0_2_ = sa[1].sa_family, iVar2._2_1_ = sa[1].sa_data[0], iVar2._3_1_ = sa[1].sa_data[1],\n     iVar2 == 0))" ( (binary_expression "((*(int *)(sa->sa_data + 6) == 0) && (*(int *)(sa->sa_data + 10) == 0)) &&\n     (iVar2._0_2_ = sa[1].sa_family, iVar2._2_1_ = sa[1].sa_data[0], iVar2._3_1_ = sa[1].sa_data[1],\n     iVar2 == 0)" (parenthesized_expression "((*(int *)(sa->sa_data + 6) == 0) && (*(int *)(sa->sa_data + 10) == 0))" ( (binary_expression "(*(int *)(sa->sa_data + 6) == 0) && (*(int *)(sa->sa_data + 10) == 0)" (parenthesized_expression "(*(int *)(sa->sa_data + 6) == 0)" ( (binary_expression "*(int *)(sa->sa_data + 6) == 0" (pointer_expression "*(int *)(sa->sa_data + 6)" * (cast_expression "(int *)(sa->sa_data + 6)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(sa->sa_data + 6)" ( (binary_expression "sa->sa_data + 6" (field_expression "sa->sa_data" identifier -> field_identifier) + number_literal) )))) == number_literal) )) && (parenthesized_expression "(*(int *)(sa->sa_data + 10) == 0)" ( (binary_expression "*(int *)(sa->sa_data + 10) == 0" (pointer_expression "*(int *)(sa->sa_data + 10)" * (cast_expression "(int *)(sa->sa_data + 10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(sa->sa_data + 10)" ( (binary_expression "sa->sa_data + 10" (field_expression "sa->sa_data" identifier -> field_identifier) + number_literal) )))) == number_literal) ))) )) && (parenthesized_expression "(iVar2._0_2_ = sa[1].sa_family, iVar2._2_1_ = sa[1].sa_data[0], iVar2._3_1_ = sa[1].sa_data[1],\n     iVar2 == 0)" ( (comma_expression "iVar2._0_2_ = sa[1].sa_family, iVar2._2_1_ = sa[1].sa_data[0], iVar2._3_1_ = sa[1].sa_data[1],\n     iVar2 == 0" (assignment_expression "iVar2._0_2_ = sa[1].sa_family" (field_expression "iVar2._0_2_" identifier . field_identifier) = (field_expression "sa[1].sa_family" (subscript_expression "sa[1]" identifier [ number_literal ]) . field_identifier)) , (comma_expression "iVar2._2_1_ = sa[1].sa_data[0], iVar2._3_1_ = sa[1].sa_data[1],\n     iVar2 == 0" (assignment_expression "iVar2._2_1_ = sa[1].sa_data[0]" (field_expression "iVar2._2_1_" identifier . field_identifier) = (subscript_expression "sa[1].sa_data[0]" (field_expression "sa[1].sa_data" (subscript_expression "sa[1]" identifier [ number_literal ]) . field_identifier) [ number_literal ])) , (comma_expression "iVar2._3_1_ = sa[1].sa_data[1],\n     iVar2 == 0" (assignment_expression "iVar2._3_1_ = sa[1].sa_data[1]" (field_expression "iVar2._3_1_" identifier . field_identifier) = (subscript_expression "sa[1].sa_data[1]" (field_expression "sa[1].sa_data" (subscript_expression "sa[1]" identifier [ number_literal ]) . field_identifier) [ number_literal ])) , (binary_expression "iVar2 == 0" identifier == number_literal)))) ))) )) (compound_statement "{\n    uVar3 = (uint)(*(int *)(sa[1].sa_data + 2) == 0x1000000);\n  }" { (expression_statement "uVar3 = (uint)(*(int *)(sa[1].sa_data + 2) == 0x1000000);" (assignment_expression "uVar3 = (uint)(*(int *)(sa[1].sa_data + 2) == 0x1000000)" identifier = (call_expression "(uint)(*(int *)(sa[1].sa_data + 2) == 0x1000000)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*(int *)(sa[1].sa_data + 2) == 0x1000000)" ( (binary_expression "*(int *)(sa[1].sa_data + 2) == 0x1000000" (pointer_expression "*(int *)(sa[1].sa_data + 2)" * (cast_expression "(int *)(sa[1].sa_data + 2)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(sa[1].sa_data + 2)" ( (binary_expression "sa[1].sa_data + 2" (field_expression "sa[1].sa_data" (subscript_expression "sa[1]" identifier [ number_literal ]) . field_identifier) + number_literal) )))) == number_literal) )))) ;) })) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit "bool FUN_00151af5(short *param_1)\n\n{\n  short sVar1;\n  bool bVar2;\n  \n  sVar1 = *param_1;\n  if (sVar1 == 2) {\n    return (char)param_1[2] == '\x7f';\n  }\n  if (sVar1 != 10) {\n    return sVar1 == 1;\n  }\n  bVar2 = false;\n  if (((*(int *)(param_1 + 4) == 0) && (*(int *)(param_1 + 6) == 0)) && (*(int *)(param_1 + 8) == 0)\n     ) {\n    bVar2 = *(int *)(param_1 + 10) == 0x1000000;\n  }\n  return bVar2;\n}\n\n" (function_definition "bool FUN_00151af5(short *param_1)\n\n{\n  short sVar1;\n  bool bVar2;\n  \n  sVar1 = *param_1;\n  if (sVar1 == 2) {\n    return (char)param_1[2] == '\x7f';\n  }\n  if (sVar1 != 10) {\n    return sVar1 == 1;\n  }\n  bVar2 = false;\n  if (((*(int *)(param_1 + 4) == 0) && (*(int *)(param_1 + 6) == 0)) && (*(int *)(param_1 + 8) == 0)\n     ) {\n    bVar2 = *(int *)(param_1 + 10) == 0x1000000;\n  }\n  return bVar2;\n}" primitive_type (function_declarator "FUN_00151af5(short *param_1)" identifier (parameter_list "(short *param_1)" ( (parameter_declaration "short *param_1" (sized_type_specifier "short" short) (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  short sVar1;\n  bool bVar2;\n  \n  sVar1 = *param_1;\n  if (sVar1 == 2) {\n    return (char)param_1[2] == '\x7f';\n  }\n  if (sVar1 != 10) {\n    return sVar1 == 1;\n  }\n  bVar2 = false;\n  if (((*(int *)(param_1 + 4) == 0) && (*(int *)(param_1 + 6) == 0)) && (*(int *)(param_1 + 8) == 0)\n     ) {\n    bVar2 = *(int *)(param_1 + 10) == 0x1000000;\n  }\n  return bVar2;\n}" { (declaration "short sVar1;" (sized_type_specifier "short" short) identifier ;) (declaration "bool bVar2;" primitive_type identifier ;) (expression_statement "sVar1 = *param_1;" (assignment_expression "sVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (sVar1 == 2) {\n    return (char)param_1[2] == '\x7f';\n  }" if (parenthesized_expression "(sVar1 == 2)" ( (binary_expression "sVar1 == 2" identifier == number_literal) )) (compound_statement "{\n    return (char)param_1[2] == '\x7f';\n  }" { (return_statement "return (char)param_1[2] == '\x7f';" return (binary_expression "(char)param_1[2] == '\x7f'" (cast_expression "(char)param_1[2]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "param_1[2]" identifier [ number_literal ])) == (char_literal "'\x7f'" ' escape_sequence ')) ;) })) (if_statement "if (sVar1 != 10) {\n    return sVar1 == 1;\n  }" if (parenthesized_expression "(sVar1 != 10)" ( (binary_expression "sVar1 != 10" identifier != number_literal) )) (compound_statement "{\n    return sVar1 == 1;\n  }" { (return_statement "return sVar1 == 1;" return (binary_expression "sVar1 == 1" identifier == number_literal) ;) })) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) (if_statement "if (((*(int *)(param_1 + 4) == 0) && (*(int *)(param_1 + 6) == 0)) && (*(int *)(param_1 + 8) == 0)\n     ) {\n    bVar2 = *(int *)(param_1 + 10) == 0x1000000;\n  }" if (parenthesized_expression "(((*(int *)(param_1 + 4) == 0) && (*(int *)(param_1 + 6) == 0)) && (*(int *)(param_1 + 8) == 0)\n     )" ( (binary_expression "((*(int *)(param_1 + 4) == 0) && (*(int *)(param_1 + 6) == 0)) && (*(int *)(param_1 + 8) == 0)" (parenthesized_expression "((*(int *)(param_1 + 4) == 0) && (*(int *)(param_1 + 6) == 0))" ( (binary_expression "(*(int *)(param_1 + 4) == 0) && (*(int *)(param_1 + 6) == 0)" (parenthesized_expression "(*(int *)(param_1 + 4) == 0)" ( (binary_expression "*(int *)(param_1 + 4) == 0" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) == number_literal) )) && (parenthesized_expression "(*(int *)(param_1 + 6) == 0)" ( (binary_expression "*(int *)(param_1 + 6) == 0" (pointer_expression "*(int *)(param_1 + 6)" * (cast_expression "(int *)(param_1 + 6)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 6)" ( (binary_expression "param_1 + 6" identifier + number_literal) )))) == number_literal) ))) )) && (parenthesized_expression "(*(int *)(param_1 + 8) == 0)" ( (binary_expression "*(int *)(param_1 + 8) == 0" (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) == number_literal) ))) )) (compound_statement "{\n    bVar2 = *(int *)(param_1 + 10) == 0x1000000;\n  }" { (expression_statement "bVar2 = *(int *)(param_1 + 10) == 0x1000000;" (assignment_expression "bVar2 = *(int *)(param_1 + 10) == 0x1000000" identifier = (binary_expression "*(int *)(param_1 + 10) == 0x1000000" (pointer_expression "*(int *)(param_1 + 10)" * (cast_expression "(int *)(param_1 + 10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 10)" ( (binary_expression "param_1 + 10" identifier + number_literal) )))) == number_literal)) ;) })) (return_statement "return bVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier short) (pointer_declarator * IDENT)) ))) (compound_statement { (declaration (sized_type_specifier short) IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) == (char_literal ' escape_sequence ')) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return (binary_expression IDENT == LIT) ;) })) (expression_statement (assignment_expression IDENT = BOOL) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) ))) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT)) ;) })) (return_statement return IDENT ;) })))
(function_definition "bool FUN_00151af5(short *param_1)\n\n{\n  short sVar1;\n  bool bVar2;\n  \n  sVar1 = *param_1;\n  if (sVar1 == 2) {\n    return (char)param_1[2] == '\x7f';\n  }\n  if (sVar1 != 10) {\n    return sVar1 == 1;\n  }\n  bVar2 = false;\n  if (((*(int *)(param_1 + 4) == 0) && (*(int *)(param_1 + 6) == 0)) && (*(int *)(param_1 + 8) == 0)\n     ) {\n    bVar2 = *(int *)(param_1 + 10) == 0x1000000;\n  }\n  return bVar2;\n}" (primitive_type "bool") (function_declarator "FUN_00151af5(short *param_1)" (identifier "FUN_00151af5") (parameter_list "(short *param_1)" (( "(") (parameter_declaration "short *param_1" (sized_type_specifier "short" (short "short")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  short sVar1;\n  bool bVar2;\n  \n  sVar1 = *param_1;\n  if (sVar1 == 2) {\n    return (char)param_1[2] == '\x7f';\n  }\n  if (sVar1 != 10) {\n    return sVar1 == 1;\n  }\n  bVar2 = false;\n  if (((*(int *)(param_1 + 4) == 0) && (*(int *)(param_1 + 6) == 0)) && (*(int *)(param_1 + 8) == 0)\n     ) {\n    bVar2 = *(int *)(param_1 + 10) == 0x1000000;\n  }\n  return bVar2;\n}" ({ "{") (declaration "short sVar1;" (sized_type_specifier "short" (short "short")) (identifier "sVar1") (; ";")) (declaration "bool bVar2;" (primitive_type "bool") (identifier "bVar2") (; ";")) (expression_statement "sVar1 = *param_1;" (assignment_expression "sVar1 = *param_1" (identifier "sVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (if_statement "if (sVar1 == 2) {\n    return (char)param_1[2] == '\x7f';\n  }" (if "if") (parenthesized_expression "(sVar1 == 2)" (( "(") (binary_expression "sVar1 == 2" (identifier "sVar1") (== "==") (number_literal "2")) () ")")) (compound_statement "{\n    return (char)param_1[2] == '\x7f';\n  }" ({ "{") (return_statement "return (char)param_1[2] == '\x7f';" (return "return") (binary_expression "(char)param_1[2] == '\x7f'" (cast_expression "(char)param_1[2]" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]"))) (== "==") (char_literal "'\x7f'" (' "'") (escape_sequence "\x7f") (' "'"))) (; ";")) (} "}"))) (if_statement "if (sVar1 != 10) {\n    return sVar1 == 1;\n  }" (if "if") (parenthesized_expression "(sVar1 != 10)" (( "(") (binary_expression "sVar1 != 10" (identifier "sVar1") (!= "!=") (number_literal "10")) () ")")) (compound_statement "{\n    return sVar1 == 1;\n  }" ({ "{") (return_statement "return sVar1 == 1;" (return "return") (binary_expression "sVar1 == 1" (identifier "sVar1") (== "==") (number_literal "1")) (; ";")) (} "}"))) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" (identifier "bVar2") (= "=") (false "false")) (; ";")) (if_statement "if (((*(int *)(param_1 + 4) == 0) && (*(int *)(param_1 + 6) == 0)) && (*(int *)(param_1 + 8) == 0)\n     ) {\n    bVar2 = *(int *)(param_1 + 10) == 0x1000000;\n  }" (if "if") (parenthesized_expression "(((*(int *)(param_1 + 4) == 0) && (*(int *)(param_1 + 6) == 0)) && (*(int *)(param_1 + 8) == 0)\n     )" (( "(") (binary_expression "((*(int *)(param_1 + 4) == 0) && (*(int *)(param_1 + 6) == 0)) && (*(int *)(param_1 + 8) == 0)" (parenthesized_expression "((*(int *)(param_1 + 4) == 0) && (*(int *)(param_1 + 6) == 0))" (( "(") (binary_expression "(*(int *)(param_1 + 4) == 0) && (*(int *)(param_1 + 6) == 0)" (parenthesized_expression "(*(int *)(param_1 + 4) == 0)" (( "(") (binary_expression "*(int *)(param_1 + 4) == 0" (pointer_expression "*(int *)(param_1 + 4)" (* "*") (cast_expression "(int *)(param_1 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(*(int *)(param_1 + 6) == 0)" (( "(") (binary_expression "*(int *)(param_1 + 6) == 0" (pointer_expression "*(int *)(param_1 + 6)" (* "*") (cast_expression "(int *)(param_1 + 6)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 6)" (( "(") (binary_expression "param_1 + 6" (identifier "param_1") (+ "+") (number_literal "6")) () ")")))) (== "==") (number_literal "0")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(*(int *)(param_1 + 8) == 0)" (( "(") (binary_expression "*(int *)(param_1 + 8) == 0" (pointer_expression "*(int *)(param_1 + 8)" (* "*") (cast_expression "(int *)(param_1 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    bVar2 = *(int *)(param_1 + 10) == 0x1000000;\n  }" ({ "{") (expression_statement "bVar2 = *(int *)(param_1 + 10) == 0x1000000;" (assignment_expression "bVar2 = *(int *)(param_1 + 10) == 0x1000000" (identifier "bVar2") (= "=") (binary_expression "*(int *)(param_1 + 10) == 0x1000000" (pointer_expression "*(int *)(param_1 + 10)" (* "*") (cast_expression "(int *)(param_1 + 10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 10)" (( "(") (binary_expression "param_1 + 10" (identifier "param_1") (+ "+") (number_literal "10")) () ")")))) (== "==") (number_literal "0x1000000"))) (; ";")) (} "}"))) (return_statement "return bVar2;" (return "return") (identifier "bVar2") (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

int function_1(type_1 *sa)

{
  type_2 var_1;
  int var_2;
  type_3 uVar3;
  type_4 *u;
  
  var_1 = sa->sa_family;
  if (var_1 == 2) {
    return (int)(sa->sa_data[2] == '\x7f');
  }
  if (var_1 != 10) {
    return (int)(var_1 == 1);
  }
  uVar3 = 0;
  if (((*(int *)(sa->sa_data + 6) == 0) && (*(int *)(sa->sa_data + 10) == 0)) &&
     (var_2._0_2_ = sa[1].sa_family, var_2._2_1_ = sa[1].sa_data[0], var_2._3_1_ = sa[1].sa_data[1],
     var_2 == 0)) {
    uVar3 = (type_3)(*(int *)(sa[1].sa_data + 2) == 0x1000000);
  }
  return uVar3;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (subscript_expression argument: (identifier) index: (number_literal))) right: (char_literal (escape_sequence)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (false))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))))) right: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)))))) (return_statement (identifier)))))

bool MASKED(short *param_1)

{
  short sVar1;
  bool bVar2;
  
  sVar1 = *param_1;
  if (sVar1 == 2) {
    return (char)param_1[2] == '\x7f';
  }
  if (sVar1 != 10) {
    return sVar1 == 1;
  }
  bVar2 = false;
  if (((*(int *)(param_1 + 4) == 0) && (*(int *)(param_1 + 6) == 0)) && (*(int *)(param_1 + 8) == 0)
     ) {
    bVar2 = *(int *)(param_1 + 10) == 0x1000000;
  }
  return bVar2;
}

